azion
Version:
Azion Packages for Edge Computing.
3 lines • 935 kB
JavaScript
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3;var WB=Object.create;var ql=Object.defineProperty;var HB=Object.getOwnPropertyDescriptor;var KB=Object.getOwnPropertyNames;var ZB=Object.getPrototypeOf,JB=Object.prototype.hasOwnProperty;var YB=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var de=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),QB=(e,r)=>{for(var t in r)ql(e,t,{get:r[t],enumerable:!0})},XB=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of KB(r))!JB.call(e,i)&&i!==t&&ql(e,i,{get:()=>r[i],enumerable:!(n=HB(r,i))||n.enumerable});return e};var dr=(e,r,t)=>(t=e!=null?WB(ZB(e)):{},XB(r||!e||!e.__esModule?ql(t,"default",{value:e,enumerable:!0}):t,e));var fi=de((tJ,wn)=>{"use strict";function Ul(){return wn.exports=Ul=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},wn.exports.__esModule=!0,wn.exports.default=wn.exports,Ul.apply(null,arguments)}wn.exports=Ul,wn.exports.__esModule=!0,wn.exports.default=wn.exports});var fv=de((ef,lv)=>{"use strict";(function(e){"use strict";var r=Math.cosh||function(u){return Math.abs(u)<1e-9?1-u:(Math.exp(u)+Math.exp(-u))*.5},t=Math.sinh||function(u){return Math.abs(u)<1e-9?u:(Math.exp(u)-Math.exp(-u))*.5},n=function(u){var c=Math.PI/4;if(-c>u||u>c)return Math.cos(u)-1;var f=u*u;return f*(f*(f*(f*(f*(f*(f*(f/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},i=function(u,c){var f=Math.abs(u),p=Math.abs(c);return f<3e3&&p<3e3?Math.sqrt(f*f+p*p):(f<p?(f=p,p=u/c):p=c/u,f*Math.sqrt(1+p*p))},a=function(){throw SyntaxError("Invalid Param")};function o(u,c){var f=Math.abs(u),p=Math.abs(c);return u===0?Math.log(p):c===0?Math.log(f):f<3e3&&p<3e3?Math.log(u*u+c*c)*.5:(u=u/2,c=c/2,.5*Math.log(u*u+c*c)+Math.LN2)}var s=function(u,c){var f={re:0,im:0};if(u==null)f.re=f.im=0;else if(c!==void 0)f.re=u,f.im=c;else switch(typeof u){case"object":if("im"in u&&"re"in u)f.re=u.re,f.im=u.im;else if("abs"in u&&"arg"in u){if(!Number.isFinite(u.abs)&&Number.isFinite(u.arg))return l.INFINITY;f.re=u.abs*Math.cos(u.arg),f.im=u.abs*Math.sin(u.arg)}else if("r"in u&&"phi"in u){if(!Number.isFinite(u.r)&&Number.isFinite(u.phi))return l.INFINITY;f.re=u.r*Math.cos(u.phi),f.im=u.r*Math.sin(u.phi)}else u.length===2?(f.re=u[0],f.im=u[1]):a();break;case"string":f.im=f.re=0;var p=u.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),m=1,d=0;p===null&&a();for(var h=0;h<p.length;h++){var y=p[h];y===" "||y===" "||y===`
`||(y==="+"?m++:y==="-"?d++:y==="i"||y==="I"?(m+d===0&&a(),p[h+1]!==" "&&!isNaN(p[h+1])?(f.im+=parseFloat((d%2?"-":"")+p[h+1]),h++):f.im+=parseFloat((d%2?"-":"")+"1"),m=d=0):((m+d===0||isNaN(y))&&a(),p[h+1]==="i"||p[h+1]==="I"?(f.im+=parseFloat((d%2?"-":"")+y),h++):f.re+=parseFloat((d%2?"-":"")+y),m=d=0))}m+d>0&&a();break;case"number":f.im=0,f.re=u;break;default:a()}return isNaN(f.re)||isNaN(f.im),f};function l(u,c){if(!(this instanceof l))return new l(u,c);var f=s(u,c);this.re=f.re,this.im=f.im}l.prototype={re:0,im:0,sign:function(){var u=this.abs();return new l(this.re/u,this.im/u)},add:function(u,c){var f=new l(u,c);return this.isInfinite()&&f.isInfinite()?l.NAN:this.isInfinite()||f.isInfinite()?l.INFINITY:new l(this.re+f.re,this.im+f.im)},sub:function(u,c){var f=new l(u,c);return this.isInfinite()&&f.isInfinite()?l.NAN:this.isInfinite()||f.isInfinite()?l.INFINITY:new l(this.re-f.re,this.im-f.im)},mul:function(u,c){var f=new l(u,c);return this.isInfinite()&&f.isZero()||this.isZero()&&f.isInfinite()?l.NAN:this.isInfinite()||f.isInfinite()?l.INFINITY:f.im===0&&this.im===0?new l(this.re*f.re,0):new l(this.re*f.re-this.im*f.im,this.re*f.im+this.im*f.re)},div:function(u,c){var f=new l(u,c);if(this.isZero()&&f.isZero()||this.isInfinite()&&f.isInfinite())return l.NAN;if(this.isInfinite()||f.isZero())return l.INFINITY;if(this.isZero()||f.isInfinite())return l.ZERO;u=this.re,c=this.im;var p=f.re,m=f.im,d,h;return m===0?new l(u/p,c/p):Math.abs(p)<Math.abs(m)?(h=p/m,d=p*h+m,new l((u*h+c)/d,(c*h-u)/d)):(h=m/p,d=m*h+p,new l((u+c*h)/d,(c-u*h)/d))},pow:function(u,c){var f=new l(u,c);if(u=this.re,c=this.im,f.isZero())return l.ONE;if(f.im===0){if(c===0&&u>0)return new l(Math.pow(u,f.re),0);if(u===0)switch((f.re%4+4)%4){case 0:return new l(Math.pow(c,f.re),0);case 1:return new l(0,Math.pow(c,f.re));case 2:return new l(-Math.pow(c,f.re),0);case 3:return new l(0,-Math.pow(c,f.re))}}if(u===0&&c===0&&f.re>0&&f.im>=0)return l.ZERO;var p=Math.atan2(c,u),m=o(u,c);return u=Math.exp(f.re*m-f.im*p),c=f.im*m+f.re*p,new l(u*Math.cos(c),u*Math.sin(c))},sqrt:function(){var u=this.re,c=this.im,f=this.abs(),p,m;if(u>=0){if(c===0)return new l(Math.sqrt(u),0);p=.5*Math.sqrt(2*(f+u))}else p=Math.abs(c)/Math.sqrt(2*(f-u));return u<=0?m=.5*Math.sqrt(2*(f-u)):m=Math.abs(c)/Math.sqrt(2*(f+u)),new l(p,c<0?-m:m)},exp:function(){var u=Math.exp(this.re);return this.im,new l(u*Math.cos(this.im),u*Math.sin(this.im))},expm1:function(){var u=this.re,c=this.im;return new l(Math.expm1(u)*Math.cos(c)+n(c),Math.exp(u)*Math.sin(c))},log:function(){var u=this.re,c=this.im;return c===0&&u>0,new l(o(u,c),Math.atan2(c,u))},abs:function(){return i(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var u=this.re,c=this.im;return new l(Math.sin(u)*r(c),Math.cos(u)*t(c))},cos:function(){var u=this.re,c=this.im;return new l(Math.cos(u)*r(c),-Math.sin(u)*t(c))},tan:function(){var u=2*this.re,c=2*this.im,f=Math.cos(u)+r(c);return new l(Math.sin(u)/f,t(c)/f)},cot:function(){var u=2*this.re,c=2*this.im,f=Math.cos(u)-r(c);return new l(-Math.sin(u)/f,t(c)/f)},sec:function(){var u=this.re,c=this.im,f=.5*r(2*c)+.5*Math.cos(2*u);return new l(Math.cos(u)*r(c)/f,Math.sin(u)*t(c)/f)},csc:function(){var u=this.re,c=this.im,f=.5*r(2*c)-.5*Math.cos(2*u);return new l(Math.sin(u)*r(c)/f,-Math.cos(u)*t(c)/f)},asin:function(){var u=this.re,c=this.im,f=new l(c*c-u*u+1,-2*u*c).sqrt(),p=new l(f.re-c,f.im+u).log();return new l(p.im,-p.re)},acos:function(){var u=this.re,c=this.im,f=new l(c*c-u*u+1,-2*u*c).sqrt(),p=new l(f.re-c,f.im+u).log();return new l(Math.PI/2-p.im,p.re)},atan:function(){var u=this.re,c=this.im;if(u===0){if(c===1)return new l(0,1/0);if(c===-1)return new l(0,-1/0)}var f=u*u+(1-c)*(1-c),p=new l((1-c*c-u*u)/f,-2*u/f).log();return new l(-.5*p.im,.5*p.re)},acot:function(){var u=this.re,c=this.im;if(c===0)return new l(Math.atan2(1,u),0);var f=u*u+c*c;return f!==0?new l(u/f,-c/f).atan():new l(u!==0?u/0:0,c!==0?-c/0:0).atan()},asec:function(){var u=this.re,c=this.im;if(u===0&&c===0)return new l(0,1/0);var f=u*u+c*c;return f!==0?new l(u/f,-c/f).acos():new l(u!==0?u/0:0,c!==0?-c/0:0).acos()},acsc:function(){var u=this.re,c=this.im;if(u===0&&c===0)return new l(Math.PI/2,1/0);var f=u*u+c*c;return f!==0?new l(u/f,-c/f).asin():new l(u!==0?u/0:0,c!==0?-c/0:0).asin()},sinh:function(){var u=this.re,c=this.im;return new l(t(u)*Math.cos(c),r(u)*Math.sin(c))},cosh:function(){var u=this.re,c=this.im;return new l(r(u)*Math.cos(c),t(u)*Math.sin(c))},tanh:function(){var u=2*this.re,c=2*this.im,f=r(u)+Math.cos(c);return new l(t(u)/f,Math.sin(c)/f)},coth:function(){var u=2*this.re,c=2*this.im,f=r(u)-Math.cos(c);return new l(t(u)/f,-Math.sin(c)/f)},csch:function(){var u=this.re,c=this.im,f=Math.cos(2*c)-r(2*u);return new l(-2*t(u)*Math.cos(c)/f,2*r(u)*Math.sin(c)/f)},sech:function(){var u=this.re,c=this.im,f=Math.cos(2*c)+r(2*u);return new l(2*r(u)*Math.cos(c)/f,-2*t(u)*Math.sin(c)/f)},asinh:function(){var u=this.im;this.im=-this.re,this.re=u;var c=this.asin();return this.re=-this.im,this.im=u,u=c.re,c.re=-c.im,c.im=u,c},acosh:function(){var u=this.acos();if(u.im<=0){var c=u.re;u.re=-u.im,u.im=c}else{var c=u.im;u.im=-u.re,u.re=c}return u},atanh:function(){var u=this.re,c=this.im,f=u>1&&c===0,p=1-u,m=1+u,d=p*p+c*c,h=d!==0?new l((m*p-c*c)/d,(c*p+m*c)/d):new l(u!==-1?u/0:0,c!==0?c/0:0),y=h.re;return h.re=o(h.re,h.im)/2,h.im=Math.atan2(h.im,y)/2,f&&(h.im=-h.im),h},acoth:function(){var u=this.re,c=this.im;if(u===0&&c===0)return new l(0,Math.PI/2);var f=u*u+c*c;return f!==0?new l(u/f,-c/f).atanh():new l(u!==0?u/0:0,c!==0?-c/0:0).atanh()},acsch:function(){var u=this.re,c=this.im;if(c===0)return new l(u!==0?Math.log(u+Math.sqrt(u*u+1)):1/0,0);var f=u*u+c*c;return f!==0?new l(u/f,-c/f).asinh():new l(u!==0?u/0:0,c!==0?-c/0:0).asinh()},asech:function(){var u=this.re,c=this.im;if(this.isZero())return l.INFINITY;var f=u*u+c*c;return f!==0?new l(u/f,-c/f).acosh():new l(u!==0?u/0:0,c!==0?-c/0:0).acosh()},inverse:function(){if(this.isZero())return l.INFINITY;if(this.isInfinite())return l.ZERO;var u=this.re,c=this.im,f=u*u+c*c;return new l(u/f,-c/f)},conjugate:function(){return new l(this.re,-this.im)},neg:function(){return new l(-this.re,-this.im)},ceil:function(u){return u=Math.pow(10,u||0),new l(Math.ceil(this.re*u)/u,Math.ceil(this.im*u)/u)},floor:function(u){return u=Math.pow(10,u||0),new l(Math.floor(this.re*u)/u,Math.floor(this.im*u)/u)},round:function(u){return u=Math.pow(10,u||0),new l(Math.round(this.re*u)/u,Math.round(this.im*u)/u)},equals:function(u,c){var f=new l(u,c);return Math.abs(f.re-this.re)<=l.EPSILON&&Math.abs(f.im-this.im)<=l.EPSILON},clone:function(){return new l(this.re,this.im)},toString:function(){var u=this.re,c=this.im,f="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(u)<l.EPSILON&&(u=0),Math.abs(c)<l.EPSILON&&(c=0),c===0?f+u:(u!==0?(f+=u,f+=" ",c<0?(c=-c,f+="-"):f+="+",f+=" "):c<0&&(c=-c,f+="-"),c!==1&&(f+=c),f+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},l.ZERO=new l(0,0),l.ONE=new l(1,0),l.I=new l(0,1),l.PI=new l(Math.PI,0),l.E=new l(Math.E,0),l.INFINITY=new l(1/0,1/0),l.NAN=new l(NaN,NaN),l.EPSILON=1e-15,typeof define=="function"&&define.amd?define([],function(){return l}):typeof ef=="object"?(Object.defineProperty(l,"__esModule",{value:!0}),l.default=l,l.Complex=l,lv.exports=l):e.Complex=l})(ef)});var up=de((uoe,Mn)=>{"use strict";function sp(e){"@babel/helpers - typeof";return Mn.exports=sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Mn.exports.__esModule=!0,Mn.exports.default=Mn.exports,sp(e)}Mn.exports=sp,Mn.exports.__esModule=!0,Mn.exports.default=Mn.exports});var Lb=de((coe,wo)=>{"use strict";var $b=up().default;function Y4(e,r){if($b(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if($b(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}wo.exports=Y4,wo.exports.__esModule=!0,wo.exports.default=wo.exports});var kb=de((loe,_o)=>{"use strict";var Q4=up().default,X4=Lb();function e5(e){var r=X4(e,"string");return Q4(r)=="symbol"?r:r+""}_o.exports=e5,_o.exports.__esModule=!0,_o.exports.default=_o.exports});var Zr=de((foe,Do)=>{"use strict";var r5=kb();function t5(e,r,t){return(r=r5(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Do.exports=t5,Do.exports.__esModule=!0,Do.exports.default=Do.exports});var Wx=de((sce,Vx)=>{"use strict";Vx.exports=function e(r,t){"use strict";var n=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,i=/(^[ ]*|[ ]*$)/g,a=/(^([\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,s=/^0/,l=function(g){return e.insensitive&&(""+g).toLowerCase()||""+g},u=l(r).replace(i,"")||"",c=l(t).replace(i,"")||"",f=u.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(u.match(o),16)||f.length!==1&&u.match(a)&&Date.parse(u),d=parseInt(c.match(o),16)||m&&c.match(a)&&Date.parse(c)||null,h,y;if(d){if(m<d)return-1;if(m>d)return 1}for(var b=0,w=Math.max(f.length,p.length);b<w;b++){if(h=!(f[b]||"").match(s)&&parseFloat(f[b])||f[b]||0,y=!(p[b]||"").match(s)&&parseFloat(p[b])||p[b]||0,isNaN(h)!==isNaN(y))return isNaN(h)?1:-1;if(typeof h!=typeof y&&(h+="",y+=""),h<y)return-1;if(h>y)return 1}return 0}});var hw=de((wde,dw)=>{"use strict";var lp=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},A6={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},w6={"\u2013":"\\--","\u2014":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},_6=function(r,t){return lp({},r,t)};dw.exports=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.preserveFormatting,n=t===void 0?!1:t,i=r.escapeMapFn,a=i===void 0?_6:i,o=String(e),s="",l=a(lp({},A6),n?lp({},w6):{}),u=Object.keys(l),c=function(){var p=!1;u.forEach(function(m,d){p||o.length>=m.length&&o.slice(0,m.length)===m&&(s+=l[u[d]],o=o.slice(m.length,o.length),p=!0)}),p||(s+=o.slice(0,1),o=o.slice(1,o.length))};o;)c();return s}});var ZC=de((KC,yp)=>{"use strict";(function(e,r,t){function n(s){var l=this,u=o();l.next=function(){var c=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=c-(l.c=c|0)},l.c=1,l.s0=u(" "),l.s1=u(" "),l.s2=u(" "),l.s0-=u(s),l.s0<0&&(l.s0+=1),l.s1-=u(s),l.s1<0&&(l.s1+=1),l.s2-=u(s),l.s2<0&&(l.s2+=1),u=null}function i(s,l){return l.c=s.c,l.s0=s.s0,l.s1=s.s1,l.s2=s.s2,l}function a(s,l){var u=new n(s),c=l&&l.state,f=u.next;return f.int32=function(){return u.next()*4294967296|0},f.double=function(){return f()+(f()*2097152|0)*11102230246251565e-32},f.quick=f,c&&(typeof c=="object"&&i(c,u),f.state=function(){return i(u,{})}),f}function o(){var s=4022871197,l=function(u){u=String(u);for(var c=0;c<u.length;c++){s+=u.charCodeAt(c);var f=.02519603282416938*s;s=f>>>0,f-=s,f*=s,s=f>>>0,f-=s,s+=f*4294967296}return(s>>>0)*23283064365386963e-26};return l}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.alea=a})(KC,typeof yp=="object"&&yp,typeof define=="function"&&define)});var YC=de((JC,bp)=>{"use strict";(function(e,r,t){function n(o){var s=this,l="";s.x=0,s.y=0,s.z=0,s.w=0,s.next=function(){var c=s.x^s.x<<11;return s.x=s.y,s.y=s.z,s.z=s.w,s.w^=s.w>>>19^c^c>>>8},o===(o|0)?s.x=o:l+=o;for(var u=0;u<l.length+64;u++)s.x^=l.charCodeAt(u)|0,s.next()}function i(o,s){return s.x=o.x,s.y=o.y,s.z=o.z,s.w=o.w,s}function a(o,s){var l=new n(o),u=s&&s.state,c=function(){return(l.next()>>>0)/4294967296};return c.double=function(){do var f=l.next()>>>11,p=(l.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},c.int32=l.next,c.quick=c,u&&(typeof u=="object"&&i(u,l),c.state=function(){return i(l,{})}),c}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xor128=a})(JC,typeof bp=="object"&&bp,typeof define=="function"&&define)});var XC=de((QC,xp)=>{"use strict";(function(e,r,t){function n(o){var s=this,l="";s.next=function(){var c=s.x^s.x>>>2;return s.x=s.y,s.y=s.z,s.z=s.w,s.w=s.v,(s.d=s.d+362437|0)+(s.v=s.v^s.v<<4^(c^c<<1))|0},s.x=0,s.y=0,s.z=0,s.w=0,s.v=0,o===(o|0)?s.x=o:l+=o;for(var u=0;u<l.length+64;u++)s.x^=l.charCodeAt(u)|0,u==l.length&&(s.d=s.x<<10^s.x>>>4),s.next()}function i(o,s){return s.x=o.x,s.y=o.y,s.z=o.z,s.w=o.w,s.v=o.v,s.d=o.d,s}function a(o,s){var l=new n(o),u=s&&s.state,c=function(){return(l.next()>>>0)/4294967296};return c.double=function(){do var f=l.next()>>>11,p=(l.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},c.int32=l.next,c.quick=c,u&&(typeof u=="object"&&i(u,l),c.state=function(){return i(l,{})}),c}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xorwow=a})(QC,typeof xp=="object"&&xp,typeof define=="function"&&define)});var rM=de((eM,Ap)=>{"use strict";(function(e,r,t){function n(o){var s=this;s.next=function(){var u=s.x,c=s.i,f,p,m;return f=u[c],f^=f>>>7,p=f^f<<24,f=u[c+1&7],p^=f^f>>>10,f=u[c+3&7],p^=f^f>>>3,f=u[c+4&7],p^=f^f<<7,f=u[c+7&7],f=f^f<<13,p^=f^f<<9,u[c]=p,s.i=c+1&7,p};function l(u,c){var f,p,m=[];if(c===(c|0))p=m[0]=c;else for(c=""+c,f=0;f<c.length;++f)m[f&7]=m[f&7]<<15^c.charCodeAt(f)+m[f+1&7]<<13;for(;m.length<8;)m.push(0);for(f=0;f<8&&m[f]===0;++f);for(f==8?p=m[7]=-1:p=m[f],u.x=m,u.i=0,f=256;f>0;--f)u.next()}l(s,o)}function i(o,s){return s.x=o.x.slice(),s.i=o.i,s}function a(o,s){o==null&&(o=+new Date);var l=new n(o),u=s&&s.state,c=function(){return(l.next()>>>0)/4294967296};return c.double=function(){do var f=l.next()>>>11,p=(l.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},c.int32=l.next,c.quick=c,u&&(u.x&&i(u,l),c.state=function(){return i(l,{})}),c}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xorshift7=a})(eM,typeof Ap=="object"&&Ap,typeof define=="function"&&define)});var nM=de((tM,wp)=>{"use strict";(function(e,r,t){function n(o){var s=this;s.next=function(){var u=s.w,c=s.X,f=s.i,p,m;return s.w=u=u+1640531527|0,m=c[f+34&127],p=c[f=f+1&127],m^=m<<13,p^=p<<17,m^=m>>>15,p^=p>>>12,m=c[f]=m^p,s.i=f,m+(u^u>>>16)|0};function l(u,c){var f,p,m,d,h,y=[],b=128;for(c===(c|0)?(p=c,c=null):(c=c+"\0",p=0,b=Math.max(b,c.length)),m=0,d=-32;d<b;++d)c&&(p^=c.charCodeAt((d+32)%c.length)),d===0&&(h=p),p^=p<<10,p^=p>>>15,p^=p<<4,p^=p>>>13,d>=0&&(h=h+1640531527|0,f=y[d&127]^=p+h,m=f==0?m+1:0);for(m>=128&&(y[(c&&c.length||0)&127]=-1),m=127,d=4*128;d>0;--d)p=y[m+34&127],f=y[m=m+1&127],p^=p<<13,f^=f<<17,p^=p>>>15,f^=f>>>12,y[m]=p^f;u.w=h,u.X=y,u.i=m}l(s,o)}function i(o,s){return s.i=o.i,s.w=o.w,s.X=o.X.slice(),s}function a(o,s){o==null&&(o=+new Date);var l=new n(o),u=s&&s.state,c=function(){return(l.next()>>>0)/4294967296};return c.double=function(){do var f=l.next()>>>11,p=(l.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},c.int32=l.next,c.quick=c,u&&(u.X&&i(u,l),c.state=function(){return i(l,{})}),c}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xor4096=a})(tM,typeof wp=="object"&&wp,typeof define=="function"&&define)});var aM=de((iM,_p)=>{"use strict";(function(e,r,t){function n(o){var s=this,l="";s.next=function(){var c=s.b,f=s.c,p=s.d,m=s.a;return c=c<<25^c>>>7^f,f=f-p|0,p=p<<24^p>>>8^m,m=m-c|0,s.b=c=c<<20^c>>>12^f,s.c=f=f-p|0,s.d=p<<16^f>>>16^m,s.a=m-c|0},s.a=0,s.b=0,s.c=-1640531527,s.d=1367130551,o===Math.floor(o)?(s.a=o/4294967296|0,s.b=o|0):l+=o;for(var u=0;u<l.length+20;u++)s.b^=l.charCodeAt(u)|0,s.next()}function i(o,s){return s.a=o.a,s.b=o.b,s.c=o.c,s.d=o.d,s}function a(o,s){var l=new n(o),u=s&&s.state,c=function(){return(l.next()>>>0)/4294967296};return c.double=function(){do var f=l.next()>>>11,p=(l.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},c.int32=l.next,c.quick=c,u&&(typeof u=="object"&&i(u,l),c.state=function(){return i(l,{})}),c}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.tychei=a})(iM,typeof _p=="object"&&_p,typeof define=="function"&&define)});var sM=de((oM,$c)=>{"use strict";(function(e,r,t){var n=256,i=6,a=52,o="random",s=t.pow(n,i),l=t.pow(2,a),u=l*2,c=n-1,f;function p(g,x,A){var v=[];x=x==!0?{entropy:!0}:x||{};var S=y(h(x.entropy?[g,w(r)]:_nullishCoalesce(g, () => (b())),3),v),D=new m(v),_=function(){for(var N=D.g(i),C=s,T=0;N<l;)N=(N+T)*n,C*=n,T=D.g(1);for(;N>=u;)N/=2,C/=2,T>>>=1;return(N+T)/C};return _.int32=function(){return D.g(4)|0},_.quick=function(){return D.g(4)/4294967296},_.double=_,y(w(D.S),r),(x.pass||A||function(N,C,T,F){return F&&(F.S&&d(F,D),N.state=function(){return d(D,{})}),T?(t[o]=N,C):N})(_,S,"global"in x?x.global:this==t,x.state)}function m(g){var x,A=g.length,v=this,S=0,D=v.i=v.j=0,_=v.S=[];for(A||(g=[A++]);S<n;)_[S]=S++;for(S=0;S<n;S++)_[S]=_[D=c&D+g[S%A]+(x=_[S])],_[D]=x;(v.g=function(N){for(var C,T=0,F=v.i,B=v.j,z=v.S;N--;)C=z[F=c&F+1],T=T*n+z[c&(z[F]=z[B=c&B+C])+(z[B]=C)];return v.i=F,v.j=B,T})(n)}function d(g,x){return x.i=g.i,x.j=g.j,x.S=g.S.slice(),x}function h(g,x){var A=[],v=typeof g,S;if(x&&v=="object")for(S in g)try{A.push(h(g[S],x-1))}catch (e10){}return A.length?A:v=="string"?g:g+"\0"}function y(g,x){for(var A=g+"",v,S=0;S<A.length;)x[c&S]=c&(v^=x[c&S]*19)+A.charCodeAt(S++);return w(x)}function b(){try{var g;return f&&(g=f.randomBytes)?g=g(n):(g=new Uint8Array(n),(e.crypto||e.msCrypto).getRandomValues(g)),w(g)}catch (e11){var x=e.navigator,A=x&&x.plugins;return[+new Date,e,A,e.screen,w(r)]}}function w(g){return String.fromCharCode.apply(0,g)}if(y(t.random(),r),typeof $c=="object"&&$c.exports){$c.exports=p;try{f=YB("crypto")}catch (e12){}}else typeof define=="function"&&define.amd?define(function(){return p}):t["seed"+o]=p})(typeof self<"u"?self:oM,[],Math)});var cM=de((PNe,uM)=>{"use strict";var L9=ZC(),k9=YC(),U9=XC(),j9=rM(),G9=nM(),V9=aM(),Ai=sM();Ai.alea=L9;Ai.xor128=k9;Ai.xorwow=U9;Ai.xorshift7=j9;Ai.xor4096=G9;Ai.tychei=V9;uM.exports=Ai});var kT=de((KFe,Tp)=>{"use strict";function Mp(){}Mp.prototype={on:function(e,r,t){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:r,ctx:t}),this},once:function(e,r,t){var n=this;function i(){n.off(e,i),r.apply(t,arguments)}return i._=r,this.on(e,i,t)},emit:function(e){var r=[].slice.call(arguments,1),t=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=t.length;for(n;n<i;n++)t[n].fn.apply(t[n].ctx,r);return this},off:function(e,r){var t=this.e||(this.e={}),n=t[e],i=[];if(n&&r)for(var a=0,o=n.length;a<o;a++)n[a].fn!==r&&n[a].fn._!==r&&i.push(n[a]);return i.length?t[e]=i:delete t[e],this}};Tp.exports=Mp;Tp.exports.TinyEmitter=Mp});var Pa=de(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.regexpCode=pr.getEsmExportName=pr.getProperty=pr.safeStringify=pr.stringify=pr.strConcat=pr.addCodeArg=pr.str=pr._=pr.nil=pr._Code=pr.Name=pr.IDENTIFIER=pr._CodeOrName=void 0;var To=class{};pr._CodeOrName=To;pr.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var wi=class extends To{constructor(r){if(super(),!pr.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};pr.Name=wi;var Lt=class extends To{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((t,n)=>(n instanceof wi&&(t[n.str]=(t[n.str]||0)+1),t),{})}};pr._Code=Lt;pr.nil=new Lt("");function aO(e,...r){let t=[e[0]],n=0;for(;n<r.length;)kp(t,r[n]),t.push(e[++n]);return new Lt(t)}pr._=aO;var Lp=new Lt("+");function oO(e,...r){let t=[Oo(e[0])],n=0;for(;n<r.length;)t.push(Lp),kp(t,r[n]),t.push(Lp,Oo(e[++n]));return l7(t),new Lt(t)}pr.str=oO;function kp(e,r){r instanceof Lt?e.push(...r._items):r instanceof wi?e.push(r):e.push(m7(r))}pr.addCodeArg=kp;function l7(e){let r=1;for(;r<e.length-1;){if(e[r]===Lp){let t=f7(e[r-1],e[r+1]);if(t!==void 0){e.splice(r-1,3,t);continue}e[r++]="+"}r++}}function f7(e,r){if(r==='""')return e;if(e==='""')return r;if(typeof e=="string")return r instanceof wi||e[e.length-1]!=='"'?void 0:typeof r!="string"?`${e.slice(0,-1)}${r}"`:r[0]==='"'?e.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(e instanceof wi))return`"${e}${r.slice(1)}`}function p7(e,r){return r.emptyStr()?e:e.emptyStr()?r:oO`${e}${r}`}pr.strConcat=p7;function m7(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Oo(Array.isArray(e)?e.join(","):e)}function d7(e){return new Lt(Oo(e))}pr.stringify=d7;function Oo(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}pr.safeStringify=Oo;function h7(e){return typeof e=="string"&&pr.IDENTIFIER.test(e)?new Lt(`.${e}`):aO`[${e}]`}pr.getProperty=h7;function g7(e){if(typeof e=="string"&&pr.IDENTIFIER.test(e))return new Lt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}pr.getEsmExportName=g7;function v7(e){return new Lt(e.toString())}pr.regexpCode=v7});var Gp=de(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.ValueScope=At.ValueScopeName=At.Scope=At.varKinds=At.UsedValueState=void 0;var xt=Pa(),Up=class extends Error{constructor(r){super(`CodeGen: "code" for ${r} not defined`),this.value=r.value}},jc;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(jc||(At.UsedValueState=jc={}));At.varKinds={const:new xt.Name("const"),let:new xt.Name("let"),var:new xt.Name("var")};var Gc=class{constructor({prefixes:r,parent:t}={}){this._names={},this._prefixes=r,this._parent=t}toName(r){return r instanceof xt.Name?r:this.name(r)}name(r){return new xt.Name(this._newName(r))}_newName(r){let t=this._names[r]||this._nameGroup(r);return`${r}${t.index++}`}_nameGroup(r){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(r)||this._prefixes&&!this._prefixes.has(r))throw new Error(`CodeGen: prefix "${r}" is not allowed in this scope`);return this._names[r]={prefix:r,index:0}}};At.Scope=Gc;var Vc=class extends xt.Name{constructor(r,t){super(t),this.prefix=r}setValue(r,{property:t,itemIndex:n}){this.value=r,this.scopePath=(0,xt._)`.${new xt.Name(t)}[${n}]`}};At.ValueScopeName=Vc;var y7=(0,xt._)`\n`,jp=class extends Gc{constructor(r){super(r),this._values={},this._scope=r.scope,this.opts={...r,_n:r.lines?y7:xt.nil}}get(){return this._scope}name(r){return new Vc(r,this._newName(r))}value(r,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(r),{prefix:a}=i,o=(n=t.key)!==null&&n!==void 0?n:t.ref,s=this._values[a];if(s){let c=s.get(o);if(c)return c}else s=this._values[a]=new Map;s.set(o,i);let l=this._scope[a]||(this._scope[a]=[]),u=l.length;return l[u]=t.ref,i.setValue(t,{property:a,itemIndex:u}),i}getValue(r,t){let n=this._values[r];if(n)return n.get(t)}scopeRefs(r,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,xt._)`${r}${n.scopePath}`})}scopeCode(r=this._values,t,n){return this._reduceValues(r,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,n)}_reduceValues(r,t,n={},i){let a=xt.nil;for(let o in r){let s=r[o];if(!s)continue;let l=n[o]=n[o]||new Map;s.forEach(u=>{if(l.has(u))return;l.set(u,jc.Started);let c=t(u);if(c){let f=this.opts.es5?At.varKinds.var:At.varKinds.const;a=(0,xt._)`${a}${f} ${u} = ${c};${this.opts._n}`}else if(c=_optionalChain([i, 'optionalCall', _10 => _10(u)]))a=(0,xt._)`${a}${c}${this.opts._n}`;else throw new Up(u);l.set(u,jc.Completed)})}return a}};At.ValueScope=jp});var We=de(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.or=Xe.and=Xe.not=Xe.CodeGen=Xe.operators=Xe.varKinds=Xe.ValueScopeName=Xe.ValueScope=Xe.Scope=Xe.Name=Xe.regexpCode=Xe.stringify=Xe.getProperty=Xe.nil=Xe.strConcat=Xe.str=Xe._=void 0;var or=Pa(),rn=Gp(),Yn=Pa();Object.defineProperty(Xe,"_",{enumerable:!0,get:function(){return Yn._}});Object.defineProperty(Xe,"str",{enumerable:!0,get:function(){return Yn.str}});Object.defineProperty(Xe,"strConcat",{enumerable:!0,get:function(){return Yn.strConcat}});Object.defineProperty(Xe,"nil",{enumerable:!0,get:function(){return Yn.nil}});Object.defineProperty(Xe,"getProperty",{enumerable:!0,get:function(){return Yn.getProperty}});Object.defineProperty(Xe,"stringify",{enumerable:!0,get:function(){return Yn.stringify}});Object.defineProperty(Xe,"regexpCode",{enumerable:!0,get:function(){return Yn.regexpCode}});Object.defineProperty(Xe,"Name",{enumerable:!0,get:function(){return Yn.Name}});var Zc=Gp();Object.defineProperty(Xe,"Scope",{enumerable:!0,get:function(){return Zc.Scope}});Object.defineProperty(Xe,"ValueScope",{enumerable:!0,get:function(){return Zc.ValueScope}});Object.defineProperty(Xe,"ValueScopeName",{enumerable:!0,get:function(){return Zc.ValueScopeName}});Object.defineProperty(Xe,"varKinds",{enumerable:!0,get:function(){return Zc.varKinds}});Xe.operators={GT:new or._Code(">"),GTE:new or._Code(">="),LT:new or._Code("<"),LTE:new or._Code("<="),EQ:new or._Code("==="),NEQ:new or._Code("!=="),NOT:new or._Code("!"),OR:new or._Code("||"),AND:new or._Code("&&"),ADD:new or._Code("+")};var Rn=class{optimizeNodes(){return this}optimizeNames(r,t){return this}},Vp=class extends Rn{constructor(r,t,n){super(),this.varKind=r,this.name=t,this.rhs=n}render({es5:r,_n:t}){let n=r?rn.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+t}optimizeNames(r,t){if(r[this.name.str])return this.rhs&&(this.rhs=za(this.rhs,r,t)),this}get names(){return this.rhs instanceof or._CodeOrName?this.rhs.names:{}}},Wc=class extends Rn{constructor(r,t,n){super(),this.lhs=r,this.rhs=t,this.sideEffects=n}render({_n:r}){return`${this.lhs} = ${this.rhs};`+r}optimizeNames(r,t){if(!(this.lhs instanceof or.Name&&!r[this.lhs.str]&&!this.sideEffects))return this.rhs=za(this.rhs,r,t),this}get names(){let r=this.lhs instanceof or.Name?{}:{...this.lhs.names};return Kc(r,this.rhs)}},Wp=class extends Wc{constructor(r,t,n,i){super(r,n,i),this.op=t}render({_n:r}){return`${this.lhs} ${this.op}= ${this.rhs};`+r}},Hp=class extends Rn{constructor(r){super(),this.label=r,this.names={}}render({_n:r}){return`${this.label}:`+r}},Kp=class extends Rn{constructor(r){super(),this.label=r,this.names={}}render({_n:r}){return`break${this.label?` ${this.label}`:""};`+r}},Zp=class extends Rn{constructor(r){super(),this.error=r}render({_n:r}){return`throw ${this.error};`+r}get names(){return this.error.names}},Jp=class extends Rn{constructor(r){super(),this.code=r}render({_n:r}){return`${this.code};`+r}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(r,t){return this.code=za(this.code,r,t),this}get names(){return this.code instanceof or._CodeOrName?this.code.names:{}}},Ro=class extends Rn{constructor(r=[]){super(),this.nodes=r}render(r){return this.nodes.reduce((t,n)=>t+n.render(r),"")}optimizeNodes(){let{nodes:r}=this,t=r.length;for(;t--;){let n=r[t].optimizeNodes();Array.isArray(n)?r.splice(t,1,...n):n?r[t]=n:r.splice(t,1)}return r.length>0?this:void 0}optimizeNames(r,t){let{nodes:n}=this,i=n.length;for(;i--;){let a=n[i];a.optimizeNames(r,t)||(b7(r,a.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((r,t)=>Si(r,t.names),{})}},Pn=class extends Ro{render(r){return"{"+r._n+super.render(r)+"}"+r._n}},Yp=class extends Ro{},Fa=class extends Pn{};Fa.kind="else";var _i=class e extends Pn{constructor(r,t){super(t),this.condition=r}render(r){let t=`if(${this.condition})`+super.render(r);return this.else&&(t+="else "+this.else.render(r)),t}optimizeNodes(){super.optimizeNodes();let r=this.condition;if(r===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new Fa(n):n}if(t)return r===!1?t instanceof e?t:t.nodes:this.nodes.length?this:new e(sO(r),t instanceof e?[t]:t.nodes);if(!(r===!1||!this.nodes.length))return this}optimizeNames(r,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(r,t),!!(super.optimizeNames(r,t)||this.else))return this.condition=za(this.condition,r,t),this}get names(){let r=super.names;return Kc(r,this.condition),this.else&&Si(r,this.else.names),r}};_i.kind="if";var Di=class extends Pn{};Di.kind="for";var Qp=class extends Di{constructor(r){super(),this.iteration=r}render(r){return`for(${this.iteration})`+super.render(r)}optimizeNames(r,t){if(super.optimizeNames(r,t))return this.iteration=za(this.iteration,r,t),this}get names(){return Si(super.names,this.iteration.names)}},Xp=class extends Di{constructor(r,t,n,i){super(),this.varKind=r,this.name=t,this.from=n,this.to=i}render(r){let t=r.es5?rn.varKinds.var:this.varKind,{name:n,from:i,to:a}=this;return`for(${t} ${n}=${i}; ${n}<${a}; ${n}++)`+super.render(r)}get names(){let r=Kc(super.names,this.from);return Kc(r,this.to)}},Hc=class extends Di{constructor(r,t,n,i){super(),this.loop=r,this.varKind=t,this.name=n,this.iterable=i}render(r){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(r)}optimizeNames(r,t){if(super.optimizeNames(r,t))return this.iterable=za(this.iterable,r,t),this}get names(){return Si(super.names,this.iterable.names)}},Po=class extends Pn{constructor(r,t,n){super(),this.name=r,this.args=t,this.async=n}render(r){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(r)}};Po.kind="func";var Fo=class extends Ro{render(r){return"return "+super.render(r)}};Fo.kind="return";var em=class extends Pn{render(r){let t="try"+super.render(r);return this.catch&&(t+=this.catch.render(r)),this.finally&&(t+=this.finally.render(r)),t}optimizeNodes(){var r,t;return super.optimizeNodes(),(r=this.catch)===null||r===void 0||r.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(r,t){var n,i;return super.optimizeNames(r,t),(n=this.catch)===null||n===void 0||n.optimizeNames(r,t),(i=this.finally)===null||i===void 0||i.optimizeNames(r,t),this}get names(){let r=super.names;return this.catch&&Si(r,this.catch.names),this.finally&&Si(r,this.finally.names),r}},zo=class extends Pn{constructor(r){super(),this.error=r}render(r){return`catch(${this.error})`+super.render(r)}};zo.kind="catch";var Bo=class extends Pn{render(r){return"finally"+super.render(r)}};Bo.kind="finally";var rm=class{constructor(r,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
`:""},this._extScope=r,this._scope=new rn.Scope({parent:r}),this._nodes=[new Yp]}toString(){return this._root.render(this.opts)}name(r){return this._scope.name(r)}scopeName(r){return this._extScope.name(r)}scopeValue(r,t){let n=this._extScope.value(r,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(r,t){return this._extScope.getValue(r,t)}scopeRefs(r){return this._extScope.scopeRefs(r,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(r,t,n,i){let a=this._scope.toName(t);return n!==void 0&&i&&(this._constants[a.str]=n),this._leafNode(new Vp(r,a,n)),a}const(r,t,n){return this._def(rn.varKinds.const,r,t,n)}let(r,t,n){return this._def(rn.varKinds.let,r,t,n)}var(r,t,n){return this._def(rn.varKinds.var,r,t,n)}assign(r,t,n){return this._leafNode(new Wc(r,t,n))}add(r,t){return this._leafNode(new Wp(r,Xe.operators.ADD,t))}code(r){return typeof r=="function"?r():r!==or.nil&&this._leafNode(new Jp(r)),this}object(...r){let t=["{"];for(let[n,i]of r)t.length>1&&t.push(","),t.push(n),(n!==i||this.opts.es5)&&(t.push(":"),(0,or.addCodeArg)(t,i));return t.push("}"),new or._Code(t)}if(r,t,n){if(this._blockNode(new _i(r)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(r){return this._elseNode(new _i(r))}else(){return this._elseNode(new Fa)}endIf(){return this._endBlockNode(_i,Fa)}_for(r,t){return this._blockNode(r),t&&this.code(t).endFor(),this}for(r,t){return this._for(new Qp(r),t)}forRange(r,t,n,i,a=this.opts.es5?rn.varKinds.var:rn.varKinds.let){let o=this._scope.toName(r);return this._for(new Xp(a,o,t,n),()=>i(o))}forOf(r,t,n,i=rn.varKinds.const){let a=this._scope.toName(r);if(this.opts.es5){let o=t instanceof or.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,or._)`${o}.length`,s=>{this.var(a,(0,or._)`${o}[${s}]`),n(a)})}return this._for(new Hc("of",i,a,t),()=>n(a))}forIn(r,t,n,i=this.opts.es5?rn.varKinds.var:rn.varKinds.const){if(this.opts.ownProperties)return this.forOf(r,(0,or._)`Object.keys(${t})`,n);let a=this._scope.toName(r);return this._for(new Hc("in",i,a,t),()=>n(a))}endFor(){return this._endBlockNode(Di)}label(r){return this._leafNode(new Hp(r))}break(r){return this._leafNode(new Kp(r))}return(r){let t=new Fo;if(this._blockNode(t),this.code(r),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Fo)}try(r,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new em;if(this._blockNode(i),this.code(r),t){let a=this.name("e");this._currNode=i.catch=new zo(a),t(a)}return n&&(this._currNode=i.finally=new Bo,this.code(n)),this._endBlockNode(zo,Bo)}throw(r){return this._leafNode(new Zp(r))}block(r,t){return this._blockStarts.push(this._nodes.length),r&&this.code(r).endBlock(t),this}endBlock(r){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||r!==void 0&&n!==r)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${r} expected`);return this._nodes.length=t,this}func(r,t=or.nil,n,i){return this._blockNode(new Po(r,t,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Po)}optimize(r=1){for(;r-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(r){return this._currNode.nodes.push(r),this}_blockNode(r){this._currNode.nodes.push(r),this._nodes.push(r)}_endBlockNode(r,t){let n=this._currNode;if(n instanceof r||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${r.kind}/${t.kind}`:r.kind}"`)}_elseNode(r){let t=this._currNode;if(!(t instanceof _i))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=r,this}get _root(){return this._nodes[0]}get _currNode(){let r=this._nodes;return r[r.length-1]}set _currNode(r){let t=this._nodes;t[t.length-1]=r}};Xe.CodeGen=rm;function Si(e,r){for(let t in r)e[t]=(e[t]||0)+(r[t]||0);return e}function Kc(e,r){return r instanceof or._CodeOrName?Si(e,r.names):e}function za(e,r,t){if(e instanceof or.Name)return n(e);if(!i(e))return e;return new or._Code(e._items.reduce((a,o)=>(o instanceof or.Name&&(o=n(o)),o instanceof or._Code?a.push(...o._items):a.push(o),a),[]));function n(a){let o=t[a.str];return o===void 0||r[a.str]!==1?a:(delete r[a.str],o)}function i(a){return a instanceof or._Code&&a._items.some(o=>o instanceof or.Name&&r[o.str]===1&&t[o.str]!==void 0)}}function b7(e,r){for(let t in r)e[t]=(e[t]||0)-(r[t]||0)}function sO(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,or._)`!${tm(e)}`}Xe.not=sO;var x7=uO(Xe.operators.AND);function A7(...e){return e.reduce(x7)}Xe.and=A7;var w7=uO(Xe.operators.OR);function _7(...e){return e.reduce(w7)}Xe.or=_7;function uO(e){return(r,t)=>r===or.nil?t:t===or.nil?r:(0,or._)`${tm(r)} ${e} ${tm(t)}`}function tm(e){return e instanceof or.Name?e:(0,or._)`(${e})`}});var mr=de(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.checkStrictMode=tr.getErrorPath=tr.Type=tr.useFunc=tr.setEvaluated=tr.evaluatedPropsToName=tr.mergeEvaluated=tr.eachItem=tr.unescapeJsonPointer=tr.escapeJsonPointer=tr.escapeFragment=tr.unescapeFragment=tr.schemaRefOrVal=tr.schemaHasRulesButRef=tr.schemaHasRules=tr.checkUnknownRules=tr.alwaysValidSchema=tr.toHash=void 0;var _r=We(),D7=Pa();function S7(e){let r={};for(let t of e)r[t]=!0;return r}tr.toHash=S7;function N7(e,r){return typeof r=="boolean"?r:Object.keys(r).length===0?!0:(fO(e,r),!pO(r,e.self.RULES.all))}tr.alwaysValidSchema=N7;function fO(e,r=e.schema){let{opts:t,self:n}=e;if(!t.strictSchema||typeof r=="boolean")return;let i=n.RULES.keywords;for(let a in r)i[a]||hO(e,`unknown keyword: "${a}"`)}tr.checkUnknownRules=fO;function pO(e,r){if(typeof e=="boolean")return!e;for(let t in e)if(r[t])return!0;return!1}tr.schemaHasRules=pO;function E7(e,r){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&r.all[t])return!0;return!1}tr.schemaHasRulesButRef=E7;function C7({topSchemaRef:e,schemaPath:r},t,n,i){if(!i){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,_r._)`${t}`}return(0,_r._)`${e}${r}${(0,_r.getProperty)(n)}`}tr.schemaRefOrVal=C7;function M7(e){return mO(decodeURIComponent(e))}tr.unescapeFragment=M7;function T7(e){return encodeURIComponent(im(e))}tr.escapeFragment=T7;function im(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}tr.escapeJsonPointer=im;function mO(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}tr.unescapeJsonPointer=mO;function O7(e,r){if(Array.isArray(e))for(let t of e)r(t);else r(e)}tr.eachItem=O7;function cO({mergeNames:e,mergeToName:r,mergeValues:t,resultToName:n}){return(i,a,o,s)=>{let l=o===void 0?a:o instanceof _r.Name?(a instanceof _r.Name?e(i,a,o):r(i,a,o),o):a instanceof _r.Name?(r(i,o,a),a):t(a,o);return s===_r.Name&&!(l instanceof _r.Name)?n(i,l):l}}tr.mergeEvaluated={props:cO({mergeNames:(e,r,t)=>e.if((0,_r._)`${t} !== true && ${r} !== undefined`,()=>{e.if((0,_r._)`${r} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,_r._)`${t} || {}`).code((0,_r._)`Object.assign(${t}, ${r})`))}),mergeToName:(e,r,t)=>e.if((0,_r._)`${t} !== true`,()=>{r===!0?e.assign(t,!0):(e.assign(t,(0,_r._)`${t} || {}`),am(e,t,r))}),mergeValues:(e,r)=>e===!0?!0:{...e,...r},resultToName:dO}),items:cO({mergeNames:(e,r,t)=>e.if((0,_r._)`${t} !== true && ${r} !== undefined`,()=>e.assign(t,(0,_r._)`${r} === true ? true : ${t} > ${r} ? ${t} : ${r}`)),mergeToName:(e,r,t)=>e.if((0,_r._)`${t} !== true`,()=>e.assign(t,r===!0?!0:(0,_r._)`${t} > ${r} ? ${t} : ${r}`)),mergeValues:(e,r)=>e===!0?!0:Math.max(e,r),resultToName:(e,r)=>e.var("items",r)})};function dO(e,r){if(r===!0)return e.var("props",!0);let t=e.var("props",(0,_r._)`{}`);return r!==void 0&&am(e,t,r),t}tr.evaluatedPropsToName=dO;function am(e,r,t){Object.keys(t).forEach(n=>e.assign((0,_r._)`${r}${(0,_r.getProperty)(n)}`,!0))}tr.setEvaluated=am;var lO={};function R7(e,r){return e.scopeValue("func",{ref:r,code:lO[r.code]||(lO[r.code]=new D7._Code(r.code))})}tr.useFunc=R7;var nm;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(nm||(tr.Type=nm={}));function P7(e,r,t){if(e instanceof _r.Name){let n=r===nm.Num;return t?n?(0,_r._)`"[" + ${e} + "]"`:(0,_r._)`"['" + ${e} + "']"`:n?(0,_r._)`"/" + ${e}`:(0,_r._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,_r.getProperty)(e).toString():"/"+im(e)}tr.getErrorPath=P7;function hO(e,r,t=e.opts.strictSchema){if(t){if(r=`strict mode: ${r}`,t===!0)throw new Error(r);e.self.logger.warn(r)}}tr.checkStrictMode=hO});var hn=de(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var ot=We(),F7={data:new ot.Name("data"),valCxt:new ot.Name("valCxt"),instancePath:new ot.Name("instancePath"),parentData:new ot.Name("parentData"),parentDataProperty:new ot.Name("parentDataProperty"),rootData:new ot.Name("rootData"),dynamicAnchors:new ot.Name("dynamicAnchors"),vErrors:new ot.Name("vErrors"),errors:new ot.Name("errors"),this:new ot.Name("this"),self:new ot.Name("self"),scope:new ot.Name("scope"),json:new ot.Name("json"),jsonPos:new ot.Name("jsonPos"),jsonLen:new ot.Name("jsonLen"),jsonPart:new ot.Name("jsonPart")};om.default=F7});var Ba=de(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.extendErrors=st.resetErrorsCount=st.reportExtraError=st.reportError=st.keyword$DataError=st.keywordError=void 0;var cr=We(),Jc=mr(),ft=hn();st.keywordError={message:({keyword:e})=>(0,cr.str)`must pass "${e}" keyword validation`};st.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,cr.str)`"${e}" keyword must be ${r} ($data)`:(0,cr.str)`"${e}" keyword is invalid ($data)`};function z7(e,r=st.keywordError,t,n){let{it:i}=e,{gen:a,compositeRule:o,allErrors:s}=i,l=yO(e,r,t);_nullishCoalesce(n, () => ((o||s)))?gO(a,l):vO(i,(0,cr._)`[${l}]`)}st.reportError=z7;function B7(e,r=st.keywordError,t){let{it:n}=e,{gen:i,compositeRule:a,allErrors:o}=n,s=yO(e,r,t);gO(i,s),a||o||vO(n,ft.default.vErrors)}st.reportExtraError=B7;function I7(e,r){e.assign(ft.default.errors,r),e.if((0,cr._)`${ft.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,cr._)`${ft.default.vErrors}.length`,r),()=>e.assign(ft.default.vErrors,null)))}st.resetErrorsCount=I7;function q7({gen:e,keyword:r,schemaValue:t,data:n,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let o=e.name("err");e.forRange("i",i,ft.default.errors,s=>{e.const(o,(0,cr._)`${ft.default.vErrors}[${s}]`),e.if((0,cr._)`${o}.instancePath === undefined`,()=>e.assign((0,cr._)`${o}.instancePath`,(0,cr.strConcat)(ft.default.instancePath,a.errorPath))),e.assign((0,cr._)`${o}.schemaPath`,(0,cr.str)`${a.errSchemaPath}/${r}`),a.opts.verbose&&(e.assign((0,cr._)`${o}.schema`,t),e.assign((0,cr._)`${o}.data`,n))})}st.extendErrors=q7;function gO(e,r){let t=e.const("err",r);e.if((0,cr._)`${ft.default.vErrors} === null`,()=>e.assign(ft.default.vErrors,(0,cr._)`[${t}]`),(0,cr._)`${ft.default.vErrors}.push(${t})`),e.code((0,cr._)`${ft.default.errors}++`)}function vO(e,r){let{gen:t,validateName:n,schemaEnv:i}=e;i.$async?t.throw((0,cr._)`new ${e.ValidationError}(${r})`):(t.assign((0,cr._)`${n}.errors`,r),t.return(!1))}var Ni={keyword:new cr.Name("keyword"),schemaPath:new cr.Name("schemaPath"),params:new cr.Name("params"),propertyName:new cr.Name("propertyName"),message:new cr.Name("message"),schema:new cr.Name("schema"),parentSchema:new cr.Name("parentSchema")};function yO(e,r,t){let{createErrors:n}=e.it;return n===!1?(0,cr._)`{}`:$7(e,r,t)}function $7(e,r,t={}){let{gen:n,it:i}=e,a=[L7(i,t),k7(e,t)];return U7(e,r,a),n.object(...a)}function L7({errorPath:e},{instancePath:r}){let t=r?(0,cr.str)`${e}${(0,Jc.getErrorPath)(r,Jc.Type.Str)}`:e;return[ft.default.instancePath,(0,cr.strConcat)(ft.default.instancePath,t)]}function k7({keyword:e,it:{errSchemaPath:r}},{schemaPath:t,parentSchema:n}){let i=n?r:(0,cr.str)`${r}/${e}`;return t&&(i=(0,cr.str)`${i}${(0,Jc.getErrorPath)(t,Jc.Type.Str)}`),[Ni.schemaPath,i]}function U7(e,{params:r,message:t},n){let{keyword:i,data:a,schemaValue:o,it:s}=e,{opts:l,propertyName:u,topSchemaRef:c,schemaPath:f}=s;n.push([Ni.keyword,i],[Ni.params,typeof r=="function"?r(e):r||(0,cr._)`{}`]),l.messages&&n.push([Ni.message,typeof t=="function"?t(e):t]),l.verbose&&n.push([Ni.schema,o],[Ni.parentSchema,(0,cr._)`${c}${f}`],[ft.default.data,a]),u&&n.push([Ni.propertyName,u])}});var xO=de(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.boolOrEmptySchema=Ia.topBoolOrEmptySchema=void 0;var j7=Ba(),G7=We(),V7=hn(),W7={message:"boolean schema is false"};function H7(e){let{gen:r,schema:t,validateName:n}=e;t===!1?bO(e,!1):typeof t=="object"&&t.$async===!0?r.return(V7.default.data):(r.assign((0,G7._)`${n}.errors`,null),r.return(!0))}Ia.topBoolOrEmptySchema=H7;function K7(e,r){let{gen:t,schema:n}=e;n===!1?(t.var(r,!1),bO(e)):t.var(r,!0)}Ia.boolOrEmptySchema=K7;function bO(e,r){let{gen:t,data:n}=e,i={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,j7.reportError)(i,W7,void 0,r)}});var sm=de(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.getRules=qa.isJSONType=void 0;var Z7=["string","number","integer","boolean","null","object","array"],J7=new Set(Z7);function Y7(e){return typeof e=="string"&&J7.has(e)}qa.isJSONType=Y7;function Q7(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}qa.getRules=Q7});var um=de(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.shouldUseRule=Qn.shouldUseGroup=Qn.schemaHasRulesForType=void 0;function X7({schema:e,self:r},t){let n=r.RULES.types[t];return n&&n!==!0&&AO(e,n)}Qn.schemaHasRulesForType=X7;function AO(e,r){return r.rules.some(t=>wO(e,t))}Qn.shouldUseGroup=AO;function wO(e,r){var t;return e[r.keyword]!==void 0||((t=r.definition.implements)===null||t===void 0?void 0:t.some(n=>e[n]!==void 0))}Qn.shouldUseRule=wO});var Io=de(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.reportTypeError=ut.checkDataTypes=ut.checkDataType=ut.coerceAndCheckDataType=ut.getJSONTypes=ut.getSchemaTypes=ut.DataType=void 0;var ek=sm(),rk=um(),tk=Ba(),Ye=We(),_O=mr(),$a;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})($a||(ut.DataType=$a={}));function nk(e){let r=DO(e.type);if(r.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!r.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&r.push("null")}return r}ut.getSchemaTypes=nk;function DO(e){let r=Array.isArray(e)?e:e?[e]:[];if(r.every(ek.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}ut.getJSONTypes=DO;function ik(e,r){let{gen:t,data:n,opts:i}=e,a=ak(r,i.coerceTypes),o=r.length>0&&!(a.length===0&&r.length===1&&(0,rk.schemaHasRulesForType)(e,r[0]));if(o){let s=lm(r,n,i.strictNumbers,$a.Wrong);t.if(s,()=>{a.length?ok(e,r,a):fm(e)})}return o}ut.coerceAndCheckDataType=ik;var SO=new Set(["string","number","integer","boolean","null"]);function ak(e,r){return r?e.filter(t=>SO.has(t)||r==="array"&&t==="array"):[]}function ok(e,r,t){let{gen:n,data:i,opts:a}=e,o=n.let("dataType",(0,Ye._)`typeof ${i}`),s=n.let(