From 99030e34d66217fb6000af5200070500b587569b Mon Sep 17 00:00:00 2001 From: 186526 Date: Sun, 5 Jan 2025 23:39:43 +0800 Subject: [PATCH] fix(mastercard): yes we fix mastercard's problem --- dist/index.cjs | 88 +++++----- src/FXGetter/dist/mastercard.js | 296 ++++++++++++++++++++++++++++++++ src/FXGetter/mastercard.ts | 31 +--- 3 files changed, 344 insertions(+), 71 deletions(-) create mode 100644 src/FXGetter/dist/mastercard.js diff --git a/dist/index.cjs b/dist/index.cjs index 1e21759..6c18da8 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -1,16 +1,16 @@ -var lB=Object.create;var $u=Object.defineProperty;var pB=Object.getOwnPropertyDescriptor;var fB=Object.getOwnPropertyNames;var mB=Object.getPrototypeOf,dB=Object.prototype.hasOwnProperty;var Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),on=(e,t)=>{for(var r in t)$u(e,r,{get:t[r],enumerable:!0})},Z1=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of fB(t))!dB.call(e,a)&&a!==r&&$u(e,a,{get:()=>t[a],enumerable:!(n=pB(t,a))||n.enumerable});return e};var Le=(e,t,r)=>(r=e!=null?lB(mB(e)):{},Z1(t||!e||!e.__esModule?$u(r,"default",{value:e,enumerable:!0}):r,e)),hB=e=>Z1($u({},"__esModule",{value:!0}),e);var iy=Be(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.pathToRegexp=hr.tokensToRegexp=hr.regexpToFunction=hr.match=hr.tokensToFunction=hr.compile=hr.parse=void 0;function xB(e){for(var t=[],r=0;r=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){a+=e[i++];continue}break}if(!a)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:a}),r=i;continue}if(n==="("){var l=1,u="",i=r+1;if(e[i]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(i));for(;i)?(?!\?)/g,n=0,a=r.exec(e.source);a;)t.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(e.source);return e}function AB(e,t,r){var n=e.map(function(a){return kf(a,t,r).source});return new RegExp("(?:".concat(n.join("|"),")"),Uf(r))}function NB(e,t,r){return ay(Pf(e,r),t,r)}function ay(e,t,r){r===void 0&&(r={});for(var n=r.strict,a=n===void 0?!1:n,i=r.start,o=i===void 0?!0:i,l=r.end,u=l===void 0?!0:l,s=r.encode,c=s===void 0?function(D){return D}:s,p=r.delimiter,f=p===void 0?"/#?":p,m=r.endsWith,h=m===void 0?"":m,d="[".concat(Oi(h),"]|$"),v="[".concat(Oi(f),"]"),x=o?"^":"",N=0,g=e;N-1:A===void 0;a||(x+="(?:".concat(v,"(?=").concat(d,"))?")),w||(x+="(?=".concat(v,"|").concat(d,")"))}return new RegExp(x,Uf(r))}hr.tokensToRegexp=ay;function kf(e,t,r){return e instanceof RegExp?EB(e,t):Array.isArray(e)?AB(e,t,r):NB(e,t,r)}hr.pathToRegexp=kf});var va=Be((JJ,Qn)=>{function Gf(){return Qn.exports=Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{(function(e,t){typeof jf=="object"&&typeof Vf<"u"?Vf.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e["'typed'"]=t())})(jf,function(){"use strict";function e(){return!0}function t(){return!1}function r(){}let n="Argument is not a typed-function.";function a(){function o(W){return typeof W=="object"&&W!==null&&W.constructor===Object}let l=[{name:"number",test:function(W){return typeof W=="number"}},{name:"string",test:function(W){return typeof W=="string"}},{name:"boolean",test:function(W){return typeof W=="boolean"}},{name:"Function",test:function(W){return typeof W=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(W){return W instanceof Date}},{name:"RegExp",test:function(W){return W instanceof RegExp}},{name:"Object",test:o},{name:"null",test:function(W){return W===null}},{name:"undefined",test:function(W){return W===void 0}}],u={name:"any",test:e,isAny:!0},s,c,p=0,f={createCount:0};function m(W){let oe=s.get(W);if(oe)return oe;let pe='Unknown type "'+W+'"',be=W.toLowerCase(),Te;for(Te of c)if(Te.toLowerCase()===be){pe+='. Did you mean "'+Te+'" ?';break}throw new TypeError(pe)}function h(W){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",pe=oe?m(oe).index:c.length,be=[];for(let Ee=0;Ee{let be=s.get(pe);return!be.isAny&&be.test(W)});return oe.length?oe:["any"]}function N(W){return W&&typeof W=="function"&&"_typedFunctionData"in W}function g(W,oe,pe){if(!N(W))throw new TypeError(n);let be=pe&&pe.exact,Te=Array.isArray(oe)?oe.join(","):oe,Ee=D(Te),De=b(Ee);if(!be||De in W.signatures){let ue=W._typedFunctionData.signatureMap.get(De);if(ue)return ue}let Ce=Ee.length,O;if(be){O=[];let ue;for(ue in W.signatures)O.push(W._typedFunctionData.signatureMap.get(ue))}else O=W._typedFunctionData.signatures;for(let ue=0;ue!jr.has(An.name)))continue}He.push(Xe)}}if(O=He,O.length===0)break}let Y;for(Y of O)if(Y.params.length<=Ce)return Y;throw new TypeError("Signature not found (signature: "+(W.name||"unnamed")+"("+b(Ee,", ")+"))")}function y(W,oe,pe){return g(W,oe,pe).implementation}function E(W,oe){let pe=m(oe);if(pe.test(W))return W;let be=pe.conversionsTo;if(be.length===0)throw new Error("There are no conversions to "+oe+" defined.");for(let Te=0;Te1&&arguments[1]!==void 0?arguments[1]:",";return W.map(pe=>pe.name).join(oe)}function S(W){let oe=W.indexOf("...")===0,be=(oe?W.length>3?W.slice(3):"any":W).split("|").map(Ce=>m(Ce.trim())),Te=!1,Ee=oe?"...":"";return{types:be.map(function(Ce){return Te=Ce.isAny||Te,Ee+=Ce.name+"|",{name:Ce.name,typeIndex:Ce.index,test:Ce.test,isAny:Ce.isAny,conversion:null,conversionIndex:-1}}),name:Ee.slice(0,-1),hasAny:Te,hasConversion:!1,restParam:oe}}function A(W){let oe=W.types.map(De=>De.name),pe=z(oe),be=W.hasAny,Te=W.name,Ee=pe.map(function(De){let Ce=m(De.from);return be=Ce.isAny||be,Te+="|"+De.from,{name:De.from,typeIndex:Ce.index,test:Ce.test,isAny:Ce.isAny,conversion:De,conversionIndex:De.index}});return{types:W.types.concat(Ee),name:Te,hasAny:be,hasConversion:Ee.length>0,restParam:W.restParam}}function w(W){return W.typeSet||(W.typeSet=new Set,W.types.forEach(oe=>W.typeSet.add(oe.name))),W.typeSet}function D(W){let oe=[];if(typeof W!="string")throw new TypeError("Signatures must be strings");let pe=W.trim();if(pe==="")return oe;let be=pe.split(",");for(let Te=0;Te=Te+1}}else return W.length===0?function(Ee){return Ee.length===0}:W.length===1?(pe=R(W[0]),function(Ee){return pe(Ee[0])&&Ee.length===1}):W.length===2?(pe=R(W[0]),be=R(W[1]),function(Ee){return pe(Ee[0])&&be(Ee[1])&&Ee.length===2}):(oe=W.map(R),function(Ee){for(let De=0;De{let Te=k(be.params,oe),Ee;for(Ee of Te)pe.add(Ee)}),pe.has("any")?["any"]:Array.from(pe)}function q(W,oe,pe){let be,Te,Ee=W||"unnamed",De=pe,Ce;for(Ce=0;Ce{let Xe=U(He.params,Ce),Mt=R(Xe);(Ce0){let He=x(oe[Ce]);return be=new TypeError("Unexpected type of argument in function "+Ee+" (expected: "+Te.join(" or ")+", actual: "+He.join(" | ")+", index: "+Ce+")"),be.data={category:"wrongType",fn:Ee,index:Ce,actual:He,expected:Te},be}}else De=Ae}let O=De.map(function(Ae){return F(Ae.params)?1/0:Ae.params.length});if(oe.lengthY)return be=new TypeError("Too many arguments in function "+Ee+" (expected: "+Y+", actual: "+oe.length+")"),be.data={category:"tooManyArgs",fn:Ee,index:oe.length,expectedLength:Y},be;let ue=[];for(let Ae=0;Ae0)return 1;let be=Z(W)-Z(oe);return be<0?-1:be>0?1:0}function Q(W,oe){let pe=W.params,be=oe.params,Te=j(pe),Ee=j(be),De=F(pe),Ce=F(be);if(De&&Te.hasAny){if(!Ce||!Ee.hasAny)return 1}else if(Ce&&Ee.hasAny)return-1;let O=0,Y=0,ue;for(ue of pe)ue.hasAny&&++O,ue.hasConversion&&++Y;let Ae=0,He=0;for(ue of be)ue.hasAny&&++Ae,ue.hasConversion&&++He;if(O!==Ae)return O-Ae;if(De&&Te.hasConversion){if(!Ce||!Ee.hasConversion)return 1}else if(Ce&&Ee.hasConversion)return-1;if(Y!==He)return Y-He;if(De){if(!Ce)return 1}else if(Ce)return-1;let Xe=(pe.length-be.length)*(De?-1:1);if(Xe!==0)return Xe;let Mt=[],jr=0;for(let Ci=0;Ci1&&oe.sort((Te,Ee)=>Te.index-Ee.index);let pe=oe[0].conversionsTo;if(W.length===1)return pe;pe=pe.concat([]);let be=new Set(W);for(let Te=1;TeTe.hasConversion)){let Te=F(W),Ee=W.map(fe);pe=function(){let Ce=[],O=Te?arguments.length-1:arguments.length;for(let Y=0;YO.name).join("|"),hasAny:Ce.some(O=>O.isAny),hasConversion:!1,restParam:!0}),De.push(Ee)}else De=Ee.types.map(function(Ce){return{types:[Ce],name:Ce.name,hasAny:Ce.isAny,hasConversion:Ce.conversion,restParam:!1}});return K(De,function(Ce){return oe(pe,be+1,Te.concat([Ce]))})}else return[Te]}return oe(W,0,[])}function I(W,oe){let pe=Math.max(W.length,oe.length);for(let Ce=0;Ce=be:De?be>=Te:be===Te}function $(W){return W.map(oe=>Oe(oe)?ve(oe.referToSelf.callback):ge(oe)?ne(oe.referTo.references,oe.referTo.callback):oe)}function H(W,oe,pe){let be=[],Te;for(Te of W){let Ee=pe[Te];if(typeof Ee!="number")throw new TypeError('No definition for referenced signature "'+Te+'"');if(Ee=oe[Ee],typeof Ee!="function")return!1;be.push(Ee)}return be}function ae(W,oe,pe){let be=$(W),Te=new Array(be.length).fill(!1),Ee=!0;for(;Ee;){Ee=!1;let De=!0;for(let Ce=0;Ce{let be=W[pe];if(oe.test(be.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function me(W,oe){if(f.createCount++,Object.keys(oe).length===0)throw new SyntaxError("No signatures provided");f.warnAgainstDeprecatedThis&&ce(oe);let pe=[],be=[],Te={},Ee=[],De;for(De in oe){if(!Object.prototype.hasOwnProperty.call(oe,De))continue;let St=D(De);if(!St)continue;pe.forEach(function(Zo){if(I(Zo,St))throw new TypeError('Conflicting signatures "'+b(Zo)+'" and "'+b(St)+'".')}),pe.push(St);let Or=be.length;be.push(oe[De]);let uB=St.map(A),Vu;for(Vu of L(uB)){let Zo=b(Vu);Ee.push({params:Vu,name:Zo,fn:Or}),Vu.every(cB=>!cB.hasConversion)&&(Te[Zo]=Or)}}Ee.sort(Q);let Ce=ae(be,Te,Qo),O;for(O in Te)Object.prototype.hasOwnProperty.call(Te,O)&&(Te[O]=Ce[Te[O]]);let Y=[],ue=new Map;for(O of Ee)ue.has(O.name)||(O.fn=Ce[O.fn],Y.push(O),ue.set(O.name,O));let Ae=Y[0]&&Y[0].params.length<=2&&!F(Y[0].params),He=Y[1]&&Y[1].params.length<=2&&!F(Y[1].params),Xe=Y[2]&&Y[2].params.length<=2&&!F(Y[2].params),Mt=Y[3]&&Y[3].params.length<=2&&!F(Y[3].params),jr=Y[4]&&Y[4].params.length<=2&&!F(Y[4].params),An=Y[5]&&Y[5].params.length<=2&&!F(Y[5].params),Ci=Ae&&He&&Xe&&Mt&&jr&&An;for(let St=0;StSt.test),oB=Y.map(St=>St.implementation),sB=function(){for(let Or=nB;Orb(D(pe))),oe=j(arguments);if(typeof oe!="function")throw new TypeError("Callback function expected as last argument");return ne(W,oe)}function ne(W,oe){return{referTo:{references:W,callback:oe}}}function ve(W){if(typeof W!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:W}}}function ge(W){return W&&typeof W.referTo=="object"&&Array.isArray(W.referTo.references)&&typeof W.referTo.callback=="function"}function Oe(W){return W&&typeof W.referToSelf=="object"&&typeof W.referToSelf.callback=="function"}function ye(W,oe){if(!W)return oe;if(oe&&oe!==W){let pe=new Error("Function names do not match (expected: "+W+", actual: "+oe+")");throw pe.data={actual:oe,expected:W},pe}return W}function Qe(W){let oe;for(let pe in W)Object.prototype.hasOwnProperty.call(W,pe)&&(N(W[pe])||typeof W[pe].signature=="string")&&(oe=ye(oe,W[pe].name));return oe}function rt(W,oe){let pe;for(pe in oe)if(Object.prototype.hasOwnProperty.call(oe,pe)){if(pe in W&&oe[pe]!==W[pe]){let be=new Error('Signature "'+pe+'" is defined twice');throw be.data={signature:pe,sourceFunction:oe[pe],destFunction:W[pe]},be}W[pe]=oe[pe]}}let mt=f;f=function(W){let oe=typeof W=="string",pe=oe?1:0,be=oe?W:"",Te={};for(let Ee=pe;Ee1&&arguments[1]!==void 0?arguments[1]:{override:!1};Et(W);let pe=m(W.to),be=pe.conversionsTo.find(Te=>Te.from===W.from);if(be)if(oe&&oe.override)f.removeConversion({from:be.from,to:W.to,convert:be.convert});else throw new Error('There is already a conversion from "'+W.from+'" to "'+pe.name+'"');pe.conversionsTo.push({from:W.from,convert:W.convert,index:p++})},f.addConversions=function(W,oe){W.forEach(pe=>f.addConversion(pe,oe))},f.removeConversion=function(W){Et(W);let oe=m(W.to),pe=se(oe.conversionsTo,Te=>Te.from===W.from);if(!pe)throw new Error("Attempt to remove nonexistent conversion from "+W.from+" to "+W.to);if(pe.convert!==W.convert)throw new Error("Conversion to remove does not match existing conversion");let be=oe.conversionsTo.indexOf(pe);oe.conversionsTo.splice(be,1)},f.resolve=function(W,oe){if(!N(W))throw new TypeError(n);let pe=W._typedFunctionData.signatures;for(let be=0;be{(function(e){"use strict";var t=Math.cosh||function(s){return Math.abs(s)<1e-9?1-s:(Math.exp(s)+Math.exp(-s))*.5},r=Math.sinh||function(s){return Math.abs(s)<1e-9?s:(Math.exp(s)-Math.exp(-s))*.5},n=function(s){var c=Math.PI/4;if(-c>s||s>c)return Math.cos(s)-1;var p=s*s;return p*(p*(p*(p*(p*(p*(p*(p/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},a=function(s,c){var p=Math.abs(s),f=Math.abs(c);return p<3e3&&f<3e3?Math.sqrt(p*p+f*f):(p0&&i();break;case"number":p.im=0,p.re=s;break;default:i()}return isNaN(p.re)||isNaN(p.im),p};function u(s,c){if(!(this instanceof u))return new u(s,c);var p=l(s,c);this.re=p.re,this.im=p.im}u.prototype={re:0,im:0,sign:function(){var s=this.abs();return new u(this.re/s,this.im/s)},add:function(s,c){var p=new u(s,c);return this.isInfinite()&&p.isInfinite()?u.NAN:this.isInfinite()||p.isInfinite()?u.INFINITY:new u(this.re+p.re,this.im+p.im)},sub:function(s,c){var p=new u(s,c);return this.isInfinite()&&p.isInfinite()?u.NAN:this.isInfinite()||p.isInfinite()?u.INFINITY:new u(this.re-p.re,this.im-p.im)},mul:function(s,c){var p=new u(s,c);return this.isInfinite()&&p.isZero()||this.isZero()&&p.isInfinite()?u.NAN:this.isInfinite()||p.isInfinite()?u.INFINITY:p.im===0&&this.im===0?new u(this.re*p.re,0):new u(this.re*p.re-this.im*p.im,this.re*p.im+this.im*p.re)},div:function(s,c){var p=new u(s,c);if(this.isZero()&&p.isZero()||this.isInfinite()&&p.isInfinite())return u.NAN;if(this.isInfinite()||p.isZero())return u.INFINITY;if(this.isZero()||p.isInfinite())return u.ZERO;s=this.re,c=this.im;var f=p.re,m=p.im,h,d;return m===0?new u(s/f,c/f):Math.abs(f)0)return new u(Math.pow(s,p.re),0);if(s===0)switch((p.re%4+4)%4){case 0:return new u(Math.pow(c,p.re),0);case 1:return new u(0,Math.pow(c,p.re));case 2:return new u(-Math.pow(c,p.re),0);case 3:return new u(0,-Math.pow(c,p.re))}}if(s===0&&c===0&&p.re>0&&p.im>=0)return u.ZERO;var f=Math.atan2(c,s),m=o(s,c);return s=Math.exp(p.re*m-p.im*f),c=p.im*m+p.re*f,new u(s*Math.cos(c),s*Math.sin(c))},sqrt:function(){var s=this.re,c=this.im,p=this.abs(),f,m;if(s>=0){if(c===0)return new u(Math.sqrt(s),0);f=.5*Math.sqrt(2*(p+s))}else f=Math.abs(c)/Math.sqrt(2*(p-s));return s<=0?m=.5*Math.sqrt(2*(p-s)):m=Math.abs(c)/Math.sqrt(2*(p+s)),new u(f,c<0?-m:m)},exp:function(){var s=Math.exp(this.re);return this.im,new u(s*Math.cos(this.im),s*Math.sin(this.im))},expm1:function(){var s=this.re,c=this.im;return new u(Math.expm1(s)*Math.cos(c)+n(c),Math.exp(s)*Math.sin(c))},log:function(){var s=this.re,c=this.im;return c===0&&s>0,new u(o(s,c),Math.atan2(c,s))},abs:function(){return a(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var s=this.re,c=this.im;return new u(Math.sin(s)*t(c),Math.cos(s)*r(c))},cos:function(){var s=this.re,c=this.im;return new u(Math.cos(s)*t(c),-Math.sin(s)*r(c))},tan:function(){var s=2*this.re,c=2*this.im,p=Math.cos(s)+t(c);return new u(Math.sin(s)/p,r(c)/p)},cot:function(){var s=2*this.re,c=2*this.im,p=Math.cos(s)-t(c);return new u(-Math.sin(s)/p,r(c)/p)},sec:function(){var s=this.re,c=this.im,p=.5*t(2*c)+.5*Math.cos(2*s);return new u(Math.cos(s)*t(c)/p,Math.sin(s)*r(c)/p)},csc:function(){var s=this.re,c=this.im,p=.5*t(2*c)-.5*Math.cos(2*s);return new u(Math.sin(s)*t(c)/p,-Math.cos(s)*r(c)/p)},asin:function(){var s=this.re,c=this.im,p=new u(c*c-s*s+1,-2*s*c).sqrt(),f=new u(p.re-c,p.im+s).log();return new u(f.im,-f.re)},acos:function(){var s=this.re,c=this.im,p=new u(c*c-s*s+1,-2*s*c).sqrt(),f=new u(p.re-c,p.im+s).log();return new u(Math.PI/2-f.im,f.re)},atan:function(){var s=this.re,c=this.im;if(s===0){if(c===1)return new u(0,1/0);if(c===-1)return new u(0,-1/0)}var p=s*s+(1-c)*(1-c),f=new u((1-c*c-s*s)/p,-2*s/p).log();return new u(-.5*f.im,.5*f.re)},acot:function(){var s=this.re,c=this.im;if(c===0)return new u(Math.atan2(1,s),0);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).atan():new u(s!==0?s/0:0,c!==0?-c/0:0).atan()},asec:function(){var s=this.re,c=this.im;if(s===0&&c===0)return new u(0,1/0);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).acos():new u(s!==0?s/0:0,c!==0?-c/0:0).acos()},acsc:function(){var s=this.re,c=this.im;if(s===0&&c===0)return new u(Math.PI/2,1/0);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).asin():new u(s!==0?s/0:0,c!==0?-c/0:0).asin()},sinh:function(){var s=this.re,c=this.im;return new u(r(s)*Math.cos(c),t(s)*Math.sin(c))},cosh:function(){var s=this.re,c=this.im;return new u(t(s)*Math.cos(c),r(s)*Math.sin(c))},tanh:function(){var s=2*this.re,c=2*this.im,p=t(s)+Math.cos(c);return new u(r(s)/p,Math.sin(c)/p)},coth:function(){var s=2*this.re,c=2*this.im,p=t(s)-Math.cos(c);return new u(r(s)/p,-Math.sin(c)/p)},csch:function(){var s=this.re,c=this.im,p=Math.cos(2*c)-t(2*s);return new u(-2*r(s)*Math.cos(c)/p,2*t(s)*Math.sin(c)/p)},sech:function(){var s=this.re,c=this.im,p=Math.cos(2*c)+t(2*s);return new u(2*t(s)*Math.cos(c)/p,-2*r(s)*Math.sin(c)/p)},asinh:function(){var s=this.im;this.im=-this.re,this.re=s;var c=this.asin();return this.re=-this.im,this.im=s,s=c.re,c.re=-c.im,c.im=s,c},acosh:function(){var s=this.acos();if(s.im<=0){var c=s.re;s.re=-s.im,s.im=c}else{var c=s.im;s.im=-s.re,s.re=c}return s},atanh:function(){var s=this.re,c=this.im,p=s>1&&c===0,f=1-s,m=1+s,h=f*f+c*c,d=h!==0?new u((m*f-c*c)/h,(c*f+m*c)/h):new u(s!==-1?s/0:0,c!==0?c/0:0),v=d.re;return d.re=o(d.re,d.im)/2,d.im=Math.atan2(d.im,v)/2,p&&(d.im=-d.im),d},acoth:function(){var s=this.re,c=this.im;if(s===0&&c===0)return new u(0,Math.PI/2);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).atanh():new u(s!==0?s/0:0,c!==0?-c/0:0).atanh()},acsch:function(){var s=this.re,c=this.im;if(c===0)return new u(s!==0?Math.log(s+Math.sqrt(s*s+1)):1/0,0);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).asinh():new u(s!==0?s/0:0,c!==0?-c/0:0).asinh()},asech:function(){var s=this.re,c=this.im;if(this.isZero())return u.INFINITY;var p=s*s+c*c;return p!==0?new u(s/p,-c/p).acosh():new u(s!==0?s/0:0,c!==0?-c/0:0).acosh()},inverse:function(){if(this.isZero())return u.INFINITY;if(this.isInfinite())return u.ZERO;var s=this.re,c=this.im,p=s*s+c*c;return new u(s/p,-c/p)},conjugate:function(){return new u(this.re,-this.im)},neg:function(){return new u(-this.re,-this.im)},ceil:function(s){return s=Math.pow(10,s||0),new u(Math.ceil(this.re*s)/s,Math.ceil(this.im*s)/s)},floor:function(s){return s=Math.pow(10,s||0),new u(Math.floor(this.re*s)/s,Math.floor(this.im*s)/s)},round:function(s){return s=Math.pow(10,s||0),new u(Math.round(this.re*s)/s,Math.round(this.im*s)/s)},equals:function(s,c){var p=new u(s,c);return Math.abs(p.re-this.re)<=u.EPSILON&&Math.abs(p.im-this.im)<=u.EPSILON},clone:function(){return new u(this.re,this.im)},toString:function(){var s=this.re,c=this.im,p="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(s){(function(e){"use strict";var t=2e3,r={s:1,n:0,d:1};function n(d,v){if(isNaN(d=parseInt(d,10)))throw m();return d*v}function a(d,v){if(v===0)throw f();var x=Object.create(p.prototype);x.s=d<0?-1:1,d=d<0?-d:d;var N=c(d,v);return x.n=d/N,x.d=v/N,x}function i(d){for(var v={},x=d,N=2,g=4;g<=x;){for(;x%N===0;)x/=N,v[N]=(v[N]||0)+1;g+=1+2*N++}return x!==d?x>1&&(v[x]=(v[x]||0)+1):v[d]=(v[d]||0)+1,v}var o=function(d,v){var x=0,N=1,g=1,y=0,E=0,b=0,S=1,A=1,w=0,D=1,F=1,R=1,P=1e7,U;if(d!=null)if(v!==void 0){if(x=d,N=v,g=x*N,x%1!==0||N%1!==0)throw h()}else switch(typeof d){case"object":{if("d"in d&&"n"in d)x=d.n,N=d.d,"s"in d&&(x*=d.s);else if(0 in d)x=d[0],1 in d&&(N=d[1]);else throw m();g=x*N;break}case"number":{if(d<0&&(g=d,d=-d),d%1===0)x=d;else if(d>0){for(d>=1&&(A=Math.pow(10,Math.floor(1+Math.log(d)/Math.LN10)),d/=A);D<=P&&R<=P;)if(U=(w+F)/(D+R),d===U){D+R<=P?(x=w+F,N=D+R):R>D?(x=F,N=R):(x=w,N=D);break}else d>U?(w+=F,D+=R):(F+=w,R+=D),D>P?(x=F,N=R):(x=w,N=D);x*=A}else(isNaN(d)||isNaN(v))&&(N=x=NaN);break}case"string":{if(D=d.match(/\d+|./g),D===null)throw m();if(D[w]==="-"?(g=-1,w++):D[w]==="+"&&w++,D.length===w+1?E=n(D[w++],g):D[w+1]==="."||D[w]==="."?(D[w]!=="."&&(y=n(D[w++],g)),w++,(w+1===D.length||D[w+1]==="("&&D[w+3]===")"||D[w+1]==="'"&&D[w+3]==="'")&&(E=n(D[w],g),S=Math.pow(10,D[w].length),w++),(D[w]==="("&&D[w+2]===")"||D[w]==="'"&&D[w+2]==="'")&&(b=n(D[w+1],g),A=Math.pow(10,D[w+1].length)-1,w+=3)):D[w+1]==="/"||D[w+1]===":"?(E=n(D[w],g),S=n(D[w+2],1),w+=3):D[w+3]==="/"&&D[w+1]===" "&&(y=n(D[w],g),E=n(D[w+2],g),S=n(D[w+4],1),w+=5),D.length<=w){N=S*A,g=x=b+N*y+A*E;break}}default:throw m()}if(N===0)throw f();r.s=g<0?-1:1,r.n=Math.abs(x),r.d=Math.abs(N)};function l(d,v,x){for(var N=1;v>0;d=d*d%x,v>>=1)v&1&&(N=N*d%x);return N}function u(d,v){for(;v%2===0;v/=2);for(;v%5===0;v/=5);if(v===1)return 0;for(var x=10%v,N=1;x!==1;N++)if(x=x*10%v,N>t)return 0;return N}function s(d,v,x){for(var N=1,g=l(10,x,v),y=0;y<300;y++){if(N===g)return y;N=N*10%v,g=g*10%v}return 0}function c(d,v){if(!d)return v;if(!v)return d;for(;;){if(d%=v,!d)return v;if(v%=d,!v)return d}}function p(d,v){if(o(d,v),this instanceof p)d=c(r.d,r.n),this.s=r.s,this.n=r.n/d,this.d=r.d/d;else return a(r.s*r.n,r.d)}var f=function(){return new Error("Division by Zero")},m=function(){return new Error("Invalid argument")},h=function(){return new Error("Parameters must be integer")};p.prototype={s:1,n:0,d:1,abs:function(){return a(this.n,this.d)},neg:function(){return a(-this.s*this.n,this.d)},add:function(d,v){return o(d,v),a(this.s*this.n*r.d+r.s*this.d*r.n,this.d*r.d)},sub:function(d,v){return o(d,v),a(this.s*this.n*r.d-r.s*this.d*r.n,this.d*r.d)},mul:function(d,v){return o(d,v),a(this.s*r.s*this.n*r.n,this.d*r.d)},div:function(d,v){return o(d,v),a(this.s*r.s*this.n*r.d,this.d*r.n)},clone:function(){return a(this.s*this.n,this.d)},mod:function(d,v){if(isNaN(this.n)||isNaN(this.d))return new p(NaN);if(d===void 0)return a(this.s*this.n%this.d,1);if(o(d,v),r.n===0&&this.d===0)throw f();return a(this.s*(r.d*this.n)%(r.n*this.d),r.d*this.d)},gcd:function(d,v){return o(d,v),a(c(r.n,this.n)*c(r.d,this.d),r.d*this.d)},lcm:function(d,v){return o(d,v),r.n===0&&this.n===0?a(0,1):a(r.n*this.n,c(r.n,this.n)*c(r.d,this.d))},ceil:function(d){return d=Math.pow(10,d||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.ceil(d*this.s*this.n/this.d),d)},floor:function(d){return d=Math.pow(10,d||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.floor(d*this.s*this.n/this.d),d)},round:function(d){return d=Math.pow(10,d||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.round(d*this.s*this.n/this.d),d)},inverse:function(){return a(this.s*this.d,this.n)},pow:function(d,v){if(o(d,v),r.d===1)return r.s<0?a(Math.pow(this.s*this.d,r.n),Math.pow(this.n,r.n)):a(Math.pow(this.s*this.n,r.n),Math.pow(this.d,r.n));if(this.s<0)return null;var x=i(this.n),N=i(this.d),g=1,y=1;for(var E in x)if(E!=="1"){if(E==="0"){g=0;break}if(x[E]*=r.n,x[E]%r.d===0)x[E]/=r.d;else return null;g*=Math.pow(E,x[E])}for(var E in N)if(E!=="1"){if(N[E]*=r.n,N[E]%r.d===0)N[E]/=r.d;else return null;y*=Math.pow(E,N[E])}return r.s<0?a(y,g):a(g,y)},equals:function(d,v){return o(d,v),this.s*this.n*r.d===r.s*r.n*this.d},compare:function(d,v){o(d,v);var x=this.s*this.n*r.d-r.s*r.n*this.d;return(0=0;y--)g=g.inverse().add(x[y]);if(Math.abs(g.sub(v).valueOf())0&&(x+=v,x+=" ",N%=g),x+=N,x+="/",x+=g),x},toLatex:function(d){var v,x="",N=this.n,g=this.d;return this.s<0&&(x+="-"),g===1?x+=N:(d&&(v=Math.floor(N/g))>0&&(x+=v,N%=g),x+="\\frac{",x+=N,x+="}{",x+=g,x+="}"),x},toContinued:function(){var d,v=this.n,x=this.d,N=[];if(isNaN(v)||isNaN(x))return N;do N.push(Math.floor(v/x)),d=v%x,v=x,x=d;while(v!==1);return N},toString:function(d){var v=this.n,x=this.d;if(isNaN(v)||isNaN(x))return"NaN";d=d||15;var N=u(v,x),g=s(v,x,N),y=this.s<0?"-":"";if(y+=v/x|0,v%=x,v*=10,v&&(y+="."),N){for(var E=g;E--;)y+=v/x|0,v%=x,v*=10;y+="(";for(var E=N;E--;)y+=v/x|0,v%=x,v*=10;y+=")"}else for(var E=d;v&&E--;)y+=v/x|0,v%=x,v*=10;return y}},typeof cm=="object"?(Object.defineProperty(p,"__esModule",{value:!0}),p.default=p,p.Fraction=p,nE.exports=p):e.Fraction=p})(cm)});var wh=Be((Qce,na)=>{function Th(e){"@babel/helpers - typeof";return na.exports=Th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na.exports.__esModule=!0,na.exports.default=na.exports,Th(e)}na.exports=Th,na.exports.__esModule=!0,na.exports.default=na.exports});var nN=Be((Zce,As)=>{var rN=wh().default;function Q9(e,t){if(rN(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rN(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}As.exports=Q9,As.exports.__esModule=!0,As.exports.default=As.exports});var aN=Be((Jce,Ns)=>{var Z9=wh().default,J9=nN();function e7(e){var t=J9(e,"string");return Z9(t)=="symbol"?t:t+""}Ns.exports=e7,Ns.exports.__esModule=!0,Ns.exports.default=Ns.exports});var ir=Be((ele,Ts)=>{var t7=aN();function r7(e,t,r){return(t=t7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Ts.exports=r7,Ts.exports.__esModule=!0,Ts.exports.default=Ts.exports});var BN=Be((Kfe,IN)=>{IN.exports=function e(t,r){"use strict";var n=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,i=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,o=/^0x[0-9a-f]+$/i,l=/^0/,u=function(g){return e.insensitive&&(""+g).toLowerCase()||""+g},s=u(t).replace(a,"")||"",c=u(r).replace(a,"")||"",p=s.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),f=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(s.match(o),16)||p.length!==1&&s.match(i)&&Date.parse(s),h=parseInt(c.match(o),16)||m&&c.match(i)&&Date.parse(c)||null,d,v;if(h){if(mh)return 1}for(var x=0,N=Math.max(p.length,f.length);xv)return 1}return 0}});var WT=Be((ige,KT)=>{"use strict";var tv=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=t.preserveFormatting,n=r===void 0?!1:r,a=t.escapeMapFn,i=a===void 0?Nk:a,o=String(e),l="",u=i(tv({},Ek),n?tv({},Ak):{}),s=Object.keys(u),c=function(){var f=!1;s.forEach(function(m,h){f||o.length>=m.length&&o.slice(0,m.length)===m&&(l+=u[s[h]],o=o.slice(m.length,o.length),f=!0)}),f||(l+=o.slice(0,1),o=o.slice(1,o.length))};o;)c();return l}});var t3=Be((e3,Iv)=>{(function(e,t,r){function n(l){var u=this,s=o();u.next=function(){var c=2091639*u.s0+u.c*23283064365386963e-26;return u.s0=u.s1,u.s1=u.s2,u.s2=c-(u.c=c|0)},u.c=1,u.s0=s(" "),u.s1=s(" "),u.s2=s(" "),u.s0-=s(l),u.s0<0&&(u.s0+=1),u.s1-=s(l),u.s1<0&&(u.s1+=1),u.s2-=s(l),u.s2<0&&(u.s2+=1),s=null}function a(l,u){return u.c=l.c,u.s0=l.s0,u.s1=l.s1,u.s2=l.s2,u}function i(l,u){var s=new n(l),c=u&&u.state,p=s.next;return p.int32=function(){return s.next()*4294967296|0},p.double=function(){return p()+(p()*2097152|0)*11102230246251565e-32},p.quick=p,c&&(typeof c=="object"&&a(c,s),p.state=function(){return a(s,{})}),p}function o(){var l=4022871197,u=function(s){s=String(s);for(var c=0;c>>0,p-=l,p*=l,l=p>>>0,p-=l,l+=p*4294967296}return(l>>>0)*23283064365386963e-26};return u}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.alea=i})(e3,typeof Iv=="object"&&Iv,typeof define=="function"&&define)});var n3=Be((r3,Bv)=>{(function(e,t,r){function n(o){var l=this,u="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var c=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^c^c>>>8},o===(o|0)?l.x=o:u+=o;for(var s=0;s>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(typeof s=="object"&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xor128=i})(r3,typeof Bv=="object"&&Bv,typeof define=="function"&&define)});var i3=Be((a3,Lv)=>{(function(e,t,r){function n(o){var l=this,u="";l.next=function(){var c=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(c^c<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,o===(o|0)?l.x=o:u+=o;for(var s=0;s>>4),l.next()}function a(o,l){return l.x=o.x,l.y=o.y,l.z=o.z,l.w=o.w,l.v=o.v,l.d=o.d,l}function i(o,l){var u=new n(o),s=l&&l.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(typeof s=="object"&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xorwow=i})(a3,typeof Lv=="object"&&Lv,typeof define=="function"&&define)});var s3=Be((o3,Pv)=>{(function(e,t,r){function n(o){var l=this;l.next=function(){var s=l.x,c=l.i,p,f,m;return p=s[c],p^=p>>>7,f=p^p<<24,p=s[c+1&7],f^=p^p>>>10,p=s[c+3&7],f^=p^p>>>3,p=s[c+4&7],f^=p^p<<7,p=s[c+7&7],p=p^p<<13,f^=p^p<<9,s[c]=f,l.i=c+1&7,f};function u(s,c){var p,f,m=[];if(c===(c|0))f=m[0]=c;else for(c=""+c,p=0;p0;--p)s.next()}u(l,o)}function a(o,l){return l.x=o.x.slice(),l.i=o.i,l}function i(o,l){o==null&&(o=+new Date);var u=new n(o),s=l&&l.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(s.x&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xorshift7=i})(o3,typeof Pv=="object"&&Pv,typeof define=="function"&&define)});var c3=Be((u3,Uv)=>{(function(e,t,r){function n(o){var l=this;l.next=function(){var s=l.w,c=l.X,p=l.i,f,m;return l.w=s=s+1640531527|0,m=c[p+34&127],f=c[p=p+1&127],m^=m<<13,f^=f<<17,m^=m>>>15,f^=f>>>12,m=c[p]=m^f,l.i=p,m+(s^s>>>16)|0};function u(s,c){var p,f,m,h,d,v=[],x=128;for(c===(c|0)?(f=c,c=null):(c=c+"\0",f=0,x=Math.max(x,c.length)),m=0,h=-32;h>>15,f^=f<<4,f^=f>>>13,h>=0&&(d=d+1640531527|0,p=v[h&127]^=f+d,m=p==0?m+1:0);for(m>=128&&(v[(c&&c.length||0)&127]=-1),m=127,h=4*128;h>0;--h)f=v[m+34&127],p=v[m=m+1&127],f^=f<<13,p^=p<<17,f^=f>>>15,p^=p>>>12,v[m]=f^p;s.w=d,s.X=v,s.i=m}u(l,o)}function a(o,l){return l.i=o.i,l.w=o.w,l.X=o.X.slice(),l}function i(o,l){o==null&&(o=+new Date);var u=new n(o),s=l&&l.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(s.X&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xor4096=i})(u3,typeof Uv=="object"&&Uv,typeof define=="function"&&define)});var p3=Be((l3,kv)=>{(function(e,t,r){function n(o){var l=this,u="";l.next=function(){var c=l.b,p=l.c,f=l.d,m=l.a;return c=c<<25^c>>>7^p,p=p-f|0,f=f<<24^f>>>8^m,m=m-c|0,l.b=c=c<<20^c>>>12^p,l.c=p=p-f|0,l.d=f<<16^p>>>16^m,l.a=m-c|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,o===Math.floor(o)?(l.a=o/4294967296|0,l.b=o|0):u+=o;for(var s=0;s>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(typeof s=="object"&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.tychei=i})(l3,typeof kv=="object"&&kv,typeof define=="function"&&define)});var m3=Be((f3,tp)=>{(function(e,t,r){var n=256,a=6,i=52,o="random",l=r.pow(n,a),u=r.pow(2,i),s=u*2,c=n-1,p;function f(g,y,E){var b=[];y=y==!0?{entropy:!0}:y||{};var S=v(d(y.entropy?[g,N(t)]:g??x(),3),b),A=new m(b),w=function(){for(var D=A.g(a),F=l,R=0;D=s;)D/=2,F/=2,R>>>=1;return(D+R)/F};return w.int32=function(){return A.g(4)|0},w.quick=function(){return A.g(4)/4294967296},w.double=w,v(N(A.S),t),(y.pass||E||function(D,F,R,P){return P&&(P.S&&h(P,A),D.state=function(){return h(A,{})}),R?(r[o]=D,F):D})(w,S,"global"in y?y.global:this==r,y.state)}function m(g){var y,E=g.length,b=this,S=0,A=b.i=b.j=0,w=b.S=[];for(E||(g=[E++]);S{var qq=t3(),Hq=n3(),zq=i3(),Gq=s3(),Yq=c3(),jq=p3(),ci=m3();ci.alea=qq;ci.xor128=Hq;ci.xorwow=zq;ci.xorshift7=Gq;ci.xor4096=Yq;ci.tychei=jq;d3.exports=ci});var DM=Be((w8e,Ex)=>{function yx(){}yx.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function a(){n.off(e,a),t.apply(r,arguments)}return a._=t,this.on(e,a,r)},emit:function(e){var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,a=r.length;for(n;n{var XM=require("stream").Stream,mG=require("util");KM.exports=Mn;function Mn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}mG.inherits(Mn,XM);Mn.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var a=e.emit;return e.emit=function(){return r._handleEmit(arguments),a.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(Mn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Mn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Mn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Mn.prototype.pause=function(){this.source.pause()};Mn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Mn.prototype.pipe=function(){var e=XM.prototype.pipe.apply(this,arguments);return this.resume(),e};Mn.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Mn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var eO=Be((TBe,JM)=>{var dG=require("util"),ZM=require("stream").Stream,QM=WM();JM.exports=jt;function jt(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}dG.inherits(jt,ZM);jt.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};jt.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};jt.prototype.append=function(e){var t=jt.isStreamLike(e);if(t){if(!(e instanceof QM)){var r=QM.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};jt.prototype.pipe=function(e,t){return ZM.prototype.pipe.call(this,e,t),this.resume(),e};jt.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};jt.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=jt.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};jt.prototype._pipeNext=function(e){this._currentStream=e;var t=jt.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};jt.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};jt.prototype.write=function(e){this.emit("data",e)};jt.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};jt.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};jt.prototype.end=function(){this._reset(),this.emit("end")};jt.prototype.destroy=function(){this._reset(),this.emit("close")};jt.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};jt.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};jt.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};jt.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var tO=Be((wBe,hG)=>{hG.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var nO=Be((DBe,rO)=>{rO.exports=tO()});var oO=Be(Ur=>{"use strict";var pp=nO(),vG=require("path").extname,aO=/^\s*([^;\s]*)(?:;|\s|$)/,gG=/^text\//i;Ur.charset=iO;Ur.charsets={lookup:iO};Ur.contentType=xG;Ur.extension=bG;Ur.extensions=Object.create(null);Ur.lookup=yG;Ur.types=Object.create(null);EG(Ur.extensions,Ur.types);function iO(e){if(!e||typeof e!="string")return!1;var t=aO.exec(e),r=t&&pp[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&gG.test(t[1])?"UTF-8":!1}function xG(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Ur.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Ur.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}function bG(e){if(!e||typeof e!="string")return!1;var t=aO.exec(e),r=t&&Ur.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}function yG(e){if(!e||typeof e!="string")return!1;var t=vG("x."+e).toLowerCase().substr(1);return t&&Ur.types[t]||!1}function EG(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(pp).forEach(function(a){var i=pp[a],o=i.extensions;if(!(!o||!o.length)){e[a]=o;for(var l=0;lc||s===c&&t[u].substr(0,12)==="application/"))continue}t[u]=a}}})}});var uO=Be((CBe,sO)=>{sO.exports=AG;function AG(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var Cx=Be((_Be,lO)=>{var cO=uO();lO.exports=NG;function NG(e){var t=!1;return cO(function(){t=!0}),function(n,a){t?e(n,a):cO(function(){e(n,a)})}}});var _x=Be((MBe,pO)=>{pO.exports=TG;function TG(e){Object.keys(e.jobs).forEach(wG.bind(e)),e.jobs={}}function wG(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var Mx=Be((OBe,mO)=>{var fO=Cx(),DG=_x();mO.exports=SG;function SG(e,t,r,n){var a=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[a]=CG(t,a,e[a],function(i,o){a in r.jobs&&(delete r.jobs[a],i?DG(r):r.results[a]=o,n(i,r.results))})}function CG(e,t,r,n){var a;return e.length==2?a=e(r,fO(n)):a=e(r,t,fO(n)),a}});var Ox=Be((RBe,dO)=>{dO.exports=_G;function _G(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(a,i){return t(e[a],e[i])}),n}});var Rx=Be((FBe,hO)=>{var MG=_x(),OG=Cx();hO.exports=RG;function RG(e){Object.keys(this.jobs).length&&(this.index=this.size,MG(this),OG(e)(null,this.results))}});var gO=Be((IBe,vO)=>{var FG=Mx(),IG=Ox(),BG=Rx();vO.exports=LG;function LG(e,t,r){for(var n=IG(e);n.index<(n.keyedList||e).length;)FG(e,t,n,function(a,i){if(a){r(a,i);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return BG.bind(n,r)}});var Fx=Be((BBe,fp)=>{var xO=Mx(),PG=Ox(),UG=Rx();fp.exports=kG;fp.exports.ascending=bO;fp.exports.descending=qG;function kG(e,t,r,n){var a=PG(e,r);return xO(e,t,a,function i(o,l){if(o){n(o,l);return}if(a.index++,a.index<(a.keyedList||e).length){xO(e,t,a,i);return}n(null,a.results)}),UG.bind(a,n)}function bO(e,t){return et?1:0}function qG(e,t){return-1*bO(e,t)}});var EO=Be((LBe,yO)=>{var HG=Fx();yO.exports=zG;function zG(e,t,r){return HG(e,t,null,r)}});var NO=Be((PBe,AO)=>{AO.exports={parallel:gO(),serial:EO(),serialOrdered:Fx()}});var wO=Be((UBe,TO)=>{TO.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var CO=Be((kBe,SO)=>{var Px=eO(),DO=require("util"),Ix=require("path"),GG=require("http"),YG=require("https"),jG=require("url").parse,VG=require("fs"),$G=require("stream").Stream,Bx=oO(),XG=NO(),Lx=wO();SO.exports=yt;DO.inherits(yt,Px);function yt(e){if(!(this instanceof yt))return new yt(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Px.call(this),e=e||{};for(var t in e)this[t]=e[t]}yt.LINE_BREAK=`\r -`;yt.DEFAULT_CONTENT_TYPE="application/octet-stream";yt.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Px.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),DO.isArray(t)){this._error(new Error("Arrays are not supported."));return}var a=this._multiPartHeader(e,t,r),i=this._multiPartFooter();n(a),n(t),n(i),this._trackLength(a,t,r)};yt.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=+r.knownLength:Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+yt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof $G))&&(r.knownLength||this._valuesToMeasure.push(t))};yt.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):VG.stat(e.path,function(r,n){var a;if(r){t(r);return}a=n.size-(e.start?e.start:0),t(null,a)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(r){e.pause(),t(null,+r.headers["content-length"])}),e.resume()):t("Unknown stream")};yt.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),a=this._getContentType(t,r),i="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(a||[])};typeof r.header=="object"&&Lx(o,r.header);var l;for(var u in o)o.hasOwnProperty(u)&&(l=o[u],l!=null&&(Array.isArray(l)||(l=[l]),l.length&&(i+=u+": "+l.join("; ")+yt.LINE_BREAK)));return"--"+this.getBoundary()+yt.LINE_BREAK+i+yt.LINE_BREAK};yt.prototype._getContentDisposition=function(e,t){var r,n;return typeof t.filepath=="string"?r=Ix.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=Ix.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=Ix.basename(e.client._httpMessage.path||"")),r&&(n='filename="'+r+'"'),n};yt.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=Bx.lookup(e.name)),!r&&e.path&&(r=Bx.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=Bx.lookup(t.filepath||t.filename)),!r&&typeof e=="object"&&(r=yt.DEFAULT_CONTENT_TYPE),r};yt.prototype._multiPartFooter=function(){return function(e){var t=yt.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};yt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+yt.LINE_BREAK};yt.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r};yt.prototype.setBoundary=function(e){this._boundary=e};yt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};yt.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r{"use strict";var pY=require("url").parse,fY={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},mY=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function dY(e){var t=typeof e=="string"?pY(e):e||{},r=t.protocol,n=t.host,a=t.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),a=parseInt(a)||fY[r]||0,!hY(n,a)))return"";var i=go("npm_config_"+r+"_proxy")||go(r+"_proxy")||go("npm_config_proxy")||go("all_proxy");return i&&i.indexOf("://")===-1&&(i=r+"://"+i),i}function hY(e,t){var r=(go("npm_config_no_proxy")||go("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var a=n.match(/^(.+):(\d+)$/),i=a?a[1]:n,o=a?parseInt(a[2]):0;return o&&o!==t?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!mY.call(e,i)):e!==i}):!0}function go(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}zO.getProxyForUrl=dY});var jO=Be((qLe,YO)=>{var xo=1e3,bo=xo*60,yo=bo*60,di=yo*24,vY=di*7,gY=di*365.25;YO.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return xY(e);if(r==="number"&&isFinite(e))return t.long?yY(e):bY(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function xY(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*gY;case"weeks":case"week":case"w":return r*vY;case"days":case"day":case"d":return r*di;case"hours":case"hour":case"hrs":case"hr":case"h":return r*yo;case"minutes":case"minute":case"mins":case"min":case"m":return r*bo;case"seconds":case"second":case"secs":case"sec":case"s":return r*xo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function bY(e){var t=Math.abs(e);return t>=di?Math.round(e/di)+"d":t>=yo?Math.round(e/yo)+"h":t>=bo?Math.round(e/bo)+"m":t>=xo?Math.round(e/xo)+"s":e+"ms"}function yY(e){var t=Math.abs(e);return t>=di?vp(e,t,di,"day"):t>=yo?vp(e,t,yo,"hour"):t>=bo?vp(e,t,bo,"minute"):t>=xo?vp(e,t,xo,"second"):e+" ms"}function vp(e,t,r,n){var a=t>=r*1.5;return Math.round(e/r)+" "+n+(a?"s":"")}});var Xx=Be((HLe,VO)=>{function EY(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=a,r.enabled=o,r.humanize=jO(),r.destroy=s,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let p=0;for(let f=0;f{if(b==="%%")return"%";y++;let A=r.formatters[S];if(typeof A=="function"){let w=v[y];b=A.call(x,w),v.splice(y,1),y--}return b}),r.formatArgs.call(x,v),(x.log||r.log).apply(x,v)}return d.namespace=c,d.useColors=r.useColors(),d.color=r.selectColor(c),d.extend=n,d.destroy=r.destroy,Object.defineProperty(d,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==r.namespaces&&(m=r.namespaces,h=r.enabled(c)),h),set:v=>{f=v}}),typeof r.init=="function"&&r.init(d),d}function n(c,p){let f=r(this.namespace+(typeof p>"u"?":":p)+c);return f.log=this.log,f}function a(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let p,f=(typeof c=="string"?c:"").split(/[\s,]+/),m=f.length;for(p=0;p"-"+p)].join(",");return r.enable(""),c}function o(c){if(c[c.length-1]==="*")return!0;let p,f;for(p=0,f=r.skips.length;p{tn.formatArgs=NY;tn.save=TY;tn.load=wY;tn.useColors=AY;tn.storage=DY();tn.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();tn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function AY(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function NY(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+gp.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(r++,a==="%c"&&(n=r))}),e.splice(n,0,t)}tn.log=console.debug||console.log||(()=>{});function TY(e){try{e?tn.storage.setItem("debug",e):tn.storage.removeItem("debug")}catch{}}function wY(){let e;try{e=tn.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function DY(){try{return localStorage}catch{}}gp.exports=Xx()(tn);var{formatters:SY}=gp.exports;SY.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var KO=Be((zLe,XO)=>{"use strict";XO.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),a=t.indexOf("--");return n!==-1&&(a===-1||n{"use strict";var CY=require("os"),WO=require("tty"),hn=KO(),{env:or}=process,Fa;hn("no-color")||hn("no-colors")||hn("color=false")||hn("color=never")?Fa=0:(hn("color")||hn("colors")||hn("color=true")||hn("color=always"))&&(Fa=1);"FORCE_COLOR"in or&&(or.FORCE_COLOR==="true"?Fa=1:or.FORCE_COLOR==="false"?Fa=0:Fa=or.FORCE_COLOR.length===0?1:Math.min(parseInt(or.FORCE_COLOR,10),3));function Kx(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Wx(e,t){if(Fa===0)return 0;if(hn("color=16m")||hn("color=full")||hn("color=truecolor"))return 3;if(hn("color=256"))return 2;if(e&&!t&&Fa===void 0)return 0;let r=Fa||0;if(or.TERM==="dumb")return r;if(process.platform==="win32"){let n=CY.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in or)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in or)||or.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in or)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(or.TEAMCITY_VERSION)?1:0;if(or.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in or){let n=parseInt((or.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(or.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(or.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(or.TERM)||"COLORTERM"in or?1:r}function _Y(e){let t=Wx(e,e&&e.isTTY);return Kx(t)}QO.exports={supportsColor:_Y,stdout:Kx(Wx(!0,WO.isatty(1))),stderr:Kx(Wx(!0,WO.isatty(2)))}});var eR=Be((sr,bp)=>{var MY=require("tty"),xp=require("util");sr.init=PY;sr.log=IY;sr.formatArgs=RY;sr.save=BY;sr.load=LY;sr.useColors=OY;sr.destroy=xp.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");sr.colors=[6,2,3,4,5,1];try{let e=ZO();e&&(e.stderr||e).level>=2&&(sr.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}sr.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(a,i)=>i.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function OY(){return"colors"in sr.inspectOpts?!!sr.inspectOpts.colors:MY.isatty(process.stderr.fd)}function RY(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,a="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${a};1m${t} \x1B[0m`;e[0]=i+e[0].split(` +var lB=Object.create;var $u=Object.defineProperty;var pB=Object.getOwnPropertyDescriptor;var fB=Object.getOwnPropertyNames;var mB=Object.getPrototypeOf,dB=Object.prototype.hasOwnProperty;var Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),on=(e,t)=>{for(var r in t)$u(e,r,{get:t[r],enumerable:!0})},Q1=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of fB(t))!dB.call(e,a)&&a!==r&&$u(e,a,{get:()=>t[a],enumerable:!(n=pB(t,a))||n.enumerable});return e};var Le=(e,t,r)=>(r=e!=null?lB(mB(e)):{},Q1(t||!e||!e.__esModule?$u(r,"default",{value:e,enumerable:!0}):r,e)),hB=e=>Q1($u({},"__esModule",{value:!0}),e);var ay=Be(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.pathToRegexp=hr.tokensToRegexp=hr.regexpToFunction=hr.match=hr.tokensToFunction=hr.compile=hr.parse=void 0;function xB(e){for(var t=[],r=0;r=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){a+=e[i++];continue}break}if(!a)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:a}),r=i;continue}if(n==="("){var l=1,u="",i=r+1;if(e[i]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(i));for(;i)?(?!\?)/g,n=0,a=r.exec(e.source);a;)t.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(e.source);return e}function AB(e,t,r){var n=e.map(function(a){return kf(a,t,r).source});return new RegExp("(?:".concat(n.join("|"),")"),Uf(r))}function NB(e,t,r){return ny(Pf(e,r),t,r)}function ny(e,t,r){r===void 0&&(r={});for(var n=r.strict,a=n===void 0?!1:n,i=r.start,o=i===void 0?!0:i,l=r.end,u=l===void 0?!0:l,s=r.encode,c=s===void 0?function(D){return D}:s,p=r.delimiter,f=p===void 0?"/#?":p,m=r.endsWith,h=m===void 0?"":m,d="[".concat(Oi(h),"]|$"),v="[".concat(Oi(f),"]"),x=o?"^":"",N=0,g=e;N-1:A===void 0;a||(x+="(?:".concat(v,"(?=").concat(d,"))?")),w||(x+="(?=".concat(v,"|").concat(d,")"))}return new RegExp(x,Uf(r))}hr.tokensToRegexp=ny;function kf(e,t,r){return e instanceof RegExp?EB(e,t):Array.isArray(e)?AB(e,t,r):NB(e,t,r)}hr.pathToRegexp=kf});var va=Be((JJ,Qn)=>{function Gf(){return Qn.exports=Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{(function(e,t){typeof jf=="object"&&typeof Vf<"u"?Vf.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e["'typed'"]=t())})(jf,function(){"use strict";function e(){return!0}function t(){return!1}function r(){}let n="Argument is not a typed-function.";function a(){function o(W){return typeof W=="object"&&W!==null&&W.constructor===Object}let l=[{name:"number",test:function(W){return typeof W=="number"}},{name:"string",test:function(W){return typeof W=="string"}},{name:"boolean",test:function(W){return typeof W=="boolean"}},{name:"Function",test:function(W){return typeof W=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(W){return W instanceof Date}},{name:"RegExp",test:function(W){return W instanceof RegExp}},{name:"Object",test:o},{name:"null",test:function(W){return W===null}},{name:"undefined",test:function(W){return W===void 0}}],u={name:"any",test:e,isAny:!0},s,c,p=0,f={createCount:0};function m(W){let oe=s.get(W);if(oe)return oe;let pe='Unknown type "'+W+'"',be=W.toLowerCase(),Te;for(Te of c)if(Te.toLowerCase()===be){pe+='. Did you mean "'+Te+'" ?';break}throw new TypeError(pe)}function h(W){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",pe=oe?m(oe).index:c.length,be=[];for(let Ee=0;Ee{let be=s.get(pe);return!be.isAny&&be.test(W)});return oe.length?oe:["any"]}function N(W){return W&&typeof W=="function"&&"_typedFunctionData"in W}function g(W,oe,pe){if(!N(W))throw new TypeError(n);let be=pe&&pe.exact,Te=Array.isArray(oe)?oe.join(","):oe,Ee=D(Te),De=b(Ee);if(!be||De in W.signatures){let ue=W._typedFunctionData.signatureMap.get(De);if(ue)return ue}let Ce=Ee.length,O;if(be){O=[];let ue;for(ue in W.signatures)O.push(W._typedFunctionData.signatureMap.get(ue))}else O=W._typedFunctionData.signatures;for(let ue=0;ue!jr.has(An.name)))continue}He.push(Xe)}}if(O=He,O.length===0)break}let Y;for(Y of O)if(Y.params.length<=Ce)return Y;throw new TypeError("Signature not found (signature: "+(W.name||"unnamed")+"("+b(Ee,", ")+"))")}function y(W,oe,pe){return g(W,oe,pe).implementation}function E(W,oe){let pe=m(oe);if(pe.test(W))return W;let be=pe.conversionsTo;if(be.length===0)throw new Error("There are no conversions to "+oe+" defined.");for(let Te=0;Te1&&arguments[1]!==void 0?arguments[1]:",";return W.map(pe=>pe.name).join(oe)}function S(W){let oe=W.indexOf("...")===0,be=(oe?W.length>3?W.slice(3):"any":W).split("|").map(Ce=>m(Ce.trim())),Te=!1,Ee=oe?"...":"";return{types:be.map(function(Ce){return Te=Ce.isAny||Te,Ee+=Ce.name+"|",{name:Ce.name,typeIndex:Ce.index,test:Ce.test,isAny:Ce.isAny,conversion:null,conversionIndex:-1}}),name:Ee.slice(0,-1),hasAny:Te,hasConversion:!1,restParam:oe}}function A(W){let oe=W.types.map(De=>De.name),pe=z(oe),be=W.hasAny,Te=W.name,Ee=pe.map(function(De){let Ce=m(De.from);return be=Ce.isAny||be,Te+="|"+De.from,{name:De.from,typeIndex:Ce.index,test:Ce.test,isAny:Ce.isAny,conversion:De,conversionIndex:De.index}});return{types:W.types.concat(Ee),name:Te,hasAny:be,hasConversion:Ee.length>0,restParam:W.restParam}}function w(W){return W.typeSet||(W.typeSet=new Set,W.types.forEach(oe=>W.typeSet.add(oe.name))),W.typeSet}function D(W){let oe=[];if(typeof W!="string")throw new TypeError("Signatures must be strings");let pe=W.trim();if(pe==="")return oe;let be=pe.split(",");for(let Te=0;Te=Te+1}}else return W.length===0?function(Ee){return Ee.length===0}:W.length===1?(pe=R(W[0]),function(Ee){return pe(Ee[0])&&Ee.length===1}):W.length===2?(pe=R(W[0]),be=R(W[1]),function(Ee){return pe(Ee[0])&&be(Ee[1])&&Ee.length===2}):(oe=W.map(R),function(Ee){for(let De=0;De{let Te=k(be.params,oe),Ee;for(Ee of Te)pe.add(Ee)}),pe.has("any")?["any"]:Array.from(pe)}function q(W,oe,pe){let be,Te,Ee=W||"unnamed",De=pe,Ce;for(Ce=0;Ce{let Xe=U(He.params,Ce),Mt=R(Xe);(Ce0){let He=x(oe[Ce]);return be=new TypeError("Unexpected type of argument in function "+Ee+" (expected: "+Te.join(" or ")+", actual: "+He.join(" | ")+", index: "+Ce+")"),be.data={category:"wrongType",fn:Ee,index:Ce,actual:He,expected:Te},be}}else De=Ae}let O=De.map(function(Ae){return F(Ae.params)?1/0:Ae.params.length});if(oe.lengthY)return be=new TypeError("Too many arguments in function "+Ee+" (expected: "+Y+", actual: "+oe.length+")"),be.data={category:"tooManyArgs",fn:Ee,index:oe.length,expectedLength:Y},be;let ue=[];for(let Ae=0;Ae0)return 1;let be=Z(W)-Z(oe);return be<0?-1:be>0?1:0}function Q(W,oe){let pe=W.params,be=oe.params,Te=j(pe),Ee=j(be),De=F(pe),Ce=F(be);if(De&&Te.hasAny){if(!Ce||!Ee.hasAny)return 1}else if(Ce&&Ee.hasAny)return-1;let O=0,Y=0,ue;for(ue of pe)ue.hasAny&&++O,ue.hasConversion&&++Y;let Ae=0,He=0;for(ue of be)ue.hasAny&&++Ae,ue.hasConversion&&++He;if(O!==Ae)return O-Ae;if(De&&Te.hasConversion){if(!Ce||!Ee.hasConversion)return 1}else if(Ce&&Ee.hasConversion)return-1;if(Y!==He)return Y-He;if(De){if(!Ce)return 1}else if(Ce)return-1;let Xe=(pe.length-be.length)*(De?-1:1);if(Xe!==0)return Xe;let Mt=[],jr=0;for(let Ci=0;Ci1&&oe.sort((Te,Ee)=>Te.index-Ee.index);let pe=oe[0].conversionsTo;if(W.length===1)return pe;pe=pe.concat([]);let be=new Set(W);for(let Te=1;TeTe.hasConversion)){let Te=F(W),Ee=W.map(fe);pe=function(){let Ce=[],O=Te?arguments.length-1:arguments.length;for(let Y=0;YO.name).join("|"),hasAny:Ce.some(O=>O.isAny),hasConversion:!1,restParam:!0}),De.push(Ee)}else De=Ee.types.map(function(Ce){return{types:[Ce],name:Ce.name,hasAny:Ce.isAny,hasConversion:Ce.conversion,restParam:!1}});return K(De,function(Ce){return oe(pe,be+1,Te.concat([Ce]))})}else return[Te]}return oe(W,0,[])}function I(W,oe){let pe=Math.max(W.length,oe.length);for(let Ce=0;Ce=be:De?be>=Te:be===Te}function $(W){return W.map(oe=>Oe(oe)?ve(oe.referToSelf.callback):ge(oe)?ne(oe.referTo.references,oe.referTo.callback):oe)}function H(W,oe,pe){let be=[],Te;for(Te of W){let Ee=pe[Te];if(typeof Ee!="number")throw new TypeError('No definition for referenced signature "'+Te+'"');if(Ee=oe[Ee],typeof Ee!="function")return!1;be.push(Ee)}return be}function ae(W,oe,pe){let be=$(W),Te=new Array(be.length).fill(!1),Ee=!0;for(;Ee;){Ee=!1;let De=!0;for(let Ce=0;Ce{let be=W[pe];if(oe.test(be.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function me(W,oe){if(f.createCount++,Object.keys(oe).length===0)throw new SyntaxError("No signatures provided");f.warnAgainstDeprecatedThis&&ce(oe);let pe=[],be=[],Te={},Ee=[],De;for(De in oe){if(!Object.prototype.hasOwnProperty.call(oe,De))continue;let St=D(De);if(!St)continue;pe.forEach(function(Zo){if(I(Zo,St))throw new TypeError('Conflicting signatures "'+b(Zo)+'" and "'+b(St)+'".')}),pe.push(St);let Or=be.length;be.push(oe[De]);let uB=St.map(A),Vu;for(Vu of L(uB)){let Zo=b(Vu);Ee.push({params:Vu,name:Zo,fn:Or}),Vu.every(cB=>!cB.hasConversion)&&(Te[Zo]=Or)}}Ee.sort(Q);let Ce=ae(be,Te,Qo),O;for(O in Te)Object.prototype.hasOwnProperty.call(Te,O)&&(Te[O]=Ce[Te[O]]);let Y=[],ue=new Map;for(O of Ee)ue.has(O.name)||(O.fn=Ce[O.fn],Y.push(O),ue.set(O.name,O));let Ae=Y[0]&&Y[0].params.length<=2&&!F(Y[0].params),He=Y[1]&&Y[1].params.length<=2&&!F(Y[1].params),Xe=Y[2]&&Y[2].params.length<=2&&!F(Y[2].params),Mt=Y[3]&&Y[3].params.length<=2&&!F(Y[3].params),jr=Y[4]&&Y[4].params.length<=2&&!F(Y[4].params),An=Y[5]&&Y[5].params.length<=2&&!F(Y[5].params),Ci=Ae&&He&&Xe&&Mt&&jr&&An;for(let St=0;StSt.test),oB=Y.map(St=>St.implementation),sB=function(){for(let Or=nB;Orb(D(pe))),oe=j(arguments);if(typeof oe!="function")throw new TypeError("Callback function expected as last argument");return ne(W,oe)}function ne(W,oe){return{referTo:{references:W,callback:oe}}}function ve(W){if(typeof W!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:W}}}function ge(W){return W&&typeof W.referTo=="object"&&Array.isArray(W.referTo.references)&&typeof W.referTo.callback=="function"}function Oe(W){return W&&typeof W.referToSelf=="object"&&typeof W.referToSelf.callback=="function"}function ye(W,oe){if(!W)return oe;if(oe&&oe!==W){let pe=new Error("Function names do not match (expected: "+W+", actual: "+oe+")");throw pe.data={actual:oe,expected:W},pe}return W}function Qe(W){let oe;for(let pe in W)Object.prototype.hasOwnProperty.call(W,pe)&&(N(W[pe])||typeof W[pe].signature=="string")&&(oe=ye(oe,W[pe].name));return oe}function rt(W,oe){let pe;for(pe in oe)if(Object.prototype.hasOwnProperty.call(oe,pe)){if(pe in W&&oe[pe]!==W[pe]){let be=new Error('Signature "'+pe+'" is defined twice');throw be.data={signature:pe,sourceFunction:oe[pe],destFunction:W[pe]},be}W[pe]=oe[pe]}}let mt=f;f=function(W){let oe=typeof W=="string",pe=oe?1:0,be=oe?W:"",Te={};for(let Ee=pe;Ee1&&arguments[1]!==void 0?arguments[1]:{override:!1};Et(W);let pe=m(W.to),be=pe.conversionsTo.find(Te=>Te.from===W.from);if(be)if(oe&&oe.override)f.removeConversion({from:be.from,to:W.to,convert:be.convert});else throw new Error('There is already a conversion from "'+W.from+'" to "'+pe.name+'"');pe.conversionsTo.push({from:W.from,convert:W.convert,index:p++})},f.addConversions=function(W,oe){W.forEach(pe=>f.addConversion(pe,oe))},f.removeConversion=function(W){Et(W);let oe=m(W.to),pe=se(oe.conversionsTo,Te=>Te.from===W.from);if(!pe)throw new Error("Attempt to remove nonexistent conversion from "+W.from+" to "+W.to);if(pe.convert!==W.convert)throw new Error("Conversion to remove does not match existing conversion");let be=oe.conversionsTo.indexOf(pe);oe.conversionsTo.splice(be,1)},f.resolve=function(W,oe){if(!N(W))throw new TypeError(n);let pe=W._typedFunctionData.signatures;for(let be=0;be{(function(e){"use strict";var t=Math.cosh||function(s){return Math.abs(s)<1e-9?1-s:(Math.exp(s)+Math.exp(-s))*.5},r=Math.sinh||function(s){return Math.abs(s)<1e-9?s:(Math.exp(s)-Math.exp(-s))*.5},n=function(s){var c=Math.PI/4;if(-c>s||s>c)return Math.cos(s)-1;var p=s*s;return p*(p*(p*(p*(p*(p*(p*(p/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},a=function(s,c){var p=Math.abs(s),f=Math.abs(c);return p<3e3&&f<3e3?Math.sqrt(p*p+f*f):(p0&&i();break;case"number":p.im=0,p.re=s;break;default:i()}return isNaN(p.re)||isNaN(p.im),p};function u(s,c){if(!(this instanceof u))return new u(s,c);var p=l(s,c);this.re=p.re,this.im=p.im}u.prototype={re:0,im:0,sign:function(){var s=this.abs();return new u(this.re/s,this.im/s)},add:function(s,c){var p=new u(s,c);return this.isInfinite()&&p.isInfinite()?u.NAN:this.isInfinite()||p.isInfinite()?u.INFINITY:new u(this.re+p.re,this.im+p.im)},sub:function(s,c){var p=new u(s,c);return this.isInfinite()&&p.isInfinite()?u.NAN:this.isInfinite()||p.isInfinite()?u.INFINITY:new u(this.re-p.re,this.im-p.im)},mul:function(s,c){var p=new u(s,c);return this.isInfinite()&&p.isZero()||this.isZero()&&p.isInfinite()?u.NAN:this.isInfinite()||p.isInfinite()?u.INFINITY:p.im===0&&this.im===0?new u(this.re*p.re,0):new u(this.re*p.re-this.im*p.im,this.re*p.im+this.im*p.re)},div:function(s,c){var p=new u(s,c);if(this.isZero()&&p.isZero()||this.isInfinite()&&p.isInfinite())return u.NAN;if(this.isInfinite()||p.isZero())return u.INFINITY;if(this.isZero()||p.isInfinite())return u.ZERO;s=this.re,c=this.im;var f=p.re,m=p.im,h,d;return m===0?new u(s/f,c/f):Math.abs(f)0)return new u(Math.pow(s,p.re),0);if(s===0)switch((p.re%4+4)%4){case 0:return new u(Math.pow(c,p.re),0);case 1:return new u(0,Math.pow(c,p.re));case 2:return new u(-Math.pow(c,p.re),0);case 3:return new u(0,-Math.pow(c,p.re))}}if(s===0&&c===0&&p.re>0&&p.im>=0)return u.ZERO;var f=Math.atan2(c,s),m=o(s,c);return s=Math.exp(p.re*m-p.im*f),c=p.im*m+p.re*f,new u(s*Math.cos(c),s*Math.sin(c))},sqrt:function(){var s=this.re,c=this.im,p=this.abs(),f,m;if(s>=0){if(c===0)return new u(Math.sqrt(s),0);f=.5*Math.sqrt(2*(p+s))}else f=Math.abs(c)/Math.sqrt(2*(p-s));return s<=0?m=.5*Math.sqrt(2*(p-s)):m=Math.abs(c)/Math.sqrt(2*(p+s)),new u(f,c<0?-m:m)},exp:function(){var s=Math.exp(this.re);return this.im,new u(s*Math.cos(this.im),s*Math.sin(this.im))},expm1:function(){var s=this.re,c=this.im;return new u(Math.expm1(s)*Math.cos(c)+n(c),Math.exp(s)*Math.sin(c))},log:function(){var s=this.re,c=this.im;return c===0&&s>0,new u(o(s,c),Math.atan2(c,s))},abs:function(){return a(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var s=this.re,c=this.im;return new u(Math.sin(s)*t(c),Math.cos(s)*r(c))},cos:function(){var s=this.re,c=this.im;return new u(Math.cos(s)*t(c),-Math.sin(s)*r(c))},tan:function(){var s=2*this.re,c=2*this.im,p=Math.cos(s)+t(c);return new u(Math.sin(s)/p,r(c)/p)},cot:function(){var s=2*this.re,c=2*this.im,p=Math.cos(s)-t(c);return new u(-Math.sin(s)/p,r(c)/p)},sec:function(){var s=this.re,c=this.im,p=.5*t(2*c)+.5*Math.cos(2*s);return new u(Math.cos(s)*t(c)/p,Math.sin(s)*r(c)/p)},csc:function(){var s=this.re,c=this.im,p=.5*t(2*c)-.5*Math.cos(2*s);return new u(Math.sin(s)*t(c)/p,-Math.cos(s)*r(c)/p)},asin:function(){var s=this.re,c=this.im,p=new u(c*c-s*s+1,-2*s*c).sqrt(),f=new u(p.re-c,p.im+s).log();return new u(f.im,-f.re)},acos:function(){var s=this.re,c=this.im,p=new u(c*c-s*s+1,-2*s*c).sqrt(),f=new u(p.re-c,p.im+s).log();return new u(Math.PI/2-f.im,f.re)},atan:function(){var s=this.re,c=this.im;if(s===0){if(c===1)return new u(0,1/0);if(c===-1)return new u(0,-1/0)}var p=s*s+(1-c)*(1-c),f=new u((1-c*c-s*s)/p,-2*s/p).log();return new u(-.5*f.im,.5*f.re)},acot:function(){var s=this.re,c=this.im;if(c===0)return new u(Math.atan2(1,s),0);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).atan():new u(s!==0?s/0:0,c!==0?-c/0:0).atan()},asec:function(){var s=this.re,c=this.im;if(s===0&&c===0)return new u(0,1/0);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).acos():new u(s!==0?s/0:0,c!==0?-c/0:0).acos()},acsc:function(){var s=this.re,c=this.im;if(s===0&&c===0)return new u(Math.PI/2,1/0);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).asin():new u(s!==0?s/0:0,c!==0?-c/0:0).asin()},sinh:function(){var s=this.re,c=this.im;return new u(r(s)*Math.cos(c),t(s)*Math.sin(c))},cosh:function(){var s=this.re,c=this.im;return new u(t(s)*Math.cos(c),r(s)*Math.sin(c))},tanh:function(){var s=2*this.re,c=2*this.im,p=t(s)+Math.cos(c);return new u(r(s)/p,Math.sin(c)/p)},coth:function(){var s=2*this.re,c=2*this.im,p=t(s)-Math.cos(c);return new u(r(s)/p,-Math.sin(c)/p)},csch:function(){var s=this.re,c=this.im,p=Math.cos(2*c)-t(2*s);return new u(-2*r(s)*Math.cos(c)/p,2*t(s)*Math.sin(c)/p)},sech:function(){var s=this.re,c=this.im,p=Math.cos(2*c)+t(2*s);return new u(2*t(s)*Math.cos(c)/p,-2*r(s)*Math.sin(c)/p)},asinh:function(){var s=this.im;this.im=-this.re,this.re=s;var c=this.asin();return this.re=-this.im,this.im=s,s=c.re,c.re=-c.im,c.im=s,c},acosh:function(){var s=this.acos();if(s.im<=0){var c=s.re;s.re=-s.im,s.im=c}else{var c=s.im;s.im=-s.re,s.re=c}return s},atanh:function(){var s=this.re,c=this.im,p=s>1&&c===0,f=1-s,m=1+s,h=f*f+c*c,d=h!==0?new u((m*f-c*c)/h,(c*f+m*c)/h):new u(s!==-1?s/0:0,c!==0?c/0:0),v=d.re;return d.re=o(d.re,d.im)/2,d.im=Math.atan2(d.im,v)/2,p&&(d.im=-d.im),d},acoth:function(){var s=this.re,c=this.im;if(s===0&&c===0)return new u(0,Math.PI/2);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).atanh():new u(s!==0?s/0:0,c!==0?-c/0:0).atanh()},acsch:function(){var s=this.re,c=this.im;if(c===0)return new u(s!==0?Math.log(s+Math.sqrt(s*s+1)):1/0,0);var p=s*s+c*c;return p!==0?new u(s/p,-c/p).asinh():new u(s!==0?s/0:0,c!==0?-c/0:0).asinh()},asech:function(){var s=this.re,c=this.im;if(this.isZero())return u.INFINITY;var p=s*s+c*c;return p!==0?new u(s/p,-c/p).acosh():new u(s!==0?s/0:0,c!==0?-c/0:0).acosh()},inverse:function(){if(this.isZero())return u.INFINITY;if(this.isInfinite())return u.ZERO;var s=this.re,c=this.im,p=s*s+c*c;return new u(s/p,-c/p)},conjugate:function(){return new u(this.re,-this.im)},neg:function(){return new u(-this.re,-this.im)},ceil:function(s){return s=Math.pow(10,s||0),new u(Math.ceil(this.re*s)/s,Math.ceil(this.im*s)/s)},floor:function(s){return s=Math.pow(10,s||0),new u(Math.floor(this.re*s)/s,Math.floor(this.im*s)/s)},round:function(s){return s=Math.pow(10,s||0),new u(Math.round(this.re*s)/s,Math.round(this.im*s)/s)},equals:function(s,c){var p=new u(s,c);return Math.abs(p.re-this.re)<=u.EPSILON&&Math.abs(p.im-this.im)<=u.EPSILON},clone:function(){return new u(this.re,this.im)},toString:function(){var s=this.re,c=this.im,p="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(s){(function(e){"use strict";var t=2e3,r={s:1,n:0,d:1};function n(d,v){if(isNaN(d=parseInt(d,10)))throw m();return d*v}function a(d,v){if(v===0)throw f();var x=Object.create(p.prototype);x.s=d<0?-1:1,d=d<0?-d:d;var N=c(d,v);return x.n=d/N,x.d=v/N,x}function i(d){for(var v={},x=d,N=2,g=4;g<=x;){for(;x%N===0;)x/=N,v[N]=(v[N]||0)+1;g+=1+2*N++}return x!==d?x>1&&(v[x]=(v[x]||0)+1):v[d]=(v[d]||0)+1,v}var o=function(d,v){var x=0,N=1,g=1,y=0,E=0,b=0,S=1,A=1,w=0,D=1,F=1,R=1,P=1e7,U;if(d!=null)if(v!==void 0){if(x=d,N=v,g=x*N,x%1!==0||N%1!==0)throw h()}else switch(typeof d){case"object":{if("d"in d&&"n"in d)x=d.n,N=d.d,"s"in d&&(x*=d.s);else if(0 in d)x=d[0],1 in d&&(N=d[1]);else throw m();g=x*N;break}case"number":{if(d<0&&(g=d,d=-d),d%1===0)x=d;else if(d>0){for(d>=1&&(A=Math.pow(10,Math.floor(1+Math.log(d)/Math.LN10)),d/=A);D<=P&&R<=P;)if(U=(w+F)/(D+R),d===U){D+R<=P?(x=w+F,N=D+R):R>D?(x=F,N=R):(x=w,N=D);break}else d>U?(w+=F,D+=R):(F+=w,R+=D),D>P?(x=F,N=R):(x=w,N=D);x*=A}else(isNaN(d)||isNaN(v))&&(N=x=NaN);break}case"string":{if(D=d.match(/\d+|./g),D===null)throw m();if(D[w]==="-"?(g=-1,w++):D[w]==="+"&&w++,D.length===w+1?E=n(D[w++],g):D[w+1]==="."||D[w]==="."?(D[w]!=="."&&(y=n(D[w++],g)),w++,(w+1===D.length||D[w+1]==="("&&D[w+3]===")"||D[w+1]==="'"&&D[w+3]==="'")&&(E=n(D[w],g),S=Math.pow(10,D[w].length),w++),(D[w]==="("&&D[w+2]===")"||D[w]==="'"&&D[w+2]==="'")&&(b=n(D[w+1],g),A=Math.pow(10,D[w+1].length)-1,w+=3)):D[w+1]==="/"||D[w+1]===":"?(E=n(D[w],g),S=n(D[w+2],1),w+=3):D[w+3]==="/"&&D[w+1]===" "&&(y=n(D[w],g),E=n(D[w+2],g),S=n(D[w+4],1),w+=5),D.length<=w){N=S*A,g=x=b+N*y+A*E;break}}default:throw m()}if(N===0)throw f();r.s=g<0?-1:1,r.n=Math.abs(x),r.d=Math.abs(N)};function l(d,v,x){for(var N=1;v>0;d=d*d%x,v>>=1)v&1&&(N=N*d%x);return N}function u(d,v){for(;v%2===0;v/=2);for(;v%5===0;v/=5);if(v===1)return 0;for(var x=10%v,N=1;x!==1;N++)if(x=x*10%v,N>t)return 0;return N}function s(d,v,x){for(var N=1,g=l(10,x,v),y=0;y<300;y++){if(N===g)return y;N=N*10%v,g=g*10%v}return 0}function c(d,v){if(!d)return v;if(!v)return d;for(;;){if(d%=v,!d)return v;if(v%=d,!v)return d}}function p(d,v){if(o(d,v),this instanceof p)d=c(r.d,r.n),this.s=r.s,this.n=r.n/d,this.d=r.d/d;else return a(r.s*r.n,r.d)}var f=function(){return new Error("Division by Zero")},m=function(){return new Error("Invalid argument")},h=function(){return new Error("Parameters must be integer")};p.prototype={s:1,n:0,d:1,abs:function(){return a(this.n,this.d)},neg:function(){return a(-this.s*this.n,this.d)},add:function(d,v){return o(d,v),a(this.s*this.n*r.d+r.s*this.d*r.n,this.d*r.d)},sub:function(d,v){return o(d,v),a(this.s*this.n*r.d-r.s*this.d*r.n,this.d*r.d)},mul:function(d,v){return o(d,v),a(this.s*r.s*this.n*r.n,this.d*r.d)},div:function(d,v){return o(d,v),a(this.s*r.s*this.n*r.d,this.d*r.n)},clone:function(){return a(this.s*this.n,this.d)},mod:function(d,v){if(isNaN(this.n)||isNaN(this.d))return new p(NaN);if(d===void 0)return a(this.s*this.n%this.d,1);if(o(d,v),r.n===0&&this.d===0)throw f();return a(this.s*(r.d*this.n)%(r.n*this.d),r.d*this.d)},gcd:function(d,v){return o(d,v),a(c(r.n,this.n)*c(r.d,this.d),r.d*this.d)},lcm:function(d,v){return o(d,v),r.n===0&&this.n===0?a(0,1):a(r.n*this.n,c(r.n,this.n)*c(r.d,this.d))},ceil:function(d){return d=Math.pow(10,d||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.ceil(d*this.s*this.n/this.d),d)},floor:function(d){return d=Math.pow(10,d||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.floor(d*this.s*this.n/this.d),d)},round:function(d){return d=Math.pow(10,d||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.round(d*this.s*this.n/this.d),d)},inverse:function(){return a(this.s*this.d,this.n)},pow:function(d,v){if(o(d,v),r.d===1)return r.s<0?a(Math.pow(this.s*this.d,r.n),Math.pow(this.n,r.n)):a(Math.pow(this.s*this.n,r.n),Math.pow(this.d,r.n));if(this.s<0)return null;var x=i(this.n),N=i(this.d),g=1,y=1;for(var E in x)if(E!=="1"){if(E==="0"){g=0;break}if(x[E]*=r.n,x[E]%r.d===0)x[E]/=r.d;else return null;g*=Math.pow(E,x[E])}for(var E in N)if(E!=="1"){if(N[E]*=r.n,N[E]%r.d===0)N[E]/=r.d;else return null;y*=Math.pow(E,N[E])}return r.s<0?a(y,g):a(g,y)},equals:function(d,v){return o(d,v),this.s*this.n*r.d===r.s*r.n*this.d},compare:function(d,v){o(d,v);var x=this.s*this.n*r.d-r.s*r.n*this.d;return(0=0;y--)g=g.inverse().add(x[y]);if(Math.abs(g.sub(v).valueOf())0&&(x+=v,x+=" ",N%=g),x+=N,x+="/",x+=g),x},toLatex:function(d){var v,x="",N=this.n,g=this.d;return this.s<0&&(x+="-"),g===1?x+=N:(d&&(v=Math.floor(N/g))>0&&(x+=v,N%=g),x+="\\frac{",x+=N,x+="}{",x+=g,x+="}"),x},toContinued:function(){var d,v=this.n,x=this.d,N=[];if(isNaN(v)||isNaN(x))return N;do N.push(Math.floor(v/x)),d=v%x,v=x,x=d;while(v!==1);return N},toString:function(d){var v=this.n,x=this.d;if(isNaN(v)||isNaN(x))return"NaN";d=d||15;var N=u(v,x),g=s(v,x,N),y=this.s<0?"-":"";if(y+=v/x|0,v%=x,v*=10,v&&(y+="."),N){for(var E=g;E--;)y+=v/x|0,v%=x,v*=10;y+="(";for(var E=N;E--;)y+=v/x|0,v%=x,v*=10;y+=")"}else for(var E=d;v&&E--;)y+=v/x|0,v%=x,v*=10;return y}},typeof cm=="object"?(Object.defineProperty(p,"__esModule",{value:!0}),p.default=p,p.Fraction=p,rE.exports=p):e.Fraction=p})(cm)});var wh=Be((Qce,na)=>{function Th(e){"@babel/helpers - typeof";return na.exports=Th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na.exports.__esModule=!0,na.exports.default=na.exports,Th(e)}na.exports=Th,na.exports.__esModule=!0,na.exports.default=na.exports});var rN=Be((Zce,As)=>{var tN=wh().default;function Q9(e,t){if(tN(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tN(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}As.exports=Q9,As.exports.__esModule=!0,As.exports.default=As.exports});var nN=Be((Jce,Ns)=>{var Z9=wh().default,J9=rN();function e7(e){var t=J9(e,"string");return Z9(t)=="symbol"?t:t+""}Ns.exports=e7,Ns.exports.__esModule=!0,Ns.exports.default=Ns.exports});var ir=Be((ele,Ts)=>{var t7=nN();function r7(e,t,r){return(t=t7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Ts.exports=r7,Ts.exports.__esModule=!0,Ts.exports.default=Ts.exports});var IN=Be((Kfe,FN)=>{FN.exports=function e(t,r){"use strict";var n=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,i=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,o=/^0x[0-9a-f]+$/i,l=/^0/,u=function(g){return e.insensitive&&(""+g).toLowerCase()||""+g},s=u(t).replace(a,"")||"",c=u(r).replace(a,"")||"",p=s.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),f=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(s.match(o),16)||p.length!==1&&s.match(i)&&Date.parse(s),h=parseInt(c.match(o),16)||m&&c.match(i)&&Date.parse(c)||null,d,v;if(h){if(mh)return 1}for(var x=0,N=Math.max(p.length,f.length);xv)return 1}return 0}});var KT=Be((ige,XT)=>{"use strict";var tv=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=t.preserveFormatting,n=r===void 0?!1:r,a=t.escapeMapFn,i=a===void 0?Nk:a,o=String(e),l="",u=i(tv({},Ek),n?tv({},Ak):{}),s=Object.keys(u),c=function(){var f=!1;s.forEach(function(m,h){f||o.length>=m.length&&o.slice(0,m.length)===m&&(l+=u[s[h]],o=o.slice(m.length,o.length),f=!0)}),f||(l+=o.slice(0,1),o=o.slice(1,o.length))};o;)c();return l}});var e3=Be((J_,Iv)=>{(function(e,t,r){function n(l){var u=this,s=o();u.next=function(){var c=2091639*u.s0+u.c*23283064365386963e-26;return u.s0=u.s1,u.s1=u.s2,u.s2=c-(u.c=c|0)},u.c=1,u.s0=s(" "),u.s1=s(" "),u.s2=s(" "),u.s0-=s(l),u.s0<0&&(u.s0+=1),u.s1-=s(l),u.s1<0&&(u.s1+=1),u.s2-=s(l),u.s2<0&&(u.s2+=1),s=null}function a(l,u){return u.c=l.c,u.s0=l.s0,u.s1=l.s1,u.s2=l.s2,u}function i(l,u){var s=new n(l),c=u&&u.state,p=s.next;return p.int32=function(){return s.next()*4294967296|0},p.double=function(){return p()+(p()*2097152|0)*11102230246251565e-32},p.quick=p,c&&(typeof c=="object"&&a(c,s),p.state=function(){return a(s,{})}),p}function o(){var l=4022871197,u=function(s){s=String(s);for(var c=0;c>>0,p-=l,p*=l,l=p>>>0,p-=l,l+=p*4294967296}return(l>>>0)*23283064365386963e-26};return u}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.alea=i})(J_,typeof Iv=="object"&&Iv,typeof define=="function"&&define)});var r3=Be((t3,Bv)=>{(function(e,t,r){function n(o){var l=this,u="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var c=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^c^c>>>8},o===(o|0)?l.x=o:u+=o;for(var s=0;s>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(typeof s=="object"&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xor128=i})(t3,typeof Bv=="object"&&Bv,typeof define=="function"&&define)});var a3=Be((n3,Lv)=>{(function(e,t,r){function n(o){var l=this,u="";l.next=function(){var c=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(c^c<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,o===(o|0)?l.x=o:u+=o;for(var s=0;s>>4),l.next()}function a(o,l){return l.x=o.x,l.y=o.y,l.z=o.z,l.w=o.w,l.v=o.v,l.d=o.d,l}function i(o,l){var u=new n(o),s=l&&l.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(typeof s=="object"&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xorwow=i})(n3,typeof Lv=="object"&&Lv,typeof define=="function"&&define)});var o3=Be((i3,Pv)=>{(function(e,t,r){function n(o){var l=this;l.next=function(){var s=l.x,c=l.i,p,f,m;return p=s[c],p^=p>>>7,f=p^p<<24,p=s[c+1&7],f^=p^p>>>10,p=s[c+3&7],f^=p^p>>>3,p=s[c+4&7],f^=p^p<<7,p=s[c+7&7],p=p^p<<13,f^=p^p<<9,s[c]=f,l.i=c+1&7,f};function u(s,c){var p,f,m=[];if(c===(c|0))f=m[0]=c;else for(c=""+c,p=0;p0;--p)s.next()}u(l,o)}function a(o,l){return l.x=o.x.slice(),l.i=o.i,l}function i(o,l){o==null&&(o=+new Date);var u=new n(o),s=l&&l.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(s.x&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xorshift7=i})(i3,typeof Pv=="object"&&Pv,typeof define=="function"&&define)});var u3=Be((s3,Uv)=>{(function(e,t,r){function n(o){var l=this;l.next=function(){var s=l.w,c=l.X,p=l.i,f,m;return l.w=s=s+1640531527|0,m=c[p+34&127],f=c[p=p+1&127],m^=m<<13,f^=f<<17,m^=m>>>15,f^=f>>>12,m=c[p]=m^f,l.i=p,m+(s^s>>>16)|0};function u(s,c){var p,f,m,h,d,v=[],x=128;for(c===(c|0)?(f=c,c=null):(c=c+"\0",f=0,x=Math.max(x,c.length)),m=0,h=-32;h>>15,f^=f<<4,f^=f>>>13,h>=0&&(d=d+1640531527|0,p=v[h&127]^=f+d,m=p==0?m+1:0);for(m>=128&&(v[(c&&c.length||0)&127]=-1),m=127,h=4*128;h>0;--h)f=v[m+34&127],p=v[m=m+1&127],f^=f<<13,p^=p<<17,f^=f>>>15,p^=p>>>12,v[m]=f^p;s.w=d,s.X=v,s.i=m}u(l,o)}function a(o,l){return l.i=o.i,l.w=o.w,l.X=o.X.slice(),l}function i(o,l){o==null&&(o=+new Date);var u=new n(o),s=l&&l.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(s.X&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xor4096=i})(s3,typeof Uv=="object"&&Uv,typeof define=="function"&&define)});var l3=Be((c3,kv)=>{(function(e,t,r){function n(o){var l=this,u="";l.next=function(){var c=l.b,p=l.c,f=l.d,m=l.a;return c=c<<25^c>>>7^p,p=p-f|0,f=f<<24^f>>>8^m,m=m-c|0,l.b=c=c<<20^c>>>12^p,l.c=p=p-f|0,l.d=f<<16^p>>>16^m,l.a=m-c|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,o===Math.floor(o)?(l.a=o/4294967296|0,l.b=o|0):u+=o;for(var s=0;s>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(p+f)/(1<<21);while(m===0);return m},c.int32=u.next,c.quick=c,s&&(typeof s=="object"&&a(s,u),c.state=function(){return a(u,{})}),c}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.tychei=i})(c3,typeof kv=="object"&&kv,typeof define=="function"&&define)});var f3=Be((p3,tp)=>{(function(e,t,r){var n=256,a=6,i=52,o="random",l=r.pow(n,a),u=r.pow(2,i),s=u*2,c=n-1,p;function f(g,y,E){var b=[];y=y==!0?{entropy:!0}:y||{};var S=v(d(y.entropy?[g,N(t)]:g??x(),3),b),A=new m(b),w=function(){for(var D=A.g(a),F=l,R=0;D=s;)D/=2,F/=2,R>>>=1;return(D+R)/F};return w.int32=function(){return A.g(4)|0},w.quick=function(){return A.g(4)/4294967296},w.double=w,v(N(A.S),t),(y.pass||E||function(D,F,R,P){return P&&(P.S&&h(P,A),D.state=function(){return h(A,{})}),R?(r[o]=D,F):D})(w,S,"global"in y?y.global:this==r,y.state)}function m(g){var y,E=g.length,b=this,S=0,A=b.i=b.j=0,w=b.S=[];for(E||(g=[E++]);S{var qq=e3(),Hq=r3(),zq=a3(),Gq=o3(),Yq=u3(),jq=l3(),ci=f3();ci.alea=qq;ci.xor128=Hq;ci.xorwow=zq;ci.xorshift7=Gq;ci.xor4096=Yq;ci.tychei=jq;m3.exports=ci});var wM=Be((w8e,Ex)=>{function yx(){}yx.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function a(){n.off(e,a),t.apply(r,arguments)}return a._=t,this.on(e,a,r)},emit:function(e){var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,a=r.length;for(n;n{var $M=require("stream").Stream,mG=require("util");XM.exports=Mn;function Mn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}mG.inherits(Mn,$M);Mn.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var a=e.emit;return e.emit=function(){return r._handleEmit(arguments),a.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(Mn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Mn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Mn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Mn.prototype.pause=function(){this.source.pause()};Mn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Mn.prototype.pipe=function(){var e=$M.prototype.pipe.apply(this,arguments);return this.resume(),e};Mn.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Mn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var JM=Be((TBe,ZM)=>{var dG=require("util"),QM=require("stream").Stream,WM=KM();ZM.exports=jt;function jt(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}dG.inherits(jt,QM);jt.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};jt.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};jt.prototype.append=function(e){var t=jt.isStreamLike(e);if(t){if(!(e instanceof WM)){var r=WM.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};jt.prototype.pipe=function(e,t){return QM.prototype.pipe.call(this,e,t),this.resume(),e};jt.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};jt.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=jt.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};jt.prototype._pipeNext=function(e){this._currentStream=e;var t=jt.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};jt.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};jt.prototype.write=function(e){this.emit("data",e)};jt.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};jt.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};jt.prototype.end=function(){this._reset(),this.emit("end")};jt.prototype.destroy=function(){this._reset(),this.emit("close")};jt.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};jt.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};jt.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};jt.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var eO=Be((wBe,hG)=>{hG.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var rO=Be((DBe,tO)=>{tO.exports=eO()});var iO=Be(Ur=>{"use strict";var pp=rO(),vG=require("path").extname,nO=/^\s*([^;\s]*)(?:;|\s|$)/,gG=/^text\//i;Ur.charset=aO;Ur.charsets={lookup:aO};Ur.contentType=xG;Ur.extension=bG;Ur.extensions=Object.create(null);Ur.lookup=yG;Ur.types=Object.create(null);EG(Ur.extensions,Ur.types);function aO(e){if(!e||typeof e!="string")return!1;var t=nO.exec(e),r=t&&pp[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&gG.test(t[1])?"UTF-8":!1}function xG(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Ur.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Ur.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}function bG(e){if(!e||typeof e!="string")return!1;var t=nO.exec(e),r=t&&Ur.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}function yG(e){if(!e||typeof e!="string")return!1;var t=vG("x."+e).toLowerCase().substr(1);return t&&Ur.types[t]||!1}function EG(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(pp).forEach(function(a){var i=pp[a],o=i.extensions;if(!(!o||!o.length)){e[a]=o;for(var l=0;lc||s===c&&t[u].substr(0,12)==="application/"))continue}t[u]=a}}})}});var sO=Be((CBe,oO)=>{oO.exports=AG;function AG(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var Cx=Be((_Be,cO)=>{var uO=sO();cO.exports=NG;function NG(e){var t=!1;return uO(function(){t=!0}),function(n,a){t?e(n,a):uO(function(){e(n,a)})}}});var _x=Be((MBe,lO)=>{lO.exports=TG;function TG(e){Object.keys(e.jobs).forEach(wG.bind(e)),e.jobs={}}function wG(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var Mx=Be((OBe,fO)=>{var pO=Cx(),DG=_x();fO.exports=SG;function SG(e,t,r,n){var a=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[a]=CG(t,a,e[a],function(i,o){a in r.jobs&&(delete r.jobs[a],i?DG(r):r.results[a]=o,n(i,r.results))})}function CG(e,t,r,n){var a;return e.length==2?a=e(r,pO(n)):a=e(r,t,pO(n)),a}});var Ox=Be((RBe,mO)=>{mO.exports=_G;function _G(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(a,i){return t(e[a],e[i])}),n}});var Rx=Be((FBe,dO)=>{var MG=_x(),OG=Cx();dO.exports=RG;function RG(e){Object.keys(this.jobs).length&&(this.index=this.size,MG(this),OG(e)(null,this.results))}});var vO=Be((IBe,hO)=>{var FG=Mx(),IG=Ox(),BG=Rx();hO.exports=LG;function LG(e,t,r){for(var n=IG(e);n.index<(n.keyedList||e).length;)FG(e,t,n,function(a,i){if(a){r(a,i);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return BG.bind(n,r)}});var Fx=Be((BBe,fp)=>{var gO=Mx(),PG=Ox(),UG=Rx();fp.exports=kG;fp.exports.ascending=xO;fp.exports.descending=qG;function kG(e,t,r,n){var a=PG(e,r);return gO(e,t,a,function i(o,l){if(o){n(o,l);return}if(a.index++,a.index<(a.keyedList||e).length){gO(e,t,a,i);return}n(null,a.results)}),UG.bind(a,n)}function xO(e,t){return et?1:0}function qG(e,t){return-1*xO(e,t)}});var yO=Be((LBe,bO)=>{var HG=Fx();bO.exports=zG;function zG(e,t,r){return HG(e,t,null,r)}});var AO=Be((PBe,EO)=>{EO.exports={parallel:vO(),serial:yO(),serialOrdered:Fx()}});var TO=Be((UBe,NO)=>{NO.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var SO=Be((kBe,DO)=>{var Px=JM(),wO=require("util"),Ix=require("path"),GG=require("http"),YG=require("https"),jG=require("url").parse,VG=require("fs"),$G=require("stream").Stream,Bx=iO(),XG=AO(),Lx=TO();DO.exports=yt;wO.inherits(yt,Px);function yt(e){if(!(this instanceof yt))return new yt(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Px.call(this),e=e||{};for(var t in e)this[t]=e[t]}yt.LINE_BREAK=`\r +`;yt.DEFAULT_CONTENT_TYPE="application/octet-stream";yt.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Px.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),wO.isArray(t)){this._error(new Error("Arrays are not supported."));return}var a=this._multiPartHeader(e,t,r),i=this._multiPartFooter();n(a),n(t),n(i),this._trackLength(a,t,r)};yt.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=+r.knownLength:Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+yt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof $G))&&(r.knownLength||this._valuesToMeasure.push(t))};yt.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):VG.stat(e.path,function(r,n){var a;if(r){t(r);return}a=n.size-(e.start?e.start:0),t(null,a)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(r){e.pause(),t(null,+r.headers["content-length"])}),e.resume()):t("Unknown stream")};yt.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),a=this._getContentType(t,r),i="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(a||[])};typeof r.header=="object"&&Lx(o,r.header);var l;for(var u in o)o.hasOwnProperty(u)&&(l=o[u],l!=null&&(Array.isArray(l)||(l=[l]),l.length&&(i+=u+": "+l.join("; ")+yt.LINE_BREAK)));return"--"+this.getBoundary()+yt.LINE_BREAK+i+yt.LINE_BREAK};yt.prototype._getContentDisposition=function(e,t){var r,n;return typeof t.filepath=="string"?r=Ix.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=Ix.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=Ix.basename(e.client._httpMessage.path||"")),r&&(n='filename="'+r+'"'),n};yt.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=Bx.lookup(e.name)),!r&&e.path&&(r=Bx.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=Bx.lookup(t.filepath||t.filename)),!r&&typeof e=="object"&&(r=yt.DEFAULT_CONTENT_TYPE),r};yt.prototype._multiPartFooter=function(){return function(e){var t=yt.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};yt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+yt.LINE_BREAK};yt.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r};yt.prototype.setBoundary=function(e){this._boundary=e};yt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};yt.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r{"use strict";var pY=require("url").parse,fY={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},mY=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function dY(e){var t=typeof e=="string"?pY(e):e||{},r=t.protocol,n=t.host,a=t.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),a=parseInt(a)||fY[r]||0,!hY(n,a)))return"";var i=go("npm_config_"+r+"_proxy")||go(r+"_proxy")||go("npm_config_proxy")||go("all_proxy");return i&&i.indexOf("://")===-1&&(i=r+"://"+i),i}function hY(e,t){var r=(go("npm_config_no_proxy")||go("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var a=n.match(/^(.+):(\d+)$/),i=a?a[1]:n,o=a?parseInt(a[2]):0;return o&&o!==t?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!mY.call(e,i)):e!==i}):!0}function go(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}HO.getProxyForUrl=dY});var YO=Be((qLe,GO)=>{var xo=1e3,bo=xo*60,yo=bo*60,di=yo*24,vY=di*7,gY=di*365.25;GO.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return xY(e);if(r==="number"&&isFinite(e))return t.long?yY(e):bY(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function xY(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*gY;case"weeks":case"week":case"w":return r*vY;case"days":case"day":case"d":return r*di;case"hours":case"hour":case"hrs":case"hr":case"h":return r*yo;case"minutes":case"minute":case"mins":case"min":case"m":return r*bo;case"seconds":case"second":case"secs":case"sec":case"s":return r*xo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function bY(e){var t=Math.abs(e);return t>=di?Math.round(e/di)+"d":t>=yo?Math.round(e/yo)+"h":t>=bo?Math.round(e/bo)+"m":t>=xo?Math.round(e/xo)+"s":e+"ms"}function yY(e){var t=Math.abs(e);return t>=di?vp(e,t,di,"day"):t>=yo?vp(e,t,yo,"hour"):t>=bo?vp(e,t,bo,"minute"):t>=xo?vp(e,t,xo,"second"):e+" ms"}function vp(e,t,r,n){var a=t>=r*1.5;return Math.round(e/r)+" "+n+(a?"s":"")}});var Xx=Be((HLe,jO)=>{function EY(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=a,r.enabled=o,r.humanize=YO(),r.destroy=s,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let p=0;for(let f=0;f{if(b==="%%")return"%";y++;let A=r.formatters[S];if(typeof A=="function"){let w=v[y];b=A.call(x,w),v.splice(y,1),y--}return b}),r.formatArgs.call(x,v),(x.log||r.log).apply(x,v)}return d.namespace=c,d.useColors=r.useColors(),d.color=r.selectColor(c),d.extend=n,d.destroy=r.destroy,Object.defineProperty(d,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==r.namespaces&&(m=r.namespaces,h=r.enabled(c)),h),set:v=>{f=v}}),typeof r.init=="function"&&r.init(d),d}function n(c,p){let f=r(this.namespace+(typeof p>"u"?":":p)+c);return f.log=this.log,f}function a(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let p,f=(typeof c=="string"?c:"").split(/[\s,]+/),m=f.length;for(p=0;p"-"+p)].join(",");return r.enable(""),c}function o(c){if(c[c.length-1]==="*")return!0;let p,f;for(p=0,f=r.skips.length;p{tn.formatArgs=NY;tn.save=TY;tn.load=wY;tn.useColors=AY;tn.storage=DY();tn.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();tn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function AY(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function NY(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+gp.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(r++,a==="%c"&&(n=r))}),e.splice(n,0,t)}tn.log=console.debug||console.log||(()=>{});function TY(e){try{e?tn.storage.setItem("debug",e):tn.storage.removeItem("debug")}catch{}}function wY(){let e;try{e=tn.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function DY(){try{return localStorage}catch{}}gp.exports=Xx()(tn);var{formatters:SY}=gp.exports;SY.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var XO=Be((zLe,$O)=>{"use strict";$O.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),a=t.indexOf("--");return n!==-1&&(a===-1||n{"use strict";var CY=require("os"),KO=require("tty"),hn=XO(),{env:or}=process,Fa;hn("no-color")||hn("no-colors")||hn("color=false")||hn("color=never")?Fa=0:(hn("color")||hn("colors")||hn("color=true")||hn("color=always"))&&(Fa=1);"FORCE_COLOR"in or&&(or.FORCE_COLOR==="true"?Fa=1:or.FORCE_COLOR==="false"?Fa=0:Fa=or.FORCE_COLOR.length===0?1:Math.min(parseInt(or.FORCE_COLOR,10),3));function Kx(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Wx(e,t){if(Fa===0)return 0;if(hn("color=16m")||hn("color=full")||hn("color=truecolor"))return 3;if(hn("color=256"))return 2;if(e&&!t&&Fa===void 0)return 0;let r=Fa||0;if(or.TERM==="dumb")return r;if(process.platform==="win32"){let n=CY.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in or)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in or)||or.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in or)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(or.TEAMCITY_VERSION)?1:0;if(or.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in or){let n=parseInt((or.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(or.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(or.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(or.TERM)||"COLORTERM"in or?1:r}function _Y(e){let t=Wx(e,e&&e.isTTY);return Kx(t)}WO.exports={supportsColor:_Y,stdout:Kx(Wx(!0,KO.isatty(1))),stderr:Kx(Wx(!0,KO.isatty(2)))}});var JO=Be((sr,bp)=>{var MY=require("tty"),xp=require("util");sr.init=PY;sr.log=IY;sr.formatArgs=RY;sr.save=BY;sr.load=LY;sr.useColors=OY;sr.destroy=xp.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");sr.colors=[6,2,3,4,5,1];try{let e=QO();e&&(e.stderr||e).level>=2&&(sr.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}sr.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(a,i)=>i.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function OY(){return"colors"in sr.inspectOpts?!!sr.inspectOpts.colors:MY.isatty(process.stderr.fd)}function RY(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,a="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${a};1m${t} \x1B[0m`;e[0]=i+e[0].split(` `).join(` `+i),e.push(a+"m+"+bp.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=FY()+t+" "+e[0]}function FY(){return sr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function IY(...e){return process.stderr.write(xp.formatWithOptions(sr.inspectOpts,...e)+` -`)}function BY(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function LY(){return process.env.DEBUG}function PY(e){e.inspectOpts={};let t=Object.keys(sr.inspectOpts);for(let r=0;rt.trim()).join(" ")};JO.O=function(e){return this.inspectOpts.colors=this.useColors,xp.inspect(e,this.inspectOpts)}});var tR=Be((YLe,Qx)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Qx.exports=$O():Qx.exports=eR()});var nR=Be((jLe,rR)=>{var Ws;rR.exports=function(){if(!Ws){try{Ws=tR()("follow-redirects")}catch{}typeof Ws!="function"&&(Ws=function(){})}Ws.apply(null,arguments)}});var uR=Be((VLe,cb)=>{var Js=require("url"),Qs=Js.URL,UY=require("http"),kY=require("https"),rb=require("stream").Writable,nb=require("assert"),aR=nR(),ab=!1;try{nb(new Qs)}catch(e){ab=e.code==="ERR_INVALID_URL"}var qY=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],ib=["abort","aborted","connect","error","socket","timeout"],ob=Object.create(null);ib.forEach(function(e){ob[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var Jx=eu("ERR_INVALID_URL","Invalid URL",TypeError),eb=eu("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),HY=eu("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",eb),zY=eu("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),GY=eu("ERR_STREAM_WRITE_AFTER_END","write after end"),YY=rb.prototype.destroy||oR;function kr(e,t){rb.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(a){r.emit("error",a instanceof eb?a:new eb({cause:a}))}},this._performRequest()}kr.prototype=Object.create(rb.prototype);kr.prototype.abort=function(){ub(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};kr.prototype.destroy=function(e){return ub(this._currentRequest,e),YY.call(this,e),this};kr.prototype.write=function(e,t,r){if(this._ending)throw new GY;if(!hi(e)&&!$Y(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Zs(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new zY),this.abort())};kr.prototype.end=function(e,t,r){if(Zs(e)?(r=e,e=t=null):Zs(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,a=this._currentRequest;this.write(e,t,function(){n._ended=!0,a.end(null,null,r)}),this._ending=!0}};kr.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};kr.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};kr.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function a(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),i()},e),n(o)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",a)}return t&&this.on("timeout",t),this.socket?a(this.socket):this._currentRequest.once("socket",a),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){kr.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(kr.prototype,e,{get:function(){return this._currentRequest[e]}})});kr.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};kr.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var a of ib)n.on(a,ob[a]);if(this._currentUrl=/^\//.test(this._options.path)?Js.format(this._options):this._options.path,this._isRedirect){var i=0,o=this,l=this._requestBodyBuffers;(function u(s){if(n===o._currentRequest)if(s)o.emit("error",s);else if(i=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(ub(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new HY;var n,a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Zx(/^content-/i,this._options.headers));var o=Zx(/^host$/i,this._options.headers),l=sb(this._currentUrl),u=o||l.host,s=/^\w+:/.test(r)?this._currentUrl:Js.format(Object.assign(l,{host:u})),c=jY(r,s);if(aR("redirecting to",c.href),this._isRedirect=!0,tb(c,this._options),(c.protocol!==l.protocol&&c.protocol!=="https:"||c.host!==u&&!VY(c.host,u))&&Zx(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Zs(a)){var p={headers:e.headers,statusCode:t},f={url:s,method:i,headers:n};a(this._options,p,f),this._sanitizeOptions(this._options)}this._performRequest()};function iR(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var a=n+":",i=r[a]=e[n],o=t[n]=Object.create(i);function l(s,c,p){return XY(s)?s=tb(s):hi(s)?s=tb(sb(s)):(p=c,c=sR(s),s={protocol:a}),Zs(c)&&(p=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},s,c),c.nativeProtocols=r,!hi(c.host)&&!hi(c.hostname)&&(c.hostname="::1"),nb.equal(c.protocol,a,"protocol mismatch"),aR("options",c),new kr(c,p)}function u(s,c,p){var f=o.request(s,c,p);return f.end(),f}Object.defineProperties(o,{request:{value:l,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function oR(){}function sb(e){var t;if(ab)t=new Qs(e);else if(t=sR(Js.parse(e)),!hi(t.protocol))throw new Jx({input:e});return t}function jY(e,t){return ab?new Qs(e,t):sb(Js.resolve(t,e))}function sR(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new Jx({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new Jx({input:e.href||e});return e}function tb(e,t){var r=t||{};for(var n of qY)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function Zx(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function eu(e,t,r){function n(a){Error.captureStackTrace(this,this.constructor),Object.assign(this,a||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function ub(e,t){for(var r of ib)e.removeListener(r,ob[r]);e.on("error",oR),e.destroy(t)}function VY(e,t){nb(hi(e)&&hi(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function hi(e){return typeof e=="string"||e instanceof String}function Zs(e){return typeof e=="function"}function $Y(e){return typeof e=="object"&&"length"in e}function XY(e){return Qs&&e instanceof Qs}cb.exports=iR({http:UY,https:kY});cb.exports.wrap=iR});var Sp=Be(ca=>{"use strict";var VR=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Ej=VR+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",$R="["+VR+"]["+Ej+"]*",Aj=new RegExp("^"+$R+"$"),Nj=function(e,t){let r=[],n=t.exec(e);for(;n;){let a=[];a.startIndex=t.lastIndex-n[0].length;let i=n.length;for(let o=0;o"u")};ca.isExist=function(e){return typeof e<"u"};ca.isEmptyObject=function(e){return Object.keys(e).length===0};ca.merge=function(e,t,r){if(t){let n=Object.keys(t),a=n.length;for(let i=0;i{"use strict";var Db=Sp(),wj={allowBooleanAttributes:!1,unpairedTags:[]};ZR.validate=function(e,t){t=Object.assign({},wj,t);let r=[],n=!1,a=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let i=0;i"&&e[i]!==" "&&e[i]!==" "&&e[i]!==` -`&&e[i]!=="\r";i++)u+=e[i];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),i--),!Fj(u)){let p;return u.trim().length===0?p="Invalid space after '<'.":p="Tag '"+u+"' is an invalid name.",Kt("InvalidTag",p,Sr(e,i))}let s=Cj(e,i);if(s===!1)return Kt("InvalidAttr","Attributes for '"+u+"' have open quote.",Sr(e,i));let c=s.value;if(i=s.index,c[c.length-1]==="/"){let p=i-c.length;c=c.substring(0,c.length-1);let f=QR(c,t);if(f===!0)n=!0;else return Kt(f.err.code,f.err.msg,Sr(e,p+f.err.line))}else if(l)if(s.tagClosed){if(c.trim().length>0)return Kt("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",Sr(e,o));if(r.length===0)return Kt("InvalidTag","Closing tag '"+u+"' has not been opened.",Sr(e,o));{let p=r.pop();if(u!==p.tagName){let f=Sr(e,p.tagStartPos);return Kt("InvalidTag","Expected closing tag '"+p.tagName+"' (opened in line "+f.line+", col "+f.col+") instead of closing tag '"+u+"'.",Sr(e,o))}r.length==0&&(a=!0)}}else return Kt("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",Sr(e,i));else{let p=QR(c,t);if(p!==!0)return Kt(p.err.code,p.err.msg,Sr(e,i-c.length+p.err.line));if(a===!0)return Kt("InvalidXml","Multiple possible root nodes found.",Sr(e,i));t.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:o}),n=!0}for(i++;i0)return Kt("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Kt("InvalidXml","Start tag expected.",1);return!0};function XR(e){return e===" "||e===" "||e===` -`||e==="\r"}function KR(e,t){let r=t;for(;t5&&n==="xml")return Kt("InvalidXml","XML declaration allowed only at the start of the document.",Sr(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function WR(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let r=1;for(t+=8;t"&&(r--,r===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t"){t+=2;break}}return t}var Dj='"',Sj="'";function Cj(e,t){let r="",n="",a=!1;for(;t"&&n===""){a=!0;break}r+=e[t]}return n!==""?!1:{value:r,index:t,tagClosed:a}}var _j=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function QR(e,t){let r=Db.getAllMatches(e,_j),n={};for(let a=0;a{var JR={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}},Ij=function(e){return Object.assign({},JR,e)};Cb.buildOptions=Ij;Cb.defaultOptions=JR});var rF=Be((P9e,tF)=>{"use strict";var _b=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}};tF.exports=_b});var aF=Be((U9e,nF)=>{var Bj=Sp();function Lj(e,t){let r={};if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;let n=1,a=!1,i=!1,o="";for(;t"){if(i?e[t-1]==="-"&&e[t-2]==="-"&&(i=!1,n--):n--,n===0)break}else e[t]==="["?a=!0:o+=e[t];if(n!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:t}}function Pj(e,t){let r="";for(;t{var Yj=/^[-+]?0x[a-fA-F0-9]+$/,jj=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt);!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);var Vj={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function $j(e,t={}){if(t=Object.assign({},Vj,t),!e||typeof e!="string")return e;let r=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return e;if(t.hex&&Yj.test(r))return Number.parseInt(r,16);{let n=jj.exec(r);if(n){let a=n[1],i=n[2],o=Xj(n[3]),l=n[4]||n[6];if(!t.leadingZeros&&i.length>0&&a&&r[2]!==".")return e;if(!t.leadingZeros&&i.length>0&&!a&&r[1]!==".")return e;{let u=Number(r),s=""+u;return s.search(/[eE]/)!==-1||l?t.eNotation?u:e:r.indexOf(".")!==-1?s==="0"&&o===""||s===o||a&&s==="-"+o?u:e:i?o===s||a+o===s?u:e:r===s||r===a+s?u:e}}else return e}}function Xj(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substr(0,e.length-1))),e}iF.exports=$j});var cF=Be((q9e,uF)=>{"use strict";var sF=Sp(),iu=rF(),Kj=aF(),Wj=oF(),Mb=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,n)=>String.fromCharCode(Number.parseInt(n,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,n)=>String.fromCharCode(Number.parseInt(n,16))}},this.addExternalEntities=Qj,this.parseXml=rV,this.parseTextData=Zj,this.resolveNameSpace=Jj,this.buildAttributesMap=tV,this.isItStopNode=oV,this.replaceEntitiesValue=aV,this.readStopNodeData=uV,this.saveTextToParentTag=iV,this.addChild=nV}};function Qj(e){let t=Object.keys(e);for(let r=0;r0)){o||(e=this.replaceEntitiesValue(e));let l=this.options.tagValueProcessor(t,e,r,a,i);return l==null?e:typeof l!=typeof e||l!==e?l:this.options.trimValues?Rb(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?Rb(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Jj(e){if(this.options.removeNSPrefix){let t=e.split(":"),r=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=r+t[1])}return e}var eV=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function tV(e,t,r){if(!this.options.ignoreAttributes&&typeof e=="string"){let n=sF.getAllMatches(e,eV),a=n.length,i={};for(let o=0;o",i,"Closing Tag is not closed."),u=e.substring(i+2,l).trim();if(this.options.removeNSPrefix){let p=u.indexOf(":");p!==-1&&(u=u.substr(p+1))}this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&(n=this.saveTextToParentTag(n,r,a));let s=a.substring(a.lastIndexOf(".")+1);if(u&&this.options.unpairedTags.indexOf(u)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let c=0;s&&this.options.unpairedTags.indexOf(s)!==-1?(c=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=a.lastIndexOf("."),a=a.substring(0,c),r=this.tagsNodeStack.pop(),n="",i=l}else if(e[i+1]==="?"){let l=Ob(e,i,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,a),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){let u=new iu(l.tagName);u.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(u[":@"]=this.buildAttributesMap(l.tagExp,a,l.tagName)),this.addChild(r,u,a)}i=l.closeIndex+1}else if(e.substr(i+1,3)==="!--"){let l=xi(e,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){let u=e.substring(i+4,l-2);n=this.saveTextToParentTag(n,r,a),r.add(this.options.commentPropName,[{[this.options.textNodeName]:u}])}i=l}else if(e.substr(i+1,2)==="!D"){let l=Kj(e,i);this.docTypeEntities=l.entities,i=l.i}else if(e.substr(i+1,2)==="!["){let l=xi(e,"]]>",i,"CDATA is not closed.")-2,u=e.substring(i+9,l);n=this.saveTextToParentTag(n,r,a);let s=this.parseTextData(u,r.tagname,a,!0,!1,!0,!0);s==null&&(s=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:u}]):r.add(this.options.textNodeName,s),i=l+2}else{let l=Ob(e,i,this.options.removeNSPrefix),u=l.tagName,s=l.rawTagName,c=l.tagExp,p=l.attrExpPresent,f=l.closeIndex;this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,a,!1));let m=r;if(m&&this.options.unpairedTags.indexOf(m.tagname)!==-1&&(r=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),u!==t.tagname&&(a+=a?"."+u:u),this.isItStopNode(this.options.stopNodes,a,u)){let h="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)u[u.length-1]==="/"?(u=u.substr(0,u.length-1),a=a.substr(0,a.length-1),c=u):c=c.substr(0,c.length-1),i=l.closeIndex;else if(this.options.unpairedTags.indexOf(u)!==-1)i=l.closeIndex;else{let v=this.readStopNodeData(e,s,f+1);if(!v)throw new Error(`Unexpected end of ${s}`);i=v.i,h=v.tagContent}let d=new iu(u);u!==c&&p&&(d[":@"]=this.buildAttributesMap(c,a,u)),h&&(h=this.parseTextData(h,u,a,!0,p,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),d.add(this.options.textNodeName,h),this.addChild(r,d,a)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){u[u.length-1]==="/"?(u=u.substr(0,u.length-1),a=a.substr(0,a.length-1),c=u):c=c.substr(0,c.length-1),this.options.transformTagName&&(u=this.options.transformTagName(u));let h=new iu(u);u!==c&&p&&(h[":@"]=this.buildAttributesMap(c,a,u)),this.addChild(r,h,a),a=a.substr(0,a.lastIndexOf("."))}else{let h=new iu(u);this.tagsNodeStack.push(r),u!==c&&p&&(h[":@"]=this.buildAttributesMap(c,a,u)),this.addChild(r,h,a),r=h}n="",i=f}}else n+=e[i];return t.child};function nV(e,t,r){let n=this.options.updateTag(t.tagname,r,t[":@"]);n===!1||(typeof n=="string"&&(t.tagname=n),e.addChild(t))}var aV=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){let r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){let r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){let r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function iV(e,t,r,n){return e&&(n===void 0&&(n=Object.keys(t.child).length===0),e=this.parseTextData(e,t.tagname,r,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,n),e!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function oV(e,t,r){let n="*."+r;for(let a in e){let i=e[a];if(n===i||t===i)return!0}return!1}function sV(e,t,r=">"){let n,a="";for(let i=t;i",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(a--,a===0))return{tagContent:e.substring(n,r),i};r=i}else if(e[r+1]==="?")r=xi(e,"?>",r+1,"StopNode is not closed.");else if(e.substr(r+1,3)==="!--")r=xi(e,"-->",r+3,"StopNode is not closed.");else if(e.substr(r+1,2)==="![")r=xi(e,"]]>",r,"StopNode is not closed.")-2;else{let i=Ob(e,r,">");i&&((i&&i.tagName)===t&&i.tagExp[i.tagExp.length-1]!=="/"&&a++,r=i.closeIndex)}}function Rb(e,t,r){if(t&&typeof e=="string"){let n=e.trim();return n==="true"?!0:n==="false"?!1:Wj(e,r)}else return sF.isExist(e)?e:""}uF.exports=Mb});var fF=Be(pF=>{"use strict";function cV(e,t){return lF(e,t)}function lF(e,t,r){let n,a={};for(let i=0;i0&&(a[t.textNodeName]=n):n!==void 0&&(a[t.textNodeName]=n),a}function lV(e){let t=Object.keys(e);for(let r=0;r{var{buildOptions:mV}=eF(),dV=cF(),{prettify:hV}=fF(),vV=Sb(),Fb=class{constructor(t){this.externalEntities={},this.options=mV(t)}parse(t,r){if(typeof t!="string")if(t.toString)t=t.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});let i=vV.validate(t,r);if(i!==!0)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}let n=new dV(this.options);n.addExternalEntities(this.externalEntities);let a=n.parseXml(t);return this.options.preserveOrder||a===void 0?a:hV(a,this.options)}addEntity(t,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}};mF.exports=Fb});var bF=Be((G9e,xF)=>{var gV=` -`;function xV(e,t){let r="";return t.format&&t.indentBy.length>0&&(r=gV),vF(e,t,"",r)}function vF(e,t,r,n){let a="",i=!1;for(let o=0;o`,i=!1;continue}else if(u===t.commentPropName){a+=n+``,i=!0;continue}else if(u[0]==="?"){let h=hF(l[":@"],t),d=u==="?xml"?"":n,v=l[u][0][t.textNodeName];v=v.length!==0?" "+v:"",a+=d+`<${u}${v}${h}?>`,i=!0;continue}let c=n;c!==""&&(c+=t.indentBy);let p=hF(l[":@"],t),f=n+`<${u}${p}`,m=vF(l[u],t,s,c);t.unpairedTags.indexOf(u)!==-1?t.suppressUnpairedNode?a+=f+">":a+=f+"/>":(!m||m.length===0)&&t.suppressEmptyNode?a+=f+"/>":m&&m.endsWith(">")?a+=f+`>${m}${n}`:(a+=f+">",m&&n!==""&&(m.includes("/>")||m.includes("`),i=!0}return a}function bV(e){let t=Object.keys(e);for(let r=0;r0&&t.processEntities)for(let r=0;r{"use strict";var EV=bF(),AV={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function La(e){this.options=Object.assign({},AV,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=wV),this.processTextOrObjNode=NV,this.options.format?(this.indentate=TV,this.tagEndChar=`> +`)}function BY(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function LY(){return process.env.DEBUG}function PY(e){e.inspectOpts={};let t=Object.keys(sr.inspectOpts);for(let r=0;rt.trim()).join(" ")};ZO.O=function(e){return this.inspectOpts.colors=this.useColors,xp.inspect(e,this.inspectOpts)}});var eR=Be((YLe,Qx)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Qx.exports=VO():Qx.exports=JO()});var rR=Be((jLe,tR)=>{var Ws;tR.exports=function(){if(!Ws){try{Ws=eR()("follow-redirects")}catch{}typeof Ws!="function"&&(Ws=function(){})}Ws.apply(null,arguments)}});var sR=Be((VLe,cb)=>{var Js=require("url"),Qs=Js.URL,UY=require("http"),kY=require("https"),rb=require("stream").Writable,nb=require("assert"),nR=rR(),ab=!1;try{nb(new Qs)}catch(e){ab=e.code==="ERR_INVALID_URL"}var qY=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],ib=["abort","aborted","connect","error","socket","timeout"],ob=Object.create(null);ib.forEach(function(e){ob[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var Jx=eu("ERR_INVALID_URL","Invalid URL",TypeError),eb=eu("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),HY=eu("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",eb),zY=eu("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),GY=eu("ERR_STREAM_WRITE_AFTER_END","write after end"),YY=rb.prototype.destroy||iR;function kr(e,t){rb.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(a){r.emit("error",a instanceof eb?a:new eb({cause:a}))}},this._performRequest()}kr.prototype=Object.create(rb.prototype);kr.prototype.abort=function(){ub(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};kr.prototype.destroy=function(e){return ub(this._currentRequest,e),YY.call(this,e),this};kr.prototype.write=function(e,t,r){if(this._ending)throw new GY;if(!hi(e)&&!$Y(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Zs(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new zY),this.abort())};kr.prototype.end=function(e,t,r){if(Zs(e)?(r=e,e=t=null):Zs(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,a=this._currentRequest;this.write(e,t,function(){n._ended=!0,a.end(null,null,r)}),this._ending=!0}};kr.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};kr.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};kr.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function a(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),i()},e),n(o)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",a)}return t&&this.on("timeout",t),this.socket?a(this.socket):this._currentRequest.once("socket",a),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){kr.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(kr.prototype,e,{get:function(){return this._currentRequest[e]}})});kr.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};kr.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var a of ib)n.on(a,ob[a]);if(this._currentUrl=/^\//.test(this._options.path)?Js.format(this._options):this._options.path,this._isRedirect){var i=0,o=this,l=this._requestBodyBuffers;(function u(s){if(n===o._currentRequest)if(s)o.emit("error",s);else if(i=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(ub(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new HY;var n,a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Zx(/^content-/i,this._options.headers));var o=Zx(/^host$/i,this._options.headers),l=sb(this._currentUrl),u=o||l.host,s=/^\w+:/.test(r)?this._currentUrl:Js.format(Object.assign(l,{host:u})),c=jY(r,s);if(nR("redirecting to",c.href),this._isRedirect=!0,tb(c,this._options),(c.protocol!==l.protocol&&c.protocol!=="https:"||c.host!==u&&!VY(c.host,u))&&Zx(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Zs(a)){var p={headers:e.headers,statusCode:t},f={url:s,method:i,headers:n};a(this._options,p,f),this._sanitizeOptions(this._options)}this._performRequest()};function aR(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var a=n+":",i=r[a]=e[n],o=t[n]=Object.create(i);function l(s,c,p){return XY(s)?s=tb(s):hi(s)?s=tb(sb(s)):(p=c,c=oR(s),s={protocol:a}),Zs(c)&&(p=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},s,c),c.nativeProtocols=r,!hi(c.host)&&!hi(c.hostname)&&(c.hostname="::1"),nb.equal(c.protocol,a,"protocol mismatch"),nR("options",c),new kr(c,p)}function u(s,c,p){var f=o.request(s,c,p);return f.end(),f}Object.defineProperties(o,{request:{value:l,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function iR(){}function sb(e){var t;if(ab)t=new Qs(e);else if(t=oR(Js.parse(e)),!hi(t.protocol))throw new Jx({input:e});return t}function jY(e,t){return ab?new Qs(e,t):sb(Js.resolve(t,e))}function oR(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new Jx({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new Jx({input:e.href||e});return e}function tb(e,t){var r=t||{};for(var n of qY)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function Zx(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function eu(e,t,r){function n(a){Error.captureStackTrace(this,this.constructor),Object.assign(this,a||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function ub(e,t){for(var r of ib)e.removeListener(r,ob[r]);e.on("error",iR),e.destroy(t)}function VY(e,t){nb(hi(e)&&hi(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function hi(e){return typeof e=="string"||e instanceof String}function Zs(e){return typeof e=="function"}function $Y(e){return typeof e=="object"&&"length"in e}function XY(e){return Qs&&e instanceof Qs}cb.exports=aR({http:UY,https:kY});cb.exports.wrap=aR});var Sp=Be(ca=>{"use strict";var jR=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Ej=jR+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",VR="["+jR+"]["+Ej+"]*",Aj=new RegExp("^"+VR+"$"),Nj=function(e,t){let r=[],n=t.exec(e);for(;n;){let a=[];a.startIndex=t.lastIndex-n[0].length;let i=n.length;for(let o=0;o"u")};ca.isExist=function(e){return typeof e<"u"};ca.isEmptyObject=function(e){return Object.keys(e).length===0};ca.merge=function(e,t,r){if(t){let n=Object.keys(t),a=n.length;for(let i=0;i{"use strict";var Db=Sp(),wj={allowBooleanAttributes:!1,unpairedTags:[]};QR.validate=function(e,t){t=Object.assign({},wj,t);let r=[],n=!1,a=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let i=0;i"&&e[i]!==" "&&e[i]!==" "&&e[i]!==` +`&&e[i]!=="\r";i++)u+=e[i];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),i--),!Fj(u)){let p;return u.trim().length===0?p="Invalid space after '<'.":p="Tag '"+u+"' is an invalid name.",Kt("InvalidTag",p,Sr(e,i))}let s=Cj(e,i);if(s===!1)return Kt("InvalidAttr","Attributes for '"+u+"' have open quote.",Sr(e,i));let c=s.value;if(i=s.index,c[c.length-1]==="/"){let p=i-c.length;c=c.substring(0,c.length-1);let f=WR(c,t);if(f===!0)n=!0;else return Kt(f.err.code,f.err.msg,Sr(e,p+f.err.line))}else if(l)if(s.tagClosed){if(c.trim().length>0)return Kt("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",Sr(e,o));if(r.length===0)return Kt("InvalidTag","Closing tag '"+u+"' has not been opened.",Sr(e,o));{let p=r.pop();if(u!==p.tagName){let f=Sr(e,p.tagStartPos);return Kt("InvalidTag","Expected closing tag '"+p.tagName+"' (opened in line "+f.line+", col "+f.col+") instead of closing tag '"+u+"'.",Sr(e,o))}r.length==0&&(a=!0)}}else return Kt("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",Sr(e,i));else{let p=WR(c,t);if(p!==!0)return Kt(p.err.code,p.err.msg,Sr(e,i-c.length+p.err.line));if(a===!0)return Kt("InvalidXml","Multiple possible root nodes found.",Sr(e,i));t.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:o}),n=!0}for(i++;i0)return Kt("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Kt("InvalidXml","Start tag expected.",1);return!0};function $R(e){return e===" "||e===" "||e===` +`||e==="\r"}function XR(e,t){let r=t;for(;t5&&n==="xml")return Kt("InvalidXml","XML declaration allowed only at the start of the document.",Sr(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function KR(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let r=1;for(t+=8;t"&&(r--,r===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t"){t+=2;break}}return t}var Dj='"',Sj="'";function Cj(e,t){let r="",n="",a=!1;for(;t"&&n===""){a=!0;break}r+=e[t]}return n!==""?!1:{value:r,index:t,tagClosed:a}}var _j=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function WR(e,t){let r=Db.getAllMatches(e,_j),n={};for(let a=0;a{var ZR={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}},Ij=function(e){return Object.assign({},ZR,e)};Cb.buildOptions=Ij;Cb.defaultOptions=ZR});var tF=Be((P9e,eF)=>{"use strict";var _b=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}};eF.exports=_b});var nF=Be((U9e,rF)=>{var Bj=Sp();function Lj(e,t){let r={};if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;let n=1,a=!1,i=!1,o="";for(;t"){if(i?e[t-1]==="-"&&e[t-2]==="-"&&(i=!1,n--):n--,n===0)break}else e[t]==="["?a=!0:o+=e[t];if(n!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:t}}function Pj(e,t){let r="";for(;t{var Yj=/^[-+]?0x[a-fA-F0-9]+$/,jj=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt);!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);var Vj={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function $j(e,t={}){if(t=Object.assign({},Vj,t),!e||typeof e!="string")return e;let r=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return e;if(t.hex&&Yj.test(r))return Number.parseInt(r,16);{let n=jj.exec(r);if(n){let a=n[1],i=n[2],o=Xj(n[3]),l=n[4]||n[6];if(!t.leadingZeros&&i.length>0&&a&&r[2]!==".")return e;if(!t.leadingZeros&&i.length>0&&!a&&r[1]!==".")return e;{let u=Number(r),s=""+u;return s.search(/[eE]/)!==-1||l?t.eNotation?u:e:r.indexOf(".")!==-1?s==="0"&&o===""||s===o||a&&s==="-"+o?u:e:i?o===s||a+o===s?u:e:r===s||r===a+s?u:e}}else return e}}function Xj(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substr(0,e.length-1))),e}aF.exports=$j});var uF=Be((q9e,sF)=>{"use strict";var oF=Sp(),iu=tF(),Kj=nF(),Wj=iF(),Mb=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,n)=>String.fromCharCode(Number.parseInt(n,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,n)=>String.fromCharCode(Number.parseInt(n,16))}},this.addExternalEntities=Qj,this.parseXml=rV,this.parseTextData=Zj,this.resolveNameSpace=Jj,this.buildAttributesMap=tV,this.isItStopNode=oV,this.replaceEntitiesValue=aV,this.readStopNodeData=uV,this.saveTextToParentTag=iV,this.addChild=nV}};function Qj(e){let t=Object.keys(e);for(let r=0;r0)){o||(e=this.replaceEntitiesValue(e));let l=this.options.tagValueProcessor(t,e,r,a,i);return l==null?e:typeof l!=typeof e||l!==e?l:this.options.trimValues?Rb(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?Rb(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Jj(e){if(this.options.removeNSPrefix){let t=e.split(":"),r=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=r+t[1])}return e}var eV=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function tV(e,t,r){if(!this.options.ignoreAttributes&&typeof e=="string"){let n=oF.getAllMatches(e,eV),a=n.length,i={};for(let o=0;o",i,"Closing Tag is not closed."),u=e.substring(i+2,l).trim();if(this.options.removeNSPrefix){let p=u.indexOf(":");p!==-1&&(u=u.substr(p+1))}this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&(n=this.saveTextToParentTag(n,r,a));let s=a.substring(a.lastIndexOf(".")+1);if(u&&this.options.unpairedTags.indexOf(u)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let c=0;s&&this.options.unpairedTags.indexOf(s)!==-1?(c=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=a.lastIndexOf("."),a=a.substring(0,c),r=this.tagsNodeStack.pop(),n="",i=l}else if(e[i+1]==="?"){let l=Ob(e,i,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,a),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){let u=new iu(l.tagName);u.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(u[":@"]=this.buildAttributesMap(l.tagExp,a,l.tagName)),this.addChild(r,u,a)}i=l.closeIndex+1}else if(e.substr(i+1,3)==="!--"){let l=xi(e,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){let u=e.substring(i+4,l-2);n=this.saveTextToParentTag(n,r,a),r.add(this.options.commentPropName,[{[this.options.textNodeName]:u}])}i=l}else if(e.substr(i+1,2)==="!D"){let l=Kj(e,i);this.docTypeEntities=l.entities,i=l.i}else if(e.substr(i+1,2)==="!["){let l=xi(e,"]]>",i,"CDATA is not closed.")-2,u=e.substring(i+9,l);n=this.saveTextToParentTag(n,r,a);let s=this.parseTextData(u,r.tagname,a,!0,!1,!0,!0);s==null&&(s=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:u}]):r.add(this.options.textNodeName,s),i=l+2}else{let l=Ob(e,i,this.options.removeNSPrefix),u=l.tagName,s=l.rawTagName,c=l.tagExp,p=l.attrExpPresent,f=l.closeIndex;this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,a,!1));let m=r;if(m&&this.options.unpairedTags.indexOf(m.tagname)!==-1&&(r=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),u!==t.tagname&&(a+=a?"."+u:u),this.isItStopNode(this.options.stopNodes,a,u)){let h="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)u[u.length-1]==="/"?(u=u.substr(0,u.length-1),a=a.substr(0,a.length-1),c=u):c=c.substr(0,c.length-1),i=l.closeIndex;else if(this.options.unpairedTags.indexOf(u)!==-1)i=l.closeIndex;else{let v=this.readStopNodeData(e,s,f+1);if(!v)throw new Error(`Unexpected end of ${s}`);i=v.i,h=v.tagContent}let d=new iu(u);u!==c&&p&&(d[":@"]=this.buildAttributesMap(c,a,u)),h&&(h=this.parseTextData(h,u,a,!0,p,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),d.add(this.options.textNodeName,h),this.addChild(r,d,a)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){u[u.length-1]==="/"?(u=u.substr(0,u.length-1),a=a.substr(0,a.length-1),c=u):c=c.substr(0,c.length-1),this.options.transformTagName&&(u=this.options.transformTagName(u));let h=new iu(u);u!==c&&p&&(h[":@"]=this.buildAttributesMap(c,a,u)),this.addChild(r,h,a),a=a.substr(0,a.lastIndexOf("."))}else{let h=new iu(u);this.tagsNodeStack.push(r),u!==c&&p&&(h[":@"]=this.buildAttributesMap(c,a,u)),this.addChild(r,h,a),r=h}n="",i=f}}else n+=e[i];return t.child};function nV(e,t,r){let n=this.options.updateTag(t.tagname,r,t[":@"]);n===!1||(typeof n=="string"&&(t.tagname=n),e.addChild(t))}var aV=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){let r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){let r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){let r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function iV(e,t,r,n){return e&&(n===void 0&&(n=Object.keys(t.child).length===0),e=this.parseTextData(e,t.tagname,r,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,n),e!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function oV(e,t,r){let n="*."+r;for(let a in e){let i=e[a];if(n===i||t===i)return!0}return!1}function sV(e,t,r=">"){let n,a="";for(let i=t;i",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(a--,a===0))return{tagContent:e.substring(n,r),i};r=i}else if(e[r+1]==="?")r=xi(e,"?>",r+1,"StopNode is not closed.");else if(e.substr(r+1,3)==="!--")r=xi(e,"-->",r+3,"StopNode is not closed.");else if(e.substr(r+1,2)==="![")r=xi(e,"]]>",r,"StopNode is not closed.")-2;else{let i=Ob(e,r,">");i&&((i&&i.tagName)===t&&i.tagExp[i.tagExp.length-1]!=="/"&&a++,r=i.closeIndex)}}function Rb(e,t,r){if(t&&typeof e=="string"){let n=e.trim();return n==="true"?!0:n==="false"?!1:Wj(e,r)}else return oF.isExist(e)?e:""}sF.exports=Mb});var pF=Be(lF=>{"use strict";function cV(e,t){return cF(e,t)}function cF(e,t,r){let n,a={};for(let i=0;i0&&(a[t.textNodeName]=n):n!==void 0&&(a[t.textNodeName]=n),a}function lV(e){let t=Object.keys(e);for(let r=0;r{var{buildOptions:mV}=JR(),dV=uF(),{prettify:hV}=pF(),vV=Sb(),Fb=class{constructor(t){this.externalEntities={},this.options=mV(t)}parse(t,r){if(typeof t!="string")if(t.toString)t=t.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});let i=vV.validate(t,r);if(i!==!0)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}let n=new dV(this.options);n.addExternalEntities(this.externalEntities);let a=n.parseXml(t);return this.options.preserveOrder||a===void 0?a:hV(a,this.options)}addEntity(t,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}};fF.exports=Fb});var xF=Be((G9e,gF)=>{var gV=` +`;function xV(e,t){let r="";return t.format&&t.indentBy.length>0&&(r=gV),hF(e,t,"",r)}function hF(e,t,r,n){let a="",i=!1;for(let o=0;o`,i=!1;continue}else if(u===t.commentPropName){a+=n+``,i=!0;continue}else if(u[0]==="?"){let h=dF(l[":@"],t),d=u==="?xml"?"":n,v=l[u][0][t.textNodeName];v=v.length!==0?" "+v:"",a+=d+`<${u}${v}${h}?>`,i=!0;continue}let c=n;c!==""&&(c+=t.indentBy);let p=dF(l[":@"],t),f=n+`<${u}${p}`,m=hF(l[u],t,s,c);t.unpairedTags.indexOf(u)!==-1?t.suppressUnpairedNode?a+=f+">":a+=f+"/>":(!m||m.length===0)&&t.suppressEmptyNode?a+=f+"/>":m&&m.endsWith(">")?a+=f+`>${m}${n}`:(a+=f+">",m&&n!==""&&(m.includes("/>")||m.includes("`),i=!0}return a}function bV(e){let t=Object.keys(e);for(let r=0;r0&&t.processEntities)for(let r=0;r{"use strict";var EV=xF(),AV={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function La(e){this.options=Object.assign({},AV,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=wV),this.processTextOrObjNode=NV,this.options.format?(this.indentate=TV,this.tagEndChar=`> `,this.newLine=` -`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}La.prototype.build=function(e){return this.options.preserveOrder?EV(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)};La.prototype.j2x=function(e,t){let r="",n="";for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(typeof e[a]>"u")this.isAttribute(a)&&(n+="");else if(e[a]===null)this.isAttribute(a)?n+="":a[0]==="?"?n+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)n+=this.buildTextValNode(e[a],a,"",t);else if(typeof e[a]!="object"){let i=this.isAttribute(a);if(i)r+=this.buildAttrPairStr(i,""+e[a]);else if(a===this.options.textNodeName){let o=this.options.tagValueProcessor(a,""+e[a]);n+=this.replaceEntitiesValue(o)}else n+=this.buildTextValNode(e[a],a,"",t)}else if(Array.isArray(e[a])){let i=e[a].length,o="",l="";for(let u=0;u"u"))if(s===null)a[0]==="?"?n+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(typeof s=="object")if(this.options.oneListGroup){let c=this.j2x(s,t+1);o+=c.val,this.options.attributesGroupName&&s.hasOwnProperty(this.options.attributesGroupName)&&(l+=c.attrStr)}else o+=this.processTextOrObjNode(s,a,t);else if(this.options.oneListGroup){let c=this.options.tagValueProcessor(a,s);c=this.replaceEntitiesValue(c),o+=c}else o+=this.buildTextValNode(s,a,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,a,l,t)),n+=o}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){let i=Object.keys(e[a]),o=i.length;for(let l=0;l"+e+a:this.options.commentPropName!==!1&&t===this.options.commentPropName&&i.length===0?this.indentate(n)+``+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+a}};La.prototype.closeTag=function(e){let t="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+``+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let a=this.options.tagValueProcessor(t,e);return a=this.replaceEntitiesValue(a),a===""?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+a+"0&&this.options.processEntities)for(let t=0;t{"use strict";var DV=Sb(),SV=dF(),CV=EF();AF.exports={XMLParser:SV,XMLValidator:DV,XMLBuilder:CV}});var Yp=Be(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.AttributeAction=Xn.IgnoreCaseMode=Xn.SelectorType=void 0;var S$;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(S$=Xn.SelectorType||(Xn.SelectorType={}));Xn.IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};var C$;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(C$=Xn.AttributeAction||(Xn.AttributeAction={}))});var xI=Be(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.parse=Ro.isTraversal=void 0;var Nt=Yp(),dI=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,_$=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,M$=new Map([[126,Nt.AttributeAction.Element],[94,Nt.AttributeAction.Start],[36,Nt.AttributeAction.End],[42,Nt.AttributeAction.Any],[33,Nt.AttributeAction.Not],[124,Nt.AttributeAction.Hyphen]]),O$=new Set(["has","not","matches","is","where","host","host-context"]);function vI(e){switch(e.type){case Nt.SelectorType.Adjacent:case Nt.SelectorType.Child:case Nt.SelectorType.Descendant:case Nt.SelectorType.Parent:case Nt.SelectorType.Sibling:case Nt.SelectorType.ColumnCombinator:return!0;default:return!1}}Ro.isTraversal=vI;var R$=new Set(["contains","icontains"]);function F$(e,t,r){var n=parseInt(t,16)-65536;return n!==n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function bu(e){return e.replace(_$,F$)}function Wb(e){return e===39||e===34}function hI(e){return e===32||e===9||e===10||e===12||e===13}function I$(e){var t=[],r=gI(t,"".concat(e),0);if(r0&&r0&&vI(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function s(P){if(n.length>0&&n[n.length-1].type===Nt.SelectorType.Descendant){n[n.length-1].type=P;return}u(),n.push({type:P})}function c(P,U){n.push({type:Nt.SelectorType.Attribute,name:P,action:U,value:a(1),namespace:null,ignoreCase:"quirks"})}function p(){if(n.length&&n[n.length-1].type===Nt.SelectorType.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");e.push(n)}if(i(0),t.length===r)return r;e:for(;r{"use strict";var jp=Io&&Io.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n ":" > ";case Vt.SelectorType.Parent:return t===0?"< ":" < ";case Vt.SelectorType.Sibling:return t===0?"~ ":" ~ ";case Vt.SelectorType.Adjacent:return t===0?"+ ":" + ";case Vt.SelectorType.Descendant:return" ";case Vt.SelectorType.ColumnCombinator:return t===0?"|| ":" || ";case Vt.SelectorType.Universal:return e.namespace==="*"&&t+10?n+e.slice(r):e}});var Bo=Be(an=>{"use strict";var U$=an&&an.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),k$=an&&an.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&U$(t,e,r)};Object.defineProperty(an,"__esModule",{value:!0});an.stringify=an.parse=an.isTraversal=void 0;k$(Yp(),an);var DI=xI();Object.defineProperty(an,"isTraversal",{enumerable:!0,get:function(){return DI.isTraversal}});Object.defineProperty(an,"parse",{enumerable:!0,get:function(){return DI.parse}});var q$=wI();Object.defineProperty(an,"stringify",{enumerable:!0,get:function(){return q$.stringify}})});var za=Be((pUe,SI)=>{SI.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}});var W4=Be((U1,k1)=>{(function(e,t){typeof U1=="object"&&typeof k1<"u"?k1.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(U1,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",a="second",i="minute",o="hour",l="day",u="week",s="month",c="quarter",p="year",f="date",m="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var P=["th","st","nd","rd"],U=R%100;return"["+R+(P[(U-20)%10]||P[U]||P[0])+"]"}},x=function(R,P,U){var k=String(R);return!k||k.length>=P?R:""+Array(P+1-k.length).join(U)+R},N={s:x,z:function(R){var P=-R.utcOffset(),U=Math.abs(P),k=Math.floor(U/60),M=U%60;return(P<=0?"+":"-")+x(k,2,"0")+":"+x(M,2,"0")},m:function R(P,U){if(P.date()1)return R(q[0])}else{var B=P.name;y[B]=P,M=B}return!k&&M&&(g=M),M||!k&&g},A=function(R,P){if(b(R))return R.clone();var U=typeof P=="object"?P:{};return U.date=R,U.args=arguments,new D(U)},w=N;w.l=S,w.i=b,w.w=function(R,P){return A(R,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var D=function(){function R(U){this.$L=S(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[E]=!0}var P=R.prototype;return P.parse=function(U){this.$d=function(k){var M=k.date,_=k.utc;if(M===null)return new Date(NaN);if(w.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var q=M.match(h);if(q){var B=q[2]-1||0,Z=(q[7]||"0").substring(0,3);return _?new Date(Date.UTC(q[1],B,q[3]||1,q[4]||0,q[5]||0,q[6]||0,Z)):new Date(q[1],B,q[3]||1,q[4]||0,q[5]||0,q[6]||0,Z)}}return new Date(M)}(U),this.init()},P.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},P.$utils=function(){return w},P.isValid=function(){return this.$d.toString()!==m},P.isSame=function(U,k){var M=A(U);return this.startOf(k)<=M&&M<=this.endOf(k)},P.isAfter=function(U,k){return A(U){(function(e,t){typeof q1=="object"&&typeof H1<"u"?H1.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(q1,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,a,i){var o=a.prototype;i.utc=function(m){var h={date:m,utc:!0,args:arguments};return new a(h)},o.utc=function(m){var h=i(this.toDate(),{locale:this.$L,utc:!0});return m?h.add(this.utcOffset(),e):h},o.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var l=o.parse;o.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),l.call(this,m)};var u=o.init;o.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var s=o.utcOffset;o.utcOffset=function(m,h){var d=this.$utils().u;if(d(m))return this.$u?0:d(this.$offset)?s.call(this):this.$offset;if(typeof m=="string"&&(m=function(g){g===void 0&&(g="");var y=g.match(t);if(!y)return null;var E=(""+y[0]).match(r)||["-",0,0],b=E[0],S=60*+E[1]+ +E[2];return S===0?0:b==="+"?S:-S}(m),m===null))return this;var v=Math.abs(m)<=16?60*m:m,x=this;if(h)return x.$offset=v,x.$u=m===0,x;if(m!==0){var N=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(v+N,e)).$offset=v,x.$x.$localOffset=N}else x=this.utc();return x};var c=o.format;o.format=function(m){var h=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,h)},o.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var p=o.toDate;o.toDate=function(m){return m==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var f=o.diff;o.diff=function(m,h,d){if(m&&this.$u===m.$u)return f.call(this,m,h,d);var v=this.local(),x=i(m).local();return f.call(v,x,h,d)}}})});var t8=Be(Df=>{(function(e){e.parser=function(L,I){return new r(L,I)},e.SAXParser=r,e.SAXStream=s,e.createStream=u,e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function r(L,I){if(!(this instanceof r))return new r(L,I);var $=this;a($),$.q=$.c="",$.bufferCheckPosition=e.MAX_BUFFER_LENGTH,$.opt=I||{},$.opt.lowercase=$.opt.lowercase||$.opt.lowercasetags,$.looseCase=$.opt.lowercase?"toLowerCase":"toUpperCase",$.tags=[],$.closed=$.closedRoot=$.sawRoot=!1,$.tag=$.error=null,$.strict=!!L,$.noscript=!!(L||$.opt.noscript),$.state=A.BEGIN,$.strictEntities=$.opt.strictEntities,$.ENTITIES=$.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),$.attribList=[],$.opt.xmlns&&($.ns=Object.create(h)),$.opt.unquotedAttributeValues===void 0&&($.opt.unquotedAttributeValues=!L),$.trackPosition=$.opt.position!==!1,$.trackPosition&&($.position=$.line=$.column=0),D($,"onready")}Object.create||(Object.create=function(L){function I(){}I.prototype=L;var $=new I;return $}),Object.keys||(Object.keys=function(L){var I=[];for(var $ in L)L.hasOwnProperty($)&&I.push($);return I});function n(L){for(var I=Math.max(e.MAX_BUFFER_LENGTH,10),$=0,H=0,ae=t.length;HI)switch(t[H]){case"textNode":R(L);break;case"cdata":F(L,"oncdata",L.cdata),L.cdata="";break;case"script":F(L,"onscript",L.script),L.script="";break;default:U(L,"Max buffer length exceeded: "+t[H])}$=Math.max($,ce)}var me=e.MAX_BUFFER_LENGTH-$;L.bufferCheckPosition=me+L.position}function a(L){for(var I=0,$=t.length;I<$;I++)L[t[I]]=""}function i(L){R(L),L.cdata!==""&&(F(L,"oncdata",L.cdata),L.cdata=""),L.script!==""&&(F(L,"onscript",L.script),L.script="")}r.prototype={end:function(){k(this)},write:fe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){i(this)}};var o;try{o=require("stream").Stream}catch{o=function(){}}o||(o=function(){});var l=e.EVENTS.filter(function(L){return L!=="error"&&L!=="end"});function u(L,I){return new s(L,I)}function s(L,I){if(!(this instanceof s))return new s(L,I);o.apply(this),this._parser=new r(L,I),this.writable=!0,this.readable=!0;var $=this;this._parser.onend=function(){$.emit("end")},this._parser.onerror=function(H){$.emit("error",H),$._parser.error=null},this._decoder=null,l.forEach(function(H){Object.defineProperty($,"on"+H,{get:function(){return $._parser["on"+H]},set:function(ae){if(!ae)return $.removeAllListeners(H),$._parser["on"+H]=ae,ae;$.on(H,ae)},enumerable:!0,configurable:!1})})}s.prototype=Object.create(o.prototype,{constructor:{value:s}}),s.prototype.write=function(L){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(L)){if(!this._decoder){var I=require("string_decoder").StringDecoder;this._decoder=new I("utf8")}L=this._decoder.write(L)}return this._parser.write(L.toString()),this.emit("data",L),!0},s.prototype.end=function(L){return L&&L.length&&this.write(L),this._parser.end(),!0},s.prototype.on=function(L,I){var $=this;return!$._parser["on"+L]&&l.indexOf(L)!==-1&&($._parser["on"+L]=function(){var H=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);H.splice(0,0,L),$.emit.apply($,H)}),o.prototype.on.call($,L,I)};var c="[CDATA[",p="DOCTYPE",f="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",h={xml:f,xmlns:m},d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,x=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,N=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(L){return L===" "||L===` +`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}La.prototype.build=function(e){return this.options.preserveOrder?EV(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)};La.prototype.j2x=function(e,t){let r="",n="";for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(typeof e[a]>"u")this.isAttribute(a)&&(n+="");else if(e[a]===null)this.isAttribute(a)?n+="":a[0]==="?"?n+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)n+=this.buildTextValNode(e[a],a,"",t);else if(typeof e[a]!="object"){let i=this.isAttribute(a);if(i)r+=this.buildAttrPairStr(i,""+e[a]);else if(a===this.options.textNodeName){let o=this.options.tagValueProcessor(a,""+e[a]);n+=this.replaceEntitiesValue(o)}else n+=this.buildTextValNode(e[a],a,"",t)}else if(Array.isArray(e[a])){let i=e[a].length,o="",l="";for(let u=0;u"u"))if(s===null)a[0]==="?"?n+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(typeof s=="object")if(this.options.oneListGroup){let c=this.j2x(s,t+1);o+=c.val,this.options.attributesGroupName&&s.hasOwnProperty(this.options.attributesGroupName)&&(l+=c.attrStr)}else o+=this.processTextOrObjNode(s,a,t);else if(this.options.oneListGroup){let c=this.options.tagValueProcessor(a,s);c=this.replaceEntitiesValue(c),o+=c}else o+=this.buildTextValNode(s,a,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,a,l,t)),n+=o}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){let i=Object.keys(e[a]),o=i.length;for(let l=0;l"+e+a:this.options.commentPropName!==!1&&t===this.options.commentPropName&&i.length===0?this.indentate(n)+``+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+a}};La.prototype.closeTag=function(e){let t="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+``+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let a=this.options.tagValueProcessor(t,e);return a=this.replaceEntitiesValue(a),a===""?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+a+"0&&this.options.processEntities)for(let t=0;t{"use strict";var DV=Sb(),SV=mF(),CV=yF();EF.exports={XMLParser:SV,XMLValidator:DV,XMLBuilder:CV}});var Yp=Be(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.AttributeAction=Xn.IgnoreCaseMode=Xn.SelectorType=void 0;var S$;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(S$=Xn.SelectorType||(Xn.SelectorType={}));Xn.IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};var C$;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(C$=Xn.AttributeAction||(Xn.AttributeAction={}))});var gI=Be(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.parse=Ro.isTraversal=void 0;var Nt=Yp(),mI=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,_$=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,M$=new Map([[126,Nt.AttributeAction.Element],[94,Nt.AttributeAction.Start],[36,Nt.AttributeAction.End],[42,Nt.AttributeAction.Any],[33,Nt.AttributeAction.Not],[124,Nt.AttributeAction.Hyphen]]),O$=new Set(["has","not","matches","is","where","host","host-context"]);function hI(e){switch(e.type){case Nt.SelectorType.Adjacent:case Nt.SelectorType.Child:case Nt.SelectorType.Descendant:case Nt.SelectorType.Parent:case Nt.SelectorType.Sibling:case Nt.SelectorType.ColumnCombinator:return!0;default:return!1}}Ro.isTraversal=hI;var R$=new Set(["contains","icontains"]);function F$(e,t,r){var n=parseInt(t,16)-65536;return n!==n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function bu(e){return e.replace(_$,F$)}function Wb(e){return e===39||e===34}function dI(e){return e===32||e===9||e===10||e===12||e===13}function I$(e){var t=[],r=vI(t,"".concat(e),0);if(r0&&r0&&hI(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function s(P){if(n.length>0&&n[n.length-1].type===Nt.SelectorType.Descendant){n[n.length-1].type=P;return}u(),n.push({type:P})}function c(P,U){n.push({type:Nt.SelectorType.Attribute,name:P,action:U,value:a(1),namespace:null,ignoreCase:"quirks"})}function p(){if(n.length&&n[n.length-1].type===Nt.SelectorType.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");e.push(n)}if(i(0),t.length===r)return r;e:for(;r{"use strict";var jp=Io&&Io.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n ":" > ";case Vt.SelectorType.Parent:return t===0?"< ":" < ";case Vt.SelectorType.Sibling:return t===0?"~ ":" ~ ";case Vt.SelectorType.Adjacent:return t===0?"+ ":" + ";case Vt.SelectorType.Descendant:return" ";case Vt.SelectorType.ColumnCombinator:return t===0?"|| ":" || ";case Vt.SelectorType.Universal:return e.namespace==="*"&&t+10?n+e.slice(r):e}});var Bo=Be(an=>{"use strict";var U$=an&&an.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),k$=an&&an.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&U$(t,e,r)};Object.defineProperty(an,"__esModule",{value:!0});an.stringify=an.parse=an.isTraversal=void 0;k$(Yp(),an);var wI=gI();Object.defineProperty(an,"isTraversal",{enumerable:!0,get:function(){return wI.isTraversal}});Object.defineProperty(an,"parse",{enumerable:!0,get:function(){return wI.parse}});var q$=TI();Object.defineProperty(an,"stringify",{enumerable:!0,get:function(){return q$.stringify}})});var za=Be((pUe,DI)=>{DI.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}});var W4=Be((P1,U1)=>{(function(e,t){typeof P1=="object"&&typeof U1<"u"?U1.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(P1,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",a="second",i="minute",o="hour",l="day",u="week",s="month",c="quarter",p="year",f="date",m="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var P=["th","st","nd","rd"],U=R%100;return"["+R+(P[(U-20)%10]||P[U]||P[0])+"]"}},x=function(R,P,U){var k=String(R);return!k||k.length>=P?R:""+Array(P+1-k.length).join(U)+R},N={s:x,z:function(R){var P=-R.utcOffset(),U=Math.abs(P),k=Math.floor(U/60),M=U%60;return(P<=0?"+":"-")+x(k,2,"0")+":"+x(M,2,"0")},m:function R(P,U){if(P.date()1)return R(q[0])}else{var B=P.name;y[B]=P,M=B}return!k&&M&&(g=M),M||!k&&g},A=function(R,P){if(b(R))return R.clone();var U=typeof P=="object"?P:{};return U.date=R,U.args=arguments,new D(U)},w=N;w.l=S,w.i=b,w.w=function(R,P){return A(R,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var D=function(){function R(U){this.$L=S(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[E]=!0}var P=R.prototype;return P.parse=function(U){this.$d=function(k){var M=k.date,_=k.utc;if(M===null)return new Date(NaN);if(w.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var q=M.match(h);if(q){var B=q[2]-1||0,Z=(q[7]||"0").substring(0,3);return _?new Date(Date.UTC(q[1],B,q[3]||1,q[4]||0,q[5]||0,q[6]||0,Z)):new Date(q[1],B,q[3]||1,q[4]||0,q[5]||0,q[6]||0,Z)}}return new Date(M)}(U),this.init()},P.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},P.$utils=function(){return w},P.isValid=function(){return this.$d.toString()!==m},P.isSame=function(U,k){var M=A(U);return this.startOf(k)<=M&&M<=this.endOf(k)},P.isAfter=function(U,k){return A(U){(function(e,t){typeof k1=="object"&&typeof q1<"u"?q1.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(k1,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,a,i){var o=a.prototype;i.utc=function(m){var h={date:m,utc:!0,args:arguments};return new a(h)},o.utc=function(m){var h=i(this.toDate(),{locale:this.$L,utc:!0});return m?h.add(this.utcOffset(),e):h},o.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var l=o.parse;o.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),l.call(this,m)};var u=o.init;o.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var s=o.utcOffset;o.utcOffset=function(m,h){var d=this.$utils().u;if(d(m))return this.$u?0:d(this.$offset)?s.call(this):this.$offset;if(typeof m=="string"&&(m=function(g){g===void 0&&(g="");var y=g.match(t);if(!y)return null;var E=(""+y[0]).match(r)||["-",0,0],b=E[0],S=60*+E[1]+ +E[2];return S===0?0:b==="+"?S:-S}(m),m===null))return this;var v=Math.abs(m)<=16?60*m:m,x=this;if(h)return x.$offset=v,x.$u=m===0,x;if(m!==0){var N=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(v+N,e)).$offset=v,x.$x.$localOffset=N}else x=this.utc();return x};var c=o.format;o.format=function(m){var h=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,h)},o.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var p=o.toDate;o.toDate=function(m){return m==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var f=o.diff;o.diff=function(m,h,d){if(m&&this.$u===m.$u)return f.call(this,m,h,d);var v=this.local(),x=i(m).local();return f.call(v,x,h,d)}}})});var t8=Be(Df=>{(function(e){e.parser=function(L,I){return new r(L,I)},e.SAXParser=r,e.SAXStream=s,e.createStream=u,e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function r(L,I){if(!(this instanceof r))return new r(L,I);var $=this;a($),$.q=$.c="",$.bufferCheckPosition=e.MAX_BUFFER_LENGTH,$.opt=I||{},$.opt.lowercase=$.opt.lowercase||$.opt.lowercasetags,$.looseCase=$.opt.lowercase?"toLowerCase":"toUpperCase",$.tags=[],$.closed=$.closedRoot=$.sawRoot=!1,$.tag=$.error=null,$.strict=!!L,$.noscript=!!(L||$.opt.noscript),$.state=A.BEGIN,$.strictEntities=$.opt.strictEntities,$.ENTITIES=$.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),$.attribList=[],$.opt.xmlns&&($.ns=Object.create(h)),$.opt.unquotedAttributeValues===void 0&&($.opt.unquotedAttributeValues=!L),$.trackPosition=$.opt.position!==!1,$.trackPosition&&($.position=$.line=$.column=0),D($,"onready")}Object.create||(Object.create=function(L){function I(){}I.prototype=L;var $=new I;return $}),Object.keys||(Object.keys=function(L){var I=[];for(var $ in L)L.hasOwnProperty($)&&I.push($);return I});function n(L){for(var I=Math.max(e.MAX_BUFFER_LENGTH,10),$=0,H=0,ae=t.length;HI)switch(t[H]){case"textNode":R(L);break;case"cdata":F(L,"oncdata",L.cdata),L.cdata="";break;case"script":F(L,"onscript",L.script),L.script="";break;default:U(L,"Max buffer length exceeded: "+t[H])}$=Math.max($,ce)}var me=e.MAX_BUFFER_LENGTH-$;L.bufferCheckPosition=me+L.position}function a(L){for(var I=0,$=t.length;I<$;I++)L[t[I]]=""}function i(L){R(L),L.cdata!==""&&(F(L,"oncdata",L.cdata),L.cdata=""),L.script!==""&&(F(L,"onscript",L.script),L.script="")}r.prototype={end:function(){k(this)},write:fe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){i(this)}};var o;try{o=require("stream").Stream}catch{o=function(){}}o||(o=function(){});var l=e.EVENTS.filter(function(L){return L!=="error"&&L!=="end"});function u(L,I){return new s(L,I)}function s(L,I){if(!(this instanceof s))return new s(L,I);o.apply(this),this._parser=new r(L,I),this.writable=!0,this.readable=!0;var $=this;this._parser.onend=function(){$.emit("end")},this._parser.onerror=function(H){$.emit("error",H),$._parser.error=null},this._decoder=null,l.forEach(function(H){Object.defineProperty($,"on"+H,{get:function(){return $._parser["on"+H]},set:function(ae){if(!ae)return $.removeAllListeners(H),$._parser["on"+H]=ae,ae;$.on(H,ae)},enumerable:!0,configurable:!1})})}s.prototype=Object.create(o.prototype,{constructor:{value:s}}),s.prototype.write=function(L){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(L)){if(!this._decoder){var I=require("string_decoder").StringDecoder;this._decoder=new I("utf8")}L=this._decoder.write(L)}return this._parser.write(L.toString()),this.emit("data",L),!0},s.prototype.end=function(L){return L&&L.length&&this.write(L),this._parser.end(),!0},s.prototype.on=function(L,I){var $=this;return!$._parser["on"+L]&&l.indexOf(L)!==-1&&($._parser["on"+L]=function(){var H=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);H.splice(0,0,L),$.emit.apply($,H)}),o.prototype.on.call($,L,I)};var c="[CDATA[",p="DOCTYPE",f="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",h={xml:f,xmlns:m},d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,x=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,N=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(L){return L===" "||L===` `||L==="\r"||L===" "}function y(L){return L==='"'||L==="'"}function E(L){return L===">"||g(L)}function b(L,I){return L.test(I)}function S(L,I){return!b(L,I)}var A=0;e.STATE={BEGIN:A++,BEGIN_WHITESPACE:A++,TEXT:A++,TEXT_ENTITY:A++,OPEN_WAKA:A++,SGML_DECL:A++,SGML_DECL_QUOTED:A++,DOCTYPE:A++,DOCTYPE_QUOTED:A++,DOCTYPE_DTD:A++,DOCTYPE_DTD_QUOTED:A++,COMMENT_STARTING:A++,COMMENT:A++,COMMENT_ENDING:A++,COMMENT_ENDED:A++,CDATA:A++,CDATA_ENDING:A++,CDATA_ENDING_2:A++,PROC_INST:A++,PROC_INST_BODY:A++,PROC_INST_ENDING:A++,OPEN_TAG:A++,OPEN_TAG_SLASH:A++,ATTRIB:A++,ATTRIB_NAME:A++,ATTRIB_NAME_SAW_WHITE:A++,ATTRIB_VALUE:A++,ATTRIB_VALUE_QUOTED:A++,ATTRIB_VALUE_CLOSED:A++,ATTRIB_VALUE_UNQUOTED:A++,ATTRIB_VALUE_ENTITY_Q:A++,ATTRIB_VALUE_ENTITY_U:A++,CLOSE_TAG:A++,CLOSE_TAG_SAW_WHITE:A++,SCRIPT:A++,SCRIPT_ENDING:A++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(L){var I=e.ENTITIES[L],$=typeof I=="number"?String.fromCharCode(I):I;e.ENTITIES[L]=$});for(var w in e.STATE)e.STATE[e.STATE[w]]=w;A=e.STATE;function D(L,I,$){L[I]&&L[I]($)}function F(L,I,$){L.textNode&&R(L),D(L,I,$)}function R(L){L.textNode=P(L.opt,L.textNode),L.textNode&&D(L,"ontext",L.textNode),L.textNode=""}function P(L,I){return L.trim&&(I=I.trim()),L.normalize&&(I=I.replace(/\s+/g," ")),I}function U(L,I){return R(L),L.trackPosition&&(I+=` Line: `+L.line+` Column: `+L.column+` @@ -18,32 +18,32 @@ Char: `+L.c),I=new Error(I),L.error=I,D(L,"onerror",I),L}function k(L){return L. Actual: `+L.attribValue);else if(H==="xmlns"&&L.attribValue!==m)M(L,"xmlns: prefix must be bound to "+m+` Actual: `+L.attribValue);else{var ae=L.tag,ce=L.tags[L.tags.length-1]||L;ae.ns===ce.ns&&(ae.ns=Object.create(ce.ns)),ae.ns[H]=L.attribValue}L.attribList.push([L.attribName,L.attribValue])}else L.tag.attributes[L.attribName]=L.attribValue,F(L,"onattribute",{name:L.attribName,value:L.attribValue});L.attribName=L.attribValue=""}function Z(L,I){if(L.opt.xmlns){var $=L.tag,H=q(L.tagName);$.prefix=H.prefix,$.local=H.local,$.uri=$.ns[H.prefix]||"",$.prefix&&!$.uri&&(M(L,"Unbound namespace prefix: "+JSON.stringify(L.tagName)),$.uri=H.prefix);var ae=L.tags[L.tags.length-1]||L;$.ns&&ae.ns!==$.ns&&Object.keys($.ns).forEach(function(ve){F(L,"onopennamespace",{prefix:ve,uri:$.ns[ve]})});for(var ce=0,me=L.attribList.length;ce",L.tagName="",L.state=A.SCRIPT;return}F(L,"onscript",L.script),L.script=""}var I=L.tags.length,$=L.tagName;L.strict||($=$[L.looseCase]());for(var H=$;I--;){var ae=L.tags[I];if(ae.name!==H)M(L,"Unexpected close tag");else break}if(I<0){M(L,"Unmatched closing tag: "+L.tagName),L.textNode+="",L.state=A.TEXT;return}L.tagName=$;for(var ce=L.tags.length;ce-- >I;){var me=L.tag=L.tags.pop();L.tagName=L.tag.name,F(L,"onclosetag",L.tagName);var Ne={};for(var Me in me.ns)Ne[Me]=me.ns[Me];var j=L.tags[L.tags.length-1]||L;L.opt.xmlns&&me.ns!==j.ns&&Object.keys(me.ns).forEach(function(X){var se=me.ns[X];F(L,"onclosenamespace",{prefix:X,uri:se})})}I===0&&(L.closedRoot=!0),L.tagName=L.attribValue=L.attribName="",L.attribList.length=0,L.state=A.TEXT}function Q(L){var I=L.entity,$=I.toLowerCase(),H,ae="";return L.ENTITIES[I]?L.ENTITIES[I]:L.ENTITIES[$]?L.ENTITIES[$]:(I=$,I.charAt(0)==="#"&&(I.charAt(1)==="x"?(I=I.slice(2),H=parseInt(I,16),ae=H.toString(16)):(I=I.slice(1),H=parseInt(I,10),ae=H.toString(10))),I=I.replace(/^0+/,""),isNaN(H)||ae.toLowerCase()!==I?(M(L,"Invalid character entity"),"&"+L.entity+";"):String.fromCodePoint(H))}function z(L,I){I==="<"?(L.state=A.OPEN_WAKA,L.startTagPosition=L.position):g(I)||(M(L,"Non-whitespace before first tag."),L.textNode=I,L.state=A.TEXT)}function re(L,I){var $="";return I"?(F(I,"onsgmldeclaration",I.sgmlDecl),I.sgmlDecl="",I.state=A.TEXT):(y(H)&&(I.state=A.SGML_DECL_QUOTED),I.sgmlDecl+=H);continue;case A.SGML_DECL_QUOTED:H===I.q&&(I.state=A.SGML_DECL,I.q=""),I.sgmlDecl+=H;continue;case A.DOCTYPE:H===">"?(I.state=A.TEXT,F(I,"ondoctype",I.doctype),I.doctype=!0):(I.doctype+=H,H==="["?I.state=A.DOCTYPE_DTD:y(H)&&(I.state=A.DOCTYPE_QUOTED,I.q=H));continue;case A.DOCTYPE_QUOTED:I.doctype+=H,H===I.q&&(I.q="",I.state=A.DOCTYPE);continue;case A.DOCTYPE_DTD:H==="]"?(I.doctype+=H,I.state=A.DOCTYPE):H==="<"?(I.state=A.OPEN_WAKA,I.startTagPosition=I.position):y(H)?(I.doctype+=H,I.state=A.DOCTYPE_DTD_QUOTED,I.q=H):I.doctype+=H;continue;case A.DOCTYPE_DTD_QUOTED:I.doctype+=H,H===I.q&&(I.state=A.DOCTYPE_DTD,I.q="");continue;case A.COMMENT:H==="-"?I.state=A.COMMENT_ENDING:I.comment+=H;continue;case A.COMMENT_ENDING:H==="-"?(I.state=A.COMMENT_ENDED,I.comment=P(I.opt,I.comment),I.comment&&F(I,"oncomment",I.comment),I.comment=""):(I.comment+="-"+H,I.state=A.COMMENT);continue;case A.COMMENT_ENDED:H!==">"?(M(I,"Malformed comment"),I.comment+="--"+H,I.state=A.COMMENT):I.doctype&&I.doctype!==!0?I.state=A.DOCTYPE_DTD:I.state=A.TEXT;continue;case A.CDATA:H==="]"?I.state=A.CDATA_ENDING:I.cdata+=H;continue;case A.CDATA_ENDING:H==="]"?I.state=A.CDATA_ENDING_2:(I.cdata+="]"+H,I.state=A.CDATA);continue;case A.CDATA_ENDING_2:H===">"?(I.cdata&&F(I,"oncdata",I.cdata),F(I,"onclosecdata"),I.cdata="",I.state=A.TEXT):H==="]"?I.cdata+="]":(I.cdata+="]]"+H,I.state=A.CDATA);continue;case A.PROC_INST:H==="?"?I.state=A.PROC_INST_ENDING:g(H)?I.state=A.PROC_INST_BODY:I.procInstName+=H;continue;case A.PROC_INST_BODY:if(!I.procInstBody&&g(H))continue;H==="?"?I.state=A.PROC_INST_ENDING:I.procInstBody+=H;continue;case A.PROC_INST_ENDING:H===">"?(F(I,"onprocessinginstruction",{name:I.procInstName,body:I.procInstBody}),I.procInstName=I.procInstBody="",I.state=A.TEXT):(I.procInstBody+="?"+H,I.state=A.PROC_INST_BODY);continue;case A.OPEN_TAG:b(v,H)?I.tagName+=H:(_(I),H===">"?Z(I):H==="/"?I.state=A.OPEN_TAG_SLASH:(g(H)||M(I,"Invalid character in tag name"),I.state=A.ATTRIB));continue;case A.OPEN_TAG_SLASH:H===">"?(Z(I,!0),te(I)):(M(I,"Forward-slash in opening tag not followed by >"),I.state=A.ATTRIB);continue;case A.ATTRIB:if(g(H))continue;H===">"?Z(I):H==="/"?I.state=A.OPEN_TAG_SLASH:b(d,H)?(I.attribName=H,I.attribValue="",I.state=A.ATTRIB_NAME):M(I,"Invalid attribute name");continue;case A.ATTRIB_NAME:H==="="?I.state=A.ATTRIB_VALUE:H===">"?(M(I,"Attribute without value"),I.attribValue=I.attribName,B(I),Z(I)):g(H)?I.state=A.ATTRIB_NAME_SAW_WHITE:b(v,H)?I.attribName+=H:M(I,"Invalid attribute name");continue;case A.ATTRIB_NAME_SAW_WHITE:if(H==="=")I.state=A.ATTRIB_VALUE;else{if(g(H))continue;M(I,"Attribute without value"),I.tag.attributes[I.attribName]="",I.attribValue="",F(I,"onattribute",{name:I.attribName,value:""}),I.attribName="",H===">"?Z(I):b(d,H)?(I.attribName=H,I.state=A.ATTRIB_NAME):(M(I,"Invalid attribute name"),I.state=A.ATTRIB)}continue;case A.ATTRIB_VALUE:if(g(H))continue;y(H)?(I.q=H,I.state=A.ATTRIB_VALUE_QUOTED):(I.opt.unquotedAttributeValues||U(I,"Unquoted attribute value"),I.state=A.ATTRIB_VALUE_UNQUOTED,I.attribValue=H);continue;case A.ATTRIB_VALUE_QUOTED:if(H!==I.q){H==="&"?I.state=A.ATTRIB_VALUE_ENTITY_Q:I.attribValue+=H;continue}B(I),I.q="",I.state=A.ATTRIB_VALUE_CLOSED;continue;case A.ATTRIB_VALUE_CLOSED:g(H)?I.state=A.ATTRIB:H===">"?Z(I):H==="/"?I.state=A.OPEN_TAG_SLASH:b(d,H)?(M(I,"No whitespace between attributes"),I.attribName=H,I.attribValue="",I.state=A.ATTRIB_NAME):M(I,"Invalid attribute name");continue;case A.ATTRIB_VALUE_UNQUOTED:if(!E(H)){H==="&"?I.state=A.ATTRIB_VALUE_ENTITY_U:I.attribValue+=H;continue}B(I),H===">"?Z(I):I.state=A.ATTRIB;continue;case A.CLOSE_TAG:if(I.tagName)H===">"?te(I):b(v,H)?I.tagName+=H:I.script?(I.script+=""?te(I):M(I,"Invalid characters in closing tag");continue;case A.TEXT_ENTITY:case A.ATTRIB_VALUE_ENTITY_Q:case A.ATTRIB_VALUE_ENTITY_U:var me,Ne;switch(I.state){case A.TEXT_ENTITY:me=A.TEXT,Ne="textNode";break;case A.ATTRIB_VALUE_ENTITY_Q:me=A.ATTRIB_VALUE_QUOTED,Ne="attribValue";break;case A.ATTRIB_VALUE_ENTITY_U:me=A.ATTRIB_VALUE_UNQUOTED,Ne="attribValue";break}if(H===";"){var Me=Q(I);I.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(Me)?(I.entity="",I.state=me,I.write(Me)):(I[Ne]+=Me,I.entity="",I.state=me)}else b(I.entity.length?N:x,H)?I.entity+=H:(M(I,"Invalid character in entity name"),I[Ne]+="&"+I.entity+H,I.entity="",I.state=me);continue;default:throw new Error(I,"Unknown state: "+I.state)}return I.position>=I.bufferCheckPosition&&n(I),I}String.fromCodePoint||function(){var L=String.fromCharCode,I=Math.floor,$=function(){var H=16384,ae=[],ce,me,Ne=-1,Me=arguments.length;if(!Me)return"";for(var j="";++Ne1114111||I(X)!==X)throw RangeError("Invalid code point: "+X);X<=65535?ae.push(X):(X-=65536,ce=(X>>10)+55296,me=X%1024+56320,ae.push(ce,me)),(Ne+1===Me||ae.length>H)&&(j+=L.apply(null,ae),ae.length=0)}return j};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:$,configurable:!0,writable:!0}):String.fromCodePoint=$}()})(typeof Df>"u"?Df.sax={}:Df)});var Sf=Be((nze,r8)=>{r8.exports={isArray:function(e){return Array.isArray?Array.isArray(e):Object.prototype.toString.call(e)==="[object Array]"}}});var Cf=Be((aze,n8)=>{var EZ=Sf().isArray;n8.exports={copyOptions:function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r},ensureFlagExists:function(e,t){(!(e in t)||typeof t[e]!="boolean")&&(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||typeof e.spaces!="number"&&typeof e.spaces!="string")&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){(!("alwaysArray"in e)||typeof e.alwaysArray!="boolean"&&!EZ(e.alwaysArray))&&(e.alwaysArray=!1)},ensureKeyExists:function(e,t){(!(e+"Key"in t)||typeof t[e+"Key"]!="string")&&(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}}});var G1=Be((ize,p8)=>{var AZ=t8(),NZ={on:function(){},parse:function(){}},ct=Cf(),Ko=Sf().isArray,de,z1=!0,st;function TZ(e){return de=ct.copyOptions(e),ct.ensureFlagExists("ignoreDeclaration",de),ct.ensureFlagExists("ignoreInstruction",de),ct.ensureFlagExists("ignoreAttributes",de),ct.ensureFlagExists("ignoreText",de),ct.ensureFlagExists("ignoreComment",de),ct.ensureFlagExists("ignoreCdata",de),ct.ensureFlagExists("ignoreDoctype",de),ct.ensureFlagExists("compact",de),ct.ensureFlagExists("alwaysChildren",de),ct.ensureFlagExists("addParent",de),ct.ensureFlagExists("trim",de),ct.ensureFlagExists("nativeType",de),ct.ensureFlagExists("nativeTypeAttributes",de),ct.ensureFlagExists("sanitize",de),ct.ensureFlagExists("instructionHasAttributes",de),ct.ensureFlagExists("captureSpacesBetweenElements",de),ct.ensureAlwaysArrayExists(de),ct.ensureKeyExists("declaration",de),ct.ensureKeyExists("instruction",de),ct.ensureKeyExists("attributes",de),ct.ensureKeyExists("text",de),ct.ensureKeyExists("comment",de),ct.ensureKeyExists("cdata",de),ct.ensureKeyExists("doctype",de),ct.ensureKeyExists("type",de),ct.ensureKeyExists("name",de),ct.ensureKeyExists("elements",de),ct.ensureKeyExists("parent",de),ct.checkFnExists("doctype",de),ct.checkFnExists("instruction",de),ct.checkFnExists("cdata",de),ct.checkFnExists("comment",de),ct.checkFnExists("text",de),ct.checkFnExists("instructionName",de),ct.checkFnExists("elementName",de),ct.checkFnExists("attributeName",de),ct.checkFnExists("attributeValue",de),ct.checkFnExists("attributes",de),de}function c8(e){var t=Number(e);if(!isNaN(t))return t;var r=e.toLowerCase();return r==="true"?!0:r==="false"?!1:e}function zu(e,t){var r;if(de.compact){if(!st[de[e+"Key"]]&&(Ko(de.alwaysArray)?de.alwaysArray.indexOf(de[e+"Key"])!==-1:de.alwaysArray)&&(st[de[e+"Key"]]=[]),st[de[e+"Key"]]&&!Ko(st[de[e+"Key"]])&&(st[de[e+"Key"]]=[st[de[e+"Key"]]]),e+"Fn"in de&&typeof t=="string"&&(t=de[e+"Fn"](t,st)),e==="instruction"&&("instructionFn"in de||"instructionNameFn"in de)){for(r in t)if(t.hasOwnProperty(r))if("instructionFn"in de)t[r]=de.instructionFn(t[r],r,st);else{var n=t[r];delete t[r],t[de.instructionNameFn(r,n,st)]=n}}Ko(st[de[e+"Key"]])?st[de[e+"Key"]].push(t):st[de[e+"Key"]]=t}else{st[de.elementsKey]||(st[de.elementsKey]=[]);var a={};if(a[de.typeKey]=e,e==="instruction"){for(r in t)if(t.hasOwnProperty(r))break;a[de.nameKey]="instructionNameFn"in de?de.instructionNameFn(r,t,st):r,de.instructionHasAttributes?(a[de.attributesKey]=t[r][de.attributesKey],"instructionFn"in de&&(a[de.attributesKey]=de.instructionFn(a[de.attributesKey],r,st))):("instructionFn"in de&&(t[r]=de.instructionFn(t[r],r,st)),a[de.instructionKey]=t[r])}else e+"Fn"in de&&(t=de[e+"Fn"](t,st)),a[de[e+"Key"]]=t;de.addParent&&(a[de.parentKey]=st),st[de.elementsKey].push(a)}}function l8(e){if("attributesFn"in de&&e&&(e=de.attributesFn(e,st)),(de.trim||"attributeValueFn"in de||"attributeNameFn"in de||de.nativeTypeAttributes)&&e){var t;for(t in e)if(e.hasOwnProperty(t)&&(de.trim&&(e[t]=e[t].trim()),de.nativeTypeAttributes&&(e[t]=c8(e[t])),"attributeValueFn"in de&&(e[t]=de.attributeValueFn(e[t],t,st)),"attributeNameFn"in de)){var r=e[t];delete e[t],e[de.attributeNameFn(t,e[t],st)]=r}}return e}function wZ(e){var t={};if(e.body&&(e.name.toLowerCase()==="xml"||de.instructionHasAttributes)){for(var r=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,n;(n=r.exec(e.body))!==null;)t[n[1]]=n[2]||n[3]||n[4];t=l8(t)}if(e.name.toLowerCase()==="xml"){if(de.ignoreDeclaration)return;st[de.declarationKey]={},Object.keys(t).length&&(st[de.declarationKey][de.attributesKey]=t),de.addParent&&(st[de.declarationKey][de.parentKey]=st)}else{if(de.ignoreInstruction)return;de.trim&&(e.body=e.body.trim());var a={};de.instructionHasAttributes&&Object.keys(t).length?(a[e.name]={},a[e.name][de.attributesKey]=t):a[e.name]=e.body,zu("instruction",a)}}function a8(e,t){var r;if(typeof e=="object"&&(t=e.attributes,e=e.name),t=l8(t),"elementNameFn"in de&&(e=de.elementNameFn(e,st)),de.compact){if(r={},!de.ignoreAttributes&&t&&Object.keys(t).length){r[de.attributesKey]={};var n;for(n in t)t.hasOwnProperty(n)&&(r[de.attributesKey][n]=t[n])}!(e in st)&&(Ko(de.alwaysArray)?de.alwaysArray.indexOf(e)!==-1:de.alwaysArray)&&(st[e]=[]),st[e]&&!Ko(st[e])&&(st[e]=[st[e]]),Ko(st[e])?st[e].push(r):st[e]=r}else st[de.elementsKey]||(st[de.elementsKey]=[]),r={},r[de.typeKey]="element",r[de.nameKey]=e,!de.ignoreAttributes&&t&&Object.keys(t).length&&(r[de.attributesKey]=t),de.alwaysChildren&&(r[de.elementsKey]=[]),st[de.elementsKey].push(r);r[de.parentKey]=st,st=r}function i8(e){de.ignoreText||!e.trim()&&!de.captureSpacesBetweenElements||(de.trim&&(e=e.trim()),de.nativeType&&(e=c8(e)),de.sanitize&&(e=e.replace(/&/g,"&").replace(//g,">")),zu("text",e))}function o8(e){de.ignoreComment||(de.trim&&(e=e.trim()),zu("comment",e))}function s8(e){var t=st[de.parentKey];de.addParent||delete st[de.parentKey],st=t}function DZ(e){de.ignoreCdata||(de.trim&&(e=e.trim()),zu("cdata",e))}function SZ(e){de.ignoreDoctype||(e=e.replace(/^ /,""),de.trim&&(e=e.trim()),zu("doctype",e))}function u8(e){e.note=e}p8.exports=function(e,t){var r=z1?AZ.parser(!0,{}):r=new NZ.Parser("UTF-8"),n={};if(st=n,de=TZ(t),z1?(r.opt={strictEntities:!0},r.onopentag=a8,r.ontext=i8,r.oncomment=o8,r.onclosetag=s8,r.onerror=u8,r.oncdata=DZ,r.ondoctype=SZ,r.onprocessinginstruction=wZ):(r.on("startElement",a8),r.on("text",i8),r.on("comment",o8),r.on("endElement",s8),r.on("error",u8)),z1)r.write(e).close();else if(!r.parse(e))throw new Error("XML parsing error: "+r.getError());if(n[de.elementsKey]){var a=n[de.elementsKey];delete n[de.elementsKey],n[de.elementsKey]=a,delete n.text}return n}});var d8=Be((oze,m8)=>{var f8=Cf(),CZ=G1();function _Z(e){var t=f8.copyOptions(e);return f8.ensureSpacesExists(t),t}m8.exports=function(e,t){var r,n,a,i;return r=_Z(t),n=CZ(e,r),i="compact"in r&&r.compact?"_parent":"parent","addParent"in r&&r.addParent?a=JSON.stringify(n,function(o,l){return o===i?"_":l},r.spaces):a=JSON.stringify(n,null,r.spaces),a.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}});var j1=Be((sze,N8)=>{var ft=Cf(),MZ=Sf().isArray,Ar,Nr;function OZ(e){var t=ft.copyOptions(e);return ft.ensureFlagExists("ignoreDeclaration",t),ft.ensureFlagExists("ignoreInstruction",t),ft.ensureFlagExists("ignoreAttributes",t),ft.ensureFlagExists("ignoreText",t),ft.ensureFlagExists("ignoreComment",t),ft.ensureFlagExists("ignoreCdata",t),ft.ensureFlagExists("ignoreDoctype",t),ft.ensureFlagExists("compact",t),ft.ensureFlagExists("indentText",t),ft.ensureFlagExists("indentCdata",t),ft.ensureFlagExists("indentAttributes",t),ft.ensureFlagExists("indentInstruction",t),ft.ensureFlagExists("fullTagEmptyElement",t),ft.ensureFlagExists("noQuotesForNativeAttributes",t),ft.ensureSpacesExists(t),typeof t.spaces=="number"&&(t.spaces=Array(t.spaces+1).join(" ")),ft.ensureKeyExists("declaration",t),ft.ensureKeyExists("instruction",t),ft.ensureKeyExists("attributes",t),ft.ensureKeyExists("text",t),ft.ensureKeyExists("comment",t),ft.ensureKeyExists("cdata",t),ft.ensureKeyExists("doctype",t),ft.ensureKeyExists("type",t),ft.ensureKeyExists("name",t),ft.ensureKeyExists("elements",t),ft.checkFnExists("doctype",t),ft.checkFnExists("instruction",t),ft.checkFnExists("cdata",t),ft.checkFnExists("comment",t),ft.checkFnExists("text",t),ft.checkFnExists("instructionName",t),ft.checkFnExists("elementName",t),ft.checkFnExists("attributeName",t),ft.checkFnExists("attributeValue",t),ft.checkFnExists("attributes",t),ft.checkFnExists("fullTagEmptyElement",t),t}function Wn(e,t,r){return(!r&&e.spaces?` -`:"")+Array(t+1).join(e.spaces)}function _f(e,t,r){if(t.ignoreAttributes)return"";"attributesFn"in t&&(e=t.attributesFn(e,Nr,Ar));var n,a,i,o,l=[];for(n in e)e.hasOwnProperty(n)&&e[n]!==null&&e[n]!==void 0&&(o=t.noQuotesForNativeAttributes&&typeof e[n]!="string"?"":'"',a=""+e[n],a=a.replace(/"/g,"""),i="attributeNameFn"in t?t.attributeNameFn(n,a,Nr,Ar):n,l.push(t.spaces&&t.indentAttributes?Wn(t,r+1,!1):" "),l.push(i+"="+o+("attributeValueFn"in t?t.attributeValueFn(a,n,Nr,Ar):a)+o));return e&&Object.keys(e).length&&t.spaces&&t.indentAttributes&&l.push(Wn(t,r,!1)),l.join("")}function h8(e,t,r){return Ar=e,Nr="xml",t.ignoreDeclaration?"":""}function v8(e,t,r){if(t.ignoreInstruction)return"";var n;for(n in e)if(e.hasOwnProperty(n))break;var a="instructionNameFn"in t?t.instructionNameFn(n,e[n],Nr,Ar):n;if(typeof e[n]=="object")return Ar=e,Nr=a,"";var i=e[n]?e[n]:"";return"instructionFn"in t&&(i=t.instructionFn(i,n,Nr,Ar)),""}function g8(e,t){return t.ignoreComment?"":""}function x8(e,t){return t.ignoreCdata?"":"","]]]]>"))+"]]>"}function b8(e,t){return t.ignoreDoctype?"":""}function Y1(e,t){return t.ignoreText?"":(e=""+e,e=e.replace(/&/g,"&"),e=e.replace(/&/g,"&").replace(//g,">"),"textFn"in t?t.textFn(e,Nr,Ar):e)}function RZ(e,t){var r;if(e.elements&&e.elements.length)for(r=0;r"),e[t.elementsKey]&&e[t.elementsKey].length&&(n.push(y8(e[t.elementsKey],t,r+1)),Ar=e,Nr=e.name),n.push(t.spaces&&RZ(e,t)?` -`+Array(r+1).join(t.spaces):""),n.push("")):n.push("/>"),n.join("")}function y8(e,t,r,n){return e.reduce(function(a,i){var o=Wn(t,r,n&&!a);switch(i.type){case"element":return a+o+FZ(i,t,r);case"comment":return a+o+g8(i[t.commentKey],t);case"doctype":return a+o+b8(i[t.doctypeKey],t);case"cdata":return a+(t.indentCdata?o:"")+x8(i[t.cdataKey],t);case"text":return a+(t.indentText?o:"")+Y1(i[t.textKey],t);case"instruction":var l={};return l[i[t.nameKey]]=i[t.attributesKey]?i:i[t.instructionKey],a+(t.indentInstruction?o:"")+v8(l,t,r)}},"")}function E8(e,t,r){var n;for(n in e)if(e.hasOwnProperty(n))switch(n){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||r)return!0;break;case t.cdataKey:if(t.indentCdata||r)return!0;break;case t.instructionKey:if(t.indentInstruction||r)return!0;break;case t.doctypeKey:case t.commentKey:return!0;default:return!0}return!1}function IZ(e,t,r,n,a){Ar=e,Nr=t;var i="elementNameFn"in r?r.elementNameFn(t,e):t;if(typeof e>"u"||e===null||e==="")return"fullTagEmptyElementFn"in r&&r.fullTagEmptyElementFn(t,e)||r.fullTagEmptyElement?"<"+i+">":"<"+i+"/>";var o=[];if(t){if(o.push("<"+i),typeof e!="object")return o.push(">"+Y1(e,r)+""),o.join("");e[r.attributesKey]&&o.push(_f(e[r.attributesKey],r,n));var l=E8(e,r,!0)||e[r.attributesKey]&&e[r.attributesKey]["xml:space"]==="preserve";if(l||("fullTagEmptyElementFn"in r?l=r.fullTagEmptyElementFn(t,e):l=r.fullTagEmptyElement),l)o.push(">");else return o.push("/>"),o.join("")}return o.push(A8(e,r,n+1,!1)),Ar=e,Nr=t,t&&o.push((a?Wn(r,n,!1):"")+""),o.join("")}function A8(e,t,r,n){var a,i,o,l=[];for(i in e)if(e.hasOwnProperty(i))for(o=MZ(e[i])?e[i]:[e[i]],a=0;a{var BZ=j1();T8.exports=function(e,t){e instanceof Buffer&&(e=e.toString());var r=null;if(typeof e=="string")try{r=JSON.parse(e)}catch{throw new Error("The JSON structure is invalid")}else r=e;return BZ(r,t)}});var V1=Be((cze,D8)=>{var LZ=G1(),PZ=d8(),UZ=j1(),kZ=w8();D8.exports={xml2js:LZ,xml2json:PZ,js2xml:UZ,json2xml:kZ}});var $1=Be(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.generator=void 0;Mf.generator="https://github.com/jpmonette/feed"});var X1=Be(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.sanitize=void 0;function qZ(e){if(!(typeof e>"u"))return e.replace(/&/g,"&")}Of.sanitize=qZ});var S8=Be(K1=>{"use strict";Object.defineProperty(K1,"__esModule",{value:!0});var HZ=V1(),zZ=$1(),Ka=X1();K1.default=function(e){var t=e.options,r={_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},feed:{_attributes:{xmlns:"http://www.w3.org/2005/Atom"},id:t.id,title:t.title,updated:t.updated?t.updated.toISOString():new Date().toISOString(),generator:Ka.sanitize(t.generator||zZ.generator)}};t.author&&(r.feed.author=Rf(t.author)),r.feed.link=[],t.link&&r.feed.link.push({_attributes:{rel:"alternate",href:Ka.sanitize(t.link)}});var n=Ka.sanitize(t.feed||t.feedLinks&&t.feedLinks.atom);return n&&r.feed.link.push({_attributes:{rel:"self",href:Ka.sanitize(n)}}),t.hub&&r.feed.link.push({_attributes:{rel:"hub",href:Ka.sanitize(t.hub)}}),t.description&&(r.feed.subtitle=t.description),t.image&&(r.feed.logo=t.image),t.favicon&&(r.feed.icon=t.favicon),t.copyright&&(r.feed.rights=t.copyright),r.feed.category=[],e.categories.map(function(a){r.feed.category.push({_attributes:{term:a}})}),r.feed.contributor=[],e.contributors.map(function(a){r.feed.contributor.push(Rf(a))}),r.feed.entry=[],e.items.map(function(a){var i={title:{_attributes:{type:"html"},_cdata:a.title},id:Ka.sanitize(a.id||a.link),link:[{_attributes:{href:Ka.sanitize(a.link)}}],updated:a.date.toISOString()};a.description&&(i.summary={_attributes:{type:"html"},_cdata:a.description}),a.content&&(i.content={_attributes:{type:"html"},_cdata:a.content}),Array.isArray(a.author)&&(i.author=[],a.author.map(function(o){i.author.push(Rf(o))})),Array.isArray(a.category)&&(i.category=[],a.category.map(function(o){i.category.push(GZ(o))})),a.contributor&&Array.isArray(a.contributor)&&(i.contributor=[],a.contributor.map(function(o){i.contributor.push(Rf(o))})),a.published&&(i.published=a.published.toISOString()),a.copyright&&(i.rights=a.copyright),r.feed.entry.push(i)}),HZ.js2xml(r,{compact:!0,ignoreComment:!0,spaces:4})};var Rf=function(e){var t=e.name,r=e.email,n=e.link,a={name:t};return r&&(a.email=r),n&&(a.uri=Ka.sanitize(n)),a},GZ=function(e){var t=e.name,r=e.scheme,n=e.term;return{_attributes:{label:t,scheme:r,term:n}}}});var C8=Be(W1=>{"use strict";Object.defineProperty(W1,"__esModule",{value:!0});W1.default=function(e){var t=e.options,r=e.items,n=e.extensions,a={version:"https://jsonfeed.org/version/1",title:t.title};return t.link&&(a.home_page_url=t.link),t.feedLinks&&t.feedLinks.json&&(a.feed_url=t.feedLinks.json),t.description&&(a.description=t.description),t.image&&(a.icon=t.image),t.author&&(a.author={},t.author.name&&(a.author.name=t.author.name),t.author.link&&(a.author.url=t.author.link)),n.map(function(i){a[i.name]=i.objects}),a.items=r.map(function(i){var o={id:i.id,content_html:i.content};if(i.link&&(o.url=i.link),i.title&&(o.title=i.title),i.description&&(o.summary=i.description),i.image&&(o.image=i.image),i.date&&(o.date_modified=i.date.toISOString()),i.published&&(o.date_published=i.published.toISOString()),i.author){var l=i.author;l instanceof Array&&(l=l[0]),o.author={},l.name&&(o.author.name=l.name),l.link&&(o.author.url=l.link)}return Array.isArray(i.category)&&(o.tags=[],i.category.map(function(u){u.name&&o.tags.push(u.name)})),i.extensions&&i.extensions.map(function(u){o[u.name]=u.objects}),o}),JSON.stringify(a,null,4)}});var _8=Be(Gu=>{"use strict";var Q1=Gu&&Gu.__assign||function(){return Q1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.Feed=void 0;var $Z=S8(),XZ=C8(),KZ=_8(),WZ=function(){function e(t){var r=this;this.items=[],this.categories=[],this.contributors=[],this.extensions=[],this.addItem=function(n){return r.items.push(n)},this.addCategory=function(n){return r.categories.push(n)},this.addContributor=function(n){return r.contributors.push(n)},this.addExtension=function(n){return r.extensions.push(n)},this.atom1=function(){return $Z.default(r)},this.rss2=function(){return KZ.default(r)},this.json1=function(){return XZ.default(r)},this.options=t}return e}();If.Feed=WZ});var ZZ={};on(ZZ,{Manager:()=>Yu,default:()=>QZ,makeInstance:()=>F8});module.exports=hB(ZZ);var En=Le(require("node:process"),1);var Xu={};on(Xu,{AllMismatchInterrupted:()=>Mi,headers:()=>Vr,request:()=>Tr,response:()=>Ct});var Tr=class{method;url;originURL;headers;body;query;params;custom;ip;constructor(t,r,n,a,i,o="0.0.0.0"){this.method=t,this.url=r,this.headers=n,this.body=a,this.query=new URLSearchParams(r.search),this.params=i,this.ip=n.get("X-REAL-IP")??n.get("X-Forwarded-For")?.split(" ")[0]??o}extends(t){return this.custom=t,this}};var _i=([e,...t])=>e?.toUpperCase()+t.map(r=>r.toLowerCase()).join(""),Wa=(()=>{if(typeof process<"u")return"Node.js";if(typeof Deno<"u")return"Deno";if(typeof Bun<"u")return"Bun";if(typeof tjs<"u")return"txiki.js";if(typeof self<"u")return"Service Worker"})(),J1=(()=>{switch(Wa){case"Node.js":return process.version;case"Bun":return process.version;case"Deno":return Deno.version.deno;case"txiki.js":return tjs.versions.tjs;case"Service Worker":return;default:return}})();var Vr=class{headers={};constructor(t){this.headers={},Object.keys(t).forEach(r=>{this.headers[_i(r)]=t[r]})}delete(t){delete this.headers[_i(t)]}get(t){return this.headers[_i(t)]}has(t){return this.headers.hasOwnProperty(_i(t))}set(t,r){this.headers[_i(t)]=r}toObject(){return this.headers}forEach(t){Object.keys(this.headers).forEach(r=>{t(r,this.headers[r])})}},ey=Vr;var ty={name:"handlers.js",description:"Handlers.js is a unified and lightweight web application framework for multiple platforms.",version:"0.1.2-1",main:"./dist/index.js",types:"./dist/index.d.ts",exports:{".":{import:"./dist/index.js",require:"./dist/index.node.js",types:"./dist/index.d.ts",default:"./dist/index.js"}},files:["dist","LICENSE"],author:"186526 ",license:"MIT",repository:{type:"git",url:"https://github.com/186526/handlers.js"},keywords:["web framework","lightweight","cross-platform","unified"],dependencies:{"path-to-regexp":"6"},devDependencies:{"@cloudflare/workers-types":"^3.13.0","@eslint/js":"^9.8.0","@types/jest":"^28.1.4","@types/node":"^18.0.0","@webpack-cli/generators":"^2.5.0",axios:"^0.27.2",bluebird:"^3.7.2","bun-types":"^0.1.4",eslint:"9.x",globals:"^15.8.0",jest:"^29.7.0",prettier:"^2.7.1","ts-jest":"^29.2.4","ts-loader":"^9.3.1","ts-node":"^10.8.1","tsc-alias":"^1.8.10",typescript:"^4.7.4","typescript-eslint":"^8.0.0",webpack:"^5.73.0","webpack-cli":"^4.10.0"},sideEffects:!1,scripts:{build:"yarn clean && yarn build:node && yarn build:serviceworker && yarn build:cfworker && yarn build:deno && yarn build:txiki && yarn build:bun","build:node":"BUILD_TARGET=node webpack","build:serviceworker":"BUILD_TARGET=serviceworker webpack","build:cfworker":"BUILD_TARGET=cfworker webpack","build:deno":"BUILD_TARGET=deno webpack","build:txiki":"BUILD_TARGET=txiki webpack","build:bun":"BUILD_TARGET=bun webpack",watch:"webpack --watch",clean:"rm -rf ./dist",demo:"env NODE_ENV=development yarn build:node && node ./dist/main.node.js",tsc:"tsc && tsc-alias",lint:"eslint --fix **/*.ts","test:node":"NODE_OPTIONS=--experimental-vm-modules jest ./test/node.test.ts","test:deno":"BUILD_TARGET=deno:test webpack && jest ./test/deno.test.ts",coverage:"ODE_OPTIONS=--experimental-vm-modules jest --collectCoverage --",prepublish:"env NODE_ENV=production yarn build && yarn tsc",format:'prettier --write "**/*.{ts,json,md}" '},engines:{node:">=18.0.0"},type:"module",packageManager:"yarn@1.22.22"};var Jo=class extends ey{constructor(t={}){super(t),this.has("Content-Type")||this.set("Content-Type","text/plain; charset=utf-8"),this.set("Server",`Handlers.js/${ty.version} ${Wa}/${J1}`)}},Ct=class{status;headers;body;custom;constructor(t,r=200,n=new Jo){this.status=r,this.headers=n,this.body=t}extends(t){return this.custom=t,this}};var Mi=new Error("AllMismatchInterrupted");var lr=class{responders;method;constructor(t,r){this.responders=r,this.method=t}add(t){this.responders.push(t)}async respond(t,r=new Ct("")){switch(this.responders.length){case 0:Promise.reject("No responders found in this handler.");break;case 1:return this.responders[0](t,r);default:for(let n of this.responders){let a=await n(t,r);a instanceof Ct&&(r=a)}return r}}},Lf=lr;var oy=Le(iy(),1),qf=class{paths;handlers;regExps=[];constructor(t,r){this.paths=t,this.handlers=r,this.paths.forEach(n=>{let a=[];this.regExps.push({regExp:(0,oy.pathToRegexp)(n,a),keys:a})})}async exec(t){let r=await Promise.all(this.regExps.map(async n=>{let a=n.regExp.exec(t);if(a===null)return{matched:!1,attributes:[]};let i=[];return n.keys.forEach((o,l)=>{i.push({name:o.name,value:a[l+1]})}),{matched:!0,attributes:i}}));return r=r.filter(n=>n.matched),r.length===0?{matched:!1,attributes:[]}:r[0]}},sy=qf;var es;(function(e){e.CONNECT="CONNECT",e.DELETE="DELETE",e.GET="GET",e.HEAD="HEAD",e.OPTIONS="OPTIONS",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.TRACE="TRACE",e.ANY="ANY"})(es||(es={}));function uy(e,t){return new e(t)}var cy=Le(require("http"),1),Ku=class{router;server;constructor(t,r){this.router=t,r?this.server=r:this.server=cy.default.createServer()}async listen(t){this.server.on("request",async(r,n)=>{let a=await this.handleRequest(r),i=await this.router.respond(a);this.handleResponse(i,n)}),this.server.listen(t)}close(){this.server.close()}async handleRequest(t){if(typeof t.method!="string"||typeof t.url!="string"||typeof t.headers!="object")throw new Error("Invalid request");let r="",n=t.socket.remoteAddress?.replace("::ffff:","")??"0.0.0.0",a=new Vr(t.headers);return["GET","HEAD","DELETE","OPTIONS"].includes(t.method)||(t.on("data",i=>{r+=i}),await new Promise(i=>t.on("end",()=>{i(!0)}))),new Tr(t.method,new URL(t.url,`http://${a.get("host")??"localhost"}`),a,r,{},n)}handleResponse(t,r){r.statusCode=t.status,t.headers.forEach((n,a)=>{r.setHeader(n,a)}),r.end(t.body)}};var Ri=class{router;eventHandler=t=>{t.respondWith(this.handler(t))};constructor(t){this.router=t}async listen(t){self.addEventListener("fetch",this.eventHandler)}close(){self.removeEventListener("fetch",this.eventHandler)}async handleRequest(t){let r=new Vr(Object.fromEntries(t.headers.entries()));return new Tr(t.method,new URL(t.url),r,await t.text(),{},r.get("CF-Connecting-IP")||"")}async handleResponse(t){return t.status===204&&(t.body=null),new Response(t.body,{status:t.status,headers:t.headers.headers})}async handler(t){return await this.handleResponse(await this.handleRequest(t.request).then(r=>this.router.respond(r)))}};var ly={localAddr:{transport:"tcp",hostname:"0.0.0.0",port:80},remoteAddr:{transport:"tcp",hostname:"0.0.0.0",port:80},rid:0,closeWrite:async()=>{},readable:"",writable:"",read:async e=>null,write:async e=>0,close:()=>{}},Wu=class extends Ri{server;async listen(t){this.server=Deno.listen({port:t});for await(let r of this.server){let n=Deno.serveHttp(r);for await(let a of n)a.respondWith(this.handler(a,r))}}close(){this.server.close()}async handleRequest(t,r=ly){let n=new Vr(Object.fromEntries(t.headers.entries()));return new Tr(t.method,new URL(t.url),n,await t.text(),{},`${r.remoteAddr.hostname??"0.0.0.0"}:${r.remoteAddr.port??"0"}`)}async handler(t,r=ly){return await this.handleResponse(await this.handleRequest(t.request,r).then(n=>this.router.respond(n)))}};var py={"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Checkpoint","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"Switch Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Time-out","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Request Entity Too Large","414":"Request-URI Too Long","415":"Unsupported Media Type","416":"Requested Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Unprocessable Entity","422":"Misdirected Request","423":"Locked","424":"Failed Dependency","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fileds Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"};var Hf=class{closed=!1;conn;reader;constructor(t){this.conn=t,this.reader=this.reader??this.conn.readable.getReader()}readMessage(t){let r=t.split(` +`?(I.line++,I.column=0):I.column++);I.textNode+=L.substring(ae,$-1)}H==="<"&&!(I.sawRoot&&I.closedRoot&&!I.strict)?(I.state=A.OPEN_WAKA,I.startTagPosition=I.position):(!g(H)&&(!I.sawRoot||I.closedRoot)&&M(I,"Text data outside of root node."),H==="&"?I.state=A.TEXT_ENTITY:I.textNode+=H);continue;case A.SCRIPT:H==="<"?I.state=A.SCRIPT_ENDING:I.script+=H;continue;case A.SCRIPT_ENDING:H==="/"?I.state=A.CLOSE_TAG:(I.script+="<"+H,I.state=A.SCRIPT);continue;case A.OPEN_WAKA:if(H==="!")I.state=A.SGML_DECL,I.sgmlDecl="";else if(!g(H))if(b(d,H))I.state=A.OPEN_TAG,I.tagName=H;else if(H==="/")I.state=A.CLOSE_TAG,I.tagName="";else if(H==="?")I.state=A.PROC_INST,I.procInstName=I.procInstBody="";else{if(M(I,"Unencoded <"),I.startTagPosition+1"?(F(I,"onsgmldeclaration",I.sgmlDecl),I.sgmlDecl="",I.state=A.TEXT):(y(H)&&(I.state=A.SGML_DECL_QUOTED),I.sgmlDecl+=H);continue;case A.SGML_DECL_QUOTED:H===I.q&&(I.state=A.SGML_DECL,I.q=""),I.sgmlDecl+=H;continue;case A.DOCTYPE:H===">"?(I.state=A.TEXT,F(I,"ondoctype",I.doctype),I.doctype=!0):(I.doctype+=H,H==="["?I.state=A.DOCTYPE_DTD:y(H)&&(I.state=A.DOCTYPE_QUOTED,I.q=H));continue;case A.DOCTYPE_QUOTED:I.doctype+=H,H===I.q&&(I.q="",I.state=A.DOCTYPE);continue;case A.DOCTYPE_DTD:H==="]"?(I.doctype+=H,I.state=A.DOCTYPE):H==="<"?(I.state=A.OPEN_WAKA,I.startTagPosition=I.position):y(H)?(I.doctype+=H,I.state=A.DOCTYPE_DTD_QUOTED,I.q=H):I.doctype+=H;continue;case A.DOCTYPE_DTD_QUOTED:I.doctype+=H,H===I.q&&(I.state=A.DOCTYPE_DTD,I.q="");continue;case A.COMMENT:H==="-"?I.state=A.COMMENT_ENDING:I.comment+=H;continue;case A.COMMENT_ENDING:H==="-"?(I.state=A.COMMENT_ENDED,I.comment=P(I.opt,I.comment),I.comment&&F(I,"oncomment",I.comment),I.comment=""):(I.comment+="-"+H,I.state=A.COMMENT);continue;case A.COMMENT_ENDED:H!==">"?(M(I,"Malformed comment"),I.comment+="--"+H,I.state=A.COMMENT):I.doctype&&I.doctype!==!0?I.state=A.DOCTYPE_DTD:I.state=A.TEXT;continue;case A.CDATA:H==="]"?I.state=A.CDATA_ENDING:I.cdata+=H;continue;case A.CDATA_ENDING:H==="]"?I.state=A.CDATA_ENDING_2:(I.cdata+="]"+H,I.state=A.CDATA);continue;case A.CDATA_ENDING_2:H===">"?(I.cdata&&F(I,"oncdata",I.cdata),F(I,"onclosecdata"),I.cdata="",I.state=A.TEXT):H==="]"?I.cdata+="]":(I.cdata+="]]"+H,I.state=A.CDATA);continue;case A.PROC_INST:H==="?"?I.state=A.PROC_INST_ENDING:g(H)?I.state=A.PROC_INST_BODY:I.procInstName+=H;continue;case A.PROC_INST_BODY:if(!I.procInstBody&&g(H))continue;H==="?"?I.state=A.PROC_INST_ENDING:I.procInstBody+=H;continue;case A.PROC_INST_ENDING:H===">"?(F(I,"onprocessinginstruction",{name:I.procInstName,body:I.procInstBody}),I.procInstName=I.procInstBody="",I.state=A.TEXT):(I.procInstBody+="?"+H,I.state=A.PROC_INST_BODY);continue;case A.OPEN_TAG:b(v,H)?I.tagName+=H:(_(I),H===">"?Z(I):H==="/"?I.state=A.OPEN_TAG_SLASH:(g(H)||M(I,"Invalid character in tag name"),I.state=A.ATTRIB));continue;case A.OPEN_TAG_SLASH:H===">"?(Z(I,!0),te(I)):(M(I,"Forward-slash in opening tag not followed by >"),I.state=A.ATTRIB);continue;case A.ATTRIB:if(g(H))continue;H===">"?Z(I):H==="/"?I.state=A.OPEN_TAG_SLASH:b(d,H)?(I.attribName=H,I.attribValue="",I.state=A.ATTRIB_NAME):M(I,"Invalid attribute name");continue;case A.ATTRIB_NAME:H==="="?I.state=A.ATTRIB_VALUE:H===">"?(M(I,"Attribute without value"),I.attribValue=I.attribName,B(I),Z(I)):g(H)?I.state=A.ATTRIB_NAME_SAW_WHITE:b(v,H)?I.attribName+=H:M(I,"Invalid attribute name");continue;case A.ATTRIB_NAME_SAW_WHITE:if(H==="=")I.state=A.ATTRIB_VALUE;else{if(g(H))continue;M(I,"Attribute without value"),I.tag.attributes[I.attribName]="",I.attribValue="",F(I,"onattribute",{name:I.attribName,value:""}),I.attribName="",H===">"?Z(I):b(d,H)?(I.attribName=H,I.state=A.ATTRIB_NAME):(M(I,"Invalid attribute name"),I.state=A.ATTRIB)}continue;case A.ATTRIB_VALUE:if(g(H))continue;y(H)?(I.q=H,I.state=A.ATTRIB_VALUE_QUOTED):(I.opt.unquotedAttributeValues||U(I,"Unquoted attribute value"),I.state=A.ATTRIB_VALUE_UNQUOTED,I.attribValue=H);continue;case A.ATTRIB_VALUE_QUOTED:if(H!==I.q){H==="&"?I.state=A.ATTRIB_VALUE_ENTITY_Q:I.attribValue+=H;continue}B(I),I.q="",I.state=A.ATTRIB_VALUE_CLOSED;continue;case A.ATTRIB_VALUE_CLOSED:g(H)?I.state=A.ATTRIB:H===">"?Z(I):H==="/"?I.state=A.OPEN_TAG_SLASH:b(d,H)?(M(I,"No whitespace between attributes"),I.attribName=H,I.attribValue="",I.state=A.ATTRIB_NAME):M(I,"Invalid attribute name");continue;case A.ATTRIB_VALUE_UNQUOTED:if(!E(H)){H==="&"?I.state=A.ATTRIB_VALUE_ENTITY_U:I.attribValue+=H;continue}B(I),H===">"?Z(I):I.state=A.ATTRIB;continue;case A.CLOSE_TAG:if(I.tagName)H===">"?te(I):b(v,H)?I.tagName+=H:I.script?(I.script+=""?te(I):M(I,"Invalid characters in closing tag");continue;case A.TEXT_ENTITY:case A.ATTRIB_VALUE_ENTITY_Q:case A.ATTRIB_VALUE_ENTITY_U:var me,Ne;switch(I.state){case A.TEXT_ENTITY:me=A.TEXT,Ne="textNode";break;case A.ATTRIB_VALUE_ENTITY_Q:me=A.ATTRIB_VALUE_QUOTED,Ne="attribValue";break;case A.ATTRIB_VALUE_ENTITY_U:me=A.ATTRIB_VALUE_UNQUOTED,Ne="attribValue";break}if(H===";"){var Me=Q(I);I.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(Me)?(I.entity="",I.state=me,I.write(Me)):(I[Ne]+=Me,I.entity="",I.state=me)}else b(I.entity.length?N:x,H)?I.entity+=H:(M(I,"Invalid character in entity name"),I[Ne]+="&"+I.entity+H,I.entity="",I.state=me);continue;default:throw new Error(I,"Unknown state: "+I.state)}return I.position>=I.bufferCheckPosition&&n(I),I}String.fromCodePoint||function(){var L=String.fromCharCode,I=Math.floor,$=function(){var H=16384,ae=[],ce,me,Ne=-1,Me=arguments.length;if(!Me)return"";for(var j="";++Ne1114111||I(X)!==X)throw RangeError("Invalid code point: "+X);X<=65535?ae.push(X):(X-=65536,ce=(X>>10)+55296,me=X%1024+56320,ae.push(ce,me)),(Ne+1===Me||ae.length>H)&&(j+=L.apply(null,ae),ae.length=0)}return j};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:$,configurable:!0,writable:!0}):String.fromCodePoint=$}()})(typeof Df>"u"?Df.sax={}:Df)});var Sf=Be((nze,r8)=>{r8.exports={isArray:function(e){return Array.isArray?Array.isArray(e):Object.prototype.toString.call(e)==="[object Array]"}}});var Cf=Be((aze,n8)=>{var EZ=Sf().isArray;n8.exports={copyOptions:function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r},ensureFlagExists:function(e,t){(!(e in t)||typeof t[e]!="boolean")&&(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||typeof e.spaces!="number"&&typeof e.spaces!="string")&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){(!("alwaysArray"in e)||typeof e.alwaysArray!="boolean"&&!EZ(e.alwaysArray))&&(e.alwaysArray=!1)},ensureKeyExists:function(e,t){(!(e+"Key"in t)||typeof t[e+"Key"]!="string")&&(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}}});var z1=Be((ize,p8)=>{var AZ=t8(),NZ={on:function(){},parse:function(){}},ct=Cf(),Ko=Sf().isArray,de,H1=!0,st;function TZ(e){return de=ct.copyOptions(e),ct.ensureFlagExists("ignoreDeclaration",de),ct.ensureFlagExists("ignoreInstruction",de),ct.ensureFlagExists("ignoreAttributes",de),ct.ensureFlagExists("ignoreText",de),ct.ensureFlagExists("ignoreComment",de),ct.ensureFlagExists("ignoreCdata",de),ct.ensureFlagExists("ignoreDoctype",de),ct.ensureFlagExists("compact",de),ct.ensureFlagExists("alwaysChildren",de),ct.ensureFlagExists("addParent",de),ct.ensureFlagExists("trim",de),ct.ensureFlagExists("nativeType",de),ct.ensureFlagExists("nativeTypeAttributes",de),ct.ensureFlagExists("sanitize",de),ct.ensureFlagExists("instructionHasAttributes",de),ct.ensureFlagExists("captureSpacesBetweenElements",de),ct.ensureAlwaysArrayExists(de),ct.ensureKeyExists("declaration",de),ct.ensureKeyExists("instruction",de),ct.ensureKeyExists("attributes",de),ct.ensureKeyExists("text",de),ct.ensureKeyExists("comment",de),ct.ensureKeyExists("cdata",de),ct.ensureKeyExists("doctype",de),ct.ensureKeyExists("type",de),ct.ensureKeyExists("name",de),ct.ensureKeyExists("elements",de),ct.ensureKeyExists("parent",de),ct.checkFnExists("doctype",de),ct.checkFnExists("instruction",de),ct.checkFnExists("cdata",de),ct.checkFnExists("comment",de),ct.checkFnExists("text",de),ct.checkFnExists("instructionName",de),ct.checkFnExists("elementName",de),ct.checkFnExists("attributeName",de),ct.checkFnExists("attributeValue",de),ct.checkFnExists("attributes",de),de}function c8(e){var t=Number(e);if(!isNaN(t))return t;var r=e.toLowerCase();return r==="true"?!0:r==="false"?!1:e}function zu(e,t){var r;if(de.compact){if(!st[de[e+"Key"]]&&(Ko(de.alwaysArray)?de.alwaysArray.indexOf(de[e+"Key"])!==-1:de.alwaysArray)&&(st[de[e+"Key"]]=[]),st[de[e+"Key"]]&&!Ko(st[de[e+"Key"]])&&(st[de[e+"Key"]]=[st[de[e+"Key"]]]),e+"Fn"in de&&typeof t=="string"&&(t=de[e+"Fn"](t,st)),e==="instruction"&&("instructionFn"in de||"instructionNameFn"in de)){for(r in t)if(t.hasOwnProperty(r))if("instructionFn"in de)t[r]=de.instructionFn(t[r],r,st);else{var n=t[r];delete t[r],t[de.instructionNameFn(r,n,st)]=n}}Ko(st[de[e+"Key"]])?st[de[e+"Key"]].push(t):st[de[e+"Key"]]=t}else{st[de.elementsKey]||(st[de.elementsKey]=[]);var a={};if(a[de.typeKey]=e,e==="instruction"){for(r in t)if(t.hasOwnProperty(r))break;a[de.nameKey]="instructionNameFn"in de?de.instructionNameFn(r,t,st):r,de.instructionHasAttributes?(a[de.attributesKey]=t[r][de.attributesKey],"instructionFn"in de&&(a[de.attributesKey]=de.instructionFn(a[de.attributesKey],r,st))):("instructionFn"in de&&(t[r]=de.instructionFn(t[r],r,st)),a[de.instructionKey]=t[r])}else e+"Fn"in de&&(t=de[e+"Fn"](t,st)),a[de[e+"Key"]]=t;de.addParent&&(a[de.parentKey]=st),st[de.elementsKey].push(a)}}function l8(e){if("attributesFn"in de&&e&&(e=de.attributesFn(e,st)),(de.trim||"attributeValueFn"in de||"attributeNameFn"in de||de.nativeTypeAttributes)&&e){var t;for(t in e)if(e.hasOwnProperty(t)&&(de.trim&&(e[t]=e[t].trim()),de.nativeTypeAttributes&&(e[t]=c8(e[t])),"attributeValueFn"in de&&(e[t]=de.attributeValueFn(e[t],t,st)),"attributeNameFn"in de)){var r=e[t];delete e[t],e[de.attributeNameFn(t,e[t],st)]=r}}return e}function wZ(e){var t={};if(e.body&&(e.name.toLowerCase()==="xml"||de.instructionHasAttributes)){for(var r=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,n;(n=r.exec(e.body))!==null;)t[n[1]]=n[2]||n[3]||n[4];t=l8(t)}if(e.name.toLowerCase()==="xml"){if(de.ignoreDeclaration)return;st[de.declarationKey]={},Object.keys(t).length&&(st[de.declarationKey][de.attributesKey]=t),de.addParent&&(st[de.declarationKey][de.parentKey]=st)}else{if(de.ignoreInstruction)return;de.trim&&(e.body=e.body.trim());var a={};de.instructionHasAttributes&&Object.keys(t).length?(a[e.name]={},a[e.name][de.attributesKey]=t):a[e.name]=e.body,zu("instruction",a)}}function a8(e,t){var r;if(typeof e=="object"&&(t=e.attributes,e=e.name),t=l8(t),"elementNameFn"in de&&(e=de.elementNameFn(e,st)),de.compact){if(r={},!de.ignoreAttributes&&t&&Object.keys(t).length){r[de.attributesKey]={};var n;for(n in t)t.hasOwnProperty(n)&&(r[de.attributesKey][n]=t[n])}!(e in st)&&(Ko(de.alwaysArray)?de.alwaysArray.indexOf(e)!==-1:de.alwaysArray)&&(st[e]=[]),st[e]&&!Ko(st[e])&&(st[e]=[st[e]]),Ko(st[e])?st[e].push(r):st[e]=r}else st[de.elementsKey]||(st[de.elementsKey]=[]),r={},r[de.typeKey]="element",r[de.nameKey]=e,!de.ignoreAttributes&&t&&Object.keys(t).length&&(r[de.attributesKey]=t),de.alwaysChildren&&(r[de.elementsKey]=[]),st[de.elementsKey].push(r);r[de.parentKey]=st,st=r}function i8(e){de.ignoreText||!e.trim()&&!de.captureSpacesBetweenElements||(de.trim&&(e=e.trim()),de.nativeType&&(e=c8(e)),de.sanitize&&(e=e.replace(/&/g,"&").replace(//g,">")),zu("text",e))}function o8(e){de.ignoreComment||(de.trim&&(e=e.trim()),zu("comment",e))}function s8(e){var t=st[de.parentKey];de.addParent||delete st[de.parentKey],st=t}function DZ(e){de.ignoreCdata||(de.trim&&(e=e.trim()),zu("cdata",e))}function SZ(e){de.ignoreDoctype||(e=e.replace(/^ /,""),de.trim&&(e=e.trim()),zu("doctype",e))}function u8(e){e.note=e}p8.exports=function(e,t){var r=H1?AZ.parser(!0,{}):r=new NZ.Parser("UTF-8"),n={};if(st=n,de=TZ(t),H1?(r.opt={strictEntities:!0},r.onopentag=a8,r.ontext=i8,r.oncomment=o8,r.onclosetag=s8,r.onerror=u8,r.oncdata=DZ,r.ondoctype=SZ,r.onprocessinginstruction=wZ):(r.on("startElement",a8),r.on("text",i8),r.on("comment",o8),r.on("endElement",s8),r.on("error",u8)),H1)r.write(e).close();else if(!r.parse(e))throw new Error("XML parsing error: "+r.getError());if(n[de.elementsKey]){var a=n[de.elementsKey];delete n[de.elementsKey],n[de.elementsKey]=a,delete n.text}return n}});var d8=Be((oze,m8)=>{var f8=Cf(),CZ=z1();function _Z(e){var t=f8.copyOptions(e);return f8.ensureSpacesExists(t),t}m8.exports=function(e,t){var r,n,a,i;return r=_Z(t),n=CZ(e,r),i="compact"in r&&r.compact?"_parent":"parent","addParent"in r&&r.addParent?a=JSON.stringify(n,function(o,l){return o===i?"_":l},r.spaces):a=JSON.stringify(n,null,r.spaces),a.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}});var Y1=Be((sze,N8)=>{var ft=Cf(),MZ=Sf().isArray,Ar,Nr;function OZ(e){var t=ft.copyOptions(e);return ft.ensureFlagExists("ignoreDeclaration",t),ft.ensureFlagExists("ignoreInstruction",t),ft.ensureFlagExists("ignoreAttributes",t),ft.ensureFlagExists("ignoreText",t),ft.ensureFlagExists("ignoreComment",t),ft.ensureFlagExists("ignoreCdata",t),ft.ensureFlagExists("ignoreDoctype",t),ft.ensureFlagExists("compact",t),ft.ensureFlagExists("indentText",t),ft.ensureFlagExists("indentCdata",t),ft.ensureFlagExists("indentAttributes",t),ft.ensureFlagExists("indentInstruction",t),ft.ensureFlagExists("fullTagEmptyElement",t),ft.ensureFlagExists("noQuotesForNativeAttributes",t),ft.ensureSpacesExists(t),typeof t.spaces=="number"&&(t.spaces=Array(t.spaces+1).join(" ")),ft.ensureKeyExists("declaration",t),ft.ensureKeyExists("instruction",t),ft.ensureKeyExists("attributes",t),ft.ensureKeyExists("text",t),ft.ensureKeyExists("comment",t),ft.ensureKeyExists("cdata",t),ft.ensureKeyExists("doctype",t),ft.ensureKeyExists("type",t),ft.ensureKeyExists("name",t),ft.ensureKeyExists("elements",t),ft.checkFnExists("doctype",t),ft.checkFnExists("instruction",t),ft.checkFnExists("cdata",t),ft.checkFnExists("comment",t),ft.checkFnExists("text",t),ft.checkFnExists("instructionName",t),ft.checkFnExists("elementName",t),ft.checkFnExists("attributeName",t),ft.checkFnExists("attributeValue",t),ft.checkFnExists("attributes",t),ft.checkFnExists("fullTagEmptyElement",t),t}function Wn(e,t,r){return(!r&&e.spaces?` +`:"")+Array(t+1).join(e.spaces)}function _f(e,t,r){if(t.ignoreAttributes)return"";"attributesFn"in t&&(e=t.attributesFn(e,Nr,Ar));var n,a,i,o,l=[];for(n in e)e.hasOwnProperty(n)&&e[n]!==null&&e[n]!==void 0&&(o=t.noQuotesForNativeAttributes&&typeof e[n]!="string"?"":'"',a=""+e[n],a=a.replace(/"/g,"""),i="attributeNameFn"in t?t.attributeNameFn(n,a,Nr,Ar):n,l.push(t.spaces&&t.indentAttributes?Wn(t,r+1,!1):" "),l.push(i+"="+o+("attributeValueFn"in t?t.attributeValueFn(a,n,Nr,Ar):a)+o));return e&&Object.keys(e).length&&t.spaces&&t.indentAttributes&&l.push(Wn(t,r,!1)),l.join("")}function h8(e,t,r){return Ar=e,Nr="xml",t.ignoreDeclaration?"":""}function v8(e,t,r){if(t.ignoreInstruction)return"";var n;for(n in e)if(e.hasOwnProperty(n))break;var a="instructionNameFn"in t?t.instructionNameFn(n,e[n],Nr,Ar):n;if(typeof e[n]=="object")return Ar=e,Nr=a,"";var i=e[n]?e[n]:"";return"instructionFn"in t&&(i=t.instructionFn(i,n,Nr,Ar)),""}function g8(e,t){return t.ignoreComment?"":""}function x8(e,t){return t.ignoreCdata?"":"","]]]]>"))+"]]>"}function b8(e,t){return t.ignoreDoctype?"":""}function G1(e,t){return t.ignoreText?"":(e=""+e,e=e.replace(/&/g,"&"),e=e.replace(/&/g,"&").replace(//g,">"),"textFn"in t?t.textFn(e,Nr,Ar):e)}function RZ(e,t){var r;if(e.elements&&e.elements.length)for(r=0;r"),e[t.elementsKey]&&e[t.elementsKey].length&&(n.push(y8(e[t.elementsKey],t,r+1)),Ar=e,Nr=e.name),n.push(t.spaces&&RZ(e,t)?` +`+Array(r+1).join(t.spaces):""),n.push("")):n.push("/>"),n.join("")}function y8(e,t,r,n){return e.reduce(function(a,i){var o=Wn(t,r,n&&!a);switch(i.type){case"element":return a+o+FZ(i,t,r);case"comment":return a+o+g8(i[t.commentKey],t);case"doctype":return a+o+b8(i[t.doctypeKey],t);case"cdata":return a+(t.indentCdata?o:"")+x8(i[t.cdataKey],t);case"text":return a+(t.indentText?o:"")+G1(i[t.textKey],t);case"instruction":var l={};return l[i[t.nameKey]]=i[t.attributesKey]?i:i[t.instructionKey],a+(t.indentInstruction?o:"")+v8(l,t,r)}},"")}function E8(e,t,r){var n;for(n in e)if(e.hasOwnProperty(n))switch(n){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||r)return!0;break;case t.cdataKey:if(t.indentCdata||r)return!0;break;case t.instructionKey:if(t.indentInstruction||r)return!0;break;case t.doctypeKey:case t.commentKey:return!0;default:return!0}return!1}function IZ(e,t,r,n,a){Ar=e,Nr=t;var i="elementNameFn"in r?r.elementNameFn(t,e):t;if(typeof e>"u"||e===null||e==="")return"fullTagEmptyElementFn"in r&&r.fullTagEmptyElementFn(t,e)||r.fullTagEmptyElement?"<"+i+">":"<"+i+"/>";var o=[];if(t){if(o.push("<"+i),typeof e!="object")return o.push(">"+G1(e,r)+""),o.join("");e[r.attributesKey]&&o.push(_f(e[r.attributesKey],r,n));var l=E8(e,r,!0)||e[r.attributesKey]&&e[r.attributesKey]["xml:space"]==="preserve";if(l||("fullTagEmptyElementFn"in r?l=r.fullTagEmptyElementFn(t,e):l=r.fullTagEmptyElement),l)o.push(">");else return o.push("/>"),o.join("")}return o.push(A8(e,r,n+1,!1)),Ar=e,Nr=t,t&&o.push((a?Wn(r,n,!1):"")+""),o.join("")}function A8(e,t,r,n){var a,i,o,l=[];for(i in e)if(e.hasOwnProperty(i))for(o=MZ(e[i])?e[i]:[e[i]],a=0;a{var BZ=Y1();T8.exports=function(e,t){e instanceof Buffer&&(e=e.toString());var r=null;if(typeof e=="string")try{r=JSON.parse(e)}catch{throw new Error("The JSON structure is invalid")}else r=e;return BZ(r,t)}});var j1=Be((cze,D8)=>{var LZ=z1(),PZ=d8(),UZ=Y1(),kZ=w8();D8.exports={xml2js:LZ,xml2json:PZ,js2xml:UZ,json2xml:kZ}});var V1=Be(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.generator=void 0;Mf.generator="https://github.com/jpmonette/feed"});var $1=Be(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.sanitize=void 0;function qZ(e){if(!(typeof e>"u"))return e.replace(/&/g,"&")}Of.sanitize=qZ});var S8=Be(X1=>{"use strict";Object.defineProperty(X1,"__esModule",{value:!0});var HZ=j1(),zZ=V1(),Ka=$1();X1.default=function(e){var t=e.options,r={_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},feed:{_attributes:{xmlns:"http://www.w3.org/2005/Atom"},id:t.id,title:t.title,updated:t.updated?t.updated.toISOString():new Date().toISOString(),generator:Ka.sanitize(t.generator||zZ.generator)}};t.author&&(r.feed.author=Rf(t.author)),r.feed.link=[],t.link&&r.feed.link.push({_attributes:{rel:"alternate",href:Ka.sanitize(t.link)}});var n=Ka.sanitize(t.feed||t.feedLinks&&t.feedLinks.atom);return n&&r.feed.link.push({_attributes:{rel:"self",href:Ka.sanitize(n)}}),t.hub&&r.feed.link.push({_attributes:{rel:"hub",href:Ka.sanitize(t.hub)}}),t.description&&(r.feed.subtitle=t.description),t.image&&(r.feed.logo=t.image),t.favicon&&(r.feed.icon=t.favicon),t.copyright&&(r.feed.rights=t.copyright),r.feed.category=[],e.categories.map(function(a){r.feed.category.push({_attributes:{term:a}})}),r.feed.contributor=[],e.contributors.map(function(a){r.feed.contributor.push(Rf(a))}),r.feed.entry=[],e.items.map(function(a){var i={title:{_attributes:{type:"html"},_cdata:a.title},id:Ka.sanitize(a.id||a.link),link:[{_attributes:{href:Ka.sanitize(a.link)}}],updated:a.date.toISOString()};a.description&&(i.summary={_attributes:{type:"html"},_cdata:a.description}),a.content&&(i.content={_attributes:{type:"html"},_cdata:a.content}),Array.isArray(a.author)&&(i.author=[],a.author.map(function(o){i.author.push(Rf(o))})),Array.isArray(a.category)&&(i.category=[],a.category.map(function(o){i.category.push(GZ(o))})),a.contributor&&Array.isArray(a.contributor)&&(i.contributor=[],a.contributor.map(function(o){i.contributor.push(Rf(o))})),a.published&&(i.published=a.published.toISOString()),a.copyright&&(i.rights=a.copyright),r.feed.entry.push(i)}),HZ.js2xml(r,{compact:!0,ignoreComment:!0,spaces:4})};var Rf=function(e){var t=e.name,r=e.email,n=e.link,a={name:t};return r&&(a.email=r),n&&(a.uri=Ka.sanitize(n)),a},GZ=function(e){var t=e.name,r=e.scheme,n=e.term;return{_attributes:{label:t,scheme:r,term:n}}}});var C8=Be(K1=>{"use strict";Object.defineProperty(K1,"__esModule",{value:!0});K1.default=function(e){var t=e.options,r=e.items,n=e.extensions,a={version:"https://jsonfeed.org/version/1",title:t.title};return t.link&&(a.home_page_url=t.link),t.feedLinks&&t.feedLinks.json&&(a.feed_url=t.feedLinks.json),t.description&&(a.description=t.description),t.image&&(a.icon=t.image),t.author&&(a.author={},t.author.name&&(a.author.name=t.author.name),t.author.link&&(a.author.url=t.author.link)),n.map(function(i){a[i.name]=i.objects}),a.items=r.map(function(i){var o={id:i.id,content_html:i.content};if(i.link&&(o.url=i.link),i.title&&(o.title=i.title),i.description&&(o.summary=i.description),i.image&&(o.image=i.image),i.date&&(o.date_modified=i.date.toISOString()),i.published&&(o.date_published=i.published.toISOString()),i.author){var l=i.author;l instanceof Array&&(l=l[0]),o.author={},l.name&&(o.author.name=l.name),l.link&&(o.author.url=l.link)}return Array.isArray(i.category)&&(o.tags=[],i.category.map(function(u){u.name&&o.tags.push(u.name)})),i.extensions&&i.extensions.map(function(u){o[u.name]=u.objects}),o}),JSON.stringify(a,null,4)}});var _8=Be(Gu=>{"use strict";var W1=Gu&&Gu.__assign||function(){return W1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.Feed=void 0;var $Z=S8(),XZ=C8(),KZ=_8(),WZ=function(){function e(t){var r=this;this.items=[],this.categories=[],this.contributors=[],this.extensions=[],this.addItem=function(n){return r.items.push(n)},this.addCategory=function(n){return r.categories.push(n)},this.addContributor=function(n){return r.contributors.push(n)},this.addExtension=function(n){return r.extensions.push(n)},this.atom1=function(){return $Z.default(r)},this.rss2=function(){return KZ.default(r)},this.json1=function(){return XZ.default(r)},this.options=t}return e}();If.Feed=WZ});var ZZ={};on(ZZ,{Manager:()=>Yu,default:()=>QZ,makeInstance:()=>F8});module.exports=hB(ZZ);var En=Le(require("node:process"),1);var Xu={};on(Xu,{AllMismatchInterrupted:()=>Mi,headers:()=>Vr,request:()=>Tr,response:()=>Ct});var Tr=class{method;url;originURL;headers;body;query;params;custom;ip;constructor(t,r,n,a,i,o="0.0.0.0"){this.method=t,this.url=r,this.headers=n,this.body=a,this.query=new URLSearchParams(r.search),this.params=i,this.ip=n.get("X-REAL-IP")??n.get("X-Forwarded-For")?.split(" ")[0]??o}extends(t){return this.custom=t,this}};var _i=([e,...t])=>e?.toUpperCase()+t.map(r=>r.toLowerCase()).join(""),Wa=(()=>{if(typeof process<"u")return"Node.js";if(typeof Deno<"u")return"Deno";if(typeof Bun<"u")return"Bun";if(typeof tjs<"u")return"txiki.js";if(typeof self<"u")return"Service Worker"})(),Z1=(()=>{switch(Wa){case"Node.js":return process.version;case"Bun":return process.version;case"Deno":return Deno.version.deno;case"txiki.js":return tjs.versions.tjs;case"Service Worker":return;default:return}})();var Vr=class{headers={};constructor(t){this.headers={},Object.keys(t).forEach(r=>{this.headers[_i(r)]=t[r]})}delete(t){delete this.headers[_i(t)]}get(t){return this.headers[_i(t)]}has(t){return this.headers.hasOwnProperty(_i(t))}set(t,r){this.headers[_i(t)]=r}toObject(){return this.headers}forEach(t){Object.keys(this.headers).forEach(r=>{t(r,this.headers[r])})}},J1=Vr;var ey={name:"handlers.js",description:"Handlers.js is a unified and lightweight web application framework for multiple platforms.",version:"0.1.2-1",main:"./dist/index.js",types:"./dist/index.d.ts",exports:{".":{import:"./dist/index.js",require:"./dist/index.node.js",types:"./dist/index.d.ts",default:"./dist/index.js"}},files:["dist","LICENSE"],author:"186526 ",license:"MIT",repository:{type:"git",url:"https://github.com/186526/handlers.js"},keywords:["web framework","lightweight","cross-platform","unified"],dependencies:{"path-to-regexp":"6"},devDependencies:{"@cloudflare/workers-types":"^3.13.0","@eslint/js":"^9.8.0","@types/jest":"^28.1.4","@types/node":"^18.0.0","@webpack-cli/generators":"^2.5.0",axios:"^0.27.2",bluebird:"^3.7.2","bun-types":"^0.1.4",eslint:"9.x",globals:"^15.8.0",jest:"^29.7.0",prettier:"^2.7.1","ts-jest":"^29.2.4","ts-loader":"^9.3.1","ts-node":"^10.8.1","tsc-alias":"^1.8.10",typescript:"^4.7.4","typescript-eslint":"^8.0.0",webpack:"^5.73.0","webpack-cli":"^4.10.0"},sideEffects:!1,scripts:{build:"yarn clean && yarn build:node && yarn build:serviceworker && yarn build:cfworker && yarn build:deno && yarn build:txiki && yarn build:bun","build:node":"BUILD_TARGET=node webpack","build:serviceworker":"BUILD_TARGET=serviceworker webpack","build:cfworker":"BUILD_TARGET=cfworker webpack","build:deno":"BUILD_TARGET=deno webpack","build:txiki":"BUILD_TARGET=txiki webpack","build:bun":"BUILD_TARGET=bun webpack",watch:"webpack --watch",clean:"rm -rf ./dist",demo:"env NODE_ENV=development yarn build:node && node ./dist/main.node.js",tsc:"tsc && tsc-alias",lint:"eslint --fix **/*.ts","test:node":"NODE_OPTIONS=--experimental-vm-modules jest ./test/node.test.ts","test:deno":"BUILD_TARGET=deno:test webpack && jest ./test/deno.test.ts",coverage:"ODE_OPTIONS=--experimental-vm-modules jest --collectCoverage --",prepublish:"env NODE_ENV=production yarn build && yarn tsc",format:'prettier --write "**/*.{ts,json,md}" '},engines:{node:">=18.0.0"},type:"module",packageManager:"yarn@1.22.22"};var Jo=class extends J1{constructor(t={}){super(t),this.has("Content-Type")||this.set("Content-Type","text/plain; charset=utf-8"),this.set("Server",`Handlers.js/${ey.version} ${Wa}/${Z1}`)}},Ct=class{status;headers;body;custom;constructor(t,r=200,n=new Jo){this.status=r,this.headers=n,this.body=t}extends(t){return this.custom=t,this}};var Mi=new Error("AllMismatchInterrupted");var lr=class{responders;method;constructor(t,r){this.responders=r,this.method=t}add(t){this.responders.push(t)}async respond(t,r=new Ct("")){switch(this.responders.length){case 0:Promise.reject("No responders found in this handler.");break;case 1:return this.responders[0](t,r);default:for(let n of this.responders){let a=await n(t,r);a instanceof Ct&&(r=a)}return r}}},Lf=lr;var iy=Le(ay(),1),qf=class{paths;handlers;regExps=[];constructor(t,r){this.paths=t,this.handlers=r,this.paths.forEach(n=>{let a=[];this.regExps.push({regExp:(0,iy.pathToRegexp)(n,a),keys:a})})}async exec(t){let r=await Promise.all(this.regExps.map(async n=>{let a=n.regExp.exec(t);if(a===null)return{matched:!1,attributes:[]};let i=[];return n.keys.forEach((o,l)=>{i.push({name:o.name,value:a[l+1]})}),{matched:!0,attributes:i}}));return r=r.filter(n=>n.matched),r.length===0?{matched:!1,attributes:[]}:r[0]}},oy=qf;var es;(function(e){e.CONNECT="CONNECT",e.DELETE="DELETE",e.GET="GET",e.HEAD="HEAD",e.OPTIONS="OPTIONS",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.TRACE="TRACE",e.ANY="ANY"})(es||(es={}));function sy(e,t){return new e(t)}var uy=Le(require("http"),1),Ku=class{router;server;constructor(t,r){this.router=t,r?this.server=r:this.server=uy.default.createServer()}async listen(t){this.server.on("request",async(r,n)=>{let a=await this.handleRequest(r),i=await this.router.respond(a);this.handleResponse(i,n)}),this.server.listen(t)}close(){this.server.close()}async handleRequest(t){if(typeof t.method!="string"||typeof t.url!="string"||typeof t.headers!="object")throw new Error("Invalid request");let r="",n=t.socket.remoteAddress?.replace("::ffff:","")??"0.0.0.0",a=new Vr(t.headers);return["GET","HEAD","DELETE","OPTIONS"].includes(t.method)||(t.on("data",i=>{r+=i}),await new Promise(i=>t.on("end",()=>{i(!0)}))),new Tr(t.method,new URL(t.url,`http://${a.get("host")??"localhost"}`),a,r,{},n)}handleResponse(t,r){r.statusCode=t.status,t.headers.forEach((n,a)=>{r.setHeader(n,a)}),r.end(t.body)}};var Ri=class{router;eventHandler=t=>{t.respondWith(this.handler(t))};constructor(t){this.router=t}async listen(t){self.addEventListener("fetch",this.eventHandler)}close(){self.removeEventListener("fetch",this.eventHandler)}async handleRequest(t){let r=new Vr(Object.fromEntries(t.headers.entries()));return new Tr(t.method,new URL(t.url),r,await t.text(),{},r.get("CF-Connecting-IP")||"")}async handleResponse(t){return t.status===204&&(t.body=null),new Response(t.body,{status:t.status,headers:t.headers.headers})}async handler(t){return await this.handleResponse(await this.handleRequest(t.request).then(r=>this.router.respond(r)))}};var cy={localAddr:{transport:"tcp",hostname:"0.0.0.0",port:80},remoteAddr:{transport:"tcp",hostname:"0.0.0.0",port:80},rid:0,closeWrite:async()=>{},readable:"",writable:"",read:async e=>null,write:async e=>0,close:()=>{}},Wu=class extends Ri{server;async listen(t){this.server=Deno.listen({port:t});for await(let r of this.server){let n=Deno.serveHttp(r);for await(let a of n)a.respondWith(this.handler(a,r))}}close(){this.server.close()}async handleRequest(t,r=cy){let n=new Vr(Object.fromEntries(t.headers.entries()));return new Tr(t.method,new URL(t.url),n,await t.text(),{},`${r.remoteAddr.hostname??"0.0.0.0"}:${r.remoteAddr.port??"0"}`)}async handler(t,r=cy){return await this.handleResponse(await this.handleRequest(t.request,r).then(n=>this.router.respond(n)))}};var ly={"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Checkpoint","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"Switch Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Time-out","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Request Entity Too Large","414":"Request-URI Too Long","415":"Unsupported Media Type","416":"Requested Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Unprocessable Entity","422":"Misdirected Request","423":"Locked","424":"Failed Dependency","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fileds Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"};var Hf=class{closed=!1;conn;reader;constructor(t){this.conn=t,this.reader=this.reader??this.conn.readable.getReader()}readMessage(t){let r=t.split(` `),n=r[0],a=r.indexOf("\r")??r.indexOf(""),i=r.slice(1,a),[o,l,u]=n.split(" ");u in["HTTP/1.1","HTTP/1.0","HTTP/0.9"]||this.conn.close();let s=new Vr({});for(let m of i){let[h,d]=m.split(": ");s.set(h,d)}let c=new URL(l,`http://${s.get("Host")??`${this.conn.localAddress.ip}:${this.conn.localAddress.port}`}/`),p=r.slice(a+1).join(` -`);return new Tr(o,c,s,p,{},this.conn.remoteAddress.ip)}handleResponse(t){let r="";r+="HTTP/1.1 "+t.status+" "+(py[t.status.toString()]??""),t.headers.forEach((n,a)=>{r+=` +`);return new Tr(o,c,s,p,{},this.conn.remoteAddress.ip)}handleResponse(t){let r="";r+="HTTP/1.1 "+t.status+" "+(ly[t.status.toString()]??""),t.headers.forEach((n,a)=>{r+=` `+n+": "+a}),r+=` -`+t.body,this.conn.write(new TextEncoder().encode(r)),this.conn.close(),this.closed=!0}async read(){let t="",{done:r,value:n}=await this.reader.read();if(r||this.closed){this.closed=!0;return}return t+=String.fromCharCode(...Object.values(n)),this.readMessage(t)}[Symbol.asyncIterator](){let t=this;return{async next(){return t.closed?{done:!0,value:void 0}:{done:!1,value:{request:await t.read(),respondWith:r=>{t.handleResponse(r)}}}}}}};function zf(e){return new Hf(e)}var Qu=class{router;server;constructor(t){this.router=t}async listen(t){this.server=await tjs.listen("tcp","0.0.0.0",t);for await(let r of this.server){let n=zf(r);for await(let a of n){if(typeof a>"u"||typeof a.request>"u")return;a.respondWith(await this.router.respond(a.request))}}}close(){this.server.close()}async handleRequest(t){return t}async handleResponse(t){return t}};var fy={"Node.js":Ku,"Service Worker":Ri,Deno:Wu,"txiki.js":Qu};var Pn=class e{routes;errorResponder;constructor(t=[]){this.routes=t}add(t){return this.routes.push(t),this}binding(t,r){return this.add(new sy([t],[r])),this}create(t,r){return new Lf(t,[async n=>{let a=await r(n);return a instanceof Ct?a:typeof a=="string"?new Ct(a):typeof a=="number"?new Ct(a.toString()):typeof a=="object"?new Ct(JSON.stringify(a),200,new Jo({"Content-Type":"application/json; charset=utf-8"})):new Ct("",204)}])}use(t,r){t.forEach(n=>{this.binding(r,n.toHandler())})}route(t){let r=new e([]);return this.use([r],t),r}async _respond(t,r=new Ct("")){t.originURL=t.url,t.url.pathname=t.params[0]?"/"+t.params[0]:t.originURL.pathname;let n=0;for(let a of this.routes){let i=await a.exec(t.url.pathname);if(!i.matched){n++;continue}i.attributes.forEach(o=>{t.params[o.name]=o.value});try{let o=r;for(let l of a.handlers)l.method!=t.method&&l.method!=es.ANY||(o=await l.respond(t,o??r));if(o instanceof Ct)r=o;else throw Mi}catch(o){if(o instanceof Ct)throw o;if(o===Mi)n++;else if(typeof this.errorResponder=="function")r=await this.errorResponder(500,o.toString()+` +`+t.body,this.conn.write(new TextEncoder().encode(r)),this.conn.close(),this.closed=!0}async read(){let t="",{done:r,value:n}=await this.reader.read();if(r||this.closed){this.closed=!0;return}return t+=String.fromCharCode(...Object.values(n)),this.readMessage(t)}[Symbol.asyncIterator](){let t=this;return{async next(){return t.closed?{done:!0,value:void 0}:{done:!1,value:{request:await t.read(),respondWith:r=>{t.handleResponse(r)}}}}}}};function zf(e){return new Hf(e)}var Qu=class{router;server;constructor(t){this.router=t}async listen(t){this.server=await tjs.listen("tcp","0.0.0.0",t);for await(let r of this.server){let n=zf(r);for await(let a of n){if(typeof a>"u"||typeof a.request>"u")return;a.respondWith(await this.router.respond(a.request))}}}close(){this.server.close()}async handleRequest(t){return t}async handleResponse(t){return t}};var py={"Node.js":Ku,"Service Worker":Ri,Deno:Wu,"txiki.js":Qu};var Pn=class e{routes;errorResponder;constructor(t=[]){this.routes=t}add(t){return this.routes.push(t),this}binding(t,r){return this.add(new oy([t],[r])),this}create(t,r){return new Lf(t,[async n=>{let a=await r(n);return a instanceof Ct?a:typeof a=="string"?new Ct(a):typeof a=="number"?new Ct(a.toString()):typeof a=="object"?new Ct(JSON.stringify(a),200,new Jo({"Content-Type":"application/json; charset=utf-8"})):new Ct("",204)}])}use(t,r){t.forEach(n=>{this.binding(r,n.toHandler())})}route(t){let r=new e([]);return this.use([r],t),r}async _respond(t,r=new Ct("")){t.originURL=t.url,t.url.pathname=t.params[0]?"/"+t.params[0]:t.originURL.pathname;let n=0;for(let a of this.routes){let i=await a.exec(t.url.pathname);if(!i.matched){n++;continue}i.attributes.forEach(o=>{t.params[o.name]=o.value});try{let o=r;for(let l of a.handlers)l.method!=t.method&&l.method!=es.ANY||(o=await l.respond(t,o??r));if(o instanceof Ct)r=o;else throw Mi}catch(o){if(o instanceof Ct)throw o;if(o===Mi)n++;else if(typeof this.errorResponder=="function")r=await this.errorResponder(500,o.toString()+` `)(t)??new Ct(o.toString(),500),console.log(o);else throw o}}if(n==this.routes.length)throw Mi;return r}respond=this._respond;toHandler(){return new Lf(es.ANY,[(t,r)=>this.respond(t,r??new Ct(""))])}useErrorResponder(t){return this.errorResponder=t,this}};var Zu=class extends Pn{adapater;errorResponder=(t,r)=>async n=>new Ct(r??"",t);respond=async t=>{let r=new Ct("");try{r=await this._respond(t,r)}catch(n){if(n instanceof Ct)return n;n===Mi?r=await this.errorResponder(404,`404 Not Found `)(t)??new Ct(`404 Not Found `,404):(r=await this.errorResponder(500,n.toString()+` -`)(t)??new Ct(n.toString(),500),console.log(n))}return r};useAdapater(t){return this.adapater=uy(t,this),this}useMappingAdapter(t=fy){if(typeof Wa>"u")throw new Error("Cannot detect platform");if(t[Wa]==null)throw new Error("Platform not found in mapping");return this.useAdapater(t[Wa]),this}listen(t){if(this.adapater==null)throw new Error("No platform adapter set");this.adapater.listen(t)}close(){if(this.adapater==null)throw new Error("No platform adapter set");this.adapater.close()}};var my=Zu;var yy=Le(va(),1);var Qa={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function ze(e){return typeof e=="number"}function Ue(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function Zt(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function $r(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function $t(e){return e&&e.constructor.prototype.isUnit===!0||!1}function It(e){return typeof e=="string"}var at=Array.isArray;function Fe(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Lt(e){return Array.isArray(e)||Fe(e)}function Zn(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Xr(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function ga(e){return e&&e.constructor.prototype.isRange===!0||!1}function Un(e){return e&&e.constructor.prototype.isIndex===!0||!1}function Ju(e){return typeof e=="boolean"}function ec(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function Fi(e){return e&&e.constructor.prototype.isHelp===!0||!1}function tc(e){return typeof e=="function"}function rc(e){return e instanceof Date}function nc(e){return e instanceof RegExp}function kn(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Zt(e)&&!$r(e))}function ac(e){return e===null}function ic(e){return e===void 0}function wr(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Jt(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function oc(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function sc(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function uc(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function et(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function ts(e){return et(e)||Tt(e)&&e.args.length===1&&et(e.args[0])&&"-+~".includes(e.op)}function sn(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function pr(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function Rr(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function nt(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function qn(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function Tt(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function er(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function cc(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function lc(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function bt(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ii(e){return e&&e.constructor.prototype.isChain===!0||!1}function ut(e){var t=typeof e;return t==="object"?e===null?"null":Ue(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function qe(e){var t=typeof e;if(t==="number"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(r){return qe(r)});if(e instanceof Date)return new Date(e.valueOf());if(Ue(e))return e;if(kn(e))return Bi(e,qe);throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function Bi(e,t){var r={};for(var n in e)Ie(e,n)&&(r[n]=t(e[n]));return r}function pc(e,t){for(var r in t)Ie(t,r)&&(e[r]=t[r]);return e}function Yf(e,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var r in t)if(Ie(t,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(t[r]&&t[r].constructor===Object)e[r]===void 0&&(e[r]={}),e[r]&&e[r].constructor===Object?Yf(e[r],t[r]):e[r]=t[r];else{if(Array.isArray(t[r]))throw new TypeError("Arrays are not supported by deepExtend");e[r]=t[r]}return e}function Nn(e,t){var r,n,a;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(n=0,a=e.length;n{Object.defineProperty(r,n,{get:()=>e[n],enumerable:!0,configurable:!0})}),r}function xy(e,t,r){e[t]!==void 0&&!r.includes(e[t])&&console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+r.map(n=>JSON.stringify(n)).join(", ")+".")}var un=function(t){if(t)throw new Error(`The global config is readonly. +`)(t)??new Ct(n.toString(),500),console.log(n))}return r};useAdapater(t){return this.adapater=sy(t,this),this}useMappingAdapter(t=py){if(typeof Wa>"u")throw new Error("Cannot detect platform");if(t[Wa]==null)throw new Error("Platform not found in mapping");return this.useAdapater(t[Wa]),this}listen(t){if(this.adapater==null)throw new Error("No platform adapter set");this.adapater.listen(t)}close(){if(this.adapater==null)throw new Error("No platform adapter set");this.adapater.close()}};var fy=Zu;var by=Le(va(),1);var Qa={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function ze(e){return typeof e=="number"}function Ue(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function Zt(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function $r(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function $t(e){return e&&e.constructor.prototype.isUnit===!0||!1}function It(e){return typeof e=="string"}var at=Array.isArray;function Fe(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Lt(e){return Array.isArray(e)||Fe(e)}function Zn(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Xr(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function ga(e){return e&&e.constructor.prototype.isRange===!0||!1}function Un(e){return e&&e.constructor.prototype.isIndex===!0||!1}function Ju(e){return typeof e=="boolean"}function ec(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function Fi(e){return e&&e.constructor.prototype.isHelp===!0||!1}function tc(e){return typeof e=="function"}function rc(e){return e instanceof Date}function nc(e){return e instanceof RegExp}function kn(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Zt(e)&&!$r(e))}function ac(e){return e===null}function ic(e){return e===void 0}function wr(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Jt(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function oc(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function sc(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function uc(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function et(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function ts(e){return et(e)||Tt(e)&&e.args.length===1&&et(e.args[0])&&"-+~".includes(e.op)}function sn(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function pr(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function Rr(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function nt(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function qn(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function Tt(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function er(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function cc(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function lc(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function bt(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ii(e){return e&&e.constructor.prototype.isChain===!0||!1}function ut(e){var t=typeof e;return t==="object"?e===null?"null":Ue(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function qe(e){var t=typeof e;if(t==="number"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(r){return qe(r)});if(e instanceof Date)return new Date(e.valueOf());if(Ue(e))return e;if(kn(e))return Bi(e,qe);throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function Bi(e,t){var r={};for(var n in e)Ie(e,n)&&(r[n]=t(e[n]));return r}function pc(e,t){for(var r in t)Ie(t,r)&&(e[r]=t[r]);return e}function Yf(e,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var r in t)if(Ie(t,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(t[r]&&t[r].constructor===Object)e[r]===void 0&&(e[r]={}),e[r]&&e[r].constructor===Object?Yf(e[r],t[r]):e[r]=t[r];else{if(Array.isArray(t[r]))throw new TypeError("Arrays are not supported by deepExtend");e[r]=t[r]}return e}function Nn(e,t){var r,n,a;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(n=0,a=e.length;n{Object.defineProperty(r,n,{get:()=>e[n],enumerable:!0,configurable:!0})}),r}function gy(e,t,r){e[t]!==void 0&&!r.includes(e[t])&&console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+r.map(n=>JSON.stringify(n)).join(", ")+".")}var un=function(t){if(t)throw new Error(`The global config is readonly. Please create a mathjs instance if you want to change the default configuration. Example: import { create, all } from 'mathjs'; const mathjs = create(all); mathjs.config({ number: 'BigNumber' }); -`);return Object.freeze(Qa)};(0,yy.default)(un,Qa,{MATRIX_OPTIONS:fc,NUMBER_OPTIONS:mc});var fx={};on(fx,{createAbs:()=>Qc,createAccessorNode:()=>UT,createAcos:()=>v0,createAcosh:()=>g0,createAcot:()=>x0,createAcoth:()=>b0,createAcsc:()=>y0,createAcsch:()=>E0,createAdd:()=>Dl,createAddScalar:()=>Jc,createAnd:()=>Ds,createAndTransform:()=>gM,createApply:()=>ii,createApplyTransform:()=>Y3,createArg:()=>eh,createArrayNode:()=>qT,createAsec:()=>A0,createAsech:()=>N0,createAsin:()=>T0,createAsinh:()=>w0,createAssignmentNode:()=>YT,createAtan:()=>D0,createAtan2:()=>S0,createAtanh:()=>C0,createAtomicMass:()=>jg,createAvogadro:()=>Vg,createBellNumbers:()=>jv,createBigNumberClass:()=>_c,createBignumber:()=>$c,createBin:()=>Rh,createBitAnd:()=>ms,createBitAndTransform:()=>bM,createBitNot:()=>Zd,createBitOr:()=>ds,createBitOrTransform:()=>yM,createBitXor:()=>Jd,createBlockNode:()=>VT,createBohrMagneton:()=>wg,createBohrRadius:()=>Og,createBoltzmann:()=>$g,createBoolean:()=>Nd,createCatalan:()=>Vv,createCbrt:()=>Md,createCeil:()=>Rd,createChain:()=>A_,createChainClass:()=>V2,createClassicalElectronRadius:()=>Rg,createClone:()=>gm,createColumn:()=>vs,createColumnTransform:()=>j3,createCombinations:()=>Dv,createCombinationsWithRep:()=>Sv,createCompare:()=>Wh,createCompareNatural:()=>Qh,createCompareText:()=>Zh,createCompile:()=>E2,createComplex:()=>Td,createComplexClass:()=>Mc,createComposition:()=>$v,createConcat:()=>Wi,createConcatTransform:()=>aM,createConditionalNode:()=>XT,createConductanceQuantum:()=>Dg,createConj:()=>ol,createConstantNode:()=>t2,createCorr:()=>wv,createCos:()=>_0,createCosh:()=>M0,createCot:()=>O0,createCoth:()=>R0,createCoulomb:()=>Ng,createCount:()=>ih,createCreateUnit:()=>h0,createCross:()=>oh,createCsc:()=>F0,createCsch:()=>I0,createCtranspose:()=>Eh,createCube:()=>Fd,createCumSum:()=>Os,createCumSumTransform:()=>fM,createDeepEqual:()=>n0,createDenseMatrixClass:()=>Pc,createDerivative:()=>B3,createDet:()=>Ql,createDeuteronMass:()=>Ug,createDiag:()=>sh,createDiff:()=>xs,createDiffTransform:()=>oM,createDistance:()=>yv,createDivide:()=>Jl,createDivideScalar:()=>dl,createDot:()=>Sl,createDotDivide:()=>zh,createDotMultiply:()=>Wd,createDotPow:()=>Hh,createE:()=>og,createEfimovFactor:()=>Yg,createEigs:()=>dv,createElectricConstant:()=>Eg,createElectronMass:()=>Fg,createElementaryCharge:()=>Tg,createEqual:()=>Jh,createEqualScalar:()=>Yc,createEqualText:()=>e0,createErf:()=>Sh,createEvaluate:()=>N2,createExp:()=>Id,createExpm:()=>hv,createExpm1:()=>Bd,createFactorial:()=>Mv,createFalse:()=>eg,createFaraday:()=>Xg,createFermiCoupling:()=>Ig,createFft:()=>Ah,createFibonacciHeapClass:()=>c0,createFilter:()=>uh,createFilterTransform:()=>$3,createFineStructure:()=>Bg,createFirstRadiation:()=>Kg,createFix:()=>Pd,createFlatten:()=>ch,createFloor:()=>ps,createForEach:()=>lh,createForEachTransform:()=>X3,createFormat:()=>Oh,createFraction:()=>Xc,createFractionClass:()=>Oc,createFreqz:()=>Qv,createFunctionAssignmentNode:()=>n2,createFunctionNode:()=>g2,createGamma:()=>Cv,createGasConstant:()=>Qg,createGcd:()=>qd,createGetMatrixDataType:()=>ph,createGravitationConstant:()=>gg,createGravity:()=>ox,createHartreeEnergy:()=>Lg,createHasNumericValue:()=>xd,createHelp:()=>y_,createHelpClass:()=>j2,createHex:()=>Ih,createHypot:()=>Q0,createI:()=>dg,createIdentity:()=>sl,createIfft:()=>Nh,createIm:()=>th,createImmutableDenseMatrixClass:()=>s0,createIndex:()=>ev,createIndexClass:()=>u0,createIndexNode:()=>i2,createIndexTransform:()=>K3,createInfinity:()=>rg,createIntersect:()=>Ev,createInv:()=>Zl,createInverseConductanceQuantum:()=>Sg,createInvmod:()=>Kd,createIsInteger:()=>qc,createIsNaN:()=>yd,createIsNegative:()=>vd,createIsNumeric:()=>gd,createIsPositive:()=>bd,createIsPrime:()=>Lh,createIsZero:()=>zc,createKldivergence:()=>Ov,createKlitzing:()=>Mg,createKron:()=>fh,createLN10:()=>cg,createLN2:()=>ug,createLOG10E:()=>pg,createLOG2E:()=>lg,createLarger:()=>Al,createLargerEq:()=>r0,createLcm:()=>Hd,createLeafCount:()=>T3,createLeftShift:()=>$h,createLgamma:()=>_v,createLog:()=>Uh,createLog10:()=>zd,createLog1p:()=>kh,createLog2:()=>Gd,createLoschmidt:()=>Wg,createLsolve:()=>Gh,createLsolveAll:()=>jh,createLup:()=>av,createLusolve:()=>cv,createLyap:()=>bv,createMad:()=>Nv,createMagneticConstant:()=>yg,createMagneticFluxQuantum:()=>Cg,createMap:()=>mh,createMapTransform:()=>Q3,createMatrix:()=>Kc,createMatrixClass:()=>Rc,createMatrixFromColumns:()=>Sd,createMatrixFromFunction:()=>wd,createMatrixFromRows:()=>Dd,createMax:()=>ro,createMaxTransform:()=>Z3,createMean:()=>Rs,createMeanTransform:()=>J3,createMedian:()=>Av,createMin:()=>no,createMinTransform:()=>eM,createMod:()=>fs,createMode:()=>_h,createMolarMass:()=>ax,createMolarMassC12:()=>ix,createMolarPlanckConstant:()=>Zg,createMolarVolume:()=>Jg,createMultinomial:()=>Rv,createMultiply:()=>rl,createMultiplyScalar:()=>tl,createNaN:()=>ng,createNeutronMass:()=>kg,createNode:()=>LT,createNorm:()=>Z0,createNot:()=>nh,createNthRoot:()=>Yd,createNthRoots:()=>qh,createNuclearMagneton:()=>_g,createNull:()=>tg,createNumber:()=>Vc,createNumeric:()=>ml,createObjectNode:()=>s2,createOct:()=>Fh,createOnes:()=>dh,createOperatorNode:()=>c2,createOr:()=>hs,createOrTransform:()=>xM,createParenthesisNode:()=>p2,createParse:()=>b2,createParser:()=>D2,createParserClass:()=>T2,createPartitionSelect:()=>i0,createPermutations:()=>Fv,createPhi:()=>sg,createPi:()=>ag,createPickRandom:()=>Hv,createPinv:()=>mv,createPlanckCharge:()=>lx,createPlanckConstant:()=>xg,createPlanckLength:()=>sx,createPlanckMass:()=>ux,createPlanckTemperature:()=>px,createPlanckTime:()=>cx,createPolynomialRoot:()=>lv,createPow:()=>Ph,createPrint:()=>ws,createPrintTransform:()=>vM,createProd:()=>Mh,createProtonMass:()=>Pg,createQr:()=>iv,createQuantileSeq:()=>Is,createQuantileSeqTransform:()=>lM,createQuantumOfCirculation:()=>qg,createRandom:()=>zv,createRandomInt:()=>Gv,createRange:()=>bs,createRangeClass:()=>lm,createRangeNode:()=>m2,createRangeTransform:()=>tM,createRationalize:()=>P3,createRe:()=>rh,createReducedPlanckConstant:()=>bg,createRelationalNode:()=>h2,createReplacer:()=>Zv,createReshape:()=>hh,createResize:()=>vh,createResolve:()=>O3,createResultSet:()=>tm,createReviver:()=>q3,createRightArithShift:()=>Xh,createRightLogShift:()=>Kh,createRotate:()=>gh,createRotationMatrix:()=>xh,createRound:()=>hl,createRow:()=>ys,createRowTransform:()=>rM,createRydberg:()=>Hg,createSQRT1_2:()=>fg,createSQRT2:()=>mg,createSackurTetrode:()=>ex,createSchur:()=>xv,createSec:()=>B0,createSech:()=>L0,createSecondRadiation:()=>tx,createSetCartesian:()=>H0,createSetDifference:()=>z0,createSetDistinct:()=>G0,createSetIntersect:()=>Y0,createSetIsSubset:()=>j0,createSetMultiplicity:()=>V0,createSetPowerset:()=>$0,createSetSize:()=>X0,createSetSymDifference:()=>K0,createSetUnion:()=>W0,createSign:()=>jd,createSimplify:()=>S3,createSimplifyConstant:()=>C3,createSimplifyCore:()=>M3,createSin:()=>P0,createSinh:()=>U0,createSize:()=>ll,createSlu:()=>sv,createSmaller:()=>bl,createSmallerEq:()=>t0,createSolveODE:()=>Dh,createSort:()=>o0,createSpaClass:()=>l0,createSparse:()=>d0,createSparseMatrixClass:()=>jc,createSpeedOfLight:()=>vg,createSplitUnit:()=>Cd,createSqrt:()=>Vd,createSqrtm:()=>vv,createSquare:()=>$d,createSqueeze:()=>bh,createStd:()=>Bs,createStdTransform:()=>sM,createStefanBoltzmann:()=>rx,createStirlingS2:()=>Yv,createString:()=>Ad,createSubset:()=>Es,createSubsetTransform:()=>nM,createSubtract:()=>nl,createSubtractScalar:()=>el,createSum:()=>Ms,createSumTransform:()=>cM,createSylvester:()=>gv,createSymbolNode:()=>v2,createSymbolicEqual:()=>F3,createTan:()=>k0,createTanh:()=>q0,createTau:()=>ig,createThomsonCrossSection:()=>zg,createTo:()=>Bh,createTrace:()=>J0,createTranspose:()=>yh,createTrue:()=>Jv,createTypeOf:()=>Ed,createTyped:()=>Ec,createUnaryMinus:()=>Wc,createUnaryPlus:()=>_d,createUnequal:()=>a0,createUnitClass:()=>f0,createUnitFunction:()=>m0,createUppercaseE:()=>G3,createUppercasePi:()=>z3,createUsolve:()=>Yh,createUsolveAll:()=>Vh,createVacuumImpedance:()=>Ag,createVariance:()=>Fs,createVarianceTransform:()=>dM,createVersion:()=>hg,createWeakMixingAngle:()=>Gg,createWienDisplacement:()=>nx,createXgcd:()=>Xd,createXor:()=>ah,createZeros:()=>pl,createZeta:()=>Ch,createZpk2tf:()=>Wv});var em=Le(dc(),1);function Re(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}var cn=Math.sign||function(e){return e>0?1:e<0?-1:0},Ny=Math.log2||function(t){return Math.log(t)/Math.LN2},Ty=Math.log10||function(t){return Math.log(t)/Math.LN10},hc=Math.log1p||function(e){return Math.log(e+1)},wy=Math.cbrt||function(t){if(t===0)return t;var r=t<0,n;return r&&(t=-t),isFinite(t)?(n=Math.exp(Math.log(t)/3),n=(t/(n*n)+2*n)/3):n=t,r?-n:n},Dy=Math.expm1||function(t){return t>=2e-4||t<=-2e-4?Math.exp(t)-1:t+t*t/2+t*t*t/6};function $f(e,t,r){var n={2:"0b",8:"0o",16:"0x"},a=n[t],i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!Re(r))throw new Error("size must be an integer");if(e>2**(r-1)-1||e<-(2**(r-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!Re(e))throw new Error("Value must be an integer");e<0&&(e=e+2**r),i="i".concat(r)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(a).concat(e.toString(t)).concat(i)}function Tn(e,t){if(typeof t=="function")return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:r,precision:n,wordSize:a}=Xf(t);switch(r){case"fixed":return Kf(e,n);case"exponential":return Sy(e,n);case"engineering":return SB(e,n);case"bin":return $f(e,2,a);case"oct":return $f(e,8,a);case"hex":return $f(e,16,a);case"auto":return CB(e,n,t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Xf(e){var t="auto",r,n;if(e!==void 0)if(ze(e))r=e;else if(Ue(e))r=e.toNumber();else if(kn(e))e.precision!==void 0&&(r=Ey(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=Ey(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(t=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:t,precision:r,wordSize:n}}function Ui(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var r=t[1],n=t[2],a=parseFloat(t[4]||"0"),i=n.indexOf(".");a+=i!==-1?i-1:n.length-1;var o=n.replace(".","").replace(/^0*/,function(l){return a-=l.length,""}).replace(/0*$/,"").split("").map(function(l){return parseInt(l)});return o.length===0&&(o.push(0),a++),{sign:r,coefficients:o,exponent:a}}function SB(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=Ui(e),n=vc(r,t),a=n.exponent,i=n.coefficients,o=a%3===0?a:a<0?a-3-a%3:a-a%3;if(ze(t))for(;t>i.length||a-o+1>i.length;)i.push(0);else for(var l=Math.abs(a-o)-(i.length-1),u=0;u0;)c++,s--;var p=i.slice(c).join(""),f=ze(t)&&p.length||p.match(/[1-9]/)?"."+p:"",m=i.slice(0,c).join("")+f+"e"+(a>=0?"+":"")+o.toString();return n.sign+m}function Kf(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=Ui(e),n=typeof t=="number"?vc(r,r.exponent+1+t):r,a=n.coefficients,i=n.exponent+1,o=i+(t||0);return a.length0?"."+a.join(""):"")+"e"+(i>=0?"+":"")+i}function CB(e,t,r){if(isNaN(e)||!isFinite(e))return String(e);var n=Ay(r?.lowerExp,-3),a=Ay(r?.upperExp,5),i=Ui(e),o=t?vc(i,t):i;if(o.exponent=a)return Sy(e,t);var l=o.coefficients,u=o.exponent;l.length0?u:0;return st){var a=n.splice(t,n.length-t);if(a[0]>=5){var i=t-1;for(n[i]++;n[i]===10;)n.pop(),i===0&&(n.unshift(0),r.exponent++,i++),i--,n[i]++}}return r}function Pi(e){for(var t=[],r=0;r0?!0:e<0?!1:1/e===1/0,n=t>0?!0:t<0?!1:1/t===1/0;return r^n?-e:e}function Ey(e,t){if(ze(e))return e;if(Ue(e))return e.toNumber();t()}function Ay(e,t){return ze(e)?e:Ue(e)?e.toNumber():t}function C(e,t,r,n){function a(i){var o=gy(i,t.map(Wf));return MB(e,t,i),r(o)}return a.isFactory=!0,a.fn=e,a.dependencies=t.slice().sort(),n&&(a.meta=n),a}function Za(e){return typeof e=="function"&&typeof e.fn=="string"&&Array.isArray(e.dependencies)}function MB(e,t,r){var n=t.filter(i=>!OB(i)).every(i=>r[i]!==void 0);if(!n){var a=t.filter(i=>r[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(a.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function OB(e){return e&&e[0]==="?"}function Wf(e){return e&&e[0]==="?"?e.slice(1):e}function Ot(e,t){if(Py(e)&&By(e,t))return e[t];throw typeof e[t]=="function"&&bc(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function Hn(e,t,r){if(Py(e)&&By(e,t))return e[t]=r,r;throw new Error('No access to property "'+t+'"')}function Iy(e,t){return t in e}function By(e,t){return!e||typeof e!="object"?!1:Ie(RB,t)?!0:!(t in Object.prototype||t in Function.prototype)}function Ly(e,t){if(!bc(e,t))throw new Error('No access to method "'+t+'"');return e[t]}function bc(e,t){return e==null||typeof e[t]!="function"||Ie(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:Ie(FB,t)?!0:!(t in Object.prototype||t in Function.prototype)}function Py(e){return typeof e=="object"&&e&&e.constructor===Object}var RB={length:!0,name:!0},FB={toString:!0,valueOf:!0,toLocaleString:!0};var Ja=class{constructor(t){this.wrappedObject=t,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).values()}get(t){return Ot(this.wrappedObject,t)}set(t,r){return Hn(this.wrappedObject,t,r),this}has(t){return Iy(this.wrappedObject,t)}entries(){return Uy(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){delete this.wrappedObject[t]}clear(){for(var t of this.keys())this.delete(t)}get size(){return Object.keys(this.wrappedObject).length}},ki=class{constructor(t,r,n){this.a=t,this.b=r,this.bKeys=n,this[Symbol.iterator]=this.entries}get(t){return this.bKeys.has(t)?this.b.get(t):this.a.get(t)}set(t,r){return this.bKeys.has(t)?this.b.set(t,r):this.a.set(t,r),this}has(t){return this.b.has(t)||this.a.has(t)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return Uy(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){return this.bKeys.has(t)?this.b.delete(t):this.a.delete(t)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}};function Uy(e,t){return{next:()=>{var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}}function xa(){return new Map}function Jn(e){if(!e)return xa();if(Qf(e))return e;if(kn(e))return new Ja(e);throw new Error("createMap can create maps from objects or Maps")}function ky(e){if(e instanceof Ja)return e.wrappedObject;var t={};for(var r of e.keys()){var n=e.get(r);Hn(t,r,n)}return t}function Qf(e){return e?e instanceof Map||e instanceof Ja||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var qy=function(){return qy=em.default.create,em.default},IB=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],Ec=C("typed",IB,function(t){var{BigNumber:r,Complex:n,DenseMatrix:a,Fraction:i}=t,o=qy();return o.clear(),o.addTypes([{name:"number",test:ze},{name:"Complex",test:Zt},{name:"BigNumber",test:Ue},{name:"Fraction",test:$r},{name:"Unit",test:$t},{name:"identifier",test:l=>It&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(l)},{name:"string",test:It},{name:"Chain",test:Ii},{name:"Array",test:at},{name:"Matrix",test:Fe},{name:"DenseMatrix",test:Zn},{name:"SparseMatrix",test:Xr},{name:"Range",test:ga},{name:"Index",test:Un},{name:"boolean",test:Ju},{name:"ResultSet",test:ec},{name:"Help",test:Fi},{name:"function",test:tc},{name:"Date",test:rc},{name:"RegExp",test:nc},{name:"null",test:ac},{name:"undefined",test:ic},{name:"AccessorNode",test:wr},{name:"ArrayNode",test:Jt},{name:"AssignmentNode",test:oc},{name:"BlockNode",test:sc},{name:"ConditionalNode",test:uc},{name:"ConstantNode",test:et},{name:"FunctionNode",test:pr},{name:"FunctionAssignmentNode",test:sn},{name:"IndexNode",test:Rr},{name:"Node",test:nt},{name:"ObjectNode",test:qn},{name:"OperatorNode",test:Tt},{name:"ParenthesisNode",test:er},{name:"RangeNode",test:cc},{name:"RelationalNode",test:lc},{name:"SymbolNode",test:bt},{name:"Map",test:Qf},{name:"Object",test:kn}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(u){if(r||Zf(u),Cy(u)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+u+"). Use function bignumber(x) to convert to BigNumber.");return new r(u)}},{from:"number",to:"Complex",convert:function(u){return n||yc(u),new n(u,0)}},{from:"BigNumber",to:"Complex",convert:function(u){return n||yc(u),new n(u.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(u){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(u){return n||yc(u),new n(u.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(u){i||Jf(u);var s=new i(u);if(s.valueOf()!==u)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+u+"). Use function fraction(x) to convert to Fraction.");return s}},{from:"string",to:"number",convert:function(u){var s=Number(u);if(isNaN(s))throw new Error('Cannot convert "'+u+'" to a number');return s}},{from:"string",to:"BigNumber",convert:function(u){r||Zf(u);try{return new r(u)}catch{throw new Error('Cannot convert "'+u+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(u){i||Jf(u);try{return new i(u)}catch{throw new Error('Cannot convert "'+u+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(u){n||yc(u);try{return new n(u)}catch{throw new Error('Cannot convert "'+u+'" to Complex')}}},{from:"boolean",to:"number",convert:function(u){return+u}},{from:"boolean",to:"BigNumber",convert:function(u){return r||Zf(u),new r(+u)}},{from:"boolean",to:"Fraction",convert:function(u){return i||Jf(u),new i(+u)}},{from:"boolean",to:"string",convert:function(u){return String(u)}},{from:"Array",to:"Matrix",convert:function(u){return a||BB(),new a(u)}},{from:"Matrix",to:"Array",convert:function(u){return u.valueOf()}}]),o.onMismatch=(l,u,s)=>{var c=o.createError(l,u,s);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Lt(u[0])&&s.some(f=>!f.params.includes(","))){var p=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw p.data=c.data,p}throw c},o.onMismatch=(l,u,s)=>{var c=o.createError(l,u,s);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Lt(u[0])&&s.some(f=>!f.params.includes(","))){var p=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw p.data=c.data,p}throw c},o});function Zf(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function yc(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function BB(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function Jf(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var LB="ResultSet",PB=[],tm=C(LB,PB,()=>{function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0});var qi=9e15,Aa=1e9,rm="0123456789abcdef",Nc="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Tc="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",nm={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-qi,maxE:qi,crypto:!1},Yy,ea,it=!0,Dc="[DecimalError] ",Ea=Dc+"Invalid argument: ",jy=Dc+"Precision limit exceeded",Vy=Dc+"crypto unavailable",$y="[object Decimal]",vr=Math.floor,tr=Math.pow,UB=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,kB=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,qB=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Xy=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dn=1e7,tt=7,HB=9007199254740991,zB=Nc.length-1,am=Tc.length-1,Se={toStringTag:$y};Se.absoluteValue=Se.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),Ke(e)};Se.ceil=function(){return Ke(new this.constructor(this),this.e+1,2)};Se.clampedTo=Se.clamp=function(e,t){var r,n=this,a=n.constructor;if(e=new a(e),t=new a(t),!e.s||!t.s)return new a(NaN);if(e.gt(t))throw Error(Ea+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new a(n)};Se.comparedTo=Se.cmp=function(e){var t,r,n,a,i=this,o=i.d,l=(e=new i.constructor(e)).d,u=i.s,s=e.s;if(!o||!l)return!u||!s?NaN:u!==s?u:o===l?0:!o^u<0?1:-1;if(!o[0]||!l[0])return o[0]?u:l[0]?-s:0;if(u!==s)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=o.length,a=l.length,t=0,r=nl[t]^u<0?1:-1;return n===a?0:n>a^u<0?1:-1};Se.cosine=Se.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+tt,n.rounding=1,r=GB(n,Jy(n,r)),n.precision=e,n.rounding=t,Ke(ea==2||ea==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};Se.cubeRoot=Se.cbrt=function(){var e,t,r,n,a,i,o,l,u,s,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(it=!1,i=c.s*tr(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=fr(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=tr(r,1/3),e=vr((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new p(r),n.s=c.s):n=new p(i.toString()),o=(e=p.precision)+3;;)if(l=n,u=l.times(l).times(l),s=u.plus(c),n=Rt(s.plus(c).times(l),s.plus(u),o+2,1),fr(l.d).slice(0,o)===(r=fr(n.d)).slice(0,o))if(r=r.slice(o-3,o+1),r=="9999"||!a&&r=="4999"){if(!a&&(Ke(l,e+1,0),l.times(l).times(l).eq(c))){n=l;break}o+=4,a=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(Ke(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return it=!0,Ke(n,e,p.rounding,t)};Se.decimalPlaces=Se.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-vr(this.e/tt))*tt,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};Se.dividedBy=Se.div=function(e){return Rt(this,new this.constructor(e))};Se.dividedToIntegerBy=Se.divToInt=function(e){var t=this,r=t.constructor;return Ke(Rt(t,new r(e),0,1,1),r.precision,r.rounding)};Se.equals=Se.eq=function(e){return this.cmp(e)===0};Se.floor=function(){return Ke(new this.constructor(this),this.e+1,3)};Se.greaterThan=Se.gt=function(e){return this.cmp(e)>0};Se.greaterThanOrEqualTo=Se.gte=function(e){var t=this.cmp(e);return t==1||t===0};Se.hyperbolicCosine=Se.cosh=function(){var e,t,r,n,a,i=this,o=i.constructor,l=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return l;r=o.precision,n=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,a=i.d.length,a<32?(e=Math.ceil(a/3),t=(1/Cc(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Hi(o,1,i.times(t),new o(1),!0);for(var u,s=e,c=new o(8);s--;)u=i.times(i),i=l.minus(u.times(c.minus(u.times(c))));return Ke(i,o.precision=r,o.rounding=n,!0)};Se.hyperbolicSine=Se.sinh=function(){var e,t,r,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=Hi(i,2,a,a,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,a=a.times(1/Cc(5,e)),a=Hi(i,2,a,a,!0);for(var o,l=new i(5),u=new i(16),s=new i(20);e--;)o=a.times(a),a=a.times(l.plus(o.times(u.times(o).plus(s))))}return i.precision=t,i.rounding=r,Ke(a,t,r,!0)};Se.hyperbolicTangent=Se.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,Rt(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};Se.inverseCosine=Se.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),a=r.precision,i=r.rounding;return n!==-1?n===0?t.isNeg()?wn(r,a,i):new r(0):new r(NaN):t.isZero()?wn(r,a+4,i).times(.5):(r.precision=a+6,r.rounding=1,t=t.asin(),e=wn(r,a+4,i).times(.5),r.precision=a,r.rounding=i,e.minus(t))};Se.inverseHyperbolicCosine=Se.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,it=!1,r=r.times(r).minus(1).sqrt().plus(r),it=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};Se.inverseHyperbolicSine=Se.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,it=!1,r=r.times(r).plus(1).sqrt().plus(r),it=!0,n.precision=e,n.rounding=t,r.ln())};Se.inverseHyperbolicTangent=Se.atanh=function(){var e,t,r,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(e=i.precision,t=i.rounding,n=a.sd(),Math.max(n,e)<2*-a.e-1?Ke(new i(a),e,t,!0):(i.precision=r=n-a.e,a=Rt(a.plus(1),new i(1).minus(a),r+e,1),i.precision=e+4,i.rounding=1,a=a.ln(),i.precision=e,i.rounding=t,a.times(.5))):new i(NaN)};Se.inverseSine=Se.asin=function(){var e,t,r,n,a=this,i=a.constructor;return a.isZero()?new i(a):(t=a.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=wn(i,r+4,n).times(.5),e.s=a.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,a.times(2)))};Se.inverseTangent=Se.atan=function(){var e,t,r,n,a,i,o,l,u,s=this,c=s.constructor,p=c.precision,f=c.rounding;if(s.isFinite()){if(s.isZero())return new c(s);if(s.abs().eq(1)&&p+4<=am)return o=wn(c,p+4,f).times(.25),o.s=s.s,o}else{if(!s.s)return new c(NaN);if(p+4<=am)return o=wn(c,p+4,f).times(.5),o.s=s.s,o}for(c.precision=l=p+10,c.rounding=1,r=Math.min(28,l/tt+2|0),e=r;e;--e)s=s.div(s.times(s).plus(1).sqrt().plus(1));for(it=!1,t=Math.ceil(l/tt),n=1,u=s.times(s),o=new c(s),a=s;e!==-1;)if(a=a.times(u),i=o.minus(a.div(n+=2)),a=a.times(u),o=i.plus(a.div(n+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===i.d[e]&&e--;);return r&&(o=o.times(2<this.d.length-2};Se.isNaN=function(){return!this.s};Se.isNegative=Se.isNeg=function(){return this.s<0};Se.isPositive=Se.isPos=function(){return this.s>0};Se.isZero=function(){return!!this.d&&this.d[0]===0};Se.lessThan=Se.lt=function(e){return this.cmp(e)<0};Se.lessThanOrEqualTo=Se.lte=function(e){return this.cmp(e)<1};Se.logarithm=Se.log=function(e){var t,r,n,a,i,o,l,u,s=this,c=s.constructor,p=c.precision,f=c.rounding,m=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=s.d,s.s<0||!r||!r[0]||s.eq(1))return new c(r&&!r[0]?-1/0:s.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(a=r[0];a%10===0;)a/=10;i=a!==1}if(it=!1,l=p+m,o=ya(s,l),n=t?wc(c,l+10):ya(e,l),u=Rt(o,n,l,1),rs(u.d,a=p,f))do if(l+=10,o=ya(s,l),n=t?wc(c,l+10):ya(e,l),u=Rt(o,n,l,1),!i){+fr(u.d).slice(a+1,a+15)+1==1e14&&(u=Ke(u,p+1,0));break}while(rs(u.d,a+=10,f));return it=!0,Ke(u,p,f)};Se.minus=Se.sub=function(e){var t,r,n,a,i,o,l,u,s,c,p,f,m=this,h=m.constructor;if(e=new h(e),!m.d||!e.d)return!m.s||!e.s?e=new h(NaN):m.d?e.s=-e.s:e=new h(e.d||m.s!==e.s?m:NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(s=m.d,f=e.d,l=h.precision,u=h.rounding,!s[0]||!f[0]){if(f[0])e.s=-e.s;else if(s[0])e=new h(m);else return new h(u===3?-0:0);return it?Ke(e,l,u):e}if(r=vr(e.e/tt),c=vr(m.e/tt),s=s.slice(),i=c-r,i){for(p=i<0,p?(t=s,i=-i,o=f.length):(t=f,r=c,o=s.length),n=Math.max(Math.ceil(l/tt),o)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=s.length,o=f.length,p=n0;--n)s[o++]=0;for(n=f.length;n>i;){if(s[--n]o?i+1:o+1,a>o&&(a=o,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(o=s.length,a=c.length,o-a<0&&(a=o,r=c,c=s,s=r),t=0;a;)t=(s[--a]=s[a]+c[a]+t)/Dn|0,s[a]%=Dn;for(t&&(s.unshift(t),++n),o=s.length;s[--o]==0;)s.pop();return e.d=s,e.e=Sc(s,n),it?Ke(e,l,u):e};Se.precision=Se.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ea+e);return r.d?(t=Ky(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};Se.round=function(){var e=this,t=e.constructor;return Ke(new t(e),e.e+1,t.rounding)};Se.sine=Se.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+tt,n.rounding=1,r=jB(n,Jy(n,r)),n.precision=e,n.rounding=t,Ke(ea>2?r.neg():r,e,t,!0)):new n(NaN)};Se.squareRoot=Se.sqrt=function(){var e,t,r,n,a,i,o=this,l=o.d,u=o.e,s=o.s,c=o.constructor;if(s!==1||!l||!l[0])return new c(!s||s<0&&(!l||l[0])?NaN:l?o:1/0);for(it=!1,s=Math.sqrt(+o),s==0||s==1/0?(t=fr(l),(t.length+u)%2==0&&(t+="0"),s=Math.sqrt(t),u=vr((u+1)/2)-(u<0||u%2),s==1/0?t="5e"+u:(t=s.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new c(t)):n=new c(s.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(Rt(o,i,r+2,1)).times(.5),fr(i.d).slice(0,r)===(t=fr(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!a&&t=="4999"){if(!a&&(Ke(i,u+1,0),i.times(i).eq(o))){n=i;break}r+=4,a=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(Ke(n,u+1,1),e=!n.times(n).eq(o));break}return it=!0,Ke(n,u,c.rounding,e)};Se.tangent=Se.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=Rt(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,Ke(ea==2||ea==4?r.neg():r,e,t,!0)):new n(NaN)};Se.times=Se.mul=function(e){var t,r,n,a,i,o,l,u,s,c=this,p=c.constructor,f=c.d,m=(e=new p(e)).d;if(e.s*=c.s,!f||!f[0]||!m||!m[0])return new p(!e.s||f&&!f[0]&&!m||m&&!m[0]&&!f?NaN:!f||!m?e.s/0:e.s*0);for(r=vr(c.e/tt)+vr(e.e/tt),u=f.length,s=m.length,u=0;){for(t=0,a=u+n;a>n;)l=i[a]+m[n]*f[a-n-1]+t,i[a--]=l%Dn|0,t=l/Dn|0;i[a]=(i[a]+t)%Dn|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=Sc(i,r),it?Ke(e,p.precision,p.rounding):e};Se.toBinary=function(e,t){return sm(this,2,e,t)};Se.toDecimalPlaces=Se.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Fr(e,0,Aa),t===void 0?t=n.rounding:Fr(t,0,8),Ke(r,e+r.e+1,t))};Se.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=zn(n,!0):(Fr(e,0,Aa),t===void 0?t=a.rounding:Fr(t,0,8),n=Ke(new a(n),e+1,t),r=zn(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};Se.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?r=zn(a):(Fr(e,0,Aa),t===void 0?t=i.rounding:Fr(t,0,8),n=Ke(new i(a),e+a.e+1,t),r=zn(n,!1,e+n.e+1)),a.isNeg()&&!a.isZero()?"-"+r:r};Se.toFraction=function(e){var t,r,n,a,i,o,l,u,s,c,p,f,m=this,h=m.d,d=m.constructor;if(!h)return new d(m);if(s=r=new d(1),n=u=new d(0),t=new d(n),i=t.e=Ky(h)-m.e-1,o=i%tt,t.d[0]=tr(10,o<0?tt+o:o),e==null)e=i>0?t:s;else{if(l=new d(e),!l.isInt()||l.lt(s))throw Error(Ea+l);e=l.gt(t)?i>0?t:s:l}for(it=!1,l=new d(fr(h)),c=d.precision,d.precision=i=h.length*tt*2;p=Rt(l,t,0,1,1),a=r.plus(p.times(n)),a.cmp(e)!=1;)r=n,n=a,a=s,s=u.plus(p.times(a)),u=a,a=t,t=l.minus(p.times(a)),l=a;return a=Rt(e.minus(r),n,0,1,1),u=u.plus(a.times(s)),r=r.plus(a.times(n)),u.s=s.s=m.s,f=Rt(s,n,i,1).minus(m).abs().cmp(Rt(u,r,i,1).minus(m).abs())<1?[s,n]:[u,r],d.precision=c,it=!0,f};Se.toHexadecimal=Se.toHex=function(e,t){return sm(this,16,e,t)};Se.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:Fr(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(it=!1,r=Rt(r,e,0,t,1).times(e),it=!0,Ke(r)):(e.s=r.s,r=e),r};Se.toNumber=function(){return+this};Se.toOctal=function(e,t){return sm(this,8,e,t)};Se.toPower=Se.pow=function(e){var t,r,n,a,i,o,l=this,u=l.constructor,s=+(e=new u(e));if(!l.d||!e.d||!l.d[0]||!e.d[0])return new u(tr(+l,s));if(l=new u(l),l.eq(1))return l;if(n=u.precision,i=u.rounding,e.eq(1))return Ke(l,n,i);if(t=vr(e.e/tt),t>=e.d.length-1&&(r=s<0?-s:s)<=HB)return a=Wy(u,l,r,n),e.s<0?new u(1).div(a):Ke(a,n,i);if(o=l.s,o<0){if(tu.maxE+1||t0?o/0:0):(it=!1,u.rounding=l.s=1,r=Math.min(12,(t+"").length),a=im(e.times(ya(l,n+r)),n),a.d&&(a=Ke(a,n+5,1),rs(a.d,n,i)&&(t=n+10,a=Ke(im(e.times(ya(l,t+r)),t),t+5,1),+fr(a.d).slice(n+1,n+15)+1==1e14&&(a=Ke(a,n+1,0)))),a.s=o,it=!0,u.rounding=i,Ke(a,n,i))};Se.toPrecision=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=zn(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(Fr(e,1,Aa),t===void 0?t=a.rounding:Fr(t,0,8),n=Ke(new a(n),e,t),r=zn(n,e<=n.e||n.e<=a.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};Se.toSignificantDigits=Se.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Fr(e,1,Aa),t===void 0?t=n.rounding:Fr(t,0,8)),Ke(new n(r),e,t)};Se.toString=function(){var e=this,t=e.constructor,r=zn(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};Se.truncated=Se.trunc=function(){return Ke(new this.constructor(this),this.e+1,1)};Se.valueOf=Se.toJSON=function(){var e=this,t=e.constructor,r=zn(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function fr(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;tr)throw Error(Ea+e)}function rs(e,t,r,n){var a,i,o,l;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=tt,a=0):(a=Math.ceil((t+1)/tt),t%=tt),i=tr(10,tt-t),l=e[a]%i|0,n==null?t<3?(t==0?l=l/100|0:t==1&&(l=l/10|0),o=r<4&&l==99999||r>3&&l==49999||l==5e4||l==0):o=(r<4&&l+1==i||r>3&&l+1==i/2)&&(e[a+1]/i/100|0)==tr(10,t-2)-1||(l==i/2||l==0)&&(e[a+1]/i/100|0)==0:t<4?(t==0?l=l/1e3|0:t==1?l=l/100|0:t==2&&(l=l/10|0),o=(n||r<4)&&l==9999||!n&&r>3&&l==4999):o=((n||r<4)&&l+1==i||!n&&r>3&&l+1==i/2)&&(e[a+1]/i/1e3|0)==tr(10,t-3)-1,o}function Ac(e,t,r){for(var n,a=[0],i,o=0,l=e.length;or-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function GB(e,t){var r,n,a;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),a=(1/Cc(4,r)).toString()):(r=16,a="2.3283064365386962890625e-10"),e.precision+=r,t=Hi(e,1,t.times(a),new e(1));for(var i=r;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=r,t}var Rt=function(){function e(n,a,i){var o,l=0,u=n.length;for(n=n.slice();u--;)o=n[u]*a+l,n[u]=o%i|0,l=o/i|0;return l&&n.unshift(l),n}function t(n,a,i,o){var l,u;if(i!=o)u=i>o?1:-1;else for(l=u=0;la[l]?1:-1;break}return u}function r(n,a,i,o){for(var l=0;i--;)n[i]-=l,l=n[i]1;)n.shift()}return function(n,a,i,o,l,u){var s,c,p,f,m,h,d,v,x,N,g,y,E,b,S,A,w,D,F,R,P=n.constructor,U=n.s==a.s?1:-1,k=n.d,M=a.d;if(!k||!k[0]||!M||!M[0])return new P(!n.s||!a.s||(k?M&&k[0]==M[0]:!M)?NaN:k&&k[0]==0||!M?U*0:U/0);for(u?(m=1,c=n.e-a.e):(u=Dn,m=tt,c=vr(n.e/m)-vr(a.e/m)),F=M.length,w=k.length,x=new P(U),N=x.d=[],p=0;M[p]==(k[p]||0);p++);if(M[p]>(k[p]||0)&&c--,i==null?(b=i=P.precision,o=P.rounding):l?b=i+(n.e-a.e)+1:b=i,b<0)N.push(1),h=!0;else{if(b=b/m+2|0,p=0,F==1){for(f=0,M=M[0],b++;(p1&&(M=e(M,f,u),k=e(k,f,u),F=M.length,w=k.length),A=F,g=k.slice(0,F),y=g.length;y=u/2&&++D;do f=0,s=t(M,g,F,y),s<0?(E=g[0],F!=y&&(E=E*u+(g[1]||0)),f=E/D|0,f>1?(f>=u&&(f=u-1),d=e(M,f,u),v=d.length,y=g.length,s=t(d,g,v,y),s==1&&(f--,r(d,F=10;f/=10)p++;x.e=p+c*m-1,Ke(x,l?i+x.e+1:i,o,h)}return x}}();function Ke(e,t,r,n){var a,i,o,l,u,s,c,p,f,m=e.constructor;e:if(t!=null){if(p=e.d,!p)return e;for(a=1,l=p[0];l>=10;l/=10)a++;if(i=t-a,i<0)i+=tt,o=t,c=p[f=0],u=c/tr(10,a-o-1)%10|0;else if(f=Math.ceil((i+1)/tt),l=p.length,f>=l)if(n){for(;l++<=f;)p.push(0);c=u=0,a=1,i%=tt,o=i-tt+1}else break e;else{for(c=l=p[f],a=1;l>=10;l/=10)a++;i%=tt,o=i-tt+a,u=o<0?0:c/tr(10,a-o-1)%10|0}if(n=n||t<0||p[f+1]!==void 0||(o<0?c:c%tr(10,a-o-1)),s=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?o>0?c/tr(10,a-o):0:p[f-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,s?(t-=e.e+1,p[0]=tr(10,(tt-t%tt)%tt),e.e=-t||0):p[0]=e.e=0,e;if(i==0?(p.length=f,l=1,f--):(p.length=f+1,l=tr(10,tt-i),p[f]=o>0?(c/tr(10,a-o)%tr(10,o)|0)*l:0),s)for(;;)if(f==0){for(i=1,o=p[0];o>=10;o/=10)i++;for(o=p[0]+=l,l=1;o>=10;o/=10)l++;i!=l&&(e.e++,p[0]==Dn&&(p[0]=1));break}else{if(p[f]+=l,p[f]!=Dn)break;p[f--]=0,l=1}for(i=p.length;p[--i]===0;)p.pop()}return it&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+ba(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):a<0?(i="0."+ba(-a-1)+i,r&&(n=r-o)>0&&(i+=ba(n))):a>=o?(i+=ba(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+ba(n))):((n=a+1)0&&(a+1===o&&(i+="."),i+=ba(n))),i}function Sc(e,t){var r=e[0];for(t*=tt;r>=10;r/=10)t++;return t}function wc(e,t,r){if(t>zB)throw it=!0,r&&(e.precision=r),Error(jy);return Ke(new e(Nc),t,1,!0)}function wn(e,t,r){if(t>am)throw Error(jy);return Ke(new e(Tc),t,r,!0)}function Ky(e){var t=e.length-1,r=t*tt+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ba(e){for(var t="";e--;)t+="0";return t}function Wy(e,t,r,n){var a,i=new e(1),o=Math.ceil(n/tt+4);for(it=!1;;){if(r%2&&(i=i.times(t),zy(i.d,o)&&(a=!0)),r=vr(r/2),r===0){r=i.d.length-1,a&&i.d[r]===0&&++i.d[r];break}t=t.times(t),zy(t.d,o)}return it=!0,i}function Hy(e){return e.d[e.d.length-1]&1}function Qy(e,t,r){for(var n,a=new e(t[0]),i=0;++i17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(it=!1,u=h):u=t,l=new f(.03125);e.e>-2;)e=e.times(l),p+=5;for(n=Math.log(tr(2,p))/Math.LN10*2+5|0,u+=n,r=i=o=new f(1),f.precision=u;;){if(i=Ke(i.times(e),u,1),r=r.times(++c),l=o.plus(Rt(i,r,u,1)),fr(l.d).slice(0,u)===fr(o.d).slice(0,u)){for(a=p;a--;)o=Ke(o.times(o),u,1);if(t==null)if(s<3&&rs(o.d,u-n,m,s))f.precision=u+=10,r=i=l=new f(1),c=0,s++;else return Ke(o,f.precision=h,m,it=!0);else return f.precision=h,o}o=l}}function ya(e,t){var r,n,a,i,o,l,u,s,c,p,f,m=1,h=10,d=e,v=d.d,x=d.constructor,N=x.rounding,g=x.precision;if(d.s<0||!v||!v[0]||!d.e&&v[0]==1&&v.length==1)return new x(v&&!v[0]?-1/0:d.s!=1?NaN:v?0:d);if(t==null?(it=!1,c=g):c=t,x.precision=c+=h,r=fr(v),n=r.charAt(0),Math.abs(i=d.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)d=d.times(e),r=fr(d.d),n=r.charAt(0),m++;i=d.e,n>1?(d=new x("0."+r),i++):d=new x(n+"."+r.slice(1))}else return s=wc(x,c+2,g).times(i+""),d=ya(new x(n+"."+r.slice(1)),c-h).plus(s),x.precision=g,t==null?Ke(d,g,N,it=!0):d;for(p=d,u=o=d=Rt(d.minus(1),d.plus(1),c,1),f=Ke(d.times(d),c,1),a=3;;){if(o=Ke(o.times(f),c,1),s=u.plus(Rt(o,new x(a),c,1)),fr(s.d).slice(0,c)===fr(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(wc(x,c+2,g).times(i+""))),u=Rt(u,new x(m),c,1),t==null)if(rs(u.d,c-h,N,l))x.precision=c+=h,s=o=d=Rt(p.minus(1),p.plus(1),c,1),f=Ke(d.times(d),c,1),a=l=1;else return Ke(u,x.precision=g,N,it=!0);else return x.precision=g,u;u=s,a+=2}}function Zy(e){return String(e.s*e.s/0)}function om(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(a=t.length;t.charCodeAt(a-1)===48;--a);if(t=t.slice(n,a),t){if(a-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%tt,r<0&&(n+=tt),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Xy.test(t))return om(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(kB.test(t))r=16,t=t.toLowerCase();else if(UB.test(t))r=2;else if(qB.test(t))r=8;else throw Error(Ea+t);for(i=t.search(/p/i),i>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),o=i>=0,n=e.constructor,o&&(t=t.replace(".",""),l=t.length,i=l-i,a=Wy(n,new n(r),i,i*2)),s=Ac(t,r,Dn),c=s.length-1,i=c;s[i]===0;--i)s.pop();return i<0?new n(e.s*0):(e.e=Sc(s,c),e.d=s,it=!1,o&&(e=Rt(e,a,l*4)),u&&(e=e.times(Math.abs(u)<54?tr(2,u):ns.pow(2,u))),it=!0,e)}function jB(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Hi(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Cc(5,r)),t=Hi(e,2,t,t);for(var a,i=new e(5),o=new e(16),l=new e(20);r--;)a=t.times(t),t=t.times(i.plus(a.times(o.times(a).minus(l))));return t}function Hi(e,t,r,n,a){var i,o,l,u,s=1,c=e.precision,p=Math.ceil(c/tt);for(it=!1,u=r.times(r),l=new e(n);;){if(o=Rt(l.times(u),new e(t++*t++),c,1),l=a?n.plus(o):n.minus(o),n=Rt(o.times(u),new e(t++*t++),c,1),o=l.plus(n),o.d[p]!==void 0){for(i=p;o.d[i]===l.d[i]&&i--;);if(i==-1)break}i=l,l=n,n=o,o=i,s++}return it=!0,o.d.length=p+1,o}function Cc(e,t){for(var r=e;--t;)r*=e;return r}function Jy(e,t){var r,n=t.s<0,a=wn(e,e.precision,1),i=a.times(.5);if(t=t.abs(),t.lte(i))return ea=n?4:1,t;if(r=t.divToInt(a),r.isZero())ea=n?3:2;else{if(t=t.minus(r.times(a)),t.lte(i))return ea=Hy(r)?n?2:3:n?4:1,t;ea=Hy(r)?n?1:4:n?3:2}return t.minus(a).abs()}function sm(e,t,r,n){var a,i,o,l,u,s,c,p,f,m=e.constructor,h=r!==void 0;if(h?(Fr(r,1,Aa),n===void 0?n=m.rounding:Fr(n,0,8)):(r=m.precision,n=m.rounding),!e.isFinite())c=Zy(e);else{for(c=zn(e),o=c.indexOf("."),h?(a=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):a=t,o>=0&&(c=c.replace(".",""),f=new m(1),f.e=c.length-o,f.d=Ac(zn(f),10,a),f.e=f.d.length),p=Ac(c,10,a),i=u=p.length;p[--u]==0;)p.pop();if(!p[0])c=h?"0p+0":"0";else{if(o<0?i--:(e=new m(e),e.d=p,e.e=i,e=Rt(e,f,r,n,0,a),p=e.d,i=e.e,s=Yy),o=p[r],l=a/2,s=s||p[r+1]!==void 0,s=n<4?(o!==void 0||s)&&(n===0||n===(e.s<0?3:2)):o>l||o===l&&(n===4||s||n===6&&p[r-1]&1||n===(e.s<0?8:7)),p.length=r,s)for(;++p[--r]>a-1;)p[r]=0,r||(++i,p.unshift(1));for(u=p.length;!p[u-1];--u);for(o=0,c="";o1)if(t==16||t==8){for(o=t==16?4:3,--u;u%o;u++)c+="0";for(p=Ac(c,a,t),u=p.length;!p[u-1];--u);for(o=1,c="1.";ou)for(i-=u;i--;)c+="0";else it)return e.length=t,!0}function VB(e){return new this(e).abs()}function $B(e){return new this(e).acos()}function XB(e){return new this(e).acosh()}function KB(e,t){return new this(e).plus(t)}function WB(e){return new this(e).asin()}function QB(e){return new this(e).asinh()}function ZB(e){return new this(e).atan()}function JB(e){return new this(e).atanh()}function eL(e,t){e=new this(e),t=new this(t);var r,n=this.precision,a=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=wn(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?wn(this,n,a):new this(0),r.s=e.s):!e.d||t.isZero()?(r=wn(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(Rt(e,t,i,1)),t=wn(this,i,1),this.precision=n,this.rounding=a,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(Rt(e,t,i,1)),r}function tL(e){return new this(e).cbrt()}function rL(e){return Ke(e=new this(e),e.e+1,2)}function nL(e,t,r){return new this(e).clamp(t,r)}function aL(e){if(!e||typeof e!="object")throw Error(Dc+"Object expected");var t,r,n,a=e.defaults===!0,i=["precision",1,Aa,"rounding",0,8,"toExpNeg",-qi,0,"toExpPos",0,qi,"maxE",0,qi,"minE",-qi,0,"modulo",0,9];for(t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ea+r+": "+n);if(r="crypto",a&&(this[r]=nm[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(Vy);else this[r]=!1;else throw Error(Ea+r+": "+n);return this}function iL(e){return new this(e).cos()}function oL(e){return new this(e).cosh()}function eE(e){var t,r,n;function a(i){var o,l,u,s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,Gy(i)){s.s=i.s,it?!i.d||i.e>a.maxE?(s.e=NaN,s.d=null):i.e=10;l/=10)o++;it?o>a.maxE?(s.e=NaN,s.d=null):o=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:l[i++]=a%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i=214e7?crypto.randomBytes(4).copy(t,i):(l.push(a%1e7),i+=4);i=n/4}else throw Error(Vy);else for(;i=10;a/=10)n++;n{var{on:t,config:r}=e,n=ei.clone({precision:r.precision,modulo:ei.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(a){return new n(a.value)},t&&t("config",function(a,i){a.precision!==i.precision&&n.config({precision:a.precision})}),n},{isClass:!0});var ar=Le(rE(),1);var FL="Complex",IL=[],Mc=C(FL,IL,()=>(Object.defineProperty(ar.default,"name",{value:"Complex"}),ar.default.prototype.constructor=ar.default,ar.default.prototype.type="Complex",ar.default.prototype.isComplex=!0,ar.default.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},ar.default.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},ar.default.prototype.format=function(e){var t="",r=this.im,n=this.re,a=Tn(this.re,e),i=Tn(this.im,e),o=ze(e)?e:e?e.precision:null;if(o!==null){var l=Math.pow(10,-o);Math.abs(n/r)t.re?1:e.ret.im?1:e.im(Object.defineProperty(Gn.default,"name",{value:"Fraction"}),Gn.default.prototype.constructor=Gn.default,Gn.default.prototype.type="Fraction",Gn.default.prototype.isFraction=!0,Gn.default.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Gn.default.fromJSON=function(e){return new Gn.default(e)},Gn.default),{isClass:!0});var PL="Range",UL=[],lm=C(PL,UL,()=>{function e(t,r,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var a=t!=null,i=r!=null,o=n!=null;if(a){if(Ue(t))t=t.toNumber();else if(typeof t!="number")throw new TypeError("Parameter start must be a number")}if(i){if(Ue(r))r=r.toNumber();else if(typeof r!="number")throw new TypeError("Parameter end must be a number")}if(o){if(Ue(n))n=n.toNumber();else if(typeof n!="number")throw new TypeError("Parameter step must be a number")}this.start=a?parseFloat(t):0,this.end=i?parseFloat(r):0,this.step=o?parseFloat(n):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(t){if(typeof t!="string")return null;var r=t.split(":"),n=r.map(function(i){return parseFloat(i)}),a=n.some(function(i){return isNaN(i)});if(a)return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var t=0,r=this.start,n=this.step,a=this.end,i=a-r;return cn(n)===cn(i)?t=Math.ceil(i/n):i===0&&(t=0),isNaN(t)&&(t=0),[t]},e.prototype.min=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start:this.start+(t-1)*this.step},e.prototype.max=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start+(t-1)*this.step:this.start},e.prototype.forEach=function(t){var r=this.start,n=this.step,a=this.end,i=0;if(n>0)for(;ra;)t(r,[i],this),r+=n,i++},e.prototype.map=function(t){var r=[];return this.forEach(function(n,a,i){r[a[0]]=t(n,a,i)}),r},e.prototype.toArray=function(){var t=[];return this.forEach(function(r,n){t[n[0]]=r}),t},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(t){var r=Tn(this.start,t);return this.step!==1&&(r+=":"+Tn(this.step,t)),r+=":"+Tn(this.end,t),r},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(t){return new e(t.start,t.end,t.step)},e},{isClass:!0});var kL="Matrix",qL=[],Rc=C(kL,qL,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(t,r){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(t,r,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(t,r,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(t,r){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(t,r){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(t,r){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});var pE=Le(va(),1);function pm(e,t,r){var n=e.constructor,a=new n(2),i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!Re(r))throw new Error("size must be an integer");if(e.greaterThan(a.pow(r-1).sub(1))||e.lessThan(a.pow(r-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(a.pow(r))),i="i".concat(r)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function sE(e,t){if(typeof t=="function")return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:r,precision:n,wordSize:a}=Xf(t);switch(r){case"fixed":return zL(e,n);case"exponential":return iE(e,n);case"engineering":return HL(e,n);case"bin":return pm(e,2,a);case"oct":return pm(e,8,a);case"hex":return pm(e,16,a);case"auto":{var i=oE(t?.lowerExp,-3),o=oE(t?.upperExp,5);if(e.isZero())return"0";var l,u=e.toSignificantDigits(n),s=u.e;return s>=i&&s=0?"+":"")+n.toString()}function iE(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function zL(e,t){return e.toFixed(t)}function oE(e,t){return ze(e)?e:Ue(e)?e.toNumber():t}function cE(e,t){var r=e.length-t.length,n=e.length;return e.substring(r,n)===t}function je(e,t){var r=GL(e,t);return t&&typeof t=="object"&&"truncate"in t&&r.length>t.truncate?r.substring(0,t.truncate-3)+"...":r}function GL(e,t){if(typeof e=="number")return Tn(e,t);if(Ue(e))return sE(e,t);if(YL(e))return!t||t.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return lE(e,t);if(It(e))return ti(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var r=Object.keys(e).map(n=>ti(n)+": "+je(e[n],t));return"{"+r.join(", ")+"}"}return String(e)}function ti(e){for(var t=String(e),r="",n=0;n/g,">"),t}function lE(e,t){if(Array.isArray(e)){for(var r="[",n=e.length,a=0;at?1:-1}function Ve(e,t,r){if(!(this instanceof Ve))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=new Error().stack}Ve.prototype=new RangeError;Ve.prototype.constructor=RangeError;Ve.prototype.name="DimensionError";Ve.prototype.isDimensionError=!0;function nr(e,t,r){if(!(this instanceof nr))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=r),this.min!==void 0&&this.index=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}nr.prototype=new RangeError;nr.prototype.constructor=RangeError;nr.prototype.name="IndexError";nr.prototype.isIndexError=!0;function Ge(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function fE(e,t,r){var n,a=e.length;if(a!==t[r])throw new Ve(a,t[r]);if(r")}function mm(e,t){var r=t.length===0;if(r){if(Array.isArray(e))throw new Ve(e.length,0)}else fE(e,t,0)}function as(e,t){var r=e.isMatrix?e._size:Ge(e),n=t._sourceSize;n.forEach((a,i)=>{if(a!==null&&a!==r[i])throw new Ve(a,r[i])})}function vt(e,t){if(e!==void 0){if(!ze(e)||!Re(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new nr(e,t)}}function ri(e){for(var t=0;t=0,u=t%r===0;if(l)if(u)n[i]=-t/r;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-r);return n}function mE(e){return e.reduce((t,r)=>t*r,1)}function jL(e,t){for(var r=e,n,a=t.length-1;a>0;a--){var i=t[a];n=[];for(var o=r.length/i,l=0;lt.test(r))}function dm(e,t){return Array.prototype.join.call(e,t)}function ta(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var t=[],r=0;t[0]={value:e[0],identifier:0};for(var n=1;n1)return e.slice(1).reduce(function(r,n){return vE(r,n,t,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function VL(){for(var e=arguments.length,t=new Array(e),r=0;rf.length),a=Math.max(...n),i=new Array(a).fill(null),o=0;oi[c]&&(i[c]=l[s])}for(var p=0;p1||e[a]>t[i])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[a]," to size ").concat(t[i]))}}function vm(e,t){var r=Ge(e);if(Nn(r,t))return e;ss(r,t);var n=VL(r,t),a=n.length,i=[...Array(a-r.length).fill(1),...r],o=XL(e);r.length1&&arguments[1]!==void 0?arguments[1]:{};return r=r??Number.POSITIVE_INFINITY,t=t??JSON.stringify,function n(){typeof n.cache!="object"&&(n.cache={values:new Map,lru:gE(r||Number.POSITIVE_INFINITY)});for(var a=[],i=0;i{var{Matrix:t}=e;function r(c,p){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(p&&!It(p))throw new Error("Invalid datatype: "+p);if(Fe(c))c.type==="DenseMatrix"?(this._data=qe(c._data),this._size=qe(c._size),this._datatype=p||c._datatype):(this._data=c.toArray(),this._size=c.size(),this._datatype=p||c._datatype);else if(c&&at(c.data)&&at(c.size))this._data=c.data,this._size=c.size,mm(this._data,this._size),this._datatype=p||c.datatype;else if(at(c))this._data=s(c),this._size=Ge(this._data),mm(this._data,this._size),this._datatype=p;else{if(c)throw new TypeError("Unsupported type of data ("+ut(c)+")");this._data=[],this._size=[0],this._datatype=p}}r.prototype=new t,r.prototype.createDenseMatrix=function(c,p){return new r(c,p)},Object.defineProperty(r,"name",{value:"DenseMatrix"}),r.prototype.constructor=r,r.prototype.type="DenseMatrix",r.prototype.isDenseMatrix=!0,r.prototype.getDataType=function(){return Ta(this._data,ut)},r.prototype.storage=function(){return"dense"},r.prototype.datatype=function(){return this._datatype},r.prototype.create=function(c,p){return new r(c,p)},r.prototype.subset=function(c,p,f){switch(arguments.length){case 1:return n(this,c);case 2:case 3:return i(this,c,p,f);default:throw new SyntaxError("Wrong number of arguments")}},r.prototype.get=function(c){if(!at(c))throw new TypeError("Array expected");if(c.length!==this._size.length)throw new Ve(c.length,this._size.length);for(var p=0;p");var g=p.max().map(function(b){return b+1});u(c,g,m);var y=h.length,E=0;o(c._data,p,f,y,E)}return c}function o(c,p,f,m,h){var d=h===m-1,v=p.dimension(h);d?v.forEach(function(x,N){vt(x),c[x]=f[N[0]]}):v.forEach(function(x,N){vt(x),o(c[x],p,f[N[0]],m,h+1)})}r.prototype.resize=function(c,p,f){if(!Lt(c))throw new TypeError("Array or Matrix expected");var m=c.valueOf().map(d=>Array.isArray(d)&&d.length===1?d[0]:d),h=f?this.clone():this;return l(h,m,p)};function l(c,p,f){if(p.length===0){for(var m=c._data;at(m);)m=m[0];return m}return c._size=p.slice(0),c._data=Sn(c._data,c._size,f),c}r.prototype.reshape=function(c,p){var f=p?this.clone():this;f._data=is(f._data,c);var m=f._size.reduce((h,d)=>h*d);return f._size=os(c,m),f};function u(c,p,f){for(var m=c._size.slice(0),h=!1;m.lengthm[d]&&(m[d]=p[d],h=!0);h&&l(c,m,f)}r.prototype.clone=function(){var c=new r({data:qe(this._data),size:qe(this._size),datatype:this._datatype});return c},r.prototype.size=function(){return this._size.slice(0)},r.prototype.map=function(c){var p=this,f=Lc(c),m=function v(x,N){return at(x)?x.map(function(g,y){return v(g,N.concat(y))}):f===1?c(x):f===2?c(x,N):c(x,N,p)},h=m(this._data,[]),d=this._datatype!==void 0?Ta(h,ut):void 0;return new r(h,d)},r.prototype.forEach=function(c){var p=this,f=function m(h,d){at(h)?h.forEach(function(v,x){m(v,d.concat(x))}):c(h,d,p)};f(this._data,[])},r.prototype[Symbol.iterator]=function*(){var c=function*p(f,m){if(at(f))for(var h=0;h[g[x]]);p.push(new r(N,c._datatype))},d=0;d0?c:0,f=c<0?-c:0,m=this._size[0],h=this._size[1],d=Math.min(m-f,h-p),v=[],x=0;x0?f:0,d=f<0?-f:0,v=c[0],x=c[1],N=Math.min(v-d,x-h),g;if(at(p)){if(p.length!==N)throw new Error("Invalid value array length");g=function(A){return p[A]}}else if(Fe(p)){var y=p.size();if(y.length!==1||y[0]!==N)throw new Error("Invalid matrix length");g=function(A){return p.get([A])}}else g=function(){return p};m||(m=Ue(g(0))?g(0).mul(0):0);var E=[];if(c.length>0){E=Sn(E,c,m);for(var b=0;b{var{typed:t}=e;return t(xE,{any:qe})});function Uc(e){var t=e.length,r=e[0].length,n,a,i=[];for(a=0;a=n.length)throw new nr(t,n.length);return Fe(e)?e.create(kc(e.valueOf(),t,r)):kc(e,t,r)}function kc(e,t,r){var n,a,i,o;if(t<=0)if(Array.isArray(e[0])){for(o=Uc(e),a=[],n=0;n{var{typed:t}=e;return t(bE,{number:Re,BigNumber:function(n){return n.isInt()},Fraction:function(n){return n.d===1&&isFinite(n.n)},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var Br="number",ra="number, number";function bm(e){return Math.abs(e)}bm.signature=Br;function ym(e,t){return e+t}ym.signature=ra;function Em(e,t){return e-t}Em.signature=ra;function Am(e,t){return e*t}Am.signature=ra;function JL(e,t){return e/t}JL.signature=ra;function Nm(e){return-e}Nm.signature=Br;function Tm(e){return e}Tm.signature=Br;function ji(e){return wy(e)}ji.signature=Br;function wm(e){return e*e*e}wm.signature=Br;function Dm(e){return Math.exp(e)}Dm.signature=Br;function Sm(e){return Dy(e)}Sm.signature=Br;function eP(e,t){if(!Re(e)||!Re(t))throw new Error("Parameters in function gcd must be integer numbers");for(var r;t!==0;)r=e%t,e=t,t=r;return e<0?-e:e}eP.signature=ra;function Cm(e,t){if(!Re(e)||!Re(t))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||t===0)return 0;for(var r,n=e*t;t!==0;)r=t,t=e%r,e=r;return Math.abs(n/e)}Cm.signature=ra;function yE(e,t){return t?Math.log(e)/Math.log(t):Math.log(e)}function _m(e){return Ty(e)}_m.signature=Br;function Mm(e){return Ny(e)}Mm.signature=Br;function tP(e){return hc(e)}tP.signature=Br;function rP(e,t){return t===0?e:e-t*Math.floor(e/t)}rP.signature=ra;function Om(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,r=t<0;if(r&&(t=-t),t===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(t)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return r?1/0:0;if(!isFinite(e))return r?0:e;var n=Math.pow(Math.abs(e),1/t);return n=e<0?-n:n,r?1/n:n}function Hc(e){return cn(e)}Hc.signature=Br;function nP(e){return Math.sqrt(e)}nP.signature=Br;function Rm(e){return e*e}Rm.signature=Br;function Fm(e,t){var r,n,a,i=0,o=1,l=1,u=0;if(!Re(e)||!Re(t))throw new Error("Parameters in function xgcd must be integer numbers");for(;t;)n=Math.floor(e/t),a=e-n*t,r=i,i=o-n*i,o=r,r=l,l=u-n*l,u=r,e=t,t=a;var s;return e<0?s=[-e,-o,-u]:s=[e,e?o:0,u],s}Fm.signature=ra;function Im(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}Im.signature=ra;function Vi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!Re(t)||t<0||t>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(Kf(e,t))}function aP(e){return Math.abs(e)}aP.signature=Br;var iP="number",$i="number, number";function Bm(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function bitAnd");return e&t}Bm.signature=$i;function Lm(e){if(!Re(e))throw new Error("Integer expected in function bitNot");return~e}Lm.signature=iP;function Pm(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function bitOr");return e|t}Pm.signature=$i;function Um(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function bitXor");return e^t}Um.signature=$i;function km(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function leftShift");return e<>t}qm.signature=$i;function Hm(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}Hm.signature=$i;function Kr(e,t){if(t>1;return Kr(e,r)*Kr(r+1,t)}function zm(e,t){if(!Re(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!Re(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");for(var r=e-t,n=1,a=t171?1/0:Kr(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*us(1-e));if(e>=171.35)return 1/0;if(e>85){var r=e*e,n=r*e,a=n*e,i=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*r)-139/(51840*n)-571/(2488320*a)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,t=ai[0];for(var o=1;o=1;n--)r+=wE[n]/(e+n);return Km+(e+.5)*Math.log(t)-t+Math.log(r)}cs.signature="number";var kt="number",cP="number, number";function lP(e){return Math.acos(e)}lP.signature=kt;function Wm(e){return _y(e)}Wm.signature=kt;function Qm(e){return Math.atan(1/e)}Qm.signature=kt;function Zm(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}Zm.signature=kt;function Jm(e){return Math.asin(1/e)}Jm.signature=kt;function ed(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}ed.signature=kt;function td(e){return Math.acos(1/e)}td.signature=kt;function rd(e){var t=1/e,r=Math.sqrt(t*t-1);return Math.log(r+t)}rd.signature=kt;function pP(e){return Math.asin(e)}pP.signature=kt;function nd(e){return My(e)}nd.signature=kt;function fP(e){return Math.atan(e)}fP.signature=kt;function mP(e,t){return Math.atan2(e,t)}mP.signature=cP;function ad(e){return Oy(e)}ad.signature=kt;function dP(e){return Math.cos(e)}dP.signature=kt;function hP(e){return gc(e)}hP.signature=kt;function id(e){return 1/Math.tan(e)}id.signature=kt;function od(e){var t=Math.exp(2*e);return(t+1)/(t-1)}od.signature=kt;function sd(e){return 1/Math.sin(e)}sd.signature=kt;function ud(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*cn(e)}ud.signature=kt;function cd(e){return 1/Math.cos(e)}cd.signature=kt;function ld(e){return 2/(Math.exp(e)+Math.exp(-e))}ld.signature=kt;function vP(e){return Math.sin(e)}vP.signature=kt;function pd(e){return Ry(e)}pd.signature=kt;function gP(e){return Math.tan(e)}gP.signature=kt;function xP(e){return xc(e)}xP.signature=kt;var ls="number";function bP(e){return Re(e)}bP.signature=ls;function fd(e){return e<0}fd.signature=ls;function md(e){return e>0}md.signature=ls;function dd(e){return e===0}dd.signature=ls;function hd(e){return Number.isNaN(e)}hd.signature=ls;var DE="isNegative",yP=["typed"],vd=C(DE,yP,e=>{var{typed:t}=e;return t(DE,{number:fd,BigNumber:function(n){return n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s<0},Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var SE="isNumeric",EP=["typed"],gd=C(SE,EP,e=>{var{typed:t}=e;return t(SE,{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var CE="hasNumericValue",AP=["typed","isNumeric"],xd=C(CE,AP,e=>{var{typed:t,isNumeric:r}=e;return t(CE,{boolean:()=>!0,string:function(a){return a.trim().length>0&&!isNaN(Number(a))},any:function(a){return r(a)}})});var _E="isPositive",NP=["typed"],bd=C(_E,NP,e=>{var{typed:t}=e;return t(_E,{number:md,BigNumber:function(n){return!n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s>0&&n.n>0},Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var ME="isZero",TP=["typed"],zc=C(ME,TP,e=>{var{typed:t}=e;return t(ME,{number:dd,BigNumber:function(n){return n.isZero()},Complex:function(n){return n.re===0&&n.im===0},Fraction:function(n){return n.d===1&&n.n===0},Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var OE="isNaN",wP=["typed"],yd=C(OE,wP,e=>{var{typed:t}=e;return t(OE,{number:hd,BigNumber:function(n){return n.isNaN()},Fraction:function(n){return!1},Complex:function(n){return n.isNaN()},Unit:function(n){return Number.isNaN(n.value)},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var RE="typeOf",DP=["typed"],Ed=C(RE,DP,e=>{var{typed:t}=e;return t(RE,{any:ut})});function Xt(e,t,r){if(r==null)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var n=e.minus(t).abs();if(n.isZero())return!0;var a=e.constructor.max(e.abs(),t.abs());return n.lte(a.times(r))}return!1}function FE(e,t,r){return Pt(e.re,t.re,r)&&Pt(e.im,t.im,r)}var pn=C("compareUnits",["typed"],e=>{var{typed:t}=e;return{"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(!n.equalBase(a))throw new Error("Cannot compare units with different base");return t.find(r,[n.valueType(),a.valueType()])(n.value,a.value)})}});var Gc="equalScalar",SP=["typed","config"],Yc=C(Gc,SP,e=>{var{typed:t,config:r}=e,n=pn({typed:t});return t(Gc,{"boolean, boolean":function(i,o){return i===o},"number, number":function(i,o){return Pt(i,o,r.epsilon)},"BigNumber, BigNumber":function(i,o){return i.eq(o)||Xt(i,o,r.epsilon)},"Fraction, Fraction":function(i,o){return i.equals(o)},"Complex, Complex":function(i,o){return FE(i,o,r.epsilon)}},n)}),Dre=C(Gc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(Gc,{"number, number":function(a,i){return Pt(a,i,r.epsilon)}})});var CP="SparseMatrix",_P=["typed","equalScalar","Matrix"],jc=C(CP,_P,e=>{var{typed:t,equalScalar:r,Matrix:n}=e;function a(d,v){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(v&&!It(v))throw new Error("Invalid datatype: "+v);if(Fe(d))i(this,d,v);else if(d&&at(d.index)&&at(d.ptr)&&at(d.size))this._values=d.values,this._index=d.index,this._ptr=d.ptr,this._size=d.size,this._datatype=v||d.datatype;else if(at(d))o(this,d,v);else{if(d)throw new TypeError("Unsupported type of data ("+ut(d)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=v}}function i(d,v,x){v.type==="SparseMatrix"?(d._values=v._values?qe(v._values):void 0,d._index=qe(v._index),d._ptr=qe(v._ptr),d._size=qe(v._size),d._datatype=x||v._datatype):o(d,v.valueOf(),x||v._datatype)}function o(d,v,x){d._values=[],d._index=[],d._ptr=[],d._datatype=x;var N=v.length,g=0,y=r,E=0;if(It(x)&&(y=t.find(r,[x,x])||r,E=t.convert(0,x)),N>0){var b=0;do{d._ptr.push(d._index.length);for(var S=0;S");if(g.length===1){var A=v.dimension(0);A.forEach(function(F,R){vt(F),d.set([F,0],x[R[0]],N)})}else{var w=v.dimension(0),D=v.dimension(1);w.forEach(function(F,R){vt(F),D.forEach(function(P,U){vt(P),d.set([F,P],x[R[0]][U[0]],N)})})}}return d}a.prototype.get=function(d){if(!at(d))throw new TypeError("Array expected");if(d.length!==this._size.length)throw new Ve(d.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var v=d[0],x=d[1];vt(v,this._size[0]),vt(x,this._size[1]);var N=s(v,this._ptr[x],this._ptr[x+1],this._index);return Ny-1||g>E-1)&&(f(this,Math.max(N+1,y),Math.max(g+1,E),x),y=this._size[0],E=this._size[1]),vt(N,y),vt(g,E);var A=s(N,this._ptr[g],this._ptr[g+1],this._index);return AArray.isArray(y)&&y.length===1?y[0]:y);if(N.length!==2)throw new Error("Only two dimensions matrix are supported");N.forEach(function(y){if(!ze(y)||!Re(y)||y<0)throw new TypeError("Invalid size, must contain positive integers (size: "+je(N)+")")});var g=x?this.clone():this;return f(g,N[0],N[1],v)};function f(d,v,x,N){var g=N||0,y=r,E=0;It(d._datatype)&&(y=t.find(r,[d._datatype,d._datatype])||r,E=t.convert(0,d._datatype),g=t.convert(g,d._datatype));var b=!y(g,E),S=d._size[0],A=d._size[1],w,D,F;if(x>A){for(D=A;DS){if(b){var R=0;for(D=0;Dv-1&&(d._values.splice(F,1),d._index.splice(F,1),U++)}d._ptr[D]=d._values.length}return d._size[0]=v,d._size[1]=x,d}a.prototype.reshape=function(d,v){if(!at(d))throw new TypeError("Array expected");if(d.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");d.forEach(function(B){if(!ze(B)||!Re(B)||B<=-2||B===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+je(d)+")")});var x=this._size[0]*this._size[1];d=os(d,x);var N=d[0]*d[1];if(x!==N)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var g=v?this.clone():this;if(this._size[0]===d[0]&&this._size[1]===d[1])return g;for(var y=[],E=0;E=v&&M<=x&&F(d._values[k],M-v,R-N)}else{for(var _={},q=P;qQc,createAccessorNode:()=>PT,createAcos:()=>v0,createAcosh:()=>g0,createAcot:()=>x0,createAcoth:()=>b0,createAcsc:()=>y0,createAcsch:()=>E0,createAdd:()=>Dl,createAddScalar:()=>Jc,createAnd:()=>Ds,createAndTransform:()=>vM,createApply:()=>ii,createApplyTransform:()=>G3,createArg:()=>eh,createArrayNode:()=>kT,createAsec:()=>A0,createAsech:()=>N0,createAsin:()=>T0,createAsinh:()=>w0,createAssignmentNode:()=>GT,createAtan:()=>D0,createAtan2:()=>S0,createAtanh:()=>C0,createAtomicMass:()=>jg,createAvogadro:()=>Vg,createBellNumbers:()=>jv,createBigNumberClass:()=>_c,createBignumber:()=>$c,createBin:()=>Rh,createBitAnd:()=>ms,createBitAndTransform:()=>xM,createBitNot:()=>Zd,createBitOr:()=>ds,createBitOrTransform:()=>bM,createBitXor:()=>Jd,createBlockNode:()=>jT,createBohrMagneton:()=>wg,createBohrRadius:()=>Og,createBoltzmann:()=>$g,createBoolean:()=>Nd,createCatalan:()=>Vv,createCbrt:()=>Md,createCeil:()=>Rd,createChain:()=>E_,createChainClass:()=>j2,createClassicalElectronRadius:()=>Rg,createClone:()=>gm,createColumn:()=>vs,createColumnTransform:()=>Y3,createCombinations:()=>Dv,createCombinationsWithRep:()=>Sv,createCompare:()=>Wh,createCompareNatural:()=>Qh,createCompareText:()=>Zh,createCompile:()=>y2,createComplex:()=>Td,createComplexClass:()=>Mc,createComposition:()=>$v,createConcat:()=>Wi,createConcatTransform:()=>nM,createConditionalNode:()=>$T,createConductanceQuantum:()=>Dg,createConj:()=>ol,createConstantNode:()=>e2,createCorr:()=>wv,createCos:()=>_0,createCosh:()=>M0,createCot:()=>O0,createCoth:()=>R0,createCoulomb:()=>Ng,createCount:()=>ih,createCreateUnit:()=>h0,createCross:()=>oh,createCsc:()=>F0,createCsch:()=>I0,createCtranspose:()=>Eh,createCube:()=>Fd,createCumSum:()=>Os,createCumSumTransform:()=>pM,createDeepEqual:()=>n0,createDenseMatrixClass:()=>Pc,createDerivative:()=>I3,createDet:()=>Ql,createDeuteronMass:()=>Ug,createDiag:()=>sh,createDiff:()=>xs,createDiffTransform:()=>iM,createDistance:()=>yv,createDivide:()=>Jl,createDivideScalar:()=>dl,createDot:()=>Sl,createDotDivide:()=>zh,createDotMultiply:()=>Wd,createDotPow:()=>Hh,createE:()=>og,createEfimovFactor:()=>Yg,createEigs:()=>dv,createElectricConstant:()=>Eg,createElectronMass:()=>Fg,createElementaryCharge:()=>Tg,createEqual:()=>Jh,createEqualScalar:()=>Yc,createEqualText:()=>e0,createErf:()=>Sh,createEvaluate:()=>A2,createExp:()=>Id,createExpm:()=>hv,createExpm1:()=>Bd,createFactorial:()=>Mv,createFalse:()=>eg,createFaraday:()=>Xg,createFermiCoupling:()=>Ig,createFft:()=>Ah,createFibonacciHeapClass:()=>c0,createFilter:()=>uh,createFilterTransform:()=>V3,createFineStructure:()=>Bg,createFirstRadiation:()=>Kg,createFix:()=>Pd,createFlatten:()=>ch,createFloor:()=>ps,createForEach:()=>lh,createForEachTransform:()=>$3,createFormat:()=>Oh,createFraction:()=>Xc,createFractionClass:()=>Oc,createFreqz:()=>Qv,createFunctionAssignmentNode:()=>r2,createFunctionNode:()=>v2,createGamma:()=>Cv,createGasConstant:()=>Qg,createGcd:()=>qd,createGetMatrixDataType:()=>ph,createGravitationConstant:()=>gg,createGravity:()=>ox,createHartreeEnergy:()=>Lg,createHasNumericValue:()=>xd,createHelp:()=>b_,createHelpClass:()=>Y2,createHex:()=>Ih,createHypot:()=>Q0,createI:()=>dg,createIdentity:()=>sl,createIfft:()=>Nh,createIm:()=>th,createImmutableDenseMatrixClass:()=>s0,createIndex:()=>ev,createIndexClass:()=>u0,createIndexNode:()=>a2,createIndexTransform:()=>X3,createInfinity:()=>rg,createIntersect:()=>Ev,createInv:()=>Zl,createInverseConductanceQuantum:()=>Sg,createInvmod:()=>Kd,createIsInteger:()=>qc,createIsNaN:()=>yd,createIsNegative:()=>vd,createIsNumeric:()=>gd,createIsPositive:()=>bd,createIsPrime:()=>Lh,createIsZero:()=>zc,createKldivergence:()=>Ov,createKlitzing:()=>Mg,createKron:()=>fh,createLN10:()=>cg,createLN2:()=>ug,createLOG10E:()=>pg,createLOG2E:()=>lg,createLarger:()=>Al,createLargerEq:()=>r0,createLcm:()=>Hd,createLeafCount:()=>N3,createLeftShift:()=>$h,createLgamma:()=>_v,createLog:()=>Uh,createLog10:()=>zd,createLog1p:()=>kh,createLog2:()=>Gd,createLoschmidt:()=>Wg,createLsolve:()=>Gh,createLsolveAll:()=>jh,createLup:()=>av,createLusolve:()=>cv,createLyap:()=>bv,createMad:()=>Nv,createMagneticConstant:()=>yg,createMagneticFluxQuantum:()=>Cg,createMap:()=>mh,createMapTransform:()=>W3,createMatrix:()=>Kc,createMatrixClass:()=>Rc,createMatrixFromColumns:()=>Sd,createMatrixFromFunction:()=>wd,createMatrixFromRows:()=>Dd,createMax:()=>ro,createMaxTransform:()=>Q3,createMean:()=>Rs,createMeanTransform:()=>Z3,createMedian:()=>Av,createMin:()=>no,createMinTransform:()=>J3,createMod:()=>fs,createMode:()=>_h,createMolarMass:()=>ax,createMolarMassC12:()=>ix,createMolarPlanckConstant:()=>Zg,createMolarVolume:()=>Jg,createMultinomial:()=>Rv,createMultiply:()=>rl,createMultiplyScalar:()=>tl,createNaN:()=>ng,createNeutronMass:()=>kg,createNode:()=>BT,createNorm:()=>Z0,createNot:()=>nh,createNthRoot:()=>Yd,createNthRoots:()=>qh,createNuclearMagneton:()=>_g,createNull:()=>tg,createNumber:()=>Vc,createNumeric:()=>ml,createObjectNode:()=>o2,createOct:()=>Fh,createOnes:()=>dh,createOperatorNode:()=>u2,createOr:()=>hs,createOrTransform:()=>gM,createParenthesisNode:()=>l2,createParse:()=>x2,createParser:()=>w2,createParserClass:()=>N2,createPartitionSelect:()=>i0,createPermutations:()=>Fv,createPhi:()=>sg,createPi:()=>ag,createPickRandom:()=>Hv,createPinv:()=>mv,createPlanckCharge:()=>lx,createPlanckConstant:()=>xg,createPlanckLength:()=>sx,createPlanckMass:()=>ux,createPlanckTemperature:()=>px,createPlanckTime:()=>cx,createPolynomialRoot:()=>lv,createPow:()=>Ph,createPrint:()=>ws,createPrintTransform:()=>hM,createProd:()=>Mh,createProtonMass:()=>Pg,createQr:()=>iv,createQuantileSeq:()=>Is,createQuantileSeqTransform:()=>cM,createQuantumOfCirculation:()=>qg,createRandom:()=>zv,createRandomInt:()=>Gv,createRange:()=>bs,createRangeClass:()=>lm,createRangeNode:()=>f2,createRangeTransform:()=>eM,createRationalize:()=>L3,createRe:()=>rh,createReducedPlanckConstant:()=>bg,createRelationalNode:()=>d2,createReplacer:()=>Zv,createReshape:()=>hh,createResize:()=>vh,createResolve:()=>M3,createResultSet:()=>tm,createReviver:()=>k3,createRightArithShift:()=>Xh,createRightLogShift:()=>Kh,createRotate:()=>gh,createRotationMatrix:()=>xh,createRound:()=>hl,createRow:()=>ys,createRowTransform:()=>tM,createRydberg:()=>Hg,createSQRT1_2:()=>fg,createSQRT2:()=>mg,createSackurTetrode:()=>ex,createSchur:()=>xv,createSec:()=>B0,createSech:()=>L0,createSecondRadiation:()=>tx,createSetCartesian:()=>H0,createSetDifference:()=>z0,createSetDistinct:()=>G0,createSetIntersect:()=>Y0,createSetIsSubset:()=>j0,createSetMultiplicity:()=>V0,createSetPowerset:()=>$0,createSetSize:()=>X0,createSetSymDifference:()=>K0,createSetUnion:()=>W0,createSign:()=>jd,createSimplify:()=>D3,createSimplifyConstant:()=>S3,createSimplifyCore:()=>_3,createSin:()=>P0,createSinh:()=>U0,createSize:()=>ll,createSlu:()=>sv,createSmaller:()=>bl,createSmallerEq:()=>t0,createSolveODE:()=>Dh,createSort:()=>o0,createSpaClass:()=>l0,createSparse:()=>d0,createSparseMatrixClass:()=>jc,createSpeedOfLight:()=>vg,createSplitUnit:()=>Cd,createSqrt:()=>Vd,createSqrtm:()=>vv,createSquare:()=>$d,createSqueeze:()=>bh,createStd:()=>Bs,createStdTransform:()=>oM,createStefanBoltzmann:()=>rx,createStirlingS2:()=>Yv,createString:()=>Ad,createSubset:()=>Es,createSubsetTransform:()=>rM,createSubtract:()=>nl,createSubtractScalar:()=>el,createSum:()=>Ms,createSumTransform:()=>uM,createSylvester:()=>gv,createSymbolNode:()=>h2,createSymbolicEqual:()=>R3,createTan:()=>k0,createTanh:()=>q0,createTau:()=>ig,createThomsonCrossSection:()=>zg,createTo:()=>Bh,createTrace:()=>J0,createTranspose:()=>yh,createTrue:()=>Jv,createTypeOf:()=>Ed,createTyped:()=>Ec,createUnaryMinus:()=>Wc,createUnaryPlus:()=>_d,createUnequal:()=>a0,createUnitClass:()=>f0,createUnitFunction:()=>m0,createUppercaseE:()=>z3,createUppercasePi:()=>H3,createUsolve:()=>Yh,createUsolveAll:()=>Vh,createVacuumImpedance:()=>Ag,createVariance:()=>Fs,createVarianceTransform:()=>mM,createVersion:()=>hg,createWeakMixingAngle:()=>Gg,createWienDisplacement:()=>nx,createXgcd:()=>Xd,createXor:()=>ah,createZeros:()=>pl,createZeta:()=>Ch,createZpk2tf:()=>Wv});var em=Le(dc(),1);function Re(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}var cn=Math.sign||function(e){return e>0?1:e<0?-1:0},Ay=Math.log2||function(t){return Math.log(t)/Math.LN2},Ny=Math.log10||function(t){return Math.log(t)/Math.LN10},hc=Math.log1p||function(e){return Math.log(e+1)},Ty=Math.cbrt||function(t){if(t===0)return t;var r=t<0,n;return r&&(t=-t),isFinite(t)?(n=Math.exp(Math.log(t)/3),n=(t/(n*n)+2*n)/3):n=t,r?-n:n},wy=Math.expm1||function(t){return t>=2e-4||t<=-2e-4?Math.exp(t)-1:t+t*t/2+t*t*t/6};function $f(e,t,r){var n={2:"0b",8:"0o",16:"0x"},a=n[t],i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!Re(r))throw new Error("size must be an integer");if(e>2**(r-1)-1||e<-(2**(r-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!Re(e))throw new Error("Value must be an integer");e<0&&(e=e+2**r),i="i".concat(r)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(a).concat(e.toString(t)).concat(i)}function Tn(e,t){if(typeof t=="function")return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:r,precision:n,wordSize:a}=Xf(t);switch(r){case"fixed":return Kf(e,n);case"exponential":return Dy(e,n);case"engineering":return SB(e,n);case"bin":return $f(e,2,a);case"oct":return $f(e,8,a);case"hex":return $f(e,16,a);case"auto":return CB(e,n,t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Xf(e){var t="auto",r,n;if(e!==void 0)if(ze(e))r=e;else if(Ue(e))r=e.toNumber();else if(kn(e))e.precision!==void 0&&(r=yy(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=yy(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(t=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:t,precision:r,wordSize:n}}function Ui(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var r=t[1],n=t[2],a=parseFloat(t[4]||"0"),i=n.indexOf(".");a+=i!==-1?i-1:n.length-1;var o=n.replace(".","").replace(/^0*/,function(l){return a-=l.length,""}).replace(/0*$/,"").split("").map(function(l){return parseInt(l)});return o.length===0&&(o.push(0),a++),{sign:r,coefficients:o,exponent:a}}function SB(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=Ui(e),n=vc(r,t),a=n.exponent,i=n.coefficients,o=a%3===0?a:a<0?a-3-a%3:a-a%3;if(ze(t))for(;t>i.length||a-o+1>i.length;)i.push(0);else for(var l=Math.abs(a-o)-(i.length-1),u=0;u0;)c++,s--;var p=i.slice(c).join(""),f=ze(t)&&p.length||p.match(/[1-9]/)?"."+p:"",m=i.slice(0,c).join("")+f+"e"+(a>=0?"+":"")+o.toString();return n.sign+m}function Kf(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=Ui(e),n=typeof t=="number"?vc(r,r.exponent+1+t):r,a=n.coefficients,i=n.exponent+1,o=i+(t||0);return a.length0?"."+a.join(""):"")+"e"+(i>=0?"+":"")+i}function CB(e,t,r){if(isNaN(e)||!isFinite(e))return String(e);var n=Ey(r?.lowerExp,-3),a=Ey(r?.upperExp,5),i=Ui(e),o=t?vc(i,t):i;if(o.exponent=a)return Dy(e,t);var l=o.coefficients,u=o.exponent;l.length0?u:0;return st){var a=n.splice(t,n.length-t);if(a[0]>=5){var i=t-1;for(n[i]++;n[i]===10;)n.pop(),i===0&&(n.unshift(0),r.exponent++,i++),i--,n[i]++}}return r}function Pi(e){for(var t=[],r=0;r0?!0:e<0?!1:1/e===1/0,n=t>0?!0:t<0?!1:1/t===1/0;return r^n?-e:e}function yy(e,t){if(ze(e))return e;if(Ue(e))return e.toNumber();t()}function Ey(e,t){return ze(e)?e:Ue(e)?e.toNumber():t}function C(e,t,r,n){function a(i){var o=vy(i,t.map(Wf));return MB(e,t,i),r(o)}return a.isFactory=!0,a.fn=e,a.dependencies=t.slice().sort(),n&&(a.meta=n),a}function Za(e){return typeof e=="function"&&typeof e.fn=="string"&&Array.isArray(e.dependencies)}function MB(e,t,r){var n=t.filter(i=>!OB(i)).every(i=>r[i]!==void 0);if(!n){var a=t.filter(i=>r[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(a.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function OB(e){return e&&e[0]==="?"}function Wf(e){return e&&e[0]==="?"?e.slice(1):e}function Ot(e,t){if(Ly(e)&&Iy(e,t))return e[t];throw typeof e[t]=="function"&&bc(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function Hn(e,t,r){if(Ly(e)&&Iy(e,t))return e[t]=r,r;throw new Error('No access to property "'+t+'"')}function Fy(e,t){return t in e}function Iy(e,t){return!e||typeof e!="object"?!1:Ie(RB,t)?!0:!(t in Object.prototype||t in Function.prototype)}function By(e,t){if(!bc(e,t))throw new Error('No access to method "'+t+'"');return e[t]}function bc(e,t){return e==null||typeof e[t]!="function"||Ie(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:Ie(FB,t)?!0:!(t in Object.prototype||t in Function.prototype)}function Ly(e){return typeof e=="object"&&e&&e.constructor===Object}var RB={length:!0,name:!0},FB={toString:!0,valueOf:!0,toLocaleString:!0};var Ja=class{constructor(t){this.wrappedObject=t,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).values()}get(t){return Ot(this.wrappedObject,t)}set(t,r){return Hn(this.wrappedObject,t,r),this}has(t){return Fy(this.wrappedObject,t)}entries(){return Py(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){delete this.wrappedObject[t]}clear(){for(var t of this.keys())this.delete(t)}get size(){return Object.keys(this.wrappedObject).length}},ki=class{constructor(t,r,n){this.a=t,this.b=r,this.bKeys=n,this[Symbol.iterator]=this.entries}get(t){return this.bKeys.has(t)?this.b.get(t):this.a.get(t)}set(t,r){return this.bKeys.has(t)?this.b.set(t,r):this.a.set(t,r),this}has(t){return this.b.has(t)||this.a.has(t)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return Py(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){return this.bKeys.has(t)?this.b.delete(t):this.a.delete(t)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}};function Py(e,t){return{next:()=>{var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}}function xa(){return new Map}function Jn(e){if(!e)return xa();if(Qf(e))return e;if(kn(e))return new Ja(e);throw new Error("createMap can create maps from objects or Maps")}function Uy(e){if(e instanceof Ja)return e.wrappedObject;var t={};for(var r of e.keys()){var n=e.get(r);Hn(t,r,n)}return t}function Qf(e){return e?e instanceof Map||e instanceof Ja||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var ky=function(){return ky=em.default.create,em.default},IB=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],Ec=C("typed",IB,function(t){var{BigNumber:r,Complex:n,DenseMatrix:a,Fraction:i}=t,o=ky();return o.clear(),o.addTypes([{name:"number",test:ze},{name:"Complex",test:Zt},{name:"BigNumber",test:Ue},{name:"Fraction",test:$r},{name:"Unit",test:$t},{name:"identifier",test:l=>It&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(l)},{name:"string",test:It},{name:"Chain",test:Ii},{name:"Array",test:at},{name:"Matrix",test:Fe},{name:"DenseMatrix",test:Zn},{name:"SparseMatrix",test:Xr},{name:"Range",test:ga},{name:"Index",test:Un},{name:"boolean",test:Ju},{name:"ResultSet",test:ec},{name:"Help",test:Fi},{name:"function",test:tc},{name:"Date",test:rc},{name:"RegExp",test:nc},{name:"null",test:ac},{name:"undefined",test:ic},{name:"AccessorNode",test:wr},{name:"ArrayNode",test:Jt},{name:"AssignmentNode",test:oc},{name:"BlockNode",test:sc},{name:"ConditionalNode",test:uc},{name:"ConstantNode",test:et},{name:"FunctionNode",test:pr},{name:"FunctionAssignmentNode",test:sn},{name:"IndexNode",test:Rr},{name:"Node",test:nt},{name:"ObjectNode",test:qn},{name:"OperatorNode",test:Tt},{name:"ParenthesisNode",test:er},{name:"RangeNode",test:cc},{name:"RelationalNode",test:lc},{name:"SymbolNode",test:bt},{name:"Map",test:Qf},{name:"Object",test:kn}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(u){if(r||Zf(u),Sy(u)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+u+"). Use function bignumber(x) to convert to BigNumber.");return new r(u)}},{from:"number",to:"Complex",convert:function(u){return n||yc(u),new n(u,0)}},{from:"BigNumber",to:"Complex",convert:function(u){return n||yc(u),new n(u.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(u){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(u){return n||yc(u),new n(u.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(u){i||Jf(u);var s=new i(u);if(s.valueOf()!==u)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+u+"). Use function fraction(x) to convert to Fraction.");return s}},{from:"string",to:"number",convert:function(u){var s=Number(u);if(isNaN(s))throw new Error('Cannot convert "'+u+'" to a number');return s}},{from:"string",to:"BigNumber",convert:function(u){r||Zf(u);try{return new r(u)}catch{throw new Error('Cannot convert "'+u+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(u){i||Jf(u);try{return new i(u)}catch{throw new Error('Cannot convert "'+u+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(u){n||yc(u);try{return new n(u)}catch{throw new Error('Cannot convert "'+u+'" to Complex')}}},{from:"boolean",to:"number",convert:function(u){return+u}},{from:"boolean",to:"BigNumber",convert:function(u){return r||Zf(u),new r(+u)}},{from:"boolean",to:"Fraction",convert:function(u){return i||Jf(u),new i(+u)}},{from:"boolean",to:"string",convert:function(u){return String(u)}},{from:"Array",to:"Matrix",convert:function(u){return a||BB(),new a(u)}},{from:"Matrix",to:"Array",convert:function(u){return u.valueOf()}}]),o.onMismatch=(l,u,s)=>{var c=o.createError(l,u,s);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Lt(u[0])&&s.some(f=>!f.params.includes(","))){var p=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw p.data=c.data,p}throw c},o.onMismatch=(l,u,s)=>{var c=o.createError(l,u,s);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Lt(u[0])&&s.some(f=>!f.params.includes(","))){var p=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw p.data=c.data,p}throw c},o});function Zf(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function yc(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function BB(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function Jf(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var LB="ResultSet",PB=[],tm=C(LB,PB,()=>{function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0});var qi=9e15,Aa=1e9,rm="0123456789abcdef",Nc="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Tc="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",nm={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-qi,maxE:qi,crypto:!1},Gy,ea,it=!0,Dc="[DecimalError] ",Ea=Dc+"Invalid argument: ",Yy=Dc+"Precision limit exceeded",jy=Dc+"crypto unavailable",Vy="[object Decimal]",vr=Math.floor,tr=Math.pow,UB=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,kB=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,qB=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,$y=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dn=1e7,tt=7,HB=9007199254740991,zB=Nc.length-1,am=Tc.length-1,Se={toStringTag:Vy};Se.absoluteValue=Se.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),Ke(e)};Se.ceil=function(){return Ke(new this.constructor(this),this.e+1,2)};Se.clampedTo=Se.clamp=function(e,t){var r,n=this,a=n.constructor;if(e=new a(e),t=new a(t),!e.s||!t.s)return new a(NaN);if(e.gt(t))throw Error(Ea+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new a(n)};Se.comparedTo=Se.cmp=function(e){var t,r,n,a,i=this,o=i.d,l=(e=new i.constructor(e)).d,u=i.s,s=e.s;if(!o||!l)return!u||!s?NaN:u!==s?u:o===l?0:!o^u<0?1:-1;if(!o[0]||!l[0])return o[0]?u:l[0]?-s:0;if(u!==s)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=o.length,a=l.length,t=0,r=nl[t]^u<0?1:-1;return n===a?0:n>a^u<0?1:-1};Se.cosine=Se.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+tt,n.rounding=1,r=GB(n,Zy(n,r)),n.precision=e,n.rounding=t,Ke(ea==2||ea==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};Se.cubeRoot=Se.cbrt=function(){var e,t,r,n,a,i,o,l,u,s,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(it=!1,i=c.s*tr(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=fr(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=tr(r,1/3),e=vr((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new p(r),n.s=c.s):n=new p(i.toString()),o=(e=p.precision)+3;;)if(l=n,u=l.times(l).times(l),s=u.plus(c),n=Rt(s.plus(c).times(l),s.plus(u),o+2,1),fr(l.d).slice(0,o)===(r=fr(n.d)).slice(0,o))if(r=r.slice(o-3,o+1),r=="9999"||!a&&r=="4999"){if(!a&&(Ke(l,e+1,0),l.times(l).times(l).eq(c))){n=l;break}o+=4,a=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(Ke(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return it=!0,Ke(n,e,p.rounding,t)};Se.decimalPlaces=Se.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-vr(this.e/tt))*tt,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};Se.dividedBy=Se.div=function(e){return Rt(this,new this.constructor(e))};Se.dividedToIntegerBy=Se.divToInt=function(e){var t=this,r=t.constructor;return Ke(Rt(t,new r(e),0,1,1),r.precision,r.rounding)};Se.equals=Se.eq=function(e){return this.cmp(e)===0};Se.floor=function(){return Ke(new this.constructor(this),this.e+1,3)};Se.greaterThan=Se.gt=function(e){return this.cmp(e)>0};Se.greaterThanOrEqualTo=Se.gte=function(e){var t=this.cmp(e);return t==1||t===0};Se.hyperbolicCosine=Se.cosh=function(){var e,t,r,n,a,i=this,o=i.constructor,l=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return l;r=o.precision,n=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,a=i.d.length,a<32?(e=Math.ceil(a/3),t=(1/Cc(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Hi(o,1,i.times(t),new o(1),!0);for(var u,s=e,c=new o(8);s--;)u=i.times(i),i=l.minus(u.times(c.minus(u.times(c))));return Ke(i,o.precision=r,o.rounding=n,!0)};Se.hyperbolicSine=Se.sinh=function(){var e,t,r,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=Hi(i,2,a,a,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,a=a.times(1/Cc(5,e)),a=Hi(i,2,a,a,!0);for(var o,l=new i(5),u=new i(16),s=new i(20);e--;)o=a.times(a),a=a.times(l.plus(o.times(u.times(o).plus(s))))}return i.precision=t,i.rounding=r,Ke(a,t,r,!0)};Se.hyperbolicTangent=Se.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,Rt(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};Se.inverseCosine=Se.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),a=r.precision,i=r.rounding;return n!==-1?n===0?t.isNeg()?wn(r,a,i):new r(0):new r(NaN):t.isZero()?wn(r,a+4,i).times(.5):(r.precision=a+6,r.rounding=1,t=t.asin(),e=wn(r,a+4,i).times(.5),r.precision=a,r.rounding=i,e.minus(t))};Se.inverseHyperbolicCosine=Se.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,it=!1,r=r.times(r).minus(1).sqrt().plus(r),it=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};Se.inverseHyperbolicSine=Se.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,it=!1,r=r.times(r).plus(1).sqrt().plus(r),it=!0,n.precision=e,n.rounding=t,r.ln())};Se.inverseHyperbolicTangent=Se.atanh=function(){var e,t,r,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(e=i.precision,t=i.rounding,n=a.sd(),Math.max(n,e)<2*-a.e-1?Ke(new i(a),e,t,!0):(i.precision=r=n-a.e,a=Rt(a.plus(1),new i(1).minus(a),r+e,1),i.precision=e+4,i.rounding=1,a=a.ln(),i.precision=e,i.rounding=t,a.times(.5))):new i(NaN)};Se.inverseSine=Se.asin=function(){var e,t,r,n,a=this,i=a.constructor;return a.isZero()?new i(a):(t=a.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=wn(i,r+4,n).times(.5),e.s=a.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,a.times(2)))};Se.inverseTangent=Se.atan=function(){var e,t,r,n,a,i,o,l,u,s=this,c=s.constructor,p=c.precision,f=c.rounding;if(s.isFinite()){if(s.isZero())return new c(s);if(s.abs().eq(1)&&p+4<=am)return o=wn(c,p+4,f).times(.25),o.s=s.s,o}else{if(!s.s)return new c(NaN);if(p+4<=am)return o=wn(c,p+4,f).times(.5),o.s=s.s,o}for(c.precision=l=p+10,c.rounding=1,r=Math.min(28,l/tt+2|0),e=r;e;--e)s=s.div(s.times(s).plus(1).sqrt().plus(1));for(it=!1,t=Math.ceil(l/tt),n=1,u=s.times(s),o=new c(s),a=s;e!==-1;)if(a=a.times(u),i=o.minus(a.div(n+=2)),a=a.times(u),o=i.plus(a.div(n+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===i.d[e]&&e--;);return r&&(o=o.times(2<this.d.length-2};Se.isNaN=function(){return!this.s};Se.isNegative=Se.isNeg=function(){return this.s<0};Se.isPositive=Se.isPos=function(){return this.s>0};Se.isZero=function(){return!!this.d&&this.d[0]===0};Se.lessThan=Se.lt=function(e){return this.cmp(e)<0};Se.lessThanOrEqualTo=Se.lte=function(e){return this.cmp(e)<1};Se.logarithm=Se.log=function(e){var t,r,n,a,i,o,l,u,s=this,c=s.constructor,p=c.precision,f=c.rounding,m=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=s.d,s.s<0||!r||!r[0]||s.eq(1))return new c(r&&!r[0]?-1/0:s.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(a=r[0];a%10===0;)a/=10;i=a!==1}if(it=!1,l=p+m,o=ya(s,l),n=t?wc(c,l+10):ya(e,l),u=Rt(o,n,l,1),rs(u.d,a=p,f))do if(l+=10,o=ya(s,l),n=t?wc(c,l+10):ya(e,l),u=Rt(o,n,l,1),!i){+fr(u.d).slice(a+1,a+15)+1==1e14&&(u=Ke(u,p+1,0));break}while(rs(u.d,a+=10,f));return it=!0,Ke(u,p,f)};Se.minus=Se.sub=function(e){var t,r,n,a,i,o,l,u,s,c,p,f,m=this,h=m.constructor;if(e=new h(e),!m.d||!e.d)return!m.s||!e.s?e=new h(NaN):m.d?e.s=-e.s:e=new h(e.d||m.s!==e.s?m:NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(s=m.d,f=e.d,l=h.precision,u=h.rounding,!s[0]||!f[0]){if(f[0])e.s=-e.s;else if(s[0])e=new h(m);else return new h(u===3?-0:0);return it?Ke(e,l,u):e}if(r=vr(e.e/tt),c=vr(m.e/tt),s=s.slice(),i=c-r,i){for(p=i<0,p?(t=s,i=-i,o=f.length):(t=f,r=c,o=s.length),n=Math.max(Math.ceil(l/tt),o)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=s.length,o=f.length,p=n0;--n)s[o++]=0;for(n=f.length;n>i;){if(s[--n]o?i+1:o+1,a>o&&(a=o,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(o=s.length,a=c.length,o-a<0&&(a=o,r=c,c=s,s=r),t=0;a;)t=(s[--a]=s[a]+c[a]+t)/Dn|0,s[a]%=Dn;for(t&&(s.unshift(t),++n),o=s.length;s[--o]==0;)s.pop();return e.d=s,e.e=Sc(s,n),it?Ke(e,l,u):e};Se.precision=Se.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ea+e);return r.d?(t=Xy(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};Se.round=function(){var e=this,t=e.constructor;return Ke(new t(e),e.e+1,t.rounding)};Se.sine=Se.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+tt,n.rounding=1,r=jB(n,Zy(n,r)),n.precision=e,n.rounding=t,Ke(ea>2?r.neg():r,e,t,!0)):new n(NaN)};Se.squareRoot=Se.sqrt=function(){var e,t,r,n,a,i,o=this,l=o.d,u=o.e,s=o.s,c=o.constructor;if(s!==1||!l||!l[0])return new c(!s||s<0&&(!l||l[0])?NaN:l?o:1/0);for(it=!1,s=Math.sqrt(+o),s==0||s==1/0?(t=fr(l),(t.length+u)%2==0&&(t+="0"),s=Math.sqrt(t),u=vr((u+1)/2)-(u<0||u%2),s==1/0?t="5e"+u:(t=s.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new c(t)):n=new c(s.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(Rt(o,i,r+2,1)).times(.5),fr(i.d).slice(0,r)===(t=fr(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!a&&t=="4999"){if(!a&&(Ke(i,u+1,0),i.times(i).eq(o))){n=i;break}r+=4,a=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(Ke(n,u+1,1),e=!n.times(n).eq(o));break}return it=!0,Ke(n,u,c.rounding,e)};Se.tangent=Se.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=Rt(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,Ke(ea==2||ea==4?r.neg():r,e,t,!0)):new n(NaN)};Se.times=Se.mul=function(e){var t,r,n,a,i,o,l,u,s,c=this,p=c.constructor,f=c.d,m=(e=new p(e)).d;if(e.s*=c.s,!f||!f[0]||!m||!m[0])return new p(!e.s||f&&!f[0]&&!m||m&&!m[0]&&!f?NaN:!f||!m?e.s/0:e.s*0);for(r=vr(c.e/tt)+vr(e.e/tt),u=f.length,s=m.length,u=0;){for(t=0,a=u+n;a>n;)l=i[a]+m[n]*f[a-n-1]+t,i[a--]=l%Dn|0,t=l/Dn|0;i[a]=(i[a]+t)%Dn|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=Sc(i,r),it?Ke(e,p.precision,p.rounding):e};Se.toBinary=function(e,t){return sm(this,2,e,t)};Se.toDecimalPlaces=Se.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Fr(e,0,Aa),t===void 0?t=n.rounding:Fr(t,0,8),Ke(r,e+r.e+1,t))};Se.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=zn(n,!0):(Fr(e,0,Aa),t===void 0?t=a.rounding:Fr(t,0,8),n=Ke(new a(n),e+1,t),r=zn(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};Se.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?r=zn(a):(Fr(e,0,Aa),t===void 0?t=i.rounding:Fr(t,0,8),n=Ke(new i(a),e+a.e+1,t),r=zn(n,!1,e+n.e+1)),a.isNeg()&&!a.isZero()?"-"+r:r};Se.toFraction=function(e){var t,r,n,a,i,o,l,u,s,c,p,f,m=this,h=m.d,d=m.constructor;if(!h)return new d(m);if(s=r=new d(1),n=u=new d(0),t=new d(n),i=t.e=Xy(h)-m.e-1,o=i%tt,t.d[0]=tr(10,o<0?tt+o:o),e==null)e=i>0?t:s;else{if(l=new d(e),!l.isInt()||l.lt(s))throw Error(Ea+l);e=l.gt(t)?i>0?t:s:l}for(it=!1,l=new d(fr(h)),c=d.precision,d.precision=i=h.length*tt*2;p=Rt(l,t,0,1,1),a=r.plus(p.times(n)),a.cmp(e)!=1;)r=n,n=a,a=s,s=u.plus(p.times(a)),u=a,a=t,t=l.minus(p.times(a)),l=a;return a=Rt(e.minus(r),n,0,1,1),u=u.plus(a.times(s)),r=r.plus(a.times(n)),u.s=s.s=m.s,f=Rt(s,n,i,1).minus(m).abs().cmp(Rt(u,r,i,1).minus(m).abs())<1?[s,n]:[u,r],d.precision=c,it=!0,f};Se.toHexadecimal=Se.toHex=function(e,t){return sm(this,16,e,t)};Se.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:Fr(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(it=!1,r=Rt(r,e,0,t,1).times(e),it=!0,Ke(r)):(e.s=r.s,r=e),r};Se.toNumber=function(){return+this};Se.toOctal=function(e,t){return sm(this,8,e,t)};Se.toPower=Se.pow=function(e){var t,r,n,a,i,o,l=this,u=l.constructor,s=+(e=new u(e));if(!l.d||!e.d||!l.d[0]||!e.d[0])return new u(tr(+l,s));if(l=new u(l),l.eq(1))return l;if(n=u.precision,i=u.rounding,e.eq(1))return Ke(l,n,i);if(t=vr(e.e/tt),t>=e.d.length-1&&(r=s<0?-s:s)<=HB)return a=Ky(u,l,r,n),e.s<0?new u(1).div(a):Ke(a,n,i);if(o=l.s,o<0){if(tu.maxE+1||t0?o/0:0):(it=!1,u.rounding=l.s=1,r=Math.min(12,(t+"").length),a=im(e.times(ya(l,n+r)),n),a.d&&(a=Ke(a,n+5,1),rs(a.d,n,i)&&(t=n+10,a=Ke(im(e.times(ya(l,t+r)),t),t+5,1),+fr(a.d).slice(n+1,n+15)+1==1e14&&(a=Ke(a,n+1,0)))),a.s=o,it=!0,u.rounding=i,Ke(a,n,i))};Se.toPrecision=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=zn(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(Fr(e,1,Aa),t===void 0?t=a.rounding:Fr(t,0,8),n=Ke(new a(n),e,t),r=zn(n,e<=n.e||n.e<=a.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};Se.toSignificantDigits=Se.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Fr(e,1,Aa),t===void 0?t=n.rounding:Fr(t,0,8)),Ke(new n(r),e,t)};Se.toString=function(){var e=this,t=e.constructor,r=zn(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};Se.truncated=Se.trunc=function(){return Ke(new this.constructor(this),this.e+1,1)};Se.valueOf=Se.toJSON=function(){var e=this,t=e.constructor,r=zn(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function fr(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;tr)throw Error(Ea+e)}function rs(e,t,r,n){var a,i,o,l;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=tt,a=0):(a=Math.ceil((t+1)/tt),t%=tt),i=tr(10,tt-t),l=e[a]%i|0,n==null?t<3?(t==0?l=l/100|0:t==1&&(l=l/10|0),o=r<4&&l==99999||r>3&&l==49999||l==5e4||l==0):o=(r<4&&l+1==i||r>3&&l+1==i/2)&&(e[a+1]/i/100|0)==tr(10,t-2)-1||(l==i/2||l==0)&&(e[a+1]/i/100|0)==0:t<4?(t==0?l=l/1e3|0:t==1?l=l/100|0:t==2&&(l=l/10|0),o=(n||r<4)&&l==9999||!n&&r>3&&l==4999):o=((n||r<4)&&l+1==i||!n&&r>3&&l+1==i/2)&&(e[a+1]/i/1e3|0)==tr(10,t-3)-1,o}function Ac(e,t,r){for(var n,a=[0],i,o=0,l=e.length;or-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function GB(e,t){var r,n,a;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),a=(1/Cc(4,r)).toString()):(r=16,a="2.3283064365386962890625e-10"),e.precision+=r,t=Hi(e,1,t.times(a),new e(1));for(var i=r;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=r,t}var Rt=function(){function e(n,a,i){var o,l=0,u=n.length;for(n=n.slice();u--;)o=n[u]*a+l,n[u]=o%i|0,l=o/i|0;return l&&n.unshift(l),n}function t(n,a,i,o){var l,u;if(i!=o)u=i>o?1:-1;else for(l=u=0;la[l]?1:-1;break}return u}function r(n,a,i,o){for(var l=0;i--;)n[i]-=l,l=n[i]1;)n.shift()}return function(n,a,i,o,l,u){var s,c,p,f,m,h,d,v,x,N,g,y,E,b,S,A,w,D,F,R,P=n.constructor,U=n.s==a.s?1:-1,k=n.d,M=a.d;if(!k||!k[0]||!M||!M[0])return new P(!n.s||!a.s||(k?M&&k[0]==M[0]:!M)?NaN:k&&k[0]==0||!M?U*0:U/0);for(u?(m=1,c=n.e-a.e):(u=Dn,m=tt,c=vr(n.e/m)-vr(a.e/m)),F=M.length,w=k.length,x=new P(U),N=x.d=[],p=0;M[p]==(k[p]||0);p++);if(M[p]>(k[p]||0)&&c--,i==null?(b=i=P.precision,o=P.rounding):l?b=i+(n.e-a.e)+1:b=i,b<0)N.push(1),h=!0;else{if(b=b/m+2|0,p=0,F==1){for(f=0,M=M[0],b++;(p1&&(M=e(M,f,u),k=e(k,f,u),F=M.length,w=k.length),A=F,g=k.slice(0,F),y=g.length;y=u/2&&++D;do f=0,s=t(M,g,F,y),s<0?(E=g[0],F!=y&&(E=E*u+(g[1]||0)),f=E/D|0,f>1?(f>=u&&(f=u-1),d=e(M,f,u),v=d.length,y=g.length,s=t(d,g,v,y),s==1&&(f--,r(d,F=10;f/=10)p++;x.e=p+c*m-1,Ke(x,l?i+x.e+1:i,o,h)}return x}}();function Ke(e,t,r,n){var a,i,o,l,u,s,c,p,f,m=e.constructor;e:if(t!=null){if(p=e.d,!p)return e;for(a=1,l=p[0];l>=10;l/=10)a++;if(i=t-a,i<0)i+=tt,o=t,c=p[f=0],u=c/tr(10,a-o-1)%10|0;else if(f=Math.ceil((i+1)/tt),l=p.length,f>=l)if(n){for(;l++<=f;)p.push(0);c=u=0,a=1,i%=tt,o=i-tt+1}else break e;else{for(c=l=p[f],a=1;l>=10;l/=10)a++;i%=tt,o=i-tt+a,u=o<0?0:c/tr(10,a-o-1)%10|0}if(n=n||t<0||p[f+1]!==void 0||(o<0?c:c%tr(10,a-o-1)),s=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?o>0?c/tr(10,a-o):0:p[f-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,s?(t-=e.e+1,p[0]=tr(10,(tt-t%tt)%tt),e.e=-t||0):p[0]=e.e=0,e;if(i==0?(p.length=f,l=1,f--):(p.length=f+1,l=tr(10,tt-i),p[f]=o>0?(c/tr(10,a-o)%tr(10,o)|0)*l:0),s)for(;;)if(f==0){for(i=1,o=p[0];o>=10;o/=10)i++;for(o=p[0]+=l,l=1;o>=10;o/=10)l++;i!=l&&(e.e++,p[0]==Dn&&(p[0]=1));break}else{if(p[f]+=l,p[f]!=Dn)break;p[f--]=0,l=1}for(i=p.length;p[--i]===0;)p.pop()}return it&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+ba(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):a<0?(i="0."+ba(-a-1)+i,r&&(n=r-o)>0&&(i+=ba(n))):a>=o?(i+=ba(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+ba(n))):((n=a+1)0&&(a+1===o&&(i+="."),i+=ba(n))),i}function Sc(e,t){var r=e[0];for(t*=tt;r>=10;r/=10)t++;return t}function wc(e,t,r){if(t>zB)throw it=!0,r&&(e.precision=r),Error(Yy);return Ke(new e(Nc),t,1,!0)}function wn(e,t,r){if(t>am)throw Error(Yy);return Ke(new e(Tc),t,r,!0)}function Xy(e){var t=e.length-1,r=t*tt+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ba(e){for(var t="";e--;)t+="0";return t}function Ky(e,t,r,n){var a,i=new e(1),o=Math.ceil(n/tt+4);for(it=!1;;){if(r%2&&(i=i.times(t),Hy(i.d,o)&&(a=!0)),r=vr(r/2),r===0){r=i.d.length-1,a&&i.d[r]===0&&++i.d[r];break}t=t.times(t),Hy(t.d,o)}return it=!0,i}function qy(e){return e.d[e.d.length-1]&1}function Wy(e,t,r){for(var n,a=new e(t[0]),i=0;++i17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(it=!1,u=h):u=t,l=new f(.03125);e.e>-2;)e=e.times(l),p+=5;for(n=Math.log(tr(2,p))/Math.LN10*2+5|0,u+=n,r=i=o=new f(1),f.precision=u;;){if(i=Ke(i.times(e),u,1),r=r.times(++c),l=o.plus(Rt(i,r,u,1)),fr(l.d).slice(0,u)===fr(o.d).slice(0,u)){for(a=p;a--;)o=Ke(o.times(o),u,1);if(t==null)if(s<3&&rs(o.d,u-n,m,s))f.precision=u+=10,r=i=l=new f(1),c=0,s++;else return Ke(o,f.precision=h,m,it=!0);else return f.precision=h,o}o=l}}function ya(e,t){var r,n,a,i,o,l,u,s,c,p,f,m=1,h=10,d=e,v=d.d,x=d.constructor,N=x.rounding,g=x.precision;if(d.s<0||!v||!v[0]||!d.e&&v[0]==1&&v.length==1)return new x(v&&!v[0]?-1/0:d.s!=1?NaN:v?0:d);if(t==null?(it=!1,c=g):c=t,x.precision=c+=h,r=fr(v),n=r.charAt(0),Math.abs(i=d.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)d=d.times(e),r=fr(d.d),n=r.charAt(0),m++;i=d.e,n>1?(d=new x("0."+r),i++):d=new x(n+"."+r.slice(1))}else return s=wc(x,c+2,g).times(i+""),d=ya(new x(n+"."+r.slice(1)),c-h).plus(s),x.precision=g,t==null?Ke(d,g,N,it=!0):d;for(p=d,u=o=d=Rt(d.minus(1),d.plus(1),c,1),f=Ke(d.times(d),c,1),a=3;;){if(o=Ke(o.times(f),c,1),s=u.plus(Rt(o,new x(a),c,1)),fr(s.d).slice(0,c)===fr(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(wc(x,c+2,g).times(i+""))),u=Rt(u,new x(m),c,1),t==null)if(rs(u.d,c-h,N,l))x.precision=c+=h,s=o=d=Rt(p.minus(1),p.plus(1),c,1),f=Ke(d.times(d),c,1),a=l=1;else return Ke(u,x.precision=g,N,it=!0);else return x.precision=g,u;u=s,a+=2}}function Qy(e){return String(e.s*e.s/0)}function om(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(a=t.length;t.charCodeAt(a-1)===48;--a);if(t=t.slice(n,a),t){if(a-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%tt,r<0&&(n+=tt),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),$y.test(t))return om(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(kB.test(t))r=16,t=t.toLowerCase();else if(UB.test(t))r=2;else if(qB.test(t))r=8;else throw Error(Ea+t);for(i=t.search(/p/i),i>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),o=i>=0,n=e.constructor,o&&(t=t.replace(".",""),l=t.length,i=l-i,a=Ky(n,new n(r),i,i*2)),s=Ac(t,r,Dn),c=s.length-1,i=c;s[i]===0;--i)s.pop();return i<0?new n(e.s*0):(e.e=Sc(s,c),e.d=s,it=!1,o&&(e=Rt(e,a,l*4)),u&&(e=e.times(Math.abs(u)<54?tr(2,u):ns.pow(2,u))),it=!0,e)}function jB(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Hi(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Cc(5,r)),t=Hi(e,2,t,t);for(var a,i=new e(5),o=new e(16),l=new e(20);r--;)a=t.times(t),t=t.times(i.plus(a.times(o.times(a).minus(l))));return t}function Hi(e,t,r,n,a){var i,o,l,u,s=1,c=e.precision,p=Math.ceil(c/tt);for(it=!1,u=r.times(r),l=new e(n);;){if(o=Rt(l.times(u),new e(t++*t++),c,1),l=a?n.plus(o):n.minus(o),n=Rt(o.times(u),new e(t++*t++),c,1),o=l.plus(n),o.d[p]!==void 0){for(i=p;o.d[i]===l.d[i]&&i--;);if(i==-1)break}i=l,l=n,n=o,o=i,s++}return it=!0,o.d.length=p+1,o}function Cc(e,t){for(var r=e;--t;)r*=e;return r}function Zy(e,t){var r,n=t.s<0,a=wn(e,e.precision,1),i=a.times(.5);if(t=t.abs(),t.lte(i))return ea=n?4:1,t;if(r=t.divToInt(a),r.isZero())ea=n?3:2;else{if(t=t.minus(r.times(a)),t.lte(i))return ea=qy(r)?n?2:3:n?4:1,t;ea=qy(r)?n?1:4:n?3:2}return t.minus(a).abs()}function sm(e,t,r,n){var a,i,o,l,u,s,c,p,f,m=e.constructor,h=r!==void 0;if(h?(Fr(r,1,Aa),n===void 0?n=m.rounding:Fr(n,0,8)):(r=m.precision,n=m.rounding),!e.isFinite())c=Qy(e);else{for(c=zn(e),o=c.indexOf("."),h?(a=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):a=t,o>=0&&(c=c.replace(".",""),f=new m(1),f.e=c.length-o,f.d=Ac(zn(f),10,a),f.e=f.d.length),p=Ac(c,10,a),i=u=p.length;p[--u]==0;)p.pop();if(!p[0])c=h?"0p+0":"0";else{if(o<0?i--:(e=new m(e),e.d=p,e.e=i,e=Rt(e,f,r,n,0,a),p=e.d,i=e.e,s=Gy),o=p[r],l=a/2,s=s||p[r+1]!==void 0,s=n<4?(o!==void 0||s)&&(n===0||n===(e.s<0?3:2)):o>l||o===l&&(n===4||s||n===6&&p[r-1]&1||n===(e.s<0?8:7)),p.length=r,s)for(;++p[--r]>a-1;)p[r]=0,r||(++i,p.unshift(1));for(u=p.length;!p[u-1];--u);for(o=0,c="";o1)if(t==16||t==8){for(o=t==16?4:3,--u;u%o;u++)c+="0";for(p=Ac(c,a,t),u=p.length;!p[u-1];--u);for(o=1,c="1.";ou)for(i-=u;i--;)c+="0";else it)return e.length=t,!0}function VB(e){return new this(e).abs()}function $B(e){return new this(e).acos()}function XB(e){return new this(e).acosh()}function KB(e,t){return new this(e).plus(t)}function WB(e){return new this(e).asin()}function QB(e){return new this(e).asinh()}function ZB(e){return new this(e).atan()}function JB(e){return new this(e).atanh()}function eL(e,t){e=new this(e),t=new this(t);var r,n=this.precision,a=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=wn(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?wn(this,n,a):new this(0),r.s=e.s):!e.d||t.isZero()?(r=wn(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(Rt(e,t,i,1)),t=wn(this,i,1),this.precision=n,this.rounding=a,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(Rt(e,t,i,1)),r}function tL(e){return new this(e).cbrt()}function rL(e){return Ke(e=new this(e),e.e+1,2)}function nL(e,t,r){return new this(e).clamp(t,r)}function aL(e){if(!e||typeof e!="object")throw Error(Dc+"Object expected");var t,r,n,a=e.defaults===!0,i=["precision",1,Aa,"rounding",0,8,"toExpNeg",-qi,0,"toExpPos",0,qi,"maxE",0,qi,"minE",-qi,0,"modulo",0,9];for(t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ea+r+": "+n);if(r="crypto",a&&(this[r]=nm[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(jy);else this[r]=!1;else throw Error(Ea+r+": "+n);return this}function iL(e){return new this(e).cos()}function oL(e){return new this(e).cosh()}function Jy(e){var t,r,n;function a(i){var o,l,u,s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,zy(i)){s.s=i.s,it?!i.d||i.e>a.maxE?(s.e=NaN,s.d=null):i.e=10;l/=10)o++;it?o>a.maxE?(s.e=NaN,s.d=null):o=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:l[i++]=a%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i=214e7?crypto.randomBytes(4).copy(t,i):(l.push(a%1e7),i+=4);i=n/4}else throw Error(jy);else for(;i=10;a/=10)n++;n{var{on:t,config:r}=e,n=ei.clone({precision:r.precision,modulo:ei.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(a){return new n(a.value)},t&&t("config",function(a,i){a.precision!==i.precision&&n.config({precision:a.precision})}),n},{isClass:!0});var ar=Le(tE(),1);var FL="Complex",IL=[],Mc=C(FL,IL,()=>(Object.defineProperty(ar.default,"name",{value:"Complex"}),ar.default.prototype.constructor=ar.default,ar.default.prototype.type="Complex",ar.default.prototype.isComplex=!0,ar.default.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},ar.default.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},ar.default.prototype.format=function(e){var t="",r=this.im,n=this.re,a=Tn(this.re,e),i=Tn(this.im,e),o=ze(e)?e:e?e.precision:null;if(o!==null){var l=Math.pow(10,-o);Math.abs(n/r)t.re?1:e.ret.im?1:e.im(Object.defineProperty(Gn.default,"name",{value:"Fraction"}),Gn.default.prototype.constructor=Gn.default,Gn.default.prototype.type="Fraction",Gn.default.prototype.isFraction=!0,Gn.default.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Gn.default.fromJSON=function(e){return new Gn.default(e)},Gn.default),{isClass:!0});var PL="Range",UL=[],lm=C(PL,UL,()=>{function e(t,r,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var a=t!=null,i=r!=null,o=n!=null;if(a){if(Ue(t))t=t.toNumber();else if(typeof t!="number")throw new TypeError("Parameter start must be a number")}if(i){if(Ue(r))r=r.toNumber();else if(typeof r!="number")throw new TypeError("Parameter end must be a number")}if(o){if(Ue(n))n=n.toNumber();else if(typeof n!="number")throw new TypeError("Parameter step must be a number")}this.start=a?parseFloat(t):0,this.end=i?parseFloat(r):0,this.step=o?parseFloat(n):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(t){if(typeof t!="string")return null;var r=t.split(":"),n=r.map(function(i){return parseFloat(i)}),a=n.some(function(i){return isNaN(i)});if(a)return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var t=0,r=this.start,n=this.step,a=this.end,i=a-r;return cn(n)===cn(i)?t=Math.ceil(i/n):i===0&&(t=0),isNaN(t)&&(t=0),[t]},e.prototype.min=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start:this.start+(t-1)*this.step},e.prototype.max=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start+(t-1)*this.step:this.start},e.prototype.forEach=function(t){var r=this.start,n=this.step,a=this.end,i=0;if(n>0)for(;ra;)t(r,[i],this),r+=n,i++},e.prototype.map=function(t){var r=[];return this.forEach(function(n,a,i){r[a[0]]=t(n,a,i)}),r},e.prototype.toArray=function(){var t=[];return this.forEach(function(r,n){t[n[0]]=r}),t},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(t){var r=Tn(this.start,t);return this.step!==1&&(r+=":"+Tn(this.step,t)),r+=":"+Tn(this.end,t),r},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(t){return new e(t.start,t.end,t.step)},e},{isClass:!0});var kL="Matrix",qL=[],Rc=C(kL,qL,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(t,r){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(t,r,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(t,r,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(t,r){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(t,r){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(t,r){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});var lE=Le(va(),1);function pm(e,t,r){var n=e.constructor,a=new n(2),i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!Re(r))throw new Error("size must be an integer");if(e.greaterThan(a.pow(r-1).sub(1))||e.lessThan(a.pow(r-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(a.pow(r))),i="i".concat(r)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function oE(e,t){if(typeof t=="function")return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:r,precision:n,wordSize:a}=Xf(t);switch(r){case"fixed":return zL(e,n);case"exponential":return aE(e,n);case"engineering":return HL(e,n);case"bin":return pm(e,2,a);case"oct":return pm(e,8,a);case"hex":return pm(e,16,a);case"auto":{var i=iE(t?.lowerExp,-3),o=iE(t?.upperExp,5);if(e.isZero())return"0";var l,u=e.toSignificantDigits(n),s=u.e;return s>=i&&s=0?"+":"")+n.toString()}function aE(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function zL(e,t){return e.toFixed(t)}function iE(e,t){return ze(e)?e:Ue(e)?e.toNumber():t}function uE(e,t){var r=e.length-t.length,n=e.length;return e.substring(r,n)===t}function je(e,t){var r=GL(e,t);return t&&typeof t=="object"&&"truncate"in t&&r.length>t.truncate?r.substring(0,t.truncate-3)+"...":r}function GL(e,t){if(typeof e=="number")return Tn(e,t);if(Ue(e))return oE(e,t);if(YL(e))return!t||t.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return cE(e,t);if(It(e))return ti(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var r=Object.keys(e).map(n=>ti(n)+": "+je(e[n],t));return"{"+r.join(", ")+"}"}return String(e)}function ti(e){for(var t=String(e),r="",n=0;n/g,">"),t}function cE(e,t){if(Array.isArray(e)){for(var r="[",n=e.length,a=0;at?1:-1}function Ve(e,t,r){if(!(this instanceof Ve))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=new Error().stack}Ve.prototype=new RangeError;Ve.prototype.constructor=RangeError;Ve.prototype.name="DimensionError";Ve.prototype.isDimensionError=!0;function nr(e,t,r){if(!(this instanceof nr))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=r),this.min!==void 0&&this.index=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}nr.prototype=new RangeError;nr.prototype.constructor=RangeError;nr.prototype.name="IndexError";nr.prototype.isIndexError=!0;function Ge(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function pE(e,t,r){var n,a=e.length;if(a!==t[r])throw new Ve(a,t[r]);if(r")}function mm(e,t){var r=t.length===0;if(r){if(Array.isArray(e))throw new Ve(e.length,0)}else pE(e,t,0)}function as(e,t){var r=e.isMatrix?e._size:Ge(e),n=t._sourceSize;n.forEach((a,i)=>{if(a!==null&&a!==r[i])throw new Ve(a,r[i])})}function vt(e,t){if(e!==void 0){if(!ze(e)||!Re(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new nr(e,t)}}function ri(e){for(var t=0;t=0,u=t%r===0;if(l)if(u)n[i]=-t/r;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-r);return n}function fE(e){return e.reduce((t,r)=>t*r,1)}function jL(e,t){for(var r=e,n,a=t.length-1;a>0;a--){var i=t[a];n=[];for(var o=r.length/i,l=0;lt.test(r))}function dm(e,t){return Array.prototype.join.call(e,t)}function ta(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var t=[],r=0;t[0]={value:e[0],identifier:0};for(var n=1;n1)return e.slice(1).reduce(function(r,n){return hE(r,n,t,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function VL(){for(var e=arguments.length,t=new Array(e),r=0;rf.length),a=Math.max(...n),i=new Array(a).fill(null),o=0;oi[c]&&(i[c]=l[s])}for(var p=0;p1||e[a]>t[i])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[a]," to size ").concat(t[i]))}}function vm(e,t){var r=Ge(e);if(Nn(r,t))return e;ss(r,t);var n=VL(r,t),a=n.length,i=[...Array(a-r.length).fill(1),...r],o=XL(e);r.length1&&arguments[1]!==void 0?arguments[1]:{};return r=r??Number.POSITIVE_INFINITY,t=t??JSON.stringify,function n(){typeof n.cache!="object"&&(n.cache={values:new Map,lru:vE(r||Number.POSITIVE_INFINITY)});for(var a=[],i=0;i{var{Matrix:t}=e;function r(c,p){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(p&&!It(p))throw new Error("Invalid datatype: "+p);if(Fe(c))c.type==="DenseMatrix"?(this._data=qe(c._data),this._size=qe(c._size),this._datatype=p||c._datatype):(this._data=c.toArray(),this._size=c.size(),this._datatype=p||c._datatype);else if(c&&at(c.data)&&at(c.size))this._data=c.data,this._size=c.size,mm(this._data,this._size),this._datatype=p||c.datatype;else if(at(c))this._data=s(c),this._size=Ge(this._data),mm(this._data,this._size),this._datatype=p;else{if(c)throw new TypeError("Unsupported type of data ("+ut(c)+")");this._data=[],this._size=[0],this._datatype=p}}r.prototype=new t,r.prototype.createDenseMatrix=function(c,p){return new r(c,p)},Object.defineProperty(r,"name",{value:"DenseMatrix"}),r.prototype.constructor=r,r.prototype.type="DenseMatrix",r.prototype.isDenseMatrix=!0,r.prototype.getDataType=function(){return Ta(this._data,ut)},r.prototype.storage=function(){return"dense"},r.prototype.datatype=function(){return this._datatype},r.prototype.create=function(c,p){return new r(c,p)},r.prototype.subset=function(c,p,f){switch(arguments.length){case 1:return n(this,c);case 2:case 3:return i(this,c,p,f);default:throw new SyntaxError("Wrong number of arguments")}},r.prototype.get=function(c){if(!at(c))throw new TypeError("Array expected");if(c.length!==this._size.length)throw new Ve(c.length,this._size.length);for(var p=0;p");var g=p.max().map(function(b){return b+1});u(c,g,m);var y=h.length,E=0;o(c._data,p,f,y,E)}return c}function o(c,p,f,m,h){var d=h===m-1,v=p.dimension(h);d?v.forEach(function(x,N){vt(x),c[x]=f[N[0]]}):v.forEach(function(x,N){vt(x),o(c[x],p,f[N[0]],m,h+1)})}r.prototype.resize=function(c,p,f){if(!Lt(c))throw new TypeError("Array or Matrix expected");var m=c.valueOf().map(d=>Array.isArray(d)&&d.length===1?d[0]:d),h=f?this.clone():this;return l(h,m,p)};function l(c,p,f){if(p.length===0){for(var m=c._data;at(m);)m=m[0];return m}return c._size=p.slice(0),c._data=Sn(c._data,c._size,f),c}r.prototype.reshape=function(c,p){var f=p?this.clone():this;f._data=is(f._data,c);var m=f._size.reduce((h,d)=>h*d);return f._size=os(c,m),f};function u(c,p,f){for(var m=c._size.slice(0),h=!1;m.lengthm[d]&&(m[d]=p[d],h=!0);h&&l(c,m,f)}r.prototype.clone=function(){var c=new r({data:qe(this._data),size:qe(this._size),datatype:this._datatype});return c},r.prototype.size=function(){return this._size.slice(0)},r.prototype.map=function(c){var p=this,f=Lc(c),m=function v(x,N){return at(x)?x.map(function(g,y){return v(g,N.concat(y))}):f===1?c(x):f===2?c(x,N):c(x,N,p)},h=m(this._data,[]),d=this._datatype!==void 0?Ta(h,ut):void 0;return new r(h,d)},r.prototype.forEach=function(c){var p=this,f=function m(h,d){at(h)?h.forEach(function(v,x){m(v,d.concat(x))}):c(h,d,p)};f(this._data,[])},r.prototype[Symbol.iterator]=function*(){var c=function*p(f,m){if(at(f))for(var h=0;h[g[x]]);p.push(new r(N,c._datatype))},d=0;d0?c:0,f=c<0?-c:0,m=this._size[0],h=this._size[1],d=Math.min(m-f,h-p),v=[],x=0;x0?f:0,d=f<0?-f:0,v=c[0],x=c[1],N=Math.min(v-d,x-h),g;if(at(p)){if(p.length!==N)throw new Error("Invalid value array length");g=function(A){return p[A]}}else if(Fe(p)){var y=p.size();if(y.length!==1||y[0]!==N)throw new Error("Invalid matrix length");g=function(A){return p.get([A])}}else g=function(){return p};m||(m=Ue(g(0))?g(0).mul(0):0);var E=[];if(c.length>0){E=Sn(E,c,m);for(var b=0;b{var{typed:t}=e;return t(gE,{any:qe})});function Uc(e){var t=e.length,r=e[0].length,n,a,i=[];for(a=0;a=n.length)throw new nr(t,n.length);return Fe(e)?e.create(kc(e.valueOf(),t,r)):kc(e,t,r)}function kc(e,t,r){var n,a,i,o;if(t<=0)if(Array.isArray(e[0])){for(o=Uc(e),a=[],n=0;n{var{typed:t}=e;return t(xE,{number:Re,BigNumber:function(n){return n.isInt()},Fraction:function(n){return n.d===1&&isFinite(n.n)},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var Br="number",ra="number, number";function bm(e){return Math.abs(e)}bm.signature=Br;function ym(e,t){return e+t}ym.signature=ra;function Em(e,t){return e-t}Em.signature=ra;function Am(e,t){return e*t}Am.signature=ra;function JL(e,t){return e/t}JL.signature=ra;function Nm(e){return-e}Nm.signature=Br;function Tm(e){return e}Tm.signature=Br;function ji(e){return Ty(e)}ji.signature=Br;function wm(e){return e*e*e}wm.signature=Br;function Dm(e){return Math.exp(e)}Dm.signature=Br;function Sm(e){return wy(e)}Sm.signature=Br;function eP(e,t){if(!Re(e)||!Re(t))throw new Error("Parameters in function gcd must be integer numbers");for(var r;t!==0;)r=e%t,e=t,t=r;return e<0?-e:e}eP.signature=ra;function Cm(e,t){if(!Re(e)||!Re(t))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||t===0)return 0;for(var r,n=e*t;t!==0;)r=t,t=e%r,e=r;return Math.abs(n/e)}Cm.signature=ra;function bE(e,t){return t?Math.log(e)/Math.log(t):Math.log(e)}function _m(e){return Ny(e)}_m.signature=Br;function Mm(e){return Ay(e)}Mm.signature=Br;function tP(e){return hc(e)}tP.signature=Br;function rP(e,t){return t===0?e:e-t*Math.floor(e/t)}rP.signature=ra;function Om(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,r=t<0;if(r&&(t=-t),t===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(t)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return r?1/0:0;if(!isFinite(e))return r?0:e;var n=Math.pow(Math.abs(e),1/t);return n=e<0?-n:n,r?1/n:n}function Hc(e){return cn(e)}Hc.signature=Br;function nP(e){return Math.sqrt(e)}nP.signature=Br;function Rm(e){return e*e}Rm.signature=Br;function Fm(e,t){var r,n,a,i=0,o=1,l=1,u=0;if(!Re(e)||!Re(t))throw new Error("Parameters in function xgcd must be integer numbers");for(;t;)n=Math.floor(e/t),a=e-n*t,r=i,i=o-n*i,o=r,r=l,l=u-n*l,u=r,e=t,t=a;var s;return e<0?s=[-e,-o,-u]:s=[e,e?o:0,u],s}Fm.signature=ra;function Im(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}Im.signature=ra;function Vi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!Re(t)||t<0||t>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(Kf(e,t))}function aP(e){return Math.abs(e)}aP.signature=Br;var iP="number",$i="number, number";function Bm(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function bitAnd");return e&t}Bm.signature=$i;function Lm(e){if(!Re(e))throw new Error("Integer expected in function bitNot");return~e}Lm.signature=iP;function Pm(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function bitOr");return e|t}Pm.signature=$i;function Um(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function bitXor");return e^t}Um.signature=$i;function km(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function leftShift");return e<>t}qm.signature=$i;function Hm(e,t){if(!Re(e)||!Re(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}Hm.signature=$i;function Kr(e,t){if(t>1;return Kr(e,r)*Kr(r+1,t)}function zm(e,t){if(!Re(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!Re(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");for(var r=e-t,n=1,a=t171?1/0:Kr(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*us(1-e));if(e>=171.35)return 1/0;if(e>85){var r=e*e,n=r*e,a=n*e,i=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*r)-139/(51840*n)-571/(2488320*a)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,t=ai[0];for(var o=1;o=1;n--)r+=TE[n]/(e+n);return Km+(e+.5)*Math.log(t)-t+Math.log(r)}cs.signature="number";var kt="number",cP="number, number";function lP(e){return Math.acos(e)}lP.signature=kt;function Wm(e){return Cy(e)}Wm.signature=kt;function Qm(e){return Math.atan(1/e)}Qm.signature=kt;function Zm(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}Zm.signature=kt;function Jm(e){return Math.asin(1/e)}Jm.signature=kt;function ed(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}ed.signature=kt;function td(e){return Math.acos(1/e)}td.signature=kt;function rd(e){var t=1/e,r=Math.sqrt(t*t-1);return Math.log(r+t)}rd.signature=kt;function pP(e){return Math.asin(e)}pP.signature=kt;function nd(e){return _y(e)}nd.signature=kt;function fP(e){return Math.atan(e)}fP.signature=kt;function mP(e,t){return Math.atan2(e,t)}mP.signature=cP;function ad(e){return My(e)}ad.signature=kt;function dP(e){return Math.cos(e)}dP.signature=kt;function hP(e){return gc(e)}hP.signature=kt;function id(e){return 1/Math.tan(e)}id.signature=kt;function od(e){var t=Math.exp(2*e);return(t+1)/(t-1)}od.signature=kt;function sd(e){return 1/Math.sin(e)}sd.signature=kt;function ud(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*cn(e)}ud.signature=kt;function cd(e){return 1/Math.cos(e)}cd.signature=kt;function ld(e){return 2/(Math.exp(e)+Math.exp(-e))}ld.signature=kt;function vP(e){return Math.sin(e)}vP.signature=kt;function pd(e){return Oy(e)}pd.signature=kt;function gP(e){return Math.tan(e)}gP.signature=kt;function xP(e){return xc(e)}xP.signature=kt;var ls="number";function bP(e){return Re(e)}bP.signature=ls;function fd(e){return e<0}fd.signature=ls;function md(e){return e>0}md.signature=ls;function dd(e){return e===0}dd.signature=ls;function hd(e){return Number.isNaN(e)}hd.signature=ls;var wE="isNegative",yP=["typed"],vd=C(wE,yP,e=>{var{typed:t}=e;return t(wE,{number:fd,BigNumber:function(n){return n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s<0},Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var DE="isNumeric",EP=["typed"],gd=C(DE,EP,e=>{var{typed:t}=e;return t(DE,{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var SE="hasNumericValue",AP=["typed","isNumeric"],xd=C(SE,AP,e=>{var{typed:t,isNumeric:r}=e;return t(SE,{boolean:()=>!0,string:function(a){return a.trim().length>0&&!isNaN(Number(a))},any:function(a){return r(a)}})});var CE="isPositive",NP=["typed"],bd=C(CE,NP,e=>{var{typed:t}=e;return t(CE,{number:md,BigNumber:function(n){return!n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s>0&&n.n>0},Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var _E="isZero",TP=["typed"],zc=C(_E,TP,e=>{var{typed:t}=e;return t(_E,{number:dd,BigNumber:function(n){return n.isZero()},Complex:function(n){return n.re===0&&n.im===0},Fraction:function(n){return n.d===1&&n.n===0},Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var ME="isNaN",wP=["typed"],yd=C(ME,wP,e=>{var{typed:t}=e;return t(ME,{number:hd,BigNumber:function(n){return n.isNaN()},Fraction:function(n){return!1},Complex:function(n){return n.isNaN()},Unit:function(n){return Number.isNaN(n.value)},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var OE="typeOf",DP=["typed"],Ed=C(OE,DP,e=>{var{typed:t}=e;return t(OE,{any:ut})});function Xt(e,t,r){if(r==null)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var n=e.minus(t).abs();if(n.isZero())return!0;var a=e.constructor.max(e.abs(),t.abs());return n.lte(a.times(r))}return!1}function RE(e,t,r){return Pt(e.re,t.re,r)&&Pt(e.im,t.im,r)}var pn=C("compareUnits",["typed"],e=>{var{typed:t}=e;return{"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(!n.equalBase(a))throw new Error("Cannot compare units with different base");return t.find(r,[n.valueType(),a.valueType()])(n.value,a.value)})}});var Gc="equalScalar",SP=["typed","config"],Yc=C(Gc,SP,e=>{var{typed:t,config:r}=e,n=pn({typed:t});return t(Gc,{"boolean, boolean":function(i,o){return i===o},"number, number":function(i,o){return Pt(i,o,r.epsilon)},"BigNumber, BigNumber":function(i,o){return i.eq(o)||Xt(i,o,r.epsilon)},"Fraction, Fraction":function(i,o){return i.equals(o)},"Complex, Complex":function(i,o){return RE(i,o,r.epsilon)}},n)}),Dre=C(Gc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(Gc,{"number, number":function(a,i){return Pt(a,i,r.epsilon)}})});var CP="SparseMatrix",_P=["typed","equalScalar","Matrix"],jc=C(CP,_P,e=>{var{typed:t,equalScalar:r,Matrix:n}=e;function a(d,v){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(v&&!It(v))throw new Error("Invalid datatype: "+v);if(Fe(d))i(this,d,v);else if(d&&at(d.index)&&at(d.ptr)&&at(d.size))this._values=d.values,this._index=d.index,this._ptr=d.ptr,this._size=d.size,this._datatype=v||d.datatype;else if(at(d))o(this,d,v);else{if(d)throw new TypeError("Unsupported type of data ("+ut(d)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=v}}function i(d,v,x){v.type==="SparseMatrix"?(d._values=v._values?qe(v._values):void 0,d._index=qe(v._index),d._ptr=qe(v._ptr),d._size=qe(v._size),d._datatype=x||v._datatype):o(d,v.valueOf(),x||v._datatype)}function o(d,v,x){d._values=[],d._index=[],d._ptr=[],d._datatype=x;var N=v.length,g=0,y=r,E=0;if(It(x)&&(y=t.find(r,[x,x])||r,E=t.convert(0,x)),N>0){var b=0;do{d._ptr.push(d._index.length);for(var S=0;S");if(g.length===1){var A=v.dimension(0);A.forEach(function(F,R){vt(F),d.set([F,0],x[R[0]],N)})}else{var w=v.dimension(0),D=v.dimension(1);w.forEach(function(F,R){vt(F),D.forEach(function(P,U){vt(P),d.set([F,P],x[R[0]][U[0]],N)})})}}return d}a.prototype.get=function(d){if(!at(d))throw new TypeError("Array expected");if(d.length!==this._size.length)throw new Ve(d.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var v=d[0],x=d[1];vt(v,this._size[0]),vt(x,this._size[1]);var N=s(v,this._ptr[x],this._ptr[x+1],this._index);return Ny-1||g>E-1)&&(f(this,Math.max(N+1,y),Math.max(g+1,E),x),y=this._size[0],E=this._size[1]),vt(N,y),vt(g,E);var A=s(N,this._ptr[g],this._ptr[g+1],this._index);return AArray.isArray(y)&&y.length===1?y[0]:y);if(N.length!==2)throw new Error("Only two dimensions matrix are supported");N.forEach(function(y){if(!ze(y)||!Re(y)||y<0)throw new TypeError("Invalid size, must contain positive integers (size: "+je(N)+")")});var g=x?this.clone():this;return f(g,N[0],N[1],v)};function f(d,v,x,N){var g=N||0,y=r,E=0;It(d._datatype)&&(y=t.find(r,[d._datatype,d._datatype])||r,E=t.convert(0,d._datatype),g=t.convert(g,d._datatype));var b=!y(g,E),S=d._size[0],A=d._size[1],w,D,F;if(x>A){for(D=A;DS){if(b){var R=0;for(D=0;Dv-1&&(d._values.splice(F,1),d._index.splice(F,1),U++)}d._ptr[D]=d._values.length}return d._size[0]=v,d._size[1]=x,d}a.prototype.reshape=function(d,v){if(!at(d))throw new TypeError("Array expected");if(d.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");d.forEach(function(B){if(!ze(B)||!Re(B)||B<=-2||B===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+je(d)+")")});var x=this._size[0]*this._size[1];d=os(d,x);var N=d[0]*d[1];if(x!==N)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var g=v?this.clone():this;if(this._size[0]===d[0]&&this._size[1]===d[1])return g;for(var y=[],E=0;E=v&&M<=x&&F(d._values[k],M-v,R-N)}else{for(var _={},q=P;q "+(this._values?je(this._values[S],d):"X")}return g},a.prototype.toString=function(){return je(this.toArray())},a.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},a.prototype.diagonal=function(d){if(d){if(Ue(d)&&(d=d.toNumber()),!ze(d)||!Re(d))throw new TypeError("The parameter k must be an integer number")}else d=0;var v=d>0?d:0,x=d<0?-d:0,N=this._size[0],g=this._size[1],y=Math.min(N-x,g-v),E=[],b=[],S=[];S[0]=0;for(var A=v;A0?x:0,S=x<0?-x:0,A=d[0],w=d[1],D=Math.min(A-S,w-b),F;if(at(v)){if(v.length!==D)throw new Error("Invalid value array length");F=function(Z){return v[Z]}}else if(Fe(v)){var R=v.size();if(R.length!==1||R[0]!==D)throw new Error("Invalid matrix length");F=function(Z){return v.get([Z])}}else F=function(){return v};for(var P=[],U=[],k=[],M=0;M=0&&_=S||g[w]!==v)){var F=N?N[A]:void 0;g.splice(w,0,v),N&&N.splice(w,0,F),g.splice(w<=A?A+1:A,1),N&&N.splice(w<=A?A+1:A,1);continue}if(w=S||g[A]!==d)){var R=N?N[w]:void 0;g.splice(A,0,d),N&&N.splice(A,0,R),g.splice(A<=w?w+1:w,1),N&&N.splice(A<=w?w+1:w,1)}}},a},{isClass:!0});var MP="number",OP=["typed"];function RP(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var r={"0b":2,"0o":8,"0x":16}[t[1]],n=t[2],a=t[3];return{input:e,radix:r,integerPart:n,fractionalPart:a}}else return null}function FP(e){for(var t=parseInt(e.integerPart,e.radix),r=0,n=0;n{var{typed:t}=e,r=t("number",{"":function(){return 0},number:function(a){return a},string:function(a){if(a==="NaN")return NaN;var i=RP(a);if(i)return FP(i);var o=0,l=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);l&&(o=Number(l[2]),a=l[1]);var u=Number(a);if(isNaN(u))throw new SyntaxError('String "'+a+'" is not a valid number');if(l){if(u>2**o-1)throw new SyntaxError('String "'.concat(a,'" is out of range'));u>=2**(o-1)&&(u=u-2**o)}return u},BigNumber:function(a){return a.toNumber()},Fraction:function(a){return a.valueOf()},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),null:function(a){return 0},"Unit, string | Unit":function(a,i){return a.toNumber(i)},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))});return r.fromJSON=function(n){return parseFloat(n.value)},r});var IE="string",IP=["typed"],Ad=C(IE,IP,e=>{var{typed:t}=e;return t(IE,{"":function(){return""},number:Tn,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r)),any:function(n){return String(n)}})});var BE="boolean",BP=["typed"],Nd=C(BE,BP,e=>{var{typed:t}=e;return t(BE,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;var i=Number(n);if(n!==""&&!isNaN(i))return!!i;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var LP="bignumber",PP=["typed","BigNumber"],$c=C(LP,PP,e=>{var{typed:t,BigNumber:r}=e;return t("bignumber",{"":function(){return new r(0)},number:function(a){return new r(a+"")},string:function(a){var i=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(i){var o=i[2],l=r(i[1]),u=new r(2).pow(Number(o));if(l.gt(u.sub(1)))throw new SyntaxError('String "'.concat(a,'" is out of range'));var s=new r(2).pow(Number(o)-1);return l.gte(s)?l.sub(u):l}return new r(a)},BigNumber:function(a){return a},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Fraction:function(a){return new r(a.n).div(a.d).times(a.s)},null:function(a){return new r(0)},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var UP="complex",kP=["typed","Complex"],Td=C(UP,kP,e=>{var{typed:t,Complex:r}=e;return t("complex",{"":function(){return r.ZERO},number:function(a){return new r(a,0)},"number, number":function(a,i){return new r(a,i)},"BigNumber, BigNumber":function(a,i){return new r(a.toNumber(),i.toNumber())},Fraction:function(a){return new r(a.valueOf(),0)},Complex:function(a){return a.clone()},string:function(a){return r(a)},null:function(a){return r(0)},Object:function(a){if("re"in a&&"im"in a)return new r(a.re,a.im);if("r"in a&&"phi"in a||"abs"in a&&"arg"in a)return new r(a);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var qP="fraction",HP=["typed","Fraction"],Xc=C(qP,HP,e=>{var{typed:t,Fraction:r}=e;return t("fraction",{number:function(a){if(!isFinite(a)||isNaN(a))throw new Error(a+" cannot be represented as a fraction");return new r(a)},string:function(a){return new r(a)},"number, number":function(a,i){return new r(a,i)},null:function(a){return new r(0)},BigNumber:function(a){return new r(a.toString())},Fraction:function(a){return a},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Object:function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var LE="matrix",zP=["typed","Matrix","DenseMatrix","SparseMatrix"],Kc=C(LE,zP,e=>{var{typed:t,Matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(LE,{"":function(){return i([])},string:function(l){return i([],l)},"string, string":function(l,u){return i([],l,u)},Array:function(l){return i(l)},Matrix:function(l){return i(l,l.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(o,l,u){if(l==="dense"||l==="default"||l===void 0)return new n(o,u);if(l==="sparse")return new a(o,u);throw new TypeError("Unknown matrix type "+JSON.stringify(l)+".")}});var PE="matrixFromFunction",GP=["typed","matrix","isZero"],wd=C(PE,GP,e=>{var{typed:t,matrix:r,isZero:n}=e;return t(PE,{"Array | Matrix, function, string, string":function(o,l,u,s){return a(o,l,u,s)},"Array | Matrix, function, string":function(o,l,u){return a(o,l,u)},"Matrix, function":function(o,l){return a(o,l,"dense")},"Array, function":function(o,l){return a(o,l,"dense").toArray()},"Array | Matrix, string, function":function(o,l,u){return a(o,u,l)},"Array | Matrix, string, string, function":function(o,l,u,s){return a(o,s,l,u)}});function a(i,o,l,u){var s;return u!==void 0?s=r(l,u):s=r(l),s.resize(i),s.forEach(function(c,p){var f=o(p);n(f)||s.set(p,f)}),s}});var UE="matrixFromRows",YP=["typed","matrix","flatten","size"],Dd=C(UE,YP,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(UE,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(s=>s.toArray())))}});function i(l){if(l.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var u=o(l[0]),s=[];for(var c of l){var p=o(c);if(p!==u)throw new TypeError("The vectors had different length: "+(u|0)+" \u2260 "+(p|0));s.push(n(c))}return s}function o(l){var u=a(l);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}});var kE="matrixFromColumns",jP=["typed","matrix","flatten","size"],Sd=C(kE,jP,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(kE,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(s=>s.toArray())))}});function i(l){if(l.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var u=o(l[0]),s=[],c=0;c{var{typed:t}=e;return t(qE,{"Unit, Array":function(n,a){return n.splitUnit(a)}})});var HE="unaryMinus",$P=["typed"],Wc=C(HE,$P,e=>{var{typed:t}=e;return t(HE,{number:Nm,"Complex | BigNumber | Fraction":r=>r.neg(),Unit:t.referToSelf(r=>n=>{var a=n.clone();return a.value=t.find(r,a.valueType())(n.value),a}),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r,!0))})});var zE="unaryPlus",XP=["typed","config","BigNumber"],_d=C(zE,XP,e=>{var{typed:t,config:r,BigNumber:n}=e;return t(zE,{number:Tm,Complex:function(i){return i},BigNumber:function(i){return i},Fraction:function(i){return i},Unit:function(i){return i.clone()},"Array | Matrix":t.referToSelf(a=>i=>Pe(i,a,!0)),"boolean | string":function(i){return r.number==="BigNumber"?new n(+i):+i}})});var GE="abs",KP=["typed"],Qc=C(GE,KP,e=>{var{typed:t}=e;return t(GE,{number:bm,"Complex | BigNumber | Fraction | Unit":r=>r.abs(),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r,!0))})});var YE="apply",WP=["typed","isInteger"],ii=C(YE,WP,e=>{var{typed:t,isInteger:r}=e;return t(YE,{"Array | Matrix, number | BigNumber, function":function(a,i,o){if(!r(i))throw new TypeError("Integer number expected for dimension");var l=Array.isArray(a)?Ge(a):a.size();if(i<0||i>=l.length)throw new nr(i,l.length);return Fe(a)?a.create(Zc(a.valueOf(),i,o)):Zc(a,i,o)}})});function Zc(e,t,r){var n,a,i;if(t<=0)if(Array.isArray(e[0])){for(i=QP(e),a=[],n=0;n{var{typed:t}=e;return t(jE,{"number, number":ym,"Complex, Complex":function(n,a){return n.add(a)},"BigNumber, BigNumber":function(n,a){return n.plus(a)},"Fraction, Fraction":function(n,a){return n.add(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})});var VE="subtractScalar",JP=["typed"],el=C(VE,JP,e=>{var{typed:t}=e;return t(VE,{"number, number":Em,"Complex, Complex":function(n,a){return n.sub(a)},"BigNumber, BigNumber":function(n,a){return n.minus(a)},"Fraction, Fraction":function(n,a){return n.sub(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})});var $E="cbrt",e5=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],Md=C($E,e5,e=>{var{config:t,typed:r,isNegative:n,unaryMinus:a,matrix:i,Complex:o,BigNumber:l,Fraction:u}=e;return r($E,{number:ji,Complex:s,"Complex, boolean":s,BigNumber:function(f){return f.cbrt()},Unit:c});function s(p,f){var m=p.arg()/3,h=p.abs(),d=new o(ji(h),0).mul(new o(0,m).exp());if(f){var v=[d,new o(ji(h),0).mul(new o(0,m+Math.PI*2/3).exp()),new o(ji(h),0).mul(new o(0,m-Math.PI*2/3).exp())];return t.matrix==="Array"?v:i(v)}else return d}function c(p){if(p.value&&Zt(p.value)){var f=p.clone();return f.value=1,f=f.pow(1/3),f.value=s(p.value),f}else{var m=n(p.value);m&&(p.value=a(p.value));var h;Ue(p.value)?h=new l(1).div(3):$r(p.value)?h=new u(1,3):h=1/3;var d=p.pow(h);return m&&(d.value=a(d.value)),d}}});var t5="matAlgo11xS0s",r5=["typed","equalScalar"],gt=C(t5,r5,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,l){var u=a._values,s=a._index,c=a._ptr,p=a._size,f=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var m=p[0],h=p[1],d,v=r,x=0,N=o;typeof f=="string"&&(d=f,v=t.find(r,[d,d]),x=t.convert(0,d),i=t.convert(i,d),N=t.find(o,[d,d]));for(var g=[],y=[],E=[],b=0;b{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,l){var u=a._values,s=a._index,c=a._ptr,p=a._size,f=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var m=p[0],h=p[1],d,v=o;typeof f=="string"&&(d=f,i=t.convert(i,d),v=t.find(o,[d,d]));for(var x=[],N=[],g=[],y=0;y{var{typed:t}=e;return function(a,i,o,l){var u=a._data,s=a._size,c=a._datatype,p,f=o;typeof c=="string"&&(p=c,i=t.convert(i,p),f=t.find(o,[p,p]));var m=s.length>0?r(f,0,s,s[0],u,i,l):[];return a.createDenseMatrix({data:m,size:qe(s),datatype:p})};function r(n,a,i,o,l,u,s){var c=[];if(a===i.length-1)for(var p=0;p{var{typed:t,config:r,round:n}=e;return t(Od,{number:function(i){return Pt(i,n(i),r.epsilon)?n(i):Math.ceil(i)},"number, number":function(i,o){if(Pt(i,n(i,o),r.epsilon))return n(i,o);var[l,u]="".concat(i,"e").split("e"),s=Math.ceil(Number("".concat(l,"e").concat(Number(u)+o)));return[l,u]="".concat(s,"e").split("e"),Number("".concat(l,"e").concat(Number(u)-o))}})}),Rd=C(Od,s5,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:l}=e,u=gt({typed:t,equalScalar:i}),s=lt({typed:t,DenseMatrix:l}),c=Gt({typed:t}),p=u5({typed:t,config:r,round:n});return t("ceil",{number:p.signatures.number,"number,number":p.signatures["number,number"],Complex:function(m){return m.ceil()},"Complex, number":function(m,h){return m.ceil(h)},"Complex, BigNumber":function(m,h){return m.ceil(h.toNumber())},BigNumber:function(m){return Xt(m,n(m),r.epsilon)?n(m):m.ceil()},"BigNumber, BigNumber":function(m,h){return Xt(m,n(m,h),r.epsilon)?n(m,h):m.toDecimalPlaces(h.toNumber(),ei.ROUND_CEIL)},Fraction:function(m){return m.ceil()},"Fraction, number":function(m,h){return m.ceil(h)},"Fraction, BigNumber":function(m,h){return m.ceil(h.toNumber())},"Array | Matrix":t.referToSelf(f=>m=>Pe(m,f,!0)),"Array, number | BigNumber":t.referToSelf(f=>(m,h)=>Pe(m,d=>f(d,h),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>u(m,h,f,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>c(m,h,f,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(f=>(m,h)=>c(a(h),m,f,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(f=>(m,h)=>i(m,0)?o(h.size(),h.storage()):h.storage()==="dense"?c(h,m,f,!0):s(h,m,f,!0))})});var XE="cube",c5=["typed"],Fd=C(XE,c5,e=>{var{typed:t}=e;return t(XE,{number:wm,Complex:function(n){return n.mul(n).mul(n)},BigNumber:function(n){return n.times(n).times(n)},Fraction:function(n){return n.pow(3)},Unit:function(n){return n.pow(3)}})});var KE="exp",l5=["typed"],Id=C(KE,l5,e=>{var{typed:t}=e;return t(KE,{number:Dm,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})});var WE="expm1",p5=["typed","Complex"],Bd=C(WE,p5,e=>{var{typed:t,Complex:r}=e;return t(WE,{number:Sm,Complex:function(a){var i=Math.exp(a.re);return new r(i*Math.cos(a.im)-1,i*Math.sin(a.im))},BigNumber:function(a){return a.exp().minus(1)}})});var Ld="fix",f5=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],m5=C(Ld,["typed","ceil","floor"],e=>{var{typed:t,ceil:r,floor:n}=e;return t(Ld,{number:function(i){return i>0?n(i):r(i)},"number, number":function(i,o){return i>0?n(i,o):r(i,o)}})}),Pd=C(Ld,f5,e=>{var{typed:t,Complex:r,matrix:n,ceil:a,floor:i,equalScalar:o,zeros:l,DenseMatrix:u}=e,s=lt({typed:t,DenseMatrix:u}),c=Gt({typed:t}),p=m5({typed:t,ceil:a,floor:i});return t("fix",{number:p.signatures.number,"number, number | BigNumber":p.signatures["number,number"],Complex:function(m){return new r(m.re>0?Math.floor(m.re):Math.ceil(m.re),m.im>0?Math.floor(m.im):Math.ceil(m.im))},"Complex, number":function(m,h){return new r(m.re>0?i(m.re,h):a(m.re,h),m.im>0?i(m.im,h):a(m.im,h))},"Complex, BigNumber":function(m,h){var d=h.toNumber();return new r(m.re>0?i(m.re,d):a(m.re,d),m.im>0?i(m.im,d):a(m.im,d))},BigNumber:function(m){return m.isNegative()?a(m):i(m)},"BigNumber, number | BigNumber":function(m,h){return m.isNegative()?a(m,h):i(m,h)},Fraction:function(m){return m.s<0?m.ceil():m.floor()},"Fraction, number | BigNumber":function(m,h){return m.s<0?a(m,h):i(m,h)},"Array | Matrix":t.referToSelf(f=>m=>Pe(m,f,!0)),"Array | Matrix, number | BigNumber":t.referToSelf(f=>(m,h)=>Pe(m,d=>f(d,h),!0)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(f=>(m,h)=>c(n(h),m,f,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(f=>(m,h)=>o(m,0)?l(h.size(),h.storage()):h.storage()==="dense"?c(h,m,f,!0):s(h,m,f,!0))})});var Ud="floor",d5=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],h5=C(Ud,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;return t(Ud,{number:function(i){return Pt(i,n(i),r.epsilon)?n(i):Math.floor(i)},"number, number":function(i,o){if(Pt(i,n(i,o),r.epsilon))return n(i,o);var[l,u]="".concat(i,"e").split("e"),s=Math.floor(Number("".concat(l,"e").concat(Number(u)+o)));return[l,u]="".concat(s,"e").split("e"),Number("".concat(l,"e").concat(Number(u)-o))}})}),ps=C(Ud,d5,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:l}=e,u=gt({typed:t,equalScalar:i}),s=lt({typed:t,DenseMatrix:l}),c=Gt({typed:t}),p=h5({typed:t,config:r,round:n});return t("floor",{number:p.signatures.number,"number,number":p.signatures["number,number"],Complex:function(m){return m.floor()},"Complex, number":function(m,h){return m.floor(h)},"Complex, BigNumber":function(m,h){return m.floor(h.toNumber())},BigNumber:function(m){return Xt(m,n(m),r.epsilon)?n(m):m.floor()},"BigNumber, BigNumber":function(m,h){return Xt(m,n(m,h),r.epsilon)?n(m,h):m.toDecimalPlaces(h.toNumber(),ei.ROUND_FLOOR)},Fraction:function(m){return m.floor()},"Fraction, number":function(m,h){return m.floor(h)},"Fraction, BigNumber":function(m,h){return m.floor(h.toNumber())},"Array | Matrix":t.referToSelf(f=>m=>Pe(m,f,!0)),"Array, number | BigNumber":t.referToSelf(f=>(m,h)=>Pe(m,d=>f(d,h),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>u(m,h,f,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>c(m,h,f,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(f=>(m,h)=>c(a(h),m,f,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(f=>(m,h)=>i(m,0)?o(h.size(),h.storage()):h.storage()==="dense"?c(h,m,f,!0):s(h,m,f,!0))})});var v5="matAlgo02xDS0",g5=["typed","equalScalar"],Yt=C(v5,g5,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,l){var u=a._data,s=a._size,c=a._datatype||a.getDataType(),p=i._values,f=i._index,m=i._ptr,h=i._size,d=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(s.length!==h.length)throw new Ve(s.length,h.length);if(s[0]!==h[0]||s[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+h+")");if(!p)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var v=s[0],x=s[1],N,g=r,y=0,E=o;typeof c=="string"&&c===d&&c!=="mixed"&&(N=c,g=t.find(r,[N,N]),y=t.convert(0,N),E=t.find(o,[N,N]));for(var b=[],S=[],A=[],w=0;w{var{typed:t}=e;return function(n,a,i,o){var l=n._data,u=n._size,s=n._datatype||n.getDataType(),c=a._values,p=a._index,f=a._ptr,m=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==m.length)throw new Ve(u.length,m.length);if(u[0]!==m[0]||u[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+m+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=u[0],v=u[1],x,N=0,g=i;typeof s=="string"&&s===h&&s!=="mixed"&&(x=s,N=t.convert(0,x),g=t.find(i,[x,x]));for(var y=[],E=0;E{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._index,s=a._ptr,c=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType(),f=i._values,m=i._index,h=i._ptr,d=i._size,v=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new Ve(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");var x=c[0],N=c[1],g,y=r,E=0,b=o;typeof p=="string"&&p===v&&p!=="mixed"&&(g=p,y=t.find(r,[g,g]),E=t.convert(0,g),b=t.find(o,[g,g]));var S=l&&f?[]:void 0,A=[],w=[],D=S?[]:void 0,F=S?[]:void 0,R=[],P=[],U,k,M,_;for(k=0;k{var{typed:t}=e;return function(a,i,o){var l=a._data,u=a._size,s=a._datatype,c=i._data,p=i._size,f=i._datatype,m=[];if(u.length!==p.length)throw new Ve(u.length,p.length);for(var h=0;h0?r(v,0,m,m[0],l,c):[];return a.createDenseMatrix({data:x,size:m,datatype:d})};function r(n,a,i,o,l,u){var s=[];if(a===i.length-1)for(var c=0;c{var{concat:t}=e;return function(a,i){var o=Math.max(a._size.length,i._size.length);if(a._size.length===i._size.length&&a._size.every((h,d)=>h===i._size[d]))return[a,i];for(var l=r(a._size,o,0),u=r(i._size,o,0),s=[],c=0;c{var{typed:t,matrix:r,concat:n}=e,a=QE({typed:t}),i=Gt({typed:t}),o=ZE({concat:n});return function(u){var s=u.elop,c=u.SD||u.DS,p;s?(p={"DenseMatrix, DenseMatrix":(d,v)=>a(...o(d,v),s),"Array, Array":(d,v)=>a(...o(r(d),r(v)),s).valueOf(),"Array, DenseMatrix":(d,v)=>a(...o(r(d),v),s),"DenseMatrix, Array":(d,v)=>a(...o(d,r(v)),s)},u.SS&&(p["SparseMatrix, SparseMatrix"]=(d,v)=>u.SS(...o(d,v),s,!1)),u.DS&&(p["DenseMatrix, SparseMatrix"]=(d,v)=>u.DS(...o(d,v),s,!1),p["Array, SparseMatrix"]=(d,v)=>u.DS(...o(r(d),v),s,!1)),c&&(p["SparseMatrix, DenseMatrix"]=(d,v)=>c(...o(v,d),s,!0),p["SparseMatrix, Array"]=(d,v)=>c(...o(r(v),d),s,!0))):(p={"DenseMatrix, DenseMatrix":t.referToSelf(d=>(v,x)=>a(...o(v,x),d)),"Array, Array":t.referToSelf(d=>(v,x)=>a(...o(r(v),r(x)),d).valueOf()),"Array, DenseMatrix":t.referToSelf(d=>(v,x)=>a(...o(r(v),x),d)),"DenseMatrix, Array":t.referToSelf(d=>(v,x)=>a(...o(v,r(x)),d))},u.SS&&(p["SparseMatrix, SparseMatrix"]=t.referToSelf(d=>(v,x)=>u.SS(...o(v,x),d,!1))),u.DS&&(p["DenseMatrix, SparseMatrix"]=t.referToSelf(d=>(v,x)=>u.DS(...o(v,x),d,!1)),p["Array, SparseMatrix"]=t.referToSelf(d=>(v,x)=>u.DS(...o(r(v),x),d,!1))),c&&(p["SparseMatrix, DenseMatrix"]=t.referToSelf(d=>(v,x)=>c(...o(x,v),d,!0)),p["SparseMatrix, Array"]=t.referToSelf(d=>(v,x)=>c(...o(r(x),v),d,!0))));var f=u.scalar||"any",m=u.Ds||u.Ss;m&&(s?(p["DenseMatrix,"+f]=(d,v)=>i(d,v,s,!1),p[f+", DenseMatrix"]=(d,v)=>i(v,d,s,!0),p["Array,"+f]=(d,v)=>i(r(d),v,s,!1).valueOf(),p[f+", Array"]=(d,v)=>i(r(v),d,s,!0).valueOf()):(p["DenseMatrix,"+f]=t.referToSelf(d=>(v,x)=>i(v,x,d,!1)),p[f+", DenseMatrix"]=t.referToSelf(d=>(v,x)=>i(x,v,d,!0)),p["Array,"+f]=t.referToSelf(d=>(v,x)=>i(r(v),x,d,!1).valueOf()),p[f+", Array"]=t.referToSelf(d=>(v,x)=>i(r(x),v,d,!0).valueOf())));var h=u.sS!==void 0?u.sS:u.Ss;return s?(u.Ss&&(p["SparseMatrix,"+f]=(d,v)=>u.Ss(d,v,s,!1)),h&&(p[f+", SparseMatrix"]=(d,v)=>h(v,d,s,!0))):(u.Ss&&(p["SparseMatrix,"+f]=t.referToSelf(d=>(v,x)=>u.Ss(v,x,d,!1))),h&&(p[f+", SparseMatrix"]=t.referToSelf(d=>(v,x)=>h(x,v,d,!0)))),s&&s.signatures&&pc(p,s.signatures),p}});var JE="mod",C5=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],fs=C(JE,C5,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:l,concat:u}=e,s=ps({typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:l}),c=Yt({typed:t,equalScalar:i}),p=wt({typed:t}),f=Da({typed:t,equalScalar:i}),m=gt({typed:t,equalScalar:i}),h=lt({typed:t,DenseMatrix:l}),d=We({typed:t,matrix:a,concat:u});return t(JE,{"number, number":v,"BigNumber, BigNumber":function(N,g){return g.isZero()?N:N.sub(g.mul(s(N.div(g))))},"Fraction, Fraction":function(N,g){return g.equals(0)?N:N.sub(g.mul(s(N.div(g))))}},d({SS:f,DS:p,SD:c,Ss:m,sS:h}));function v(x,N){return N===0?x:x-N*s(x/N)}});var _5="matAlgo01xDSid",M5=["typed"],xr=C(_5,M5,e=>{var{typed:t}=e;return function(n,a,i,o){var l=n._data,u=n._size,s=n._datatype||n.getDataType(),c=a._values,p=a._index,f=a._ptr,m=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==m.length)throw new Ve(u.length,m.length);if(u[0]!==m[0]||u[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+m+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=u[0],v=u[1],x=typeof s=="string"&&s!=="mixed"&&s===h?s:void 0,N=x?t.find(i,[x,x]):i,g,y,E=[];for(g=0;g{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._index,s=a._ptr,c=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType(),f=i._values,m=i._index,h=i._ptr,d=i._size,v=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new Ve(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");var x=c[0],N=c[1],g,y=r,E=0,b=o;typeof p=="string"&&p===v&&p!=="mixed"&&(g=p,y=t.find(r,[g,g]),E=t.convert(0,g),b=t.find(o,[g,g]));var S=l&&f?[]:void 0,A=[],w=[],D=l&&f?[]:void 0,F=l&&f?[]:void 0,R=[],P=[],U,k,M,_,q;for(k=0;k{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,l){var u=a._values,s=a._index,c=a._ptr,p=a._size,f=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var m=p[0],h=p[1],d,v=o;typeof f=="string"&&(d=f,i=t.convert(i,d),v=t.find(o,[d,d]));for(var x=[],N=[],g=[],y=0;yArray.isArray(t))}var qd=C(eA,B5,e=>{var{typed:t,matrix:r,config:n,round:a,equalScalar:i,zeros:o,BigNumber:l,DenseMatrix:u,concat:s}=e,c=fs({typed:t,config:n,round:a,matrix:r,equalScalar:i,zeros:o,DenseMatrix:u,concat:s}),p=xr({typed:t}),f=Xi({typed:t,equalScalar:i}),m=Lr({typed:t,DenseMatrix:u}),h=We({typed:t,matrix:r,concat:s});return t(eA,{"number, number":d,"BigNumber, BigNumber":v,"Fraction, Fraction":(x,N)=>x.gcd(N)},h({SS:f,DS:p,Ss:m}),{[L5]:t.referToSelf(x=>(N,g,y)=>{for(var E=x(N,g),b=0;bN=>{if(N.length===1&&Array.isArray(N[0])&&tA(N[0]))return x(...N[0]);if(tA(N))return x(...N);throw new Wr("gcd() supports only 1d matrices!")}),Matrix:t.referToSelf(x=>N=>x(N.toArray()))});function d(x,N){if(!Re(x)||!Re(N))throw new Error("Parameters in function gcd must be integer numbers");for(var g;N!==0;)g=c(x,N),x=N,N=g;return x<0?-x:x}function v(x,N){if(!x.isInt()||!N.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var g=new l(0);!N.isZero();){var y=c(x,N);x=N,N=y}return x.lt(g)?x.neg():x}});var P5="matAlgo06xS0S0",U5=["typed","equalScalar"],Sa=C(P5,U5,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._size,s=a._datatype||a._data===void 0?a._datatype:a.getDataType(),c=i._values,p=i._size,f=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(u.length!==p.length)throw new Ve(u.length,p.length);if(u[0]!==p[0]||u[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+p+")");var m=u[0],h=u[1],d,v=r,x=0,N=o;typeof s=="string"&&s===f&&s!=="mixed"&&(d=s,v=t.find(r,[d,d]),x=t.convert(0,d),N=t.find(o,[d,d]));for(var g=l&&c?[]:void 0,y=[],E=[],b=g?[]:void 0,S=[],A=[],w=0;w{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=Yt({typed:t,equalScalar:n}),o=Sa({typed:t,equalScalar:n}),l=gt({typed:t,equalScalar:n}),u=We({typed:t,matrix:r,concat:a}),s="number | BigNumber | Fraction | Matrix | Array",c={};return c["".concat(s,", ").concat(s,", ...").concat(s)]=t.referToSelf(f=>(m,h,d)=>{for(var v=f(m,h),x=0;xf.lcm(m)},u({SS:o,DS:i,Ss:l}),c);function p(f,m){if(!f.isInt()||!m.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(f.isZero())return f;if(m.isZero())return m;for(var h=f.times(m);!m.isZero();){var d=m;m=f.mod(d),f=d}return h.div(f).abs()}});var nA="log10",q5=["typed","config","Complex"],zd=C(nA,q5,e=>{var{typed:t,config:r,Complex:n}=e;return t(nA,{number:function(i){return i>=0||r.predictable?_m(i):new n(i,0).log().div(Math.LN10)},Complex:function(i){return new n(i).log().div(Math.LN10)},BigNumber:function(i){return!i.isNegative()||r.predictable?i.log():new n(i.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":t.referToSelf(a=>i=>Pe(i,a))})});var aA="log2",H5=["typed","config","Complex"],Gd=C(aA,H5,e=>{var{typed:t,config:r,Complex:n}=e;return t(aA,{number:function(o){return o>=0||r.predictable?Mm(o):a(new n(o,0))},Complex:a,BigNumber:function(o){return!o.isNegative()||r.predictable?o.log(2):a(new n(o.toNumber(),0))},"Array | Matrix":t.referToSelf(i=>o=>Pe(o,i))});function a(i){var o=Math.sqrt(i.re*i.re+i.im*i.im);return new n(Math.log2?Math.log2(o):Math.log(o)/Math.LN2,Math.atan2(i.im,i.re)/Math.LN2)}});var z5="multiplyScalar",G5=["typed"],tl=C(z5,G5,e=>{var{typed:t}=e;return t("multiplyScalar",{"number, number":Am,"Complex, Complex":function(n,a){return n.mul(a)},"BigNumber, BigNumber":function(n,a){return n.times(a)},"Fraction, Fraction":function(n,a){return n.mul(a)},"number | Fraction | BigNumber | Complex, Unit":(r,n)=>n.multiply(r),"Unit, number | Fraction | BigNumber | Complex | Unit":(r,n)=>r.multiply(n)})});var iA="multiply",Y5=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],rl=C(iA,Y5,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,equalScalar:i,dot:o}=e,l=gt({typed:t,equalScalar:i}),u=Gt({typed:t});function s(E,b){switch(E.length){case 1:switch(b.length){case 1:if(E[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(E[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+E[0]+") must match Matrix rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;case 2:switch(b.length){case 1:if(E[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+E[1]+") must match Vector length ("+b[0]+")");break;case 2:if(E[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+E[1]+") must match Matrix B rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+E.length+" dimensions)")}}function c(E,b,S){if(S===0)throw new Error("Cannot multiply two empty vectors");return o(E,b)}function p(E,b){if(b.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return f(E,b)}function f(E,b){var S=E._data,A=E._size,w=E._datatype||E.getDataType(),D=b._data,F=b._size,R=b._datatype||b.getDataType(),P=A[0],U=F[1],k,M=n,_=a;w&&R&&w===R&&typeof w=="string"&&w!=="mixed"&&(k=w,M=t.find(n,[k,k]),_=t.find(a,[k,k]));for(var q=[],B=0;BI)for(var H=0,ae=0;ae(b,S)=>{s(Ge(b),Ge(S));var A=E(r(b),r(S));return Fe(A)?A.valueOf():A}),"Matrix, Matrix":function(b,S){var A=b.size(),w=S.size();return s(A,w),A.length===1?w.length===1?c(b,S,A[0]):p(b,S):w.length===1?m(b,S):h(b,S)},"Matrix, Array":t.referTo("Matrix,Matrix",E=>(b,S)=>E(b,r(S))),"Array, Matrix":t.referToSelf(E=>(b,S)=>E(r(b,S.storage()),S)),"SparseMatrix, any":function(b,S){return l(b,S,a,!1)},"DenseMatrix, any":function(b,S){return u(b,S,a,!1)},"any, SparseMatrix":function(b,S){return l(S,b,a,!0)},"any, DenseMatrix":function(b,S){return u(S,b,a,!0)},"Array, any":function(b,S){return u(r(b),S,a,!1).valueOf()},"any, Array":function(b,S){return u(r(S),b,a,!0).valueOf()},"any, any":a,"any, any, ...any":t.referToSelf(E=>(b,S,A)=>{for(var w=E(b,S),D=0;D{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,concat:i}=e,o=xr({typed:t}),l=Yt({typed:t,equalScalar:n}),u=Sa({typed:t,equalScalar:n}),s=gt({typed:t,equalScalar:n}),c=We({typed:t,matrix:r,concat:i});function p(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return t(oA,{number:Om,"number, number":Om,BigNumber:m=>f(m,new a(2)),"BigNumber, BigNumber":f,Complex:p,"Complex, number":p,Array:t.referTo("DenseMatrix,number",m=>h=>m(r(h),2).valueOf()),DenseMatrix:t.referTo("DenseMatrix,number",m=>h=>m(h,2)),SparseMatrix:t.referTo("SparseMatrix,number",m=>h=>m(h,2)),"SparseMatrix, SparseMatrix":t.referToSelf(m=>(h,d)=>{if(d.density()===1)return u(h,d,m);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":t.referToSelf(m=>(h,d)=>{if(d.density()===1)return o(h,d,m,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":t.referTo("DenseMatrix,SparseMatrix",m=>(h,d)=>m(r(h),d)),"number | BigNumber, SparseMatrix":t.referToSelf(m=>(h,d)=>{if(d.density()===1)return s(d,h,m,!0);throw new Error("Root must be non-zero")})},c({scalar:"number | BigNumber",SD:l,Ss:s,sS:!1}));function f(m,h){var d=a.precision,v=a.clone({precision:d+2}),x=new a(0),N=new v(1),g=h.isNegative();if(g&&(h=h.neg()),h.isZero())throw new Error("Root must be non-zero");if(m.isNegative()&&!h.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(m.isZero())return g?new v(1/0):0;if(!m.isFinite())return g?x:m;var y=m.abs().pow(N.div(h));return y=m.isNeg()?y.neg():y,new a((g?N.div(y):y).toPrecision(d))}});var sA="sign",V5=["typed","BigNumber","Fraction","complex"],jd=C(sA,V5,e=>{var{typed:t,BigNumber:r,complex:n,Fraction:a}=e;return t(sA,{number:Hc,Complex:function(o){return o.im===0?n(Hc(o.re)):o.sign()},BigNumber:function(o){return new r(o.cmp(0))},Fraction:function(o){return new a(o.s,1)},"Array | Matrix":t.referToSelf(i=>o=>Pe(o,i,!0)),Unit:t.referToSelf(i=>o=>{if(!o._isDerived()&&o.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return t.find(i,o.valueType())(o.value)})})});var $5="sqrt",X5=["config","typed","Complex"],Vd=C($5,X5,e=>{var{config:t,typed:r,Complex:n}=e;return r("sqrt",{number:a,Complex:function(o){return o.sqrt()},BigNumber:function(o){return!o.isNegative()||t.predictable?o.sqrt():a(o.toNumber())},Unit:function(o){return o.pow(.5)}});function a(i){return isNaN(i)?NaN:i>=0||t.predictable?Math.sqrt(i):new n(i,0).sqrt()}});var uA="square",K5=["typed"],$d=C(uA,K5,e=>{var{typed:t}=e;return t(uA,{number:Rm,Complex:function(n){return n.mul(n)},BigNumber:function(n){return n.times(n)},Fraction:function(n){return n.mul(n)},Unit:function(n){return n.pow(2)}})});var cA="subtract",W5=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],nl=C(cA,W5,e=>{var{typed:t,matrix:r,equalScalar:n,subtractScalar:a,unaryMinus:i,DenseMatrix:o,concat:l}=e,u=xr({typed:t}),s=wt({typed:t}),c=Da({typed:t,equalScalar:n}),p=Lr({typed:t,DenseMatrix:o}),f=lt({typed:t,DenseMatrix:o}),m=We({typed:t,matrix:r,concat:l});return t(cA,{"any, any":a},m({elop:a,SS:c,DS:u,SD:s,Ss:f,sS:p}))});var lA="xgcd",Q5=["typed","config","matrix","BigNumber"],Xd=C(lA,Q5,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(lA,{"number, number":function(l,u){var s=Fm(l,u);return r.matrix==="Array"?s:n(s)},"BigNumber, BigNumber":i});function i(o,l){var u,s,c,p=new a(0),f=new a(1),m=p,h=f,d=f,v=p;if(!o.isInt()||!l.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!l.isZero();)s=o.div(l).floor(),c=o.mod(l),u=m,m=h.minus(s.times(m)),h=u,u=d,d=v.minus(s.times(d)),v=u,o=l,l=c;var x;return o.lt(p)?x=[o.neg(),h.neg(),v.neg()]:x=[o,o.isZero()?0:h,v],r.matrix==="Array"?x:n(x)}});var pA="invmod",Z5=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],Kd=C(pA,Z5,e=>{var{typed:t,config:r,BigNumber:n,xgcd:a,equal:i,smaller:o,mod:l,add:u,isInteger:s}=e;return t(pA,{"number, number":c,"BigNumber, BigNumber":c});function c(p,f){if(!s(p)||!s(f))throw new Error("Parameters in function invmod must be integer numbers");if(p=l(p,f),i(f,0))throw new Error("Divisor must be non zero");var m=a(p,f);m=m.valueOf();var[h,d]=m;return i(h,n(1))?(d=l(d,f),o(d,n(0))&&(d=u(d,f)),d):NaN}});var J5="matAlgo09xS0Sf",e9=["typed","equalScalar"],al=C(J5,e9,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._index,s=a._ptr,c=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType(),f=i._values,m=i._index,h=i._ptr,d=i._size,v=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new Ve(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");var x=c[0],N=c[1],g,y=r,E=0,b=o;typeof p=="string"&&p===v&&p!=="mixed"&&(g=p,y=t.find(r,[g,g]),E=t.convert(0,g),b=t.find(o,[g,g]));var S=l&&f?[]:void 0,A=[],w=[],D=S?[]:void 0,F=[],R,P,U,k,M;for(P=0;P{var{typed:t,matrix:r,equalScalar:n,multiplyScalar:a,concat:i}=e,o=Yt({typed:t,equalScalar:n}),l=al({typed:t,equalScalar:n}),u=gt({typed:t,equalScalar:n}),s=We({typed:t,matrix:r,concat:i});return t(fA,s({elop:a,SS:l,DS:o,Ss:u}))});function mA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitAnd");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new r(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new r(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new r(0):e}return Qd(e,t,function(n,a){return n&a})}function Ki(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,r=t.precision;t.config({precision:1e9});var n=e.plus(new t(1));return n.s=-n.s||null,t.config({precision:r}),n}function dA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);var n=new r(-1);return e.isZero()||t.eq(n)||e.eq(t)?t:t.isZero()||e.eq(n)?e:!e.isFinite()||!t.isFinite()?!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?n:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e:Qd(e,t,function(a,i){return a|i})}function Qd(e,t,r){var n=e.constructor,a,i,o=+(e.s<0),l=+(t.s<0);if(o){a=il(Ki(e));for(var u=0;u0;)r(c[--m],p[--h])===d&&(v=v.plus(x)),x=x.times(N);for(;h>0;)r(f,p[--h])===d&&(v=v.plus(x)),x=x.times(N);return n.config({precision:g}),d===0&&(v.s=-v.s),v}function il(e){for(var t=e.d,r=t[0]+"",n=1;n0)if(++l>s)for(l-=s;l--;)u+="0";else l1&&((c[m+1]===null||c[m+1]===void 0)&&(c[m+1]=0),c[m+1]+=c[m]>>1,c[m]&=1)}return c.reverse()}function hA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitXor");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new r(0);var n=new r(-1);return e.eq(n)?Ki(t):t.eq(n)?Ki(e):!e.isFinite()||!t.isFinite()?!e.isFinite()&&!t.isFinite()?n:new r(e.isNegative()===t.isNegative()?1/0:-1/0):Qd(e,t,function(a,i){return a^i})}function vA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:!e.isFinite()&&!t.isFinite()?new r(NaN):t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new r(2).pow(t))}function gA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new r(2).pow(t)).floor():e.isNegative()?new r(-1):e.isFinite()?new r(0):new r(NaN)}var xA="bitAnd",r9=["typed","matrix","equalScalar","concat"],ms=C(xA,r9,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=Yt({typed:t,equalScalar:n}),o=Sa({typed:t,equalScalar:n}),l=gt({typed:t,equalScalar:n}),u=We({typed:t,matrix:r,concat:a});return t(xA,{"number, number":Bm,"BigNumber, BigNumber":mA},u({SS:o,DS:i,Ss:l}))});var bA="bitNot",n9=["typed"],Zd=C(bA,n9,e=>{var{typed:t}=e;return t(bA,{number:Lm,BigNumber:Ki,"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var yA="bitOr",a9=["typed","matrix","equalScalar","DenseMatrix","concat"],ds=C(yA,a9,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=xr({typed:t}),l=Xi({typed:t,equalScalar:n}),u=Lr({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:r,concat:i});return t(yA,{"number, number":Pm,"BigNumber, BigNumber":dA},s({SS:l,DS:o,Ss:u}))});var i9="matAlgo07xSSf",o9=["typed","DenseMatrix"],Wt=C(i9,o9,e=>{var{typed:t,DenseMatrix:r}=e;return function(i,o,l){var u=i._size,s=i._datatype||i._data===void 0?i._datatype:i.getDataType(),c=o._size,p=o._datatype||o._data===void 0?o._datatype:o.getDataType();if(u.length!==c.length)throw new Ve(u.length,c.length);if(u[0]!==c[0]||u[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+c+")");var f=u[0],m=u[1],h,d=0,v=l;typeof s=="string"&&s===p&&s!=="mixed"&&(h=s,d=t.convert(0,h),v=t.find(l,[h,h]));var x,N,g=[];for(x=0;x{var{typed:t,matrix:r,DenseMatrix:n,concat:a}=e,i=wt({typed:t}),o=Wt({typed:t,DenseMatrix:n}),l=lt({typed:t,DenseMatrix:n}),u=We({typed:t,matrix:r,concat:a});return t(EA,{"number, number":Um,"BigNumber, BigNumber":hA},u({SS:o,DS:i,Ss:l}))});var AA="arg",u9=["typed"],eh=C(AA,u9,e=>{var{typed:t}=e;return t(AA,{number:function(n){return Math.atan2(0,n)},BigNumber:function(n){return n.constructor.atan2(0,n)},Complex:function(n){return n.arg()},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var NA="conj",c9=["typed"],ol=C(NA,c9,e=>{var{typed:t}=e;return t(NA,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.conjugate(),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var TA="im",l9=["typed"],th=C(TA,l9,e=>{var{typed:t}=e;return t(TA,{number:()=>0,"BigNumber | Fraction":r=>r.mul(0),Complex:r=>r.im,"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var wA="re",p9=["typed"],rh=C(wA,p9,e=>{var{typed:t}=e;return t(wA,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.re,"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var DA="not",f9=["typed"],nh=C(DA,f9,e=>{var{typed:t}=e;return t(DA,{"null | undefined":()=>!0,number:Ym,Complex:function(n){return n.re===0&&n.im===0},BigNumber:function(n){return n.isZero()||n.isNaN()},Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var SA="or",m9=["typed","matrix","equalScalar","DenseMatrix","concat"],hs=C(SA,m9,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Da({typed:t,equalScalar:n}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:r,concat:i});return t(SA,{"number, number":jm,"Complex, Complex":function(p,f){return p.re!==0||p.im!==0||f.re!==0||f.im!==0},"BigNumber, BigNumber":function(p,f){return!p.isZero()&&!p.isNaN()||!f.isZero()&&!f.isNaN()},"Unit, Unit":t.referToSelf(c=>(p,f)=>c(p.value||0,f.value||0))},s({SS:l,DS:o,Ss:u}))});var CA="xor",d9=["typed","matrix","DenseMatrix","concat"],ah=C(CA,d9,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a}=e,i=wt({typed:t}),o=Wt({typed:t,DenseMatrix:n}),l=lt({typed:t,DenseMatrix:n}),u=We({typed:t,matrix:r,concat:a});return t(CA,{"number, number":Vm,"Complex, Complex":function(c,p){return(c.re!==0||c.im!==0)!=(p.re!==0||p.im!==0)},"BigNumber, BigNumber":function(c,p){return(!c.isZero()&&!c.isNaN())!=(!p.isZero()&&!p.isNaN())},"Unit, Unit":t.referToSelf(s=>(c,p)=>s(c.value||0,p.value||0))},u({SS:o,DS:i,Ss:l}))});var _A="concat",h9=["typed","matrix","isInteger"],Wi=C(_A,h9,e=>{var{typed:t,matrix:r,isInteger:n}=e;return t(_A,{"...Array | Matrix | number | BigNumber":function(i){var o,l=i.length,u=-1,s,c=!1,p=[];for(o=0;o0&&u>s)throw new nr(u,s+1)}else{var m=qe(f).valueOf(),h=Ge(m);if(p[o]=m,s=u,u=h.length-1,o>0&&u!==s)throw new Ve(s+1,u+1)}}if(p.length===0)throw new SyntaxError("At least one matrix expected");for(var d=p.shift();p.length;)d=hm(d,p.shift(),u);return c?r(d):d},"...string":function(i){return i.join("")}})});var MA="column",v9=["typed","Index","matrix","range"],vs=C(MA,v9,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(MA,{"Matrix, number":i,"Array, number":function(l,u){return i(n(qe(l)),u).valueOf()}});function i(o,l){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");vt(l,o.size()[1]);var u=a(0,o.size()[0]),s=new r(u,l),c=o.subset(s);return Fe(c)?c:n([[c]])}});var OA="count",g9=["typed","size","prod"],ih=C(OA,g9,e=>{var{typed:t,size:r,prod:n}=e;return t(OA,{string:function(i){return i.length},"Matrix | Array":function(i){return n(r(i))}})});var RA="cross",x9=["typed","matrix","subtract","multiply"],oh=C(RA,x9,e=>{var{typed:t,matrix:r,subtract:n,multiply:a}=e;return t(RA,{"Matrix, Matrix":function(l,u){return r(i(l.toArray(),u.toArray()))},"Matrix, Array":function(l,u){return r(i(l.toArray(),u))},"Array, Matrix":function(l,u){return r(i(l,u.toArray()))},"Array, Array":i});function i(o,l){var u=Math.max(Ge(o).length,Ge(l).length);o=zi(o),l=zi(l);var s=Ge(o),c=Ge(l);if(s.length!==1||c.length!==1||s[0]!==3||c[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+s.join(", ")+"], B = ["+c.join(", ")+"])");var p=[n(a(o[1],l[2]),a(o[2],l[1])),n(a(o[2],l[0]),a(o[0],l[2])),n(a(o[0],l[1]),a(o[1],l[0]))];return u>1?[p]:p}});var FA="diag",b9=["typed","matrix","DenseMatrix","SparseMatrix"],sh=C(FA,b9,e=>{var{typed:t,matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(FA,{Array:function(s){return i(s,0,Ge(s),null)},"Array, number":function(s,c){return i(s,c,Ge(s),null)},"Array, BigNumber":function(s,c){return i(s,c.toNumber(),Ge(s),null)},"Array, string":function(s,c){return i(s,0,Ge(s),c)},"Array, number, string":function(s,c,p){return i(s,c,Ge(s),p)},"Array, BigNumber, string":function(s,c,p){return i(s,c.toNumber(),Ge(s),p)},Matrix:function(s){return i(s,0,s.size(),s.storage())},"Matrix, number":function(s,c){return i(s,c,s.size(),s.storage())},"Matrix, BigNumber":function(s,c){return i(s,c.toNumber(),s.size(),s.storage())},"Matrix, string":function(s,c){return i(s,0,s.size(),c)},"Matrix, number, string":function(s,c,p){return i(s,c,s.size(),p)},"Matrix, BigNumber, string":function(s,c,p){return i(s,c.toNumber(),s.size(),p)}});function i(u,s,c,p){if(!Re(s))throw new TypeError("Second parameter in function diag must be an integer");var f=s>0?s:0,m=s<0?-s:0;switch(c.length){case 1:return o(u,s,p,c[0],m,f);case 2:return l(u,s,p,c,m,f)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function o(u,s,c,p,f,m){var h=[p+f,p+m];if(c&&c!=="sparse"&&c!=="dense")throw new TypeError("Unknown matrix type ".concat(c,'"'));var d=c==="sparse"?a.diagonal(h,u,s):n.diagonal(h,u,s);return c!==null?d:d.valueOf()}function l(u,s,c,p,f,m){if(Fe(u)){var h=u.diagonal(s);return c!==null?c!==h.storage()?r(h,c):h:h.valueOf()}for(var d=Math.min(p[0]-f,p[1]-m),v=[],x=0;x=2&&d.push("index: ".concat(ut(r))),m.length>=3&&d.push("array: ".concat(ut(n))),new TypeError("Function ".concat(a," cannot apply callback arguments ")+"".concat(e.name,"(").concat(d.join(", "),") at index ").concat(JSON.stringify(r)))}else throw new TypeError("Function ".concat(a," cannot apply callback arguments ")+"to function ".concat(e.name,": ").concat(v.message))}}}var y9="filter",E9=["typed"],uh=C(y9,E9,e=>{var{typed:t}=e;return t("filter",{"Array, function":IA,"Matrix, function":function(n,a){return n.create(IA(n.toArray(),a))},"Array, RegExp":Gi,"Matrix, RegExp":function(n,a){return n.create(Gi(n.toArray(),a))}})});function IA(e,t){return Bc(e,function(r,n,a){return fn(t,r,[n],a,"filter")})}var BA="flatten",A9=["typed","matrix"],ch=C(BA,A9,e=>{var{typed:t,matrix:r}=e;return t(BA,{Array:function(a){return Je(a)},Matrix:function(a){var i=Je(a.toArray());return r(i)}})});var LA="forEach",N9=["typed"],lh=C(LA,N9,e=>{var{typed:t}=e;return t(LA,{"Array, function":T9,"Matrix, function":function(n,a){n.forEach(a)}})});function T9(e,t){var r=function n(a,i){if(Array.isArray(a))Na(a,function(o,l){n(o,i.concat(l))});else return fn(t,a,i,e,"forEach")};r(e,[])}var PA="getMatrixDataType",w9=["typed"],ph=C(PA,w9,e=>{var{typed:t}=e;return t(PA,{Array:function(n){return Ta(n,ut)},Matrix:function(n){return n.getDataType()}})});var UA="identity",D9=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],sl=C(UA,D9,e=>{var{typed:t,config:r,matrix:n,BigNumber:a,DenseMatrix:i,SparseMatrix:o}=e;return t(UA,{"":function(){return r.matrix==="Matrix"?n([]):[]},string:function(c){return n(c)},"number | BigNumber":function(c){return u(c,c,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,p){return u(c,c,p)},"number | BigNumber, number | BigNumber":function(c,p){return u(c,p,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,p,f){return u(c,p,f)},Array:function(c){return l(c)},"Array, string":function(c,p){return l(c,p)},Matrix:function(c){return l(c.valueOf(),c.storage())},"Matrix, string":function(c,p){return l(c.valueOf(),p)}});function l(s,c){switch(s.length){case 0:return c?n(c):[];case 1:return u(s[0],s[0],c);case 2:return u(s[0],s[1],c);default:throw new Error("Vector containing two values expected")}}function u(s,c,p){var f=Ue(s)||Ue(c)?a:null;if(Ue(s)&&(s=s.toNumber()),Ue(c)&&(c=c.toNumber()),!Re(s)||s<1)throw new Error("Parameters in function identity must be positive integers");if(!Re(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var m=f?new a(1):1,h=f?new f(0):0,d=[s,c];if(p){if(p==="sparse")return o.diagonal(d,m,0,h);if(p==="dense")return i.diagonal(d,m,0,h);throw new TypeError('Unknown matrix type "'.concat(p,'"'))}for(var v=Sn([],d,h),x=s{var{typed:t,matrix:r,multiplyScalar:n}=e;return t(kA,{"Matrix, Matrix":function(o,l){return r(a(o.toArray(),l.toArray()))},"Matrix, Array":function(o,l){return r(a(o.toArray(),l))},"Array, Matrix":function(o,l){return r(a(o,l.toArray()))},"Array, Array":a});function a(i,o){if(Ge(i).length===1&&(i=[i]),Ge(o).length===1&&(o=[o]),Ge(i).length>2||Ge(o).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(i.length)+", y = "+JSON.stringify(o.length)+")");var l=[],u=[];return i.map(function(s){return o.map(function(c){return u=[],l.push(u),s.map(function(p){return c.map(function(f){return u.push(n(p,f))})})})})&&l}});var qA="map",C9=["typed"],mh=C(qA,C9,e=>{var{typed:t}=e;return t(qA,{"Array, function":_9,"Matrix, function":function(n,a){return n.map(a)}})});function _9(e,t){var r=function n(a,i){return Array.isArray(a)?a.map(function(o,l){return n(o,i.concat(l))}):fn(t,a,i,e,"map")};return r(e,[])}var HA="diff",M9=["typed","matrix","subtract","number"],xs=C(HA,M9,e=>{var{typed:t,matrix:r,subtract:n,number:a}=e;return t(HA,{"Array | Matrix":function(c){return Fe(c)?r(o(c.toArray())):o(c)},"Array | Matrix, number":function(c,p){if(!Re(p))throw new RangeError("Dimension must be a whole number");return Fe(c)?r(i(c.toArray(),p)):i(c,p)},"Array, BigNumber":t.referTo("Array,number",s=>(c,p)=>s(c,a(p))),"Matrix, BigNumber":t.referTo("Matrix,number",s=>(c,p)=>s(c,a(p)))});function i(s,c){if(Fe(s)&&(s=s.toArray()),!Array.isArray(s))throw RangeError("Array/Matrix does not have that many dimensions");if(c>0){var p=[];return s.forEach(f=>{p.push(i(f,c-1))}),p}else{if(c===0)return o(s);throw RangeError("Cannot have negative dimension")}}function o(s){for(var c=[],p=s.length,f=1;f{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t("ones",{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(s){var c=s[s.length-1];if(typeof c=="string"){var p=s.pop();return i(s,p)}else return r.matrix==="Array"?i(s):i(s,"default")},Array:i,Matrix:function(s){var c=s.storage();return i(s.valueOf(),c)},"Array | Matrix, string":function(s,c){return i(s.valueOf(),c)}});function i(u,s){var c=o(u),p=c?new a(1):1;if(l(u),s){var f=n(s);return u.length>0?f.resize(u,p):f}else{var m=[];return u.length>0?Sn(m,u,p):m}}function o(u){var s=!1;return u.forEach(function(c,p,f){Ue(c)&&(s=!0,f[p]=c.toNumber())}),s}function l(u){u.forEach(function(s){if(typeof s!="number"||!Re(s)||s<0)throw new Error("Parameters in function ones must be positive integers")})}});function Qi(){throw new Error('No "bignumber" implementation available')}function ul(){throw new Error('No "fraction" implementation available')}function cl(){throw new Error('No "matrix" implementation available')}var zA="range",F9=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],bs=C(zA,F9,e=>{var{typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:l,largerEq:u,add:s,isPositive:c}=e;return t(zA,{string:f,"string, boolean":f,"number, number":function(v,x){return p(m(v,x,1,!1))},"number, number, number":function(v,x,N){return p(m(v,x,N,!1))},"number, number, boolean":function(v,x,N){return p(m(v,x,1,N))},"number, number, number, boolean":function(v,x,N,g){return p(m(v,x,N,g))},"BigNumber, BigNumber":function(v,x){var N=v.constructor;return p(m(v,x,new N(1),!1))},"BigNumber, BigNumber, BigNumber":function(v,x,N){return p(m(v,x,N,!1))},"BigNumber, BigNumber, boolean":function(v,x,N){var g=v.constructor;return p(m(v,x,new g(1),N))},"BigNumber, BigNumber, BigNumber, boolean":function(v,x,N,g){return p(m(v,x,N,g))},"Unit, Unit, Unit":function(v,x,N){return p(m(v,x,N,!1))},"Unit, Unit, Unit, boolean":function(v,x,N,g){return p(m(v,x,N,g))}});function p(d){return r.matrix==="Matrix"?n?n(d):cl():d}function f(d,v){var x=h(d);if(!x)throw new SyntaxError('String "'+d+'" is no valid range');return r.number==="BigNumber"?(a===void 0&&Qi(),p(m(a(x.start),a(x.end),a(x.step)),v)):p(m(x.start,x.end,x.step,v))}function m(d,v,x,N){for(var g=[],y=c(x)?N?o:i:N?u:l,E=d;y(E,v);)g.push(E),E=s(E,x);return g}function h(d){var v=d.split(":"),x=v.map(function(g){return Number(g)}),N=x.some(function(g){return isNaN(g)});if(N)return null;switch(x.length){case 2:return{start:x[0],end:x[1],step:1};case 3:return{start:x[0],end:x[2],step:x[1]};default:return null}}});var GA="reshape",I9=["typed","isInteger","matrix"],hh=C(GA,I9,e=>{var{typed:t,isInteger:r}=e;return t(GA,{"Matrix, Array":function(a,i){return a.reshape(i,!0)},"Array, Array":function(a,i){return i.forEach(function(o){if(!r(o))throw new TypeError("Invalid size for dimension: "+o)}),is(a,i)}})});var B9="resize",L9=["config","matrix"],vh=C(B9,L9,e=>{var{config:t,matrix:r}=e;return function(i,o,l){if(arguments.length!==2&&arguments.length!==3)throw new Wr("resize",arguments.length,2,3);if(Fe(o)&&(o=o.valueOf()),Ue(o[0])&&(o=o.map(function(c){return Ue(c)?c.toNumber():c})),Fe(i))return i.resize(o,l,!0);if(typeof i=="string")return n(i,o,l);var u=Array.isArray(i)?!1:t.matrix!=="Array";if(o.length===0){for(;Array.isArray(i);)i=i[0];return qe(i)}else{Array.isArray(i)||(i=[i]),i=qe(i);var s=Sn(i,o,l);return u?r(s):s}};function n(a,i,o){if(o!==void 0){if(typeof o!="string"||o.length!==1)throw new TypeError("Single character expected as defaultValue")}else o=" ";if(i.length!==1)throw new Ve(i.length,1);var l=i[0];if(typeof l!="number"||!Re(l))throw new TypeError("Invalid size, must contain positive integers (size: "+je(i)+")");if(a.length>l)return a.substring(0,l);if(a.length{var{typed:t,multiply:r,rotationMatrix:n}=e;return t(YA,{"Array , number | BigNumber | Complex | Unit":function(o,l){a(o,2);var u=r(n(l),o);return u.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(o,l){return a(o,2),r(n(l),o)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(o,l,u){a(o,3);var s=r(n(l,u),o);return s},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(o,l,u){return a(o,3),r(n(l,u),o)}});function a(i,o){var l=Array.isArray(i)?Ge(i):i.size();if(l.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(l.length===2&&l[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(l[0]!==o)throw new RangeError("Vector must be of dimensions 1x".concat(o))}});var jA="rotationMatrix",U9=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],xh=C(jA,U9,e=>{var{typed:t,config:r,multiplyScalar:n,addScalar:a,unaryMinus:i,norm:o,BigNumber:l,matrix:u,DenseMatrix:s,SparseMatrix:c,cos:p,sin:f}=e;return t(jA,{"":function(){return r.matrix==="Matrix"?u([]):[]},string:function(g){return u(g)},"number | BigNumber | Complex | Unit":function(g){return m(g,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(g,y){return m(g,y)},"number | BigNumber | Complex | Unit, Array":function(g,y){var E=u(y);return h(E),x(g,E,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(g,y){h(y);var E=y.storage()||(r.matrix==="Matrix"?"dense":void 0);return x(g,y,E)},"number | BigNumber | Complex | Unit, Array, string":function(g,y,E){var b=u(y);return h(b),x(g,b,E)},"number | BigNumber | Complex | Unit, Matrix, string":function(g,y,E){return h(y),x(g,y,E)}});function m(N,g){var y=Ue(N),E=y?new l(-1):-1,b=p(N),S=f(N),A=[[b,n(E,S)],[S,b]];return v(A,g)}function h(N){var g=N.size();if(g.length<1||g[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function d(N){return N.reduce((g,y)=>n(g,y))}function v(N,g){if(g){if(g==="sparse")return new c(N);if(g==="dense")return new s(N);throw new TypeError('Unknown matrix type "'.concat(g,'"'))}return N}function x(N,g,y){var E=o(g);if(E===0)throw new RangeError("Rotation around zero vector");var b=Ue(N)?l:null,S=b?new b(1):1,A=b?new b(-1):-1,w=b?new b(g.get([0])/E):g.get([0])/E,D=b?new b(g.get([1])/E):g.get([1])/E,F=b?new b(g.get([2])/E):g.get([2])/E,R=p(N),P=a(S,i(R)),U=f(N),k=a(R,d([w,w,P])),M=a(d([w,D,P]),d([A,F,U])),_=a(d([w,F,P]),d([D,U])),q=a(d([w,D,P]),d([F,U])),B=a(R,d([D,D,P])),Z=a(d([D,F,P]),d([A,w,U])),te=a(d([w,F,P]),d([A,D,U])),Q=a(d([D,F,P]),d([w,U])),z=a(R,d([F,F,P])),re=[[k,M,_],[q,B,Z],[te,Q,z]];return v(re,y)}});var VA="row",k9=["typed","Index","matrix","range"],ys=C(VA,k9,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(VA,{"Matrix, number":i,"Array, number":function(l,u){return i(n(qe(l)),u).valueOf()}});function i(o,l){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");vt(l,o.size()[0]);var u=a(0,o.size()[1]),s=new r(l,u),c=o.subset(s);return Fe(c)?c:n([[c]])}});var $A="size",q9=["typed","config","?matrix"],ll=C($A,q9,e=>{var{typed:t,config:r,matrix:n}=e;return t($A,{Matrix:function(i){return i.create(i.size())},Array:Ge,string:function(i){return r.matrix==="Array"?[i.length]:n([i.length])},"number | Complex | BigNumber | Unit | boolean | null":function(i){return r.matrix==="Array"?[]:n?n([]):cl()}})});var XA="squeeze",H9=["typed","matrix"],bh=C(XA,H9,e=>{var{typed:t,matrix:r}=e;return t(XA,{Array:function(a){return zi(qe(a))},Matrix:function(a){var i=zi(a.toArray());return Array.isArray(i)?r(i):i},any:function(a){return qe(a)}})});var KA="subset",z9=["typed","matrix","zeros","add"],Es=C(KA,z9,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e;return t(KA,{"Matrix, Index":function(l,u){return ri(u)?r():(as(l,u),l.subset(u))},"Array, Index":t.referTo("Matrix, Index",function(o){return function(l,u){var s=o(r(l),u);return u.isScalar()?s:s.valueOf()}}),"Object, Index":Y9,"string, Index":G9,"Matrix, Index, any, any":function(l,u,s,c){return ri(u)?l:(as(l,u),l.clone().subset(u,i(s,u),c))},"Array, Index, any, any":t.referTo("Matrix, Index, any, any",function(o){return function(l,u,s,c){var p=o(r(l),u,s,c);return p.isMatrix?p.valueOf():p}}),"Array, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(l,u,s){return o(r(l),u,s,void 0).valueOf()}}),"Matrix, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(l,u,s){return o(l,u,s,void 0)}}),"string, Index, string":WA,"string, Index, string, string":WA,"Object, Index, any":j9});function i(o,l){if(typeof o=="string")throw new Error("can't boradcast a string");if(l._isScalar)return o;var u=l.size();if(u.every(s=>s>0))try{return a(o,n(u))}catch{return o}else return o}});function G9(e,t){if(!Un(t))throw new TypeError("Index expected");if(ri(t))return"";if(as(Array.from(e),t),t.size().length!==1)throw new Ve(t.size().length,1);var r=e.length;vt(t.min()[0],r),vt(t.max()[0],r);var n=t.dimension(0),a="";return n.forEach(function(i){a+=e.charAt(i)}),a}function WA(e,t,r,n){if(!t||t.isIndex!==!0)throw new TypeError("Index expected");if(ri(t))return e;if(as(Array.from(e),t),t.size().length!==1)throw new Ve(t.size().length,1);if(n!==void 0){if(typeof n!="string"||n.length!==1)throw new TypeError("Single character expected as defaultValue")}else n=" ";var a=t.dimension(0),i=a.size()[0];if(i!==r.length)throw new Ve(a.size()[0],r.length);var o=e.length;vt(t.min()[0]),vt(t.max()[0]);for(var l=[],u=0;uo)for(var s=o-1,c=l.length;s{var{typed:t,matrix:r}=e;return t(QA,{Array:o=>n(r(o)).valueOf(),Matrix:n,any:qe});function n(o){var l=o.size(),u;switch(l.length){case 1:u=o.clone();break;case 2:{var s=l[0],c=l[1];if(c===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+je(l)+")");switch(o.storage()){case"dense":u=a(o,s,c);break;case"sparse":u=i(o,s,c);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+je(l)+")")}return u}function a(o,l,u){for(var s=o._data,c=[],p,f=0;f{var{typed:t,transpose:r,conj:n}=e;return t(ZA,{any:function(i){return n(r(i))}})});var JA="zeros",X9=["typed","config","matrix","BigNumber"],pl=C(JA,X9,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(JA,{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(s){var c=s[s.length-1];if(typeof c=="string"){var p=s.pop();return i(s,p)}else return r.matrix==="Array"?i(s):i(s,"default")},Array:i,Matrix:function(s){var c=s.storage();return i(s.valueOf(),c)},"Array | Matrix, string":function(s,c){return i(s.valueOf(),c)}});function i(u,s){var c=o(u),p=c?new a(0):0;if(l(u),s){var f=n(s);return u.length>0?f.resize(u,p):f}else{var m=[];return u.length>0?Sn(m,u,p):m}}function o(u){var s=!1;return u.forEach(function(c,p,f){Ue(c)&&(s=!0,f[p]=c.toNumber())}),s}function l(u){u.forEach(function(s){if(typeof s!="number"||!Re(s)||s<0)throw new Error("Parameters in function zeros must be positive integers")})}});var eN="fft",K9=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],Ah=C(eN,K9,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,divideScalar:i,exp:o,tau:l,i:u,dotDivide:s,conj:c,pow:p,ceil:f,log2:m}=e;return t(eN,{Array:h,Matrix:function(g){return g.create(h(g.toArray()))}});function h(N){var g=Ge(N);return g.length===1?x(N,g[0]):d(N.map(y=>h(y,g.slice(1))),0)}function d(N,g){var y=Ge(N);if(g!==0)return new Array(y[0]).fill(0).map((b,S)=>d(N[S],g-1));if(y.length===1)return x(N);function E(b){var S=Ge(b);return new Array(S[1]).fill(0).map((A,w)=>new Array(S[0]).fill(0).map((D,F)=>b[F][w]))}return E(d(E(N),1))}function v(N){for(var g=N.length,y=o(i(a(-1,a(u,l)),g)),E=[],b=1-g;ba(N[_],E[g-1+_])),...new Array(S-g).fill(0)],w=[...new Array(g+g-1).fill(0).map((M,_)=>i(1,E[_])),...new Array(S-(g+g-1)).fill(0)],D=x(A),F=x(w),R=new Array(S).fill(0).map((M,_)=>a(D[_],F[_])),P=s(c(h(c(R))),S),U=[],k=g-1;kw%2===0),g/2),...x(N.filter((A,w)=>w%2===1),g/2)],E=0;E{var{typed:t,fft:r,dotDivide:n,conj:a}=e;return t(tN,{"Array | Matrix":function(o){var l=Fe(o)?o.size():Ge(o);return n(a(r(a(o))),l.reduce((u,s)=>u*s,1))}})});var oN=Le(ir(),1);function iN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function n7(e){for(var t=1;t{var{typed:t,add:r,subtract:n,multiply:a,divide:i,max:o,map:l,abs:u,isPositive:s,isNegative:c,larger:p,smaller:f,matrix:m,bignumber:h,unaryMinus:d}=e;function v(A){return function(w,D,F,R){var P=!(D.length===2&&(D.every(b)||D.every($t)));if(P)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var U=D[0],k=D[1],M=p(k,U),_=R.firstStep;if(_!==void 0&&!s(_))throw new Error('"firstStep" must be positive');var q=R.maxStep;if(q!==void 0&&!s(q))throw new Error('"maxStep" must be positive');var B=R.minStep;if(B&&c(B))throw new Error('"minStep" must be positive or zero');var Z=[U,k,_,B,q].filter(Oe=>Oe!==void 0);if(!(Z.every(b)||Z.every($t)))throw new Error('Inconsistent type of "t" dependant variables');for(var te=1,Q=R.tol?R.tol:1e-4,z=R.minDelta?R.minDelta:.2,re=R.maxDelta?R.maxDelta:5,fe=R.maxIter?R.maxIter:1e4,L=[U,k,...F,q,B].some(Ue),[I,$,H,ae]=L?[h(A.a),h(A.c),h(A.b),h(A.bp)]:[A.a,A.c,A.b,A.bp],ce=_?M?_:d(_):i(n(k,U),te),me=[U],Ne=[F],Me=n(H,ae),j=0,X=0,se=y(M),K=E(M);se(me[j],k);){var ee=[];ce=K(me[j],k,ce),ee.push(w(me[j],Ne[j]));for(var ne=1;ne<$.length;++ne)ee.push(w(r(me[j],a($[ne],ce)),r(Ne[j],a(ce,I[ne],ee))));var ve=o(u(l(a(Me,ee),Oe=>$t(Oe)?Oe.value:Oe)));ve1/4&&(me.push(r(me[j],ce)),Ne.push(r(Ne[j],a(ce,H,ee))),j++);var ge=.84*(Q/ve)**(1/5);if(f(ge,z)?ge=z:p(ge,re)&&(ge=re),ge=L?h(ge):ge,ce=a(ce,ge),q&&p(u(ce),q)?ce=M?q:d(q):B&&f(u(ce),B)&&(ce=M?B:d(B)),X++,X>fe)throw new Error("Maximum number of iterations reached, try changing options")}return{t:me,y:Ne}}}function x(A,w,D,F){var R=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],P=[null,1/2,3/4,1],U=[2/9,1/3,4/9,0],k=[7/24,1/4,1/3,1/8],M={a:R,c:P,b:U,bp:k};return v(M)(A,w,D,F)}function N(A,w,D,F){var R=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],P=[null,1/5,3/10,4/5,8/9,1,1],U=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],k=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],M={a:R,c:P,b:U,bp:k};return v(M)(A,w,D,F)}function g(A,w,D,F){var R=F.method?F.method:"RK45",P={RK23:x,RK45:N};if(R.toUpperCase()in P){var U=n7({},F);return delete U.method,P[R.toUpperCase()](A,w,D,U)}else{var k=Object.keys(P).map(_=>'"'.concat(_,'"')),M="".concat(k.slice(0,-1).join(", ")," and ").concat(k.slice(-1));throw new Error('Unavailable method "'.concat(R,'". Available methods are ').concat(M))}}function y(A){return A?f:p}function E(A){var w=A?p:f;return function(D,F,R){var P=r(D,R);return w(P,F)?n(F,D):R}}function b(A){return Ue(A)||ze(A)}function S(A,w,D,F){var R=g(A,w.toArray(),D.toArray(),F);return{t:m(R.t),y:m(R.y)}}return t("solveODE",{"function, Array, Array, Object":g,"function, Matrix, Matrix, Object":S,"function, Array, Array":(A,w,D)=>g(A,w,D,{}),"function, Matrix, Matrix":(A,w,D)=>S(A,w,D,{}),"function, Array, number | BigNumber | Unit":(A,w,D)=>{var F=g(A,w,[D],{});return{t:F.t,y:F.y.map(R=>R[0])}},"function, Matrix, number | BigNumber | Unit":(A,w,D)=>{var F=g(A,w.toArray(),[D],{});return{t:m(F.t),y:m(F.y.map(R=>R[0]))}},"function, Array, number | BigNumber | Unit, Object":(A,w,D,F)=>{var R=g(A,w,[D],F);return{t:R.t,y:R.y.map(P=>P[0])}},"function, Matrix, number | BigNumber | Unit, Object":(A,w,D,F)=>{var R=g(A,w.toArray(),[D],F);return{t:m(R.t),y:m(R.y.map(P=>P[0]))}}})});var o7="erf",s7=["typed"],Sh=C(o7,s7,e=>{var{typed:t}=e;return t("name",{number:function(o){var l=Math.abs(o);return l>=l7?cn(o):l<=u7?cn(o)*r(l):l<=4?cn(o)*(1-n(l)):cn(o)*(1-a(l))},"Array | Matrix":t.referToSelf(i=>o=>Pe(o,i))});function r(i){var o=i*i,l=aa[0][4]*o,u=o,s;for(s=0;s<3;s+=1)l=(l+aa[0][s])*o,u=(u+Zi[0][s])*o;return i*(l+aa[0][3])/(u+Zi[0][3])}function n(i){var o=aa[1][8]*i,l=i,u;for(u=0;u<7;u+=1)o=(o+aa[1][u])*i,l=(l+Zi[1][u])*i;var s=(o+aa[1][7])/(l+Zi[1][7]),c=parseInt(i*16)/16,p=(i-c)*(i+c);return Math.exp(-c*c)*Math.exp(-p)*s}function a(i){var o=1/(i*i),l=aa[2][5]*o,u=o,s;for(s=0;s<4;s+=1)l=(l+aa[2][s])*o,u=(u+Zi[2][s])*o;var c=o*(l+aa[2][4])/(u+Zi[2][4]);c=(c7-c)/i,o=parseInt(i*16)/16;var p=(i-o)*(i+o);return Math.exp(-o*o)*Math.exp(-p)*c}}),u7=.46875,c7=.5641895835477563,aa=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],Zi=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],l7=Math.pow(2,53);var sN="zeta",p7=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],Ch=C(sN,p7,e=>{var{typed:t,config:r,multiply:n,pow:a,divide:i,factorial:o,equal:l,smallerEq:u,isNegative:s,gamma:c,sin:p,subtract:f,add:m,Complex:h,BigNumber:d,pi:v}=e;return t(sN,{number:b=>x(b,S=>S,()=>20),BigNumber:b=>x(b,S=>new d(S),()=>Math.abs(Math.log10(r.epsilon))),Complex:N});function x(b,S,A){return l(b,0)?S(-.5):l(b,1)?S(NaN):isFinite(b)?g(b,S,A,w=>w):s(b)?S(NaN):S(1)}function N(b){return b.re===0&&b.im===0?new h(-.5):b.re===1?new h(NaN,NaN):b.re===1/0&&b.im===0?new h(1):b.im===1/0||b.re===-1/0?new h(NaN,NaN):g(b,S=>S,S=>Math.round(1.3*15+.9*Math.abs(S.im)),S=>S.re)}function g(b,S,A,w){var D=A(b);if(w(b)>-(D-1)/2)return E(b,S(D),S);var F=n(a(2,b),a(S(v),f(b,1)));return F=n(F,p(n(i(S(v),2),b))),F=n(F,c(f(1,b))),n(F,g(f(1,b),S,A,w))}function y(b,S){for(var A=b,w=b;u(w,S);w=m(w,1)){var D=i(n(o(m(S,f(w,1))),a(4,w)),n(o(f(S,w)),o(n(2,w))));A=m(A,D)}return n(S,A)}function E(b,S,A){for(var w=i(1,n(y(A(0),S),f(1,a(2,f(1,b))))),D=A(0),F=A(1);u(F,S);F=m(F,1))D=m(D,i(n((-1)**(F-1),y(F,S)),a(F,b)));return n(w,D)}});var uN="mode",f7=["typed","isNaN","isNumeric"],_h=C(uN,f7,e=>{var{typed:t,isNaN:r,isNumeric:n}=e;return t(uN,{"Array | Matrix":a,"...":function(o){return a(o)}});function a(i){i=Je(i.valueOf());var o=i.length;if(o===0)throw new Error("Cannot calculate mode of an empty array");for(var l={},u=[],s=0,c=0;cs&&(s=l[p],u=[p])}return u}});function qt(e,t,r){var n;return String(e).includes("Unexpected type")?(n=arguments.length>2?" (type: "+ut(r)+", value: "+JSON.stringify(r)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+n)):String(e).includes("complex numbers")?(n=arguments.length>2?" (type: "+ut(r)+", value: "+JSON.stringify(r)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+n)):e}var cN="prod",m7=["typed","config","multiplyScalar","numeric"],Mh=C(cN,m7,e=>{var{typed:t,config:r,multiplyScalar:n,numeric:a}=e;return t(cN,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(l,u){throw new Error("prod(A, dim) is not yet supported")},"...":function(l){return i(l)}});function i(o){var l;if(gr(o,function(u){try{l=l===void 0?u:n(l,u)}catch(s){throw qt(s,"prod",u)}}),typeof l=="string"&&(l=a(l,r.number)),l===void 0)throw new Error("Cannot calculate prod of an empty array");return l}});var lN="format",d7=["typed"],Oh=C(lN,d7,e=>{var{typed:t}=e;return t(lN,{any:je,"any, Object | function | number | BigNumber":je})});var pN="bin",h7=["typed","format"],Rh=C(pN,h7,e=>{var{typed:t,format:r}=e;return t(pN,{"number | BigNumber":function(a){return r(a,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"bin",wordSize:i})}})});var fN="oct",v7=["typed","format"],Fh=C(fN,v7,e=>{var{typed:t,format:r}=e;return t(fN,{"number | BigNumber":function(a){return r(a,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"oct",wordSize:i})}})});var mN="hex",g7=["typed","format"],Ih=C(mN,g7,e=>{var{typed:t,format:r}=e;return t(mN,{"number | BigNumber":function(a){return r(a,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"hex",wordSize:i})}})});var fl=/\$([\w.]+)/g;var dN="print",x7=["typed"],ws=C(dN,x7,e=>{var{typed:t}=e;return t(dN,{"string, Object | Array":hN,"string, Object | Array, number | Object":hN})});function hN(e,t,r){return e.replace(fl,function(n,a){var i=a.split("."),o=t[i.shift()];for(o!==void 0&&o.isMatrix&&(o=o.toArray());i.length&&o!==void 0;){var l=i.shift();o=l?o[l]:o+"."}return o!==void 0?It(o)?o:je(o,r):n})}var vN="to",b7=["typed","matrix","concat"],Bh=C(vN,b7,e=>{var{typed:t,matrix:r,concat:n}=e,a=We({typed:t,matrix:r,concat:n});return t(vN,{"Unit, Unit | string":(i,o)=>i.to(o)},a({Ds:!0}))});var gN="isPrime",y7=["typed"],Lh=C(gN,y7,e=>{var{typed:t}=e;return t(gN,{number:function(n){if(n*0!==0)return!1;if(n<=3)return n>1;if(n%2===0||n%3===0)return!1;for(var a=5;a*a<=n;a+=6)if(n%a===0||n%(a+2)===0)return!1;return!0},BigNumber:function(n){if(n.toNumber()*0!==0)return!1;if(n.lte(3))return n.gt(1);if(n.mod(2).eq(0)||n.mod(3).eq(0))return!1;if(n.lt(Math.pow(2,32))){for(var a=n.toNumber(),i=5;i*i<=a;i+=6)if(a%i===0||a%(i+2)===0)return!1;return!0}function o(N,g,y){for(var E=1;!g.eq(0);)g.mod(2).eq(0)?(g=g.div(2),N=N.mul(N).mod(y)):(g=g.sub(1),E=N.mul(E).mod(y));return E}var l=n.constructor.clone({precision:n.toFixed(0).length*2});n=new l(n);for(var u=0,s=n.sub(1);s.mod(2).eq(0);)s=s.div(2),u+=1;var c=null;if(n.lt("3317044064679887385961981"))c=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(N=>Nn=>Pe(n,r))})});var E7="numeric",A7=["number","?bignumber","?fraction"],ml=C(E7,A7,e=>{var{number:t,bignumber:r,fraction:n}=e,a={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:o=>t(o),BigNumber:r?o=>r(o):Qi,Fraction:n?o=>n(o):ul};return function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",s=arguments.length>2?arguments[2]:void 0;if(s!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=ut(l);if(!(c in a))throw new TypeError("Cannot convert "+l+' of type "'+c+'"; valid input types are '+Object.keys(a).join(", "));if(!(u in i))throw new TypeError("Cannot convert "+l+' to type "'+u+'"; valid output types are '+Object.keys(i).join(", "));return u===c?l:i[u](l)}});var xN="divideScalar",N7=["typed","numeric"],dl=C(xN,N7,e=>{var{typed:t,numeric:r}=e;return t(xN,{"number, number":function(a,i){return a/i},"Complex, Complex":function(a,i){return a.div(i)},"BigNumber, BigNumber":function(a,i){return a.div(i)},"Fraction, Fraction":function(a,i){return a.div(i)},"Unit, number | Complex | Fraction | BigNumber | Unit":(n,a)=>n.divide(a),"number | Fraction | Complex | BigNumber, Unit":(n,a)=>a.divideInto(n)})});var bN="pow",T7=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],Ph=C(bN,T7,e=>{var{typed:t,config:r,identity:n,multiply:a,matrix:i,inv:o,number:l,fraction:u,Complex:s}=e;return t(bN,{"number, number":c,"Complex, Complex":function(h,d){return h.pow(d)},"BigNumber, BigNumber":function(h,d){return d.isInteger()||h>=0||r.predictable?h.pow(d):new s(h.toNumber(),0).pow(d.toNumber(),0)},"Fraction, Fraction":function(h,d){var v=h.pow(d);if(v!=null)return v;if(r.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(h.valueOf(),d.valueOf())},"Array, number":p,"Array, BigNumber":function(h,d){return p(h,d.toNumber())},"Matrix, number":f,"Matrix, BigNumber":function(h,d){return f(h,d.toNumber())},"Unit, number | BigNumber":function(h,d){return h.pow(d)}});function c(m,h){if(r.predictable&&!Re(h)&&m<0)try{var d=u(h),v=l(d);if((h===v||Math.abs((h-v)/h)<1e-14)&&d.d%2===1)return(d.n%2===0?1:-1)*Math.pow(-m,h)}catch{}return r.predictable&&(m<-1&&h===1/0||m>-1&&m<0&&h===-1/0)?NaN:Re(h)||m>=0||r.predictable?Im(m,h):m*m<1&&h===1/0||m*m>1&&h===-1/0?0:new s(m,0).pow(h,0)}function p(m,h){if(!Re(h))throw new TypeError("For A^b, b must be an integer (value is "+h+")");var d=Ge(m);if(d.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+d.length+" dimensions)");if(d[0]!==d[1])throw new Error("For A^b, A must be square (size is "+d[0]+"x"+d[1]+")");if(h<0)try{return p(o(m),-h)}catch(N){throw N.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+h+")"):N}for(var v=n(d[0]).valueOf(),x=m;h>=1;)(h&1)===1&&(v=a(x,v)),h>>=1,x=a(x,x);return v}function f(m,h){return i(p(m.valueOf(),h))}});var Ji="Number of decimals in function round must be an integer",yN="round",w7=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],hl=C(yN,w7,e=>{var{typed:t,config:r,matrix:n,equalScalar:a,zeros:i,BigNumber:o,DenseMatrix:l}=e,u=gt({typed:t,equalScalar:a}),s=lt({typed:t,DenseMatrix:l}),c=Gt({typed:t});function p(f){return Math.abs(Ui(f).exponent)}return t(yN,{number:function(m){var h=Vi(m,p(r.epsilon)),d=Pt(m,h,r.epsilon)?h:m;return Vi(d)},"number, number":function(m,h){var d=p(r.epsilon);if(h>=d)return Vi(m,h);var v=Vi(m,d),x=Pt(m,v,r.epsilon)?v:m;return Vi(x,h)},"number, BigNumber":function(m,h){if(!h.isInteger())throw new TypeError(Ji);return new o(m).toDecimalPlaces(h.toNumber())},Complex:function(m){return m.round()},"Complex, number":function(m,h){if(h%1)throw new TypeError(Ji);return m.round(h)},"Complex, BigNumber":function(m,h){if(!h.isInteger())throw new TypeError(Ji);var d=h.toNumber();return m.round(d)},BigNumber:function(m){var h=new o(m).toDecimalPlaces(p(r.epsilon)),d=Xt(m,h,r.epsilon)?h:m;return d.toDecimalPlaces(0)},"BigNumber, BigNumber":function(m,h){if(!h.isInteger())throw new TypeError(Ji);var d=p(r.epsilon);if(h>=d)return m.toDecimalPlaces(h.toNumber());var v=m.toDecimalPlaces(d),x=Xt(m,v,r.epsilon)?v:m;return x.toDecimalPlaces(h.toNumber())},Fraction:function(m){return m.round()},"Fraction, number":function(m,h){if(h%1)throw new TypeError(Ji);return m.round(h)},"Fraction, BigNumber":function(m,h){if(!h.isInteger())throw new TypeError(Ji);return m.round(h.toNumber())},"Unit, number, Unit":t.referToSelf(f=>function(m,h,d){var v=m.toNumeric(d);return d.multiply(f(v,h))}),"Unit, BigNumber, Unit":t.referToSelf(f=>(m,h,d)=>f(m,h.toNumber(),d)),"Unit, Unit":t.referToSelf(f=>(m,h)=>f(m,0,h)),"Array | Matrix, number, Unit":t.referToSelf(f=>(m,h,d)=>Pe(m,v=>f(v,h,d),!0)),"Array | Matrix, BigNumber, Unit":t.referToSelf(f=>(m,h,d)=>f(m,h.toNumber(),d)),"Array | Matrix, Unit":t.referToSelf(f=>(m,h)=>f(m,0,h)),"Array | Matrix":t.referToSelf(f=>m=>Pe(m,f,!0)),"SparseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>u(m,h,f,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>c(m,h,f,!1)),"Array, number | BigNumber":t.referToSelf(f=>(m,h)=>c(n(m),h,f,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":t.referToSelf(f=>(m,h)=>a(m,0)?i(h.size(),h.storage()):s(h,m,f,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":t.referToSelf(f=>(m,h)=>a(m,0)?i(h.size(),h.storage()):c(h,m,f,!0)),"number | Complex | BigNumber | Fraction, Array":t.referToSelf(f=>(m,h)=>c(n(h),m,f,!0).valueOf())})});var EN="log",D7=["config","typed","divideScalar","Complex"],Uh=C(EN,D7,e=>{var{typed:t,config:r,divideScalar:n,Complex:a}=e;return t(EN,{number:function(o){return o>=0||r.predictable?yE(o):new a(o,0).log()},Complex:function(o){return o.log()},BigNumber:function(o){return!o.isNegative()||r.predictable?o.ln():new a(o.toNumber(),0).log()},"any, any":t.referToSelf(i=>(o,l)=>n(i(o),i(l)))})});var AN="log1p",S7=["typed","config","divideScalar","log","Complex"],kh=C(AN,S7,e=>{var{typed:t,config:r,divideScalar:n,log:a,Complex:i}=e;return t(AN,{number:function(u){return u>=-1||r.predictable?hc(u):o(new i(u,0))},Complex:o,BigNumber:function(u){var s=u.plus(1);return!s.isNegative()||r.predictable?s.ln():o(new i(u.toNumber(),0))},"Array | Matrix":t.referToSelf(l=>u=>Pe(u,l)),"any, any":t.referToSelf(l=>(u,s)=>n(l(u),a(s)))});function o(l){var u=l.re+1;return new i(Math.log(Math.sqrt(u*u+l.im*l.im)),Math.atan2(l.im,u))}});var NN="nthRoots",C7=["config","typed","divideScalar","Complex"],qh=C(NN,C7,e=>{var{typed:t,config:r,divideScalar:n,Complex:a}=e,i=[function(u){return new a(u,0)},function(u){return new a(0,u)},function(u){return new a(-u,0)},function(u){return new a(0,-u)}];function o(l,u){if(u<0)throw new Error("Root must be greater than zero");if(u===0)throw new Error("Root must be non-zero");if(u%1!==0)throw new Error("Root must be an integer");if(l===0||l.abs()===0)return[new a(0,0)];var s=typeof l=="number",c;(s||l.re===0||l.im===0)&&(s?c=2*+(l<0):l.im===0?c=2*+(l.re<0):c=2*+(l.im<0)+1);for(var p=l.arg(),f=l.abs(),m=[],h=Math.pow(f,1/u),d=0;d{var{typed:t,equalScalar:r,matrix:n,pow:a,DenseMatrix:i,concat:o}=e,l=wt({typed:t}),u=Wt({typed:t,DenseMatrix:i}),s=gt({typed:t,equalScalar:r}),c=lt({typed:t,DenseMatrix:i}),p=We({typed:t,matrix:n,concat:o}),f={};for(var m in a.signatures)Object.prototype.hasOwnProperty.call(a.signatures,m)&&!m.includes("Matrix")&&!m.includes("Array")&&(f[m]=a.signatures[m]);var h=t(f);return t(TN,p({elop:h,SS:u,DS:l,Ss:s,sS:c}))});var wN="dotDivide",M7=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat"],zh=C(wN,M7,e=>{var{typed:t,matrix:r,equalScalar:n,divideScalar:a,DenseMatrix:i,concat:o}=e,l=Yt({typed:t,equalScalar:n}),u=wt({typed:t}),s=Wt({typed:t,DenseMatrix:i}),c=gt({typed:t,equalScalar:n}),p=lt({typed:t,DenseMatrix:i}),f=We({typed:t,matrix:r,concat:o});return t(wN,f({elop:a,SS:s,DS:u,SD:l,Ss:c,sS:p}))});function Yn(e){var{DenseMatrix:t}=e;return function(n,a,i){var o=n.size();if(o.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+je(o)+")");var l=o[0],u=o[1];if(l!==u)throw new RangeError("Matrix must be square (size: "+je(o)+")");var s=[];if(Fe(a)){var c=a.size(),p=a._data;if(c.length===1){if(c[0]!==l)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var f=0;f{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(DN,{"SparseMatrix, Array | Matrix":function(f,m){return c(f,m)},"DenseMatrix, Array | Matrix":function(f,m){return s(f,m)},"Array, Array | Matrix":function(f,m){var h=r(f),d=s(h,m);return d.valueOf()}});function s(p,f){f=u(p,f,!0);for(var m=f._data,h=p._size[0],d=p._size[1],v=[],x=p._data,N=0;Ny&&(S.push(v[F]),A.push(R))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var P=n(E,b),U=0,k=A.length;U{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(SN,{"SparseMatrix, Array | Matrix":function(f,m){return c(f,m)},"DenseMatrix, Array | Matrix":function(f,m){return s(f,m)},"Array, Array | Matrix":function(f,m){var h=r(f),d=s(h,m);return d.valueOf()}});function s(p,f){f=u(p,f,!0);for(var m=f._data,h=p._size[0],d=p._size[1],v=[],x=p._data,N=d-1;N>=0;N--){var g=m[N][0]||0,y=void 0;if(o(g,0))y=0;else{var E=x[N][N];if(o(E,0))throw new Error("Linear system cannot be solved since matrix is singular");y=n(g,E);for(var b=N-1;b>=0;b--)m[b]=[i(m[b][0]||0,a(y,x[b][N]))]}v[N]=[y]}return new l({data:v,size:[h,1]})}function c(p,f){f=u(p,f,!0);for(var m=f._data,h=p._size[0],d=p._size[1],v=p._values,x=p._index,N=p._ptr,g=[],y=d-1;y>=0;y--){var E=m[y][0]||0;if(o(E,0))g[y]=[0];else{for(var b=0,S=[],A=[],w=N[y],D=N[y+1],F=D-1;F>=w;F--){var R=x[F];R===y?b=v[F]:R{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(CN,{"SparseMatrix, Array | Matrix":function(f,m){return c(f,m)},"DenseMatrix, Array | Matrix":function(f,m){return s(f,m)},"Array, Array | Matrix":function(f,m){var h=r(f),d=s(h,m);return d.map(v=>v.valueOf())}});function s(p,f){for(var m=[u(p,f,!0)._data.map(A=>A[0])],h=p._data,d=p._size[0],v=p._size[1],x=0;xnew l({data:A.map(w=>[w]),size:[d,1]}))}function c(p,f){for(var m=[u(p,f,!0)._data.map(te=>te[0])],h=p._size[0],d=p._size[1],v=p._values,x=p._index,N=p._ptr,g=0;gg&&(S.push(v[R]),A.push(P))}if(o(F,0))if(o(b[g],0)){if(E===0){var _=[...b];_[g]=1;for(var q=0,B=A.length;qnew l({data:te.map(Q=>[Q]),size:[h,1]}))}});var _N="usolveAll",I7=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],Vh=C(_N,I7,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(_N,{"SparseMatrix, Array | Matrix":function(f,m){return c(f,m)},"DenseMatrix, Array | Matrix":function(f,m){return s(f,m)},"Array, Array | Matrix":function(f,m){var h=r(f),d=s(h,m);return d.map(v=>v.valueOf())}});function s(p,f){for(var m=[u(p,f,!0)._data.map(A=>A[0])],h=p._data,d=p._size[0],v=p._size[1],x=v-1;x>=0;x--)for(var N=m.length,g=0;g=0;S--)b[S]=i(b[S],h[S][x]);m.push(b)}}else{if(g===0)return[];m.splice(g,1),g-=1,N-=1}else{y[x]=n(y[x],h[x][x]);for(var E=x-1;E>=0;E--)y[E]=i(y[E],a(y[x],h[E][x]))}}return m.map(A=>new l({data:A.map(w=>[w]),size:[d,1]}))}function c(p,f){for(var m=[u(p,f,!0)._data.map(te=>te[0])],h=p._size[0],d=p._size[1],v=p._values,x=p._index,N=p._ptr,g=d-1;g>=0;g--)for(var y=m.length,E=0;E=w;R--){var P=x[R];P===g?F=v[R]:Pnew l({data:te.map(Q=>[Q]),size:[h,1]}))}});var B7="matAlgo08xS0Sid",L7=["typed","equalScalar"],eo=C(B7,L7,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._index,s=a._ptr,c=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType(),f=i._values,m=i._index,h=i._ptr,d=i._size,v=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new Ve(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");if(!l||!f)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var x=c[0],N=c[1],g,y=r,E=0,b=o;typeof p=="string"&&p===v&&p!=="mixed"&&(g=p,y=t.find(r,[g,g]),E=t.convert(0,g),b=t.find(o,[g,g]));for(var S=[],A=[],w=[],D=[],F=[],R,P,U,k,M=0;M{var{typed:t,matrix:r}=e;return{"Array, number":t.referTo("DenseMatrix, number",n=>(a,i)=>n(r(a),i).valueOf()),"Array, BigNumber":t.referTo("DenseMatrix, BigNumber",n=>(a,i)=>n(r(a),i).valueOf()),"number, Array":t.referTo("number, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf()),"BigNumber, Array":t.referTo("BigNumber, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf())}});var MN="leftShift",P7=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],$h=C(MN,P7,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,l=xr({typed:t}),u=Yt({typed:t,equalScalar:n}),s=eo({typed:t,equalScalar:n}),c=Lr({typed:t,DenseMatrix:i}),p=gt({typed:t,equalScalar:n}),f=Gt({typed:t}),m=We({typed:t,matrix:r,concat:o}),h=to({typed:t,matrix:r});return t(MN,{"number, number":km,"BigNumber, BigNumber":vA,"SparseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():p(v,x,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():f(v,x,d,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):c(x,v,d,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):f(x,v,d,!0))},h,m({SS:s,DS:l,SD:u}))});var ON="rightArithShift",U7=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],Xh=C(ON,U7,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,l=xr({typed:t}),u=Yt({typed:t,equalScalar:n}),s=eo({typed:t,equalScalar:n}),c=Lr({typed:t,DenseMatrix:i}),p=gt({typed:t,equalScalar:n}),f=Gt({typed:t}),m=We({typed:t,matrix:r,concat:o}),h=to({typed:t,matrix:r});return t(ON,{"number, number":qm,"BigNumber, BigNumber":gA,"SparseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():p(v,x,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():f(v,x,d,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):c(x,v,d,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):f(x,v,d,!0))},h,m({SS:s,DS:l,SD:u}))});var RN="rightLogShift",k7=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],Kh=C(RN,k7,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,l=xr({typed:t}),u=Yt({typed:t,equalScalar:n}),s=eo({typed:t,equalScalar:n}),c=Lr({typed:t,DenseMatrix:i}),p=gt({typed:t,equalScalar:n}),f=Gt({typed:t}),m=We({typed:t,matrix:r,concat:o}),h=to({typed:t,matrix:r});return t(RN,{"number, number":Hm,"SparseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():p(v,x,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():f(v,x,d,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):c(x,v,d,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):f(x,v,d,!0))},h,m({SS:s,DS:l,SD:u}))});var FN="and",q7=["typed","matrix","equalScalar","zeros","not","concat"],Ds=C(FN,q7,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,l=Yt({typed:t,equalScalar:n}),u=Sa({typed:t,equalScalar:n}),s=gt({typed:t,equalScalar:n}),c=Gt({typed:t}),p=We({typed:t,matrix:r,concat:o});return t(FN,{"number, number":$m,"Complex, Complex":function(m,h){return(m.re!==0||m.im!==0)&&(h.re!==0||h.im!==0)},"BigNumber, BigNumber":function(m,h){return!m.isZero()&&!h.isZero()&&!m.isNaN()&&!h.isNaN()},"Unit, Unit":t.referToSelf(f=>(m,h)=>f(m.value||0,h.value||0)),"SparseMatrix, any":t.referToSelf(f=>(m,h)=>i(h)?a(m.size(),m.storage()):s(m,h,f,!1)),"DenseMatrix, any":t.referToSelf(f=>(m,h)=>i(h)?a(m.size(),m.storage()):c(m,h,f,!1)),"any, SparseMatrix":t.referToSelf(f=>(m,h)=>i(m)?a(m.size(),m.storage()):s(h,m,f,!0)),"any, DenseMatrix":t.referToSelf(f=>(m,h)=>i(m)?a(m.size(),m.storage()):c(h,m,f,!0)),"Array, any":t.referToSelf(f=>(m,h)=>f(r(m),h).valueOf()),"any, Array":t.referToSelf(f=>(m,h)=>f(m,r(h)).valueOf())},p({SS:u,DS:l}))});var vl="compare",H7=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],Wh=C(vl,H7,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,BigNumber:i,Fraction:o,DenseMatrix:l,concat:u}=e,s=wt({typed:t}),c=Da({typed:t,equalScalar:n}),p=lt({typed:t,DenseMatrix:l}),f=We({typed:t,matrix:a,concat:u}),m=pn({typed:t});return t(vl,z7({typed:t,config:r}),{"boolean, boolean":function(d,v){return d===v?0:d>v?1:-1},"BigNumber, BigNumber":function(d,v){return Xt(d,v,r.epsilon)?new i(0):new i(d.cmp(v))},"Fraction, Fraction":function(d,v){return new o(d.compare(v))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},m,f({SS:c,DS:s,Ss:p}))}),z7=C(vl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(vl,{"number, number":function(a,i){return Pt(a,i,r.epsilon)?0:a>i?1:-1}})});var oi=Le(BN(),1);var LN="compareNatural",G7=["typed","compare"],Qh=C(LN,G7,e=>{var{typed:t,compare:r}=e,n=r.signatures["boolean,boolean"];return t(LN,{"any, any":a});function a(u,s){var c=ut(u),p=ut(s),f;if((c==="number"||c==="BigNumber"||c==="Fraction")&&(p==="number"||p==="BigNumber"||p==="Fraction"))return f=r(u,s),f.toString()!=="0"?f>0?1:-1:(0,oi.default)(c,p);var m=["Array","DenseMatrix","SparseMatrix"];if(m.includes(c)||m.includes(p))return f=i(a,u,s),f!==0?f:(0,oi.default)(c,p);if(c!==p)return(0,oi.default)(c,p);if(c==="Complex")return Y7(u,s);if(c==="Unit")return u.equalBase(s)?a(u.value,s.value):o(a,u.formatUnits(),s.formatUnits());if(c==="boolean")return n(u,s);if(c==="string")return(0,oi.default)(u,s);if(c==="Object")return l(a,u,s);if(c==="null"||c==="undefined")return 0;throw new TypeError('Unsupported type of value "'+c+'"')}function i(u,s,c){return Xr(s)&&Xr(c)?o(u,s.toJSON().values,c.toJSON().values):Xr(s)?i(u,s.toArray(),c):Xr(c)?i(u,s,c.toArray()):Zn(s)?i(u,s.toJSON().data,c):Zn(c)?i(u,s,c.toJSON().data):Array.isArray(s)?Array.isArray(c)?o(u,s,c):i(u,s,[c]):i(u,[s],c)}function o(u,s,c){for(var p=0,f=Math.min(s.length,c.length);pc.length?1:s.lengtht.re?1:e.ret.im?1:e.im{var{typed:t,matrix:r,concat:n}=e,a=We({typed:t,matrix:r,concat:n});return t(PN,Fc,a({elop:Fc,Ds:!0}))});var gl="equal",V7=["typed","matrix","equalScalar","DenseMatrix","concat"],Jh=C(gl,V7,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:r,concat:i});return t(gl,$7({typed:t,equalScalar:n}),s({elop:n,SS:l,DS:o,Ss:u}))}),$7=C(gl,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(gl,{"any, any":function(a,i){return a===null?i===null:i===null?a===null:a===void 0?i===void 0:i===void 0?a===void 0:r(a,i)}})});var UN="equalText",X7=["typed","compareText","isZero"],e0=C(UN,X7,e=>{var{typed:t,compareText:r,isZero:n}=e;return t(UN,{"any, any":function(i,o){return n(r(i,o))}})});var xl="smaller",K7=["typed","config","matrix","DenseMatrix","concat"],bl=C(xl,K7,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:n,concat:i}),c=pn({typed:t});return t(xl,W7({typed:t,config:r}),{"boolean, boolean":(p,f)=>pp.compare(f)===-1,"Complex, Complex":function(f,m){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),W7=C(xl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(xl,{"number, number":function(a,i){return a{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:n,concat:i}),c=pn({typed:t});return t(yl,Z7({typed:t,config:r}),{"boolean, boolean":(p,f)=>p<=f,"BigNumber, BigNumber":function(f,m){return f.lte(m)||Xt(f,m,r.epsilon)},"Fraction, Fraction":(p,f)=>p.compare(f)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),Z7=C(yl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(yl,{"number, number":function(a,i){return a<=i||Pt(a,i,r.epsilon)}})});var El="larger",J7=["typed","config","matrix","DenseMatrix","concat"],Al=C(El,J7,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:n,concat:i}),c=pn({typed:t});return t(El,eU({typed:t,config:r}),{"boolean, boolean":(p,f)=>p>f,"BigNumber, BigNumber":function(f,m){return f.gt(m)&&!Xt(f,m,r.epsilon)},"Fraction, Fraction":(p,f)=>p.compare(f)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),eU=C(El,["typed","config"],e=>{var{typed:t,config:r}=e;return t(El,{"number, number":function(a,i){return a>i&&!Pt(a,i,r.epsilon)}})});var Nl="largerEq",tU=["typed","config","matrix","DenseMatrix","concat"],r0=C(Nl,tU,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:n,concat:i}),c=pn({typed:t});return t(Nl,rU({typed:t,config:r}),{"boolean, boolean":(p,f)=>p>=f,"BigNumber, BigNumber":function(f,m){return f.gte(m)||Xt(f,m,r.epsilon)},"Fraction, Fraction":(p,f)=>p.compare(f)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),rU=C(Nl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(Nl,{"number, number":function(a,i){return a>=i||Pt(a,i,r.epsilon)}})});var kN="deepEqual",nU=["typed","equal"],n0=C(kN,nU,e=>{var{typed:t,equal:r}=e;return t(kN,{"any, any":function(i,o){return n(i.valueOf(),o.valueOf())}});function n(a,i){if(Array.isArray(a))if(Array.isArray(i)){var o=a.length;if(o!==i.length)return!1;for(var l=0;l{var{typed:t,config:r,equalScalar:n,matrix:a,DenseMatrix:i,concat:o}=e,l=wt({typed:t}),u=Wt({typed:t,DenseMatrix:i}),s=lt({typed:t,DenseMatrix:i}),c=We({typed:t,matrix:a,concat:o});return t(Tl,iU({typed:t,equalScalar:n}),c({elop:p,SS:u,DS:l,Ss:s}));function p(f,m){return!n(f,m)}}),iU=C(Tl,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(Tl,{"any, any":function(a,i){return a===null?i!==null:i===null?a!==null:a===void 0?i!==void 0:i===void 0?a!==void 0:!r(a,i)}})});var qN="partitionSelect",oU=["typed","isNumeric","isNaN","compare"],i0=C(qN,oU,e=>{var{typed:t,isNumeric:r,isNaN:n,compare:a}=e,i=a,o=(s,c)=>-a(s,c);return t(qN,{"Array | Matrix, number":function(c,p){return l(c,p,i)},"Array | Matrix, number, string":function(c,p,f){if(f==="asc")return l(c,p,i);if(f==="desc")return l(c,p,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":l});function l(s,c,p){if(!Re(c)||c<0)throw new Error("k must be a non-negative integer");if(Fe(s)){var f=s.size();if(f.length>1)throw new Error("Only one dimensional matrices supported");return u(s.valueOf(),c,p)}if(Array.isArray(s))return u(s,c,p)}function u(s,c,p){if(c>=s.length)throw new Error("k out of bounds");for(var f=0;f=0){var N=s[v];s[v]=s[d],s[d]=N,--v}else++d;p(s[d],x)>0&&--d,c<=d?h=d:m=d+1}return s[c]}});var HN="sort",sU=["typed","matrix","compare","compareNatural"],o0=C(HN,sU,e=>{var{typed:t,matrix:r,compare:n,compareNatural:a}=e,i=n,o=(c,p)=>-n(c,p);return t(HN,{Array:function(p){return u(p),p.sort(i)},Matrix:function(p){return s(p),r(p.toArray().sort(i),p.storage())},"Array, function":function(p,f){return u(p),p.sort(f)},"Matrix, function":function(p,f){return s(p),r(p.toArray().sort(f),p.storage())},"Array, string":function(p,f){return u(p),p.sort(l(f))},"Matrix, string":function(p,f){return s(p),r(p.toArray().sort(l(f)),p.storage())}});function l(c){if(c==="asc")return i;if(c==="desc")return o;if(c==="natural")return a;throw new Error('String "asc", "desc", or "natural" expected')}function u(c){if(Ge(c).length!==1)throw new Error("One dimensional array expected")}function s(c){if(c.size().length!==1)throw new Error("One dimensional matrix expected")}});var zN="max",uU=["typed","config","numeric","larger"],ro=C(zN,uU,e=>{var{typed:t,config:r,numeric:n,larger:a}=e;return t(zN,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(u,s){return wa(u,s.valueOf(),i)},"...":function(u){if(ln(u))throw new TypeError("Scalar values expected in function max");return o(u)}});function i(l,u){try{return a(l,u)?l:u}catch(s){throw qt(s,"max",u)}}function o(l){var u;if(gr(l,function(s){try{isNaN(s)&&typeof s=="number"?u=NaN:(u===void 0||a(s,u))&&(u=s)}catch(c){throw qt(c,"max",s)}}),u===void 0)throw new Error("Cannot calculate max of an empty array");return typeof u=="string"&&(u=n(u,r.number)),u}});var GN="min",cU=["typed","config","numeric","smaller"],no=C(GN,cU,e=>{var{typed:t,config:r,numeric:n,smaller:a}=e;return t(GN,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(u,s){return wa(u,s.valueOf(),i)},"...":function(u){if(ln(u))throw new TypeError("Scalar values expected in function min");return o(u)}});function i(l,u){try{return a(l,u)?l:u}catch(s){throw qt(s,"min",u)}}function o(l){var u;if(gr(l,function(s){try{isNaN(s)&&typeof s=="number"?u=NaN:(u===void 0||a(s,u))&&(u=s)}catch(c){throw qt(c,"min",s)}}),u===void 0)throw new Error("Cannot calculate min of an empty array");return typeof u=="string"&&(u=n(u,r.number)),u}});var lU="ImmutableDenseMatrix",pU=["smaller","DenseMatrix"],s0=C(lU,pU,e=>{var{smaller:t,DenseMatrix:r}=e;function n(a,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(i&&!It(i))throw new Error("Invalid datatype: "+i);if(Fe(a)||at(a)){var o=new r(a,i);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(a&&at(a.data)&&at(a.size))this._data=a.data,this._size=a.size,this._datatype=a.datatype,this._min=typeof a.min<"u"?a.min:null,this._max=typeof a.max<"u"?a.max:null;else{if(a)throw new TypeError("Unsupported type of data ("+ut(a)+")");this._data=[],this._size=[0],this._datatype=i,this._min=null,this._max=null}}return n.prototype=new r,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(a){switch(arguments.length){case 1:{var i=r.prototype.subset.call(this,a);return Fe(i)?new n({data:i._data,size:i._size,datatype:i._datatype}):i}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:qe(this._data),size:qe(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(a){return new n(a)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(this._min===null){var a=null;this.forEach(function(i){(a===null||t(i,a))&&(a=i)}),this._min=a!==null?a:void 0}return this._min},n.prototype.max=function(){if(this._max===null){var a=null;this.forEach(function(i){(a===null||t(a,i))&&(a=i)}),this._max=a!==null?a:void 0}return this._max},n},{isClass:!0});var fU="Index",mU=["ImmutableDenseMatrix","getMatrixDataType"],u0=C(fU,mU,e=>{var{ImmutableDenseMatrix:t,getMatrixDataType:r}=e;function n(i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var o=0,l=arguments.length;o{r&&t.push(n)}),t}var dU="FibonacciHeap",hU=["smaller","larger"],c0=C(dU,hU,e=>{var{smaller:t,larger:r}=e,n=1/Math.log((1+Math.sqrt(5))/2);function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}a.prototype.type="FibonacciHeap",a.prototype.isFibonacciHeap=!0,a.prototype.insert=function(c,p){var f={key:c,value:p,degree:0};if(this._minimum){var m=this._minimum;f.left=m,f.right=m.right,m.right=f,f.right.left=f,t(c,m.key)&&(this._minimum=f)}else f.left=f,f.right=f,this._minimum=f;return this._size++,f},a.prototype.size=function(){return this._size},a.prototype.clear=function(){this._minimum=null,this._size=0},a.prototype.isEmpty=function(){return this._size===0},a.prototype.extractMinimum=function(){var c=this._minimum;if(c===null)return c;for(var p=this._minimum,f=c.degree,m=c.child;f>0;){var h=m.right;m.left.right=m.right,m.right.left=m.left,m.left=p,m.right=p.right,p.right=m,m.right.left=m,m.parent=null,m=h,f--}return c.left.right=c.right,c.right.left=c.left,c===c.right?p=null:(p=c.right,p=s(p,this._size)),this._size--,this._minimum=p,c},a.prototype.remove=function(c){this._minimum=i(this._minimum,c,-1),this.extractMinimum()};function i(c,p,f){p.key=f;var m=p.parent;return m&&t(p.key,m.key)&&(o(c,p,m),l(c,m)),t(p.key,c.key)&&(c=p),c}function o(c,p,f){p.left.right=p.right,p.right.left=p.left,f.degree--,f.child===p&&(f.child=p.right),f.degree===0&&(f.child=null),p.left=c,p.right=c.right,c.right=p,p.right.left=p,p.parent=null,p.mark=!1}function l(c,p){var f=p.parent;f&&(p.mark?(o(c,p,f),l(f)):p.mark=!0)}var u=function(p,f){p.left.right=p.right,p.right.left=p.left,p.parent=f,f.child?(p.left=f.child,p.right=f.child.right,f.child.right=p,p.right.left=p):(f.child=p,p.right=p,p.left=p),f.degree++,p.mark=!1};function s(c,p){var f=Math.floor(Math.log(p)*n)+1,m=new Array(f),h=0,d=c;if(d)for(h++,d=d.right;d!==c;)h++,d=d.right;for(var v;h>0;){for(var x=d.degree,N=d.right;v=m[x],!!v;){if(r(d.key,v.key)){var g=v;v=d,d=g}u(v,d),m[x]=null,x++}m[x]=d,d=N,h--}c=null;for(var y=0;y{var{addScalar:t,equalScalar:r,FibonacciHeap:n}=e;function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return a.prototype.type="Spa",a.prototype.isSpa=!0,a.prototype.set=function(i,o){if(this._values[i])this._values[i].value=o;else{var l=this._heap.insert(i,o);this._values[i]=l}},a.prototype.get=function(i){var o=this._values[i];return o?o.value:0},a.prototype.accumulate=function(i,o){var l=this._values[i];l?l.value=t(l.value,o):(l=this._heap.insert(i,o),this._values[i]=l)},a.prototype.forEach=function(i,o,l){var u=this._heap,s=this._values,c=[],p=u.extractMinimum();for(p&&c.push(p);p&&p.key<=o;)p.key>=i&&(r(p.value,0)||l(p.key,p.value,this)),p=u.extractMinimum(),p&&c.push(p);for(var f=0;f{var{on:t,config:r,addScalar:n,subtractScalar:a,multiplyScalar:i,divideScalar:o,pow:l,abs:u,fix:s,round:c,equal:p,isNumeric:f,format:m,number:h,Complex:d,BigNumber:v,Fraction:x}=e,N=h;function g(j,X){if(!(this instanceof g))throw new Error("Constructor must be called with the new operator");if(!(j==null||f(j)||Zt(j)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,X===void 0)this.units=[],this.dimensions=q.map(K=>0);else if(typeof X=="string"){var se=g.parse(X);this.units=se.units,this.dimensions=se.dimensions}else if($t(X)&&X.value===null)this.fixPrefix=X.fixPrefix,this.skipAutomaticSimplification=X.skipAutomaticSimplification,this.dimensions=X.dimensions.slice(0),this.units=X.units.map(K=>(0,Cs.default)({},K));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(j)}Object.defineProperty(g,"name",{value:"Unit"}),g.prototype.constructor=g,g.prototype.type="Unit",g.prototype.isUnit=!0;var y,E,b;function S(){for(;b===" "||b===" ";)D()}function A(j){return j>="0"&&j<="9"||j==="."}function w(j){return j>="0"&&j<="9"}function D(){E++,b=y.charAt(E)}function F(j){E=j,b=y.charAt(E)}function R(){var j="",X=E;if(b==="+"?D():b==="-"&&(j+=b,D()),!A(b))return F(X),null;if(b==="."){if(j+=b,D(),!w(b))return F(X),null}else{for(;w(b);)j+=b,D();b==="."&&(j+=b,D())}for(;w(b);)j+=b,D();if(b==="E"||b==="e"){var se="",K=E;if(se+=b,D(),(b==="+"||b==="-")&&(se+=b,D()),!w(b))return F(K),j;for(j=j+se;w(b);)j+=b,D()}return j}function P(){for(var j="";w(b)||g.isValidAlpha(b);)j+=b,D();var X=j.charAt(0);return g.isValidAlpha(X)?j:null}function U(j){return b===j?(D(),j):null}g.parse=function(j,X){if(X=X||{},y=j,E=-1,b="",typeof y!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var se=new g;se.units=[];var K=1,ee=!1;D(),S();var ne=R(),ve=null;if(ne){if(r.number==="BigNumber")ve=new v(ne);else if(r.number==="Fraction")try{ve=new x(ne)}catch{ve=parseFloat(ne)}else ve=parseFloat(ne);S(),U("*")?(K=1,ee=!0):U("/")&&(K=-1,ee=!0)}for(var ge=[],Oe=1;;){for(S();b==="(";)ge.push(K),Oe*=K,K=1,D(),S();var ye=void 0;if(b){var Qe=b;if(ye=P(),ye===null)throw new SyntaxError('Unexpected "'+Qe+'" in "'+y+'" at index '+E.toString())}else break;var rt=k(ye);if(rt===null)throw new SyntaxError('Unit "'+ye+'" not found.');var mt=K*Oe;if(S(),U("^")){S();var Et=R();if(Et===null)throw new SyntaxError('In "'+j+'", "^" must be followed by a floating-point number');mt*=Et}se.units.push({unit:rt.unit,prefix:rt.prefix,power:mt});for(var W=0;W1||Math.abs(this.units[0].power-1)>1e-15},g.prototype._normalize=function(j){if(j==null||this.units.length===0)return j;for(var X=j,se=g._getNumberConverter(ut(j)),K=0;K{if(Ie(z,j)){var X=z[j],se=X.prefixes[""];return{unit:X,prefix:se}}for(var K in z)if(Ie(z,K)&&cE(j,K)){var ee=z[K],ne=j.length-K.length,ve=j.substring(0,ne),ge=Ie(ee.prefixes,ve)?ee.prefixes[ve]:void 0;if(ge!==void 0)return{unit:ee,prefix:ge}}return null},{hasher:j=>j[0],limit:100});g.isValuelessUnit=function(j){return k(j)!==null},g.prototype.hasBase=function(j){if(typeof j=="string"&&(j=B[j]),!j)return!1;for(var X=0;X1e-12)return!1;return!0},g.prototype.equalBase=function(j){for(var X=0;X1e-12)return!1;return!0},g.prototype.equals=function(j){return this.equalBase(j)&&p(this.value,j.value)},g.prototype.multiply=function(j){for(var X=this.clone(),se=$t(j)?j:new g(j),K=0;K0?this.formatUnits():null,fixPrefix:this.fixPrefix}},g.fromJSON=function(j){var X,se=new g(j.value,(X=j.unit)!==null&&X!==void 0?X:void 0);return se.fixPrefix=j.fixPrefix||!1,se},g.prototype.valueOf=g.prototype.toString,g.prototype.simplify=function(){var j=this.clone(),X=[],se;for(var K in I)if(Ie(I,K)&&j.hasBase(B[K])){se=K;break}if(se==="NONE")j.units=[];else{var ee;if(se&&Ie(I,se)&&(ee=I[se]),ee)j.units=[{unit:ee.unit,prefix:ee.prefix,power:1}];else{for(var ne=!1,ve=0;ve1e-12&&(Ie(I,ge)?X.push({unit:I[ge].unit,prefix:I[ge].prefix,power:j.dimensions[ve]||0}):ne=!0)}X.length1e-12)if(Ie(L.si,K))X.push({unit:L.si[K].unit,prefix:L.si[K].prefix,power:j.dimensions[se]||0});else throw new Error("Cannot express custom unit "+K+" in SI units")}return j.units=X,j.fixPrefix=!0,j.skipAutomaticSimplification=!0,this.value!==null?(j.value=null,this.to(j)):j},g.prototype.formatUnits=function(){for(var j="",X="",se=0,K=0,ee=0;ee0?(se++,j+=" "+this.units[ee].prefix.name+this.units[ee].unit.name,Math.abs(this.units[ee].power-1)>1e-15&&(j+="^"+this.units[ee].power)):this.units[ee].power<0&&K++;if(K>0)for(var ne=0;ne0?(X+=" "+this.units[ne].prefix.name+this.units[ne].unit.name,Math.abs(this.units[ne].power+1)>1e-15&&(X+="^"+-this.units[ne].power)):(X+=" "+this.units[ne].prefix.name+this.units[ne].unit.name,X+="^"+this.units[ne].power));j=j.substr(1),X=X.substr(1),se>1&&K>0&&(j="("+j+")"),K>1&&se>0&&(X="("+X+")");var ve=j;return se>0&&K>0&&(ve+=" / "),ve+=X,ve},g.prototype.format=function(j){var X=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),se=!1;typeof X.value<"u"&&X.value!==null&&Zt(X.value)&&(se=Math.abs(X.value.re)<1e-14);for(var K in X.units)Ie(X.units,K)&&X.units[K].unit&&(X.units[K].unit.name==="VA"&&se?X.units[K].unit=z.VAR:X.units[K].unit.name==="VAR"&&!se&&(X.units[K].unit=z.VA));X.units.length===1&&!X.fixPrefix&&Math.abs(X.units[0].power-Math.round(X.units[0].power))<1e-14&&(X.units[0].prefix=X._bestPrefix());var ee=X._denormalize(X.value),ne=X.value!==null?m(ee,j||{}):"",ve=X.formatUnits();return X.value&&Zt(X.value)&&(ne="("+ne+")"),ve.length>0&&ne.length>0&&(ne+=" "),ne+=ve,ne},g.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var j=this.value!==null?u(this.value):0,X=u(this.units[0].unit.value),se=this.units[0].prefix;if(j===0)return se;var K=this.units[0].power,ee=Math.log(j/Math.pow(se.value*X,K))/Math.LN10-1.2;if(ee>-2.200001&&ee<1.800001)return se;ee=Math.abs(ee);var ne=this.units[0].unit.prefixes;for(var ve in ne)if(Ie(ne,ve)){var ge=ne[ve];if(ge.scientific){var Oe=Math.abs(Math.log(j/Math.pow(ge.value*X,K))/Math.LN10-1.2);(Oe0)},z={meter:{name:"meter",base:B.LENGTH,prefixes:_.LONG,value:1,offset:0},inch:{name:"inch",base:B.LENGTH,prefixes:_.NONE,value:.0254,offset:0},foot:{name:"foot",base:B.LENGTH,prefixes:_.NONE,value:.3048,offset:0},yard:{name:"yard",base:B.LENGTH,prefixes:_.NONE,value:.9144,offset:0},mile:{name:"mile",base:B.LENGTH,prefixes:_.NONE,value:1609.344,offset:0},link:{name:"link",base:B.LENGTH,prefixes:_.NONE,value:.201168,offset:0},rod:{name:"rod",base:B.LENGTH,prefixes:_.NONE,value:5.0292,offset:0},chain:{name:"chain",base:B.LENGTH,prefixes:_.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:B.LENGTH,prefixes:_.NONE,value:1e-10,offset:0},m:{name:"m",base:B.LENGTH,prefixes:_.SHORT,value:1,offset:0},in:{name:"in",base:B.LENGTH,prefixes:_.NONE,value:.0254,offset:0},ft:{name:"ft",base:B.LENGTH,prefixes:_.NONE,value:.3048,offset:0},yd:{name:"yd",base:B.LENGTH,prefixes:_.NONE,value:.9144,offset:0},mi:{name:"mi",base:B.LENGTH,prefixes:_.NONE,value:1609.344,offset:0},li:{name:"li",base:B.LENGTH,prefixes:_.NONE,value:.201168,offset:0},rd:{name:"rd",base:B.LENGTH,prefixes:_.NONE,value:5.02921,offset:0},ch:{name:"ch",base:B.LENGTH,prefixes:_.NONE,value:20.1168,offset:0},mil:{name:"mil",base:B.LENGTH,prefixes:_.NONE,value:254e-7,offset:0},m2:{name:"m2",base:B.SURFACE,prefixes:_.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:B.SURFACE,prefixes:_.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:B.SURFACE,prefixes:_.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:B.SURFACE,prefixes:_.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:B.SURFACE,prefixes:_.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:B.SURFACE,prefixes:_.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:B.SURFACE,prefixes:_.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:B.SURFACE,prefixes:_.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:B.SURFACE,prefixes:_.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:B.SURFACE,prefixes:_.NONE,value:1e4,offset:0},m3:{name:"m3",base:B.VOLUME,prefixes:_.CUBIC,value:1,offset:0},L:{name:"L",base:B.VOLUME,prefixes:_.SHORT,value:.001,offset:0},l:{name:"l",base:B.VOLUME,prefixes:_.SHORT,value:.001,offset:0},litre:{name:"litre",base:B.VOLUME,prefixes:_.LONG,value:.001,offset:0},cuin:{name:"cuin",base:B.VOLUME,prefixes:_.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:B.VOLUME,prefixes:_.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:B.VOLUME,prefixes:_.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:B.VOLUME,prefixes:_.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:B.VOLUME,prefixes:_.NONE,value:15e-6,offset:0},drop:{name:"drop",base:B.VOLUME,prefixes:_.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:B.VOLUME,prefixes:_.NONE,value:5e-8,offset:0},minim:{name:"minim",base:B.VOLUME,prefixes:_.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:B.VOLUME,prefixes:_.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:B.VOLUME,prefixes:_.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:B.VOLUME,prefixes:_.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:B.VOLUME,prefixes:_.NONE,value:1e-6,offset:0},cup:{name:"cup",base:B.VOLUME,prefixes:_.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:B.VOLUME,prefixes:_.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:B.VOLUME,prefixes:_.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:B.VOLUME,prefixes:_.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:B.VOLUME,prefixes:_.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:B.VOLUME,prefixes:_.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:B.VOLUME,prefixes:_.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:B.VOLUME,prefixes:_.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:B.VOLUME,prefixes:_.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:B.VOLUME,prefixes:_.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:B.VOLUME,prefixes:_.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:B.VOLUME,prefixes:_.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:B.VOLUME,prefixes:_.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:B.VOLUME,prefixes:_.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:B.VOLUME,prefixes:_.NONE,value:.1173478,offset:0},obl:{name:"obl",base:B.VOLUME,prefixes:_.NONE,value:.1589873,offset:0},g:{name:"g",base:B.MASS,prefixes:_.SHORT,value:.001,offset:0},gram:{name:"gram",base:B.MASS,prefixes:_.LONG,value:.001,offset:0},ton:{name:"ton",base:B.MASS,prefixes:_.SHORT,value:907.18474,offset:0},t:{name:"t",base:B.MASS,prefixes:_.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:B.MASS,prefixes:_.LONG,value:1e3,offset:0},grain:{name:"grain",base:B.MASS,prefixes:_.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:B.MASS,prefixes:_.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:B.MASS,prefixes:_.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:B.MASS,prefixes:_.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:B.MASS,prefixes:_.NONE,value:45.359237,offset:0},stick:{name:"stick",base:B.MASS,prefixes:_.NONE,value:.115,offset:0},stone:{name:"stone",base:B.MASS,prefixes:_.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:B.MASS,prefixes:_.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:B.MASS,prefixes:_.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:B.MASS,prefixes:_.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:B.MASS,prefixes:_.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:B.MASS,prefixes:_.NONE,value:45.359237,offset:0},s:{name:"s",base:B.TIME,prefixes:_.SHORT,value:1,offset:0},min:{name:"min",base:B.TIME,prefixes:_.NONE,value:60,offset:0},h:{name:"h",base:B.TIME,prefixes:_.NONE,value:3600,offset:0},second:{name:"second",base:B.TIME,prefixes:_.LONG,value:1,offset:0},sec:{name:"sec",base:B.TIME,prefixes:_.LONG,value:1,offset:0},minute:{name:"minute",base:B.TIME,prefixes:_.NONE,value:60,offset:0},hour:{name:"hour",base:B.TIME,prefixes:_.NONE,value:3600,offset:0},day:{name:"day",base:B.TIME,prefixes:_.NONE,value:86400,offset:0},week:{name:"week",base:B.TIME,prefixes:_.NONE,value:7*86400,offset:0},month:{name:"month",base:B.TIME,prefixes:_.NONE,value:2629800,offset:0},year:{name:"year",base:B.TIME,prefixes:_.NONE,value:31557600,offset:0},decade:{name:"decade",base:B.TIME,prefixes:_.NONE,value:315576e3,offset:0},century:{name:"century",base:B.TIME,prefixes:_.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:B.TIME,prefixes:_.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:B.FREQUENCY,prefixes:_.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:B.FREQUENCY,prefixes:_.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:B.ANGLE,prefixes:_.SHORT,value:1,offset:0},radian:{name:"radian",base:B.ANGLE,prefixes:_.LONG,value:1,offset:0},deg:{name:"deg",base:B.ANGLE,prefixes:_.SHORT,value:null,offset:0},degree:{name:"degree",base:B.ANGLE,prefixes:_.LONG,value:null,offset:0},grad:{name:"grad",base:B.ANGLE,prefixes:_.SHORT,value:null,offset:0},gradian:{name:"gradian",base:B.ANGLE,prefixes:_.LONG,value:null,offset:0},cycle:{name:"cycle",base:B.ANGLE,prefixes:_.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:B.ANGLE,prefixes:_.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:B.ANGLE,prefixes:_.NONE,value:null,offset:0},A:{name:"A",base:B.CURRENT,prefixes:_.SHORT,value:1,offset:0},ampere:{name:"ampere",base:B.CURRENT,prefixes:_.LONG,value:1,offset:0},K:{name:"K",base:B.TEMPERATURE,prefixes:_.SHORT,value:1,offset:0},degC:{name:"degC",base:B.TEMPERATURE,prefixes:_.SHORT,value:1,offset:273.15},degF:{name:"degF",base:B.TEMPERATURE,prefixes:_.SHORT,value:new x(5,9),offset:459.67},degR:{name:"degR",base:B.TEMPERATURE,prefixes:_.SHORT,value:new x(5,9),offset:0},kelvin:{name:"kelvin",base:B.TEMPERATURE,prefixes:_.LONG,value:1,offset:0},celsius:{name:"celsius",base:B.TEMPERATURE,prefixes:_.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:B.TEMPERATURE,prefixes:_.LONG,value:new x(5,9),offset:459.67},rankine:{name:"rankine",base:B.TEMPERATURE,prefixes:_.LONG,value:new x(5,9),offset:0},mol:{name:"mol",base:B.AMOUNT_OF_SUBSTANCE,prefixes:_.SHORT,value:1,offset:0},mole:{name:"mole",base:B.AMOUNT_OF_SUBSTANCE,prefixes:_.LONG,value:1,offset:0},cd:{name:"cd",base:B.LUMINOUS_INTENSITY,prefixes:_.SHORT,value:1,offset:0},candela:{name:"candela",base:B.LUMINOUS_INTENSITY,prefixes:_.LONG,value:1,offset:0},N:{name:"N",base:B.FORCE,prefixes:_.SHORT,value:1,offset:0},newton:{name:"newton",base:B.FORCE,prefixes:_.LONG,value:1,offset:0},dyn:{name:"dyn",base:B.FORCE,prefixes:_.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:B.FORCE,prefixes:_.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:B.FORCE,prefixes:_.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:B.FORCE,prefixes:_.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:B.FORCE,prefixes:_.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:B.FORCE,prefixes:_.NONE,value:9.80665,offset:0},J:{name:"J",base:B.ENERGY,prefixes:_.SHORT,value:1,offset:0},joule:{name:"joule",base:B.ENERGY,prefixes:_.LONG,value:1,offset:0},erg:{name:"erg",base:B.ENERGY,prefixes:_.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:B.ENERGY,prefixes:_.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:B.ENERGY,prefixes:_.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:B.ENERGY,prefixes:_.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:B.ENERGY,prefixes:_.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:B.POWER,prefixes:_.SHORT,value:1,offset:0},watt:{name:"watt",base:B.POWER,prefixes:_.LONG,value:1,offset:0},hp:{name:"hp",base:B.POWER,prefixes:_.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:B.POWER,prefixes:_.SHORT,value:d.I,offset:0},VA:{name:"VA",base:B.POWER,prefixes:_.SHORT,value:1,offset:0},Pa:{name:"Pa",base:B.PRESSURE,prefixes:_.SHORT,value:1,offset:0},psi:{name:"psi",base:B.PRESSURE,prefixes:_.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:B.PRESSURE,prefixes:_.NONE,value:101325,offset:0},bar:{name:"bar",base:B.PRESSURE,prefixes:_.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:B.PRESSURE,prefixes:_.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:B.PRESSURE,prefixes:_.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:B.PRESSURE,prefixes:_.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:B.PRESSURE,prefixes:_.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:B.ELECTRIC_CHARGE,prefixes:_.LONG,value:1,offset:0},C:{name:"C",base:B.ELECTRIC_CHARGE,prefixes:_.SHORT,value:1,offset:0},farad:{name:"farad",base:B.ELECTRIC_CAPACITANCE,prefixes:_.LONG,value:1,offset:0},F:{name:"F",base:B.ELECTRIC_CAPACITANCE,prefixes:_.SHORT,value:1,offset:0},volt:{name:"volt",base:B.ELECTRIC_POTENTIAL,prefixes:_.LONG,value:1,offset:0},V:{name:"V",base:B.ELECTRIC_POTENTIAL,prefixes:_.SHORT,value:1,offset:0},ohm:{name:"ohm",base:B.ELECTRIC_RESISTANCE,prefixes:_.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:B.ELECTRIC_INDUCTANCE,prefixes:_.LONG,value:1,offset:0},H:{name:"H",base:B.ELECTRIC_INDUCTANCE,prefixes:_.SHORT,value:1,offset:0},siemens:{name:"siemens",base:B.ELECTRIC_CONDUCTANCE,prefixes:_.LONG,value:1,offset:0},S:{name:"S",base:B.ELECTRIC_CONDUCTANCE,prefixes:_.SHORT,value:1,offset:0},weber:{name:"weber",base:B.MAGNETIC_FLUX,prefixes:_.LONG,value:1,offset:0},Wb:{name:"Wb",base:B.MAGNETIC_FLUX,prefixes:_.SHORT,value:1,offset:0},tesla:{name:"tesla",base:B.MAGNETIC_FLUX_DENSITY,prefixes:_.LONG,value:1,offset:0},T:{name:"T",base:B.MAGNETIC_FLUX_DENSITY,prefixes:_.SHORT,value:1,offset:0},b:{name:"b",base:B.BIT,prefixes:_.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:B.BIT,prefixes:_.BINARY_LONG,value:1,offset:0},B:{name:"B",base:B.BIT,prefixes:_.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:B.BIT,prefixes:_.BINARY_LONG,value:8,offset:0}},re={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function fe(j){if(j.number==="BigNumber"){var X=Ss(v);z.rad.value=new v(1),z.deg.value=X.div(180),z.grad.value=X.div(200),z.cycle.value=X.times(2),z.arcsec.value=X.div(648e3),z.arcmin.value=X.div(10800)}else z.rad.value=1,z.deg.value=Math.PI/180,z.grad.value=Math.PI/200,z.cycle.value=Math.PI*2,z.arcsec.value=Math.PI/648e3,z.arcmin.value=Math.PI/10800;z.radian.value=z.rad.value,z.degree.value=z.deg.value,z.gradian.value=z.grad.value}fe(r),t&&t("config",function(j,X){j.number!==X.number&&fe(j)});var L={si:{NONE:{unit:Q,prefix:_.NONE[""]},LENGTH:{unit:z.m,prefix:_.SHORT[""]},MASS:{unit:z.g,prefix:_.SHORT.k},TIME:{unit:z.s,prefix:_.SHORT[""]},CURRENT:{unit:z.A,prefix:_.SHORT[""]},TEMPERATURE:{unit:z.K,prefix:_.SHORT[""]},LUMINOUS_INTENSITY:{unit:z.cd,prefix:_.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:z.mol,prefix:_.SHORT[""]},ANGLE:{unit:z.rad,prefix:_.SHORT[""]},BIT:{unit:z.bits,prefix:_.SHORT[""]},FORCE:{unit:z.N,prefix:_.SHORT[""]},ENERGY:{unit:z.J,prefix:_.SHORT[""]},POWER:{unit:z.W,prefix:_.SHORT[""]},PRESSURE:{unit:z.Pa,prefix:_.SHORT[""]},ELECTRIC_CHARGE:{unit:z.C,prefix:_.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:z.F,prefix:_.SHORT[""]},ELECTRIC_POTENTIAL:{unit:z.V,prefix:_.SHORT[""]},ELECTRIC_RESISTANCE:{unit:z.ohm,prefix:_.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:z.H,prefix:_.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:z.S,prefix:_.SHORT[""]},MAGNETIC_FLUX:{unit:z.Wb,prefix:_.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:z.T,prefix:_.SHORT[""]},FREQUENCY:{unit:z.Hz,prefix:_.SHORT[""]}}};L.cgs=JSON.parse(JSON.stringify(L.si)),L.cgs.LENGTH={unit:z.m,prefix:_.SHORT.c},L.cgs.MASS={unit:z.g,prefix:_.SHORT[""]},L.cgs.FORCE={unit:z.dyn,prefix:_.SHORT[""]},L.cgs.ENERGY={unit:z.erg,prefix:_.NONE[""]},L.us=JSON.parse(JSON.stringify(L.si)),L.us.LENGTH={unit:z.ft,prefix:_.NONE[""]},L.us.MASS={unit:z.lbm,prefix:_.NONE[""]},L.us.TEMPERATURE={unit:z.degF,prefix:_.NONE[""]},L.us.FORCE={unit:z.lbf,prefix:_.NONE[""]},L.us.ENERGY={unit:z.BTU,prefix:_.BTU[""]},L.us.POWER={unit:z.hp,prefix:_.NONE[""]},L.us.PRESSURE={unit:z.psi,prefix:_.NONE[""]},L.auto=JSON.parse(JSON.stringify(L.si));var I=L.auto;g.setUnitSystem=function(j){if(Ie(L,j))I=L[j];else throw new Error("Unit system "+j+" does not exist. Choices are: "+Object.keys(L).join(", "))},g.getUnitSystem=function(){for(var j in L)if(Ie(L,j)&&L[j]===I)return j},g.typeConverters={BigNumber:function(X){return X!=null&&X.isFraction?new v(X.n).div(X.d).times(X.s):new v(X+"")},Fraction:function(X){return new x(X)},Complex:function(X){return X},number:function(X){return X!=null&&X.isFraction?h(X):X}},g.prototype._numberConverter=function(){var j=g.typeConverters[this.valueType()];if(j)return j;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},g._getNumberConverter=function(j){if(!g.typeConverters[j])throw new TypeError('Unsupported type "'+j+'"');return g.typeConverters[j]};for(var $ in z)if(Ie(z,$)){var H=z[$];H.dimensions=H.base.dimensions}for(var ae in re)if(Ie(re,ae)){var ce=z[re[ae]],me={};for(var Ne in ce)Ie(ce,Ne)&&(me[Ne]=ce[Ne]);me.name=ae,z[ae]=me}g.isValidAlpha=function(X){return/^[a-zA-Z]$/.test(X)};function Me(j){for(var X=0;X0&&!(g.isValidAlpha(b)||w(b)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+j+'"')}}return g.createUnit=function(j,X){if(typeof j!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(X&&X.override){for(var se in j)if(Ie(j,se)&&g.deleteUnit(se),j[se].aliases)for(var K=0;K"u"||X===null)&&(X={}),typeof j!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Ie(z,j))throw new Error('Cannot create unit "'+j+'": a unit with that name already exists');Me(j);var se=null,K=[],ee=0,ne,ve,ge;if(X&&X.type==="Unit")se=X.clone();else if(typeof X=="string")X!==""&&(ne=X);else if(typeof X=="object")ne=X.definition,ve=X.prefixes,ee=X.offset,ge=X.baseName,X.aliases&&(K=X.aliases.valueOf());else throw new TypeError('Cannot create unit "'+j+'" from "'+X.toString()+'": expecting "string" or "Unit" or "Object"');if(K){for(var Oe=0;Oe1e-12){oe=!1;break}if(oe){Et=!0,ye.base=B[W];break}}if(!Et){ge=ge||j+"_STUFF";var be={dimensions:se.dimensions.slice(0)};be.key=ge,B[ge]=be,I[ge]={unit:ye,prefix:_.NONE[""]},ye.base=B[ge]}}else{if(ge=ge||j+"_STUFF",q.indexOf(ge)>=0)throw new Error('Cannot create new base unit "'+j+'": a base unit with that name already exists (and cannot be overridden)');q.push(ge);for(var Qe in B)Ie(B,Qe)&&(B[Qe].dimensions[q.length-1]=0);for(var rt={dimensions:[]},mt=0;mt{var{typed:t,Unit:r}=e;return t(WN,{Unit:function(a){return a.clone()},string:function(a){return r.isValuelessUnit(a)?new r(null,a):r.parse(a,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(a,i){return new r(a,i)},"number | BigNumber | Fraction":function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var QN="sparse",EU=["typed","SparseMatrix"],d0=C(QN,EU,e=>{var{typed:t,SparseMatrix:r}=e;return t(QN,{"":function(){return new r([])},string:function(a){return new r([],a)},"Array | Matrix":function(a){return new r(a)},"Array | Matrix, string":function(a,i){return new r(a,i)}})});var ZN="createUnit",AU=["typed","Unit"],h0=C(ZN,AU,e=>{var{typed:t,Unit:r}=e;return t(ZN,{"Object, Object":function(a,i){return r.createUnit(a,i)},Object:function(a){return r.createUnit(a,{})},"string, Unit | string | Object, Object":function(a,i,o){var l={};return l[a]=i,r.createUnit(l,o)},"string, Unit | string | Object":function(a,i){var o={};return o[a]=i,r.createUnit(o,{})},string:function(a){var i={};return i[a]={},r.createUnit(i,{})}})});var JN="acos",NU=["typed","config","Complex"],v0=C(JN,NU,e=>{var{typed:t,config:r,Complex:n}=e;return t(JN,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.acos(i):new n(i,0).acos()},Complex:function(i){return i.acos()},BigNumber:function(i){return i.acos()}})});var eT="acosh",TU=["typed","config","Complex"],g0=C(eT,TU,e=>{var{typed:t,config:r,Complex:n}=e;return t(eT,{number:function(i){return i>=1||r.predictable?Wm(i):i<=-1?new n(Math.log(Math.sqrt(i*i-1)-i),Math.PI):new n(i,0).acosh()},Complex:function(i){return i.acosh()},BigNumber:function(i){return i.acosh()}})});var tT="acot",wU=["typed","BigNumber"],x0=C(tT,wU,e=>{var{typed:t,BigNumber:r}=e;return t(tT,{number:Qm,Complex:function(a){return a.acot()},BigNumber:function(a){return new r(1).div(a).atan()}})});var rT="acoth",DU=["typed","config","Complex","BigNumber"],b0=C(rT,DU,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(rT,{number:function(o){return o>=1||o<=-1||r.predictable?Zm(o):new n(o,0).acoth()},Complex:function(o){return o.acoth()},BigNumber:function(o){return new a(1).div(o).atanh()}})});var nT="acsc",SU=["typed","config","Complex","BigNumber"],y0=C(nT,SU,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(nT,{number:function(o){return o<=-1||o>=1||r.predictable?Jm(o):new n(o,0).acsc()},Complex:function(o){return o.acsc()},BigNumber:function(o){return new a(1).div(o).asin()}})});var aT="acsch",CU=["typed","BigNumber"],E0=C(aT,CU,e=>{var{typed:t,BigNumber:r}=e;return t(aT,{number:ed,Complex:function(a){return a.acsch()},BigNumber:function(a){return new r(1).div(a).asinh()}})});var iT="asec",_U=["typed","config","Complex","BigNumber"],A0=C(iT,_U,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(iT,{number:function(o){return o<=-1||o>=1||r.predictable?td(o):new n(o,0).asec()},Complex:function(o){return o.asec()},BigNumber:function(o){return new a(1).div(o).acos()}})});var oT="asech",MU=["typed","config","Complex","BigNumber"],N0=C(oT,MU,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(oT,{number:function(o){if(o<=1&&o>=-1||r.predictable){var l=1/o;if(l>0||r.predictable)return rd(o);var u=Math.sqrt(l*l-1);return new n(Math.log(u-l),Math.PI)}return new n(o,0).asech()},Complex:function(o){return o.asech()},BigNumber:function(o){return new a(1).div(o).acosh()}})});var sT="asin",OU=["typed","config","Complex"],T0=C(sT,OU,e=>{var{typed:t,config:r,Complex:n}=e;return t(sT,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.asin(i):new n(i,0).asin()},Complex:function(i){return i.asin()},BigNumber:function(i){return i.asin()}})});var RU="asinh",FU=["typed"],w0=C(RU,FU,e=>{var{typed:t}=e;return t("asinh",{number:nd,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})});var IU="atan",BU=["typed"],D0=C(IU,BU,e=>{var{typed:t}=e;return t("atan",{number:function(n){return Math.atan(n)},Complex:function(n){return n.atan()},BigNumber:function(n){return n.atan()}})});var uT="atan2",LU=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],S0=C(uT,LU,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,DenseMatrix:i,concat:o}=e,l=Yt({typed:t,equalScalar:n}),u=wt({typed:t}),s=al({typed:t,equalScalar:n}),c=gt({typed:t,equalScalar:n}),p=lt({typed:t,DenseMatrix:i}),f=We({typed:t,matrix:r,concat:o});return t(uT,{"number, number":Math.atan2,"BigNumber, BigNumber":(m,h)=>a.atan2(m,h)},f({scalar:"number | BigNumber",SS:s,DS:u,SD:l,Ss:c,sS:p}))});var cT="atanh",PU=["typed","config","Complex"],C0=C(cT,PU,e=>{var{typed:t,config:r,Complex:n}=e;return t(cT,{number:function(i){return i<=1&&i>=-1||r.predictable?ad(i):new n(i,0).atanh()},Complex:function(i){return i.atanh()},BigNumber:function(i){return i.atanh()}})});var mn=C("trigUnit",["typed"],e=>{var{typed:t}=e;return{Unit:t.referToSelf(r=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return t.find(r,n.valueType())(n.value)})}});var lT="cos",UU=["typed"],_0=C(lT,UU,e=>{var{typed:t}=e,r=mn({typed:t});return t(lT,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},r)});var pT="cosh",kU=["typed"],M0=C(pT,kU,e=>{var{typed:t}=e;return t(pT,{number:gc,"Complex | BigNumber":r=>r.cosh()})});var fT="cot",qU=["typed","BigNumber"],O0=C(fT,qU,e=>{var{typed:t,BigNumber:r}=e,n=mn({typed:t});return t(fT,{number:id,Complex:a=>a.cot(),BigNumber:a=>new r(1).div(a.tan())},n)});var mT="coth",HU=["typed","BigNumber"],R0=C(mT,HU,e=>{var{typed:t,BigNumber:r}=e;return t(mT,{number:od,Complex:n=>n.coth(),BigNumber:n=>new r(1).div(n.tanh())})});var dT="csc",zU=["typed","BigNumber"],F0=C(dT,zU,e=>{var{typed:t,BigNumber:r}=e,n=mn({typed:t});return t(dT,{number:sd,Complex:a=>a.csc(),BigNumber:a=>new r(1).div(a.sin())},n)});var hT="csch",GU=["typed","BigNumber"],I0=C(hT,GU,e=>{var{typed:t,BigNumber:r}=e;return t(hT,{number:ud,Complex:n=>n.csch(),BigNumber:n=>new r(1).div(n.sinh())})});var vT="sec",YU=["typed","BigNumber"],B0=C(vT,YU,e=>{var{typed:t,BigNumber:r}=e,n=mn({typed:t});return t(vT,{number:cd,Complex:a=>a.sec(),BigNumber:a=>new r(1).div(a.cos())},n)});var gT="sech",jU=["typed","BigNumber"],L0=C(gT,jU,e=>{var{typed:t,BigNumber:r}=e;return t(gT,{number:ld,Complex:n=>n.sech(),BigNumber:n=>new r(1).div(n.cosh())})});var xT="sin",VU=["typed"],P0=C(xT,VU,e=>{var{typed:t}=e,r=mn({typed:t});return t(xT,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},r)});var bT="sinh",$U=["typed"],U0=C(bT,$U,e=>{var{typed:t}=e;return t(bT,{number:pd,"Complex | BigNumber":r=>r.sinh()})});var yT="tan",XU=["typed"],k0=C(yT,XU,e=>{var{typed:t}=e,r=mn({typed:t});return t(yT,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},r)});var KU="tanh",WU=["typed"],q0=C(KU,WU,e=>{var{typed:t}=e;return t("tanh",{number:xc,"Complex | BigNumber":r=>r.tanh()})});var ET="setCartesian",QU=["typed","size","subset","compareNatural","Index","DenseMatrix"],H0=C(ET,QU,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ET,{"Array | Matrix, Array | Matrix":function(u,s){var c=[];if(n(r(u),new i(0))!==0&&n(r(s),new i(0))!==0){var p=Je(Array.isArray(u)?u:u.toArray()).sort(a),f=Je(Array.isArray(s)?s:s.toArray()).sort(a);c=[];for(var m=0;m{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(AT,{"Array | Matrix, Array | Matrix":function(u,s){var c;if(n(r(u),new i(0))===0)c=[];else{if(n(r(s),new i(0))===0)return Je(u.toArray());var p=ta(Je(Array.isArray(u)?u:u.toArray()).sort(a)),f=ta(Je(Array.isArray(s)?s:s.toArray()).sort(a));c=[];for(var m,h=0;h{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(NT,{"Array | Matrix":function(u){var s;if(n(r(u),new i(0))===0)s=[];else{var c=Je(Array.isArray(u)?u:u.toArray()).sort(a);s=[],s.push(c[0]);for(var p=1;p{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(TT,{"Array | Matrix, Array | Matrix":function(u,s){var c;if(n(r(u),new i(0))===0||n(r(s),new i(0))===0)c=[];else{var p=ta(Je(Array.isArray(u)?u:u.toArray()).sort(a)),f=ta(Je(Array.isArray(s)?s:s.toArray()).sort(a));c=[];for(var m=0;m{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(wT,{"Array | Matrix, Array | Matrix":function(l,u){if(n(r(l),new i(0))===0)return!0;if(n(r(u),new i(0))===0)return!1;for(var s=ta(Je(Array.isArray(l)?l:l.toArray()).sort(a)),c=ta(Je(Array.isArray(u)?u:u.toArray()).sort(a)),p,f=0;f{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(DT,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(l,u){if(n(r(u),new i(0))===0)return 0;for(var s=Je(Array.isArray(u)?u:u.toArray()),c=0,p=0;p{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(ST,{"Array | Matrix":function(s){if(n(r(s),new i(0))===0)return[];for(var c=Je(Array.isArray(s)?s:s.toArray()).sort(a),p=[],f=0;f.toString(2).length<=c.length;)p.push(o(c,f.toString(2).split("").reverse())),f++;return l(p)}});function o(u,s){for(var c=[],p=0;p0;c--)for(var p=0;pu[p+1].length&&(s=u[p],u[p]=u[p+1],u[p+1]=s);return u}});var CT="setSize",ak=["typed","compareNatural"],X0=C(CT,ak,e=>{var{typed:t,compareNatural:r}=e;return t(CT,{"Array | Matrix":function(a){return Array.isArray(a)?Je(a).length:Je(a.toArray()).length},"Array | Matrix, boolean":function(a,i){if(i===!1||a.length===0)return Array.isArray(a)?Je(a).length:Je(a.toArray()).length;for(var o=Je(Array.isArray(a)?a:a.toArray()).sort(r),l=1,u=1;u{var{typed:t,size:r,concat:n,subset:a,setDifference:i,Index:o}=e;return t(_T,{"Array | Matrix, Array | Matrix":function(u,s){if(a(r(u),new o(0))===0)return Je(s);if(a(r(s),new o(0))===0)return Je(u);var c=Je(u),p=Je(s);return n(i(c,p),i(p,c))}})});var MT="setUnion",ok=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],W0=C(MT,ok,e=>{var{typed:t,size:r,concat:n,subset:a,setIntersect:i,setSymDifference:o,Index:l}=e;return t(MT,{"Array | Matrix, Array | Matrix":function(s,c){if(a(r(s),new l(0))===0)return Je(c);if(a(r(c),new l(0))===0)return Je(s);var p=Je(s),f=Je(c);return n(o(p,f),i(p,f))}})});var OT="add",sk=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],Dl=C(OT,sk,e=>{var{typed:t,matrix:r,addScalar:n,equalScalar:a,DenseMatrix:i,SparseMatrix:o,concat:l}=e,u=xr({typed:t}),s=Xi({typed:t,equalScalar:a}),c=Lr({typed:t,DenseMatrix:i}),p=We({typed:t,matrix:r,concat:l});return t(OT,{"any, any":n,"any, any, ...any":t.referToSelf(f=>(m,h,d)=>{for(var v=f(m,h),x=0;x{var{typed:t,abs:r,addScalar:n,divideScalar:a,multiplyScalar:i,sqrt:o,smaller:l,isPositive:u}=e;return t(RT,{"... number | BigNumber":s,Array:s,Matrix:c=>s(Je(c.toArray()))});function s(c){for(var p=0,f=0,m=0;m{var{typed:t,abs:r,add:n,pow:a,conj:i,sqrt:o,multiply:l,equalScalar:u,larger:s,smaller:c,matrix:p,ctranspose:f,eigs:m}=e;return t(FT,{number:Math.abs,Complex:function(A){return A.abs()},BigNumber:function(A){return A.abs()},boolean:function(A){return Math.abs(A)},Array:function(A){return b(p(A),2)},Matrix:function(A){return b(A,2)},"Array, number | BigNumber | string":function(A,w){return b(p(A),w)},"Matrix, number | BigNumber | string":function(A,w){return b(A,w)}});function h(S){var A=0;return S.forEach(function(w){var D=r(w);s(D,A)&&(A=D)},!0),A}function d(S){var A;return S.forEach(function(w){var D=r(w);(!A||c(D,A))&&(A=D)},!0),A||0}function v(S,A){if(A===Number.POSITIVE_INFINITY||A==="inf")return h(S);if(A===Number.NEGATIVE_INFINITY||A==="-inf")return d(S);if(A==="fro")return b(S,2);if(typeof A=="number"&&!isNaN(A)){if(!u(A,0)){var w=0;return S.forEach(function(D){w=n(a(r(D),A),w)},!0),a(w,1/A)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function x(S){var A=0;return S.forEach(function(w,D){A=n(A,l(w,i(w)))}),r(o(A))}function N(S){var A=[],w=0;return S.forEach(function(D,F){var R=F[1],P=n(A[R]||0,r(D));s(P,w)&&(w=P),A[R]=P},!0),w}function g(S){var A=S.size();if(A[0]!==A[1])throw new RangeError("Invalid matrix dimensions");var w=f(S),D=l(w,S),F=m(D).values.toArray(),R=F[F.length-1];return r(o(R))}function y(S){var A=[],w=0;return S.forEach(function(D,F){var R=F[0],P=n(A[R]||0,r(D));s(P,w)&&(w=P),A[R]=P},!0),w}function E(S,A){if(A===1)return N(S);if(A===Number.POSITIVE_INFINITY||A==="inf")return y(S);if(A==="fro")return x(S);if(A===2)return g(S);throw new Error("Unsupported parameter value "+A)}function b(S,A){var w=S.size();if(w.length===1)return v(S,A);if(w.length===2){if(w[0]&&w[1])return E(S,A);throw new RangeError("Invalid matrix dimensions")}}});var IT="dot",lk=["typed","addScalar","multiplyScalar","conj","size"],Sl=C(IT,lk,e=>{var{typed:t,addScalar:r,multiplyScalar:n,conj:a,size:i}=e;return t(IT,{"Array | DenseMatrix, Array | DenseMatrix":l,"SparseMatrix, SparseMatrix":u});function o(c,p){var f=s(c),m=s(p),h,d;if(f.length===1)h=f[0];else if(f.length===2&&f[1]===1)h=f[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+f.join(", ")+")");if(m.length===1)d=m[0];else if(m.length===2&&m[1]===1)d=m[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+m.join(", ")+")");if(h!==d)throw new RangeError("Vectors must have equal length ("+h+" != "+d+")");if(h===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return h}function l(c,p){var f=o(c,p),m=Fe(c)?c._data:c,h=Fe(c)?c._datatype||c.getDataType():void 0,d=Fe(p)?p._data:p,v=Fe(p)?p._datatype||p.getDataType():void 0,x=s(c).length===2,N=s(p).length===2,g=r,y=n;if(h&&v&&h===v&&typeof h=="string"&&h!=="mixed"){var E=h;g=t.find(r,[E,E]),y=t.find(n,[E,E])}if(!x&&!N){for(var b=y(a(m[0]),d[0]),S=1;Sb){y++;continue}E===b&&(v=x(v,N(m[g],d[y])),g++,y++)}return v}function s(c){return Fe(c)?c.size():i(c)}});var pk="trace",fk=["typed","matrix","add"],J0=C(pk,fk,e=>{var{typed:t,matrix:r,add:n}=e;return t("trace",{Array:function(l){return a(r(l))},SparseMatrix:i,DenseMatrix:a,any:qe});function a(o){var l=o._size,u=o._data;switch(l.length){case 1:if(l[0]===1)return qe(u[0]);throw new RangeError("Matrix must be square (size: "+je(l)+")");case 2:{var s=l[0],c=l[1];if(s===c){for(var p=0,f=0;f0)for(var h=0;hh)break}return m}throw new RangeError("Matrix must be square (size: "+je(c)+")")}});var BT="index",mk=["typed","Index"],ev=C(BT,mk,e=>{var{typed:t,Index:r}=e;return t(BT,{"...number | string | BigNumber | Range | Array | Matrix":function(a){var i=a.map(function(l){return Ue(l)?l.toNumber():at(l)||Fe(l)?l.map(function(u){return Ue(u)?u.toNumber():u}):l}),o=new r;return r.apply(o,i),o}})});var Cl=new Set(["end"]);var dk="Node",hk=["mathWithTransform"],LT=C(dk,hk,e=>{var{mathWithTransform:t}=e;function r(a){for(var i of[...Cl])if(a.has(i))throw new Error('Scope contains an illegal symbol, "'+i+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(i){return this.compile().evaluate(i)}compile(){var i=this._compile(t,{}),o={},l=null;function u(s){var c=Jn(s);return r(c),i(c,o,l)}return{evaluate:u}}_compile(i,o){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(i){throw new Error("Cannot run forEach on a Node interface")}map(i){throw new Error("Cannot run map on a Node interface")}_ifNode(i){if(!nt(i))throw new TypeError("Callback function must return a Node");return i}traverse(i){i(this,null,null);function o(l,u){l.forEach(function(s,c,p){u(s,c,p),o(s,u)})}o(this,i)}transform(i){function o(l,u,s){var c=i(l,u,s);return c!==l?c:l.map(o)}return o(this,null,null)}filter(i){var o=[];return this.traverse(function(l,u,s){i(l,u,s)&&o.push(l)}),o}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(i){return i.cloneDeep()})}equals(i){return i?this.type===i.type&&Nn(this,i):!1}toString(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toString(i)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toHTML(i)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toTex(i)}_toTex(i){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(i){if(i&&typeof i=="object")switch(typeof i.handler){case"object":case"undefined":return;case"function":return i.handler(this,i);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});var PT=Le(ir(),1);function Dt(e){return e&&e.isIndexError?new nr(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function _l(e){var{subset:t}=e;return function(n,a){try{if(Array.isArray(n))return t(n,a);if(n&&typeof n.subset=="function")return n.subset(a);if(typeof n=="string")return t(n,a);if(typeof n=="object"){if(!a.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return Ot(n,a.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw Dt(i)}}}var Ml="AccessorNode",vk=["subset","Node"],UT=C(Ml,vk,e=>{var{subset:t,Node:r}=e,n=_l({subset:t});function a(o){return!(wr(o)||Jt(o)||et(o)||pr(o)||qn(o)||er(o)||bt(o))}class i extends r{constructor(l,u){if(super(),!nt(l))throw new TypeError('Node expected for parameter "object"');if(!Rr(u))throw new TypeError('IndexNode expected for parameter "index"');this.object=l,this.index=u}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Ml}get isAccessorNode(){return!0}_compile(l,u){var s=this.object._compile(l,u),c=this.index._compile(l,u);if(this.index.isObjectProperty()){var p=this.index.getObjectProperty();return function(m,h,d){return Ot(s(m,h,d),p)}}else return function(m,h,d){var v=s(m,h,d),x=c(m,h,v);return n(v,x)}}forEach(l){l(this.object,"object",this),l(this.index,"index",this)}map(l){return new i(this._ifNode(l(this.object,"object",this)),this._ifNode(l(this.index,"index",this)))}clone(){return new i(this.object,this.index)}_toString(l){var u=this.object.toString(l);return a(this.object)&&(u="("+u+")"),u+this.index.toString(l)}_toHTML(l){var u=this.object.toHTML(l);return a(this.object)&&(u='('+u+')'),u+this.index.toHTML(l)}_toTex(l){var u=this.object.toTex(l);return a(this.object)&&(u="\\left(' + object + '\\right)"),u+this.index.toTex(l)}toJSON(){return{mathjs:Ml,object:this.object,index:this.index}}static fromJSON(l){return new i(l.object,l.index)}}return(0,PT.default)(i,"name",Ml),i},{isClass:!0,isNode:!0});var kT=Le(ir(),1);var Ol="ArrayNode",gk=["Node"],qT=C(Ol,gk,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.items=a||[],!Array.isArray(this.items)||!this.items.every(nt))throw new TypeError("Array containing Nodes expected")}get type(){return Ol}get isArrayNode(){return!0}_compile(a,i){var o=Ir(this.items,function(s){return s._compile(a,i)}),l=a.config.matrix!=="Array";if(l){var u=a.matrix;return function(c,p,f){return u(Ir(o,function(m){return m(c,p,f)}))}}else return function(c,p,f){return Ir(o,function(m){return m(c,p,f)})}}forEach(a){for(var i=0;i['+i.join(',')+']'}_toTex(a){function i(o,l){var u=o.some(Jt)&&!o.every(Jt),s=l||u,c=s?"&":"\\\\",p=o.map(function(f){return f.items?i(f.items,!l):f.toTex(a)}).join(c);return u||!s||s&&!l?"\\begin{bmatrix}"+p+"\\end{bmatrix}":p}return i(this.items,!1)}}return(0,kT.default)(r,"name",Ol),r},{isClass:!0,isNode:!0});var GT=Le(ir(),1);function HT(e){var{subset:t,matrix:r}=e;return function(a,i,o){try{if(Array.isArray(a)){var l=r(a).subset(i,o).valueOf();return l.forEach((u,s)=>{a[s]=u}),a}else{if(a&&typeof a.subset=="function")return a.subset(i,o);if(typeof a=="string")return t(a,i,o);if(typeof a=="object"){if(!i.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return Hn(a,i.getObjectProperty(),o),a}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(u){throw Dt(u)}}}var dn=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function Rl(e,t){if(!t||t!=="auto")return e;for(var r=e;er(r);)r=r.content;return r}function ht(e,t,r,n){var a=e;t!=="keep"&&(a=e.getContent());for(var i=a.getIdentifier(),o=null,l=0;l{var{subset:t,matrix:r,Node:n}=e,a=_l({subset:t}),i=HT({subset:t,matrix:r});function o(u,s,c){s||(s="keep");var p=ht(u,s,c),f=ht(u.value,s,c);return s==="all"||f!==null&&f<=p}class l extends n{constructor(s,c,p){if(super(),this.object=s,this.index=p?c:null,this.value=p||c,!bt(s)&&!wr(s))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(bt(s)&&s.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!Rr(this.index))throw new TypeError('IndexNode expected as "index"');if(!nt(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Il}get isAssignmentNode(){return!0}_compile(s,c){var p=this.object._compile(s,c),f=this.index?this.index._compile(s,c):null,m=this.value._compile(s,c),h=this.object.name;if(this.index)if(this.index.isObjectProperty()){var d=this.index.getObjectProperty();return function(y,E,b){var S=p(y,E,b),A=m(y,E,b);return Hn(S,d,A),A}}else{if(bt(this.object))return function(y,E,b){var S=p(y,E,b),A=m(y,E,b),w=f(y,E,S);return y.set(h,i(S,w,A)),A};var v=this.object.object._compile(s,c);if(this.object.index.isObjectProperty()){var x=this.object.index.getObjectProperty();return function(y,E,b){var S=v(y,E,b),A=Ot(S,x),w=f(y,E,A),D=m(y,E,b);return Hn(S,x,i(A,w,D)),D}}else{var N=this.object.index._compile(s,c);return function(y,E,b){var S=v(y,E,b),A=N(y,E,S),w=a(S,A),D=f(y,E,w),F=m(y,E,b);return i(S,A,i(w,D,F)),F}}}else{if(!bt(this.object))throw new TypeError("SymbolNode expected as object");return function(y,E,b){var S=m(y,E,b);return y.set(h,S),S}}}forEach(s){s(this.object,"object",this),this.index&&s(this.index,"index",this),s(this.value,"value",this)}map(s){var c=this._ifNode(s(this.object,"object",this)),p=this.index?this._ifNode(s(this.index,"index",this)):null,f=this._ifNode(s(this.value,"value",this));return new l(c,p,f)}clone(){return new l(this.object,this.index,this.value)}_toString(s){var c=this.object.toString(s),p=this.index?this.index.toString(s):"",f=this.value.toString(s);return o(this,s&&s.parenthesis,s&&s.implicit)&&(f="("+f+")"),c+p+" = "+f}toJSON(){return{mathjs:Il,object:this.object,index:this.index,value:this.value}}static fromJSON(s){return new l(s.object,s.index,s.value)}_toHTML(s){var c=this.object.toHTML(s),p=this.index?this.index.toHTML(s):"",f=this.value.toHTML(s);return o(this,s&&s.parenthesis,s&&s.implicit)&&(f='('+f+')'),c+p+'='+f}_toTex(s){var c=this.object.toTex(s),p=this.index?this.index.toTex(s):"",f=this.value.toTex(s);return o(this,s&&s.parenthesis,s&&s.implicit)&&(f="\\left(".concat(f,"\\right)")),c+p+"="+f}}return(0,GT.default)(l,"name",Il),l},{isClass:!0,isNode:!0});var jT=Le(ir(),1);var Bl="BlockNode",bk=["ResultSet","Node"],VT=C(Bl,bk,e=>{var{ResultSet:t,Node:r}=e;class n extends r{constructor(i){if(super(),!Array.isArray(i))throw new Error("Array expected");this.blocks=i.map(function(o){var l=o&&o.node,u=o&&o.visible!==void 0?o.visible:!0;if(!nt(l))throw new TypeError('Property "node" must be a Node');if(typeof u!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:l,visible:u}})}get type(){return Bl}get isBlockNode(){return!0}_compile(i,o){var l=Ir(this.blocks,function(u){return{evaluate:u.node._compile(i,o),visible:u.visible}});return function(s,c,p){var f=[];return Na(l,function(h){var d=h.evaluate(s,c,p);h.visible&&f.push(d)}),new t(f)}}forEach(i){for(var o=0;o "+(this._values?je(this._values[S],d):"X")}return g},a.prototype.toString=function(){return je(this.toArray())},a.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},a.prototype.diagonal=function(d){if(d){if(Ue(d)&&(d=d.toNumber()),!ze(d)||!Re(d))throw new TypeError("The parameter k must be an integer number")}else d=0;var v=d>0?d:0,x=d<0?-d:0,N=this._size[0],g=this._size[1],y=Math.min(N-x,g-v),E=[],b=[],S=[];S[0]=0;for(var A=v;A0?x:0,S=x<0?-x:0,A=d[0],w=d[1],D=Math.min(A-S,w-b),F;if(at(v)){if(v.length!==D)throw new Error("Invalid value array length");F=function(Z){return v[Z]}}else if(Fe(v)){var R=v.size();if(R.length!==1||R[0]!==D)throw new Error("Invalid matrix length");F=function(Z){return v.get([Z])}}else F=function(){return v};for(var P=[],U=[],k=[],M=0;M=0&&_=S||g[w]!==v)){var F=N?N[A]:void 0;g.splice(w,0,v),N&&N.splice(w,0,F),g.splice(w<=A?A+1:A,1),N&&N.splice(w<=A?A+1:A,1);continue}if(w=S||g[A]!==d)){var R=N?N[w]:void 0;g.splice(A,0,d),N&&N.splice(A,0,R),g.splice(A<=w?w+1:w,1),N&&N.splice(A<=w?w+1:w,1)}}},a},{isClass:!0});var MP="number",OP=["typed"];function RP(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var r={"0b":2,"0o":8,"0x":16}[t[1]],n=t[2],a=t[3];return{input:e,radix:r,integerPart:n,fractionalPart:a}}else return null}function FP(e){for(var t=parseInt(e.integerPart,e.radix),r=0,n=0;n{var{typed:t}=e,r=t("number",{"":function(){return 0},number:function(a){return a},string:function(a){if(a==="NaN")return NaN;var i=RP(a);if(i)return FP(i);var o=0,l=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);l&&(o=Number(l[2]),a=l[1]);var u=Number(a);if(isNaN(u))throw new SyntaxError('String "'+a+'" is not a valid number');if(l){if(u>2**o-1)throw new SyntaxError('String "'.concat(a,'" is out of range'));u>=2**(o-1)&&(u=u-2**o)}return u},BigNumber:function(a){return a.toNumber()},Fraction:function(a){return a.valueOf()},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),null:function(a){return 0},"Unit, string | Unit":function(a,i){return a.toNumber(i)},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))});return r.fromJSON=function(n){return parseFloat(n.value)},r});var FE="string",IP=["typed"],Ad=C(FE,IP,e=>{var{typed:t}=e;return t(FE,{"":function(){return""},number:Tn,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r)),any:function(n){return String(n)}})});var IE="boolean",BP=["typed"],Nd=C(IE,BP,e=>{var{typed:t}=e;return t(IE,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;var i=Number(n);if(n!==""&&!isNaN(i))return!!i;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var LP="bignumber",PP=["typed","BigNumber"],$c=C(LP,PP,e=>{var{typed:t,BigNumber:r}=e;return t("bignumber",{"":function(){return new r(0)},number:function(a){return new r(a+"")},string:function(a){var i=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(i){var o=i[2],l=r(i[1]),u=new r(2).pow(Number(o));if(l.gt(u.sub(1)))throw new SyntaxError('String "'.concat(a,'" is out of range'));var s=new r(2).pow(Number(o)-1);return l.gte(s)?l.sub(u):l}return new r(a)},BigNumber:function(a){return a},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Fraction:function(a){return new r(a.n).div(a.d).times(a.s)},null:function(a){return new r(0)},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var UP="complex",kP=["typed","Complex"],Td=C(UP,kP,e=>{var{typed:t,Complex:r}=e;return t("complex",{"":function(){return r.ZERO},number:function(a){return new r(a,0)},"number, number":function(a,i){return new r(a,i)},"BigNumber, BigNumber":function(a,i){return new r(a.toNumber(),i.toNumber())},Fraction:function(a){return new r(a.valueOf(),0)},Complex:function(a){return a.clone()},string:function(a){return r(a)},null:function(a){return r(0)},Object:function(a){if("re"in a&&"im"in a)return new r(a.re,a.im);if("r"in a&&"phi"in a||"abs"in a&&"arg"in a)return new r(a);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var qP="fraction",HP=["typed","Fraction"],Xc=C(qP,HP,e=>{var{typed:t,Fraction:r}=e;return t("fraction",{number:function(a){if(!isFinite(a)||isNaN(a))throw new Error(a+" cannot be represented as a fraction");return new r(a)},string:function(a){return new r(a)},"number, number":function(a,i){return new r(a,i)},null:function(a){return new r(0)},BigNumber:function(a){return new r(a.toString())},Fraction:function(a){return a},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Object:function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var BE="matrix",zP=["typed","Matrix","DenseMatrix","SparseMatrix"],Kc=C(BE,zP,e=>{var{typed:t,Matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(BE,{"":function(){return i([])},string:function(l){return i([],l)},"string, string":function(l,u){return i([],l,u)},Array:function(l){return i(l)},Matrix:function(l){return i(l,l.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(o,l,u){if(l==="dense"||l==="default"||l===void 0)return new n(o,u);if(l==="sparse")return new a(o,u);throw new TypeError("Unknown matrix type "+JSON.stringify(l)+".")}});var LE="matrixFromFunction",GP=["typed","matrix","isZero"],wd=C(LE,GP,e=>{var{typed:t,matrix:r,isZero:n}=e;return t(LE,{"Array | Matrix, function, string, string":function(o,l,u,s){return a(o,l,u,s)},"Array | Matrix, function, string":function(o,l,u){return a(o,l,u)},"Matrix, function":function(o,l){return a(o,l,"dense")},"Array, function":function(o,l){return a(o,l,"dense").toArray()},"Array | Matrix, string, function":function(o,l,u){return a(o,u,l)},"Array | Matrix, string, string, function":function(o,l,u,s){return a(o,s,l,u)}});function a(i,o,l,u){var s;return u!==void 0?s=r(l,u):s=r(l),s.resize(i),s.forEach(function(c,p){var f=o(p);n(f)||s.set(p,f)}),s}});var PE="matrixFromRows",YP=["typed","matrix","flatten","size"],Dd=C(PE,YP,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(PE,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(s=>s.toArray())))}});function i(l){if(l.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var u=o(l[0]),s=[];for(var c of l){var p=o(c);if(p!==u)throw new TypeError("The vectors had different length: "+(u|0)+" \u2260 "+(p|0));s.push(n(c))}return s}function o(l){var u=a(l);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}});var UE="matrixFromColumns",jP=["typed","matrix","flatten","size"],Sd=C(UE,jP,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(UE,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(s=>s.toArray())))}});function i(l){if(l.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var u=o(l[0]),s=[],c=0;c{var{typed:t}=e;return t(kE,{"Unit, Array":function(n,a){return n.splitUnit(a)}})});var qE="unaryMinus",$P=["typed"],Wc=C(qE,$P,e=>{var{typed:t}=e;return t(qE,{number:Nm,"Complex | BigNumber | Fraction":r=>r.neg(),Unit:t.referToSelf(r=>n=>{var a=n.clone();return a.value=t.find(r,a.valueType())(n.value),a}),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r,!0))})});var HE="unaryPlus",XP=["typed","config","BigNumber"],_d=C(HE,XP,e=>{var{typed:t,config:r,BigNumber:n}=e;return t(HE,{number:Tm,Complex:function(i){return i},BigNumber:function(i){return i},Fraction:function(i){return i},Unit:function(i){return i.clone()},"Array | Matrix":t.referToSelf(a=>i=>Pe(i,a,!0)),"boolean | string":function(i){return r.number==="BigNumber"?new n(+i):+i}})});var zE="abs",KP=["typed"],Qc=C(zE,KP,e=>{var{typed:t}=e;return t(zE,{number:bm,"Complex | BigNumber | Fraction | Unit":r=>r.abs(),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r,!0))})});var GE="apply",WP=["typed","isInteger"],ii=C(GE,WP,e=>{var{typed:t,isInteger:r}=e;return t(GE,{"Array | Matrix, number | BigNumber, function":function(a,i,o){if(!r(i))throw new TypeError("Integer number expected for dimension");var l=Array.isArray(a)?Ge(a):a.size();if(i<0||i>=l.length)throw new nr(i,l.length);return Fe(a)?a.create(Zc(a.valueOf(),i,o)):Zc(a,i,o)}})});function Zc(e,t,r){var n,a,i;if(t<=0)if(Array.isArray(e[0])){for(i=QP(e),a=[],n=0;n{var{typed:t}=e;return t(YE,{"number, number":ym,"Complex, Complex":function(n,a){return n.add(a)},"BigNumber, BigNumber":function(n,a){return n.plus(a)},"Fraction, Fraction":function(n,a){return n.add(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})});var jE="subtractScalar",JP=["typed"],el=C(jE,JP,e=>{var{typed:t}=e;return t(jE,{"number, number":Em,"Complex, Complex":function(n,a){return n.sub(a)},"BigNumber, BigNumber":function(n,a){return n.minus(a)},"Fraction, Fraction":function(n,a){return n.sub(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})});var VE="cbrt",e5=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],Md=C(VE,e5,e=>{var{config:t,typed:r,isNegative:n,unaryMinus:a,matrix:i,Complex:o,BigNumber:l,Fraction:u}=e;return r(VE,{number:ji,Complex:s,"Complex, boolean":s,BigNumber:function(f){return f.cbrt()},Unit:c});function s(p,f){var m=p.arg()/3,h=p.abs(),d=new o(ji(h),0).mul(new o(0,m).exp());if(f){var v=[d,new o(ji(h),0).mul(new o(0,m+Math.PI*2/3).exp()),new o(ji(h),0).mul(new o(0,m-Math.PI*2/3).exp())];return t.matrix==="Array"?v:i(v)}else return d}function c(p){if(p.value&&Zt(p.value)){var f=p.clone();return f.value=1,f=f.pow(1/3),f.value=s(p.value),f}else{var m=n(p.value);m&&(p.value=a(p.value));var h;Ue(p.value)?h=new l(1).div(3):$r(p.value)?h=new u(1,3):h=1/3;var d=p.pow(h);return m&&(d.value=a(d.value)),d}}});var t5="matAlgo11xS0s",r5=["typed","equalScalar"],gt=C(t5,r5,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,l){var u=a._values,s=a._index,c=a._ptr,p=a._size,f=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var m=p[0],h=p[1],d,v=r,x=0,N=o;typeof f=="string"&&(d=f,v=t.find(r,[d,d]),x=t.convert(0,d),i=t.convert(i,d),N=t.find(o,[d,d]));for(var g=[],y=[],E=[],b=0;b{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,l){var u=a._values,s=a._index,c=a._ptr,p=a._size,f=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var m=p[0],h=p[1],d,v=o;typeof f=="string"&&(d=f,i=t.convert(i,d),v=t.find(o,[d,d]));for(var x=[],N=[],g=[],y=0;y{var{typed:t}=e;return function(a,i,o,l){var u=a._data,s=a._size,c=a._datatype,p,f=o;typeof c=="string"&&(p=c,i=t.convert(i,p),f=t.find(o,[p,p]));var m=s.length>0?r(f,0,s,s[0],u,i,l):[];return a.createDenseMatrix({data:m,size:qe(s),datatype:p})};function r(n,a,i,o,l,u,s){var c=[];if(a===i.length-1)for(var p=0;p{var{typed:t,config:r,round:n}=e;return t(Od,{number:function(i){return Pt(i,n(i),r.epsilon)?n(i):Math.ceil(i)},"number, number":function(i,o){if(Pt(i,n(i,o),r.epsilon))return n(i,o);var[l,u]="".concat(i,"e").split("e"),s=Math.ceil(Number("".concat(l,"e").concat(Number(u)+o)));return[l,u]="".concat(s,"e").split("e"),Number("".concat(l,"e").concat(Number(u)-o))}})}),Rd=C(Od,s5,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:l}=e,u=gt({typed:t,equalScalar:i}),s=lt({typed:t,DenseMatrix:l}),c=Gt({typed:t}),p=u5({typed:t,config:r,round:n});return t("ceil",{number:p.signatures.number,"number,number":p.signatures["number,number"],Complex:function(m){return m.ceil()},"Complex, number":function(m,h){return m.ceil(h)},"Complex, BigNumber":function(m,h){return m.ceil(h.toNumber())},BigNumber:function(m){return Xt(m,n(m),r.epsilon)?n(m):m.ceil()},"BigNumber, BigNumber":function(m,h){return Xt(m,n(m,h),r.epsilon)?n(m,h):m.toDecimalPlaces(h.toNumber(),ei.ROUND_CEIL)},Fraction:function(m){return m.ceil()},"Fraction, number":function(m,h){return m.ceil(h)},"Fraction, BigNumber":function(m,h){return m.ceil(h.toNumber())},"Array | Matrix":t.referToSelf(f=>m=>Pe(m,f,!0)),"Array, number | BigNumber":t.referToSelf(f=>(m,h)=>Pe(m,d=>f(d,h),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>u(m,h,f,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>c(m,h,f,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(f=>(m,h)=>c(a(h),m,f,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(f=>(m,h)=>i(m,0)?o(h.size(),h.storage()):h.storage()==="dense"?c(h,m,f,!0):s(h,m,f,!0))})});var $E="cube",c5=["typed"],Fd=C($E,c5,e=>{var{typed:t}=e;return t($E,{number:wm,Complex:function(n){return n.mul(n).mul(n)},BigNumber:function(n){return n.times(n).times(n)},Fraction:function(n){return n.pow(3)},Unit:function(n){return n.pow(3)}})});var XE="exp",l5=["typed"],Id=C(XE,l5,e=>{var{typed:t}=e;return t(XE,{number:Dm,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})});var KE="expm1",p5=["typed","Complex"],Bd=C(KE,p5,e=>{var{typed:t,Complex:r}=e;return t(KE,{number:Sm,Complex:function(a){var i=Math.exp(a.re);return new r(i*Math.cos(a.im)-1,i*Math.sin(a.im))},BigNumber:function(a){return a.exp().minus(1)}})});var Ld="fix",f5=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],m5=C(Ld,["typed","ceil","floor"],e=>{var{typed:t,ceil:r,floor:n}=e;return t(Ld,{number:function(i){return i>0?n(i):r(i)},"number, number":function(i,o){return i>0?n(i,o):r(i,o)}})}),Pd=C(Ld,f5,e=>{var{typed:t,Complex:r,matrix:n,ceil:a,floor:i,equalScalar:o,zeros:l,DenseMatrix:u}=e,s=lt({typed:t,DenseMatrix:u}),c=Gt({typed:t}),p=m5({typed:t,ceil:a,floor:i});return t("fix",{number:p.signatures.number,"number, number | BigNumber":p.signatures["number,number"],Complex:function(m){return new r(m.re>0?Math.floor(m.re):Math.ceil(m.re),m.im>0?Math.floor(m.im):Math.ceil(m.im))},"Complex, number":function(m,h){return new r(m.re>0?i(m.re,h):a(m.re,h),m.im>0?i(m.im,h):a(m.im,h))},"Complex, BigNumber":function(m,h){var d=h.toNumber();return new r(m.re>0?i(m.re,d):a(m.re,d),m.im>0?i(m.im,d):a(m.im,d))},BigNumber:function(m){return m.isNegative()?a(m):i(m)},"BigNumber, number | BigNumber":function(m,h){return m.isNegative()?a(m,h):i(m,h)},Fraction:function(m){return m.s<0?m.ceil():m.floor()},"Fraction, number | BigNumber":function(m,h){return m.s<0?a(m,h):i(m,h)},"Array | Matrix":t.referToSelf(f=>m=>Pe(m,f,!0)),"Array | Matrix, number | BigNumber":t.referToSelf(f=>(m,h)=>Pe(m,d=>f(d,h),!0)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(f=>(m,h)=>c(n(h),m,f,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(f=>(m,h)=>o(m,0)?l(h.size(),h.storage()):h.storage()==="dense"?c(h,m,f,!0):s(h,m,f,!0))})});var Ud="floor",d5=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],h5=C(Ud,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;return t(Ud,{number:function(i){return Pt(i,n(i),r.epsilon)?n(i):Math.floor(i)},"number, number":function(i,o){if(Pt(i,n(i,o),r.epsilon))return n(i,o);var[l,u]="".concat(i,"e").split("e"),s=Math.floor(Number("".concat(l,"e").concat(Number(u)+o)));return[l,u]="".concat(s,"e").split("e"),Number("".concat(l,"e").concat(Number(u)-o))}})}),ps=C(Ud,d5,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:l}=e,u=gt({typed:t,equalScalar:i}),s=lt({typed:t,DenseMatrix:l}),c=Gt({typed:t}),p=h5({typed:t,config:r,round:n});return t("floor",{number:p.signatures.number,"number,number":p.signatures["number,number"],Complex:function(m){return m.floor()},"Complex, number":function(m,h){return m.floor(h)},"Complex, BigNumber":function(m,h){return m.floor(h.toNumber())},BigNumber:function(m){return Xt(m,n(m),r.epsilon)?n(m):m.floor()},"BigNumber, BigNumber":function(m,h){return Xt(m,n(m,h),r.epsilon)?n(m,h):m.toDecimalPlaces(h.toNumber(),ei.ROUND_FLOOR)},Fraction:function(m){return m.floor()},"Fraction, number":function(m,h){return m.floor(h)},"Fraction, BigNumber":function(m,h){return m.floor(h.toNumber())},"Array | Matrix":t.referToSelf(f=>m=>Pe(m,f,!0)),"Array, number | BigNumber":t.referToSelf(f=>(m,h)=>Pe(m,d=>f(d,h),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>u(m,h,f,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>c(m,h,f,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(f=>(m,h)=>c(a(h),m,f,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(f=>(m,h)=>i(m,0)?o(h.size(),h.storage()):h.storage()==="dense"?c(h,m,f,!0):s(h,m,f,!0))})});var v5="matAlgo02xDS0",g5=["typed","equalScalar"],Yt=C(v5,g5,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,l){var u=a._data,s=a._size,c=a._datatype||a.getDataType(),p=i._values,f=i._index,m=i._ptr,h=i._size,d=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(s.length!==h.length)throw new Ve(s.length,h.length);if(s[0]!==h[0]||s[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+h+")");if(!p)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var v=s[0],x=s[1],N,g=r,y=0,E=o;typeof c=="string"&&c===d&&c!=="mixed"&&(N=c,g=t.find(r,[N,N]),y=t.convert(0,N),E=t.find(o,[N,N]));for(var b=[],S=[],A=[],w=0;w{var{typed:t}=e;return function(n,a,i,o){var l=n._data,u=n._size,s=n._datatype||n.getDataType(),c=a._values,p=a._index,f=a._ptr,m=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==m.length)throw new Ve(u.length,m.length);if(u[0]!==m[0]||u[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+m+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=u[0],v=u[1],x,N=0,g=i;typeof s=="string"&&s===h&&s!=="mixed"&&(x=s,N=t.convert(0,x),g=t.find(i,[x,x]));for(var y=[],E=0;E{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._index,s=a._ptr,c=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType(),f=i._values,m=i._index,h=i._ptr,d=i._size,v=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new Ve(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");var x=c[0],N=c[1],g,y=r,E=0,b=o;typeof p=="string"&&p===v&&p!=="mixed"&&(g=p,y=t.find(r,[g,g]),E=t.convert(0,g),b=t.find(o,[g,g]));var S=l&&f?[]:void 0,A=[],w=[],D=S?[]:void 0,F=S?[]:void 0,R=[],P=[],U,k,M,_;for(k=0;k{var{typed:t}=e;return function(a,i,o){var l=a._data,u=a._size,s=a._datatype,c=i._data,p=i._size,f=i._datatype,m=[];if(u.length!==p.length)throw new Ve(u.length,p.length);for(var h=0;h0?r(v,0,m,m[0],l,c):[];return a.createDenseMatrix({data:x,size:m,datatype:d})};function r(n,a,i,o,l,u){var s=[];if(a===i.length-1)for(var c=0;c{var{concat:t}=e;return function(a,i){var o=Math.max(a._size.length,i._size.length);if(a._size.length===i._size.length&&a._size.every((h,d)=>h===i._size[d]))return[a,i];for(var l=r(a._size,o,0),u=r(i._size,o,0),s=[],c=0;c{var{typed:t,matrix:r,concat:n}=e,a=WE({typed:t}),i=Gt({typed:t}),o=QE({concat:n});return function(u){var s=u.elop,c=u.SD||u.DS,p;s?(p={"DenseMatrix, DenseMatrix":(d,v)=>a(...o(d,v),s),"Array, Array":(d,v)=>a(...o(r(d),r(v)),s).valueOf(),"Array, DenseMatrix":(d,v)=>a(...o(r(d),v),s),"DenseMatrix, Array":(d,v)=>a(...o(d,r(v)),s)},u.SS&&(p["SparseMatrix, SparseMatrix"]=(d,v)=>u.SS(...o(d,v),s,!1)),u.DS&&(p["DenseMatrix, SparseMatrix"]=(d,v)=>u.DS(...o(d,v),s,!1),p["Array, SparseMatrix"]=(d,v)=>u.DS(...o(r(d),v),s,!1)),c&&(p["SparseMatrix, DenseMatrix"]=(d,v)=>c(...o(v,d),s,!0),p["SparseMatrix, Array"]=(d,v)=>c(...o(r(v),d),s,!0))):(p={"DenseMatrix, DenseMatrix":t.referToSelf(d=>(v,x)=>a(...o(v,x),d)),"Array, Array":t.referToSelf(d=>(v,x)=>a(...o(r(v),r(x)),d).valueOf()),"Array, DenseMatrix":t.referToSelf(d=>(v,x)=>a(...o(r(v),x),d)),"DenseMatrix, Array":t.referToSelf(d=>(v,x)=>a(...o(v,r(x)),d))},u.SS&&(p["SparseMatrix, SparseMatrix"]=t.referToSelf(d=>(v,x)=>u.SS(...o(v,x),d,!1))),u.DS&&(p["DenseMatrix, SparseMatrix"]=t.referToSelf(d=>(v,x)=>u.DS(...o(v,x),d,!1)),p["Array, SparseMatrix"]=t.referToSelf(d=>(v,x)=>u.DS(...o(r(v),x),d,!1))),c&&(p["SparseMatrix, DenseMatrix"]=t.referToSelf(d=>(v,x)=>c(...o(x,v),d,!0)),p["SparseMatrix, Array"]=t.referToSelf(d=>(v,x)=>c(...o(r(x),v),d,!0))));var f=u.scalar||"any",m=u.Ds||u.Ss;m&&(s?(p["DenseMatrix,"+f]=(d,v)=>i(d,v,s,!1),p[f+", DenseMatrix"]=(d,v)=>i(v,d,s,!0),p["Array,"+f]=(d,v)=>i(r(d),v,s,!1).valueOf(),p[f+", Array"]=(d,v)=>i(r(v),d,s,!0).valueOf()):(p["DenseMatrix,"+f]=t.referToSelf(d=>(v,x)=>i(v,x,d,!1)),p[f+", DenseMatrix"]=t.referToSelf(d=>(v,x)=>i(x,v,d,!0)),p["Array,"+f]=t.referToSelf(d=>(v,x)=>i(r(v),x,d,!1).valueOf()),p[f+", Array"]=t.referToSelf(d=>(v,x)=>i(r(x),v,d,!0).valueOf())));var h=u.sS!==void 0?u.sS:u.Ss;return s?(u.Ss&&(p["SparseMatrix,"+f]=(d,v)=>u.Ss(d,v,s,!1)),h&&(p[f+", SparseMatrix"]=(d,v)=>h(v,d,s,!0))):(u.Ss&&(p["SparseMatrix,"+f]=t.referToSelf(d=>(v,x)=>u.Ss(v,x,d,!1))),h&&(p[f+", SparseMatrix"]=t.referToSelf(d=>(v,x)=>h(x,v,d,!0)))),s&&s.signatures&&pc(p,s.signatures),p}});var ZE="mod",C5=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],fs=C(ZE,C5,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:l,concat:u}=e,s=ps({typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:l}),c=Yt({typed:t,equalScalar:i}),p=wt({typed:t}),f=Da({typed:t,equalScalar:i}),m=gt({typed:t,equalScalar:i}),h=lt({typed:t,DenseMatrix:l}),d=We({typed:t,matrix:a,concat:u});return t(ZE,{"number, number":v,"BigNumber, BigNumber":function(N,g){return g.isZero()?N:N.sub(g.mul(s(N.div(g))))},"Fraction, Fraction":function(N,g){return g.equals(0)?N:N.sub(g.mul(s(N.div(g))))}},d({SS:f,DS:p,SD:c,Ss:m,sS:h}));function v(x,N){return N===0?x:x-N*s(x/N)}});var _5="matAlgo01xDSid",M5=["typed"],xr=C(_5,M5,e=>{var{typed:t}=e;return function(n,a,i,o){var l=n._data,u=n._size,s=n._datatype||n.getDataType(),c=a._values,p=a._index,f=a._ptr,m=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==m.length)throw new Ve(u.length,m.length);if(u[0]!==m[0]||u[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+m+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=u[0],v=u[1],x=typeof s=="string"&&s!=="mixed"&&s===h?s:void 0,N=x?t.find(i,[x,x]):i,g,y,E=[];for(g=0;g{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._index,s=a._ptr,c=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType(),f=i._values,m=i._index,h=i._ptr,d=i._size,v=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new Ve(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");var x=c[0],N=c[1],g,y=r,E=0,b=o;typeof p=="string"&&p===v&&p!=="mixed"&&(g=p,y=t.find(r,[g,g]),E=t.convert(0,g),b=t.find(o,[g,g]));var S=l&&f?[]:void 0,A=[],w=[],D=l&&f?[]:void 0,F=l&&f?[]:void 0,R=[],P=[],U,k,M,_,q;for(k=0;k{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,l){var u=a._values,s=a._index,c=a._ptr,p=a._size,f=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var m=p[0],h=p[1],d,v=o;typeof f=="string"&&(d=f,i=t.convert(i,d),v=t.find(o,[d,d]));for(var x=[],N=[],g=[],y=0;yArray.isArray(t))}var qd=C(JE,B5,e=>{var{typed:t,matrix:r,config:n,round:a,equalScalar:i,zeros:o,BigNumber:l,DenseMatrix:u,concat:s}=e,c=fs({typed:t,config:n,round:a,matrix:r,equalScalar:i,zeros:o,DenseMatrix:u,concat:s}),p=xr({typed:t}),f=Xi({typed:t,equalScalar:i}),m=Lr({typed:t,DenseMatrix:u}),h=We({typed:t,matrix:r,concat:s});return t(JE,{"number, number":d,"BigNumber, BigNumber":v,"Fraction, Fraction":(x,N)=>x.gcd(N)},h({SS:f,DS:p,Ss:m}),{[L5]:t.referToSelf(x=>(N,g,y)=>{for(var E=x(N,g),b=0;bN=>{if(N.length===1&&Array.isArray(N[0])&&eA(N[0]))return x(...N[0]);if(eA(N))return x(...N);throw new Wr("gcd() supports only 1d matrices!")}),Matrix:t.referToSelf(x=>N=>x(N.toArray()))});function d(x,N){if(!Re(x)||!Re(N))throw new Error("Parameters in function gcd must be integer numbers");for(var g;N!==0;)g=c(x,N),x=N,N=g;return x<0?-x:x}function v(x,N){if(!x.isInt()||!N.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var g=new l(0);!N.isZero();){var y=c(x,N);x=N,N=y}return x.lt(g)?x.neg():x}});var P5="matAlgo06xS0S0",U5=["typed","equalScalar"],Sa=C(P5,U5,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._size,s=a._datatype||a._data===void 0?a._datatype:a.getDataType(),c=i._values,p=i._size,f=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(u.length!==p.length)throw new Ve(u.length,p.length);if(u[0]!==p[0]||u[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+p+")");var m=u[0],h=u[1],d,v=r,x=0,N=o;typeof s=="string"&&s===f&&s!=="mixed"&&(d=s,v=t.find(r,[d,d]),x=t.convert(0,d),N=t.find(o,[d,d]));for(var g=l&&c?[]:void 0,y=[],E=[],b=g?[]:void 0,S=[],A=[],w=0;w{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=Yt({typed:t,equalScalar:n}),o=Sa({typed:t,equalScalar:n}),l=gt({typed:t,equalScalar:n}),u=We({typed:t,matrix:r,concat:a}),s="number | BigNumber | Fraction | Matrix | Array",c={};return c["".concat(s,", ").concat(s,", ...").concat(s)]=t.referToSelf(f=>(m,h,d)=>{for(var v=f(m,h),x=0;xf.lcm(m)},u({SS:o,DS:i,Ss:l}),c);function p(f,m){if(!f.isInt()||!m.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(f.isZero())return f;if(m.isZero())return m;for(var h=f.times(m);!m.isZero();){var d=m;m=f.mod(d),f=d}return h.div(f).abs()}});var rA="log10",q5=["typed","config","Complex"],zd=C(rA,q5,e=>{var{typed:t,config:r,Complex:n}=e;return t(rA,{number:function(i){return i>=0||r.predictable?_m(i):new n(i,0).log().div(Math.LN10)},Complex:function(i){return new n(i).log().div(Math.LN10)},BigNumber:function(i){return!i.isNegative()||r.predictable?i.log():new n(i.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":t.referToSelf(a=>i=>Pe(i,a))})});var nA="log2",H5=["typed","config","Complex"],Gd=C(nA,H5,e=>{var{typed:t,config:r,Complex:n}=e;return t(nA,{number:function(o){return o>=0||r.predictable?Mm(o):a(new n(o,0))},Complex:a,BigNumber:function(o){return!o.isNegative()||r.predictable?o.log(2):a(new n(o.toNumber(),0))},"Array | Matrix":t.referToSelf(i=>o=>Pe(o,i))});function a(i){var o=Math.sqrt(i.re*i.re+i.im*i.im);return new n(Math.log2?Math.log2(o):Math.log(o)/Math.LN2,Math.atan2(i.im,i.re)/Math.LN2)}});var z5="multiplyScalar",G5=["typed"],tl=C(z5,G5,e=>{var{typed:t}=e;return t("multiplyScalar",{"number, number":Am,"Complex, Complex":function(n,a){return n.mul(a)},"BigNumber, BigNumber":function(n,a){return n.times(a)},"Fraction, Fraction":function(n,a){return n.mul(a)},"number | Fraction | BigNumber | Complex, Unit":(r,n)=>n.multiply(r),"Unit, number | Fraction | BigNumber | Complex | Unit":(r,n)=>r.multiply(n)})});var aA="multiply",Y5=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],rl=C(aA,Y5,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,equalScalar:i,dot:o}=e,l=gt({typed:t,equalScalar:i}),u=Gt({typed:t});function s(E,b){switch(E.length){case 1:switch(b.length){case 1:if(E[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(E[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+E[0]+") must match Matrix rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;case 2:switch(b.length){case 1:if(E[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+E[1]+") must match Vector length ("+b[0]+")");break;case 2:if(E[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+E[1]+") must match Matrix B rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+E.length+" dimensions)")}}function c(E,b,S){if(S===0)throw new Error("Cannot multiply two empty vectors");return o(E,b)}function p(E,b){if(b.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return f(E,b)}function f(E,b){var S=E._data,A=E._size,w=E._datatype||E.getDataType(),D=b._data,F=b._size,R=b._datatype||b.getDataType(),P=A[0],U=F[1],k,M=n,_=a;w&&R&&w===R&&typeof w=="string"&&w!=="mixed"&&(k=w,M=t.find(n,[k,k]),_=t.find(a,[k,k]));for(var q=[],B=0;BI)for(var H=0,ae=0;ae(b,S)=>{s(Ge(b),Ge(S));var A=E(r(b),r(S));return Fe(A)?A.valueOf():A}),"Matrix, Matrix":function(b,S){var A=b.size(),w=S.size();return s(A,w),A.length===1?w.length===1?c(b,S,A[0]):p(b,S):w.length===1?m(b,S):h(b,S)},"Matrix, Array":t.referTo("Matrix,Matrix",E=>(b,S)=>E(b,r(S))),"Array, Matrix":t.referToSelf(E=>(b,S)=>E(r(b,S.storage()),S)),"SparseMatrix, any":function(b,S){return l(b,S,a,!1)},"DenseMatrix, any":function(b,S){return u(b,S,a,!1)},"any, SparseMatrix":function(b,S){return l(S,b,a,!0)},"any, DenseMatrix":function(b,S){return u(S,b,a,!0)},"Array, any":function(b,S){return u(r(b),S,a,!1).valueOf()},"any, Array":function(b,S){return u(r(S),b,a,!0).valueOf()},"any, any":a,"any, any, ...any":t.referToSelf(E=>(b,S,A)=>{for(var w=E(b,S),D=0;D{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,concat:i}=e,o=xr({typed:t}),l=Yt({typed:t,equalScalar:n}),u=Sa({typed:t,equalScalar:n}),s=gt({typed:t,equalScalar:n}),c=We({typed:t,matrix:r,concat:i});function p(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return t(iA,{number:Om,"number, number":Om,BigNumber:m=>f(m,new a(2)),"BigNumber, BigNumber":f,Complex:p,"Complex, number":p,Array:t.referTo("DenseMatrix,number",m=>h=>m(r(h),2).valueOf()),DenseMatrix:t.referTo("DenseMatrix,number",m=>h=>m(h,2)),SparseMatrix:t.referTo("SparseMatrix,number",m=>h=>m(h,2)),"SparseMatrix, SparseMatrix":t.referToSelf(m=>(h,d)=>{if(d.density()===1)return u(h,d,m);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":t.referToSelf(m=>(h,d)=>{if(d.density()===1)return o(h,d,m,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":t.referTo("DenseMatrix,SparseMatrix",m=>(h,d)=>m(r(h),d)),"number | BigNumber, SparseMatrix":t.referToSelf(m=>(h,d)=>{if(d.density()===1)return s(d,h,m,!0);throw new Error("Root must be non-zero")})},c({scalar:"number | BigNumber",SD:l,Ss:s,sS:!1}));function f(m,h){var d=a.precision,v=a.clone({precision:d+2}),x=new a(0),N=new v(1),g=h.isNegative();if(g&&(h=h.neg()),h.isZero())throw new Error("Root must be non-zero");if(m.isNegative()&&!h.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(m.isZero())return g?new v(1/0):0;if(!m.isFinite())return g?x:m;var y=m.abs().pow(N.div(h));return y=m.isNeg()?y.neg():y,new a((g?N.div(y):y).toPrecision(d))}});var oA="sign",V5=["typed","BigNumber","Fraction","complex"],jd=C(oA,V5,e=>{var{typed:t,BigNumber:r,complex:n,Fraction:a}=e;return t(oA,{number:Hc,Complex:function(o){return o.im===0?n(Hc(o.re)):o.sign()},BigNumber:function(o){return new r(o.cmp(0))},Fraction:function(o){return new a(o.s,1)},"Array | Matrix":t.referToSelf(i=>o=>Pe(o,i,!0)),Unit:t.referToSelf(i=>o=>{if(!o._isDerived()&&o.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return t.find(i,o.valueType())(o.value)})})});var $5="sqrt",X5=["config","typed","Complex"],Vd=C($5,X5,e=>{var{config:t,typed:r,Complex:n}=e;return r("sqrt",{number:a,Complex:function(o){return o.sqrt()},BigNumber:function(o){return!o.isNegative()||t.predictable?o.sqrt():a(o.toNumber())},Unit:function(o){return o.pow(.5)}});function a(i){return isNaN(i)?NaN:i>=0||t.predictable?Math.sqrt(i):new n(i,0).sqrt()}});var sA="square",K5=["typed"],$d=C(sA,K5,e=>{var{typed:t}=e;return t(sA,{number:Rm,Complex:function(n){return n.mul(n)},BigNumber:function(n){return n.times(n)},Fraction:function(n){return n.mul(n)},Unit:function(n){return n.pow(2)}})});var uA="subtract",W5=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],nl=C(uA,W5,e=>{var{typed:t,matrix:r,equalScalar:n,subtractScalar:a,unaryMinus:i,DenseMatrix:o,concat:l}=e,u=xr({typed:t}),s=wt({typed:t}),c=Da({typed:t,equalScalar:n}),p=Lr({typed:t,DenseMatrix:o}),f=lt({typed:t,DenseMatrix:o}),m=We({typed:t,matrix:r,concat:l});return t(uA,{"any, any":a},m({elop:a,SS:c,DS:u,SD:s,Ss:f,sS:p}))});var cA="xgcd",Q5=["typed","config","matrix","BigNumber"],Xd=C(cA,Q5,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(cA,{"number, number":function(l,u){var s=Fm(l,u);return r.matrix==="Array"?s:n(s)},"BigNumber, BigNumber":i});function i(o,l){var u,s,c,p=new a(0),f=new a(1),m=p,h=f,d=f,v=p;if(!o.isInt()||!l.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!l.isZero();)s=o.div(l).floor(),c=o.mod(l),u=m,m=h.minus(s.times(m)),h=u,u=d,d=v.minus(s.times(d)),v=u,o=l,l=c;var x;return o.lt(p)?x=[o.neg(),h.neg(),v.neg()]:x=[o,o.isZero()?0:h,v],r.matrix==="Array"?x:n(x)}});var lA="invmod",Z5=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],Kd=C(lA,Z5,e=>{var{typed:t,config:r,BigNumber:n,xgcd:a,equal:i,smaller:o,mod:l,add:u,isInteger:s}=e;return t(lA,{"number, number":c,"BigNumber, BigNumber":c});function c(p,f){if(!s(p)||!s(f))throw new Error("Parameters in function invmod must be integer numbers");if(p=l(p,f),i(f,0))throw new Error("Divisor must be non zero");var m=a(p,f);m=m.valueOf();var[h,d]=m;return i(h,n(1))?(d=l(d,f),o(d,n(0))&&(d=u(d,f)),d):NaN}});var J5="matAlgo09xS0Sf",e9=["typed","equalScalar"],al=C(J5,e9,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._index,s=a._ptr,c=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType(),f=i._values,m=i._index,h=i._ptr,d=i._size,v=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new Ve(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");var x=c[0],N=c[1],g,y=r,E=0,b=o;typeof p=="string"&&p===v&&p!=="mixed"&&(g=p,y=t.find(r,[g,g]),E=t.convert(0,g),b=t.find(o,[g,g]));var S=l&&f?[]:void 0,A=[],w=[],D=S?[]:void 0,F=[],R,P,U,k,M;for(P=0;P{var{typed:t,matrix:r,equalScalar:n,multiplyScalar:a,concat:i}=e,o=Yt({typed:t,equalScalar:n}),l=al({typed:t,equalScalar:n}),u=gt({typed:t,equalScalar:n}),s=We({typed:t,matrix:r,concat:i});return t(pA,s({elop:a,SS:l,DS:o,Ss:u}))});function fA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitAnd");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new r(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new r(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new r(0):e}return Qd(e,t,function(n,a){return n&a})}function Ki(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,r=t.precision;t.config({precision:1e9});var n=e.plus(new t(1));return n.s=-n.s||null,t.config({precision:r}),n}function mA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);var n=new r(-1);return e.isZero()||t.eq(n)||e.eq(t)?t:t.isZero()||e.eq(n)?e:!e.isFinite()||!t.isFinite()?!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?n:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e:Qd(e,t,function(a,i){return a|i})}function Qd(e,t,r){var n=e.constructor,a,i,o=+(e.s<0),l=+(t.s<0);if(o){a=il(Ki(e));for(var u=0;u0;)r(c[--m],p[--h])===d&&(v=v.plus(x)),x=x.times(N);for(;h>0;)r(f,p[--h])===d&&(v=v.plus(x)),x=x.times(N);return n.config({precision:g}),d===0&&(v.s=-v.s),v}function il(e){for(var t=e.d,r=t[0]+"",n=1;n0)if(++l>s)for(l-=s;l--;)u+="0";else l1&&((c[m+1]===null||c[m+1]===void 0)&&(c[m+1]=0),c[m+1]+=c[m]>>1,c[m]&=1)}return c.reverse()}function dA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitXor");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new r(0);var n=new r(-1);return e.eq(n)?Ki(t):t.eq(n)?Ki(e):!e.isFinite()||!t.isFinite()?!e.isFinite()&&!t.isFinite()?n:new r(e.isNegative()===t.isNegative()?1/0:-1/0):Qd(e,t,function(a,i){return a^i})}function hA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:!e.isFinite()&&!t.isFinite()?new r(NaN):t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new r(2).pow(t))}function vA(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new r(2).pow(t)).floor():e.isNegative()?new r(-1):e.isFinite()?new r(0):new r(NaN)}var gA="bitAnd",r9=["typed","matrix","equalScalar","concat"],ms=C(gA,r9,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=Yt({typed:t,equalScalar:n}),o=Sa({typed:t,equalScalar:n}),l=gt({typed:t,equalScalar:n}),u=We({typed:t,matrix:r,concat:a});return t(gA,{"number, number":Bm,"BigNumber, BigNumber":fA},u({SS:o,DS:i,Ss:l}))});var xA="bitNot",n9=["typed"],Zd=C(xA,n9,e=>{var{typed:t}=e;return t(xA,{number:Lm,BigNumber:Ki,"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var bA="bitOr",a9=["typed","matrix","equalScalar","DenseMatrix","concat"],ds=C(bA,a9,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=xr({typed:t}),l=Xi({typed:t,equalScalar:n}),u=Lr({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:r,concat:i});return t(bA,{"number, number":Pm,"BigNumber, BigNumber":mA},s({SS:l,DS:o,Ss:u}))});var i9="matAlgo07xSSf",o9=["typed","DenseMatrix"],Wt=C(i9,o9,e=>{var{typed:t,DenseMatrix:r}=e;return function(i,o,l){var u=i._size,s=i._datatype||i._data===void 0?i._datatype:i.getDataType(),c=o._size,p=o._datatype||o._data===void 0?o._datatype:o.getDataType();if(u.length!==c.length)throw new Ve(u.length,c.length);if(u[0]!==c[0]||u[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+c+")");var f=u[0],m=u[1],h,d=0,v=l;typeof s=="string"&&s===p&&s!=="mixed"&&(h=s,d=t.convert(0,h),v=t.find(l,[h,h]));var x,N,g=[];for(x=0;x{var{typed:t,matrix:r,DenseMatrix:n,concat:a}=e,i=wt({typed:t}),o=Wt({typed:t,DenseMatrix:n}),l=lt({typed:t,DenseMatrix:n}),u=We({typed:t,matrix:r,concat:a});return t(yA,{"number, number":Um,"BigNumber, BigNumber":dA},u({SS:o,DS:i,Ss:l}))});var EA="arg",u9=["typed"],eh=C(EA,u9,e=>{var{typed:t}=e;return t(EA,{number:function(n){return Math.atan2(0,n)},BigNumber:function(n){return n.constructor.atan2(0,n)},Complex:function(n){return n.arg()},"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var AA="conj",c9=["typed"],ol=C(AA,c9,e=>{var{typed:t}=e;return t(AA,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.conjugate(),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var NA="im",l9=["typed"],th=C(NA,l9,e=>{var{typed:t}=e;return t(NA,{number:()=>0,"BigNumber | Fraction":r=>r.mul(0),Complex:r=>r.im,"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var TA="re",p9=["typed"],rh=C(TA,p9,e=>{var{typed:t}=e;return t(TA,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.re,"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var wA="not",f9=["typed"],nh=C(wA,f9,e=>{var{typed:t}=e;return t(wA,{"null | undefined":()=>!0,number:Ym,Complex:function(n){return n.re===0&&n.im===0},BigNumber:function(n){return n.isZero()||n.isNaN()},Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Pe(n,r))})});var DA="or",m9=["typed","matrix","equalScalar","DenseMatrix","concat"],hs=C(DA,m9,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Da({typed:t,equalScalar:n}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:r,concat:i});return t(DA,{"number, number":jm,"Complex, Complex":function(p,f){return p.re!==0||p.im!==0||f.re!==0||f.im!==0},"BigNumber, BigNumber":function(p,f){return!p.isZero()&&!p.isNaN()||!f.isZero()&&!f.isNaN()},"Unit, Unit":t.referToSelf(c=>(p,f)=>c(p.value||0,f.value||0))},s({SS:l,DS:o,Ss:u}))});var SA="xor",d9=["typed","matrix","DenseMatrix","concat"],ah=C(SA,d9,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a}=e,i=wt({typed:t}),o=Wt({typed:t,DenseMatrix:n}),l=lt({typed:t,DenseMatrix:n}),u=We({typed:t,matrix:r,concat:a});return t(SA,{"number, number":Vm,"Complex, Complex":function(c,p){return(c.re!==0||c.im!==0)!=(p.re!==0||p.im!==0)},"BigNumber, BigNumber":function(c,p){return(!c.isZero()&&!c.isNaN())!=(!p.isZero()&&!p.isNaN())},"Unit, Unit":t.referToSelf(s=>(c,p)=>s(c.value||0,p.value||0))},u({SS:o,DS:i,Ss:l}))});var CA="concat",h9=["typed","matrix","isInteger"],Wi=C(CA,h9,e=>{var{typed:t,matrix:r,isInteger:n}=e;return t(CA,{"...Array | Matrix | number | BigNumber":function(i){var o,l=i.length,u=-1,s,c=!1,p=[];for(o=0;o0&&u>s)throw new nr(u,s+1)}else{var m=qe(f).valueOf(),h=Ge(m);if(p[o]=m,s=u,u=h.length-1,o>0&&u!==s)throw new Ve(s+1,u+1)}}if(p.length===0)throw new SyntaxError("At least one matrix expected");for(var d=p.shift();p.length;)d=hm(d,p.shift(),u);return c?r(d):d},"...string":function(i){return i.join("")}})});var _A="column",v9=["typed","Index","matrix","range"],vs=C(_A,v9,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(_A,{"Matrix, number":i,"Array, number":function(l,u){return i(n(qe(l)),u).valueOf()}});function i(o,l){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");vt(l,o.size()[1]);var u=a(0,o.size()[0]),s=new r(u,l),c=o.subset(s);return Fe(c)?c:n([[c]])}});var MA="count",g9=["typed","size","prod"],ih=C(MA,g9,e=>{var{typed:t,size:r,prod:n}=e;return t(MA,{string:function(i){return i.length},"Matrix | Array":function(i){return n(r(i))}})});var OA="cross",x9=["typed","matrix","subtract","multiply"],oh=C(OA,x9,e=>{var{typed:t,matrix:r,subtract:n,multiply:a}=e;return t(OA,{"Matrix, Matrix":function(l,u){return r(i(l.toArray(),u.toArray()))},"Matrix, Array":function(l,u){return r(i(l.toArray(),u))},"Array, Matrix":function(l,u){return r(i(l,u.toArray()))},"Array, Array":i});function i(o,l){var u=Math.max(Ge(o).length,Ge(l).length);o=zi(o),l=zi(l);var s=Ge(o),c=Ge(l);if(s.length!==1||c.length!==1||s[0]!==3||c[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+s.join(", ")+"], B = ["+c.join(", ")+"])");var p=[n(a(o[1],l[2]),a(o[2],l[1])),n(a(o[2],l[0]),a(o[0],l[2])),n(a(o[0],l[1]),a(o[1],l[0]))];return u>1?[p]:p}});var RA="diag",b9=["typed","matrix","DenseMatrix","SparseMatrix"],sh=C(RA,b9,e=>{var{typed:t,matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(RA,{Array:function(s){return i(s,0,Ge(s),null)},"Array, number":function(s,c){return i(s,c,Ge(s),null)},"Array, BigNumber":function(s,c){return i(s,c.toNumber(),Ge(s),null)},"Array, string":function(s,c){return i(s,0,Ge(s),c)},"Array, number, string":function(s,c,p){return i(s,c,Ge(s),p)},"Array, BigNumber, string":function(s,c,p){return i(s,c.toNumber(),Ge(s),p)},Matrix:function(s){return i(s,0,s.size(),s.storage())},"Matrix, number":function(s,c){return i(s,c,s.size(),s.storage())},"Matrix, BigNumber":function(s,c){return i(s,c.toNumber(),s.size(),s.storage())},"Matrix, string":function(s,c){return i(s,0,s.size(),c)},"Matrix, number, string":function(s,c,p){return i(s,c,s.size(),p)},"Matrix, BigNumber, string":function(s,c,p){return i(s,c.toNumber(),s.size(),p)}});function i(u,s,c,p){if(!Re(s))throw new TypeError("Second parameter in function diag must be an integer");var f=s>0?s:0,m=s<0?-s:0;switch(c.length){case 1:return o(u,s,p,c[0],m,f);case 2:return l(u,s,p,c,m,f)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function o(u,s,c,p,f,m){var h=[p+f,p+m];if(c&&c!=="sparse"&&c!=="dense")throw new TypeError("Unknown matrix type ".concat(c,'"'));var d=c==="sparse"?a.diagonal(h,u,s):n.diagonal(h,u,s);return c!==null?d:d.valueOf()}function l(u,s,c,p,f,m){if(Fe(u)){var h=u.diagonal(s);return c!==null?c!==h.storage()?r(h,c):h:h.valueOf()}for(var d=Math.min(p[0]-f,p[1]-m),v=[],x=0;x=2&&d.push("index: ".concat(ut(r))),m.length>=3&&d.push("array: ".concat(ut(n))),new TypeError("Function ".concat(a," cannot apply callback arguments ")+"".concat(e.name,"(").concat(d.join(", "),") at index ").concat(JSON.stringify(r)))}else throw new TypeError("Function ".concat(a," cannot apply callback arguments ")+"to function ".concat(e.name,": ").concat(v.message))}}}var y9="filter",E9=["typed"],uh=C(y9,E9,e=>{var{typed:t}=e;return t("filter",{"Array, function":FA,"Matrix, function":function(n,a){return n.create(FA(n.toArray(),a))},"Array, RegExp":Gi,"Matrix, RegExp":function(n,a){return n.create(Gi(n.toArray(),a))}})});function FA(e,t){return Bc(e,function(r,n,a){return fn(t,r,[n],a,"filter")})}var IA="flatten",A9=["typed","matrix"],ch=C(IA,A9,e=>{var{typed:t,matrix:r}=e;return t(IA,{Array:function(a){return Ze(a)},Matrix:function(a){var i=Ze(a.toArray());return r(i)}})});var BA="forEach",N9=["typed"],lh=C(BA,N9,e=>{var{typed:t}=e;return t(BA,{"Array, function":T9,"Matrix, function":function(n,a){n.forEach(a)}})});function T9(e,t){var r=function n(a,i){if(Array.isArray(a))Na(a,function(o,l){n(o,i.concat(l))});else return fn(t,a,i,e,"forEach")};r(e,[])}var LA="getMatrixDataType",w9=["typed"],ph=C(LA,w9,e=>{var{typed:t}=e;return t(LA,{Array:function(n){return Ta(n,ut)},Matrix:function(n){return n.getDataType()}})});var PA="identity",D9=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],sl=C(PA,D9,e=>{var{typed:t,config:r,matrix:n,BigNumber:a,DenseMatrix:i,SparseMatrix:o}=e;return t(PA,{"":function(){return r.matrix==="Matrix"?n([]):[]},string:function(c){return n(c)},"number | BigNumber":function(c){return u(c,c,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,p){return u(c,c,p)},"number | BigNumber, number | BigNumber":function(c,p){return u(c,p,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,p,f){return u(c,p,f)},Array:function(c){return l(c)},"Array, string":function(c,p){return l(c,p)},Matrix:function(c){return l(c.valueOf(),c.storage())},"Matrix, string":function(c,p){return l(c.valueOf(),p)}});function l(s,c){switch(s.length){case 0:return c?n(c):[];case 1:return u(s[0],s[0],c);case 2:return u(s[0],s[1],c);default:throw new Error("Vector containing two values expected")}}function u(s,c,p){var f=Ue(s)||Ue(c)?a:null;if(Ue(s)&&(s=s.toNumber()),Ue(c)&&(c=c.toNumber()),!Re(s)||s<1)throw new Error("Parameters in function identity must be positive integers");if(!Re(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var m=f?new a(1):1,h=f?new f(0):0,d=[s,c];if(p){if(p==="sparse")return o.diagonal(d,m,0,h);if(p==="dense")return i.diagonal(d,m,0,h);throw new TypeError('Unknown matrix type "'.concat(p,'"'))}for(var v=Sn([],d,h),x=s{var{typed:t,matrix:r,multiplyScalar:n}=e;return t(UA,{"Matrix, Matrix":function(o,l){return r(a(o.toArray(),l.toArray()))},"Matrix, Array":function(o,l){return r(a(o.toArray(),l))},"Array, Matrix":function(o,l){return r(a(o,l.toArray()))},"Array, Array":a});function a(i,o){if(Ge(i).length===1&&(i=[i]),Ge(o).length===1&&(o=[o]),Ge(i).length>2||Ge(o).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(i.length)+", y = "+JSON.stringify(o.length)+")");var l=[],u=[];return i.map(function(s){return o.map(function(c){return u=[],l.push(u),s.map(function(p){return c.map(function(f){return u.push(n(p,f))})})})})&&l}});var kA="map",C9=["typed"],mh=C(kA,C9,e=>{var{typed:t}=e;return t(kA,{"Array, function":_9,"Matrix, function":function(n,a){return n.map(a)}})});function _9(e,t){var r=function n(a,i){return Array.isArray(a)?a.map(function(o,l){return n(o,i.concat(l))}):fn(t,a,i,e,"map")};return r(e,[])}var qA="diff",M9=["typed","matrix","subtract","number"],xs=C(qA,M9,e=>{var{typed:t,matrix:r,subtract:n,number:a}=e;return t(qA,{"Array | Matrix":function(c){return Fe(c)?r(o(c.toArray())):o(c)},"Array | Matrix, number":function(c,p){if(!Re(p))throw new RangeError("Dimension must be a whole number");return Fe(c)?r(i(c.toArray(),p)):i(c,p)},"Array, BigNumber":t.referTo("Array,number",s=>(c,p)=>s(c,a(p))),"Matrix, BigNumber":t.referTo("Matrix,number",s=>(c,p)=>s(c,a(p)))});function i(s,c){if(Fe(s)&&(s=s.toArray()),!Array.isArray(s))throw RangeError("Array/Matrix does not have that many dimensions");if(c>0){var p=[];return s.forEach(f=>{p.push(i(f,c-1))}),p}else{if(c===0)return o(s);throw RangeError("Cannot have negative dimension")}}function o(s){for(var c=[],p=s.length,f=1;f{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t("ones",{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(s){var c=s[s.length-1];if(typeof c=="string"){var p=s.pop();return i(s,p)}else return r.matrix==="Array"?i(s):i(s,"default")},Array:i,Matrix:function(s){var c=s.storage();return i(s.valueOf(),c)},"Array | Matrix, string":function(s,c){return i(s.valueOf(),c)}});function i(u,s){var c=o(u),p=c?new a(1):1;if(l(u),s){var f=n(s);return u.length>0?f.resize(u,p):f}else{var m=[];return u.length>0?Sn(m,u,p):m}}function o(u){var s=!1;return u.forEach(function(c,p,f){Ue(c)&&(s=!0,f[p]=c.toNumber())}),s}function l(u){u.forEach(function(s){if(typeof s!="number"||!Re(s)||s<0)throw new Error("Parameters in function ones must be positive integers")})}});function Qi(){throw new Error('No "bignumber" implementation available')}function ul(){throw new Error('No "fraction" implementation available')}function cl(){throw new Error('No "matrix" implementation available')}var HA="range",F9=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],bs=C(HA,F9,e=>{var{typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:l,largerEq:u,add:s,isPositive:c}=e;return t(HA,{string:f,"string, boolean":f,"number, number":function(v,x){return p(m(v,x,1,!1))},"number, number, number":function(v,x,N){return p(m(v,x,N,!1))},"number, number, boolean":function(v,x,N){return p(m(v,x,1,N))},"number, number, number, boolean":function(v,x,N,g){return p(m(v,x,N,g))},"BigNumber, BigNumber":function(v,x){var N=v.constructor;return p(m(v,x,new N(1),!1))},"BigNumber, BigNumber, BigNumber":function(v,x,N){return p(m(v,x,N,!1))},"BigNumber, BigNumber, boolean":function(v,x,N){var g=v.constructor;return p(m(v,x,new g(1),N))},"BigNumber, BigNumber, BigNumber, boolean":function(v,x,N,g){return p(m(v,x,N,g))},"Unit, Unit, Unit":function(v,x,N){return p(m(v,x,N,!1))},"Unit, Unit, Unit, boolean":function(v,x,N,g){return p(m(v,x,N,g))}});function p(d){return r.matrix==="Matrix"?n?n(d):cl():d}function f(d,v){var x=h(d);if(!x)throw new SyntaxError('String "'+d+'" is no valid range');return r.number==="BigNumber"?(a===void 0&&Qi(),p(m(a(x.start),a(x.end),a(x.step)),v)):p(m(x.start,x.end,x.step,v))}function m(d,v,x,N){for(var g=[],y=c(x)?N?o:i:N?u:l,E=d;y(E,v);)g.push(E),E=s(E,x);return g}function h(d){var v=d.split(":"),x=v.map(function(g){return Number(g)}),N=x.some(function(g){return isNaN(g)});if(N)return null;switch(x.length){case 2:return{start:x[0],end:x[1],step:1};case 3:return{start:x[0],end:x[2],step:x[1]};default:return null}}});var zA="reshape",I9=["typed","isInteger","matrix"],hh=C(zA,I9,e=>{var{typed:t,isInteger:r}=e;return t(zA,{"Matrix, Array":function(a,i){return a.reshape(i,!0)},"Array, Array":function(a,i){return i.forEach(function(o){if(!r(o))throw new TypeError("Invalid size for dimension: "+o)}),is(a,i)}})});var B9="resize",L9=["config","matrix"],vh=C(B9,L9,e=>{var{config:t,matrix:r}=e;return function(i,o,l){if(arguments.length!==2&&arguments.length!==3)throw new Wr("resize",arguments.length,2,3);if(Fe(o)&&(o=o.valueOf()),Ue(o[0])&&(o=o.map(function(c){return Ue(c)?c.toNumber():c})),Fe(i))return i.resize(o,l,!0);if(typeof i=="string")return n(i,o,l);var u=Array.isArray(i)?!1:t.matrix!=="Array";if(o.length===0){for(;Array.isArray(i);)i=i[0];return qe(i)}else{Array.isArray(i)||(i=[i]),i=qe(i);var s=Sn(i,o,l);return u?r(s):s}};function n(a,i,o){if(o!==void 0){if(typeof o!="string"||o.length!==1)throw new TypeError("Single character expected as defaultValue")}else o=" ";if(i.length!==1)throw new Ve(i.length,1);var l=i[0];if(typeof l!="number"||!Re(l))throw new TypeError("Invalid size, must contain positive integers (size: "+je(i)+")");if(a.length>l)return a.substring(0,l);if(a.length{var{typed:t,multiply:r,rotationMatrix:n}=e;return t(GA,{"Array , number | BigNumber | Complex | Unit":function(o,l){a(o,2);var u=r(n(l),o);return u.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(o,l){return a(o,2),r(n(l),o)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(o,l,u){a(o,3);var s=r(n(l,u),o);return s},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(o,l,u){return a(o,3),r(n(l,u),o)}});function a(i,o){var l=Array.isArray(i)?Ge(i):i.size();if(l.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(l.length===2&&l[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(l[0]!==o)throw new RangeError("Vector must be of dimensions 1x".concat(o))}});var YA="rotationMatrix",U9=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],xh=C(YA,U9,e=>{var{typed:t,config:r,multiplyScalar:n,addScalar:a,unaryMinus:i,norm:o,BigNumber:l,matrix:u,DenseMatrix:s,SparseMatrix:c,cos:p,sin:f}=e;return t(YA,{"":function(){return r.matrix==="Matrix"?u([]):[]},string:function(g){return u(g)},"number | BigNumber | Complex | Unit":function(g){return m(g,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(g,y){return m(g,y)},"number | BigNumber | Complex | Unit, Array":function(g,y){var E=u(y);return h(E),x(g,E,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(g,y){h(y);var E=y.storage()||(r.matrix==="Matrix"?"dense":void 0);return x(g,y,E)},"number | BigNumber | Complex | Unit, Array, string":function(g,y,E){var b=u(y);return h(b),x(g,b,E)},"number | BigNumber | Complex | Unit, Matrix, string":function(g,y,E){return h(y),x(g,y,E)}});function m(N,g){var y=Ue(N),E=y?new l(-1):-1,b=p(N),S=f(N),A=[[b,n(E,S)],[S,b]];return v(A,g)}function h(N){var g=N.size();if(g.length<1||g[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function d(N){return N.reduce((g,y)=>n(g,y))}function v(N,g){if(g){if(g==="sparse")return new c(N);if(g==="dense")return new s(N);throw new TypeError('Unknown matrix type "'.concat(g,'"'))}return N}function x(N,g,y){var E=o(g);if(E===0)throw new RangeError("Rotation around zero vector");var b=Ue(N)?l:null,S=b?new b(1):1,A=b?new b(-1):-1,w=b?new b(g.get([0])/E):g.get([0])/E,D=b?new b(g.get([1])/E):g.get([1])/E,F=b?new b(g.get([2])/E):g.get([2])/E,R=p(N),P=a(S,i(R)),U=f(N),k=a(R,d([w,w,P])),M=a(d([w,D,P]),d([A,F,U])),_=a(d([w,F,P]),d([D,U])),q=a(d([w,D,P]),d([F,U])),B=a(R,d([D,D,P])),Z=a(d([D,F,P]),d([A,w,U])),te=a(d([w,F,P]),d([A,D,U])),Q=a(d([D,F,P]),d([w,U])),z=a(R,d([F,F,P])),re=[[k,M,_],[q,B,Z],[te,Q,z]];return v(re,y)}});var jA="row",k9=["typed","Index","matrix","range"],ys=C(jA,k9,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(jA,{"Matrix, number":i,"Array, number":function(l,u){return i(n(qe(l)),u).valueOf()}});function i(o,l){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");vt(l,o.size()[0]);var u=a(0,o.size()[1]),s=new r(l,u),c=o.subset(s);return Fe(c)?c:n([[c]])}});var VA="size",q9=["typed","config","?matrix"],ll=C(VA,q9,e=>{var{typed:t,config:r,matrix:n}=e;return t(VA,{Matrix:function(i){return i.create(i.size())},Array:Ge,string:function(i){return r.matrix==="Array"?[i.length]:n([i.length])},"number | Complex | BigNumber | Unit | boolean | null":function(i){return r.matrix==="Array"?[]:n?n([]):cl()}})});var $A="squeeze",H9=["typed","matrix"],bh=C($A,H9,e=>{var{typed:t,matrix:r}=e;return t($A,{Array:function(a){return zi(qe(a))},Matrix:function(a){var i=zi(a.toArray());return Array.isArray(i)?r(i):i},any:function(a){return qe(a)}})});var XA="subset",z9=["typed","matrix","zeros","add"],Es=C(XA,z9,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e;return t(XA,{"Matrix, Index":function(l,u){return ri(u)?r():(as(l,u),l.subset(u))},"Array, Index":t.referTo("Matrix, Index",function(o){return function(l,u){var s=o(r(l),u);return u.isScalar()?s:s.valueOf()}}),"Object, Index":Y9,"string, Index":G9,"Matrix, Index, any, any":function(l,u,s,c){return ri(u)?l:(as(l,u),l.clone().subset(u,i(s,u),c))},"Array, Index, any, any":t.referTo("Matrix, Index, any, any",function(o){return function(l,u,s,c){var p=o(r(l),u,s,c);return p.isMatrix?p.valueOf():p}}),"Array, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(l,u,s){return o(r(l),u,s,void 0).valueOf()}}),"Matrix, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(l,u,s){return o(l,u,s,void 0)}}),"string, Index, string":KA,"string, Index, string, string":KA,"Object, Index, any":j9});function i(o,l){if(typeof o=="string")throw new Error("can't boradcast a string");if(l._isScalar)return o;var u=l.size();if(u.every(s=>s>0))try{return a(o,n(u))}catch{return o}else return o}});function G9(e,t){if(!Un(t))throw new TypeError("Index expected");if(ri(t))return"";if(as(Array.from(e),t),t.size().length!==1)throw new Ve(t.size().length,1);var r=e.length;vt(t.min()[0],r),vt(t.max()[0],r);var n=t.dimension(0),a="";return n.forEach(function(i){a+=e.charAt(i)}),a}function KA(e,t,r,n){if(!t||t.isIndex!==!0)throw new TypeError("Index expected");if(ri(t))return e;if(as(Array.from(e),t),t.size().length!==1)throw new Ve(t.size().length,1);if(n!==void 0){if(typeof n!="string"||n.length!==1)throw new TypeError("Single character expected as defaultValue")}else n=" ";var a=t.dimension(0),i=a.size()[0];if(i!==r.length)throw new Ve(a.size()[0],r.length);var o=e.length;vt(t.min()[0]),vt(t.max()[0]);for(var l=[],u=0;uo)for(var s=o-1,c=l.length;s{var{typed:t,matrix:r}=e;return t(WA,{Array:o=>n(r(o)).valueOf(),Matrix:n,any:qe});function n(o){var l=o.size(),u;switch(l.length){case 1:u=o.clone();break;case 2:{var s=l[0],c=l[1];if(c===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+je(l)+")");switch(o.storage()){case"dense":u=a(o,s,c);break;case"sparse":u=i(o,s,c);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+je(l)+")")}return u}function a(o,l,u){for(var s=o._data,c=[],p,f=0;f{var{typed:t,transpose:r,conj:n}=e;return t(QA,{any:function(i){return n(r(i))}})});var ZA="zeros",X9=["typed","config","matrix","BigNumber"],pl=C(ZA,X9,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(ZA,{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(s){var c=s[s.length-1];if(typeof c=="string"){var p=s.pop();return i(s,p)}else return r.matrix==="Array"?i(s):i(s,"default")},Array:i,Matrix:function(s){var c=s.storage();return i(s.valueOf(),c)},"Array | Matrix, string":function(s,c){return i(s.valueOf(),c)}});function i(u,s){var c=o(u),p=c?new a(0):0;if(l(u),s){var f=n(s);return u.length>0?f.resize(u,p):f}else{var m=[];return u.length>0?Sn(m,u,p):m}}function o(u){var s=!1;return u.forEach(function(c,p,f){Ue(c)&&(s=!0,f[p]=c.toNumber())}),s}function l(u){u.forEach(function(s){if(typeof s!="number"||!Re(s)||s<0)throw new Error("Parameters in function zeros must be positive integers")})}});var JA="fft",K9=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],Ah=C(JA,K9,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,divideScalar:i,exp:o,tau:l,i:u,dotDivide:s,conj:c,pow:p,ceil:f,log2:m}=e;return t(JA,{Array:h,Matrix:function(g){return g.create(h(g.toArray()))}});function h(N){var g=Ge(N);return g.length===1?x(N,g[0]):d(N.map(y=>h(y,g.slice(1))),0)}function d(N,g){var y=Ge(N);if(g!==0)return new Array(y[0]).fill(0).map((b,S)=>d(N[S],g-1));if(y.length===1)return x(N);function E(b){var S=Ge(b);return new Array(S[1]).fill(0).map((A,w)=>new Array(S[0]).fill(0).map((D,F)=>b[F][w]))}return E(d(E(N),1))}function v(N){for(var g=N.length,y=o(i(a(-1,a(u,l)),g)),E=[],b=1-g;ba(N[_],E[g-1+_])),...new Array(S-g).fill(0)],w=[...new Array(g+g-1).fill(0).map((M,_)=>i(1,E[_])),...new Array(S-(g+g-1)).fill(0)],D=x(A),F=x(w),R=new Array(S).fill(0).map((M,_)=>a(D[_],F[_])),P=s(c(h(c(R))),S),U=[],k=g-1;kw%2===0),g/2),...x(N.filter((A,w)=>w%2===1),g/2)],E=0;E{var{typed:t,fft:r,dotDivide:n,conj:a}=e;return t(eN,{"Array | Matrix":function(o){var l=Fe(o)?o.size():Ge(o);return n(a(r(a(o))),l.reduce((u,s)=>u*s,1))}})});var iN=Le(ir(),1);function aN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function n7(e){for(var t=1;t{var{typed:t,add:r,subtract:n,multiply:a,divide:i,max:o,map:l,abs:u,isPositive:s,isNegative:c,larger:p,smaller:f,matrix:m,bignumber:h,unaryMinus:d}=e;function v(A){return function(w,D,F,R){var P=!(D.length===2&&(D.every(b)||D.every($t)));if(P)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var U=D[0],k=D[1],M=p(k,U),_=R.firstStep;if(_!==void 0&&!s(_))throw new Error('"firstStep" must be positive');var q=R.maxStep;if(q!==void 0&&!s(q))throw new Error('"maxStep" must be positive');var B=R.minStep;if(B&&c(B))throw new Error('"minStep" must be positive or zero');var Z=[U,k,_,B,q].filter(Oe=>Oe!==void 0);if(!(Z.every(b)||Z.every($t)))throw new Error('Inconsistent type of "t" dependant variables');for(var te=1,Q=R.tol?R.tol:1e-4,z=R.minDelta?R.minDelta:.2,re=R.maxDelta?R.maxDelta:5,fe=R.maxIter?R.maxIter:1e4,L=[U,k,...F,q,B].some(Ue),[I,$,H,ae]=L?[h(A.a),h(A.c),h(A.b),h(A.bp)]:[A.a,A.c,A.b,A.bp],ce=_?M?_:d(_):i(n(k,U),te),me=[U],Ne=[F],Me=n(H,ae),j=0,X=0,se=y(M),K=E(M);se(me[j],k);){var ee=[];ce=K(me[j],k,ce),ee.push(w(me[j],Ne[j]));for(var ne=1;ne<$.length;++ne)ee.push(w(r(me[j],a($[ne],ce)),r(Ne[j],a(ce,I[ne],ee))));var ve=o(u(l(a(Me,ee),Oe=>$t(Oe)?Oe.value:Oe)));ve1/4&&(me.push(r(me[j],ce)),Ne.push(r(Ne[j],a(ce,H,ee))),j++);var ge=.84*(Q/ve)**(1/5);if(f(ge,z)?ge=z:p(ge,re)&&(ge=re),ge=L?h(ge):ge,ce=a(ce,ge),q&&p(u(ce),q)?ce=M?q:d(q):B&&f(u(ce),B)&&(ce=M?B:d(B)),X++,X>fe)throw new Error("Maximum number of iterations reached, try changing options")}return{t:me,y:Ne}}}function x(A,w,D,F){var R=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],P=[null,1/2,3/4,1],U=[2/9,1/3,4/9,0],k=[7/24,1/4,1/3,1/8],M={a:R,c:P,b:U,bp:k};return v(M)(A,w,D,F)}function N(A,w,D,F){var R=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],P=[null,1/5,3/10,4/5,8/9,1,1],U=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],k=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],M={a:R,c:P,b:U,bp:k};return v(M)(A,w,D,F)}function g(A,w,D,F){var R=F.method?F.method:"RK45",P={RK23:x,RK45:N};if(R.toUpperCase()in P){var U=n7({},F);return delete U.method,P[R.toUpperCase()](A,w,D,U)}else{var k=Object.keys(P).map(_=>'"'.concat(_,'"')),M="".concat(k.slice(0,-1).join(", ")," and ").concat(k.slice(-1));throw new Error('Unavailable method "'.concat(R,'". Available methods are ').concat(M))}}function y(A){return A?f:p}function E(A){var w=A?p:f;return function(D,F,R){var P=r(D,R);return w(P,F)?n(F,D):R}}function b(A){return Ue(A)||ze(A)}function S(A,w,D,F){var R=g(A,w.toArray(),D.toArray(),F);return{t:m(R.t),y:m(R.y)}}return t("solveODE",{"function, Array, Array, Object":g,"function, Matrix, Matrix, Object":S,"function, Array, Array":(A,w,D)=>g(A,w,D,{}),"function, Matrix, Matrix":(A,w,D)=>S(A,w,D,{}),"function, Array, number | BigNumber | Unit":(A,w,D)=>{var F=g(A,w,[D],{});return{t:F.t,y:F.y.map(R=>R[0])}},"function, Matrix, number | BigNumber | Unit":(A,w,D)=>{var F=g(A,w.toArray(),[D],{});return{t:m(F.t),y:m(F.y.map(R=>R[0]))}},"function, Array, number | BigNumber | Unit, Object":(A,w,D,F)=>{var R=g(A,w,[D],F);return{t:R.t,y:R.y.map(P=>P[0])}},"function, Matrix, number | BigNumber | Unit, Object":(A,w,D,F)=>{var R=g(A,w.toArray(),[D],F);return{t:m(R.t),y:m(R.y.map(P=>P[0]))}}})});var o7="erf",s7=["typed"],Sh=C(o7,s7,e=>{var{typed:t}=e;return t("name",{number:function(o){var l=Math.abs(o);return l>=l7?cn(o):l<=u7?cn(o)*r(l):l<=4?cn(o)*(1-n(l)):cn(o)*(1-a(l))},"Array | Matrix":t.referToSelf(i=>o=>Pe(o,i))});function r(i){var o=i*i,l=aa[0][4]*o,u=o,s;for(s=0;s<3;s+=1)l=(l+aa[0][s])*o,u=(u+Zi[0][s])*o;return i*(l+aa[0][3])/(u+Zi[0][3])}function n(i){var o=aa[1][8]*i,l=i,u;for(u=0;u<7;u+=1)o=(o+aa[1][u])*i,l=(l+Zi[1][u])*i;var s=(o+aa[1][7])/(l+Zi[1][7]),c=parseInt(i*16)/16,p=(i-c)*(i+c);return Math.exp(-c*c)*Math.exp(-p)*s}function a(i){var o=1/(i*i),l=aa[2][5]*o,u=o,s;for(s=0;s<4;s+=1)l=(l+aa[2][s])*o,u=(u+Zi[2][s])*o;var c=o*(l+aa[2][4])/(u+Zi[2][4]);c=(c7-c)/i,o=parseInt(i*16)/16;var p=(i-o)*(i+o);return Math.exp(-o*o)*Math.exp(-p)*c}}),u7=.46875,c7=.5641895835477563,aa=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],Zi=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],l7=Math.pow(2,53);var oN="zeta",p7=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],Ch=C(oN,p7,e=>{var{typed:t,config:r,multiply:n,pow:a,divide:i,factorial:o,equal:l,smallerEq:u,isNegative:s,gamma:c,sin:p,subtract:f,add:m,Complex:h,BigNumber:d,pi:v}=e;return t(oN,{number:b=>x(b,S=>S,()=>20),BigNumber:b=>x(b,S=>new d(S),()=>Math.abs(Math.log10(r.epsilon))),Complex:N});function x(b,S,A){return l(b,0)?S(-.5):l(b,1)?S(NaN):isFinite(b)?g(b,S,A,w=>w):s(b)?S(NaN):S(1)}function N(b){return b.re===0&&b.im===0?new h(-.5):b.re===1?new h(NaN,NaN):b.re===1/0&&b.im===0?new h(1):b.im===1/0||b.re===-1/0?new h(NaN,NaN):g(b,S=>S,S=>Math.round(1.3*15+.9*Math.abs(S.im)),S=>S.re)}function g(b,S,A,w){var D=A(b);if(w(b)>-(D-1)/2)return E(b,S(D),S);var F=n(a(2,b),a(S(v),f(b,1)));return F=n(F,p(n(i(S(v),2),b))),F=n(F,c(f(1,b))),n(F,g(f(1,b),S,A,w))}function y(b,S){for(var A=b,w=b;u(w,S);w=m(w,1)){var D=i(n(o(m(S,f(w,1))),a(4,w)),n(o(f(S,w)),o(n(2,w))));A=m(A,D)}return n(S,A)}function E(b,S,A){for(var w=i(1,n(y(A(0),S),f(1,a(2,f(1,b))))),D=A(0),F=A(1);u(F,S);F=m(F,1))D=m(D,i(n((-1)**(F-1),y(F,S)),a(F,b)));return n(w,D)}});var sN="mode",f7=["typed","isNaN","isNumeric"],_h=C(sN,f7,e=>{var{typed:t,isNaN:r,isNumeric:n}=e;return t(sN,{"Array | Matrix":a,"...":function(o){return a(o)}});function a(i){i=Ze(i.valueOf());var o=i.length;if(o===0)throw new Error("Cannot calculate mode of an empty array");for(var l={},u=[],s=0,c=0;cs&&(s=l[p],u=[p])}return u}});function qt(e,t,r){var n;return String(e).includes("Unexpected type")?(n=arguments.length>2?" (type: "+ut(r)+", value: "+JSON.stringify(r)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+n)):String(e).includes("complex numbers")?(n=arguments.length>2?" (type: "+ut(r)+", value: "+JSON.stringify(r)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+n)):e}var uN="prod",m7=["typed","config","multiplyScalar","numeric"],Mh=C(uN,m7,e=>{var{typed:t,config:r,multiplyScalar:n,numeric:a}=e;return t(uN,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(l,u){throw new Error("prod(A, dim) is not yet supported")},"...":function(l){return i(l)}});function i(o){var l;if(gr(o,function(u){try{l=l===void 0?u:n(l,u)}catch(s){throw qt(s,"prod",u)}}),typeof l=="string"&&(l=a(l,r.number)),l===void 0)throw new Error("Cannot calculate prod of an empty array");return l}});var cN="format",d7=["typed"],Oh=C(cN,d7,e=>{var{typed:t}=e;return t(cN,{any:je,"any, Object | function | number | BigNumber":je})});var lN="bin",h7=["typed","format"],Rh=C(lN,h7,e=>{var{typed:t,format:r}=e;return t(lN,{"number | BigNumber":function(a){return r(a,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"bin",wordSize:i})}})});var pN="oct",v7=["typed","format"],Fh=C(pN,v7,e=>{var{typed:t,format:r}=e;return t(pN,{"number | BigNumber":function(a){return r(a,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"oct",wordSize:i})}})});var fN="hex",g7=["typed","format"],Ih=C(fN,g7,e=>{var{typed:t,format:r}=e;return t(fN,{"number | BigNumber":function(a){return r(a,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"hex",wordSize:i})}})});var fl=/\$([\w.]+)/g;var mN="print",x7=["typed"],ws=C(mN,x7,e=>{var{typed:t}=e;return t(mN,{"string, Object | Array":dN,"string, Object | Array, number | Object":dN})});function dN(e,t,r){return e.replace(fl,function(n,a){var i=a.split("."),o=t[i.shift()];for(o!==void 0&&o.isMatrix&&(o=o.toArray());i.length&&o!==void 0;){var l=i.shift();o=l?o[l]:o+"."}return o!==void 0?It(o)?o:je(o,r):n})}var hN="to",b7=["typed","matrix","concat"],Bh=C(hN,b7,e=>{var{typed:t,matrix:r,concat:n}=e,a=We({typed:t,matrix:r,concat:n});return t(hN,{"Unit, Unit | string":(i,o)=>i.to(o)},a({Ds:!0}))});var vN="isPrime",y7=["typed"],Lh=C(vN,y7,e=>{var{typed:t}=e;return t(vN,{number:function(n){if(n*0!==0)return!1;if(n<=3)return n>1;if(n%2===0||n%3===0)return!1;for(var a=5;a*a<=n;a+=6)if(n%a===0||n%(a+2)===0)return!1;return!0},BigNumber:function(n){if(n.toNumber()*0!==0)return!1;if(n.lte(3))return n.gt(1);if(n.mod(2).eq(0)||n.mod(3).eq(0))return!1;if(n.lt(Math.pow(2,32))){for(var a=n.toNumber(),i=5;i*i<=a;i+=6)if(a%i===0||a%(i+2)===0)return!1;return!0}function o(N,g,y){for(var E=1;!g.eq(0);)g.mod(2).eq(0)?(g=g.div(2),N=N.mul(N).mod(y)):(g=g.sub(1),E=N.mul(E).mod(y));return E}var l=n.constructor.clone({precision:n.toFixed(0).length*2});n=new l(n);for(var u=0,s=n.sub(1);s.mod(2).eq(0);)s=s.div(2),u+=1;var c=null;if(n.lt("3317044064679887385961981"))c=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(N=>Nn=>Pe(n,r))})});var E7="numeric",A7=["number","?bignumber","?fraction"],ml=C(E7,A7,e=>{var{number:t,bignumber:r,fraction:n}=e,a={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:o=>t(o),BigNumber:r?o=>r(o):Qi,Fraction:n?o=>n(o):ul};return function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",s=arguments.length>2?arguments[2]:void 0;if(s!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=ut(l);if(!(c in a))throw new TypeError("Cannot convert "+l+' of type "'+c+'"; valid input types are '+Object.keys(a).join(", "));if(!(u in i))throw new TypeError("Cannot convert "+l+' to type "'+u+'"; valid output types are '+Object.keys(i).join(", "));return u===c?l:i[u](l)}});var gN="divideScalar",N7=["typed","numeric"],dl=C(gN,N7,e=>{var{typed:t,numeric:r}=e;return t(gN,{"number, number":function(a,i){return a/i},"Complex, Complex":function(a,i){return a.div(i)},"BigNumber, BigNumber":function(a,i){return a.div(i)},"Fraction, Fraction":function(a,i){return a.div(i)},"Unit, number | Complex | Fraction | BigNumber | Unit":(n,a)=>n.divide(a),"number | Fraction | Complex | BigNumber, Unit":(n,a)=>a.divideInto(n)})});var xN="pow",T7=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],Ph=C(xN,T7,e=>{var{typed:t,config:r,identity:n,multiply:a,matrix:i,inv:o,number:l,fraction:u,Complex:s}=e;return t(xN,{"number, number":c,"Complex, Complex":function(h,d){return h.pow(d)},"BigNumber, BigNumber":function(h,d){return d.isInteger()||h>=0||r.predictable?h.pow(d):new s(h.toNumber(),0).pow(d.toNumber(),0)},"Fraction, Fraction":function(h,d){var v=h.pow(d);if(v!=null)return v;if(r.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(h.valueOf(),d.valueOf())},"Array, number":p,"Array, BigNumber":function(h,d){return p(h,d.toNumber())},"Matrix, number":f,"Matrix, BigNumber":function(h,d){return f(h,d.toNumber())},"Unit, number | BigNumber":function(h,d){return h.pow(d)}});function c(m,h){if(r.predictable&&!Re(h)&&m<0)try{var d=u(h),v=l(d);if((h===v||Math.abs((h-v)/h)<1e-14)&&d.d%2===1)return(d.n%2===0?1:-1)*Math.pow(-m,h)}catch{}return r.predictable&&(m<-1&&h===1/0||m>-1&&m<0&&h===-1/0)?NaN:Re(h)||m>=0||r.predictable?Im(m,h):m*m<1&&h===1/0||m*m>1&&h===-1/0?0:new s(m,0).pow(h,0)}function p(m,h){if(!Re(h))throw new TypeError("For A^b, b must be an integer (value is "+h+")");var d=Ge(m);if(d.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+d.length+" dimensions)");if(d[0]!==d[1])throw new Error("For A^b, A must be square (size is "+d[0]+"x"+d[1]+")");if(h<0)try{return p(o(m),-h)}catch(N){throw N.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+h+")"):N}for(var v=n(d[0]).valueOf(),x=m;h>=1;)(h&1)===1&&(v=a(x,v)),h>>=1,x=a(x,x);return v}function f(m,h){return i(p(m.valueOf(),h))}});var Ji="Number of decimals in function round must be an integer",bN="round",w7=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],hl=C(bN,w7,e=>{var{typed:t,config:r,matrix:n,equalScalar:a,zeros:i,BigNumber:o,DenseMatrix:l}=e,u=gt({typed:t,equalScalar:a}),s=lt({typed:t,DenseMatrix:l}),c=Gt({typed:t});function p(f){return Math.abs(Ui(f).exponent)}return t(bN,{number:function(m){var h=Vi(m,p(r.epsilon)),d=Pt(m,h,r.epsilon)?h:m;return Vi(d)},"number, number":function(m,h){var d=p(r.epsilon);if(h>=d)return Vi(m,h);var v=Vi(m,d),x=Pt(m,v,r.epsilon)?v:m;return Vi(x,h)},"number, BigNumber":function(m,h){if(!h.isInteger())throw new TypeError(Ji);return new o(m).toDecimalPlaces(h.toNumber())},Complex:function(m){return m.round()},"Complex, number":function(m,h){if(h%1)throw new TypeError(Ji);return m.round(h)},"Complex, BigNumber":function(m,h){if(!h.isInteger())throw new TypeError(Ji);var d=h.toNumber();return m.round(d)},BigNumber:function(m){var h=new o(m).toDecimalPlaces(p(r.epsilon)),d=Xt(m,h,r.epsilon)?h:m;return d.toDecimalPlaces(0)},"BigNumber, BigNumber":function(m,h){if(!h.isInteger())throw new TypeError(Ji);var d=p(r.epsilon);if(h>=d)return m.toDecimalPlaces(h.toNumber());var v=m.toDecimalPlaces(d),x=Xt(m,v,r.epsilon)?v:m;return x.toDecimalPlaces(h.toNumber())},Fraction:function(m){return m.round()},"Fraction, number":function(m,h){if(h%1)throw new TypeError(Ji);return m.round(h)},"Fraction, BigNumber":function(m,h){if(!h.isInteger())throw new TypeError(Ji);return m.round(h.toNumber())},"Unit, number, Unit":t.referToSelf(f=>function(m,h,d){var v=m.toNumeric(d);return d.multiply(f(v,h))}),"Unit, BigNumber, Unit":t.referToSelf(f=>(m,h,d)=>f(m,h.toNumber(),d)),"Unit, Unit":t.referToSelf(f=>(m,h)=>f(m,0,h)),"Array | Matrix, number, Unit":t.referToSelf(f=>(m,h,d)=>Pe(m,v=>f(v,h,d),!0)),"Array | Matrix, BigNumber, Unit":t.referToSelf(f=>(m,h,d)=>f(m,h.toNumber(),d)),"Array | Matrix, Unit":t.referToSelf(f=>(m,h)=>f(m,0,h)),"Array | Matrix":t.referToSelf(f=>m=>Pe(m,f,!0)),"SparseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>u(m,h,f,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(f=>(m,h)=>c(m,h,f,!1)),"Array, number | BigNumber":t.referToSelf(f=>(m,h)=>c(n(m),h,f,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":t.referToSelf(f=>(m,h)=>a(m,0)?i(h.size(),h.storage()):s(h,m,f,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":t.referToSelf(f=>(m,h)=>a(m,0)?i(h.size(),h.storage()):c(h,m,f,!0)),"number | Complex | BigNumber | Fraction, Array":t.referToSelf(f=>(m,h)=>c(n(h),m,f,!0).valueOf())})});var yN="log",D7=["config","typed","divideScalar","Complex"],Uh=C(yN,D7,e=>{var{typed:t,config:r,divideScalar:n,Complex:a}=e;return t(yN,{number:function(o){return o>=0||r.predictable?bE(o):new a(o,0).log()},Complex:function(o){return o.log()},BigNumber:function(o){return!o.isNegative()||r.predictable?o.ln():new a(o.toNumber(),0).log()},"any, any":t.referToSelf(i=>(o,l)=>n(i(o),i(l)))})});var EN="log1p",S7=["typed","config","divideScalar","log","Complex"],kh=C(EN,S7,e=>{var{typed:t,config:r,divideScalar:n,log:a,Complex:i}=e;return t(EN,{number:function(u){return u>=-1||r.predictable?hc(u):o(new i(u,0))},Complex:o,BigNumber:function(u){var s=u.plus(1);return!s.isNegative()||r.predictable?s.ln():o(new i(u.toNumber(),0))},"Array | Matrix":t.referToSelf(l=>u=>Pe(u,l)),"any, any":t.referToSelf(l=>(u,s)=>n(l(u),a(s)))});function o(l){var u=l.re+1;return new i(Math.log(Math.sqrt(u*u+l.im*l.im)),Math.atan2(l.im,u))}});var AN="nthRoots",C7=["config","typed","divideScalar","Complex"],qh=C(AN,C7,e=>{var{typed:t,config:r,divideScalar:n,Complex:a}=e,i=[function(u){return new a(u,0)},function(u){return new a(0,u)},function(u){return new a(-u,0)},function(u){return new a(0,-u)}];function o(l,u){if(u<0)throw new Error("Root must be greater than zero");if(u===0)throw new Error("Root must be non-zero");if(u%1!==0)throw new Error("Root must be an integer");if(l===0||l.abs()===0)return[new a(0,0)];var s=typeof l=="number",c;(s||l.re===0||l.im===0)&&(s?c=2*+(l<0):l.im===0?c=2*+(l.re<0):c=2*+(l.im<0)+1);for(var p=l.arg(),f=l.abs(),m=[],h=Math.pow(f,1/u),d=0;d{var{typed:t,equalScalar:r,matrix:n,pow:a,DenseMatrix:i,concat:o}=e,l=wt({typed:t}),u=Wt({typed:t,DenseMatrix:i}),s=gt({typed:t,equalScalar:r}),c=lt({typed:t,DenseMatrix:i}),p=We({typed:t,matrix:n,concat:o}),f={};for(var m in a.signatures)Object.prototype.hasOwnProperty.call(a.signatures,m)&&!m.includes("Matrix")&&!m.includes("Array")&&(f[m]=a.signatures[m]);var h=t(f);return t(NN,p({elop:h,SS:u,DS:l,Ss:s,sS:c}))});var TN="dotDivide",M7=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat"],zh=C(TN,M7,e=>{var{typed:t,matrix:r,equalScalar:n,divideScalar:a,DenseMatrix:i,concat:o}=e,l=Yt({typed:t,equalScalar:n}),u=wt({typed:t}),s=Wt({typed:t,DenseMatrix:i}),c=gt({typed:t,equalScalar:n}),p=lt({typed:t,DenseMatrix:i}),f=We({typed:t,matrix:r,concat:o});return t(TN,f({elop:a,SS:s,DS:u,SD:l,Ss:c,sS:p}))});function Yn(e){var{DenseMatrix:t}=e;return function(n,a,i){var o=n.size();if(o.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+je(o)+")");var l=o[0],u=o[1];if(l!==u)throw new RangeError("Matrix must be square (size: "+je(o)+")");var s=[];if(Fe(a)){var c=a.size(),p=a._data;if(c.length===1){if(c[0]!==l)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var f=0;f{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(wN,{"SparseMatrix, Array | Matrix":function(f,m){return c(f,m)},"DenseMatrix, Array | Matrix":function(f,m){return s(f,m)},"Array, Array | Matrix":function(f,m){var h=r(f),d=s(h,m);return d.valueOf()}});function s(p,f){f=u(p,f,!0);for(var m=f._data,h=p._size[0],d=p._size[1],v=[],x=p._data,N=0;Ny&&(S.push(v[F]),A.push(R))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var P=n(E,b),U=0,k=A.length;U{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(DN,{"SparseMatrix, Array | Matrix":function(f,m){return c(f,m)},"DenseMatrix, Array | Matrix":function(f,m){return s(f,m)},"Array, Array | Matrix":function(f,m){var h=r(f),d=s(h,m);return d.valueOf()}});function s(p,f){f=u(p,f,!0);for(var m=f._data,h=p._size[0],d=p._size[1],v=[],x=p._data,N=d-1;N>=0;N--){var g=m[N][0]||0,y=void 0;if(o(g,0))y=0;else{var E=x[N][N];if(o(E,0))throw new Error("Linear system cannot be solved since matrix is singular");y=n(g,E);for(var b=N-1;b>=0;b--)m[b]=[i(m[b][0]||0,a(y,x[b][N]))]}v[N]=[y]}return new l({data:v,size:[h,1]})}function c(p,f){f=u(p,f,!0);for(var m=f._data,h=p._size[0],d=p._size[1],v=p._values,x=p._index,N=p._ptr,g=[],y=d-1;y>=0;y--){var E=m[y][0]||0;if(o(E,0))g[y]=[0];else{for(var b=0,S=[],A=[],w=N[y],D=N[y+1],F=D-1;F>=w;F--){var R=x[F];R===y?b=v[F]:R{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(SN,{"SparseMatrix, Array | Matrix":function(f,m){return c(f,m)},"DenseMatrix, Array | Matrix":function(f,m){return s(f,m)},"Array, Array | Matrix":function(f,m){var h=r(f),d=s(h,m);return d.map(v=>v.valueOf())}});function s(p,f){for(var m=[u(p,f,!0)._data.map(A=>A[0])],h=p._data,d=p._size[0],v=p._size[1],x=0;xnew l({data:A.map(w=>[w]),size:[d,1]}))}function c(p,f){for(var m=[u(p,f,!0)._data.map(te=>te[0])],h=p._size[0],d=p._size[1],v=p._values,x=p._index,N=p._ptr,g=0;gg&&(S.push(v[R]),A.push(P))}if(o(F,0))if(o(b[g],0)){if(E===0){var _=[...b];_[g]=1;for(var q=0,B=A.length;qnew l({data:te.map(Q=>[Q]),size:[h,1]}))}});var CN="usolveAll",I7=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],Vh=C(CN,I7,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(CN,{"SparseMatrix, Array | Matrix":function(f,m){return c(f,m)},"DenseMatrix, Array | Matrix":function(f,m){return s(f,m)},"Array, Array | Matrix":function(f,m){var h=r(f),d=s(h,m);return d.map(v=>v.valueOf())}});function s(p,f){for(var m=[u(p,f,!0)._data.map(A=>A[0])],h=p._data,d=p._size[0],v=p._size[1],x=v-1;x>=0;x--)for(var N=m.length,g=0;g=0;S--)b[S]=i(b[S],h[S][x]);m.push(b)}}else{if(g===0)return[];m.splice(g,1),g-=1,N-=1}else{y[x]=n(y[x],h[x][x]);for(var E=x-1;E>=0;E--)y[E]=i(y[E],a(y[x],h[E][x]))}}return m.map(A=>new l({data:A.map(w=>[w]),size:[d,1]}))}function c(p,f){for(var m=[u(p,f,!0)._data.map(te=>te[0])],h=p._size[0],d=p._size[1],v=p._values,x=p._index,N=p._ptr,g=d-1;g>=0;g--)for(var y=m.length,E=0;E=w;R--){var P=x[R];P===g?F=v[R]:Pnew l({data:te.map(Q=>[Q]),size:[h,1]}))}});var B7="matAlgo08xS0Sid",L7=["typed","equalScalar"],eo=C(B7,L7,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var l=a._values,u=a._index,s=a._ptr,c=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType(),f=i._values,m=i._index,h=i._ptr,d=i._size,v=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new Ve(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");if(!l||!f)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var x=c[0],N=c[1],g,y=r,E=0,b=o;typeof p=="string"&&p===v&&p!=="mixed"&&(g=p,y=t.find(r,[g,g]),E=t.convert(0,g),b=t.find(o,[g,g]));for(var S=[],A=[],w=[],D=[],F=[],R,P,U,k,M=0;M{var{typed:t,matrix:r}=e;return{"Array, number":t.referTo("DenseMatrix, number",n=>(a,i)=>n(r(a),i).valueOf()),"Array, BigNumber":t.referTo("DenseMatrix, BigNumber",n=>(a,i)=>n(r(a),i).valueOf()),"number, Array":t.referTo("number, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf()),"BigNumber, Array":t.referTo("BigNumber, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf())}});var _N="leftShift",P7=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],$h=C(_N,P7,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,l=xr({typed:t}),u=Yt({typed:t,equalScalar:n}),s=eo({typed:t,equalScalar:n}),c=Lr({typed:t,DenseMatrix:i}),p=gt({typed:t,equalScalar:n}),f=Gt({typed:t}),m=We({typed:t,matrix:r,concat:o}),h=to({typed:t,matrix:r});return t(_N,{"number, number":km,"BigNumber, BigNumber":hA,"SparseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():p(v,x,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():f(v,x,d,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):c(x,v,d,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):f(x,v,d,!0))},h,m({SS:s,DS:l,SD:u}))});var MN="rightArithShift",U7=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],Xh=C(MN,U7,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,l=xr({typed:t}),u=Yt({typed:t,equalScalar:n}),s=eo({typed:t,equalScalar:n}),c=Lr({typed:t,DenseMatrix:i}),p=gt({typed:t,equalScalar:n}),f=Gt({typed:t}),m=We({typed:t,matrix:r,concat:o}),h=to({typed:t,matrix:r});return t(MN,{"number, number":qm,"BigNumber, BigNumber":vA,"SparseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():p(v,x,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():f(v,x,d,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):c(x,v,d,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):f(x,v,d,!0))},h,m({SS:s,DS:l,SD:u}))});var ON="rightLogShift",k7=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],Kh=C(ON,k7,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,l=xr({typed:t}),u=Yt({typed:t,equalScalar:n}),s=eo({typed:t,equalScalar:n}),c=Lr({typed:t,DenseMatrix:i}),p=gt({typed:t,equalScalar:n}),f=Gt({typed:t}),m=We({typed:t,matrix:r,concat:o}),h=to({typed:t,matrix:r});return t(ON,{"number, number":Hm,"SparseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():p(v,x,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(v,x)=>n(x,0)?v.clone():f(v,x,d,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):c(x,v,d,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(d=>(v,x)=>n(v,0)?a(x.size(),x.storage()):f(x,v,d,!0))},h,m({SS:s,DS:l,SD:u}))});var RN="and",q7=["typed","matrix","equalScalar","zeros","not","concat"],Ds=C(RN,q7,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,l=Yt({typed:t,equalScalar:n}),u=Sa({typed:t,equalScalar:n}),s=gt({typed:t,equalScalar:n}),c=Gt({typed:t}),p=We({typed:t,matrix:r,concat:o});return t(RN,{"number, number":$m,"Complex, Complex":function(m,h){return(m.re!==0||m.im!==0)&&(h.re!==0||h.im!==0)},"BigNumber, BigNumber":function(m,h){return!m.isZero()&&!h.isZero()&&!m.isNaN()&&!h.isNaN()},"Unit, Unit":t.referToSelf(f=>(m,h)=>f(m.value||0,h.value||0)),"SparseMatrix, any":t.referToSelf(f=>(m,h)=>i(h)?a(m.size(),m.storage()):s(m,h,f,!1)),"DenseMatrix, any":t.referToSelf(f=>(m,h)=>i(h)?a(m.size(),m.storage()):c(m,h,f,!1)),"any, SparseMatrix":t.referToSelf(f=>(m,h)=>i(m)?a(m.size(),m.storage()):s(h,m,f,!0)),"any, DenseMatrix":t.referToSelf(f=>(m,h)=>i(m)?a(m.size(),m.storage()):c(h,m,f,!0)),"Array, any":t.referToSelf(f=>(m,h)=>f(r(m),h).valueOf()),"any, Array":t.referToSelf(f=>(m,h)=>f(m,r(h)).valueOf())},p({SS:u,DS:l}))});var vl="compare",H7=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],Wh=C(vl,H7,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,BigNumber:i,Fraction:o,DenseMatrix:l,concat:u}=e,s=wt({typed:t}),c=Da({typed:t,equalScalar:n}),p=lt({typed:t,DenseMatrix:l}),f=We({typed:t,matrix:a,concat:u}),m=pn({typed:t});return t(vl,z7({typed:t,config:r}),{"boolean, boolean":function(d,v){return d===v?0:d>v?1:-1},"BigNumber, BigNumber":function(d,v){return Xt(d,v,r.epsilon)?new i(0):new i(d.cmp(v))},"Fraction, Fraction":function(d,v){return new o(d.compare(v))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},m,f({SS:c,DS:s,Ss:p}))}),z7=C(vl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(vl,{"number, number":function(a,i){return Pt(a,i,r.epsilon)?0:a>i?1:-1}})});var oi=Le(IN(),1);var BN="compareNatural",G7=["typed","compare"],Qh=C(BN,G7,e=>{var{typed:t,compare:r}=e,n=r.signatures["boolean,boolean"];return t(BN,{"any, any":a});function a(u,s){var c=ut(u),p=ut(s),f;if((c==="number"||c==="BigNumber"||c==="Fraction")&&(p==="number"||p==="BigNumber"||p==="Fraction"))return f=r(u,s),f.toString()!=="0"?f>0?1:-1:(0,oi.default)(c,p);var m=["Array","DenseMatrix","SparseMatrix"];if(m.includes(c)||m.includes(p))return f=i(a,u,s),f!==0?f:(0,oi.default)(c,p);if(c!==p)return(0,oi.default)(c,p);if(c==="Complex")return Y7(u,s);if(c==="Unit")return u.equalBase(s)?a(u.value,s.value):o(a,u.formatUnits(),s.formatUnits());if(c==="boolean")return n(u,s);if(c==="string")return(0,oi.default)(u,s);if(c==="Object")return l(a,u,s);if(c==="null"||c==="undefined")return 0;throw new TypeError('Unsupported type of value "'+c+'"')}function i(u,s,c){return Xr(s)&&Xr(c)?o(u,s.toJSON().values,c.toJSON().values):Xr(s)?i(u,s.toArray(),c):Xr(c)?i(u,s,c.toArray()):Zn(s)?i(u,s.toJSON().data,c):Zn(c)?i(u,s,c.toJSON().data):Array.isArray(s)?Array.isArray(c)?o(u,s,c):i(u,s,[c]):i(u,[s],c)}function o(u,s,c){for(var p=0,f=Math.min(s.length,c.length);pc.length?1:s.lengtht.re?1:e.ret.im?1:e.im{var{typed:t,matrix:r,concat:n}=e,a=We({typed:t,matrix:r,concat:n});return t(LN,Fc,a({elop:Fc,Ds:!0}))});var gl="equal",V7=["typed","matrix","equalScalar","DenseMatrix","concat"],Jh=C(gl,V7,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:r,concat:i});return t(gl,$7({typed:t,equalScalar:n}),s({elop:n,SS:l,DS:o,Ss:u}))}),$7=C(gl,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(gl,{"any, any":function(a,i){return a===null?i===null:i===null?a===null:a===void 0?i===void 0:i===void 0?a===void 0:r(a,i)}})});var PN="equalText",X7=["typed","compareText","isZero"],e0=C(PN,X7,e=>{var{typed:t,compareText:r,isZero:n}=e;return t(PN,{"any, any":function(i,o){return n(r(i,o))}})});var xl="smaller",K7=["typed","config","matrix","DenseMatrix","concat"],bl=C(xl,K7,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:n,concat:i}),c=pn({typed:t});return t(xl,W7({typed:t,config:r}),{"boolean, boolean":(p,f)=>pp.compare(f)===-1,"Complex, Complex":function(f,m){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),W7=C(xl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(xl,{"number, number":function(a,i){return a{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:n,concat:i}),c=pn({typed:t});return t(yl,Z7({typed:t,config:r}),{"boolean, boolean":(p,f)=>p<=f,"BigNumber, BigNumber":function(f,m){return f.lte(m)||Xt(f,m,r.epsilon)},"Fraction, Fraction":(p,f)=>p.compare(f)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),Z7=C(yl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(yl,{"number, number":function(a,i){return a<=i||Pt(a,i,r.epsilon)}})});var El="larger",J7=["typed","config","matrix","DenseMatrix","concat"],Al=C(El,J7,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:n,concat:i}),c=pn({typed:t});return t(El,eU({typed:t,config:r}),{"boolean, boolean":(p,f)=>p>f,"BigNumber, BigNumber":function(f,m){return f.gt(m)&&!Xt(f,m,r.epsilon)},"Fraction, Fraction":(p,f)=>p.compare(f)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),eU=C(El,["typed","config"],e=>{var{typed:t,config:r}=e;return t(El,{"number, number":function(a,i){return a>i&&!Pt(a,i,r.epsilon)}})});var Nl="largerEq",tU=["typed","config","matrix","DenseMatrix","concat"],r0=C(Nl,tU,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i}=e,o=wt({typed:t}),l=Wt({typed:t,DenseMatrix:a}),u=lt({typed:t,DenseMatrix:a}),s=We({typed:t,matrix:n,concat:i}),c=pn({typed:t});return t(Nl,rU({typed:t,config:r}),{"boolean, boolean":(p,f)=>p>=f,"BigNumber, BigNumber":function(f,m){return f.gte(m)||Xt(f,m,r.epsilon)},"Fraction, Fraction":(p,f)=>p.compare(f)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),rU=C(Nl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(Nl,{"number, number":function(a,i){return a>=i||Pt(a,i,r.epsilon)}})});var UN="deepEqual",nU=["typed","equal"],n0=C(UN,nU,e=>{var{typed:t,equal:r}=e;return t(UN,{"any, any":function(i,o){return n(i.valueOf(),o.valueOf())}});function n(a,i){if(Array.isArray(a))if(Array.isArray(i)){var o=a.length;if(o!==i.length)return!1;for(var l=0;l{var{typed:t,config:r,equalScalar:n,matrix:a,DenseMatrix:i,concat:o}=e,l=wt({typed:t}),u=Wt({typed:t,DenseMatrix:i}),s=lt({typed:t,DenseMatrix:i}),c=We({typed:t,matrix:a,concat:o});return t(Tl,iU({typed:t,equalScalar:n}),c({elop:p,SS:u,DS:l,Ss:s}));function p(f,m){return!n(f,m)}}),iU=C(Tl,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(Tl,{"any, any":function(a,i){return a===null?i!==null:i===null?a!==null:a===void 0?i!==void 0:i===void 0?a!==void 0:!r(a,i)}})});var kN="partitionSelect",oU=["typed","isNumeric","isNaN","compare"],i0=C(kN,oU,e=>{var{typed:t,isNumeric:r,isNaN:n,compare:a}=e,i=a,o=(s,c)=>-a(s,c);return t(kN,{"Array | Matrix, number":function(c,p){return l(c,p,i)},"Array | Matrix, number, string":function(c,p,f){if(f==="asc")return l(c,p,i);if(f==="desc")return l(c,p,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":l});function l(s,c,p){if(!Re(c)||c<0)throw new Error("k must be a non-negative integer");if(Fe(s)){var f=s.size();if(f.length>1)throw new Error("Only one dimensional matrices supported");return u(s.valueOf(),c,p)}if(Array.isArray(s))return u(s,c,p)}function u(s,c,p){if(c>=s.length)throw new Error("k out of bounds");for(var f=0;f=0){var N=s[v];s[v]=s[d],s[d]=N,--v}else++d;p(s[d],x)>0&&--d,c<=d?h=d:m=d+1}return s[c]}});var qN="sort",sU=["typed","matrix","compare","compareNatural"],o0=C(qN,sU,e=>{var{typed:t,matrix:r,compare:n,compareNatural:a}=e,i=n,o=(c,p)=>-n(c,p);return t(qN,{Array:function(p){return u(p),p.sort(i)},Matrix:function(p){return s(p),r(p.toArray().sort(i),p.storage())},"Array, function":function(p,f){return u(p),p.sort(f)},"Matrix, function":function(p,f){return s(p),r(p.toArray().sort(f),p.storage())},"Array, string":function(p,f){return u(p),p.sort(l(f))},"Matrix, string":function(p,f){return s(p),r(p.toArray().sort(l(f)),p.storage())}});function l(c){if(c==="asc")return i;if(c==="desc")return o;if(c==="natural")return a;throw new Error('String "asc", "desc", or "natural" expected')}function u(c){if(Ge(c).length!==1)throw new Error("One dimensional array expected")}function s(c){if(c.size().length!==1)throw new Error("One dimensional matrix expected")}});var HN="max",uU=["typed","config","numeric","larger"],ro=C(HN,uU,e=>{var{typed:t,config:r,numeric:n,larger:a}=e;return t(HN,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(u,s){return wa(u,s.valueOf(),i)},"...":function(u){if(ln(u))throw new TypeError("Scalar values expected in function max");return o(u)}});function i(l,u){try{return a(l,u)?l:u}catch(s){throw qt(s,"max",u)}}function o(l){var u;if(gr(l,function(s){try{isNaN(s)&&typeof s=="number"?u=NaN:(u===void 0||a(s,u))&&(u=s)}catch(c){throw qt(c,"max",s)}}),u===void 0)throw new Error("Cannot calculate max of an empty array");return typeof u=="string"&&(u=n(u,r.number)),u}});var zN="min",cU=["typed","config","numeric","smaller"],no=C(zN,cU,e=>{var{typed:t,config:r,numeric:n,smaller:a}=e;return t(zN,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(u,s){return wa(u,s.valueOf(),i)},"...":function(u){if(ln(u))throw new TypeError("Scalar values expected in function min");return o(u)}});function i(l,u){try{return a(l,u)?l:u}catch(s){throw qt(s,"min",u)}}function o(l){var u;if(gr(l,function(s){try{isNaN(s)&&typeof s=="number"?u=NaN:(u===void 0||a(s,u))&&(u=s)}catch(c){throw qt(c,"min",s)}}),u===void 0)throw new Error("Cannot calculate min of an empty array");return typeof u=="string"&&(u=n(u,r.number)),u}});var lU="ImmutableDenseMatrix",pU=["smaller","DenseMatrix"],s0=C(lU,pU,e=>{var{smaller:t,DenseMatrix:r}=e;function n(a,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(i&&!It(i))throw new Error("Invalid datatype: "+i);if(Fe(a)||at(a)){var o=new r(a,i);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(a&&at(a.data)&&at(a.size))this._data=a.data,this._size=a.size,this._datatype=a.datatype,this._min=typeof a.min<"u"?a.min:null,this._max=typeof a.max<"u"?a.max:null;else{if(a)throw new TypeError("Unsupported type of data ("+ut(a)+")");this._data=[],this._size=[0],this._datatype=i,this._min=null,this._max=null}}return n.prototype=new r,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(a){switch(arguments.length){case 1:{var i=r.prototype.subset.call(this,a);return Fe(i)?new n({data:i._data,size:i._size,datatype:i._datatype}):i}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:qe(this._data),size:qe(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(a){return new n(a)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(this._min===null){var a=null;this.forEach(function(i){(a===null||t(i,a))&&(a=i)}),this._min=a!==null?a:void 0}return this._min},n.prototype.max=function(){if(this._max===null){var a=null;this.forEach(function(i){(a===null||t(a,i))&&(a=i)}),this._max=a!==null?a:void 0}return this._max},n},{isClass:!0});var fU="Index",mU=["ImmutableDenseMatrix","getMatrixDataType"],u0=C(fU,mU,e=>{var{ImmutableDenseMatrix:t,getMatrixDataType:r}=e;function n(i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var o=0,l=arguments.length;o{r&&t.push(n)}),t}var dU="FibonacciHeap",hU=["smaller","larger"],c0=C(dU,hU,e=>{var{smaller:t,larger:r}=e,n=1/Math.log((1+Math.sqrt(5))/2);function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}a.prototype.type="FibonacciHeap",a.prototype.isFibonacciHeap=!0,a.prototype.insert=function(c,p){var f={key:c,value:p,degree:0};if(this._minimum){var m=this._minimum;f.left=m,f.right=m.right,m.right=f,f.right.left=f,t(c,m.key)&&(this._minimum=f)}else f.left=f,f.right=f,this._minimum=f;return this._size++,f},a.prototype.size=function(){return this._size},a.prototype.clear=function(){this._minimum=null,this._size=0},a.prototype.isEmpty=function(){return this._size===0},a.prototype.extractMinimum=function(){var c=this._minimum;if(c===null)return c;for(var p=this._minimum,f=c.degree,m=c.child;f>0;){var h=m.right;m.left.right=m.right,m.right.left=m.left,m.left=p,m.right=p.right,p.right=m,m.right.left=m,m.parent=null,m=h,f--}return c.left.right=c.right,c.right.left=c.left,c===c.right?p=null:(p=c.right,p=s(p,this._size)),this._size--,this._minimum=p,c},a.prototype.remove=function(c){this._minimum=i(this._minimum,c,-1),this.extractMinimum()};function i(c,p,f){p.key=f;var m=p.parent;return m&&t(p.key,m.key)&&(o(c,p,m),l(c,m)),t(p.key,c.key)&&(c=p),c}function o(c,p,f){p.left.right=p.right,p.right.left=p.left,f.degree--,f.child===p&&(f.child=p.right),f.degree===0&&(f.child=null),p.left=c,p.right=c.right,c.right=p,p.right.left=p,p.parent=null,p.mark=!1}function l(c,p){var f=p.parent;f&&(p.mark?(o(c,p,f),l(f)):p.mark=!0)}var u=function(p,f){p.left.right=p.right,p.right.left=p.left,p.parent=f,f.child?(p.left=f.child,p.right=f.child.right,f.child.right=p,p.right.left=p):(f.child=p,p.right=p,p.left=p),f.degree++,p.mark=!1};function s(c,p){var f=Math.floor(Math.log(p)*n)+1,m=new Array(f),h=0,d=c;if(d)for(h++,d=d.right;d!==c;)h++,d=d.right;for(var v;h>0;){for(var x=d.degree,N=d.right;v=m[x],!!v;){if(r(d.key,v.key)){var g=v;v=d,d=g}u(v,d),m[x]=null,x++}m[x]=d,d=N,h--}c=null;for(var y=0;y{var{addScalar:t,equalScalar:r,FibonacciHeap:n}=e;function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return a.prototype.type="Spa",a.prototype.isSpa=!0,a.prototype.set=function(i,o){if(this._values[i])this._values[i].value=o;else{var l=this._heap.insert(i,o);this._values[i]=l}},a.prototype.get=function(i){var o=this._values[i];return o?o.value:0},a.prototype.accumulate=function(i,o){var l=this._values[i];l?l.value=t(l.value,o):(l=this._heap.insert(i,o),this._values[i]=l)},a.prototype.forEach=function(i,o,l){var u=this._heap,s=this._values,c=[],p=u.extractMinimum();for(p&&c.push(p);p&&p.key<=o;)p.key>=i&&(r(p.value,0)||l(p.key,p.value,this)),p=u.extractMinimum(),p&&c.push(p);for(var f=0;f{var{on:t,config:r,addScalar:n,subtractScalar:a,multiplyScalar:i,divideScalar:o,pow:l,abs:u,fix:s,round:c,equal:p,isNumeric:f,format:m,number:h,Complex:d,BigNumber:v,Fraction:x}=e,N=h;function g(j,X){if(!(this instanceof g))throw new Error("Constructor must be called with the new operator");if(!(j==null||f(j)||Zt(j)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,X===void 0)this.units=[],this.dimensions=q.map(K=>0);else if(typeof X=="string"){var se=g.parse(X);this.units=se.units,this.dimensions=se.dimensions}else if($t(X)&&X.value===null)this.fixPrefix=X.fixPrefix,this.skipAutomaticSimplification=X.skipAutomaticSimplification,this.dimensions=X.dimensions.slice(0),this.units=X.units.map(K=>(0,Cs.default)({},K));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(j)}Object.defineProperty(g,"name",{value:"Unit"}),g.prototype.constructor=g,g.prototype.type="Unit",g.prototype.isUnit=!0;var y,E,b;function S(){for(;b===" "||b===" ";)D()}function A(j){return j>="0"&&j<="9"||j==="."}function w(j){return j>="0"&&j<="9"}function D(){E++,b=y.charAt(E)}function F(j){E=j,b=y.charAt(E)}function R(){var j="",X=E;if(b==="+"?D():b==="-"&&(j+=b,D()),!A(b))return F(X),null;if(b==="."){if(j+=b,D(),!w(b))return F(X),null}else{for(;w(b);)j+=b,D();b==="."&&(j+=b,D())}for(;w(b);)j+=b,D();if(b==="E"||b==="e"){var se="",K=E;if(se+=b,D(),(b==="+"||b==="-")&&(se+=b,D()),!w(b))return F(K),j;for(j=j+se;w(b);)j+=b,D()}return j}function P(){for(var j="";w(b)||g.isValidAlpha(b);)j+=b,D();var X=j.charAt(0);return g.isValidAlpha(X)?j:null}function U(j){return b===j?(D(),j):null}g.parse=function(j,X){if(X=X||{},y=j,E=-1,b="",typeof y!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var se=new g;se.units=[];var K=1,ee=!1;D(),S();var ne=R(),ve=null;if(ne){if(r.number==="BigNumber")ve=new v(ne);else if(r.number==="Fraction")try{ve=new x(ne)}catch{ve=parseFloat(ne)}else ve=parseFloat(ne);S(),U("*")?(K=1,ee=!0):U("/")&&(K=-1,ee=!0)}for(var ge=[],Oe=1;;){for(S();b==="(";)ge.push(K),Oe*=K,K=1,D(),S();var ye=void 0;if(b){var Qe=b;if(ye=P(),ye===null)throw new SyntaxError('Unexpected "'+Qe+'" in "'+y+'" at index '+E.toString())}else break;var rt=k(ye);if(rt===null)throw new SyntaxError('Unit "'+ye+'" not found.');var mt=K*Oe;if(S(),U("^")){S();var Et=R();if(Et===null)throw new SyntaxError('In "'+j+'", "^" must be followed by a floating-point number');mt*=Et}se.units.push({unit:rt.unit,prefix:rt.prefix,power:mt});for(var W=0;W1||Math.abs(this.units[0].power-1)>1e-15},g.prototype._normalize=function(j){if(j==null||this.units.length===0)return j;for(var X=j,se=g._getNumberConverter(ut(j)),K=0;K{if(Ie(z,j)){var X=z[j],se=X.prefixes[""];return{unit:X,prefix:se}}for(var K in z)if(Ie(z,K)&&uE(j,K)){var ee=z[K],ne=j.length-K.length,ve=j.substring(0,ne),ge=Ie(ee.prefixes,ve)?ee.prefixes[ve]:void 0;if(ge!==void 0)return{unit:ee,prefix:ge}}return null},{hasher:j=>j[0],limit:100});g.isValuelessUnit=function(j){return k(j)!==null},g.prototype.hasBase=function(j){if(typeof j=="string"&&(j=B[j]),!j)return!1;for(var X=0;X1e-12)return!1;return!0},g.prototype.equalBase=function(j){for(var X=0;X1e-12)return!1;return!0},g.prototype.equals=function(j){return this.equalBase(j)&&p(this.value,j.value)},g.prototype.multiply=function(j){for(var X=this.clone(),se=$t(j)?j:new g(j),K=0;K0?this.formatUnits():null,fixPrefix:this.fixPrefix}},g.fromJSON=function(j){var X,se=new g(j.value,(X=j.unit)!==null&&X!==void 0?X:void 0);return se.fixPrefix=j.fixPrefix||!1,se},g.prototype.valueOf=g.prototype.toString,g.prototype.simplify=function(){var j=this.clone(),X=[],se;for(var K in I)if(Ie(I,K)&&j.hasBase(B[K])){se=K;break}if(se==="NONE")j.units=[];else{var ee;if(se&&Ie(I,se)&&(ee=I[se]),ee)j.units=[{unit:ee.unit,prefix:ee.prefix,power:1}];else{for(var ne=!1,ve=0;ve1e-12&&(Ie(I,ge)?X.push({unit:I[ge].unit,prefix:I[ge].prefix,power:j.dimensions[ve]||0}):ne=!0)}X.length1e-12)if(Ie(L.si,K))X.push({unit:L.si[K].unit,prefix:L.si[K].prefix,power:j.dimensions[se]||0});else throw new Error("Cannot express custom unit "+K+" in SI units")}return j.units=X,j.fixPrefix=!0,j.skipAutomaticSimplification=!0,this.value!==null?(j.value=null,this.to(j)):j},g.prototype.formatUnits=function(){for(var j="",X="",se=0,K=0,ee=0;ee0?(se++,j+=" "+this.units[ee].prefix.name+this.units[ee].unit.name,Math.abs(this.units[ee].power-1)>1e-15&&(j+="^"+this.units[ee].power)):this.units[ee].power<0&&K++;if(K>0)for(var ne=0;ne0?(X+=" "+this.units[ne].prefix.name+this.units[ne].unit.name,Math.abs(this.units[ne].power+1)>1e-15&&(X+="^"+-this.units[ne].power)):(X+=" "+this.units[ne].prefix.name+this.units[ne].unit.name,X+="^"+this.units[ne].power));j=j.substr(1),X=X.substr(1),se>1&&K>0&&(j="("+j+")"),K>1&&se>0&&(X="("+X+")");var ve=j;return se>0&&K>0&&(ve+=" / "),ve+=X,ve},g.prototype.format=function(j){var X=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),se=!1;typeof X.value<"u"&&X.value!==null&&Zt(X.value)&&(se=Math.abs(X.value.re)<1e-14);for(var K in X.units)Ie(X.units,K)&&X.units[K].unit&&(X.units[K].unit.name==="VA"&&se?X.units[K].unit=z.VAR:X.units[K].unit.name==="VAR"&&!se&&(X.units[K].unit=z.VA));X.units.length===1&&!X.fixPrefix&&Math.abs(X.units[0].power-Math.round(X.units[0].power))<1e-14&&(X.units[0].prefix=X._bestPrefix());var ee=X._denormalize(X.value),ne=X.value!==null?m(ee,j||{}):"",ve=X.formatUnits();return X.value&&Zt(X.value)&&(ne="("+ne+")"),ve.length>0&&ne.length>0&&(ne+=" "),ne+=ve,ne},g.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var j=this.value!==null?u(this.value):0,X=u(this.units[0].unit.value),se=this.units[0].prefix;if(j===0)return se;var K=this.units[0].power,ee=Math.log(j/Math.pow(se.value*X,K))/Math.LN10-1.2;if(ee>-2.200001&&ee<1.800001)return se;ee=Math.abs(ee);var ne=this.units[0].unit.prefixes;for(var ve in ne)if(Ie(ne,ve)){var ge=ne[ve];if(ge.scientific){var Oe=Math.abs(Math.log(j/Math.pow(ge.value*X,K))/Math.LN10-1.2);(Oe0)},z={meter:{name:"meter",base:B.LENGTH,prefixes:_.LONG,value:1,offset:0},inch:{name:"inch",base:B.LENGTH,prefixes:_.NONE,value:.0254,offset:0},foot:{name:"foot",base:B.LENGTH,prefixes:_.NONE,value:.3048,offset:0},yard:{name:"yard",base:B.LENGTH,prefixes:_.NONE,value:.9144,offset:0},mile:{name:"mile",base:B.LENGTH,prefixes:_.NONE,value:1609.344,offset:0},link:{name:"link",base:B.LENGTH,prefixes:_.NONE,value:.201168,offset:0},rod:{name:"rod",base:B.LENGTH,prefixes:_.NONE,value:5.0292,offset:0},chain:{name:"chain",base:B.LENGTH,prefixes:_.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:B.LENGTH,prefixes:_.NONE,value:1e-10,offset:0},m:{name:"m",base:B.LENGTH,prefixes:_.SHORT,value:1,offset:0},in:{name:"in",base:B.LENGTH,prefixes:_.NONE,value:.0254,offset:0},ft:{name:"ft",base:B.LENGTH,prefixes:_.NONE,value:.3048,offset:0},yd:{name:"yd",base:B.LENGTH,prefixes:_.NONE,value:.9144,offset:0},mi:{name:"mi",base:B.LENGTH,prefixes:_.NONE,value:1609.344,offset:0},li:{name:"li",base:B.LENGTH,prefixes:_.NONE,value:.201168,offset:0},rd:{name:"rd",base:B.LENGTH,prefixes:_.NONE,value:5.02921,offset:0},ch:{name:"ch",base:B.LENGTH,prefixes:_.NONE,value:20.1168,offset:0},mil:{name:"mil",base:B.LENGTH,prefixes:_.NONE,value:254e-7,offset:0},m2:{name:"m2",base:B.SURFACE,prefixes:_.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:B.SURFACE,prefixes:_.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:B.SURFACE,prefixes:_.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:B.SURFACE,prefixes:_.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:B.SURFACE,prefixes:_.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:B.SURFACE,prefixes:_.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:B.SURFACE,prefixes:_.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:B.SURFACE,prefixes:_.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:B.SURFACE,prefixes:_.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:B.SURFACE,prefixes:_.NONE,value:1e4,offset:0},m3:{name:"m3",base:B.VOLUME,prefixes:_.CUBIC,value:1,offset:0},L:{name:"L",base:B.VOLUME,prefixes:_.SHORT,value:.001,offset:0},l:{name:"l",base:B.VOLUME,prefixes:_.SHORT,value:.001,offset:0},litre:{name:"litre",base:B.VOLUME,prefixes:_.LONG,value:.001,offset:0},cuin:{name:"cuin",base:B.VOLUME,prefixes:_.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:B.VOLUME,prefixes:_.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:B.VOLUME,prefixes:_.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:B.VOLUME,prefixes:_.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:B.VOLUME,prefixes:_.NONE,value:15e-6,offset:0},drop:{name:"drop",base:B.VOLUME,prefixes:_.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:B.VOLUME,prefixes:_.NONE,value:5e-8,offset:0},minim:{name:"minim",base:B.VOLUME,prefixes:_.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:B.VOLUME,prefixes:_.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:B.VOLUME,prefixes:_.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:B.VOLUME,prefixes:_.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:B.VOLUME,prefixes:_.NONE,value:1e-6,offset:0},cup:{name:"cup",base:B.VOLUME,prefixes:_.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:B.VOLUME,prefixes:_.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:B.VOLUME,prefixes:_.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:B.VOLUME,prefixes:_.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:B.VOLUME,prefixes:_.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:B.VOLUME,prefixes:_.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:B.VOLUME,prefixes:_.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:B.VOLUME,prefixes:_.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:B.VOLUME,prefixes:_.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:B.VOLUME,prefixes:_.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:B.VOLUME,prefixes:_.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:B.VOLUME,prefixes:_.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:B.VOLUME,prefixes:_.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:B.VOLUME,prefixes:_.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:B.VOLUME,prefixes:_.NONE,value:.1173478,offset:0},obl:{name:"obl",base:B.VOLUME,prefixes:_.NONE,value:.1589873,offset:0},g:{name:"g",base:B.MASS,prefixes:_.SHORT,value:.001,offset:0},gram:{name:"gram",base:B.MASS,prefixes:_.LONG,value:.001,offset:0},ton:{name:"ton",base:B.MASS,prefixes:_.SHORT,value:907.18474,offset:0},t:{name:"t",base:B.MASS,prefixes:_.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:B.MASS,prefixes:_.LONG,value:1e3,offset:0},grain:{name:"grain",base:B.MASS,prefixes:_.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:B.MASS,prefixes:_.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:B.MASS,prefixes:_.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:B.MASS,prefixes:_.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:B.MASS,prefixes:_.NONE,value:45.359237,offset:0},stick:{name:"stick",base:B.MASS,prefixes:_.NONE,value:.115,offset:0},stone:{name:"stone",base:B.MASS,prefixes:_.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:B.MASS,prefixes:_.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:B.MASS,prefixes:_.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:B.MASS,prefixes:_.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:B.MASS,prefixes:_.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:B.MASS,prefixes:_.NONE,value:45.359237,offset:0},s:{name:"s",base:B.TIME,prefixes:_.SHORT,value:1,offset:0},min:{name:"min",base:B.TIME,prefixes:_.NONE,value:60,offset:0},h:{name:"h",base:B.TIME,prefixes:_.NONE,value:3600,offset:0},second:{name:"second",base:B.TIME,prefixes:_.LONG,value:1,offset:0},sec:{name:"sec",base:B.TIME,prefixes:_.LONG,value:1,offset:0},minute:{name:"minute",base:B.TIME,prefixes:_.NONE,value:60,offset:0},hour:{name:"hour",base:B.TIME,prefixes:_.NONE,value:3600,offset:0},day:{name:"day",base:B.TIME,prefixes:_.NONE,value:86400,offset:0},week:{name:"week",base:B.TIME,prefixes:_.NONE,value:7*86400,offset:0},month:{name:"month",base:B.TIME,prefixes:_.NONE,value:2629800,offset:0},year:{name:"year",base:B.TIME,prefixes:_.NONE,value:31557600,offset:0},decade:{name:"decade",base:B.TIME,prefixes:_.NONE,value:315576e3,offset:0},century:{name:"century",base:B.TIME,prefixes:_.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:B.TIME,prefixes:_.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:B.FREQUENCY,prefixes:_.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:B.FREQUENCY,prefixes:_.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:B.ANGLE,prefixes:_.SHORT,value:1,offset:0},radian:{name:"radian",base:B.ANGLE,prefixes:_.LONG,value:1,offset:0},deg:{name:"deg",base:B.ANGLE,prefixes:_.SHORT,value:null,offset:0},degree:{name:"degree",base:B.ANGLE,prefixes:_.LONG,value:null,offset:0},grad:{name:"grad",base:B.ANGLE,prefixes:_.SHORT,value:null,offset:0},gradian:{name:"gradian",base:B.ANGLE,prefixes:_.LONG,value:null,offset:0},cycle:{name:"cycle",base:B.ANGLE,prefixes:_.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:B.ANGLE,prefixes:_.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:B.ANGLE,prefixes:_.NONE,value:null,offset:0},A:{name:"A",base:B.CURRENT,prefixes:_.SHORT,value:1,offset:0},ampere:{name:"ampere",base:B.CURRENT,prefixes:_.LONG,value:1,offset:0},K:{name:"K",base:B.TEMPERATURE,prefixes:_.SHORT,value:1,offset:0},degC:{name:"degC",base:B.TEMPERATURE,prefixes:_.SHORT,value:1,offset:273.15},degF:{name:"degF",base:B.TEMPERATURE,prefixes:_.SHORT,value:new x(5,9),offset:459.67},degR:{name:"degR",base:B.TEMPERATURE,prefixes:_.SHORT,value:new x(5,9),offset:0},kelvin:{name:"kelvin",base:B.TEMPERATURE,prefixes:_.LONG,value:1,offset:0},celsius:{name:"celsius",base:B.TEMPERATURE,prefixes:_.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:B.TEMPERATURE,prefixes:_.LONG,value:new x(5,9),offset:459.67},rankine:{name:"rankine",base:B.TEMPERATURE,prefixes:_.LONG,value:new x(5,9),offset:0},mol:{name:"mol",base:B.AMOUNT_OF_SUBSTANCE,prefixes:_.SHORT,value:1,offset:0},mole:{name:"mole",base:B.AMOUNT_OF_SUBSTANCE,prefixes:_.LONG,value:1,offset:0},cd:{name:"cd",base:B.LUMINOUS_INTENSITY,prefixes:_.SHORT,value:1,offset:0},candela:{name:"candela",base:B.LUMINOUS_INTENSITY,prefixes:_.LONG,value:1,offset:0},N:{name:"N",base:B.FORCE,prefixes:_.SHORT,value:1,offset:0},newton:{name:"newton",base:B.FORCE,prefixes:_.LONG,value:1,offset:0},dyn:{name:"dyn",base:B.FORCE,prefixes:_.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:B.FORCE,prefixes:_.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:B.FORCE,prefixes:_.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:B.FORCE,prefixes:_.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:B.FORCE,prefixes:_.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:B.FORCE,prefixes:_.NONE,value:9.80665,offset:0},J:{name:"J",base:B.ENERGY,prefixes:_.SHORT,value:1,offset:0},joule:{name:"joule",base:B.ENERGY,prefixes:_.LONG,value:1,offset:0},erg:{name:"erg",base:B.ENERGY,prefixes:_.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:B.ENERGY,prefixes:_.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:B.ENERGY,prefixes:_.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:B.ENERGY,prefixes:_.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:B.ENERGY,prefixes:_.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:B.POWER,prefixes:_.SHORT,value:1,offset:0},watt:{name:"watt",base:B.POWER,prefixes:_.LONG,value:1,offset:0},hp:{name:"hp",base:B.POWER,prefixes:_.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:B.POWER,prefixes:_.SHORT,value:d.I,offset:0},VA:{name:"VA",base:B.POWER,prefixes:_.SHORT,value:1,offset:0},Pa:{name:"Pa",base:B.PRESSURE,prefixes:_.SHORT,value:1,offset:0},psi:{name:"psi",base:B.PRESSURE,prefixes:_.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:B.PRESSURE,prefixes:_.NONE,value:101325,offset:0},bar:{name:"bar",base:B.PRESSURE,prefixes:_.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:B.PRESSURE,prefixes:_.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:B.PRESSURE,prefixes:_.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:B.PRESSURE,prefixes:_.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:B.PRESSURE,prefixes:_.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:B.ELECTRIC_CHARGE,prefixes:_.LONG,value:1,offset:0},C:{name:"C",base:B.ELECTRIC_CHARGE,prefixes:_.SHORT,value:1,offset:0},farad:{name:"farad",base:B.ELECTRIC_CAPACITANCE,prefixes:_.LONG,value:1,offset:0},F:{name:"F",base:B.ELECTRIC_CAPACITANCE,prefixes:_.SHORT,value:1,offset:0},volt:{name:"volt",base:B.ELECTRIC_POTENTIAL,prefixes:_.LONG,value:1,offset:0},V:{name:"V",base:B.ELECTRIC_POTENTIAL,prefixes:_.SHORT,value:1,offset:0},ohm:{name:"ohm",base:B.ELECTRIC_RESISTANCE,prefixes:_.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:B.ELECTRIC_INDUCTANCE,prefixes:_.LONG,value:1,offset:0},H:{name:"H",base:B.ELECTRIC_INDUCTANCE,prefixes:_.SHORT,value:1,offset:0},siemens:{name:"siemens",base:B.ELECTRIC_CONDUCTANCE,prefixes:_.LONG,value:1,offset:0},S:{name:"S",base:B.ELECTRIC_CONDUCTANCE,prefixes:_.SHORT,value:1,offset:0},weber:{name:"weber",base:B.MAGNETIC_FLUX,prefixes:_.LONG,value:1,offset:0},Wb:{name:"Wb",base:B.MAGNETIC_FLUX,prefixes:_.SHORT,value:1,offset:0},tesla:{name:"tesla",base:B.MAGNETIC_FLUX_DENSITY,prefixes:_.LONG,value:1,offset:0},T:{name:"T",base:B.MAGNETIC_FLUX_DENSITY,prefixes:_.SHORT,value:1,offset:0},b:{name:"b",base:B.BIT,prefixes:_.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:B.BIT,prefixes:_.BINARY_LONG,value:1,offset:0},B:{name:"B",base:B.BIT,prefixes:_.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:B.BIT,prefixes:_.BINARY_LONG,value:8,offset:0}},re={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function fe(j){if(j.number==="BigNumber"){var X=Ss(v);z.rad.value=new v(1),z.deg.value=X.div(180),z.grad.value=X.div(200),z.cycle.value=X.times(2),z.arcsec.value=X.div(648e3),z.arcmin.value=X.div(10800)}else z.rad.value=1,z.deg.value=Math.PI/180,z.grad.value=Math.PI/200,z.cycle.value=Math.PI*2,z.arcsec.value=Math.PI/648e3,z.arcmin.value=Math.PI/10800;z.radian.value=z.rad.value,z.degree.value=z.deg.value,z.gradian.value=z.grad.value}fe(r),t&&t("config",function(j,X){j.number!==X.number&&fe(j)});var L={si:{NONE:{unit:Q,prefix:_.NONE[""]},LENGTH:{unit:z.m,prefix:_.SHORT[""]},MASS:{unit:z.g,prefix:_.SHORT.k},TIME:{unit:z.s,prefix:_.SHORT[""]},CURRENT:{unit:z.A,prefix:_.SHORT[""]},TEMPERATURE:{unit:z.K,prefix:_.SHORT[""]},LUMINOUS_INTENSITY:{unit:z.cd,prefix:_.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:z.mol,prefix:_.SHORT[""]},ANGLE:{unit:z.rad,prefix:_.SHORT[""]},BIT:{unit:z.bits,prefix:_.SHORT[""]},FORCE:{unit:z.N,prefix:_.SHORT[""]},ENERGY:{unit:z.J,prefix:_.SHORT[""]},POWER:{unit:z.W,prefix:_.SHORT[""]},PRESSURE:{unit:z.Pa,prefix:_.SHORT[""]},ELECTRIC_CHARGE:{unit:z.C,prefix:_.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:z.F,prefix:_.SHORT[""]},ELECTRIC_POTENTIAL:{unit:z.V,prefix:_.SHORT[""]},ELECTRIC_RESISTANCE:{unit:z.ohm,prefix:_.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:z.H,prefix:_.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:z.S,prefix:_.SHORT[""]},MAGNETIC_FLUX:{unit:z.Wb,prefix:_.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:z.T,prefix:_.SHORT[""]},FREQUENCY:{unit:z.Hz,prefix:_.SHORT[""]}}};L.cgs=JSON.parse(JSON.stringify(L.si)),L.cgs.LENGTH={unit:z.m,prefix:_.SHORT.c},L.cgs.MASS={unit:z.g,prefix:_.SHORT[""]},L.cgs.FORCE={unit:z.dyn,prefix:_.SHORT[""]},L.cgs.ENERGY={unit:z.erg,prefix:_.NONE[""]},L.us=JSON.parse(JSON.stringify(L.si)),L.us.LENGTH={unit:z.ft,prefix:_.NONE[""]},L.us.MASS={unit:z.lbm,prefix:_.NONE[""]},L.us.TEMPERATURE={unit:z.degF,prefix:_.NONE[""]},L.us.FORCE={unit:z.lbf,prefix:_.NONE[""]},L.us.ENERGY={unit:z.BTU,prefix:_.BTU[""]},L.us.POWER={unit:z.hp,prefix:_.NONE[""]},L.us.PRESSURE={unit:z.psi,prefix:_.NONE[""]},L.auto=JSON.parse(JSON.stringify(L.si));var I=L.auto;g.setUnitSystem=function(j){if(Ie(L,j))I=L[j];else throw new Error("Unit system "+j+" does not exist. Choices are: "+Object.keys(L).join(", "))},g.getUnitSystem=function(){for(var j in L)if(Ie(L,j)&&L[j]===I)return j},g.typeConverters={BigNumber:function(X){return X!=null&&X.isFraction?new v(X.n).div(X.d).times(X.s):new v(X+"")},Fraction:function(X){return new x(X)},Complex:function(X){return X},number:function(X){return X!=null&&X.isFraction?h(X):X}},g.prototype._numberConverter=function(){var j=g.typeConverters[this.valueType()];if(j)return j;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},g._getNumberConverter=function(j){if(!g.typeConverters[j])throw new TypeError('Unsupported type "'+j+'"');return g.typeConverters[j]};for(var $ in z)if(Ie(z,$)){var H=z[$];H.dimensions=H.base.dimensions}for(var ae in re)if(Ie(re,ae)){var ce=z[re[ae]],me={};for(var Ne in ce)Ie(ce,Ne)&&(me[Ne]=ce[Ne]);me.name=ae,z[ae]=me}g.isValidAlpha=function(X){return/^[a-zA-Z]$/.test(X)};function Me(j){for(var X=0;X0&&!(g.isValidAlpha(b)||w(b)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+j+'"')}}return g.createUnit=function(j,X){if(typeof j!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(X&&X.override){for(var se in j)if(Ie(j,se)&&g.deleteUnit(se),j[se].aliases)for(var K=0;K"u"||X===null)&&(X={}),typeof j!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Ie(z,j))throw new Error('Cannot create unit "'+j+'": a unit with that name already exists');Me(j);var se=null,K=[],ee=0,ne,ve,ge;if(X&&X.type==="Unit")se=X.clone();else if(typeof X=="string")X!==""&&(ne=X);else if(typeof X=="object")ne=X.definition,ve=X.prefixes,ee=X.offset,ge=X.baseName,X.aliases&&(K=X.aliases.valueOf());else throw new TypeError('Cannot create unit "'+j+'" from "'+X.toString()+'": expecting "string" or "Unit" or "Object"');if(K){for(var Oe=0;Oe1e-12){oe=!1;break}if(oe){Et=!0,ye.base=B[W];break}}if(!Et){ge=ge||j+"_STUFF";var be={dimensions:se.dimensions.slice(0)};be.key=ge,B[ge]=be,I[ge]={unit:ye,prefix:_.NONE[""]},ye.base=B[ge]}}else{if(ge=ge||j+"_STUFF",q.indexOf(ge)>=0)throw new Error('Cannot create new base unit "'+j+'": a base unit with that name already exists (and cannot be overridden)');q.push(ge);for(var Qe in B)Ie(B,Qe)&&(B[Qe].dimensions[q.length-1]=0);for(var rt={dimensions:[]},mt=0;mt{var{typed:t,Unit:r}=e;return t(KN,{Unit:function(a){return a.clone()},string:function(a){return r.isValuelessUnit(a)?new r(null,a):r.parse(a,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(a,i){return new r(a,i)},"number | BigNumber | Fraction":function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var WN="sparse",EU=["typed","SparseMatrix"],d0=C(WN,EU,e=>{var{typed:t,SparseMatrix:r}=e;return t(WN,{"":function(){return new r([])},string:function(a){return new r([],a)},"Array | Matrix":function(a){return new r(a)},"Array | Matrix, string":function(a,i){return new r(a,i)}})});var QN="createUnit",AU=["typed","Unit"],h0=C(QN,AU,e=>{var{typed:t,Unit:r}=e;return t(QN,{"Object, Object":function(a,i){return r.createUnit(a,i)},Object:function(a){return r.createUnit(a,{})},"string, Unit | string | Object, Object":function(a,i,o){var l={};return l[a]=i,r.createUnit(l,o)},"string, Unit | string | Object":function(a,i){var o={};return o[a]=i,r.createUnit(o,{})},string:function(a){var i={};return i[a]={},r.createUnit(i,{})}})});var ZN="acos",NU=["typed","config","Complex"],v0=C(ZN,NU,e=>{var{typed:t,config:r,Complex:n}=e;return t(ZN,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.acos(i):new n(i,0).acos()},Complex:function(i){return i.acos()},BigNumber:function(i){return i.acos()}})});var JN="acosh",TU=["typed","config","Complex"],g0=C(JN,TU,e=>{var{typed:t,config:r,Complex:n}=e;return t(JN,{number:function(i){return i>=1||r.predictable?Wm(i):i<=-1?new n(Math.log(Math.sqrt(i*i-1)-i),Math.PI):new n(i,0).acosh()},Complex:function(i){return i.acosh()},BigNumber:function(i){return i.acosh()}})});var eT="acot",wU=["typed","BigNumber"],x0=C(eT,wU,e=>{var{typed:t,BigNumber:r}=e;return t(eT,{number:Qm,Complex:function(a){return a.acot()},BigNumber:function(a){return new r(1).div(a).atan()}})});var tT="acoth",DU=["typed","config","Complex","BigNumber"],b0=C(tT,DU,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(tT,{number:function(o){return o>=1||o<=-1||r.predictable?Zm(o):new n(o,0).acoth()},Complex:function(o){return o.acoth()},BigNumber:function(o){return new a(1).div(o).atanh()}})});var rT="acsc",SU=["typed","config","Complex","BigNumber"],y0=C(rT,SU,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(rT,{number:function(o){return o<=-1||o>=1||r.predictable?Jm(o):new n(o,0).acsc()},Complex:function(o){return o.acsc()},BigNumber:function(o){return new a(1).div(o).asin()}})});var nT="acsch",CU=["typed","BigNumber"],E0=C(nT,CU,e=>{var{typed:t,BigNumber:r}=e;return t(nT,{number:ed,Complex:function(a){return a.acsch()},BigNumber:function(a){return new r(1).div(a).asinh()}})});var aT="asec",_U=["typed","config","Complex","BigNumber"],A0=C(aT,_U,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(aT,{number:function(o){return o<=-1||o>=1||r.predictable?td(o):new n(o,0).asec()},Complex:function(o){return o.asec()},BigNumber:function(o){return new a(1).div(o).acos()}})});var iT="asech",MU=["typed","config","Complex","BigNumber"],N0=C(iT,MU,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(iT,{number:function(o){if(o<=1&&o>=-1||r.predictable){var l=1/o;if(l>0||r.predictable)return rd(o);var u=Math.sqrt(l*l-1);return new n(Math.log(u-l),Math.PI)}return new n(o,0).asech()},Complex:function(o){return o.asech()},BigNumber:function(o){return new a(1).div(o).acosh()}})});var oT="asin",OU=["typed","config","Complex"],T0=C(oT,OU,e=>{var{typed:t,config:r,Complex:n}=e;return t(oT,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.asin(i):new n(i,0).asin()},Complex:function(i){return i.asin()},BigNumber:function(i){return i.asin()}})});var RU="asinh",FU=["typed"],w0=C(RU,FU,e=>{var{typed:t}=e;return t("asinh",{number:nd,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})});var IU="atan",BU=["typed"],D0=C(IU,BU,e=>{var{typed:t}=e;return t("atan",{number:function(n){return Math.atan(n)},Complex:function(n){return n.atan()},BigNumber:function(n){return n.atan()}})});var sT="atan2",LU=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],S0=C(sT,LU,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,DenseMatrix:i,concat:o}=e,l=Yt({typed:t,equalScalar:n}),u=wt({typed:t}),s=al({typed:t,equalScalar:n}),c=gt({typed:t,equalScalar:n}),p=lt({typed:t,DenseMatrix:i}),f=We({typed:t,matrix:r,concat:o});return t(sT,{"number, number":Math.atan2,"BigNumber, BigNumber":(m,h)=>a.atan2(m,h)},f({scalar:"number | BigNumber",SS:s,DS:u,SD:l,Ss:c,sS:p}))});var uT="atanh",PU=["typed","config","Complex"],C0=C(uT,PU,e=>{var{typed:t,config:r,Complex:n}=e;return t(uT,{number:function(i){return i<=1&&i>=-1||r.predictable?ad(i):new n(i,0).atanh()},Complex:function(i){return i.atanh()},BigNumber:function(i){return i.atanh()}})});var mn=C("trigUnit",["typed"],e=>{var{typed:t}=e;return{Unit:t.referToSelf(r=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return t.find(r,n.valueType())(n.value)})}});var cT="cos",UU=["typed"],_0=C(cT,UU,e=>{var{typed:t}=e,r=mn({typed:t});return t(cT,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},r)});var lT="cosh",kU=["typed"],M0=C(lT,kU,e=>{var{typed:t}=e;return t(lT,{number:gc,"Complex | BigNumber":r=>r.cosh()})});var pT="cot",qU=["typed","BigNumber"],O0=C(pT,qU,e=>{var{typed:t,BigNumber:r}=e,n=mn({typed:t});return t(pT,{number:id,Complex:a=>a.cot(),BigNumber:a=>new r(1).div(a.tan())},n)});var fT="coth",HU=["typed","BigNumber"],R0=C(fT,HU,e=>{var{typed:t,BigNumber:r}=e;return t(fT,{number:od,Complex:n=>n.coth(),BigNumber:n=>new r(1).div(n.tanh())})});var mT="csc",zU=["typed","BigNumber"],F0=C(mT,zU,e=>{var{typed:t,BigNumber:r}=e,n=mn({typed:t});return t(mT,{number:sd,Complex:a=>a.csc(),BigNumber:a=>new r(1).div(a.sin())},n)});var dT="csch",GU=["typed","BigNumber"],I0=C(dT,GU,e=>{var{typed:t,BigNumber:r}=e;return t(dT,{number:ud,Complex:n=>n.csch(),BigNumber:n=>new r(1).div(n.sinh())})});var hT="sec",YU=["typed","BigNumber"],B0=C(hT,YU,e=>{var{typed:t,BigNumber:r}=e,n=mn({typed:t});return t(hT,{number:cd,Complex:a=>a.sec(),BigNumber:a=>new r(1).div(a.cos())},n)});var vT="sech",jU=["typed","BigNumber"],L0=C(vT,jU,e=>{var{typed:t,BigNumber:r}=e;return t(vT,{number:ld,Complex:n=>n.sech(),BigNumber:n=>new r(1).div(n.cosh())})});var gT="sin",VU=["typed"],P0=C(gT,VU,e=>{var{typed:t}=e,r=mn({typed:t});return t(gT,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},r)});var xT="sinh",$U=["typed"],U0=C(xT,$U,e=>{var{typed:t}=e;return t(xT,{number:pd,"Complex | BigNumber":r=>r.sinh()})});var bT="tan",XU=["typed"],k0=C(bT,XU,e=>{var{typed:t}=e,r=mn({typed:t});return t(bT,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},r)});var KU="tanh",WU=["typed"],q0=C(KU,WU,e=>{var{typed:t}=e;return t("tanh",{number:xc,"Complex | BigNumber":r=>r.tanh()})});var yT="setCartesian",QU=["typed","size","subset","compareNatural","Index","DenseMatrix"],H0=C(yT,QU,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(yT,{"Array | Matrix, Array | Matrix":function(u,s){var c=[];if(n(r(u),new i(0))!==0&&n(r(s),new i(0))!==0){var p=Ze(Array.isArray(u)?u:u.toArray()).sort(a),f=Ze(Array.isArray(s)?s:s.toArray()).sort(a);c=[];for(var m=0;m{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ET,{"Array | Matrix, Array | Matrix":function(u,s){var c;if(n(r(u),new i(0))===0)c=[];else{if(n(r(s),new i(0))===0)return Ze(u.toArray());var p=ta(Ze(Array.isArray(u)?u:u.toArray()).sort(a)),f=ta(Ze(Array.isArray(s)?s:s.toArray()).sort(a));c=[];for(var m,h=0;h{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(AT,{"Array | Matrix":function(u){var s;if(n(r(u),new i(0))===0)s=[];else{var c=Ze(Array.isArray(u)?u:u.toArray()).sort(a);s=[],s.push(c[0]);for(var p=1;p{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(NT,{"Array | Matrix, Array | Matrix":function(u,s){var c;if(n(r(u),new i(0))===0||n(r(s),new i(0))===0)c=[];else{var p=ta(Ze(Array.isArray(u)?u:u.toArray()).sort(a)),f=ta(Ze(Array.isArray(s)?s:s.toArray()).sort(a));c=[];for(var m=0;m{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(TT,{"Array | Matrix, Array | Matrix":function(l,u){if(n(r(l),new i(0))===0)return!0;if(n(r(u),new i(0))===0)return!1;for(var s=ta(Ze(Array.isArray(l)?l:l.toArray()).sort(a)),c=ta(Ze(Array.isArray(u)?u:u.toArray()).sort(a)),p,f=0;f{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(wT,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(l,u){if(n(r(u),new i(0))===0)return 0;for(var s=Ze(Array.isArray(u)?u:u.toArray()),c=0,p=0;p{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(DT,{"Array | Matrix":function(s){if(n(r(s),new i(0))===0)return[];for(var c=Ze(Array.isArray(s)?s:s.toArray()).sort(a),p=[],f=0;f.toString(2).length<=c.length;)p.push(o(c,f.toString(2).split("").reverse())),f++;return l(p)}});function o(u,s){for(var c=[],p=0;p0;c--)for(var p=0;pu[p+1].length&&(s=u[p],u[p]=u[p+1],u[p+1]=s);return u}});var ST="setSize",ak=["typed","compareNatural"],X0=C(ST,ak,e=>{var{typed:t,compareNatural:r}=e;return t(ST,{"Array | Matrix":function(a){return Array.isArray(a)?Ze(a).length:Ze(a.toArray()).length},"Array | Matrix, boolean":function(a,i){if(i===!1||a.length===0)return Array.isArray(a)?Ze(a).length:Ze(a.toArray()).length;for(var o=Ze(Array.isArray(a)?a:a.toArray()).sort(r),l=1,u=1;u{var{typed:t,size:r,concat:n,subset:a,setDifference:i,Index:o}=e;return t(CT,{"Array | Matrix, Array | Matrix":function(u,s){if(a(r(u),new o(0))===0)return Ze(s);if(a(r(s),new o(0))===0)return Ze(u);var c=Ze(u),p=Ze(s);return n(i(c,p),i(p,c))}})});var _T="setUnion",ok=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],W0=C(_T,ok,e=>{var{typed:t,size:r,concat:n,subset:a,setIntersect:i,setSymDifference:o,Index:l}=e;return t(_T,{"Array | Matrix, Array | Matrix":function(s,c){if(a(r(s),new l(0))===0)return Ze(c);if(a(r(c),new l(0))===0)return Ze(s);var p=Ze(s),f=Ze(c);return n(o(p,f),i(p,f))}})});var MT="add",sk=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],Dl=C(MT,sk,e=>{var{typed:t,matrix:r,addScalar:n,equalScalar:a,DenseMatrix:i,SparseMatrix:o,concat:l}=e,u=xr({typed:t}),s=Xi({typed:t,equalScalar:a}),c=Lr({typed:t,DenseMatrix:i}),p=We({typed:t,matrix:r,concat:l});return t(MT,{"any, any":n,"any, any, ...any":t.referToSelf(f=>(m,h,d)=>{for(var v=f(m,h),x=0;x{var{typed:t,abs:r,addScalar:n,divideScalar:a,multiplyScalar:i,sqrt:o,smaller:l,isPositive:u}=e;return t(OT,{"... number | BigNumber":s,Array:s,Matrix:c=>s(Ze(c.toArray()))});function s(c){for(var p=0,f=0,m=0;m{var{typed:t,abs:r,add:n,pow:a,conj:i,sqrt:o,multiply:l,equalScalar:u,larger:s,smaller:c,matrix:p,ctranspose:f,eigs:m}=e;return t(RT,{number:Math.abs,Complex:function(A){return A.abs()},BigNumber:function(A){return A.abs()},boolean:function(A){return Math.abs(A)},Array:function(A){return b(p(A),2)},Matrix:function(A){return b(A,2)},"Array, number | BigNumber | string":function(A,w){return b(p(A),w)},"Matrix, number | BigNumber | string":function(A,w){return b(A,w)}});function h(S){var A=0;return S.forEach(function(w){var D=r(w);s(D,A)&&(A=D)},!0),A}function d(S){var A;return S.forEach(function(w){var D=r(w);(!A||c(D,A))&&(A=D)},!0),A||0}function v(S,A){if(A===Number.POSITIVE_INFINITY||A==="inf")return h(S);if(A===Number.NEGATIVE_INFINITY||A==="-inf")return d(S);if(A==="fro")return b(S,2);if(typeof A=="number"&&!isNaN(A)){if(!u(A,0)){var w=0;return S.forEach(function(D){w=n(a(r(D),A),w)},!0),a(w,1/A)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function x(S){var A=0;return S.forEach(function(w,D){A=n(A,l(w,i(w)))}),r(o(A))}function N(S){var A=[],w=0;return S.forEach(function(D,F){var R=F[1],P=n(A[R]||0,r(D));s(P,w)&&(w=P),A[R]=P},!0),w}function g(S){var A=S.size();if(A[0]!==A[1])throw new RangeError("Invalid matrix dimensions");var w=f(S),D=l(w,S),F=m(D).values.toArray(),R=F[F.length-1];return r(o(R))}function y(S){var A=[],w=0;return S.forEach(function(D,F){var R=F[0],P=n(A[R]||0,r(D));s(P,w)&&(w=P),A[R]=P},!0),w}function E(S,A){if(A===1)return N(S);if(A===Number.POSITIVE_INFINITY||A==="inf")return y(S);if(A==="fro")return x(S);if(A===2)return g(S);throw new Error("Unsupported parameter value "+A)}function b(S,A){var w=S.size();if(w.length===1)return v(S,A);if(w.length===2){if(w[0]&&w[1])return E(S,A);throw new RangeError("Invalid matrix dimensions")}}});var FT="dot",lk=["typed","addScalar","multiplyScalar","conj","size"],Sl=C(FT,lk,e=>{var{typed:t,addScalar:r,multiplyScalar:n,conj:a,size:i}=e;return t(FT,{"Array | DenseMatrix, Array | DenseMatrix":l,"SparseMatrix, SparseMatrix":u});function o(c,p){var f=s(c),m=s(p),h,d;if(f.length===1)h=f[0];else if(f.length===2&&f[1]===1)h=f[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+f.join(", ")+")");if(m.length===1)d=m[0];else if(m.length===2&&m[1]===1)d=m[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+m.join(", ")+")");if(h!==d)throw new RangeError("Vectors must have equal length ("+h+" != "+d+")");if(h===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return h}function l(c,p){var f=o(c,p),m=Fe(c)?c._data:c,h=Fe(c)?c._datatype||c.getDataType():void 0,d=Fe(p)?p._data:p,v=Fe(p)?p._datatype||p.getDataType():void 0,x=s(c).length===2,N=s(p).length===2,g=r,y=n;if(h&&v&&h===v&&typeof h=="string"&&h!=="mixed"){var E=h;g=t.find(r,[E,E]),y=t.find(n,[E,E])}if(!x&&!N){for(var b=y(a(m[0]),d[0]),S=1;Sb){y++;continue}E===b&&(v=x(v,N(m[g],d[y])),g++,y++)}return v}function s(c){return Fe(c)?c.size():i(c)}});var pk="trace",fk=["typed","matrix","add"],J0=C(pk,fk,e=>{var{typed:t,matrix:r,add:n}=e;return t("trace",{Array:function(l){return a(r(l))},SparseMatrix:i,DenseMatrix:a,any:qe});function a(o){var l=o._size,u=o._data;switch(l.length){case 1:if(l[0]===1)return qe(u[0]);throw new RangeError("Matrix must be square (size: "+je(l)+")");case 2:{var s=l[0],c=l[1];if(s===c){for(var p=0,f=0;f0)for(var h=0;hh)break}return m}throw new RangeError("Matrix must be square (size: "+je(c)+")")}});var IT="index",mk=["typed","Index"],ev=C(IT,mk,e=>{var{typed:t,Index:r}=e;return t(IT,{"...number | string | BigNumber | Range | Array | Matrix":function(a){var i=a.map(function(l){return Ue(l)?l.toNumber():at(l)||Fe(l)?l.map(function(u){return Ue(u)?u.toNumber():u}):l}),o=new r;return r.apply(o,i),o}})});var Cl=new Set(["end"]);var dk="Node",hk=["mathWithTransform"],BT=C(dk,hk,e=>{var{mathWithTransform:t}=e;function r(a){for(var i of[...Cl])if(a.has(i))throw new Error('Scope contains an illegal symbol, "'+i+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(i){return this.compile().evaluate(i)}compile(){var i=this._compile(t,{}),o={},l=null;function u(s){var c=Jn(s);return r(c),i(c,o,l)}return{evaluate:u}}_compile(i,o){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(i){throw new Error("Cannot run forEach on a Node interface")}map(i){throw new Error("Cannot run map on a Node interface")}_ifNode(i){if(!nt(i))throw new TypeError("Callback function must return a Node");return i}traverse(i){i(this,null,null);function o(l,u){l.forEach(function(s,c,p){u(s,c,p),o(s,u)})}o(this,i)}transform(i){function o(l,u,s){var c=i(l,u,s);return c!==l?c:l.map(o)}return o(this,null,null)}filter(i){var o=[];return this.traverse(function(l,u,s){i(l,u,s)&&o.push(l)}),o}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(i){return i.cloneDeep()})}equals(i){return i?this.type===i.type&&Nn(this,i):!1}toString(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toString(i)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toHTML(i)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toTex(i)}_toTex(i){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(i){if(i&&typeof i=="object")switch(typeof i.handler){case"object":case"undefined":return;case"function":return i.handler(this,i);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});var LT=Le(ir(),1);function Dt(e){return e&&e.isIndexError?new nr(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function _l(e){var{subset:t}=e;return function(n,a){try{if(Array.isArray(n))return t(n,a);if(n&&typeof n.subset=="function")return n.subset(a);if(typeof n=="string")return t(n,a);if(typeof n=="object"){if(!a.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return Ot(n,a.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw Dt(i)}}}var Ml="AccessorNode",vk=["subset","Node"],PT=C(Ml,vk,e=>{var{subset:t,Node:r}=e,n=_l({subset:t});function a(o){return!(wr(o)||Jt(o)||et(o)||pr(o)||qn(o)||er(o)||bt(o))}class i extends r{constructor(l,u){if(super(),!nt(l))throw new TypeError('Node expected for parameter "object"');if(!Rr(u))throw new TypeError('IndexNode expected for parameter "index"');this.object=l,this.index=u}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Ml}get isAccessorNode(){return!0}_compile(l,u){var s=this.object._compile(l,u),c=this.index._compile(l,u);if(this.index.isObjectProperty()){var p=this.index.getObjectProperty();return function(m,h,d){return Ot(s(m,h,d),p)}}else return function(m,h,d){var v=s(m,h,d),x=c(m,h,v);return n(v,x)}}forEach(l){l(this.object,"object",this),l(this.index,"index",this)}map(l){return new i(this._ifNode(l(this.object,"object",this)),this._ifNode(l(this.index,"index",this)))}clone(){return new i(this.object,this.index)}_toString(l){var u=this.object.toString(l);return a(this.object)&&(u="("+u+")"),u+this.index.toString(l)}_toHTML(l){var u=this.object.toHTML(l);return a(this.object)&&(u='('+u+')'),u+this.index.toHTML(l)}_toTex(l){var u=this.object.toTex(l);return a(this.object)&&(u="\\left(' + object + '\\right)"),u+this.index.toTex(l)}toJSON(){return{mathjs:Ml,object:this.object,index:this.index}}static fromJSON(l){return new i(l.object,l.index)}}return(0,LT.default)(i,"name",Ml),i},{isClass:!0,isNode:!0});var UT=Le(ir(),1);var Ol="ArrayNode",gk=["Node"],kT=C(Ol,gk,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.items=a||[],!Array.isArray(this.items)||!this.items.every(nt))throw new TypeError("Array containing Nodes expected")}get type(){return Ol}get isArrayNode(){return!0}_compile(a,i){var o=Ir(this.items,function(s){return s._compile(a,i)}),l=a.config.matrix!=="Array";if(l){var u=a.matrix;return function(c,p,f){return u(Ir(o,function(m){return m(c,p,f)}))}}else return function(c,p,f){return Ir(o,function(m){return m(c,p,f)})}}forEach(a){for(var i=0;i['+i.join(',')+']'}_toTex(a){function i(o,l){var u=o.some(Jt)&&!o.every(Jt),s=l||u,c=s?"&":"\\\\",p=o.map(function(f){return f.items?i(f.items,!l):f.toTex(a)}).join(c);return u||!s||s&&!l?"\\begin{bmatrix}"+p+"\\end{bmatrix}":p}return i(this.items,!1)}}return(0,UT.default)(r,"name",Ol),r},{isClass:!0,isNode:!0});var zT=Le(ir(),1);function qT(e){var{subset:t,matrix:r}=e;return function(a,i,o){try{if(Array.isArray(a)){var l=r(a).subset(i,o).valueOf();return l.forEach((u,s)=>{a[s]=u}),a}else{if(a&&typeof a.subset=="function")return a.subset(i,o);if(typeof a=="string")return t(a,i,o);if(typeof a=="object"){if(!i.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return Hn(a,i.getObjectProperty(),o),a}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(u){throw Dt(u)}}}var dn=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function Rl(e,t){if(!t||t!=="auto")return e;for(var r=e;er(r);)r=r.content;return r}function ht(e,t,r,n){var a=e;t!=="keep"&&(a=e.getContent());for(var i=a.getIdentifier(),o=null,l=0;l{var{subset:t,matrix:r,Node:n}=e,a=_l({subset:t}),i=qT({subset:t,matrix:r});function o(u,s,c){s||(s="keep");var p=ht(u,s,c),f=ht(u.value,s,c);return s==="all"||f!==null&&f<=p}class l extends n{constructor(s,c,p){if(super(),this.object=s,this.index=p?c:null,this.value=p||c,!bt(s)&&!wr(s))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(bt(s)&&s.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!Rr(this.index))throw new TypeError('IndexNode expected as "index"');if(!nt(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Il}get isAssignmentNode(){return!0}_compile(s,c){var p=this.object._compile(s,c),f=this.index?this.index._compile(s,c):null,m=this.value._compile(s,c),h=this.object.name;if(this.index)if(this.index.isObjectProperty()){var d=this.index.getObjectProperty();return function(y,E,b){var S=p(y,E,b),A=m(y,E,b);return Hn(S,d,A),A}}else{if(bt(this.object))return function(y,E,b){var S=p(y,E,b),A=m(y,E,b),w=f(y,E,S);return y.set(h,i(S,w,A)),A};var v=this.object.object._compile(s,c);if(this.object.index.isObjectProperty()){var x=this.object.index.getObjectProperty();return function(y,E,b){var S=v(y,E,b),A=Ot(S,x),w=f(y,E,A),D=m(y,E,b);return Hn(S,x,i(A,w,D)),D}}else{var N=this.object.index._compile(s,c);return function(y,E,b){var S=v(y,E,b),A=N(y,E,S),w=a(S,A),D=f(y,E,w),F=m(y,E,b);return i(S,A,i(w,D,F)),F}}}else{if(!bt(this.object))throw new TypeError("SymbolNode expected as object");return function(y,E,b){var S=m(y,E,b);return y.set(h,S),S}}}forEach(s){s(this.object,"object",this),this.index&&s(this.index,"index",this),s(this.value,"value",this)}map(s){var c=this._ifNode(s(this.object,"object",this)),p=this.index?this._ifNode(s(this.index,"index",this)):null,f=this._ifNode(s(this.value,"value",this));return new l(c,p,f)}clone(){return new l(this.object,this.index,this.value)}_toString(s){var c=this.object.toString(s),p=this.index?this.index.toString(s):"",f=this.value.toString(s);return o(this,s&&s.parenthesis,s&&s.implicit)&&(f="("+f+")"),c+p+" = "+f}toJSON(){return{mathjs:Il,object:this.object,index:this.index,value:this.value}}static fromJSON(s){return new l(s.object,s.index,s.value)}_toHTML(s){var c=this.object.toHTML(s),p=this.index?this.index.toHTML(s):"",f=this.value.toHTML(s);return o(this,s&&s.parenthesis,s&&s.implicit)&&(f='('+f+')'),c+p+'='+f}_toTex(s){var c=this.object.toTex(s),p=this.index?this.index.toTex(s):"",f=this.value.toTex(s);return o(this,s&&s.parenthesis,s&&s.implicit)&&(f="\\left(".concat(f,"\\right)")),c+p+"="+f}}return(0,zT.default)(l,"name",Il),l},{isClass:!0,isNode:!0});var YT=Le(ir(),1);var Bl="BlockNode",bk=["ResultSet","Node"],jT=C(Bl,bk,e=>{var{ResultSet:t,Node:r}=e;class n extends r{constructor(i){if(super(),!Array.isArray(i))throw new Error("Array expected");this.blocks=i.map(function(o){var l=o&&o.node,u=o&&o.visible!==void 0?o.visible:!0;if(!nt(l))throw new TypeError('Property "node" must be a Node');if(typeof u!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:l,visible:u}})}get type(){return Bl}get isBlockNode(){return!0}_compile(i,o){var l=Ir(this.blocks,function(u){return{evaluate:u.node._compile(i,o),visible:u.visible}});return function(s,c,p){var f=[];return Na(l,function(h){var d=h.evaluate(s,c,p);h.visible&&f.push(d)}),new t(f)}}forEach(i){for(var o=0;o;')}).join('
')}_toTex(i){return this.blocks.map(function(o){return o.node.toTex(i)+(o.visible?"":";")}).join(`\\;\\; -`)}}return(0,jT.default)(n,"name",Bl),n},{isClass:!0,isNode:!0});var $T=Le(ir(),1);var Ll="ConditionalNode",yk=["Node"],XT=C(Ll,yk,e=>{var{Node:t}=e;function r(a){if(typeof a=="number"||typeof a=="boolean"||typeof a=="string")return!!a;if(a){if(Ue(a))return!a.isZero();if(Zt(a))return!!(a.re||a.im);if($t(a))return!!a.value}if(a==null)return!1;throw new TypeError('Unsupported type of condition "'+ut(a)+'"')}class n extends t{constructor(i,o,l){if(super(),!nt(i))throw new TypeError("Parameter condition must be a Node");if(!nt(o))throw new TypeError("Parameter trueExpr must be a Node");if(!nt(l))throw new TypeError("Parameter falseExpr must be a Node");this.condition=i,this.trueExpr=o,this.falseExpr=l}get type(){return Ll}get isConditionalNode(){return!0}_compile(i,o){var l=this.condition._compile(i,o),u=this.trueExpr._compile(i,o),s=this.falseExpr._compile(i,o);return function(p,f,m){return r(l(p,f,m))?u(p,f,m):s(p,f,m)}}forEach(i){i(this.condition,"condition",this),i(this.trueExpr,"trueExpr",this),i(this.falseExpr,"falseExpr",this)}map(i){return new n(this._ifNode(i(this.condition,"condition",this)),this._ifNode(i(this.trueExpr,"trueExpr",this)),this._ifNode(i(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=ht(this,o,i&&i.implicit),u=this.condition.toString(i),s=ht(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||s!==null&&s<=l)&&(u="("+u+")");var c=this.trueExpr.toString(i),p=ht(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||p!==null&&p<=l)&&(c="("+c+")");var f=this.falseExpr.toString(i),m=ht(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||m!==null&&m<=l)&&(f="("+f+")"),u+" ? "+c+" : "+f}toJSON(){return{mathjs:Ll,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(i){return new n(i.condition,i.trueExpr,i.falseExpr)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=ht(this,o,i&&i.implicit),u=this.condition.toHTML(i),s=ht(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||s!==null&&s<=l)&&(u='('+u+')');var c=this.trueExpr.toHTML(i),p=ht(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||p!==null&&p<=l)&&(c='('+c+')');var f=this.falseExpr.toHTML(i),m=ht(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||m!==null&&m<=l)&&(f='('+f+')'),u+'?'+c+':'+f}_toTex(i){return"\\begin{cases} {"+this.trueExpr.toTex(i)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(i)+"}\\\\{"+this.falseExpr.toTex(i)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return(0,$T.default)(n,"name",Ll),n},{isClass:!0,isNode:!0});var e2=Le(ir(),1);var ZT=Le(WT(),1);var rv={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},pt={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},nv={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(pt.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(pt.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(pt.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(pt.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(pt.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(pt.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(pt.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(pt.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(pt.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(pt.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(pt.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(pt.bitAnd,"${args[1]}\\right)")},bitNot:{1:pt.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(pt.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(pt.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(pt.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(pt.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(pt.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(pt.and,"${args[1]}\\right)")},not:{1:pt.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(pt.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(pt.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(pt.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(pt.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(pt.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(pt.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(pt.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(pt.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(pt.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(pt.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(pt.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(pt.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(pt.to,"${args[1]}\\right)")},numeric:function(t,r){return t.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(rv.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},JT="\\mathrm{${name}}\\left(${args}\\right)",QT={deg:"^\\circ"};function Pl(e){return(0,ZT.default)(e,{preserveFormatting:!0})}function Ul(e,t){return t=typeof t>"u"?!1:t,t?Ie(QT,e)?QT[e]:"\\mathrm{"+Pl(e)+"}":Ie(rv,e)?rv[e]:Pl(e)}var kl="ConstantNode",Tk=["Node"],t2=C(kl,Tk,e=>{var{Node:t}=e;class r extends t{constructor(a){super(),this.value=a}get type(){return kl}get isConstantNode(){return!0}_compile(a,i){var o=this.value;return function(){return o}}forEach(a){}map(a){return this.clone()}clone(){return new r(this.value)}_toString(a){return je(this.value,a)}_toHTML(a){var i=this._toString(a);switch(ut(this.value)){case"number":case"BigNumber":case"Fraction":return''+i+"";case"string":return''+i+"";case"boolean":return''+i+"";case"null":return''+i+"";case"undefined":return''+i+"";default:return''+i+""}}toJSON(){return{mathjs:kl,value:this.value}}static fromJSON(a){return new r(a.value)}_toTex(a){var i=this._toString(a),o=ut(this.value);switch(o){case"string":return"\\mathtt{"+Pl(i)+"}";case"number":case"BigNumber":{var l=o==="BigNumber"?this.value.isFinite():isFinite(this.value);if(!l)return this.value.valueOf()<0?"-\\infty":"\\infty";var u=i.toLowerCase().indexOf("e");return u!==-1?i.substring(0,u)+"\\cdot10^{"+i.substring(u+1)+"}":i}case"Fraction":return this.value.toLatex();default:return i}}}return(0,e2.default)(r,"name",kl),r},{isClass:!0,isNode:!0});var r2=Le(ir(),1);var ql="FunctionAssignmentNode",wk=["typed","Node"],n2=C(ql,wk,e=>{var{typed:t,Node:r}=e;function n(i,o,l){var u=ht(i,o,l),s=ht(i.expr,o,l);return o==="all"||s!==null&&s<=u}class a extends r{constructor(o,l,u){if(super(),typeof o!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(l))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!nt(u))throw new TypeError('Node expected for parameter "expr"');if(Cl.has(o))throw new Error('Illegal function name, "'+o+'" is a reserved keyword');var s=new Set;for(var c of l){var p=typeof c=="string"?c:c.name;if(s.has(p))throw new Error('Duplicate parameter name "'.concat(p,'"'));s.add(p)}this.name=o,this.params=l.map(function(f){return f&&f.name||f}),this.types=l.map(function(f){return f&&f.type||"any"}),this.expr=u}get type(){return ql}get isFunctionAssignmentNode(){return!0}_compile(o,l){var u=Object.create(l);Na(this.params,function(h){u[h]=!0});var s=this.expr._compile(o,u),c=this.name,p=this.params,f=dm(this.types,","),m=c+"("+dm(this.params,", ")+")";return function(d,v,x){var N={};N[f]=function(){for(var y=Object.create(v),E=0;E'+rr(this.params[s])+"");var c=this.expr.toHTML(o);return n(this,l,o&&o.implicit)&&(c='('+c+')'),''+rr(this.name)+'('+u.join(',')+')='+c}_toTex(o){var l=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toTex(o);return n(this,l,o&&o.implicit)&&(u="\\left(".concat(u,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(Ul).join(",")+"\\right)="+u}}return(0,r2.default)(a,"name",ql),a},{isClass:!0,isNode:!0});var a2=Le(ir(),1);var Hl="IndexNode",Dk=["Node","size"],i2=C(Hl,Dk,e=>{var{Node:t,size:r}=e;class n extends t{constructor(i,o){if(super(),this.dimensions=i,this.dotNotation=o||!1,!Array.isArray(i)||!i.every(nt))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return Hl}get isIndexNode(){return!0}_compile(i,o){var l=Ir(this.dimensions,function(s,c){var p=s.filter(h=>h.isSymbolNode&&h.name==="end").length>0;if(p){var f=Object.create(o);f.end=!0;var m=s._compile(i,f);return function(d,v,x){if(!Fe(x)&&!at(x)&&!It(x))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+ut(x));var N=r(x).valueOf(),g=Object.create(v);return g.end=N[c],m(d,g,x)}}else return s._compile(i,o)}),u=Ot(i,"index");return function(c,p,f){var m=Ir(l,function(h){return h(c,p,f)});return u(...m)}}forEach(i){for(var o=0;o.'+rr(this.getObjectProperty())+"":'['+o.join(',')+']'}_toTex(i){var o=this.dimensions.map(function(l){return l.toTex(i)});return this.dotNotation?"."+this.getObjectProperty():"_{"+o.join(",")+"}"}}return(0,a2.default)(n,"name",Hl),n},{isClass:!0,isNode:!0});var o2=Le(ir(),1);var zl="ObjectNode",Sk=["Node"],s2=C(zl,Sk,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.properties=a||{},a&&(typeof a!="object"||!Object.keys(a).every(function(i){return nt(a[i])})))throw new TypeError("Object containing Nodes expected")}get type(){return zl}get isObjectNode(){return!0}_compile(a,i){var o={};for(var l in this.properties)if(Ie(this.properties,l)){var u=ti(l),s=JSON.parse(u),c=Ot(this.properties,l);o[s]=c._compile(a,i)}return function(f,m,h){var d={};for(var v in o)Ie(o,v)&&(d[v]=o[v](f,m,h));return d}}forEach(a){for(var i in this.properties)Ie(this.properties,i)&&a(this.properties[i],"properties["+ti(i)+"]",this)}map(a){var i={};for(var o in this.properties)Ie(this.properties,o)&&(i[o]=this._ifNode(a(this.properties[o],"properties["+ti(o)+"]",this)));return new r(i)}clone(){var a={};for(var i in this.properties)Ie(this.properties,i)&&(a[i]=this.properties[i]);return new r(a)}_toString(a){var i=[];for(var o in this.properties)Ie(this.properties,o)&&i.push(ti(o)+": "+this.properties[o].toString(a));return"{"+i.join(", ")+"}"}toJSON(){return{mathjs:zl,properties:this.properties}}static fromJSON(a){return new r(a.properties)}_toHTML(a){var i=[];for(var o in this.properties)Ie(this.properties,o)&&i.push(''+rr(o)+':'+this.properties[o].toHTML(a));return'{'+i.join(',')+'}'}_toTex(a){var i=[];for(var o in this.properties)Ie(this.properties,o)&&i.push("\\mathbf{"+o+":} & "+this.properties[o].toTex(a)+"\\\\");var l="\\left\\{\\begin{array}{ll}"+i.join(` -`)+"\\end{array}\\right\\}";return l}}return(0,o2.default)(r,"name",zl),r},{isClass:!0,isNode:!0});var u2=Le(ir(),1);function si(e,t){return new ki(e,new Ja(t),new Set(Object.keys(t)))}var Gl="OperatorNode",Ck=["Node"],c2=C(Gl,Ck,e=>{var{Node:t}=e;function r(i,o){var l=i;if(o==="auto")for(;er(l);)l=l.content;return et(l)?!0:Tt(l)?r(l.args[0],o):!1}function n(i,o,l,u,s){var c=ht(i,o,l),p=ao(i,o);if(o==="all"||u.length>2&&i.getIdentifier()!=="OperatorNode:add"&&i.getIdentifier()!=="OperatorNode:multiply")return u.map(function(D){switch(D.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var f;switch(u.length){case 0:f=[];break;case 1:{var m=ht(u[0],o,l,i);if(s&&m!==null){var h,d;if(o==="keep"?(h=u[0].getIdentifier(),d=i.getIdentifier()):(h=u[0].getContent().getIdentifier(),d=i.getContent().getIdentifier()),dn[c][d].latexLeftParens===!1){f=[!1];break}if(dn[m][h].latexParens===!1){f=[!1];break}}if(m===null){f=[!1];break}if(m<=c){f=[!0];break}f=[!1]}break;case 2:{var v,x=ht(u[0],o,l,i),N=Fl(i,u[0],o);x===null?v=!1:x===c&&p==="right"&&!N||x=2&&i.getIdentifier()==="OperatorNode:multiply"&&i.implicit&&o!=="all"&&l==="hide")for(var w=1;w2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var v=s.map(function(x,N){return x=x.toString(o),c[N]&&(x="("+x+")"),x});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?v.join(" "):v.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:Gl,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new a(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var l=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=n(this,l,u,s,!1);if(s.length===1){var p=ao(this,l),f=s[0].toHTML(o);return c[0]&&(f='('+f+')'),p==="right"?''+rr(this.op)+""+f:f+''+rr(this.op)+""}else if(s.length===2){var m=s[0].toHTML(o),h=s[1].toHTML(o);return c[0]&&(m='('+m+')'),c[1]&&(h='('+h+')'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?m+''+h:m+''+rr(this.op)+""+h}else{var d=s.map(function(v,x){return v=v.toHTML(o),c[x]&&(v='('+v+')'),v});return s.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?d.join(''):d.join(''+rr(this.op)+""):''+rr(this.fn)+'('+d.join(',')+')'}}_toTex(o){var l=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=n(this,l,u,s,!0),p=pt[this.fn];if(p=typeof p>"u"?this.op:p,s.length===1){var f=ao(this,l),m=s[0].toTex(o);return c[0]&&(m="\\left(".concat(m,"\\right)")),f==="right"?p+m:m+p}else if(s.length===2){var h=s[0],d=h.toTex(o);c[0]&&(d="\\left(".concat(d,"\\right)"));var v=s[1],x=v.toTex(o);c[1]&&(x="\\left(".concat(x,"\\right)"));var N;switch(l==="keep"?N=h.getIdentifier():N=h.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return p+"{"+d+"}{"+x+"}";case"OperatorNode:pow":switch(d="{"+d+"}",x="{"+x+"}",N){case"ConditionalNode":case"OperatorNode:divide":d="\\left(".concat(d,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&u==="hide")return d+"~"+x}return d+p+x}else if(s.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var g=s.map(function(y,E){return y=y.toTex(o),c[E]&&(y="\\left(".concat(y,"\\right)")),y});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&u==="hide"?g.join("~"):g.join(p)}else return"\\mathrm{"+this.fn+"}\\left("+s.map(function(y){return y.toTex(o)}).join(",")+"\\right)"}getIdentifier(){return this.type+":"+this.fn}}return(0,u2.default)(a,"name",Gl),a},{isClass:!0,isNode:!0});var l2=Le(ir(),1);var Yl="ParenthesisNode",_k=["Node"],p2=C(Yl,_k,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),!nt(a))throw new TypeError('Node expected for parameter "content"');this.content=a}get type(){return Yl}get isParenthesisNode(){return!0}_compile(a,i){return this.content._compile(a,i)}getContent(){return this.content.getContent()}forEach(a){a(this.content,"content",this)}map(a){var i=a(this.content,"content",this);return new r(i)}clone(){return new r(this.content)}_toString(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"("+this.content.toString(a)+")":this.content.toString(a)}toJSON(){return{mathjs:Yl,content:this.content}}static fromJSON(a){return new r(a.content)}_toHTML(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?'('+this.content.toHTML(a)+')':this.content.toHTML(a)}_toTex(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"\\left(".concat(this.content.toTex(a),"\\right)"):this.content.toTex(a)}}return(0,l2.default)(r,"name",Yl),r},{isClass:!0,isNode:!0});var f2=Le(ir(),1);var jl="RangeNode",Mk=["Node"],m2=C(jl,Mk,e=>{var{Node:t}=e;function r(a,i,o){var l=ht(a,i,o),u={},s=ht(a.start,i,o);if(u.start=s!==null&&s<=l||i==="all",a.step){var c=ht(a.step,i,o);u.step=c!==null&&c<=l||i==="all"}var p=ht(a.end,i,o);return u.end=p!==null&&p<=l||i==="all",u}class n extends t{constructor(i,o,l){if(super(),!nt(i))throw new TypeError("Node expected");if(!nt(o))throw new TypeError("Node expected");if(l&&!nt(l))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=i,this.end=o,this.step=l||null}get type(){return jl}get isRangeNode(){return!0}needsEnd(){var i=this.filter(function(o){return bt(o)&&o.name==="end"});return i.length>0}_compile(i,o){var l=i.range,u=this.start._compile(i,o),s=this.end._compile(i,o);if(this.step){var c=this.step._compile(i,o);return function(f,m,h){return l(u(f,m,h),s(f,m,h),c(f,m,h))}}else return function(f,m,h){return l(u(f,m,h),s(f,m,h))}}forEach(i){i(this.start,"start",this),i(this.end,"end",this),this.step&&i(this.step,"step",this)}map(i){return new n(this._ifNode(i(this.start,"start",this)),this._ifNode(i(this.end,"end",this)),this.step&&this._ifNode(i(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=r(this,o,i&&i.implicit),u,s=this.start.toString(i);if(l.start&&(s="("+s+")"),u=s,this.step){var c=this.step.toString(i);l.step&&(c="("+c+")"),u+=":"+c}var p=this.end.toString(i);return l.end&&(p="("+p+")"),u+=":"+p,u}toJSON(){return{mathjs:jl,start:this.start,end:this.end,step:this.step}}static fromJSON(i){return new n(i.start,i.end,i.step)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=r(this,o,i&&i.implicit),u,s=this.start.toHTML(i);if(l.start&&(s='('+s+')'),u=s,this.step){var c=this.step.toHTML(i);l.step&&(c='('+c+')'),u+=':'+c}var p=this.end.toHTML(i);return l.end&&(p='('+p+')'),u+=':'+p,u}_toTex(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=r(this,o,i&&i.implicit),u=this.start.toTex(i);if(l.start&&(u="\\left(".concat(u,"\\right)")),this.step){var s=this.step.toTex(i);l.step&&(s="\\left(".concat(s,"\\right)")),u+=":"+s}var c=this.end.toTex(i);return l.end&&(c="\\left(".concat(c,"\\right)")),u+=":"+c,u}}return(0,f2.default)(n,"name",jl),n},{isClass:!0,isNode:!0});var d2=Le(ir(),1);var Vl="RelationalNode",Ok=["Node"],h2=C(Vl,Ok,e=>{var{Node:t}=e,r={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends t{constructor(i,o){if(super(),!Array.isArray(i))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(o))throw new TypeError("Parameter params must be an array");if(i.length!==o.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=i,this.params=o}get type(){return Vl}get isRelationalNode(){return!0}_compile(i,o){var l=this,u=this.params.map(s=>s._compile(i,o));return function(c,p,f){for(var m,h=u[0](c,p,f),d=0;di(o,"params["+l+"]",this),this)}map(i){return new n(this.conditionals.slice(),this.params.map((o,l)=>this._ifNode(i(o,"params["+l+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",l=ht(this,o,i&&i.implicit),u=this.params.map(function(p,f){var m=ht(p,o,i&&i.implicit);return o==="all"||m!==null&&m<=l?"("+p.toString(i)+")":p.toString(i)}),s=u[0],c=0;c('+p.toHTML(i)+')':p.toHTML(i)}),s=u[0],c=0;c'+rr(r[this.conditionals[c]])+""+u[c+1];return s}_toTex(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",l=ht(this,o,i&&i.implicit),u=this.params.map(function(p,f){var m=ht(p,o,i&&i.implicit);return o==="all"||m!==null&&m<=l?"\\left("+p.toTex(i)+"\right)":p.toTex(i)}),s=u[0],c=0;c{var{math:t,Unit:r,Node:n}=e;function a(o){return r?r.isValuelessUnit(o):!1}class i extends n{constructor(l){if(super(),typeof l!="string")throw new TypeError('String expected for parameter "name"');this.name=l}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(l,u){var s=this.name;if(u[s]===!0)return function(p,f,m){return Ot(f,s)};if(s in l)return function(p,f,m){return p.has(s)?p.get(s):Ot(l,s)};var c=a(s);return function(p,f,m){return p.has(s)?p.get(s):c?new r(null,s):i.onUndefinedSymbol(s)}}forEach(l){}map(l){return this.clone()}static onUndefinedSymbol(l){throw new Error("Undefined symbol "+l)}clone(){return new i(this.name)}_toString(l){return this.name}_toHTML(l){var u=rr(this.name);return u==="true"||u==="false"?''+u+"":u==="i"?''+u+"":u==="Infinity"?''+u+"":u==="NaN"?''+u+"":u==="null"?''+u+"":u==="undefined"?''+u+"":''+u+""}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(l){return new i(l.name)}_toTex(l){var u=!1;typeof t[this.name]>"u"&&a(this.name)&&(u=!0);var s=Ul(this.name,u);return s[0]==="\\"?s:" "+s}}return i},{isClass:!0,isNode:!0});var Xl=Le(ir(),1);var $l="FunctionNode",Ik=["math","Node","SymbolNode"],g2=C($l,Ik,e=>{var t,{math:r,Node:n,SymbolNode:a}=e,i=u=>je(u,{truncate:78});function o(u,s,c){for(var p="",f=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,m=0,h;(h=f.exec(u))!==null;)if(p+=u.substring(m,h.index),m=h.index,h[0]==="$$")p+="$",m++;else{m+=h[0].length;var d=s[h[1]];if(!d)throw new ReferenceError("Template: Property "+h[1]+" does not exist.");if(h[2]===void 0)switch(typeof d){case"string":p+=d;break;case"object":if(nt(d))p+=d.toTex(c);else if(Array.isArray(d))p+=d.map(function(v,x){if(nt(v))return v.toTex(c);throw new TypeError("Template: "+h[1]+"["+x+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+h[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+h[1]+" has to be a Node, String or array of Nodes")}else if(nt(d[h[2]]&&d[h[2]]))p+=d[h[2]].toTex(c);else throw new TypeError("Template: "+h[1]+"["+h[2]+"] is not a Node.")}return p+=u.slice(m),p}class l extends n{constructor(s,c){if(super(),typeof s=="string"&&(s=new a(s)),!nt(s))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(c)||!c.every(nt))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=s,this.args=c||[]}get name(){return this.fn.name||""}get type(){return $l}get isFunctionNode(){return!0}_compile(s,c){var p=this.args.map(A=>A._compile(s,c));if(bt(this.fn)){var f=this.fn.name;if(c[f]){var x=this.args;return function(w,D,F){var R=Ot(D,f);if(typeof R!="function")throw new TypeError("Argument '".concat(f,"' was not a function; received: ").concat(i(R)));if(R.rawArgs)return R(x,s,si(w,D));var P=p.map(U=>U(w,D,F));return R.apply(R,P)}}else{var m=f in s?Ot(s,f):void 0,h=typeof m=="function"&&m.rawArgs===!0,d=A=>{var w;if(A.has(f))w=A.get(f);else if(f in s)w=Ot(s,f);else return l.onUndefinedFunction(f);if(typeof w=="function")return w;throw new TypeError("'".concat(f,`' is not a function; its value is: - `).concat(i(w)))};if(h){var v=this.args;return function(w,D,F){var R=d(w);return R(v,s,si(w,D))}}else switch(p.length){case 0:return function(w,D,F){var R=d(w);return R()};case 1:return function(w,D,F){var R=d(w),P=p[0];return R(P(w,D,F))};case 2:return function(w,D,F){var R=d(w),P=p[0],U=p[1];return R(P(w,D,F),U(w,D,F))};default:return function(w,D,F){var R=d(w),P=p.map(U=>U(w,D,F));return R(...P)}}}}else if(wr(this.fn)&&Rr(this.fn.index)&&this.fn.index.isObjectProperty()){var N=this.fn.object._compile(s,c),g=this.fn.index.getObjectProperty(),y=this.args;return function(w,D,F){var R=N(w,D,F),P=Ly(R,g);if(P!=null&&P.rawArgs)return P(y,s,si(w,D));var U=p.map(k=>k(w,D,F));return P.apply(R,U)}}else{var E=this.fn.toString(),b=this.fn._compile(s,c),S=this.args;return function(w,D,F){var R=b(w,D,F);if(typeof R!="function")throw new TypeError("Expression '".concat(E,"' did not evaluate to a function; value is:")+` - `.concat(i(R)));if(R.rawArgs)return R(S,s,si(w,D));var P=p.map(U=>U(w,D,F));return R.apply(R,P)}}}forEach(s){s(this.fn,"fn",this);for(var c=0;c'+rr(this.fn)+'('+c.join(',')+')'}toTex(s){var c;return s&&typeof s.handler=="object"&&Ie(s.handler,this.name)&&(c=s.handler[this.name](this,s)),typeof c<"u"?c:super.toTex(s)}_toTex(s){var c=this.args.map(function(m){return m.toTex(s)}),p;nv[this.name]&&(p=nv[this.name]),r[this.name]&&(typeof r[this.name].toTex=="function"||typeof r[this.name].toTex=="object"||typeof r[this.name].toTex=="string")&&(p=r[this.name].toTex);var f;switch(typeof p){case"function":f=p(this,s);break;case"string":f=o(p,this,s);break;case"object":switch(typeof p[c.length]){case"function":f=p[c.length](this,s);break;case"string":f=o(p[c.length],this,s);break}}return typeof f<"u"?f:o(JT,this,s)}getIdentifier(){return this.type+":"+this.name}}return t=l,(0,Xl.default)(l,"name",$l),(0,Xl.default)(l,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),(0,Xl.default)(l,"fromJSON",function(u){return new t(u.fn,u.args)}),l},{isClass:!0,isNode:!0});var ui=Le(va(),1);var x2="parse",Bk=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],b2=C(x2,Bk,e=>{var{typed:t,numeric:r,config:n,AccessorNode:a,ArrayNode:i,AssignmentNode:o,BlockNode:l,ConditionalNode:u,ConstantNode:s,FunctionAssignmentNode:c,FunctionNode:p,IndexNode:f,ObjectNode:m,OperatorNode:h,ParenthesisNode:d,RangeNode:v,RelationalNode:x,SymbolNode:N}=e,g=t(x2,{string:function(Y){return te(Y,{})},"Array | Matrix":function(Y){return y(Y,{})},"string, Object":function(Y,ue){var Ae=ue.nodes!==void 0?ue.nodes:{};return te(Y,Ae)},"Array | Matrix, Object":y});function y(O){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ue=Y.nodes!==void 0?Y.nodes:{};return Pe(O,function(Ae){if(typeof Ae!="string")throw new TypeError("String expected");return te(Ae,ue)})}var E={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},b={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},S={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},A={true:!0,false:!1,null:null,undefined:void 0},w=["NaN","Infinity"],D={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:` +`)}}return(0,YT.default)(n,"name",Bl),n},{isClass:!0,isNode:!0});var VT=Le(ir(),1);var Ll="ConditionalNode",yk=["Node"],$T=C(Ll,yk,e=>{var{Node:t}=e;function r(a){if(typeof a=="number"||typeof a=="boolean"||typeof a=="string")return!!a;if(a){if(Ue(a))return!a.isZero();if(Zt(a))return!!(a.re||a.im);if($t(a))return!!a.value}if(a==null)return!1;throw new TypeError('Unsupported type of condition "'+ut(a)+'"')}class n extends t{constructor(i,o,l){if(super(),!nt(i))throw new TypeError("Parameter condition must be a Node");if(!nt(o))throw new TypeError("Parameter trueExpr must be a Node");if(!nt(l))throw new TypeError("Parameter falseExpr must be a Node");this.condition=i,this.trueExpr=o,this.falseExpr=l}get type(){return Ll}get isConditionalNode(){return!0}_compile(i,o){var l=this.condition._compile(i,o),u=this.trueExpr._compile(i,o),s=this.falseExpr._compile(i,o);return function(p,f,m){return r(l(p,f,m))?u(p,f,m):s(p,f,m)}}forEach(i){i(this.condition,"condition",this),i(this.trueExpr,"trueExpr",this),i(this.falseExpr,"falseExpr",this)}map(i){return new n(this._ifNode(i(this.condition,"condition",this)),this._ifNode(i(this.trueExpr,"trueExpr",this)),this._ifNode(i(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=ht(this,o,i&&i.implicit),u=this.condition.toString(i),s=ht(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||s!==null&&s<=l)&&(u="("+u+")");var c=this.trueExpr.toString(i),p=ht(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||p!==null&&p<=l)&&(c="("+c+")");var f=this.falseExpr.toString(i),m=ht(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||m!==null&&m<=l)&&(f="("+f+")"),u+" ? "+c+" : "+f}toJSON(){return{mathjs:Ll,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(i){return new n(i.condition,i.trueExpr,i.falseExpr)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=ht(this,o,i&&i.implicit),u=this.condition.toHTML(i),s=ht(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||s!==null&&s<=l)&&(u='('+u+')');var c=this.trueExpr.toHTML(i),p=ht(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||p!==null&&p<=l)&&(c='('+c+')');var f=this.falseExpr.toHTML(i),m=ht(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||m!==null&&m<=l)&&(f='('+f+')'),u+'?'+c+':'+f}_toTex(i){return"\\begin{cases} {"+this.trueExpr.toTex(i)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(i)+"}\\\\{"+this.falseExpr.toTex(i)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return(0,VT.default)(n,"name",Ll),n},{isClass:!0,isNode:!0});var JT=Le(ir(),1);var QT=Le(KT(),1);var rv={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},pt={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},nv={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(pt.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(pt.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(pt.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(pt.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(pt.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(pt.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(pt.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(pt.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(pt.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(pt.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(pt.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(pt.bitAnd,"${args[1]}\\right)")},bitNot:{1:pt.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(pt.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(pt.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(pt.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(pt.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(pt.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(pt.and,"${args[1]}\\right)")},not:{1:pt.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(pt.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(pt.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(pt.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(pt.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(pt.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(pt.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(pt.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(pt.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(pt.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(pt.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(pt.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(pt.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(pt.to,"${args[1]}\\right)")},numeric:function(t,r){return t.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(rv.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},ZT="\\mathrm{${name}}\\left(${args}\\right)",WT={deg:"^\\circ"};function Pl(e){return(0,QT.default)(e,{preserveFormatting:!0})}function Ul(e,t){return t=typeof t>"u"?!1:t,t?Ie(WT,e)?WT[e]:"\\mathrm{"+Pl(e)+"}":Ie(rv,e)?rv[e]:Pl(e)}var kl="ConstantNode",Tk=["Node"],e2=C(kl,Tk,e=>{var{Node:t}=e;class r extends t{constructor(a){super(),this.value=a}get type(){return kl}get isConstantNode(){return!0}_compile(a,i){var o=this.value;return function(){return o}}forEach(a){}map(a){return this.clone()}clone(){return new r(this.value)}_toString(a){return je(this.value,a)}_toHTML(a){var i=this._toString(a);switch(ut(this.value)){case"number":case"BigNumber":case"Fraction":return''+i+"";case"string":return''+i+"";case"boolean":return''+i+"";case"null":return''+i+"";case"undefined":return''+i+"";default:return''+i+""}}toJSON(){return{mathjs:kl,value:this.value}}static fromJSON(a){return new r(a.value)}_toTex(a){var i=this._toString(a),o=ut(this.value);switch(o){case"string":return"\\mathtt{"+Pl(i)+"}";case"number":case"BigNumber":{var l=o==="BigNumber"?this.value.isFinite():isFinite(this.value);if(!l)return this.value.valueOf()<0?"-\\infty":"\\infty";var u=i.toLowerCase().indexOf("e");return u!==-1?i.substring(0,u)+"\\cdot10^{"+i.substring(u+1)+"}":i}case"Fraction":return this.value.toLatex();default:return i}}}return(0,JT.default)(r,"name",kl),r},{isClass:!0,isNode:!0});var t2=Le(ir(),1);var ql="FunctionAssignmentNode",wk=["typed","Node"],r2=C(ql,wk,e=>{var{typed:t,Node:r}=e;function n(i,o,l){var u=ht(i,o,l),s=ht(i.expr,o,l);return o==="all"||s!==null&&s<=u}class a extends r{constructor(o,l,u){if(super(),typeof o!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(l))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!nt(u))throw new TypeError('Node expected for parameter "expr"');if(Cl.has(o))throw new Error('Illegal function name, "'+o+'" is a reserved keyword');var s=new Set;for(var c of l){var p=typeof c=="string"?c:c.name;if(s.has(p))throw new Error('Duplicate parameter name "'.concat(p,'"'));s.add(p)}this.name=o,this.params=l.map(function(f){return f&&f.name||f}),this.types=l.map(function(f){return f&&f.type||"any"}),this.expr=u}get type(){return ql}get isFunctionAssignmentNode(){return!0}_compile(o,l){var u=Object.create(l);Na(this.params,function(h){u[h]=!0});var s=this.expr._compile(o,u),c=this.name,p=this.params,f=dm(this.types,","),m=c+"("+dm(this.params,", ")+")";return function(d,v,x){var N={};N[f]=function(){for(var y=Object.create(v),E=0;E'+rr(this.params[s])+"");var c=this.expr.toHTML(o);return n(this,l,o&&o.implicit)&&(c='('+c+')'),''+rr(this.name)+'('+u.join(',')+')='+c}_toTex(o){var l=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toTex(o);return n(this,l,o&&o.implicit)&&(u="\\left(".concat(u,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(Ul).join(",")+"\\right)="+u}}return(0,t2.default)(a,"name",ql),a},{isClass:!0,isNode:!0});var n2=Le(ir(),1);var Hl="IndexNode",Dk=["Node","size"],a2=C(Hl,Dk,e=>{var{Node:t,size:r}=e;class n extends t{constructor(i,o){if(super(),this.dimensions=i,this.dotNotation=o||!1,!Array.isArray(i)||!i.every(nt))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return Hl}get isIndexNode(){return!0}_compile(i,o){var l=Ir(this.dimensions,function(s,c){var p=s.filter(h=>h.isSymbolNode&&h.name==="end").length>0;if(p){var f=Object.create(o);f.end=!0;var m=s._compile(i,f);return function(d,v,x){if(!Fe(x)&&!at(x)&&!It(x))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+ut(x));var N=r(x).valueOf(),g=Object.create(v);return g.end=N[c],m(d,g,x)}}else return s._compile(i,o)}),u=Ot(i,"index");return function(c,p,f){var m=Ir(l,function(h){return h(c,p,f)});return u(...m)}}forEach(i){for(var o=0;o.'+rr(this.getObjectProperty())+"":'['+o.join(',')+']'}_toTex(i){var o=this.dimensions.map(function(l){return l.toTex(i)});return this.dotNotation?"."+this.getObjectProperty():"_{"+o.join(",")+"}"}}return(0,n2.default)(n,"name",Hl),n},{isClass:!0,isNode:!0});var i2=Le(ir(),1);var zl="ObjectNode",Sk=["Node"],o2=C(zl,Sk,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.properties=a||{},a&&(typeof a!="object"||!Object.keys(a).every(function(i){return nt(a[i])})))throw new TypeError("Object containing Nodes expected")}get type(){return zl}get isObjectNode(){return!0}_compile(a,i){var o={};for(var l in this.properties)if(Ie(this.properties,l)){var u=ti(l),s=JSON.parse(u),c=Ot(this.properties,l);o[s]=c._compile(a,i)}return function(f,m,h){var d={};for(var v in o)Ie(o,v)&&(d[v]=o[v](f,m,h));return d}}forEach(a){for(var i in this.properties)Ie(this.properties,i)&&a(this.properties[i],"properties["+ti(i)+"]",this)}map(a){var i={};for(var o in this.properties)Ie(this.properties,o)&&(i[o]=this._ifNode(a(this.properties[o],"properties["+ti(o)+"]",this)));return new r(i)}clone(){var a={};for(var i in this.properties)Ie(this.properties,i)&&(a[i]=this.properties[i]);return new r(a)}_toString(a){var i=[];for(var o in this.properties)Ie(this.properties,o)&&i.push(ti(o)+": "+this.properties[o].toString(a));return"{"+i.join(", ")+"}"}toJSON(){return{mathjs:zl,properties:this.properties}}static fromJSON(a){return new r(a.properties)}_toHTML(a){var i=[];for(var o in this.properties)Ie(this.properties,o)&&i.push(''+rr(o)+':'+this.properties[o].toHTML(a));return'{'+i.join(',')+'}'}_toTex(a){var i=[];for(var o in this.properties)Ie(this.properties,o)&&i.push("\\mathbf{"+o+":} & "+this.properties[o].toTex(a)+"\\\\");var l="\\left\\{\\begin{array}{ll}"+i.join(` +`)+"\\end{array}\\right\\}";return l}}return(0,i2.default)(r,"name",zl),r},{isClass:!0,isNode:!0});var s2=Le(ir(),1);function si(e,t){return new ki(e,new Ja(t),new Set(Object.keys(t)))}var Gl="OperatorNode",Ck=["Node"],u2=C(Gl,Ck,e=>{var{Node:t}=e;function r(i,o){var l=i;if(o==="auto")for(;er(l);)l=l.content;return et(l)?!0:Tt(l)?r(l.args[0],o):!1}function n(i,o,l,u,s){var c=ht(i,o,l),p=ao(i,o);if(o==="all"||u.length>2&&i.getIdentifier()!=="OperatorNode:add"&&i.getIdentifier()!=="OperatorNode:multiply")return u.map(function(D){switch(D.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var f;switch(u.length){case 0:f=[];break;case 1:{var m=ht(u[0],o,l,i);if(s&&m!==null){var h,d;if(o==="keep"?(h=u[0].getIdentifier(),d=i.getIdentifier()):(h=u[0].getContent().getIdentifier(),d=i.getContent().getIdentifier()),dn[c][d].latexLeftParens===!1){f=[!1];break}if(dn[m][h].latexParens===!1){f=[!1];break}}if(m===null){f=[!1];break}if(m<=c){f=[!0];break}f=[!1]}break;case 2:{var v,x=ht(u[0],o,l,i),N=Fl(i,u[0],o);x===null?v=!1:x===c&&p==="right"&&!N||x=2&&i.getIdentifier()==="OperatorNode:multiply"&&i.implicit&&o!=="all"&&l==="hide")for(var w=1;w2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var v=s.map(function(x,N){return x=x.toString(o),c[N]&&(x="("+x+")"),x});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?v.join(" "):v.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:Gl,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new a(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var l=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=n(this,l,u,s,!1);if(s.length===1){var p=ao(this,l),f=s[0].toHTML(o);return c[0]&&(f='('+f+')'),p==="right"?''+rr(this.op)+""+f:f+''+rr(this.op)+""}else if(s.length===2){var m=s[0].toHTML(o),h=s[1].toHTML(o);return c[0]&&(m='('+m+')'),c[1]&&(h='('+h+')'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?m+''+h:m+''+rr(this.op)+""+h}else{var d=s.map(function(v,x){return v=v.toHTML(o),c[x]&&(v='('+v+')'),v});return s.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?d.join(''):d.join(''+rr(this.op)+""):''+rr(this.fn)+'('+d.join(',')+')'}}_toTex(o){var l=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=n(this,l,u,s,!0),p=pt[this.fn];if(p=typeof p>"u"?this.op:p,s.length===1){var f=ao(this,l),m=s[0].toTex(o);return c[0]&&(m="\\left(".concat(m,"\\right)")),f==="right"?p+m:m+p}else if(s.length===2){var h=s[0],d=h.toTex(o);c[0]&&(d="\\left(".concat(d,"\\right)"));var v=s[1],x=v.toTex(o);c[1]&&(x="\\left(".concat(x,"\\right)"));var N;switch(l==="keep"?N=h.getIdentifier():N=h.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return p+"{"+d+"}{"+x+"}";case"OperatorNode:pow":switch(d="{"+d+"}",x="{"+x+"}",N){case"ConditionalNode":case"OperatorNode:divide":d="\\left(".concat(d,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&u==="hide")return d+"~"+x}return d+p+x}else if(s.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var g=s.map(function(y,E){return y=y.toTex(o),c[E]&&(y="\\left(".concat(y,"\\right)")),y});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&u==="hide"?g.join("~"):g.join(p)}else return"\\mathrm{"+this.fn+"}\\left("+s.map(function(y){return y.toTex(o)}).join(",")+"\\right)"}getIdentifier(){return this.type+":"+this.fn}}return(0,s2.default)(a,"name",Gl),a},{isClass:!0,isNode:!0});var c2=Le(ir(),1);var Yl="ParenthesisNode",_k=["Node"],l2=C(Yl,_k,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),!nt(a))throw new TypeError('Node expected for parameter "content"');this.content=a}get type(){return Yl}get isParenthesisNode(){return!0}_compile(a,i){return this.content._compile(a,i)}getContent(){return this.content.getContent()}forEach(a){a(this.content,"content",this)}map(a){var i=a(this.content,"content",this);return new r(i)}clone(){return new r(this.content)}_toString(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"("+this.content.toString(a)+")":this.content.toString(a)}toJSON(){return{mathjs:Yl,content:this.content}}static fromJSON(a){return new r(a.content)}_toHTML(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?'('+this.content.toHTML(a)+')':this.content.toHTML(a)}_toTex(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"\\left(".concat(this.content.toTex(a),"\\right)"):this.content.toTex(a)}}return(0,c2.default)(r,"name",Yl),r},{isClass:!0,isNode:!0});var p2=Le(ir(),1);var jl="RangeNode",Mk=["Node"],f2=C(jl,Mk,e=>{var{Node:t}=e;function r(a,i,o){var l=ht(a,i,o),u={},s=ht(a.start,i,o);if(u.start=s!==null&&s<=l||i==="all",a.step){var c=ht(a.step,i,o);u.step=c!==null&&c<=l||i==="all"}var p=ht(a.end,i,o);return u.end=p!==null&&p<=l||i==="all",u}class n extends t{constructor(i,o,l){if(super(),!nt(i))throw new TypeError("Node expected");if(!nt(o))throw new TypeError("Node expected");if(l&&!nt(l))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=i,this.end=o,this.step=l||null}get type(){return jl}get isRangeNode(){return!0}needsEnd(){var i=this.filter(function(o){return bt(o)&&o.name==="end"});return i.length>0}_compile(i,o){var l=i.range,u=this.start._compile(i,o),s=this.end._compile(i,o);if(this.step){var c=this.step._compile(i,o);return function(f,m,h){return l(u(f,m,h),s(f,m,h),c(f,m,h))}}else return function(f,m,h){return l(u(f,m,h),s(f,m,h))}}forEach(i){i(this.start,"start",this),i(this.end,"end",this),this.step&&i(this.step,"step",this)}map(i){return new n(this._ifNode(i(this.start,"start",this)),this._ifNode(i(this.end,"end",this)),this.step&&this._ifNode(i(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=r(this,o,i&&i.implicit),u,s=this.start.toString(i);if(l.start&&(s="("+s+")"),u=s,this.step){var c=this.step.toString(i);l.step&&(c="("+c+")"),u+=":"+c}var p=this.end.toString(i);return l.end&&(p="("+p+")"),u+=":"+p,u}toJSON(){return{mathjs:jl,start:this.start,end:this.end,step:this.step}}static fromJSON(i){return new n(i.start,i.end,i.step)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=r(this,o,i&&i.implicit),u,s=this.start.toHTML(i);if(l.start&&(s='('+s+')'),u=s,this.step){var c=this.step.toHTML(i);l.step&&(c='('+c+')'),u+=':'+c}var p=this.end.toHTML(i);return l.end&&(p='('+p+')'),u+=':'+p,u}_toTex(i){var o=i&&i.parenthesis?i.parenthesis:"keep",l=r(this,o,i&&i.implicit),u=this.start.toTex(i);if(l.start&&(u="\\left(".concat(u,"\\right)")),this.step){var s=this.step.toTex(i);l.step&&(s="\\left(".concat(s,"\\right)")),u+=":"+s}var c=this.end.toTex(i);return l.end&&(c="\\left(".concat(c,"\\right)")),u+=":"+c,u}}return(0,p2.default)(n,"name",jl),n},{isClass:!0,isNode:!0});var m2=Le(ir(),1);var Vl="RelationalNode",Ok=["Node"],d2=C(Vl,Ok,e=>{var{Node:t}=e,r={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends t{constructor(i,o){if(super(),!Array.isArray(i))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(o))throw new TypeError("Parameter params must be an array");if(i.length!==o.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=i,this.params=o}get type(){return Vl}get isRelationalNode(){return!0}_compile(i,o){var l=this,u=this.params.map(s=>s._compile(i,o));return function(c,p,f){for(var m,h=u[0](c,p,f),d=0;di(o,"params["+l+"]",this),this)}map(i){return new n(this.conditionals.slice(),this.params.map((o,l)=>this._ifNode(i(o,"params["+l+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",l=ht(this,o,i&&i.implicit),u=this.params.map(function(p,f){var m=ht(p,o,i&&i.implicit);return o==="all"||m!==null&&m<=l?"("+p.toString(i)+")":p.toString(i)}),s=u[0],c=0;c('+p.toHTML(i)+')':p.toHTML(i)}),s=u[0],c=0;c'+rr(r[this.conditionals[c]])+""+u[c+1];return s}_toTex(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",l=ht(this,o,i&&i.implicit),u=this.params.map(function(p,f){var m=ht(p,o,i&&i.implicit);return o==="all"||m!==null&&m<=l?"\\left("+p.toTex(i)+"\right)":p.toTex(i)}),s=u[0],c=0;c{var{math:t,Unit:r,Node:n}=e;function a(o){return r?r.isValuelessUnit(o):!1}class i extends n{constructor(l){if(super(),typeof l!="string")throw new TypeError('String expected for parameter "name"');this.name=l}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(l,u){var s=this.name;if(u[s]===!0)return function(p,f,m){return Ot(f,s)};if(s in l)return function(p,f,m){return p.has(s)?p.get(s):Ot(l,s)};var c=a(s);return function(p,f,m){return p.has(s)?p.get(s):c?new r(null,s):i.onUndefinedSymbol(s)}}forEach(l){}map(l){return this.clone()}static onUndefinedSymbol(l){throw new Error("Undefined symbol "+l)}clone(){return new i(this.name)}_toString(l){return this.name}_toHTML(l){var u=rr(this.name);return u==="true"||u==="false"?''+u+"":u==="i"?''+u+"":u==="Infinity"?''+u+"":u==="NaN"?''+u+"":u==="null"?''+u+"":u==="undefined"?''+u+"":''+u+""}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(l){return new i(l.name)}_toTex(l){var u=!1;typeof t[this.name]>"u"&&a(this.name)&&(u=!0);var s=Ul(this.name,u);return s[0]==="\\"?s:" "+s}}return i},{isClass:!0,isNode:!0});var Xl=Le(ir(),1);var $l="FunctionNode",Ik=["math","Node","SymbolNode"],v2=C($l,Ik,e=>{var t,{math:r,Node:n,SymbolNode:a}=e,i=u=>je(u,{truncate:78});function o(u,s,c){for(var p="",f=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,m=0,h;(h=f.exec(u))!==null;)if(p+=u.substring(m,h.index),m=h.index,h[0]==="$$")p+="$",m++;else{m+=h[0].length;var d=s[h[1]];if(!d)throw new ReferenceError("Template: Property "+h[1]+" does not exist.");if(h[2]===void 0)switch(typeof d){case"string":p+=d;break;case"object":if(nt(d))p+=d.toTex(c);else if(Array.isArray(d))p+=d.map(function(v,x){if(nt(v))return v.toTex(c);throw new TypeError("Template: "+h[1]+"["+x+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+h[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+h[1]+" has to be a Node, String or array of Nodes")}else if(nt(d[h[2]]&&d[h[2]]))p+=d[h[2]].toTex(c);else throw new TypeError("Template: "+h[1]+"["+h[2]+"] is not a Node.")}return p+=u.slice(m),p}class l extends n{constructor(s,c){if(super(),typeof s=="string"&&(s=new a(s)),!nt(s))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(c)||!c.every(nt))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=s,this.args=c||[]}get name(){return this.fn.name||""}get type(){return $l}get isFunctionNode(){return!0}_compile(s,c){var p=this.args.map(A=>A._compile(s,c));if(bt(this.fn)){var f=this.fn.name;if(c[f]){var x=this.args;return function(w,D,F){var R=Ot(D,f);if(typeof R!="function")throw new TypeError("Argument '".concat(f,"' was not a function; received: ").concat(i(R)));if(R.rawArgs)return R(x,s,si(w,D));var P=p.map(U=>U(w,D,F));return R.apply(R,P)}}else{var m=f in s?Ot(s,f):void 0,h=typeof m=="function"&&m.rawArgs===!0,d=A=>{var w;if(A.has(f))w=A.get(f);else if(f in s)w=Ot(s,f);else return l.onUndefinedFunction(f);if(typeof w=="function")return w;throw new TypeError("'".concat(f,`' is not a function; its value is: + `).concat(i(w)))};if(h){var v=this.args;return function(w,D,F){var R=d(w);return R(v,s,si(w,D))}}else switch(p.length){case 0:return function(w,D,F){var R=d(w);return R()};case 1:return function(w,D,F){var R=d(w),P=p[0];return R(P(w,D,F))};case 2:return function(w,D,F){var R=d(w),P=p[0],U=p[1];return R(P(w,D,F),U(w,D,F))};default:return function(w,D,F){var R=d(w),P=p.map(U=>U(w,D,F));return R(...P)}}}}else if(wr(this.fn)&&Rr(this.fn.index)&&this.fn.index.isObjectProperty()){var N=this.fn.object._compile(s,c),g=this.fn.index.getObjectProperty(),y=this.args;return function(w,D,F){var R=N(w,D,F),P=By(R,g);if(P!=null&&P.rawArgs)return P(y,s,si(w,D));var U=p.map(k=>k(w,D,F));return P.apply(R,U)}}else{var E=this.fn.toString(),b=this.fn._compile(s,c),S=this.args;return function(w,D,F){var R=b(w,D,F);if(typeof R!="function")throw new TypeError("Expression '".concat(E,"' did not evaluate to a function; value is:")+` + `.concat(i(R)));if(R.rawArgs)return R(S,s,si(w,D));var P=p.map(U=>U(w,D,F));return R.apply(R,P)}}}forEach(s){s(this.fn,"fn",this);for(var c=0;c'+rr(this.fn)+'('+c.join(',')+')'}toTex(s){var c;return s&&typeof s.handler=="object"&&Ie(s.handler,this.name)&&(c=s.handler[this.name](this,s)),typeof c<"u"?c:super.toTex(s)}_toTex(s){var c=this.args.map(function(m){return m.toTex(s)}),p;nv[this.name]&&(p=nv[this.name]),r[this.name]&&(typeof r[this.name].toTex=="function"||typeof r[this.name].toTex=="object"||typeof r[this.name].toTex=="string")&&(p=r[this.name].toTex);var f;switch(typeof p){case"function":f=p(this,s);break;case"string":f=o(p,this,s);break;case"object":switch(typeof p[c.length]){case"function":f=p[c.length](this,s);break;case"string":f=o(p[c.length],this,s);break}}return typeof f<"u"?f:o(ZT,this,s)}getIdentifier(){return this.type+":"+this.name}}return t=l,(0,Xl.default)(l,"name",$l),(0,Xl.default)(l,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),(0,Xl.default)(l,"fromJSON",function(u){return new t(u.fn,u.args)}),l},{isClass:!0,isNode:!0});var ui=Le(va(),1);var g2="parse",Bk=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],x2=C(g2,Bk,e=>{var{typed:t,numeric:r,config:n,AccessorNode:a,ArrayNode:i,AssignmentNode:o,BlockNode:l,ConditionalNode:u,ConstantNode:s,FunctionAssignmentNode:c,FunctionNode:p,IndexNode:f,ObjectNode:m,OperatorNode:h,ParenthesisNode:d,RangeNode:v,RelationalNode:x,SymbolNode:N}=e,g=t(g2,{string:function(Y){return te(Y,{})},"Array | Matrix":function(Y){return y(Y,{})},"string, Object":function(Y,ue){var Ae=ue.nodes!==void 0?ue.nodes:{};return te(Y,Ae)},"Array | Matrix, Object":y});function y(O){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ue=Y.nodes!==void 0?Y.nodes:{};return Pe(O,function(Ae){if(typeof Ae!="string")throw new TypeError("String expected");return te(Ae,ue)})}var E={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},b={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},S={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},A={true:!0,false:!1,null:null,undefined:void 0},w=["NaN","Infinity"],D={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:` `,r:"\r",t:" "};function F(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:E.NULL,nestingLevel:0,conditionalLevel:null}}function R(O,Y){return O.expression.substr(O.index,Y)}function P(O){return R(O,1)}function U(O){O.index++}function k(O){return O.expression.charAt(O.index-1)}function M(O){return O.expression.charAt(O.index+1)}function _(O){for(O.tokenType=E.NULL,O.token="",O.comment="";;){if(P(O)==="#")for(;P(O)!==` `&&P(O)!=="";)O.comment+=P(O),U(O);if(g.isWhitespace(P(O),O.nestingLevel))U(O);else break}if(P(O)===""){O.tokenType=E.DELIMITER;return}if(P(O)===` `&&!O.nestingLevel){O.tokenType=E.DELIMITER,O.token=P(O),U(O);return}var Y=P(O),ue=R(O,2),Ae=R(O,3);if(Ae.length===3&&b[Ae]){O.tokenType=E.DELIMITER,O.token=Ae,U(O),U(O),U(O);return}if(ue.length===2&&b[ue]){O.tokenType=E.DELIMITER,O.token=ue,U(O),U(O);return}if(b[Y]){O.tokenType=E.DELIMITER,O.token=Y,U(O);return}if(g.isDigitDot(Y)){O.tokenType=E.NUMBER;var He=R(O,2);if(He==="0b"||He==="0o"||He==="0x"){for(O.token+=P(O),U(O),O.token+=P(O),U(O);g.isHexDigit(P(O));)O.token+=P(O),U(O);if(P(O)===".")for(O.token+=".",U(O);g.isHexDigit(P(O));)O.token+=P(O),U(O);else if(P(O)==="i")for(O.token+="i",U(O);g.isDigit(P(O));)O.token+=P(O),U(O);return}if(P(O)==="."){if(O.token+=P(O),U(O),!g.isDigit(P(O))){O.tokenType=E.DELIMITER;return}}else{for(;g.isDigit(P(O));)O.token+=P(O),U(O);g.isDecimalMark(P(O),M(O))&&(O.token+=P(O),U(O))}for(;g.isDigit(P(O));)O.token+=P(O),U(O);if(P(O)==="E"||P(O)==="e"){if(g.isDigit(M(O))||M(O)==="-"||M(O)==="+"){if(O.token+=P(O),U(O),(P(O)==="+"||P(O)==="-")&&(O.token+=P(O),U(O)),!g.isDigit(P(O)))throw De(O,'Digit expected, got "'+P(O)+'"');for(;g.isDigit(P(O));)O.token+=P(O),U(O);if(g.isDecimalMark(P(O),M(O)))throw De(O,'Digit expected, got "'+P(O)+'"')}else if(M(O)===".")throw U(O),De(O,'Digit expected, got "'+P(O)+'"')}return}if(g.isAlpha(P(O),k(O),M(O))){for(;g.isAlpha(P(O),k(O),M(O))||g.isDigit(P(O));)O.token+=P(O),U(O);Ie(S,O.token)?O.tokenType=E.DELIMITER:O.tokenType=E.SYMBOL;return}for(O.tokenType=E.UNKNOWN;P(O)!=="";)O.token+=P(O),U(O);throw De(O,'Syntax error in part "'+O.token+'"')}function q(O){do _(O);while(O.token===` @@ -51,16 +51,16 @@ Example: `&&ue>0},g.isDecimalMark=function(Y,ue){return Y==="."&&ue!=="/"&&ue!=="*"&&ue!=="^"},g.isDigitDot=function(Y){return Y>="0"&&Y<="9"||Y==="."},g.isDigit=function(Y){return Y>="0"&&Y<="9"},g.isHexDigit=function(Y){return Y>="0"&&Y<="9"||Y>="a"&&Y<="f"||Y>="A"&&Y<="F"};function te(O,Y){var ue=F();(0,ui.default)(ue,{expression:O,extraNodes:Y}),_(ue);var Ae=Q(ue);if(ue.token!=="")throw ue.tokenType===E.DELIMITER?Ce(ue,"Unexpected operator "+ue.token):De(ue,'Unexpected part "'+ue.token+'"');return Ae}function Q(O){var Y,ue=[],Ae;for(O.token!==""&&O.token!==` `&&O.token!==";"&&(Y=z(O),O.comment&&(Y.comment=O.comment));O.token===` `||O.token===";";)ue.length===0&&Y&&(Ae=O.token!==";",ue.push({node:Y,visible:Ae})),_(O),O.token!==` -`&&O.token!==";"&&O.token!==""&&(Y=z(O),O.comment&&(Y.comment=O.comment),Ae=O.token!==";",ue.push({node:Y,visible:Ae}));return ue.length>0?new l(ue):(Y||(Y=new s(void 0),O.comment&&(Y.comment=O.comment)),Y)}function z(O){var Y,ue,Ae,He,Xe=re(O);if(O.token==="="){if(bt(Xe))return Y=Xe.name,q(O),Ae=z(O),new o(new N(Y),Ae);if(wr(Xe))return q(O),Ae=z(O),new o(Xe.object,Xe.index,Ae);if(pr(Xe)&&bt(Xe.fn)&&(He=!0,ue=[],Y=Xe.name,Xe.args.forEach(function(Mt,jr){bt(Mt)?ue[jr]=Mt.name:He=!1}),He))return q(O),Ae=z(O),new c(Y,ue,Ae);throw De(O,"Invalid left hand side of assignment operator =")}return Xe}function re(O){for(var Y=fe(O);O.token==="?";){var ue=O.conditionalLevel;O.conditionalLevel=O.nestingLevel,q(O);var Ae=Y,He=z(O);if(O.token!==":")throw De(O,"False part of conditional expression expected");O.conditionalLevel=null,q(O);var Xe=z(O);Y=new u(Ae,He,Xe),O.conditionalLevel=ue}return Y}function fe(O){for(var Y=L(O);O.token==="or";)q(O),Y=new h("or","or",[Y,L(O)]);return Y}function L(O){for(var Y=I(O);O.token==="xor";)q(O),Y=new h("xor","xor",[Y,I(O)]);return Y}function I(O){for(var Y=$(O);O.token==="and";)q(O),Y=new h("and","and",[Y,$(O)]);return Y}function $(O){for(var Y=H(O);O.token==="|";)q(O),Y=new h("|","bitOr",[Y,H(O)]);return Y}function H(O){for(var Y=ae(O);O.token==="^|";)q(O),Y=new h("^|","bitXor",[Y,ae(O)]);return Y}function ae(O){for(var Y=ce(O);O.token==="&";)q(O),Y=new h("&","bitAnd",[Y,ce(O)]);return Y}function ce(O){for(var Y=[me(O)],ue=[],Ae={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Ie(Ae,O.token);){var He={name:O.token,fn:Ae[O.token]};ue.push(He),q(O),Y.push(me(O))}return Y.length===1?Y[0]:Y.length===2?new h(ue[0].name,ue[0].fn,Y):new x(ue.map(Xe=>Xe.fn),Y)}function me(O){var Y,ue,Ae,He;Y=Ne(O);for(var Xe={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Ie(Xe,O.token);)ue=O.token,Ae=Xe[ue],q(O),He=[Y,Ne(O)],Y=new h(ue,Ae,He);return Y}function Ne(O){var Y,ue,Ae,He;Y=Me(O);for(var Xe={to:"to",in:"to"};Ie(Xe,O.token);)ue=O.token,Ae=Xe[ue],q(O),ue==="in"&&O.token===""?Y=new h("*","multiply",[Y,new N("in")],!0):(He=[Y,Me(O)],Y=new h(ue,Ae,He));return Y}function Me(O){var Y,ue=[];if(O.token===":"?Y=new s(1):Y=j(O),O.token===":"&&O.conditionalLevel!==O.nestingLevel){for(ue.push(Y);O.token===":"&&ue.length<3;)q(O),O.token===")"||O.token==="]"||O.token===","||O.token===""?ue.push(new N("end")):ue.push(j(O));ue.length===3?Y=new v(ue[0],ue[2],ue[1]):Y=new v(ue[0],ue[1])}return Y}function j(O){var Y,ue,Ae,He;Y=X(O);for(var Xe={"+":"add","-":"subtract"};Ie(Xe,O.token);){ue=O.token,Ae=Xe[ue],q(O);var Mt=X(O);Mt.isPercentage?He=[Y,new h("*","multiply",[Y,Mt])]:He=[Y,Mt],Y=new h(ue,Ae,He)}return Y}function X(O){var Y,ue,Ae,He;Y=se(O),ue=Y;for(var Xe={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};Ie(Xe,O.token);)Ae=O.token,He=Xe[Ae],q(O),ue=se(O),Y=new h(Ae,He,[Y,ue]);return Y}function se(O){var Y,ue;for(Y=K(O),ue=Y;O.tokenType===E.SYMBOL||O.token==="in"&&et(Y)||O.tokenType===E.NUMBER&&!et(ue)&&(!Tt(ue)||ue.op==="!")||O.token==="(";)ue=K(O),Y=new h("*","multiply",[Y,ue],!0);return Y}function K(O){for(var Y=ee(O),ue=Y,Ae=[];O.token==="/"&&ts(ue);)if(Ae.push((0,ui.default)({},O)),q(O),O.tokenType===E.NUMBER)if(Ae.push((0,ui.default)({},O)),q(O),O.tokenType===E.SYMBOL||O.token==="(")(0,ui.default)(O,Ae.pop()),Ae.pop(),ue=ee(O),Y=new h("/","divide",[Y,ue]);else{Ae.pop(),(0,ui.default)(O,Ae.pop());break}else{(0,ui.default)(O,Ae.pop());break}return Y}function ee(O){var Y,ue,Ae,He;Y=ne(O);for(var Xe={"%":"mod",mod:"mod"};Ie(Xe,O.token);)ue=O.token,Ae=Xe[ue],q(O),ue==="%"&&O.tokenType===E.DELIMITER&&O.token!=="("?Y=new h("/","divide",[Y,new s(100)],!1,!0):(He=[Y,ne(O)],Y=new h(ue,Ae,He));return Y}function ne(O){var Y,ue,Ae,He={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Ie(He,O.token)?(Ae=He[O.token],Y=O.token,q(O),ue=[ne(O)],new h(Y,Ae,ue)):ve(O)}function ve(O){var Y,ue,Ae,He;return Y=ge(O),(O.token==="^"||O.token===".^")&&(ue=O.token,Ae=ue==="^"?"pow":"dotPow",q(O),He=[Y,ne(O)],Y=new h(ue,Ae,He)),Y}function ge(O){var Y,ue,Ae,He;Y=Oe(O);for(var Xe={"!":"factorial","'":"ctranspose"};Ie(Xe,O.token);)ue=O.token,Ae=Xe[ue],_(O),He=[Y],Y=new h(ue,Ae,He),Y=Qe(O,Y);return Y}function Oe(O){var Y=[];if(O.tokenType===E.SYMBOL&&Ie(O.extraNodes,O.token)){var ue=O.extraNodes[O.token];if(_(O),O.token==="("){if(Y=[],B(O),_(O),O.token!==")")for(Y.push(z(O));O.token===",";)_(O),Y.push(z(O));if(O.token!==")")throw De(O,"Parenthesis ) expected");Z(O),_(O)}return new ue(Y)}return ye(O)}function ye(O){var Y,ue;return O.tokenType===E.SYMBOL||O.tokenType===E.DELIMITER&&O.token in S?(ue=O.token,_(O),Ie(A,ue)?Y=new s(A[ue]):w.includes(ue)?Y=new s(r(ue,"number")):Y=new N(ue),Y=Qe(O,Y),Y):rt(O)}function Qe(O,Y,ue){for(var Ae;(O.token==="("||O.token==="["||O.token===".")&&(!ue||ue.includes(O.token));)if(Ae=[],O.token==="(")if(bt(Y)||wr(Y)){if(B(O),_(O),O.token!==")")for(Ae.push(z(O));O.token===",";)_(O),Ae.push(z(O));if(O.token!==")")throw De(O,"Parenthesis ) expected");Z(O),_(O),Y=new p(Y,Ae)}else return Y;else if(O.token==="["){if(B(O),_(O),O.token!=="]")for(Ae.push(z(O));O.token===",";)_(O),Ae.push(z(O));if(O.token!=="]")throw De(O,"Parenthesis ] expected");Z(O),_(O),Y=new a(Y,new f(Ae))}else{_(O);var He=O.tokenType===E.SYMBOL||O.tokenType===E.DELIMITER&&O.token in S;if(!He)throw De(O,"Property name expected after dot");Ae.push(new s(O.token)),_(O);var Xe=!0;Y=new a(Y,new f(Ae,Xe))}return Y}function rt(O){var Y,ue;return O.token==='"'||O.token==="'"?(ue=mt(O,O.token),Y=new s(ue),Y=Qe(O,Y),Y):Et(O)}function mt(O,Y){for(var ue="";P(O)!==""&&P(O)!==Y;)if(P(O)==="\\"){U(O);var Ae=P(O),He=D[Ae];if(He!==void 0)ue+=He,O.index+=1;else if(Ae==="u"){var Xe=O.expression.slice(O.index+1,O.index+5);if(/^[0-9A-Fa-f]{4}$/.test(Xe))ue+=String.fromCharCode(parseInt(Xe,16)),O.index+=5;else throw De(O,"Invalid unicode character \\u".concat(Xe))}else throw De(O,"Bad escape character \\".concat(Ae))}else ue+=P(O),U(O);if(_(O),O.token!==Y)throw De(O,"End of string ".concat(Y," expected"));return _(O),ue}function Et(O){var Y,ue,Ae,He;if(O.token==="["){if(B(O),_(O),O.token!=="]"){var Xe=W(O);if(O.token===";"){for(Ae=1,ue=[Xe];O.token===";";)_(O),O.token!=="]"&&(ue[Ae]=W(O),Ae++);if(O.token!=="]")throw De(O,"End of matrix ] expected");Z(O),_(O),He=ue[0].items.length;for(var Mt=1;Mt{var{typed:t,parse:r}=e;return t(y2,{string:function(a){return r(a).compile()},"Array | Matrix":function(a){return Pe(a,function(i){return r(i).compile()})}})});var A2="evaluate",Pk=["typed","parse"],N2=C(A2,Pk,e=>{var{typed:t,parse:r}=e;return t(A2,{string:function(a){var i=xa();return r(a).compile().evaluate(i)},"string, Map | Object":function(a,i){return r(a).compile().evaluate(i)},"Array | Matrix":function(a){var i=xa();return Pe(a,function(o){return r(o).compile().evaluate(i)})},"Array | Matrix, Map | Object":function(a,i){return Pe(a,function(o){return r(o).compile().evaluate(i)})}})});var Uk="Parser",kk=["evaluate"],T2=C(Uk,kk,e=>{var{evaluate:t}=e;function r(){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:xa(),writable:!1})}return r.prototype.type="Parser",r.prototype.isParser=!0,r.prototype.evaluate=function(n){return t(n,this.scope)},r.prototype.get=function(n){if(this.scope.has(n))return this.scope.get(n)},r.prototype.getAll=function(){return ky(this.scope)},r.prototype.getAllAsMap=function(){return this.scope},r.prototype.set=function(n,a){return this.scope.set(n,a),a},r.prototype.remove=function(n){this.scope.delete(n)},r.prototype.clear=function(){this.scope.clear()},r},{isClass:!0});var w2="parser",qk=["typed","Parser"],D2=C(w2,qk,e=>{var{typed:t,Parser:r}=e;return t(w2,{"":function(){return new r}})});var S2="lup",Hk=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],av=C(S2,Hk,e=>{var{typed:t,matrix:r,abs:n,addScalar:a,divideScalar:i,multiplyScalar:o,subtractScalar:l,larger:u,equalScalar:s,unaryMinus:c,DenseMatrix:p,SparseMatrix:f,Spa:m}=e;return t(S2,{DenseMatrix:function(x){return h(x)},SparseMatrix:function(x){return d(x)},Array:function(x){var N=r(x),g=h(N);return{L:g.L.valueOf(),U:g.U.valueOf(),p:g.p}}});function h(v){var x=v._size[0],N=v._size[1],g=Math.min(x,N),y=qe(v._data),E=[],b=[x,g],S=[],A=[g,N],w,D,F,R=[];for(w=0;w0)for(w=0;w0?new l(ue):(Y||(Y=new s(void 0),O.comment&&(Y.comment=O.comment)),Y)}function z(O){var Y,ue,Ae,He,Xe=re(O);if(O.token==="="){if(bt(Xe))return Y=Xe.name,q(O),Ae=z(O),new o(new N(Y),Ae);if(wr(Xe))return q(O),Ae=z(O),new o(Xe.object,Xe.index,Ae);if(pr(Xe)&&bt(Xe.fn)&&(He=!0,ue=[],Y=Xe.name,Xe.args.forEach(function(Mt,jr){bt(Mt)?ue[jr]=Mt.name:He=!1}),He))return q(O),Ae=z(O),new c(Y,ue,Ae);throw De(O,"Invalid left hand side of assignment operator =")}return Xe}function re(O){for(var Y=fe(O);O.token==="?";){var ue=O.conditionalLevel;O.conditionalLevel=O.nestingLevel,q(O);var Ae=Y,He=z(O);if(O.token!==":")throw De(O,"False part of conditional expression expected");O.conditionalLevel=null,q(O);var Xe=z(O);Y=new u(Ae,He,Xe),O.conditionalLevel=ue}return Y}function fe(O){for(var Y=L(O);O.token==="or";)q(O),Y=new h("or","or",[Y,L(O)]);return Y}function L(O){for(var Y=I(O);O.token==="xor";)q(O),Y=new h("xor","xor",[Y,I(O)]);return Y}function I(O){for(var Y=$(O);O.token==="and";)q(O),Y=new h("and","and",[Y,$(O)]);return Y}function $(O){for(var Y=H(O);O.token==="|";)q(O),Y=new h("|","bitOr",[Y,H(O)]);return Y}function H(O){for(var Y=ae(O);O.token==="^|";)q(O),Y=new h("^|","bitXor",[Y,ae(O)]);return Y}function ae(O){for(var Y=ce(O);O.token==="&";)q(O),Y=new h("&","bitAnd",[Y,ce(O)]);return Y}function ce(O){for(var Y=[me(O)],ue=[],Ae={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Ie(Ae,O.token);){var He={name:O.token,fn:Ae[O.token]};ue.push(He),q(O),Y.push(me(O))}return Y.length===1?Y[0]:Y.length===2?new h(ue[0].name,ue[0].fn,Y):new x(ue.map(Xe=>Xe.fn),Y)}function me(O){var Y,ue,Ae,He;Y=Ne(O);for(var Xe={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Ie(Xe,O.token);)ue=O.token,Ae=Xe[ue],q(O),He=[Y,Ne(O)],Y=new h(ue,Ae,He);return Y}function Ne(O){var Y,ue,Ae,He;Y=Me(O);for(var Xe={to:"to",in:"to"};Ie(Xe,O.token);)ue=O.token,Ae=Xe[ue],q(O),ue==="in"&&O.token===""?Y=new h("*","multiply",[Y,new N("in")],!0):(He=[Y,Me(O)],Y=new h(ue,Ae,He));return Y}function Me(O){var Y,ue=[];if(O.token===":"?Y=new s(1):Y=j(O),O.token===":"&&O.conditionalLevel!==O.nestingLevel){for(ue.push(Y);O.token===":"&&ue.length<3;)q(O),O.token===")"||O.token==="]"||O.token===","||O.token===""?ue.push(new N("end")):ue.push(j(O));ue.length===3?Y=new v(ue[0],ue[2],ue[1]):Y=new v(ue[0],ue[1])}return Y}function j(O){var Y,ue,Ae,He;Y=X(O);for(var Xe={"+":"add","-":"subtract"};Ie(Xe,O.token);){ue=O.token,Ae=Xe[ue],q(O);var Mt=X(O);Mt.isPercentage?He=[Y,new h("*","multiply",[Y,Mt])]:He=[Y,Mt],Y=new h(ue,Ae,He)}return Y}function X(O){var Y,ue,Ae,He;Y=se(O),ue=Y;for(var Xe={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};Ie(Xe,O.token);)Ae=O.token,He=Xe[Ae],q(O),ue=se(O),Y=new h(Ae,He,[Y,ue]);return Y}function se(O){var Y,ue;for(Y=K(O),ue=Y;O.tokenType===E.SYMBOL||O.token==="in"&&et(Y)||O.tokenType===E.NUMBER&&!et(ue)&&(!Tt(ue)||ue.op==="!")||O.token==="(";)ue=K(O),Y=new h("*","multiply",[Y,ue],!0);return Y}function K(O){for(var Y=ee(O),ue=Y,Ae=[];O.token==="/"&&ts(ue);)if(Ae.push((0,ui.default)({},O)),q(O),O.tokenType===E.NUMBER)if(Ae.push((0,ui.default)({},O)),q(O),O.tokenType===E.SYMBOL||O.token==="(")(0,ui.default)(O,Ae.pop()),Ae.pop(),ue=ee(O),Y=new h("/","divide",[Y,ue]);else{Ae.pop(),(0,ui.default)(O,Ae.pop());break}else{(0,ui.default)(O,Ae.pop());break}return Y}function ee(O){var Y,ue,Ae,He;Y=ne(O);for(var Xe={"%":"mod",mod:"mod"};Ie(Xe,O.token);)ue=O.token,Ae=Xe[ue],q(O),ue==="%"&&O.tokenType===E.DELIMITER&&O.token!=="("?Y=new h("/","divide",[Y,new s(100)],!1,!0):(He=[Y,ne(O)],Y=new h(ue,Ae,He));return Y}function ne(O){var Y,ue,Ae,He={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Ie(He,O.token)?(Ae=He[O.token],Y=O.token,q(O),ue=[ne(O)],new h(Y,Ae,ue)):ve(O)}function ve(O){var Y,ue,Ae,He;return Y=ge(O),(O.token==="^"||O.token===".^")&&(ue=O.token,Ae=ue==="^"?"pow":"dotPow",q(O),He=[Y,ne(O)],Y=new h(ue,Ae,He)),Y}function ge(O){var Y,ue,Ae,He;Y=Oe(O);for(var Xe={"!":"factorial","'":"ctranspose"};Ie(Xe,O.token);)ue=O.token,Ae=Xe[ue],_(O),He=[Y],Y=new h(ue,Ae,He),Y=Qe(O,Y);return Y}function Oe(O){var Y=[];if(O.tokenType===E.SYMBOL&&Ie(O.extraNodes,O.token)){var ue=O.extraNodes[O.token];if(_(O),O.token==="("){if(Y=[],B(O),_(O),O.token!==")")for(Y.push(z(O));O.token===",";)_(O),Y.push(z(O));if(O.token!==")")throw De(O,"Parenthesis ) expected");Z(O),_(O)}return new ue(Y)}return ye(O)}function ye(O){var Y,ue;return O.tokenType===E.SYMBOL||O.tokenType===E.DELIMITER&&O.token in S?(ue=O.token,_(O),Ie(A,ue)?Y=new s(A[ue]):w.includes(ue)?Y=new s(r(ue,"number")):Y=new N(ue),Y=Qe(O,Y),Y):rt(O)}function Qe(O,Y,ue){for(var Ae;(O.token==="("||O.token==="["||O.token===".")&&(!ue||ue.includes(O.token));)if(Ae=[],O.token==="(")if(bt(Y)||wr(Y)){if(B(O),_(O),O.token!==")")for(Ae.push(z(O));O.token===",";)_(O),Ae.push(z(O));if(O.token!==")")throw De(O,"Parenthesis ) expected");Z(O),_(O),Y=new p(Y,Ae)}else return Y;else if(O.token==="["){if(B(O),_(O),O.token!=="]")for(Ae.push(z(O));O.token===",";)_(O),Ae.push(z(O));if(O.token!=="]")throw De(O,"Parenthesis ] expected");Z(O),_(O),Y=new a(Y,new f(Ae))}else{_(O);var He=O.tokenType===E.SYMBOL||O.tokenType===E.DELIMITER&&O.token in S;if(!He)throw De(O,"Property name expected after dot");Ae.push(new s(O.token)),_(O);var Xe=!0;Y=new a(Y,new f(Ae,Xe))}return Y}function rt(O){var Y,ue;return O.token==='"'||O.token==="'"?(ue=mt(O,O.token),Y=new s(ue),Y=Qe(O,Y),Y):Et(O)}function mt(O,Y){for(var ue="";P(O)!==""&&P(O)!==Y;)if(P(O)==="\\"){U(O);var Ae=P(O),He=D[Ae];if(He!==void 0)ue+=He,O.index+=1;else if(Ae==="u"){var Xe=O.expression.slice(O.index+1,O.index+5);if(/^[0-9A-Fa-f]{4}$/.test(Xe))ue+=String.fromCharCode(parseInt(Xe,16)),O.index+=5;else throw De(O,"Invalid unicode character \\u".concat(Xe))}else throw De(O,"Bad escape character \\".concat(Ae))}else ue+=P(O),U(O);if(_(O),O.token!==Y)throw De(O,"End of string ".concat(Y," expected"));return _(O),ue}function Et(O){var Y,ue,Ae,He;if(O.token==="["){if(B(O),_(O),O.token!=="]"){var Xe=W(O);if(O.token===";"){for(Ae=1,ue=[Xe];O.token===";";)_(O),O.token!=="]"&&(ue[Ae]=W(O),Ae++);if(O.token!=="]")throw De(O,"End of matrix ] expected");Z(O),_(O),He=ue[0].items.length;for(var Mt=1;Mt{var{typed:t,parse:r}=e;return t(b2,{string:function(a){return r(a).compile()},"Array | Matrix":function(a){return Pe(a,function(i){return r(i).compile()})}})});var E2="evaluate",Pk=["typed","parse"],A2=C(E2,Pk,e=>{var{typed:t,parse:r}=e;return t(E2,{string:function(a){var i=xa();return r(a).compile().evaluate(i)},"string, Map | Object":function(a,i){return r(a).compile().evaluate(i)},"Array | Matrix":function(a){var i=xa();return Pe(a,function(o){return r(o).compile().evaluate(i)})},"Array | Matrix, Map | Object":function(a,i){return Pe(a,function(o){return r(o).compile().evaluate(i)})}})});var Uk="Parser",kk=["evaluate"],N2=C(Uk,kk,e=>{var{evaluate:t}=e;function r(){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:xa(),writable:!1})}return r.prototype.type="Parser",r.prototype.isParser=!0,r.prototype.evaluate=function(n){return t(n,this.scope)},r.prototype.get=function(n){if(this.scope.has(n))return this.scope.get(n)},r.prototype.getAll=function(){return Uy(this.scope)},r.prototype.getAllAsMap=function(){return this.scope},r.prototype.set=function(n,a){return this.scope.set(n,a),a},r.prototype.remove=function(n){this.scope.delete(n)},r.prototype.clear=function(){this.scope.clear()},r},{isClass:!0});var T2="parser",qk=["typed","Parser"],w2=C(T2,qk,e=>{var{typed:t,Parser:r}=e;return t(T2,{"":function(){return new r}})});var D2="lup",Hk=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],av=C(D2,Hk,e=>{var{typed:t,matrix:r,abs:n,addScalar:a,divideScalar:i,multiplyScalar:o,subtractScalar:l,larger:u,equalScalar:s,unaryMinus:c,DenseMatrix:p,SparseMatrix:f,Spa:m}=e;return t(D2,{DenseMatrix:function(x){return h(x)},SparseMatrix:function(x){return d(x)},Array:function(x){var N=r(x),g=h(N);return{L:g.L.valueOf(),U:g.U.valueOf(),p:g.p}}});function h(v){var x=v._size[0],N=v._size[1],g=Math.min(x,N),y=qe(v._data),E=[],b=[x,g],S=[],A=[g,N],w,D,F,R=[];for(w=0;w0)for(w=0;w0&&z.forEach(0,M-1,function(H,ae){f._forEachRow(H,S,A,w,function(ce,me){ce>H&&z.accumulate(ce,c(o(me,ae)))})});var L=M,I=z.get(M),$=n(I);z.forEach(M+1,x-1,function(H,ae){var ce=n(ae);u(ce,$)&&(L=H,$=ce,I=ae)}),M!==L&&(f._swapRows(M,L,D[1],S,A,w),f._swapRows(M,L,U[1],F,R,P),z.swap(M,L),Z(M,L)),z.forEach(0,x-1,function(H,ae){H<=M?(F.push(ae),R.push(H)):(ae=i(ae,I),s(ae,0)||(S.push(ae),A.push(H)))})};for(M=0;M{var{typed:t,matrix:r,zeros:n,identity:a,isZero:i,equal:o,sign:l,sqrt:u,conj:s,unaryMinus:c,addScalar:p,divideScalar:f,multiplyScalar:m,subtractScalar:h,complex:d}=e;return(0,_2.default)(t(C2,{DenseMatrix:function(y){return x(y)},SparseMatrix:function(y){return N(y)},Array:function(y){var E=r(y),b=x(E);return{Q:b.Q.valueOf(),R:b.R.valueOf()}}}),{_denseQRimpl:v});function v(g){var y=g._size[0],E=g._size[1],b=a([y],"dense"),S=b._data,A=g.clone(),w=A._data,D,F,R,P=n([y],"");for(R=0;R0)for(var b=E[0][0].type==="Complex"?d(0):0,S=0;S=0;){var u=r[o+l],s=r[n+u];s===-1?(l--,i[t++]=u):(r[n+u]=r[a+s],++l,r[o+l]=s)}return t}function O2(e,t){if(!e)return null;var r=0,n,a=[],i=[],o=0,l=t,u=2*t;for(n=0;n=0;n--)e[n]!==-1&&(i[l+n]=i[o+e[n]],i[o+e[n]]=n);for(n=0;n{var{add:t,multiply:r,transpose:n}=e;return function(c,p){if(!p||c<=0||c>3)return null;var f=p._size,m=f[0],h=f[1],d=0,v=Math.max(16,10*Math.sqrt(h));v=Math.min(h-2,v);var x=a(c,p,m,h,v);F2(x,u,null);for(var N=x._index,g=x._ptr,y=g[h],E=[],b=[],S=0,A=h+1,w=2*(h+1),D=3*(h+1),F=4*(h+1),R=5*(h+1),P=6*(h+1),U=7*(h+1),k=E,M=i(h,g,b,S,D,k,w,U,A,P,F,R),_=o(h,g,b,R,F,P,v,A,D,k,w),q=0,B,Z,te,Q,z,re,fe,L,I,$,H,ae,ce,me,Ne,Me;_j?(re=te,fe=K,L=b[S+te]-j):(re=N[K++],fe=g[re],L=b[S+re]),z=1;z<=L;z++)B=N[fe++],!((I=b[A+B])<=0)&&(se+=I,b[A+B]=-I,N[ne++]=B,b[w+B]!==-1&&(k[b[w+B]]=k[B]),k[B]!==-1?b[w+k[B]]=b[w+B]:b[D+b[R+B]]=b[w+B]);re!==te&&(g[re]=Cn(te),b[P+re]=0)}for(j!==0&&(y=ne),b[R+te]=se,g[te]=ee,b[S+te]=ne-ee,b[F+te]=-2,M=l(M,d,b,P,h),$=ee;$=M?b[P+re]-=I:b[P+re]!==0&&(b[P+re]=b[R+re]+ve)}for($=ee;$0?(Me+=ge,N[me++]=re,Ne+=re):(g[re]=Cn(te),b[P+re]=0)}b[F+B]=me-ae+1;var Oe=me,ye=ae+b[S+B];for(K=ce+1;K=0))for(Ne=k[B],B=b[U+Ne],b[U+Ne]=-1;B!==-1&&b[w+B]!==-1;B=b[w+B],M++){for(L=b[S+B],H=b[F+B],K=g[B]+1;K<=g[B]+L-1;K++)b[P+N[K]]=M;var rt=B;for(Z=b[w+B];Z!==-1;){var mt=b[S+Z]===L&&b[F+Z]===H;for(K=g[Z]+1;mt&&K<=g[Z]+L-1;K++)b[P+N[K]]!==M&&(mt=0);mt?(g[Z]=Cn(B),b[A+B]+=b[A+Z],b[A+Z]=0,b[F+Z]=-1,Z=b[w+Z],b[w+rt]=Z):(rt=Z,Z=b[w+Z])}}for(K=ee,$=ee;$=0;Z--)b[A+Z]>0||(b[w+Z]=b[D+g[Z]],b[D+g[Z]]=Z);for(re=h;re>=0;re--)b[A+re]<=0||g[re]!==-1&&(b[w+re]=b[D+g[re]],b[D+g[re]]=re);for(te=0,B=0;B<=h;B++)g[B]===-1&&(te=Kl(B,te,b,D,w,E,P));return E.splice(E.length-1,1),E};function a(s,c,p,f,m){var h=n(c);if(s===1&&f===p)return t(c,h);if(s===2){for(var d=h._index,v=h._ptr,x=0,N=0;Nm))for(var y=v[N+1];gd)p[v+E]=0,p[m+E]=-1,y++,c[E]=Cn(s),p[v+s]++;else{var S=p[x+b];S!==-1&&(N[S]=E),p[g+E]=p[x+b],p[x+b]=E}}return y}function l(s,c,p,f,m){if(s<2||s+c<0){for(var h=0;h{var{transpose:t}=e;return function(r,n,a,i){if(!r||!n||!a)return null;var o=r._size,l=o[0],u=o[1],s,c,p,f,m,h,d,v=4*u+(i?u+l+1:0),x=[],N=0,g=u,y=2*u,E=3*u,b=4*u,S=5*u+1;for(p=0;p=1&&A[c]++,R.jleaf===2&&A[R.q]--}n[c]!==-1&&(x[N+c]=n[c])}for(c=0;c{var{add:t,multiply:r,transpose:n}=e,a=I2({add:t,multiply:r,transpose:n}),i=L2({transpose:n});return function(u,s,c){var p=s._ptr,f=s._size,m=f[1],h,d={};if(d.q=a(u,s),u&&!d.q)return null;if(c){var v=u?M2(s,null,d.q,0):s;d.parent=R2(v,1);var x=O2(d.parent,m);if(d.cp=i(v,d.parent,x,1),v&&d.parent&&d.cp&&o(v,d))for(d.unz=0,h=0;h=0;S--)for(w=s[S],D=s[S+1],A=w;A=0;b--)d[b]=-1,S=v[b],S!==-1&&(x[E+S]++===0&&(x[y+S]=b),x[N+b]=x[g+S],x[g+S]=b);for(u.lnz=0,u.m2=f,S=0;S=0;){e=n[f];var m=a?a[e]:e;_s(o,e)||(Wl(o,e),n[u+f]=m<0?0:ov(o[m]));var h=1;for(c=n[u+f],p=m<0?0:ov(o[m+1]);c{var{divideScalar:t,multiply:r,subtract:n}=e;return function(i,o,l,u,s,c,p){var f=i._values,m=i._index,h=i._ptr,d=i._size,v=d[1],x=o._values,N=o._index,g=o._ptr,y,E,b,S,A=k2(i,o,l,u,c);for(y=A;y{var{abs:t,divideScalar:r,multiply:n,subtract:a,larger:i,largerEq:o,SparseMatrix:l}=e,u=q2({divideScalar:r,multiply:n,subtract:a});return function(c,p,f){if(!c)return null;var m=c._size,h=m[1],d,v=100,x=100;p&&(d=p.q,v=p.lnz||v,x=p.unz||x);var N=[],g=[],y=[],E=new l({values:N,index:g,ptr:y,size:[h,h]}),b=[],S=[],A=[],w=new l({values:b,index:S,ptr:A,size:[h,h]}),D=[],F,R,P=[],U=[];for(F=0;F{var{typed:t,abs:r,add:n,multiply:a,transpose:i,divideScalar:o,subtract:l,larger:u,largerEq:s,SparseMatrix:c}=e,p=P2({add:n,multiply:a,transpose:i}),f=H2({abs:r,divideScalar:o,multiply:a,subtract:l,larger:u,largerEq:s,SparseMatrix:c});return t(z2,{"SparseMatrix, number, number":function(h,d,v){if(!Re(d)||d<0||d>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(v<0||v>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var x=p(d,h,!1),N=f(h,x,v);return{L:N.L,U:N.U,p:N.pinv,q:x.q,toString:function(){return"L: "+this.L.toString()+` +P: `+this.p}}}});var C2=Le(va(),1);var S2="qr",zk=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],iv=C(S2,zk,e=>{var{typed:t,matrix:r,zeros:n,identity:a,isZero:i,equal:o,sign:l,sqrt:u,conj:s,unaryMinus:c,addScalar:p,divideScalar:f,multiplyScalar:m,subtractScalar:h,complex:d}=e;return(0,C2.default)(t(S2,{DenseMatrix:function(y){return x(y)},SparseMatrix:function(y){return N(y)},Array:function(y){var E=r(y),b=x(E);return{Q:b.Q.valueOf(),R:b.R.valueOf()}}}),{_denseQRimpl:v});function v(g){var y=g._size[0],E=g._size[1],b=a([y],"dense"),S=b._data,A=g.clone(),w=A._data,D,F,R,P=n([y],"");for(R=0;R0)for(var b=E[0][0].type==="Complex"?d(0):0,S=0;S=0;){var u=r[o+l],s=r[n+u];s===-1?(l--,i[t++]=u):(r[n+u]=r[a+s],++l,r[o+l]=s)}return t}function M2(e,t){if(!e)return null;var r=0,n,a=[],i=[],o=0,l=t,u=2*t;for(n=0;n=0;n--)e[n]!==-1&&(i[l+n]=i[o+e[n]],i[o+e[n]]=n);for(n=0;n{var{add:t,multiply:r,transpose:n}=e;return function(c,p){if(!p||c<=0||c>3)return null;var f=p._size,m=f[0],h=f[1],d=0,v=Math.max(16,10*Math.sqrt(h));v=Math.min(h-2,v);var x=a(c,p,m,h,v);R2(x,u,null);for(var N=x._index,g=x._ptr,y=g[h],E=[],b=[],S=0,A=h+1,w=2*(h+1),D=3*(h+1),F=4*(h+1),R=5*(h+1),P=6*(h+1),U=7*(h+1),k=E,M=i(h,g,b,S,D,k,w,U,A,P,F,R),_=o(h,g,b,R,F,P,v,A,D,k,w),q=0,B,Z,te,Q,z,re,fe,L,I,$,H,ae,ce,me,Ne,Me;_j?(re=te,fe=K,L=b[S+te]-j):(re=N[K++],fe=g[re],L=b[S+re]),z=1;z<=L;z++)B=N[fe++],!((I=b[A+B])<=0)&&(se+=I,b[A+B]=-I,N[ne++]=B,b[w+B]!==-1&&(k[b[w+B]]=k[B]),k[B]!==-1?b[w+k[B]]=b[w+B]:b[D+b[R+B]]=b[w+B]);re!==te&&(g[re]=Cn(te),b[P+re]=0)}for(j!==0&&(y=ne),b[R+te]=se,g[te]=ee,b[S+te]=ne-ee,b[F+te]=-2,M=l(M,d,b,P,h),$=ee;$=M?b[P+re]-=I:b[P+re]!==0&&(b[P+re]=b[R+re]+ve)}for($=ee;$0?(Me+=ge,N[me++]=re,Ne+=re):(g[re]=Cn(te),b[P+re]=0)}b[F+B]=me-ae+1;var Oe=me,ye=ae+b[S+B];for(K=ce+1;K=0))for(Ne=k[B],B=b[U+Ne],b[U+Ne]=-1;B!==-1&&b[w+B]!==-1;B=b[w+B],M++){for(L=b[S+B],H=b[F+B],K=g[B]+1;K<=g[B]+L-1;K++)b[P+N[K]]=M;var rt=B;for(Z=b[w+B];Z!==-1;){var mt=b[S+Z]===L&&b[F+Z]===H;for(K=g[Z]+1;mt&&K<=g[Z]+L-1;K++)b[P+N[K]]!==M&&(mt=0);mt?(g[Z]=Cn(B),b[A+B]+=b[A+Z],b[A+Z]=0,b[F+Z]=-1,Z=b[w+Z],b[w+rt]=Z):(rt=Z,Z=b[w+Z])}}for(K=ee,$=ee;$=0;Z--)b[A+Z]>0||(b[w+Z]=b[D+g[Z]],b[D+g[Z]]=Z);for(re=h;re>=0;re--)b[A+re]<=0||g[re]!==-1&&(b[w+re]=b[D+g[re]],b[D+g[re]]=re);for(te=0,B=0;B<=h;B++)g[B]===-1&&(te=Kl(B,te,b,D,w,E,P));return E.splice(E.length-1,1),E};function a(s,c,p,f,m){var h=n(c);if(s===1&&f===p)return t(c,h);if(s===2){for(var d=h._index,v=h._ptr,x=0,N=0;Nm))for(var y=v[N+1];gd)p[v+E]=0,p[m+E]=-1,y++,c[E]=Cn(s),p[v+s]++;else{var S=p[x+b];S!==-1&&(N[S]=E),p[g+E]=p[x+b],p[x+b]=E}}return y}function l(s,c,p,f,m){if(s<2||s+c<0){for(var h=0;h{var{transpose:t}=e;return function(r,n,a,i){if(!r||!n||!a)return null;var o=r._size,l=o[0],u=o[1],s,c,p,f,m,h,d,v=4*u+(i?u+l+1:0),x=[],N=0,g=u,y=2*u,E=3*u,b=4*u,S=5*u+1;for(p=0;p=1&&A[c]++,R.jleaf===2&&A[R.q]--}n[c]!==-1&&(x[N+c]=n[c])}for(c=0;c{var{add:t,multiply:r,transpose:n}=e,a=F2({add:t,multiply:r,transpose:n}),i=B2({transpose:n});return function(u,s,c){var p=s._ptr,f=s._size,m=f[1],h,d={};if(d.q=a(u,s),u&&!d.q)return null;if(c){var v=u?_2(s,null,d.q,0):s;d.parent=O2(v,1);var x=M2(d.parent,m);if(d.cp=i(v,d.parent,x,1),v&&d.parent&&d.cp&&o(v,d))for(d.unz=0,h=0;h=0;S--)for(w=s[S],D=s[S+1],A=w;A=0;b--)d[b]=-1,S=v[b],S!==-1&&(x[E+S]++===0&&(x[y+S]=b),x[N+b]=x[g+S],x[g+S]=b);for(u.lnz=0,u.m2=f,S=0;S=0;){e=n[f];var m=a?a[e]:e;_s(o,e)||(Wl(o,e),n[u+f]=m<0?0:ov(o[m]));var h=1;for(c=n[u+f],p=m<0?0:ov(o[m+1]);c{var{divideScalar:t,multiply:r,subtract:n}=e;return function(i,o,l,u,s,c,p){var f=i._values,m=i._index,h=i._ptr,d=i._size,v=d[1],x=o._values,N=o._index,g=o._ptr,y,E,b,S,A=U2(i,o,l,u,c);for(y=A;y{var{abs:t,divideScalar:r,multiply:n,subtract:a,larger:i,largerEq:o,SparseMatrix:l}=e,u=k2({divideScalar:r,multiply:n,subtract:a});return function(c,p,f){if(!c)return null;var m=c._size,h=m[1],d,v=100,x=100;p&&(d=p.q,v=p.lnz||v,x=p.unz||x);var N=[],g=[],y=[],E=new l({values:N,index:g,ptr:y,size:[h,h]}),b=[],S=[],A=[],w=new l({values:b,index:S,ptr:A,size:[h,h]}),D=[],F,R,P=[],U=[];for(F=0;F{var{typed:t,abs:r,add:n,multiply:a,transpose:i,divideScalar:o,subtract:l,larger:u,largerEq:s,SparseMatrix:c}=e,p=L2({add:n,multiply:a,transpose:i}),f=q2({abs:r,divideScalar:o,multiply:a,subtract:l,larger:u,largerEq:s,SparseMatrix:c});return t(H2,{"SparseMatrix, number, number":function(h,d,v){if(!Re(d)||d<0||d>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(v<0||v>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var x=p(d,h,!1),N=f(h,x,v);return{L:N.L,U:N.U,p:N.pinv,q:x.q,toString:function(){return"L: "+this.L.toString()+` U: `+this.U.toString()+` p: `+this.p.toString()+(this.q?` q: `+this.q.toString():"")+` -`}}}})});function uv(e,t){var r,n=t.length,a=[];if(e)for(r=0;r{var{typed:t,matrix:r,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(G2,{"Array, Array | Matrix":function(f,m){f=r(f);var h=n(f),d=c(h.L,h.U,h.p,null,m);return d.valueOf()},"DenseMatrix, Array | Matrix":function(f,m){var h=n(f);return c(h.L,h.U,h.p,null,m)},"SparseMatrix, Array | Matrix":function(f,m){var h=n(f);return c(h.L,h.U,h.p,null,m)},"SparseMatrix, Array | Matrix, number, number":function(f,m,h,d){var v=a(f,h,d);return c(v.L,v.U,v.p,v.q,m)},"Object, Array | Matrix":function(f,m){return c(f.L,f.U,f.p,f.q,m)}});function s(p){if(Fe(p))return p;if(at(p))return r(p);throw new TypeError("Invalid Matrix LU decomposition")}function c(p,f,m,h,d){p=s(p),f=s(f),m&&(d=u(p,d,!0),d._data=uv(m,d._data));var v=o(p,d),x=i(f,v);return h&&(x._data=uv(h,x._data)),x}});var Y2="polynomialRoot",tq=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],lv=C(Y2,tq,e=>{var{typed:t,isZero:r,equalScalar:n,add:a,subtract:i,multiply:o,divide:l,sqrt:u,unaryMinus:s,cbrt:c,typeOf:p,im:f,re:m}=e;return t(Y2,{"number|Complex, ...number|Complex":(h,d)=>{for(var v=[h,...d];v.length>0&&r(v[v.length-1]);)v.pop();if(v.length<2)throw new RangeError("Polynomial [".concat(h,", ").concat(d,"] must have a non-zero non-constant coefficient"));switch(v.length){case 2:return[s(l(v[0],v[1]))];case 3:{var[x,N,g]=v,y=o(2,g),E=o(N,N),b=o(4,g,x);if(n(E,b))return[l(s(N),y)];var S=u(i(E,b));return[l(i(S,N),y),l(i(s(S),N),y)]}case 4:{var[A,w,D,F]=v,R=s(o(3,F)),P=o(D,D),U=o(3,F,w),k=a(o(2,D,D,D),o(27,F,F,A)),M=o(9,F,D,w);if(n(P,U)&&n(k,M))return[l(D,R)];var _=i(P,U),q=i(k,M),B=a(o(18,F,D,w,A),o(D,D,w,w)),Z=a(o(4,D,D,D,A),o(4,F,w,w,w),o(27,F,F,A,A));if(n(B,Z))return[l(i(o(4,F,D,w),a(o(9,F,F,A),o(D,D,D))),o(F,_)),l(i(o(9,F,A),o(D,w)),o(2,_))];var te;n(P,U)?te=q:te=l(a(q,u(i(o(q,q),o(4,_,_,_)))),2);var Q=!0,z=c(te,Q).toArray().map(re=>l(a(D,re,l(_,re)),R));return z.map(re=>p(re)==="Complex"&&n(m(re),m(re)+f(re))?m(re):re)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(v))}}})});var rq="Help",nq=["evaluate"],j2=C(rq,nq,e=>{var{evaluate:t}=e;function r(n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return r.prototype.type="Help",r.prototype.isHelp=!0,r.prototype.toString=function(){var n=this.doc||{},a=` +`}}}})});function uv(e,t){var r,n=t.length,a=[];if(e)for(r=0;r{var{typed:t,matrix:r,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:l}=e,u=Yn({DenseMatrix:l});return t(z2,{"Array, Array | Matrix":function(f,m){f=r(f);var h=n(f),d=c(h.L,h.U,h.p,null,m);return d.valueOf()},"DenseMatrix, Array | Matrix":function(f,m){var h=n(f);return c(h.L,h.U,h.p,null,m)},"SparseMatrix, Array | Matrix":function(f,m){var h=n(f);return c(h.L,h.U,h.p,null,m)},"SparseMatrix, Array | Matrix, number, number":function(f,m,h,d){var v=a(f,h,d);return c(v.L,v.U,v.p,v.q,m)},"Object, Array | Matrix":function(f,m){return c(f.L,f.U,f.p,f.q,m)}});function s(p){if(Fe(p))return p;if(at(p))return r(p);throw new TypeError("Invalid Matrix LU decomposition")}function c(p,f,m,h,d){p=s(p),f=s(f),m&&(d=u(p,d,!0),d._data=uv(m,d._data));var v=o(p,d),x=i(f,v);return h&&(x._data=uv(h,x._data)),x}});var G2="polynomialRoot",tq=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],lv=C(G2,tq,e=>{var{typed:t,isZero:r,equalScalar:n,add:a,subtract:i,multiply:o,divide:l,sqrt:u,unaryMinus:s,cbrt:c,typeOf:p,im:f,re:m}=e;return t(G2,{"number|Complex, ...number|Complex":(h,d)=>{for(var v=[h,...d];v.length>0&&r(v[v.length-1]);)v.pop();if(v.length<2)throw new RangeError("Polynomial [".concat(h,", ").concat(d,"] must have a non-zero non-constant coefficient"));switch(v.length){case 2:return[s(l(v[0],v[1]))];case 3:{var[x,N,g]=v,y=o(2,g),E=o(N,N),b=o(4,g,x);if(n(E,b))return[l(s(N),y)];var S=u(i(E,b));return[l(i(S,N),y),l(i(s(S),N),y)]}case 4:{var[A,w,D,F]=v,R=s(o(3,F)),P=o(D,D),U=o(3,F,w),k=a(o(2,D,D,D),o(27,F,F,A)),M=o(9,F,D,w);if(n(P,U)&&n(k,M))return[l(D,R)];var _=i(P,U),q=i(k,M),B=a(o(18,F,D,w,A),o(D,D,w,w)),Z=a(o(4,D,D,D,A),o(4,F,w,w,w),o(27,F,F,A,A));if(n(B,Z))return[l(i(o(4,F,D,w),a(o(9,F,F,A),o(D,D,D))),o(F,_)),l(i(o(9,F,A),o(D,w)),o(2,_))];var te;n(P,U)?te=q:te=l(a(q,u(i(o(q,q),o(4,_,_,_)))),2);var Q=!0,z=c(te,Q).toArray().map(re=>l(a(D,re,l(_,re)),R));return z.map(re=>p(re)==="Complex"&&n(m(re),m(re)+f(re))?m(re):re)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(v))}}})});var rq="Help",nq=["evaluate"],Y2=C(rq,nq,e=>{var{evaluate:t}=e;function r(n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return r.prototype.type="Help",r.prototype.isHelp=!0,r.prototype.toString=function(){var n=this.doc||{},a=` `;if(n.name&&(a+="Name: "+n.name+` `),n.category&&(a+="Category: "+n.category+` @@ -79,30 +79,30 @@ q: `+this.q.toString():"")+` `,i&&t("config(originalConfig)",{originalConfig:o})}return n.mayThrow&&n.mayThrow.length&&(a+="Throws: "+n.mayThrow.join(", ")+` `),n.seealso&&n.seealso.length&&(a+="See also: "+n.seealso.join(", ")+` -`),a},r.prototype.toJSON=function(){var n=qe(this.doc);return n.mathjs="Help",n},r.fromJSON=function(n){var a={};return Object.keys(n).filter(i=>i!=="mathjs").forEach(i=>{a[i]=n[i]}),new r(a)},r.prototype.valueOf=r.prototype.toString,r},{isClass:!0});var aq="Chain",iq=["?on","math","typed"],V2=C(aq,iq,e=>{var{on:t,math:r,typed:n}=e;function a(s){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");Ii(s)?this.value=s.value:this.value=s}a.prototype.type="Chain",a.prototype.isChain=!0,a.prototype.done=function(){return this.value},a.prototype.valueOf=function(){return this.value},a.prototype.toString=function(){return je(this.value)},a.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},a.fromJSON=function(s){return new a(s.value)};function i(s,c){typeof c=="function"&&(a.prototype[s]=l(c))}function o(s,c){Li(a.prototype,s,function(){var f=c();if(typeof f=="function")return l(f)})}function l(s){return function(){if(arguments.length===0)return new a(s(this.value));for(var c=[this.value],p=0;ps[h])};for(var f in s)p(f)}};var u={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return a.createProxy(r),t&&t("import",function(s,c,p){p||o(s,c)}),a},{isClass:!0});var pv={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]};var $2={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};var X2={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]};var K2={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]};var W2={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};var Q2={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};var Z2={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]};var J2={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]};var ew={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};var tw={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};var rw={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]};var fv={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]};var nw={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]};var aw={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};var iw={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]};var ow={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};var sw={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};var uw={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]};var cw={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]};var lw={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]};var pw={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]};var fw={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]};var mw={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]};var dw={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]};var hw={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]};var vw={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]};var gw={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]};var xw={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]};var bw={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]};var yw={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]};var Ew={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]};var Aw={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]};var Nw={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]};var Tw={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]};var ww={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]};var Dw={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]};var Sw={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]};var Cw={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]};var _w={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]};var Mw={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]};var Ow={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]};var Rw={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]};var Fw={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]};var Iw={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]};var Bw={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]};var Lw={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]};var Pw={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]};var Uw={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]};var kw={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]};var qw={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]};var Hw={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]};var zw={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]};var Gw={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]};var Yw={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]};var jw={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]};var Vw={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]};var $w={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]};var Xw={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]};var Kw={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]};var Ww={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]};var Qw={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]};var Zw={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]};var Jw={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]};var eD={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]};var tD={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]};var rD={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax \u2263 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]};var nD={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]};var aD={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]};var iD={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]};var oD={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]};var sD={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]};var uD={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]};var cD={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]};var lD={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']};var pD={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]};var fD={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]};var mD={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]};var dD={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]};var hD={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]};var vD={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]};var gD={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]};var xD={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]};var bD={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]};var yD={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]};var ED={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]};var AD={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]};var ND={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]};var TD={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]};var wD={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]};var DD={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};var SD={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};var CD={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]};var _D={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]};var MD={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]};var OD={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]};var RD={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]};var FD={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]};var ID={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]};var BD={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]};var LD={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]};var PD={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]};var UD={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]};var kD={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]};var qD={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]};var HD={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:[]};var zD={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]};var GD={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]};var YD={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]};var jD={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]};var VD={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]};var $D={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]};var XD={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]};var KD={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]};var WD={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var QD={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]};var ZD={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]};var JD={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};var eS={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var tS={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var rS={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]};var nS={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]};var aS={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]};var iS={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]};var oS={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]};var sS={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]};var uS={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]};var cS={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var lS={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var pS={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore\u2013Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]};var fS={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]};var mS={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]};var dS={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]};var hS={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]};var vS={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]};var gS={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]};var xS={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]};var bS={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"range(1m, 1m, 3m)","a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]};var yS={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]};var ES={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]};var AS={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]};var NS={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]};var TS={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]};var wS={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]};var DS={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]};var SS={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]};var CS={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]};var _S={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]};var MS={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};var OS={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]};var RS={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]};var FS={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]};var IS={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]};var BS={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]};var LS={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]};var PS={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]};var US={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]};var kS={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]};var qS={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]};var HS={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]};var zS={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]};var GS={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]};var YS={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]};var jS={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]};var VS={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]};var $S={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]};var XS={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]};var KS={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]};var WS={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]};var QS={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]};var ZS={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]};var JS={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]};var eC={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]};var tC={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]};var rC={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]};var nC={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]};var aC={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]};var iC={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]};var oC={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]};var sC={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]};var uC={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]};var cC={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]};var lC={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]};var pC={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]};var fC={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]};var mC={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]};var dC={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]};var hC={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemanns Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]};var vC={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]};var gC={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]};var xC={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]};var bC={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]};var yC={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]};var EC={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]};var AC={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]};var NC={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. +`),a},r.prototype.toJSON=function(){var n=qe(this.doc);return n.mathjs="Help",n},r.fromJSON=function(n){var a={};return Object.keys(n).filter(i=>i!=="mathjs").forEach(i=>{a[i]=n[i]}),new r(a)},r.prototype.valueOf=r.prototype.toString,r},{isClass:!0});var aq="Chain",iq=["?on","math","typed"],j2=C(aq,iq,e=>{var{on:t,math:r,typed:n}=e;function a(s){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");Ii(s)?this.value=s.value:this.value=s}a.prototype.type="Chain",a.prototype.isChain=!0,a.prototype.done=function(){return this.value},a.prototype.valueOf=function(){return this.value},a.prototype.toString=function(){return je(this.value)},a.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},a.fromJSON=function(s){return new a(s.value)};function i(s,c){typeof c=="function"&&(a.prototype[s]=l(c))}function o(s,c){Li(a.prototype,s,function(){var f=c();if(typeof f=="function")return l(f)})}function l(s){return function(){if(arguments.length===0)return new a(s(this.value));for(var c=[this.value],p=0;ps[h])};for(var f in s)p(f)}};var u={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return a.createProxy(r),t&&t("import",function(s,c,p){p||o(s,c)}),a},{isClass:!0});var pv={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]};var V2={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};var $2={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]};var X2={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]};var K2={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};var W2={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};var Q2={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]};var Z2={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]};var J2={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};var ew={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};var tw={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]};var fv={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]};var rw={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]};var nw={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};var aw={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]};var iw={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};var ow={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};var sw={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]};var uw={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]};var cw={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]};var lw={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]};var pw={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]};var fw={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]};var mw={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]};var dw={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]};var hw={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]};var vw={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]};var gw={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]};var xw={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]};var bw={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]};var yw={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]};var Ew={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]};var Aw={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]};var Nw={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]};var Tw={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]};var ww={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]};var Dw={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]};var Sw={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]};var Cw={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]};var _w={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]};var Mw={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]};var Ow={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]};var Rw={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]};var Fw={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]};var Iw={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]};var Bw={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]};var Lw={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]};var Pw={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]};var Uw={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]};var kw={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]};var qw={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]};var Hw={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]};var zw={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]};var Gw={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]};var Yw={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]};var jw={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]};var Vw={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]};var $w={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]};var Xw={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]};var Kw={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]};var Ww={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]};var Qw={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]};var Zw={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]};var Jw={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]};var eD={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]};var tD={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax \u2263 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]};var rD={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]};var nD={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]};var aD={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]};var iD={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]};var oD={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]};var sD={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]};var uD={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]};var cD={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']};var lD={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]};var pD={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]};var fD={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]};var mD={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]};var dD={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]};var hD={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]};var vD={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]};var gD={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]};var xD={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]};var bD={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]};var yD={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]};var ED={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]};var AD={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]};var ND={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]};var TD={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]};var wD={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};var DD={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};var SD={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]};var CD={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]};var _D={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]};var MD={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]};var OD={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]};var RD={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]};var FD={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]};var ID={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]};var BD={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]};var LD={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]};var PD={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]};var UD={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]};var kD={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]};var qD={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:[]};var HD={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]};var zD={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]};var GD={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]};var YD={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]};var jD={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]};var VD={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]};var $D={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]};var XD={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]};var KD={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var WD={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]};var QD={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]};var ZD={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};var JD={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var eS={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var tS={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]};var rS={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]};var nS={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]};var aS={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]};var iS={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]};var oS={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]};var sS={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]};var uS={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var cS={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var lS={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore\u2013Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]};var pS={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]};var fS={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]};var mS={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]};var dS={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]};var hS={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]};var vS={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]};var gS={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]};var xS={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"range(1m, 1m, 3m)","a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]};var bS={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]};var yS={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]};var ES={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]};var AS={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]};var NS={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]};var TS={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]};var wS={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]};var DS={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]};var SS={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]};var CS={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]};var _S={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};var MS={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]};var OS={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]};var RS={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]};var FS={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]};var IS={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]};var BS={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]};var LS={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]};var PS={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]};var US={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]};var kS={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]};var qS={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]};var HS={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]};var zS={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]};var GS={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]};var YS={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]};var jS={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]};var VS={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]};var $S={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]};var XS={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]};var KS={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]};var WS={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]};var QS={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]};var ZS={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]};var JS={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]};var eC={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]};var tC={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]};var rC={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]};var nC={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]};var aC={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]};var iC={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]};var oC={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]};var sC={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]};var uC={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]};var cC={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]};var lC={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]};var pC={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]};var fC={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]};var mC={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]};var dC={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemanns Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]};var hC={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]};var vC={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]};var gC={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]};var xC={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]};var bC={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]};var yC={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]};var EC={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]};var AC={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. -In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var TC={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var wC={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var DC={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var SC={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var CC={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var _C={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var MC={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var OC={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var RC={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var FC={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var IC={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var BC={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var LC={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var PC={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var UC={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var kC={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var qC={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]};var HC={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]};var zC={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]};var GC={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]};var YC={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]};var jC={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]};var VC={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]};var $C={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]};var XC={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]};var KC={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]};var WC={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]};var QC={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var ZC={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]};var JC={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]};var e_={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]};var t_={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var r_={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]};var n_={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]};var a_={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]};var i_={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var o_={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var s_={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var u_={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]};var c_={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]};var l_={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var p_={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var f_={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]};var m_={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","fraction","bignumber","string","format"]};var d_={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var h_={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]};var v_={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]};var g_={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]};var x_={bignumber:uw,boolean:cw,complex:lw,createUnit:pw,fraction:fw,index:mw,matrix:dw,number:hw,sparse:vw,splitUnit:gw,string:xw,unit:bw,e:pv,E:pv,false:$2,i:X2,Infinity:K2,LN2:Q2,LN10:W2,LOG2E:J2,LOG10E:Z2,NaN:ew,null:tw,pi:fv,PI:fv,phi:rw,SQRT1_2:nw,SQRT2:aw,tau:iw,true:ow,version:sw,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:Nw,lsolve:ww,lsolveAll:Dw,lup:Sw,lusolve:Cw,leafCount:Tw,polynomialRoot:_w,resolve:Rw,simplify:Fw,simplifyConstant:Iw,simplifyCore:Bw,symbolicEqual:Pw,rationalize:Ow,slu:Lw,usolve:Uw,usolveAll:kw,qr:Mw,abs:qw,add:Hw,cbrt:zw,ceil:Gw,cube:Yw,divide:jw,dotDivide:Vw,dotMultiply:$w,dotPow:Xw,exp:Kw,expm:Ww,expm1:Qw,fix:Zw,floor:Jw,gcd:eD,hypot:tD,lcm:nD,log:aD,log2:sD,log1p:oD,log10:iD,mod:uD,multiply:cD,norm:lD,nthRoot:pD,nthRoots:fD,pow:mD,round:dD,sign:hD,sqrt:vD,sqrtm:gD,square:ED,subtract:AD,unaryMinus:ND,unaryPlus:TD,xgcd:wD,invmod:rD,bitAnd:DD,bitNot:SD,bitOr:CD,bitXor:_D,leftShift:MD,rightArithShift:OD,rightLogShift:RD,bellNumbers:FD,catalan:ID,composition:BD,stirlingS2:LD,config:yw,import:Ew,typed:Aw,arg:PD,conj:UD,re:qD,im:kD,evaluate:HD,help:zD,distance:GD,intersect:YD,and:jD,not:VD,or:$D,xor:XD,concat:WD,count:QD,cross:ZD,column:KD,ctranspose:JD,det:eS,diag:tS,diff:rS,dot:nS,getMatrixDataType:uS,identity:cS,filter:iS,flatten:oS,forEach:sS,inv:lS,pinv:pS,eigs:aS,kron:fS,matrixFromFunction:hS,matrixFromRows:vS,matrixFromColumns:dS,map:mS,ones:gS,partitionSelect:xS,range:bS,resize:ES,reshape:yS,rotate:AS,rotationMatrix:NS,row:TS,size:wS,sort:DS,squeeze:SS,subset:CS,trace:_S,transpose:MS,zeros:OS,fft:RS,ifft:FS,sylvester:xD,schur:bD,lyap:yD,solveODE:g_,combinations:IS,combinationsWithRep:BS,factorial:LS,gamma:PS,kldivergence:kS,lgamma:US,multinomial:qS,permutations:HS,pickRandom:zS,random:GS,randomInt:YS,compare:jS,compareNatural:VS,compareText:$S,deepEqual:XS,equal:KS,equalText:WS,larger:QS,largerEq:ZS,smaller:JS,smallerEq:eC,unequal:tC,setCartesian:rC,setDifference:nC,setDistinct:aC,setIntersect:iC,setIsSubset:oC,setMultiplicity:sC,setPowerset:uC,setSize:cC,setSymDifference:lC,setUnion:pC,zpk2tf:fC,freqz:mC,erf:dC,zeta:hC,cumsum:wC,mad:vC,max:gC,mean:xC,median:bC,min:yC,mode:EC,prod:AC,quantileSeq:NC,std:TC,sum:DC,variance:SC,corr:CC,acos:_C,acosh:MC,acot:OC,acoth:RC,acsc:FC,acsch:IC,asec:BC,asech:LC,asin:PC,asinh:UC,atan:kC,atanh:HC,atan2:qC,cos:zC,cosh:GC,cot:YC,coth:jC,csc:VC,csch:$C,sec:XC,sech:KC,sin:WC,sinh:QC,tan:ZC,tanh:JC,to:e_,clone:r_,format:n_,bin:t_,oct:d_,hex:i_,isNaN:s_,isInteger:o_,isNegative:u_,isNumeric:c_,hasNumericValue:a_,isPositive:l_,isPrime:p_,isZero:f_,print:h_,typeOf:v_,numeric:m_};var b_="help",oq=["typed","mathWithTransform","Help"],y_=C(b_,oq,e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(b_,{any:function(i){var o,l=i;if(typeof i!="string"){for(o in r)if(Ie(r,o)&&i===r[o]){l=o;break}}var u=Ot(x_,l);if(!u){var s=typeof l=="function"?l.name:l;throw new Error('No documentation found on "'+s+'"')}return new n(u)}})});var E_="chain",sq=["typed","Chain"],A_=C(E_,sq,e=>{var{typed:t,Chain:r}=e;return t(E_,{"":function(){return new r},any:function(a){return new r(a)}})});var N_="det",uq=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],Ql=C(N_,uq,e=>{var{typed:t,matrix:r,subtractScalar:n,multiply:a,divideScalar:i,isZero:o,unaryMinus:l}=e;return t(N_,{any:function(c){return qe(c)},"Array | Matrix":function(c){var p;switch(Fe(c)?p=c.size():Array.isArray(c)?(c=r(c),p=c.size()):p=[],p.length){case 0:return qe(c);case 1:if(p[0]===1)return qe(c.valueOf()[0]);if(p[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+je(p)+")");case 2:{var f=p[0],m=p[1];if(f===m)return u(c.clone().valueOf(),f,m);if(m===0)return 1;throw new RangeError("Matrix must be square (size: "+je(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+je(p)+")")}}});function u(s,c,p){if(c===1)return qe(s[0][0]);if(c===2)return n(a(s[0][0],s[1][1]),a(s[1][0],s[0][1]));for(var f=!1,m=new Array(c).fill(0).map((S,A)=>A),h=0;h{var{typed:t,matrix:r,divideScalar:n,addScalar:a,multiply:i,unaryMinus:o,det:l,identity:u,abs:s}=e;return t(T_,{"Array | Matrix":function(f){var m=Fe(f)?f.size():Ge(f);switch(m.length){case 1:if(m[0]===1)return Fe(f)?r([n(1,f.valueOf()[0])]):[n(1,f[0])];throw new RangeError("Matrix must be square (size: "+je(m)+")");case 2:{var h=m[0],d=m[1];if(h===d)return Fe(f)?r(c(f.valueOf(),h,d),f.storage()):c(f,h,d);throw new RangeError("Matrix must be square (size: "+je(m)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+je(m)+")")}},any:function(f){return n(1,f)}});function c(p,f,m){var h,d,v,x,N;if(f===1){if(x=p[0][0],x===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,x)]]}else if(f===2){var g=l(p);if(g===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(p[1][1],g),n(o(p[0][1]),g)],[n(o(p[1][0]),g),n(p[0][0],g)]]}else{var y=p.concat();for(h=0;hS&&(S=s(y[h][b]),A=h),h++;if(S===0)throw Error("Cannot calculate inverse, determinant is zero");h=A,h!==b&&(N=y[b],y[b]=y[h],y[h]=N,N=E[b],E[b]=E[h],E[h]=N);var w=y[b],D=E[b];for(h=0;h{var{typed:t,matrix:r,inv:n,deepEqual:a,equal:i,dotDivide:o,dot:l,ctranspose:u,divideScalar:s,multiply:c,add:p,Complex:f}=e;return t(w_,{"Array | Matrix":function(g){var y=Fe(g)?g.size():Ge(g);switch(y.length){case 1:return x(g)?u(g):y[0]===1?n(g):o(u(g),l(g,g));case 2:{if(x(g))return u(g);var E=y[0],b=y[1];if(E===b)try{return n(g)}catch(S){if(!(S instanceof Error&&S.message.match(/Cannot calculate inverse, determinant is zero/)))throw S}return Fe(g)?r(m(g.valueOf(),E,b),g.storage()):m(g,E,b)}default:throw new RangeError("Matrix must be two dimensional (size: "+je(y)+")")}},any:function(g){return i(g,0)?qe(g):s(1,g)}});function m(N,g,y){var{C:E,F:b}=d(N,g,y),S=c(n(c(u(E),E)),u(E)),A=c(u(b),n(c(b,u(b))));return c(A,S)}function h(N,g,y){for(var E=qe(N),b=0,S=0;SA.filter((D,F)=>F!v(l(E[w],E[w])));return{C:b,F:S}}function v(N){return i(p(N,f(1,1)),p(0,f(1,1)))}function x(N){return a(p(N,f(1,1)),p(c(N,0),f(1,1)))}});var C_=Le(va(),1);function D_(e){var{addScalar:t,subtract:r,flatten:n,multiply:a,multiplyScalar:i,divideScalar:o,sqrt:l,abs:u,bignumber:s,diag:c,size:p,reshape:f,inv:m,qr:h,usolve:d,usolveAll:v,equal:x,complex:N,larger:g,smaller:y,matrixFromColumns:E,dot:b}=e;function S(Q,z,re,fe){var L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,I=A(Q,z,re,fe,L);w(Q,z,re,fe,L,I);var{values:$,C:H}=D(Q,z,re,fe,L);if(L){var ae=F(Q,z,H,I,$,re,fe);return{values:$,eigenvectors:ae}}return{values:$}}function A(Q,z,re,fe,L){var I=fe==="BigNumber",$=fe==="Complex",H=I?s(0):0,ae=I?s(1):$?N(1):1,ce=I?s(1):1,me=I?s(10):2,Ne=i(me,me),Me;L&&(Me=Array(z).fill(ae));for(var j=!1;!j;){j=!0;for(var X=0;X1&&(j=c(Array(me-1).fill(H)))),me-=1,ae.pop();for(var ge=0;ge2&&(j=c(Array(me-2).fill(H)))),me-=2,ae.pop(),ae.pop();for(var ye=0;ye+r(u(mt),u(Et))),X>100){var Qe=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+ce.join(", "));throw Qe.values=ce,Qe.vectors=[],Qe}var rt=L?a(Me,k(Ne,z)):void 0;return{values:ce,C:rt}}function F(Q,z,re,fe,L,I,$){var H=m(re),ae=a(H,Q,re),ce=$==="BigNumber",me=$==="Complex",Ne=ce?s(0):me?N(0):0,Me=ce?s(1):me?N(1):1,j=[],X=[];for(var se of L){var K=M(j,se,x);K===-1?(j.push(se),X.push(1)):X[K]+=1}for(var ee=[],ne=j.length,ve=Array(z).fill(Ne),ge=c(Array(z).fill(Me)),Oe=function(){var rt=j[ye],mt=r(ae,a(rt,ge)),Et=v(mt,ve);for(Et.shift();Et.lengtha(oe,pe)),ee.push(...Et.map(pe=>({value:rt,vector:n(pe)})))},ye=0;ye=5)return null;for(H=0;;){var ae=d(Q,$);if(y(Z(B($,[ae])),fe))break;if(++H>=10)return null;$=te(ae)}return $}function q(Q,z,re){var fe=re==="BigNumber",L=re==="Complex",I=Array(Q).fill(0).map($=>2*Math.random()-1);return fe&&(I=I.map($=>s($))),L&&(I=I.map($=>N($))),I=B(I,z),te(I,re)}function B(Q,z){var re=p(Q);for(var fe of z)fe=f(fe,re),Q=r(Q,a(o(b(fe,Q),b(fe,fe)),fe));return Q}function Z(Q){return u(l(b(Q,Q)))}function te(Q,z){var re=z==="BigNumber",fe=z==="Complex",L=re?s(1):fe?N(1):1;return a(o(L,Z(Q)),Q)}return S}function S_(e){var{config:t,addScalar:r,subtract:n,abs:a,atan:i,cos:o,sin:l,multiplyScalar:u,inv:s,bignumber:c,multiply:p,add:f}=e;function m(w,D){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.epsilon,R=arguments.length>3?arguments[3]:void 0,P=arguments.length>4?arguments[4]:void 0;if(R==="number")return h(w,F,P);if(R==="BigNumber")return d(w,F,P);throw TypeError("Unsupported data type: "+R)}function h(w,D,F){var R=w.length,P=Math.abs(D/R),U,k;if(F){k=new Array(R);for(var M=0;M=Math.abs(P);){var q=_[0][0],B=_[0][1];U=v(w[q][q],w[B][B],w[q][B]),w=E(w,U,q,B),F&&(k=N(k,U,q,B)),_=b(w)}for(var Z=Array(R).fill(0),te=0;te=a(P);){var q=_[0][0],B=_[0][1];U=x(w[q][q],w[B][B],w[q][B]),w=y(w,U,q,B),F&&(k=g(k,U,q,B)),_=S(w)}for(var Z=Array(R).fill(0),te=0;te({value:P[z],vector:Q}));return{values:P,eigenvectors:te}}return m}var pq="eigs",fq=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],dv=C(pq,fq,e=>{var{config:t,typed:r,matrix:n,addScalar:a,subtract:i,equal:o,abs:l,atan:u,cos:s,sin:c,multiplyScalar:p,divideScalar:f,inv:m,bignumber:h,multiply:d,add:v,larger:x,column:N,flatten:g,number:y,complex:E,sqrt:b,diag:S,size:A,reshape:w,qr:D,usolve:F,usolveAll:R,im:P,re:U,smaller:k,matrixFromColumns:M,dot:_}=e,q=S_({config:t,addScalar:a,subtract:i,column:N,flatten:g,equal:o,abs:l,atan:u,cos:s,sin:c,multiplyScalar:p,inv:m,bignumber:h,complex:E,multiply:d,add:v}),B=D_({config:t,addScalar:a,subtract:i,multiply:d,multiplyScalar:p,flatten:g,divideScalar:f,sqrt:b,abs:l,bignumber:h,diag:S,size:A,reshape:w,qr:D,inv:m,usolve:F,usolveAll:R,equal:o,complex:E,larger:x,smaller:k,matrixFromColumns:M,dot:_});return r("eigs",{Array:function(I){return Z(n(I))},"Array, number|BigNumber":function(I,$){return Z(n(I),{precision:$})},"Array, Object"(L,I){return Z(n(L),I)},Matrix:function(I){return Z(I,{matricize:!0})},"Matrix, number|BigNumber":function(I,$){return Z(I,{precision:$,matricize:!0})},"Matrix, Object":function(I,$){var H={matricize:!0};return(0,C_.default)(H,$),Z(I,H)}});function Z(L){var I,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H="eigenvectors"in $?$.eigenvectors:!0,ae=(I=$.precision)!==null&&I!==void 0?I:t.epsilon,ce=te(L,ae,H);return $.matricize&&(ce.values=n(ce.values),H&&(ce.eigenvectors=ce.eigenvectors.map(me=>{var{value:Ne,vector:Me}=me;return{value:Ne,vector:n(Me)}}))),H&&Object.defineProperty(ce,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),ce}function te(L,I,$){var H=L.toArray(),ae=L.size();if(ae.length!==2||ae[0]!==ae[1])throw new RangeError("Matrix must be square (size: ".concat(je(ae),")"));var ce=ae[0];if(z(H,ce,I)&&(re(H,ce),Q(H,ce,I))){var me=fe(L,H,ce);return q(H,ce,I,me,$)}var Ne=fe(L,H,ce);return B(H,ce,I,Ne,$)}function Q(L,I,$){for(var H=0;H{var{typed:t,abs:r,add:n,identity:a,inv:i,multiply:o}=e;return t(__,{Matrix:function(p){var f=p.size();if(f.length!==2||f[0]!==f[1])throw new RangeError("Matrix must be square (size: "+je(f)+")");for(var m=f[0],h=1e-15,d=l(p),v=u(d,h),x=v.q,N=v.j,g=o(p,Math.pow(2,-N)),y=a(m),E=a(m),b=1,S=g,A=-1,w=1;w<=x;w++)w>1&&(S=o(S,g),A=-A),b=b*(x-w+1)/((2*x-w+1)*w),y=n(y,o(b,S)),E=n(E,o(b*A,S));for(var D=o(i(E),y),F=0;F{var{typed:t,abs:r,add:n,multiply:a,map:i,sqrt:o,subtract:l,inv:u,size:s,max:c,identity:p}=e,f=1e3,m=1e-6;function h(d){var v,x=0,N=d,g=p(s(d));do{var y=N;if(N=a(.5,n(y,u(g))),g=a(.5,n(g,u(y))),v=c(r(l(N,y))),v>m&&++x>f)throw new Error("computing square root of matrix: iterative method could not converge")}while(v>m);return N}return t(M_,{"Array | Matrix":function(v){var x=Fe(v)?v.size():Ge(v);switch(x.length){case 1:if(x[0]===1)return i(v,o);throw new RangeError("Matrix must be square (size: "+je(x)+")");case 2:{var N=x[0],g=x[1];if(N===g)return h(v);throw new RangeError("Matrix must be square (size: "+je(x)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+je(x)+")")}}})});var O_="sylvester",hq=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],gv=C(O_,hq,e=>{var{typed:t,schur:r,matrixFromColumns:n,matrix:a,multiply:i,range:o,concat:l,transpose:u,index:s,subset:c,add:p,subtract:f,identity:m,lusolve:h,abs:d}=e;return t(O_,{"Matrix, Matrix, Matrix":v,"Array, Matrix, Matrix":function(N,g,y){return v(a(N),g,y)},"Array, Array, Matrix":function(N,g,y){return v(a(N),a(g),y)},"Array, Matrix, Array":function(N,g,y){return v(a(N),g,a(y))},"Matrix, Array, Matrix":function(N,g,y){return v(N,a(g),y)},"Matrix, Array, Array":function(N,g,y){return v(N,a(g),a(y))},"Matrix, Matrix, Array":function(N,g,y){return v(N,g,a(y))},"Array, Array, Array":function(N,g,y){return v(a(N),a(g),a(y)).toArray()}});function v(x,N,g){for(var y=N.size()[0],E=x.size()[0],b=r(x),S=b.T,A=b.U,w=r(i(-1,N)),D=w.T,F=w.U,R=i(i(u(A),g),F),P=o(0,E),U=[],k=(me,Ne)=>l(me,Ne,1),M=(me,Ne)=>l(me,Ne,0),_=0;_1e-5){for(var q=M(c(R,s(P,_)),c(R,s(P,_+1))),B=0;B<_;B++)q=p(q,M(i(U[B],c(D,s(B,_))),i(U[B],c(D,s(B,_+1)))));var Z=i(m(E),i(-1,c(D,s(_,_)))),te=i(m(E),i(-1,c(D,s(_+1,_)))),Q=i(m(E),i(-1,c(D,s(_,_+1)))),z=i(m(E),i(-1,c(D,s(_+1,_+1)))),re=M(k(p(S,Z),te),k(Q,p(S,z))),fe=h(re,q);U[_]=fe.subset(s(o(0,E),0)),U[_+1]=fe.subset(s(o(E,2*E),0)),_++}else{for(var L=c(R,s(P,_)),I=0;I<_;I++)L=p(L,i(U[I],c(D,s(I,_))));var $=c(D,s(_,_)),H=f(S,i($,m(E)));U[_]=h(H,L)}var ae=a(n(...U)),ce=i(A,i(ae,u(F)));return ce}});var R_="schur",vq=["typed","matrix","identity","multiply","qr","norm","subtract"],xv=C(R_,vq,e=>{var{typed:t,matrix:r,identity:n,multiply:a,qr:i,norm:o,subtract:l}=e;return t(R_,{Array:function(c){var p=u(r(c));return{U:p.U.valueOf(),T:p.T.valueOf()}},Matrix:function(c){return u(c)}});function u(s){var c=s.size()[0],p=s,f=n(c),m=0,h;do{h=p;var d=i(p),v=d.Q,x=d.R;if(p=a(x,v),f=a(f,v),m++>100)break}while(o(l(p,h))>1e-4);return{U:f,T:p}}});var F_="lyap",gq=["typed","matrix","sylvester","multiply","transpose"],bv=C(F_,gq,e=>{var{typed:t,matrix:r,sylvester:n,multiply:a,transpose:i}=e;return t(F_,{"Matrix, Matrix":function(l,u){return n(l,i(l),a(-1,u))},"Array, Matrix":function(l,u){return n(r(l),i(r(l)),a(-1,u))},"Matrix, Array":function(l,u){return n(l,i(r(l)),r(a(-1,u)))},"Array, Array":function(l,u){return n(r(l),i(r(l)),r(a(-1,u))).toArray()}})});var xq="divide",bq=["typed","matrix","multiply","equalScalar","divideScalar","inv"],Jl=C(xq,bq,e=>{var{typed:t,matrix:r,multiply:n,equalScalar:a,divideScalar:i,inv:o}=e,l=gt({typed:t,equalScalar:a}),u=Gt({typed:t});return t("divide",pc({"Array | Matrix, Array | Matrix":function(c,p){return n(c,o(p))},"DenseMatrix, any":function(c,p){return u(c,p,i,!1)},"SparseMatrix, any":function(c,p){return l(c,p,i,!1)},"Array, any":function(c,p){return u(r(c),p,i,!1).valueOf()},"any, Array | Matrix":function(c,p){return n(c,o(p))}},i.signatures))});var I_="distance",yq=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],yv=C(I_,yq,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:o,sqrt:l,abs:u}=e;return t(I_,{"Array, Array, Array":function(E,b,S){if(E.length===2&&b.length===2&&S.length===2){if(!c(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(b))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(b,S))throw new TypeError("LinePoint1 should not be same with LinePoint2");var A=n(S[1],b[1]),w=n(b[0],S[0]),D=n(a(S[0],b[1]),a(b[0],S[1]));return v(E[0],E[1],A,w,D)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(E,b,S){if(Object.keys(E).length===2&&Object.keys(b).length===2&&Object.keys(S).length===2){if(!c(E))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(S))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(h(b),h(S)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in E&&"pointY"in E&&"lineOnePtX"in b&&"lineOnePtY"in b&&"lineTwoPtX"in S&&"lineTwoPtY"in S){var A=n(S.lineTwoPtY,b.lineOnePtY),w=n(b.lineOnePtX,S.lineTwoPtX),D=n(a(S.lineTwoPtX,b.lineOnePtY),a(b.lineOnePtX,S.lineTwoPtY));return v(E.pointX,E.pointY,A,w,D)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(E,b){if(E.length===2&&b.length===3){if(!c(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!p(b))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return v(E[0],E[1],b[0],b[1],b[2])}else if(E.length===3&&b.length===6){if(!p(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!m(b))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return x(E[0],E[1],E[2],b[0],b[1],b[2],b[3],b[4],b[5])}else if(E.length===b.length&&E.length>0){if(!f(E))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!f(b))throw new TypeError("All values of an array should be numbers or BigNumbers");return N(E,b)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(E,b){if(Object.keys(E).length===2&&Object.keys(b).length===3){if(!c(E))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!p(b))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in E&&"pointY"in E&&"xCoeffLine"in b&&"yCoeffLine"in b&&"constant"in b)return v(E.pointX,E.pointY,b.xCoeffLine,b.yCoeffLine,b.constant);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===3&&Object.keys(b).length===6){if(!p(E))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!m(b))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in E&&"pointY"in E&&"x0"in b&&"y0"in b&&"z0"in b&&"a"in b&&"b"in b&&"c"in b)return x(E.pointX,E.pointY,E.pointZ,b.x0,b.y0,b.z0,b.a,b.b,b.c);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===2&&Object.keys(b).length===2){if(!c(E))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in E&&"pointOneY"in E&&"pointTwoX"in b&&"pointTwoY"in b)return N([E.pointOneX,E.pointOneY],[b.pointTwoX,b.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===3&&Object.keys(b).length===3){if(!p(E))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!p(b))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in E&&"pointOneY"in E&&"pointOneZ"in E&&"pointTwoX"in b&&"pointTwoY"in b&&"pointTwoZ"in b)return N([E.pointOneX,E.pointOneY,E.pointOneZ],[b.pointTwoX,b.pointTwoY,b.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(E){if(!d(E))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return g(E)}});function s(y){return typeof y=="number"||Ue(y)}function c(y){return y.constructor!==Array&&(y=h(y)),s(y[0])&&s(y[1])}function p(y){return y.constructor!==Array&&(y=h(y)),s(y[0])&&s(y[1])&&s(y[2])}function f(y){return Array.isArray(y)||(y=h(y)),y.every(s)}function m(y){return y.constructor!==Array&&(y=h(y)),s(y[0])&&s(y[1])&&s(y[2])&&s(y[3])&&s(y[4])&&s(y[5])}function h(y){for(var E=Object.keys(y),b=[],S=0;SE.length!==2||!s(E[0])||!s(E[1])))return!1}else if(y[0].length===3&&s(y[0][0])&&s(y[0][1])&&s(y[0][2])){if(y.some(E=>E.length!==3||!s(E[0])||!s(E[1])||!s(E[2])))return!1}else return!1;return!0}function v(y,E,b,S,A){var w=u(r(r(a(b,y),a(S,E)),A)),D=l(r(a(b,b),a(S,S)));return i(w,D)}function x(y,E,b,S,A,w,D,F,R){var P=[n(a(n(A,E),R),a(n(w,b),F)),n(a(n(w,b),D),a(n(S,y),R)),n(a(n(S,y),F),a(n(A,E),D))];P=l(r(r(a(P[0],P[0]),a(P[1],P[1])),a(P[2],P[2])));var U=l(r(r(a(D,D),a(F,F)),a(R,R)));return i(P,U)}function N(y,E){for(var b=y.length,S=0,A=0,w=0;w{var{typed:t,config:r,abs:n,add:a,addScalar:i,matrix:o,multiply:l,multiplyScalar:u,divideScalar:s,subtract:c,smaller:p,equalScalar:f,flatten:m,isZero:h,isNumeric:d}=e;return t("intersect",{"Array, Array, Array":v,"Array, Array, Array, Array":x,"Matrix, Matrix, Matrix":function(F,R,P){var U=v(F.valueOf(),R.valueOf(),P.valueOf());return U===null?null:o(U)},"Matrix, Matrix, Matrix, Matrix":function(F,R,P,U){var k=x(F.valueOf(),R.valueOf(),P.valueOf(),U.valueOf());return k===null?null:o(k)}});function v(D,F,R){if(D=N(D),F=N(F),R=N(R),!y(D))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!y(F))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!E(R))throw new TypeError("Array with 4 numbers expected as third argument");return w(D[0],D[1],D[2],F[0],F[1],F[2],R[0],R[1],R[2],R[3])}function x(D,F,R,P){if(D=N(D),F=N(F),R=N(R),P=N(P),D.length===2){if(!g(D))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!g(F))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!g(R))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!g(P))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return b(D,F,R,P)}else if(D.length===3){if(!y(D))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!y(F))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!y(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!y(P))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return A(D[0],D[1],D[2],F[0],F[1],F[2],R[0],R[1],R[2],P[0],P[1],P[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function N(D){return D.length===1?D[0]:D.length>1&&Array.isArray(D[0])&&D.every(F=>Array.isArray(F)&&F.length===1)?m(D):D}function g(D){return D.length===2&&d(D[0])&&d(D[1])}function y(D){return D.length===3&&d(D[0])&&d(D[1])&&d(D[2])}function E(D){return D.length===4&&d(D[0])&&d(D[1])&&d(D[2])&&d(D[3])}function b(D,F,R,P){var U=D,k=R,M=c(U,F),_=c(k,P),q=c(u(M[0],_[1]),u(_[0],M[1]));if(h(q)||p(n(q),r.epsilon))return null;var B=u(_[0],U[1]),Z=u(_[1],U[0]),te=u(_[0],k[1]),Q=u(_[1],k[0]),z=s(i(c(c(B,Z),te),Q),q);return a(l(M,z),U)}function S(D,F,R,P,U,k,M,_,q,B,Z,te){var Q=u(c(D,F),c(R,P)),z=u(c(U,k),c(M,_)),re=u(c(q,B),c(Z,te));return i(i(Q,z),re)}function A(D,F,R,P,U,k,M,_,q,B,Z,te){var Q=S(D,M,B,M,F,_,Z,_,R,q,te,q),z=S(B,M,P,D,Z,_,U,F,te,q,k,R),re=S(D,M,P,D,F,_,U,F,R,q,k,R),fe=S(B,M,B,M,Z,_,Z,_,te,q,te,q),L=S(P,D,P,D,U,F,U,F,k,R,k,R),I=c(u(Q,z),u(re,fe)),$=c(u(L,fe),u(z,z));if(h($))return null;var H=s(I,$),ae=s(i(Q,u(H,z)),fe),ce=i(D,u(H,c(P,D))),me=i(F,u(H,c(U,F))),Ne=i(R,u(H,c(k,R))),Me=i(M,u(ae,c(B,M))),j=i(_,u(ae,c(Z,_))),X=i(q,u(ae,c(te,q)));return f(ce,Me)&&f(me,j)&&f(Ne,X)?[ce,me,Ne]:null}function w(D,F,R,P,U,k,M,_,q,B){var Z=u(D,M),te=u(P,M),Q=u(F,_),z=u(U,_),re=u(R,q),fe=u(k,q),L=c(c(c(B,Z),Q),re),I=c(c(c(i(i(te,z),fe),Z),Q),re),$=s(L,I),H=i(D,u($,c(P,D))),ae=i(F,u($,c(U,F))),ce=i(R,u($,c(k,R)));return[H,ae,ce]}});var B_="sum",Nq=["typed","config","add","numeric"],Ms=C(B_,Nq,e=>{var{typed:t,config:r,add:n,numeric:a}=e;return t(B_,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":o,"...":function(u){if(ln(u))throw new TypeError("Scalar values expected in function sum");return i(u)}});function i(l){var u;return gr(l,function(s){try{u=u===void 0?s:n(u,s)}catch(c){throw qt(c,"sum",s)}}),u===void 0&&(u=a(0,r.number)),typeof u=="string"&&(u=a(u,r.number)),u}function o(l,u){try{var s=wa(l,u,n);return s}catch(c){throw qt(c,"sum")}}});var ep="cumsum",Tq=["typed","add","unaryPlus"],Os=C(ep,Tq,e=>{var{typed:t,add:r,unaryPlus:n}=e;return t(ep,{Array:a,Matrix:function(s){return s.create(a(s.valueOf()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(s,c){return s.create(o(s.valueOf(),c))},"...":function(s){if(ln(s))throw new TypeError("All values expected to be scalar in function cumsum");return a(s)}});function a(u){try{return i(u)}catch(s){throw qt(s,ep)}}function i(u){if(u.length===0)return[];for(var s=[n(u[0])],c=1;c=c.length)throw new nr(s,c.length);try{return l(u,s)}catch(p){throw qt(p,ep)}}function l(u,s){var c,p,f;if(s<=0){var m=u[0][0];if(Array.isArray(m)){for(f=Uc(u),p=[],c=0;c{var{typed:t,add:r,divide:n}=e;return t(L_,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(l){if(ln(l))throw new TypeError("Scalar values expected in function mean");return i(l)}});function a(o,l){try{var u=wa(o,l,r),s=Array.isArray(o)?Ge(o):o.size();return n(u,s[l])}catch(c){throw qt(c,"mean")}}function i(o){var l,u=0;if(gr(o,function(s){try{l=l===void 0?s:r(l,s),u++}catch(c){throw qt(c,"mean",s)}}),u===0)throw new Error("Cannot calculate the mean of an empty array");return n(l,u)}});var P_="median",Dq=["typed","add","divide","compare","partitionSelect"],Av=C(P_,Dq,e=>{var{typed:t,add:r,divide:n,compare:a,partitionSelect:i}=e;function o(s){try{s=Je(s.valueOf());var c=s.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var p=c/2-1,f=i(s,p+1),m=s[p],h=0;h0&&(m=s[h]);return u(m,f)}else{var d=i(s,(c-1)/2);return l(d)}}catch(v){throw qt(v,"median")}}var l=t({"number | BigNumber | Complex | Unit":function(c){return c}}),u=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,p){return n(r(c,p),2)}});return t(P_,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,p){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(ln(c))throw new TypeError("Scalar values expected in function median");return o(c)}})});var U_="mad",Sq=["typed","abs","map","median","subtract"],Nv=C(U_,Sq,e=>{var{typed:t,abs:r,map:n,median:a,subtract:i}=e;return t(U_,{"Array | Matrix":o,"...":function(u){return o(u)}});function o(l){if(l=Je(l.valueOf()),l.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var u=a(l);return a(n(l,function(s){return r(i(s,u))}))}catch(s){throw s instanceof TypeError&&s.message.includes("median")?new TypeError(s.message.replace("median","mad")):qt(s,"mad")}}});var Tv="unbiased",k_="variance",Cq=["typed","add","subtract","multiply","divide","apply","isNaN"],Fs=C(k_,Cq,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,apply:o,isNaN:l}=e;return t(k_,{"Array | Matrix":function(p){return u(p,Tv)},"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":function(p,f){return s(p,f,Tv)},"Array | Matrix, number | BigNumber, string":s,"...":function(p){return u(p,Tv)}});function u(c,p){var f,m=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(gr(c,function(v){try{f=f===void 0?v:r(f,v),m++}catch(x){throw qt(x,"variance",v)}}),m===0)throw new Error("Cannot calculate variance of an empty array");var h=i(f,m);if(f=void 0,gr(c,function(v){var x=n(v,h);f=f===void 0?a(x,x):r(f,a(x,x))}),l(f))return f;switch(p){case"uncorrected":return i(f,m);case"biased":return i(f,m+1);case"unbiased":{var d=Ue(f)?f.mul(0):0;return m===1?d:i(f,m-1)}default:throw new Error('Unknown normalization "'+p+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function s(c,p,f){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,p,m=>u(m,f))}catch(m){throw qt(m,"variance")}}});var q_="quantileSeq",_q=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],Is=C(q_,_q,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:l,compare:u,isInteger:s,smaller:c,smallerEq:p,larger:f}=e,m=ii({typed:t,isInteger:s});return t(q_,{"Array | Matrix, number | BigNumber":(N,g)=>d(N,g,!1),"Array | Matrix, number | BigNumber, number":(N,g,y)=>h(N,g,!1,y,d),"Array | Matrix, number | BigNumber, boolean":d,"Array | Matrix, number | BigNumber, boolean, number":(N,g,y,E)=>h(N,g,y,E,d),"Array | Matrix, Array | Matrix":(N,g)=>v(N,g,!1),"Array | Matrix, Array | Matrix, number":(N,g,y)=>h(N,g,!1,y,v),"Array | Matrix, Array | Matrix, boolean":v,"Array | Matrix, Array | Matrix, boolean, number":(N,g,y,E)=>h(N,g,y,E,v)});function h(N,g,y,E,b){return m(N,E,S=>b(S,g,y))}function d(N,g,y){var E,b=N.valueOf();if(c(g,0))throw new Error("N/prob must be non-negative");if(p(g,1))return ze(g)?x(b,g,y):r(x(b,g,y));if(f(g,1)){if(!s(g))throw new Error("N must be a positive integer");if(f(g,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var S=n(g,1);E=[];for(var A=0;c(A,g);A++){var w=i(A+1,S);E.push(x(b,w,y))}return ze(g)?E:r(E)}}function v(N,g,y){for(var E=N.valueOf(),b=g.valueOf(),S=[],A=0;A0&&(D=E[R])}return n(o(D,a(1,w)),o(F,w))}});var H_="std",Mq=["typed","map","sqrt","variance"],Bs=C(H_,Mq,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e;return t(H_,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(l){return i(l)}});function i(o,l){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var u=a.apply(null,arguments);return Lt(u)?r(u,n):n(u)}catch(s){throw s instanceof TypeError&&s.message.includes(" variance")?new TypeError(s.message.replace(" variance"," std")):s}}});var z_="corr",Oq=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],wv=C(z_,Oq,e=>{var{typed:t,matrix:r,sqrt:n,sum:a,add:i,subtract:o,multiply:l,pow:u,divide:s}=e;return t(z_,{"Array, Array":function(m,h){return c(m,h)},"Matrix, Matrix":function(m,h){var d=c(m.toArray(),h.toArray());return Array.isArray(d)?r(d):d}});function c(f,m){var h=[];if(Array.isArray(f[0])&&Array.isArray(m[0])){if(f.length!==m.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var d=0;di(b,l(S,m[A])),0),N=a(f.map(b=>u(b,2))),g=a(m.map(b=>u(b,2))),y=o(l(h,x),l(d,v)),E=n(l(o(l(h,N),u(d,2)),o(l(h,g),u(v,2))));return s(y,E)}});var G_="combinations",Rq=["typed"],Dv=C(G_,Rq,e=>{var{typed:t}=e;return t(G_,{"number, number":zm,"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,l,u=n.minus(a),s=new i(1);if(!Y_(n)||!Y_(a))throw new TypeError("Positive integer value expected in function combinations");if(a.gt(n))throw new TypeError("k must be less than n in function combinations");if(o=s,a.lt(u))for(l=s;l.lte(u);l=l.plus(s))o=o.times(a.plus(l)).dividedBy(l);else for(l=s;l.lte(a);l=l.plus(s))o=o.times(u.plus(l)).dividedBy(l);return o}})});function Y_(e){return e.isInteger()&&e.gte(0)}var j_="combinationsWithRep",Fq=["typed"],Sv=C(j_,Fq,e=>{var{typed:t}=e;return t(j_,{"number, number":function(n,a){if(!Re(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Re(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(a{var{typed:t,config:r,multiplyScalar:n,pow:a,BigNumber:i,Complex:o}=e;function l(s){if(s.im===0)return us(s.re);if(s.re<.5){var c=new o(1-s.re,-s.im),p=new o(Math.PI*s.re,Math.PI*s.im);return new o(Math.PI).div(p.sin()).div(l(c))}s=new o(s.re-1,s.im);for(var f=new o(ai[0],0),m=1;m2;)f-=2,h+=f,m=m.times(h);return new i(m.toPrecision(i.precision))}});var X_="lgamma",Bq=["Complex","typed"],_v=C(X_,Bq,e=>{var{Complex:t,typed:r}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return r(X_,{number:cs,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(s){var c=6.283185307179586,p=1.1447298858494002,f=.1;if(s.isNaN())return new t(NaN,NaN);if(s.im===0)return new t(cs(s.re),0);if(s.re>=n||Math.abs(s.im)>=a)return l(s);if(s.re<=f){var m=Fy(c,s.im)*Math.floor(.5*s.re+.25),h=s.mul(Math.PI).sin().log(),d=o(new t(1-s.re,-s.im));return new t(p,m).sub(h).sub(d)}else return s.im>=0?u(s):u(s.conjugate()).conjugate()}function l(s){for(var c=s.sub(.5).mul(s.log()).sub(s).add(Km),p=new t(1,0).div(s),f=p.div(s),m=i[0],h=i[1],d=2*f.re,v=f.re*f.re+f.im*f.im,x=2;x<8;x++){var N=h;h=-v*m+i[x],m=d*m+N}var g=p.mul(f.mul(m).add(h));return c.add(g)}function u(s){var c=0,p=0,f=s;for(s=s.add(1);s.re<=n;){f=f.mul(s);var m=f.im<0?1:0;m!==0&&p===0&&c++,p=m,s=s.add(1)}return l(s).sub(f.log()).sub(new t(0,c*2*Math.PI*1))}});var K_="factorial",Lq=["typed","gamma"],Mv=C(K_,Lq,e=>{var{typed:t,gamma:r}=e;return t(K_,{number:function(a){if(a<0)throw new Error("Value must be non-negative");return r(a+1)},BigNumber:function(a){if(a.isNegative())throw new Error("Value must be non-negative");return r(a.plus(1))},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var W_="kldivergence",Pq=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],Ov=C(W_,Pq,e=>{var{typed:t,matrix:r,divide:n,sum:a,multiply:i,map:o,dotDivide:l,log:u,isNumeric:s}=e;return t(W_,{"Array, Array":function(f,m){return c(r(f),r(m))},"Matrix, Array":function(f,m){return c(f,r(m))},"Array, Matrix":function(f,m){return c(r(f),m)},"Matrix, Matrix":function(f,m){return c(f,m)}});function c(p,f){var m=f.size().length,h=p.size().length;if(m>1)throw new Error("first object must be one dimensional");if(h>1)throw new Error("second object must be one dimensional");if(m!==h)throw new Error("Length of two vectors must be equal");var d=a(p);if(d===0)throw new Error("Sum of elements in first object must be non zero");var v=a(f);if(v===0)throw new Error("Sum of elements in second object must be non zero");var x=n(p,a(p)),N=n(f,a(f)),g=a(i(x,o(l(x,N),y=>u(y))));return s(g)?g:Number.NaN}});var Q_="multinomial",Uq=["typed","add","divide","multiply","factorial","isInteger","isPositive"],Rv=C(Q_,Uq,e=>{var{typed:t,add:r,divide:n,multiply:a,factorial:i,isInteger:o,isPositive:l}=e;return t(Q_,{"Array | Matrix":function(s){var c=0,p=1;return gr(s,function(f){if(!o(f)||!l(f))throw new TypeError("Positive integer value expected in function multinomial");c=r(c,f),p=a(p,i(f))}),n(i(c),p)}})});var Z_="permutations",kq=["typed","factorial"],Fv=C(Z_,kq,e=>{var{typed:t,factorial:r}=e;return t(Z_,{"number | BigNumber":r,"number, number":function(a,i){if(!Re(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!Re(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>a)throw new TypeError("second argument k must be less than or equal to first argument n");return Kr(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var o,l;if(!J_(a)||!J_(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(a))throw new TypeError("second argument k must be less than or equal to first argument n");var u=a.mul(0).add(1);for(o=u,l=a.minus(i).plus(1);l.lte(a);l=l.plus(1))o=o.times(l);return o}})});function J_(e){return e.isInteger()&&e.gte(0)}var qv=Le(h3(),1),Vq=(0,qv.default)(Date.now());function ia(e){var t;function r(a){t=a===null?Vq:(0,qv.default)(String(a))}r(e);function n(){return t()}return n}var v3="pickRandom",$q=["typed","config","?on"],Hv=C(v3,$q,e=>{var{typed:t,config:r,on:n}=e,a=ia(r.randomSeed);return n&&n("config",function(o,l){o.randomSeed!==l.randomSeed&&(a=ia(o.randomSeed))}),t(v3,{"Array | Matrix":function(l){return i(l,{})},"Array | Matrix, Object":function(l,u){return i(l,u)},"Array | Matrix, number":function(l,u){return i(l,{number:u})},"Array | Matrix, Array | Matrix":function(l,u){return i(l,{weights:u})},"Array | Matrix, Array | Matrix, number":function(l,u,s){return i(l,{number:s,weights:u})},"Array | Matrix, number, Array | Matrix":function(l,u,s){return i(l,{number:u,weights:s})}});function i(o,l){var{number:u,weights:s,elementWise:c=!0}=l,p=typeof u>"u";p&&(u=1);var f=Fe(o)?o.create:Fe(s)?s.create:null;o=o.valueOf(),s&&(s=s.valueOf()),c===!0&&(o=Je(o),s=Je(s));var m=0;if(typeof s<"u"){if(s.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var h=0,d=s.length;h"u")N=o[Math.floor(a()*v)];else for(var g=a()*m,y=0,E=o.length;y1)for(var n=0,a=e.shift();n{var{typed:t,config:r,on:n}=e,a=ia(r.randomSeed);return n&&n("config",function(l,u){l.randomSeed!==u.randomSeed&&(a=ia(l.randomSeed))}),t(g3,{"":()=>o(0,1),number:l=>o(0,l),"number, number":(l,u)=>o(l,u),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,u)=>i(l,0,u),"Array | Matrix, number, number":(l,u,s)=>i(l,u,s)});function i(l,u,s){var c=Ls(l.valueOf(),()=>o(u,s));return Fe(l)?l.create(c):c}function o(l,u){return l+a()*(u-l)}});var x3="randomInt",Kq=["typed","config","?on"],Gv=C(x3,Kq,e=>{var{typed:t,config:r,on:n}=e,a=ia(r.randomSeed);return n&&n("config",function(l,u){l.randomSeed!==u.randomSeed&&(a=ia(l.randomSeed))}),t(x3,{"":()=>o(0,1),number:l=>o(0,l),"number, number":(l,u)=>o(l,u),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,u)=>i(l,0,u),"Array | Matrix, number, number":(l,u,s)=>i(l,u,s)});function i(l,u,s){var c=Ls(l.valueOf(),()=>o(u,s));return Fe(l)?l.create(c):c}function o(l,u){return Math.floor(l+a()*(u-l))}});var b3="stirlingS2",Wq=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],Yv=C(b3,Wq,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,pow:o,factorial:l,combinations:u,isNegative:s,isInteger:c,number:p,bignumber:f,larger:m}=e,h=[],d=[];return t(b3,{"number | BigNumber, number | BigNumber":function(x,N){if(!c(x)||s(x)||!c(N)||s(N))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(m(N,x))throw new TypeError("k must be less than or equal to n in function stirlingS2");var g=!(ze(x)&&ze(N)),y=g?d:h,E=g?f:p,b=p(x),S=p(N);if(y[b]&&y[b].length>S)return y[b][S];for(var A=0;A<=b;++A)if(y[A]||(y[A]=[E(A===0?1:0)]),A!==0)for(var w=y[A],D=y[A-1],F=w.length;F<=A&&F<=S;++F)F===A?w[F]=1:w[F]=r(a(E(F),D[F]),D[F-1]);return y[b][S]}})});var y3="bellNumbers",Qq=["typed","addScalar","isNegative","isInteger","stirlingS2"],jv=C(y3,Qq,e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:a,stirlingS2:i}=e;return t(y3,{"number | BigNumber":function(l){if(!a(l)||n(l))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var u=0,s=0;s<=l;s++)u=r(u,i(l,s));return u}})});var E3="catalan",Zq=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],Vv=C(E3,Zq,e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:o,isInteger:l}=e;return t(E3,{"number | BigNumber":function(s){if(!l(s)||o(s))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(a(s,2),s),r(s,1))}})});var A3="composition",Jq=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],$v=C(A3,Jq,e=>{var{typed:t,addScalar:r,combinations:n,isPositive:a,isNegative:i,isInteger:o,larger:l}=e;return t(A3,{"number | BigNumber, number | BigNumber":function(s,c){if(!o(s)||!a(s)||!o(c)||!a(c))throw new TypeError("Positive integer value expected in function composition");if(l(c,s))throw new TypeError("k must be less than or equal to n in function composition");return n(r(s,-1),r(c,-1))}})});var N3="leafCount",eH=["parse","typed"],T3=C(N3,eH,e=>{var{parse:t,typed:r}=e;function n(a){var i=0;return a.forEach(o=>{i+=n(o)}),i||1}return r(N3,{Node:function(i){return n(i)}})});function Xv(e){return et(e)||Tt(e)&&e.isUnary()&&et(e.args[0])}function Ps(e){return!!(et(e)||(pr(e)||Tt(e))&&e.args.every(Ps)||er(e)&&Ps(e.content))}var D3=Le(ir(),1);function w3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kv(e){for(var t=1;t{var{FunctionNode:t,OperatorNode:r,SymbolNode:n}=e,a=!0,i=!1,o="defaultF",l={add:{trivial:a,total:a,commutative:a,associative:a},unaryPlus:{trivial:a,total:a,commutative:a,associative:a},subtract:{trivial:i,total:a,commutative:i,associative:i},multiply:{trivial:a,total:a,commutative:a,associative:a},divide:{trivial:i,total:a,commutative:i,associative:i},paren:{trivial:a,total:a,commutative:a,associative:i},defaultF:{trivial:i,total:a,commutative:i,associative:i}},u={divide:{total:i},log:{total:i}},s={subtract:{total:i},abs:{trivial:a},log:{total:a}};function c(g,y){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,b=o;if(typeof g=="string"?b=g:Tt(g)?b=g.fn.toString():pr(g)?b=g.name:er(g)&&(b="paren"),Ie(E,b)){var S=E[b];if(Ie(S,y))return S[y];if(Ie(l,b))return l[b][y]}if(Ie(E,o)){var A=E[o];return Ie(A,y)?A[y]:l[o][y]}if(Ie(l,b)){var w=l[b];if(Ie(w,y))return w[y]}return l[o][y]}function p(g){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return c(g,"commutative",y)}function f(g){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return c(g,"associative",y)}function m(g,y){var E=Kv({},g);for(var b in y)Ie(g,b)?E[b]=Kv(Kv({},y[b]),g[b]):E[b]=y[b];return E}function h(g,y){if(!g.args||g.args.length===0)return g;g.args=d(g,y);for(var E=0;E2&&f(g,y)){for(var A=g.args.pop();g.args.length>0;)A=E([g.args.pop(),A]);g.args=A.args}}}function x(g,y){if(!(!g.args||g.args.length===0)){for(var E=N(g),b=g.args.length,S=0;S2&&f(g,y)){for(var A=g.args.shift();g.args.length>0;)A=E([A,g.args.shift()]);g.args=A.args}}}function N(g){return Tt(g)?function(y){try{return new r(g.op,g.fn,y,g.implicit)}catch(E){return console.error(E),[]}}:function(y){return new t(new n(g.name),y)}}return{createMakeNodeFunction:N,hasProperty:c,isCommutative:p,isAssociative:f,mergeContext:m,flatten:h,allChildren:d,unflattenr:v,unflattenl:x,defaultContext:l,realContext:u,positiveContext:s}});var nH="simplify",aH=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],S3=C(nH,aH,e=>{var{config:t,typed:r,parse:n,add:a,subtract:i,multiply:o,divide:l,pow:u,isZero:s,equal:c,resolve:p,simplifyConstant:f,simplifyCore:m,fraction:h,bignumber:d,mathWithTransform:v,matrix:x,AccessorNode:N,ArrayNode:g,ConstantNode:y,FunctionNode:E,IndexNode:b,ObjectNode:S,OperatorNode:A,ParenthesisNode:w,SymbolNode:D}=e,{hasProperty:F,isCommutative:R,isAssociative:P,mergeContext:U,flatten:k,unflattenr:M,unflattenl:_,createMakeNodeFunction:q,defaultContext:B,realContext:Z,positiveContext:te}=io({FunctionNode:E,OperatorNode:A,SymbolNode:D});r.addConversion({from:"Object",to:"Map",convert:Jn});var Q=r("simplify",{Node:H,"Node, Map":(K,ee)=>H(K,!1,ee),"Node, Map, Object":(K,ee,ne)=>H(K,!1,ee,ne),"Node, Array":H,"Node, Array, Map":H,"Node, Array, Map, Object":H});r.removeConversion({from:"Object",to:"Map",convert:Jn}),Q.defaultContext=B,Q.realContext=Z,Q.positiveContext=te;function z(K){return K.transform(function(ee,ne,ve){return er(ee)?z(ee.content):ee})}var re={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};Q.rules=[m,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},f,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},f,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function fe(K,ee){var ne={};if(K.s){var ve=K.s.split("->");if(ve.length===2)ne.l=ve[0],ne.r=ve[1];else throw SyntaxError("Could not parse rule: "+K.s)}else ne.l=K.l,ne.r=K.r;ne.l=z(n(ne.l)),ne.r=z(n(ne.r));for(var ge of["imposeContext","repeat","assuming"])ge in K&&(ne[ge]=K[ge]);if(K.evaluate&&(ne.evaluate=n(K.evaluate)),P(ne.l,ee)){var Oe=!R(ne.l,ee),ye;Oe&&(ye=$());var Qe=q(ne.l),rt=$();ne.expanded={},ne.expanded.l=Qe([ne.l,rt]),k(ne.expanded.l,ee),M(ne.expanded.l,ee),ne.expanded.r=Qe([ne.r,rt]),Oe&&(ne.expandedNC1={},ne.expandedNC1.l=Qe([ye,ne.l]),ne.expandedNC1.r=Qe([ye,ne.r]),ne.expandedNC2={},ne.expandedNC2.l=Qe([ye,ne.expanded.l]),ne.expandedNC2.r=Qe([ye,ne.expanded.r]))}return ne}function L(K,ee){for(var ne=[],ve=0;ve2&&arguments[2]!==void 0?arguments[2]:xa(),ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ge=ve.consoleDebug;ee=L(ee||Q.rules,ve.context);var Oe=p(K,ne);Oe=z(Oe);for(var ye={},Qe=Oe.toString({parenthesis:"all"});!ye[Qe];){ye[Qe]=!0,I=0;var rt=Qe;ge&&console.log("Working on: ",Qe);for(var mt=0;mt ").concat(ee[mt].r.toString()))),ge){var W=Oe.toString({parenthesis:"all"});W!==rt&&(console.log("Applying",Et,"produced",W),rt=W)}_(Oe,ve.context)}Qe=Oe.toString({parenthesis:"all"})}return Oe}function ae(K,ee,ne){var ve=K;if(K)for(var ge=0;ge1&&(rt=Oe(K.args.slice(0,Qe))),ge=K.args.slice(Qe),ve=ge.length===1?ge[0]:Oe(ge),ne.push(Oe([rt,ve]))}return ne}function Ne(K,ee){var ne={placeholders:{}};if(!K.placeholders&&!ee.placeholders)return ne;if(K.placeholders){if(!ee.placeholders)return K}else return ee;for(var ve in K.placeholders)if(Ie(K.placeholders,ve)&&(ne.placeholders[ve]=K.placeholders[ve],Ie(ee.placeholders,ve)&&!se(K.placeholders[ve],ee.placeholders[ve])))return null;for(var ge in ee.placeholders)Ie(ee.placeholders,ge)&&(ne.placeholders[ge]=ee.placeholders[ge]);return ne}function Me(K,ee){var ne=[];if(K.length===0||ee.length===0)return ne;for(var ve,ge=0;ge2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var rt=X(K.args[0],ee.args[1],ne);if(rt.length===0)return[];var mt=X(K.args[1],ee.args[0],ne);if(mt.length===0)return[];Oe=[rt,mt]}ge=j(Oe)}else if(ee.args.length>=2&&K.args.length===2){for(var Et=me(ee,ne),W=[],oe=0;oe2)throw Error("Unexpected non-binary associative function: "+K.toString());return[]}}else if(K instanceof D){if(K.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(re[K.name]){if(K.name!==ee.name)return[]}else switch(K.name[1]>="a"&&K.name[1]<="z"?K.name.substring(0,2):K.name[0]){case"n":case"_p":ge[0].placeholders[K.name]=ee;break;case"c":case"cl":if(et(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"v":if(!et(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"vl":if(bt(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"cd":if(Xv(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"vd":if(!Xv(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"ce":if(Ps(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"ve":if(!Ps(ee))ge[0].placeholders[K.name]=ee;else return[];break;default:throw new Error("Invalid symbol in rule: "+K.name)}}else if(K instanceof y){if(!c(K.value,ee.value))return[]}else return[];return ge}function se(K,ee){if(K instanceof y&&ee instanceof y){if(!c(K.value,ee.value))return!1}else if(K instanceof D&&ee instanceof D){if(K.name!==ee.name)return!1}else if(K instanceof A&&ee instanceof A||K instanceof E&&ee instanceof E){if(K instanceof A){if(K.op!==ee.op||K.fn!==ee.fn)return!1}else if(K instanceof E&&K.name!==ee.name)return!1;if(K.args.length!==ee.args.length)return!1;for(var ne=0;ne{var{typed:t,config:r,mathWithTransform:n,matrix:a,fraction:i,bignumber:o,AccessorNode:l,ArrayNode:u,ConstantNode:s,FunctionNode:c,IndexNode:p,ObjectNode:f,OperatorNode:m,SymbolNode:h}=e,{isCommutative:d,isAssociative:v,allChildren:x,createMakeNodeFunction:N}=io({FunctionNode:c,OperatorNode:m,SymbolNode:h}),g=t("simplifyConstant",{Node:k=>S(U(k,{})),"Node, Object":function(M,_){return S(U(M,_))}});function y(k){return $r(k)?k.valueOf():k instanceof Array?k.map(y):Fe(k)?a(y(k.valueOf())):k}function E(k,M,_){try{return n[k].apply(null,M)}catch{return M=M.map(y),w(n[k].apply(null,M),_)}}var b=t({Fraction:F,number:function(M){return M<0?D(new s(-M)):new s(M)},BigNumber:function(M){return M<0?D(new s(-M)):new s(M)},Complex:function(M){throw new Error("Cannot convert Complex number to Node")},string:function(M){return new s(M)},Matrix:function(M){return new u(M.valueOf().map(_=>b(_)))}});function S(k){return nt(k)?k:b(k)}function A(k,M){var _=M&&M.exactFractions!==!1;if(_&&isFinite(k)&&i){var q=i(k),B=M&&typeof M.fractionsLimit=="number"?M.fractionsLimit:1/0;if(q.valueOf()===k&&q.n0;)if(et(q[0])&&typeof q[0].value!="string"){var B=w(q.shift().value,_);Jt(k)?k=k.items[B-1]:(k=k.valueOf()[B-1],k instanceof Array&&(k=a(k)))}else if(q.length>1&&et(q[1])&&typeof q[1].value!="string"){var Z=w(q[1].value,_),te=[],Q=Jt(k)?k.items:k.valueOf();for(var z of Q)if(Jt(z))te.push(z.items[Z-1]);else if(Fe(k))te.push(z[Z-1]);else break;if(te.length===Q.length)Jt(k)?k=new u(te):k=a(te),q.splice(1,1);else break}else break;return q.length===M.dimensions.length?new l(S(k),M):q.length>0?(M=new p(q),new l(S(k),M)):k}if(qn(k)&&M.dimensions.length===1&&et(M.dimensions[0])){var re=M.dimensions[0].value;return re in k.properties?k.properties[re]:new s}return new l(S(k),M)}function P(k,M,_,q){var B=M.shift(),Z=M.reduce((te,Q)=>{if(!nt(Q)){var z=te.pop();if(nt(z))return[z,Q];try{return te.push(E(k,[z,Q],q)),te}catch{te.push(z)}}te.push(S(te.pop()));var re=te.length===1?te[0]:_(te);return[_([re,S(Q)])]},[B]);return Z.length===1?Z[0]:_([Z[0],b(Z[1])])}function U(k,M){switch(k.type){case"SymbolNode":return k;case"ConstantNode":switch(typeof k.value){case"number":return w(k.value,M);case"string":return k.value;default:if(!isNaN(k.value))return w(k.value,M)}return k;case"FunctionNode":if(n[k.name]&&n[k.name].rawArgs)return k;{var _=["add","multiply"];if(!_.includes(k.name)){var q=k.args.map(ce=>U(ce,M));if(!q.some(nt))try{return E(k.name,q,M)}catch{}if(k.name==="size"&&q.length===1&&Jt(q[0])){for(var B=[],Z=q[0];Jt(Z);)B.push(Z.items.length),Z=Z.items[0];return a(B)}return new c(k.name,q.map(S))}}case"OperatorNode":{var te=k.fn.toString(),Q,z,re=N(k);if(Tt(k)&&k.isUnary())Q=[U(k.args[0],M)],nt(Q[0])?z=re(Q):z=E(te,Q,M);else if(v(k,M.context))if(Q=x(k,M.context),Q=Q.map(ce=>U(ce,M)),d(te,M.context)){for(var fe=[],L=[],I=0;I1?(z=P(te,fe,re,M),L.unshift(z),z=P(te,L,re,M)):z=P(te,Q,re,M)}else z=P(te,Q,re,M);else Q=k.args.map(ce=>U(ce,M)),z=P(te,Q,re,M);return z}case"ParenthesisNode":return U(k.content,M);case"AccessorNode":return R(U(k.object,M),U(k.index,M),M);case"ArrayNode":{var $=k.items.map(ce=>U(ce,M));return $.some(nt)?new u($.map(S)):a($)}case"IndexNode":return new p(k.dimensions.map(ce=>g(ce,M)));case"ObjectNode":{var H={};for(var ae in k.properties)H[ae]=g(k.properties[ae],M);return new f(H)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(k.type))}}return g});var _3="simplifyCore",sH=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],M3=C(_3,sH,e=>{var{typed:t,parse:r,equal:n,isZero:a,add:i,subtract:o,multiply:l,divide:u,pow:s,AccessorNode:c,ArrayNode:p,ConstantNode:f,FunctionNode:m,IndexNode:h,ObjectNode:d,OperatorNode:v,ParenthesisNode:x,SymbolNode:N}=e,g=new f(0),y=new f(1),E=new f(!0),b=new f(!1);function S(F){return Tt(F)&&["and","not","or"].includes(F.op)}var{hasProperty:A,isCommutative:w}=io({FunctionNode:m,OperatorNode:v,SymbolNode:N});function D(F){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=R?R.context:void 0;if(A(F,"trivial",P)){if(pr(F)&&F.args.length===1)return D(F.args[0],R);var U=!1,k=0;if(F.forEach(L=>{++k,k===1&&(U=D(L,R))}),k===1)return U}var M=F;if(pr(M)){var _=zT(M.name);if(_){if(M.args.length>2&&A(M,"associative",P))for(;M.args.length>2;){var q=M.args.pop(),B=M.args.pop();M.args.push(new v(_,M.name,[q,B]))}M=new v(_,M.name,M.args)}else return new m(D(M.fn),M.args.map(L=>D(L,R)))}if(Tt(M)&&M.isUnary()){var Z=D(M.args[0],R);if(M.op==="~"&&Tt(Z)&&Z.isUnary()&&Z.op==="~"||M.op==="not"&&Tt(Z)&&Z.isUnary()&&Z.op==="not"&&S(Z.args[0]))return Z.args[0];var te=!0;if(M.op==="-"&&Tt(Z)&&(Z.isBinary()&&Z.fn==="subtract"&&(M=new v("-","subtract",[Z.args[1],Z.args[0]]),te=!1),Z.isUnary()&&Z.op==="-"))return Z.args[0];if(te)return new v(M.op,M.fn,[Z])}if(Tt(M)&&M.isBinary()){var Q=D(M.args[0],R),z=D(M.args[1],R);if(M.op==="+"){if(et(Q)&&a(Q.value))return z;if(et(z)&&a(z.value))return Q;Tt(z)&&z.isUnary()&&z.op==="-"&&(z=z.args[0],M=new v("-","subtract",[Q,z]))}if(M.op==="-")return Tt(z)&&z.isUnary()&&z.op==="-"?D(new v("+","add",[Q,z.args[0]]),R):et(Q)&&a(Q.value)?D(new v("-","unaryMinus",[z])):et(z)&&a(z.value)?Q:new v(M.op,M.fn,[Q,z]);if(M.op==="*"){if(et(Q)){if(a(Q.value))return g;if(n(Q.value,1))return z}if(et(z)){if(a(z.value))return g;if(n(z.value,1))return Q;if(w(M,P))return new v(M.op,M.fn,[z,Q],M.implicit)}return new v(M.op,M.fn,[Q,z],M.implicit)}if(M.op==="/")return et(Q)&&a(Q.value)?g:et(z)&&n(z.value,1)?Q:new v(M.op,M.fn,[Q,z]);if(M.op==="^"&&et(z)){if(a(z.value))return y;if(n(z.value,1))return Q}if(M.op==="and"){if(et(Q))if(Q.value){if(S(z))return z;if(et(z))return z.value?E:b}else return b;if(et(z))if(z.value){if(S(Q))return Q}else return b}if(M.op==="or"){if(et(Q)){if(Q.value)return E;if(S(z))return z}if(et(z)){if(z.value)return E;if(S(Q))return Q}}return new v(M.op,M.fn,[Q,z])}if(Tt(M))return new v(M.op,M.fn,M.args.map(L=>D(L,R)));if(Jt(M))return new p(M.items.map(L=>D(L,R)));if(wr(M))return new c(D(M.object,R),D(M.index,R));if(Rr(M))return new h(M.dimensions.map(L=>D(L,R)));if(qn(M)){var re={};for(var fe in M.properties)re[fe]=D(M.properties[fe],R);return new d(re)}return M}return t(_3,{Node:D,"Node,Object":D})});var uH="resolve",cH=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],O3=C(uH,cH,e=>{var{typed:t,parse:r,ConstantNode:n,FunctionNode:a,OperatorNode:i,ParenthesisNode:o}=e;function l(u,s){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!s)return u;if(bt(u)){if(c.has(u.name)){var p=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(p,"}"))}var f=s.get(u.name);if(nt(f)){var m=new Set(c);return m.add(u.name),l(f,s,m)}else return typeof f=="number"?r(String(f)):f!==void 0?new n(f):u}else if(Tt(u)){var h=u.args.map(function(v){return l(v,s,c)});return new i(u.op,u.fn,h,u.implicit)}else{if(er(u))return new o(l(u.content,s,c));if(pr(u)){var d=u.args.map(function(v){return l(v,s,c)});return new a(u.name,d)}}return u.map(v=>l(v,s,c))}return t("resolve",{Node:l,"Node, Map | null | undefined":l,"Node, Object":(u,s)=>l(u,Jn(s)),"Array | Matrix":t.referToSelf(u=>s=>s.map(c=>u(c))),"Array | Matrix, null | undefined":t.referToSelf(u=>s=>s.map(c=>u(c))),"Array, Object":t.referTo("Array,Map",u=>(s,c)=>u(s,Jn(c))),"Matrix, Object":t.referTo("Matrix,Map",u=>(s,c)=>u(s,Jn(c))),"Array | Matrix, Map":t.referToSelf(u=>(s,c)=>s.map(p=>u(p,c)))})});var R3="symbolicEqual",lH=["parse","simplify","typed","OperatorNode"],F3=C(R3,lH,e=>{var{parse:t,simplify:r,typed:n,OperatorNode:a}=e;function i(o,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=new a("-","subtract",[o,l]),c=r(s,{},u);return et(c)&&!c.value}return n(R3,{"Node, Node":i,"Node, Node, Object":i})});var I3="derivative",pH=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],B3=C(I3,pH,e=>{var{typed:t,config:r,parse:n,simplify:a,equal:i,isZero:o,numeric:l,ConstantNode:u,FunctionNode:s,OperatorNode:c,ParenthesisNode:p,SymbolNode:f}=e;function m(g,y){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},b={};v(b,g,y.name);var S=x(g,b);return E.simplify?a(S):S}t.addConversion({from:"identifier",to:"SymbolNode",convert:n});var h=t(I3,{"Node, SymbolNode":m,"Node, SymbolNode, Object":m});t.removeConversion({from:"identifier",to:"SymbolNode",convert:n}),h._simplify=!0,h.toTex=function(g){return d.apply(null,g.args)};var d=t("_derivTex",{"Node, SymbolNode":function(y,E){return et(y)&&ut(y.value)==="string"?d(n(y.value).toString(),E.toString(),1):d(y.toTex(),E.toString(),1)},"Node, ConstantNode":function(y,E){if(ut(E.value)==="string")return d(y,n(E.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(y,E,b){return d(y.toString(),E.name,b.value)},"string, string, number":function(y,E,b){var S;return b===1?S="{d\\over d"+E+"}":S="{d^{"+b+"}\\over d"+E+"^{"+b+"}}",S+"\\left[".concat(y,"\\right]")}}),v=t("constTag",{"Object, ConstantNode, string":function(y,E){return y[E]=!0,!0},"Object, SymbolNode, string":function(y,E,b){return E.name!==b?(y[E]=!0,!0):!1},"Object, ParenthesisNode, string":function(y,E,b){return v(y,E.content,b)},"Object, FunctionAssignmentNode, string":function(y,E,b){return E.params.includes(b)?v(y,E.expr,b):(y[E]=!0,!0)},"Object, FunctionNode | OperatorNode, string":function(y,E,b){if(E.args.length>0){for(var S=v(y,E.args[0],b),A=1;A0){var S=y.args.filter(function(k){return E[k]===void 0}),A=S.length===1?S[0]:new c("*","multiply",S),w=b.concat(x(A,E));return new c("*","multiply",w)}return new c("+","add",y.args.map(function(k){return new c("*","multiply",y.args.map(function(M){return M===k?x(M,E):M.clone()}))}))}if(y.op==="/"&&y.isBinary()){var D=y.args[0],F=y.args[1];return E[F]!==void 0?new c("/","divide",[x(D,E),F]):E[D]!==void 0?new c("*","multiply",[new c("-","unaryMinus",[D]),new c("/","divide",[x(F,E),new c("^","pow",[F.clone(),N(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[x(D,E),F.clone()]),new c("*","multiply",[D.clone(),x(F,E)])]),new c("^","pow",[F.clone(),N(2)])])}if(y.op==="^"&&y.isBinary()){var R=y.args[0],P=y.args[1];if(E[R]!==void 0)return et(R)&&(o(R.value)||i(R.value,1))?N(0):new c("*","multiply",[y,new c("*","multiply",[new s("log",[R.clone()]),x(P.clone(),E)])]);if(E[P]!==void 0){if(et(P)){if(o(P.value))return N(0);if(i(P.value,1))return x(R,E)}var U=new c("^","pow",[R.clone(),new c("-","subtract",[P,N(1)])]);return new c("*","multiply",[P.clone(),new c("*","multiply",[x(R,E),U])])}return new c("*","multiply",[new c("^","pow",[R.clone(),P.clone()]),new c("+","add",[new c("*","multiply",[x(R,E),new c("/","divide",[P.clone(),R.clone()])]),new c("*","multiply",[x(P,E),new s("log",[R.clone()])])])])}throw new Error('Cannot process operator "'+y.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function N(g,y){return new u(l(g,y||r.number))}return h});var L3="rationalize",fH=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],P3=C(L3,fH,e=>{var{config:t,typed:r,equal:n,isZero:a,add:i,subtract:o,multiply:l,divide:u,pow:s,parse:c,simplifyConstant:p,simplifyCore:f,simplify:m,fraction:h,bignumber:d,mathWithTransform:v,matrix:x,AccessorNode:N,ArrayNode:g,ConstantNode:y,FunctionNode:E,IndexNode:b,ObjectNode:S,OperatorNode:A,SymbolNode:w,ParenthesisNode:D}=e;function F(M){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,B=P(),Z=R(M,_,!0,B.firstRules),te=Z.variables.length,Q={exactFractions:!1},z={exactFractions:!0};if(M=Z.expression,te>=1){M=U(M);var re,fe,L=!0,I=!1;M=m(M,B.firstRules,{},Q);for(var $;fe=L?B.distrDivRules:B.sucDivRules,M=m(M,fe,{},z),L=!L,$=M.toString(),$!==re;)I=!0,re=$;I&&(M=m(M,B.firstRulesAgain,{},Q)),M=m(M,B.finalRules,{},Q)}var H=[],ae={};return M.type==="OperatorNode"&&M.isBinary()&&M.op==="/"?(te===1&&(M.args[0]=k(M.args[0],H),M.args[1]=k(M.args[1])),q&&(ae.numerator=M.args[0],ae.denominator=M.args[1])):(te===1&&(M=k(M,H)),q&&(ae.numerator=M,ae.denominator=null)),q?(ae.coefficients=H,ae.variables=Z.variables,ae.expression=M,ae):M}return r(L3,{Node:F,"Node, boolean":(M,_)=>F(M,{},_),"Node, Object":F,"Node, Object, boolean":F});function R(M,_,q,B){var Z=[],te=m(M,B,_,{exactFractions:!1});q=!!q;var Q="+-*"+(q?"/":"");re(te);var z={};return z.expression=te,z.variables=Z,z;function re(fe){var L=fe.type;if(L==="FunctionNode")throw new Error("There is an unsolved function call");if(L==="OperatorNode")if(fe.op==="^"){if(fe.args[1].type!=="ConstantNode"||!Re(parseFloat(fe.args[1].value)))throw new Error("There is a non-integer exponent");re(fe.args[0])}else{if(!Q.includes(fe.op))throw new Error("Operator "+fe.op+" invalid in polynomial expression");for(var I=0;I1;if(B==="OperatorNode"&&M.isBinary()){var te=!1,Q;if(M.op==="^"&&(M.args[0].type==="ParenthesisNode"||M.args[0].type==="OperatorNode")&&M.args[1].type==="ConstantNode"&&(Q=parseFloat(M.args[1].value),te=Q>=2&&Re(Q)),te){if(Q>2){var z=M.args[0],re=new A("^","pow",[M.args[0].cloneDeep(),new y(Q-1)]);M=new A("*","multiply",[z,re])}else M=new A("*","multiply",[M.args[0],M.args[0].cloneDeep()]);Z&&(q==="content"?_.content=M:_.args[q]=M)}}if(B==="ParenthesisNode")U(M.content,M,"content");else if(B!=="ConstantNode"&&B!=="SymbolNode")for(var fe=0;fe=0;z--)if(_[z]!==0){var re=new y(te?_[z]:Math.abs(_[z])),fe=_[z]<0?"-":"+";if(z>0){var L=new w(Z);if(z>1){var I=new y(z);L=new A("^","pow",[L,I])}_[z]===-1&&te?re=new A("-","unaryMinus",[L]):Math.abs(_[z])===1?re=L:re=new A("*","multiply",[re,L])}te?Q=re:fe==="+"?Q=new A("+","add",[Q,re]):Q=new A("-","subtract",[Q,re]),te=!1}if(te)return new y(0);return Q;function $(H,ae,ce){var me=H.type;if(me==="FunctionNode")throw new Error("There is an unsolved function call");if(me==="OperatorNode"){if(!"+-*^".includes(H.op))throw new Error("Operator "+H.op+" invalid");if(ae!==null){if((H.fn==="unaryMinus"||H.fn==="pow")&&ae.fn!=="add"&&ae.fn!=="subtract"&&ae.fn!=="multiply")throw new Error("Invalid "+H.op+" placing");if((H.fn==="subtract"||H.fn==="add"||H.fn==="multiply")&&ae.fn!=="add"&&ae.fn!=="subtract")throw new Error("Invalid "+H.op+" placing");if((H.fn==="subtract"||H.fn==="add"||H.fn==="unaryMinus")&&ce.noFil!==0)throw new Error("Invalid "+H.op+" placing")}(H.op==="^"||H.op==="*")&&(ce.fire=H.op);for(var Ne=0;NeB&&(_[Me]=0),_[Me]+=ce.cte*(ce.oper==="+"?1:-1),B=Math.max(Me,B);return}ce.cte=Me,ce.fire===""&&(_[0]+=ce.cte*(ce.oper==="+"?1:-1))}else throw new Error("Type "+me+" is not allowed")}}});var U3="zpk2tf",mH=["typed","add","multiply","Complex","number"],Wv=C(U3,mH,e=>{var{typed:t,add:r,multiply:n,Complex:a,number:i}=e;return t(U3,{"Array,Array,number":function(s,c,p){return o(s,c,p)},"Array,Array":function(s,c){return o(s,c,1)},"Matrix,Matrix,number":function(s,c,p){return o(s.valueOf(),c.valueOf(),p)},"Matrix,Matrix":function(s,c){return o(s.valueOf(),c.valueOf(),1)}});function o(u,s,c){u.some(N=>N.type==="BigNumber")&&(u=u.map(N=>i(N))),s.some(N=>N.type==="BigNumber")&&(s=s.map(N=>i(N)));for(var p=[a(1,0)],f=[a(1,0)],m=0;m=0&&p-f{var{typed:t,add:r,multiply:n,Complex:a,divide:i,matrix:o}=e;return t(k3,{"Array, Array":function(c,p){var f=u(512);return l(c,p,f)},"Array, Array, Array":function(c,p,f){return l(c,p,f)},"Array, Array, number":function(c,p,f){if(f<0)throw new Error("w must be a positive number");var m=u(f);return l(c,p,m)},"Matrix, Matrix":function(c,p){var f=u(512),{w:m,h}=l(c.valueOf(),p.valueOf(),f);return{w:o(m),h:o(h)}},"Matrix, Matrix, Matrix":function(c,p,f){var{h:m}=l(c.valueOf(),p.valueOf(),f.valueOf());return{h:o(m),w:o(f)}},"Matrix, Matrix, number":function(c,p,f){if(f<0)throw new Error("w must be a positive number");var m=u(f),{h}=l(c.valueOf(),p.valueOf(),m);return{h:o(h),w:o(m)}}});function l(s,c,p){for(var f=[],m=[],h=0;h{var{classes:t}=e;return function(n,a){var i=t[a&&a.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(a):a}});var gH="replacer",xH=[],Zv=C(gH,xH,()=>function(t,r){return typeof r=="number"&&(!isFinite(r)||isNaN(r))?{mathjs:"number",value:String(r)}:r});var H3="12.4.3";var Jv=C("true",[],()=>!0),eg=C("false",[],()=>!1),tg=C("null",[],()=>null),rg=Qr("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1/0):1/0}),ng=Qr("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(NaN):NaN}),ag=Qr("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?Ss(r):EE}),ig=Qr("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?$N(r):AE}),og=Qr("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?jN(r):NE}),sg=Qr("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?VN(r):TE}),ug=Qr("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).ln():Math.LN2}),cg=Qr("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(10).ln():Math.LN10}),lg=Qr("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(2).ln()):Math.LOG2E}),pg=Qr("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(10).ln()):Math.LOG10E}),fg=Qr("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r("0.5").sqrt():Math.SQRT1_2}),mg=Qr("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).sqrt():Math.SQRT2}),dg=Qr("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),z3=C("PI",["pi"],e=>{var{pi:t}=e;return t}),G3=C("E",["e"],e=>{var{e:t}=e;return t}),hg=C("version",[],()=>H3);function Qr(e,t,r){return C(e,t,r,{recreateOnConfigChange:!0})}var vg=ot("speedOfLight","299792458","m s^-1"),gg=ot("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),xg=ot("planckConstant","6.62607015e-34","J s"),bg=ot("reducedPlanckConstant","1.0545718176461565e-34","J s"),yg=ot("magneticConstant","1.25663706212e-6","N A^-2"),Eg=ot("electricConstant","8.8541878128e-12","F m^-1"),Ag=ot("vacuumImpedance","376.730313667","ohm"),Ng=ot("coulomb","8.987551792261171e9","N m^2 C^-2"),Tg=ot("elementaryCharge","1.602176634e-19","C"),wg=ot("bohrMagneton","9.2740100783e-24","J T^-1"),Dg=ot("conductanceQuantum","7.748091729863649e-5","S"),Sg=ot("inverseConductanceQuantum","12906.403729652257","ohm"),Cg=ot("magneticFluxQuantum","2.0678338484619295e-15","Wb"),_g=ot("nuclearMagneton","5.0507837461e-27","J T^-1"),Mg=ot("klitzing","25812.807459304513","ohm");var Og=ot("bohrRadius","5.29177210903e-11","m"),Rg=ot("classicalElectronRadius","2.8179403262e-15","m"),Fg=ot("electronMass","9.1093837015e-31","kg"),Ig=ot("fermiCoupling","1.1663787e-5","GeV^-2"),Bg=rp("fineStructure",.0072973525693),Lg=ot("hartreeEnergy","4.3597447222071e-18","J"),Pg=ot("protonMass","1.67262192369e-27","kg"),Ug=ot("deuteronMass","3.3435830926e-27","kg"),kg=ot("neutronMass","1.6749271613e-27","kg"),qg=ot("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),Hg=ot("rydberg","10973731.568160","m^-1"),zg=ot("thomsonCrossSection","6.6524587321e-29","m^2"),Gg=rp("weakMixingAngle",.2229),Yg=rp("efimovFactor",22.7),jg=ot("atomicMass","1.66053906660e-27","kg"),Vg=ot("avogadro","6.02214076e23","mol^-1"),$g=ot("boltzmann","1.380649e-23","J K^-1"),Xg=ot("faraday","96485.33212331001","C mol^-1"),Kg=ot("firstRadiation","3.7417718521927573e-16","W m^2"),Wg=ot("loschmidt","2.686780111798444e25","m^-3"),Qg=ot("gasConstant","8.31446261815324","J K^-1 mol^-1"),Zg=ot("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),Jg=ot("molarVolume","0.022413969545014137","m^3 mol^-1"),ex=rp("sackurTetrode",-1.16487052358),tx=ot("secondRadiation","0.014387768775039337","m K"),rx=ot("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),nx=ot("wienDisplacement","2.897771955e-3","m K"),ax=ot("molarMass","0.99999999965e-3","kg mol^-1"),ix=ot("molarMassC12","11.9999999958e-3","kg mol^-1"),ox=ot("gravity","9.80665","m s^-2"),sx=ot("planckLength","1.616255e-35","m"),ux=ot("planckMass","2.176435e-8","kg"),cx=ot("planckTime","5.391245e-44","s"),lx=ot("planckCharge","1.87554603778e-18","C"),px=ot("planckTemperature","1.416785e+32","K");function ot(e,t,r){var n=["config","Unit","BigNumber"];return C(e,n,a=>{var{config:i,Unit:o,BigNumber:l}=a,u=i.number==="BigNumber"?new l(t):parseFloat(t),s=new o(u,r);return s.fixPrefix=!0,s})}function rp(e,t){var r=["config","BigNumber"];return C(e,r,n=>{var{config:a,BigNumber:i}=n;return a.number==="BigNumber"?new i(t):t})}var bH="apply",yH=["typed","isInteger"],Y3=C(bH,yH,e=>{var{typed:t,isInteger:r}=e,n=ii({typed:t,isInteger:r});return t("apply",{"...any":function(i){var o=i[1];ze(o)?i[1]=o-1:Ue(o)&&(i[1]=o.minus(1));try{return n.apply(null,i)}catch(l){throw Dt(l)}}})},{isTransformFunction:!0});var EH="column",AH=["typed","Index","matrix","range"],j3=C(EH,AH,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=vs({typed:t,Index:r,matrix:n,range:a});return t("column",{"...any":function(l){var u=l.length-1,s=l[u];ze(s)&&(l[u]=s-1);try{return i.apply(null,l)}catch(c){throw Dt(c)}}})},{isTransformFunction:!0});function oo(e,t,r){var n=e.filter(function(u){return bt(u)&&!(u.name in t)&&!r.has(u.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var a=n.name,i=new Map,o=new ki(r,i,new Set([a])),l=e.compile();return function(s){return i.set(a,s),l.evaluate(o)}}var NH="filter",TH=["typed"],$3=C(NH,TH,e=>{var{typed:t}=e;function r(a,i,o){var l,u;return a[0]&&(l=a[0].compile().evaluate(o)),a[1]&&(bt(a[1])||sn(a[1])?u=a[1].compile().evaluate(o):u=oo(a[1],i,o)),n(l,u)}r.rawArgs=!0;var n=t("filter",{"Array, function":V3,"Matrix, function":function(i,o){return i.create(V3(i.toArray(),o))},"Array, RegExp":Gi,"Matrix, RegExp":function(i,o){return i.create(Gi(i.toArray(),o))}});return r},{isTransformFunction:!0});function V3(e,t){return Bc(e,function(r,n,a){return fn(t,r,[n+1],a,"filter")})}var wH="forEach",DH=["typed"],X3=C(wH,DH,e=>{var{typed:t}=e;function r(a,i,o){var l,u;return a[0]&&(l=a[0].compile().evaluate(o)),a[1]&&(bt(a[1])||sn(a[1])?u=a[1].compile().evaluate(o):u=oo(a[1],i,o)),n(l,u)}r.rawArgs=!0;var n=t("forEach",{"Array | Matrix, function":function(i,o){var l=function u(s,c){if(Array.isArray(s))Na(s,function(p,f){u(p,c.concat(f+1))});else return fn(o,s,c,i,"forEach")};l(i.valueOf(),[])}});return r},{isTransformFunction:!0});var SH="index",CH=["Index","getMatrixDataType"],K3=C(SH,CH,e=>{var{Index:t,getMatrixDataType:r}=e;return function(){for(var a=[],i=0,o=arguments.length;i0?0:2;else if(l&&l.isSet===!0)l=l.map(function(s){return s-1});else if(at(l)||Fe(l))r(l)!=="boolean"&&(l=l.map(function(s){return s-1}));else if(ze(l))l--;else if(Ue(l))l=l.toNumber()-1;else if(typeof l!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");a[i]=l}var u=new t;return t.apply(u,a),u}},{isTransformFunction:!0});var _H="map",MH=["typed"],Q3=C(_H,MH,e=>{var{typed:t}=e;function r(a,i,o){var l,u;return a[0]&&(l=a[0].compile().evaluate(o)),a[1]&&(bt(a[1])||sn(a[1])?u=a[1].compile().evaluate(o):u=oo(a[1],i,o)),n(l,u)}r.rawArgs=!0;var n=t("map",{"Array, function":function(i,o){return W3(i,o,i)},"Matrix, function":function(i,o){return i.create(W3(i.valueOf(),o,i))}});return r},{isTransformFunction:!0});function W3(e,t,r){function n(a,i){return Array.isArray(a)?Ir(a,function(o,l){return n(o,i.concat(l+1))}):fn(t,a,i,r,"map")}return n(e,[])}function br(e){if(e.length===2&&Lt(e[0])){e=e.slice();var t=e[1];ze(t)?e[1]=t-1:Ue(t)&&(e[1]=t.minus(1))}return e}var OH="max",RH=["typed","config","numeric","larger"],Z3=C(OH,RH,e=>{var{typed:t,config:r,numeric:n,larger:a}=e,i=ro({typed:t,config:r,numeric:n,larger:a});return t("max",{"...any":function(l){l=br(l);try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var FH="mean",IH=["typed","add","divide"],J3=C(FH,IH,e=>{var{typed:t,add:r,divide:n}=e,a=Rs({typed:t,add:r,divide:n});return t("mean",{"...any":function(o){o=br(o);try{return a.apply(null,o)}catch(l){throw Dt(l)}}})},{isTransformFunction:!0});var BH="min",LH=["typed","config","numeric","smaller"],eM=C(BH,LH,e=>{var{typed:t,config:r,numeric:n,smaller:a}=e,i=no({typed:t,config:r,numeric:n,smaller:a});return t("min",{"...any":function(l){l=br(l);try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var PH="range",UH=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],tM=C(PH,UH,e=>{var{typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:l,largerEq:u,add:s,isPositive:c}=e,p=bs({typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:l,largerEq:u,add:s,isPositive:c});return t("range",{"...any":function(m){var h=m.length-1,d=m[h];return typeof d!="boolean"&&m.push(!0),p.apply(null,m)}})},{isTransformFunction:!0});var kH="row",qH=["typed","Index","matrix","range"],rM=C(kH,qH,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=ys({typed:t,Index:r,matrix:n,range:a});return t("row",{"...any":function(l){var u=l.length-1,s=l[u];ze(s)&&(l[u]=s-1);try{return i.apply(null,l)}catch(c){throw Dt(c)}}})},{isTransformFunction:!0});var HH="subset",zH=["typed","matrix","zeros","add"],nM=C(HH,zH,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=Es({typed:t,matrix:r,zeros:n,add:a});return t("subset",{"...any":function(l){try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var GH="concat",YH=["typed","matrix","isInteger"],aM=C(GH,YH,e=>{var{typed:t,matrix:r,isInteger:n}=e,a=Wi({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(o){var l=o.length-1,u=o[l];ze(u)?o[l]=u-1:Ue(u)&&(o[l]=u.minus(1));try{return a.apply(null,o)}catch(s){throw Dt(s)}}})},{isTransformFunction:!0});var iM="diff",jH=["typed","matrix","subtract","number","bignumber"],oM=C(iM,jH,e=>{var{typed:t,matrix:r,subtract:n,number:a,bignumber:i}=e,o=xs({typed:t,matrix:r,subtract:n,number:a,bignumber:i});return t(iM,{"...any":function(u){u=br(u);try{return o.apply(null,u)}catch(s){throw Dt(s)}}})},{isTransformFunction:!0});var VH="std",$H=["typed","map","sqrt","variance"],sM=C(VH,$H,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e,i=Bs({typed:t,map:r,sqrt:n,variance:a});return t("std",{"...any":function(l){l=br(l);try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var uM="sum",XH=["typed","config","add","numeric"],cM=C(uM,XH,e=>{var{typed:t,config:r,add:n,numeric:a}=e,i=Ms({typed:t,config:r,add:n,numeric:a});return t(uM,{"...any":function(l){l=br(l);try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var KH="quantileSeq",WH=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],lM=C(KH,WH,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:l,compare:u,isInteger:s,smaller:c,smallerEq:p,larger:f}=e,m=Is({typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:l,compare:u,isInteger:s,smaller:c,smallerEq:p,larger:f});return t("quantileSeq",{"Array | Matrix, number | BigNumber":m,"Array | Matrix, number | BigNumber, number":(d,v,x)=>m(d,v,h(x)),"Array | Matrix, number | BigNumber, boolean":m,"Array | Matrix, number | BigNumber, boolean, number":(d,v,x,N)=>m(d,v,x,h(N)),"Array | Matrix, Array | Matrix":m,"Array | Matrix, Array | Matrix, number":(d,v,x)=>m(d,v,h(x)),"Array | Matrix, Array | Matrix, boolean":m,"Array | Matrix, Array | Matrix, boolean, number":(d,v,x,N)=>m(d,v,x,h(N))});function h(d){return br([[],d])[1]}},{isTransformFunction:!0});var pM="cumsum",QH=["typed","add","unaryPlus"],fM=C(pM,QH,e=>{var{typed:t,add:r,unaryPlus:n}=e,a=Os({typed:t,add:r,unaryPlus:n});return t(pM,{"...any":function(o){if(o.length===2&&Lt(o[0])){var l=o[1];ze(l)?o[1]=l-1:Ue(l)&&(o[1]=l.minus(1))}try{return a.apply(null,o)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var mM="variance",ZH=["typed","add","subtract","multiply","divide","apply","isNaN"],dM=C(mM,ZH,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,apply:o,isNaN:l}=e,u=Fs({typed:t,add:r,subtract:n,multiply:a,divide:i,apply:o,isNaN:l});return t(mM,{"...any":function(c){c=br(c);try{return u.apply(null,c)}catch(p){throw Dt(p)}}})},{isTransformFunction:!0});var hM="print",JH=["typed","matrix","zeros","add"],vM=C(hM,JH,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=ws({typed:t,matrix:r,zeros:n,add:a});return t(hM,{"string, Object | Array":function(u,s){return i(o(u),s)},"string, Object | Array, number | Object":function(u,s,c){return i(o(u),s,c)}});function o(l){return l.replace(fl,u=>{var s=u.slice(1).split("."),c=s.map(function(p){return!isNaN(p)&&p.length>0?parseInt(p)-1:p});return"$"+c.join(".")})}},{isTransformFunction:!0});var ez="and",tz=["typed","matrix","zeros","add","equalScalar","not","concat"],gM=C(ez,tz,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,l=Ds({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(s,c,p){var f=s[0].compile().evaluate(p);if(!Lt(f)&&!l(f,!0))return!1;var m=s[1].compile().evaluate(p);return l(f,m)}return u.rawArgs=!0,u},{isTransformFunction:!0});var rz="or",nz=["typed","matrix","equalScalar","DenseMatrix","concat"],xM=C(rz,nz,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=hs({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function l(u,s,c){var p=u[0].compile().evaluate(c);if(!Lt(p)&&o(p,!1))return!0;var f=u[1].compile().evaluate(c);return o(p,f)}return l.rawArgs=!0,l},{isTransformFunction:!0});var az="bitAnd",iz=["typed","matrix","zeros","add","equalScalar","not","concat"],bM=C(az,iz,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,l=ms({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(s,c,p){var f=s[0].compile().evaluate(p);if(!Lt(f)){if(isNaN(f))return NaN;if(f===0||f===!1)return 0}var m=s[1].compile().evaluate(p);return l(f,m)}return u.rawArgs=!0,u},{isTransformFunction:!0});var oz="bitOr",sz=["typed","matrix","equalScalar","DenseMatrix","concat"],yM=C(oz,sz,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=ds({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function l(u,s,c){var p=u[0].compile().evaluate(c);if(!Lt(p)){if(isNaN(p))return NaN;if(p===-1)return-1;if(p===!0)return 1}var f=u[1].compile().evaluate(c);return o(p,f)}return l.rawArgs=!0,l},{isTransformFunction:!0});var Us=_c({config:un}),uz=Mc({});var EM=Oc({});var mx=Rc({});var Ca=Pc({Matrix:mx});var At=Ec({BigNumber:Us,Complex:uz,DenseMatrix:Ca,Fraction:EM});var cz=Qc({typed:At});var np=Jc({typed:At});var lz=$c({BigNumber:Us,typed:At});var pz=ol({typed:At});var so=Yc({config:un,typed:At});var fz=qc({typed:At});var mz=zc({typed:At});var AM=tl({typed:At});var dz=Vc({typed:At});var dx=jc({Matrix:mx,equalScalar:so,typed:At});var NM=el({typed:At});var hx=Wc({typed:At});var jn=Xc({Fraction:EM,typed:At});var Zr=Kc({DenseMatrix:Ca,Matrix:mx,SparseMatrix:dx,typed:At});var vx=ml({bignumber:lz,fraction:jn,number:dz});var hz=ll({matrix:Zr,config:un,typed:At});var vz=pl({BigNumber:Us,config:un,matrix:Zr,typed:At});var ap=Wi({isInteger:fz,matrix:Zr,typed:At});var gx=dl({numeric:vx,typed:At});var gz=sl({BigNumber:Us,DenseMatrix:Ca,SparseMatrix:dx,config:un,matrix:Zr,typed:At});var ip=hl({BigNumber:Us,DenseMatrix:Ca,config:un,equalScalar:so,matrix:Zr,typed:At,zeros:vz}),xz=bl({DenseMatrix:Ca,concat:ap,config:un,matrix:Zr,typed:At}),xx=nl({DenseMatrix:Ca,concat:ap,equalScalar:so,matrix:Zr,subtractScalar:NM,typed:At,unaryMinus:hx});var bx=Dl({DenseMatrix:Ca,SparseMatrix:dx,addScalar:np,concat:ap,equalScalar:so,matrix:Zr,typed:At});var bz=Sl({addScalar:np,conj:pz,multiplyScalar:AM,size:hz,typed:At});var yz=Al({DenseMatrix:Ca,concat:ap,config:un,matrix:Zr,typed:At});var TM=no({config:un,numeric:vx,smaller:xz,typed:At});var ks=rl({addScalar:np,dot:bz,equalScalar:so,matrix:Zr,multiplyScalar:AM,typed:At});var Ez=Ql({divideScalar:gx,isZero:mz,matrix:Zr,multiply:ks,subtractScalar:NM,typed:At,unaryMinus:hx});var wM=ro({config:un,larger:yz,numeric:vx,typed:At});var Az=Zl({abs:cz,addScalar:np,det:Ez,divideScalar:gx,identity:gz,matrix:Zr,multiply:ks,typed:At,unaryMinus:hx});var uo=Jl({divideScalar:gx,equalScalar:so,inv:Az,matrix:Zr,multiply:ks,typed:At});var qs=fx;var MM=Le(va(),1),OM=Le(dc(),1);var SM=Le(DM(),1);function CM(e){var t=new SM.default;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}function _M(e,t,r,n){function a(v,x){var N=arguments.length;if(N!==1&&N!==2)throw new Wr("import",N,1,2);x||(x={});function g(S,A,w){if(Array.isArray(A))A.forEach(R=>g(S,R));else if(typeof A=="object")for(var D in A)Ie(A,D)&&g(S,A[D],D);else if(Za(A)||w!==void 0){var F=Za(A)?h(A)?A.fn+".transform":A.fn:w;if(Ie(S,F)&&S[F]!==A&&!x.silent)throw new Error('Cannot import "'+F+'" twice');S[F]=A}else if(!x.silent)throw new TypeError("Factory, Object, or Array expected")}var y={};g(y,v);for(var E in y)if(Ie(y,E)){var b=y[E];if(Za(b))s(b,x);else if(c(b))i(E,b,x);else if(!x.silent)throw new TypeError("Factory, Object, or Array expected")}}function i(v,x,N){if(N.wrap&&typeof x=="function"&&(x=u(x)),p(x)&&(x=e(v,{[x.signature]:x})),e.isTypedFunction(r[v])&&e.isTypedFunction(x)){N.override?x=e(v,x.signatures):x=e(r[v],x),r[v]=x,delete n[v],o(v,x),r.emit("import",v,function(){return x});return}if(r[v]===void 0||N.override){r[v]=x,delete n[v],o(v,x),r.emit("import",v,function(){return x});return}if(!N.silent)throw new Error('Cannot import "'+v+'": already exists')}function o(v,x){x&&typeof x.transform=="function"?(r.expression.transform[v]=x.transform,f(v)&&(r.expression.mathWithTransform[v]=x.transform)):(delete r.expression.transform[v],f(v)&&(r.expression.mathWithTransform[v]=x))}function l(v){delete r.expression.transform[v],f(v)?r.expression.mathWithTransform[v]=r[v]:delete r.expression.mathWithTransform[v]}function u(v){var x=function(){for(var g=[],y=0,E=arguments.length;y2&&arguments[2]!==void 0?arguments[2]:v.fn;if(N.includes("."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(N));var g=h(v)?r.expression.transform:r,y=N in r.expression.transform,E=Ie(g,N)?g[N]:void 0,b=function(){var A={};v.dependencies.map(Wf).forEach(D=>{if(D.includes("."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(D));D==="math"?A.math=r:D==="mathWithTransform"?A.mathWithTransform=r.expression.mathWithTransform:D==="classes"?A.classes=r:A[D]=r[D]});var w=v(A);if(w&&typeof w.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(E===void 0||x.override)return w;if(e.isTypedFunction(E)&&e.isTypedFunction(w))return e(E,w);if(x.silent)return E;throw new Error('Cannot import "'+N+'": already exists')};!v.meta||v.meta.lazy!==!1?(Li(g,N,b),E&&y?l(N):(h(v)||m(v))&&Li(r.expression.mathWithTransform,N,()=>g[N])):(g[N]=b(),E&&y?l(N):(h(v)||m(v))&&Li(r.expression.mathWithTransform,N,()=>g[N])),n[N]=v,r.emit("import",N,b)}function c(v){return typeof v=="function"||typeof v=="number"||typeof v=="string"||typeof v=="boolean"||v===null||$t(v)||Zt(v)||Ue(v)||$r(v)||Fe(v)||Array.isArray(v)}function p(v){return typeof v=="function"&&typeof v.signature=="string"}function f(v){return!Ie(d,v)}function m(v){return!v.fn.includes(".")&&!Ie(d,v.fn)&&(!v.meta||!v.meta.isClass)}function h(v){return v!==void 0&&v.meta!==void 0&&v.meta.isTransformFunction===!0||!1}var d={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return a}function co(e,t){var r=(0,MM.default)({},Qa,t);if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var n=CM({isNumber:ze,isComplex:Zt,isBigNumber:Ue,isFraction:$r,isUnit:$t,isString:It,isArray:at,isMatrix:Fe,isCollection:Lt,isDenseMatrix:Zn,isSparseMatrix:Xr,isRange:ga,isIndex:Un,isBoolean:Ju,isResultSet:ec,isHelp:Fi,isFunction:tc,isDate:rc,isRegExp:nc,isObject:kn,isNull:ac,isUndefined:ic,isAccessorNode:wr,isArrayNode:Jt,isAssignmentNode:oc,isBlockNode:sc,isConditionalNode:uc,isConstantNode:et,isFunctionAssignmentNode:sn,isFunctionNode:pr,isIndexNode:Rr,isNode:nt,isObjectNode:qn,isOperatorNode:Tt,isParenthesisNode:er,isRangeNode:cc,isRelationalNode:lc,isSymbolNode:bt,isChain:Ii});n.config=by(r,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var a=[],i=[];function o(c){if(Za(c))return c(n);var p=c[Object.keys(c)[0]];if(Za(p))return p(n);if(!vy(c))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",c),new Error("Factory object with properties `type`, `name`, and `factory` expected");var f=a.indexOf(c),m;return f===-1?(c.math===!0?m=c.factory(n.type,r,o,n.typed,n):m=c.factory(n.type,r,o,n.typed),a.push(c),i.push(m)):m=i[f],m}var l={};function u(){for(var c=arguments.length,p=new Array(c),f=0;f{Object.values(l).forEach(c=>{c&&c.meta&&c.meta.recreateOnConfigChange&&s(c,{override:!0})})}),n.create=co.bind(null,e),n.factory=C,n.import(Object.values(dy(e))),n.ArgumentsError=Wr,n.DimensionError=Ve,n.IndexError=nr,n}var Ax=co(qs,{number:"Fraction"}),{multiply:Tz,divide:_a,fraction:Dr,add:wz}=Ax,oa=class{constructor(t){this._fxRateList={};this.ableToGetAllFXRate=!0;return t.sort().forEach(r=>{try{this.update(r)}catch(n){console.error(n,r)}}),this}get fxRateList(){return new Proxy(this._fxRateList,{get:function(r,n){let a=r[n];if(n=="CNY"&&!("CNY"in r)&&"CNH"in r&&(a=r.CNH),!!a)return new Proxy(a,{get:function(i,o){let l=i[o];return o=="CNY"&&!("CNY"in i)&&"CNH"in i&&(l=i.CNH),l}})}})}set fxRateList(t){this._fxRateList=t}async getfxRateList(t,r){return this.fxRateList[t][r]}async setfxRateList(t,r,n){this.fxRateList[t][r]=n}update(t){let{currency:r,unit:n}=t,{rate:a}=t,{from:i,to:o}=r;if(i=="RMB"&&(i="CNY"),o=="RMB"&&(o="CNY"),!(this.fxRateList[i]&&this.fxRateList[i][o]&&this.fxRateList[i][o].updated>t.updated)){if(!a.buy&&!a.sell&&!a.middle)throw console.log(t),new Error("Invalid FXRate");!a.buy&&!a.sell?a={buy:{cash:a.middle,remit:a.middle},sell:{cash:a.middle,remit:a.middle},middle:a.middle}:!a.buy&&a.sell?a.buy=a.sell:!a.sell&&a.buy&&(a.sell=a.buy),a.middle||(a.middle=_a(wz(Ax.min(a.buy.cash||1/0,a.buy.remit||1/0,a.sell.cash||1/0,a.sell.remit||1/0),Ax.max(a.buy.cash||-1/0,a.buy.remit||-1/0,a.sell.cash||-1/0,a.sell.remit||-1/0)),2)),this.fxRateList[i]||(this.fxRateList[i]={[i]:{cash:Dr(1),remit:Dr(1),middle:Dr(1),updated:new Date("1970-1-1 00:00:00 UTC")}}),this.fxRateList[i][o]={middle:_a(Dr(a.middle),n),updated:t.updated},this.fxRateList[o]||(this.fxRateList[o]={[o]:{cash:Dr(1),remit:Dr(1),middle:Dr(1),updated:new Date("1970-1-1 00:00:00 UTC")}}),this.fxRateList[o][i]={middle:_a(n,Dr(a.middle)),updated:t.updated},a.buy.cash&&(this.fxRateList[i][o].cash=_a(Dr(a.buy.cash),n)),a.sell.cash&&(this.fxRateList[o][i].cash=_a(n,Dr(a.sell.cash))),a.buy.remit&&(this.fxRateList[i][o].remit=_a(Dr(a.buy.remit),n)),a.sell.remit&&(this.fxRateList[o][i].remit=_a(n,Dr(a.sell.remit)))}}async convertDirect(t,r,n,a,i=!1){if(!(await this.getfxRateList(t,r))[n])throw new Error(`FX Path from ${t} to ${r} not support ${n} now`);return i?_a(Dr(a),(await this.fxRateList[t][r])[n]):Tz((await this.fxRateList[t][r])[n],Dr(a))}async getFXPath(t,r){let n={from:t,end:r,path:[]};if(t===r)return n.path.push(t),n;if(this.fxRateList[t][r])return n.path.push(r),n;if(!this.fxRateList[t]||!this.fxRateList[r])throw new Error("Invalid currency");let a=[],i=[];for(a.push({currency:t,path:[t]});a.length>0;){let{currency:o,path:l}=a.shift();if(i.push(o),o===r)return n.path=l,n;let u=Object.keys(this.fxRateList[o]);for(let s of u)i.includes(s)||a.push({currency:s,path:[...l,s]})}throw new Error("No FX path found between "+t+" and "+r)}async convert(t,r,n,a,i=!1){let o=await this.getFXPath(t,r);i&&(o.path=o.path.reverse());let l=t,u=Dr(a);try{for(let s of o.path)u=await this.convertDirect(l,s,n,u,i),l=s}catch(s){throw new Error(`Cannot convert from ${t} to ${r} with ${n}: -${s.message}`)}return u}async getUpdatedDate(t,r){if(!await this.fxRateList[t][r])throw new Error(`FX Path from ${t} to ${r} not found`);return(await this.fxRateList[t][r]).updated}};var Gs=Le(require("node:process"),1);var li=class e{static _object={jsonrpc:"2.0",id:null};patch={id:null};constructor(t){t&&(this.id=t)}get id(){return this.patch.id}set id(t){this.patch.id=t}toString(){return JSON.stringify(Object.assign({},e._object,this.patch))}get toJSON(){return()=>JSON.parse(this.toString())}};var lo=class extends li{constructor(t,r,n){super(t),r&&(this.method=r),n&&(this.params=n)}get method(){return this.patch.method}set method(t){this.patch.method=t}get params(){return this.patch.params}set params(t){this.patch.params=t}hasParams(){return this.params!==void 0}};var Ma=class extends li{constructor(t,r){super(t),r&&(this.result=r)}get result(){return this.patch.result}set result(t){this.patch.result=t}};var Pr=class e extends Ma{errorPatch={code:-32603,message:"Internal error"};constructor(t,r){super(t),r&&(this.errorPatch=r)}get result(){throw new Error("Error response should not have a result.")}set result(t){throw new Error("Error response should not have a result.")}get error(){return this.errorPatch}set error(t){this.errorPatch=t}get code(){return this.errorPatch.code}set code(t){this.errorPatch.code=t}get message(){return this.errorPatch.message}set message(t){this.errorPatch.message=t}get data(){return this.errorPatch.data}set data(t){this.errorPatch.data=t}hasErrorData(){return this.errorPatch.data!==void 0}toString(){return JSON.stringify(Object.assign({},e._object,{id:this.patch.id},{error:this.errorPatch}))}};var Dz=e=>async t=>{let r=t.params,n=new Ma,a;try{t.hasParams()?a=await e(r):a=await e()}catch(i){let o=new Pr;return t.id&&(o.id=t.id),o.code=-32603,o.message=i.message,o}if(a instanceof Ma)n=a;else if(a instanceof Object&&Object.keys(a).includes("code")&&Object.keys(a).includes("message")){let i=new Pr;i.code=a.code,i.message=a.message,a.data&&(i.data=a.data)}else a?n.result=a:n.result=null;return t.id&&(n.id=t.id),n},Nx=Dz;var RM=e=>{e.headers.set("Content-Type","application/json; charset=utf-8"),e.status=200},Hs=class extends Pn{rpcHandlers={};constructor(t=[],r){if(super(t),r)for(var n in r)this.register(n,r[n])}register(t,r,n=!1){if(t.startsWith("rpc.")&&!n)throw new Error('Method names starting with "rpc." are reserved for internal use');this.rpcHandlers[t]=r}enableList(){return this.register("rpc.list",async()=>Object.keys(this.rpcHandlers),!0),this}_v2RPCsingleResponder=async t=>{let r;if(t.jsonrpc!=="2.0")r=new Pr(t.id??null,{code:-32600,message:"Invalid Request",data:"JSONRPC version must be 2.0"});else if(!t.method)r=new Pr(t.id??null,{code:-32600,message:"Invalid Request",data:"JSONRPC method must be specified"});else if(typeof t.method!="string")r=new Pr(t.id??null,{code:-32600,message:"Invalid Request",data:"JSONRPC method must be a string"});else{let n=new lo;n.id=t.id??null,n.method=t.method,t.params&&(n.params=t.params),Object.keys(this.rpcHandlers).includes(n.method)?r=await Nx(this.rpcHandlers[n.method])(n):r=new Pr(n.id,{code:-32601,message:"Method not found",data:`Method ${n.method} not found`})}if(t.id||r instanceof Pr)return r};v2RPCresponder=async(t,r)=>{r||(r=new Ct(""));let n=t.query.get("content")??t.body,a,i=[];try{a=JSON.parse(n)}catch(o){let l=new Pr(null,{code:-32700,message:"Parse error",data:o.message});return r.body=l.toString(),RM(r),r}if(a instanceof Array)i=(await Promise.all(a.map(async o=>this._v2RPCsingleResponder(o)))).filter(o=>o!==void 0);else{let o=await this._v2RPCsingleResponder(a);o&&i.push(o)}return i.length>1?r.body=JSON.stringify(i):i.length==1&&(r.body=JSON.stringify(i[0])),RM(r),r};mountJSONRPC(t=["/jsonrpc","/jsonrpc/v2"]){return t.forEach(r=>this.binding(r,new lr("ANY",[this.v2RPCresponder]))),this}mount=this.mountJSONRPC};var op=e=>{e.status=200,e.headers.set("Date",new Date().toUTCString()),Gs.default.env.ENABLE_CORS&&(e.headers.set("Access-Control-Allow-Origin",Gs.default.env.CORS_ORIGIN||"*"),e.headers.set("Access-Control-Allow-Methods","GET, POST, OPTIONS"),e.headers.set("Allow","GET, POST, OPTIONS"),e.headers.set("Access-Control-Expose-Headers","Date, X-License, X-Author, X-Powered-By"))},Oa=async(e,t)=>{let r=await t.respond(new Tr("GET",new URL(`http://this.internal/${e}`),new Xu.headers({}),"",{})).catch(n=>n);try{return JSON.parse(r.body)}catch{if(!(r instanceof Ct))throw new Error(r);return r}},IM=e=>{if(e instanceof Array)return e.sort();if(typeof e!="object")return e;let t=Object.keys(e).sort(),r={};for(let n of t)r[n]=IM(e[n]);return r},zs=(e,t)=>{op(e);let r=JSON.parse(e.body),n=IM(r);e.body=JSON.stringify(n),(t.query.has("pretty")||t.headers.get("Sec-Fetch-Dest")==="document")&&(e.body=JSON.stringify(n,null,4)),e.headers.set("Content-type","application/json; charset=utf-8")},BM=async(e,t,r,n,a,i=100,o=0)=>{let l=await n.convert(e,t,r,Number(a.query.get("amount"))||i||100,a.query.has("reverse"));return l=ks(l,1+(Number(a.query.get("fees"))||o)/100),l=Number(a.query.get("precision"))!==-1?ip(l,Number(a.query.get("precision"))||5):l,Number(l.toString())||l.toString()},FM=async(e,t,r,n)=>{let a={updated:(await r.getUpdatedDate(e,t)).toUTCString()};for(let i of["cash","remit","middle"])try{a[i]=await BM(e,t,i,r,n)}catch{a[i]=!1}return a},Tx=class extends Hs{constructor(r){super();this.fxms={};this.fxmStatus={};this.fxRateGetter={};this.intervalIDs={};this.rpcHandlers={instanceInfo:()=>Oa("info",this),listCurrencies:({source:r})=>{if(!r)throw new Error("source is required.");return Oa(`${r}/`,this).then(n=>new Object({currency:n.currency,date:n.date}))},listFXRates:({source:r,from:n,precision:a=2,amount:i=100,fees:o=0,reverse:l=!1})=>{if(!r)throw new Error("source is required.");if(!n)throw new Error("from is required.");return Oa(`${r}/${n}?precision=${a}&amount=${i}&fees=${o}${l?"&reverse":""}`,this)},getFXRate:({source:r,from:n,to:a,type:i,precision:o=2,amount:l=100,fees:u=0,reverse:s=!1})=>{if(!r)throw new Error("source is required.");if(!n)throw new Error("from is required.");if(!a)throw new Error("to is required.");if(!i)throw new Error("type is required.");return i=="all"&&(i=""),Oa(`${r}/${n}/${a}/${i}?precision=${o}&fees=${u}${s?"&reverse":""}&amount=${l}`,this)}};for(let n in r)this.registerGetter(n,r[n]);this.binding("/info",this.create("GET",async n=>{let a=new Ct("",200);return a.body=JSON.stringify({status:"ok",sources:Object.keys(this.fxms),version:"fxrate@b71999b 2025-01-05T23:34:37+08:00",apiVersion:"v1",environment:Gs.default.env.NODE_ENV||"development"}),zs(a,n),a})),this.enableList().mount(),this.log("JSONRPC is mounted.")}log(r){Gs.default.env.LOG_LEVEL!=="error"&&setTimeout(()=>{console.log(`[${new Date().toUTCString()}] [fxmManager] ${r}`)},0)}has(r){return this.fxms[r]!==void 0}async updateFXManager(r){if(!this.has(r))throw new Error("Source not found");this.log(`${r} is updating...`),(await this.fxRateGetter[r](this)).forEach(a=>this.fxms[r].update(a)),this.fxmStatus[r]="ready",this.intervalIDs[r].refreshDate=new Date,this.log(`${r} is updated, now is ready.`)}async requestFXManager(r){return this.fxmStatus[r]==="pending"&&await this.updateFXManager(r),this.fxms[r]}registerGetter(r,n){this.fxms[r]=new oa([]),this.fxRateGetter[r]=n,this.fxmStatus[r]="pending",this.mountFXMRouter(r),this.log(`Registered ${r}.`);let a=new Date;this.intervalIDs[r]={timeout:setInterval(()=>this.updateFXManager(r),1e3*60*30),refreshDate:a}}registerFXM(r,n){this.fxms[r]=n,this.fxmStatus[r]="ready",this.mountFXMRouter(r),this.log(`Registered ${r}.`)}mountFXMRouter(r){this.use([this.getFXMRouter(r)],`/${r}/(.*)`),this.use([this.getFXMRouter(r)],`/${r}`)}getFXMRouter(r){let n=new Pn,a=s=>{s.headers.set("Cache-Control",`public, max-age=${30*60-Math.round(Math.abs(((this.intervalIDs[r]??{refreshDate:new Date}).refreshDate.getTime()-new Date().getTime())/1e3)%1800)}`)},i=async(s,c)=>{if(s.params[0]&&s.params[0]!=r)return c;throw c.body=JSON.stringify({status:"ok",source:r,currency:Object.keys((await this.requestFXManager(r)).fxRateList).sort(),date:new Date().toUTCString()}),zs(c,s),a(c),c},o=async(s,c)=>{s.params.from&&(s.params.from=s.params.from.toUpperCase());let{from:p}=s.params,f={};if(!(await this.requestFXManager(r)).ableToGetAllFXRate)return c.status=403,f.status="error",f.message=`Not able to get all FX rate with ${p} on ${r}`,c.body=JSON.stringify(f),zs(c,s),c;for(let m in(await this.requestFXManager(r)).fxRateList[p])m!=p&&(f[m]=await FM(p,m,await this.requestFXManager(r),s));return c.body=JSON.stringify(f),zs(c,s),a(c),c},l=async(s,c)=>{s.params.from&&(s.params.from=s.params.from.toUpperCase()),s.params.to&&(s.params.to=s.params.to.toUpperCase());let{from:p,to:f}=s.params,m=await FM(p,f,await this.requestFXManager(r),s);return c.body=JSON.stringify(m),zs(c,s),c.headers.set("Date",(await(await this.requestFXManager(r)).getUpdatedDate(p,f)).toUTCString()),a(c),c},u=async(s,c)=>{s.params.from&&(s.params.from=s.params.from.toUpperCase()),s.params.to&&(s.params.to=s.params.to.toUpperCase());let{from:p,to:f,type:m,amount:h}=s.params,d=await BM(p,f,m,await this.requestFXManager(r),s,Number(h));return c.body=d.toString(),op(c),c.headers.set("Date",(await(await this.requestFXManager(r)).getUpdatedDate(p,f)).toUTCString()),a(c),c};return n.binding("/",new lr("GET",[i])),n.binding("/:from",new lr("GET",[i,o])),n.binding("/:from/:to",new lr("GET",[l])),n.binding("/:from/:to/:type",new lr("GET",[u])),n.binding("/:from/:to/:type/:amount",new lr("GET",[u])),n}stopAllInterval(){for(let r in this.intervalIDs)clearInterval(this.intervalIDs[r].timeout)}},LM=Tx;function Ys(e,t){return function(){return e.apply(t,arguments)}}var{toString:Cz}=Object.prototype,{getPrototypeOf:Sx}=Object,up=(e=>t=>{let r=Cz.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),_n=e=>(e=e.toLowerCase(),t=>up(t)===e),cp=e=>t=>typeof t===e,{isArray:po}=Array,js=cp("undefined");function _z(e){return e!==null&&!js(e)&&e.constructor!==null&&!js(e.constructor)&&Jr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var kM=_n("ArrayBuffer");function Mz(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kM(e.buffer),t}var Oz=cp("string"),Jr=cp("function"),qM=cp("number"),lp=e=>e!==null&&typeof e=="object",Rz=e=>e===!0||e===!1,sp=e=>{if(up(e)!=="object")return!1;let t=Sx(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Fz=_n("Date"),Iz=_n("File"),Bz=_n("Blob"),Lz=_n("FileList"),Pz=e=>lp(e)&&Jr(e.pipe),Uz=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Jr(e.append)&&((t=up(e))==="formdata"||t==="object"&&Jr(e.toString)&&e.toString()==="[object FormData]"))},kz=_n("URLSearchParams"),[qz,Hz,zz,Gz]=["ReadableStream","Request","Response","Headers"].map(_n),Yz=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vs(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),po(e))for(n=0,a=e.length;n0;)if(a=r[n],t===a.toLowerCase())return a;return null}var pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zM=e=>!js(e)&&e!==pi;function Dx(){let{caseless:e}=zM(this)&&this||{},t={},r=(n,a)=>{let i=e&&HM(t,a)||a;sp(t[i])&&sp(n)?t[i]=Dx(t[i],n):sp(n)?t[i]=Dx({},n):po(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n(Vs(t,(a,i)=>{r&&Jr(a)?e[i]=Ys(a,r):e[i]=a},{allOwnKeys:n}),e),Vz=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$z=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Xz=(e,t,r,n)=>{let a,i,o,l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&Sx(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Kz=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},Wz=e=>{if(!e)return null;if(po(e))return e;let t=e.length;if(!qM(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Qz=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Sx(Uint8Array)),Zz=(e,t)=>{let n=(e&&e[Symbol.iterator]).call(e),a;for(;(a=n.next())&&!a.done;){let i=a.value;t.call(e,i[0],i[1])}},Jz=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},eG=_n("HTMLFormElement"),tG=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),PM=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),rG=_n("RegExp"),GM=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};Vs(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},nG=e=>{GM(e,(t,r)=>{if(Jr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(Jr(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},aG=(e,t)=>{let r={},n=a=>{a.forEach(i=>{r[i]=!0})};return po(e)?n(e):n(String(e).split(t)),r},iG=()=>{},oG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,wx="abcdefghijklmnopqrstuvwxyz",UM="0123456789",YM={DIGIT:UM,ALPHA:wx,ALPHA_DIGIT:wx+wx.toUpperCase()+UM},sG=(e=16,t=YM.ALPHA_DIGIT)=>{let r="",{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function uG(e){return!!(e&&Jr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var cG=e=>{let t=new Array(10),r=(n,a)=>{if(lp(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;let i=po(n)?[]:{};return Vs(n,(o,l)=>{let u=r(o,a+1);!js(u)&&(i[l]=u)}),t[a]=void 0,i}}return n};return r(e,0)},lG=_n("AsyncFunction"),pG=e=>e&&(lp(e)||Jr(e))&&Jr(e.then)&&Jr(e.catch),jM=((e,t)=>e?setImmediate:t?((r,n)=>(pi.addEventListener("message",({source:a,data:i})=>{a===pi&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),pi.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Jr(pi.postMessage)),fG=typeof queueMicrotask<"u"?queueMicrotask.bind(pi):typeof process<"u"&&process.nextTick||jM,ie={isArray:po,isArrayBuffer:kM,isBuffer:_z,isFormData:Uz,isArrayBufferView:Mz,isString:Oz,isNumber:qM,isBoolean:Rz,isObject:lp,isPlainObject:sp,isReadableStream:qz,isRequest:Hz,isResponse:zz,isHeaders:Gz,isUndefined:js,isDate:Fz,isFile:Iz,isBlob:Bz,isRegExp:rG,isFunction:Jr,isStream:Pz,isURLSearchParams:kz,isTypedArray:Qz,isFileList:Lz,forEach:Vs,merge:Dx,extend:jz,trim:Yz,stripBOM:Vz,inherits:$z,toFlatObject:Xz,kindOf:up,kindOfTest:_n,endsWith:Kz,toArray:Wz,forEachEntry:Zz,matchAll:Jz,isHTMLForm:eG,hasOwnProperty:PM,hasOwnProp:PM,reduceDescriptors:GM,freezeMethods:nG,toObjectSet:aG,toCamelCase:tG,noop:iG,toFiniteNumber:oG,findKey:HM,global:pi,isContextDefined:zM,ALPHABET:YM,generateString:sG,isSpecCompliantForm:uG,toJSONObject:cG,isAsyncFn:lG,isThenable:pG,setImmediate:jM,asap:fG};function fo(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a)}ie.inherits(fo,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var VM=fo.prototype,$M={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$M[e]={value:e}});Object.defineProperties(fo,$M);Object.defineProperty(VM,"isAxiosError",{value:!0});fo.from=(e,t,r,n,a,i)=>{let o=Object.create(VM);return ie.toFlatObject(e,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),fo.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};var ke=fo;var _O=Le(CO(),1),mp=_O.default;function Ux(e){return ie.isPlainObject(e)||ie.isArray(e)}function OO(e){return ie.endsWith(e,"[]")?e.slice(0,-2):e}function MO(e,t,r){return e?e.concat(t).map(function(a,i){return a=OO(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function KG(e){return ie.isArray(e)&&!e.some(Ux)}var WG=ie.toFlatObject(ie,{},null,function(t){return/^is[A-Z]/.test(t)});function QG(e,t,r){if(!ie.isObject(e))throw new TypeError("target must be an object");t=t||new(mp||FormData),r=ie.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,v){return!ie.isUndefined(v[d])});let n=r.metaTokens,a=r.visitor||c,i=r.dots,o=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&ie.isSpecCompliantForm(t);if(!ie.isFunction(a))throw new TypeError("visitor must be a function");function s(h){if(h===null)return"";if(ie.isDate(h))return h.toISOString();if(!u&&ie.isBlob(h))throw new ke("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(h)||ie.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,d,v){let x=h;if(h&&!v&&typeof h=="object"){if(ie.endsWith(d,"{}"))d=n?d:d.slice(0,-2),h=JSON.stringify(h);else if(ie.isArray(h)&&KG(h)||(ie.isFileList(h)||ie.endsWith(d,"[]"))&&(x=ie.toArray(h)))return d=OO(d),x.forEach(function(g,y){!(ie.isUndefined(g)||g===null)&&t.append(o===!0?MO([d],y,i):o===null?d:d+"[]",s(g))}),!1}return Ux(h)?!0:(t.append(MO(v,d,i),s(h)),!1)}let p=[],f=Object.assign(WG,{defaultVisitor:c,convertValue:s,isVisitable:Ux});function m(h,d){if(!ie.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+d.join("."));p.push(h),ie.forEach(h,function(x,N){(!(ie.isUndefined(x)||x===null)&&a.call(t,x,ie.isString(N)?N.trim():N,d,f))===!0&&m(x,d?d.concat(N):[N])}),p.pop()}}if(!ie.isObject(e))throw new TypeError("data must be an object");return m(e),t}var Ra=QG;function RO(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function FO(e,t){this._pairs=[],e&&Ra(e,this,t)}var IO=FO.prototype;IO.append=function(t,r){this._pairs.push([t,r])};IO.toString=function(t){let r=t?function(n){return t.call(this,n,RO)}:RO;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};var BO=FO;function ZG(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fi(e,t,r){if(!t)return e;let n=r&&r.encode||ZG,a=r&&r.serialize,i;if(a?i=a(t,r):i=ie.isURLSearchParams(t)?t.toString():new BO(t,r).toString(n),i){let o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var kx=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ie.forEach(this.handlers,function(n){n!==null&&t(n)})}},qx=kx;var mo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var LO=Le(require("url"),1),PO=LO.default.URLSearchParams;var UO={isNode:!0,classes:{URLSearchParams:PO,FormData:mp,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var zx={};on(zx,{hasBrowserEnv:()=>Hx,hasStandardBrowserEnv:()=>JG,hasStandardBrowserWebWorkerEnv:()=>eY,origin:()=>tY});var Hx=typeof window<"u"&&typeof document<"u",JG=(e=>Hx&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),eY=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tY=Hx&&window.location.href||"http://localhost";var Ht={...zx,...UO};function Gx(e,t){return Ra(e,new Ht.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return Ht.isNode&&ie.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function rY(e){return ie.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nY(e){let t={},r=Object.keys(e),n,a=r.length,i;for(n=0;n=r.length;return o=!o&&ie.isArray(a)?a.length:o,u?(ie.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!l):((!a[o]||!ie.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&ie.isArray(a[o])&&(a[o]=nY(a[o])),!l)}if(ie.isFormData(e)&&ie.isFunction(e.entries)){let r={};return ie.forEachEntry(e,(n,a)=>{t(rY(n),a,r,0)}),r}return null}var dp=aY;function iY(e,t,r){if(ie.isString(e))try{return(t||JSON.parse)(e),ie.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var Yx={transitional:mo,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=ie.isObject(t);if(i&&ie.isHTMLForm(t)&&(t=new FormData(t)),ie.isFormData(t))return a?JSON.stringify(dp(t)):t;if(ie.isArrayBuffer(t)||ie.isBuffer(t)||ie.isStream(t)||ie.isFile(t)||ie.isBlob(t)||ie.isReadableStream(t))return t;if(ie.isArrayBufferView(t))return t.buffer;if(ie.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Gx(t,this.formSerializer).toString();if((l=ie.isFileList(t))||n.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return Ra(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),iY(t)):t}],transformResponse:[function(t){let r=this.transitional||Yx.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(ie.isResponse(t)||ie.isReadableStream(t))return t;if(t&&ie.isString(t)&&(n&&!this.responseType||a)){let o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(o)throw l.name==="SyntaxError"?ke.from(l,ke.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ht.classes.FormData,Blob:Ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],e=>{Yx.headers[e]={}});var ho=Yx;var oY=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kO=e=>{let t={},r,n,a;return e&&e.split(` -`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&oY[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var qO=Symbol("internals");function $s(e){return e&&String(e).trim().toLowerCase()}function hp(e){return e===!1||e==null?e:ie.isArray(e)?e.map(hp):String(e)}function sY(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var uY=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function jx(e,t,r,n,a){if(ie.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!ie.isString(t)){if(ie.isString(n))return t.indexOf(n)!==-1;if(ie.isRegExp(n))return n.test(t)}}function cY(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function lY(e,t){let r=ie.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}var vo=class{constructor(t){t&&this.set(t)}set(t,r,n){let a=this;function i(l,u,s){let c=$s(u);if(!c)throw new Error("header name must be a non-empty string");let p=ie.findKey(a,c);(!p||a[p]===void 0||s===!0||s===void 0&&a[p]!==!1)&&(a[p||u]=hp(l))}let o=(l,u)=>ie.forEach(l,(s,c)=>i(s,c,u));if(ie.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(ie.isString(t)&&(t=t.trim())&&!uY(t))o(kO(t),r);else if(ie.isHeaders(t))for(let[l,u]of t.entries())i(u,l,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=$s(t),t){let n=ie.findKey(this,t);if(n){let a=this[n];if(!r)return a;if(r===!0)return sY(a);if(ie.isFunction(r))return r.call(this,a,n);if(ie.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=$s(t),t){let n=ie.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||jx(this,this[n],n,r)))}return!1}delete(t,r){let n=this,a=!1;function i(o){if(o=$s(o),o){let l=ie.findKey(n,o);l&&(!r||jx(n,n[l],l,r))&&(delete n[l],a=!0)}}return ie.isArray(t)?t.forEach(i):i(t),a}clear(t){let r=Object.keys(this),n=r.length,a=!1;for(;n--;){let i=r[n];(!t||jx(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){let r=this,n={};return ie.forEach(this,(a,i)=>{let o=ie.findKey(n,i);if(o){r[o]=hp(a),delete r[i];return}let l=t?cY(i):String(i).trim();l!==i&&delete r[i],r[l]=hp(a),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return ie.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&ie.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){let n=(this[qO]=this[qO]={accessors:{}}).accessors,a=this.prototype;function i(o){let l=$s(o);n[l]||(lY(a,o),n[l]=!0)}return ie.isArray(t)?t.forEach(i):i(t),this}};vo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ie.reduceDescriptors(vo.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});ie.freezeMethods(vo);var zt=vo;function Xs(e,t){let r=this||ho,n=t||r,a=zt.from(n.headers),i=n.data;return ie.forEach(e,function(l){i=l.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function Ks(e){return!!(e&&e.__CANCEL__)}function HO(e,t,r){ke.call(this,e??"canceled",ke.ERR_CANCELED,t,r),this.name="CanceledError"}ie.inherits(HO,ke,{__CANCEL__:!0});var en=HO;function Vn(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ke("Request failed with status code "+r.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Vx(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $x(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function mi(e,t){return e&&!Vx(t)?$x(e,t):t}var TR=Le(GO(),1),wR=Le(require("http"),1),DR=Le(require("https"),1),SR=Le(require("util"),1),CR=Le(uR(),1),ua=Le(require("zlib"),1);var vi="1.7.4";function tu(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var KY=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function lb(e,t,r){let n=r&&r.Blob||Ht.classes.Blob,a=tu(e);if(t===void 0&&n&&(t=!0),a==="data"){e=a.length?e.slice(a.length+1):e;let i=KY.exec(e);if(!i)throw new ke("Invalid URL",ke.ERR_INVALID_URL);let o=i[1],l=i[2],u=i[3],s=Buffer.from(decodeURIComponent(u),l?"base64":"utf8");if(t){if(!n)throw new ke("Blob is not supported",ke.ERR_NOT_SUPPORT);return new n([s],{type:o})}return s}throw new ke("Unsupported protocol "+a,ke.ERR_NOT_SUPPORT)}var gi=Le(require("stream"),1);var cR=Le(require("stream"),1);var pb=Symbol("internals"),fb=class extends cR.default.Transform{constructor(t){t=ie.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,a)=>!ie.isUndefined(a[n])),super({readableHighWaterMark:t.chunkSize});let r=this[pb]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(t){let r=this[pb];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,n){let a=this[pb],i=a.maxRate,o=this.readableHighWaterMark,l=a.timeWindow,u=1e3/l,s=i/u,c=a.minChunkSize!==!1?Math.max(a.minChunkSize,s*.01):0,p=(m,h)=>{let d=Buffer.byteLength(m);a.bytesSeen+=d,a.bytes+=d,a.isCaptured&&this.emit("progress",a.bytesSeen),this.push(m)?process.nextTick(h):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(h)}},f=(m,h)=>{let d=Buffer.byteLength(m),v=null,x=o,N,g=0;if(i){let y=Date.now();(!a.ts||(g=y-a.ts)>=l)&&(a.ts=y,N=s-a.bytes,a.bytes=N<0?-N:0,g=0),N=s-a.bytes}if(i){if(N<=0)return setTimeout(()=>{h(null,m)},l-g);Nx&&d-x>c&&(v=m.subarray(x),m=m.subarray(0,x)),p(m,v?()=>{process.nextTick(h,null,v)}:h)};f(t,function m(h,d){if(h)return n(h);d?f(d,m):n(null)})}},mb=fb;var _R=require("events");var pR=require("util"),fR=require("stream");var{asyncIterator:lR}=Symbol,WY=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[lR]?yield*e[lR]():yield e},yp=WY;var QY=ie.ALPHABET.ALPHA_DIGIT+"-_",ru=new pR.TextEncoder,Ia=`\r -`,ZY=ru.encode(Ia),JY=2,db=class{constructor(t,r){let{escapeName:n}=this.constructor,a=ie.isString(r),i=`Content-Disposition: form-data; name="${n(t)}"${!a&&r.name?`; filename="${n(r.name)}"`:""}${Ia}`;a?r=ru.encode(String(r).replace(/\r?\n|\r\n?/g,Ia)):i+=`Content-Type: ${r.type||"application/octet-stream"}${Ia}`,this.headers=ru.encode(i+Ia),this.contentLength=a?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+JY,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;ie.isTypedArray(t)?yield t:yield*yp(t),yield ZY}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},ej=(e,t,r)=>{let{tag:n="form-data-boundary",size:a=25,boundary:i=n+"-"+ie.generateString(a,QY)}=r||{};if(!ie.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let o=ru.encode("--"+i+Ia),l=ru.encode("--"+i+"--"+Ia+Ia),u=l.byteLength,s=Array.from(e.entries()).map(([p,f])=>{let m=new db(p,f);return u+=m.size,m});u+=o.byteLength*s.length,u=ie.toFiniteNumber(u);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(c["Content-Length"]=u),t&&t(c),fR.Readable.from(async function*(){for(let p of s)yield o,yield*p.encode();yield l}())},mR=ej;var dR=Le(require("stream"),1),hb=class extends dR.default.Transform{__transform(t,r,n){this.push(t),n()}_transform(t,r,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let a=Buffer.alloc(2);a[0]=120,a[1]=156,this.push(a,r)}this.__transform(t,r,n)}},hR=hb;var tj=(e,t)=>ie.isAsyncFn(e)?function(...r){let n=r.pop();e.apply(this,r).then(a=>{try{t?n(null,...t(a)):n(null,a)}catch(i){n(i)}},n)}:e,vR=tj;function rj(e,t){e=e||10;let r=new Array(e),n=new Array(e),a=0,i=0,o;return t=t!==void 0?t:1e3,function(u){let s=Date.now(),c=n[i];o||(o=s),r[a]=u,n[a]=s;let p=i,f=0;for(;p!==a;)f+=r[p++],p=p%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),s-o{r=c,a=null,i&&(clearTimeout(i),i=null),e.apply(null,s)};return[(...s)=>{let c=Date.now(),p=c-r;p>=n?o(s,c):(a=s,i||(i=setTimeout(()=>{i=null,o(a)},n-p)))},()=>a&&o(a)]}var xR=nj;var sa=(e,t,r=3)=>{let n=0,a=gR(50,250);return xR(i=>{let o=i.loaded,l=i.lengthComputable?i.total:void 0,u=o-n,s=a(u),c=o<=l;n=o;let p={loaded:o,total:l,progress:l?o/l:void 0,bytes:u,rate:s||void 0,estimated:s&&l&&c?(l-o)/s:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},r)},Eo=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Ao=e=>(...t)=>ie.asap(()=>e(...t));var bR={flush:ua.default.constants.Z_SYNC_FLUSH,finishFlush:ua.default.constants.Z_SYNC_FLUSH},aj={flush:ua.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ua.default.constants.BROTLI_OPERATION_FLUSH},yR=ie.isFunction(ua.default.createBrotliDecompress),{http:ij,https:oj}=CR.default,sj=/https:?/,ER=Ht.protocols.map(e=>e+":"),AR=(e,[t,r])=>(e.on("end",r).on("error",r),t);function uj(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function MR(e,t,r){let n=t;if(!n&&n!==!1){let a=(0,TR.getProxyForUrl)(r);a&&(n=new URL(a))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let i=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+i}e.headers.host=e.hostname+(e.port?":"+e.port:"");let a=n.hostname||n.host;e.hostname=a,e.host=a,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(i){MR(i,t,i.href)}}var cj=typeof process<"u"&&ie.kindOf(process)==="process",lj=e=>new Promise((t,r)=>{let n,a,i=(u,s)=>{a||(a=!0,n&&n(u,s))},o=u=>{i(u),t(u)},l=u=>{i(u,!0),r(u)};e(o,l,u=>n=u).catch(l)}),pj=({address:e,family:t})=>{if(!ie.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},NR=(e,t)=>pj(ie.isObject(e)?e:{address:e,family:t}),OR=cj&&function(t){return lj(async function(n,a,i){let{data:o,lookup:l,family:u}=t,{responseType:s,responseEncoding:c}=t,p=t.method.toUpperCase(),f,m=!1,h;if(l){let _=vR(l,q=>ie.isArray(q)?q:[q]);l=(q,B,Z)=>{_(q,B,(te,Q,z)=>{if(te)return Z(te);let re=ie.isArray(Q)?Q.map(fe=>NR(fe)):[NR(Q,z)];B.all?Z(te,re):Z(te,re[0].address,re[0].family)})}}let d=new _R.EventEmitter,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(x),t.signal&&t.signal.removeEventListener("abort",x),d.removeAllListeners()};i((_,q)=>{f=!0,q&&(m=!0,v())});function x(_){d.emit("abort",!_||_.type?new en(null,t,h):_)}d.once("abort",a),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(x),t.signal&&(t.signal.aborted?x():t.signal.addEventListener("abort",x)));let N=mi(t.baseURL,t.url),g=new URL(N,ie.hasBrowserEnv?Ht.origin:void 0),y=g.protocol||ER[0];if(y==="data:"){let _;if(p!=="GET")return Vn(n,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{_=lb(t.url,s==="blob",{Blob:t.env&&t.env.Blob})}catch(q){throw ke.from(q,ke.ERR_BAD_REQUEST,t)}return s==="text"?(_=_.toString(c),(!c||c==="utf8")&&(_=ie.stripBOM(_))):s==="stream"&&(_=gi.default.Readable.from(_)),Vn(n,a,{data:_,status:200,statusText:"OK",headers:new zt,config:t})}if(ER.indexOf(y)===-1)return a(new ke("Unsupported protocol "+y,ke.ERR_BAD_REQUEST,t));let E=zt.from(t.headers).normalize();E.set("User-Agent","axios/"+vi,!1);let{onUploadProgress:b,onDownloadProgress:S}=t,A=t.maxRate,w,D;if(ie.isSpecCompliantForm(o)){let _=E.getContentType(/boundary=([-_\w\d]{10,70})/i);o=mR(o,q=>{E.set(q)},{tag:`axios-${vi}-boundary`,boundary:_&&_[1]||void 0})}else if(ie.isFormData(o)&&ie.isFunction(o.getHeaders)){if(E.set(o.getHeaders()),!E.hasContentLength())try{let _=await SR.default.promisify(o.getLength).call(o);Number.isFinite(_)&&_>=0&&E.setContentLength(_)}catch{}}else if(ie.isBlob(o))o.size&&E.setContentType(o.type||"application/octet-stream"),E.setContentLength(o.size||0),o=gi.default.Readable.from(yp(o));else if(o&&!ie.isStream(o)){if(!Buffer.isBuffer(o))if(ie.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(ie.isString(o))o=Buffer.from(o,"utf-8");else return a(new ke("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",ke.ERR_BAD_REQUEST,t));if(E.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return a(new ke("Request body larger than maxBodyLength limit",ke.ERR_BAD_REQUEST,t))}let F=ie.toFiniteNumber(E.getContentLength());ie.isArray(A)?(w=A[0],D=A[1]):w=D=A,o&&(b||w)&&(ie.isStream(o)||(o=gi.default.Readable.from(o,{objectMode:!1})),o=gi.default.pipeline([o,new mb({maxRate:ie.toFiniteNumber(w)})],ie.noop),b&&o.on("progress",AR(o,Eo(F,sa(Ao(b),!1,3)))));let R;if(t.auth){let _=t.auth.username||"",q=t.auth.password||"";R=_+":"+q}if(!R&&g.username){let _=g.username,q=g.password;R=_+":"+q}R&&E.delete("authorization");let P;try{P=fi(g.pathname+g.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(_){let q=new Error(_.message);return q.config=t,q.url=t.url,q.exists=!0,a(q)}E.set("Accept-Encoding","gzip, compress, deflate"+(yR?", br":""),!1);let U={path:P,method:p,headers:E.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:R,protocol:y,family:u,beforeRedirect:uj,beforeRedirects:{}};!ie.isUndefined(l)&&(U.lookup=l),t.socketPath?U.socketPath=t.socketPath:(U.hostname=g.hostname,U.port=g.port,MR(U,t.proxy,y+"//"+g.hostname+(g.port?":"+g.port:"")+U.path));let k,M=sj.test(U.protocol);if(U.agent=M?t.httpsAgent:t.httpAgent,t.transport?k=t.transport:t.maxRedirects===0?k=M?DR.default:wR.default:(t.maxRedirects&&(U.maxRedirects=t.maxRedirects),t.beforeRedirect&&(U.beforeRedirects.config=t.beforeRedirect),k=M?oj:ij),t.maxBodyLength>-1?U.maxBodyLength=t.maxBodyLength:U.maxBodyLength=1/0,t.insecureHTTPParser&&(U.insecureHTTPParser=t.insecureHTTPParser),h=k.request(U,function(q){if(h.destroyed)return;let B=[q],Z=+q.headers["content-length"];if(S||D){let fe=new mb({maxRate:ie.toFiniteNumber(D)});S&&fe.on("progress",AR(fe,Eo(Z,sa(Ao(S),!0,3)))),B.push(fe)}let te=q,Q=q.req||h;if(t.decompress!==!1&&q.headers["content-encoding"])switch((p==="HEAD"||q.statusCode===204)&&delete q.headers["content-encoding"],(q.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":B.push(ua.default.createUnzip(bR)),delete q.headers["content-encoding"];break;case"deflate":B.push(new hR),B.push(ua.default.createUnzip(bR)),delete q.headers["content-encoding"];break;case"br":yR&&(B.push(ua.default.createBrotliDecompress(aj)),delete q.headers["content-encoding"])}te=B.length>1?gi.default.pipeline(B,ie.noop):B[0];let z=gi.default.finished(te,()=>{z(),v()}),re={status:q.statusCode,statusText:q.statusMessage,headers:new zt(q.headers),config:t,request:Q};if(s==="stream")re.data=te,Vn(n,a,re);else{let fe=[],L=0;te.on("data",function($){fe.push($),L+=$.length,t.maxContentLength>-1&&L>t.maxContentLength&&(m=!0,te.destroy(),a(new ke("maxContentLength size of "+t.maxContentLength+" exceeded",ke.ERR_BAD_RESPONSE,t,Q)))}),te.on("aborted",function(){if(m)return;let $=new ke("maxContentLength size of "+t.maxContentLength+" exceeded",ke.ERR_BAD_RESPONSE,t,Q);te.destroy($),a($)}),te.on("error",function($){h.destroyed||a(ke.from($,null,t,Q))}),te.on("end",function(){try{let $=fe.length===1?fe[0]:Buffer.concat(fe);s!=="arraybuffer"&&($=$.toString(c),(!c||c==="utf8")&&($=ie.stripBOM($))),re.data=$}catch($){return a(ke.from($,null,t,re.request,re))}Vn(n,a,re)})}d.once("abort",fe=>{te.destroyed||(te.emit("error",fe),te.destroy())})}),d.once("abort",_=>{a(_),h.destroy(_)}),h.on("error",function(q){a(ke.from(q,null,t,h))}),h.on("socket",function(q){q.setKeepAlive(!0,1e3*60)}),t.timeout){let _=parseInt(t.timeout,10);if(Number.isNaN(_)){a(new ke("error trying to parse `config.timeout` to int",ke.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(_,function(){if(f)return;let B=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Z=t.transitional||mo;t.timeoutErrorMessage&&(B=t.timeoutErrorMessage),a(new ke(B,Z.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,t,h)),x()})}if(ie.isStream(o)){let _=!1,q=!1;o.on("end",()=>{_=!0}),o.once("error",B=>{q=!0,h.destroy(B)}),o.on("close",()=>{!_&&!q&&x(new en("Request stream has been aborted",t,h))}),o.pipe(h)}else h.end(o)})};var RR=Ht.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){let l=ie.isString(o)?a(o):o;return l.protocol===n.protocol&&l.host===n.host}}():function(){return function(){return!0}}();var FR=Ht.hasStandardBrowserEnv?{write(e,t,r,n,a,i){let o=[e+"="+encodeURIComponent(t)];ie.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),ie.isString(n)&&o.push("path="+n),ie.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var IR=e=>e instanceof zt?{...e}:e;function On(e,t){t=t||{};let r={};function n(s,c,p){return ie.isPlainObject(s)&&ie.isPlainObject(c)?ie.merge.call({caseless:p},s,c):ie.isPlainObject(c)?ie.merge({},c):ie.isArray(c)?c.slice():c}function a(s,c,p){if(ie.isUndefined(c)){if(!ie.isUndefined(s))return n(void 0,s,p)}else return n(s,c,p)}function i(s,c){if(!ie.isUndefined(c))return n(void 0,c)}function o(s,c){if(ie.isUndefined(c)){if(!ie.isUndefined(s))return n(void 0,s)}else return n(void 0,c)}function l(s,c,p){if(p in t)return n(s,c);if(p in e)return n(void 0,s)}let u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(s,c)=>a(IR(s),IR(c),!0)};return ie.forEach(Object.keys(Object.assign({},e,t)),function(c){let p=u[c]||a,f=p(e[c],t[c],c);ie.isUndefined(f)&&p!==l||(r[c]=f)}),r}var Ep=e=>{let t=On({},e),{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:l}=t;t.headers=o=zt.from(o),t.url=fi(mi(t.baseURL,t.url),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(ie.isFormData(r)){if(Ht.hasStandardBrowserEnv||Ht.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){let[s,...c]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([s||"multipart/form-data",...c].join("; "))}}if(Ht.hasStandardBrowserEnv&&(n&&ie.isFunction(n)&&(n=n(t)),n||n!==!1&&RR(t.url))){let s=a&&i&&FR.read(i);s&&o.set(a,s)}return t};var fj=typeof XMLHttpRequest<"u",BR=fj&&function(e){return new Promise(function(r,n){let a=Ep(e),i=a.data,o=zt.from(a.headers).normalize(),{responseType:l,onUploadProgress:u,onDownloadProgress:s}=a,c,p,f,m,h;function d(){m&&m(),h&&h(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function x(){if(!v)return;let g=zt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:g,config:e,request:v};Vn(function(S){r(S),d()},function(S){n(S),d()},E),v=null}"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(x)},v.onabort=function(){v&&(n(new ke("Request aborted",ke.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new ke("Network Error",ke.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let y=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",E=a.transitional||mo;a.timeoutErrorMessage&&(y=a.timeoutErrorMessage),n(new ke(y,E.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,v)),v=null},i===void 0&&o.setContentType(null),"setRequestHeader"in v&&ie.forEach(o.toJSON(),function(y,E){v.setRequestHeader(E,y)}),ie.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),l&&l!=="json"&&(v.responseType=a.responseType),s&&([f,h]=sa(s,!0),v.addEventListener("progress",f)),u&&v.upload&&([p,m]=sa(u),v.upload.addEventListener("progress",p),v.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(c=g=>{v&&(n(!g||g.type?new en(null,e,v):g),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));let N=tu(a.url);if(N&&Ht.protocols.indexOf(N)===-1){n(new ke("Unsupported protocol "+N+":",ke.ERR_BAD_REQUEST,e));return}v.send(i||null)})};var mj=(e,t)=>{let r=new AbortController,n,a=function(u){if(!n){n=!0,o();let s=u instanceof Error?u:this.reason;r.abort(s instanceof ke?s:new en(s instanceof Error?s.message:s))}},i=t&&setTimeout(()=>{a(new ke(`timeout ${t} of ms exceeded`,ke.ETIMEDOUT))},t),o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u&&(u.removeEventListener?u.removeEventListener("abort",a):u.unsubscribe(a))}),e=null)};e.forEach(u=>u&&u.addEventListener&&u.addEventListener("abort",a));let{signal:l}=r;return l.unsubscribe=o,[l,()=>{i&&clearTimeout(i),i=null}]},LR=mj;var dj=function*(e,t){let r=e.byteLength;if(!t||r{let i=hj(e,t,a),o=0,l,u=s=>{l||(l=!0,n&&n(s))};return new ReadableStream({async pull(s){try{let{done:c,value:p}=await i.next();if(c){u(),s.close();return}let f=p.byteLength;if(r){let m=o+=f;r(m)}s.enqueue(new Uint8Array(p))}catch(c){throw u(c),c}},cancel(s){return u(s),i.return()}},{highWaterMark:2})};var Np=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",UR=Np&&typeof ReadableStream=="function",gb=Np&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),kR=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vj=UR&&kR(()=>{let e=!1,t=new Request(Ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),PR=64*1024,xb=UR&&kR(()=>ie.isReadableStream(new Response("").body)),Ap={stream:xb&&(e=>e.body)};Np&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ap[t]&&(Ap[t]=ie.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ke(`Response type '${t}' is not supported`,ke.ERR_NOT_SUPPORT,n)})})})(new Response);var gj=async e=>{if(e==null)return 0;if(ie.isBlob(e))return e.size;if(ie.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(ie.isArrayBufferView(e)||ie.isArrayBuffer(e))return e.byteLength;if(ie.isURLSearchParams(e)&&(e=e+""),ie.isString(e))return(await gb(e)).byteLength},xj=async(e,t)=>{let r=ie.toFiniteNumber(e.getContentLength());return r??gj(t)},qR=Np&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:i,timeout:o,onDownloadProgress:l,onUploadProgress:u,responseType:s,headers:c,withCredentials:p="same-origin",fetchOptions:f}=Ep(e);s=s?(s+"").toLowerCase():"text";let[m,h]=a||i||o?LR([a,i],o):[],d,v,x=()=>{!d&&setTimeout(()=>{m&&m.unsubscribe()}),d=!0},N;try{if(u&&vj&&r!=="get"&&r!=="head"&&(N=await xj(c,n))!==0){let b=new Request(t,{method:"POST",body:n,duplex:"half"}),S;if(ie.isFormData(n)&&(S=b.headers.get("content-type"))&&c.setContentType(S),b.body){let[A,w]=Eo(N,sa(Ao(u)));n=vb(b.body,PR,A,w,gb)}}ie.isString(p)||(p=p?"include":"omit"),v=new Request(t,{...f,signal:m,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:p});let g=await fetch(v),y=xb&&(s==="stream"||s==="response");if(xb&&(l||y)){let b={};["status","statusText","headers"].forEach(D=>{b[D]=g[D]});let S=ie.toFiniteNumber(g.headers.get("content-length")),[A,w]=l&&Eo(S,sa(Ao(l),!0))||[];g=new Response(vb(g.body,PR,A,()=>{w&&w(),y&&x()},gb),b)}s=s||"text";let E=await Ap[ie.findKey(Ap,s)||"text"](g,e);return!y&&x(),h&&h(),await new Promise((b,S)=>{Vn(b,S,{data:E,headers:zt.from(g.headers),status:g.status,statusText:g.statusText,config:e,request:v})})}catch(g){throw x(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new ke("Network Error",ke.ERR_NETWORK,e,v),{cause:g.cause||g}):ke.from(g,g&&g.code,e,v)}});var bb={http:OR,xhr:BR,fetch:qR};ie.forEach(bb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var HR=e=>`- ${e}`,bj=e=>ie.isFunction(e)||e===null||e===!1,Tp={getAdapter:e=>{e=ie.isArray(e)?e:[e];let{length:t}=e,r,n,a={};for(let i=0;i`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build")),o=t?i.length>1?`since : -`+i.map(HR).join(` -`):" "+HR(i[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:bb};function yb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new en(null,e)}function wp(e){return yb(e),e.headers=zt.from(e.headers),e.data=Xs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Tp.getAdapter(e.adapter||ho.adapter)(e).then(function(n){return yb(e),n.data=Xs.call(e,e.transformResponse,n),n.headers=zt.from(n.headers),n},function(n){return Ks(n)||(yb(e),n&&n.response&&(n.response.data=Xs.call(e,e.transformResponse,n.response),n.response.headers=zt.from(n.response.headers))),Promise.reject(n)})}var Eb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Eb[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var zR={};Eb.transitional=function(t,r,n){function a(i,o){return"[Axios v"+vi+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,l)=>{if(t===!1)throw new ke(a(o," has been removed"+(r?" in "+r:"")),ke.ERR_DEPRECATED);return r&&!zR[o]&&(zR[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,l):!0}};function yj(e,t,r){if(typeof e!="object")throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),a=n.length;for(;a-- >0;){let i=n[a],o=t[i];if(o){let l=e[i],u=l===void 0||o(l,i,e);if(u!==!0)throw new ke("option "+i+" must be "+u,ke.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ke("Unknown option "+i,ke.ERR_BAD_OPTION)}}var Dp={assertOptions:yj,validators:Eb};var Ba=Dp.validators,No=class{constructor(t){this.defaults=t,this.interceptors={request:new qx,response:new qx}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;let i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=` -`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=On(this.defaults,r);let{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&Dp.assertOptions(n,{silentJSONParsing:Ba.transitional(Ba.boolean),forcedJSONParsing:Ba.transitional(Ba.boolean),clarifyTimeoutError:Ba.transitional(Ba.boolean)},!1),a!=null&&(ie.isFunction(a)?r.paramsSerializer={serialize:a}:Dp.assertOptions(a,{encode:Ba.function,serialize:Ba.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&ie.merge(i.common,i[r.method]);i&&ie.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=zt.concat(o,i);let l=[],u=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(r)===!1||(u=u&&d.synchronous,l.unshift(d.fulfilled,d.rejected))});let s=[];this.interceptors.response.forEach(function(d){s.push(d.fulfilled,d.rejected)});let c,p=0,f;if(!u){let h=[wp.bind(this),void 0];for(h.unshift.apply(h,l),h.push.apply(h,s),f=h.length,c=Promise.resolve(r);p{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i,o=new Promise(l=>{n.subscribe(l),i=l}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,l){n.reason||(n.reason=new en(i,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new e(function(a){t=a}),cancel:t}}},GR=Ab;function Nb(e){return function(r){return e.apply(null,r)}}function Tb(e){return ie.isObject(e)&&e.isAxiosError===!0}var wb={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wb).forEach(([e,t])=>{wb[t]=e});var YR=wb;function jR(e){let t=new nu(e),r=Ys(nu.prototype.request,t);return ie.extend(r,nu.prototype,t,{allOwnKeys:!0}),ie.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return jR(On(e,a))},r}var Qt=jR(ho);Qt.Axios=nu;Qt.CanceledError=en;Qt.CancelToken=GR;Qt.isCancel=Ks;Qt.VERSION=vi;Qt.toFormData=Ra;Qt.AxiosError=ke;Qt.Cancel=Qt.CanceledError;Qt.all=function(t){return Promise.all(t)};Qt.spread=Nb;Qt.isAxiosError=Tb;Qt.mergeConfig=On;Qt.AxiosHeaders=zt;Qt.formToJSON=e=>dp(ie.isHTMLForm(e)?new FormData(e):e);Qt.getAdapter=Tp.getAdapter;Qt.HttpStatusCode=YR;Qt.default=Qt;var Ze=Qt;var{Axios:g9e,AxiosError:x9e,CanceledError:b9e,isCancel:y9e,CancelToken:E9e,VERSION:A9e,all:N9e,Cancel:T9e,isAxiosError:w9e,spread:D9e,toFormData:S9e,AxiosHeaders:C9e,HttpStatusCode:_9e,formToJSON:M9e,getAdapter:O9e,mergeConfig:R9e}=Ze;var n4=Le(Ib(),1);var _V={xml:!1,decodeEntities:!0},ou=_V,NF={_useHtmlParser2:!0,xmlMode:!0};function su(e){return e?.xml?typeof e.xml=="boolean"?NF:{...NF,...e.xml}:e??void 0}var Ha={};on(Ha,{contains:()=>jb,html:()=>rI,merge:()=>b$,parseHTML:()=>g$,root:()=>x$,text:()=>qa,xml:()=>nI});var ka={};on(ka,{DocumentPosition:()=>gn,append:()=>e$,appendChild:()=>JV,compareDocumentPosition:()=>ZF,existsOne:()=>KF,filter:()=>vu,find:()=>Pp,findAll:()=>a$,findOne:()=>Up,findOneChild:()=>n$,getAttributeValue:()=>KV,getChildren:()=>_o,getElementById:()=>u$,getElements:()=>s$,getElementsByTagName:()=>Ni,getElementsByTagType:()=>c$,getFeed:()=>Yb,getInnerHTML:()=>XV,getName:()=>QV,getOuterHTML:()=>$F,getParent:()=>XF,getSiblings:()=>Gb,getText:()=>Ip,hasAttrib:()=>WV,hasChildren:()=>Ut,innerText:()=>hu,isCDATA:()=>To,isComment:()=>Ai,isDocument:()=>Rn,isTag:()=>$e,isText:()=>qr,nextElementSibling:()=>Bp,prepend:()=>r$,prependChild:()=>t$,prevElementSibling:()=>Lp,removeElement:()=>fa,removeSubsets:()=>l$,replaceElement:()=>ZV,testElement:()=>o$,textContent:()=>pa,uniqueSort:()=>Pa});var xt;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(xt||(xt={}));function TF(e){return e.type===xt.Tag||e.type===xt.Script||e.type===xt.Style}var wF=xt.Root,DF=xt.Text,SF=xt.Directive,CF=xt.Comment,_F=xt.Script,MF=xt.Style,OF=xt.Tag,RF=xt.CDATA,FF=xt.Doctype;var Cp=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return pu(this,t)}},uu=class extends Cp{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},$n=class extends uu{constructor(){super(...arguments),this.type=xt.Text}get nodeType(){return 3}},bi=class extends uu{constructor(){super(...arguments),this.type=xt.Comment}get nodeType(){return 8}},yi=class extends uu{constructor(t,r){super(r),this.name=t,this.type=xt.Directive}get nodeType(){return 1}},cu=class extends Cp{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},lu=class extends cu{constructor(){super(...arguments),this.type=xt.CDATA}get nodeType(){return 4}},rn=class extends cu{constructor(){super(...arguments),this.type=xt.Root}get nodeType(){return 9}},Ei=class extends cu{constructor(t,r,n=[],a=t==="script"?xt.Script:t==="style"?xt.Style:xt.Tag){super(n),this.name=t,this.attribs=r,this.type=a}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var r,n;return{name:t,value:this.attribs[t],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[t],prefix:(n=this["x-attribsPrefix"])===null||n===void 0?void 0:n[t]}})}};function $e(e){return TF(e)}function To(e){return e.type===xt.CDATA}function qr(e){return e.type===xt.Text}function Ai(e){return e.type===xt.Comment}function _p(e){return e.type===xt.Directive}function Rn(e){return e.type===xt.Root}function Ut(e){return Object.prototype.hasOwnProperty.call(e,"children")}function pu(e,t=!1){let r;if(qr(e))r=new $n(e.data);else if(Ai(e))r=new bi(e.data);else if($e(e)){let n=t?Bb(e.children):[],a=new Ei(e.name,{...e.attribs},n);n.forEach(i=>i.parent=a),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=a}else if(To(e)){let n=t?Bb(e.children):[],a=new lu(n);n.forEach(i=>i.parent=a),r=a}else if(Rn(e)){let n=t?Bb(e.children):[],a=new rn(n);n.forEach(i=>i.parent=a),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),r=a}else if(_p(e)){let n=new yi(e.name,e.data);e["x-name"]!=null&&(n["x-name"]=e["x-name"],n["x-publicId"]=e["x-publicId"],n["x-systemId"]=e["x-systemId"]),r=n}else throw new Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function Bb(e){let t=e.map(r=>pu(r,!0));for(let r=1;r\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var Mp=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var Lb,MV=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Do=(Lb=String.fromCodePoint)!==null&&Lb!==void 0?Lb:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function fu(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=MV.get(e))!==null&&t!==void 0?t:e}var cr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(cr||(cr={}));var OV=32,Cr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Cr||(Cr={}));function Pb(e){return e>=cr.ZERO&&e<=cr.NINE}function RV(e){return e>=cr.UPPER_A&&e<=cr.UPPER_F||e>=cr.LOWER_A&&e<=cr.LOWER_F}function FV(e){return e>=cr.UPPER_A&&e<=cr.UPPER_Z||e>=cr.LOWER_A&&e<=cr.LOWER_Z||Pb(e)}function IV(e){return e===cr.EQUALS||FV(e)}var ur;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ur||(ur={}));var la;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(la||(la={}));var Op=class{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=ur.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=la.Strict}startEntity(t){this.decodeMode=t,this.state=ur.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case ur.EntityStart:return t.charCodeAt(r)===cr.NUM?(this.state=ur.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=ur.NamedEntity,this.stateNamedEntity(t,r));case ur.NumericStart:return this.stateNumericStart(t,r);case ur.NumericDecimal:return this.stateNumericDecimal(t,r);case ur.NumericHex:return this.stateNumericHex(t,r);case ur.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|OV)===cr.LOWER_X?(this.state=ur.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=ur.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,a){if(r!==n){let i=n-r;this.result=this.result*Math.pow(a,i)+parseInt(t.substr(r,i),a),this.consumed+=i}}stateNumericHex(t,r){let n=r;for(;r>14;for(;r>14,i!==0){if(o===cr.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==la.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:r,decodeTree:n}=this,a=(n[r]&Cr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){let{decodeTree:a}=this;return this.emitCodePoint(r===1?a[t]&~Cr.VALUE_LENGTH:a[t+1],n),r===3&&this.emitCodePoint(a[t+2],n),n}end(){var t;switch(this.state){case ur.NamedEntity:return this.result!==0&&(this.decodeMode!==la.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ur.NumericDecimal:return this.emitNumericEntity(0,2);case ur.NumericHex:return this.emitNumericEntity(0,3);case ur.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ur.EntityStart:return 0}}};function LF(e){let t="",r=new Op(e,n=>t+=Do(n));return function(a,i){let o=0,l=0;for(;(l=a.indexOf("&",l))>=0;){t+=a.slice(o,l),r.startEntity(i);let s=r.write(a,l+1);if(s<0){o=l+r.end();break}o=l+s,l=s===0?o+1:o}let u=t+a.slice(o);return t="",u}}function mu(e,t,r,n){let a=(t&Cr.BRANCH_LENGTH)>>7,i=t&Cr.JUMP_TABLE;if(a===0)return i!==0&&n===i?r:-1;if(i){let u=n-i;return u<0||u>=a?-1:e[r+u]-1}let o=r,l=o+a-1;for(;o<=l;){let u=o+l>>>1,s=e[u];if(sn)l=u-1;else return e[u+a]}return-1}var o7e=LF(vn),s7e=LF(Mp);function Rp(e){for(let t=1;t$\x80-\uFFFF]/g,PF=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),UF=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function du(e){let t="",r=0,n;for(;(n=Ub.exec(e))!==null;){let a=n.index,i=e.charCodeAt(a),o=PF.get(i);o!==void 0?(t+=e.substring(r,a)+o,r=a+1):(t+=`${e.substring(r,a)}&#x${UF(e,a).toString(16)};`,r=Ub.lastIndex+=+((i&64512)===55296))}return t+e.substr(r)}function kb(e,t){return function(n){let a,i=0,o="";for(;a=e.exec(n);)i!==a.index&&(o+=n.substring(i,a.index)),o+=t.get(a[0].charCodeAt(0)),i=a.index+1;return o+n.substring(i)}}var kF=kb(/[&<>'"]/g,PF),So=kb(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Co=kb(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var qF;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(qF||(qF={}));var HF;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(HF||(HF={}));var YF=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),jF=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e]));var PV=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function UV(e){return e.replace(/"/g,""")}function kV(e,t){var r;if(!e)return;let n=((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)===!1?UV:t.xmlMode||t.encodeEntities!=="utf8"?du:So;return Object.keys(e).map(a=>{var i,o;let l=(i=e[a])!==null&&i!==void 0?i:"";return t.xmlMode==="foreign"&&(a=(o=jF.get(a))!==null&&o!==void 0?o:a),!t.emptyAttrs&&!t.xmlMode&&l===""?a:`${a}="${n(l)}"`}).join(" ")}var VF=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function zb(e,t={}){let r="length"in e?e:[e],n="";for(let a=0;a0&&(n+=zb(e.children,t)),(t.xmlMode||!VF.has(e.name))&&(n+=``)),n}function YV(e){return`<${e.data}>`}function jV(e,t){var r;let n=e.data||"";return((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&PV.has(e.parent.name))&&(n=t.xmlMode||t.encodeEntities!=="utf8"?du(n):Co(n)),n}function VV(e){return``}function $V(e){return``}function $F(e,t){return Fp(e,t)}function XV(e,t){return Ut(e)?e.children.map(r=>$F(r,t)).join(""):""}function Ip(e){return Array.isArray(e)?e.map(Ip).join(""):$e(e)?e.name==="br"?` -`:Ip(e.children):To(e)?Ip(e.children):qr(e)?e.data:""}function pa(e){return Array.isArray(e)?e.map(pa).join(""):Ut(e)&&!Ai(e)?pa(e.children):qr(e)?e.data:""}function hu(e){return Array.isArray(e)?e.map(hu).join(""):Ut(e)&&(e.type===xt.Tag||To(e))?hu(e.children):qr(e)?e.data:""}function _o(e){return Ut(e)?e.children:[]}function XF(e){return e.parent||null}function Gb(e){let t=XF(e);if(t!=null)return _o(t);let r=[e],{prev:n,next:a}=e;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;a!=null;)r.push(a),{next:a}=a;return r}function KV(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}function WV(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function QV(e){return e.name}function Bp(e){let{next:t}=e;for(;t!==null&&!$e(t);)({next:t}=t);return t}function Lp(e){let{prev:t}=e;for(;t!==null&&!$e(t);)({prev:t}=t);return t}function fa(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function ZV(e,t){let r=t.prev=e.prev;r&&(r.next=t);let n=t.next=e.next;n&&(n.prev=t);let a=t.parent=e.parent;if(a){let i=a.children;i[i.lastIndexOf(e)]=t,e.parent=null}}function JV(e,t){if(fa(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function e$(e,t){fa(t);let{parent:r}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){let a=r.children;a.splice(a.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function t$(e,t){if(fa(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let r=e.children[1];r.prev=t,t.next=r}else t.next=null}function r$(e,t){fa(t);let{parent:r}=e;if(r){let n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}function vu(e,t,r=!0,n=1/0){return Pp(e,Array.isArray(t)?t:[t],r,n)}function Pp(e,t,r,n){let a=[],i=[t],o=[0];for(;;){if(o[0]>=i[0].length){if(o.length===1)return a;i.shift(),o.shift();continue}let l=i[0][o[0]++];if(e(l)&&(a.push(l),--n<=0))return a;r&&Ut(l)&&l.children.length>0&&(o.unshift(0),i.unshift(l.children))}}function n$(e,t){return t.find(e)}function Up(e,t,r=!0){let n=null;for(let a=0;a0&&(n=Up(e,i.children,!0));else continue}return n}function KF(e,t){return t.some(r=>$e(r)&&(e(r)||KF(e,r.children)))}function a$(e,t){let r=[],n=[t],a=[0];for(;;){if(a[0]>=n[0].length){if(n.length===1)return r;n.shift(),a.shift();continue}let i=n[0][a[0]++];$e(i)&&(e(i)&&r.push(i),i.children.length>0&&(a.unshift(0),n.unshift(i.children)))}}var kp={tag_name(e){return typeof e=="function"?t=>$e(t)&&e(t.name):e==="*"?$e:t=>$e(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>qr(t)&&e(t.data):t=>qr(t)&&t.data===e}};function WF(e,t){return typeof t=="function"?r=>$e(r)&&t(r.attribs[e]):r=>$e(r)&&r.attribs[e]===t}function i$(e,t){return r=>e(r)||t(r)}function QF(e){let t=Object.keys(e).map(r=>{let n=e[r];return Object.prototype.hasOwnProperty.call(kp,r)?kp[r](n):WF(r,n)});return t.length===0?null:t.reduce(i$)}function o$(e,t){let r=QF(e);return r?r(t):!0}function s$(e,t,r,n=1/0){let a=QF(e);return a?vu(a,t,r,n):[]}function u$(e,t,r=!0){return Array.isArray(t)||(t=[t]),Up(WF("id",e),t,r)}function Ni(e,t,r=!0,n=1/0){return vu(kp.tag_name(e),t,r,n)}function c$(e,t,r=!0,n=1/0){return vu(kp.tag_type(e),t,r,n)}function l$(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}var gn;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(gn||(gn={}));function ZF(e,t){let r=[],n=[];if(e===t)return 0;let a=Ut(e)?e:e.parent;for(;a;)r.unshift(a),a=a.parent;for(a=Ut(t)?t:t.parent;a;)n.unshift(a),a=a.parent;let i=Math.min(r.length,n.length),o=0;for(;ou.indexOf(c)?l===t?gn.FOLLOWING|gn.CONTAINED_BY:gn.FOLLOWING:l===e?gn.PRECEDING|gn.CONTAINS:gn.PRECEDING}function Pa(e){return e=e.filter((t,r,n)=>!n.includes(t,r+1)),e.sort((t,r)=>{let n=ZF(t,r);return n&gn.PRECEDING?-1:n&gn.FOLLOWING?1:0}),e}function Yb(e){let t=qp(h$,e);return t?t.name==="feed"?p$(t):f$(t):null}function p$(e){var t;let r=e.children,n={type:"atom",items:Ni("entry",r).map(o=>{var l;let{children:u}=o,s={media:JF(u)};Hr(s,"id","id",u),Hr(s,"title","title",u);let c=(l=qp("link",u))===null||l===void 0?void 0:l.attribs.href;c&&(s.link=c);let p=Ua("summary",u)||Ua("content",u);p&&(s.description=p);let f=Ua("updated",u);return f&&(s.pubDate=new Date(f)),s})};Hr(n,"id","id",r),Hr(n,"title","title",r);let a=(t=qp("link",r))===null||t===void 0?void 0:t.attribs.href;a&&(n.link=a),Hr(n,"description","subtitle",r);let i=Ua("updated",r);return i&&(n.updated=new Date(i)),Hr(n,"author","email",r,!0),n}function f$(e){var t,r;let n=(r=(t=qp("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&r!==void 0?r:[],a={type:e.name.substr(0,3),id:"",items:Ni("item",e.children).map(o=>{let{children:l}=o,u={media:JF(l)};Hr(u,"id","guid",l),Hr(u,"title","title",l),Hr(u,"link","link",l),Hr(u,"description","description",l);let s=Ua("pubDate",l)||Ua("dc:date",l);return s&&(u.pubDate=new Date(s)),u})};Hr(a,"title","title",n),Hr(a,"link","link",n),Hr(a,"description","description",n);let i=Ua("lastBuildDate",n);return i&&(a.updated=new Date(i)),Hr(a,"author","managingEditor",n,!0),a}var m$=["url","type","lang"],d$=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function JF(e){return Ni("media:content",e).map(t=>{let{attribs:r}=t,n={medium:r.medium,isDefault:!!r.isDefault};for(let a of m$)r[a]&&(n[a]=r[a]);for(let a of d$)r[a]&&(n[a]=parseInt(r[a],10));return r.expression&&(n.expression=r.expression),n})}function qp(e,t){return Ni(e,t,!0,1)[0]}function Ua(e,t,r=!1){return pa(Ni(e,t,r,1)).trim()}function Hr(e,t,r,n,a=!1){let i=Ua(r,n,a);i&&(e[t]=i)}function h$(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}function tI(e,t,r){return e?e(t??e._root.children,null,void 0,r).toString():""}function v$(e,t){return!t&&typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function rI(e,t){let r=v$(e)?(t=e,void 0):e,n={...ou,...this===null||this===void 0?void 0:this._options,...su(t??{})};return tI(this,r,n)}function nI(e){let t={...this._options,xmlMode:!0};return tI(this,e,t)}function qa(e){let t=e||(this?this.root():[]),r="";for(let n=0;npI,attr:()=>E$,data:()=>N$,hasClass:()=>D$,prop:()=>A$,removeAttr:()=>w$,removeClass:()=>fI,toggleClass:()=>mI,val:()=>T$});function nn(e){return e.cheerio!=null}function aI(e){return e.replace(/[_.-](\w|$)/g,(t,r)=>r.toUpperCase())}function iI(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function Ft(e,t){let r=e.length;for(let n=0;npu(n,!0)):[pu(e,!0)],r=new rn(t);return t.forEach(n=>{n.parent=r}),t}var Ti;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(Ti||(Ti={}));function gu(e){let t=e.indexOf("<");if(t<0||t>e.length-3)return!1;let r=e.charCodeAt(t+1);return(r>=Ti.LowerA&&r<=Ti.LowerZ||r>=Ti.UpperA&&r<=Ti.UpperZ||r===Ti.Exclamation)&&e.includes(">",t+2)}var Mo=Object.prototype.hasOwnProperty,xu=/\s+/,Vb="data-",oI={null:null,true:!0,false:!1},Xb=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,y$=/^{[^]*}$|^\[[^]*]$/;function zp(e,t,r){var n;if(!(!e||!$e(e))){if((n=e.attribs)!==null&&n!==void 0||(e.attribs={}),!t)return e.attribs;if(Mo.call(e.attribs,t))return!r&&Xb.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return qa(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function Oo(e,t,r){r===null?lI(e,t):e.attribs[t]=`${r}`}function E$(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return Ft(this,(r,n)=>{$e(r)&&Oo(r,e,t.call(r,n,r.attribs[e]))})}return Ft(this,r=>{$e(r)&&(typeof e=="object"?Object.keys(e).forEach(n=>{let a=e[n];Oo(r,n,a)}):Oo(r,e,t))})}return arguments.length>1?this:zp(this[0],e,this.options.xmlMode)}function sI(e,t,r){return t in e?e[t]:!r&&Xb.test(t)?zp(e,t,!1)!==void 0:zp(e,t,r)}function $b(e,t,r,n){t in e?e[t]=r:Oo(e,t,!n&&Xb.test(t)?r?"":null:`${r}`)}function A$(e,t){var r;if(typeof e=="string"&&t===void 0){let n=this[0];if(!n||!$e(n))return;switch(e){case"style":{let a=this.css(),i=Object.keys(a);return i.forEach((o,l)=>{a[l]=o}),a.length=i.length,a}case"tagName":case"nodeName":return n.name.toUpperCase();case"href":case"src":{let a=(r=n.attribs)===null||r===void 0?void 0:r[e];return typeof URL<"u"&&(e==="href"&&(n.tagName==="a"||n.name==="link")||e==="src"&&(n.tagName==="img"||n.tagName==="iframe"||n.tagName==="audio"||n.tagName==="video"||n.tagName==="source"))&&a!==void 0&&this.options.baseURI?new URL(a,this.options.baseURI).href:a}case"innerText":return hu(n);case"textContent":return pa(n);case"outerHTML":return this.clone().wrap("").parent().html();case"innerHTML":return this.html();default:return sI(n,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new Error("Bad combination of arguments.");return Ft(this,(n,a)=>{$e(n)&&$b(n,e,t.call(n,a,sI(n,e,this.options.xmlMode)),this.options.xmlMode)})}return Ft(this,n=>{$e(n)&&(typeof e=="object"?Object.keys(e).forEach(a=>{let i=e[a];$b(n,a,i,this.options.xmlMode)}):$b(n,e,t,this.options.xmlMode))})}}function uI(e,t,r){var n;let a=e;(n=a.data)!==null&&n!==void 0||(a.data={}),typeof t=="object"?Object.assign(a.data,t):typeof t=="string"&&r!==void 0&&(a.data[t]=r)}function cI(e,t){let r,n,a;t==null?(r=Object.keys(e.attribs).filter(i=>i.startsWith(Vb)),n=r.map(i=>aI(i.slice(Vb.length)))):(r=[Vb+iI(t)],n=[t]);for(let i=0;i{$e(i)&&(typeof e=="object"?uI(i,e):uI(i,e,t))}),this):Mo.call(a.data,e)?a.data[e]:cI(a,e):cI(a)}function T$(e){let t=arguments.length===0,r=this[0];if(!r||!$e(r))return t?void 0:this;switch(r.name){case"textarea":return this.text(e);case"select":{let n=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");let a=typeof e!="object"?[e]:e;for(let i=0;iqa(a.children)):n.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function lI(e,t){!e.attribs||!Mo.call(e.attribs,t)||delete e.attribs[t]}function Gp(e){return e?e.trim().split(xu):[]}function w$(e){let t=Gp(e);for(let r=0;r{$e(n)&&lI(n,t[r])});return this}function D$(e){return this.toArray().some(t=>{let r=$e(t)&&t.attribs.class,n=-1;if(r&&e.length)for(;(n=r.indexOf(e,n+1))>-1;){let a=n+e.length;if((n===0||xu.test(r[n-1]))&&(a===r.length||xu.test(r[a])))return!0}return!1})}function pI(e){if(typeof e=="function")return Ft(this,(n,a)=>{if($e(n)){let i=n.attribs.class||"";pI.call([n],e.call(n,a,i))}});if(!e||typeof e!="string")return this;let t=e.split(xu),r=this.length;for(let n=0;n{$e(a)&&fI.call([a],e.call(a,i,a.attribs.class||""))});let t=Gp(e),r=t.length,n=arguments.length===0;return Ft(this,a=>{if($e(a))if(n)a.attribs.class="";else{let i=Gp(a.attribs.class),o=!1;for(let l=0;l=0&&(i.splice(u,1),o=!0,l--)}o&&(a.attribs.class=i.join(" "))}})}function mI(e,t){if(typeof e=="function")return Ft(this,(o,l)=>{$e(o)&&mI.call([o],e.call(o,l,o.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;let r=e.split(xu),n=r.length,a=typeof t=="boolean"?t?1:-1:0,i=this.length;for(let o=0;o=0&&c<0?u.push(r[s]):a<=0&&c>=0&&u.splice(c,1)}l.attribs.class=u.join(" ")}return this}var x1={};on(x1,{add:()=>IX,addBack:()=>BX,children:()=>xX,closest:()=>lX,contents:()=>bX,each:()=>yX,end:()=>FX,eq:()=>CX,filter:()=>AX,filterArray:()=>g1,find:()=>oX,first:()=>DX,get:()=>_X,has:()=>wX,index:()=>OX,is:()=>NX,last:()=>SX,map:()=>EX,next:()=>pX,nextAll:()=>fX,nextUntil:()=>mX,not:()=>TX,parent:()=>sX,parents:()=>uX,parentsUntil:()=>cX,prev:()=>dX,prevAll:()=>hX,prevUntil:()=>vX,siblings:()=>gX,slice:()=>RX,toArray:()=>MX});var Gr=Le(Bo(),1);var s1=Le(za(),1);var Fn=Le(Bo(),1),da=Le(za(),1);var _r=Le(Bo(),1),CI=new Map([[_r.SelectorType.Universal,50],[_r.SelectorType.Tag,30],[_r.SelectorType.Attribute,1],[_r.SelectorType.Pseudo,0]]);function yu(e){return!CI.has(e.type)}var H$=new Map([[_r.AttributeAction.Exists,10],[_r.AttributeAction.Equals,8],[_r.AttributeAction.Not,7],[_r.AttributeAction.Start,6],[_r.AttributeAction.End,6],[_r.AttributeAction.Any,5]]);function Qb(e){let t=e.map(_I);for(let r=1;r=0&&n>=1)):e.type===_r.SelectorType.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?n=0:Array.isArray(e.data)?(n=Math.min(...e.data.map(a=>Math.min(...a.map(_I)))),n<0&&(n=0)):n=2:n=3),n}var Eu=Le(za(),1),z$=/[-[\]{}()*+?.,\\^$|#\s]/g;function MI(e){return e.replace(z$,"\\$&")}var G$=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function wi(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&G$.has(e.name)}var OI={equals(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t;return wi(t,r)?(i=i.toLowerCase(),o=>{let l=n.getAttributeValue(o,a);return l!=null&&l.length===i.length&&l.toLowerCase()===i&&e(o)}):o=>n.getAttributeValue(o,a)===i&&e(o)},hyphen(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t,o=i.length;return wi(t,r)?(i=i.toLowerCase(),function(u){let s=n.getAttributeValue(u,a);return s!=null&&(s.length===o||s.charAt(o)==="-")&&s.substr(0,o).toLowerCase()===i&&e(u)}):function(u){let s=n.getAttributeValue(u,a);return s!=null&&(s.length===o||s.charAt(o)==="-")&&s.substr(0,o)===i&&e(u)}},element(e,t,r){let{adapter:n}=r,{name:a,value:i}=t;if(/\s/.test(i))return Eu.default.falseFunc;let o=new RegExp(`(?:^|\\s)${MI(i)}(?:$|\\s)`,wi(t,r)?"i":"");return function(u){let s=n.getAttributeValue(u,a);return s!=null&&s.length>=i.length&&o.test(s)&&e(u)}},exists(e,{name:t},{adapter:r}){return n=>r.hasAttrib(n,t)&&e(n)},start(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t,o=i.length;return o===0?Eu.default.falseFunc:wi(t,r)?(i=i.toLowerCase(),l=>{let u=n.getAttributeValue(l,a);return u!=null&&u.length>=o&&u.substr(0,o).toLowerCase()===i&&e(l)}):l=>{var u;return!!(!((u=n.getAttributeValue(l,a))===null||u===void 0)&&u.startsWith(i))&&e(l)}},end(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t,o=-i.length;return o===0?Eu.default.falseFunc:wi(t,r)?(i=i.toLowerCase(),l=>{var u;return((u=n.getAttributeValue(l,a))===null||u===void 0?void 0:u.substr(o).toLowerCase())===i&&e(l)}):l=>{var u;return!!(!((u=n.getAttributeValue(l,a))===null||u===void 0)&&u.endsWith(i))&&e(l)}},any(e,t,r){let{adapter:n}=r,{name:a,value:i}=t;if(i==="")return Eu.default.falseFunc;if(wi(t,r)){let o=new RegExp(MI(i),"i");return function(u){let s=n.getAttributeValue(u,a);return s!=null&&s.length>=i.length&&o.test(s)&&e(u)}}return o=>{var l;return!!(!((l=n.getAttributeValue(o,a))===null||l===void 0)&&l.includes(i))&&e(o)}},not(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t;return i===""?o=>!!n.getAttributeValue(o,a)&&e(o):wi(t,r)?(i=i.toLowerCase(),o=>{let l=n.getAttributeValue(o,a);return(l==null||l.length!==i.length||l.toLowerCase()!==i)&&e(o)}):o=>n.getAttributeValue(o,a)!==i&&e(o)}};var BI=Le(Bo(),1);var Y$=new Set([9,10,12,13,32]),RI=48,j$=57;function FI(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,r=0,n=i(),a=o();if(t=RI&&e.charCodeAt(t)<=j$;)s=s*10+(e.charCodeAt(t)-RI),t++;return t===u?null:s}function l(){for(;ti<=r;if(t===0)return i=>i===r;if(t===1)return r<0?Zb.default.trueFunc:i=>i>=r;let n=Math.abs(t),a=(r%n+n)%n;return t>1?i=>i>=r&&i%n===a:i=>i<=r&&i%n===a}function Lo(e){return II(FI(e))}var zr=Le(za(),1);function Vp(e,t){return r=>{let n=t.getParent(r);return n!=null&&t.isTag(n)&&e(r)}}var Po={contains(e,t,{adapter:r}){return function(a){return e(a)&&r.getText(a).includes(t)}},icontains(e,t,{adapter:r}){let n=t.toLowerCase();return function(i){return e(i)&&r.getText(i).toLowerCase().includes(n)}},"nth-child"(e,t,{adapter:r,equals:n}){let a=Lo(t);return a===zr.default.falseFunc?zr.default.falseFunc:a===zr.default.trueFunc?Vp(e,r):function(o){let l=r.getSiblings(o),u=0;for(let s=0;s=0&&!n(o,l[s]);s--)r.isTag(l[s])&&u++;return a(u)&&e(o)}},"nth-of-type"(e,t,{adapter:r,equals:n}){let a=Lo(t);return a===zr.default.falseFunc?zr.default.falseFunc:a===zr.default.trueFunc?Vp(e,r):function(o){let l=r.getSiblings(o),u=0;for(let s=0;s=0;s--){let c=l[s];if(n(o,c))break;r.isTag(c)&&r.getName(c)===r.getName(o)&&u++}return a(u)&&e(o)}},root(e,t,{adapter:r}){return n=>{let a=r.getParent(n);return(a==null||!r.isTag(a))&&e(n)}},scope(e,t,r,n){let{equals:a}=r;return!n||n.length===0?Po.root(e,t,r):n.length===1?i=>a(n[0],i)&&e(i):i=>n.includes(i)&&e(i)},hover:Jb("isHovered"),visited:Jb("isVisited"),active:Jb("isActive")};function Jb(e){return function(r,n,{adapter:a}){let i=a[e];return typeof i!="function"?zr.default.falseFunc:function(l){return i(l)&&r(l)}}}var Au={empty(e,{adapter:t}){return!t.getChildren(e).some(r=>t.isTag(r)||t.getText(r)!=="")},"first-child"(e,{adapter:t,equals:r}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;let n=t.getSiblings(e).find(a=>t.isTag(a));return n!=null&&r(e,n)},"last-child"(e,{adapter:t,equals:r}){let n=t.getSiblings(e);for(let a=n.length-1;a>=0;a--){if(r(e,n[a]))return!0;if(t.isTag(n[a]))break}return!1},"first-of-type"(e,{adapter:t,equals:r}){let n=t.getSiblings(e),a=t.getName(e);for(let i=0;i=0;i--){let o=n[i];if(r(e,o))return!0;if(t.isTag(o)&&t.getName(o)===a)break}return!1},"only-of-type"(e,{adapter:t,equals:r}){let n=t.getName(e);return t.getSiblings(e).every(a=>r(e,a)||!t.isTag(a)||t.getName(a)!==n)},"only-child"(e,{adapter:t,equals:r}){return t.getSiblings(e).every(n=>r(e,n)||!t.isTag(n))}};function e1(e,t,r,n){if(r===null){if(e.length>n)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===n)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}var $p={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( +In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var NC={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var TC={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var wC={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var DC={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var SC={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var CC={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var _C={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var MC={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var OC={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var RC={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var FC={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var IC={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var BC={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var LC={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var PC={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var UC={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var kC={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]};var qC={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]};var HC={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]};var zC={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]};var GC={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]};var YC={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]};var jC={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]};var VC={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]};var $C={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]};var XC={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]};var KC={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]};var WC={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var QC={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]};var ZC={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]};var JC={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]};var e_={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var t_={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]};var r_={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]};var n_={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]};var a_={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var i_={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var o_={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var s_={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]};var u_={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]};var c_={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var l_={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var p_={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]};var f_={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","fraction","bignumber","string","format"]};var m_={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var d_={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]};var h_={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]};var v_={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]};var g_={bignumber:sw,boolean:uw,complex:cw,createUnit:lw,fraction:pw,index:fw,matrix:mw,number:dw,sparse:hw,splitUnit:vw,string:gw,unit:xw,e:pv,E:pv,false:V2,i:$2,Infinity:X2,LN2:W2,LN10:K2,LOG2E:Z2,LOG10E:Q2,NaN:J2,null:ew,pi:fv,PI:fv,phi:tw,SQRT1_2:rw,SQRT2:nw,tau:aw,true:iw,version:ow,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:Aw,lsolve:Tw,lsolveAll:ww,lup:Dw,lusolve:Sw,leafCount:Nw,polynomialRoot:Cw,resolve:Ow,simplify:Rw,simplifyConstant:Fw,simplifyCore:Iw,symbolicEqual:Lw,rationalize:Mw,slu:Bw,usolve:Pw,usolveAll:Uw,qr:_w,abs:kw,add:qw,cbrt:Hw,ceil:zw,cube:Gw,divide:Yw,dotDivide:jw,dotMultiply:Vw,dotPow:$w,exp:Xw,expm:Kw,expm1:Ww,fix:Qw,floor:Zw,gcd:Jw,hypot:eD,lcm:rD,log:nD,log2:oD,log1p:iD,log10:aD,mod:sD,multiply:uD,norm:cD,nthRoot:lD,nthRoots:pD,pow:fD,round:mD,sign:dD,sqrt:hD,sqrtm:vD,square:yD,subtract:ED,unaryMinus:AD,unaryPlus:ND,xgcd:TD,invmod:tD,bitAnd:wD,bitNot:DD,bitOr:SD,bitXor:CD,leftShift:_D,rightArithShift:MD,rightLogShift:OD,bellNumbers:RD,catalan:FD,composition:ID,stirlingS2:BD,config:bw,import:yw,typed:Ew,arg:LD,conj:PD,re:kD,im:UD,evaluate:qD,help:HD,distance:zD,intersect:GD,and:YD,not:jD,or:VD,xor:$D,concat:KD,count:WD,cross:QD,column:XD,ctranspose:ZD,det:JD,diag:eS,diff:tS,dot:rS,getMatrixDataType:sS,identity:uS,filter:aS,flatten:iS,forEach:oS,inv:cS,pinv:lS,eigs:nS,kron:pS,matrixFromFunction:dS,matrixFromRows:hS,matrixFromColumns:mS,map:fS,ones:vS,partitionSelect:gS,range:xS,resize:yS,reshape:bS,rotate:ES,rotationMatrix:AS,row:NS,size:TS,sort:wS,squeeze:DS,subset:SS,trace:CS,transpose:_S,zeros:MS,fft:OS,ifft:RS,sylvester:gD,schur:xD,lyap:bD,solveODE:v_,combinations:FS,combinationsWithRep:IS,factorial:BS,gamma:LS,kldivergence:US,lgamma:PS,multinomial:kS,permutations:qS,pickRandom:HS,random:zS,randomInt:GS,compare:YS,compareNatural:jS,compareText:VS,deepEqual:$S,equal:XS,equalText:KS,larger:WS,largerEq:QS,smaller:ZS,smallerEq:JS,unequal:eC,setCartesian:tC,setDifference:rC,setDistinct:nC,setIntersect:aC,setIsSubset:iC,setMultiplicity:oC,setPowerset:sC,setSize:uC,setSymDifference:cC,setUnion:lC,zpk2tf:pC,freqz:fC,erf:mC,zeta:dC,cumsum:TC,mad:hC,max:vC,mean:gC,median:xC,min:bC,mode:yC,prod:EC,quantileSeq:AC,std:NC,sum:wC,variance:DC,corr:SC,acos:CC,acosh:_C,acot:MC,acoth:OC,acsc:RC,acsch:FC,asec:IC,asech:BC,asin:LC,asinh:PC,atan:UC,atanh:qC,atan2:kC,cos:HC,cosh:zC,cot:GC,coth:YC,csc:jC,csch:VC,sec:$C,sech:XC,sin:KC,sinh:WC,tan:QC,tanh:ZC,to:JC,clone:t_,format:r_,bin:e_,oct:m_,hex:a_,isNaN:o_,isInteger:i_,isNegative:s_,isNumeric:u_,hasNumericValue:n_,isPositive:c_,isPrime:l_,isZero:p_,print:d_,typeOf:h_,numeric:f_};var x_="help",oq=["typed","mathWithTransform","Help"],b_=C(x_,oq,e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(x_,{any:function(i){var o,l=i;if(typeof i!="string"){for(o in r)if(Ie(r,o)&&i===r[o]){l=o;break}}var u=Ot(g_,l);if(!u){var s=typeof l=="function"?l.name:l;throw new Error('No documentation found on "'+s+'"')}return new n(u)}})});var y_="chain",sq=["typed","Chain"],E_=C(y_,sq,e=>{var{typed:t,Chain:r}=e;return t(y_,{"":function(){return new r},any:function(a){return new r(a)}})});var A_="det",uq=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],Ql=C(A_,uq,e=>{var{typed:t,matrix:r,subtractScalar:n,multiply:a,divideScalar:i,isZero:o,unaryMinus:l}=e;return t(A_,{any:function(c){return qe(c)},"Array | Matrix":function(c){var p;switch(Fe(c)?p=c.size():Array.isArray(c)?(c=r(c),p=c.size()):p=[],p.length){case 0:return qe(c);case 1:if(p[0]===1)return qe(c.valueOf()[0]);if(p[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+je(p)+")");case 2:{var f=p[0],m=p[1];if(f===m)return u(c.clone().valueOf(),f,m);if(m===0)return 1;throw new RangeError("Matrix must be square (size: "+je(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+je(p)+")")}}});function u(s,c,p){if(c===1)return qe(s[0][0]);if(c===2)return n(a(s[0][0],s[1][1]),a(s[1][0],s[0][1]));for(var f=!1,m=new Array(c).fill(0).map((S,A)=>A),h=0;h{var{typed:t,matrix:r,divideScalar:n,addScalar:a,multiply:i,unaryMinus:o,det:l,identity:u,abs:s}=e;return t(N_,{"Array | Matrix":function(f){var m=Fe(f)?f.size():Ge(f);switch(m.length){case 1:if(m[0]===1)return Fe(f)?r([n(1,f.valueOf()[0])]):[n(1,f[0])];throw new RangeError("Matrix must be square (size: "+je(m)+")");case 2:{var h=m[0],d=m[1];if(h===d)return Fe(f)?r(c(f.valueOf(),h,d),f.storage()):c(f,h,d);throw new RangeError("Matrix must be square (size: "+je(m)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+je(m)+")")}},any:function(f){return n(1,f)}});function c(p,f,m){var h,d,v,x,N;if(f===1){if(x=p[0][0],x===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,x)]]}else if(f===2){var g=l(p);if(g===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(p[1][1],g),n(o(p[0][1]),g)],[n(o(p[1][0]),g),n(p[0][0],g)]]}else{var y=p.concat();for(h=0;hS&&(S=s(y[h][b]),A=h),h++;if(S===0)throw Error("Cannot calculate inverse, determinant is zero");h=A,h!==b&&(N=y[b],y[b]=y[h],y[h]=N,N=E[b],E[b]=E[h],E[h]=N);var w=y[b],D=E[b];for(h=0;h{var{typed:t,matrix:r,inv:n,deepEqual:a,equal:i,dotDivide:o,dot:l,ctranspose:u,divideScalar:s,multiply:c,add:p,Complex:f}=e;return t(T_,{"Array | Matrix":function(g){var y=Fe(g)?g.size():Ge(g);switch(y.length){case 1:return x(g)?u(g):y[0]===1?n(g):o(u(g),l(g,g));case 2:{if(x(g))return u(g);var E=y[0],b=y[1];if(E===b)try{return n(g)}catch(S){if(!(S instanceof Error&&S.message.match(/Cannot calculate inverse, determinant is zero/)))throw S}return Fe(g)?r(m(g.valueOf(),E,b),g.storage()):m(g,E,b)}default:throw new RangeError("Matrix must be two dimensional (size: "+je(y)+")")}},any:function(g){return i(g,0)?qe(g):s(1,g)}});function m(N,g,y){var{C:E,F:b}=d(N,g,y),S=c(n(c(u(E),E)),u(E)),A=c(u(b),n(c(b,u(b))));return c(A,S)}function h(N,g,y){for(var E=qe(N),b=0,S=0;SA.filter((D,F)=>F!v(l(E[w],E[w])));return{C:b,F:S}}function v(N){return i(p(N,f(1,1)),p(0,f(1,1)))}function x(N){return a(p(N,f(1,1)),p(c(N,0),f(1,1)))}});var S_=Le(va(),1);function w_(e){var{addScalar:t,subtract:r,flatten:n,multiply:a,multiplyScalar:i,divideScalar:o,sqrt:l,abs:u,bignumber:s,diag:c,size:p,reshape:f,inv:m,qr:h,usolve:d,usolveAll:v,equal:x,complex:N,larger:g,smaller:y,matrixFromColumns:E,dot:b}=e;function S(Q,z,re,fe){var L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,I=A(Q,z,re,fe,L);w(Q,z,re,fe,L,I);var{values:$,C:H}=D(Q,z,re,fe,L);if(L){var ae=F(Q,z,H,I,$,re,fe);return{values:$,eigenvectors:ae}}return{values:$}}function A(Q,z,re,fe,L){var I=fe==="BigNumber",$=fe==="Complex",H=I?s(0):0,ae=I?s(1):$?N(1):1,ce=I?s(1):1,me=I?s(10):2,Ne=i(me,me),Me;L&&(Me=Array(z).fill(ae));for(var j=!1;!j;){j=!0;for(var X=0;X1&&(j=c(Array(me-1).fill(H)))),me-=1,ae.pop();for(var ge=0;ge2&&(j=c(Array(me-2).fill(H)))),me-=2,ae.pop(),ae.pop();for(var ye=0;ye+r(u(mt),u(Et))),X>100){var Qe=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+ce.join(", "));throw Qe.values=ce,Qe.vectors=[],Qe}var rt=L?a(Me,k(Ne,z)):void 0;return{values:ce,C:rt}}function F(Q,z,re,fe,L,I,$){var H=m(re),ae=a(H,Q,re),ce=$==="BigNumber",me=$==="Complex",Ne=ce?s(0):me?N(0):0,Me=ce?s(1):me?N(1):1,j=[],X=[];for(var se of L){var K=M(j,se,x);K===-1?(j.push(se),X.push(1)):X[K]+=1}for(var ee=[],ne=j.length,ve=Array(z).fill(Ne),ge=c(Array(z).fill(Me)),Oe=function(){var rt=j[ye],mt=r(ae,a(rt,ge)),Et=v(mt,ve);for(Et.shift();Et.lengtha(oe,pe)),ee.push(...Et.map(pe=>({value:rt,vector:n(pe)})))},ye=0;ye=5)return null;for(H=0;;){var ae=d(Q,$);if(y(Z(B($,[ae])),fe))break;if(++H>=10)return null;$=te(ae)}return $}function q(Q,z,re){var fe=re==="BigNumber",L=re==="Complex",I=Array(Q).fill(0).map($=>2*Math.random()-1);return fe&&(I=I.map($=>s($))),L&&(I=I.map($=>N($))),I=B(I,z),te(I,re)}function B(Q,z){var re=p(Q);for(var fe of z)fe=f(fe,re),Q=r(Q,a(o(b(fe,Q),b(fe,fe)),fe));return Q}function Z(Q){return u(l(b(Q,Q)))}function te(Q,z){var re=z==="BigNumber",fe=z==="Complex",L=re?s(1):fe?N(1):1;return a(o(L,Z(Q)),Q)}return S}function D_(e){var{config:t,addScalar:r,subtract:n,abs:a,atan:i,cos:o,sin:l,multiplyScalar:u,inv:s,bignumber:c,multiply:p,add:f}=e;function m(w,D){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.epsilon,R=arguments.length>3?arguments[3]:void 0,P=arguments.length>4?arguments[4]:void 0;if(R==="number")return h(w,F,P);if(R==="BigNumber")return d(w,F,P);throw TypeError("Unsupported data type: "+R)}function h(w,D,F){var R=w.length,P=Math.abs(D/R),U,k;if(F){k=new Array(R);for(var M=0;M=Math.abs(P);){var q=_[0][0],B=_[0][1];U=v(w[q][q],w[B][B],w[q][B]),w=E(w,U,q,B),F&&(k=N(k,U,q,B)),_=b(w)}for(var Z=Array(R).fill(0),te=0;te=a(P);){var q=_[0][0],B=_[0][1];U=x(w[q][q],w[B][B],w[q][B]),w=y(w,U,q,B),F&&(k=g(k,U,q,B)),_=S(w)}for(var Z=Array(R).fill(0),te=0;te({value:P[z],vector:Q}));return{values:P,eigenvectors:te}}return m}var pq="eigs",fq=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],dv=C(pq,fq,e=>{var{config:t,typed:r,matrix:n,addScalar:a,subtract:i,equal:o,abs:l,atan:u,cos:s,sin:c,multiplyScalar:p,divideScalar:f,inv:m,bignumber:h,multiply:d,add:v,larger:x,column:N,flatten:g,number:y,complex:E,sqrt:b,diag:S,size:A,reshape:w,qr:D,usolve:F,usolveAll:R,im:P,re:U,smaller:k,matrixFromColumns:M,dot:_}=e,q=D_({config:t,addScalar:a,subtract:i,column:N,flatten:g,equal:o,abs:l,atan:u,cos:s,sin:c,multiplyScalar:p,inv:m,bignumber:h,complex:E,multiply:d,add:v}),B=w_({config:t,addScalar:a,subtract:i,multiply:d,multiplyScalar:p,flatten:g,divideScalar:f,sqrt:b,abs:l,bignumber:h,diag:S,size:A,reshape:w,qr:D,inv:m,usolve:F,usolveAll:R,equal:o,complex:E,larger:x,smaller:k,matrixFromColumns:M,dot:_});return r("eigs",{Array:function(I){return Z(n(I))},"Array, number|BigNumber":function(I,$){return Z(n(I),{precision:$})},"Array, Object"(L,I){return Z(n(L),I)},Matrix:function(I){return Z(I,{matricize:!0})},"Matrix, number|BigNumber":function(I,$){return Z(I,{precision:$,matricize:!0})},"Matrix, Object":function(I,$){var H={matricize:!0};return(0,S_.default)(H,$),Z(I,H)}});function Z(L){var I,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H="eigenvectors"in $?$.eigenvectors:!0,ae=(I=$.precision)!==null&&I!==void 0?I:t.epsilon,ce=te(L,ae,H);return $.matricize&&(ce.values=n(ce.values),H&&(ce.eigenvectors=ce.eigenvectors.map(me=>{var{value:Ne,vector:Me}=me;return{value:Ne,vector:n(Me)}}))),H&&Object.defineProperty(ce,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),ce}function te(L,I,$){var H=L.toArray(),ae=L.size();if(ae.length!==2||ae[0]!==ae[1])throw new RangeError("Matrix must be square (size: ".concat(je(ae),")"));var ce=ae[0];if(z(H,ce,I)&&(re(H,ce),Q(H,ce,I))){var me=fe(L,H,ce);return q(H,ce,I,me,$)}var Ne=fe(L,H,ce);return B(H,ce,I,Ne,$)}function Q(L,I,$){for(var H=0;H{var{typed:t,abs:r,add:n,identity:a,inv:i,multiply:o}=e;return t(C_,{Matrix:function(p){var f=p.size();if(f.length!==2||f[0]!==f[1])throw new RangeError("Matrix must be square (size: "+je(f)+")");for(var m=f[0],h=1e-15,d=l(p),v=u(d,h),x=v.q,N=v.j,g=o(p,Math.pow(2,-N)),y=a(m),E=a(m),b=1,S=g,A=-1,w=1;w<=x;w++)w>1&&(S=o(S,g),A=-A),b=b*(x-w+1)/((2*x-w+1)*w),y=n(y,o(b,S)),E=n(E,o(b*A,S));for(var D=o(i(E),y),F=0;F{var{typed:t,abs:r,add:n,multiply:a,map:i,sqrt:o,subtract:l,inv:u,size:s,max:c,identity:p}=e,f=1e3,m=1e-6;function h(d){var v,x=0,N=d,g=p(s(d));do{var y=N;if(N=a(.5,n(y,u(g))),g=a(.5,n(g,u(y))),v=c(r(l(N,y))),v>m&&++x>f)throw new Error("computing square root of matrix: iterative method could not converge")}while(v>m);return N}return t(__,{"Array | Matrix":function(v){var x=Fe(v)?v.size():Ge(v);switch(x.length){case 1:if(x[0]===1)return i(v,o);throw new RangeError("Matrix must be square (size: "+je(x)+")");case 2:{var N=x[0],g=x[1];if(N===g)return h(v);throw new RangeError("Matrix must be square (size: "+je(x)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+je(x)+")")}}})});var M_="sylvester",hq=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],gv=C(M_,hq,e=>{var{typed:t,schur:r,matrixFromColumns:n,matrix:a,multiply:i,range:o,concat:l,transpose:u,index:s,subset:c,add:p,subtract:f,identity:m,lusolve:h,abs:d}=e;return t(M_,{"Matrix, Matrix, Matrix":v,"Array, Matrix, Matrix":function(N,g,y){return v(a(N),g,y)},"Array, Array, Matrix":function(N,g,y){return v(a(N),a(g),y)},"Array, Matrix, Array":function(N,g,y){return v(a(N),g,a(y))},"Matrix, Array, Matrix":function(N,g,y){return v(N,a(g),y)},"Matrix, Array, Array":function(N,g,y){return v(N,a(g),a(y))},"Matrix, Matrix, Array":function(N,g,y){return v(N,g,a(y))},"Array, Array, Array":function(N,g,y){return v(a(N),a(g),a(y)).toArray()}});function v(x,N,g){for(var y=N.size()[0],E=x.size()[0],b=r(x),S=b.T,A=b.U,w=r(i(-1,N)),D=w.T,F=w.U,R=i(i(u(A),g),F),P=o(0,E),U=[],k=(me,Ne)=>l(me,Ne,1),M=(me,Ne)=>l(me,Ne,0),_=0;_1e-5){for(var q=M(c(R,s(P,_)),c(R,s(P,_+1))),B=0;B<_;B++)q=p(q,M(i(U[B],c(D,s(B,_))),i(U[B],c(D,s(B,_+1)))));var Z=i(m(E),i(-1,c(D,s(_,_)))),te=i(m(E),i(-1,c(D,s(_+1,_)))),Q=i(m(E),i(-1,c(D,s(_,_+1)))),z=i(m(E),i(-1,c(D,s(_+1,_+1)))),re=M(k(p(S,Z),te),k(Q,p(S,z))),fe=h(re,q);U[_]=fe.subset(s(o(0,E),0)),U[_+1]=fe.subset(s(o(E,2*E),0)),_++}else{for(var L=c(R,s(P,_)),I=0;I<_;I++)L=p(L,i(U[I],c(D,s(I,_))));var $=c(D,s(_,_)),H=f(S,i($,m(E)));U[_]=h(H,L)}var ae=a(n(...U)),ce=i(A,i(ae,u(F)));return ce}});var O_="schur",vq=["typed","matrix","identity","multiply","qr","norm","subtract"],xv=C(O_,vq,e=>{var{typed:t,matrix:r,identity:n,multiply:a,qr:i,norm:o,subtract:l}=e;return t(O_,{Array:function(c){var p=u(r(c));return{U:p.U.valueOf(),T:p.T.valueOf()}},Matrix:function(c){return u(c)}});function u(s){var c=s.size()[0],p=s,f=n(c),m=0,h;do{h=p;var d=i(p),v=d.Q,x=d.R;if(p=a(x,v),f=a(f,v),m++>100)break}while(o(l(p,h))>1e-4);return{U:f,T:p}}});var R_="lyap",gq=["typed","matrix","sylvester","multiply","transpose"],bv=C(R_,gq,e=>{var{typed:t,matrix:r,sylvester:n,multiply:a,transpose:i}=e;return t(R_,{"Matrix, Matrix":function(l,u){return n(l,i(l),a(-1,u))},"Array, Matrix":function(l,u){return n(r(l),i(r(l)),a(-1,u))},"Matrix, Array":function(l,u){return n(l,i(r(l)),r(a(-1,u)))},"Array, Array":function(l,u){return n(r(l),i(r(l)),r(a(-1,u))).toArray()}})});var xq="divide",bq=["typed","matrix","multiply","equalScalar","divideScalar","inv"],Jl=C(xq,bq,e=>{var{typed:t,matrix:r,multiply:n,equalScalar:a,divideScalar:i,inv:o}=e,l=gt({typed:t,equalScalar:a}),u=Gt({typed:t});return t("divide",pc({"Array | Matrix, Array | Matrix":function(c,p){return n(c,o(p))},"DenseMatrix, any":function(c,p){return u(c,p,i,!1)},"SparseMatrix, any":function(c,p){return l(c,p,i,!1)},"Array, any":function(c,p){return u(r(c),p,i,!1).valueOf()},"any, Array | Matrix":function(c,p){return n(c,o(p))}},i.signatures))});var F_="distance",yq=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],yv=C(F_,yq,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:o,sqrt:l,abs:u}=e;return t(F_,{"Array, Array, Array":function(E,b,S){if(E.length===2&&b.length===2&&S.length===2){if(!c(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(b))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(b,S))throw new TypeError("LinePoint1 should not be same with LinePoint2");var A=n(S[1],b[1]),w=n(b[0],S[0]),D=n(a(S[0],b[1]),a(b[0],S[1]));return v(E[0],E[1],A,w,D)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(E,b,S){if(Object.keys(E).length===2&&Object.keys(b).length===2&&Object.keys(S).length===2){if(!c(E))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(S))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(h(b),h(S)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in E&&"pointY"in E&&"lineOnePtX"in b&&"lineOnePtY"in b&&"lineTwoPtX"in S&&"lineTwoPtY"in S){var A=n(S.lineTwoPtY,b.lineOnePtY),w=n(b.lineOnePtX,S.lineTwoPtX),D=n(a(S.lineTwoPtX,b.lineOnePtY),a(b.lineOnePtX,S.lineTwoPtY));return v(E.pointX,E.pointY,A,w,D)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(E,b){if(E.length===2&&b.length===3){if(!c(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!p(b))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return v(E[0],E[1],b[0],b[1],b[2])}else if(E.length===3&&b.length===6){if(!p(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!m(b))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return x(E[0],E[1],E[2],b[0],b[1],b[2],b[3],b[4],b[5])}else if(E.length===b.length&&E.length>0){if(!f(E))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!f(b))throw new TypeError("All values of an array should be numbers or BigNumbers");return N(E,b)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(E,b){if(Object.keys(E).length===2&&Object.keys(b).length===3){if(!c(E))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!p(b))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in E&&"pointY"in E&&"xCoeffLine"in b&&"yCoeffLine"in b&&"constant"in b)return v(E.pointX,E.pointY,b.xCoeffLine,b.yCoeffLine,b.constant);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===3&&Object.keys(b).length===6){if(!p(E))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!m(b))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in E&&"pointY"in E&&"x0"in b&&"y0"in b&&"z0"in b&&"a"in b&&"b"in b&&"c"in b)return x(E.pointX,E.pointY,E.pointZ,b.x0,b.y0,b.z0,b.a,b.b,b.c);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===2&&Object.keys(b).length===2){if(!c(E))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in E&&"pointOneY"in E&&"pointTwoX"in b&&"pointTwoY"in b)return N([E.pointOneX,E.pointOneY],[b.pointTwoX,b.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===3&&Object.keys(b).length===3){if(!p(E))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!p(b))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in E&&"pointOneY"in E&&"pointOneZ"in E&&"pointTwoX"in b&&"pointTwoY"in b&&"pointTwoZ"in b)return N([E.pointOneX,E.pointOneY,E.pointOneZ],[b.pointTwoX,b.pointTwoY,b.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(E){if(!d(E))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return g(E)}});function s(y){return typeof y=="number"||Ue(y)}function c(y){return y.constructor!==Array&&(y=h(y)),s(y[0])&&s(y[1])}function p(y){return y.constructor!==Array&&(y=h(y)),s(y[0])&&s(y[1])&&s(y[2])}function f(y){return Array.isArray(y)||(y=h(y)),y.every(s)}function m(y){return y.constructor!==Array&&(y=h(y)),s(y[0])&&s(y[1])&&s(y[2])&&s(y[3])&&s(y[4])&&s(y[5])}function h(y){for(var E=Object.keys(y),b=[],S=0;SE.length!==2||!s(E[0])||!s(E[1])))return!1}else if(y[0].length===3&&s(y[0][0])&&s(y[0][1])&&s(y[0][2])){if(y.some(E=>E.length!==3||!s(E[0])||!s(E[1])||!s(E[2])))return!1}else return!1;return!0}function v(y,E,b,S,A){var w=u(r(r(a(b,y),a(S,E)),A)),D=l(r(a(b,b),a(S,S)));return i(w,D)}function x(y,E,b,S,A,w,D,F,R){var P=[n(a(n(A,E),R),a(n(w,b),F)),n(a(n(w,b),D),a(n(S,y),R)),n(a(n(S,y),F),a(n(A,E),D))];P=l(r(r(a(P[0],P[0]),a(P[1],P[1])),a(P[2],P[2])));var U=l(r(r(a(D,D),a(F,F)),a(R,R)));return i(P,U)}function N(y,E){for(var b=y.length,S=0,A=0,w=0;w{var{typed:t,config:r,abs:n,add:a,addScalar:i,matrix:o,multiply:l,multiplyScalar:u,divideScalar:s,subtract:c,smaller:p,equalScalar:f,flatten:m,isZero:h,isNumeric:d}=e;return t("intersect",{"Array, Array, Array":v,"Array, Array, Array, Array":x,"Matrix, Matrix, Matrix":function(F,R,P){var U=v(F.valueOf(),R.valueOf(),P.valueOf());return U===null?null:o(U)},"Matrix, Matrix, Matrix, Matrix":function(F,R,P,U){var k=x(F.valueOf(),R.valueOf(),P.valueOf(),U.valueOf());return k===null?null:o(k)}});function v(D,F,R){if(D=N(D),F=N(F),R=N(R),!y(D))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!y(F))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!E(R))throw new TypeError("Array with 4 numbers expected as third argument");return w(D[0],D[1],D[2],F[0],F[1],F[2],R[0],R[1],R[2],R[3])}function x(D,F,R,P){if(D=N(D),F=N(F),R=N(R),P=N(P),D.length===2){if(!g(D))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!g(F))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!g(R))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!g(P))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return b(D,F,R,P)}else if(D.length===3){if(!y(D))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!y(F))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!y(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!y(P))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return A(D[0],D[1],D[2],F[0],F[1],F[2],R[0],R[1],R[2],P[0],P[1],P[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function N(D){return D.length===1?D[0]:D.length>1&&Array.isArray(D[0])&&D.every(F=>Array.isArray(F)&&F.length===1)?m(D):D}function g(D){return D.length===2&&d(D[0])&&d(D[1])}function y(D){return D.length===3&&d(D[0])&&d(D[1])&&d(D[2])}function E(D){return D.length===4&&d(D[0])&&d(D[1])&&d(D[2])&&d(D[3])}function b(D,F,R,P){var U=D,k=R,M=c(U,F),_=c(k,P),q=c(u(M[0],_[1]),u(_[0],M[1]));if(h(q)||p(n(q),r.epsilon))return null;var B=u(_[0],U[1]),Z=u(_[1],U[0]),te=u(_[0],k[1]),Q=u(_[1],k[0]),z=s(i(c(c(B,Z),te),Q),q);return a(l(M,z),U)}function S(D,F,R,P,U,k,M,_,q,B,Z,te){var Q=u(c(D,F),c(R,P)),z=u(c(U,k),c(M,_)),re=u(c(q,B),c(Z,te));return i(i(Q,z),re)}function A(D,F,R,P,U,k,M,_,q,B,Z,te){var Q=S(D,M,B,M,F,_,Z,_,R,q,te,q),z=S(B,M,P,D,Z,_,U,F,te,q,k,R),re=S(D,M,P,D,F,_,U,F,R,q,k,R),fe=S(B,M,B,M,Z,_,Z,_,te,q,te,q),L=S(P,D,P,D,U,F,U,F,k,R,k,R),I=c(u(Q,z),u(re,fe)),$=c(u(L,fe),u(z,z));if(h($))return null;var H=s(I,$),ae=s(i(Q,u(H,z)),fe),ce=i(D,u(H,c(P,D))),me=i(F,u(H,c(U,F))),Ne=i(R,u(H,c(k,R))),Me=i(M,u(ae,c(B,M))),j=i(_,u(ae,c(Z,_))),X=i(q,u(ae,c(te,q)));return f(ce,Me)&&f(me,j)&&f(Ne,X)?[ce,me,Ne]:null}function w(D,F,R,P,U,k,M,_,q,B){var Z=u(D,M),te=u(P,M),Q=u(F,_),z=u(U,_),re=u(R,q),fe=u(k,q),L=c(c(c(B,Z),Q),re),I=c(c(c(i(i(te,z),fe),Z),Q),re),$=s(L,I),H=i(D,u($,c(P,D))),ae=i(F,u($,c(U,F))),ce=i(R,u($,c(k,R)));return[H,ae,ce]}});var I_="sum",Nq=["typed","config","add","numeric"],Ms=C(I_,Nq,e=>{var{typed:t,config:r,add:n,numeric:a}=e;return t(I_,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":o,"...":function(u){if(ln(u))throw new TypeError("Scalar values expected in function sum");return i(u)}});function i(l){var u;return gr(l,function(s){try{u=u===void 0?s:n(u,s)}catch(c){throw qt(c,"sum",s)}}),u===void 0&&(u=a(0,r.number)),typeof u=="string"&&(u=a(u,r.number)),u}function o(l,u){try{var s=wa(l,u,n);return s}catch(c){throw qt(c,"sum")}}});var ep="cumsum",Tq=["typed","add","unaryPlus"],Os=C(ep,Tq,e=>{var{typed:t,add:r,unaryPlus:n}=e;return t(ep,{Array:a,Matrix:function(s){return s.create(a(s.valueOf()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(s,c){return s.create(o(s.valueOf(),c))},"...":function(s){if(ln(s))throw new TypeError("All values expected to be scalar in function cumsum");return a(s)}});function a(u){try{return i(u)}catch(s){throw qt(s,ep)}}function i(u){if(u.length===0)return[];for(var s=[n(u[0])],c=1;c=c.length)throw new nr(s,c.length);try{return l(u,s)}catch(p){throw qt(p,ep)}}function l(u,s){var c,p,f;if(s<=0){var m=u[0][0];if(Array.isArray(m)){for(f=Uc(u),p=[],c=0;c{var{typed:t,add:r,divide:n}=e;return t(B_,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(l){if(ln(l))throw new TypeError("Scalar values expected in function mean");return i(l)}});function a(o,l){try{var u=wa(o,l,r),s=Array.isArray(o)?Ge(o):o.size();return n(u,s[l])}catch(c){throw qt(c,"mean")}}function i(o){var l,u=0;if(gr(o,function(s){try{l=l===void 0?s:r(l,s),u++}catch(c){throw qt(c,"mean",s)}}),u===0)throw new Error("Cannot calculate the mean of an empty array");return n(l,u)}});var L_="median",Dq=["typed","add","divide","compare","partitionSelect"],Av=C(L_,Dq,e=>{var{typed:t,add:r,divide:n,compare:a,partitionSelect:i}=e;function o(s){try{s=Ze(s.valueOf());var c=s.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var p=c/2-1,f=i(s,p+1),m=s[p],h=0;h0&&(m=s[h]);return u(m,f)}else{var d=i(s,(c-1)/2);return l(d)}}catch(v){throw qt(v,"median")}}var l=t({"number | BigNumber | Complex | Unit":function(c){return c}}),u=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,p){return n(r(c,p),2)}});return t(L_,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,p){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(ln(c))throw new TypeError("Scalar values expected in function median");return o(c)}})});var P_="mad",Sq=["typed","abs","map","median","subtract"],Nv=C(P_,Sq,e=>{var{typed:t,abs:r,map:n,median:a,subtract:i}=e;return t(P_,{"Array | Matrix":o,"...":function(u){return o(u)}});function o(l){if(l=Ze(l.valueOf()),l.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var u=a(l);return a(n(l,function(s){return r(i(s,u))}))}catch(s){throw s instanceof TypeError&&s.message.includes("median")?new TypeError(s.message.replace("median","mad")):qt(s,"mad")}}});var Tv="unbiased",U_="variance",Cq=["typed","add","subtract","multiply","divide","apply","isNaN"],Fs=C(U_,Cq,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,apply:o,isNaN:l}=e;return t(U_,{"Array | Matrix":function(p){return u(p,Tv)},"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":function(p,f){return s(p,f,Tv)},"Array | Matrix, number | BigNumber, string":s,"...":function(p){return u(p,Tv)}});function u(c,p){var f,m=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(gr(c,function(v){try{f=f===void 0?v:r(f,v),m++}catch(x){throw qt(x,"variance",v)}}),m===0)throw new Error("Cannot calculate variance of an empty array");var h=i(f,m);if(f=void 0,gr(c,function(v){var x=n(v,h);f=f===void 0?a(x,x):r(f,a(x,x))}),l(f))return f;switch(p){case"uncorrected":return i(f,m);case"biased":return i(f,m+1);case"unbiased":{var d=Ue(f)?f.mul(0):0;return m===1?d:i(f,m-1)}default:throw new Error('Unknown normalization "'+p+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function s(c,p,f){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,p,m=>u(m,f))}catch(m){throw qt(m,"variance")}}});var k_="quantileSeq",_q=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],Is=C(k_,_q,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:l,compare:u,isInteger:s,smaller:c,smallerEq:p,larger:f}=e,m=ii({typed:t,isInteger:s});return t(k_,{"Array | Matrix, number | BigNumber":(N,g)=>d(N,g,!1),"Array | Matrix, number | BigNumber, number":(N,g,y)=>h(N,g,!1,y,d),"Array | Matrix, number | BigNumber, boolean":d,"Array | Matrix, number | BigNumber, boolean, number":(N,g,y,E)=>h(N,g,y,E,d),"Array | Matrix, Array | Matrix":(N,g)=>v(N,g,!1),"Array | Matrix, Array | Matrix, number":(N,g,y)=>h(N,g,!1,y,v),"Array | Matrix, Array | Matrix, boolean":v,"Array | Matrix, Array | Matrix, boolean, number":(N,g,y,E)=>h(N,g,y,E,v)});function h(N,g,y,E,b){return m(N,E,S=>b(S,g,y))}function d(N,g,y){var E,b=N.valueOf();if(c(g,0))throw new Error("N/prob must be non-negative");if(p(g,1))return ze(g)?x(b,g,y):r(x(b,g,y));if(f(g,1)){if(!s(g))throw new Error("N must be a positive integer");if(f(g,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var S=n(g,1);E=[];for(var A=0;c(A,g);A++){var w=i(A+1,S);E.push(x(b,w,y))}return ze(g)?E:r(E)}}function v(N,g,y){for(var E=N.valueOf(),b=g.valueOf(),S=[],A=0;A0&&(D=E[R])}return n(o(D,a(1,w)),o(F,w))}});var q_="std",Mq=["typed","map","sqrt","variance"],Bs=C(q_,Mq,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e;return t(q_,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(l){return i(l)}});function i(o,l){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var u=a.apply(null,arguments);return Lt(u)?r(u,n):n(u)}catch(s){throw s instanceof TypeError&&s.message.includes(" variance")?new TypeError(s.message.replace(" variance"," std")):s}}});var H_="corr",Oq=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],wv=C(H_,Oq,e=>{var{typed:t,matrix:r,sqrt:n,sum:a,add:i,subtract:o,multiply:l,pow:u,divide:s}=e;return t(H_,{"Array, Array":function(m,h){return c(m,h)},"Matrix, Matrix":function(m,h){var d=c(m.toArray(),h.toArray());return Array.isArray(d)?r(d):d}});function c(f,m){var h=[];if(Array.isArray(f[0])&&Array.isArray(m[0])){if(f.length!==m.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var d=0;di(b,l(S,m[A])),0),N=a(f.map(b=>u(b,2))),g=a(m.map(b=>u(b,2))),y=o(l(h,x),l(d,v)),E=n(l(o(l(h,N),u(d,2)),o(l(h,g),u(v,2))));return s(y,E)}});var z_="combinations",Rq=["typed"],Dv=C(z_,Rq,e=>{var{typed:t}=e;return t(z_,{"number, number":zm,"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,l,u=n.minus(a),s=new i(1);if(!G_(n)||!G_(a))throw new TypeError("Positive integer value expected in function combinations");if(a.gt(n))throw new TypeError("k must be less than n in function combinations");if(o=s,a.lt(u))for(l=s;l.lte(u);l=l.plus(s))o=o.times(a.plus(l)).dividedBy(l);else for(l=s;l.lte(a);l=l.plus(s))o=o.times(u.plus(l)).dividedBy(l);return o}})});function G_(e){return e.isInteger()&&e.gte(0)}var Y_="combinationsWithRep",Fq=["typed"],Sv=C(Y_,Fq,e=>{var{typed:t}=e;return t(Y_,{"number, number":function(n,a){if(!Re(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Re(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(a{var{typed:t,config:r,multiplyScalar:n,pow:a,BigNumber:i,Complex:o}=e;function l(s){if(s.im===0)return us(s.re);if(s.re<.5){var c=new o(1-s.re,-s.im),p=new o(Math.PI*s.re,Math.PI*s.im);return new o(Math.PI).div(p.sin()).div(l(c))}s=new o(s.re-1,s.im);for(var f=new o(ai[0],0),m=1;m2;)f-=2,h+=f,m=m.times(h);return new i(m.toPrecision(i.precision))}});var $_="lgamma",Bq=["Complex","typed"],_v=C($_,Bq,e=>{var{Complex:t,typed:r}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return r($_,{number:cs,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(s){var c=6.283185307179586,p=1.1447298858494002,f=.1;if(s.isNaN())return new t(NaN,NaN);if(s.im===0)return new t(cs(s.re),0);if(s.re>=n||Math.abs(s.im)>=a)return l(s);if(s.re<=f){var m=Ry(c,s.im)*Math.floor(.5*s.re+.25),h=s.mul(Math.PI).sin().log(),d=o(new t(1-s.re,-s.im));return new t(p,m).sub(h).sub(d)}else return s.im>=0?u(s):u(s.conjugate()).conjugate()}function l(s){for(var c=s.sub(.5).mul(s.log()).sub(s).add(Km),p=new t(1,0).div(s),f=p.div(s),m=i[0],h=i[1],d=2*f.re,v=f.re*f.re+f.im*f.im,x=2;x<8;x++){var N=h;h=-v*m+i[x],m=d*m+N}var g=p.mul(f.mul(m).add(h));return c.add(g)}function u(s){var c=0,p=0,f=s;for(s=s.add(1);s.re<=n;){f=f.mul(s);var m=f.im<0?1:0;m!==0&&p===0&&c++,p=m,s=s.add(1)}return l(s).sub(f.log()).sub(new t(0,c*2*Math.PI*1))}});var X_="factorial",Lq=["typed","gamma"],Mv=C(X_,Lq,e=>{var{typed:t,gamma:r}=e;return t(X_,{number:function(a){if(a<0)throw new Error("Value must be non-negative");return r(a+1)},BigNumber:function(a){if(a.isNegative())throw new Error("Value must be non-negative");return r(a.plus(1))},"Array | Matrix":t.referToSelf(n=>a=>Pe(a,n))})});var K_="kldivergence",Pq=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],Ov=C(K_,Pq,e=>{var{typed:t,matrix:r,divide:n,sum:a,multiply:i,map:o,dotDivide:l,log:u,isNumeric:s}=e;return t(K_,{"Array, Array":function(f,m){return c(r(f),r(m))},"Matrix, Array":function(f,m){return c(f,r(m))},"Array, Matrix":function(f,m){return c(r(f),m)},"Matrix, Matrix":function(f,m){return c(f,m)}});function c(p,f){var m=f.size().length,h=p.size().length;if(m>1)throw new Error("first object must be one dimensional");if(h>1)throw new Error("second object must be one dimensional");if(m!==h)throw new Error("Length of two vectors must be equal");var d=a(p);if(d===0)throw new Error("Sum of elements in first object must be non zero");var v=a(f);if(v===0)throw new Error("Sum of elements in second object must be non zero");var x=n(p,a(p)),N=n(f,a(f)),g=a(i(x,o(l(x,N),y=>u(y))));return s(g)?g:Number.NaN}});var W_="multinomial",Uq=["typed","add","divide","multiply","factorial","isInteger","isPositive"],Rv=C(W_,Uq,e=>{var{typed:t,add:r,divide:n,multiply:a,factorial:i,isInteger:o,isPositive:l}=e;return t(W_,{"Array | Matrix":function(s){var c=0,p=1;return gr(s,function(f){if(!o(f)||!l(f))throw new TypeError("Positive integer value expected in function multinomial");c=r(c,f),p=a(p,i(f))}),n(i(c),p)}})});var Q_="permutations",kq=["typed","factorial"],Fv=C(Q_,kq,e=>{var{typed:t,factorial:r}=e;return t(Q_,{"number | BigNumber":r,"number, number":function(a,i){if(!Re(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!Re(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>a)throw new TypeError("second argument k must be less than or equal to first argument n");return Kr(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var o,l;if(!Z_(a)||!Z_(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(a))throw new TypeError("second argument k must be less than or equal to first argument n");var u=a.mul(0).add(1);for(o=u,l=a.minus(i).plus(1);l.lte(a);l=l.plus(1))o=o.times(l);return o}})});function Z_(e){return e.isInteger()&&e.gte(0)}var qv=Le(d3(),1),Vq=(0,qv.default)(Date.now());function ia(e){var t;function r(a){t=a===null?Vq:(0,qv.default)(String(a))}r(e);function n(){return t()}return n}var h3="pickRandom",$q=["typed","config","?on"],Hv=C(h3,$q,e=>{var{typed:t,config:r,on:n}=e,a=ia(r.randomSeed);return n&&n("config",function(o,l){o.randomSeed!==l.randomSeed&&(a=ia(o.randomSeed))}),t(h3,{"Array | Matrix":function(l){return i(l,{})},"Array | Matrix, Object":function(l,u){return i(l,u)},"Array | Matrix, number":function(l,u){return i(l,{number:u})},"Array | Matrix, Array | Matrix":function(l,u){return i(l,{weights:u})},"Array | Matrix, Array | Matrix, number":function(l,u,s){return i(l,{number:s,weights:u})},"Array | Matrix, number, Array | Matrix":function(l,u,s){return i(l,{number:u,weights:s})}});function i(o,l){var{number:u,weights:s,elementWise:c=!0}=l,p=typeof u>"u";p&&(u=1);var f=Fe(o)?o.create:Fe(s)?s.create:null;o=o.valueOf(),s&&(s=s.valueOf()),c===!0&&(o=Ze(o),s=Ze(s));var m=0;if(typeof s<"u"){if(s.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var h=0,d=s.length;h"u")N=o[Math.floor(a()*v)];else for(var g=a()*m,y=0,E=o.length;y1)for(var n=0,a=e.shift();n{var{typed:t,config:r,on:n}=e,a=ia(r.randomSeed);return n&&n("config",function(l,u){l.randomSeed!==u.randomSeed&&(a=ia(l.randomSeed))}),t(v3,{"":()=>o(0,1),number:l=>o(0,l),"number, number":(l,u)=>o(l,u),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,u)=>i(l,0,u),"Array | Matrix, number, number":(l,u,s)=>i(l,u,s)});function i(l,u,s){var c=Ls(l.valueOf(),()=>o(u,s));return Fe(l)?l.create(c):c}function o(l,u){return l+a()*(u-l)}});var g3="randomInt",Kq=["typed","config","?on"],Gv=C(g3,Kq,e=>{var{typed:t,config:r,on:n}=e,a=ia(r.randomSeed);return n&&n("config",function(l,u){l.randomSeed!==u.randomSeed&&(a=ia(l.randomSeed))}),t(g3,{"":()=>o(0,1),number:l=>o(0,l),"number, number":(l,u)=>o(l,u),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,u)=>i(l,0,u),"Array | Matrix, number, number":(l,u,s)=>i(l,u,s)});function i(l,u,s){var c=Ls(l.valueOf(),()=>o(u,s));return Fe(l)?l.create(c):c}function o(l,u){return Math.floor(l+a()*(u-l))}});var x3="stirlingS2",Wq=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],Yv=C(x3,Wq,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,pow:o,factorial:l,combinations:u,isNegative:s,isInteger:c,number:p,bignumber:f,larger:m}=e,h=[],d=[];return t(x3,{"number | BigNumber, number | BigNumber":function(x,N){if(!c(x)||s(x)||!c(N)||s(N))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(m(N,x))throw new TypeError("k must be less than or equal to n in function stirlingS2");var g=!(ze(x)&&ze(N)),y=g?d:h,E=g?f:p,b=p(x),S=p(N);if(y[b]&&y[b].length>S)return y[b][S];for(var A=0;A<=b;++A)if(y[A]||(y[A]=[E(A===0?1:0)]),A!==0)for(var w=y[A],D=y[A-1],F=w.length;F<=A&&F<=S;++F)F===A?w[F]=1:w[F]=r(a(E(F),D[F]),D[F-1]);return y[b][S]}})});var b3="bellNumbers",Qq=["typed","addScalar","isNegative","isInteger","stirlingS2"],jv=C(b3,Qq,e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:a,stirlingS2:i}=e;return t(b3,{"number | BigNumber":function(l){if(!a(l)||n(l))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var u=0,s=0;s<=l;s++)u=r(u,i(l,s));return u}})});var y3="catalan",Zq=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],Vv=C(y3,Zq,e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:o,isInteger:l}=e;return t(y3,{"number | BigNumber":function(s){if(!l(s)||o(s))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(a(s,2),s),r(s,1))}})});var E3="composition",Jq=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],$v=C(E3,Jq,e=>{var{typed:t,addScalar:r,combinations:n,isPositive:a,isNegative:i,isInteger:o,larger:l}=e;return t(E3,{"number | BigNumber, number | BigNumber":function(s,c){if(!o(s)||!a(s)||!o(c)||!a(c))throw new TypeError("Positive integer value expected in function composition");if(l(c,s))throw new TypeError("k must be less than or equal to n in function composition");return n(r(s,-1),r(c,-1))}})});var A3="leafCount",eH=["parse","typed"],N3=C(A3,eH,e=>{var{parse:t,typed:r}=e;function n(a){var i=0;return a.forEach(o=>{i+=n(o)}),i||1}return r(A3,{Node:function(i){return n(i)}})});function Xv(e){return et(e)||Tt(e)&&e.isUnary()&&et(e.args[0])}function Ps(e){return!!(et(e)||(pr(e)||Tt(e))&&e.args.every(Ps)||er(e)&&Ps(e.content))}var w3=Le(ir(),1);function T3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kv(e){for(var t=1;t{var{FunctionNode:t,OperatorNode:r,SymbolNode:n}=e,a=!0,i=!1,o="defaultF",l={add:{trivial:a,total:a,commutative:a,associative:a},unaryPlus:{trivial:a,total:a,commutative:a,associative:a},subtract:{trivial:i,total:a,commutative:i,associative:i},multiply:{trivial:a,total:a,commutative:a,associative:a},divide:{trivial:i,total:a,commutative:i,associative:i},paren:{trivial:a,total:a,commutative:a,associative:i},defaultF:{trivial:i,total:a,commutative:i,associative:i}},u={divide:{total:i},log:{total:i}},s={subtract:{total:i},abs:{trivial:a},log:{total:a}};function c(g,y){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,b=o;if(typeof g=="string"?b=g:Tt(g)?b=g.fn.toString():pr(g)?b=g.name:er(g)&&(b="paren"),Ie(E,b)){var S=E[b];if(Ie(S,y))return S[y];if(Ie(l,b))return l[b][y]}if(Ie(E,o)){var A=E[o];return Ie(A,y)?A[y]:l[o][y]}if(Ie(l,b)){var w=l[b];if(Ie(w,y))return w[y]}return l[o][y]}function p(g){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return c(g,"commutative",y)}function f(g){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return c(g,"associative",y)}function m(g,y){var E=Kv({},g);for(var b in y)Ie(g,b)?E[b]=Kv(Kv({},y[b]),g[b]):E[b]=y[b];return E}function h(g,y){if(!g.args||g.args.length===0)return g;g.args=d(g,y);for(var E=0;E2&&f(g,y)){for(var A=g.args.pop();g.args.length>0;)A=E([g.args.pop(),A]);g.args=A.args}}}function x(g,y){if(!(!g.args||g.args.length===0)){for(var E=N(g),b=g.args.length,S=0;S2&&f(g,y)){for(var A=g.args.shift();g.args.length>0;)A=E([A,g.args.shift()]);g.args=A.args}}}function N(g){return Tt(g)?function(y){try{return new r(g.op,g.fn,y,g.implicit)}catch(E){return console.error(E),[]}}:function(y){return new t(new n(g.name),y)}}return{createMakeNodeFunction:N,hasProperty:c,isCommutative:p,isAssociative:f,mergeContext:m,flatten:h,allChildren:d,unflattenr:v,unflattenl:x,defaultContext:l,realContext:u,positiveContext:s}});var nH="simplify",aH=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],D3=C(nH,aH,e=>{var{config:t,typed:r,parse:n,add:a,subtract:i,multiply:o,divide:l,pow:u,isZero:s,equal:c,resolve:p,simplifyConstant:f,simplifyCore:m,fraction:h,bignumber:d,mathWithTransform:v,matrix:x,AccessorNode:N,ArrayNode:g,ConstantNode:y,FunctionNode:E,IndexNode:b,ObjectNode:S,OperatorNode:A,ParenthesisNode:w,SymbolNode:D}=e,{hasProperty:F,isCommutative:R,isAssociative:P,mergeContext:U,flatten:k,unflattenr:M,unflattenl:_,createMakeNodeFunction:q,defaultContext:B,realContext:Z,positiveContext:te}=io({FunctionNode:E,OperatorNode:A,SymbolNode:D});r.addConversion({from:"Object",to:"Map",convert:Jn});var Q=r("simplify",{Node:H,"Node, Map":(K,ee)=>H(K,!1,ee),"Node, Map, Object":(K,ee,ne)=>H(K,!1,ee,ne),"Node, Array":H,"Node, Array, Map":H,"Node, Array, Map, Object":H});r.removeConversion({from:"Object",to:"Map",convert:Jn}),Q.defaultContext=B,Q.realContext=Z,Q.positiveContext=te;function z(K){return K.transform(function(ee,ne,ve){return er(ee)?z(ee.content):ee})}var re={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};Q.rules=[m,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},f,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},f,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function fe(K,ee){var ne={};if(K.s){var ve=K.s.split("->");if(ve.length===2)ne.l=ve[0],ne.r=ve[1];else throw SyntaxError("Could not parse rule: "+K.s)}else ne.l=K.l,ne.r=K.r;ne.l=z(n(ne.l)),ne.r=z(n(ne.r));for(var ge of["imposeContext","repeat","assuming"])ge in K&&(ne[ge]=K[ge]);if(K.evaluate&&(ne.evaluate=n(K.evaluate)),P(ne.l,ee)){var Oe=!R(ne.l,ee),ye;Oe&&(ye=$());var Qe=q(ne.l),rt=$();ne.expanded={},ne.expanded.l=Qe([ne.l,rt]),k(ne.expanded.l,ee),M(ne.expanded.l,ee),ne.expanded.r=Qe([ne.r,rt]),Oe&&(ne.expandedNC1={},ne.expandedNC1.l=Qe([ye,ne.l]),ne.expandedNC1.r=Qe([ye,ne.r]),ne.expandedNC2={},ne.expandedNC2.l=Qe([ye,ne.expanded.l]),ne.expandedNC2.r=Qe([ye,ne.expanded.r]))}return ne}function L(K,ee){for(var ne=[],ve=0;ve2&&arguments[2]!==void 0?arguments[2]:xa(),ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ge=ve.consoleDebug;ee=L(ee||Q.rules,ve.context);var Oe=p(K,ne);Oe=z(Oe);for(var ye={},Qe=Oe.toString({parenthesis:"all"});!ye[Qe];){ye[Qe]=!0,I=0;var rt=Qe;ge&&console.log("Working on: ",Qe);for(var mt=0;mt ").concat(ee[mt].r.toString()))),ge){var W=Oe.toString({parenthesis:"all"});W!==rt&&(console.log("Applying",Et,"produced",W),rt=W)}_(Oe,ve.context)}Qe=Oe.toString({parenthesis:"all"})}return Oe}function ae(K,ee,ne){var ve=K;if(K)for(var ge=0;ge1&&(rt=Oe(K.args.slice(0,Qe))),ge=K.args.slice(Qe),ve=ge.length===1?ge[0]:Oe(ge),ne.push(Oe([rt,ve]))}return ne}function Ne(K,ee){var ne={placeholders:{}};if(!K.placeholders&&!ee.placeholders)return ne;if(K.placeholders){if(!ee.placeholders)return K}else return ee;for(var ve in K.placeholders)if(Ie(K.placeholders,ve)&&(ne.placeholders[ve]=K.placeholders[ve],Ie(ee.placeholders,ve)&&!se(K.placeholders[ve],ee.placeholders[ve])))return null;for(var ge in ee.placeholders)Ie(ee.placeholders,ge)&&(ne.placeholders[ge]=ee.placeholders[ge]);return ne}function Me(K,ee){var ne=[];if(K.length===0||ee.length===0)return ne;for(var ve,ge=0;ge2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var rt=X(K.args[0],ee.args[1],ne);if(rt.length===0)return[];var mt=X(K.args[1],ee.args[0],ne);if(mt.length===0)return[];Oe=[rt,mt]}ge=j(Oe)}else if(ee.args.length>=2&&K.args.length===2){for(var Et=me(ee,ne),W=[],oe=0;oe2)throw Error("Unexpected non-binary associative function: "+K.toString());return[]}}else if(K instanceof D){if(K.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(re[K.name]){if(K.name!==ee.name)return[]}else switch(K.name[1]>="a"&&K.name[1]<="z"?K.name.substring(0,2):K.name[0]){case"n":case"_p":ge[0].placeholders[K.name]=ee;break;case"c":case"cl":if(et(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"v":if(!et(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"vl":if(bt(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"cd":if(Xv(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"vd":if(!Xv(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"ce":if(Ps(ee))ge[0].placeholders[K.name]=ee;else return[];break;case"ve":if(!Ps(ee))ge[0].placeholders[K.name]=ee;else return[];break;default:throw new Error("Invalid symbol in rule: "+K.name)}}else if(K instanceof y){if(!c(K.value,ee.value))return[]}else return[];return ge}function se(K,ee){if(K instanceof y&&ee instanceof y){if(!c(K.value,ee.value))return!1}else if(K instanceof D&&ee instanceof D){if(K.name!==ee.name)return!1}else if(K instanceof A&&ee instanceof A||K instanceof E&&ee instanceof E){if(K instanceof A){if(K.op!==ee.op||K.fn!==ee.fn)return!1}else if(K instanceof E&&K.name!==ee.name)return!1;if(K.args.length!==ee.args.length)return!1;for(var ne=0;ne{var{typed:t,config:r,mathWithTransform:n,matrix:a,fraction:i,bignumber:o,AccessorNode:l,ArrayNode:u,ConstantNode:s,FunctionNode:c,IndexNode:p,ObjectNode:f,OperatorNode:m,SymbolNode:h}=e,{isCommutative:d,isAssociative:v,allChildren:x,createMakeNodeFunction:N}=io({FunctionNode:c,OperatorNode:m,SymbolNode:h}),g=t("simplifyConstant",{Node:k=>S(U(k,{})),"Node, Object":function(M,_){return S(U(M,_))}});function y(k){return $r(k)?k.valueOf():k instanceof Array?k.map(y):Fe(k)?a(y(k.valueOf())):k}function E(k,M,_){try{return n[k].apply(null,M)}catch{return M=M.map(y),w(n[k].apply(null,M),_)}}var b=t({Fraction:F,number:function(M){return M<0?D(new s(-M)):new s(M)},BigNumber:function(M){return M<0?D(new s(-M)):new s(M)},Complex:function(M){throw new Error("Cannot convert Complex number to Node")},string:function(M){return new s(M)},Matrix:function(M){return new u(M.valueOf().map(_=>b(_)))}});function S(k){return nt(k)?k:b(k)}function A(k,M){var _=M&&M.exactFractions!==!1;if(_&&isFinite(k)&&i){var q=i(k),B=M&&typeof M.fractionsLimit=="number"?M.fractionsLimit:1/0;if(q.valueOf()===k&&q.n0;)if(et(q[0])&&typeof q[0].value!="string"){var B=w(q.shift().value,_);Jt(k)?k=k.items[B-1]:(k=k.valueOf()[B-1],k instanceof Array&&(k=a(k)))}else if(q.length>1&&et(q[1])&&typeof q[1].value!="string"){var Z=w(q[1].value,_),te=[],Q=Jt(k)?k.items:k.valueOf();for(var z of Q)if(Jt(z))te.push(z.items[Z-1]);else if(Fe(k))te.push(z[Z-1]);else break;if(te.length===Q.length)Jt(k)?k=new u(te):k=a(te),q.splice(1,1);else break}else break;return q.length===M.dimensions.length?new l(S(k),M):q.length>0?(M=new p(q),new l(S(k),M)):k}if(qn(k)&&M.dimensions.length===1&&et(M.dimensions[0])){var re=M.dimensions[0].value;return re in k.properties?k.properties[re]:new s}return new l(S(k),M)}function P(k,M,_,q){var B=M.shift(),Z=M.reduce((te,Q)=>{if(!nt(Q)){var z=te.pop();if(nt(z))return[z,Q];try{return te.push(E(k,[z,Q],q)),te}catch{te.push(z)}}te.push(S(te.pop()));var re=te.length===1?te[0]:_(te);return[_([re,S(Q)])]},[B]);return Z.length===1?Z[0]:_([Z[0],b(Z[1])])}function U(k,M){switch(k.type){case"SymbolNode":return k;case"ConstantNode":switch(typeof k.value){case"number":return w(k.value,M);case"string":return k.value;default:if(!isNaN(k.value))return w(k.value,M)}return k;case"FunctionNode":if(n[k.name]&&n[k.name].rawArgs)return k;{var _=["add","multiply"];if(!_.includes(k.name)){var q=k.args.map(ce=>U(ce,M));if(!q.some(nt))try{return E(k.name,q,M)}catch{}if(k.name==="size"&&q.length===1&&Jt(q[0])){for(var B=[],Z=q[0];Jt(Z);)B.push(Z.items.length),Z=Z.items[0];return a(B)}return new c(k.name,q.map(S))}}case"OperatorNode":{var te=k.fn.toString(),Q,z,re=N(k);if(Tt(k)&&k.isUnary())Q=[U(k.args[0],M)],nt(Q[0])?z=re(Q):z=E(te,Q,M);else if(v(k,M.context))if(Q=x(k,M.context),Q=Q.map(ce=>U(ce,M)),d(te,M.context)){for(var fe=[],L=[],I=0;I1?(z=P(te,fe,re,M),L.unshift(z),z=P(te,L,re,M)):z=P(te,Q,re,M)}else z=P(te,Q,re,M);else Q=k.args.map(ce=>U(ce,M)),z=P(te,Q,re,M);return z}case"ParenthesisNode":return U(k.content,M);case"AccessorNode":return R(U(k.object,M),U(k.index,M),M);case"ArrayNode":{var $=k.items.map(ce=>U(ce,M));return $.some(nt)?new u($.map(S)):a($)}case"IndexNode":return new p(k.dimensions.map(ce=>g(ce,M)));case"ObjectNode":{var H={};for(var ae in k.properties)H[ae]=g(k.properties[ae],M);return new f(H)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(k.type))}}return g});var C3="simplifyCore",sH=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],_3=C(C3,sH,e=>{var{typed:t,parse:r,equal:n,isZero:a,add:i,subtract:o,multiply:l,divide:u,pow:s,AccessorNode:c,ArrayNode:p,ConstantNode:f,FunctionNode:m,IndexNode:h,ObjectNode:d,OperatorNode:v,ParenthesisNode:x,SymbolNode:N}=e,g=new f(0),y=new f(1),E=new f(!0),b=new f(!1);function S(F){return Tt(F)&&["and","not","or"].includes(F.op)}var{hasProperty:A,isCommutative:w}=io({FunctionNode:m,OperatorNode:v,SymbolNode:N});function D(F){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=R?R.context:void 0;if(A(F,"trivial",P)){if(pr(F)&&F.args.length===1)return D(F.args[0],R);var U=!1,k=0;if(F.forEach(L=>{++k,k===1&&(U=D(L,R))}),k===1)return U}var M=F;if(pr(M)){var _=HT(M.name);if(_){if(M.args.length>2&&A(M,"associative",P))for(;M.args.length>2;){var q=M.args.pop(),B=M.args.pop();M.args.push(new v(_,M.name,[q,B]))}M=new v(_,M.name,M.args)}else return new m(D(M.fn),M.args.map(L=>D(L,R)))}if(Tt(M)&&M.isUnary()){var Z=D(M.args[0],R);if(M.op==="~"&&Tt(Z)&&Z.isUnary()&&Z.op==="~"||M.op==="not"&&Tt(Z)&&Z.isUnary()&&Z.op==="not"&&S(Z.args[0]))return Z.args[0];var te=!0;if(M.op==="-"&&Tt(Z)&&(Z.isBinary()&&Z.fn==="subtract"&&(M=new v("-","subtract",[Z.args[1],Z.args[0]]),te=!1),Z.isUnary()&&Z.op==="-"))return Z.args[0];if(te)return new v(M.op,M.fn,[Z])}if(Tt(M)&&M.isBinary()){var Q=D(M.args[0],R),z=D(M.args[1],R);if(M.op==="+"){if(et(Q)&&a(Q.value))return z;if(et(z)&&a(z.value))return Q;Tt(z)&&z.isUnary()&&z.op==="-"&&(z=z.args[0],M=new v("-","subtract",[Q,z]))}if(M.op==="-")return Tt(z)&&z.isUnary()&&z.op==="-"?D(new v("+","add",[Q,z.args[0]]),R):et(Q)&&a(Q.value)?D(new v("-","unaryMinus",[z])):et(z)&&a(z.value)?Q:new v(M.op,M.fn,[Q,z]);if(M.op==="*"){if(et(Q)){if(a(Q.value))return g;if(n(Q.value,1))return z}if(et(z)){if(a(z.value))return g;if(n(z.value,1))return Q;if(w(M,P))return new v(M.op,M.fn,[z,Q],M.implicit)}return new v(M.op,M.fn,[Q,z],M.implicit)}if(M.op==="/")return et(Q)&&a(Q.value)?g:et(z)&&n(z.value,1)?Q:new v(M.op,M.fn,[Q,z]);if(M.op==="^"&&et(z)){if(a(z.value))return y;if(n(z.value,1))return Q}if(M.op==="and"){if(et(Q))if(Q.value){if(S(z))return z;if(et(z))return z.value?E:b}else return b;if(et(z))if(z.value){if(S(Q))return Q}else return b}if(M.op==="or"){if(et(Q)){if(Q.value)return E;if(S(z))return z}if(et(z)){if(z.value)return E;if(S(Q))return Q}}return new v(M.op,M.fn,[Q,z])}if(Tt(M))return new v(M.op,M.fn,M.args.map(L=>D(L,R)));if(Jt(M))return new p(M.items.map(L=>D(L,R)));if(wr(M))return new c(D(M.object,R),D(M.index,R));if(Rr(M))return new h(M.dimensions.map(L=>D(L,R)));if(qn(M)){var re={};for(var fe in M.properties)re[fe]=D(M.properties[fe],R);return new d(re)}return M}return t(C3,{Node:D,"Node,Object":D})});var uH="resolve",cH=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],M3=C(uH,cH,e=>{var{typed:t,parse:r,ConstantNode:n,FunctionNode:a,OperatorNode:i,ParenthesisNode:o}=e;function l(u,s){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!s)return u;if(bt(u)){if(c.has(u.name)){var p=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(p,"}"))}var f=s.get(u.name);if(nt(f)){var m=new Set(c);return m.add(u.name),l(f,s,m)}else return typeof f=="number"?r(String(f)):f!==void 0?new n(f):u}else if(Tt(u)){var h=u.args.map(function(v){return l(v,s,c)});return new i(u.op,u.fn,h,u.implicit)}else{if(er(u))return new o(l(u.content,s,c));if(pr(u)){var d=u.args.map(function(v){return l(v,s,c)});return new a(u.name,d)}}return u.map(v=>l(v,s,c))}return t("resolve",{Node:l,"Node, Map | null | undefined":l,"Node, Object":(u,s)=>l(u,Jn(s)),"Array | Matrix":t.referToSelf(u=>s=>s.map(c=>u(c))),"Array | Matrix, null | undefined":t.referToSelf(u=>s=>s.map(c=>u(c))),"Array, Object":t.referTo("Array,Map",u=>(s,c)=>u(s,Jn(c))),"Matrix, Object":t.referTo("Matrix,Map",u=>(s,c)=>u(s,Jn(c))),"Array | Matrix, Map":t.referToSelf(u=>(s,c)=>s.map(p=>u(p,c)))})});var O3="symbolicEqual",lH=["parse","simplify","typed","OperatorNode"],R3=C(O3,lH,e=>{var{parse:t,simplify:r,typed:n,OperatorNode:a}=e;function i(o,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=new a("-","subtract",[o,l]),c=r(s,{},u);return et(c)&&!c.value}return n(O3,{"Node, Node":i,"Node, Node, Object":i})});var F3="derivative",pH=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],I3=C(F3,pH,e=>{var{typed:t,config:r,parse:n,simplify:a,equal:i,isZero:o,numeric:l,ConstantNode:u,FunctionNode:s,OperatorNode:c,ParenthesisNode:p,SymbolNode:f}=e;function m(g,y){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},b={};v(b,g,y.name);var S=x(g,b);return E.simplify?a(S):S}t.addConversion({from:"identifier",to:"SymbolNode",convert:n});var h=t(F3,{"Node, SymbolNode":m,"Node, SymbolNode, Object":m});t.removeConversion({from:"identifier",to:"SymbolNode",convert:n}),h._simplify=!0,h.toTex=function(g){return d.apply(null,g.args)};var d=t("_derivTex",{"Node, SymbolNode":function(y,E){return et(y)&&ut(y.value)==="string"?d(n(y.value).toString(),E.toString(),1):d(y.toTex(),E.toString(),1)},"Node, ConstantNode":function(y,E){if(ut(E.value)==="string")return d(y,n(E.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(y,E,b){return d(y.toString(),E.name,b.value)},"string, string, number":function(y,E,b){var S;return b===1?S="{d\\over d"+E+"}":S="{d^{"+b+"}\\over d"+E+"^{"+b+"}}",S+"\\left[".concat(y,"\\right]")}}),v=t("constTag",{"Object, ConstantNode, string":function(y,E){return y[E]=!0,!0},"Object, SymbolNode, string":function(y,E,b){return E.name!==b?(y[E]=!0,!0):!1},"Object, ParenthesisNode, string":function(y,E,b){return v(y,E.content,b)},"Object, FunctionAssignmentNode, string":function(y,E,b){return E.params.includes(b)?v(y,E.expr,b):(y[E]=!0,!0)},"Object, FunctionNode | OperatorNode, string":function(y,E,b){if(E.args.length>0){for(var S=v(y,E.args[0],b),A=1;A0){var S=y.args.filter(function(k){return E[k]===void 0}),A=S.length===1?S[0]:new c("*","multiply",S),w=b.concat(x(A,E));return new c("*","multiply",w)}return new c("+","add",y.args.map(function(k){return new c("*","multiply",y.args.map(function(M){return M===k?x(M,E):M.clone()}))}))}if(y.op==="/"&&y.isBinary()){var D=y.args[0],F=y.args[1];return E[F]!==void 0?new c("/","divide",[x(D,E),F]):E[D]!==void 0?new c("*","multiply",[new c("-","unaryMinus",[D]),new c("/","divide",[x(F,E),new c("^","pow",[F.clone(),N(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[x(D,E),F.clone()]),new c("*","multiply",[D.clone(),x(F,E)])]),new c("^","pow",[F.clone(),N(2)])])}if(y.op==="^"&&y.isBinary()){var R=y.args[0],P=y.args[1];if(E[R]!==void 0)return et(R)&&(o(R.value)||i(R.value,1))?N(0):new c("*","multiply",[y,new c("*","multiply",[new s("log",[R.clone()]),x(P.clone(),E)])]);if(E[P]!==void 0){if(et(P)){if(o(P.value))return N(0);if(i(P.value,1))return x(R,E)}var U=new c("^","pow",[R.clone(),new c("-","subtract",[P,N(1)])]);return new c("*","multiply",[P.clone(),new c("*","multiply",[x(R,E),U])])}return new c("*","multiply",[new c("^","pow",[R.clone(),P.clone()]),new c("+","add",[new c("*","multiply",[x(R,E),new c("/","divide",[P.clone(),R.clone()])]),new c("*","multiply",[x(P,E),new s("log",[R.clone()])])])])}throw new Error('Cannot process operator "'+y.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function N(g,y){return new u(l(g,y||r.number))}return h});var B3="rationalize",fH=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],L3=C(B3,fH,e=>{var{config:t,typed:r,equal:n,isZero:a,add:i,subtract:o,multiply:l,divide:u,pow:s,parse:c,simplifyConstant:p,simplifyCore:f,simplify:m,fraction:h,bignumber:d,mathWithTransform:v,matrix:x,AccessorNode:N,ArrayNode:g,ConstantNode:y,FunctionNode:E,IndexNode:b,ObjectNode:S,OperatorNode:A,SymbolNode:w,ParenthesisNode:D}=e;function F(M){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,B=P(),Z=R(M,_,!0,B.firstRules),te=Z.variables.length,Q={exactFractions:!1},z={exactFractions:!0};if(M=Z.expression,te>=1){M=U(M);var re,fe,L=!0,I=!1;M=m(M,B.firstRules,{},Q);for(var $;fe=L?B.distrDivRules:B.sucDivRules,M=m(M,fe,{},z),L=!L,$=M.toString(),$!==re;)I=!0,re=$;I&&(M=m(M,B.firstRulesAgain,{},Q)),M=m(M,B.finalRules,{},Q)}var H=[],ae={};return M.type==="OperatorNode"&&M.isBinary()&&M.op==="/"?(te===1&&(M.args[0]=k(M.args[0],H),M.args[1]=k(M.args[1])),q&&(ae.numerator=M.args[0],ae.denominator=M.args[1])):(te===1&&(M=k(M,H)),q&&(ae.numerator=M,ae.denominator=null)),q?(ae.coefficients=H,ae.variables=Z.variables,ae.expression=M,ae):M}return r(B3,{Node:F,"Node, boolean":(M,_)=>F(M,{},_),"Node, Object":F,"Node, Object, boolean":F});function R(M,_,q,B){var Z=[],te=m(M,B,_,{exactFractions:!1});q=!!q;var Q="+-*"+(q?"/":"");re(te);var z={};return z.expression=te,z.variables=Z,z;function re(fe){var L=fe.type;if(L==="FunctionNode")throw new Error("There is an unsolved function call");if(L==="OperatorNode")if(fe.op==="^"){if(fe.args[1].type!=="ConstantNode"||!Re(parseFloat(fe.args[1].value)))throw new Error("There is a non-integer exponent");re(fe.args[0])}else{if(!Q.includes(fe.op))throw new Error("Operator "+fe.op+" invalid in polynomial expression");for(var I=0;I1;if(B==="OperatorNode"&&M.isBinary()){var te=!1,Q;if(M.op==="^"&&(M.args[0].type==="ParenthesisNode"||M.args[0].type==="OperatorNode")&&M.args[1].type==="ConstantNode"&&(Q=parseFloat(M.args[1].value),te=Q>=2&&Re(Q)),te){if(Q>2){var z=M.args[0],re=new A("^","pow",[M.args[0].cloneDeep(),new y(Q-1)]);M=new A("*","multiply",[z,re])}else M=new A("*","multiply",[M.args[0],M.args[0].cloneDeep()]);Z&&(q==="content"?_.content=M:_.args[q]=M)}}if(B==="ParenthesisNode")U(M.content,M,"content");else if(B!=="ConstantNode"&&B!=="SymbolNode")for(var fe=0;fe=0;z--)if(_[z]!==0){var re=new y(te?_[z]:Math.abs(_[z])),fe=_[z]<0?"-":"+";if(z>0){var L=new w(Z);if(z>1){var I=new y(z);L=new A("^","pow",[L,I])}_[z]===-1&&te?re=new A("-","unaryMinus",[L]):Math.abs(_[z])===1?re=L:re=new A("*","multiply",[re,L])}te?Q=re:fe==="+"?Q=new A("+","add",[Q,re]):Q=new A("-","subtract",[Q,re]),te=!1}if(te)return new y(0);return Q;function $(H,ae,ce){var me=H.type;if(me==="FunctionNode")throw new Error("There is an unsolved function call");if(me==="OperatorNode"){if(!"+-*^".includes(H.op))throw new Error("Operator "+H.op+" invalid");if(ae!==null){if((H.fn==="unaryMinus"||H.fn==="pow")&&ae.fn!=="add"&&ae.fn!=="subtract"&&ae.fn!=="multiply")throw new Error("Invalid "+H.op+" placing");if((H.fn==="subtract"||H.fn==="add"||H.fn==="multiply")&&ae.fn!=="add"&&ae.fn!=="subtract")throw new Error("Invalid "+H.op+" placing");if((H.fn==="subtract"||H.fn==="add"||H.fn==="unaryMinus")&&ce.noFil!==0)throw new Error("Invalid "+H.op+" placing")}(H.op==="^"||H.op==="*")&&(ce.fire=H.op);for(var Ne=0;NeB&&(_[Me]=0),_[Me]+=ce.cte*(ce.oper==="+"?1:-1),B=Math.max(Me,B);return}ce.cte=Me,ce.fire===""&&(_[0]+=ce.cte*(ce.oper==="+"?1:-1))}else throw new Error("Type "+me+" is not allowed")}}});var P3="zpk2tf",mH=["typed","add","multiply","Complex","number"],Wv=C(P3,mH,e=>{var{typed:t,add:r,multiply:n,Complex:a,number:i}=e;return t(P3,{"Array,Array,number":function(s,c,p){return o(s,c,p)},"Array,Array":function(s,c){return o(s,c,1)},"Matrix,Matrix,number":function(s,c,p){return o(s.valueOf(),c.valueOf(),p)},"Matrix,Matrix":function(s,c){return o(s.valueOf(),c.valueOf(),1)}});function o(u,s,c){u.some(N=>N.type==="BigNumber")&&(u=u.map(N=>i(N))),s.some(N=>N.type==="BigNumber")&&(s=s.map(N=>i(N)));for(var p=[a(1,0)],f=[a(1,0)],m=0;m=0&&p-f{var{typed:t,add:r,multiply:n,Complex:a,divide:i,matrix:o}=e;return t(U3,{"Array, Array":function(c,p){var f=u(512);return l(c,p,f)},"Array, Array, Array":function(c,p,f){return l(c,p,f)},"Array, Array, number":function(c,p,f){if(f<0)throw new Error("w must be a positive number");var m=u(f);return l(c,p,m)},"Matrix, Matrix":function(c,p){var f=u(512),{w:m,h}=l(c.valueOf(),p.valueOf(),f);return{w:o(m),h:o(h)}},"Matrix, Matrix, Matrix":function(c,p,f){var{h:m}=l(c.valueOf(),p.valueOf(),f.valueOf());return{h:o(m),w:o(f)}},"Matrix, Matrix, number":function(c,p,f){if(f<0)throw new Error("w must be a positive number");var m=u(f),{h}=l(c.valueOf(),p.valueOf(),m);return{h:o(h),w:o(m)}}});function l(s,c,p){for(var f=[],m=[],h=0;h{var{classes:t}=e;return function(n,a){var i=t[a&&a.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(a):a}});var gH="replacer",xH=[],Zv=C(gH,xH,()=>function(t,r){return typeof r=="number"&&(!isFinite(r)||isNaN(r))?{mathjs:"number",value:String(r)}:r});var q3="12.4.3";var Jv=C("true",[],()=>!0),eg=C("false",[],()=>!1),tg=C("null",[],()=>null),rg=Qr("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1/0):1/0}),ng=Qr("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(NaN):NaN}),ag=Qr("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?Ss(r):yE}),ig=Qr("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?VN(r):EE}),og=Qr("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?YN(r):AE}),sg=Qr("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?jN(r):NE}),ug=Qr("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).ln():Math.LN2}),cg=Qr("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(10).ln():Math.LN10}),lg=Qr("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(2).ln()):Math.LOG2E}),pg=Qr("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(10).ln()):Math.LOG10E}),fg=Qr("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r("0.5").sqrt():Math.SQRT1_2}),mg=Qr("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).sqrt():Math.SQRT2}),dg=Qr("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),H3=C("PI",["pi"],e=>{var{pi:t}=e;return t}),z3=C("E",["e"],e=>{var{e:t}=e;return t}),hg=C("version",[],()=>q3);function Qr(e,t,r){return C(e,t,r,{recreateOnConfigChange:!0})}var vg=ot("speedOfLight","299792458","m s^-1"),gg=ot("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),xg=ot("planckConstant","6.62607015e-34","J s"),bg=ot("reducedPlanckConstant","1.0545718176461565e-34","J s"),yg=ot("magneticConstant","1.25663706212e-6","N A^-2"),Eg=ot("electricConstant","8.8541878128e-12","F m^-1"),Ag=ot("vacuumImpedance","376.730313667","ohm"),Ng=ot("coulomb","8.987551792261171e9","N m^2 C^-2"),Tg=ot("elementaryCharge","1.602176634e-19","C"),wg=ot("bohrMagneton","9.2740100783e-24","J T^-1"),Dg=ot("conductanceQuantum","7.748091729863649e-5","S"),Sg=ot("inverseConductanceQuantum","12906.403729652257","ohm"),Cg=ot("magneticFluxQuantum","2.0678338484619295e-15","Wb"),_g=ot("nuclearMagneton","5.0507837461e-27","J T^-1"),Mg=ot("klitzing","25812.807459304513","ohm");var Og=ot("bohrRadius","5.29177210903e-11","m"),Rg=ot("classicalElectronRadius","2.8179403262e-15","m"),Fg=ot("electronMass","9.1093837015e-31","kg"),Ig=ot("fermiCoupling","1.1663787e-5","GeV^-2"),Bg=rp("fineStructure",.0072973525693),Lg=ot("hartreeEnergy","4.3597447222071e-18","J"),Pg=ot("protonMass","1.67262192369e-27","kg"),Ug=ot("deuteronMass","3.3435830926e-27","kg"),kg=ot("neutronMass","1.6749271613e-27","kg"),qg=ot("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),Hg=ot("rydberg","10973731.568160","m^-1"),zg=ot("thomsonCrossSection","6.6524587321e-29","m^2"),Gg=rp("weakMixingAngle",.2229),Yg=rp("efimovFactor",22.7),jg=ot("atomicMass","1.66053906660e-27","kg"),Vg=ot("avogadro","6.02214076e23","mol^-1"),$g=ot("boltzmann","1.380649e-23","J K^-1"),Xg=ot("faraday","96485.33212331001","C mol^-1"),Kg=ot("firstRadiation","3.7417718521927573e-16","W m^2"),Wg=ot("loschmidt","2.686780111798444e25","m^-3"),Qg=ot("gasConstant","8.31446261815324","J K^-1 mol^-1"),Zg=ot("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),Jg=ot("molarVolume","0.022413969545014137","m^3 mol^-1"),ex=rp("sackurTetrode",-1.16487052358),tx=ot("secondRadiation","0.014387768775039337","m K"),rx=ot("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),nx=ot("wienDisplacement","2.897771955e-3","m K"),ax=ot("molarMass","0.99999999965e-3","kg mol^-1"),ix=ot("molarMassC12","11.9999999958e-3","kg mol^-1"),ox=ot("gravity","9.80665","m s^-2"),sx=ot("planckLength","1.616255e-35","m"),ux=ot("planckMass","2.176435e-8","kg"),cx=ot("planckTime","5.391245e-44","s"),lx=ot("planckCharge","1.87554603778e-18","C"),px=ot("planckTemperature","1.416785e+32","K");function ot(e,t,r){var n=["config","Unit","BigNumber"];return C(e,n,a=>{var{config:i,Unit:o,BigNumber:l}=a,u=i.number==="BigNumber"?new l(t):parseFloat(t),s=new o(u,r);return s.fixPrefix=!0,s})}function rp(e,t){var r=["config","BigNumber"];return C(e,r,n=>{var{config:a,BigNumber:i}=n;return a.number==="BigNumber"?new i(t):t})}var bH="apply",yH=["typed","isInteger"],G3=C(bH,yH,e=>{var{typed:t,isInteger:r}=e,n=ii({typed:t,isInteger:r});return t("apply",{"...any":function(i){var o=i[1];ze(o)?i[1]=o-1:Ue(o)&&(i[1]=o.minus(1));try{return n.apply(null,i)}catch(l){throw Dt(l)}}})},{isTransformFunction:!0});var EH="column",AH=["typed","Index","matrix","range"],Y3=C(EH,AH,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=vs({typed:t,Index:r,matrix:n,range:a});return t("column",{"...any":function(l){var u=l.length-1,s=l[u];ze(s)&&(l[u]=s-1);try{return i.apply(null,l)}catch(c){throw Dt(c)}}})},{isTransformFunction:!0});function oo(e,t,r){var n=e.filter(function(u){return bt(u)&&!(u.name in t)&&!r.has(u.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var a=n.name,i=new Map,o=new ki(r,i,new Set([a])),l=e.compile();return function(s){return i.set(a,s),l.evaluate(o)}}var NH="filter",TH=["typed"],V3=C(NH,TH,e=>{var{typed:t}=e;function r(a,i,o){var l,u;return a[0]&&(l=a[0].compile().evaluate(o)),a[1]&&(bt(a[1])||sn(a[1])?u=a[1].compile().evaluate(o):u=oo(a[1],i,o)),n(l,u)}r.rawArgs=!0;var n=t("filter",{"Array, function":j3,"Matrix, function":function(i,o){return i.create(j3(i.toArray(),o))},"Array, RegExp":Gi,"Matrix, RegExp":function(i,o){return i.create(Gi(i.toArray(),o))}});return r},{isTransformFunction:!0});function j3(e,t){return Bc(e,function(r,n,a){return fn(t,r,[n+1],a,"filter")})}var wH="forEach",DH=["typed"],$3=C(wH,DH,e=>{var{typed:t}=e;function r(a,i,o){var l,u;return a[0]&&(l=a[0].compile().evaluate(o)),a[1]&&(bt(a[1])||sn(a[1])?u=a[1].compile().evaluate(o):u=oo(a[1],i,o)),n(l,u)}r.rawArgs=!0;var n=t("forEach",{"Array | Matrix, function":function(i,o){var l=function u(s,c){if(Array.isArray(s))Na(s,function(p,f){u(p,c.concat(f+1))});else return fn(o,s,c,i,"forEach")};l(i.valueOf(),[])}});return r},{isTransformFunction:!0});var SH="index",CH=["Index","getMatrixDataType"],X3=C(SH,CH,e=>{var{Index:t,getMatrixDataType:r}=e;return function(){for(var a=[],i=0,o=arguments.length;i0?0:2;else if(l&&l.isSet===!0)l=l.map(function(s){return s-1});else if(at(l)||Fe(l))r(l)!=="boolean"&&(l=l.map(function(s){return s-1}));else if(ze(l))l--;else if(Ue(l))l=l.toNumber()-1;else if(typeof l!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");a[i]=l}var u=new t;return t.apply(u,a),u}},{isTransformFunction:!0});var _H="map",MH=["typed"],W3=C(_H,MH,e=>{var{typed:t}=e;function r(a,i,o){var l,u;return a[0]&&(l=a[0].compile().evaluate(o)),a[1]&&(bt(a[1])||sn(a[1])?u=a[1].compile().evaluate(o):u=oo(a[1],i,o)),n(l,u)}r.rawArgs=!0;var n=t("map",{"Array, function":function(i,o){return K3(i,o,i)},"Matrix, function":function(i,o){return i.create(K3(i.valueOf(),o,i))}});return r},{isTransformFunction:!0});function K3(e,t,r){function n(a,i){return Array.isArray(a)?Ir(a,function(o,l){return n(o,i.concat(l+1))}):fn(t,a,i,r,"map")}return n(e,[])}function br(e){if(e.length===2&&Lt(e[0])){e=e.slice();var t=e[1];ze(t)?e[1]=t-1:Ue(t)&&(e[1]=t.minus(1))}return e}var OH="max",RH=["typed","config","numeric","larger"],Q3=C(OH,RH,e=>{var{typed:t,config:r,numeric:n,larger:a}=e,i=ro({typed:t,config:r,numeric:n,larger:a});return t("max",{"...any":function(l){l=br(l);try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var FH="mean",IH=["typed","add","divide"],Z3=C(FH,IH,e=>{var{typed:t,add:r,divide:n}=e,a=Rs({typed:t,add:r,divide:n});return t("mean",{"...any":function(o){o=br(o);try{return a.apply(null,o)}catch(l){throw Dt(l)}}})},{isTransformFunction:!0});var BH="min",LH=["typed","config","numeric","smaller"],J3=C(BH,LH,e=>{var{typed:t,config:r,numeric:n,smaller:a}=e,i=no({typed:t,config:r,numeric:n,smaller:a});return t("min",{"...any":function(l){l=br(l);try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var PH="range",UH=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],eM=C(PH,UH,e=>{var{typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:l,largerEq:u,add:s,isPositive:c}=e,p=bs({typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:l,largerEq:u,add:s,isPositive:c});return t("range",{"...any":function(m){var h=m.length-1,d=m[h];return typeof d!="boolean"&&m.push(!0),p.apply(null,m)}})},{isTransformFunction:!0});var kH="row",qH=["typed","Index","matrix","range"],tM=C(kH,qH,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=ys({typed:t,Index:r,matrix:n,range:a});return t("row",{"...any":function(l){var u=l.length-1,s=l[u];ze(s)&&(l[u]=s-1);try{return i.apply(null,l)}catch(c){throw Dt(c)}}})},{isTransformFunction:!0});var HH="subset",zH=["typed","matrix","zeros","add"],rM=C(HH,zH,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=Es({typed:t,matrix:r,zeros:n,add:a});return t("subset",{"...any":function(l){try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var GH="concat",YH=["typed","matrix","isInteger"],nM=C(GH,YH,e=>{var{typed:t,matrix:r,isInteger:n}=e,a=Wi({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(o){var l=o.length-1,u=o[l];ze(u)?o[l]=u-1:Ue(u)&&(o[l]=u.minus(1));try{return a.apply(null,o)}catch(s){throw Dt(s)}}})},{isTransformFunction:!0});var aM="diff",jH=["typed","matrix","subtract","number","bignumber"],iM=C(aM,jH,e=>{var{typed:t,matrix:r,subtract:n,number:a,bignumber:i}=e,o=xs({typed:t,matrix:r,subtract:n,number:a,bignumber:i});return t(aM,{"...any":function(u){u=br(u);try{return o.apply(null,u)}catch(s){throw Dt(s)}}})},{isTransformFunction:!0});var VH="std",$H=["typed","map","sqrt","variance"],oM=C(VH,$H,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e,i=Bs({typed:t,map:r,sqrt:n,variance:a});return t("std",{"...any":function(l){l=br(l);try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var sM="sum",XH=["typed","config","add","numeric"],uM=C(sM,XH,e=>{var{typed:t,config:r,add:n,numeric:a}=e,i=Ms({typed:t,config:r,add:n,numeric:a});return t(sM,{"...any":function(l){l=br(l);try{return i.apply(null,l)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var KH="quantileSeq",WH=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],cM=C(KH,WH,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:l,compare:u,isInteger:s,smaller:c,smallerEq:p,larger:f}=e,m=Is({typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:l,compare:u,isInteger:s,smaller:c,smallerEq:p,larger:f});return t("quantileSeq",{"Array | Matrix, number | BigNumber":m,"Array | Matrix, number | BigNumber, number":(d,v,x)=>m(d,v,h(x)),"Array | Matrix, number | BigNumber, boolean":m,"Array | Matrix, number | BigNumber, boolean, number":(d,v,x,N)=>m(d,v,x,h(N)),"Array | Matrix, Array | Matrix":m,"Array | Matrix, Array | Matrix, number":(d,v,x)=>m(d,v,h(x)),"Array | Matrix, Array | Matrix, boolean":m,"Array | Matrix, Array | Matrix, boolean, number":(d,v,x,N)=>m(d,v,x,h(N))});function h(d){return br([[],d])[1]}},{isTransformFunction:!0});var lM="cumsum",QH=["typed","add","unaryPlus"],pM=C(lM,QH,e=>{var{typed:t,add:r,unaryPlus:n}=e,a=Os({typed:t,add:r,unaryPlus:n});return t(lM,{"...any":function(o){if(o.length===2&&Lt(o[0])){var l=o[1];ze(l)?o[1]=l-1:Ue(l)&&(o[1]=l.minus(1))}try{return a.apply(null,o)}catch(u){throw Dt(u)}}})},{isTransformFunction:!0});var fM="variance",ZH=["typed","add","subtract","multiply","divide","apply","isNaN"],mM=C(fM,ZH,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,apply:o,isNaN:l}=e,u=Fs({typed:t,add:r,subtract:n,multiply:a,divide:i,apply:o,isNaN:l});return t(fM,{"...any":function(c){c=br(c);try{return u.apply(null,c)}catch(p){throw Dt(p)}}})},{isTransformFunction:!0});var dM="print",JH=["typed","matrix","zeros","add"],hM=C(dM,JH,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=ws({typed:t,matrix:r,zeros:n,add:a});return t(dM,{"string, Object | Array":function(u,s){return i(o(u),s)},"string, Object | Array, number | Object":function(u,s,c){return i(o(u),s,c)}});function o(l){return l.replace(fl,u=>{var s=u.slice(1).split("."),c=s.map(function(p){return!isNaN(p)&&p.length>0?parseInt(p)-1:p});return"$"+c.join(".")})}},{isTransformFunction:!0});var ez="and",tz=["typed","matrix","zeros","add","equalScalar","not","concat"],vM=C(ez,tz,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,l=Ds({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(s,c,p){var f=s[0].compile().evaluate(p);if(!Lt(f)&&!l(f,!0))return!1;var m=s[1].compile().evaluate(p);return l(f,m)}return u.rawArgs=!0,u},{isTransformFunction:!0});var rz="or",nz=["typed","matrix","equalScalar","DenseMatrix","concat"],gM=C(rz,nz,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=hs({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function l(u,s,c){var p=u[0].compile().evaluate(c);if(!Lt(p)&&o(p,!1))return!0;var f=u[1].compile().evaluate(c);return o(p,f)}return l.rawArgs=!0,l},{isTransformFunction:!0});var az="bitAnd",iz=["typed","matrix","zeros","add","equalScalar","not","concat"],xM=C(az,iz,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,l=ms({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(s,c,p){var f=s[0].compile().evaluate(p);if(!Lt(f)){if(isNaN(f))return NaN;if(f===0||f===!1)return 0}var m=s[1].compile().evaluate(p);return l(f,m)}return u.rawArgs=!0,u},{isTransformFunction:!0});var oz="bitOr",sz=["typed","matrix","equalScalar","DenseMatrix","concat"],bM=C(oz,sz,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=ds({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function l(u,s,c){var p=u[0].compile().evaluate(c);if(!Lt(p)){if(isNaN(p))return NaN;if(p===-1)return-1;if(p===!0)return 1}var f=u[1].compile().evaluate(c);return o(p,f)}return l.rawArgs=!0,l},{isTransformFunction:!0});var Us=_c({config:un}),uz=Mc({});var yM=Oc({});var mx=Rc({});var Ca=Pc({Matrix:mx});var At=Ec({BigNumber:Us,Complex:uz,DenseMatrix:Ca,Fraction:yM});var cz=Qc({typed:At});var np=Jc({typed:At});var lz=$c({BigNumber:Us,typed:At});var pz=ol({typed:At});var so=Yc({config:un,typed:At});var fz=qc({typed:At});var mz=zc({typed:At});var EM=tl({typed:At});var dz=Vc({typed:At});var dx=jc({Matrix:mx,equalScalar:so,typed:At});var AM=el({typed:At});var hx=Wc({typed:At});var jn=Xc({Fraction:yM,typed:At});var Zr=Kc({DenseMatrix:Ca,Matrix:mx,SparseMatrix:dx,typed:At});var vx=ml({bignumber:lz,fraction:jn,number:dz});var hz=ll({matrix:Zr,config:un,typed:At});var vz=pl({BigNumber:Us,config:un,matrix:Zr,typed:At});var ap=Wi({isInteger:fz,matrix:Zr,typed:At});var gx=dl({numeric:vx,typed:At});var gz=sl({BigNumber:Us,DenseMatrix:Ca,SparseMatrix:dx,config:un,matrix:Zr,typed:At});var ip=hl({BigNumber:Us,DenseMatrix:Ca,config:un,equalScalar:so,matrix:Zr,typed:At,zeros:vz}),xz=bl({DenseMatrix:Ca,concat:ap,config:un,matrix:Zr,typed:At}),xx=nl({DenseMatrix:Ca,concat:ap,equalScalar:so,matrix:Zr,subtractScalar:AM,typed:At,unaryMinus:hx});var bx=Dl({DenseMatrix:Ca,SparseMatrix:dx,addScalar:np,concat:ap,equalScalar:so,matrix:Zr,typed:At});var bz=Sl({addScalar:np,conj:pz,multiplyScalar:EM,size:hz,typed:At});var yz=Al({DenseMatrix:Ca,concat:ap,config:un,matrix:Zr,typed:At});var NM=no({config:un,numeric:vx,smaller:xz,typed:At});var ks=rl({addScalar:np,dot:bz,equalScalar:so,matrix:Zr,multiplyScalar:EM,typed:At});var Ez=Ql({divideScalar:gx,isZero:mz,matrix:Zr,multiply:ks,subtractScalar:AM,typed:At,unaryMinus:hx});var TM=ro({config:un,larger:yz,numeric:vx,typed:At});var Az=Zl({abs:cz,addScalar:np,det:Ez,divideScalar:gx,identity:gz,matrix:Zr,multiply:ks,typed:At,unaryMinus:hx});var uo=Jl({divideScalar:gx,equalScalar:so,inv:Az,matrix:Zr,multiply:ks,typed:At});var qs=fx;var _M=Le(va(),1),MM=Le(dc(),1);var DM=Le(wM(),1);function SM(e){var t=new DM.default;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}function CM(e,t,r,n){function a(v,x){var N=arguments.length;if(N!==1&&N!==2)throw new Wr("import",N,1,2);x||(x={});function g(S,A,w){if(Array.isArray(A))A.forEach(R=>g(S,R));else if(typeof A=="object")for(var D in A)Ie(A,D)&&g(S,A[D],D);else if(Za(A)||w!==void 0){var F=Za(A)?h(A)?A.fn+".transform":A.fn:w;if(Ie(S,F)&&S[F]!==A&&!x.silent)throw new Error('Cannot import "'+F+'" twice');S[F]=A}else if(!x.silent)throw new TypeError("Factory, Object, or Array expected")}var y={};g(y,v);for(var E in y)if(Ie(y,E)){var b=y[E];if(Za(b))s(b,x);else if(c(b))i(E,b,x);else if(!x.silent)throw new TypeError("Factory, Object, or Array expected")}}function i(v,x,N){if(N.wrap&&typeof x=="function"&&(x=u(x)),p(x)&&(x=e(v,{[x.signature]:x})),e.isTypedFunction(r[v])&&e.isTypedFunction(x)){N.override?x=e(v,x.signatures):x=e(r[v],x),r[v]=x,delete n[v],o(v,x),r.emit("import",v,function(){return x});return}if(r[v]===void 0||N.override){r[v]=x,delete n[v],o(v,x),r.emit("import",v,function(){return x});return}if(!N.silent)throw new Error('Cannot import "'+v+'": already exists')}function o(v,x){x&&typeof x.transform=="function"?(r.expression.transform[v]=x.transform,f(v)&&(r.expression.mathWithTransform[v]=x.transform)):(delete r.expression.transform[v],f(v)&&(r.expression.mathWithTransform[v]=x))}function l(v){delete r.expression.transform[v],f(v)?r.expression.mathWithTransform[v]=r[v]:delete r.expression.mathWithTransform[v]}function u(v){var x=function(){for(var g=[],y=0,E=arguments.length;y2&&arguments[2]!==void 0?arguments[2]:v.fn;if(N.includes("."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(N));var g=h(v)?r.expression.transform:r,y=N in r.expression.transform,E=Ie(g,N)?g[N]:void 0,b=function(){var A={};v.dependencies.map(Wf).forEach(D=>{if(D.includes("."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(D));D==="math"?A.math=r:D==="mathWithTransform"?A.mathWithTransform=r.expression.mathWithTransform:D==="classes"?A.classes=r:A[D]=r[D]});var w=v(A);if(w&&typeof w.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(E===void 0||x.override)return w;if(e.isTypedFunction(E)&&e.isTypedFunction(w))return e(E,w);if(x.silent)return E;throw new Error('Cannot import "'+N+'": already exists')};!v.meta||v.meta.lazy!==!1?(Li(g,N,b),E&&y?l(N):(h(v)||m(v))&&Li(r.expression.mathWithTransform,N,()=>g[N])):(g[N]=b(),E&&y?l(N):(h(v)||m(v))&&Li(r.expression.mathWithTransform,N,()=>g[N])),n[N]=v,r.emit("import",N,b)}function c(v){return typeof v=="function"||typeof v=="number"||typeof v=="string"||typeof v=="boolean"||v===null||$t(v)||Zt(v)||Ue(v)||$r(v)||Fe(v)||Array.isArray(v)}function p(v){return typeof v=="function"&&typeof v.signature=="string"}function f(v){return!Ie(d,v)}function m(v){return!v.fn.includes(".")&&!Ie(d,v.fn)&&(!v.meta||!v.meta.isClass)}function h(v){return v!==void 0&&v.meta!==void 0&&v.meta.isTransformFunction===!0||!1}var d={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return a}function co(e,t){var r=(0,_M.default)({},Qa,t);if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var n=SM({isNumber:ze,isComplex:Zt,isBigNumber:Ue,isFraction:$r,isUnit:$t,isString:It,isArray:at,isMatrix:Fe,isCollection:Lt,isDenseMatrix:Zn,isSparseMatrix:Xr,isRange:ga,isIndex:Un,isBoolean:Ju,isResultSet:ec,isHelp:Fi,isFunction:tc,isDate:rc,isRegExp:nc,isObject:kn,isNull:ac,isUndefined:ic,isAccessorNode:wr,isArrayNode:Jt,isAssignmentNode:oc,isBlockNode:sc,isConditionalNode:uc,isConstantNode:et,isFunctionAssignmentNode:sn,isFunctionNode:pr,isIndexNode:Rr,isNode:nt,isObjectNode:qn,isOperatorNode:Tt,isParenthesisNode:er,isRangeNode:cc,isRelationalNode:lc,isSymbolNode:bt,isChain:Ii});n.config=xy(r,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var a=[],i=[];function o(c){if(Za(c))return c(n);var p=c[Object.keys(c)[0]];if(Za(p))return p(n);if(!hy(c))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",c),new Error("Factory object with properties `type`, `name`, and `factory` expected");var f=a.indexOf(c),m;return f===-1?(c.math===!0?m=c.factory(n.type,r,o,n.typed,n):m=c.factory(n.type,r,o,n.typed),a.push(c),i.push(m)):m=i[f],m}var l={};function u(){for(var c=arguments.length,p=new Array(c),f=0;f{Object.values(l).forEach(c=>{c&&c.meta&&c.meta.recreateOnConfigChange&&s(c,{override:!0})})}),n.create=co.bind(null,e),n.factory=C,n.import(Object.values(my(e))),n.ArgumentsError=Wr,n.DimensionError=Ve,n.IndexError=nr,n}var Ax=co(qs,{number:"Fraction"}),{multiply:Tz,divide:_a,fraction:Dr,add:wz}=Ax,oa=class{constructor(t){this._fxRateList={};this.ableToGetAllFXRate=!0;return t.sort().forEach(r=>{try{this.update(r)}catch(n){console.error(n,r)}}),this}get fxRateList(){return new Proxy(this._fxRateList,{get:function(r,n){let a=r[n];if(n=="CNY"&&!("CNY"in r)&&"CNH"in r&&(a=r.CNH),!!a)return new Proxy(a,{get:function(i,o){let l=i[o];return o=="CNY"&&!("CNY"in i)&&"CNH"in i&&(l=i.CNH),l}})}})}set fxRateList(t){this._fxRateList=t}async getfxRateList(t,r){return this.fxRateList[t][r]}async setfxRateList(t,r,n){this.fxRateList[t][r]=n}update(t){let{currency:r,unit:n}=t,{rate:a}=t,{from:i,to:o}=r;if(i=="RMB"&&(i="CNY"),o=="RMB"&&(o="CNY"),!(this.fxRateList[i]&&this.fxRateList[i][o]&&this.fxRateList[i][o].updated>t.updated)){if(!a.buy&&!a.sell&&!a.middle)throw console.log(t),new Error("Invalid FXRate");!a.buy&&!a.sell?a={buy:{cash:a.middle,remit:a.middle},sell:{cash:a.middle,remit:a.middle},middle:a.middle}:!a.buy&&a.sell?a.buy=a.sell:!a.sell&&a.buy&&(a.sell=a.buy),a.middle||(a.middle=_a(wz(Ax.min(a.buy.cash||1/0,a.buy.remit||1/0,a.sell.cash||1/0,a.sell.remit||1/0),Ax.max(a.buy.cash||-1/0,a.buy.remit||-1/0,a.sell.cash||-1/0,a.sell.remit||-1/0)),2)),this.fxRateList[i]||(this.fxRateList[i]={[i]:{cash:Dr(1),remit:Dr(1),middle:Dr(1),updated:new Date("1970-1-1 00:00:00 UTC")}}),this.fxRateList[i][o]={middle:_a(Dr(a.middle),n),updated:t.updated},this.fxRateList[o]||(this.fxRateList[o]={[o]:{cash:Dr(1),remit:Dr(1),middle:Dr(1),updated:new Date("1970-1-1 00:00:00 UTC")}}),this.fxRateList[o][i]={middle:_a(n,Dr(a.middle)),updated:t.updated},a.buy.cash&&(this.fxRateList[i][o].cash=_a(Dr(a.buy.cash),n)),a.sell.cash&&(this.fxRateList[o][i].cash=_a(n,Dr(a.sell.cash))),a.buy.remit&&(this.fxRateList[i][o].remit=_a(Dr(a.buy.remit),n)),a.sell.remit&&(this.fxRateList[o][i].remit=_a(n,Dr(a.sell.remit)))}}async convertDirect(t,r,n,a,i=!1){if(!(await this.getfxRateList(t,r))[n])throw new Error(`FX Path from ${t} to ${r} not support ${n} now`);return i?_a(Dr(a),(await this.fxRateList[t][r])[n]):Tz((await this.fxRateList[t][r])[n],Dr(a))}async getFXPath(t,r){let n={from:t,end:r,path:[]};if(t===r)return n.path.push(t),n;if(this.fxRateList[t][r])return n.path.push(r),n;if(!this.fxRateList[t]||!this.fxRateList[r])throw new Error("Invalid currency");let a=[],i=[];for(a.push({currency:t,path:[t]});a.length>0;){let{currency:o,path:l}=a.shift();if(i.push(o),o===r)return n.path=l,n;let u=Object.keys(this.fxRateList[o]);for(let s of u)i.includes(s)||a.push({currency:s,path:[...l,s]})}throw new Error("No FX path found between "+t+" and "+r)}async convert(t,r,n,a,i=!1){let o=await this.getFXPath(t,r);i&&(o.path=o.path.reverse());let l=t,u=Dr(a);try{for(let s of o.path)u=await this.convertDirect(l,s,n,u,i),l=s}catch(s){throw new Error(`Cannot convert from ${t} to ${r} with ${n}: +${s.message}`)}return u}async getUpdatedDate(t,r){if(!await this.fxRateList[t][r])throw new Error(`FX Path from ${t} to ${r} not found`);return(await this.fxRateList[t][r]).updated}};var Gs=Le(require("node:process"),1);var li=class e{static _object={jsonrpc:"2.0",id:null};patch={id:null};constructor(t){t&&(this.id=t)}get id(){return this.patch.id}set id(t){this.patch.id=t}toString(){return JSON.stringify(Object.assign({},e._object,this.patch))}get toJSON(){return()=>JSON.parse(this.toString())}};var lo=class extends li{constructor(t,r,n){super(t),r&&(this.method=r),n&&(this.params=n)}get method(){return this.patch.method}set method(t){this.patch.method=t}get params(){return this.patch.params}set params(t){this.patch.params=t}hasParams(){return this.params!==void 0}};var Ma=class extends li{constructor(t,r){super(t),r&&(this.result=r)}get result(){return this.patch.result}set result(t){this.patch.result=t}};var Pr=class e extends Ma{errorPatch={code:-32603,message:"Internal error"};constructor(t,r){super(t),r&&(this.errorPatch=r)}get result(){throw new Error("Error response should not have a result.")}set result(t){throw new Error("Error response should not have a result.")}get error(){return this.errorPatch}set error(t){this.errorPatch=t}get code(){return this.errorPatch.code}set code(t){this.errorPatch.code=t}get message(){return this.errorPatch.message}set message(t){this.errorPatch.message=t}get data(){return this.errorPatch.data}set data(t){this.errorPatch.data=t}hasErrorData(){return this.errorPatch.data!==void 0}toString(){return JSON.stringify(Object.assign({},e._object,{id:this.patch.id},{error:this.errorPatch}))}};var Dz=e=>async t=>{let r=t.params,n=new Ma,a;try{t.hasParams()?a=await e(r):a=await e()}catch(i){let o=new Pr;return t.id&&(o.id=t.id),o.code=-32603,o.message=i.message,o}if(a instanceof Ma)n=a;else if(a instanceof Object&&Object.keys(a).includes("code")&&Object.keys(a).includes("message")){let i=new Pr;i.code=a.code,i.message=a.message,a.data&&(i.data=a.data)}else a?n.result=a:n.result=null;return t.id&&(n.id=t.id),n},Nx=Dz;var OM=e=>{e.headers.set("Content-Type","application/json; charset=utf-8"),e.status=200},Hs=class extends Pn{rpcHandlers={};constructor(t=[],r){if(super(t),r)for(var n in r)this.register(n,r[n])}register(t,r,n=!1){if(t.startsWith("rpc.")&&!n)throw new Error('Method names starting with "rpc." are reserved for internal use');this.rpcHandlers[t]=r}enableList(){return this.register("rpc.list",async()=>Object.keys(this.rpcHandlers),!0),this}_v2RPCsingleResponder=async t=>{let r;if(t.jsonrpc!=="2.0")r=new Pr(t.id??null,{code:-32600,message:"Invalid Request",data:"JSONRPC version must be 2.0"});else if(!t.method)r=new Pr(t.id??null,{code:-32600,message:"Invalid Request",data:"JSONRPC method must be specified"});else if(typeof t.method!="string")r=new Pr(t.id??null,{code:-32600,message:"Invalid Request",data:"JSONRPC method must be a string"});else{let n=new lo;n.id=t.id??null,n.method=t.method,t.params&&(n.params=t.params),Object.keys(this.rpcHandlers).includes(n.method)?r=await Nx(this.rpcHandlers[n.method])(n):r=new Pr(n.id,{code:-32601,message:"Method not found",data:`Method ${n.method} not found`})}if(t.id||r instanceof Pr)return r};v2RPCresponder=async(t,r)=>{r||(r=new Ct(""));let n=t.query.get("content")??t.body,a,i=[];try{a=JSON.parse(n)}catch(o){let l=new Pr(null,{code:-32700,message:"Parse error",data:o.message});return r.body=l.toString(),OM(r),r}if(a instanceof Array)i=(await Promise.all(a.map(async o=>this._v2RPCsingleResponder(o)))).filter(o=>o!==void 0);else{let o=await this._v2RPCsingleResponder(a);o&&i.push(o)}return i.length>1?r.body=JSON.stringify(i):i.length==1&&(r.body=JSON.stringify(i[0])),OM(r),r};mountJSONRPC(t=["/jsonrpc","/jsonrpc/v2"]){return t.forEach(r=>this.binding(r,new lr("ANY",[this.v2RPCresponder]))),this}mount=this.mountJSONRPC};var op=e=>{e.status=200,e.headers.set("Date",new Date().toUTCString()),Gs.default.env.ENABLE_CORS&&(e.headers.set("Access-Control-Allow-Origin",Gs.default.env.CORS_ORIGIN||"*"),e.headers.set("Access-Control-Allow-Methods","GET, POST, OPTIONS"),e.headers.set("Allow","GET, POST, OPTIONS"),e.headers.set("Access-Control-Expose-Headers","Date, X-License, X-Author, X-Powered-By"))},Oa=async(e,t)=>{let r=await t.respond(new Tr("GET",new URL(`http://this.internal/${e}`),new Xu.headers({}),"",{})).catch(n=>n);try{return JSON.parse(r.body)}catch{if(!(r instanceof Ct))throw new Error(r);return r}},FM=e=>{if(e instanceof Array)return e.sort();if(typeof e!="object")return e;let t=Object.keys(e).sort(),r={};for(let n of t)r[n]=FM(e[n]);return r},zs=(e,t)=>{op(e);let r=JSON.parse(e.body),n=FM(r);e.body=JSON.stringify(n),(t.query.has("pretty")||t.headers.get("Sec-Fetch-Dest")==="document")&&(e.body=JSON.stringify(n,null,4)),e.headers.set("Content-type","application/json; charset=utf-8")},IM=async(e,t,r,n,a,i=100,o=0)=>{let l=await n.convert(e,t,r,Number(a.query.get("amount"))||i||100,a.query.has("reverse"));return l=ks(l,1+(Number(a.query.get("fees"))||o)/100),l=Number(a.query.get("precision"))!==-1?ip(l,Number(a.query.get("precision"))||5):l,Number(l.toString())||l.toString()},RM=async(e,t,r,n)=>{let a={updated:(await r.getUpdatedDate(e,t)).toUTCString()};for(let i of["cash","remit","middle"])try{a[i]=await IM(e,t,i,r,n)}catch{a[i]=!1}return a},Tx=class extends Hs{constructor(r){super();this.fxms={};this.fxmStatus={};this.fxRateGetter={};this.intervalIDs={};this.rpcHandlers={instanceInfo:()=>Oa("info",this),listCurrencies:({source:r})=>{if(!r)throw new Error("source is required.");return Oa(`${r}/`,this).then(n=>new Object({currency:n.currency,date:n.date}))},listFXRates:({source:r,from:n,precision:a=2,amount:i=100,fees:o=0,reverse:l=!1})=>{if(!r)throw new Error("source is required.");if(!n)throw new Error("from is required.");return Oa(`${r}/${n}?precision=${a}&amount=${i}&fees=${o}${l?"&reverse":""}`,this)},getFXRate:({source:r,from:n,to:a,type:i,precision:o=2,amount:l=100,fees:u=0,reverse:s=!1})=>{if(!r)throw new Error("source is required.");if(!n)throw new Error("from is required.");if(!a)throw new Error("to is required.");if(!i)throw new Error("type is required.");return i=="all"&&(i=""),Oa(`${r}/${n}/${a}/${i}?precision=${o}&fees=${u}${s?"&reverse":""}&amount=${l}`,this)}};for(let n in r)this.registerGetter(n,r[n]);this.binding("/info",this.create("GET",async n=>{let a=new Ct("",200);return a.body=JSON.stringify({status:"ok",sources:Object.keys(this.fxms),version:"fxrate@f7d4e14 2025-01-05T23:39:48+08:00",apiVersion:"v1",environment:Gs.default.env.NODE_ENV||"development"}),zs(a,n),a})),this.enableList().mount(),this.log("JSONRPC is mounted.")}log(r){Gs.default.env.LOG_LEVEL!=="error"&&setTimeout(()=>{console.log(`[${new Date().toUTCString()}] [fxmManager] ${r}`)},0)}has(r){return this.fxms[r]!==void 0}async updateFXManager(r){if(!this.has(r))throw new Error("Source not found");this.log(`${r} is updating...`),(await this.fxRateGetter[r](this)).forEach(a=>this.fxms[r].update(a)),this.fxmStatus[r]="ready",this.intervalIDs[r].refreshDate=new Date,this.log(`${r} is updated, now is ready.`)}async requestFXManager(r){return this.fxmStatus[r]==="pending"&&await this.updateFXManager(r),this.fxms[r]}registerGetter(r,n){this.fxms[r]=new oa([]),this.fxRateGetter[r]=n,this.fxmStatus[r]="pending",this.mountFXMRouter(r),this.log(`Registered ${r}.`);let a=new Date;this.intervalIDs[r]={timeout:setInterval(()=>this.updateFXManager(r),1e3*60*30),refreshDate:a}}registerFXM(r,n){this.fxms[r]=n,this.fxmStatus[r]="ready",this.mountFXMRouter(r),this.log(`Registered ${r}.`)}mountFXMRouter(r){this.use([this.getFXMRouter(r)],`/${r}/(.*)`),this.use([this.getFXMRouter(r)],`/${r}`)}getFXMRouter(r){let n=new Pn,a=s=>{s.headers.set("Cache-Control",`public, max-age=${30*60-Math.round(Math.abs(((this.intervalIDs[r]??{refreshDate:new Date}).refreshDate.getTime()-new Date().getTime())/1e3)%1800)}`)},i=async(s,c)=>{if(s.params[0]&&s.params[0]!=r)return c;throw c.body=JSON.stringify({status:"ok",source:r,currency:Object.keys((await this.requestFXManager(r)).fxRateList).sort(),date:new Date().toUTCString()}),zs(c,s),a(c),c},o=async(s,c)=>{s.params.from&&(s.params.from=s.params.from.toUpperCase());let{from:p}=s.params,f={};if(!(await this.requestFXManager(r)).ableToGetAllFXRate)return c.status=403,f.status="error",f.message=`Not able to get all FX rate with ${p} on ${r}`,c.body=JSON.stringify(f),zs(c,s),c;for(let m in(await this.requestFXManager(r)).fxRateList[p])m!=p&&(f[m]=await RM(p,m,await this.requestFXManager(r),s));return c.body=JSON.stringify(f),zs(c,s),a(c),c},l=async(s,c)=>{s.params.from&&(s.params.from=s.params.from.toUpperCase()),s.params.to&&(s.params.to=s.params.to.toUpperCase());let{from:p,to:f}=s.params,m=await RM(p,f,await this.requestFXManager(r),s);return c.body=JSON.stringify(m),zs(c,s),c.headers.set("Date",(await(await this.requestFXManager(r)).getUpdatedDate(p,f)).toUTCString()),a(c),c},u=async(s,c)=>{s.params.from&&(s.params.from=s.params.from.toUpperCase()),s.params.to&&(s.params.to=s.params.to.toUpperCase());let{from:p,to:f,type:m,amount:h}=s.params,d=await IM(p,f,m,await this.requestFXManager(r),s,Number(h));return c.body=d.toString(),op(c),c.headers.set("Date",(await(await this.requestFXManager(r)).getUpdatedDate(p,f)).toUTCString()),a(c),c};return n.binding("/",new lr("GET",[i])),n.binding("/:from",new lr("GET",[i,o])),n.binding("/:from/:to",new lr("GET",[l])),n.binding("/:from/:to/:type",new lr("GET",[u])),n.binding("/:from/:to/:type/:amount",new lr("GET",[u])),n}stopAllInterval(){for(let r in this.intervalIDs)clearInterval(this.intervalIDs[r].timeout)}},BM=Tx;function Ys(e,t){return function(){return e.apply(t,arguments)}}var{toString:Cz}=Object.prototype,{getPrototypeOf:Sx}=Object,up=(e=>t=>{let r=Cz.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),_n=e=>(e=e.toLowerCase(),t=>up(t)===e),cp=e=>t=>typeof t===e,{isArray:po}=Array,js=cp("undefined");function _z(e){return e!==null&&!js(e)&&e.constructor!==null&&!js(e.constructor)&&Jr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var UM=_n("ArrayBuffer");function Mz(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&UM(e.buffer),t}var Oz=cp("string"),Jr=cp("function"),kM=cp("number"),lp=e=>e!==null&&typeof e=="object",Rz=e=>e===!0||e===!1,sp=e=>{if(up(e)!=="object")return!1;let t=Sx(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Fz=_n("Date"),Iz=_n("File"),Bz=_n("Blob"),Lz=_n("FileList"),Pz=e=>lp(e)&&Jr(e.pipe),Uz=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Jr(e.append)&&((t=up(e))==="formdata"||t==="object"&&Jr(e.toString)&&e.toString()==="[object FormData]"))},kz=_n("URLSearchParams"),[qz,Hz,zz,Gz]=["ReadableStream","Request","Response","Headers"].map(_n),Yz=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vs(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),po(e))for(n=0,a=e.length;n0;)if(a=r[n],t===a.toLowerCase())return a;return null}var pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,HM=e=>!js(e)&&e!==pi;function Dx(){let{caseless:e}=HM(this)&&this||{},t={},r=(n,a)=>{let i=e&&qM(t,a)||a;sp(t[i])&&sp(n)?t[i]=Dx(t[i],n):sp(n)?t[i]=Dx({},n):po(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n(Vs(t,(a,i)=>{r&&Jr(a)?e[i]=Ys(a,r):e[i]=a},{allOwnKeys:n}),e),Vz=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$z=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Xz=(e,t,r,n)=>{let a,i,o,l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&Sx(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Kz=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},Wz=e=>{if(!e)return null;if(po(e))return e;let t=e.length;if(!kM(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Qz=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Sx(Uint8Array)),Zz=(e,t)=>{let n=(e&&e[Symbol.iterator]).call(e),a;for(;(a=n.next())&&!a.done;){let i=a.value;t.call(e,i[0],i[1])}},Jz=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},eG=_n("HTMLFormElement"),tG=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),LM=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),rG=_n("RegExp"),zM=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};Vs(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},nG=e=>{zM(e,(t,r)=>{if(Jr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(Jr(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},aG=(e,t)=>{let r={},n=a=>{a.forEach(i=>{r[i]=!0})};return po(e)?n(e):n(String(e).split(t)),r},iG=()=>{},oG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,wx="abcdefghijklmnopqrstuvwxyz",PM="0123456789",GM={DIGIT:PM,ALPHA:wx,ALPHA_DIGIT:wx+wx.toUpperCase()+PM},sG=(e=16,t=GM.ALPHA_DIGIT)=>{let r="",{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function uG(e){return!!(e&&Jr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var cG=e=>{let t=new Array(10),r=(n,a)=>{if(lp(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;let i=po(n)?[]:{};return Vs(n,(o,l)=>{let u=r(o,a+1);!js(u)&&(i[l]=u)}),t[a]=void 0,i}}return n};return r(e,0)},lG=_n("AsyncFunction"),pG=e=>e&&(lp(e)||Jr(e))&&Jr(e.then)&&Jr(e.catch),YM=((e,t)=>e?setImmediate:t?((r,n)=>(pi.addEventListener("message",({source:a,data:i})=>{a===pi&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),pi.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Jr(pi.postMessage)),fG=typeof queueMicrotask<"u"?queueMicrotask.bind(pi):typeof process<"u"&&process.nextTick||YM,ie={isArray:po,isArrayBuffer:UM,isBuffer:_z,isFormData:Uz,isArrayBufferView:Mz,isString:Oz,isNumber:kM,isBoolean:Rz,isObject:lp,isPlainObject:sp,isReadableStream:qz,isRequest:Hz,isResponse:zz,isHeaders:Gz,isUndefined:js,isDate:Fz,isFile:Iz,isBlob:Bz,isRegExp:rG,isFunction:Jr,isStream:Pz,isURLSearchParams:kz,isTypedArray:Qz,isFileList:Lz,forEach:Vs,merge:Dx,extend:jz,trim:Yz,stripBOM:Vz,inherits:$z,toFlatObject:Xz,kindOf:up,kindOfTest:_n,endsWith:Kz,toArray:Wz,forEachEntry:Zz,matchAll:Jz,isHTMLForm:eG,hasOwnProperty:LM,hasOwnProp:LM,reduceDescriptors:zM,freezeMethods:nG,toObjectSet:aG,toCamelCase:tG,noop:iG,toFiniteNumber:oG,findKey:qM,global:pi,isContextDefined:HM,ALPHABET:GM,generateString:sG,isSpecCompliantForm:uG,toJSONObject:cG,isAsyncFn:lG,isThenable:pG,setImmediate:YM,asap:fG};function fo(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a)}ie.inherits(fo,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var jM=fo.prototype,VM={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{VM[e]={value:e}});Object.defineProperties(fo,VM);Object.defineProperty(jM,"isAxiosError",{value:!0});fo.from=(e,t,r,n,a,i)=>{let o=Object.create(jM);return ie.toFlatObject(e,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),fo.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};var ke=fo;var CO=Le(SO(),1),mp=CO.default;function Ux(e){return ie.isPlainObject(e)||ie.isArray(e)}function MO(e){return ie.endsWith(e,"[]")?e.slice(0,-2):e}function _O(e,t,r){return e?e.concat(t).map(function(a,i){return a=MO(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function KG(e){return ie.isArray(e)&&!e.some(Ux)}var WG=ie.toFlatObject(ie,{},null,function(t){return/^is[A-Z]/.test(t)});function QG(e,t,r){if(!ie.isObject(e))throw new TypeError("target must be an object");t=t||new(mp||FormData),r=ie.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,v){return!ie.isUndefined(v[d])});let n=r.metaTokens,a=r.visitor||c,i=r.dots,o=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&ie.isSpecCompliantForm(t);if(!ie.isFunction(a))throw new TypeError("visitor must be a function");function s(h){if(h===null)return"";if(ie.isDate(h))return h.toISOString();if(!u&&ie.isBlob(h))throw new ke("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(h)||ie.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,d,v){let x=h;if(h&&!v&&typeof h=="object"){if(ie.endsWith(d,"{}"))d=n?d:d.slice(0,-2),h=JSON.stringify(h);else if(ie.isArray(h)&&KG(h)||(ie.isFileList(h)||ie.endsWith(d,"[]"))&&(x=ie.toArray(h)))return d=MO(d),x.forEach(function(g,y){!(ie.isUndefined(g)||g===null)&&t.append(o===!0?_O([d],y,i):o===null?d:d+"[]",s(g))}),!1}return Ux(h)?!0:(t.append(_O(v,d,i),s(h)),!1)}let p=[],f=Object.assign(WG,{defaultVisitor:c,convertValue:s,isVisitable:Ux});function m(h,d){if(!ie.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+d.join("."));p.push(h),ie.forEach(h,function(x,N){(!(ie.isUndefined(x)||x===null)&&a.call(t,x,ie.isString(N)?N.trim():N,d,f))===!0&&m(x,d?d.concat(N):[N])}),p.pop()}}if(!ie.isObject(e))throw new TypeError("data must be an object");return m(e),t}var Ra=QG;function OO(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function RO(e,t){this._pairs=[],e&&Ra(e,this,t)}var FO=RO.prototype;FO.append=function(t,r){this._pairs.push([t,r])};FO.toString=function(t){let r=t?function(n){return t.call(this,n,OO)}:OO;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};var IO=RO;function ZG(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fi(e,t,r){if(!t)return e;let n=r&&r.encode||ZG,a=r&&r.serialize,i;if(a?i=a(t,r):i=ie.isURLSearchParams(t)?t.toString():new IO(t,r).toString(n),i){let o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var kx=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ie.forEach(this.handlers,function(n){n!==null&&t(n)})}},qx=kx;var mo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var BO=Le(require("url"),1),LO=BO.default.URLSearchParams;var PO={isNode:!0,classes:{URLSearchParams:LO,FormData:mp,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var zx={};on(zx,{hasBrowserEnv:()=>Hx,hasStandardBrowserEnv:()=>JG,hasStandardBrowserWebWorkerEnv:()=>eY,origin:()=>tY});var Hx=typeof window<"u"&&typeof document<"u",JG=(e=>Hx&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),eY=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tY=Hx&&window.location.href||"http://localhost";var Ht={...zx,...PO};function Gx(e,t){return Ra(e,new Ht.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return Ht.isNode&&ie.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function rY(e){return ie.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nY(e){let t={},r=Object.keys(e),n,a=r.length,i;for(n=0;n=r.length;return o=!o&&ie.isArray(a)?a.length:o,u?(ie.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!l):((!a[o]||!ie.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&ie.isArray(a[o])&&(a[o]=nY(a[o])),!l)}if(ie.isFormData(e)&&ie.isFunction(e.entries)){let r={};return ie.forEachEntry(e,(n,a)=>{t(rY(n),a,r,0)}),r}return null}var dp=aY;function iY(e,t,r){if(ie.isString(e))try{return(t||JSON.parse)(e),ie.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var Yx={transitional:mo,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=ie.isObject(t);if(i&&ie.isHTMLForm(t)&&(t=new FormData(t)),ie.isFormData(t))return a?JSON.stringify(dp(t)):t;if(ie.isArrayBuffer(t)||ie.isBuffer(t)||ie.isStream(t)||ie.isFile(t)||ie.isBlob(t)||ie.isReadableStream(t))return t;if(ie.isArrayBufferView(t))return t.buffer;if(ie.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Gx(t,this.formSerializer).toString();if((l=ie.isFileList(t))||n.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return Ra(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),iY(t)):t}],transformResponse:[function(t){let r=this.transitional||Yx.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(ie.isResponse(t)||ie.isReadableStream(t))return t;if(t&&ie.isString(t)&&(n&&!this.responseType||a)){let o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(o)throw l.name==="SyntaxError"?ke.from(l,ke.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ht.classes.FormData,Blob:Ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],e=>{Yx.headers[e]={}});var ho=Yx;var oY=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),UO=e=>{let t={},r,n,a;return e&&e.split(` +`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&oY[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var kO=Symbol("internals");function $s(e){return e&&String(e).trim().toLowerCase()}function hp(e){return e===!1||e==null?e:ie.isArray(e)?e.map(hp):String(e)}function sY(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var uY=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function jx(e,t,r,n,a){if(ie.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!ie.isString(t)){if(ie.isString(n))return t.indexOf(n)!==-1;if(ie.isRegExp(n))return n.test(t)}}function cY(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function lY(e,t){let r=ie.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}var vo=class{constructor(t){t&&this.set(t)}set(t,r,n){let a=this;function i(l,u,s){let c=$s(u);if(!c)throw new Error("header name must be a non-empty string");let p=ie.findKey(a,c);(!p||a[p]===void 0||s===!0||s===void 0&&a[p]!==!1)&&(a[p||u]=hp(l))}let o=(l,u)=>ie.forEach(l,(s,c)=>i(s,c,u));if(ie.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(ie.isString(t)&&(t=t.trim())&&!uY(t))o(UO(t),r);else if(ie.isHeaders(t))for(let[l,u]of t.entries())i(u,l,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=$s(t),t){let n=ie.findKey(this,t);if(n){let a=this[n];if(!r)return a;if(r===!0)return sY(a);if(ie.isFunction(r))return r.call(this,a,n);if(ie.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=$s(t),t){let n=ie.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||jx(this,this[n],n,r)))}return!1}delete(t,r){let n=this,a=!1;function i(o){if(o=$s(o),o){let l=ie.findKey(n,o);l&&(!r||jx(n,n[l],l,r))&&(delete n[l],a=!0)}}return ie.isArray(t)?t.forEach(i):i(t),a}clear(t){let r=Object.keys(this),n=r.length,a=!1;for(;n--;){let i=r[n];(!t||jx(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){let r=this,n={};return ie.forEach(this,(a,i)=>{let o=ie.findKey(n,i);if(o){r[o]=hp(a),delete r[i];return}let l=t?cY(i):String(i).trim();l!==i&&delete r[i],r[l]=hp(a),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return ie.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&ie.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){let n=(this[kO]=this[kO]={accessors:{}}).accessors,a=this.prototype;function i(o){let l=$s(o);n[l]||(lY(a,o),n[l]=!0)}return ie.isArray(t)?t.forEach(i):i(t),this}};vo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ie.reduceDescriptors(vo.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});ie.freezeMethods(vo);var zt=vo;function Xs(e,t){let r=this||ho,n=t||r,a=zt.from(n.headers),i=n.data;return ie.forEach(e,function(l){i=l.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function Ks(e){return!!(e&&e.__CANCEL__)}function qO(e,t,r){ke.call(this,e??"canceled",ke.ERR_CANCELED,t,r),this.name="CanceledError"}ie.inherits(qO,ke,{__CANCEL__:!0});var en=qO;function Vn(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ke("Request failed with status code "+r.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Vx(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $x(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function mi(e,t){return e&&!Vx(t)?$x(e,t):t}var NR=Le(zO(),1),TR=Le(require("http"),1),wR=Le(require("https"),1),DR=Le(require("util"),1),SR=Le(sR(),1),ua=Le(require("zlib"),1);var vi="1.7.4";function tu(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var KY=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function lb(e,t,r){let n=r&&r.Blob||Ht.classes.Blob,a=tu(e);if(t===void 0&&n&&(t=!0),a==="data"){e=a.length?e.slice(a.length+1):e;let i=KY.exec(e);if(!i)throw new ke("Invalid URL",ke.ERR_INVALID_URL);let o=i[1],l=i[2],u=i[3],s=Buffer.from(decodeURIComponent(u),l?"base64":"utf8");if(t){if(!n)throw new ke("Blob is not supported",ke.ERR_NOT_SUPPORT);return new n([s],{type:o})}return s}throw new ke("Unsupported protocol "+a,ke.ERR_NOT_SUPPORT)}var gi=Le(require("stream"),1);var uR=Le(require("stream"),1);var pb=Symbol("internals"),fb=class extends uR.default.Transform{constructor(t){t=ie.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,a)=>!ie.isUndefined(a[n])),super({readableHighWaterMark:t.chunkSize});let r=this[pb]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(t){let r=this[pb];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,n){let a=this[pb],i=a.maxRate,o=this.readableHighWaterMark,l=a.timeWindow,u=1e3/l,s=i/u,c=a.minChunkSize!==!1?Math.max(a.minChunkSize,s*.01):0,p=(m,h)=>{let d=Buffer.byteLength(m);a.bytesSeen+=d,a.bytes+=d,a.isCaptured&&this.emit("progress",a.bytesSeen),this.push(m)?process.nextTick(h):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(h)}},f=(m,h)=>{let d=Buffer.byteLength(m),v=null,x=o,N,g=0;if(i){let y=Date.now();(!a.ts||(g=y-a.ts)>=l)&&(a.ts=y,N=s-a.bytes,a.bytes=N<0?-N:0,g=0),N=s-a.bytes}if(i){if(N<=0)return setTimeout(()=>{h(null,m)},l-g);Nx&&d-x>c&&(v=m.subarray(x),m=m.subarray(0,x)),p(m,v?()=>{process.nextTick(h,null,v)}:h)};f(t,function m(h,d){if(h)return n(h);d?f(d,m):n(null)})}},mb=fb;var CR=require("events");var lR=require("util"),pR=require("stream");var{asyncIterator:cR}=Symbol,WY=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[cR]?yield*e[cR]():yield e},yp=WY;var QY=ie.ALPHABET.ALPHA_DIGIT+"-_",ru=new lR.TextEncoder,Ia=`\r +`,ZY=ru.encode(Ia),JY=2,db=class{constructor(t,r){let{escapeName:n}=this.constructor,a=ie.isString(r),i=`Content-Disposition: form-data; name="${n(t)}"${!a&&r.name?`; filename="${n(r.name)}"`:""}${Ia}`;a?r=ru.encode(String(r).replace(/\r?\n|\r\n?/g,Ia)):i+=`Content-Type: ${r.type||"application/octet-stream"}${Ia}`,this.headers=ru.encode(i+Ia),this.contentLength=a?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+JY,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;ie.isTypedArray(t)?yield t:yield*yp(t),yield ZY}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},ej=(e,t,r)=>{let{tag:n="form-data-boundary",size:a=25,boundary:i=n+"-"+ie.generateString(a,QY)}=r||{};if(!ie.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let o=ru.encode("--"+i+Ia),l=ru.encode("--"+i+"--"+Ia+Ia),u=l.byteLength,s=Array.from(e.entries()).map(([p,f])=>{let m=new db(p,f);return u+=m.size,m});u+=o.byteLength*s.length,u=ie.toFiniteNumber(u);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(c["Content-Length"]=u),t&&t(c),pR.Readable.from(async function*(){for(let p of s)yield o,yield*p.encode();yield l}())},fR=ej;var mR=Le(require("stream"),1),hb=class extends mR.default.Transform{__transform(t,r,n){this.push(t),n()}_transform(t,r,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let a=Buffer.alloc(2);a[0]=120,a[1]=156,this.push(a,r)}this.__transform(t,r,n)}},dR=hb;var tj=(e,t)=>ie.isAsyncFn(e)?function(...r){let n=r.pop();e.apply(this,r).then(a=>{try{t?n(null,...t(a)):n(null,a)}catch(i){n(i)}},n)}:e,hR=tj;function rj(e,t){e=e||10;let r=new Array(e),n=new Array(e),a=0,i=0,o;return t=t!==void 0?t:1e3,function(u){let s=Date.now(),c=n[i];o||(o=s),r[a]=u,n[a]=s;let p=i,f=0;for(;p!==a;)f+=r[p++],p=p%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),s-o{r=c,a=null,i&&(clearTimeout(i),i=null),e.apply(null,s)};return[(...s)=>{let c=Date.now(),p=c-r;p>=n?o(s,c):(a=s,i||(i=setTimeout(()=>{i=null,o(a)},n-p)))},()=>a&&o(a)]}var gR=nj;var sa=(e,t,r=3)=>{let n=0,a=vR(50,250);return gR(i=>{let o=i.loaded,l=i.lengthComputable?i.total:void 0,u=o-n,s=a(u),c=o<=l;n=o;let p={loaded:o,total:l,progress:l?o/l:void 0,bytes:u,rate:s||void 0,estimated:s&&l&&c?(l-o)/s:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},r)},Eo=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Ao=e=>(...t)=>ie.asap(()=>e(...t));var xR={flush:ua.default.constants.Z_SYNC_FLUSH,finishFlush:ua.default.constants.Z_SYNC_FLUSH},aj={flush:ua.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ua.default.constants.BROTLI_OPERATION_FLUSH},bR=ie.isFunction(ua.default.createBrotliDecompress),{http:ij,https:oj}=SR.default,sj=/https:?/,yR=Ht.protocols.map(e=>e+":"),ER=(e,[t,r])=>(e.on("end",r).on("error",r),t);function uj(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function _R(e,t,r){let n=t;if(!n&&n!==!1){let a=(0,NR.getProxyForUrl)(r);a&&(n=new URL(a))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let i=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+i}e.headers.host=e.hostname+(e.port?":"+e.port:"");let a=n.hostname||n.host;e.hostname=a,e.host=a,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(i){_R(i,t,i.href)}}var cj=typeof process<"u"&&ie.kindOf(process)==="process",lj=e=>new Promise((t,r)=>{let n,a,i=(u,s)=>{a||(a=!0,n&&n(u,s))},o=u=>{i(u),t(u)},l=u=>{i(u,!0),r(u)};e(o,l,u=>n=u).catch(l)}),pj=({address:e,family:t})=>{if(!ie.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},AR=(e,t)=>pj(ie.isObject(e)?e:{address:e,family:t}),MR=cj&&function(t){return lj(async function(n,a,i){let{data:o,lookup:l,family:u}=t,{responseType:s,responseEncoding:c}=t,p=t.method.toUpperCase(),f,m=!1,h;if(l){let _=hR(l,q=>ie.isArray(q)?q:[q]);l=(q,B,Z)=>{_(q,B,(te,Q,z)=>{if(te)return Z(te);let re=ie.isArray(Q)?Q.map(fe=>AR(fe)):[AR(Q,z)];B.all?Z(te,re):Z(te,re[0].address,re[0].family)})}}let d=new CR.EventEmitter,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(x),t.signal&&t.signal.removeEventListener("abort",x),d.removeAllListeners()};i((_,q)=>{f=!0,q&&(m=!0,v())});function x(_){d.emit("abort",!_||_.type?new en(null,t,h):_)}d.once("abort",a),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(x),t.signal&&(t.signal.aborted?x():t.signal.addEventListener("abort",x)));let N=mi(t.baseURL,t.url),g=new URL(N,ie.hasBrowserEnv?Ht.origin:void 0),y=g.protocol||yR[0];if(y==="data:"){let _;if(p!=="GET")return Vn(n,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{_=lb(t.url,s==="blob",{Blob:t.env&&t.env.Blob})}catch(q){throw ke.from(q,ke.ERR_BAD_REQUEST,t)}return s==="text"?(_=_.toString(c),(!c||c==="utf8")&&(_=ie.stripBOM(_))):s==="stream"&&(_=gi.default.Readable.from(_)),Vn(n,a,{data:_,status:200,statusText:"OK",headers:new zt,config:t})}if(yR.indexOf(y)===-1)return a(new ke("Unsupported protocol "+y,ke.ERR_BAD_REQUEST,t));let E=zt.from(t.headers).normalize();E.set("User-Agent","axios/"+vi,!1);let{onUploadProgress:b,onDownloadProgress:S}=t,A=t.maxRate,w,D;if(ie.isSpecCompliantForm(o)){let _=E.getContentType(/boundary=([-_\w\d]{10,70})/i);o=fR(o,q=>{E.set(q)},{tag:`axios-${vi}-boundary`,boundary:_&&_[1]||void 0})}else if(ie.isFormData(o)&&ie.isFunction(o.getHeaders)){if(E.set(o.getHeaders()),!E.hasContentLength())try{let _=await DR.default.promisify(o.getLength).call(o);Number.isFinite(_)&&_>=0&&E.setContentLength(_)}catch{}}else if(ie.isBlob(o))o.size&&E.setContentType(o.type||"application/octet-stream"),E.setContentLength(o.size||0),o=gi.default.Readable.from(yp(o));else if(o&&!ie.isStream(o)){if(!Buffer.isBuffer(o))if(ie.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(ie.isString(o))o=Buffer.from(o,"utf-8");else return a(new ke("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",ke.ERR_BAD_REQUEST,t));if(E.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return a(new ke("Request body larger than maxBodyLength limit",ke.ERR_BAD_REQUEST,t))}let F=ie.toFiniteNumber(E.getContentLength());ie.isArray(A)?(w=A[0],D=A[1]):w=D=A,o&&(b||w)&&(ie.isStream(o)||(o=gi.default.Readable.from(o,{objectMode:!1})),o=gi.default.pipeline([o,new mb({maxRate:ie.toFiniteNumber(w)})],ie.noop),b&&o.on("progress",ER(o,Eo(F,sa(Ao(b),!1,3)))));let R;if(t.auth){let _=t.auth.username||"",q=t.auth.password||"";R=_+":"+q}if(!R&&g.username){let _=g.username,q=g.password;R=_+":"+q}R&&E.delete("authorization");let P;try{P=fi(g.pathname+g.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(_){let q=new Error(_.message);return q.config=t,q.url=t.url,q.exists=!0,a(q)}E.set("Accept-Encoding","gzip, compress, deflate"+(bR?", br":""),!1);let U={path:P,method:p,headers:E.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:R,protocol:y,family:u,beforeRedirect:uj,beforeRedirects:{}};!ie.isUndefined(l)&&(U.lookup=l),t.socketPath?U.socketPath=t.socketPath:(U.hostname=g.hostname,U.port=g.port,_R(U,t.proxy,y+"//"+g.hostname+(g.port?":"+g.port:"")+U.path));let k,M=sj.test(U.protocol);if(U.agent=M?t.httpsAgent:t.httpAgent,t.transport?k=t.transport:t.maxRedirects===0?k=M?wR.default:TR.default:(t.maxRedirects&&(U.maxRedirects=t.maxRedirects),t.beforeRedirect&&(U.beforeRedirects.config=t.beforeRedirect),k=M?oj:ij),t.maxBodyLength>-1?U.maxBodyLength=t.maxBodyLength:U.maxBodyLength=1/0,t.insecureHTTPParser&&(U.insecureHTTPParser=t.insecureHTTPParser),h=k.request(U,function(q){if(h.destroyed)return;let B=[q],Z=+q.headers["content-length"];if(S||D){let fe=new mb({maxRate:ie.toFiniteNumber(D)});S&&fe.on("progress",ER(fe,Eo(Z,sa(Ao(S),!0,3)))),B.push(fe)}let te=q,Q=q.req||h;if(t.decompress!==!1&&q.headers["content-encoding"])switch((p==="HEAD"||q.statusCode===204)&&delete q.headers["content-encoding"],(q.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":B.push(ua.default.createUnzip(xR)),delete q.headers["content-encoding"];break;case"deflate":B.push(new dR),B.push(ua.default.createUnzip(xR)),delete q.headers["content-encoding"];break;case"br":bR&&(B.push(ua.default.createBrotliDecompress(aj)),delete q.headers["content-encoding"])}te=B.length>1?gi.default.pipeline(B,ie.noop):B[0];let z=gi.default.finished(te,()=>{z(),v()}),re={status:q.statusCode,statusText:q.statusMessage,headers:new zt(q.headers),config:t,request:Q};if(s==="stream")re.data=te,Vn(n,a,re);else{let fe=[],L=0;te.on("data",function($){fe.push($),L+=$.length,t.maxContentLength>-1&&L>t.maxContentLength&&(m=!0,te.destroy(),a(new ke("maxContentLength size of "+t.maxContentLength+" exceeded",ke.ERR_BAD_RESPONSE,t,Q)))}),te.on("aborted",function(){if(m)return;let $=new ke("maxContentLength size of "+t.maxContentLength+" exceeded",ke.ERR_BAD_RESPONSE,t,Q);te.destroy($),a($)}),te.on("error",function($){h.destroyed||a(ke.from($,null,t,Q))}),te.on("end",function(){try{let $=fe.length===1?fe[0]:Buffer.concat(fe);s!=="arraybuffer"&&($=$.toString(c),(!c||c==="utf8")&&($=ie.stripBOM($))),re.data=$}catch($){return a(ke.from($,null,t,re.request,re))}Vn(n,a,re)})}d.once("abort",fe=>{te.destroyed||(te.emit("error",fe),te.destroy())})}),d.once("abort",_=>{a(_),h.destroy(_)}),h.on("error",function(q){a(ke.from(q,null,t,h))}),h.on("socket",function(q){q.setKeepAlive(!0,1e3*60)}),t.timeout){let _=parseInt(t.timeout,10);if(Number.isNaN(_)){a(new ke("error trying to parse `config.timeout` to int",ke.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(_,function(){if(f)return;let B=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Z=t.transitional||mo;t.timeoutErrorMessage&&(B=t.timeoutErrorMessage),a(new ke(B,Z.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,t,h)),x()})}if(ie.isStream(o)){let _=!1,q=!1;o.on("end",()=>{_=!0}),o.once("error",B=>{q=!0,h.destroy(B)}),o.on("close",()=>{!_&&!q&&x(new en("Request stream has been aborted",t,h))}),o.pipe(h)}else h.end(o)})};var OR=Ht.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){let l=ie.isString(o)?a(o):o;return l.protocol===n.protocol&&l.host===n.host}}():function(){return function(){return!0}}();var RR=Ht.hasStandardBrowserEnv?{write(e,t,r,n,a,i){let o=[e+"="+encodeURIComponent(t)];ie.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),ie.isString(n)&&o.push("path="+n),ie.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var FR=e=>e instanceof zt?{...e}:e;function On(e,t){t=t||{};let r={};function n(s,c,p){return ie.isPlainObject(s)&&ie.isPlainObject(c)?ie.merge.call({caseless:p},s,c):ie.isPlainObject(c)?ie.merge({},c):ie.isArray(c)?c.slice():c}function a(s,c,p){if(ie.isUndefined(c)){if(!ie.isUndefined(s))return n(void 0,s,p)}else return n(s,c,p)}function i(s,c){if(!ie.isUndefined(c))return n(void 0,c)}function o(s,c){if(ie.isUndefined(c)){if(!ie.isUndefined(s))return n(void 0,s)}else return n(void 0,c)}function l(s,c,p){if(p in t)return n(s,c);if(p in e)return n(void 0,s)}let u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(s,c)=>a(FR(s),FR(c),!0)};return ie.forEach(Object.keys(Object.assign({},e,t)),function(c){let p=u[c]||a,f=p(e[c],t[c],c);ie.isUndefined(f)&&p!==l||(r[c]=f)}),r}var Ep=e=>{let t=On({},e),{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:l}=t;t.headers=o=zt.from(o),t.url=fi(mi(t.baseURL,t.url),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(ie.isFormData(r)){if(Ht.hasStandardBrowserEnv||Ht.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){let[s,...c]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([s||"multipart/form-data",...c].join("; "))}}if(Ht.hasStandardBrowserEnv&&(n&&ie.isFunction(n)&&(n=n(t)),n||n!==!1&&OR(t.url))){let s=a&&i&&RR.read(i);s&&o.set(a,s)}return t};var fj=typeof XMLHttpRequest<"u",IR=fj&&function(e){return new Promise(function(r,n){let a=Ep(e),i=a.data,o=zt.from(a.headers).normalize(),{responseType:l,onUploadProgress:u,onDownloadProgress:s}=a,c,p,f,m,h;function d(){m&&m(),h&&h(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function x(){if(!v)return;let g=zt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:g,config:e,request:v};Vn(function(S){r(S),d()},function(S){n(S),d()},E),v=null}"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(x)},v.onabort=function(){v&&(n(new ke("Request aborted",ke.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new ke("Network Error",ke.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let y=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",E=a.transitional||mo;a.timeoutErrorMessage&&(y=a.timeoutErrorMessage),n(new ke(y,E.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,v)),v=null},i===void 0&&o.setContentType(null),"setRequestHeader"in v&&ie.forEach(o.toJSON(),function(y,E){v.setRequestHeader(E,y)}),ie.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),l&&l!=="json"&&(v.responseType=a.responseType),s&&([f,h]=sa(s,!0),v.addEventListener("progress",f)),u&&v.upload&&([p,m]=sa(u),v.upload.addEventListener("progress",p),v.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(c=g=>{v&&(n(!g||g.type?new en(null,e,v):g),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));let N=tu(a.url);if(N&&Ht.protocols.indexOf(N)===-1){n(new ke("Unsupported protocol "+N+":",ke.ERR_BAD_REQUEST,e));return}v.send(i||null)})};var mj=(e,t)=>{let r=new AbortController,n,a=function(u){if(!n){n=!0,o();let s=u instanceof Error?u:this.reason;r.abort(s instanceof ke?s:new en(s instanceof Error?s.message:s))}},i=t&&setTimeout(()=>{a(new ke(`timeout ${t} of ms exceeded`,ke.ETIMEDOUT))},t),o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u&&(u.removeEventListener?u.removeEventListener("abort",a):u.unsubscribe(a))}),e=null)};e.forEach(u=>u&&u.addEventListener&&u.addEventListener("abort",a));let{signal:l}=r;return l.unsubscribe=o,[l,()=>{i&&clearTimeout(i),i=null}]},BR=mj;var dj=function*(e,t){let r=e.byteLength;if(!t||r{let i=hj(e,t,a),o=0,l,u=s=>{l||(l=!0,n&&n(s))};return new ReadableStream({async pull(s){try{let{done:c,value:p}=await i.next();if(c){u(),s.close();return}let f=p.byteLength;if(r){let m=o+=f;r(m)}s.enqueue(new Uint8Array(p))}catch(c){throw u(c),c}},cancel(s){return u(s),i.return()}},{highWaterMark:2})};var Np=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",PR=Np&&typeof ReadableStream=="function",gb=Np&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),UR=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vj=PR&&UR(()=>{let e=!1,t=new Request(Ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),LR=64*1024,xb=PR&&UR(()=>ie.isReadableStream(new Response("").body)),Ap={stream:xb&&(e=>e.body)};Np&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ap[t]&&(Ap[t]=ie.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ke(`Response type '${t}' is not supported`,ke.ERR_NOT_SUPPORT,n)})})})(new Response);var gj=async e=>{if(e==null)return 0;if(ie.isBlob(e))return e.size;if(ie.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(ie.isArrayBufferView(e)||ie.isArrayBuffer(e))return e.byteLength;if(ie.isURLSearchParams(e)&&(e=e+""),ie.isString(e))return(await gb(e)).byteLength},xj=async(e,t)=>{let r=ie.toFiniteNumber(e.getContentLength());return r??gj(t)},kR=Np&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:i,timeout:o,onDownloadProgress:l,onUploadProgress:u,responseType:s,headers:c,withCredentials:p="same-origin",fetchOptions:f}=Ep(e);s=s?(s+"").toLowerCase():"text";let[m,h]=a||i||o?BR([a,i],o):[],d,v,x=()=>{!d&&setTimeout(()=>{m&&m.unsubscribe()}),d=!0},N;try{if(u&&vj&&r!=="get"&&r!=="head"&&(N=await xj(c,n))!==0){let b=new Request(t,{method:"POST",body:n,duplex:"half"}),S;if(ie.isFormData(n)&&(S=b.headers.get("content-type"))&&c.setContentType(S),b.body){let[A,w]=Eo(N,sa(Ao(u)));n=vb(b.body,LR,A,w,gb)}}ie.isString(p)||(p=p?"include":"omit"),v=new Request(t,{...f,signal:m,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:p});let g=await fetch(v),y=xb&&(s==="stream"||s==="response");if(xb&&(l||y)){let b={};["status","statusText","headers"].forEach(D=>{b[D]=g[D]});let S=ie.toFiniteNumber(g.headers.get("content-length")),[A,w]=l&&Eo(S,sa(Ao(l),!0))||[];g=new Response(vb(g.body,LR,A,()=>{w&&w(),y&&x()},gb),b)}s=s||"text";let E=await Ap[ie.findKey(Ap,s)||"text"](g,e);return!y&&x(),h&&h(),await new Promise((b,S)=>{Vn(b,S,{data:E,headers:zt.from(g.headers),status:g.status,statusText:g.statusText,config:e,request:v})})}catch(g){throw x(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new ke("Network Error",ke.ERR_NETWORK,e,v),{cause:g.cause||g}):ke.from(g,g&&g.code,e,v)}});var bb={http:MR,xhr:IR,fetch:kR};ie.forEach(bb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var qR=e=>`- ${e}`,bj=e=>ie.isFunction(e)||e===null||e===!1,Tp={getAdapter:e=>{e=ie.isArray(e)?e:[e];let{length:t}=e,r,n,a={};for(let i=0;i`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build")),o=t?i.length>1?`since : +`+i.map(qR).join(` +`):" "+qR(i[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:bb};function yb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new en(null,e)}function wp(e){return yb(e),e.headers=zt.from(e.headers),e.data=Xs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Tp.getAdapter(e.adapter||ho.adapter)(e).then(function(n){return yb(e),n.data=Xs.call(e,e.transformResponse,n),n.headers=zt.from(n.headers),n},function(n){return Ks(n)||(yb(e),n&&n.response&&(n.response.data=Xs.call(e,e.transformResponse,n.response),n.response.headers=zt.from(n.response.headers))),Promise.reject(n)})}var Eb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Eb[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var HR={};Eb.transitional=function(t,r,n){function a(i,o){return"[Axios v"+vi+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,l)=>{if(t===!1)throw new ke(a(o," has been removed"+(r?" in "+r:"")),ke.ERR_DEPRECATED);return r&&!HR[o]&&(HR[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,l):!0}};function yj(e,t,r){if(typeof e!="object")throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),a=n.length;for(;a-- >0;){let i=n[a],o=t[i];if(o){let l=e[i],u=l===void 0||o(l,i,e);if(u!==!0)throw new ke("option "+i+" must be "+u,ke.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ke("Unknown option "+i,ke.ERR_BAD_OPTION)}}var Dp={assertOptions:yj,validators:Eb};var Ba=Dp.validators,No=class{constructor(t){this.defaults=t,this.interceptors={request:new qx,response:new qx}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;let i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=` +`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=On(this.defaults,r);let{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&Dp.assertOptions(n,{silentJSONParsing:Ba.transitional(Ba.boolean),forcedJSONParsing:Ba.transitional(Ba.boolean),clarifyTimeoutError:Ba.transitional(Ba.boolean)},!1),a!=null&&(ie.isFunction(a)?r.paramsSerializer={serialize:a}:Dp.assertOptions(a,{encode:Ba.function,serialize:Ba.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&ie.merge(i.common,i[r.method]);i&&ie.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=zt.concat(o,i);let l=[],u=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(r)===!1||(u=u&&d.synchronous,l.unshift(d.fulfilled,d.rejected))});let s=[];this.interceptors.response.forEach(function(d){s.push(d.fulfilled,d.rejected)});let c,p=0,f;if(!u){let h=[wp.bind(this),void 0];for(h.unshift.apply(h,l),h.push.apply(h,s),f=h.length,c=Promise.resolve(r);p{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i,o=new Promise(l=>{n.subscribe(l),i=l}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,l){n.reason||(n.reason=new en(i,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new e(function(a){t=a}),cancel:t}}},zR=Ab;function Nb(e){return function(r){return e.apply(null,r)}}function Tb(e){return ie.isObject(e)&&e.isAxiosError===!0}var wb={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wb).forEach(([e,t])=>{wb[t]=e});var GR=wb;function YR(e){let t=new nu(e),r=Ys(nu.prototype.request,t);return ie.extend(r,nu.prototype,t,{allOwnKeys:!0}),ie.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return YR(On(e,a))},r}var Qt=YR(ho);Qt.Axios=nu;Qt.CanceledError=en;Qt.CancelToken=zR;Qt.isCancel=Ks;Qt.VERSION=vi;Qt.toFormData=Ra;Qt.AxiosError=ke;Qt.Cancel=Qt.CanceledError;Qt.all=function(t){return Promise.all(t)};Qt.spread=Nb;Qt.isAxiosError=Tb;Qt.mergeConfig=On;Qt.AxiosHeaders=zt;Qt.formToJSON=e=>dp(ie.isHTMLForm(e)?new FormData(e):e);Qt.getAdapter=Tp.getAdapter;Qt.HttpStatusCode=GR;Qt.default=Qt;var Je=Qt;var{Axios:g9e,AxiosError:x9e,CanceledError:b9e,isCancel:y9e,CancelToken:E9e,VERSION:A9e,all:N9e,Cancel:T9e,isAxiosError:w9e,spread:D9e,toFormData:S9e,AxiosHeaders:C9e,HttpStatusCode:_9e,formToJSON:M9e,getAdapter:O9e,mergeConfig:R9e}=Je;var r4=Le(Ib(),1);var _V={xml:!1,decodeEntities:!0},ou=_V,AF={_useHtmlParser2:!0,xmlMode:!0};function su(e){return e?.xml?typeof e.xml=="boolean"?AF:{...AF,...e.xml}:e??void 0}var Ha={};on(Ha,{contains:()=>jb,html:()=>tI,merge:()=>b$,parseHTML:()=>g$,root:()=>x$,text:()=>qa,xml:()=>rI});var ka={};on(ka,{DocumentPosition:()=>gn,append:()=>e$,appendChild:()=>JV,compareDocumentPosition:()=>QF,existsOne:()=>XF,filter:()=>vu,find:()=>Pp,findAll:()=>a$,findOne:()=>Up,findOneChild:()=>n$,getAttributeValue:()=>KV,getChildren:()=>_o,getElementById:()=>u$,getElements:()=>s$,getElementsByTagName:()=>Ni,getElementsByTagType:()=>c$,getFeed:()=>Yb,getInnerHTML:()=>XV,getName:()=>QV,getOuterHTML:()=>VF,getParent:()=>$F,getSiblings:()=>Gb,getText:()=>Ip,hasAttrib:()=>WV,hasChildren:()=>Ut,innerText:()=>hu,isCDATA:()=>To,isComment:()=>Ai,isDocument:()=>Rn,isTag:()=>$e,isText:()=>qr,nextElementSibling:()=>Bp,prepend:()=>r$,prependChild:()=>t$,prevElementSibling:()=>Lp,removeElement:()=>fa,removeSubsets:()=>l$,replaceElement:()=>ZV,testElement:()=>o$,textContent:()=>pa,uniqueSort:()=>Pa});var xt;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(xt||(xt={}));function NF(e){return e.type===xt.Tag||e.type===xt.Script||e.type===xt.Style}var TF=xt.Root,wF=xt.Text,DF=xt.Directive,SF=xt.Comment,CF=xt.Script,_F=xt.Style,MF=xt.Tag,OF=xt.CDATA,RF=xt.Doctype;var Cp=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return pu(this,t)}},uu=class extends Cp{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},$n=class extends uu{constructor(){super(...arguments),this.type=xt.Text}get nodeType(){return 3}},bi=class extends uu{constructor(){super(...arguments),this.type=xt.Comment}get nodeType(){return 8}},yi=class extends uu{constructor(t,r){super(r),this.name=t,this.type=xt.Directive}get nodeType(){return 1}},cu=class extends Cp{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},lu=class extends cu{constructor(){super(...arguments),this.type=xt.CDATA}get nodeType(){return 4}},rn=class extends cu{constructor(){super(...arguments),this.type=xt.Root}get nodeType(){return 9}},Ei=class extends cu{constructor(t,r,n=[],a=t==="script"?xt.Script:t==="style"?xt.Style:xt.Tag){super(n),this.name=t,this.attribs=r,this.type=a}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var r,n;return{name:t,value:this.attribs[t],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[t],prefix:(n=this["x-attribsPrefix"])===null||n===void 0?void 0:n[t]}})}};function $e(e){return NF(e)}function To(e){return e.type===xt.CDATA}function qr(e){return e.type===xt.Text}function Ai(e){return e.type===xt.Comment}function _p(e){return e.type===xt.Directive}function Rn(e){return e.type===xt.Root}function Ut(e){return Object.prototype.hasOwnProperty.call(e,"children")}function pu(e,t=!1){let r;if(qr(e))r=new $n(e.data);else if(Ai(e))r=new bi(e.data);else if($e(e)){let n=t?Bb(e.children):[],a=new Ei(e.name,{...e.attribs},n);n.forEach(i=>i.parent=a),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=a}else if(To(e)){let n=t?Bb(e.children):[],a=new lu(n);n.forEach(i=>i.parent=a),r=a}else if(Rn(e)){let n=t?Bb(e.children):[],a=new rn(n);n.forEach(i=>i.parent=a),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),r=a}else if(_p(e)){let n=new yi(e.name,e.data);e["x-name"]!=null&&(n["x-name"]=e["x-name"],n["x-publicId"]=e["x-publicId"],n["x-systemId"]=e["x-systemId"]),r=n}else throw new Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function Bb(e){let t=e.map(r=>pu(r,!0));for(let r=1;r\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var Mp=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var Lb,MV=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Do=(Lb=String.fromCodePoint)!==null&&Lb!==void 0?Lb:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function fu(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=MV.get(e))!==null&&t!==void 0?t:e}var cr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(cr||(cr={}));var OV=32,Cr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Cr||(Cr={}));function Pb(e){return e>=cr.ZERO&&e<=cr.NINE}function RV(e){return e>=cr.UPPER_A&&e<=cr.UPPER_F||e>=cr.LOWER_A&&e<=cr.LOWER_F}function FV(e){return e>=cr.UPPER_A&&e<=cr.UPPER_Z||e>=cr.LOWER_A&&e<=cr.LOWER_Z||Pb(e)}function IV(e){return e===cr.EQUALS||FV(e)}var ur;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ur||(ur={}));var la;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(la||(la={}));var Op=class{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=ur.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=la.Strict}startEntity(t){this.decodeMode=t,this.state=ur.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case ur.EntityStart:return t.charCodeAt(r)===cr.NUM?(this.state=ur.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=ur.NamedEntity,this.stateNamedEntity(t,r));case ur.NumericStart:return this.stateNumericStart(t,r);case ur.NumericDecimal:return this.stateNumericDecimal(t,r);case ur.NumericHex:return this.stateNumericHex(t,r);case ur.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|OV)===cr.LOWER_X?(this.state=ur.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=ur.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,a){if(r!==n){let i=n-r;this.result=this.result*Math.pow(a,i)+parseInt(t.substr(r,i),a),this.consumed+=i}}stateNumericHex(t,r){let n=r;for(;r>14;for(;r>14,i!==0){if(o===cr.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==la.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:r,decodeTree:n}=this,a=(n[r]&Cr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){let{decodeTree:a}=this;return this.emitCodePoint(r===1?a[t]&~Cr.VALUE_LENGTH:a[t+1],n),r===3&&this.emitCodePoint(a[t+2],n),n}end(){var t;switch(this.state){case ur.NamedEntity:return this.result!==0&&(this.decodeMode!==la.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ur.NumericDecimal:return this.emitNumericEntity(0,2);case ur.NumericHex:return this.emitNumericEntity(0,3);case ur.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ur.EntityStart:return 0}}};function BF(e){let t="",r=new Op(e,n=>t+=Do(n));return function(a,i){let o=0,l=0;for(;(l=a.indexOf("&",l))>=0;){t+=a.slice(o,l),r.startEntity(i);let s=r.write(a,l+1);if(s<0){o=l+r.end();break}o=l+s,l=s===0?o+1:o}let u=t+a.slice(o);return t="",u}}function mu(e,t,r,n){let a=(t&Cr.BRANCH_LENGTH)>>7,i=t&Cr.JUMP_TABLE;if(a===0)return i!==0&&n===i?r:-1;if(i){let u=n-i;return u<0||u>=a?-1:e[r+u]-1}let o=r,l=o+a-1;for(;o<=l;){let u=o+l>>>1,s=e[u];if(sn)l=u-1;else return e[u+a]}return-1}var o7e=BF(vn),s7e=BF(Mp);function Rp(e){for(let t=1;t$\x80-\uFFFF]/g,LF=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),PF=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function du(e){let t="",r=0,n;for(;(n=Ub.exec(e))!==null;){let a=n.index,i=e.charCodeAt(a),o=LF.get(i);o!==void 0?(t+=e.substring(r,a)+o,r=a+1):(t+=`${e.substring(r,a)}&#x${PF(e,a).toString(16)};`,r=Ub.lastIndex+=+((i&64512)===55296))}return t+e.substr(r)}function kb(e,t){return function(n){let a,i=0,o="";for(;a=e.exec(n);)i!==a.index&&(o+=n.substring(i,a.index)),o+=t.get(a[0].charCodeAt(0)),i=a.index+1;return o+n.substring(i)}}var UF=kb(/[&<>'"]/g,LF),So=kb(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Co=kb(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var kF;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(kF||(kF={}));var qF;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(qF||(qF={}));var GF=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),YF=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e]));var PV=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function UV(e){return e.replace(/"/g,""")}function kV(e,t){var r;if(!e)return;let n=((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)===!1?UV:t.xmlMode||t.encodeEntities!=="utf8"?du:So;return Object.keys(e).map(a=>{var i,o;let l=(i=e[a])!==null&&i!==void 0?i:"";return t.xmlMode==="foreign"&&(a=(o=YF.get(a))!==null&&o!==void 0?o:a),!t.emptyAttrs&&!t.xmlMode&&l===""?a:`${a}="${n(l)}"`}).join(" ")}var jF=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function zb(e,t={}){let r="length"in e?e:[e],n="";for(let a=0;a0&&(n+=zb(e.children,t)),(t.xmlMode||!jF.has(e.name))&&(n+=``)),n}function YV(e){return`<${e.data}>`}function jV(e,t){var r;let n=e.data||"";return((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&PV.has(e.parent.name))&&(n=t.xmlMode||t.encodeEntities!=="utf8"?du(n):Co(n)),n}function VV(e){return``}function $V(e){return``}function VF(e,t){return Fp(e,t)}function XV(e,t){return Ut(e)?e.children.map(r=>VF(r,t)).join(""):""}function Ip(e){return Array.isArray(e)?e.map(Ip).join(""):$e(e)?e.name==="br"?` +`:Ip(e.children):To(e)?Ip(e.children):qr(e)?e.data:""}function pa(e){return Array.isArray(e)?e.map(pa).join(""):Ut(e)&&!Ai(e)?pa(e.children):qr(e)?e.data:""}function hu(e){return Array.isArray(e)?e.map(hu).join(""):Ut(e)&&(e.type===xt.Tag||To(e))?hu(e.children):qr(e)?e.data:""}function _o(e){return Ut(e)?e.children:[]}function $F(e){return e.parent||null}function Gb(e){let t=$F(e);if(t!=null)return _o(t);let r=[e],{prev:n,next:a}=e;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;a!=null;)r.push(a),{next:a}=a;return r}function KV(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}function WV(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function QV(e){return e.name}function Bp(e){let{next:t}=e;for(;t!==null&&!$e(t);)({next:t}=t);return t}function Lp(e){let{prev:t}=e;for(;t!==null&&!$e(t);)({prev:t}=t);return t}function fa(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function ZV(e,t){let r=t.prev=e.prev;r&&(r.next=t);let n=t.next=e.next;n&&(n.prev=t);let a=t.parent=e.parent;if(a){let i=a.children;i[i.lastIndexOf(e)]=t,e.parent=null}}function JV(e,t){if(fa(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function e$(e,t){fa(t);let{parent:r}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){let a=r.children;a.splice(a.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function t$(e,t){if(fa(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let r=e.children[1];r.prev=t,t.next=r}else t.next=null}function r$(e,t){fa(t);let{parent:r}=e;if(r){let n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}function vu(e,t,r=!0,n=1/0){return Pp(e,Array.isArray(t)?t:[t],r,n)}function Pp(e,t,r,n){let a=[],i=[t],o=[0];for(;;){if(o[0]>=i[0].length){if(o.length===1)return a;i.shift(),o.shift();continue}let l=i[0][o[0]++];if(e(l)&&(a.push(l),--n<=0))return a;r&&Ut(l)&&l.children.length>0&&(o.unshift(0),i.unshift(l.children))}}function n$(e,t){return t.find(e)}function Up(e,t,r=!0){let n=null;for(let a=0;a0&&(n=Up(e,i.children,!0));else continue}return n}function XF(e,t){return t.some(r=>$e(r)&&(e(r)||XF(e,r.children)))}function a$(e,t){let r=[],n=[t],a=[0];for(;;){if(a[0]>=n[0].length){if(n.length===1)return r;n.shift(),a.shift();continue}let i=n[0][a[0]++];$e(i)&&(e(i)&&r.push(i),i.children.length>0&&(a.unshift(0),n.unshift(i.children)))}}var kp={tag_name(e){return typeof e=="function"?t=>$e(t)&&e(t.name):e==="*"?$e:t=>$e(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>qr(t)&&e(t.data):t=>qr(t)&&t.data===e}};function KF(e,t){return typeof t=="function"?r=>$e(r)&&t(r.attribs[e]):r=>$e(r)&&r.attribs[e]===t}function i$(e,t){return r=>e(r)||t(r)}function WF(e){let t=Object.keys(e).map(r=>{let n=e[r];return Object.prototype.hasOwnProperty.call(kp,r)?kp[r](n):KF(r,n)});return t.length===0?null:t.reduce(i$)}function o$(e,t){let r=WF(e);return r?r(t):!0}function s$(e,t,r,n=1/0){let a=WF(e);return a?vu(a,t,r,n):[]}function u$(e,t,r=!0){return Array.isArray(t)||(t=[t]),Up(KF("id",e),t,r)}function Ni(e,t,r=!0,n=1/0){return vu(kp.tag_name(e),t,r,n)}function c$(e,t,r=!0,n=1/0){return vu(kp.tag_type(e),t,r,n)}function l$(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}var gn;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(gn||(gn={}));function QF(e,t){let r=[],n=[];if(e===t)return 0;let a=Ut(e)?e:e.parent;for(;a;)r.unshift(a),a=a.parent;for(a=Ut(t)?t:t.parent;a;)n.unshift(a),a=a.parent;let i=Math.min(r.length,n.length),o=0;for(;ou.indexOf(c)?l===t?gn.FOLLOWING|gn.CONTAINED_BY:gn.FOLLOWING:l===e?gn.PRECEDING|gn.CONTAINS:gn.PRECEDING}function Pa(e){return e=e.filter((t,r,n)=>!n.includes(t,r+1)),e.sort((t,r)=>{let n=QF(t,r);return n&gn.PRECEDING?-1:n&gn.FOLLOWING?1:0}),e}function Yb(e){let t=qp(h$,e);return t?t.name==="feed"?p$(t):f$(t):null}function p$(e){var t;let r=e.children,n={type:"atom",items:Ni("entry",r).map(o=>{var l;let{children:u}=o,s={media:ZF(u)};Hr(s,"id","id",u),Hr(s,"title","title",u);let c=(l=qp("link",u))===null||l===void 0?void 0:l.attribs.href;c&&(s.link=c);let p=Ua("summary",u)||Ua("content",u);p&&(s.description=p);let f=Ua("updated",u);return f&&(s.pubDate=new Date(f)),s})};Hr(n,"id","id",r),Hr(n,"title","title",r);let a=(t=qp("link",r))===null||t===void 0?void 0:t.attribs.href;a&&(n.link=a),Hr(n,"description","subtitle",r);let i=Ua("updated",r);return i&&(n.updated=new Date(i)),Hr(n,"author","email",r,!0),n}function f$(e){var t,r;let n=(r=(t=qp("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&r!==void 0?r:[],a={type:e.name.substr(0,3),id:"",items:Ni("item",e.children).map(o=>{let{children:l}=o,u={media:ZF(l)};Hr(u,"id","guid",l),Hr(u,"title","title",l),Hr(u,"link","link",l),Hr(u,"description","description",l);let s=Ua("pubDate",l)||Ua("dc:date",l);return s&&(u.pubDate=new Date(s)),u})};Hr(a,"title","title",n),Hr(a,"link","link",n),Hr(a,"description","description",n);let i=Ua("lastBuildDate",n);return i&&(a.updated=new Date(i)),Hr(a,"author","managingEditor",n,!0),a}var m$=["url","type","lang"],d$=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function ZF(e){return Ni("media:content",e).map(t=>{let{attribs:r}=t,n={medium:r.medium,isDefault:!!r.isDefault};for(let a of m$)r[a]&&(n[a]=r[a]);for(let a of d$)r[a]&&(n[a]=parseInt(r[a],10));return r.expression&&(n.expression=r.expression),n})}function qp(e,t){return Ni(e,t,!0,1)[0]}function Ua(e,t,r=!1){return pa(Ni(e,t,r,1)).trim()}function Hr(e,t,r,n,a=!1){let i=Ua(r,n,a);i&&(e[t]=i)}function h$(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}function eI(e,t,r){return e?e(t??e._root.children,null,void 0,r).toString():""}function v$(e,t){return!t&&typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function tI(e,t){let r=v$(e)?(t=e,void 0):e,n={...ou,...this===null||this===void 0?void 0:this._options,...su(t??{})};return eI(this,r,n)}function rI(e){let t={...this._options,xmlMode:!0};return eI(this,e,t)}function qa(e){let t=e||(this?this.root():[]),r="";for(let n=0;nlI,attr:()=>E$,data:()=>N$,hasClass:()=>D$,prop:()=>A$,removeAttr:()=>w$,removeClass:()=>pI,toggleClass:()=>fI,val:()=>T$});function nn(e){return e.cheerio!=null}function nI(e){return e.replace(/[_.-](\w|$)/g,(t,r)=>r.toUpperCase())}function aI(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function Ft(e,t){let r=e.length;for(let n=0;npu(n,!0)):[pu(e,!0)],r=new rn(t);return t.forEach(n=>{n.parent=r}),t}var Ti;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(Ti||(Ti={}));function gu(e){let t=e.indexOf("<");if(t<0||t>e.length-3)return!1;let r=e.charCodeAt(t+1);return(r>=Ti.LowerA&&r<=Ti.LowerZ||r>=Ti.UpperA&&r<=Ti.UpperZ||r===Ti.Exclamation)&&e.includes(">",t+2)}var Mo=Object.prototype.hasOwnProperty,xu=/\s+/,Vb="data-",iI={null:null,true:!0,false:!1},Xb=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,y$=/^{[^]*}$|^\[[^]*]$/;function zp(e,t,r){var n;if(!(!e||!$e(e))){if((n=e.attribs)!==null&&n!==void 0||(e.attribs={}),!t)return e.attribs;if(Mo.call(e.attribs,t))return!r&&Xb.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return qa(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function Oo(e,t,r){r===null?cI(e,t):e.attribs[t]=`${r}`}function E$(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return Ft(this,(r,n)=>{$e(r)&&Oo(r,e,t.call(r,n,r.attribs[e]))})}return Ft(this,r=>{$e(r)&&(typeof e=="object"?Object.keys(e).forEach(n=>{let a=e[n];Oo(r,n,a)}):Oo(r,e,t))})}return arguments.length>1?this:zp(this[0],e,this.options.xmlMode)}function oI(e,t,r){return t in e?e[t]:!r&&Xb.test(t)?zp(e,t,!1)!==void 0:zp(e,t,r)}function $b(e,t,r,n){t in e?e[t]=r:Oo(e,t,!n&&Xb.test(t)?r?"":null:`${r}`)}function A$(e,t){var r;if(typeof e=="string"&&t===void 0){let n=this[0];if(!n||!$e(n))return;switch(e){case"style":{let a=this.css(),i=Object.keys(a);return i.forEach((o,l)=>{a[l]=o}),a.length=i.length,a}case"tagName":case"nodeName":return n.name.toUpperCase();case"href":case"src":{let a=(r=n.attribs)===null||r===void 0?void 0:r[e];return typeof URL<"u"&&(e==="href"&&(n.tagName==="a"||n.name==="link")||e==="src"&&(n.tagName==="img"||n.tagName==="iframe"||n.tagName==="audio"||n.tagName==="video"||n.tagName==="source"))&&a!==void 0&&this.options.baseURI?new URL(a,this.options.baseURI).href:a}case"innerText":return hu(n);case"textContent":return pa(n);case"outerHTML":return this.clone().wrap("").parent().html();case"innerHTML":return this.html();default:return oI(n,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new Error("Bad combination of arguments.");return Ft(this,(n,a)=>{$e(n)&&$b(n,e,t.call(n,a,oI(n,e,this.options.xmlMode)),this.options.xmlMode)})}return Ft(this,n=>{$e(n)&&(typeof e=="object"?Object.keys(e).forEach(a=>{let i=e[a];$b(n,a,i,this.options.xmlMode)}):$b(n,e,t,this.options.xmlMode))})}}function sI(e,t,r){var n;let a=e;(n=a.data)!==null&&n!==void 0||(a.data={}),typeof t=="object"?Object.assign(a.data,t):typeof t=="string"&&r!==void 0&&(a.data[t]=r)}function uI(e,t){let r,n,a;t==null?(r=Object.keys(e.attribs).filter(i=>i.startsWith(Vb)),n=r.map(i=>nI(i.slice(Vb.length)))):(r=[Vb+aI(t)],n=[t]);for(let i=0;i{$e(i)&&(typeof e=="object"?sI(i,e):sI(i,e,t))}),this):Mo.call(a.data,e)?a.data[e]:uI(a,e):uI(a)}function T$(e){let t=arguments.length===0,r=this[0];if(!r||!$e(r))return t?void 0:this;switch(r.name){case"textarea":return this.text(e);case"select":{let n=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");let a=typeof e!="object"?[e]:e;for(let i=0;iqa(a.children)):n.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function cI(e,t){!e.attribs||!Mo.call(e.attribs,t)||delete e.attribs[t]}function Gp(e){return e?e.trim().split(xu):[]}function w$(e){let t=Gp(e);for(let r=0;r{$e(n)&&cI(n,t[r])});return this}function D$(e){return this.toArray().some(t=>{let r=$e(t)&&t.attribs.class,n=-1;if(r&&e.length)for(;(n=r.indexOf(e,n+1))>-1;){let a=n+e.length;if((n===0||xu.test(r[n-1]))&&(a===r.length||xu.test(r[a])))return!0}return!1})}function lI(e){if(typeof e=="function")return Ft(this,(n,a)=>{if($e(n)){let i=n.attribs.class||"";lI.call([n],e.call(n,a,i))}});if(!e||typeof e!="string")return this;let t=e.split(xu),r=this.length;for(let n=0;n{$e(a)&&pI.call([a],e.call(a,i,a.attribs.class||""))});let t=Gp(e),r=t.length,n=arguments.length===0;return Ft(this,a=>{if($e(a))if(n)a.attribs.class="";else{let i=Gp(a.attribs.class),o=!1;for(let l=0;l=0&&(i.splice(u,1),o=!0,l--)}o&&(a.attribs.class=i.join(" "))}})}function fI(e,t){if(typeof e=="function")return Ft(this,(o,l)=>{$e(o)&&fI.call([o],e.call(o,l,o.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;let r=e.split(xu),n=r.length,a=typeof t=="boolean"?t?1:-1:0,i=this.length;for(let o=0;o=0&&c<0?u.push(r[s]):a<=0&&c>=0&&u.splice(c,1)}l.attribs.class=u.join(" ")}return this}var x1={};on(x1,{add:()=>IX,addBack:()=>BX,children:()=>xX,closest:()=>lX,contents:()=>bX,each:()=>yX,end:()=>FX,eq:()=>CX,filter:()=>AX,filterArray:()=>g1,find:()=>oX,first:()=>DX,get:()=>_X,has:()=>wX,index:()=>OX,is:()=>NX,last:()=>SX,map:()=>EX,next:()=>pX,nextAll:()=>fX,nextUntil:()=>mX,not:()=>TX,parent:()=>sX,parents:()=>uX,parentsUntil:()=>cX,prev:()=>dX,prevAll:()=>hX,prevUntil:()=>vX,siblings:()=>gX,slice:()=>RX,toArray:()=>MX});var Gr=Le(Bo(),1);var s1=Le(za(),1);var Fn=Le(Bo(),1),da=Le(za(),1);var _r=Le(Bo(),1),SI=new Map([[_r.SelectorType.Universal,50],[_r.SelectorType.Tag,30],[_r.SelectorType.Attribute,1],[_r.SelectorType.Pseudo,0]]);function yu(e){return!SI.has(e.type)}var H$=new Map([[_r.AttributeAction.Exists,10],[_r.AttributeAction.Equals,8],[_r.AttributeAction.Not,7],[_r.AttributeAction.Start,6],[_r.AttributeAction.End,6],[_r.AttributeAction.Any,5]]);function Qb(e){let t=e.map(CI);for(let r=1;r=0&&n>=1)):e.type===_r.SelectorType.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?n=0:Array.isArray(e.data)?(n=Math.min(...e.data.map(a=>Math.min(...a.map(CI)))),n<0&&(n=0)):n=2:n=3),n}var Eu=Le(za(),1),z$=/[-[\]{}()*+?.,\\^$|#\s]/g;function _I(e){return e.replace(z$,"\\$&")}var G$=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function wi(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&G$.has(e.name)}var MI={equals(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t;return wi(t,r)?(i=i.toLowerCase(),o=>{let l=n.getAttributeValue(o,a);return l!=null&&l.length===i.length&&l.toLowerCase()===i&&e(o)}):o=>n.getAttributeValue(o,a)===i&&e(o)},hyphen(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t,o=i.length;return wi(t,r)?(i=i.toLowerCase(),function(u){let s=n.getAttributeValue(u,a);return s!=null&&(s.length===o||s.charAt(o)==="-")&&s.substr(0,o).toLowerCase()===i&&e(u)}):function(u){let s=n.getAttributeValue(u,a);return s!=null&&(s.length===o||s.charAt(o)==="-")&&s.substr(0,o)===i&&e(u)}},element(e,t,r){let{adapter:n}=r,{name:a,value:i}=t;if(/\s/.test(i))return Eu.default.falseFunc;let o=new RegExp(`(?:^|\\s)${_I(i)}(?:$|\\s)`,wi(t,r)?"i":"");return function(u){let s=n.getAttributeValue(u,a);return s!=null&&s.length>=i.length&&o.test(s)&&e(u)}},exists(e,{name:t},{adapter:r}){return n=>r.hasAttrib(n,t)&&e(n)},start(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t,o=i.length;return o===0?Eu.default.falseFunc:wi(t,r)?(i=i.toLowerCase(),l=>{let u=n.getAttributeValue(l,a);return u!=null&&u.length>=o&&u.substr(0,o).toLowerCase()===i&&e(l)}):l=>{var u;return!!(!((u=n.getAttributeValue(l,a))===null||u===void 0)&&u.startsWith(i))&&e(l)}},end(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t,o=-i.length;return o===0?Eu.default.falseFunc:wi(t,r)?(i=i.toLowerCase(),l=>{var u;return((u=n.getAttributeValue(l,a))===null||u===void 0?void 0:u.substr(o).toLowerCase())===i&&e(l)}):l=>{var u;return!!(!((u=n.getAttributeValue(l,a))===null||u===void 0)&&u.endsWith(i))&&e(l)}},any(e,t,r){let{adapter:n}=r,{name:a,value:i}=t;if(i==="")return Eu.default.falseFunc;if(wi(t,r)){let o=new RegExp(_I(i),"i");return function(u){let s=n.getAttributeValue(u,a);return s!=null&&s.length>=i.length&&o.test(s)&&e(u)}}return o=>{var l;return!!(!((l=n.getAttributeValue(o,a))===null||l===void 0)&&l.includes(i))&&e(o)}},not(e,t,r){let{adapter:n}=r,{name:a}=t,{value:i}=t;return i===""?o=>!!n.getAttributeValue(o,a)&&e(o):wi(t,r)?(i=i.toLowerCase(),o=>{let l=n.getAttributeValue(o,a);return(l==null||l.length!==i.length||l.toLowerCase()!==i)&&e(o)}):o=>n.getAttributeValue(o,a)!==i&&e(o)}};var II=Le(Bo(),1);var Y$=new Set([9,10,12,13,32]),OI=48,j$=57;function RI(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,r=0,n=i(),a=o();if(t=OI&&e.charCodeAt(t)<=j$;)s=s*10+(e.charCodeAt(t)-OI),t++;return t===u?null:s}function l(){for(;ti<=r;if(t===0)return i=>i===r;if(t===1)return r<0?Zb.default.trueFunc:i=>i>=r;let n=Math.abs(t),a=(r%n+n)%n;return t>1?i=>i>=r&&i%n===a:i=>i<=r&&i%n===a}function Lo(e){return FI(RI(e))}var zr=Le(za(),1);function Vp(e,t){return r=>{let n=t.getParent(r);return n!=null&&t.isTag(n)&&e(r)}}var Po={contains(e,t,{adapter:r}){return function(a){return e(a)&&r.getText(a).includes(t)}},icontains(e,t,{adapter:r}){let n=t.toLowerCase();return function(i){return e(i)&&r.getText(i).toLowerCase().includes(n)}},"nth-child"(e,t,{adapter:r,equals:n}){let a=Lo(t);return a===zr.default.falseFunc?zr.default.falseFunc:a===zr.default.trueFunc?Vp(e,r):function(o){let l=r.getSiblings(o),u=0;for(let s=0;s=0&&!n(o,l[s]);s--)r.isTag(l[s])&&u++;return a(u)&&e(o)}},"nth-of-type"(e,t,{adapter:r,equals:n}){let a=Lo(t);return a===zr.default.falseFunc?zr.default.falseFunc:a===zr.default.trueFunc?Vp(e,r):function(o){let l=r.getSiblings(o),u=0;for(let s=0;s=0;s--){let c=l[s];if(n(o,c))break;r.isTag(c)&&r.getName(c)===r.getName(o)&&u++}return a(u)&&e(o)}},root(e,t,{adapter:r}){return n=>{let a=r.getParent(n);return(a==null||!r.isTag(a))&&e(n)}},scope(e,t,r,n){let{equals:a}=r;return!n||n.length===0?Po.root(e,t,r):n.length===1?i=>a(n[0],i)&&e(i):i=>n.includes(i)&&e(i)},hover:Jb("isHovered"),visited:Jb("isVisited"),active:Jb("isActive")};function Jb(e){return function(r,n,{adapter:a}){let i=a[e];return typeof i!="function"?zr.default.falseFunc:function(l){return i(l)&&r(l)}}}var Au={empty(e,{adapter:t}){return!t.getChildren(e).some(r=>t.isTag(r)||t.getText(r)!=="")},"first-child"(e,{adapter:t,equals:r}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;let n=t.getSiblings(e).find(a=>t.isTag(a));return n!=null&&r(e,n)},"last-child"(e,{adapter:t,equals:r}){let n=t.getSiblings(e);for(let a=n.length-1;a>=0;a--){if(r(e,n[a]))return!0;if(t.isTag(n[a]))break}return!1},"first-of-type"(e,{adapter:t,equals:r}){let n=t.getSiblings(e),a=t.getName(e);for(let i=0;i=0;i--){let o=n[i];if(r(e,o))return!0;if(t.isTag(o)&&t.getName(o)===a)break}return!1},"only-of-type"(e,{adapter:t,equals:r}){let n=t.getName(e);return t.getSiblings(e).every(a=>r(e,a)||!t.isTag(a)||t.getName(a)!==n)},"only-child"(e,{adapter:t,equals:r}){return t.getSiblings(e).every(n=>r(e,n)||!t.isTag(n))}};function e1(e,t,r,n){if(r===null){if(e.length>n)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===n)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}var $p={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( :is(button, input, select, textarea, optgroup, option)[disabled], optgroup[disabled] > option, fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *) - )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var xn=Le(za(),1);var n1={};function a1(e,t){return e===xn.default.falseFunc?xn.default.falseFunc:r=>t.isTag(r)&&e(r)}function i1(e,t){let r=t.getSiblings(e);if(r.length<=1)return[];let n=r.indexOf(e);return n<0||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function r1(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var t1=(e,t,r,n,a)=>{let i=a(t,r1(r),n);return i===xn.default.trueFunc?e:i===xn.default.falseFunc?xn.default.falseFunc:o=>i(o)&&e(o)},Xp={is:t1,matches:t1,where:t1,not(e,t,r,n,a){let i=a(t,r1(r),n);return i===xn.default.falseFunc?e:i===xn.default.trueFunc?xn.default.falseFunc:o=>!i(o)&&e(o)},has(e,t,r,n,a){let{adapter:i}=r,o=r1(r);o.relativeSelector=!0;let l=t.some(c=>c.some(yu))?[n1]:void 0,u=a(t,o,l);if(u===xn.default.falseFunc)return xn.default.falseFunc;let s=a1(u,i);if(l&&u!==xn.default.trueFunc){let{shouldTestNextSiblings:c=!1}=u;return p=>{if(!e(p))return!1;l[0]=p;let f=i.getChildren(p),m=c?[...f,...i1(p,i)]:f;return i.existsOne(s,m)}}return c=>e(c)&&i.existsOne(s,i.getChildren(c))}};function LI(e,t,r,n,a){var i;let{name:o,data:l}=t;if(Array.isArray(l)){if(!(o in Xp))throw new Error(`Unknown pseudo-class :${o}(${l})`);return Xp[o](e,l,r,n,a)}let u=(i=r.pseudos)===null||i===void 0?void 0:i[o],s=typeof u=="string"?u:$p[o];if(typeof s=="string"){if(l!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let c=(0,BI.parse)(s);return Xp.is(e,c,r,n,a)}if(typeof u=="function")return e1(u,o,l,1),c=>u(c,l)&&e(c);if(o in Po)return Po[o](e,l,r,n);if(o in Au){let c=Au[o];return e1(c,o,l,2),p=>c(p,r,l)&&e(p)}throw new Error(`Unknown pseudo-class :${o}`)}var bn=Le(Bo(),1);function o1(e,t){let r=t.getParent(e);return r&&t.isTag(r)?r:null}function PI(e,t,r,n,a){let{adapter:i,equals:o}=r;switch(t.type){case bn.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case bn.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case bn.SelectorType.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),OI[t.action](e,t,r)}case bn.SelectorType.Pseudo:return LI(e,t,r,n,a);case bn.SelectorType.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:l}=t;return(!r.xmlMode||r.lowerCaseTags)&&(l=l.toLowerCase()),function(s){return i.getName(s)===l&&e(s)}}case bn.SelectorType.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(s){let c=s;for(;c=o1(c,i);)if(e(c))return!0;return!1};let l=new WeakSet;return function(s){let c=s;for(;c=o1(c,i);)if(!l.has(c)){if(i.isTag(c)&&e(c))return!0;l.add(c)}return!1}}case"_flexibleDescendant":return function(u){let s=u;do if(e(s))return!0;while(s=o1(s,i));return!1};case bn.SelectorType.Parent:return function(u){return i.getChildren(u).some(s=>i.isTag(s)&&e(s))};case bn.SelectorType.Child:return function(u){let s=i.getParent(u);return s!=null&&i.isTag(s)&&e(s)};case bn.SelectorType.Sibling:return function(u){let s=i.getSiblings(u);for(let c=0;ct.some(kI)))}var V$={type:Fn.SelectorType.Descendant},$$={type:"_flexibleDescendant"},X$={type:Fn.SelectorType.Pseudo,name:"scope",data:null};function K$(e,{adapter:t},r){let n=!!r?.every(a=>{let i=t.isTag(a)&&t.getParent(a);return a===n1||i&&t.isTag(i)});for(let a of e){if(!(a.length>0&&yu(a[0])&&a[0].type!==Fn.SelectorType.Descendant))if(n&&!a.some(kI))a.unshift(V$);else continue;a.unshift(X$)}}function Wp(e,t,r){var n;e.forEach(Qb),r=(n=t.context)!==null&&n!==void 0?n:r;let a=Array.isArray(r),i=r&&(Array.isArray(r)?r:[r]);if(t.relativeSelector!==!1)K$(e,t,i);else if(e.some(u=>u.length>0&&yu(u[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let o=!1,l=e.map(u=>{if(u.length>=2){let[s,c]=u;s.type!==Fn.SelectorType.Pseudo||s.name!=="scope"||(a&&c.type===Fn.SelectorType.Descendant?u[1]=$$:(c.type===Fn.SelectorType.Adjacent||c.type===Fn.SelectorType.Sibling)&&(o=!0))}return W$(u,t,i)}).reduce(Q$,da.default.falseFunc);return l.shouldTestNextSiblings=o,l}function W$(e,t,r){var n;return e.reduce((a,i)=>a===da.default.falseFunc?da.default.falseFunc:PI(a,i,t,r,Wp),(n=t.rootFunc)!==null&&n!==void 0?n:da.default.trueFunc)}function Q$(e,t){return t===da.default.falseFunc||e===da.default.trueFunc?e:e===da.default.falseFunc||t===da.default.trueFunc?t:function(n){return e(n)||t(n)}}var qI=(e,t)=>e===t,Z$={adapter:ka,equals:qI};function HI(e){var t,r,n,a;let i=e??Z$;return(t=i.adapter)!==null&&t!==void 0||(i.adapter=ka),(r=i.equals)!==null&&r!==void 0||(i.equals=(a=(n=i.adapter)===null||n===void 0?void 0:n.equals)!==null&&a!==void 0?a:qI),i}function u1(e){return function(r,n,a){let i=HI(n);return e(r,i,a)}}var qUe=u1(UI),HUe=u1(Kp),Qp=u1(Wp);function zI(e){return function(r,n,a){let i=HI(a);typeof r!="function"&&(r=Kp(r,i,n));let o=Zp(n,i.adapter,r.shouldTestNextSiblings);return e(r,o,i)}}function Zp(e,t,r=!1){return r&&(e=J$(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function J$(e,t){let r=Array.isArray(e)?e.slice(0):[e],n=r.length;for(let a=0;ae===s1.default.falseFunc||!t||t.length===0?[]:r.adapter.findAll(e,t)),GUe=zI((e,t,r)=>e===s1.default.falseFunc||!t||t.length===0?null:r.adapter.findOne(e,t));var ef=Le(za(),1);var eX=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function Uo(e){return e.type!=="pseudo"?!1:eX.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(Uo)):!1}function GI(e,t,r){let n=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(n)?n>=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?Math.min(n,r):1/0:0;case"gt":return isFinite(n)?1/0:0;case"odd":return 2*r;case"even":return 2*r-1;case"last":case"not":return 1/0}}function YI(e){for(;e.parent;)e=e.parent;return e}function Jp(e){let t=[],r=[];for(let n of e)n.some(Uo)?t.push(n):r.push(n);return[r,t]}var tX={type:Gr.SelectorType.Universal,namespace:null},rX={type:Gr.SelectorType.Pseudo,name:"scope",data:null};function p1(e,t,r={}){return f1([e],t,r)}function f1(e,t,r={}){if(typeof t=="function")return e.some(t);let[n,a]=Jp((0,Gr.parse)(t));return n.length>0&&e.some(Qp(n,r))||a.some(i=>VI(i,e,r).length>0)}function nX(e,t,r,n){let a=typeof r=="string"?parseInt(r,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(a)&&Math.abs(a)o%2===0);case"odd":return t.filter((i,o)=>o%2===1);case"not":{let i=new Set(jI(r,t,n));return t.filter(o=>!i.has(o))}}}function m1(e,t,r={}){return jI((0,Gr.parse)(e),t,r)}function jI(e,t,r){if(t.length===0)return[];let[n,a]=Jp(e),i;if(n.length){let o=l1(t,n,r);if(a.length===0)return o;o.length&&(i=new Set(o))}for(let o=0;o$e(c)&&!i.has(c)):t).length===0)break;let s=VI(l,t,r);if(s.length)if(i)s.forEach(c=>i.add(c));else{if(o===a.length-1)return s;i=new Set(s)}}return typeof i<"u"?i.size===t.length?t:t.filter(o=>i.has(o)):[]}function VI(e,t,r){var n;if(e.some(Gr.isTraversal)){let a=(n=r.root)!==null&&n!==void 0?n:YI(t[0]),i={...r,context:t,relativeSelector:!1};return e.push(rX),tf(a,e,i,!0,t.length)}return tf(t,e,r,!1,t.length)}function $I(e,t,r={},n=1/0){if(typeof e=="function")return XI(t,e);let[a,i]=Jp((0,Gr.parse)(e)),o=i.map(l=>tf(t,l,r,!0,n));return a.length&&o.push(c1(t,a,r,n)),o.length===0?[]:o.length===1?o[0]:Pa(o.reduce((l,u)=>[...l,...u]))}function tf(e,t,r,n,a){let i=t.findIndex(Uo),o=t.slice(0,i),l=t[i],u=t.length-1===i?a:1/0,s=GI(l.name,l.data,u);if(s===0)return[];let p=(o.length===0&&!Array.isArray(e)?_o(e).filter($e):o.length===0?(Array.isArray(e)?e:[e]).filter($e):n||o.some(Gr.isTraversal)?c1(e,[o],r,s):l1(e,[o],r)).slice(0,s),f=nX(l.name,p,l.data,r);if(f.length===0||t.length===i+1)return f;let m=t.slice(i+1),h=m.some(Gr.isTraversal);if(h){if((0,Gr.isTraversal)(m[0])){let{type:d}=m[0];(d===Gr.SelectorType.Sibling||d===Gr.SelectorType.Adjacent)&&(f=Zp(f,ka,!0)),m.unshift(tX)}r={...r,relativeSelector:!1,rootFunc:d=>f.includes(d)}}else r.rootFunc&&r.rootFunc!==ef.trueFunc&&(r={...r,rootFunc:ef.trueFunc});return m.some(Uo)?tf(f,m,r,!1,a):h?c1(f,[m],r,a):l1(f,[m],r)}function c1(e,t,r,n){let a=Qp(t,r,e);return XI(e,a,n)}function XI(e,t,r=1/0){let n=Zp(e,ka,t.shouldTestNextSiblings);return Pp(a=>$e(a)&&t(a),n,!0,r)}function l1(e,t,r){let n=(Array.isArray(e)?e:[e]).filter($e);if(n.length===0)return n;let a=Qp(t,r);return a===ef.trueFunc?n:n.filter(a)}var iX=/^\s*[~+]/;function oX(e){var t;if(!e)return this._make([]);let r=this.toArray();if(typeof e!="string"){let i=nn(e)?e.toArray():[e];return this._make(i.filter(o=>r.some(l=>jb(l,o))))}let n=iX.test(e)?r:this.children().toArray(),a={context:r,root:(t=this._root)===null||t===void 0?void 0:t[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make($I(e,n,a))}function d1(e){return function(t,...r){return function(n){var a;let i=e(t,this);return n&&(i=g1(i,n,this.options.xmlMode,(a=this._root)===null||a===void 0?void 0:a[0])),this._make(this.length>1&&i.length>1?r.reduce((o,l)=>l(o),i):i)}}}var Nu=d1((e,t)=>{let r=[];for(let n=0;n{let r=[];for(let n=0;n{let o=[];return Ft(i,l=>{for(let u;(u=a(l))&&!r?.(u,o.length);l=u)o.push(u)}),o})(e,...t);return function(a,i){r=typeof a=="string"?l=>p1(l,a,this.options):a?Tu(a):null;let o=n.call(this,i);return r=null,o}}function ko(e){return Array.from(new Set(e))}var sX=h1(({parent:e})=>e&&!Rn(e)?e:null,ko),uX=Nu(e=>{let t=[];for(;e.parent&&!Rn(e.parent);)t.push(e.parent),e=e.parent;return t},Pa,e=>e.reverse()),cX=v1(({parent:e})=>e&&!Rn(e)?e:null,Pa,e=>e.reverse());function lX(e){var t;let r=[];if(!e)return this._make(r);let n={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},a=typeof e=="string"?i=>p1(i,e,n):Tu(e);return Ft(this,i=>{for(;i&&$e(i);){if(a(i,0)){r.includes(i)||r.push(i);break}i=i.parent}}),this._make(r)}var pX=h1(e=>Bp(e)),fX=Nu(e=>{let t=[];for(;e.next;)e=e.next,$e(e)&&t.push(e);return t},ko),mX=v1(e=>Bp(e),ko),dX=h1(e=>Lp(e)),hX=Nu(e=>{let t=[];for(;e.prev;)e=e.prev,$e(e)&&t.push(e);return t},ko),vX=v1(e=>Lp(e),ko),gX=Nu(e=>Gb(e).filter(t=>$e(t)&&t!==e),Pa),xX=Nu(e=>_o(e).filter($e),ko);function bX(){let e=this.toArray().reduce((t,r)=>Ut(r)?t.concat(r.children):t,[]);return this._make(e)}function yX(e){let t=0,r=this.length;for(;te.call(t,r,t):nn(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function AX(e){var t;return this._make(g1(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function g1(e,t,r,n){return typeof t=="string"?m1(t,e,{xmlMode:r,root:n}):e.filter(Tu(t))}function NX(e){let t=this.toArray();return typeof e=="string"?f1(t.filter($e),e,this.options):e?t.some(Tu(e)):!1}function TX(e){let t=this.toArray();if(typeof e=="string"){let r=new Set(m1(e,t,this.options));t=t.filter(n=>!r.has(n))}else{let r=Tu(e);t=t.filter((n,a)=>!r(n,a))}return this._make(t)}function wX(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,r)=>this._make(r).find(e).length>0)}function DX(){return this.length>1?this._make(this[0]):this}function SX(){return this.length>0?this._make(this[this.length-1]):this}function CX(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function _X(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function MX(){return Array.prototype.slice.call(this)}function OX(e){let t,r;return e==null?(t=this.parent().children(),r=this[0]):typeof e=="string"?(t=this._make(e),r=this[0]):(t=this,r=nn(e)?e[0]:e),Array.prototype.indexOf.call(t,r)}function RX(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function FX(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function IX(e,t){let r=this._make(e,t),n=Pa([...this.get(),...r.get()]);return this._make(n)}function BX(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}var b1={};on(b1,{_makeDomArray:()=>LX,after:()=>jX,append:()=>kX,appendTo:()=>PX,before:()=>$X,clone:()=>tK,empty:()=>QX,html:()=>ZX,insertAfter:()=>VX,insertBefore:()=>XX,prepend:()=>qX,prependTo:()=>UX,remove:()=>KX,replaceWith:()=>WX,text:()=>eK,toString:()=>JX,unwrap:()=>GX,wrap:()=>HX,wrapAll:()=>YX,wrapInner:()=>zX});function KI(e){return function(r,n,a,i){if(typeof Buffer<"u"&&Buffer.isBuffer(r)&&(r=r.toString()),typeof r=="string")return e(r,n,a,i);let o=r;if(!Array.isArray(o)&&Rn(o))return o;let l=new rn([]);return Ga(o,l),l}}function Ga(e,t){let r=Array.isArray(e)?e:[e];t?t.children=r:t=null;for(let n=0;nr.concat(this._makeDomArray(n,t)),[]):typeof e=="string"?this._parse(e,this.options,!1,null).children:t?Hp([e]):[e]}function WI(e){return function(...t){let r=this.length-1;return Ft(this,(n,a)=>{if(!Ut(n))return;let i=typeof t[0]=="function"?t[0].call(n,a,this._render(n.children)):t,o=this._makeDomArray(i,a=e.length?null:e[t+r];for(let c=0;c-1&&(f.children.splice(h,1),a===f&&t>h&&l[0]--)}p.parent=a,p.prev&&(p.prev.next=(i=p.next)!==null&&i!==void 0?i:null),p.next&&(p.next.prev=(o=p.prev)!==null&&o!==void 0?o:null),p.prev=c===0?u:n[c-1],p.next=c===n.length-1?s:n[c+1]}return u&&(u.next=n[0]),s&&(s.prev=n[n.length-1]),e.splice(...l)}function PX(e){return(nn(e)?e:this._make(e)).append(this),this}function UX(e){return(nn(e)?e:this._make(e)).prepend(this),this}var kX=WI((e,t,r)=>{Ya(t,t.length,0,e,r)}),qX=WI((e,t,r)=>{Ya(t,0,0,e,r)});function QI(e){return function(t){let r=this.length-1,n=this.parents().last();for(let a=0;a{let{parent:n}=e;if(!n)return;let a=n.children,i=a.indexOf(e);Ga([e],t),Ya(a,i,0,r,n)}),zX=QI((e,t,r)=>{Ut(e)&&(Ga(e.children,t),Ga(r,e))});function GX(e){return this.parent(e).not("body").each((t,r)=>{this._make(r).replaceWith(r.children)}),this}function YX(e){let t=this[0];if(t){let r=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t),n;for(let i=0;i{let{parent:a}=r;if(!Ut(r)||!a)return;let i=a.children,o=i.indexOf(r);if(o<0)return;let l=typeof e[0]=="function"?e[0].call(r,n,this._render(r.children)):e,u=this._makeDomArray(l,n{let n=this.clone().toArray(),{parent:a}=r;if(!a)return;let i=a.children,o=i.indexOf(r);o<0||(Ya(i,o+1,0,n,a),t.push(...n))}),this._make(t)}function $X(...e){let t=this.length-1;return Ft(this,(r,n)=>{let{parent:a}=r;if(!Ut(r)||!a)return;let i=a.children,o=i.indexOf(r);if(o<0)return;let l=typeof e[0]=="function"?e[0].call(r,n,this._render(r.children)):e,u=this._makeDomArray(l,n{let a=this.clone().toArray(),{parent:i}=n;if(!i)return;let o=i.children,l=o.indexOf(n);l<0||(Ya(o,l,0,a,i),r.push(...a))}),this._make(r)}function KX(e){let t=e?this.filter(e):this;return Ft(t,r=>{fa(r),r.prev=r.next=r.parent=null}),this}function WX(e){return Ft(this,(t,r)=>{let{parent:n}=t;if(!n)return;let a=n.children,i=typeof e=="function"?e.call(t,r,t):e,o=this._makeDomArray(i);Ga(o,null);let l=a.indexOf(t);Ya(a,l,1,o,n),o.includes(t)||(t.parent=t.prev=t.next=null)})}function QX(){return Ft(this,e=>{Ut(e)&&(e.children.forEach(t=>{t.next=t.prev=t.parent=null}),e.children.length=0)})}function ZX(e){if(e===void 0){let t=this[0];return!t||!Ut(t)?null:this._render(t.children)}return Ft(this,t=>{if(!Ut(t))return;t.children.forEach(n=>{n.next=n.prev=n.parent=null});let r=nn(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;Ga(r,t)})}function JX(){return this._render(this)}function eK(e){return e===void 0?qa(this):typeof e=="function"?Ft(this,(t,r)=>this._make(t).text(e.call(t,r,qa([t])))):Ft(this,t=>{if(!Ut(t))return;t.children.forEach(n=>{n.next=n.prev=n.parent=null});let r=new $n(`${e}`);Ga(r,t)})}function tK(){return this._make(Hp(this.get()))}var y1={};on(y1,{css:()=>rK});function rK(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return Ft(this,(r,n)=>{$e(r)&&ZI(r,e,t,n)});if(this.length!==0)return JI(this[0],e)}function ZI(e,t,r,n){if(typeof t=="string"){let a=JI(e),i=typeof r=="function"?r.call(e,n,a[t]):r;i===""?delete a[t]:i!=null&&(a[t]=i),e.attribs.style=nK(a)}else typeof t=="object"&&Object.keys(t).forEach((a,i)=>{ZI(e,a,t[a],i)})}function JI(e,t){if(!e||!$e(e))return;let r=aK(e.attribs.style);if(typeof t=="string")return r[t];if(Array.isArray(t)){let n={};return t.forEach(a=>{r[a]!=null&&(n[a]=r[a])}),n}return r}function nK(e){return Object.keys(e).reduce((t,r)=>`${t}${t?" ":""}${r}: ${e[r]};`,"")}function aK(e){if(e=(e||"").trim(),!e)return{};let t={},r;for(let n of e.split(";")){let a=n.indexOf(":");if(a<1||a===n.length-1){let i=n.trimEnd();i.length>0&&r!==void 0&&(t[r]+=`;${i}`)}else r=n.slice(0,a).trim(),t[r]=n.slice(a+1).trim()}return t}var E1={};on(E1,{serialize:()=>oK,serializeArray:()=>sK});var e6="input,select,textarea,keygen",iK=/%20/g,t6=/\r?\n/g;function oK(){return this.serializeArray().map(r=>`${encodeURIComponent(r.name)}=${encodeURIComponent(r.value)}`).join("&").replace(iK,"+")}function sK(){return this.map((e,t)=>{let r=this._make(t);return $e(t)&&t.name==="form"?r.find(e6).toArray():r.filter(e6).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var r;let n=this._make(t),a=n.attr("name"),i=(r=n.val())!==null&&r!==void 0?r:"";return Array.isArray(i)?i.map(o=>({name:a,value:o.replace(t6,`\r -`)})):{name:a,value:i.replace(t6,`\r -`)}}).toArray()}var ja=class{constructor(t,r,n){if(this.length=0,this.options=n,this._root=r,t){for(let a=0;a=55296&&e<=57343}function n6(e){return e>=56320&&e<=57343}function a6(e,t){return(e-55296)*1024+9216+t}function nf(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function af(e){return e>=64976&&e<=65007||cK.has(e)}var he;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(he=he||(he={}));var pK=65536,of=class{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=pK,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t){let{line:r,col:n,offset:a}=this;return{code:t,startLine:r,endLine:r,startCol:n,endCol:n,startOffset:a,endOffset:a}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){let r=this.html.charCodeAt(this.pos+1);if(n6(r))return this.pos++,this._addGap(),a6(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,G.EOF;return this._err(he.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let n=this.html.charCodeAt(r);return n===G.CARRIAGE_RETURN?G.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let t=this.html.charCodeAt(this.pos);return t===G.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,G.LINE_FEED):t===G.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,rf(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===G.LINE_FEED||t===G.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){nf(t)?this._err(he.controlCharacterInInputStream):af(t)&&this._err(he.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}var uf={};on(uf,{ATTRS:()=>In,DOCUMENT_MODE:()=>mr,NS:()=>xe,SPECIAL_ELEMENTS:()=>A1,TAG_ID:()=>T,TAG_NAMES:()=>le,getTagID:()=>Va,hasUnescapedText:()=>N1,isNumberedHeader:()=>wu});var xe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(xe=xe||(xe={}));var In;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(In=In||(In={}));var mr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(mr=mr||(mr={}));var le;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(le=le||(le={}));var T;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"})(T=T||(T={}));var mK=new Map([[le.A,T.A],[le.ADDRESS,T.ADDRESS],[le.ANNOTATION_XML,T.ANNOTATION_XML],[le.APPLET,T.APPLET],[le.AREA,T.AREA],[le.ARTICLE,T.ARTICLE],[le.ASIDE,T.ASIDE],[le.B,T.B],[le.BASE,T.BASE],[le.BASEFONT,T.BASEFONT],[le.BGSOUND,T.BGSOUND],[le.BIG,T.BIG],[le.BLOCKQUOTE,T.BLOCKQUOTE],[le.BODY,T.BODY],[le.BR,T.BR],[le.BUTTON,T.BUTTON],[le.CAPTION,T.CAPTION],[le.CENTER,T.CENTER],[le.CODE,T.CODE],[le.COL,T.COL],[le.COLGROUP,T.COLGROUP],[le.DD,T.DD],[le.DESC,T.DESC],[le.DETAILS,T.DETAILS],[le.DIALOG,T.DIALOG],[le.DIR,T.DIR],[le.DIV,T.DIV],[le.DL,T.DL],[le.DT,T.DT],[le.EM,T.EM],[le.EMBED,T.EMBED],[le.FIELDSET,T.FIELDSET],[le.FIGCAPTION,T.FIGCAPTION],[le.FIGURE,T.FIGURE],[le.FONT,T.FONT],[le.FOOTER,T.FOOTER],[le.FOREIGN_OBJECT,T.FOREIGN_OBJECT],[le.FORM,T.FORM],[le.FRAME,T.FRAME],[le.FRAMESET,T.FRAMESET],[le.H1,T.H1],[le.H2,T.H2],[le.H3,T.H3],[le.H4,T.H4],[le.H5,T.H5],[le.H6,T.H6],[le.HEAD,T.HEAD],[le.HEADER,T.HEADER],[le.HGROUP,T.HGROUP],[le.HR,T.HR],[le.HTML,T.HTML],[le.I,T.I],[le.IMG,T.IMG],[le.IMAGE,T.IMAGE],[le.INPUT,T.INPUT],[le.IFRAME,T.IFRAME],[le.KEYGEN,T.KEYGEN],[le.LABEL,T.LABEL],[le.LI,T.LI],[le.LINK,T.LINK],[le.LISTING,T.LISTING],[le.MAIN,T.MAIN],[le.MALIGNMARK,T.MALIGNMARK],[le.MARQUEE,T.MARQUEE],[le.MATH,T.MATH],[le.MENU,T.MENU],[le.META,T.META],[le.MGLYPH,T.MGLYPH],[le.MI,T.MI],[le.MO,T.MO],[le.MN,T.MN],[le.MS,T.MS],[le.MTEXT,T.MTEXT],[le.NAV,T.NAV],[le.NOBR,T.NOBR],[le.NOFRAMES,T.NOFRAMES],[le.NOEMBED,T.NOEMBED],[le.NOSCRIPT,T.NOSCRIPT],[le.OBJECT,T.OBJECT],[le.OL,T.OL],[le.OPTGROUP,T.OPTGROUP],[le.OPTION,T.OPTION],[le.P,T.P],[le.PARAM,T.PARAM],[le.PLAINTEXT,T.PLAINTEXT],[le.PRE,T.PRE],[le.RB,T.RB],[le.RP,T.RP],[le.RT,T.RT],[le.RTC,T.RTC],[le.RUBY,T.RUBY],[le.S,T.S],[le.SCRIPT,T.SCRIPT],[le.SECTION,T.SECTION],[le.SELECT,T.SELECT],[le.SOURCE,T.SOURCE],[le.SMALL,T.SMALL],[le.SPAN,T.SPAN],[le.STRIKE,T.STRIKE],[le.STRONG,T.STRONG],[le.STYLE,T.STYLE],[le.SUB,T.SUB],[le.SUMMARY,T.SUMMARY],[le.SUP,T.SUP],[le.TABLE,T.TABLE],[le.TBODY,T.TBODY],[le.TEMPLATE,T.TEMPLATE],[le.TEXTAREA,T.TEXTAREA],[le.TFOOT,T.TFOOT],[le.TD,T.TD],[le.TH,T.TH],[le.THEAD,T.THEAD],[le.TITLE,T.TITLE],[le.TR,T.TR],[le.TRACK,T.TRACK],[le.TT,T.TT],[le.U,T.U],[le.UL,T.UL],[le.SVG,T.SVG],[le.VAR,T.VAR],[le.WBR,T.WBR],[le.XMP,T.XMP]]);function Va(e){var t;return(t=mK.get(e))!==null&&t!==void 0?t:T.UNKNOWN}var _e=T,A1={[xe.HTML]:new Set([_e.ADDRESS,_e.APPLET,_e.AREA,_e.ARTICLE,_e.ASIDE,_e.BASE,_e.BASEFONT,_e.BGSOUND,_e.BLOCKQUOTE,_e.BODY,_e.BR,_e.BUTTON,_e.CAPTION,_e.CENTER,_e.COL,_e.COLGROUP,_e.DD,_e.DETAILS,_e.DIR,_e.DIV,_e.DL,_e.DT,_e.EMBED,_e.FIELDSET,_e.FIGCAPTION,_e.FIGURE,_e.FOOTER,_e.FORM,_e.FRAME,_e.FRAMESET,_e.H1,_e.H2,_e.H3,_e.H4,_e.H5,_e.H6,_e.HEAD,_e.HEADER,_e.HGROUP,_e.HR,_e.HTML,_e.IFRAME,_e.IMG,_e.INPUT,_e.LI,_e.LINK,_e.LISTING,_e.MAIN,_e.MARQUEE,_e.MENU,_e.META,_e.NAV,_e.NOEMBED,_e.NOFRAMES,_e.NOSCRIPT,_e.OBJECT,_e.OL,_e.P,_e.PARAM,_e.PLAINTEXT,_e.PRE,_e.SCRIPT,_e.SECTION,_e.SELECT,_e.SOURCE,_e.STYLE,_e.SUMMARY,_e.TABLE,_e.TBODY,_e.TD,_e.TEMPLATE,_e.TEXTAREA,_e.TFOOT,_e.TH,_e.THEAD,_e.TITLE,_e.TR,_e.TRACK,_e.UL,_e.WBR,_e.XMP]),[xe.MATHML]:new Set([_e.MI,_e.MO,_e.MN,_e.MS,_e.MTEXT,_e.ANNOTATION_XML]),[xe.SVG]:new Set([_e.TITLE,_e.FOREIGN_OBJECT,_e.DESC]),[xe.XLINK]:new Set,[xe.XML]:new Set,[xe.XMLNS]:new Set};function wu(e){return e===_e.H1||e===_e.H2||e===_e.H3||e===_e.H4||e===_e.H5||e===_e.H6}var dK=new Set([le.STYLE,le.SCRIPT,le.XMP,le.IFRAME,le.NOEMBED,le.NOFRAMES,le.PLAINTEXT]);function N1(e,t){return dK.has(e)||t&&e===le.NOSCRIPT}var hK=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),V;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(V||(V={}));var yr={DATA:V.DATA,RCDATA:V.RCDATA,RAWTEXT:V.RAWTEXT,SCRIPT_DATA:V.SCRIPT_DATA,PLAINTEXT:V.PLAINTEXT,CDATA_SECTION:V.CDATA_SECTION};function Su(e){return e>=G.DIGIT_0&&e<=G.DIGIT_9}function Du(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_Z}function vK(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_Z}function $a(e){return vK(e)||Du(e)}function T1(e){return $a(e)||Su(e)}function o6(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_F}function s6(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_F}function gK(e){return Su(e)||o6(e)||s6(e)}function cf(e){return e+32}function u6(e){return e===G.SPACE||e===G.LINE_FEED||e===G.TABULATION||e===G.FORM_FEED}function xK(e){return e===G.EQUALS_SIGN||T1(e)}function i6(e){return u6(e)||e===G.SOLIDUS||e===G.GREATER_THAN_SIGN}var Cu=class{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=V.DATA,this.returnState=V.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new of(r),this.currentLocation=this.getCurrentLocation(-1)}_err(t){var r,n;(n=(r=this.handler).onParseError)===null||n===void 0||n.call(r,this.preprocessor.getError(t))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(t){this.consumedAfterSnapshot-=t,this.preprocessor.retreat(t)}_reconsumeInState(t,r){this.state=t,this._callState(r)}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r0&&this._err(he.endTagWithAttributes),t.selfClosing&&this._err(he.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case dt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case dt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case dt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:dt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==t)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=r;return}this._createCharacterToken(t,r)}_emitCodePoint(t){let r=u6(t)?dt.WHITESPACE_CHARACTER:t===G.NULL?dt.NULL_CHARACTER:dt.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(dt.CHARACTER,t)}_matchNamedCharacterReference(t){let r=null,n=0,a=!1;for(let i=0,o=vn[0];i>=0&&(i=mu(vn,o,i+1,t),!(i<0));t=this._consume()){n+=1,o=vn[i];let l=o&Cr.VALUE_LENGTH;if(l){let u=(l>>14)-1;if(t!==G.SEMICOLON&&this._isCharacterReferenceInAttribute()&&xK(this.preprocessor.peek(1))?(r=[G.AMPERSAND],i+=u):(r=u===0?[vn[i]&~Cr.VALUE_LENGTH]:u===1?[vn[++i]]:[vn[++i],vn[++i]],n=0,a=t!==G.SEMICOLON),u===0){this._consume();break}}}return this._unconsume(n),a&&!this.preprocessor.endOfChunkHit&&this._err(he.missingSemicolonAfterCharacterReference),this._unconsume(1),r}_isCharacterReferenceInAttribute(){return this.returnState===V.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case V.DATA:{this._stateData(t);break}case V.RCDATA:{this._stateRcdata(t);break}case V.RAWTEXT:{this._stateRawtext(t);break}case V.SCRIPT_DATA:{this._stateScriptData(t);break}case V.PLAINTEXT:{this._statePlaintext(t);break}case V.TAG_OPEN:{this._stateTagOpen(t);break}case V.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case V.TAG_NAME:{this._stateTagName(t);break}case V.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case V.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case V.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case V.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case V.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case V.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case V.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case V.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case V.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case V.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case V.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case V.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case V.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case V.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case V.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case V.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case V.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case V.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case V.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case V.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case V.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case V.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case V.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case V.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case V.BOGUS_COMMENT:{this._stateBogusComment(t);break}case V.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case V.COMMENT_START:{this._stateCommentStart(t);break}case V.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case V.COMMENT:{this._stateComment(t);break}case V.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case V.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case V.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case V.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case V.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case V.COMMENT_END:{this._stateCommentEnd(t);break}case V.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case V.DOCTYPE:{this._stateDoctype(t);break}case V.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case V.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case V.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case V.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case V.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case V.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case V.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case V.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case V.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case V.CDATA_SECTION:{this._stateCdataSection(t);break}case V.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case V.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case V.CHARACTER_REFERENCE:{this._stateCharacterReference(t);break}case V.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(t);break}case V.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}case V.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(t);break}case V.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(t);break}case V.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(t);break}case V.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(t);break}case V.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case G.LESS_THAN_SIGN:{this.state=V.TAG_OPEN;break}case G.AMPERSAND:{this.returnState=V.DATA,this.state=V.CHARACTER_REFERENCE;break}case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitCodePoint(t);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case G.AMPERSAND:{this.returnState=V.RCDATA,this.state=V.CHARACTER_REFERENCE;break}case G.LESS_THAN_SIGN:{this.state=V.RCDATA_LESS_THAN_SIGN;break}case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Bt);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case G.LESS_THAN_SIGN:{this.state=V.RAWTEXT_LESS_THAN_SIGN;break}case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Bt);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case G.LESS_THAN_SIGN:{this.state=V.SCRIPT_DATA_LESS_THAN_SIGN;break}case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Bt);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Bt);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if($a(t))this._createStartTagToken(),this.state=V.TAG_NAME,this._stateTagName(t);else switch(t){case G.EXCLAMATION_MARK:{this.state=V.MARKUP_DECLARATION_OPEN;break}case G.SOLIDUS:{this.state=V.END_TAG_OPEN;break}case G.QUESTION_MARK:{this._err(he.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=V.BOGUS_COMMENT,this._stateBogusComment(t);break}case G.EOF:{this._err(he.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(he.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=V.DATA,this._stateData(t)}}_stateEndTagOpen(t){if($a(t))this._createEndTagToken(),this.state=V.TAG_NAME,this._stateTagName(t);else switch(t){case G.GREATER_THAN_SIGN:{this._err(he.missingEndTagName),this.state=V.DATA;break}case G.EOF:{this._err(he.eofBeforeTagName),this._emitChars("");break}case G.NULL:{this._err(he.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_ESCAPED,this._emitChars(Bt);break}case G.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=V.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===G.SOLIDUS?this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:$a(t)?(this._emitChars("<"),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){$a(t)?(this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("");break}case G.NULL:{this._err(he.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Bt);break}case G.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===G.SOLIDUS?(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Mr.SCRIPT,!1)&&i6(this.preprocessor.peek(Mr.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r1114111)this._err(he.characterReferenceOutsideUnicodeRange),this.charRefCode=G.REPLACEMENT_CHARACTER;else if(rf(this.charRefCode))this._err(he.surrogateCharacterReference),this.charRefCode=G.REPLACEMENT_CHARACTER;else if(af(this.charRefCode))this._err(he.noncharacterCharacterReference);else if(nf(this.charRefCode)||this.charRefCode===G.CARRIAGE_RETURN){this._err(he.controlCharacterReference);let r=hK.get(this.charRefCode);r!==void 0&&(this.charRefCode=r)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,t)}};var l6=new Set([T.DD,T.DT,T.LI,T.OPTGROUP,T.OPTION,T.P,T.RB,T.RP,T.RT,T.RTC]),c6=new Set([...l6,T.CAPTION,T.COLGROUP,T.TBODY,T.TD,T.TFOOT,T.TH,T.THEAD,T.TR]),lf=new Map([[T.APPLET,xe.HTML],[T.CAPTION,xe.HTML],[T.HTML,xe.HTML],[T.MARQUEE,xe.HTML],[T.OBJECT,xe.HTML],[T.TABLE,xe.HTML],[T.TD,xe.HTML],[T.TEMPLATE,xe.HTML],[T.TH,xe.HTML],[T.ANNOTATION_XML,xe.MATHML],[T.MI,xe.MATHML],[T.MN,xe.MATHML],[T.MO,xe.MATHML],[T.MS,xe.MATHML],[T.MTEXT,xe.MATHML],[T.DESC,xe.SVG],[T.FOREIGN_OBJECT,xe.SVG],[T.TITLE,xe.SVG]]),bK=[T.H1,T.H2,T.H3,T.H4,T.H5,T.H6],yK=[T.TR,T.TEMPLATE,T.HTML],EK=[T.TBODY,T.TFOOT,T.THEAD,T.TEMPLATE,T.HTML],AK=[T.TABLE,T.TEMPLATE,T.HTML],NK=[T.TD,T.TH],pf=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=T.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===T.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===xe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){let n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){let a=this._indexOf(t)+1;this.items.splice(a,0,r),this.tagIDs.splice(a,0,n),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==xe.HTML);this.shortenToLength(r<0?0:r)}shortenToLength(t){for(;this.stackTop>=t;){let r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop=0;n--)if(t.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){let n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(AK,xe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(EK,xe.HTML)}clearBackToTableRowContext(){this.clearBackTo(yK,xe.HTML)}remove(t){let r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===T.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===T.HTML}hasInScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r],a=this.treeAdapter.getNamespaceURI(this.items[r]);if(n===t&&a===xe.HTML)return!0;if(lf.get(n)===a)return!1}return!0}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(wu(r)&&n===xe.HTML)return!0;if(lf.get(r)===n)return!1}return!0}hasInListItemScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r],a=this.treeAdapter.getNamespaceURI(this.items[r]);if(n===t&&a===xe.HTML)return!0;if((n===T.UL||n===T.OL)&&a===xe.HTML||lf.get(n)===a)return!1}return!0}hasInButtonScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r],a=this.treeAdapter.getNamespaceURI(this.items[r]);if(n===t&&a===xe.HTML)return!0;if(n===T.BUTTON&&a===xe.HTML||lf.get(n)===a)return!1}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r];if(this.treeAdapter.getNamespaceURI(this.items[r])===xe.HTML){if(n===t)return!0;if(n===T.TABLE||n===T.TEMPLATE||n===T.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===xe.HTML){if(r===T.TBODY||r===T.THEAD||r===T.TFOOT)return!0;if(r===T.TABLE||r===T.HTML)return!1}}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r];if(this.treeAdapter.getNamespaceURI(this.items[r])===xe.HTML){if(n===t)return!0;if(n!==T.OPTION&&n!==T.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;l6.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;c6.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&c6.has(this.currentTagId);)this.pop()}};var yn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(yn=yn||(yn={}));var p6={type:yn.Marker},ff=class{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){let n=[],a=r.length,i=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let l=0;l[o.name,o.value])),i=0;for(let o=0;oa.get(u.name)===u.value)&&(i+=1,i>=3&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(p6)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:yn.Element,element:t,token:r})}insertElementAfterBookmark(t,r){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:yn.Element,element:t,token:r})}removeEntry(t){let r=this.entries.indexOf(t);r>=0&&this.entries.splice(r,1)}clearToLastMarker(){let t=this.entries.indexOf(p6);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){let r=this.entries.find(n=>n.type===yn.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===yn.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===yn.Element&&r.element===t)}};function f6(e){return{nodeName:"#text",value:e,parentNode:null}}var Kn={createDocument(){return{nodeName:"#document",mode:mr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){let n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){let a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=t,a.publicId=r,a.systemId=n;else{let i={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};Kn.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let r=e.childNodes[e.childNodes.length-1];if(Kn.isTextNode(r)){r.value+=t;return}}Kn.appendChild(e,f6(t))},insertTextBefore(e,t,r){let n=e.childNodes[e.childNodes.indexOf(r)-1];n&&Kn.isTextNode(n)?n.value+=t:Kn.insertBefore(e,f6(t),r)},adoptAttributes(e,t){let r=new Set(e.attrs.map(n=>n.name));for(let n=0;ne.startsWith(r))}function g6(e){return e.name===d6&&e.publicId===null&&(e.systemId===null||e.systemId===TK)}function x6(e){if(e.name!==d6)return mr.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===wK)return mr.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),SK.has(r))return mr.QUIRKS;let n=t===null?DK:h6;if(m6(r,n))return mr.QUIRKS;if(n=t===null?v6:CK,m6(r,n))return mr.LIMITED_QUIRKS}return mr.NO_QUIRKS}var b6={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},MK="definitionurl",OK="definitionURL",RK=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),FK=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:xe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:xe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:xe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:xe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:xe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:xe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:xe.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:xe.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:xe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:xe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:xe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:xe.XMLNS}]]),IK=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),BK=new Set([T.B,T.BIG,T.BLOCKQUOTE,T.BODY,T.BR,T.CENTER,T.CODE,T.DD,T.DIV,T.DL,T.DT,T.EM,T.EMBED,T.H1,T.H2,T.H3,T.H4,T.H5,T.H6,T.HEAD,T.HR,T.I,T.IMG,T.LI,T.LISTING,T.MENU,T.META,T.NOBR,T.OL,T.P,T.PRE,T.RUBY,T.S,T.SMALL,T.SPAN,T.STRONG,T.STRIKE,T.SUB,T.SUP,T.TABLE,T.TT,T.U,T.UL,T.VAR]);function y6(e){let t=e.tagID;return t===T.FONT&&e.attrs.some(({name:n})=>n===In.COLOR||n===In.SIZE||n===In.FACE)||BK.has(t)}function w1(e){for(let t=0;t0&&this._setContextModes(t,r)}onItemPop(t,r){var n,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(n=this.treeAdapter).onItemPop)===null||a===void 0||a.call(n,t,this.openElements.current),r){let i,o;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,o=this.fragmentContextID):{current:i,currentTagId:o}=this.openElements,this._setContextModes(i,o)}}_setContextModes(t,r){let n=t===this.document||this.treeAdapter.getNamespaceURI(t)===xe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,xe.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=J.TEXT}switchToPlaintextParsing(){this.insertionMode=J.TEXT,this.originalInsertionMode=J.IN_BODY,this.tokenizer.state=yr.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===le.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==xe.HTML))switch(this.fragmentContextID){case T.TITLE:case T.TEXTAREA:{this.tokenizer.state=yr.RCDATA;break}case T.STYLE:case T.XMP:case T.IFRAME:case T.NOEMBED:case T.NOFRAMES:case T.NOSCRIPT:{this.tokenizer.state=yr.RAWTEXT;break}case T.SCRIPT:{this.tokenizer.state=yr.SCRIPT_DATA;break}case T.PLAINTEXT:{this.tokenizer.state=yr.PLAINTEXT;break}default:}}_setDocumentType(t){let r=t.name||"",n=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,a),t.location){let o=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){let n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{let n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n,t)}}_appendElement(t,r){let n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){let n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){let n=this.treeAdapter.createElement(t,xe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){let r=this.treeAdapter.createElement(t.tagName,xe.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let t=this.treeAdapter.createElement(le.HTML,xe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,T.HTML)}_appendCommentNode(t,r){let n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;let a=this.treeAdapter.getChildNodes(r),i=n?a.lastIndexOf(n):a.length,o=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){let{endLine:u,endCol:s,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:u,endCol:s,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){let n=r.location,a=this.treeAdapter.getTagName(t),i=r.type===dt.END_TAG&&a===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===T.SVG&&this.treeAdapter.getTagName(r)===le.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===xe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===T.MGLYPH||t.tagID===T.MALIGNMARK)&&!this._isIntegrationPoint(n,r,xe.HTML)}_processToken(t){switch(t.type){case dt.CHARACTER:{this.onCharacter(t);break}case dt.NULL_CHARACTER:{this.onNullCharacter(t);break}case dt.COMMENT:{this.onComment(t);break}case dt.DOCTYPE:{this.onDoctype(t);break}case dt.START_TAG:{this._processStartTag(t);break}case dt.END_TAG:{this.onEndTag(t);break}case dt.EOF:{this.onEof(t);break}case dt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){let a=this.treeAdapter.getNamespaceURI(r),i=this.treeAdapter.getAttrList(r);return A6(t,a,i,n)}_reconstructActiveFormattingElements(){let t=this.activeFormattingElements.entries.length;if(t){let r=this.activeFormattingElements.entries.findIndex(a=>a.type===yn.Marker||this.openElements.contains(a.element)),n=r<0?t-1:r-1;for(let a=n;a>=0;a--){let i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=J.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(T.P),this.openElements.popUntilTagNamePopped(T.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case T.TR:{this.insertionMode=J.IN_ROW;return}case T.TBODY:case T.THEAD:case T.TFOOT:{this.insertionMode=J.IN_TABLE_BODY;return}case T.CAPTION:{this.insertionMode=J.IN_CAPTION;return}case T.COLGROUP:{this.insertionMode=J.IN_COLUMN_GROUP;return}case T.TABLE:{this.insertionMode=J.IN_TABLE;return}case T.BODY:{this.insertionMode=J.IN_BODY;return}case T.FRAMESET:{this.insertionMode=J.IN_FRAMESET;return}case T.SELECT:{this._resetInsertionModeForSelect(t);return}case T.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case T.HTML:{this.insertionMode=this.headElement?J.AFTER_HEAD:J.BEFORE_HEAD;return}case T.TD:case T.TH:{if(t>0){this.insertionMode=J.IN_CELL;return}break}case T.HEAD:{if(t>0){this.insertionMode=J.IN_HEAD;return}break}}this.insertionMode=J.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){let n=this.openElements.tagIDs[r];if(n===T.TEMPLATE)break;if(n===T.TABLE){this.insertionMode=J.IN_SELECT_IN_TABLE;return}}this.insertionMode=J.IN_SELECT}_isElementCausesFosterParenting(t){return S6.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){let r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case T.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===xe.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case T.TABLE:{let n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){let r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){let n=this.treeAdapter.getNamespaceURI(t);return A1[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gQ(this,t);return}switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{Ou(this,t);break}case J.BEFORE_HEAD:{Ru(this,t);break}case J.IN_HEAD:{Fu(this,t);break}case J.IN_HEAD_NO_SCRIPT:{Iu(this,t);break}case J.AFTER_HEAD:{Bu(this,t);break}case J.IN_BODY:case J.IN_CAPTION:case J.IN_CELL:case J.IN_TEMPLATE:{_6(this,t);break}case J.TEXT:case J.IN_SELECT:case J.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case J.IN_TABLE:case J.IN_TABLE_BODY:case J.IN_ROW:{S1(this,t);break}case J.IN_TABLE_TEXT:{B6(this,t);break}case J.IN_COLUMN_GROUP:{hf(this,t);break}case J.AFTER_BODY:{vf(this,t);break}case J.AFTER_AFTER_BODY:{df(this,t);break}default:}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){vQ(this,t);return}switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{Ou(this,t);break}case J.BEFORE_HEAD:{Ru(this,t);break}case J.IN_HEAD:{Fu(this,t);break}case J.IN_HEAD_NO_SCRIPT:{Iu(this,t);break}case J.AFTER_HEAD:{Bu(this,t);break}case J.TEXT:{this._insertCharacters(t);break}case J.IN_TABLE:case J.IN_TABLE_BODY:case J.IN_ROW:{S1(this,t);break}case J.IN_COLUMN_GROUP:{hf(this,t);break}case J.AFTER_BODY:{vf(this,t);break}case J.AFTER_AFTER_BODY:{df(this,t);break}default:}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){C1(this,t);return}switch(this.insertionMode){case J.INITIAL:case J.BEFORE_HTML:case J.BEFORE_HEAD:case J.IN_HEAD:case J.IN_HEAD_NO_SCRIPT:case J.AFTER_HEAD:case J.IN_BODY:case J.IN_TABLE:case J.IN_CAPTION:case J.IN_COLUMN_GROUP:case J.IN_TABLE_BODY:case J.IN_ROW:case J.IN_CELL:case J.IN_SELECT:case J.IN_SELECT_IN_TABLE:case J.IN_TEMPLATE:case J.IN_FRAMESET:case J.AFTER_FRAMESET:{C1(this,t);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}case J.AFTER_BODY:{XK(this,t);break}case J.AFTER_AFTER_BODY:case J.AFTER_AFTER_FRAMESET:{KK(this,t);break}default:}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case J.INITIAL:{WK(this,t);break}case J.BEFORE_HEAD:case J.IN_HEAD:case J.IN_HEAD_NO_SCRIPT:case J.AFTER_HEAD:{this._err(t,he.misplacedDoctype);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}default:}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,he.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?xQ(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{QK(this,t);break}case J.BEFORE_HEAD:{JK(this,t);break}case J.IN_HEAD:{Bn(this,t);break}case J.IN_HEAD_NO_SCRIPT:{rW(this,t);break}case J.AFTER_HEAD:{aW(this,t);break}case J.IN_BODY:{Er(this,t);break}case J.IN_TABLE:{Ho(this,t);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}case J.IN_CAPTION:{eQ(this,t);break}case J.IN_COLUMN_GROUP:{R1(this,t);break}case J.IN_TABLE_BODY:{bf(this,t);break}case J.IN_ROW:{yf(this,t);break}case J.IN_CELL:{nQ(this,t);break}case J.IN_SELECT:{U6(this,t);break}case J.IN_SELECT_IN_TABLE:{iQ(this,t);break}case J.IN_TEMPLATE:{sQ(this,t);break}case J.AFTER_BODY:{cQ(this,t);break}case J.IN_FRAMESET:{lQ(this,t);break}case J.AFTER_FRAMESET:{fQ(this,t);break}case J.AFTER_AFTER_BODY:{dQ(this,t);break}case J.AFTER_AFTER_FRAMESET:{hQ(this,t);break}default:}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?bQ(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{ZK(this,t);break}case J.BEFORE_HEAD:{eW(this,t);break}case J.IN_HEAD:{tW(this,t);break}case J.IN_HEAD_NO_SCRIPT:{nW(this,t);break}case J.AFTER_HEAD:{iW(this,t);break}case J.IN_BODY:{xf(this,t);break}case J.TEXT:{YW(this,t);break}case J.IN_TABLE:{Lu(this,t);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}case J.IN_CAPTION:{tQ(this,t);break}case J.IN_COLUMN_GROUP:{rQ(this,t);break}case J.IN_TABLE_BODY:{_1(this,t);break}case J.IN_ROW:{P6(this,t);break}case J.IN_CELL:{aQ(this,t);break}case J.IN_SELECT:{k6(this,t);break}case J.IN_SELECT_IN_TABLE:{oQ(this,t);break}case J.IN_TEMPLATE:{uQ(this,t);break}case J.AFTER_BODY:{H6(this,t);break}case J.IN_FRAMESET:{pQ(this,t);break}case J.AFTER_FRAMESET:{mQ(this,t);break}case J.AFTER_AFTER_BODY:{df(this,t);break}default:}}onEof(t){switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{Ou(this,t);break}case J.BEFORE_HEAD:{Ru(this,t);break}case J.IN_HEAD:{Fu(this,t);break}case J.IN_HEAD_NO_SCRIPT:{Iu(this,t);break}case J.AFTER_HEAD:{Bu(this,t);break}case J.IN_BODY:case J.IN_TABLE:case J.IN_CAPTION:case J.IN_COLUMN_GROUP:case J.IN_TABLE_BODY:case J.IN_ROW:case J.IN_CELL:case J.IN_SELECT:case J.IN_SELECT_IN_TABLE:{F6(this,t);break}case J.TEXT:{jW(this,t);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}case J.IN_TEMPLATE:{q6(this,t);break}case J.AFTER_BODY:case J.IN_FRAMESET:case J.AFTER_FRAMESET:case J.AFTER_AFTER_BODY:case J.AFTER_AFTER_FRAMESET:{O1(this,t);break}default:}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===G.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case J.IN_HEAD:case J.IN_HEAD_NO_SCRIPT:case J.AFTER_HEAD:case J.TEXT:case J.IN_COLUMN_GROUP:case J.IN_SELECT:case J.IN_SELECT_IN_TABLE:case J.IN_FRAMESET:case J.AFTER_FRAMESET:{this._insertCharacters(t);break}case J.IN_BODY:case J.IN_CAPTION:case J.IN_CELL:case J.IN_TEMPLATE:case J.AFTER_BODY:case J.AFTER_AFTER_BODY:case J.AFTER_AFTER_FRAMESET:{C6(this,t);break}case J.IN_TABLE:case J.IN_TABLE_BODY:case J.IN_ROW:{S1(this,t);break}case J.IN_TABLE_TEXT:{I6(this,t);break}default:}}};function zK(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):R6(e,t),r}function GK(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){let a=e.openElements.items[n];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[n])&&(r=a)}return r||(e.openElements.shortenToLength(n<0?0:n),e.activeFormattingElements.removeEntry(t)),r}function YK(e,t,r){let n=t,a=e.openElements.getCommonAncestor(t);for(let i=0,o=a;o!==r;i++,o=a){a=e.openElements.getCommonAncestor(o);let l=e.activeFormattingElements.getElementEntry(o),u=l&&i>=qK;!l||u?(u&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(o)):(o=jK(e,l),n===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(o,n),n=o)}return n}function jK(e,t){let r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function VK(e,t,r){let n=e.treeAdapter.getTagName(t),a=Va(n);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(r);else{let i=e.treeAdapter.getNamespaceURI(t);a===T.TEMPLATE&&i===xe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function $K(e,t,r){let n=e.treeAdapter.getNamespaceURI(r.element),{token:a}=r,i=e.treeAdapter.createElement(a.tagName,n,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,i,a.tagID)}function M1(e,t){for(let r=0;r=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(n);if(a&&!a.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let i=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(i);o&&!o.endTag&&e._setEndLocation(i,t)}}}}function WK(e,t){e._setDocumentType(t);let r=t.forceQuirks?mr.QUIRKS:x6(t);g6(t)||e._err(t,he.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=J.BEFORE_HTML}function _u(e,t){e._err(t,he.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,mr.QUIRKS),e.insertionMode=J.BEFORE_HTML,e._processToken(t)}function QK(e,t){t.tagID===T.HTML?(e._insertElement(t,xe.HTML),e.insertionMode=J.BEFORE_HEAD):Ou(e,t)}function ZK(e,t){let r=t.tagID;(r===T.HTML||r===T.HEAD||r===T.BODY||r===T.BR)&&Ou(e,t)}function Ou(e,t){e._insertFakeRootElement(),e.insertionMode=J.BEFORE_HEAD,e._processToken(t)}function JK(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.HEAD:{e._insertElement(t,xe.HTML),e.headElement=e.openElements.current,e.insertionMode=J.IN_HEAD;break}default:Ru(e,t)}}function eW(e,t){let r=t.tagID;r===T.HEAD||r===T.BODY||r===T.HTML||r===T.BR?Ru(e,t):e._err(t,he.endTagWithoutMatchingOpenElement)}function Ru(e,t){e._insertFakeElement(le.HEAD,T.HEAD),e.headElement=e.openElements.current,e.insertionMode=J.IN_HEAD,e._processToken(t)}function Bn(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.BASE:case T.BASEFONT:case T.BGSOUND:case T.LINK:case T.META:{e._appendElement(t,xe.HTML),t.ackSelfClosing=!0;break}case T.TITLE:{e._switchToTextParsing(t,yr.RCDATA);break}case T.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,yr.RAWTEXT):(e._insertElement(t,xe.HTML),e.insertionMode=J.IN_HEAD_NO_SCRIPT);break}case T.NOFRAMES:case T.STYLE:{e._switchToTextParsing(t,yr.RAWTEXT);break}case T.SCRIPT:{e._switchToTextParsing(t,yr.SCRIPT_DATA);break}case T.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=J.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(J.IN_TEMPLATE);break}case T.HEAD:{e._err(t,he.misplacedStartTagForHeadElement);break}default:Fu(e,t)}}function tW(e,t){switch(t.tagID){case T.HEAD:{e.openElements.pop(),e.insertionMode=J.AFTER_HEAD;break}case T.BODY:case T.BR:case T.HTML:{Fu(e,t);break}case T.TEMPLATE:{Di(e,t);break}default:e._err(t,he.endTagWithoutMatchingOpenElement)}}function Di(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==T.TEMPLATE&&e._err(t,he.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(T.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,he.endTagWithoutMatchingOpenElement)}function Fu(e,t){e.openElements.pop(),e.insertionMode=J.AFTER_HEAD,e._processToken(t)}function rW(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.BASEFONT:case T.BGSOUND:case T.HEAD:case T.LINK:case T.META:case T.NOFRAMES:case T.STYLE:{Bn(e,t);break}case T.NOSCRIPT:{e._err(t,he.nestedNoscriptInHead);break}default:Iu(e,t)}}function nW(e,t){switch(t.tagID){case T.NOSCRIPT:{e.openElements.pop(),e.insertionMode=J.IN_HEAD;break}case T.BR:{Iu(e,t);break}default:e._err(t,he.endTagWithoutMatchingOpenElement)}}function Iu(e,t){let r=t.type===dt.EOF?he.openElementsLeftAfterEof:he.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=J.IN_HEAD,e._processToken(t)}function aW(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.BODY:{e._insertElement(t,xe.HTML),e.framesetOk=!1,e.insertionMode=J.IN_BODY;break}case T.FRAMESET:{e._insertElement(t,xe.HTML),e.insertionMode=J.IN_FRAMESET;break}case T.BASE:case T.BASEFONT:case T.BGSOUND:case T.LINK:case T.META:case T.NOFRAMES:case T.SCRIPT:case T.STYLE:case T.TEMPLATE:case T.TITLE:{e._err(t,he.abandonedHeadElementChild),e.openElements.push(e.headElement,T.HEAD),Bn(e,t),e.openElements.remove(e.headElement);break}case T.HEAD:{e._err(t,he.misplacedStartTagForHeadElement);break}default:Bu(e,t)}}function iW(e,t){switch(t.tagID){case T.BODY:case T.HTML:case T.BR:{Bu(e,t);break}case T.TEMPLATE:{Di(e,t);break}default:e._err(t,he.endTagWithoutMatchingOpenElement)}}function Bu(e,t){e._insertFakeElement(le.BODY,T.BODY),e.insertionMode=J.IN_BODY,gf(e,t)}function gf(e,t){switch(t.type){case dt.CHARACTER:{_6(e,t);break}case dt.WHITESPACE_CHARACTER:{C6(e,t);break}case dt.COMMENT:{C1(e,t);break}case dt.START_TAG:{Er(e,t);break}case dt.END_TAG:{xf(e,t);break}case dt.EOF:{F6(e,t);break}default:}}function C6(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function _6(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function oW(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function sW(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function uW(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,xe.HTML),e.insertionMode=J.IN_FRAMESET)}function cW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML)}function lW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),wu(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,xe.HTML)}function pW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function fW(e,t){let r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),r||(e.formElement=e.openElements.current))}function mW(e,t){e.framesetOk=!1;let r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){let a=e.openElements.tagIDs[n];if(r===T.LI&&a===T.LI||(r===T.DD||r===T.DT)&&(a===T.DD||a===T.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==T.ADDRESS&&a!==T.DIV&&a!==T.P&&e._isSpecialElement(e.openElements.items[n],a))break}e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML)}function dW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),e.tokenizer.state=yr.PLAINTEXT}function hW(e,t){e.openElements.hasInScope(T.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(T.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.framesetOk=!1}function vW(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(le.A);r&&(M1(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gW(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xW(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(T.NOBR)&&(M1(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,xe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bW(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function yW(e,t){e.treeAdapter.getDocumentMode(e.document)!==mr.QUIRKS&&e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),e.framesetOk=!1,e.insertionMode=J.IN_TABLE}function M6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,xe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function O6(e){let t=sf(e,In.TYPE);return t!=null&&t.toLowerCase()===UK}function EW(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,xe.HTML),O6(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function AW(e,t){e._appendElement(t,xe.HTML),t.ackSelfClosing=!0}function NW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._appendElement(t,xe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TW(e,t){t.tagName=le.IMG,t.tagID=T.IMG,M6(e,t)}function wW(e,t){e._insertElement(t,xe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=yr.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=J.TEXT}function DW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,yr.RAWTEXT)}function SW(e,t){e.framesetOk=!1,e._switchToTextParsing(t,yr.RAWTEXT)}function w6(e,t){e._switchToTextParsing(t,yr.RAWTEXT)}function CW(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===J.IN_TABLE||e.insertionMode===J.IN_CAPTION||e.insertionMode===J.IN_TABLE_BODY||e.insertionMode===J.IN_ROW||e.insertionMode===J.IN_CELL?J.IN_SELECT_IN_TABLE:J.IN_SELECT}function _W(e,t){e.openElements.currentTagId===T.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML)}function MW(e,t){e.openElements.hasInScope(T.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,xe.HTML)}function OW(e,t){e.openElements.hasInScope(T.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(T.RTC),e._insertElement(t,xe.HTML)}function RW(e,t){e._reconstructActiveFormattingElements(),w1(t),mf(t),t.selfClosing?e._appendElement(t,xe.MATHML):e._insertElement(t,xe.MATHML),t.ackSelfClosing=!0}function FW(e,t){e._reconstructActiveFormattingElements(),D1(t),mf(t),t.selfClosing?e._appendElement(t,xe.SVG):e._insertElement(t,xe.SVG),t.ackSelfClosing=!0}function D6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML)}function Er(e,t){switch(t.tagID){case T.I:case T.S:case T.B:case T.U:case T.EM:case T.TT:case T.BIG:case T.CODE:case T.FONT:case T.SMALL:case T.STRIKE:case T.STRONG:{gW(e,t);break}case T.A:{vW(e,t);break}case T.H1:case T.H2:case T.H3:case T.H4:case T.H5:case T.H6:{lW(e,t);break}case T.P:case T.DL:case T.OL:case T.UL:case T.DIV:case T.DIR:case T.NAV:case T.MAIN:case T.MENU:case T.ASIDE:case T.CENTER:case T.FIGURE:case T.FOOTER:case T.HEADER:case T.HGROUP:case T.DIALOG:case T.DETAILS:case T.ADDRESS:case T.ARTICLE:case T.SECTION:case T.SUMMARY:case T.FIELDSET:case T.BLOCKQUOTE:case T.FIGCAPTION:{cW(e,t);break}case T.LI:case T.DD:case T.DT:{mW(e,t);break}case T.BR:case T.IMG:case T.WBR:case T.AREA:case T.EMBED:case T.KEYGEN:{M6(e,t);break}case T.HR:{NW(e,t);break}case T.RB:case T.RTC:{MW(e,t);break}case T.RT:case T.RP:{OW(e,t);break}case T.PRE:case T.LISTING:{pW(e,t);break}case T.XMP:{DW(e,t);break}case T.SVG:{FW(e,t);break}case T.HTML:{oW(e,t);break}case T.BASE:case T.LINK:case T.META:case T.STYLE:case T.TITLE:case T.SCRIPT:case T.BGSOUND:case T.BASEFONT:case T.TEMPLATE:{Bn(e,t);break}case T.BODY:{sW(e,t);break}case T.FORM:{fW(e,t);break}case T.NOBR:{xW(e,t);break}case T.MATH:{RW(e,t);break}case T.TABLE:{yW(e,t);break}case T.INPUT:{EW(e,t);break}case T.PARAM:case T.TRACK:case T.SOURCE:{AW(e,t);break}case T.IMAGE:{TW(e,t);break}case T.BUTTON:{hW(e,t);break}case T.APPLET:case T.OBJECT:case T.MARQUEE:{bW(e,t);break}case T.IFRAME:{SW(e,t);break}case T.SELECT:{CW(e,t);break}case T.OPTION:case T.OPTGROUP:{_W(e,t);break}case T.NOEMBED:{w6(e,t);break}case T.FRAMESET:{uW(e,t);break}case T.TEXTAREA:{wW(e,t);break}case T.NOSCRIPT:{e.options.scriptingEnabled?w6(e,t):D6(e,t);break}case T.PLAINTEXT:{dW(e,t);break}case T.COL:case T.TH:case T.TD:case T.TR:case T.HEAD:case T.FRAME:case T.TBODY:case T.TFOOT:case T.THEAD:case T.CAPTION:case T.COLGROUP:break;default:D6(e,t)}}function IW(e,t){if(e.openElements.hasInScope(T.BODY)&&(e.insertionMode=J.AFTER_BODY,e.options.sourceCodeLocationInfo)){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function BW(e,t){e.openElements.hasInScope(T.BODY)&&(e.insertionMode=J.AFTER_BODY,H6(e,t))}function LW(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function PW(e){let t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(T.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(T.FORM):r&&e.openElements.remove(r))}function UW(e){e.openElements.hasInButtonScope(T.P)||e._insertFakeElement(le.P,T.P),e._closePElement()}function kW(e){e.openElements.hasInListItemScope(T.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(T.LI),e.openElements.popUntilTagNamePopped(T.LI))}function qW(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function HW(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zW(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function GW(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(le.BR,T.BR),e.openElements.pop(),e.framesetOk=!1}function R6(e,t){let r=t.tagName,n=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){let i=e.openElements.items[a],o=e.openElements.tagIDs[a];if(n===o&&(n!==T.UNKNOWN||e.treeAdapter.getTagName(i)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,o))break}}function xf(e,t){switch(t.tagID){case T.A:case T.B:case T.I:case T.S:case T.U:case T.EM:case T.TT:case T.BIG:case T.CODE:case T.FONT:case T.NOBR:case T.SMALL:case T.STRIKE:case T.STRONG:{M1(e,t);break}case T.P:{UW(e);break}case T.DL:case T.UL:case T.OL:case T.DIR:case T.DIV:case T.NAV:case T.PRE:case T.MAIN:case T.MENU:case T.ASIDE:case T.BUTTON:case T.CENTER:case T.FIGURE:case T.FOOTER:case T.HEADER:case T.HGROUP:case T.DIALOG:case T.ADDRESS:case T.ARTICLE:case T.DETAILS:case T.SECTION:case T.SUMMARY:case T.LISTING:case T.FIELDSET:case T.BLOCKQUOTE:case T.FIGCAPTION:{LW(e,t);break}case T.LI:{kW(e);break}case T.DD:case T.DT:{qW(e,t);break}case T.H1:case T.H2:case T.H3:case T.H4:case T.H5:case T.H6:{HW(e);break}case T.BR:{GW(e);break}case T.BODY:{IW(e,t);break}case T.HTML:{BW(e,t);break}case T.FORM:{PW(e);break}case T.APPLET:case T.OBJECT:case T.MARQUEE:{zW(e,t);break}case T.TEMPLATE:{Di(e,t);break}default:R6(e,t)}}function F6(e,t){e.tmplInsertionModeStack.length>0?q6(e,t):O1(e,t)}function YW(e,t){var r;t.tagID===T.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function jW(e,t){e._err(t,he.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function S1(e,t){if(S6.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=J.IN_TABLE_TEXT,t.type){case dt.CHARACTER:{B6(e,t);break}case dt.WHITESPACE_CHARACTER:{I6(e,t);break}}else Pu(e,t)}function VW(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,xe.HTML),e.insertionMode=J.IN_CAPTION}function $W(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,xe.HTML),e.insertionMode=J.IN_COLUMN_GROUP}function XW(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(le.COLGROUP,T.COLGROUP),e.insertionMode=J.IN_COLUMN_GROUP,R1(e,t)}function KW(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,xe.HTML),e.insertionMode=J.IN_TABLE_BODY}function WW(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(le.TBODY,T.TBODY),e.insertionMode=J.IN_TABLE_BODY,bf(e,t)}function QW(e,t){e.openElements.hasInTableScope(T.TABLE)&&(e.openElements.popUntilTagNamePopped(T.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ZW(e,t){O6(t)?e._appendElement(t,xe.HTML):Pu(e,t),t.ackSelfClosing=!0}function JW(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,xe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ho(e,t){switch(t.tagID){case T.TD:case T.TH:case T.TR:{WW(e,t);break}case T.STYLE:case T.SCRIPT:case T.TEMPLATE:{Bn(e,t);break}case T.COL:{XW(e,t);break}case T.FORM:{JW(e,t);break}case T.TABLE:{QW(e,t);break}case T.TBODY:case T.TFOOT:case T.THEAD:{KW(e,t);break}case T.INPUT:{ZW(e,t);break}case T.CAPTION:{VW(e,t);break}case T.COLGROUP:{$W(e,t);break}default:Pu(e,t)}}function Lu(e,t){switch(t.tagID){case T.TABLE:{e.openElements.hasInTableScope(T.TABLE)&&(e.openElements.popUntilTagNamePopped(T.TABLE),e._resetInsertionMode());break}case T.TEMPLATE:{Di(e,t);break}case T.BODY:case T.CAPTION:case T.COL:case T.COLGROUP:case T.HTML:case T.TBODY:case T.TD:case T.TFOOT:case T.TH:case T.THEAD:case T.TR:break;default:Pu(e,t)}}function Pu(e,t){let r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,gf(e,t),e.fosterParentingEnabled=r}function I6(e,t){e.pendingCharacterTokens.push(t)}function B6(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Mu(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r0&&e.openElements.currentTagId===T.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===T.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===T.OPTGROUP&&e.openElements.pop();break}case T.OPTION:{e.openElements.currentTagId===T.OPTION&&e.openElements.pop();break}case T.SELECT:{e.openElements.hasInSelectScope(T.SELECT)&&(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode());break}case T.TEMPLATE:{Di(e,t);break}default:}}function iQ(e,t){let r=t.tagID;r===T.CAPTION||r===T.TABLE||r===T.TBODY||r===T.TFOOT||r===T.THEAD||r===T.TR||r===T.TD||r===T.TH?(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode(),e._processStartTag(t)):U6(e,t)}function oQ(e,t){let r=t.tagID;r===T.CAPTION||r===T.TABLE||r===T.TBODY||r===T.TFOOT||r===T.THEAD||r===T.TR||r===T.TD||r===T.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode(),e.onEndTag(t)):k6(e,t)}function sQ(e,t){switch(t.tagID){case T.BASE:case T.BASEFONT:case T.BGSOUND:case T.LINK:case T.META:case T.NOFRAMES:case T.SCRIPT:case T.STYLE:case T.TEMPLATE:case T.TITLE:{Bn(e,t);break}case T.CAPTION:case T.COLGROUP:case T.TBODY:case T.TFOOT:case T.THEAD:{e.tmplInsertionModeStack[0]=J.IN_TABLE,e.insertionMode=J.IN_TABLE,Ho(e,t);break}case T.COL:{e.tmplInsertionModeStack[0]=J.IN_COLUMN_GROUP,e.insertionMode=J.IN_COLUMN_GROUP,R1(e,t);break}case T.TR:{e.tmplInsertionModeStack[0]=J.IN_TABLE_BODY,e.insertionMode=J.IN_TABLE_BODY,bf(e,t);break}case T.TD:case T.TH:{e.tmplInsertionModeStack[0]=J.IN_ROW,e.insertionMode=J.IN_ROW,yf(e,t);break}default:e.tmplInsertionModeStack[0]=J.IN_BODY,e.insertionMode=J.IN_BODY,Er(e,t)}}function uQ(e,t){t.tagID===T.TEMPLATE&&Di(e,t)}function q6(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(T.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):O1(e,t)}function cQ(e,t){t.tagID===T.HTML?Er(e,t):vf(e,t)}function H6(e,t){var r;if(t.tagID===T.HTML){if(e.fragmentContext||(e.insertionMode=J.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===T.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else vf(e,t)}function vf(e,t){e.insertionMode=J.IN_BODY,gf(e,t)}function lQ(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.FRAMESET:{e._insertElement(t,xe.HTML);break}case T.FRAME:{e._appendElement(t,xe.HTML),t.ackSelfClosing=!0;break}case T.NOFRAMES:{Bn(e,t);break}default:}}function pQ(e,t){t.tagID===T.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==T.FRAMESET&&(e.insertionMode=J.AFTER_FRAMESET))}function fQ(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.NOFRAMES:{Bn(e,t);break}default:}}function mQ(e,t){t.tagID===T.HTML&&(e.insertionMode=J.AFTER_AFTER_FRAMESET)}function dQ(e,t){t.tagID===T.HTML?Er(e,t):df(e,t)}function df(e,t){e.insertionMode=J.IN_BODY,gf(e,t)}function hQ(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.NOFRAMES:{Bn(e,t);break}default:}}function vQ(e,t){t.chars=Bt,e._insertCharacters(t)}function gQ(e,t){e._insertCharacters(t),e.framesetOk=!1}function z6(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==xe.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function xQ(e,t){if(y6(t))z6(e),e._startTagOutsideForeignContent(t);else{let r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===xe.MATHML?w1(t):n===xe.SVG&&(E6(t),D1(t)),mf(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function bQ(e,t){if(t.tagID===T.P||t.tagID===T.BR){z6(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){let n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===xe.HTML){e._endTagOutsideForeignContent(t);break}let a=e.treeAdapter.getTagName(n);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(r);break}}}var yQ=new Set([le.AREA,le.BASE,le.BASEFONT,le.BGSOUND,le.BR,le.COL,le.EMBED,le.FRAME,le.HR,le.IMG,le.INPUT,le.KEYGEN,le.LINK,le.META,le.PARAM,le.SOURCE,le.TRACK,le.WBR]);function EQ(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===xe.HTML&&yQ.has(t.treeAdapter.getTagName(e))}var AQ={treeAdapter:Kn,scriptingEnabled:!0};function F1(e,t){let r={...AQ,...t};return G6(e,r)}function NQ(e,t){let r="",n=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===le.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===xe.HTML?t.treeAdapter.getTemplateContent(e):e,a=t.treeAdapter.getChildNodes(n);if(a)for(let i of a)r+=G6(i,t);return r}function G6(e,t){return t.treeAdapter.isElementNode(e)?TQ(e,t):t.treeAdapter.isTextNode(e)?DQ(e,t):t.treeAdapter.isCommentNode(e)?SQ(e,t):t.treeAdapter.isDocumentTypeNode(e)?CQ(e,t):""}function TQ(e,t){let r=t.treeAdapter.getTagName(e);return`<${r}${wQ(e,t)}>${EQ(e,t)?"":`${NQ(e,t)}`}`}function wQ(e,{treeAdapter:t}){let r="";for(let n of t.getAttrList(e)){if(r+=" ",!n.namespace)r+=n.name;else switch(n.namespace){case xe.XML:{r+=`xml:${n.name}`;break}case xe.XMLNS:{n.name!=="xmlns"&&(r+="xmlns:"),r+=n.name;break}case xe.XLINK:{r+=`xlink:${n.name}`;break}default:r+=`${n.prefix}:${n.name}`}r+=`="${So(n.value)}"`}return r}function DQ(e,t){let{treeAdapter:r}=t,n=r.getTextNodeContent(e),a=r.getParentNode(e),i=a&&r.isElementNode(a)&&r.getTagName(a);return i&&r.getNamespaceURI(a)===xe.HTML&&N1(i,t.scriptingEnabled)?n:Co(n)}function SQ(e,{treeAdapter:t}){return``}function CQ(e,{treeAdapter:t}){return``}function Y6(e,t){return qo.parse(e,t)}function j6(e,t,r){typeof e=="string"&&(r=t,t=e,e=null);let n=qo.getFragmentParser(e,r);return n.tokenizer.write(t,!0),n.getFragment()}function V6(e){return new $n(e)}function $6(e){let t=e.includes('"')?"'":'"';return t+e+t}function _Q(e,t,r){let n="!DOCTYPE ";return e&&(n+=e),t?n+=` PUBLIC ${$6(t)}`:r&&(n+=" SYSTEM"),r&&(n+=` ${$6(r)}`),n}var Si={isCommentNode:Ai,isElementNode:$e,isTextNode:qr,createDocument(){let e=new rn([]);return e["x-mode"]=uf.DOCUMENT_MODE.NO_QUIRKS,e},createDocumentFragment(){return new rn([])},createElement(e,t,r){let n=Object.create(null),a=Object.create(null),i=Object.create(null);for(let l=0;l_p(o)&&o.name==="!doctype");i?i.data=a??null:(i=new yi("!doctype",a),Si.appendChild(e,i)),i["x-name"]=t??void 0,i["x-publicId"]=r??void 0,i["x-systemId"]=n??void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){let t=e.parent.children.indexOf(e),{prev:r,next:n}=e;e.prev=null,e.next=null,r&&(r.next=n),n&&(n.prev=r),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){let r=e.children[e.children.length-1];r&&qr(r)?r.data+=t:Si.appendChild(e,V6(t))},insertTextBefore(e,t,r){let n=e.children[e.children.indexOf(r)-1];n&&qr(n)?n.data+=t:Si.insertBefore(e,V6(t),r)},adoptAttributes(e,t){for(let r=0;r"u"&&(e.attribs[n]=t[r].value,e["x-attribsNamespace"][n]=t[r].namespace,e["x-attribsPrefix"][n]=t[r].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return _p(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function X6(e,t,r,n){let a={scriptingEnabled:typeof t.scriptingEnabled=="boolean"?t.scriptingEnabled:!0,treeAdapter:Si,sourceCodeLocationInfo:t.sourceCodeLocationInfo};return r?Y6(e,a):j6(n,e,a)}var MQ={treeAdapter:Si};function K6(e){let t="length"in e?e:[e];for(let n=0;n=Ye.Zero&&e<=Ye.Nine}function OQ(e){return e>=Ye.LowerA&&e<=Ye.LowerZ||e>=Ye.UpperA&&e<=Ye.UpperZ}function RQ(e){return e>=Ye.UpperA&&e<=Ye.UpperF||e>=Ye.LowerA&&e<=Ye.LowerF}var Ln;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Ln||(Ln={}));var Yr={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},zo=class{constructor({xmlMode:t=!1,decodeEntities:r=!0},n){this.cbs=n,this.state=we.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=we.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=t,this.decodeEntities=r,this.entityTrie=t?Mp:vn}reset(){this.state=we.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=we.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=we.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===Ye.Amp&&(this.state=we.BeforeEntity)}stateSpecialStartSequence(t){let r=this.sequenceIndex===this.currentSequence.length;if(!(r?Ef(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!r){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=we.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===Ye.Gt||ha(t)){let r=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&t!==Ye.Semi)this.trieIndex+=n;else{let a=this.index-this.entityExcess+1;a>this.sectionStart&&this.emitPartial(this.sectionStart,a),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,n===0&&this.emitNamedEntity()}}}emitNamedEntity(){if(this.state=this.baseState,this.entityResult===0)return;switch((this.entityTrie[this.entityResult]&Cr.VALUE_LENGTH)>>14){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~Cr.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(t){(t|32)===Ye.LowerX?(this.entityExcess++,this.state=we.InHexEntity):(this.state=we.InNumericEntity,this.stateInNumericEntity(t))}emitNumericEntity(t){let r=this.index-this.entityExcess-1;r+2+ +(this.state===we.InHexEntity)!==this.index&&(r>this.sectionStart&&this.emitPartial(this.sectionStart,r),this.sectionStart=this.index+Number(t),this.emitCodePoint(fu(this.entityResult))),this.state=this.baseState}stateInNumericEntity(t){t===Ye.Semi?this.emitNumericEntity(!0):W6(t)?(this.entityResult=this.entityResult*10+(t-Ye.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(t){t===Ye.Semi?this.emitNumericEntity(!0):W6(t)?(this.entityResult=this.entityResult*16+(t-Ye.Zero),this.entityExcess++):RQ(t)?(this.entityResult=this.entityResult*16+((t|32)-Ye.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===we.Text||this.baseState===we.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===we.Text||this.state===we.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===we.InAttributeValueDq||this.state===we.InAttributeValueSq||this.state===we.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index0&&o.has(this.stack[this.stack.length-1]);){let l=this.stack.pop();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,l,!0)}this.isVoidElement(t)||(this.stack.push(t),e4.has(t)?this.foreignContext.push(!0):t4.has(t)&&this.foreignContext.push(!1)),(i=(a=this.cbs).onopentagname)===null||i===void 0||i.call(a,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,r){var n,a,i,o,l,u;this.endIndex=r;let s=this.getSlice(t,r);if(this.lowerCaseTagNames&&(s=s.toLowerCase()),(e4.has(s)||t4.has(s))&&this.foreignContext.pop(),this.isVoidElement(s))!this.options.xmlMode&&s==="br"&&((a=(n=this.cbs).onopentagname)===null||a===void 0||a.call(n,"br"),(o=(i=this.cbs).onopentag)===null||o===void 0||o.call(i,"br",{},!0),(u=(l=this.cbs).onclosetag)===null||u===void 0||u.call(l,"br",!1));else{let c=this.stack.lastIndexOf(s);if(c!==-1)if(this.cbs.onclosetag){let p=this.stack.length-c;for(;p--;)this.cbs.onclosetag(this.stack.pop(),p!==0)}else this.stack.length=c;else!this.options.xmlMode&&s==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1}onselfclosingtag(t){this.endIndex=t,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var r,n;let a=this.tagname;this.endOpenTag(t),this.stack[this.stack.length-1]===a&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,a,!t),this.stack.pop())}onattribname(t,r){this.startIndex=t;let n=this.getSlice(t,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(t,r){this.attribvalue+=this.getSlice(t,r)}onattribentity(t){this.attribvalue+=Do(t)}onattribend(t,r){var n,a;this.endIndex=r,(a=(n=this.cbs).onattribute)===null||a===void 0||a.call(n,this.attribname,this.attribvalue,t===Ln.Double?'"':t===Ln.Single?"'":t===Ln.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){let r=t.search(BQ),n=r<0?t:t.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(t,r){this.endIndex=r;let n=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let a=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${a}`,`!${n}`)}this.startIndex=r+1}onprocessinginstruction(t,r){this.endIndex=r;let n=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let a=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${a}`,`?${n}`)}this.startIndex=r+1}oncomment(t,r,n){var a,i,o,l;this.endIndex=r,(i=(a=this.cbs).oncomment)===null||i===void 0||i.call(a,this.getSlice(t,r-n)),(l=(o=this.cbs).oncommentend)===null||l===void 0||l.call(o),this.startIndex=r+1}oncdata(t,r,n){var a,i,o,l,u,s,c,p,f,m;this.endIndex=r;let h=this.getSlice(t,r-n);this.options.xmlMode||this.options.recognizeCDATA?((i=(a=this.cbs).oncdatastart)===null||i===void 0||i.call(a),(l=(o=this.cbs).ontext)===null||l===void 0||l.call(o,h),(s=(u=this.cbs).oncdataend)===null||s===void 0||s.call(u)):((p=(c=this.cbs).oncomment)===null||p===void 0||p.call(c,`[CDATA[${h}]]`),(m=(f=this.cbs).oncommentend)===null||m===void 0||m.call(f)),this.startIndex=r+1}onend(){var t,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(r=(t=this.cbs).onend)===null||r===void 0||r.call(t)}reset(){var t,r,n,a;(r=(t=this.cbs).onreset)===null||r===void 0||r.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(n=this.cbs).onparserinit)===null||a===void 0||a.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,r){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(t-this.bufferOffset,r-this.bufferOffset);for(;r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndext.xmlMode||t._useHtmlParser2?r4(e,t):X6(e,t,r,n)),PQ=r6(LQ,(e,t)=>t.xmlMode||t._useHtmlParser2?Fp(e,t):K6(e)),dr=PQ([]),{contains:Sqe}=Ha,{merge:Cqe}=Ha,{parseHTML:_qe}=Ha,{root:Mqe}=Ha;var Lqe=new n4.XMLParser,UQ={\u963F\u8054\u914B\u8FEA\u62C9\u59C6:"AED",\u6FB3\u5927\u5229\u4E9A\u5143:"AUD",\u5DF4\u897F\u91CC\u4E9A\u5C14:"BRL",\u52A0\u62FF\u5927\u5143:"CAD",\u745E\u58EB\u6CD5\u90CE:"CHF",\u4E39\u9EA6\u514B\u6717:"DKK",\u6B27\u5143:"EUR",\u82F1\u9551:"GBP",\u6E2F\u5E01:"HKD",\u5370\u5C3C\u5362\u6BD4:"IDR",\u5370\u5EA6\u5362\u6BD4:"INR",\u65E5\u5143:"JPY",\u97E9\u56FD\u5143:"KRW",\u6FB3\u95E8\u5143:"MOP",\u6797\u5409\u7279:"MYR",\u632A\u5A01\u514B\u6717:"NOK",\u65B0\u897F\u5170\u5143:"NZD",\u83F2\u5F8B\u5BBE\u6BD4\u7D22:"PHP",\u5362\u5E03:"RUB",\u6C99\u7279\u91CC\u4E9A\u5C14:"SAR",\u745E\u5178\u514B\u6717:"SEK",\u65B0\u52A0\u5761\u5143:"SGD",\u6CF0\u56FD\u94E2:"THB",\u571F\u8033\u5176\u91CC\u62C9:"TRY",\u65B0\u53F0\u5E01:"TWD",\u7F8E\u5143:"USD",\u5357\u975E\u5170\u7279:"ZAR"};var kQ=async()=>(await Promise.all(["index.html","index_1.html","index_2.html","index_3.html","index_4.html","index_5.html","index_6.html","index_7.html","index_8.html","index_9.html"].map(async t=>{let r=await Ze.get(`https://www.boc.cn/sourcedb/whpj/${t}`,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),n=dr.load(r.data);return Array.from(new Set(n("div.publish table tbody tr").slice(2).toArray().map(a=>{let i=n(a),o=i.find("td:nth-child(1)").text(),l=UQ[o]||"",u=i.find("td:nth-child(7)").text(),s=i.find("td:nth-child(2)").text(),c=i.find("td:nth-child(3)").text(),p=i.find("td:nth-child(4)").text(),f=i.find("td:nth-child(5)").text(),m={currency:{from:l,to:"CNY"},rate:{buy:{},sell:{},middle:parseFloat(i.find("td:nth-child(6)").text())},updated:new Date(u+" UTC+8"),unit:100};return s&&(m.rate.buy.remit=parseFloat(s)),c&&(m.rate.buy.cash=parseFloat(c)),p&&(m.rate.sell.remit=parseFloat(p)),f&&(m.rate.sell.cash=parseFloat(f)),m}))).sort()}))).flat().sort(),a4=kQ;var i4={"\u4EBA\u6C11\u5E63(\u5728\u5CB8)":"CNY",\u4EBA\u6C11\u5E63:"CNY","\u4EBA\u6C11\u5E63(\u96E2\u5CB8)":"CNH",\u7F8E\u5143:"USD",\u82F1\u938A:"GBP",\u65E5\u5713:"JPY",\u6FB3\u5143:"AUD",\u7D10\u5143:"NZD",\u52A0\u5143:"CAD",\u6B50\u7F85:"EUR",\u745E\u58EB\u6CD5\u90CE:"CHF",\u4E39\u9EA5\u514B\u90CE:"DKK",\u632A\u5A01\u514B\u90CE:"NOK",\u745E\u5178\u514B\u90CE:"SEK",\u65B0\u52A0\u5761\u5143:"SGD",\u6CF0\u570B\u9296:"THB",\u6587\u840A\u5143:"BND",\u5357\u975E\u862D\u7279:"ZAR",\u5370\u5C3C\u76FE:"IDR",\u7D10\u897F\u862D\u5143:"NZD",\u52A0\u62FF\u5927\u5143:"CAD",\u5370\u5EA6\u76E7\u6BD4:"INR",\u97D3\u570B\u571C:"KRW",\u6FB3\u9580\u5143:"MOP",\u83F2\u5F8B\u8CD3\u5F7C\u7D22:"PHP",\u4FC4\u7F85\u65AF\u76E7\u5E03:"RUB",\u65B0\u53F0\u5E63:"TWD"},o4=async e=>{let t={},r=await Ze.get(e,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),n=dr.load(r.data),a=new Date(n(n("div.form_area table tbody tr").toArray().at(-2)).text().trim().split("\uFF1A")[1].replaceAll(` -`,"").replaceAll(" ","")+" UTC+8");return Array.from(new Set(n("div.form_area table tbody tr").slice(2).slice(0,-2).toArray().map(i=>{let o=n(i),l=o.find("td:nth-child(1)").text().trim();i4[l]||console.error("Unknown currency:",l);let u=i4[l]||"unknown",s=o.find("td:nth-child(2)").text().trim(),c=o.find("td:nth-child(3)").text().trim();t[u]={buy:parseFloat(s),sell:parseFloat(c),updatedDate:a}}))),t},qQ=()=>o4("https://www.bochk.com/whk/rates/exchangeRatesHKD/exchangeRatesHKD-input.action?lang=hk"),HQ=()=>o4("https://www.bochk.com/whk/rates/exchangeRatesForCurrency/exchangeRatesForCurrency-input.action?lang=hk"),zQ=async()=>{let e=await Promise.all([HQ(),qQ()]);return Array.from(new Set(e.map(r=>Object.keys(r)).flat())).map(r=>{let n=e[0][r],a=e[1][r],i=new Date;n&&(i=n.updatedDate),a&&(i=a.updatedDate),n&&a&&(i=n.updatedDate>a.updatedDate?n.updatedDate:a.updatedDate);let o={currency:{from:r,to:"HKD"},updated:i,rate:{buy:{},sell:{}},unit:1};return n&&(o.rate.buy.cash=n.buy,o.rate.sell.cash=n.sell),a&&(o.rate.buy.remit=a.buy,o.rate.sell.remit=a.sell),o}).sort()},s4=zQ;var GQ=async()=>{let t=(await Ze.get("http://papi.icbc.com.cn/exchanges/ns/getLatest",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data,r=[];if(t.code!=0)throw new Error("Get ICBC FX Rates failed.");return t.data.forEach(n=>{r.push({currency:{from:n.currencyENName,to:"CNY"},rate:{buy:{remit:n.foreignBuy,cash:n.cashBuy},sell:{remit:n.foreignSell,cash:n.cashSell},middle:n.reference},unit:100,updated:new Date(`${n.publishDate} ${n.publishTime} UTC+8`)})}),r.sort()},u4=GQ;var p4=Le(require("crypto"),1),f4=Le(require("https"),1);var c4={httpsAgent:new f4.default.Agent({secureOptions:p4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},m4=async()=>{let e=await Ze.get("https://personalbank.cib.com.cn/pers/main/pubinfo/ifxQuotationQuery.do",{...c4,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=await Ze.get(`https://personalbank.cib.com.cn/pers/main/pubinfo/ifxQuotationQuery/list?_search=false&dataSet.nd=${Date.now()}&dataSet.rows=80&dataSet.page=1&dataSet.sidx=&dataSet.sord=asc`,{...c4,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest",Cookie:e.headers["set-cookie"].map(i=>i.split(";")[0]).join("; ")}}),r=[];if(t.status!=200||e.status!=200)throw new Error("Get CIB FX Rates failed.");let n=dr.load(e.data),a=new Date(n(n(".labe_text")[0]).text().replaceAll(` - `,"").replaceAll(" ","").replaceAll("\u65E5\u671F\uFF1A ","").replaceAll("\u5E74","-").replaceAll("\u6708","-").replaceAll("\u65E5","").split(" ").filter((i,o)=>o!=1).join(" ")+" UTC+8");return t.data.rows.forEach(i=>{i=i.cell;let o={currency:{from:i[1],to:"CNY"},unit:parseFloat(i[2]),updated:a,rate:{buy:{remit:parseFloat(i[3]),cash:parseFloat(i[5])},sell:{remit:parseFloat(i[4]),cash:parseFloat(i[6])},middle:void 0}};o.rate.middle=(o.rate.buy.remit+o.rate.sell.remit+o.rate.buy.cash+o.rate.sell.cash)/4,r.push(o)}),r};function l4(e,t){let r=uo(bx(jn(e),jn(t)),2),n=xx(jn(e),r);return ip(xx(e,uo(n,2)),2)}var d4=async()=>(await m4()).map(t=>{let r=JSON.parse(JSON.stringify(t.rate));return t.rate.buy.remit=l4(r.buy.remit,r.sell.remit),t.rate.sell.remit=l4(r.sell.remit,r.buy.remit),t.rate.buy.cash=wM(r.buy.cash,t.rate.buy.remit),t.rate.sell.cash=TM(r.sell.cash,t.rate.sell.remit),t.rate.middle=uo(bx(t.rate.buy.remit,t.rate.sell.remit,t.rate.buy.cash,t.rate.sell.cash),4),t}).sort(),h4=m4;var v4=Le(Ib(),1);var YQ=new v4.XMLParser,jQ={840:{name:"USD"},978:{name:"EUR"},826:{name:"GBP"},392:{name:"JPY"},344:{name:"HKD"},36:{name:"AUD"},124:{name:"CAD"},756:{name:"CHF"},702:{name:"SGD"},208:{name:"DKK"},578:{name:"NOK"},752:{name:"SEK"},410:{name:"KRW"},554:{name:"NZD"},446:{name:"MOP"},710:{name:"ZAR"},764:{name:"THB"},458:{name:"MYR"},643:{name:"RUB"},398:{name:"KZT"}},VQ=async()=>{let e=await Ze.get("http://www.ccb.com/cn/home/news/jshckpj_new.xml",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}});return YQ.parse(e.data).ReferencePriceSettlements.ReferencePriceSettlement.map(n=>({currency:{from:jQ[n.Ofrd_Ccy_CcyCd].name,to:"CNY"},rate:{buy:{cash:n.BidRateOfCash,remit:n.BidRateOfCcy},sell:{cash:n.OfrRateOfCash,remit:n.OfrRateOfCcy},middle:n.Mdl_ExRt_Prc},unit:1,updated:new Date(((a,i)=>{let o=a.toString().split(""),l=i.toString().padStart(6,"0").split("");return o.splice(4,0,"-"),o.splice(7,0,"-"),l.splice(2,0,":"),l.splice(5,0,":"),`${o.join("")} ${l.join("")} UTC+8`})(n.LstPr_Dt,n.LstPr_Tm))})).sort()},g4=VQ;var x4=Le(require("crypto"),1),b4=Le(require("https"),1),$Q={httpsAgent:new b4.default.Agent({secureOptions:x4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},XQ={14:{name:"USD"},13:{name:"HKD"},38:{name:"EUR"},27:{name:"JPY"},12:{name:"GBP"},29:{name:"AUD"},28:{name:"CAD"},15:{name:"CHF"},88:{name:"KRW"},81:{name:"MOP"},18:{name:"SGD"},84:{name:"THB"},22:{name:"DKK"},23:{name:"NOK"},21:{name:"SEK"},79:{name:"TJS"},64:{name:"VND"},68:{name:"KZT"},70:{name:"RUB"},71:{name:"ZAR"},73:{name:"MNT"},74:{name:"LAK"},78:{name:"AED"},87:{name:"NZD"}},KQ=async()=>(await Ze.get("https://ewealth.abchina.com/app/data/api/DataService/ExchangeRateV2",{...$Q,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.Data.Table.map(r=>({currency:{from:XQ[r.CurrId].name,to:"CNY"},rate:{buy:{remit:parseFloat(r.BuyingPrice),cash:parseFloat(r.CashBuyingPrice)},sell:{remit:parseFloat(r.SellPrice),cash:parseFloat(r.SellPrice)},middle:parseFloat(r.BenchMarkPrice)},updated:new Date(r.PublishTime),unit:100})).sort(),y4=KQ;var E4=Le(require("crypto"),1),A4=Le(require("https"),1);var WQ={httpsAgent:new A4.default.Agent({secureOptions:E4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},QQ=async()=>{let t=(await Ze.get("http://www.bankcomm.com/SITE/queryExchangeResult.do",{...WQ,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.RSP_BODY.fileContent,r=dr.load(''+t+"
"),n=new Date(r('td[align="left"]').text().split("\uFF1A")[1]+" UTC+8");return r("tr.data").toArray().map(a=>{let i={currency:{from:r(r(a).children()[0]).text().split("(")[1].split("/")[0],to:"CNY"},rate:{buy:{},sell:{}},unit:parseInt(r(r(a).children()[1]).text()),updated:n};return r(r(a).children()[2]).text()!=="-"&&(i.rate.buy.remit=parseFloat(r(r(a).children()[2]).text())),r(r(a).children()[3]).text()!=="-"&&(i.rate.sell.remit=parseFloat(r(r(a).children()[3]).text())),r(r(a).children()[4]).text()!=="-"&&(i.rate.buy.cash=parseFloat(r(r(a).children()[4]).text())),r(r(a).children()[5]).text()!=="-"&&(i.rate.sell.cash=parseFloat(r(r(a).children()[5]).text())),i}).sort()},N4=QQ;function ku(e){let t=e.substring(0,4),r=e.substring(4,6),n=e.substring(6,8),a=e.substring(8,10),i=e.substring(10,12),o=e.substring(12,14);return new Date(`${t}/${r}/${n} ${a}:${i}:${o} UTC+8`)}var ZQ=async()=>{let t=(await Ze.post("https://ibs.ncbchina.cn/NCB/mForeignExchangePriceQuery",{ccyPair:"",bsnsTp:"1"},{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.mktQtnInfoArrList,r=[];return t.forEach(n=>{if(n.bsnsTp!=="SETFORE_EX")return;let a=n.ccyPair.split("/").filter(i=>i!="CNY")[0];r.push({currency:{from:a,to:"CNY"},rate:{sell:{remit:n.cstExgBuyPrc,cash:n.cstCashBuyPrc},buy:{remit:n.cstExgSellPrc,cash:n.cstCashSellPrc},middle:n.cstExgMdlPrc},unit:a==="JPY"?100:1,updated:ku(`${n.mktQtnDt}${n.mktQtnTm.padStart(6,"0")}`)})}),r},T4=ZQ;var w4=Le(require("https"),1),D4=Le(require("crypto"),1),JQ={httpsAgent:new w4.default.Agent({rejectUnauthorized:!1,secureOptions:D4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},eZ=async()=>{let e=await Ze.get("https://s.psbc.com/portal/PsbcService/foreignexchange/curr",{...JQ,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}});return JSON.parse(e.data.replaceAll("empty(","").replaceAll(")","")).resultList.filter(n=>n.flag==2).map(n=>({currency:{from:n.cur,to:"CNY"},rate:{buy:{remit:n.fe_buy_prc,cash:n.fc_buy_prc},sell:{remit:n.fe_sell_prc,cash:n.fe_sell_prc},middle:n.mid_prc},unit:100,updated:ku(`${n.effect_date}${n.effect_time}`)})).sort()},S4=eZ;var tZ=async()=>(await Ze.get("https://fx.cmbchina.com/api/v1/fx/rate",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.body.map(r=>({currency:{from:r.ccyNbrEng.split(" ")[1],to:"CNY"},rate:{buy:{remit:r.rthBid,cash:r.rtcBid},sell:{remit:r.rthOfr,cash:r.rtcOfr},middle:r.rtbBid},unit:100,updated:new Date(`${r.ratDat.replaceAll("\u5E74","-").replaceAll("\u6708","-").replaceAll("\u65E5","")} ${r.ratTim} UTC+8`)})).sort(),C4=tZ;var I1={\u7F8E\u5143:"USD",\u6B27\u5143:"EUR",\u65E5\u5143:"JPY",\u6E2F\u5143:"HKD",\u82F1\u9551:"GBP",\u6FB3\u5143:"AUD",\u65B0\u897F\u5170\u5143:"NZD",\u65B0\u52A0\u5761\u5143:"SGD",\u745E\u58EB\u6CD5\u90CE:"CHF",\u52A0\u5143:"CAD",\u6FB3\u95E8\u5143:"MOP",\u6797\u5409\u7279:"MYR",\u5362\u5E03:"RUB",\u5170\u7279:"ZAR",\u97E9\u5143:"KRW",\u8FEA\u62C9\u59C6:"AED",\u91CC\u4E9A\u5C14:"SAR",\u798F\u6797:"HUF",\u5179\u7F57\u63D0:"PLN",\u4E39\u9EA6\u514B\u6717:"DKK",\u745E\u5178\u514B\u6717:"SEK",\u632A\u5A01\u514B\u6717:"NOK",\u91CC\u62C9:"TRY",\u6BD4\u7D22:"MXN",\u6CF0\u94E2:"THB"},rZ=["MOP","MYR","RUB","ZAR","KRW","AED","SAR","HUF","PLN","DKK","SEK","NOK","TRY","MXN","THB"],nZ=async()=>{let e=await Ze.get("http://www.safe.gov.cn/AppStructured/hlw/RMBQuery.do",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=dr.load(e.data),r=t("table#InfoTable").children()[0];return r.children.slice(1).map(n=>{let a=t(n),i=new Date(t(a.children()[0]).text()+" 00:00 UTC+8");return a.children().slice(1).toArray().map((o,l)=>{let u={currency:{from:"unknown",to:"unknown"},rate:{middle:parseFloat(t(o).text())},updated:i,unit:100},s=t(t(r.children[0]).children()[l+1]).text().trim();return rZ.includes(I1[s])?u.currency={from:"CNY",to:I1[s]}:u.currency={from:I1[s],to:"CNY"},u})}).flat().sort()},_4=nZ;var aZ=co(qs,{number:"Fraction"}),iZ=async()=>{let e=parseInt(new Date().toISOString().split("T")[0].replaceAll("-","")),t=await Ze.get(`https://www.unionpayintl.com/upload/jfimg/${e}.json`,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}).catch(()=>({status:404}));for(;t.status!==200;)e-=1,console.log(e+1,"UnionPay FXRate not found, trying",e),t=await Ze.get(`https://www.unionpayintl.com/upload/jfimg/${e}.json`,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}});let r=t.data,n=new Date(`${r.curDate} 16:30 UTC+8`),a={};r.exchangeRateJson.forEach(o=>{let l=o.transCur,u=o.baseCur,s=!1;a[o.transCur]||a[o.baseCur]&&(l=o.baseCur,u=o.transCur,s=!0),a[l]||(a[l]={}),a[l][u]||(a[l][u]={forward:void 0,reverse:void 0}),s?a[l][u].reverse=aZ.divide(1,o.rateData):a[l][u].forward=o.rateData});let i=[];return Object.keys(a).forEach(o=>{Object.keys(a[o]).forEach(l=>{let u={currency:{from:o,to:l},rate:{},updated:n,unit:1};a[o][l].forward&&(u.rate.sell={remit:a[o][l].forward,cash:a[o][l].forward}),a[o][l].reverse&&(u.rate.buy={remit:a[o][l].reverse,cash:a[o][l].reverse}),i.push(u)})}),i.sort()},M4=iZ;var oZ=async()=>{let e=await Ze.get("https://www.jcb.jp/rate/jpy.html",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=dr.load(e.data),r=new Date(t(t(".rate2TableArea>p")[0]).text().replaceAll("\u63DB\u7B97\u65E5\u306E\u57FA\u6E96\u30EC\u30FC\u30C8","").replaceAll("\u65E5","").replaceAll("\u6708","-").replaceAll("\u5E74","-")+" UTC+9");return t(".rate2TableArea>table>tbody>tr").toArray().map(n=>{let a=t(n),i=a.find("td:nth-child(1)").text(),o=a.find("td:nth-child(4)").text();return{currency:{from:i,to:"JPY"},rate:{middle:parseFloat(o)},unit:1,updated:r}}).sort()},sZ=async()=>(await Promise.all([oZ()])).flat(1),O4=sZ;var uZ=(e=!1,t=!0,r)=>{let n="https://api.wise.com/v1/rates";return e&&(n="https://api.sandbox.transferwise.tech/v1/rates"),async a=>{console.log(e,t,r),a&&e?a.log("Getting Wise FX Rates in sandbox mode."):a&&a.log("Getting Wise FX Rates in production mode.");let i=await Ze.get(n,{headers:{Authorization:t?"Basic OGNhN2FlMjUtOTNjNS00MmFlLThhYjQtMzlkZTFlOTQzZDEwOjliN2UzNmZkLWRjYjgtNDEwZS1hYzc3LTQ5NGRmYmEyZGJjZA==":`Bearer ${r}`}}),o=[],l=i.data;for(let u of l)u.source=u.source==="CNY"?"CNH":u.source,u.target=u.target==="CNY"?"CNH":u.target,o.push({currency:{from:u.source,to:u.target},rate:{middle:parseFloat(u.rate)},unit:1,updated:new Date(u.time)});return o.sort()}},R4=uZ;var cZ=async()=>{let r=(await Ze.get("https://rbwm-api.hsbc.com.hk/digital-pws-tools-investments-eapi-prod-proxy/v1/investments/exchange-rate?locale=en_HK",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.detailRates.map(n=>{let a={currency:{from:n.ccy,to:"HKD"},rate:{buy:{},sell:{}},updated:new Date(n.lastUpdateDate),unit:1};return n.ttBuyRt&&(a.rate.buy.remit=parseFloat(n.ttBuyRt)),n.bankBuyRt&&(a.rate.buy.cash=parseFloat(n.bankBuyRt)),n.ttSelRt&&(a.rate.sell.remit=parseFloat(n.ttSelRt)),n.bankSellRt&&(a.rate.sell.cash=parseFloat(n.bankSellRt)),a});return r.push((n=>{let a=n.find(i=>i.currency.from==="CNY");return a.currency.from="CNH",a})(r)),r},F4=cZ;var lZ=async()=>(await Ze.get("https://www.services.cn-banking.hsbc.com.cn/mobile/channel/digital-proxy/cnyTransfer/ratesInfo/remittanceRate?locale=en_CN",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest","Content-Type":"application/json"}})).data.data.counterForRepeatingBlock.map(r=>({currency:{from:"CNY",to:r.exchangeRateCurrency},rate:{buy:{cash:parseFloat(r.notesSellingRate),remit:parseFloat(r.transferSellingRate)},sell:{cash:parseFloat(r.notesBuyingRate),remit:parseFloat(r.transferBuyingRate)}},unit:1,updated:new Date})),I4=lZ;var pZ=async()=>{let e=await Ze.get("https://mkdlc.ebanking.hsbc.com.hk/hsbcfxwidget/data/getFXList?callback=JSON.stringify&token=0vg8cORxRLBsrWg9C9UboMT%2BkN2Ykze6vFnRV1nA8DE%3D",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=JSON.parse([eval][0](e.data)).data,r=new Date(e.headers.date),n=t.fxList.map(a=>({currency:{from:"AUD",to:a.curr_s},rate:{sell:{cash:a.buy,remit:a.buy},buy:{cash:a.sell,remit:a.sell}},unit:1,updated:r}));return n.push((a=>{let i=a.find(o=>o.currency.to==="CNY");return i.currency.to="CNH",i})(n)),n},B4=pZ;var L4={"027001":"JPY","012001":"GBP","023001":"NOK","051001":"EUR","014001":"USD","028001":"CAD","032001":"MYR","038001":"THB","081001":"MOP","018001":"SGD","065001":"SAR","021001":"SEK","015001":"CHF","062001":"NZD","029001":"AUD","022001":"DKK","031001":"KZT","013001":"HKD"},fZ=async()=>{let e=await Ze.get("https://etrade.citicbank.com/portalweb/cms/getForeignExchRate.htm?callback=JSON.stringify",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=JSON.parse([eval][0](e.data)).content.resultList,r=[];return t.forEach(n=>{Object.keys(L4).includes(n.curCode)&&r.push({currency:{from:L4[n.curCode],to:"CNY"},rate:{buy:{remit:parseFloat(n.cstexcBuyPrice),cash:parseFloat(n.cstexcBuyPrice)},sell:{cash:parseFloat(n.cstexcSellPrice),remit:parseFloat(n.cstexcSellPrice)},middle:parseFloat(n.midPrice)},unit:100,updated:new Date(`${n.quotePriceDate.replace("\u5E74","-").replace("\u6708","-").replace("\u65E5","")} ${n.quotePriceTime} UTC+8`)})}),r.sort()},P4=fZ;var mZ=async()=>{let e=await Ze.get("https://www.spdb.com.cn/was5/web/search?channelid=256931",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=dr.load(e.data),r=new Date(t(".fine_title > p").text()+" UTC+8");return t(".table04 > tbody > tr").toArray().map(n=>{let a=t(t(n).children()[0]).text().split(" ")[1].replace(` -`,"");return{currency:{from:a,to:"CNY"},rate:{buy:{cash:parseFloat(t(t(n).children()[3]).text()),remit:parseFloat(t(t(n).children()[2]).text())},sell:{cash:parseFloat(t(t(n).children()[4]).text()),remit:parseFloat(t(t(n).children()[4]).text())},middle:parseFloat(t(t(n).children()[1]).text())},unit:a=="JPY"?1e5:100,updated:r}}).sort()},U4=mZ;var k4=Le(require("crypto"),1),q4=Le(require("https"),1),dZ={httpsAgent:new q4.default.Agent({secureOptions:k4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},hZ=async()=>{let t=(await Ze.post("https://ifsp.xib.com.cn/ifsptsi/api/ITSI125005",{ccyPairCode:"",transactionType:"0",header:{appId:"XEIP",locale:"zh_CN",termType:"",termNo:"",termMac:"",appVersion:""}},{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"},...dZ})).data.rateList,r=[];return t.forEach(n=>{r.push({currency:{from:n.currency,to:"CNY"},rate:{buy:{remit:n.currencyBuyPrice,cash:n.cashBuyPrice},sell:{remit:n.currencySellPrice,cash:n.cashSellPrice}},unit:100,updated:ku(`${n.updateDate}${n.updateTime}`)})}),r},H4=hZ;var vZ=async()=>(await Ze.get("https://bank.pingan.com.cn/rmb/account/cmp/cust/acct/forex/exchange/qryFoexPriceExchangeList.do?pageIndex=1&pageSize=100&realFlag=1¤cyCode=&exchangeDate=&languageCode=zh_CN&access_source=PC",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.data.exchangeList.map(r=>({currency:{from:r.currType,to:"CNY"},rate:{buy:{cash:r.cashBuyPrice,remit:r.buyPrice},sell:{cash:r.sellPrice,remit:r.sellPrice},middle:r.basePrice},unit:100,updated:new Date(r.insertTime+" GMT+0800")})).sort(),z4=vZ;var G4=Le(require("crypto"),1),Y4=Le(require("https"),1),gZ={httpsAgent:new Y4.default.Agent({secureOptions:G4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},xZ={"\u7F8E\u5143(USD)":"USD","\u82F1\u9551(GBP)":"GBP","\u6E2F\u5E01(HKD)":"HKD","\u745E\u58EB\u6CD5\u90CE(CHF)":"CHF",\u745E\u5178\u514B\u6717:"SEK",\u4E39\u9EA6\u514B\u6717:"DKK",\u632A\u5A01\u514B\u6717:"NOK","\u65E5\u5143(JPY)":"JPY","\u52A0\u62FF\u5927\u5143(CAD)":"CAD","\u6FB3\u5927\u5229\u4E9A\u5143(AUD)":"AUD","\u65B0\u52A0\u5761\u5143(SGD)":"SGD","\u6B27\u5143(EUR)":"EUR","\u6FB3\u95E8\u5143(MOP)":"MOP","\u6CF0\u56FD\u94E2(THB)":"THB",\u65B0\u53F0\u5E01:"TWD","\u65B0\u897F\u5170\u5143(NZD)":"NZD",\u97E9\u5143:"KRW"},bZ=async()=>{let e=await Ze.get("https://www.cebbank.com/eportal/ui?pageId=477257",{...gZ,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=dr.load(e.data);return t(".lczj_box tbody tr").map((n,a)=>{if(n<2)return null;let i=dr.load(a,{decodeEntities:!1});return{currency:{from:xZ[i("td:nth-child(1)").text()],to:"CNY"},rate:{sell:{remit:parseFloat(i("td:nth-child(2)").text()),cash:parseFloat(i("td:nth-child(3)").text())},buy:{remit:parseFloat(i("td:nth-child(4)").text()),cash:parseFloat(i("td:nth-child(5)").text())}},unit:100,updated:new Date(t("#t_id span").text().substring(5)+" UTC+8")}}).get().filter(n=>n!==null).sort()},j4=bZ;var P1=Le(require("sync-request"),1);var Yo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,$4=new Set,B1=typeof process=="object"&&process?process:{},X4=(e,t,r,n)=>{typeof B1.emitWarning=="function"?B1.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},Af=globalThis.AbortController,V4=globalThis.AbortSignal;if(typeof Af>"u"){V4=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,a){this._onabort.push(a)}},Af=class{constructor(){t()}signal=new V4;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let a of this.signal._onabort)a(n);this.signal.onabort?.(n)}}};let e=B1.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{e&&(e=!1,X4("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var yZ=e=>!$4.has(e),YHe=Symbol("type"),Xa=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),K4=e=>Xa(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?jo:null:null,jo=class extends Array{constructor(t){super(t),this.fill(0)}},L1=class e{heap;length;static#u=!1;static create(t){let r=K4(t);if(!r)return[];e.#u=!0;let n=new e(t,r);return e.#u=!1,n}constructor(t,r){if(!e.#u)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},Vo=class e{#u;#p;#h;#v;#M;#O;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#g;#n;#r;#e;#c;#f;#s;#i;#x;#o;#b;#y;#m;#E;#D;#l;static unsafeExposeInternals(t){return{starts:t.#y,ttls:t.#m,sizes:t.#b,keyMap:t.#n,keyList:t.#r,valList:t.#e,next:t.#c,prev:t.#f,get head(){return t.#s},get tail(){return t.#i},free:t.#x,isBackgroundFetch:r=>t.#t(r),backgroundFetch:(r,n,a,i)=>t.#I(r,n,a,i),moveToTail:r=>t.#_(r),indexes:r=>t.#A(r),rindexes:r=>t.#N(r),isStale:r=>t.#d(r)}}get max(){return this.#u}get maxSize(){return this.#p}get calculatedSize(){return this.#g}get size(){return this.#a}get fetchMethod(){return this.#M}get memoMethod(){return this.#O}get dispose(){return this.#h}get disposeAfter(){return this.#v}constructor(t){let{max:r=0,ttl:n,ttlResolution:a=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:u,dispose:s,disposeAfter:c,noDisposeOnSet:p,noUpdateTTL:f,maxSize:m=0,maxEntrySize:h=0,sizeCalculation:d,fetchMethod:v,memoMethod:x,noDeleteOnFetchRejection:N,noDeleteOnStaleGet:g,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:E,ignoreFetchAbort:b}=t;if(r!==0&&!Xa(r))throw new TypeError("max option must be a nonnegative integer");let S=r?K4(r):Array;if(!S)throw new Error("invalid max value: "+r);if(this.#u=r,this.#p=m,this.maxEntrySize=h||this.#p,this.sizeCalculation=d,this.sizeCalculation){if(!this.#p&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(x!==void 0&&typeof x!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#O=x,v!==void 0&&typeof v!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=v,this.#D=!!v,this.#n=new Map,this.#r=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#c=new S(r),this.#f=new S(r),this.#s=0,this.#i=0,this.#x=L1.create(r),this.#a=0,this.#g=0,typeof s=="function"&&(this.#h=s),typeof c=="function"?(this.#v=c,this.#o=[]):(this.#v=void 0,this.#o=void 0),this.#E=!!this.#h,this.#l=!!this.#v,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!N,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!b,this.maxEntrySize!==0){if(this.#p!==0&&!Xa(this.#p))throw new TypeError("maxSize must be a positive integer if specified");if(!Xa(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!g,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=Xa(a)||a===0?a:1,this.ttlAutopurge=!!i,this.ttl=n||0,this.ttl){if(!Xa(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#B()}if(this.#u===0&&this.ttl===0&&this.#p===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#u&&!this.#p){let A="LRU_CACHE_UNBOUNDED";yZ(A)&&($4.add(A),X4("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",A,e))}}getRemainingTTL(t){return this.#n.has(t)?1/0:0}#B(){let t=new jo(this.#u),r=new jo(this.#u);this.#m=t,this.#y=r,this.#L=(i,o,l=Yo.now())=>{if(r[i]=o!==0?l:0,t[i]=o,o!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#d(i)&&this.#T(this.#r[i],"expire")},o+1);u.unref&&u.unref()}},this.#S=i=>{r[i]=t[i]!==0?Yo.now():0},this.#w=(i,o)=>{if(t[o]){let l=t[o],u=r[o];if(!l||!u)return;i.ttl=l,i.start=u,i.now=n||a();let s=i.now-u;i.remainingTTL=l-s}};let n=0,a=()=>{let i=Yo.now();if(this.ttlResolution>0){n=i;let o=setTimeout(()=>n=0,this.ttlResolution);o.unref&&o.unref()}return i};this.getRemainingTTL=i=>{let o=this.#n.get(i);if(o===void 0)return 0;let l=t[o],u=r[o];if(!l||!u)return 1/0;let s=(n||a())-u;return l-s},this.#d=i=>{let o=r[i],l=t[i];return!!l&&!!o&&(n||a())-o>l}}#S=()=>{};#w=()=>{};#L=()=>{};#d=()=>!1;#H(){let t=new jo(this.#u);this.#g=0,this.#b=t,this.#C=r=>{this.#g-=t[r],t[r]=0},this.#P=(r,n,a,i)=>{if(this.#t(n))return 0;if(!Xa(a))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(a=i(n,r),!Xa(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a},this.#R=(r,n,a)=>{if(t[r]=n,this.#p){let i=this.#p-t[r];for(;this.#g>i;)this.#F(!0)}this.#g+=t[r],a&&(a.entrySize=n,a.totalCalculatedSize=this.#g)}}#C=t=>{};#R=(t,r,n)=>{};#P=(t,r,n,a)=>{if(n||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#a)for(let r=this.#i;!(!this.#U(r)||((t||!this.#d(r))&&(yield r),r===this.#s));)r=this.#f[r]}*#N({allowStale:t=this.allowStale}={}){if(this.#a)for(let r=this.#s;!(!this.#U(r)||((t||!this.#d(r))&&(yield r),r===this.#i));)r=this.#c[r]}#U(t){return t!==void 0&&this.#n.get(this.#r[t])===t}*entries(){for(let t of this.#A())this.#e[t]!==void 0&&this.#r[t]!==void 0&&!this.#t(this.#e[t])&&(yield[this.#r[t],this.#e[t]])}*rentries(){for(let t of this.#N())this.#e[t]!==void 0&&this.#r[t]!==void 0&&!this.#t(this.#e[t])&&(yield[this.#r[t],this.#e[t]])}*keys(){for(let t of this.#A()){let r=this.#r[t];r!==void 0&&!this.#t(this.#e[t])&&(yield r)}}*rkeys(){for(let t of this.#N()){let r=this.#r[t];r!==void 0&&!this.#t(this.#e[t])&&(yield r)}}*values(){for(let t of this.#A())this.#e[t]!==void 0&&!this.#t(this.#e[t])&&(yield this.#e[t])}*rvalues(){for(let t of this.#N())this.#e[t]!==void 0&&!this.#t(this.#e[t])&&(yield this.#e[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,r={}){for(let n of this.#A()){let a=this.#e[n],i=this.#t(a)?a.__staleWhileFetching:a;if(i!==void 0&&t(i,this.#r[n],this))return this.get(this.#r[n],r)}}forEach(t,r=this){for(let n of this.#A()){let a=this.#e[n],i=this.#t(a)?a.__staleWhileFetching:a;i!==void 0&&t.call(r,i,this.#r[n],this)}}rforEach(t,r=this){for(let n of this.#N()){let a=this.#e[n],i=this.#t(a)?a.__staleWhileFetching:a;i!==void 0&&t.call(r,i,this.#r[n],this)}}purgeStale(){let t=!1;for(let r of this.#N({allowStale:!0}))this.#d(r)&&(this.#T(this.#r[r],"expire"),t=!0);return t}info(t){let r=this.#n.get(t);if(r===void 0)return;let n=this.#e[r],a=this.#t(n)?n.__staleWhileFetching:n;if(a===void 0)return;let i={value:a};if(this.#m&&this.#y){let o=this.#m[r],l=this.#y[r];if(o&&l){let u=o-(Yo.now()-l);i.ttl=u,i.start=Date.now()}}return this.#b&&(i.size=this.#b[r]),i}dump(){let t=[];for(let r of this.#A({allowStale:!0})){let n=this.#r[r],a=this.#e[r],i=this.#t(a)?a.__staleWhileFetching:a;if(i===void 0||n===void 0)continue;let o={value:i};if(this.#m&&this.#y){o.ttl=this.#m[r];let l=Yo.now()-this.#y[r];o.start=Math.floor(Date.now()-l)}this.#b&&(o.size=this.#b[r]),t.unshift([n,o])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let a=Date.now()-n.start;n.start=Yo.now()-a}this.set(r,n.value,n)}}set(t,r,n={}){if(r===void 0)return this.delete(t),this;let{ttl:a=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n,{noUpdateTTL:s=this.noUpdateTTL}=n,c=this.#P(t,r,n.size||0,l);if(this.maxEntrySize&&c>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.#T(t,"set"),this;let p=this.#a===0?void 0:this.#n.get(t);if(p===void 0)p=this.#a===0?this.#i:this.#x.length!==0?this.#x.pop():this.#a===this.#u?this.#F(!1):this.#a,this.#r[p]=t,this.#e[p]=r,this.#n.set(t,p),this.#c[this.#i]=p,this.#f[p]=this.#i,this.#i=p,this.#a++,this.#R(p,c,u),u&&(u.set="add"),s=!1;else{this.#_(p);let f=this.#e[p];if(r!==f){if(this.#D&&this.#t(f)){f.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=f;m!==void 0&&!o&&(this.#E&&this.#h?.(m,t,"set"),this.#l&&this.#o?.push([m,t,"set"]))}else o||(this.#E&&this.#h?.(f,t,"set"),this.#l&&this.#o?.push([f,t,"set"]));if(this.#C(p),this.#R(p,c,u),this.#e[p]=r,u){u.set="replace";let m=f&&this.#t(f)?f.__staleWhileFetching:f;m!==void 0&&(u.oldValue=m)}}else u&&(u.set="update")}if(a!==0&&!this.#m&&this.#B(),this.#m&&(s||this.#L(p,a,i),u&&this.#w(u,p)),!o&&this.#l&&this.#o){let f=this.#o,m;for(;m=f?.shift();)this.#v?.(...m)}return this}pop(){try{for(;this.#a;){let t=this.#e[this.#s];if(this.#F(!0),this.#t(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#l&&this.#o){let t=this.#o,r;for(;r=t?.shift();)this.#v?.(...r)}}}#F(t){let r=this.#s,n=this.#r[r],a=this.#e[r];return this.#D&&this.#t(a)?a.__abortController.abort(new Error("evicted")):(this.#E||this.#l)&&(this.#E&&this.#h?.(a,n,"evict"),this.#l&&this.#o?.push([a,n,"evict"])),this.#C(r),t&&(this.#r[r]=void 0,this.#e[r]=void 0,this.#x.push(r)),this.#a===1?(this.#s=this.#i=0,this.#x.length=0):this.#s=this.#c[r],this.#n.delete(n),this.#a--,r}has(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:a}=r,i=this.#n.get(t);if(i!==void 0){let o=this.#e[i];if(this.#t(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#d(i))a&&(a.has="stale",this.#w(a,i));else return n&&this.#S(i),a&&(a.has="hit",this.#w(a,i)),!0}else a&&(a.has="miss");return!1}peek(t,r={}){let{allowStale:n=this.allowStale}=r,a=this.#n.get(t);if(a===void 0||!n&&this.#d(a))return;let i=this.#e[a];return this.#t(i)?i.__staleWhileFetching:i}#I(t,r,n,a){let i=r===void 0?void 0:this.#e[r];if(this.#t(i))return i;let o=new Af,{signal:l}=n;l?.addEventListener("abort",()=>o.abort(l.reason),{signal:o.signal});let u={signal:o.signal,options:n,context:a},s=(d,v=!1)=>{let{aborted:x}=o.signal,N=n.ignoreFetchAbort&&d!==void 0;if(n.status&&(x&&!v?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,N&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),x&&!N&&!v)return p(o.signal.reason);let g=m;return this.#e[r]===m&&(d===void 0?g.__staleWhileFetching?this.#e[r]=g.__staleWhileFetching:this.#T(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(t,d,u.options))),d},c=d=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=d),p(d)),p=d=>{let{aborted:v}=o.signal,x=v&&n.allowStaleOnFetchAbort,N=x||n.allowStaleOnFetchRejection,g=N||n.noDeleteOnFetchRejection,y=m;if(this.#e[r]===m&&(!g||y.__staleWhileFetching===void 0?this.#T(t,"fetch"):x||(this.#e[r]=y.__staleWhileFetching)),N)return n.status&&y.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),y.__staleWhileFetching;if(y.__returned===y)throw d},f=(d,v)=>{let x=this.#M?.(t,i,u);x&&x instanceof Promise&&x.then(N=>d(N===void 0?void 0:N),v),o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(d(void 0),n.allowStaleOnFetchAbort&&(d=N=>s(N,!0)))})};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(f).then(s,c),h=Object.assign(m,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return r===void 0?(this.set(t,h,{...u.options,status:void 0}),r=this.#n.get(t)):this.#e[r]=h,h}#t(t){if(!this.#D)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Af}async fetch(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,context:d,forceRefresh:v=!1,status:x,signal:N}=r;if(!this.#D)return x&&(x.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:a,noDeleteOnStaleGet:i,status:x});let g={allowStale:n,updateAgeOnGet:a,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:l,size:u,sizeCalculation:s,noUpdateTTL:c,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:h,ignoreFetchAbort:m,status:x,signal:N},y=this.#n.get(t);if(y===void 0){x&&(x.fetch="miss");let E=this.#I(t,y,g,d);return E.__returned=E}else{let E=this.#e[y];if(this.#t(E)){let D=n&&E.__staleWhileFetching!==void 0;return x&&(x.fetch="inflight",D&&(x.returnedStale=!0)),D?E.__staleWhileFetching:E.__returned=E}let b=this.#d(y);if(!v&&!b)return x&&(x.fetch="hit"),this.#_(y),a&&this.#S(y),x&&this.#w(x,y),E;let S=this.#I(t,y,g,d),w=S.__staleWhileFetching!==void 0&&n;return x&&(x.fetch=b?"stale":"refresh",w&&b&&(x.returnedStale=!0)),w?S.__staleWhileFetching:S.__returned=S}}async forceFetch(t,r={}){let n=await this.fetch(t,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(t,r={}){let n=this.#O;if(!n)throw new Error("no memoMethod provided to constructor");let{context:a,forceRefresh:i,...o}=r,l=this.get(t,o);if(!i&&l!==void 0)return l;let u=n(t,l,{options:o,context:a});return this.set(t,u,o),u}get(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=r,l=this.#n.get(t);if(l!==void 0){let u=this.#e[l],s=this.#t(u);return o&&this.#w(o,l),this.#d(l)?(o&&(o.get="stale"),s?(o&&n&&u.__staleWhileFetching!==void 0&&(o.returnedStale=!0),n?u.__staleWhileFetching:void 0):(i||this.#T(t,"expire"),o&&n&&(o.returnedStale=!0),n?u:void 0)):(o&&(o.get="hit"),s?u.__staleWhileFetching:(this.#_(l),a&&this.#S(l),u))}else o&&(o.get="miss")}#k(t,r){this.#f[r]=t,this.#c[t]=r}#_(t){t!==this.#i&&(t===this.#s?this.#s=this.#c[t]:this.#k(this.#f[t],this.#c[t]),this.#k(this.#i,t),this.#i=t)}delete(t){return this.#T(t,"delete")}#T(t,r){let n=!1;if(this.#a!==0){let a=this.#n.get(t);if(a!==void 0)if(n=!0,this.#a===1)this.#q(r);else{this.#C(a);let i=this.#e[a];if(this.#t(i)?i.__abortController.abort(new Error("deleted")):(this.#E||this.#l)&&(this.#E&&this.#h?.(i,t,r),this.#l&&this.#o?.push([i,t,r])),this.#n.delete(t),this.#r[a]=void 0,this.#e[a]=void 0,a===this.#i)this.#i=this.#f[a];else if(a===this.#s)this.#s=this.#c[a];else{let o=this.#f[a];this.#c[o]=this.#c[a];let l=this.#c[a];this.#f[l]=this.#f[a]}this.#a--,this.#x.push(a)}}if(this.#l&&this.#o?.length){let a=this.#o,i;for(;i=a?.shift();)this.#v?.(...i)}return n}clear(){return this.#q("delete")}#q(t){for(let r of this.#N({allowStale:!0})){let n=this.#e[r];if(this.#t(n))n.__abortController.abort(new Error("deleted"));else{let a=this.#r[r];this.#E&&this.#h?.(n,a,t),this.#l&&this.#o?.push([n,a,t])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#m&&this.#y&&(this.#m.fill(0),this.#y.fill(0)),this.#b&&this.#b.fill(0),this.#s=0,this.#i=0,this.#x.length=0,this.#g=0,this.#a=0,this.#l&&this.#o){let r=this.#o,n;for(;n=r?.shift();)this.#v?.(...n)}}};var $o=new Vo({max:500}),Nf=["AFN","ALL","DZD","AOA","ARS","AMD","AWG","AUD","AZN","BSD","BHD","BDT","BBD","BYN","BZD","BMD","BTN","BOB","BAM","BWP","BRL","BND","BGN","BIF","KHR","CAD","CVE","KYD","XOF","XAF","XPF","CLP","CNY","COP","KMF","CDF","CRC","CUP","CZK","DKK","DJF","DOP","XCD","EGP","SVC","ETB","EUR","FKP","FJD","GMD","GEL","GHS","GIP","GBP","GTQ","GNF","GYD","HTG","HNL","HKD","HUF","ISK","INR","IDR","IQD","ILS","JMD","JPY","JOD","KZT","KES","KWD","KGS","LAK","LBP","LSL","LRD","LYD","MOP","MKD","MGA","MWK","MYR","MVR","MRU","MUR","MXN","MDL","MNT","MAD","MZN","MMK","NAD","NPR","ANG","NZD","NIO","NGN","NOK","OMR","PKR","PAB","PGK","PYG","PEN","PHP","PLN","QAR","RON","RUB","RWF","SHP","WST","STN","SAR","RSD","SCR","SLE","SGD","SBD","SOS","ZAR","KRW","SSP","LKR","SDG","SRD","SZL","SEK","CHF","TWD","TJS","TZS","THB","TOP","TTD","TND","TRY","TMT","UGX","UAH","AED","USD","UYU","UZS","VUV","VES","VND","YER","ZMW","ZWL"],qu=class extends oa{constructor(){super([]);this.ableToGetAllFXRate=!1}get fxRateList(){let r={};return Nf.forEach(n=>{r[n]={},Nf.forEach(a=>{let i=new Proxy({},{get:(o,l)=>{if(["cash","remit","middle","updated"].includes(l.toString())){if(!$o.has(`${n}${a}`)){let u=(0,P1.default)("GET","https://www.mastercard.co.uk/en-us/personal/get-support/convert-currency.html"),s=(0,P1.default)("GET",`https://www.mastercard.co.uk/settlement/currencyrate/conversion-rate?fxDate=0000-00-00&transCurr=${a}&crdhldBillCurr=${n}&bankFee=0&transAmt=1`,{headers:{Cookie:u.headers["set-cookie"].map(c=>c.split(";")[0]).join("; ")}});$o.set(`${n}${a}`,s.getBody().toString())}if(["cash","remit","middle"].includes(l.toString())){let u=JSON.parse($o.get(`${n}${a}`));return uo(jn(u.data.transAmt),jn(u.data.conversionRate))}else{let u=JSON.parse($o.get(`${n}${a}`));return new Date(u.data.fxDate)}}}});r[n][a]=i})}),r}async getfxRateList(r,n){if(!(Nf.includes(r)&&Nf.includes(n)))throw new Error("Currency not supported");if($o.has(`${r}${n}`))return this.fxRateList[r][n];let a=await Ze.get("https://www.mastercard.co.uk/en-us/personal/get-support/convert-currency.html");console.log(a.headers),console.log(a.headers["set-cookie"].map(l=>l.split(";")[0]).join("; "));let o=(await Ze.get(`https://www.mastercard.co.uk/settlement/currencyrate/conversion-rate?fxDate=0000-00-00&transCurr=${n}&crdhldBillCurr=${r}&bankFee=0&transAmt=1`,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest",Cookie:a.headers["set-cookie"].map(l=>l.split(";")[0]).join("; ")}})).data;return $o.set(`${r}${n}`,JSON.stringify(o)),this.fxRateList[r][n]}update(){throw new Error("Method is deprecated")}};var J4=Le(require("sync-request"),1);var wf=Le(W4(),1),e8=Le(Q4(),1);wf.default.extend(e8.default);var Xo=new Vo({max:500}),Z4={accept:"application/json, text/plain, */*","accept-language":"en,zh-CN;q=0.9,zh;q=0.8","sec-ch-ua":'"Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Linux"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin",Referer:"https://usa.visa.com/support/consumer/travel-support/exchange-rate-calculator.html","Referrer-Policy":"no-referrer-when-downgrade"},Tf=["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CVE","CYP","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GQE","GTQ","GWP","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MRU","MTL","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","None","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SRD","SSP","STD","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VES","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW","ZWL"],Hu=class extends oa{constructor(){super([]);this.ableToGetAllFXRate=!1}get fxRateList(){let r={};return Tf.forEach(n=>{r[n]={},Tf.forEach(a=>{let i=new Proxy({},{get:(o,l)=>{if(!["cash","remit","middle","updated"].includes(l.toString()))return;let u=(0,wf.default)().utc().format("MM/DD/YYYY");if(!Xo.has(`${n}${a}`)){let s=(0,J4.default)("GET",`https://usa.visa.com/cmsapi/fx/rates?amount=1&fee=0&utcConvertedDate=${u}&exchangedate=${u}&fromCurr=${a}&toCurr=${n}`,{headers:Z4});Xo.set(`${n}${a}`,s.getBody().toString())}if(["cash","remit","middle"].includes(l.toString())){let s=JSON.parse(Xo.get(`${n}${a}`));return jn(s.originalValues.fxRateVisa)}else{let s=JSON.parse(Xo.get(`${n}${a}`));return new Date(s.originalValues.lastUpdatedVisaRate*1e3)}}});r[n][a]=i})}),r}async getfxRateList(r,n){if(!(Tf.includes(r)&&Tf.includes(n)))throw new Error("Currency not supported");if(Xo.has(`${r}${n}`))return this.fxRateList[r][n];let a=(0,wf.default)().utc().format("MM/DD/YYYY"),o=(await Ze.get(`https://usa.visa.com/cmsapi/fx/rates?amount=1&fee=0&utcConvertedDate=${a}&exchangedate=${a}&fromCurr=${n}&toCurr=${r}`,{headers:Z4})).data;return Xo.set(`${r}${n}`,JSON.stringify(o)),this.fxRateList[r][n]}update(){throw new Error("Method is deprecated")}};var R8=Le(M8(),1);var O8={pboc:"\u4E2D\u56FD\u4EBA\u6C11\u94F6\u884C",unionpay:"\u94F6\u8054",mastercard:"MasterCard",wise:"Wise",visa:"Visa",jcb:"JCB",abc:"\u4E2D\u56FD\u519C\u4E1A\u94F6\u884C",cmb:"\u62DB\u5546\u94F6\u884C",icbc:"\u4E2D\u56FD\u5DE5\u5546\u94F6\u884C",boc:"\u4E2D\u56FD\u94F6\u884C",bochk:"\u4E2D\u94F6\u9999\u6E2F",ccb:"\u4E2D\u56FD\u5EFA\u8BBE\u94F6\u884C",psbc:"\u90AE\u653F\u50A8\u84C4\u94F6\u884C",bocom:"\u4EA4\u901A\u94F6\u884C",cibHuanyu:"\u5174\u4E1A\u94F6\u884C\u5BF0\u5B87\u4EBA\u751F",cib:"\u5174\u4E1A\u94F6\u884C","hsbc.cn":"\u6C47\u4E30\u4E2D\u56FD","hsbc.hk":"\u6C47\u4E30\u9999\u6E2F","hsbc.au":"\u6C47\u4E30\u6FB3\u6D32","citic.cn":"\u4E2D\u4FE1\u94F6\u884C",spdb:"\u6D66\u53D1\u94F6\u884C","ncb.cn":"\u5357\u6D0B\u5546\u4E1A\u94F6\u884C\uFF08\u4E2D\u56FD\uFF09",xib:"\u53A6\u95E8\u56FD\u9645\u94F6\u884C",pab:"\u5E73\u5B89\u94F6\u884C",ceb:"\u4E2D\u56FD\u5149\u5927\u94F6\u884C"};var Bf=class extends Pn{constructor(t){super(),this.fxmManager=t,this.mount()}async requestPrice(t,r,n=[]){let a=(await Oa("info",this.fxmManager)).sources.filter(o=>!n.includes(o)),i=[];return await Promise.all(a.map(async o=>{try{let l=await Oa(`${o}/${r}/${t}/?precision=4&fees=0&amount=100`,this.fxmManager),u=await Oa(`${o}/${t}/${r}/?precision=4&fees=0&amount=100&reverse`,this.fxmManager);i.push({sell:u,buy:l,source:o})}catch(l){console.error(`not suppported: ${o} with ${t} to ${r}`,l)}return""})),i}mount(){let t=async(r,n)=>{r.params.from&&(r.params.from=r.params.from.toUpperCase()),r.params.to&&(r.params.to=r.params.to.toUpperCase());let{from:a,to:i}=r.params,o=new R8.Feed({title:`FXRate \u5B9E\u65F6 ${a} <=> ${i} \u6C47\u7387\u4FE1\u606F`,updated:new Date,id:"https://github.com/186526/fxrate",copyright:"MIT, Data copyright belongs to its source. More details at .",author:{name:"Bo Xu",email:"i@186526.xyz",link:"https://186526.xyz"}});return(await this.requestPrice(a,i)).forEach(u=>{let s=`\u73B0\u6C47\u4E70\u5165: ${u.buy.remit} \u73B0\u949E\u4E70\u5165: ${u.buy.cash} \u4E70\u5165\u4E2D\u95F4\u4EF7: ${u.buy.middle} \u4E70\u5165\u66F4\u65B0\u65F6\u95F4: ${u.buy.updated} -\u73B0\u6C47\u5356\u51FA: ${u.sell.remit} \u73B0\u949E\u5356\u51FA: ${u.sell.cash} \u5356\u51FA\u4E2D\u95F4\u4EF7: ${u.sell.middle} \u5356\u51FA\u66F4\u65B0\u65F6\u95F4: ${u.sell.updated}`;o.addItem({title:`${O8[u.source]??u.source}`,link:"https://github.com/186526/fxrate",description:s,content:s,date:new Date(u.buy.updated??u.sell.updated)})}),n.body=o.atom1(),n.headers.set("Content-Type","application/xml"),n.status=200,n};this.binding("/:from/:to",new lr("GET",[t]))}};var JZ={},Yu=new LM({boc:a4,bochk:s4,icbc:u4,cib:h4,cibHuanyu:d4,ccb:g4,abc:y4,bocom:N4,psbc:S4,cmb:C4,pboc:_4,unionpay:M4,jcb:O4,"hsbc.hk":F4,"hsbc.cn":I4,"hsbc.au":B4,"citic.cn":P4,"ncb.cn":T4,spdb:U4,xib:H4,pab:z4,ceb:j4});Yu.registerFXM("mastercard",new qu);Yu.registerFXM("visa",new Hu);En.default.env.ENABLE_WISE!="0"&&(En.default.env.WISE_TOKEN==null&&(console.error("WISE_TOKEN is not set. Use Wise Token from web."),En.default.env.WISE_USE_TOKEN_FROM_WEB="1"),Yu.registerGetter("wise",R4(En.default.env.WISE_SANDBOX_API=="1",En.default.env.WISE_USE_TOKEN_FROM_WEB!="0",En.default.env.WISE_TOKEN)));var F8=async(e,t)=>{e.binding("/(.*)",new lr("ANY",[async(n,a)=>{op(a),a.status=404}])),e.useMappingAdapter(),e.binding("/",e.create("ANY",async()=>`200 OK + )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var xn=Le(za(),1);var n1={};function a1(e,t){return e===xn.default.falseFunc?xn.default.falseFunc:r=>t.isTag(r)&&e(r)}function i1(e,t){let r=t.getSiblings(e);if(r.length<=1)return[];let n=r.indexOf(e);return n<0||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function r1(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var t1=(e,t,r,n,a)=>{let i=a(t,r1(r),n);return i===xn.default.trueFunc?e:i===xn.default.falseFunc?xn.default.falseFunc:o=>i(o)&&e(o)},Xp={is:t1,matches:t1,where:t1,not(e,t,r,n,a){let i=a(t,r1(r),n);return i===xn.default.falseFunc?e:i===xn.default.trueFunc?xn.default.falseFunc:o=>!i(o)&&e(o)},has(e,t,r,n,a){let{adapter:i}=r,o=r1(r);o.relativeSelector=!0;let l=t.some(c=>c.some(yu))?[n1]:void 0,u=a(t,o,l);if(u===xn.default.falseFunc)return xn.default.falseFunc;let s=a1(u,i);if(l&&u!==xn.default.trueFunc){let{shouldTestNextSiblings:c=!1}=u;return p=>{if(!e(p))return!1;l[0]=p;let f=i.getChildren(p),m=c?[...f,...i1(p,i)]:f;return i.existsOne(s,m)}}return c=>e(c)&&i.existsOne(s,i.getChildren(c))}};function BI(e,t,r,n,a){var i;let{name:o,data:l}=t;if(Array.isArray(l)){if(!(o in Xp))throw new Error(`Unknown pseudo-class :${o}(${l})`);return Xp[o](e,l,r,n,a)}let u=(i=r.pseudos)===null||i===void 0?void 0:i[o],s=typeof u=="string"?u:$p[o];if(typeof s=="string"){if(l!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let c=(0,II.parse)(s);return Xp.is(e,c,r,n,a)}if(typeof u=="function")return e1(u,o,l,1),c=>u(c,l)&&e(c);if(o in Po)return Po[o](e,l,r,n);if(o in Au){let c=Au[o];return e1(c,o,l,2),p=>c(p,r,l)&&e(p)}throw new Error(`Unknown pseudo-class :${o}`)}var bn=Le(Bo(),1);function o1(e,t){let r=t.getParent(e);return r&&t.isTag(r)?r:null}function LI(e,t,r,n,a){let{adapter:i,equals:o}=r;switch(t.type){case bn.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case bn.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case bn.SelectorType.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),MI[t.action](e,t,r)}case bn.SelectorType.Pseudo:return BI(e,t,r,n,a);case bn.SelectorType.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:l}=t;return(!r.xmlMode||r.lowerCaseTags)&&(l=l.toLowerCase()),function(s){return i.getName(s)===l&&e(s)}}case bn.SelectorType.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(s){let c=s;for(;c=o1(c,i);)if(e(c))return!0;return!1};let l=new WeakSet;return function(s){let c=s;for(;c=o1(c,i);)if(!l.has(c)){if(i.isTag(c)&&e(c))return!0;l.add(c)}return!1}}case"_flexibleDescendant":return function(u){let s=u;do if(e(s))return!0;while(s=o1(s,i));return!1};case bn.SelectorType.Parent:return function(u){return i.getChildren(u).some(s=>i.isTag(s)&&e(s))};case bn.SelectorType.Child:return function(u){let s=i.getParent(u);return s!=null&&i.isTag(s)&&e(s)};case bn.SelectorType.Sibling:return function(u){let s=i.getSiblings(u);for(let c=0;ct.some(UI)))}var V$={type:Fn.SelectorType.Descendant},$$={type:"_flexibleDescendant"},X$={type:Fn.SelectorType.Pseudo,name:"scope",data:null};function K$(e,{adapter:t},r){let n=!!r?.every(a=>{let i=t.isTag(a)&&t.getParent(a);return a===n1||i&&t.isTag(i)});for(let a of e){if(!(a.length>0&&yu(a[0])&&a[0].type!==Fn.SelectorType.Descendant))if(n&&!a.some(UI))a.unshift(V$);else continue;a.unshift(X$)}}function Wp(e,t,r){var n;e.forEach(Qb),r=(n=t.context)!==null&&n!==void 0?n:r;let a=Array.isArray(r),i=r&&(Array.isArray(r)?r:[r]);if(t.relativeSelector!==!1)K$(e,t,i);else if(e.some(u=>u.length>0&&yu(u[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let o=!1,l=e.map(u=>{if(u.length>=2){let[s,c]=u;s.type!==Fn.SelectorType.Pseudo||s.name!=="scope"||(a&&c.type===Fn.SelectorType.Descendant?u[1]=$$:(c.type===Fn.SelectorType.Adjacent||c.type===Fn.SelectorType.Sibling)&&(o=!0))}return W$(u,t,i)}).reduce(Q$,da.default.falseFunc);return l.shouldTestNextSiblings=o,l}function W$(e,t,r){var n;return e.reduce((a,i)=>a===da.default.falseFunc?da.default.falseFunc:LI(a,i,t,r,Wp),(n=t.rootFunc)!==null&&n!==void 0?n:da.default.trueFunc)}function Q$(e,t){return t===da.default.falseFunc||e===da.default.trueFunc?e:e===da.default.falseFunc||t===da.default.trueFunc?t:function(n){return e(n)||t(n)}}var kI=(e,t)=>e===t,Z$={adapter:ka,equals:kI};function qI(e){var t,r,n,a;let i=e??Z$;return(t=i.adapter)!==null&&t!==void 0||(i.adapter=ka),(r=i.equals)!==null&&r!==void 0||(i.equals=(a=(n=i.adapter)===null||n===void 0?void 0:n.equals)!==null&&a!==void 0?a:kI),i}function u1(e){return function(r,n,a){let i=qI(n);return e(r,i,a)}}var qUe=u1(PI),HUe=u1(Kp),Qp=u1(Wp);function HI(e){return function(r,n,a){let i=qI(a);typeof r!="function"&&(r=Kp(r,i,n));let o=Zp(n,i.adapter,r.shouldTestNextSiblings);return e(r,o,i)}}function Zp(e,t,r=!1){return r&&(e=J$(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function J$(e,t){let r=Array.isArray(e)?e.slice(0):[e],n=r.length;for(let a=0;ae===s1.default.falseFunc||!t||t.length===0?[]:r.adapter.findAll(e,t)),GUe=HI((e,t,r)=>e===s1.default.falseFunc||!t||t.length===0?null:r.adapter.findOne(e,t));var ef=Le(za(),1);var eX=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function Uo(e){return e.type!=="pseudo"?!1:eX.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(Uo)):!1}function zI(e,t,r){let n=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(n)?n>=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?Math.min(n,r):1/0:0;case"gt":return isFinite(n)?1/0:0;case"odd":return 2*r;case"even":return 2*r-1;case"last":case"not":return 1/0}}function GI(e){for(;e.parent;)e=e.parent;return e}function Jp(e){let t=[],r=[];for(let n of e)n.some(Uo)?t.push(n):r.push(n);return[r,t]}var tX={type:Gr.SelectorType.Universal,namespace:null},rX={type:Gr.SelectorType.Pseudo,name:"scope",data:null};function p1(e,t,r={}){return f1([e],t,r)}function f1(e,t,r={}){if(typeof t=="function")return e.some(t);let[n,a]=Jp((0,Gr.parse)(t));return n.length>0&&e.some(Qp(n,r))||a.some(i=>jI(i,e,r).length>0)}function nX(e,t,r,n){let a=typeof r=="string"?parseInt(r,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(a)&&Math.abs(a)o%2===0);case"odd":return t.filter((i,o)=>o%2===1);case"not":{let i=new Set(YI(r,t,n));return t.filter(o=>!i.has(o))}}}function m1(e,t,r={}){return YI((0,Gr.parse)(e),t,r)}function YI(e,t,r){if(t.length===0)return[];let[n,a]=Jp(e),i;if(n.length){let o=l1(t,n,r);if(a.length===0)return o;o.length&&(i=new Set(o))}for(let o=0;o$e(c)&&!i.has(c)):t).length===0)break;let s=jI(l,t,r);if(s.length)if(i)s.forEach(c=>i.add(c));else{if(o===a.length-1)return s;i=new Set(s)}}return typeof i<"u"?i.size===t.length?t:t.filter(o=>i.has(o)):[]}function jI(e,t,r){var n;if(e.some(Gr.isTraversal)){let a=(n=r.root)!==null&&n!==void 0?n:GI(t[0]),i={...r,context:t,relativeSelector:!1};return e.push(rX),tf(a,e,i,!0,t.length)}return tf(t,e,r,!1,t.length)}function VI(e,t,r={},n=1/0){if(typeof e=="function")return $I(t,e);let[a,i]=Jp((0,Gr.parse)(e)),o=i.map(l=>tf(t,l,r,!0,n));return a.length&&o.push(c1(t,a,r,n)),o.length===0?[]:o.length===1?o[0]:Pa(o.reduce((l,u)=>[...l,...u]))}function tf(e,t,r,n,a){let i=t.findIndex(Uo),o=t.slice(0,i),l=t[i],u=t.length-1===i?a:1/0,s=zI(l.name,l.data,u);if(s===0)return[];let p=(o.length===0&&!Array.isArray(e)?_o(e).filter($e):o.length===0?(Array.isArray(e)?e:[e]).filter($e):n||o.some(Gr.isTraversal)?c1(e,[o],r,s):l1(e,[o],r)).slice(0,s),f=nX(l.name,p,l.data,r);if(f.length===0||t.length===i+1)return f;let m=t.slice(i+1),h=m.some(Gr.isTraversal);if(h){if((0,Gr.isTraversal)(m[0])){let{type:d}=m[0];(d===Gr.SelectorType.Sibling||d===Gr.SelectorType.Adjacent)&&(f=Zp(f,ka,!0)),m.unshift(tX)}r={...r,relativeSelector:!1,rootFunc:d=>f.includes(d)}}else r.rootFunc&&r.rootFunc!==ef.trueFunc&&(r={...r,rootFunc:ef.trueFunc});return m.some(Uo)?tf(f,m,r,!1,a):h?c1(f,[m],r,a):l1(f,[m],r)}function c1(e,t,r,n){let a=Qp(t,r,e);return $I(e,a,n)}function $I(e,t,r=1/0){let n=Zp(e,ka,t.shouldTestNextSiblings);return Pp(a=>$e(a)&&t(a),n,!0,r)}function l1(e,t,r){let n=(Array.isArray(e)?e:[e]).filter($e);if(n.length===0)return n;let a=Qp(t,r);return a===ef.trueFunc?n:n.filter(a)}var iX=/^\s*[~+]/;function oX(e){var t;if(!e)return this._make([]);let r=this.toArray();if(typeof e!="string"){let i=nn(e)?e.toArray():[e];return this._make(i.filter(o=>r.some(l=>jb(l,o))))}let n=iX.test(e)?r:this.children().toArray(),a={context:r,root:(t=this._root)===null||t===void 0?void 0:t[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(VI(e,n,a))}function d1(e){return function(t,...r){return function(n){var a;let i=e(t,this);return n&&(i=g1(i,n,this.options.xmlMode,(a=this._root)===null||a===void 0?void 0:a[0])),this._make(this.length>1&&i.length>1?r.reduce((o,l)=>l(o),i):i)}}}var Nu=d1((e,t)=>{let r=[];for(let n=0;n{let r=[];for(let n=0;n{let o=[];return Ft(i,l=>{for(let u;(u=a(l))&&!r?.(u,o.length);l=u)o.push(u)}),o})(e,...t);return function(a,i){r=typeof a=="string"?l=>p1(l,a,this.options):a?Tu(a):null;let o=n.call(this,i);return r=null,o}}function ko(e){return Array.from(new Set(e))}var sX=h1(({parent:e})=>e&&!Rn(e)?e:null,ko),uX=Nu(e=>{let t=[];for(;e.parent&&!Rn(e.parent);)t.push(e.parent),e=e.parent;return t},Pa,e=>e.reverse()),cX=v1(({parent:e})=>e&&!Rn(e)?e:null,Pa,e=>e.reverse());function lX(e){var t;let r=[];if(!e)return this._make(r);let n={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},a=typeof e=="string"?i=>p1(i,e,n):Tu(e);return Ft(this,i=>{for(;i&&$e(i);){if(a(i,0)){r.includes(i)||r.push(i);break}i=i.parent}}),this._make(r)}var pX=h1(e=>Bp(e)),fX=Nu(e=>{let t=[];for(;e.next;)e=e.next,$e(e)&&t.push(e);return t},ko),mX=v1(e=>Bp(e),ko),dX=h1(e=>Lp(e)),hX=Nu(e=>{let t=[];for(;e.prev;)e=e.prev,$e(e)&&t.push(e);return t},ko),vX=v1(e=>Lp(e),ko),gX=Nu(e=>Gb(e).filter(t=>$e(t)&&t!==e),Pa),xX=Nu(e=>_o(e).filter($e),ko);function bX(){let e=this.toArray().reduce((t,r)=>Ut(r)?t.concat(r.children):t,[]);return this._make(e)}function yX(e){let t=0,r=this.length;for(;te.call(t,r,t):nn(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function AX(e){var t;return this._make(g1(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function g1(e,t,r,n){return typeof t=="string"?m1(t,e,{xmlMode:r,root:n}):e.filter(Tu(t))}function NX(e){let t=this.toArray();return typeof e=="string"?f1(t.filter($e),e,this.options):e?t.some(Tu(e)):!1}function TX(e){let t=this.toArray();if(typeof e=="string"){let r=new Set(m1(e,t,this.options));t=t.filter(n=>!r.has(n))}else{let r=Tu(e);t=t.filter((n,a)=>!r(n,a))}return this._make(t)}function wX(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,r)=>this._make(r).find(e).length>0)}function DX(){return this.length>1?this._make(this[0]):this}function SX(){return this.length>0?this._make(this[this.length-1]):this}function CX(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function _X(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function MX(){return Array.prototype.slice.call(this)}function OX(e){let t,r;return e==null?(t=this.parent().children(),r=this[0]):typeof e=="string"?(t=this._make(e),r=this[0]):(t=this,r=nn(e)?e[0]:e),Array.prototype.indexOf.call(t,r)}function RX(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function FX(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function IX(e,t){let r=this._make(e,t),n=Pa([...this.get(),...r.get()]);return this._make(n)}function BX(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}var b1={};on(b1,{_makeDomArray:()=>LX,after:()=>jX,append:()=>kX,appendTo:()=>PX,before:()=>$X,clone:()=>tK,empty:()=>QX,html:()=>ZX,insertAfter:()=>VX,insertBefore:()=>XX,prepend:()=>qX,prependTo:()=>UX,remove:()=>KX,replaceWith:()=>WX,text:()=>eK,toString:()=>JX,unwrap:()=>GX,wrap:()=>HX,wrapAll:()=>YX,wrapInner:()=>zX});function XI(e){return function(r,n,a,i){if(typeof Buffer<"u"&&Buffer.isBuffer(r)&&(r=r.toString()),typeof r=="string")return e(r,n,a,i);let o=r;if(!Array.isArray(o)&&Rn(o))return o;let l=new rn([]);return Ga(o,l),l}}function Ga(e,t){let r=Array.isArray(e)?e:[e];t?t.children=r:t=null;for(let n=0;nr.concat(this._makeDomArray(n,t)),[]):typeof e=="string"?this._parse(e,this.options,!1,null).children:t?Hp([e]):[e]}function KI(e){return function(...t){let r=this.length-1;return Ft(this,(n,a)=>{if(!Ut(n))return;let i=typeof t[0]=="function"?t[0].call(n,a,this._render(n.children)):t,o=this._makeDomArray(i,a=e.length?null:e[t+r];for(let c=0;c-1&&(f.children.splice(h,1),a===f&&t>h&&l[0]--)}p.parent=a,p.prev&&(p.prev.next=(i=p.next)!==null&&i!==void 0?i:null),p.next&&(p.next.prev=(o=p.prev)!==null&&o!==void 0?o:null),p.prev=c===0?u:n[c-1],p.next=c===n.length-1?s:n[c+1]}return u&&(u.next=n[0]),s&&(s.prev=n[n.length-1]),e.splice(...l)}function PX(e){return(nn(e)?e:this._make(e)).append(this),this}function UX(e){return(nn(e)?e:this._make(e)).prepend(this),this}var kX=KI((e,t,r)=>{Ya(t,t.length,0,e,r)}),qX=KI((e,t,r)=>{Ya(t,0,0,e,r)});function WI(e){return function(t){let r=this.length-1,n=this.parents().last();for(let a=0;a{let{parent:n}=e;if(!n)return;let a=n.children,i=a.indexOf(e);Ga([e],t),Ya(a,i,0,r,n)}),zX=WI((e,t,r)=>{Ut(e)&&(Ga(e.children,t),Ga(r,e))});function GX(e){return this.parent(e).not("body").each((t,r)=>{this._make(r).replaceWith(r.children)}),this}function YX(e){let t=this[0];if(t){let r=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t),n;for(let i=0;i{let{parent:a}=r;if(!Ut(r)||!a)return;let i=a.children,o=i.indexOf(r);if(o<0)return;let l=typeof e[0]=="function"?e[0].call(r,n,this._render(r.children)):e,u=this._makeDomArray(l,n{let n=this.clone().toArray(),{parent:a}=r;if(!a)return;let i=a.children,o=i.indexOf(r);o<0||(Ya(i,o+1,0,n,a),t.push(...n))}),this._make(t)}function $X(...e){let t=this.length-1;return Ft(this,(r,n)=>{let{parent:a}=r;if(!Ut(r)||!a)return;let i=a.children,o=i.indexOf(r);if(o<0)return;let l=typeof e[0]=="function"?e[0].call(r,n,this._render(r.children)):e,u=this._makeDomArray(l,n{let a=this.clone().toArray(),{parent:i}=n;if(!i)return;let o=i.children,l=o.indexOf(n);l<0||(Ya(o,l,0,a,i),r.push(...a))}),this._make(r)}function KX(e){let t=e?this.filter(e):this;return Ft(t,r=>{fa(r),r.prev=r.next=r.parent=null}),this}function WX(e){return Ft(this,(t,r)=>{let{parent:n}=t;if(!n)return;let a=n.children,i=typeof e=="function"?e.call(t,r,t):e,o=this._makeDomArray(i);Ga(o,null);let l=a.indexOf(t);Ya(a,l,1,o,n),o.includes(t)||(t.parent=t.prev=t.next=null)})}function QX(){return Ft(this,e=>{Ut(e)&&(e.children.forEach(t=>{t.next=t.prev=t.parent=null}),e.children.length=0)})}function ZX(e){if(e===void 0){let t=this[0];return!t||!Ut(t)?null:this._render(t.children)}return Ft(this,t=>{if(!Ut(t))return;t.children.forEach(n=>{n.next=n.prev=n.parent=null});let r=nn(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;Ga(r,t)})}function JX(){return this._render(this)}function eK(e){return e===void 0?qa(this):typeof e=="function"?Ft(this,(t,r)=>this._make(t).text(e.call(t,r,qa([t])))):Ft(this,t=>{if(!Ut(t))return;t.children.forEach(n=>{n.next=n.prev=n.parent=null});let r=new $n(`${e}`);Ga(r,t)})}function tK(){return this._make(Hp(this.get()))}var y1={};on(y1,{css:()=>rK});function rK(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return Ft(this,(r,n)=>{$e(r)&&QI(r,e,t,n)});if(this.length!==0)return ZI(this[0],e)}function QI(e,t,r,n){if(typeof t=="string"){let a=ZI(e),i=typeof r=="function"?r.call(e,n,a[t]):r;i===""?delete a[t]:i!=null&&(a[t]=i),e.attribs.style=nK(a)}else typeof t=="object"&&Object.keys(t).forEach((a,i)=>{QI(e,a,t[a],i)})}function ZI(e,t){if(!e||!$e(e))return;let r=aK(e.attribs.style);if(typeof t=="string")return r[t];if(Array.isArray(t)){let n={};return t.forEach(a=>{r[a]!=null&&(n[a]=r[a])}),n}return r}function nK(e){return Object.keys(e).reduce((t,r)=>`${t}${t?" ":""}${r}: ${e[r]};`,"")}function aK(e){if(e=(e||"").trim(),!e)return{};let t={},r;for(let n of e.split(";")){let a=n.indexOf(":");if(a<1||a===n.length-1){let i=n.trimEnd();i.length>0&&r!==void 0&&(t[r]+=`;${i}`)}else r=n.slice(0,a).trim(),t[r]=n.slice(a+1).trim()}return t}var E1={};on(E1,{serialize:()=>oK,serializeArray:()=>sK});var JI="input,select,textarea,keygen",iK=/%20/g,e6=/\r?\n/g;function oK(){return this.serializeArray().map(r=>`${encodeURIComponent(r.name)}=${encodeURIComponent(r.value)}`).join("&").replace(iK,"+")}function sK(){return this.map((e,t)=>{let r=this._make(t);return $e(t)&&t.name==="form"?r.find(JI).toArray():r.filter(JI).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var r;let n=this._make(t),a=n.attr("name"),i=(r=n.val())!==null&&r!==void 0?r:"";return Array.isArray(i)?i.map(o=>({name:a,value:o.replace(e6,`\r +`)})):{name:a,value:i.replace(e6,`\r +`)}}).toArray()}var ja=class{constructor(t,r,n){if(this.length=0,this.options=n,this._root=r,t){for(let a=0;a=55296&&e<=57343}function r6(e){return e>=56320&&e<=57343}function n6(e,t){return(e-55296)*1024+9216+t}function nf(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function af(e){return e>=64976&&e<=65007||cK.has(e)}var he;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(he=he||(he={}));var pK=65536,of=class{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=pK,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t){let{line:r,col:n,offset:a}=this;return{code:t,startLine:r,endLine:r,startCol:n,endCol:n,startOffset:a,endOffset:a}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){let r=this.html.charCodeAt(this.pos+1);if(r6(r))return this.pos++,this._addGap(),n6(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,G.EOF;return this._err(he.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let n=this.html.charCodeAt(r);return n===G.CARRIAGE_RETURN?G.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let t=this.html.charCodeAt(this.pos);return t===G.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,G.LINE_FEED):t===G.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,rf(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===G.LINE_FEED||t===G.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){nf(t)?this._err(he.controlCharacterInInputStream):af(t)&&this._err(he.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}var uf={};on(uf,{ATTRS:()=>In,DOCUMENT_MODE:()=>mr,NS:()=>xe,SPECIAL_ELEMENTS:()=>A1,TAG_ID:()=>T,TAG_NAMES:()=>le,getTagID:()=>Va,hasUnescapedText:()=>N1,isNumberedHeader:()=>wu});var xe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(xe=xe||(xe={}));var In;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(In=In||(In={}));var mr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(mr=mr||(mr={}));var le;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(le=le||(le={}));var T;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"})(T=T||(T={}));var mK=new Map([[le.A,T.A],[le.ADDRESS,T.ADDRESS],[le.ANNOTATION_XML,T.ANNOTATION_XML],[le.APPLET,T.APPLET],[le.AREA,T.AREA],[le.ARTICLE,T.ARTICLE],[le.ASIDE,T.ASIDE],[le.B,T.B],[le.BASE,T.BASE],[le.BASEFONT,T.BASEFONT],[le.BGSOUND,T.BGSOUND],[le.BIG,T.BIG],[le.BLOCKQUOTE,T.BLOCKQUOTE],[le.BODY,T.BODY],[le.BR,T.BR],[le.BUTTON,T.BUTTON],[le.CAPTION,T.CAPTION],[le.CENTER,T.CENTER],[le.CODE,T.CODE],[le.COL,T.COL],[le.COLGROUP,T.COLGROUP],[le.DD,T.DD],[le.DESC,T.DESC],[le.DETAILS,T.DETAILS],[le.DIALOG,T.DIALOG],[le.DIR,T.DIR],[le.DIV,T.DIV],[le.DL,T.DL],[le.DT,T.DT],[le.EM,T.EM],[le.EMBED,T.EMBED],[le.FIELDSET,T.FIELDSET],[le.FIGCAPTION,T.FIGCAPTION],[le.FIGURE,T.FIGURE],[le.FONT,T.FONT],[le.FOOTER,T.FOOTER],[le.FOREIGN_OBJECT,T.FOREIGN_OBJECT],[le.FORM,T.FORM],[le.FRAME,T.FRAME],[le.FRAMESET,T.FRAMESET],[le.H1,T.H1],[le.H2,T.H2],[le.H3,T.H3],[le.H4,T.H4],[le.H5,T.H5],[le.H6,T.H6],[le.HEAD,T.HEAD],[le.HEADER,T.HEADER],[le.HGROUP,T.HGROUP],[le.HR,T.HR],[le.HTML,T.HTML],[le.I,T.I],[le.IMG,T.IMG],[le.IMAGE,T.IMAGE],[le.INPUT,T.INPUT],[le.IFRAME,T.IFRAME],[le.KEYGEN,T.KEYGEN],[le.LABEL,T.LABEL],[le.LI,T.LI],[le.LINK,T.LINK],[le.LISTING,T.LISTING],[le.MAIN,T.MAIN],[le.MALIGNMARK,T.MALIGNMARK],[le.MARQUEE,T.MARQUEE],[le.MATH,T.MATH],[le.MENU,T.MENU],[le.META,T.META],[le.MGLYPH,T.MGLYPH],[le.MI,T.MI],[le.MO,T.MO],[le.MN,T.MN],[le.MS,T.MS],[le.MTEXT,T.MTEXT],[le.NAV,T.NAV],[le.NOBR,T.NOBR],[le.NOFRAMES,T.NOFRAMES],[le.NOEMBED,T.NOEMBED],[le.NOSCRIPT,T.NOSCRIPT],[le.OBJECT,T.OBJECT],[le.OL,T.OL],[le.OPTGROUP,T.OPTGROUP],[le.OPTION,T.OPTION],[le.P,T.P],[le.PARAM,T.PARAM],[le.PLAINTEXT,T.PLAINTEXT],[le.PRE,T.PRE],[le.RB,T.RB],[le.RP,T.RP],[le.RT,T.RT],[le.RTC,T.RTC],[le.RUBY,T.RUBY],[le.S,T.S],[le.SCRIPT,T.SCRIPT],[le.SECTION,T.SECTION],[le.SELECT,T.SELECT],[le.SOURCE,T.SOURCE],[le.SMALL,T.SMALL],[le.SPAN,T.SPAN],[le.STRIKE,T.STRIKE],[le.STRONG,T.STRONG],[le.STYLE,T.STYLE],[le.SUB,T.SUB],[le.SUMMARY,T.SUMMARY],[le.SUP,T.SUP],[le.TABLE,T.TABLE],[le.TBODY,T.TBODY],[le.TEMPLATE,T.TEMPLATE],[le.TEXTAREA,T.TEXTAREA],[le.TFOOT,T.TFOOT],[le.TD,T.TD],[le.TH,T.TH],[le.THEAD,T.THEAD],[le.TITLE,T.TITLE],[le.TR,T.TR],[le.TRACK,T.TRACK],[le.TT,T.TT],[le.U,T.U],[le.UL,T.UL],[le.SVG,T.SVG],[le.VAR,T.VAR],[le.WBR,T.WBR],[le.XMP,T.XMP]]);function Va(e){var t;return(t=mK.get(e))!==null&&t!==void 0?t:T.UNKNOWN}var _e=T,A1={[xe.HTML]:new Set([_e.ADDRESS,_e.APPLET,_e.AREA,_e.ARTICLE,_e.ASIDE,_e.BASE,_e.BASEFONT,_e.BGSOUND,_e.BLOCKQUOTE,_e.BODY,_e.BR,_e.BUTTON,_e.CAPTION,_e.CENTER,_e.COL,_e.COLGROUP,_e.DD,_e.DETAILS,_e.DIR,_e.DIV,_e.DL,_e.DT,_e.EMBED,_e.FIELDSET,_e.FIGCAPTION,_e.FIGURE,_e.FOOTER,_e.FORM,_e.FRAME,_e.FRAMESET,_e.H1,_e.H2,_e.H3,_e.H4,_e.H5,_e.H6,_e.HEAD,_e.HEADER,_e.HGROUP,_e.HR,_e.HTML,_e.IFRAME,_e.IMG,_e.INPUT,_e.LI,_e.LINK,_e.LISTING,_e.MAIN,_e.MARQUEE,_e.MENU,_e.META,_e.NAV,_e.NOEMBED,_e.NOFRAMES,_e.NOSCRIPT,_e.OBJECT,_e.OL,_e.P,_e.PARAM,_e.PLAINTEXT,_e.PRE,_e.SCRIPT,_e.SECTION,_e.SELECT,_e.SOURCE,_e.STYLE,_e.SUMMARY,_e.TABLE,_e.TBODY,_e.TD,_e.TEMPLATE,_e.TEXTAREA,_e.TFOOT,_e.TH,_e.THEAD,_e.TITLE,_e.TR,_e.TRACK,_e.UL,_e.WBR,_e.XMP]),[xe.MATHML]:new Set([_e.MI,_e.MO,_e.MN,_e.MS,_e.MTEXT,_e.ANNOTATION_XML]),[xe.SVG]:new Set([_e.TITLE,_e.FOREIGN_OBJECT,_e.DESC]),[xe.XLINK]:new Set,[xe.XML]:new Set,[xe.XMLNS]:new Set};function wu(e){return e===_e.H1||e===_e.H2||e===_e.H3||e===_e.H4||e===_e.H5||e===_e.H6}var dK=new Set([le.STYLE,le.SCRIPT,le.XMP,le.IFRAME,le.NOEMBED,le.NOFRAMES,le.PLAINTEXT]);function N1(e,t){return dK.has(e)||t&&e===le.NOSCRIPT}var hK=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),V;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(V||(V={}));var yr={DATA:V.DATA,RCDATA:V.RCDATA,RAWTEXT:V.RAWTEXT,SCRIPT_DATA:V.SCRIPT_DATA,PLAINTEXT:V.PLAINTEXT,CDATA_SECTION:V.CDATA_SECTION};function Su(e){return e>=G.DIGIT_0&&e<=G.DIGIT_9}function Du(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_Z}function vK(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_Z}function $a(e){return vK(e)||Du(e)}function T1(e){return $a(e)||Su(e)}function i6(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_F}function o6(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_F}function gK(e){return Su(e)||i6(e)||o6(e)}function cf(e){return e+32}function s6(e){return e===G.SPACE||e===G.LINE_FEED||e===G.TABULATION||e===G.FORM_FEED}function xK(e){return e===G.EQUALS_SIGN||T1(e)}function a6(e){return s6(e)||e===G.SOLIDUS||e===G.GREATER_THAN_SIGN}var Cu=class{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=V.DATA,this.returnState=V.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new of(r),this.currentLocation=this.getCurrentLocation(-1)}_err(t){var r,n;(n=(r=this.handler).onParseError)===null||n===void 0||n.call(r,this.preprocessor.getError(t))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(t){this.consumedAfterSnapshot-=t,this.preprocessor.retreat(t)}_reconsumeInState(t,r){this.state=t,this._callState(r)}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r0&&this._err(he.endTagWithAttributes),t.selfClosing&&this._err(he.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case dt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case dt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case dt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:dt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==t)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=r;return}this._createCharacterToken(t,r)}_emitCodePoint(t){let r=s6(t)?dt.WHITESPACE_CHARACTER:t===G.NULL?dt.NULL_CHARACTER:dt.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(dt.CHARACTER,t)}_matchNamedCharacterReference(t){let r=null,n=0,a=!1;for(let i=0,o=vn[0];i>=0&&(i=mu(vn,o,i+1,t),!(i<0));t=this._consume()){n+=1,o=vn[i];let l=o&Cr.VALUE_LENGTH;if(l){let u=(l>>14)-1;if(t!==G.SEMICOLON&&this._isCharacterReferenceInAttribute()&&xK(this.preprocessor.peek(1))?(r=[G.AMPERSAND],i+=u):(r=u===0?[vn[i]&~Cr.VALUE_LENGTH]:u===1?[vn[++i]]:[vn[++i],vn[++i]],n=0,a=t!==G.SEMICOLON),u===0){this._consume();break}}}return this._unconsume(n),a&&!this.preprocessor.endOfChunkHit&&this._err(he.missingSemicolonAfterCharacterReference),this._unconsume(1),r}_isCharacterReferenceInAttribute(){return this.returnState===V.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case V.DATA:{this._stateData(t);break}case V.RCDATA:{this._stateRcdata(t);break}case V.RAWTEXT:{this._stateRawtext(t);break}case V.SCRIPT_DATA:{this._stateScriptData(t);break}case V.PLAINTEXT:{this._statePlaintext(t);break}case V.TAG_OPEN:{this._stateTagOpen(t);break}case V.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case V.TAG_NAME:{this._stateTagName(t);break}case V.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case V.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case V.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case V.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case V.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case V.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case V.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case V.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case V.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case V.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case V.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case V.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case V.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case V.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case V.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case V.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case V.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case V.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case V.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case V.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case V.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case V.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case V.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case V.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case V.BOGUS_COMMENT:{this._stateBogusComment(t);break}case V.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case V.COMMENT_START:{this._stateCommentStart(t);break}case V.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case V.COMMENT:{this._stateComment(t);break}case V.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case V.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case V.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case V.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case V.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case V.COMMENT_END:{this._stateCommentEnd(t);break}case V.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case V.DOCTYPE:{this._stateDoctype(t);break}case V.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case V.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case V.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case V.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case V.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case V.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case V.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case V.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case V.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case V.CDATA_SECTION:{this._stateCdataSection(t);break}case V.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case V.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case V.CHARACTER_REFERENCE:{this._stateCharacterReference(t);break}case V.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(t);break}case V.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}case V.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(t);break}case V.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(t);break}case V.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(t);break}case V.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(t);break}case V.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case G.LESS_THAN_SIGN:{this.state=V.TAG_OPEN;break}case G.AMPERSAND:{this.returnState=V.DATA,this.state=V.CHARACTER_REFERENCE;break}case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitCodePoint(t);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case G.AMPERSAND:{this.returnState=V.RCDATA,this.state=V.CHARACTER_REFERENCE;break}case G.LESS_THAN_SIGN:{this.state=V.RCDATA_LESS_THAN_SIGN;break}case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Bt);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case G.LESS_THAN_SIGN:{this.state=V.RAWTEXT_LESS_THAN_SIGN;break}case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Bt);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case G.LESS_THAN_SIGN:{this.state=V.SCRIPT_DATA_LESS_THAN_SIGN;break}case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Bt);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case G.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Bt);break}case G.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if($a(t))this._createStartTagToken(),this.state=V.TAG_NAME,this._stateTagName(t);else switch(t){case G.EXCLAMATION_MARK:{this.state=V.MARKUP_DECLARATION_OPEN;break}case G.SOLIDUS:{this.state=V.END_TAG_OPEN;break}case G.QUESTION_MARK:{this._err(he.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=V.BOGUS_COMMENT,this._stateBogusComment(t);break}case G.EOF:{this._err(he.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(he.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=V.DATA,this._stateData(t)}}_stateEndTagOpen(t){if($a(t))this._createEndTagToken(),this.state=V.TAG_NAME,this._stateTagName(t);else switch(t){case G.GREATER_THAN_SIGN:{this._err(he.missingEndTagName),this.state=V.DATA;break}case G.EOF:{this._err(he.eofBeforeTagName),this._emitChars("");break}case G.NULL:{this._err(he.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_ESCAPED,this._emitChars(Bt);break}case G.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=V.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===G.SOLIDUS?this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:$a(t)?(this._emitChars("<"),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){$a(t)?(this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("");break}case G.NULL:{this._err(he.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Bt);break}case G.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===G.SOLIDUS?(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Mr.SCRIPT,!1)&&a6(this.preprocessor.peek(Mr.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r1114111)this._err(he.characterReferenceOutsideUnicodeRange),this.charRefCode=G.REPLACEMENT_CHARACTER;else if(rf(this.charRefCode))this._err(he.surrogateCharacterReference),this.charRefCode=G.REPLACEMENT_CHARACTER;else if(af(this.charRefCode))this._err(he.noncharacterCharacterReference);else if(nf(this.charRefCode)||this.charRefCode===G.CARRIAGE_RETURN){this._err(he.controlCharacterReference);let r=hK.get(this.charRefCode);r!==void 0&&(this.charRefCode=r)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,t)}};var c6=new Set([T.DD,T.DT,T.LI,T.OPTGROUP,T.OPTION,T.P,T.RB,T.RP,T.RT,T.RTC]),u6=new Set([...c6,T.CAPTION,T.COLGROUP,T.TBODY,T.TD,T.TFOOT,T.TH,T.THEAD,T.TR]),lf=new Map([[T.APPLET,xe.HTML],[T.CAPTION,xe.HTML],[T.HTML,xe.HTML],[T.MARQUEE,xe.HTML],[T.OBJECT,xe.HTML],[T.TABLE,xe.HTML],[T.TD,xe.HTML],[T.TEMPLATE,xe.HTML],[T.TH,xe.HTML],[T.ANNOTATION_XML,xe.MATHML],[T.MI,xe.MATHML],[T.MN,xe.MATHML],[T.MO,xe.MATHML],[T.MS,xe.MATHML],[T.MTEXT,xe.MATHML],[T.DESC,xe.SVG],[T.FOREIGN_OBJECT,xe.SVG],[T.TITLE,xe.SVG]]),bK=[T.H1,T.H2,T.H3,T.H4,T.H5,T.H6],yK=[T.TR,T.TEMPLATE,T.HTML],EK=[T.TBODY,T.TFOOT,T.THEAD,T.TEMPLATE,T.HTML],AK=[T.TABLE,T.TEMPLATE,T.HTML],NK=[T.TD,T.TH],pf=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=T.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===T.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===xe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){let n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){let a=this._indexOf(t)+1;this.items.splice(a,0,r),this.tagIDs.splice(a,0,n),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==xe.HTML);this.shortenToLength(r<0?0:r)}shortenToLength(t){for(;this.stackTop>=t;){let r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop=0;n--)if(t.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){let n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(AK,xe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(EK,xe.HTML)}clearBackToTableRowContext(){this.clearBackTo(yK,xe.HTML)}remove(t){let r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===T.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===T.HTML}hasInScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r],a=this.treeAdapter.getNamespaceURI(this.items[r]);if(n===t&&a===xe.HTML)return!0;if(lf.get(n)===a)return!1}return!0}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(wu(r)&&n===xe.HTML)return!0;if(lf.get(r)===n)return!1}return!0}hasInListItemScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r],a=this.treeAdapter.getNamespaceURI(this.items[r]);if(n===t&&a===xe.HTML)return!0;if((n===T.UL||n===T.OL)&&a===xe.HTML||lf.get(n)===a)return!1}return!0}hasInButtonScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r],a=this.treeAdapter.getNamespaceURI(this.items[r]);if(n===t&&a===xe.HTML)return!0;if(n===T.BUTTON&&a===xe.HTML||lf.get(n)===a)return!1}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r];if(this.treeAdapter.getNamespaceURI(this.items[r])===xe.HTML){if(n===t)return!0;if(n===T.TABLE||n===T.TEMPLATE||n===T.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===xe.HTML){if(r===T.TBODY||r===T.THEAD||r===T.TFOOT)return!0;if(r===T.TABLE||r===T.HTML)return!1}}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r];if(this.treeAdapter.getNamespaceURI(this.items[r])===xe.HTML){if(n===t)return!0;if(n!==T.OPTION&&n!==T.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;c6.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;u6.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&u6.has(this.currentTagId);)this.pop()}};var yn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(yn=yn||(yn={}));var l6={type:yn.Marker},ff=class{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){let n=[],a=r.length,i=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let l=0;l[o.name,o.value])),i=0;for(let o=0;oa.get(u.name)===u.value)&&(i+=1,i>=3&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(l6)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:yn.Element,element:t,token:r})}insertElementAfterBookmark(t,r){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:yn.Element,element:t,token:r})}removeEntry(t){let r=this.entries.indexOf(t);r>=0&&this.entries.splice(r,1)}clearToLastMarker(){let t=this.entries.indexOf(l6);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){let r=this.entries.find(n=>n.type===yn.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===yn.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===yn.Element&&r.element===t)}};function p6(e){return{nodeName:"#text",value:e,parentNode:null}}var Kn={createDocument(){return{nodeName:"#document",mode:mr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){let n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){let a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=t,a.publicId=r,a.systemId=n;else{let i={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};Kn.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let r=e.childNodes[e.childNodes.length-1];if(Kn.isTextNode(r)){r.value+=t;return}}Kn.appendChild(e,p6(t))},insertTextBefore(e,t,r){let n=e.childNodes[e.childNodes.indexOf(r)-1];n&&Kn.isTextNode(n)?n.value+=t:Kn.insertBefore(e,p6(t),r)},adoptAttributes(e,t){let r=new Set(e.attrs.map(n=>n.name));for(let n=0;ne.startsWith(r))}function v6(e){return e.name===m6&&e.publicId===null&&(e.systemId===null||e.systemId===TK)}function g6(e){if(e.name!==m6)return mr.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===wK)return mr.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),SK.has(r))return mr.QUIRKS;let n=t===null?DK:d6;if(f6(r,n))return mr.QUIRKS;if(n=t===null?h6:CK,f6(r,n))return mr.LIMITED_QUIRKS}return mr.NO_QUIRKS}var x6={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},MK="definitionurl",OK="definitionURL",RK=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),FK=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:xe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:xe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:xe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:xe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:xe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:xe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:xe.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:xe.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:xe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:xe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:xe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:xe.XMLNS}]]),IK=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),BK=new Set([T.B,T.BIG,T.BLOCKQUOTE,T.BODY,T.BR,T.CENTER,T.CODE,T.DD,T.DIV,T.DL,T.DT,T.EM,T.EMBED,T.H1,T.H2,T.H3,T.H4,T.H5,T.H6,T.HEAD,T.HR,T.I,T.IMG,T.LI,T.LISTING,T.MENU,T.META,T.NOBR,T.OL,T.P,T.PRE,T.RUBY,T.S,T.SMALL,T.SPAN,T.STRONG,T.STRIKE,T.SUB,T.SUP,T.TABLE,T.TT,T.U,T.UL,T.VAR]);function b6(e){let t=e.tagID;return t===T.FONT&&e.attrs.some(({name:n})=>n===In.COLOR||n===In.SIZE||n===In.FACE)||BK.has(t)}function w1(e){for(let t=0;t0&&this._setContextModes(t,r)}onItemPop(t,r){var n,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(n=this.treeAdapter).onItemPop)===null||a===void 0||a.call(n,t,this.openElements.current),r){let i,o;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,o=this.fragmentContextID):{current:i,currentTagId:o}=this.openElements,this._setContextModes(i,o)}}_setContextModes(t,r){let n=t===this.document||this.treeAdapter.getNamespaceURI(t)===xe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,xe.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=J.TEXT}switchToPlaintextParsing(){this.insertionMode=J.TEXT,this.originalInsertionMode=J.IN_BODY,this.tokenizer.state=yr.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===le.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==xe.HTML))switch(this.fragmentContextID){case T.TITLE:case T.TEXTAREA:{this.tokenizer.state=yr.RCDATA;break}case T.STYLE:case T.XMP:case T.IFRAME:case T.NOEMBED:case T.NOFRAMES:case T.NOSCRIPT:{this.tokenizer.state=yr.RAWTEXT;break}case T.SCRIPT:{this.tokenizer.state=yr.SCRIPT_DATA;break}case T.PLAINTEXT:{this.tokenizer.state=yr.PLAINTEXT;break}default:}}_setDocumentType(t){let r=t.name||"",n=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,a),t.location){let o=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){let n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{let n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n,t)}}_appendElement(t,r){let n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){let n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){let n=this.treeAdapter.createElement(t,xe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){let r=this.treeAdapter.createElement(t.tagName,xe.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let t=this.treeAdapter.createElement(le.HTML,xe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,T.HTML)}_appendCommentNode(t,r){let n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;let a=this.treeAdapter.getChildNodes(r),i=n?a.lastIndexOf(n):a.length,o=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){let{endLine:u,endCol:s,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:u,endCol:s,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){let n=r.location,a=this.treeAdapter.getTagName(t),i=r.type===dt.END_TAG&&a===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===T.SVG&&this.treeAdapter.getTagName(r)===le.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===xe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===T.MGLYPH||t.tagID===T.MALIGNMARK)&&!this._isIntegrationPoint(n,r,xe.HTML)}_processToken(t){switch(t.type){case dt.CHARACTER:{this.onCharacter(t);break}case dt.NULL_CHARACTER:{this.onNullCharacter(t);break}case dt.COMMENT:{this.onComment(t);break}case dt.DOCTYPE:{this.onDoctype(t);break}case dt.START_TAG:{this._processStartTag(t);break}case dt.END_TAG:{this.onEndTag(t);break}case dt.EOF:{this.onEof(t);break}case dt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){let a=this.treeAdapter.getNamespaceURI(r),i=this.treeAdapter.getAttrList(r);return E6(t,a,i,n)}_reconstructActiveFormattingElements(){let t=this.activeFormattingElements.entries.length;if(t){let r=this.activeFormattingElements.entries.findIndex(a=>a.type===yn.Marker||this.openElements.contains(a.element)),n=r<0?t-1:r-1;for(let a=n;a>=0;a--){let i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=J.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(T.P),this.openElements.popUntilTagNamePopped(T.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case T.TR:{this.insertionMode=J.IN_ROW;return}case T.TBODY:case T.THEAD:case T.TFOOT:{this.insertionMode=J.IN_TABLE_BODY;return}case T.CAPTION:{this.insertionMode=J.IN_CAPTION;return}case T.COLGROUP:{this.insertionMode=J.IN_COLUMN_GROUP;return}case T.TABLE:{this.insertionMode=J.IN_TABLE;return}case T.BODY:{this.insertionMode=J.IN_BODY;return}case T.FRAMESET:{this.insertionMode=J.IN_FRAMESET;return}case T.SELECT:{this._resetInsertionModeForSelect(t);return}case T.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case T.HTML:{this.insertionMode=this.headElement?J.AFTER_HEAD:J.BEFORE_HEAD;return}case T.TD:case T.TH:{if(t>0){this.insertionMode=J.IN_CELL;return}break}case T.HEAD:{if(t>0){this.insertionMode=J.IN_HEAD;return}break}}this.insertionMode=J.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){let n=this.openElements.tagIDs[r];if(n===T.TEMPLATE)break;if(n===T.TABLE){this.insertionMode=J.IN_SELECT_IN_TABLE;return}}this.insertionMode=J.IN_SELECT}_isElementCausesFosterParenting(t){return D6.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){let r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case T.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===xe.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case T.TABLE:{let n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){let r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){let n=this.treeAdapter.getNamespaceURI(t);return A1[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gQ(this,t);return}switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{Ou(this,t);break}case J.BEFORE_HEAD:{Ru(this,t);break}case J.IN_HEAD:{Fu(this,t);break}case J.IN_HEAD_NO_SCRIPT:{Iu(this,t);break}case J.AFTER_HEAD:{Bu(this,t);break}case J.IN_BODY:case J.IN_CAPTION:case J.IN_CELL:case J.IN_TEMPLATE:{C6(this,t);break}case J.TEXT:case J.IN_SELECT:case J.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case J.IN_TABLE:case J.IN_TABLE_BODY:case J.IN_ROW:{S1(this,t);break}case J.IN_TABLE_TEXT:{I6(this,t);break}case J.IN_COLUMN_GROUP:{hf(this,t);break}case J.AFTER_BODY:{vf(this,t);break}case J.AFTER_AFTER_BODY:{df(this,t);break}default:}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){vQ(this,t);return}switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{Ou(this,t);break}case J.BEFORE_HEAD:{Ru(this,t);break}case J.IN_HEAD:{Fu(this,t);break}case J.IN_HEAD_NO_SCRIPT:{Iu(this,t);break}case J.AFTER_HEAD:{Bu(this,t);break}case J.TEXT:{this._insertCharacters(t);break}case J.IN_TABLE:case J.IN_TABLE_BODY:case J.IN_ROW:{S1(this,t);break}case J.IN_COLUMN_GROUP:{hf(this,t);break}case J.AFTER_BODY:{vf(this,t);break}case J.AFTER_AFTER_BODY:{df(this,t);break}default:}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){C1(this,t);return}switch(this.insertionMode){case J.INITIAL:case J.BEFORE_HTML:case J.BEFORE_HEAD:case J.IN_HEAD:case J.IN_HEAD_NO_SCRIPT:case J.AFTER_HEAD:case J.IN_BODY:case J.IN_TABLE:case J.IN_CAPTION:case J.IN_COLUMN_GROUP:case J.IN_TABLE_BODY:case J.IN_ROW:case J.IN_CELL:case J.IN_SELECT:case J.IN_SELECT_IN_TABLE:case J.IN_TEMPLATE:case J.IN_FRAMESET:case J.AFTER_FRAMESET:{C1(this,t);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}case J.AFTER_BODY:{XK(this,t);break}case J.AFTER_AFTER_BODY:case J.AFTER_AFTER_FRAMESET:{KK(this,t);break}default:}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case J.INITIAL:{WK(this,t);break}case J.BEFORE_HEAD:case J.IN_HEAD:case J.IN_HEAD_NO_SCRIPT:case J.AFTER_HEAD:{this._err(t,he.misplacedDoctype);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}default:}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,he.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?xQ(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{QK(this,t);break}case J.BEFORE_HEAD:{JK(this,t);break}case J.IN_HEAD:{Bn(this,t);break}case J.IN_HEAD_NO_SCRIPT:{rW(this,t);break}case J.AFTER_HEAD:{aW(this,t);break}case J.IN_BODY:{Er(this,t);break}case J.IN_TABLE:{Ho(this,t);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}case J.IN_CAPTION:{eQ(this,t);break}case J.IN_COLUMN_GROUP:{R1(this,t);break}case J.IN_TABLE_BODY:{bf(this,t);break}case J.IN_ROW:{yf(this,t);break}case J.IN_CELL:{nQ(this,t);break}case J.IN_SELECT:{P6(this,t);break}case J.IN_SELECT_IN_TABLE:{iQ(this,t);break}case J.IN_TEMPLATE:{sQ(this,t);break}case J.AFTER_BODY:{cQ(this,t);break}case J.IN_FRAMESET:{lQ(this,t);break}case J.AFTER_FRAMESET:{fQ(this,t);break}case J.AFTER_AFTER_BODY:{dQ(this,t);break}case J.AFTER_AFTER_FRAMESET:{hQ(this,t);break}default:}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?bQ(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{ZK(this,t);break}case J.BEFORE_HEAD:{eW(this,t);break}case J.IN_HEAD:{tW(this,t);break}case J.IN_HEAD_NO_SCRIPT:{nW(this,t);break}case J.AFTER_HEAD:{iW(this,t);break}case J.IN_BODY:{xf(this,t);break}case J.TEXT:{YW(this,t);break}case J.IN_TABLE:{Lu(this,t);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}case J.IN_CAPTION:{tQ(this,t);break}case J.IN_COLUMN_GROUP:{rQ(this,t);break}case J.IN_TABLE_BODY:{_1(this,t);break}case J.IN_ROW:{L6(this,t);break}case J.IN_CELL:{aQ(this,t);break}case J.IN_SELECT:{U6(this,t);break}case J.IN_SELECT_IN_TABLE:{oQ(this,t);break}case J.IN_TEMPLATE:{uQ(this,t);break}case J.AFTER_BODY:{q6(this,t);break}case J.IN_FRAMESET:{pQ(this,t);break}case J.AFTER_FRAMESET:{mQ(this,t);break}case J.AFTER_AFTER_BODY:{df(this,t);break}default:}}onEof(t){switch(this.insertionMode){case J.INITIAL:{_u(this,t);break}case J.BEFORE_HTML:{Ou(this,t);break}case J.BEFORE_HEAD:{Ru(this,t);break}case J.IN_HEAD:{Fu(this,t);break}case J.IN_HEAD_NO_SCRIPT:{Iu(this,t);break}case J.AFTER_HEAD:{Bu(this,t);break}case J.IN_BODY:case J.IN_TABLE:case J.IN_CAPTION:case J.IN_COLUMN_GROUP:case J.IN_TABLE_BODY:case J.IN_ROW:case J.IN_CELL:case J.IN_SELECT:case J.IN_SELECT_IN_TABLE:{R6(this,t);break}case J.TEXT:{jW(this,t);break}case J.IN_TABLE_TEXT:{Mu(this,t);break}case J.IN_TEMPLATE:{k6(this,t);break}case J.AFTER_BODY:case J.IN_FRAMESET:case J.AFTER_FRAMESET:case J.AFTER_AFTER_BODY:case J.AFTER_AFTER_FRAMESET:{O1(this,t);break}default:}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===G.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case J.IN_HEAD:case J.IN_HEAD_NO_SCRIPT:case J.AFTER_HEAD:case J.TEXT:case J.IN_COLUMN_GROUP:case J.IN_SELECT:case J.IN_SELECT_IN_TABLE:case J.IN_FRAMESET:case J.AFTER_FRAMESET:{this._insertCharacters(t);break}case J.IN_BODY:case J.IN_CAPTION:case J.IN_CELL:case J.IN_TEMPLATE:case J.AFTER_BODY:case J.AFTER_AFTER_BODY:case J.AFTER_AFTER_FRAMESET:{S6(this,t);break}case J.IN_TABLE:case J.IN_TABLE_BODY:case J.IN_ROW:{S1(this,t);break}case J.IN_TABLE_TEXT:{F6(this,t);break}default:}}};function zK(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):O6(e,t),r}function GK(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){let a=e.openElements.items[n];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[n])&&(r=a)}return r||(e.openElements.shortenToLength(n<0?0:n),e.activeFormattingElements.removeEntry(t)),r}function YK(e,t,r){let n=t,a=e.openElements.getCommonAncestor(t);for(let i=0,o=a;o!==r;i++,o=a){a=e.openElements.getCommonAncestor(o);let l=e.activeFormattingElements.getElementEntry(o),u=l&&i>=qK;!l||u?(u&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(o)):(o=jK(e,l),n===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(o,n),n=o)}return n}function jK(e,t){let r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function VK(e,t,r){let n=e.treeAdapter.getTagName(t),a=Va(n);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(r);else{let i=e.treeAdapter.getNamespaceURI(t);a===T.TEMPLATE&&i===xe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function $K(e,t,r){let n=e.treeAdapter.getNamespaceURI(r.element),{token:a}=r,i=e.treeAdapter.createElement(a.tagName,n,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,i,a.tagID)}function M1(e,t){for(let r=0;r=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(n);if(a&&!a.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let i=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(i);o&&!o.endTag&&e._setEndLocation(i,t)}}}}function WK(e,t){e._setDocumentType(t);let r=t.forceQuirks?mr.QUIRKS:g6(t);v6(t)||e._err(t,he.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=J.BEFORE_HTML}function _u(e,t){e._err(t,he.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,mr.QUIRKS),e.insertionMode=J.BEFORE_HTML,e._processToken(t)}function QK(e,t){t.tagID===T.HTML?(e._insertElement(t,xe.HTML),e.insertionMode=J.BEFORE_HEAD):Ou(e,t)}function ZK(e,t){let r=t.tagID;(r===T.HTML||r===T.HEAD||r===T.BODY||r===T.BR)&&Ou(e,t)}function Ou(e,t){e._insertFakeRootElement(),e.insertionMode=J.BEFORE_HEAD,e._processToken(t)}function JK(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.HEAD:{e._insertElement(t,xe.HTML),e.headElement=e.openElements.current,e.insertionMode=J.IN_HEAD;break}default:Ru(e,t)}}function eW(e,t){let r=t.tagID;r===T.HEAD||r===T.BODY||r===T.HTML||r===T.BR?Ru(e,t):e._err(t,he.endTagWithoutMatchingOpenElement)}function Ru(e,t){e._insertFakeElement(le.HEAD,T.HEAD),e.headElement=e.openElements.current,e.insertionMode=J.IN_HEAD,e._processToken(t)}function Bn(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.BASE:case T.BASEFONT:case T.BGSOUND:case T.LINK:case T.META:{e._appendElement(t,xe.HTML),t.ackSelfClosing=!0;break}case T.TITLE:{e._switchToTextParsing(t,yr.RCDATA);break}case T.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,yr.RAWTEXT):(e._insertElement(t,xe.HTML),e.insertionMode=J.IN_HEAD_NO_SCRIPT);break}case T.NOFRAMES:case T.STYLE:{e._switchToTextParsing(t,yr.RAWTEXT);break}case T.SCRIPT:{e._switchToTextParsing(t,yr.SCRIPT_DATA);break}case T.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=J.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(J.IN_TEMPLATE);break}case T.HEAD:{e._err(t,he.misplacedStartTagForHeadElement);break}default:Fu(e,t)}}function tW(e,t){switch(t.tagID){case T.HEAD:{e.openElements.pop(),e.insertionMode=J.AFTER_HEAD;break}case T.BODY:case T.BR:case T.HTML:{Fu(e,t);break}case T.TEMPLATE:{Di(e,t);break}default:e._err(t,he.endTagWithoutMatchingOpenElement)}}function Di(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==T.TEMPLATE&&e._err(t,he.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(T.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,he.endTagWithoutMatchingOpenElement)}function Fu(e,t){e.openElements.pop(),e.insertionMode=J.AFTER_HEAD,e._processToken(t)}function rW(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.BASEFONT:case T.BGSOUND:case T.HEAD:case T.LINK:case T.META:case T.NOFRAMES:case T.STYLE:{Bn(e,t);break}case T.NOSCRIPT:{e._err(t,he.nestedNoscriptInHead);break}default:Iu(e,t)}}function nW(e,t){switch(t.tagID){case T.NOSCRIPT:{e.openElements.pop(),e.insertionMode=J.IN_HEAD;break}case T.BR:{Iu(e,t);break}default:e._err(t,he.endTagWithoutMatchingOpenElement)}}function Iu(e,t){let r=t.type===dt.EOF?he.openElementsLeftAfterEof:he.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=J.IN_HEAD,e._processToken(t)}function aW(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.BODY:{e._insertElement(t,xe.HTML),e.framesetOk=!1,e.insertionMode=J.IN_BODY;break}case T.FRAMESET:{e._insertElement(t,xe.HTML),e.insertionMode=J.IN_FRAMESET;break}case T.BASE:case T.BASEFONT:case T.BGSOUND:case T.LINK:case T.META:case T.NOFRAMES:case T.SCRIPT:case T.STYLE:case T.TEMPLATE:case T.TITLE:{e._err(t,he.abandonedHeadElementChild),e.openElements.push(e.headElement,T.HEAD),Bn(e,t),e.openElements.remove(e.headElement);break}case T.HEAD:{e._err(t,he.misplacedStartTagForHeadElement);break}default:Bu(e,t)}}function iW(e,t){switch(t.tagID){case T.BODY:case T.HTML:case T.BR:{Bu(e,t);break}case T.TEMPLATE:{Di(e,t);break}default:e._err(t,he.endTagWithoutMatchingOpenElement)}}function Bu(e,t){e._insertFakeElement(le.BODY,T.BODY),e.insertionMode=J.IN_BODY,gf(e,t)}function gf(e,t){switch(t.type){case dt.CHARACTER:{C6(e,t);break}case dt.WHITESPACE_CHARACTER:{S6(e,t);break}case dt.COMMENT:{C1(e,t);break}case dt.START_TAG:{Er(e,t);break}case dt.END_TAG:{xf(e,t);break}case dt.EOF:{R6(e,t);break}default:}}function S6(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function C6(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function oW(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function sW(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function uW(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,xe.HTML),e.insertionMode=J.IN_FRAMESET)}function cW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML)}function lW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),wu(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,xe.HTML)}function pW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function fW(e,t){let r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),r||(e.formElement=e.openElements.current))}function mW(e,t){e.framesetOk=!1;let r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){let a=e.openElements.tagIDs[n];if(r===T.LI&&a===T.LI||(r===T.DD||r===T.DT)&&(a===T.DD||a===T.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==T.ADDRESS&&a!==T.DIV&&a!==T.P&&e._isSpecialElement(e.openElements.items[n],a))break}e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML)}function dW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),e.tokenizer.state=yr.PLAINTEXT}function hW(e,t){e.openElements.hasInScope(T.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(T.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.framesetOk=!1}function vW(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(le.A);r&&(M1(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gW(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xW(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(T.NOBR)&&(M1(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,xe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bW(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function yW(e,t){e.treeAdapter.getDocumentMode(e.document)!==mr.QUIRKS&&e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),e.framesetOk=!1,e.insertionMode=J.IN_TABLE}function _6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,xe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function M6(e){let t=sf(e,In.TYPE);return t!=null&&t.toLowerCase()===UK}function EW(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,xe.HTML),M6(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function AW(e,t){e._appendElement(t,xe.HTML),t.ackSelfClosing=!0}function NW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._appendElement(t,xe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TW(e,t){t.tagName=le.IMG,t.tagID=T.IMG,_6(e,t)}function wW(e,t){e._insertElement(t,xe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=yr.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=J.TEXT}function DW(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,yr.RAWTEXT)}function SW(e,t){e.framesetOk=!1,e._switchToTextParsing(t,yr.RAWTEXT)}function T6(e,t){e._switchToTextParsing(t,yr.RAWTEXT)}function CW(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===J.IN_TABLE||e.insertionMode===J.IN_CAPTION||e.insertionMode===J.IN_TABLE_BODY||e.insertionMode===J.IN_ROW||e.insertionMode===J.IN_CELL?J.IN_SELECT_IN_TABLE:J.IN_SELECT}function _W(e,t){e.openElements.currentTagId===T.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML)}function MW(e,t){e.openElements.hasInScope(T.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,xe.HTML)}function OW(e,t){e.openElements.hasInScope(T.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(T.RTC),e._insertElement(t,xe.HTML)}function RW(e,t){e._reconstructActiveFormattingElements(),w1(t),mf(t),t.selfClosing?e._appendElement(t,xe.MATHML):e._insertElement(t,xe.MATHML),t.ackSelfClosing=!0}function FW(e,t){e._reconstructActiveFormattingElements(),D1(t),mf(t),t.selfClosing?e._appendElement(t,xe.SVG):e._insertElement(t,xe.SVG),t.ackSelfClosing=!0}function w6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML)}function Er(e,t){switch(t.tagID){case T.I:case T.S:case T.B:case T.U:case T.EM:case T.TT:case T.BIG:case T.CODE:case T.FONT:case T.SMALL:case T.STRIKE:case T.STRONG:{gW(e,t);break}case T.A:{vW(e,t);break}case T.H1:case T.H2:case T.H3:case T.H4:case T.H5:case T.H6:{lW(e,t);break}case T.P:case T.DL:case T.OL:case T.UL:case T.DIV:case T.DIR:case T.NAV:case T.MAIN:case T.MENU:case T.ASIDE:case T.CENTER:case T.FIGURE:case T.FOOTER:case T.HEADER:case T.HGROUP:case T.DIALOG:case T.DETAILS:case T.ADDRESS:case T.ARTICLE:case T.SECTION:case T.SUMMARY:case T.FIELDSET:case T.BLOCKQUOTE:case T.FIGCAPTION:{cW(e,t);break}case T.LI:case T.DD:case T.DT:{mW(e,t);break}case T.BR:case T.IMG:case T.WBR:case T.AREA:case T.EMBED:case T.KEYGEN:{_6(e,t);break}case T.HR:{NW(e,t);break}case T.RB:case T.RTC:{MW(e,t);break}case T.RT:case T.RP:{OW(e,t);break}case T.PRE:case T.LISTING:{pW(e,t);break}case T.XMP:{DW(e,t);break}case T.SVG:{FW(e,t);break}case T.HTML:{oW(e,t);break}case T.BASE:case T.LINK:case T.META:case T.STYLE:case T.TITLE:case T.SCRIPT:case T.BGSOUND:case T.BASEFONT:case T.TEMPLATE:{Bn(e,t);break}case T.BODY:{sW(e,t);break}case T.FORM:{fW(e,t);break}case T.NOBR:{xW(e,t);break}case T.MATH:{RW(e,t);break}case T.TABLE:{yW(e,t);break}case T.INPUT:{EW(e,t);break}case T.PARAM:case T.TRACK:case T.SOURCE:{AW(e,t);break}case T.IMAGE:{TW(e,t);break}case T.BUTTON:{hW(e,t);break}case T.APPLET:case T.OBJECT:case T.MARQUEE:{bW(e,t);break}case T.IFRAME:{SW(e,t);break}case T.SELECT:{CW(e,t);break}case T.OPTION:case T.OPTGROUP:{_W(e,t);break}case T.NOEMBED:{T6(e,t);break}case T.FRAMESET:{uW(e,t);break}case T.TEXTAREA:{wW(e,t);break}case T.NOSCRIPT:{e.options.scriptingEnabled?T6(e,t):w6(e,t);break}case T.PLAINTEXT:{dW(e,t);break}case T.COL:case T.TH:case T.TD:case T.TR:case T.HEAD:case T.FRAME:case T.TBODY:case T.TFOOT:case T.THEAD:case T.CAPTION:case T.COLGROUP:break;default:w6(e,t)}}function IW(e,t){if(e.openElements.hasInScope(T.BODY)&&(e.insertionMode=J.AFTER_BODY,e.options.sourceCodeLocationInfo)){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function BW(e,t){e.openElements.hasInScope(T.BODY)&&(e.insertionMode=J.AFTER_BODY,q6(e,t))}function LW(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function PW(e){let t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(T.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(T.FORM):r&&e.openElements.remove(r))}function UW(e){e.openElements.hasInButtonScope(T.P)||e._insertFakeElement(le.P,T.P),e._closePElement()}function kW(e){e.openElements.hasInListItemScope(T.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(T.LI),e.openElements.popUntilTagNamePopped(T.LI))}function qW(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function HW(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zW(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function GW(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(le.BR,T.BR),e.openElements.pop(),e.framesetOk=!1}function O6(e,t){let r=t.tagName,n=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){let i=e.openElements.items[a],o=e.openElements.tagIDs[a];if(n===o&&(n!==T.UNKNOWN||e.treeAdapter.getTagName(i)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,o))break}}function xf(e,t){switch(t.tagID){case T.A:case T.B:case T.I:case T.S:case T.U:case T.EM:case T.TT:case T.BIG:case T.CODE:case T.FONT:case T.NOBR:case T.SMALL:case T.STRIKE:case T.STRONG:{M1(e,t);break}case T.P:{UW(e);break}case T.DL:case T.UL:case T.OL:case T.DIR:case T.DIV:case T.NAV:case T.PRE:case T.MAIN:case T.MENU:case T.ASIDE:case T.BUTTON:case T.CENTER:case T.FIGURE:case T.FOOTER:case T.HEADER:case T.HGROUP:case T.DIALOG:case T.ADDRESS:case T.ARTICLE:case T.DETAILS:case T.SECTION:case T.SUMMARY:case T.LISTING:case T.FIELDSET:case T.BLOCKQUOTE:case T.FIGCAPTION:{LW(e,t);break}case T.LI:{kW(e);break}case T.DD:case T.DT:{qW(e,t);break}case T.H1:case T.H2:case T.H3:case T.H4:case T.H5:case T.H6:{HW(e);break}case T.BR:{GW(e);break}case T.BODY:{IW(e,t);break}case T.HTML:{BW(e,t);break}case T.FORM:{PW(e);break}case T.APPLET:case T.OBJECT:case T.MARQUEE:{zW(e,t);break}case T.TEMPLATE:{Di(e,t);break}default:O6(e,t)}}function R6(e,t){e.tmplInsertionModeStack.length>0?k6(e,t):O1(e,t)}function YW(e,t){var r;t.tagID===T.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function jW(e,t){e._err(t,he.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function S1(e,t){if(D6.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=J.IN_TABLE_TEXT,t.type){case dt.CHARACTER:{I6(e,t);break}case dt.WHITESPACE_CHARACTER:{F6(e,t);break}}else Pu(e,t)}function VW(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,xe.HTML),e.insertionMode=J.IN_CAPTION}function $W(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,xe.HTML),e.insertionMode=J.IN_COLUMN_GROUP}function XW(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(le.COLGROUP,T.COLGROUP),e.insertionMode=J.IN_COLUMN_GROUP,R1(e,t)}function KW(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,xe.HTML),e.insertionMode=J.IN_TABLE_BODY}function WW(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(le.TBODY,T.TBODY),e.insertionMode=J.IN_TABLE_BODY,bf(e,t)}function QW(e,t){e.openElements.hasInTableScope(T.TABLE)&&(e.openElements.popUntilTagNamePopped(T.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ZW(e,t){M6(t)?e._appendElement(t,xe.HTML):Pu(e,t),t.ackSelfClosing=!0}function JW(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,xe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ho(e,t){switch(t.tagID){case T.TD:case T.TH:case T.TR:{WW(e,t);break}case T.STYLE:case T.SCRIPT:case T.TEMPLATE:{Bn(e,t);break}case T.COL:{XW(e,t);break}case T.FORM:{JW(e,t);break}case T.TABLE:{QW(e,t);break}case T.TBODY:case T.TFOOT:case T.THEAD:{KW(e,t);break}case T.INPUT:{ZW(e,t);break}case T.CAPTION:{VW(e,t);break}case T.COLGROUP:{$W(e,t);break}default:Pu(e,t)}}function Lu(e,t){switch(t.tagID){case T.TABLE:{e.openElements.hasInTableScope(T.TABLE)&&(e.openElements.popUntilTagNamePopped(T.TABLE),e._resetInsertionMode());break}case T.TEMPLATE:{Di(e,t);break}case T.BODY:case T.CAPTION:case T.COL:case T.COLGROUP:case T.HTML:case T.TBODY:case T.TD:case T.TFOOT:case T.TH:case T.THEAD:case T.TR:break;default:Pu(e,t)}}function Pu(e,t){let r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,gf(e,t),e.fosterParentingEnabled=r}function F6(e,t){e.pendingCharacterTokens.push(t)}function I6(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Mu(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r0&&e.openElements.currentTagId===T.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===T.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===T.OPTGROUP&&e.openElements.pop();break}case T.OPTION:{e.openElements.currentTagId===T.OPTION&&e.openElements.pop();break}case T.SELECT:{e.openElements.hasInSelectScope(T.SELECT)&&(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode());break}case T.TEMPLATE:{Di(e,t);break}default:}}function iQ(e,t){let r=t.tagID;r===T.CAPTION||r===T.TABLE||r===T.TBODY||r===T.TFOOT||r===T.THEAD||r===T.TR||r===T.TD||r===T.TH?(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode(),e._processStartTag(t)):P6(e,t)}function oQ(e,t){let r=t.tagID;r===T.CAPTION||r===T.TABLE||r===T.TBODY||r===T.TFOOT||r===T.THEAD||r===T.TR||r===T.TD||r===T.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode(),e.onEndTag(t)):U6(e,t)}function sQ(e,t){switch(t.tagID){case T.BASE:case T.BASEFONT:case T.BGSOUND:case T.LINK:case T.META:case T.NOFRAMES:case T.SCRIPT:case T.STYLE:case T.TEMPLATE:case T.TITLE:{Bn(e,t);break}case T.CAPTION:case T.COLGROUP:case T.TBODY:case T.TFOOT:case T.THEAD:{e.tmplInsertionModeStack[0]=J.IN_TABLE,e.insertionMode=J.IN_TABLE,Ho(e,t);break}case T.COL:{e.tmplInsertionModeStack[0]=J.IN_COLUMN_GROUP,e.insertionMode=J.IN_COLUMN_GROUP,R1(e,t);break}case T.TR:{e.tmplInsertionModeStack[0]=J.IN_TABLE_BODY,e.insertionMode=J.IN_TABLE_BODY,bf(e,t);break}case T.TD:case T.TH:{e.tmplInsertionModeStack[0]=J.IN_ROW,e.insertionMode=J.IN_ROW,yf(e,t);break}default:e.tmplInsertionModeStack[0]=J.IN_BODY,e.insertionMode=J.IN_BODY,Er(e,t)}}function uQ(e,t){t.tagID===T.TEMPLATE&&Di(e,t)}function k6(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(T.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):O1(e,t)}function cQ(e,t){t.tagID===T.HTML?Er(e,t):vf(e,t)}function q6(e,t){var r;if(t.tagID===T.HTML){if(e.fragmentContext||(e.insertionMode=J.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===T.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else vf(e,t)}function vf(e,t){e.insertionMode=J.IN_BODY,gf(e,t)}function lQ(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.FRAMESET:{e._insertElement(t,xe.HTML);break}case T.FRAME:{e._appendElement(t,xe.HTML),t.ackSelfClosing=!0;break}case T.NOFRAMES:{Bn(e,t);break}default:}}function pQ(e,t){t.tagID===T.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==T.FRAMESET&&(e.insertionMode=J.AFTER_FRAMESET))}function fQ(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.NOFRAMES:{Bn(e,t);break}default:}}function mQ(e,t){t.tagID===T.HTML&&(e.insertionMode=J.AFTER_AFTER_FRAMESET)}function dQ(e,t){t.tagID===T.HTML?Er(e,t):df(e,t)}function df(e,t){e.insertionMode=J.IN_BODY,gf(e,t)}function hQ(e,t){switch(t.tagID){case T.HTML:{Er(e,t);break}case T.NOFRAMES:{Bn(e,t);break}default:}}function vQ(e,t){t.chars=Bt,e._insertCharacters(t)}function gQ(e,t){e._insertCharacters(t),e.framesetOk=!1}function H6(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==xe.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function xQ(e,t){if(b6(t))H6(e),e._startTagOutsideForeignContent(t);else{let r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===xe.MATHML?w1(t):n===xe.SVG&&(y6(t),D1(t)),mf(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function bQ(e,t){if(t.tagID===T.P||t.tagID===T.BR){H6(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){let n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===xe.HTML){e._endTagOutsideForeignContent(t);break}let a=e.treeAdapter.getTagName(n);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(r);break}}}var yQ=new Set([le.AREA,le.BASE,le.BASEFONT,le.BGSOUND,le.BR,le.COL,le.EMBED,le.FRAME,le.HR,le.IMG,le.INPUT,le.KEYGEN,le.LINK,le.META,le.PARAM,le.SOURCE,le.TRACK,le.WBR]);function EQ(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===xe.HTML&&yQ.has(t.treeAdapter.getTagName(e))}var AQ={treeAdapter:Kn,scriptingEnabled:!0};function F1(e,t){let r={...AQ,...t};return z6(e,r)}function NQ(e,t){let r="",n=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===le.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===xe.HTML?t.treeAdapter.getTemplateContent(e):e,a=t.treeAdapter.getChildNodes(n);if(a)for(let i of a)r+=z6(i,t);return r}function z6(e,t){return t.treeAdapter.isElementNode(e)?TQ(e,t):t.treeAdapter.isTextNode(e)?DQ(e,t):t.treeAdapter.isCommentNode(e)?SQ(e,t):t.treeAdapter.isDocumentTypeNode(e)?CQ(e,t):""}function TQ(e,t){let r=t.treeAdapter.getTagName(e);return`<${r}${wQ(e,t)}>${EQ(e,t)?"":`${NQ(e,t)}`}`}function wQ(e,{treeAdapter:t}){let r="";for(let n of t.getAttrList(e)){if(r+=" ",!n.namespace)r+=n.name;else switch(n.namespace){case xe.XML:{r+=`xml:${n.name}`;break}case xe.XMLNS:{n.name!=="xmlns"&&(r+="xmlns:"),r+=n.name;break}case xe.XLINK:{r+=`xlink:${n.name}`;break}default:r+=`${n.prefix}:${n.name}`}r+=`="${So(n.value)}"`}return r}function DQ(e,t){let{treeAdapter:r}=t,n=r.getTextNodeContent(e),a=r.getParentNode(e),i=a&&r.isElementNode(a)&&r.getTagName(a);return i&&r.getNamespaceURI(a)===xe.HTML&&N1(i,t.scriptingEnabled)?n:Co(n)}function SQ(e,{treeAdapter:t}){return``}function CQ(e,{treeAdapter:t}){return``}function G6(e,t){return qo.parse(e,t)}function Y6(e,t,r){typeof e=="string"&&(r=t,t=e,e=null);let n=qo.getFragmentParser(e,r);return n.tokenizer.write(t,!0),n.getFragment()}function j6(e){return new $n(e)}function V6(e){let t=e.includes('"')?"'":'"';return t+e+t}function _Q(e,t,r){let n="!DOCTYPE ";return e&&(n+=e),t?n+=` PUBLIC ${V6(t)}`:r&&(n+=" SYSTEM"),r&&(n+=` ${V6(r)}`),n}var Si={isCommentNode:Ai,isElementNode:$e,isTextNode:qr,createDocument(){let e=new rn([]);return e["x-mode"]=uf.DOCUMENT_MODE.NO_QUIRKS,e},createDocumentFragment(){return new rn([])},createElement(e,t,r){let n=Object.create(null),a=Object.create(null),i=Object.create(null);for(let l=0;l_p(o)&&o.name==="!doctype");i?i.data=a??null:(i=new yi("!doctype",a),Si.appendChild(e,i)),i["x-name"]=t??void 0,i["x-publicId"]=r??void 0,i["x-systemId"]=n??void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){let t=e.parent.children.indexOf(e),{prev:r,next:n}=e;e.prev=null,e.next=null,r&&(r.next=n),n&&(n.prev=r),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){let r=e.children[e.children.length-1];r&&qr(r)?r.data+=t:Si.appendChild(e,j6(t))},insertTextBefore(e,t,r){let n=e.children[e.children.indexOf(r)-1];n&&qr(n)?n.data+=t:Si.insertBefore(e,j6(t),r)},adoptAttributes(e,t){for(let r=0;r"u"&&(e.attribs[n]=t[r].value,e["x-attribsNamespace"][n]=t[r].namespace,e["x-attribsPrefix"][n]=t[r].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return _p(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function $6(e,t,r,n){let a={scriptingEnabled:typeof t.scriptingEnabled=="boolean"?t.scriptingEnabled:!0,treeAdapter:Si,sourceCodeLocationInfo:t.sourceCodeLocationInfo};return r?G6(e,a):Y6(n,e,a)}var MQ={treeAdapter:Si};function X6(e){let t="length"in e?e:[e];for(let n=0;n=Ye.Zero&&e<=Ye.Nine}function OQ(e){return e>=Ye.LowerA&&e<=Ye.LowerZ||e>=Ye.UpperA&&e<=Ye.UpperZ}function RQ(e){return e>=Ye.UpperA&&e<=Ye.UpperF||e>=Ye.LowerA&&e<=Ye.LowerF}var Ln;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Ln||(Ln={}));var Yr={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},zo=class{constructor({xmlMode:t=!1,decodeEntities:r=!0},n){this.cbs=n,this.state=we.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=we.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=t,this.decodeEntities=r,this.entityTrie=t?Mp:vn}reset(){this.state=we.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=we.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=we.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===Ye.Amp&&(this.state=we.BeforeEntity)}stateSpecialStartSequence(t){let r=this.sequenceIndex===this.currentSequence.length;if(!(r?Ef(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!r){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=we.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===Ye.Gt||ha(t)){let r=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&t!==Ye.Semi)this.trieIndex+=n;else{let a=this.index-this.entityExcess+1;a>this.sectionStart&&this.emitPartial(this.sectionStart,a),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,n===0&&this.emitNamedEntity()}}}emitNamedEntity(){if(this.state=this.baseState,this.entityResult===0)return;switch((this.entityTrie[this.entityResult]&Cr.VALUE_LENGTH)>>14){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~Cr.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(t){(t|32)===Ye.LowerX?(this.entityExcess++,this.state=we.InHexEntity):(this.state=we.InNumericEntity,this.stateInNumericEntity(t))}emitNumericEntity(t){let r=this.index-this.entityExcess-1;r+2+ +(this.state===we.InHexEntity)!==this.index&&(r>this.sectionStart&&this.emitPartial(this.sectionStart,r),this.sectionStart=this.index+Number(t),this.emitCodePoint(fu(this.entityResult))),this.state=this.baseState}stateInNumericEntity(t){t===Ye.Semi?this.emitNumericEntity(!0):K6(t)?(this.entityResult=this.entityResult*10+(t-Ye.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(t){t===Ye.Semi?this.emitNumericEntity(!0):K6(t)?(this.entityResult=this.entityResult*16+(t-Ye.Zero),this.entityExcess++):RQ(t)?(this.entityResult=this.entityResult*16+((t|32)-Ye.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===we.Text||this.baseState===we.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===we.Text||this.state===we.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===we.InAttributeValueDq||this.state===we.InAttributeValueSq||this.state===we.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index0&&o.has(this.stack[this.stack.length-1]);){let l=this.stack.pop();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,l,!0)}this.isVoidElement(t)||(this.stack.push(t),J6.has(t)?this.foreignContext.push(!0):e4.has(t)&&this.foreignContext.push(!1)),(i=(a=this.cbs).onopentagname)===null||i===void 0||i.call(a,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,r){var n,a,i,o,l,u;this.endIndex=r;let s=this.getSlice(t,r);if(this.lowerCaseTagNames&&(s=s.toLowerCase()),(J6.has(s)||e4.has(s))&&this.foreignContext.pop(),this.isVoidElement(s))!this.options.xmlMode&&s==="br"&&((a=(n=this.cbs).onopentagname)===null||a===void 0||a.call(n,"br"),(o=(i=this.cbs).onopentag)===null||o===void 0||o.call(i,"br",{},!0),(u=(l=this.cbs).onclosetag)===null||u===void 0||u.call(l,"br",!1));else{let c=this.stack.lastIndexOf(s);if(c!==-1)if(this.cbs.onclosetag){let p=this.stack.length-c;for(;p--;)this.cbs.onclosetag(this.stack.pop(),p!==0)}else this.stack.length=c;else!this.options.xmlMode&&s==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1}onselfclosingtag(t){this.endIndex=t,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var r,n;let a=this.tagname;this.endOpenTag(t),this.stack[this.stack.length-1]===a&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,a,!t),this.stack.pop())}onattribname(t,r){this.startIndex=t;let n=this.getSlice(t,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(t,r){this.attribvalue+=this.getSlice(t,r)}onattribentity(t){this.attribvalue+=Do(t)}onattribend(t,r){var n,a;this.endIndex=r,(a=(n=this.cbs).onattribute)===null||a===void 0||a.call(n,this.attribname,this.attribvalue,t===Ln.Double?'"':t===Ln.Single?"'":t===Ln.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){let r=t.search(BQ),n=r<0?t:t.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(t,r){this.endIndex=r;let n=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let a=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${a}`,`!${n}`)}this.startIndex=r+1}onprocessinginstruction(t,r){this.endIndex=r;let n=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let a=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${a}`,`?${n}`)}this.startIndex=r+1}oncomment(t,r,n){var a,i,o,l;this.endIndex=r,(i=(a=this.cbs).oncomment)===null||i===void 0||i.call(a,this.getSlice(t,r-n)),(l=(o=this.cbs).oncommentend)===null||l===void 0||l.call(o),this.startIndex=r+1}oncdata(t,r,n){var a,i,o,l,u,s,c,p,f,m;this.endIndex=r;let h=this.getSlice(t,r-n);this.options.xmlMode||this.options.recognizeCDATA?((i=(a=this.cbs).oncdatastart)===null||i===void 0||i.call(a),(l=(o=this.cbs).ontext)===null||l===void 0||l.call(o,h),(s=(u=this.cbs).oncdataend)===null||s===void 0||s.call(u)):((p=(c=this.cbs).oncomment)===null||p===void 0||p.call(c,`[CDATA[${h}]]`),(m=(f=this.cbs).oncommentend)===null||m===void 0||m.call(f)),this.startIndex=r+1}onend(){var t,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(r=(t=this.cbs).onend)===null||r===void 0||r.call(t)}reset(){var t,r,n,a;(r=(t=this.cbs).onreset)===null||r===void 0||r.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(n=this.cbs).onparserinit)===null||a===void 0||a.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,r){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(t-this.bufferOffset,r-this.bufferOffset);for(;r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndext.xmlMode||t._useHtmlParser2?t4(e,t):$6(e,t,r,n)),PQ=t6(LQ,(e,t)=>t.xmlMode||t._useHtmlParser2?Fp(e,t):X6(e)),dr=PQ([]),{contains:Sqe}=Ha,{merge:Cqe}=Ha,{parseHTML:_qe}=Ha,{root:Mqe}=Ha;var Lqe=new r4.XMLParser,UQ={\u963F\u8054\u914B\u8FEA\u62C9\u59C6:"AED",\u6FB3\u5927\u5229\u4E9A\u5143:"AUD",\u5DF4\u897F\u91CC\u4E9A\u5C14:"BRL",\u52A0\u62FF\u5927\u5143:"CAD",\u745E\u58EB\u6CD5\u90CE:"CHF",\u4E39\u9EA6\u514B\u6717:"DKK",\u6B27\u5143:"EUR",\u82F1\u9551:"GBP",\u6E2F\u5E01:"HKD",\u5370\u5C3C\u5362\u6BD4:"IDR",\u5370\u5EA6\u5362\u6BD4:"INR",\u65E5\u5143:"JPY",\u97E9\u56FD\u5143:"KRW",\u6FB3\u95E8\u5143:"MOP",\u6797\u5409\u7279:"MYR",\u632A\u5A01\u514B\u6717:"NOK",\u65B0\u897F\u5170\u5143:"NZD",\u83F2\u5F8B\u5BBE\u6BD4\u7D22:"PHP",\u5362\u5E03:"RUB",\u6C99\u7279\u91CC\u4E9A\u5C14:"SAR",\u745E\u5178\u514B\u6717:"SEK",\u65B0\u52A0\u5761\u5143:"SGD",\u6CF0\u56FD\u94E2:"THB",\u571F\u8033\u5176\u91CC\u62C9:"TRY",\u65B0\u53F0\u5E01:"TWD",\u7F8E\u5143:"USD",\u5357\u975E\u5170\u7279:"ZAR"};var kQ=async()=>(await Promise.all(["index.html","index_1.html","index_2.html","index_3.html","index_4.html","index_5.html","index_6.html","index_7.html","index_8.html","index_9.html"].map(async t=>{let r=await Je.get(`https://www.boc.cn/sourcedb/whpj/${t}`,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),n=dr.load(r.data);return Array.from(new Set(n("div.publish table tbody tr").slice(2).toArray().map(a=>{let i=n(a),o=i.find("td:nth-child(1)").text(),l=UQ[o]||"",u=i.find("td:nth-child(7)").text(),s=i.find("td:nth-child(2)").text(),c=i.find("td:nth-child(3)").text(),p=i.find("td:nth-child(4)").text(),f=i.find("td:nth-child(5)").text(),m={currency:{from:l,to:"CNY"},rate:{buy:{},sell:{},middle:parseFloat(i.find("td:nth-child(6)").text())},updated:new Date(u+" UTC+8"),unit:100};return s&&(m.rate.buy.remit=parseFloat(s)),c&&(m.rate.buy.cash=parseFloat(c)),p&&(m.rate.sell.remit=parseFloat(p)),f&&(m.rate.sell.cash=parseFloat(f)),m}))).sort()}))).flat().sort(),n4=kQ;var a4={"\u4EBA\u6C11\u5E63(\u5728\u5CB8)":"CNY",\u4EBA\u6C11\u5E63:"CNY","\u4EBA\u6C11\u5E63(\u96E2\u5CB8)":"CNH",\u7F8E\u5143:"USD",\u82F1\u938A:"GBP",\u65E5\u5713:"JPY",\u6FB3\u5143:"AUD",\u7D10\u5143:"NZD",\u52A0\u5143:"CAD",\u6B50\u7F85:"EUR",\u745E\u58EB\u6CD5\u90CE:"CHF",\u4E39\u9EA5\u514B\u90CE:"DKK",\u632A\u5A01\u514B\u90CE:"NOK",\u745E\u5178\u514B\u90CE:"SEK",\u65B0\u52A0\u5761\u5143:"SGD",\u6CF0\u570B\u9296:"THB",\u6587\u840A\u5143:"BND",\u5357\u975E\u862D\u7279:"ZAR",\u5370\u5C3C\u76FE:"IDR",\u7D10\u897F\u862D\u5143:"NZD",\u52A0\u62FF\u5927\u5143:"CAD",\u5370\u5EA6\u76E7\u6BD4:"INR",\u97D3\u570B\u571C:"KRW",\u6FB3\u9580\u5143:"MOP",\u83F2\u5F8B\u8CD3\u5F7C\u7D22:"PHP",\u4FC4\u7F85\u65AF\u76E7\u5E03:"RUB",\u65B0\u53F0\u5E63:"TWD"},i4=async e=>{let t={},r=await Je.get(e,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),n=dr.load(r.data),a=new Date(n(n("div.form_area table tbody tr").toArray().at(-2)).text().trim().split("\uFF1A")[1].replaceAll(` +`,"").replaceAll(" ","")+" UTC+8");return Array.from(new Set(n("div.form_area table tbody tr").slice(2).slice(0,-2).toArray().map(i=>{let o=n(i),l=o.find("td:nth-child(1)").text().trim();a4[l]||console.error("Unknown currency:",l);let u=a4[l]||"unknown",s=o.find("td:nth-child(2)").text().trim(),c=o.find("td:nth-child(3)").text().trim();t[u]={buy:parseFloat(s),sell:parseFloat(c),updatedDate:a}}))),t},qQ=()=>i4("https://www.bochk.com/whk/rates/exchangeRatesHKD/exchangeRatesHKD-input.action?lang=hk"),HQ=()=>i4("https://www.bochk.com/whk/rates/exchangeRatesForCurrency/exchangeRatesForCurrency-input.action?lang=hk"),zQ=async()=>{let e=await Promise.all([HQ(),qQ()]);return Array.from(new Set(e.map(r=>Object.keys(r)).flat())).map(r=>{let n=e[0][r],a=e[1][r],i=new Date;n&&(i=n.updatedDate),a&&(i=a.updatedDate),n&&a&&(i=n.updatedDate>a.updatedDate?n.updatedDate:a.updatedDate);let o={currency:{from:r,to:"HKD"},updated:i,rate:{buy:{},sell:{}},unit:1};return n&&(o.rate.buy.cash=n.buy,o.rate.sell.cash=n.sell),a&&(o.rate.buy.remit=a.buy,o.rate.sell.remit=a.sell),o}).sort()},o4=zQ;var GQ=async()=>{let t=(await Je.get("http://papi.icbc.com.cn/exchanges/ns/getLatest",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data,r=[];if(t.code!=0)throw new Error("Get ICBC FX Rates failed.");return t.data.forEach(n=>{r.push({currency:{from:n.currencyENName,to:"CNY"},rate:{buy:{remit:n.foreignBuy,cash:n.cashBuy},sell:{remit:n.foreignSell,cash:n.cashSell},middle:n.reference},unit:100,updated:new Date(`${n.publishDate} ${n.publishTime} UTC+8`)})}),r.sort()},s4=GQ;var l4=Le(require("crypto"),1),p4=Le(require("https"),1);var u4={httpsAgent:new p4.default.Agent({secureOptions:l4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},f4=async()=>{let e=await Je.get("https://personalbank.cib.com.cn/pers/main/pubinfo/ifxQuotationQuery.do",{...u4,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=await Je.get(`https://personalbank.cib.com.cn/pers/main/pubinfo/ifxQuotationQuery/list?_search=false&dataSet.nd=${Date.now()}&dataSet.rows=80&dataSet.page=1&dataSet.sidx=&dataSet.sord=asc`,{...u4,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest",Cookie:e.headers["set-cookie"].map(i=>i.split(";")[0]).join("; ")}}),r=[];if(t.status!=200||e.status!=200)throw new Error("Get CIB FX Rates failed.");let n=dr.load(e.data),a=new Date(n(n(".labe_text")[0]).text().replaceAll(` + `,"").replaceAll(" ","").replaceAll("\u65E5\u671F\uFF1A ","").replaceAll("\u5E74","-").replaceAll("\u6708","-").replaceAll("\u65E5","").split(" ").filter((i,o)=>o!=1).join(" ")+" UTC+8");return t.data.rows.forEach(i=>{i=i.cell;let o={currency:{from:i[1],to:"CNY"},unit:parseFloat(i[2]),updated:a,rate:{buy:{remit:parseFloat(i[3]),cash:parseFloat(i[5])},sell:{remit:parseFloat(i[4]),cash:parseFloat(i[6])},middle:void 0}};o.rate.middle=(o.rate.buy.remit+o.rate.sell.remit+o.rate.buy.cash+o.rate.sell.cash)/4,r.push(o)}),r};function c4(e,t){let r=uo(bx(jn(e),jn(t)),2),n=xx(jn(e),r);return ip(xx(e,uo(n,2)),2)}var m4=async()=>(await f4()).map(t=>{let r=JSON.parse(JSON.stringify(t.rate));return t.rate.buy.remit=c4(r.buy.remit,r.sell.remit),t.rate.sell.remit=c4(r.sell.remit,r.buy.remit),t.rate.buy.cash=TM(r.buy.cash,t.rate.buy.remit),t.rate.sell.cash=NM(r.sell.cash,t.rate.sell.remit),t.rate.middle=uo(bx(t.rate.buy.remit,t.rate.sell.remit,t.rate.buy.cash,t.rate.sell.cash),4),t}).sort(),d4=f4;var h4=Le(Ib(),1);var YQ=new h4.XMLParser,jQ={840:{name:"USD"},978:{name:"EUR"},826:{name:"GBP"},392:{name:"JPY"},344:{name:"HKD"},36:{name:"AUD"},124:{name:"CAD"},756:{name:"CHF"},702:{name:"SGD"},208:{name:"DKK"},578:{name:"NOK"},752:{name:"SEK"},410:{name:"KRW"},554:{name:"NZD"},446:{name:"MOP"},710:{name:"ZAR"},764:{name:"THB"},458:{name:"MYR"},643:{name:"RUB"},398:{name:"KZT"}},VQ=async()=>{let e=await Je.get("http://www.ccb.com/cn/home/news/jshckpj_new.xml",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}});return YQ.parse(e.data).ReferencePriceSettlements.ReferencePriceSettlement.map(n=>({currency:{from:jQ[n.Ofrd_Ccy_CcyCd].name,to:"CNY"},rate:{buy:{cash:n.BidRateOfCash,remit:n.BidRateOfCcy},sell:{cash:n.OfrRateOfCash,remit:n.OfrRateOfCcy},middle:n.Mdl_ExRt_Prc},unit:1,updated:new Date(((a,i)=>{let o=a.toString().split(""),l=i.toString().padStart(6,"0").split("");return o.splice(4,0,"-"),o.splice(7,0,"-"),l.splice(2,0,":"),l.splice(5,0,":"),`${o.join("")} ${l.join("")} UTC+8`})(n.LstPr_Dt,n.LstPr_Tm))})).sort()},v4=VQ;var g4=Le(require("crypto"),1),x4=Le(require("https"),1),$Q={httpsAgent:new x4.default.Agent({secureOptions:g4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},XQ={14:{name:"USD"},13:{name:"HKD"},38:{name:"EUR"},27:{name:"JPY"},12:{name:"GBP"},29:{name:"AUD"},28:{name:"CAD"},15:{name:"CHF"},88:{name:"KRW"},81:{name:"MOP"},18:{name:"SGD"},84:{name:"THB"},22:{name:"DKK"},23:{name:"NOK"},21:{name:"SEK"},79:{name:"TJS"},64:{name:"VND"},68:{name:"KZT"},70:{name:"RUB"},71:{name:"ZAR"},73:{name:"MNT"},74:{name:"LAK"},78:{name:"AED"},87:{name:"NZD"}},KQ=async()=>(await Je.get("https://ewealth.abchina.com/app/data/api/DataService/ExchangeRateV2",{...$Q,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.Data.Table.map(r=>({currency:{from:XQ[r.CurrId].name,to:"CNY"},rate:{buy:{remit:parseFloat(r.BuyingPrice),cash:parseFloat(r.CashBuyingPrice)},sell:{remit:parseFloat(r.SellPrice),cash:parseFloat(r.SellPrice)},middle:parseFloat(r.BenchMarkPrice)},updated:new Date(r.PublishTime),unit:100})).sort(),b4=KQ;var y4=Le(require("crypto"),1),E4=Le(require("https"),1);var WQ={httpsAgent:new E4.default.Agent({secureOptions:y4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},QQ=async()=>{let t=(await Je.get("http://www.bankcomm.com/SITE/queryExchangeResult.do",{...WQ,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.RSP_BODY.fileContent,r=dr.load(''+t+"
"),n=new Date(r('td[align="left"]').text().split("\uFF1A")[1]+" UTC+8");return r("tr.data").toArray().map(a=>{let i={currency:{from:r(r(a).children()[0]).text().split("(")[1].split("/")[0],to:"CNY"},rate:{buy:{},sell:{}},unit:parseInt(r(r(a).children()[1]).text()),updated:n};return r(r(a).children()[2]).text()!=="-"&&(i.rate.buy.remit=parseFloat(r(r(a).children()[2]).text())),r(r(a).children()[3]).text()!=="-"&&(i.rate.sell.remit=parseFloat(r(r(a).children()[3]).text())),r(r(a).children()[4]).text()!=="-"&&(i.rate.buy.cash=parseFloat(r(r(a).children()[4]).text())),r(r(a).children()[5]).text()!=="-"&&(i.rate.sell.cash=parseFloat(r(r(a).children()[5]).text())),i}).sort()},A4=QQ;function ku(e){let t=e.substring(0,4),r=e.substring(4,6),n=e.substring(6,8),a=e.substring(8,10),i=e.substring(10,12),o=e.substring(12,14);return new Date(`${t}/${r}/${n} ${a}:${i}:${o} UTC+8`)}var ZQ=async()=>{let t=(await Je.post("https://ibs.ncbchina.cn/NCB/mForeignExchangePriceQuery",{ccyPair:"",bsnsTp:"1"},{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.mktQtnInfoArrList,r=[];return t.forEach(n=>{if(n.bsnsTp!=="SETFORE_EX")return;let a=n.ccyPair.split("/").filter(i=>i!="CNY")[0];r.push({currency:{from:a,to:"CNY"},rate:{sell:{remit:n.cstExgBuyPrc,cash:n.cstCashBuyPrc},buy:{remit:n.cstExgSellPrc,cash:n.cstCashSellPrc},middle:n.cstExgMdlPrc},unit:a==="JPY"?100:1,updated:ku(`${n.mktQtnDt}${n.mktQtnTm.padStart(6,"0")}`)})}),r},N4=ZQ;var T4=Le(require("https"),1),w4=Le(require("crypto"),1),JQ={httpsAgent:new T4.default.Agent({rejectUnauthorized:!1,secureOptions:w4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},eZ=async()=>{let e=await Je.get("https://s.psbc.com/portal/PsbcService/foreignexchange/curr",{...JQ,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}});return JSON.parse(e.data.replaceAll("empty(","").replaceAll(")","")).resultList.filter(n=>n.flag==2).map(n=>({currency:{from:n.cur,to:"CNY"},rate:{buy:{remit:n.fe_buy_prc,cash:n.fc_buy_prc},sell:{remit:n.fe_sell_prc,cash:n.fe_sell_prc},middle:n.mid_prc},unit:100,updated:ku(`${n.effect_date}${n.effect_time}`)})).sort()},D4=eZ;var tZ=async()=>(await Je.get("https://fx.cmbchina.com/api/v1/fx/rate",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.body.map(r=>({currency:{from:r.ccyNbrEng.split(" ")[1],to:"CNY"},rate:{buy:{remit:r.rthBid,cash:r.rtcBid},sell:{remit:r.rthOfr,cash:r.rtcOfr},middle:r.rtbBid},unit:100,updated:new Date(`${r.ratDat.replaceAll("\u5E74","-").replaceAll("\u6708","-").replaceAll("\u65E5","")} ${r.ratTim} UTC+8`)})).sort(),S4=tZ;var I1={\u7F8E\u5143:"USD",\u6B27\u5143:"EUR",\u65E5\u5143:"JPY",\u6E2F\u5143:"HKD",\u82F1\u9551:"GBP",\u6FB3\u5143:"AUD",\u65B0\u897F\u5170\u5143:"NZD",\u65B0\u52A0\u5761\u5143:"SGD",\u745E\u58EB\u6CD5\u90CE:"CHF",\u52A0\u5143:"CAD",\u6FB3\u95E8\u5143:"MOP",\u6797\u5409\u7279:"MYR",\u5362\u5E03:"RUB",\u5170\u7279:"ZAR",\u97E9\u5143:"KRW",\u8FEA\u62C9\u59C6:"AED",\u91CC\u4E9A\u5C14:"SAR",\u798F\u6797:"HUF",\u5179\u7F57\u63D0:"PLN",\u4E39\u9EA6\u514B\u6717:"DKK",\u745E\u5178\u514B\u6717:"SEK",\u632A\u5A01\u514B\u6717:"NOK",\u91CC\u62C9:"TRY",\u6BD4\u7D22:"MXN",\u6CF0\u94E2:"THB"},rZ=["MOP","MYR","RUB","ZAR","KRW","AED","SAR","HUF","PLN","DKK","SEK","NOK","TRY","MXN","THB"],nZ=async()=>{let e=await Je.get("http://www.safe.gov.cn/AppStructured/hlw/RMBQuery.do",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=dr.load(e.data),r=t("table#InfoTable").children()[0];return r.children.slice(1).map(n=>{let a=t(n),i=new Date(t(a.children()[0]).text()+" 00:00 UTC+8");return a.children().slice(1).toArray().map((o,l)=>{let u={currency:{from:"unknown",to:"unknown"},rate:{middle:parseFloat(t(o).text())},updated:i,unit:100},s=t(t(r.children[0]).children()[l+1]).text().trim();return rZ.includes(I1[s])?u.currency={from:"CNY",to:I1[s]}:u.currency={from:I1[s],to:"CNY"},u})}).flat().sort()},C4=nZ;var aZ=co(qs,{number:"Fraction"}),iZ=async()=>{let e=parseInt(new Date().toISOString().split("T")[0].replaceAll("-","")),t=await Je.get(`https://www.unionpayintl.com/upload/jfimg/${e}.json`,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}).catch(()=>({status:404}));for(;t.status!==200;)e-=1,console.log(e+1,"UnionPay FXRate not found, trying",e),t=await Je.get(`https://www.unionpayintl.com/upload/jfimg/${e}.json`,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}});let r=t.data,n=new Date(`${r.curDate} 16:30 UTC+8`),a={};r.exchangeRateJson.forEach(o=>{let l=o.transCur,u=o.baseCur,s=!1;a[o.transCur]||a[o.baseCur]&&(l=o.baseCur,u=o.transCur,s=!0),a[l]||(a[l]={}),a[l][u]||(a[l][u]={forward:void 0,reverse:void 0}),s?a[l][u].reverse=aZ.divide(1,o.rateData):a[l][u].forward=o.rateData});let i=[];return Object.keys(a).forEach(o=>{Object.keys(a[o]).forEach(l=>{let u={currency:{from:o,to:l},rate:{},updated:n,unit:1};a[o][l].forward&&(u.rate.sell={remit:a[o][l].forward,cash:a[o][l].forward}),a[o][l].reverse&&(u.rate.buy={remit:a[o][l].reverse,cash:a[o][l].reverse}),i.push(u)})}),i.sort()},_4=iZ;var oZ=async()=>{let e=await Je.get("https://www.jcb.jp/rate/jpy.html",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=dr.load(e.data),r=new Date(t(t(".rate2TableArea>p")[0]).text().replaceAll("\u63DB\u7B97\u65E5\u306E\u57FA\u6E96\u30EC\u30FC\u30C8","").replaceAll("\u65E5","").replaceAll("\u6708","-").replaceAll("\u5E74","-")+" UTC+9");return t(".rate2TableArea>table>tbody>tr").toArray().map(n=>{let a=t(n),i=a.find("td:nth-child(1)").text(),o=a.find("td:nth-child(4)").text();return{currency:{from:i,to:"JPY"},rate:{middle:parseFloat(o)},unit:1,updated:r}}).sort()},sZ=async()=>(await Promise.all([oZ()])).flat(1),M4=sZ;var uZ=(e=!1,t=!0,r)=>{let n="https://api.wise.com/v1/rates";return e&&(n="https://api.sandbox.transferwise.tech/v1/rates"),async a=>{console.log(e,t,r),a&&e?a.log("Getting Wise FX Rates in sandbox mode."):a&&a.log("Getting Wise FX Rates in production mode.");let i=await Je.get(n,{headers:{Authorization:t?"Basic OGNhN2FlMjUtOTNjNS00MmFlLThhYjQtMzlkZTFlOTQzZDEwOjliN2UzNmZkLWRjYjgtNDEwZS1hYzc3LTQ5NGRmYmEyZGJjZA==":`Bearer ${r}`}}),o=[],l=i.data;for(let u of l)u.source=u.source==="CNY"?"CNH":u.source,u.target=u.target==="CNY"?"CNH":u.target,o.push({currency:{from:u.source,to:u.target},rate:{middle:parseFloat(u.rate)},unit:1,updated:new Date(u.time)});return o.sort()}},O4=uZ;var cZ=async()=>{let r=(await Je.get("https://rbwm-api.hsbc.com.hk/digital-pws-tools-investments-eapi-prod-proxy/v1/investments/exchange-rate?locale=en_HK",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.detailRates.map(n=>{let a={currency:{from:n.ccy,to:"HKD"},rate:{buy:{},sell:{}},updated:new Date(n.lastUpdateDate),unit:1};return n.ttBuyRt&&(a.rate.buy.remit=parseFloat(n.ttBuyRt)),n.bankBuyRt&&(a.rate.buy.cash=parseFloat(n.bankBuyRt)),n.ttSelRt&&(a.rate.sell.remit=parseFloat(n.ttSelRt)),n.bankSellRt&&(a.rate.sell.cash=parseFloat(n.bankSellRt)),a});return r.push((n=>{let a=n.find(i=>i.currency.from==="CNY");return a.currency.from="CNH",a})(r)),r},R4=cZ;var lZ=async()=>(await Je.get("https://www.services.cn-banking.hsbc.com.cn/mobile/channel/digital-proxy/cnyTransfer/ratesInfo/remittanceRate?locale=en_CN",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest","Content-Type":"application/json"}})).data.data.counterForRepeatingBlock.map(r=>({currency:{from:"CNY",to:r.exchangeRateCurrency},rate:{buy:{cash:parseFloat(r.notesSellingRate),remit:parseFloat(r.transferSellingRate)},sell:{cash:parseFloat(r.notesBuyingRate),remit:parseFloat(r.transferBuyingRate)}},unit:1,updated:new Date})),F4=lZ;var pZ=async()=>{let e=await Je.get("https://mkdlc.ebanking.hsbc.com.hk/hsbcfxwidget/data/getFXList?callback=JSON.stringify&token=0vg8cORxRLBsrWg9C9UboMT%2BkN2Ykze6vFnRV1nA8DE%3D",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=JSON.parse([eval][0](e.data)).data,r=new Date(e.headers.date),n=t.fxList.map(a=>({currency:{from:"AUD",to:a.curr_s},rate:{sell:{cash:a.buy,remit:a.buy},buy:{cash:a.sell,remit:a.sell}},unit:1,updated:r}));return n.push((a=>{let i=a.find(o=>o.currency.to==="CNY");return i.currency.to="CNH",i})(n)),n},I4=pZ;var B4={"027001":"JPY","012001":"GBP","023001":"NOK","051001":"EUR","014001":"USD","028001":"CAD","032001":"MYR","038001":"THB","081001":"MOP","018001":"SGD","065001":"SAR","021001":"SEK","015001":"CHF","062001":"NZD","029001":"AUD","022001":"DKK","031001":"KZT","013001":"HKD"},fZ=async()=>{let e=await Je.get("https://etrade.citicbank.com/portalweb/cms/getForeignExchRate.htm?callback=JSON.stringify",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=JSON.parse([eval][0](e.data)).content.resultList,r=[];return t.forEach(n=>{Object.keys(B4).includes(n.curCode)&&r.push({currency:{from:B4[n.curCode],to:"CNY"},rate:{buy:{remit:parseFloat(n.cstexcBuyPrice),cash:parseFloat(n.cstexcBuyPrice)},sell:{cash:parseFloat(n.cstexcSellPrice),remit:parseFloat(n.cstexcSellPrice)},middle:parseFloat(n.midPrice)},unit:100,updated:new Date(`${n.quotePriceDate.replace("\u5E74","-").replace("\u6708","-").replace("\u65E5","")} ${n.quotePriceTime} UTC+8`)})}),r.sort()},L4=fZ;var mZ=async()=>{let e=await Je.get("https://www.spdb.com.cn/was5/web/search?channelid=256931",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=dr.load(e.data),r=new Date(t(".fine_title > p").text()+" UTC+8");return t(".table04 > tbody > tr").toArray().map(n=>{let a=t(t(n).children()[0]).text().split(" ")[1].replace(` +`,"");return{currency:{from:a,to:"CNY"},rate:{buy:{cash:parseFloat(t(t(n).children()[3]).text()),remit:parseFloat(t(t(n).children()[2]).text())},sell:{cash:parseFloat(t(t(n).children()[4]).text()),remit:parseFloat(t(t(n).children()[4]).text())},middle:parseFloat(t(t(n).children()[1]).text())},unit:a=="JPY"?1e5:100,updated:r}}).sort()},P4=mZ;var U4=Le(require("crypto"),1),k4=Le(require("https"),1),dZ={httpsAgent:new k4.default.Agent({secureOptions:U4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},hZ=async()=>{let t=(await Je.post("https://ifsp.xib.com.cn/ifsptsi/api/ITSI125005",{ccyPairCode:"",transactionType:"0",header:{appId:"XEIP",locale:"zh_CN",termType:"",termNo:"",termMac:"",appVersion:""}},{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"},...dZ})).data.rateList,r=[];return t.forEach(n=>{r.push({currency:{from:n.currency,to:"CNY"},rate:{buy:{remit:n.currencyBuyPrice,cash:n.cashBuyPrice},sell:{remit:n.currencySellPrice,cash:n.cashSellPrice}},unit:100,updated:ku(`${n.updateDate}${n.updateTime}`)})}),r},q4=hZ;var vZ=async()=>(await Je.get("https://bank.pingan.com.cn/rmb/account/cmp/cust/acct/forex/exchange/qryFoexPriceExchangeList.do?pageIndex=1&pageSize=100&realFlag=1¤cyCode=&exchangeDate=&languageCode=zh_CN&access_source=PC",{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data.data.exchangeList.map(r=>({currency:{from:r.currType,to:"CNY"},rate:{buy:{cash:r.cashBuyPrice,remit:r.buyPrice},sell:{cash:r.sellPrice,remit:r.sellPrice},middle:r.basePrice},unit:100,updated:new Date(r.insertTime+" GMT+0800")})).sort(),H4=vZ;var z4=Le(require("crypto"),1),G4=Le(require("https"),1),gZ={httpsAgent:new G4.default.Agent({secureOptions:z4.default.constants.SSL_OP_LEGACY_SERVER_CONNECT})},xZ={"\u7F8E\u5143(USD)":"USD","\u82F1\u9551(GBP)":"GBP","\u6E2F\u5E01(HKD)":"HKD","\u745E\u58EB\u6CD5\u90CE(CHF)":"CHF",\u745E\u5178\u514B\u6717:"SEK",\u4E39\u9EA6\u514B\u6717:"DKK",\u632A\u5A01\u514B\u6717:"NOK","\u65E5\u5143(JPY)":"JPY","\u52A0\u62FF\u5927\u5143(CAD)":"CAD","\u6FB3\u5927\u5229\u4E9A\u5143(AUD)":"AUD","\u65B0\u52A0\u5761\u5143(SGD)":"SGD","\u6B27\u5143(EUR)":"EUR","\u6FB3\u95E8\u5143(MOP)":"MOP","\u6CF0\u56FD\u94E2(THB)":"THB",\u65B0\u53F0\u5E01:"TWD","\u65B0\u897F\u5170\u5143(NZD)":"NZD",\u97E9\u5143:"KRW"},bZ=async()=>{let e=await Je.get("https://www.cebbank.com/eportal/ui?pageId=477257",{...gZ,headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}}),t=dr.load(e.data);return t(".lczj_box tbody tr").map((n,a)=>{if(n<2)return null;let i=dr.load(a,{decodeEntities:!1});return{currency:{from:xZ[i("td:nth-child(1)").text()],to:"CNY"},rate:{sell:{remit:parseFloat(i("td:nth-child(2)").text()),cash:parseFloat(i("td:nth-child(3)").text())},buy:{remit:parseFloat(i("td:nth-child(4)").text()),cash:parseFloat(i("td:nth-child(5)").text())}},unit:100,updated:new Date(t("#t_id span").text().substring(5)+" UTC+8")}}).get().filter(n=>n!==null).sort()},Y4=bZ;var K4=Le(require("sync-request"),1);var Yo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,V4=new Set,B1=typeof process=="object"&&process?process:{},$4=(e,t,r,n)=>{typeof B1.emitWarning=="function"?B1.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},Af=globalThis.AbortController,j4=globalThis.AbortSignal;if(typeof Af>"u"){j4=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,a){this._onabort.push(a)}},Af=class{constructor(){t()}signal=new j4;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let a of this.signal._onabort)a(n);this.signal.onabort?.(n)}}};let e=B1.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{e&&(e=!1,$4("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var yZ=e=>!V4.has(e),YHe=Symbol("type"),Xa=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),X4=e=>Xa(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?jo:null:null,jo=class extends Array{constructor(t){super(t),this.fill(0)}},L1=class e{heap;length;static#u=!1;static create(t){let r=X4(t);if(!r)return[];e.#u=!0;let n=new e(t,r);return e.#u=!1,n}constructor(t,r){if(!e.#u)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},Vo=class e{#u;#p;#h;#v;#M;#O;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#g;#n;#r;#e;#c;#f;#s;#i;#x;#o;#b;#y;#m;#E;#D;#l;static unsafeExposeInternals(t){return{starts:t.#y,ttls:t.#m,sizes:t.#b,keyMap:t.#n,keyList:t.#r,valList:t.#e,next:t.#c,prev:t.#f,get head(){return t.#s},get tail(){return t.#i},free:t.#x,isBackgroundFetch:r=>t.#t(r),backgroundFetch:(r,n,a,i)=>t.#I(r,n,a,i),moveToTail:r=>t.#_(r),indexes:r=>t.#A(r),rindexes:r=>t.#N(r),isStale:r=>t.#d(r)}}get max(){return this.#u}get maxSize(){return this.#p}get calculatedSize(){return this.#g}get size(){return this.#a}get fetchMethod(){return this.#M}get memoMethod(){return this.#O}get dispose(){return this.#h}get disposeAfter(){return this.#v}constructor(t){let{max:r=0,ttl:n,ttlResolution:a=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:u,dispose:s,disposeAfter:c,noDisposeOnSet:p,noUpdateTTL:f,maxSize:m=0,maxEntrySize:h=0,sizeCalculation:d,fetchMethod:v,memoMethod:x,noDeleteOnFetchRejection:N,noDeleteOnStaleGet:g,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:E,ignoreFetchAbort:b}=t;if(r!==0&&!Xa(r))throw new TypeError("max option must be a nonnegative integer");let S=r?X4(r):Array;if(!S)throw new Error("invalid max value: "+r);if(this.#u=r,this.#p=m,this.maxEntrySize=h||this.#p,this.sizeCalculation=d,this.sizeCalculation){if(!this.#p&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(x!==void 0&&typeof x!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#O=x,v!==void 0&&typeof v!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=v,this.#D=!!v,this.#n=new Map,this.#r=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#c=new S(r),this.#f=new S(r),this.#s=0,this.#i=0,this.#x=L1.create(r),this.#a=0,this.#g=0,typeof s=="function"&&(this.#h=s),typeof c=="function"?(this.#v=c,this.#o=[]):(this.#v=void 0,this.#o=void 0),this.#E=!!this.#h,this.#l=!!this.#v,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!N,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!b,this.maxEntrySize!==0){if(this.#p!==0&&!Xa(this.#p))throw new TypeError("maxSize must be a positive integer if specified");if(!Xa(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!g,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=Xa(a)||a===0?a:1,this.ttlAutopurge=!!i,this.ttl=n||0,this.ttl){if(!Xa(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#B()}if(this.#u===0&&this.ttl===0&&this.#p===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#u&&!this.#p){let A="LRU_CACHE_UNBOUNDED";yZ(A)&&(V4.add(A),$4("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",A,e))}}getRemainingTTL(t){return this.#n.has(t)?1/0:0}#B(){let t=new jo(this.#u),r=new jo(this.#u);this.#m=t,this.#y=r,this.#L=(i,o,l=Yo.now())=>{if(r[i]=o!==0?l:0,t[i]=o,o!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#d(i)&&this.#T(this.#r[i],"expire")},o+1);u.unref&&u.unref()}},this.#S=i=>{r[i]=t[i]!==0?Yo.now():0},this.#w=(i,o)=>{if(t[o]){let l=t[o],u=r[o];if(!l||!u)return;i.ttl=l,i.start=u,i.now=n||a();let s=i.now-u;i.remainingTTL=l-s}};let n=0,a=()=>{let i=Yo.now();if(this.ttlResolution>0){n=i;let o=setTimeout(()=>n=0,this.ttlResolution);o.unref&&o.unref()}return i};this.getRemainingTTL=i=>{let o=this.#n.get(i);if(o===void 0)return 0;let l=t[o],u=r[o];if(!l||!u)return 1/0;let s=(n||a())-u;return l-s},this.#d=i=>{let o=r[i],l=t[i];return!!l&&!!o&&(n||a())-o>l}}#S=()=>{};#w=()=>{};#L=()=>{};#d=()=>!1;#H(){let t=new jo(this.#u);this.#g=0,this.#b=t,this.#C=r=>{this.#g-=t[r],t[r]=0},this.#P=(r,n,a,i)=>{if(this.#t(n))return 0;if(!Xa(a))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(a=i(n,r),!Xa(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a},this.#R=(r,n,a)=>{if(t[r]=n,this.#p){let i=this.#p-t[r];for(;this.#g>i;)this.#F(!0)}this.#g+=t[r],a&&(a.entrySize=n,a.totalCalculatedSize=this.#g)}}#C=t=>{};#R=(t,r,n)=>{};#P=(t,r,n,a)=>{if(n||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#a)for(let r=this.#i;!(!this.#U(r)||((t||!this.#d(r))&&(yield r),r===this.#s));)r=this.#f[r]}*#N({allowStale:t=this.allowStale}={}){if(this.#a)for(let r=this.#s;!(!this.#U(r)||((t||!this.#d(r))&&(yield r),r===this.#i));)r=this.#c[r]}#U(t){return t!==void 0&&this.#n.get(this.#r[t])===t}*entries(){for(let t of this.#A())this.#e[t]!==void 0&&this.#r[t]!==void 0&&!this.#t(this.#e[t])&&(yield[this.#r[t],this.#e[t]])}*rentries(){for(let t of this.#N())this.#e[t]!==void 0&&this.#r[t]!==void 0&&!this.#t(this.#e[t])&&(yield[this.#r[t],this.#e[t]])}*keys(){for(let t of this.#A()){let r=this.#r[t];r!==void 0&&!this.#t(this.#e[t])&&(yield r)}}*rkeys(){for(let t of this.#N()){let r=this.#r[t];r!==void 0&&!this.#t(this.#e[t])&&(yield r)}}*values(){for(let t of this.#A())this.#e[t]!==void 0&&!this.#t(this.#e[t])&&(yield this.#e[t])}*rvalues(){for(let t of this.#N())this.#e[t]!==void 0&&!this.#t(this.#e[t])&&(yield this.#e[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,r={}){for(let n of this.#A()){let a=this.#e[n],i=this.#t(a)?a.__staleWhileFetching:a;if(i!==void 0&&t(i,this.#r[n],this))return this.get(this.#r[n],r)}}forEach(t,r=this){for(let n of this.#A()){let a=this.#e[n],i=this.#t(a)?a.__staleWhileFetching:a;i!==void 0&&t.call(r,i,this.#r[n],this)}}rforEach(t,r=this){for(let n of this.#N()){let a=this.#e[n],i=this.#t(a)?a.__staleWhileFetching:a;i!==void 0&&t.call(r,i,this.#r[n],this)}}purgeStale(){let t=!1;for(let r of this.#N({allowStale:!0}))this.#d(r)&&(this.#T(this.#r[r],"expire"),t=!0);return t}info(t){let r=this.#n.get(t);if(r===void 0)return;let n=this.#e[r],a=this.#t(n)?n.__staleWhileFetching:n;if(a===void 0)return;let i={value:a};if(this.#m&&this.#y){let o=this.#m[r],l=this.#y[r];if(o&&l){let u=o-(Yo.now()-l);i.ttl=u,i.start=Date.now()}}return this.#b&&(i.size=this.#b[r]),i}dump(){let t=[];for(let r of this.#A({allowStale:!0})){let n=this.#r[r],a=this.#e[r],i=this.#t(a)?a.__staleWhileFetching:a;if(i===void 0||n===void 0)continue;let o={value:i};if(this.#m&&this.#y){o.ttl=this.#m[r];let l=Yo.now()-this.#y[r];o.start=Math.floor(Date.now()-l)}this.#b&&(o.size=this.#b[r]),t.unshift([n,o])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let a=Date.now()-n.start;n.start=Yo.now()-a}this.set(r,n.value,n)}}set(t,r,n={}){if(r===void 0)return this.delete(t),this;let{ttl:a=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n,{noUpdateTTL:s=this.noUpdateTTL}=n,c=this.#P(t,r,n.size||0,l);if(this.maxEntrySize&&c>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.#T(t,"set"),this;let p=this.#a===0?void 0:this.#n.get(t);if(p===void 0)p=this.#a===0?this.#i:this.#x.length!==0?this.#x.pop():this.#a===this.#u?this.#F(!1):this.#a,this.#r[p]=t,this.#e[p]=r,this.#n.set(t,p),this.#c[this.#i]=p,this.#f[p]=this.#i,this.#i=p,this.#a++,this.#R(p,c,u),u&&(u.set="add"),s=!1;else{this.#_(p);let f=this.#e[p];if(r!==f){if(this.#D&&this.#t(f)){f.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=f;m!==void 0&&!o&&(this.#E&&this.#h?.(m,t,"set"),this.#l&&this.#o?.push([m,t,"set"]))}else o||(this.#E&&this.#h?.(f,t,"set"),this.#l&&this.#o?.push([f,t,"set"]));if(this.#C(p),this.#R(p,c,u),this.#e[p]=r,u){u.set="replace";let m=f&&this.#t(f)?f.__staleWhileFetching:f;m!==void 0&&(u.oldValue=m)}}else u&&(u.set="update")}if(a!==0&&!this.#m&&this.#B(),this.#m&&(s||this.#L(p,a,i),u&&this.#w(u,p)),!o&&this.#l&&this.#o){let f=this.#o,m;for(;m=f?.shift();)this.#v?.(...m)}return this}pop(){try{for(;this.#a;){let t=this.#e[this.#s];if(this.#F(!0),this.#t(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#l&&this.#o){let t=this.#o,r;for(;r=t?.shift();)this.#v?.(...r)}}}#F(t){let r=this.#s,n=this.#r[r],a=this.#e[r];return this.#D&&this.#t(a)?a.__abortController.abort(new Error("evicted")):(this.#E||this.#l)&&(this.#E&&this.#h?.(a,n,"evict"),this.#l&&this.#o?.push([a,n,"evict"])),this.#C(r),t&&(this.#r[r]=void 0,this.#e[r]=void 0,this.#x.push(r)),this.#a===1?(this.#s=this.#i=0,this.#x.length=0):this.#s=this.#c[r],this.#n.delete(n),this.#a--,r}has(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:a}=r,i=this.#n.get(t);if(i!==void 0){let o=this.#e[i];if(this.#t(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#d(i))a&&(a.has="stale",this.#w(a,i));else return n&&this.#S(i),a&&(a.has="hit",this.#w(a,i)),!0}else a&&(a.has="miss");return!1}peek(t,r={}){let{allowStale:n=this.allowStale}=r,a=this.#n.get(t);if(a===void 0||!n&&this.#d(a))return;let i=this.#e[a];return this.#t(i)?i.__staleWhileFetching:i}#I(t,r,n,a){let i=r===void 0?void 0:this.#e[r];if(this.#t(i))return i;let o=new Af,{signal:l}=n;l?.addEventListener("abort",()=>o.abort(l.reason),{signal:o.signal});let u={signal:o.signal,options:n,context:a},s=(d,v=!1)=>{let{aborted:x}=o.signal,N=n.ignoreFetchAbort&&d!==void 0;if(n.status&&(x&&!v?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,N&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),x&&!N&&!v)return p(o.signal.reason);let g=m;return this.#e[r]===m&&(d===void 0?g.__staleWhileFetching?this.#e[r]=g.__staleWhileFetching:this.#T(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(t,d,u.options))),d},c=d=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=d),p(d)),p=d=>{let{aborted:v}=o.signal,x=v&&n.allowStaleOnFetchAbort,N=x||n.allowStaleOnFetchRejection,g=N||n.noDeleteOnFetchRejection,y=m;if(this.#e[r]===m&&(!g||y.__staleWhileFetching===void 0?this.#T(t,"fetch"):x||(this.#e[r]=y.__staleWhileFetching)),N)return n.status&&y.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),y.__staleWhileFetching;if(y.__returned===y)throw d},f=(d,v)=>{let x=this.#M?.(t,i,u);x&&x instanceof Promise&&x.then(N=>d(N===void 0?void 0:N),v),o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(d(void 0),n.allowStaleOnFetchAbort&&(d=N=>s(N,!0)))})};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(f).then(s,c),h=Object.assign(m,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return r===void 0?(this.set(t,h,{...u.options,status:void 0}),r=this.#n.get(t)):this.#e[r]=h,h}#t(t){if(!this.#D)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Af}async fetch(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,context:d,forceRefresh:v=!1,status:x,signal:N}=r;if(!this.#D)return x&&(x.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:a,noDeleteOnStaleGet:i,status:x});let g={allowStale:n,updateAgeOnGet:a,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:l,size:u,sizeCalculation:s,noUpdateTTL:c,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:h,ignoreFetchAbort:m,status:x,signal:N},y=this.#n.get(t);if(y===void 0){x&&(x.fetch="miss");let E=this.#I(t,y,g,d);return E.__returned=E}else{let E=this.#e[y];if(this.#t(E)){let D=n&&E.__staleWhileFetching!==void 0;return x&&(x.fetch="inflight",D&&(x.returnedStale=!0)),D?E.__staleWhileFetching:E.__returned=E}let b=this.#d(y);if(!v&&!b)return x&&(x.fetch="hit"),this.#_(y),a&&this.#S(y),x&&this.#w(x,y),E;let S=this.#I(t,y,g,d),w=S.__staleWhileFetching!==void 0&&n;return x&&(x.fetch=b?"stale":"refresh",w&&b&&(x.returnedStale=!0)),w?S.__staleWhileFetching:S.__returned=S}}async forceFetch(t,r={}){let n=await this.fetch(t,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(t,r={}){let n=this.#O;if(!n)throw new Error("no memoMethod provided to constructor");let{context:a,forceRefresh:i,...o}=r,l=this.get(t,o);if(!i&&l!==void 0)return l;let u=n(t,l,{options:o,context:a});return this.set(t,u,o),u}get(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=r,l=this.#n.get(t);if(l!==void 0){let u=this.#e[l],s=this.#t(u);return o&&this.#w(o,l),this.#d(l)?(o&&(o.get="stale"),s?(o&&n&&u.__staleWhileFetching!==void 0&&(o.returnedStale=!0),n?u.__staleWhileFetching:void 0):(i||this.#T(t,"expire"),o&&n&&(o.returnedStale=!0),n?u:void 0)):(o&&(o.get="hit"),s?u.__staleWhileFetching:(this.#_(l),a&&this.#S(l),u))}else o&&(o.get="miss")}#k(t,r){this.#f[r]=t,this.#c[t]=r}#_(t){t!==this.#i&&(t===this.#s?this.#s=this.#c[t]:this.#k(this.#f[t],this.#c[t]),this.#k(this.#i,t),this.#i=t)}delete(t){return this.#T(t,"delete")}#T(t,r){let n=!1;if(this.#a!==0){let a=this.#n.get(t);if(a!==void 0)if(n=!0,this.#a===1)this.#q(r);else{this.#C(a);let i=this.#e[a];if(this.#t(i)?i.__abortController.abort(new Error("deleted")):(this.#E||this.#l)&&(this.#E&&this.#h?.(i,t,r),this.#l&&this.#o?.push([i,t,r])),this.#n.delete(t),this.#r[a]=void 0,this.#e[a]=void 0,a===this.#i)this.#i=this.#f[a];else if(a===this.#s)this.#s=this.#c[a];else{let o=this.#f[a];this.#c[o]=this.#c[a];let l=this.#c[a];this.#f[l]=this.#f[a]}this.#a--,this.#x.push(a)}}if(this.#l&&this.#o?.length){let a=this.#o,i;for(;i=a?.shift();)this.#v?.(...i)}return n}clear(){return this.#q("delete")}#q(t){for(let r of this.#N({allowStale:!0})){let n=this.#e[r];if(this.#t(n))n.__abortController.abort(new Error("deleted"));else{let a=this.#r[r];this.#E&&this.#h?.(n,a,t),this.#l&&this.#o?.push([n,a,t])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#m&&this.#y&&(this.#m.fill(0),this.#y.fill(0)),this.#b&&this.#b.fill(0),this.#s=0,this.#i=0,this.#x.length=0,this.#g=0,this.#a=0,this.#l&&this.#o){let r=this.#o,n;for(;n=r?.shift();)this.#v?.(...n)}}};var $o=new Vo({max:500}),Nf=["AFN","ALL","DZD","AOA","ARS","AMD","AWG","AUD","AZN","BSD","BHD","BDT","BBD","BYN","BZD","BMD","BTN","BOB","BAM","BWP","BRL","BND","BGN","BIF","KHR","CAD","CVE","KYD","XOF","XAF","XPF","CLP","CNY","COP","KMF","CDF","CRC","CUP","CZK","DKK","DJF","DOP","XCD","EGP","SVC","ETB","EUR","FKP","FJD","GMD","GEL","GHS","GIP","GBP","GTQ","GNF","GYD","HTG","HNL","HKD","HUF","ISK","INR","IDR","IQD","ILS","JMD","JPY","JOD","KZT","KES","KWD","KGS","LAK","LBP","LSL","LRD","LYD","MOP","MKD","MGA","MWK","MYR","MVR","MRU","MUR","MXN","MDL","MNT","MAD","MZN","MMK","NAD","NPR","ANG","NZD","NIO","NGN","NOK","OMR","PKR","PAB","PGK","PYG","PEN","PHP","PLN","QAR","RON","RUB","RWF","SHP","WST","STN","SAR","RSD","SCR","SLE","SGD","SBD","SOS","ZAR","KRW","SSP","LKR","SDG","SRD","SZL","SEK","CHF","TWD","TJS","TZS","THB","TOP","TTD","TND","TRY","TMT","UGX","UAH","AED","USD","UYU","UZS","VUV","VES","VND","YER","ZMW","ZWL"],qu=class extends oa{constructor(){super([]);this.ableToGetAllFXRate=!1}get fxRateList(){let r={};return Nf.forEach(n=>{r[n]={},Nf.forEach(a=>{let i=new Proxy({},{get:(o,l)=>{if(["cash","remit","middle","updated"].includes(l.toString())){if(!$o.has(`${n}${a}`)){let u=(0,K4.default)("GET",`https://www.mastercard.co.uk/settlement/currencyrate/conversion-rate?fxDate=0000-00-00&transCurr=${a}&crdhldBillCurr=${n}&bankFee=0&transAmt=1`,{headers:{"user-agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}});$o.set(`${n}${a}`,u.getBody().toString())}if(["cash","remit","middle"].includes(l.toString())){let u=JSON.parse($o.get(`${n}${a}`));return uo(jn(u.data.transAmt),jn(u.data.conversionRate))}else{let u=JSON.parse($o.get(`${n}${a}`));return new Date(u.data.fxDate)}}}});r[n][a]=i})}),r}async getfxRateList(r,n){if(!(Nf.includes(r)&&Nf.includes(n)))throw new Error("Currency not supported");if($o.has(`${r}${n}`))return this.fxRateList[r][n];let i=(await Je.get(`https://www.mastercard.co.uk/settlement/currencyrate/conversion-rate?fxDate=0000-00-00&transCurr=${n}&crdhldBillCurr=${r}&bankFee=0&transAmt=1`,{headers:{"User-Agent":process.env.HEADER_USER_AGENT??"fxrate axios/latest"}})).data;return $o.set(`${r}${n}`,JSON.stringify(i)),this.fxRateList[r][n]}update(){throw new Error("Method is deprecated")}};var J4=Le(require("sync-request"),1);var wf=Le(W4(),1),e8=Le(Q4(),1);wf.default.extend(e8.default);var Xo=new Vo({max:500}),Z4={accept:"application/json, text/plain, */*","accept-language":"en,zh-CN;q=0.9,zh;q=0.8","sec-ch-ua":'"Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Linux"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin",Referer:"https://usa.visa.com/support/consumer/travel-support/exchange-rate-calculator.html","Referrer-Policy":"no-referrer-when-downgrade"},Tf=["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CVE","CYP","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GQE","GTQ","GWP","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MRU","MTL","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","None","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SRD","SSP","STD","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VES","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW","ZWL"],Hu=class extends oa{constructor(){super([]);this.ableToGetAllFXRate=!1}get fxRateList(){let r={};return Tf.forEach(n=>{r[n]={},Tf.forEach(a=>{let i=new Proxy({},{get:(o,l)=>{if(!["cash","remit","middle","updated"].includes(l.toString()))return;let u=(0,wf.default)().utc().format("MM/DD/YYYY");if(!Xo.has(`${n}${a}`)){let s=(0,J4.default)("GET",`https://usa.visa.com/cmsapi/fx/rates?amount=1&fee=0&utcConvertedDate=${u}&exchangedate=${u}&fromCurr=${a}&toCurr=${n}`,{headers:Z4});Xo.set(`${n}${a}`,s.getBody().toString())}if(["cash","remit","middle"].includes(l.toString())){let s=JSON.parse(Xo.get(`${n}${a}`));return jn(s.originalValues.fxRateVisa)}else{let s=JSON.parse(Xo.get(`${n}${a}`));return new Date(s.originalValues.lastUpdatedVisaRate*1e3)}}});r[n][a]=i})}),r}async getfxRateList(r,n){if(!(Tf.includes(r)&&Tf.includes(n)))throw new Error("Currency not supported");if(Xo.has(`${r}${n}`))return this.fxRateList[r][n];let a=(0,wf.default)().utc().format("MM/DD/YYYY"),o=(await Je.get(`https://usa.visa.com/cmsapi/fx/rates?amount=1&fee=0&utcConvertedDate=${a}&exchangedate=${a}&fromCurr=${n}&toCurr=${r}`,{headers:Z4})).data;return Xo.set(`${r}${n}`,JSON.stringify(o)),this.fxRateList[r][n]}update(){throw new Error("Method is deprecated")}};var R8=Le(M8(),1);var O8={pboc:"\u4E2D\u56FD\u4EBA\u6C11\u94F6\u884C",unionpay:"\u94F6\u8054",mastercard:"MasterCard",wise:"Wise",visa:"Visa",jcb:"JCB",abc:"\u4E2D\u56FD\u519C\u4E1A\u94F6\u884C",cmb:"\u62DB\u5546\u94F6\u884C",icbc:"\u4E2D\u56FD\u5DE5\u5546\u94F6\u884C",boc:"\u4E2D\u56FD\u94F6\u884C",bochk:"\u4E2D\u94F6\u9999\u6E2F",ccb:"\u4E2D\u56FD\u5EFA\u8BBE\u94F6\u884C",psbc:"\u90AE\u653F\u50A8\u84C4\u94F6\u884C",bocom:"\u4EA4\u901A\u94F6\u884C",cibHuanyu:"\u5174\u4E1A\u94F6\u884C\u5BF0\u5B87\u4EBA\u751F",cib:"\u5174\u4E1A\u94F6\u884C","hsbc.cn":"\u6C47\u4E30\u4E2D\u56FD","hsbc.hk":"\u6C47\u4E30\u9999\u6E2F","hsbc.au":"\u6C47\u4E30\u6FB3\u6D32","citic.cn":"\u4E2D\u4FE1\u94F6\u884C",spdb:"\u6D66\u53D1\u94F6\u884C","ncb.cn":"\u5357\u6D0B\u5546\u4E1A\u94F6\u884C\uFF08\u4E2D\u56FD\uFF09",xib:"\u53A6\u95E8\u56FD\u9645\u94F6\u884C",pab:"\u5E73\u5B89\u94F6\u884C",ceb:"\u4E2D\u56FD\u5149\u5927\u94F6\u884C"};var Bf=class extends Pn{constructor(t){super(),this.fxmManager=t,this.mount()}async requestPrice(t,r,n=[]){let a=(await Oa("info",this.fxmManager)).sources.filter(o=>!n.includes(o)),i=[];return await Promise.all(a.map(async o=>{try{let l=await Oa(`${o}/${r}/${t}/?precision=4&fees=0&amount=100`,this.fxmManager),u=await Oa(`${o}/${t}/${r}/?precision=4&fees=0&amount=100&reverse`,this.fxmManager);i.push({sell:u,buy:l,source:o})}catch(l){console.error(`not suppported: ${o} with ${t} to ${r}`,l)}return""})),i}mount(){let t=async(r,n)=>{r.params.from&&(r.params.from=r.params.from.toUpperCase()),r.params.to&&(r.params.to=r.params.to.toUpperCase());let{from:a,to:i}=r.params,o=new R8.Feed({title:`FXRate \u5B9E\u65F6 ${a} <=> ${i} \u6C47\u7387\u4FE1\u606F`,updated:new Date,id:"https://github.com/186526/fxrate",copyright:"MIT, Data copyright belongs to its source. More details at .",author:{name:"Bo Xu",email:"i@186526.xyz",link:"https://186526.xyz"}});return(await this.requestPrice(a,i)).forEach(u=>{let s=`\u73B0\u6C47\u4E70\u5165: ${u.buy.remit} \u73B0\u949E\u4E70\u5165: ${u.buy.cash} \u4E70\u5165\u4E2D\u95F4\u4EF7: ${u.buy.middle} \u4E70\u5165\u66F4\u65B0\u65F6\u95F4: ${u.buy.updated} +\u73B0\u6C47\u5356\u51FA: ${u.sell.remit} \u73B0\u949E\u5356\u51FA: ${u.sell.cash} \u5356\u51FA\u4E2D\u95F4\u4EF7: ${u.sell.middle} \u5356\u51FA\u66F4\u65B0\u65F6\u95F4: ${u.sell.updated}`;o.addItem({title:`${O8[u.source]??u.source}`,link:"https://github.com/186526/fxrate",description:s,content:s,date:new Date(u.buy.updated??u.sell.updated)})}),n.body=o.atom1(),n.headers.set("Content-Type","application/xml"),n.status=200,n};this.binding("/:from/:to",new lr("GET",[t]))}};var JZ={},Yu=new BM({boc:n4,bochk:o4,icbc:s4,cib:d4,cibHuanyu:m4,ccb:v4,abc:b4,bocom:A4,psbc:D4,cmb:S4,pboc:C4,unionpay:_4,jcb:M4,"hsbc.hk":R4,"hsbc.cn":F4,"hsbc.au":I4,"citic.cn":L4,"ncb.cn":N4,spdb:P4,xib:q4,pab:H4,ceb:Y4});Yu.registerFXM("mastercard",new qu);Yu.registerFXM("visa",new Hu);En.default.env.ENABLE_WISE!="0"&&(En.default.env.WISE_TOKEN==null&&(console.error("WISE_TOKEN is not set. Use Wise Token from web."),En.default.env.WISE_USE_TOKEN_FROM_WEB="1"),Yu.registerGetter("wise",O4(En.default.env.WISE_SANDBOX_API=="1",En.default.env.WISE_USE_TOKEN_FROM_WEB!="0",En.default.env.WISE_TOKEN)));var F8=async(e,t)=>{e.binding("/(.*)",new lr("ANY",[async(n,a)=>{op(a),a.status=404}])),e.useMappingAdapter(),e.binding("/",e.create("ANY",async()=>`200 OK /info - Instance Info -`)),e.binding("/(.*)",new lr("ANY",[async(n,a)=>{t.log(`${n.ip} ${n.method} ${n.originURL}`),a.headers.set("X-Powered-By","fxrate/latest"),a.headers.set("X-License","MIT, Data copyright belongs to its source. More details at .")}])),e.use([t],"/(.*)"),e.use([t],"/v1/(.*)");let r=new Bf(t);return e.use([r],"/rss/(.*)"),e};(En.default.env.VERCEL=="1"||(e=>!0)(JZ))&&(async()=>(globalThis.App=await F8(new my,Yu),En.default.env.VERCEL!="1"&&globalThis.App.listen(Number(En.default?.env?.PORT)||8080),console.log(`[${new Date().toUTCString()}] Server is started at ${Number(En.default?.env?.PORT)||8080} with NODE_ENV ${En.default.env.NODE_ENV||"development"}.`)))();var QZ=async(e,t)=>{let r=await globalThis.App.adapater.handleRequest(e),n=await globalThis.App.adapater.router.respond(r);globalThis.App.adapater.handleResponse(n,t)};0&&(module.exports={Manager,makeInstance}); +`)),e.binding("/(.*)",new lr("ANY",[async(n,a)=>{t.log(`${n.ip} ${n.method} ${n.originURL}`),a.headers.set("X-Powered-By","fxrate/latest"),a.headers.set("X-License","MIT, Data copyright belongs to its source. More details at .")}])),e.use([t],"/(.*)"),e.use([t],"/v1/(.*)");let r=new Bf(t);return e.use([r],"/rss/(.*)"),e};(En.default.env.VERCEL=="1"||(e=>!0)(JZ))&&(async()=>(globalThis.App=await F8(new fy,Yu),En.default.env.VERCEL!="1"&&globalThis.App.listen(Number(En.default?.env?.PORT)||8080),console.log(`[${new Date().toUTCString()}] Server is started at ${Number(En.default?.env?.PORT)||8080} with NODE_ENV ${En.default.env.NODE_ENV||"development"}.`)))();var QZ=async(e,t)=>{let r=await globalThis.App.adapater.handleRequest(e),n=await globalThis.App.adapater.router.respond(r);globalThis.App.adapater.handleResponse(n,t)};0&&(module.exports={Manager,makeInstance}); /*! Bundled license information: complex.js/complex.js: diff --git a/src/FXGetter/dist/mastercard.js b/src/FXGetter/dist/mastercard.js new file mode 100644 index 0000000..a2b9490 --- /dev/null +++ b/src/FXGetter/dist/mastercard.js @@ -0,0 +1,296 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +exports.__esModule = true; +var fxManager_1 = require("../fxm/fxManager"); +var sync_request_1 = require("sync-request"); +var axios_1 = require("axios"); +var mathjs_1 = require("mathjs"); +var lru_cache_1 = require("lru-cache"); +var cache = new lru_cache_1.LRUCache({ + max: 500 +}); +var currenciesList = [ + 'AFN', + 'ALL', + 'DZD', + 'AOA', + 'ARS', + 'AMD', + 'AWG', + 'AUD', + 'AZN', + 'BSD', + 'BHD', + 'BDT', + 'BBD', + 'BYN', + 'BZD', + 'BMD', + 'BTN', + 'BOB', + 'BAM', + 'BWP', + 'BRL', + 'BND', + 'BGN', + 'BIF', + 'KHR', + 'CAD', + 'CVE', + 'KYD', + 'XOF', + 'XAF', + 'XPF', + 'CLP', + 'CNY', + 'COP', + 'KMF', + 'CDF', + 'CRC', + 'CUP', + 'CZK', + 'DKK', + 'DJF', + 'DOP', + 'XCD', + 'EGP', + 'SVC', + 'ETB', + 'EUR', + 'FKP', + 'FJD', + 'GMD', + 'GEL', + 'GHS', + 'GIP', + 'GBP', + 'GTQ', + 'GNF', + 'GYD', + 'HTG', + 'HNL', + 'HKD', + 'HUF', + 'ISK', + 'INR', + 'IDR', + 'IQD', + 'ILS', + 'JMD', + 'JPY', + 'JOD', + 'KZT', + 'KES', + 'KWD', + 'KGS', + 'LAK', + 'LBP', + 'LSL', + 'LRD', + 'LYD', + 'MOP', + 'MKD', + 'MGA', + 'MWK', + 'MYR', + 'MVR', + 'MRU', + 'MUR', + 'MXN', + 'MDL', + 'MNT', + 'MAD', + 'MZN', + 'MMK', + 'NAD', + 'NPR', + 'ANG', + 'NZD', + 'NIO', + 'NGN', + 'NOK', + 'OMR', + 'PKR', + 'PAB', + 'PGK', + 'PYG', + 'PEN', + 'PHP', + 'PLN', + 'QAR', + 'RON', + 'RUB', + 'RWF', + 'SHP', + 'WST', + 'STN', + 'SAR', + 'RSD', + 'SCR', + 'SLE', + 'SGD', + 'SBD', + 'SOS', + 'ZAR', + 'KRW', + 'SSP', + 'LKR', + 'SDG', + 'SRD', + 'SZL', + 'SEK', + 'CHF', + 'TWD', + 'TJS', + 'TZS', + 'THB', + 'TOP', + 'TTD', + 'TND', + 'TRY', + 'TMT', + 'UGX', + 'UAH', + 'AED', + 'USD', + 'UYU', + 'UZS', + 'VUV', + 'VES', + 'VND', + 'YER', + 'ZMW', + 'ZWL', +]; +var mastercardFXM = /** @class */ (function (_super) { + __extends(mastercardFXM, _super); + function mastercardFXM() { + var _this = _super.call(this, []) || this; + _this.ableToGetAllFXRate = false; + return _this; + } + Object.defineProperty(mastercardFXM.prototype, "fxRateList", { + get: function () { + var fxRateList = {}; + currenciesList.forEach(function (from) { + fxRateList[from] = {}; + currenciesList.forEach(function (to) { + var currency = new Proxy({}, { + get: function (_obj, prop) { + var _a; + if (![ + 'cash', + 'remit', + 'middle', + 'updated', + ].includes(prop.toString())) { + return undefined; + } + if (!cache.has("" + from + to)) { + var request = sync_request_1["default"]('GET', "https://www.mastercard.co.uk/settlement/currencyrate/conversion-rate?fxDate=0000-00-00&transCurr=" + to + "&crdhldBillCurr=" + from + "&bankFee=0&transAmt=1", { + headers: { + 'user-agent': (_a = process.env['HEADER_USER_AGENT']) !== null && _a !== void 0 ? _a : 'fxrate axios/latest' + } + }); + cache.set("" + from + to, request.getBody().toString()); + } + if (['cash', 'remit', 'middle'].includes(prop.toString())) { + var data = JSON.parse(cache.get("" + from + to)); + return mathjs_1.divide(mathjs_1.fraction(data.data.transAmt), mathjs_1.fraction(data.data.conversionRate)); + } + else { + var data = JSON.parse(cache.get("" + from + to)); + return new Date(data.data.fxDate); + } + } + }); + fxRateList[from][to] = currency; + }); + }); + return fxRateList; + }, + enumerable: false, + configurable: true + }); + mastercardFXM.prototype.getfxRateList = function (from, to) { + var _a; + return __awaiter(this, void 0, void 0, function () { + var req, data; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!(currenciesList.includes(from) && + currenciesList.includes(to))) { + throw new Error('Currency not supported'); + } + if (cache.has("" + from + to)) { + return [2 /*return*/, this.fxRateList[from][to]]; + } + return [4 /*yield*/, axios_1["default"].get("https://www.mastercard.co.uk/settlement/currencyrate/conversion-rate?fxDate=0000-00-00&transCurr=" + to + "&crdhldBillCurr=" + from + "&bankFee=0&transAmt=1", { + headers: { + 'User-Agent': (_a = process.env['HEADER_USER_AGENT']) !== null && _a !== void 0 ? _a : 'fxrate axios/latest' + } + })]; + case 1: + req = _b.sent(); + data = req.data; + cache.set("" + from + to, JSON.stringify(data)); + return [2 /*return*/, this.fxRateList[from][to]]; + } + }); + }); + }; + mastercardFXM.prototype.update = function () { + throw new Error('Method is deprecated'); + }; + return mastercardFXM; +}(fxManager_1["default"])); +exports["default"] = mastercardFXM; diff --git a/src/FXGetter/mastercard.ts b/src/FXGetter/mastercard.ts index 7171f9a..9b71d18 100644 --- a/src/FXGetter/mastercard.ts +++ b/src/FXGetter/mastercard.ts @@ -189,24 +189,15 @@ export default class mastercardFXM extends fxManager { } if (!cache.has(`${from}${to}`)) { - const preRequest = syncRequest( - 'GET', - `https://www.mastercard.co.uk/en-us/personal/get-support/convert-currency.html`, - ); - const request = syncRequest( 'GET', `https://www.mastercard.co.uk/settlement/currencyrate/conversion-rate?fxDate=0000-00-00&transCurr=${to}&crdhldBillCurr=${from}&bankFee=0&transAmt=1`, { headers: { - Cookie: preRequest.headers[ - 'set-cookie' - ] - .map( - (cookie) => - cookie.split(';')[0], - ) - .join('; '), + 'user-agent': + process.env[ + 'HEADER_USER_AGENT' + ] ?? 'fxrate axios/latest', }, }, ); @@ -258,17 +249,6 @@ export default class mastercardFXM extends fxManager { return this.fxRateList[from][to]; } - const preRequest = await axios.get( - `https://www.mastercard.co.uk/en-us/personal/get-support/convert-currency.html`, - ); - - console.log(preRequest.headers); - console.log( - preRequest.headers['set-cookie'] - .map((cookie) => cookie.split(';')[0]) - .join('; '), - ); - const req = await axios.get( `https://www.mastercard.co.uk/settlement/currencyrate/conversion-rate?fxDate=0000-00-00&transCurr=${to}&crdhldBillCurr=${from}&bankFee=0&transAmt=1`, { @@ -276,9 +256,6 @@ export default class mastercardFXM extends fxManager { 'User-Agent': process.env['HEADER_USER_AGENT'] ?? 'fxrate axios/latest', - Cookie: preRequest.headers['set-cookie'] - .map((cookie) => cookie.split(';')[0]) - .join('; '), }, }, );