@fern-api/python-dynamic-snippets 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var bp=Object.create;var st=Object.defineProperty,Ap=Object.defineProperties,Sp=Object.getOwnPropertyDescriptor,Ep=Object.getOwnPropertyDescriptors,Ip=Object.getOwnPropertyNames,Mt=Object.getOwnPropertySymbols,Rp=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable;var Dr=(r,t,e)=>t in r?st(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,_t=(r,t)=>{for(var e in t||(t={}))Wr.call(t,e)&&Dr(r,e,t[e]);if(Mt)for(var e of Mt(t))Si.call(t,e)&&Dr(r,e,t[e]);return r},Ei=(r,t)=>Ap(r,Ep(t));var Ii=r=>typeof r=="symbol"?r:r+"",$t=(r,t)=>{var e={};for(var n in r)Wr.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&Mt)for(var n of Mt(r))t.indexOf(n)<0&&Si.call(r,n)&&(e[n]=r[n]);return e};var Fe=(r,t)=>()=>(r&&(t=r(r=0)),t);var x=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),jr=(r,t)=>{for(var e in t)st(r,e,{get:t[e],enumerable:!0})},Ri=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ip(t))!Wr.call(r,i)&&i!==e&&st(r,i,{get:()=>t[i],enumerable:!(n=Sp(t,i))||n.enumerable});return r};var Tp=(r,t,e)=>(e=r!=null?bp(Rp(r)):{},Ri(t||!r||!r.__esModule?st(e,"default",{value:r,enumerable:!0}):e,r)),Ti=r=>Ri(st({},"__esModule",{value:!0}),r);var d=(r,t,e)=>Dr(r,typeof t!="symbol"?t+"":t,e);function Ni(){throw new Error("setTimeout has not been defined")}function Fi(){throw new Error("clearTimeout has not been defined")}function Oi(r){if(ie===setTimeout)return setTimeout(r,0);if((ie===Ni||!ie)&&setTimeout)return ie=setTimeout,setTimeout(r,0);try{return ie(r,0)}catch(t){try{return ie.call(null,r,0)}catch(e){return ie.call(this,r,0)}}}function Pp(r){if(oe===clearTimeout)return clearTimeout(r);if((oe===Fi||!oe)&&clearTimeout)return oe=clearTimeout,clearTimeout(r);try{return oe(r)}catch(t){try{return oe.call(null,r)}catch(e){return oe.call(this,r)}}}function Np(){!Ce||!ge||(Ce=!1,ge.length?Q=ge.concat(Q):Dt=-1,Q.length&&Ci())}function Ci(){if(!Ce){var r=Oi(Np);Ce=!0;for(var t=Q.length;t;){for(ge=Q,Q=[];++Dt<t;)ge&&ge[Dt].run();Dt=-1,t=Q.length}ge=null,Ce=!1,Pp(r)}}function Fp(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];Q.push(new Ui(r,t)),Q.length===1&&!Ce&&Oi(Ci)}function Ui(r,t){this.fun=r,this.array=t}function xe(){}function Yp(r){throw new Error("process.binding is not supported")}function Hp(){return"/"}function Jp(r){throw new Error("process.chdir is not supported")}function Qp(){return 0}function Kp(r){var t=Zp.call(Oe)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function el(){var r=new Date,t=r-Xp;return t/1e3}var ie,oe,Q,Ce,ge,Dt,Op,Cp,Up,Bp,qp,kp,Lp,Mp,_p,$p,Dp,Wp,jp,Vp,Gp,zp,Oe,Zp,Xp,l,Pi,a=Fe(()=>{"use strict";ie=Ni,oe=Fi;typeof globalThis.setTimeout=="function"&&(ie=setTimeout);typeof globalThis.clearTimeout=="function"&&(oe=clearTimeout);Q=[],Ce=!1,Dt=-1;Ui.prototype.run=function(){this.fun.apply(null,this.array)};Op="browser",Cp="browser",Up=!0,Bp={},qp=[],kp="",Lp={},Mp={},_p={};$p=xe,Dp=xe,Wp=xe,jp=xe,Vp=xe,Gp=xe,zp=xe;Oe=globalThis.performance||{},Zp=Oe.now||Oe.mozNow||Oe.msNow||Oe.oNow||Oe.webkitNow||function(){return new Date().getTime()};Xp=new Date;l={nextTick:Fp,title:Op,browser:Up,env:Bp,argv:qp,version:kp,versions:Lp,on:$p,addListener:Dp,once:Wp,off:jp,removeListener:Vp,removeAllListeners:Gp,emit:zp,binding:Yp,cwd:Hp,chdir:Jp,umask:Qp,hrtime:Kp,platform:Cp,release:Mp,config:_p,uptime:el},Pi={};Object.keys(Pi).forEach(r=>{let t=r.split("."),e=l;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Pi[r]:e=e[i]||(e[i]={})}})});function Li(){Gr=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)j[t]=r[t],M[r.charCodeAt(t)]=t;M[45]=62,M[95]=63}function rl(r){Gr||Li();var t,e,n,i,o,u,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,u=new tl(p*3/4-o),n=o>0?p-4:p;var c=0;for(t=0,e=0;t<n;t+=4,e+=3)i=M[r.charCodeAt(t)]<<18|M[r.charCodeAt(t+1)]<<12|M[r.charCodeAt(t+2)]<<6|M[r.charCodeAt(t+3)],u[c++]=i>>16&255,u[c++]=i>>8&255,u[c++]=i&255;return o===2?(i=M[r.charCodeAt(t)]<<2|M[r.charCodeAt(t+1)]>>4,u[c++]=i&255):o===1&&(i=M[r.charCodeAt(t)]<<10|M[r.charCodeAt(t+1)]<<4|M[r.charCodeAt(t+2)]>>2,u[c++]=i>>8&255,u[c++]=i&255),u}function nl(r){return j[r>>18&63]+j[r>>12&63]+j[r>>6&63]+j[r&63]}function il(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(nl(n));return i.join("")}function Bi(r){Gr||Li();for(var t,e=r.length,n=e%3,i="",o=[],u=16383,p=0,c=e-n;p<c;p+=u)o.push(il(r,p,p+u>c?c:p+u));return n===1?(t=r[e-1],i+=j[t>>2],i+=j[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=j[t>>10],i+=j[t>>4&63],i+=j[t<<2&63],i+="="),o.push(i),o.join("")}function Wt(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Z(r,t){if(Wt()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=f.prototype):(r===null&&(r=new f(t)),r.length=t),r}function f(r,t,e){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return zr(this,r)}return Mi(this,r,t,e)}function Mi(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?sl(r,t,e,n):typeof t=="string"?al(r,t,e):ul(r,t)}function _i(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function ol(r,t,e,n){return _i(t),t<=0?Z(r,t):e!==void 0?typeof n=="string"?Z(r,t).fill(e,n):Z(r,t).fill(e):Z(r,t)}function zr(r,t){if(_i(t),r=Z(r,t<0?0:Yr(t)|0),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function al(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=$i(t,e)|0;r=Z(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function Vr(r,t){var e=t.length<0?0:Yr(t.length)|0;r=Z(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function sl(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),f.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=f.prototype):r=Vr(r,t),r}function ul(r,t){if(V(t)){var e=Yr(t.length)|0;return r=Z(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Tl(t.length)?Z(r,0):Vr(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Vr(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Yr(r){if(r>=Wt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Wt().toString(16)+" bytes");return r|0}function V(r){return!!(r!=null&&r._isBuffer)}function $i(r,t){if(V(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return jt(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Yi(r).length;default:if(n)return jt(r).length;t=(""+t).toLowerCase(),n=!0}}function fl(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return vl(this,t,e);case"utf8":case"utf-8":return ji(this,t,e);case"ascii":return gl(this,t,e);case"latin1":case"binary":return xl(this,t,e);case"base64":return ml(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wl(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function ve(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Di(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=f.from(t,n)),V(t))return t.length===0?-1:qi(r,t,e,n,i);if(typeof t=="number")return t=t&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):qi(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function qi(r,t,e,n,i){var o=1,u=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,u/=2,p/=2,e/=2}function c(b,w){return o===1?b[w]:b.readUInt16BE(w*o)}var h;if(i){var y=-1;for(h=e;h<u;h++)if(c(r,h)===c(t,y===-1?0:h-y)){if(y===-1&&(y=h),h-y+1===p)return y*o}else y!==-1&&(h-=h-y),y=-1}else for(e+p>u&&(e=u-p),h=e;h>=0;h--){for(var g=!0,v=0;v<p;v++)if(c(r,h+v)!==c(t,v)){g=!1;break}if(g)return h}return-1}function pl(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var p=parseInt(t.substr(u*2,2),16);if(isNaN(p))return u;r[e+u]=p}return u}function ll(r,t,e,n){return zt(jt(t,r.length-e),r,e,n)}function Wi(r,t,e,n){return zt(Il(t),r,e,n)}function cl(r,t,e,n){return Wi(r,t,e,n)}function dl(r,t,e,n){return zt(Yi(t),r,e,n)}function yl(r,t,e,n){return zt(Rl(t,r.length-e),r,e,n)}function ml(r,t,e){return t===0&&e===r.length?Bi(r):Bi(r.slice(t,e))}function ji(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],u=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var c,h,y,g;switch(p){case 1:o<128&&(u=o);break;case 2:c=r[i+1],(c&192)===128&&(g=(o&31)<<6|c&63,g>127&&(u=g));break;case 3:c=r[i+1],h=r[i+2],(c&192)===128&&(h&192)===128&&(g=(o&15)<<12|(c&63)<<6|h&63,g>2047&&(g<55296||g>57343)&&(u=g));break;case 4:c=r[i+1],h=r[i+2],y=r[i+3],(c&192)===128&&(h&192)===128&&(y&192)===128&&(g=(o&15)<<18|(c&63)<<12|(h&63)<<6|y&63,g>65535&&g<1114112&&(u=g))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=p}return hl(n)}function hl(r){var t=r.length;if(t<=ki)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=ki));return e}function gl(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function xl(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function vl(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=El(r[o]);return i}function wl(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function U(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function L(r,t,e,n,i,o){if(!V(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function Vt(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Gt(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Vi(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Gi(r,t,e,n,i){return i||Vi(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ji(r,t,e,n,23,4),e+4}function zi(r,t,e,n,i){return i||Vi(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ji(r,t,e,n,52,8),e+8}function Al(r){if(r=Sl(r).replace(bl,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Sl(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function El(r){return r<16?"0"+r.toString(16):r.toString(16)}function jt(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],u=0;u<n;++u){if(e=r.charCodeAt(u),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Il(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Rl(r,t){for(var e,n,i,o=[],u=0;u<r.length&&!((t-=2)<0);++u)e=r.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Yi(r){return rl(Al(r))}function zt(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Tl(r){return r!==r}function Pl(r){return r!=null&&(!!r._isBuffer||Hi(r)||Nl(r))}function Hi(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Nl(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Hi(r.slice(0,0))}function Yt(r,t,e,n,i){var o,u,p=i*8-n-1,c=(1<<p)-1,h=c>>1,y=-7,g=e?i-1:0,v=e?-1:1,b=r[t+g];for(g+=v,o=b&(1<<-y)-1,b>>=-y,y+=p;y>0;o=o*256+r[t+g],g+=v,y-=8);for(u=o&(1<<-y)-1,o>>=-y,y+=n;y>0;u=u*256+r[t+g],g+=v,y-=8);if(o===0)o=1-h;else{if(o===c)return u?NaN:(b?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(b?-1:1)*u*Math.pow(2,o-n)}function Ji(r,t,e,n,i,o){var u,p,c,h=o*8-i-1,y=(1<<h)-1,g=y>>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:o-1,w=n?1:-1,A=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,u=y):(u=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+g>=1?t+=v/c:t+=v*Math.pow(2,1-g),t*c>=2&&(u++,c/=2),u+g>=y?(p=0,u=y):u+g>=1?(p=(t*c-1)*Math.pow(2,i),u=u+g):(p=t*Math.pow(2,g-1)*Math.pow(2,i),u=0));i>=8;r[e+b]=p&255,b+=w,p/=256,i-=8);for(u=u<<i|p,h+=i;h>0;r[e+b]=u&255,b+=w,u/=256,h-=8);r[e+b-w]|=A*128}var j,M,tl,Gr,ki,bl,Qi=Fe(()=>{"use strict";a();s();j=[],M=[],tl=typeof Uint8Array!="undefined"?Uint8Array:Array,Gr=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(r){return r.__proto__=f.prototype,r};f.from=function(r,t,e){return Mi(null,r,t,e)};f.kMaxLength=Wt();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(r,t,e){return ol(null,r,t,e)};f.allocUnsafe=function(r){return zr(null,r)};f.allocUnsafeSlow=function(r){return zr(null,r)};f.isBuffer=Pl;f.compare=function(t,e){if(!V(t)||!V(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,u=Math.min(n,i);o<u;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=f.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var u=t[n];if(!V(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i};f.byteLength=$i;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)ve(this,e,e+1);return this};f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)ve(this,e,e+3),ve(this,e+1,e+2);return this};f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)ve(this,e,e+7),ve(this,e+1,e+6),ve(this,e+2,e+5),ve(this,e+3,e+4);return this};f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?ji(this,0,t):fl.apply(this,arguments)};f.prototype.equals=function(t){if(!V(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0};f.prototype.compare=function(t,e,n,i,o){if(!V(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var u=o-i,p=n-e,c=Math.min(u,p),h=this.slice(i,o),y=t.slice(e,n),g=0;g<c;++g)if(h[g]!==y[g]){u=h[g],p=y[g];break}return u<p?-1:p<u?1:0};f.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};f.prototype.indexOf=function(t,e,n){return Di(this,t,e,n,!0)};f.prototype.lastIndexOf=function(t,e,n){return Di(this,t,e,n,!1)};f.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return pl(this,t,e,n);case"utf8":case"utf-8":return ll(this,t,e,n);case"ascii":return Wi(this,t,e,n);case"latin1":case"binary":return cl(this,t,e,n);case"base64":return dl(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return yl(this,t,e,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ki=4096;f.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(f.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=f.prototype;else{var o=e-t;i=new f(o,void 0);for(var u=0;u<o;++u)i[u]=this[u+t]}return i};f.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=this[t],o=1,u=0;++u<e&&(o*=256);)i+=this[t+u]*o;return i};f.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};f.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]};f.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=this[t],o=1,u=0;++u<e&&(o*=256);)i+=this[t+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};f.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=e,o=1,u=this[t+--i];i>0&&(o*=256);)u+=this[t+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*e)),u};f.prototype.readInt8=function(t,e){return e||U(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};f.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),Yt(this,t,!0,23,4)};f.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),Yt(this,t,!1,23,4)};f.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),Yt(this,t,!0,52,8)};f.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),Yt(this,t,!1,52,8)};f.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var u=1,p=0;for(this[e]=t&255;++p<n&&(u*=256);)this[e+p]=t/u&255;return e+n};f.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var u=n-1,p=1;for(this[e+u]=t&255;--u>=0&&(p*=256);)this[e+u]=t/p&255;return e+n};f.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Vt(this,t,e,!0),e+2};f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Vt(this,t,e,!1),e+2};f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):Gt(this,t,e,!0),e+4};f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Gt(this,t,e,!1),e+4};f.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var u=0,p=1,c=0;for(this[e]=t&255;++u<n&&(p*=256);)t<0&&c===0&&this[e+u-1]!==0&&(c=1),this[e+u]=(t/p>>0)-c&255;return e+n};f.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var u=n-1,p=1,c=0;for(this[e+u]=t&255;--u>=0&&(p*=256);)t<0&&c===0&&this[e+u+1]!==0&&(c=1),this[e+u]=(t/p>>0)-c&255;return e+n};f.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};f.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Vt(this,t,e,!0),e+2};f.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Vt(this,t,e,!1),e+2};f.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Gt(this,t,e,!0),e+4};f.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Gt(this,t,e,!1),e+4};f.prototype.writeFloatLE=function(t,e,n){return Gi(this,t,e,!0,n)};f.prototype.writeFloatBE=function(t,e,n){return Gi(this,t,e,!1,n)};f.prototype.writeDoubleLE=function(t,e,n){return zi(this,t,e,!0,n)};f.prototype.writeDoubleBE=function(t,e,n){return zi(this,t,e,!1,n)};f.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,u;if(this===t&&n<e&&e<i)for(u=o-1;u>=0;--u)t[u+e]=this[u+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<o;++u)t[u+e]=this[u+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};f.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var u;if(typeof t=="number")for(u=e;u<n;++u)this[u]=t;else{var p=V(t)?t:jt(new f(t,i).toString()),c=p.length;for(u=0;u<n-e;++u)this[u+e]=p[u%c]}return this};bl=/[^+\/0-9A-Za-z-_]/g});var s=Fe(()=>{"use strict";Qi()});var Xi=x((Cx,Ki)=>{"use strict";a();s();var Fl="Function.prototype.bind called on incompatible ",Ol=Object.prototype.toString,Cl=Math.max,Ul="[object Function]",Zi=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<e.length;o+=1)n[o+t.length]=e[o];return n},Bl=function(t,e){for(var n=[],i=e||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n},ql=function(r,t){for(var e="",n=0;n<r.length;n+=1)e+=r[n],n+1<r.length&&(e+=t);return e};Ki.exports=function(t){var e=this;if(typeof e!="function"||Ol.apply(e)!==Ul)throw new TypeError(Fl+e);for(var n=Bl(arguments,1),i,o=function(){if(this instanceof i){var y=e.apply(this,Zi(n,arguments));return Object(y)===y?y:this}return e.apply(t,Zi(n,arguments))},u=Cl(0,e.length-n.length),p=[],c=0;c<u;c++)p[c]="$"+c;if(i=Function("binder","return function ("+ql(p,",")+"){ return binder.apply(this,arguments); }")(o),e.prototype){var h=function(){};h.prototype=e.prototype,i.prototype=new h,h.prototype=null}return i}});var we=x((qx,eo)=>{"use strict";a();s();var kl=Xi();eo.exports=Function.prototype.bind||kl});var Hr=x((Mx,to)=>{"use strict";a();s();to.exports=Error});var Jr=x((Dx,ro)=>{"use strict";a();s();ro.exports=EvalError});var Qr=x((Vx,no)=>{"use strict";a();s();no.exports=RangeError});var Zr=x((Yx,io)=>{"use strict";a();s();io.exports=ReferenceError});var Ht=x((Qx,oo)=>{"use strict";a();s();oo.exports=SyntaxError});var C=x((Xx,ao)=>{"use strict";a();s();ao.exports=TypeError});var Kr=x((r0,so)=>{"use strict";a();s();so.exports=URIError});var fo=x((o0,uo)=>{"use strict";a();s();uo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,e);if(u.value!==i||u.enumerable!==!0)return!1}return!0}});var Xr=x((u0,lo)=>{"use strict";a();s();var po=typeof Symbol!="undefined"&&Symbol,Ll=fo();lo.exports=function(){return typeof po!="function"||typeof Symbol!="function"||typeof po("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ll()}});var yo=x((l0,co)=>{"use strict";a();s();var en={__proto__:null,foo:{}},Ml=Object;co.exports=function(){return{__proto__:en}.foo===en.foo&&!(en instanceof Ml)}});var tn=x((y0,mo)=>{"use strict";a();s();var _l=Function.prototype.call,$l=Object.prototype.hasOwnProperty,Dl=we();mo.exports=Dl.call(_l,$l)});var G=x((g0,wo)=>{"use strict";a();s();var I,Wl=Hr(),jl=Jr(),Vl=Qr(),Gl=Zr(),ke=Ht(),qe=C(),zl=Kr(),vo=Function,rn=function(r){try{return vo('"use strict"; return ('+r+").constructor;")()}catch(t){}},be=Object.getOwnPropertyDescriptor;if(be)try{be({},"")}catch(r){be=null}var nn=function(){throw new qe},Yl=be?function(){try{return arguments.callee,nn}catch(r){try{return be(arguments,"callee").get}catch(t){return nn}}}():nn,Ue=Xr()(),Hl=yo()(),B=Object.getPrototypeOf||(Hl?function(r){return r.__proto__}:null),Be={},Jl=typeof Uint8Array=="undefined"||!B?I:B(Uint8Array),Ae={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?I:ArrayBuffer,"%ArrayIteratorPrototype%":Ue&&B?B([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":Be,"%AsyncGenerator%":Be,"%AsyncGeneratorFunction%":Be,"%AsyncIteratorPrototype%":Be,"%Atomics%":typeof Atomics=="undefined"?I:Atomics,"%BigInt%":typeof BigInt=="undefined"?I:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?I:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?I:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Wl,"%eval%":eval,"%EvalError%":jl,"%Float32Array%":typeof Float32Array=="undefined"?I:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?I:FinalizationRegistry,"%Function%":vo,"%GeneratorFunction%":Be,"%Int8Array%":typeof Int8Array=="undefined"?I:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?I:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ue&&B?B(B([][Symbol.iterator]())):I,"%JSON%":typeof JSON=="object"?JSON:I,"%Map%":typeof Map=="undefined"?I:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ue||!B?I:B(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?I:Promise,"%Proxy%":typeof Proxy=="undefined"?I:Proxy,"%RangeError%":Vl,"%ReferenceError%":Gl,"%Reflect%":typeof Reflect=="undefined"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?I:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ue||!B?I:B(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ue&&B?B(""[Symbol.iterator]()):I,"%Symbol%":Ue?Symbol:I,"%SyntaxError%":ke,"%ThrowTypeError%":Yl,"%TypedArray%":Jl,"%TypeError%":qe,"%Uint8Array%":typeof Uint8Array=="undefined"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?I:Uint32Array,"%URIError%":zl,"%WeakMap%":typeof WeakMap=="undefined"?I:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?I:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?I:WeakSet};if(B)try{null.error}catch(r){ho=B(B(r)),Ae["%Error.prototype%"]=ho}var ho,Ql=function r(t){var e;if(t==="%AsyncFunction%")e=rn("async function () {}");else if(t==="%GeneratorFunction%")e=rn("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=rn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&B&&(e=B(i.prototype))}return Ae[t]=e,e},go={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ut=we(),Jt=tn(),Zl=ut.call(Function.call,Array.prototype.concat),Kl=ut.call(Function.apply,Array.prototype.splice),xo=ut.call(Function.call,String.prototype.replace),Qt=ut.call(Function.call,String.prototype.slice),Xl=ut.call(Function.call,RegExp.prototype.exec),ec=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tc=/\\(\\)?/g,rc=function(t){var e=Qt(t,0,1),n=Qt(t,-1);if(e==="%"&&n!=="%")throw new ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new ke("invalid intrinsic syntax, expected opening `%`");var i=[];return xo(t,ec,function(o,u,p,c){i[i.length]=p?xo(c,tc,"$1"):u||o}),i},nc=function(t,e){var n=t,i;if(Jt(go,n)&&(i=go[n],n="%"+i[0]+"%"),Jt(Ae,n)){var o=Ae[n];if(o===Be&&(o=Ql(n)),typeof o=="undefined"&&!e)throw new qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new ke("intrinsic "+t+" does not exist!")};wo.exports=function(t,e){if(typeof t!="string"||t.length===0)throw new qe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new qe('"allowMissing" argument must be a boolean');if(Xl(/^%?[^%]*%?$/,t)===null)throw new ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=rc(t),i=n.length>0?n[0]:"",o=nc("%"+i+"%",e),u=o.name,p=o.value,c=!1,h=o.alias;h&&(i=h[0],Kl(n,Zl([0,1],h)));for(var y=1,g=!0;y<n.length;y+=1){var v=n[y],b=Qt(v,0,1),w=Qt(v,-1);if((b==='"'||b==="'"||b==="`"||w==='"'||w==="'"||w==="`")&&b!==w)throw new ke("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),i+="."+v,u="%"+i+"%",Jt(Ae,u))p=Ae[u];else if(p!=null){if(!(v in p)){if(!e)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(be&&y+1>=n.length){var A=be(p,v);g=!!A,g&&"get"in A&&!("originalValue"in A.get)?p=A.get:p=p[v]}else g=Jt(p,v),p=p[v];g&&!c&&(Ae[u]=p)}}return p}});var on=x((w0,bo)=>{"use strict";a();s();bo.exports=Object});var So=x((S0,Ao)=>{"use strict";a();s();Ao.exports=Math.abs});var Io=x((R0,Eo)=>{"use strict";a();s();Eo.exports=Math.floor});var To=x((N0,Ro)=>{"use strict";a();s();Ro.exports=Math.max});var No=x((C0,Po)=>{"use strict";a();s();Po.exports=Math.min});var Oo=x((q0,Fo)=>{"use strict";a();s();Fo.exports=Math.pow});var Uo=x((M0,Co)=>{"use strict";a();s();Co.exports=Math.round});var qo=x((D0,Bo)=>{"use strict";a();s();Bo.exports=Number.isNaN||function(t){return t!==t}});var Lo=x((V0,ko)=>{"use strict";a();s();var ic=qo();ko.exports=function(t){return ic(t)||t===0?t:t<0?-1:1}});var _o=x((Y0,Mo)=>{"use strict";a();s();Mo.exports=Object.getOwnPropertyDescriptor});var ft=x((Q0,$o)=>{"use strict";a();s();var Zt=_o();if(Zt)try{Zt([],"length")}catch(r){Zt=null}$o.exports=Zt});var Xt=x((X0,Do)=>{"use strict";a();s();var Kt=Object.defineProperty||!1;if(Kt)try{Kt({},"a",{value:1})}catch(r){Kt=!1}Do.exports=Kt});var an=x((rv,Wo)=>{"use strict";a();s();Wo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var u=Object.getOwnPropertySymbols(t);if(u.length!==1||u[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(t,e);if(p.value!==i||p.enumerable!==!0)return!1}return!0}});var Go=x((ov,Vo)=>{"use strict";a();s();var jo=typeof Symbol!="undefined"&&Symbol,oc=an();Vo.exports=function(){return typeof jo!="function"||typeof Symbol!="function"||typeof jo("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oc()}});var sn=x((uv,zo)=>{"use strict";a();s();zo.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var un=x((lv,Yo)=>{"use strict";a();s();var ac=on();Yo.exports=ac.getPrototypeOf||null});var er=x((yv,Ho)=>{"use strict";a();s();Ho.exports=Function.prototype.call});var fn=x((gv,Jo)=>{"use strict";a();s();Jo.exports=Function.prototype.apply});var Zo=x((wv,Qo)=>{"use strict";a();s();Qo.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Xo=x((Sv,Ko)=>{"use strict";a();s();var sc=we(),uc=fn(),fc=er(),pc=Zo();Ko.exports=pc||sc.call(fc,uc)});var ta=x((Rv,ea)=>{"use strict";a();s();var lc=we(),cc=C(),dc=er(),yc=Xo();ea.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new cc("a function is required");return yc(lc,dc,t)}});var sa=x((Nv,aa)=>{"use strict";a();s();var mc=ta(),ra=ft(),ia;try{ia=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var pn=!!ia&&ra&&ra(Object.prototype,"__proto__"),oa=Object,na=oa.getPrototypeOf;aa.exports=pn&&typeof pn.get=="function"?mc([pn.get]):typeof na=="function"?function(t){return na(t==null?t:oa(t))}:!1});var ca=x((Cv,la)=>{"use strict";a();s();var ua=sn(),fa=un(),pa=sa();la.exports=ua?function(t){return ua(t)}:fa?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return fa(t)}:pa?function(t){return pa(t)}:null});var dn=x((qv,xa)=>{"use strict";a();s();var E,hc=on(),gc=Hr(),xc=Jr(),vc=Qr(),wc=Zr(),$e=Ht(),_e=C(),bc=Kr(),Ac=So(),Sc=Io(),Ec=To(),Ic=No(),Rc=Oo(),Tc=Uo(),Pc=Lo(),ha=Function,ln=function(r){try{return ha('"use strict"; return ('+r+").constructor;")()}catch(t){}},pt=ft(),Nc=Xt(),cn=function(){throw new _e},Fc=pt?function(){try{return arguments.callee,cn}catch(r){try{return pt(arguments,"callee").get}catch(t){return cn}}}():cn,Le=Go()(),q=ca(),Oc=un(),Cc=sn(),ga=fn(),lt=er(),Me={},Uc=typeof Uint8Array=="undefined"||!q?E:q(Uint8Array),Se={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?E:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?E:ArrayBuffer,"%ArrayIteratorPrototype%":Le&&q?q([][Symbol.iterator]()):E,"%AsyncFromSyncIteratorPrototype%":E,"%AsyncFunction%":Me,"%AsyncGenerator%":Me,"%AsyncGeneratorFunction%":Me,"%AsyncIteratorPrototype%":Me,"%Atomics%":typeof Atomics=="undefined"?E:Atomics,"%BigInt%":typeof BigInt=="undefined"?E:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?E:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?E:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?E:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":gc,"%eval%":eval,"%EvalError%":xc,"%Float16Array%":typeof Float16Array=="undefined"?E:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?E:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?E:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?E:FinalizationRegistry,"%Function%":ha,"%GeneratorFunction%":Me,"%Int8Array%":typeof Int8Array=="undefined"?E:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?E:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?E:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Le&&q?q(q([][Symbol.iterator]())):E,"%JSON%":typeof JSON=="object"?JSON:E,"%Map%":typeof Map=="undefined"?E:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Le||!q?E:q(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":hc,"%Object.getOwnPropertyDescriptor%":pt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?E:Promise,"%Proxy%":typeof Proxy=="undefined"?E:Proxy,"%RangeError%":vc,"%ReferenceError%":wc,"%Reflect%":typeof Reflect=="undefined"?E:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?E:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Le||!q?E:q(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?E:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Le&&q?q(""[Symbol.iterator]()):E,"%Symbol%":Le?Symbol:E,"%SyntaxError%":$e,"%ThrowTypeError%":Fc,"%TypedArray%":Uc,"%TypeError%":_e,"%Uint8Array%":typeof Uint8Array=="undefined"?E:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?E:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?E:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?E:Uint32Array,"%URIError%":bc,"%WeakMap%":typeof WeakMap=="undefined"?E:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?E:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?E:WeakSet,"%Function.prototype.call%":lt,"%Function.prototype.apply%":ga,"%Object.defineProperty%":Nc,"%Object.getPrototypeOf%":Oc,"%Math.abs%":Ac,"%Math.floor%":Sc,"%Math.max%":Ec,"%Math.min%":Ic,"%Math.pow%":Rc,"%Math.round%":Tc,"%Math.sign%":Pc,"%Reflect.getPrototypeOf%":Cc};if(q)try{null.error}catch(r){da=q(q(r)),Se["%Error.prototype%"]=da}var da,Bc=function r(t){var e;if(t==="%AsyncFunction%")e=ln("async function () {}");else if(t==="%GeneratorFunction%")e=ln("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=ln("async function* () {}");else if(t==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&q&&(e=q(i.prototype))}return Se[t]=e,e},ya={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ct=we(),tr=tn(),qc=ct.call(lt,Array.prototype.concat),kc=ct.call(ga,Array.prototype.splice),ma=ct.call(lt,String.prototype.replace),rr=ct.call(lt,String.prototype.slice),Lc=ct.call(lt,RegExp.prototype.exec),Mc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_c=/\\(\\)?/g,$c=function(t){var e=rr(t,0,1),n=rr(t,-1);if(e==="%"&&n!=="%")throw new $e("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new $e("invalid intrinsic syntax, expected opening `%`");var i=[];return ma(t,Mc,function(o,u,p,c){i[i.length]=p?ma(c,_c,"$1"):u||o}),i},Dc=function(t,e){var n=t,i;if(tr(ya,n)&&(i=ya[n],n="%"+i[0]+"%"),tr(Se,n)){var o=Se[n];if(o===Me&&(o=Bc(n)),typeof o=="undefined"&&!e)throw new _e("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new $e("intrinsic "+t+" does not exist!")};xa.exports=function(t,e){if(typeof t!="string"||t.length===0)throw new _e("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new _e('"allowMissing" argument must be a boolean');if(Lc(/^%?[^%]*%?$/,t)===null)throw new $e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=$c(t),i=n.length>0?n[0]:"",o=Dc("%"+i+"%",e),u=o.name,p=o.value,c=!1,h=o.alias;h&&(i=h[0],kc(n,qc([0,1],h)));for(var y=1,g=!0;y<n.length;y+=1){var v=n[y],b=rr(v,0,1),w=rr(v,-1);if((b==='"'||b==="'"||b==="`"||w==='"'||w==="'"||w==="`")&&b!==w)throw new $e("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),i+="."+v,u="%"+i+"%",tr(Se,u))p=Se[u];else if(p!=null){if(!(v in p)){if(!e)throw new _e("base intrinsic for "+t+" exists, but the property is not available.");return}if(pt&&y+1>=n.length){var A=pt(p,v);g=!!A,g&&"get"in A&&!("originalValue"in A.get)?p=A.get:p=p[v]}else g=tr(p,v),p=p[v];g&&!c&&(Se[u]=p)}}return p}});var yn=x((Mv,ba)=>{"use strict";a();s();var va=Xt(),Wc=Ht(),De=C(),wa=ft();ba.exports=function(t,e,n){if(!t||typeof t!="object"&&typeof t!="function")throw new De("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new De("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new De("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new De("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new De("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new De("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!wa&&wa(t,e);if(va)va(t,e,{configurable:u===null&&c?c.configurable:!u,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:o===null&&c?c.writable:!o});else if(p||!i&&!o&&!u)t[e]=n;else throw new Wc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var hn=x((Dv,Sa)=>{"use strict";a();s();var mn=Xt(),Aa=function(){return!!mn};Aa.hasArrayLengthDefineBug=function(){if(!mn)return null;try{return mn([],"length",{value:1}).length!==1}catch(t){return!0}};Sa.exports=Aa});var Pa=x((Vv,Ta)=>{"use strict";a();s();var jc=dn(),Ea=yn(),Vc=hn()(),Ia=ft(),Ra=C(),Gc=jc("%Math.floor%");Ta.exports=function(t,e){if(typeof t!="function")throw new Ra("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||Gc(e)!==e)throw new Ra("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in t&&Ia){var u=Ia(t,"length");u&&!u.configurable&&(i=!1),u&&!u.writable&&(o=!1)}return(i||o||!n)&&(Vc?Ea(t,"length",e,!0,!0):Ea(t,"length",e)),t}});var Fa=x((Yv,Na)=>{"use strict";a();s();var zc=dn(),nr=zc("%Object.defineProperty%",!0)||!1;if(nr)try{nr({},"a",{value:1})}catch(r){nr=!1}Na.exports=nr});var ar=x((Qv,ir)=>{"use strict";a();s();var gn=we(),or=G(),Yc=Pa(),Hc=C(),Ua=or("%Function.prototype.apply%"),Ba=or("%Function.prototype.call%"),qa=or("%Reflect.apply%",!0)||gn.call(Ba,Ua),Oa=Fa(),Jc=or("%Math.max%");ir.exports=function(t){if(typeof t!="function")throw new Hc("a function is required");var e=qa(gn,Ba,arguments);return Yc(e,1+Jc(0,t.length-(arguments.length-1)),!0)};var Ca=function(){return qa(gn,Ua,arguments)};Oa?Oa(ir.exports,"apply",{value:Ca}):ir.exports.apply=Ca});var xn=x((Xv,La)=>{"use strict";a();s();var ka=Object.prototype.toString;La.exports=function(t){var e=ka.call(t),n=e==="[object Arguments]";return n||(n=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&ka.call(t.callee)==="[object Function]"),n}});var za=x((rw,Ga)=>{"use strict";a();s();var Va;Object.keys||(dt=Object.prototype.hasOwnProperty,vn=Object.prototype.toString,Ma=xn(),wn=Object.prototype.propertyIsEnumerable,_a=!wn.call({toString:null},"toString"),$a=wn.call(function(){},"prototype"),yt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],sr=function(r){var t=r.constructor;return t&&t.prototype===r},Da={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Wa=function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!Da["$"+r]&&dt.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{sr(window[r])}catch(t){return!0}}catch(t){return!0}return!1}(),ja=function(r){if(typeof window=="undefined"||!Wa)return sr(r);try{return sr(r)}catch(t){return!1}},Va=function(t){var e=t!==null&&typeof t=="object",n=vn.call(t)==="[object Function]",i=Ma(t),o=e&&vn.call(t)==="[object String]",u=[];if(!e&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var p=$a&&n;if(o&&t.length>0&&!dt.call(t,0))for(var c=0;c<t.length;++c)u.push(String(c));if(i&&t.length>0)for(var h=0;h<t.length;++h)u.push(String(h));else for(var y in t)!(p&&y==="prototype")&&dt.call(t,y)&&u.push(String(y));if(_a)for(var g=ja(t),v=0;v<yt.length;++v)!(g&&yt[v]==="constructor")&&dt.call(t,yt[v])&&u.push(yt[v]);return u});var dt,vn,Ma,wn,_a,$a,yt,sr,Da,Wa,ja;Ga.exports=Va});var Qa=x((ow,Ja)=>{"use strict";a();s();var Qc=Array.prototype.slice,Zc=xn(),Ya=Object.keys,ur=Ya?function(t){return Ya(t)}:za(),Ha=Object.keys;ur.shim=function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=function(n){return Zc(n)?Ha(Qc.call(n)):Ha(n)})}else Object.keys=ur;return Object.keys||ur};Ja.exports=ur});var mt=x((uw,es)=>{"use strict";a();s();var Kc=Qa(),Xc=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ed=Object.prototype.toString,td=Array.prototype.concat,Za=yn(),rd=function(r){return typeof r=="function"&&ed.call(r)==="[object Function]"},Ka=hn()(),nd=function(r,t,e,n){if(t in r){if(n===!0){if(r[t]===e)return}else if(!rd(n)||!n())return}Ka?Za(r,t,e,!0):Za(r,t,e)},Xa=function(r,t){var e=arguments.length>2?arguments[2]:{},n=Kc(t);Xc&&(n=td.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)nd(r,n[i],t[n[i]],e[n[i]])};Xa.supportsDescriptors=!!Ka;es.exports=Xa});var $=x((lw,ns)=>{"use strict";a();s();var ts=G(),rs=ar(),id=rs(ts("String.prototype.indexOf"));ns.exports=function(t,e){var n=ts(t,!!e);return typeof n=="function"&&id(t,".prototype.")>-1?rs(n):n}});var as=x((yw,os)=>{"use strict";a();s();var od=G(),is=od("%Array%"),ad=!is.isArray&&$()("Object.prototype.toString");os.exports=is.isArray||function(t){return ad(t)==="[object Array]"}});var bn=x((gw,ss)=>{"use strict";a();s();ss.exports=as()});var fs=x((ww,us)=>{"use strict";a();s();var sd=G(),ud=$(),fd=C(),pd=bn(),ld=sd("%Reflect.apply%",!0)||ud("Function.prototype.apply");us.exports=function(t,e){var n=arguments.length>2?arguments[2]:[];if(!pd(n))throw new fd("Assertion failed: optional `argumentsList`, if provided, must be a List");return ld(t,e,n)}});function ps(){throw new Error("setTimeout has not been defined")}function ls(){throw new Error("clearTimeout has not been defined")}function cs(r){if(ae===setTimeout)return setTimeout(r,0);if((ae===ps||!ae)&&setTimeout)return ae=setTimeout,setTimeout(r,0);try{return ae(r,0)}catch(t){try{return ae.call(null,r,0)}catch(e){return ae.call(this,r,0)}}}function cd(r){if(se===clearTimeout)return clearTimeout(r);if((se===ls||!se)&&clearTimeout)return se=clearTimeout,clearTimeout(r);try{return se(r)}catch(t){try{return se.call(null,r)}catch(e){return se.call(this,r)}}}function dd(){!je||!Ee||(je=!1,Ee.length?K=Ee.concat(K):fr=-1,K.length&&ds())}function ds(){if(!je){var r=cs(dd);je=!0;for(var t=K.length;t;){for(Ee=K,K=[];++fr<t;)Ee&&Ee[fr].run();fr=-1,t=K.length}Ee=null,je=!1,cd(r)}}function yd(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];K.push(new ys(r,t)),K.length===1&&!je&&cs(ds)}function ys(r,t){this.fun=r,this.array=t}function Ie(){}function Od(r){throw new Error("process.binding is not supported")}function Cd(){return"/"}function Ud(r){throw new Error("process.chdir is not supported")}function Bd(){return 0}function kd(r){var t=qd.call(We)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Md(){var r=new Date,t=r-Ld;return t/1e3}var ae,se,K,je,Ee,fr,md,hd,gd,xd,vd,wd,bd,Ad,Sd,Ed,Id,Rd,Td,Pd,Nd,Fd,We,qd,Ld,_d,ht,ms=Fe(()=>{"use strict";a();s();ae=ps,se=ls;typeof globalThis.setTimeout=="function"&&(ae=setTimeout);typeof globalThis.clearTimeout=="function"&&(se=clearTimeout);K=[],je=!1,fr=-1;ys.prototype.run=function(){this.fun.apply(null,this.array)};md="browser",hd="browser",gd=!0,xd={},vd=[],wd="",bd={},Ad={},Sd={};Ed=Ie,Id=Ie,Rd=Ie,Td=Ie,Pd=Ie,Nd=Ie,Fd=Ie;We=globalThis.performance||{},qd=We.now||We.mozNow||We.msNow||We.oNow||We.webkitNow||function(){return new Date().getTime()};Ld=new Date;_d={nextTick:yd,title:md,browser:gd,env:xd,argv:vd,version:wd,versions:bd,on:Ed,addListener:Id,once:Rd,off:Td,removeListener:Pd,removeAllListeners:Nd,emit:Fd,binding:Od,cwd:Cd,chdir:Ud,umask:Bd,hrtime:kd,platform:hd,release:Ad,config:Sd,uptime:Md},ht=_d});var An,Sn,hs=Fe(()=>{"use strict";a();s();typeof Object.create=="function"?An=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:An=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t};Sn=An});var Es={};jr(Es,{_extend:()=>Cn,debuglog:()=>gs,default:()=>Jd,deprecate:()=>Pn,format:()=>dr,inherits:()=>Sn,inspect:()=>Y,isArray:()=>Nn,isBoolean:()=>yr,isBuffer:()=>bs,isDate:()=>cr,isError:()=>xt,isFunction:()=>vt,isNull:()=>wt,isNullOrUndefined:()=>xs,isNumber:()=>Fn,isObject:()=>Re,isPrimitive:()=>ws,isRegExp:()=>gt,isString:()=>bt,isSymbol:()=>vs,isUndefined:()=>z,log:()=>As});function dr(r){if(!bt(r)){for(var t=[],e=0;e<arguments.length;e++)t.push(Y(arguments[e]));return t.join(" ")}for(var e=1,n=arguments,i=n.length,o=String(r).replace($d,function(p){if(p==="%%")return"%";if(e>=i)return p;switch(p){case"%s":return String(n[e++]);case"%d":return Number(n[e++]);case"%j":try{return JSON.stringify(n[e++])}catch(c){return"[Circular]"}default:return p}}),u=n[e];e<i;u=n[++e])wt(u)||!Re(u)?o+=" "+u:o+=" "+Y(u);return o}function Pn(r,t){if(z(globalThis.process))return function(){return Pn(r,t).apply(this,arguments)};if(ht.noDeprecation===!0)return r;var e=!1;function n(){if(!e){if(ht.throwDeprecation)throw new Error(t);ht.traceDeprecation?console.trace(t):console.error(t),e=!0}return r.apply(this,arguments)}return n}function gs(r){if(z(En)&&(En=ht.env.NODE_DEBUG||""),r=r.toUpperCase(),!pr[r])if(new RegExp("\\b"+r+"\\b","i").test(En)){var t=0;pr[r]=function(){var e=dr.apply(null,arguments);console.error("%s %d: %s",r,t,e)}}else pr[r]=function(){};return pr[r]}function Y(r,t){var e={seen:[],stylize:Wd};return arguments.length>=3&&(e.depth=arguments[2]),arguments.length>=4&&(e.colors=arguments[3]),yr(t)?e.showHidden=t:t&&Cn(e,t),z(e.showHidden)&&(e.showHidden=!1),z(e.depth)&&(e.depth=2),z(e.colors)&&(e.colors=!1),z(e.customInspect)&&(e.customInspect=!0),e.colors&&(e.stylize=Dd),lr(e,r,e.depth)}function Dd(r,t){var e=Y.styles[t];return e?"\x1B["+Y.colors[e][0]+"m"+r+"\x1B["+Y.colors[e][1]+"m":r}function Wd(r,t){return r}function jd(r){var t={};return r.forEach(function(e,n){t[e]=!0}),t}function lr(r,t,e){if(r.customInspect&&t&&vt(t.inspect)&&t.inspect!==Y&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(e,r);return bt(n)||(n=lr(r,n,e)),n}var i=Vd(r,t);if(i)return i;var o=Object.keys(t),u=jd(o);if(r.showHidden&&(o=Object.getOwnPropertyNames(t)),xt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return In(t);if(o.length===0){if(vt(t)){var p=t.name?": "+t.name:"";return r.stylize("[Function"+p+"]","special")}if(gt(t))return r.stylize(RegExp.prototype.toString.call(t),"regexp");if(cr(t))return r.stylize(Date.prototype.toString.call(t),"date");if(xt(t))return In(t)}var c="",h=!1,y=["{","}"];if(Nn(t)&&(h=!0,y=["[","]"]),vt(t)){var g=t.name?": "+t.name:"";c=" [Function"+g+"]"}if(gt(t)&&(c=" "+RegExp.prototype.toString.call(t)),cr(t)&&(c=" "+Date.prototype.toUTCString.call(t)),xt(t)&&(c=" "+In(t)),o.length===0&&(!h||t.length==0))return y[0]+c+y[1];if(e<0)return gt(t)?r.stylize(RegExp.prototype.toString.call(t),"regexp"):r.stylize("[Object]","special");r.seen.push(t);var v;return h?v=Gd(r,t,e,u,o):v=o.map(function(b){return Tn(r,t,e,u,b,h)}),r.seen.pop(),zd(v,c,y)}function Vd(r,t){if(z(t))return r.stylize("undefined","undefined");if(bt(t)){var e="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(e,"string")}if(Fn(t))return r.stylize(""+t,"number");if(yr(t))return r.stylize(""+t,"boolean");if(wt(t))return r.stylize("null","null")}function In(r){return"["+Error.prototype.toString.call(r)+"]"}function Gd(r,t,e,n,i){for(var o=[],u=0,p=t.length;u<p;++u)Ss(t,String(u))?o.push(Tn(r,t,e,n,String(u),!0)):o.push("");return i.forEach(function(c){c.match(/^\d+$/)||o.push(Tn(r,t,e,n,c,!0))}),o}function Tn(r,t,e,n,i,o){var u,p,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?c.set?p=r.stylize("[Getter/Setter]","special"):p=r.stylize("[Getter]","special"):c.set&&(p=r.stylize("[Setter]","special")),Ss(n,i)||(u="["+i+"]"),p||(r.seen.indexOf(c.value)<0?(wt(e)?p=lr(r,c.value,null):p=lr(r,c.value,e-1),p.indexOf(`
1
+ "use strict";var bp=Object.create;var st=Object.defineProperty,Ap=Object.defineProperties,Sp=Object.getOwnPropertyDescriptor,Ep=Object.getOwnPropertyDescriptors,Ip=Object.getOwnPropertyNames,Mt=Object.getOwnPropertySymbols,Rp=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable;var Dr=(r,t,e)=>t in r?st(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,_t=(r,t)=>{for(var e in t||(t={}))Wr.call(t,e)&&Dr(r,e,t[e]);if(Mt)for(var e of Mt(t))Si.call(t,e)&&Dr(r,e,t[e]);return r},Ei=(r,t)=>Ap(r,Ep(t));var Ii=r=>typeof r=="symbol"?r:r+"",$t=(r,t)=>{var e={};for(var n in r)Wr.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&Mt)for(var n of Mt(r))t.indexOf(n)<0&&Si.call(r,n)&&(e[n]=r[n]);return e};var Fe=(r,t)=>()=>(r&&(t=r(r=0)),t);var x=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),jr=(r,t)=>{for(var e in t)st(r,e,{get:t[e],enumerable:!0})},Ri=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ip(t))!Wr.call(r,i)&&i!==e&&st(r,i,{get:()=>t[i],enumerable:!(n=Sp(t,i))||n.enumerable});return r};var Tp=(r,t,e)=>(e=r!=null?bp(Rp(r)):{},Ri(t||!r||!r.__esModule?st(e,"default",{value:r,enumerable:!0}):e,r)),Ti=r=>Ri(st({},"__esModule",{value:!0}),r);var d=(r,t,e)=>Dr(r,typeof t!="symbol"?t+"":t,e);function Ni(){throw new Error("setTimeout has not been defined")}function Fi(){throw new Error("clearTimeout has not been defined")}function Oi(r){if(ie===setTimeout)return setTimeout(r,0);if((ie===Ni||!ie)&&setTimeout)return ie=setTimeout,setTimeout(r,0);try{return ie(r,0)}catch(t){try{return ie.call(null,r,0)}catch(e){return ie.call(this,r,0)}}}function Pp(r){if(oe===clearTimeout)return clearTimeout(r);if((oe===Fi||!oe)&&clearTimeout)return oe=clearTimeout,clearTimeout(r);try{return oe(r)}catch(t){try{return oe.call(null,r)}catch(e){return oe.call(this,r)}}}function Np(){!Ce||!ge||(Ce=!1,ge.length?Q=ge.concat(Q):Dt=-1,Q.length&&Ci())}function Ci(){if(!Ce){var r=Oi(Np);Ce=!0;for(var t=Q.length;t;){for(ge=Q,Q=[];++Dt<t;)ge&&ge[Dt].run();Dt=-1,t=Q.length}ge=null,Ce=!1,Pp(r)}}function Fp(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];Q.push(new Ui(r,t)),Q.length===1&&!Ce&&Oi(Ci)}function Ui(r,t){this.fun=r,this.array=t}function xe(){}function Yp(r){throw new Error("process.binding is not supported")}function Hp(){return"/"}function Jp(r){throw new Error("process.chdir is not supported")}function Qp(){return 0}function Kp(r){var t=Zp.call(Oe)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function el(){var r=new Date,t=r-Xp;return t/1e3}var ie,oe,Q,Ce,ge,Dt,Op,Cp,Up,Bp,qp,kp,Lp,Mp,_p,$p,Dp,Wp,jp,Vp,Gp,zp,Oe,Zp,Xp,l,Pi,a=Fe(()=>{"use strict";ie=Ni,oe=Fi;typeof globalThis.setTimeout=="function"&&(ie=setTimeout);typeof globalThis.clearTimeout=="function"&&(oe=clearTimeout);Q=[],Ce=!1,Dt=-1;Ui.prototype.run=function(){this.fun.apply(null,this.array)};Op="browser",Cp="browser",Up=!0,Bp={},qp=[],kp="",Lp={},Mp={},_p={};$p=xe,Dp=xe,Wp=xe,jp=xe,Vp=xe,Gp=xe,zp=xe;Oe=globalThis.performance||{},Zp=Oe.now||Oe.mozNow||Oe.msNow||Oe.oNow||Oe.webkitNow||function(){return new Date().getTime()};Xp=new Date;l={nextTick:Fp,title:Op,browser:Up,env:Bp,argv:qp,version:kp,versions:Lp,on:$p,addListener:Dp,once:Wp,off:jp,removeListener:Vp,removeAllListeners:Gp,emit:zp,binding:Yp,cwd:Hp,chdir:Jp,umask:Qp,hrtime:Kp,platform:Cp,release:Mp,config:_p,uptime:el},Pi={};Object.keys(Pi).forEach(r=>{let t=r.split("."),e=l;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Pi[r]:e=e[i]||(e[i]={})}})});function Li(){Gr=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)j[t]=r[t],M[r.charCodeAt(t)]=t;M[45]=62,M[95]=63}function rl(r){Gr||Li();var t,e,n,i,o,u,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,u=new tl(p*3/4-o),n=o>0?p-4:p;var c=0;for(t=0,e=0;t<n;t+=4,e+=3)i=M[r.charCodeAt(t)]<<18|M[r.charCodeAt(t+1)]<<12|M[r.charCodeAt(t+2)]<<6|M[r.charCodeAt(t+3)],u[c++]=i>>16&255,u[c++]=i>>8&255,u[c++]=i&255;return o===2?(i=M[r.charCodeAt(t)]<<2|M[r.charCodeAt(t+1)]>>4,u[c++]=i&255):o===1&&(i=M[r.charCodeAt(t)]<<10|M[r.charCodeAt(t+1)]<<4|M[r.charCodeAt(t+2)]>>2,u[c++]=i>>8&255,u[c++]=i&255),u}function nl(r){return j[r>>18&63]+j[r>>12&63]+j[r>>6&63]+j[r&63]}function il(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(nl(n));return i.join("")}function Bi(r){Gr||Li();for(var t,e=r.length,n=e%3,i="",o=[],u=16383,p=0,c=e-n;p<c;p+=u)o.push(il(r,p,p+u>c?c:p+u));return n===1?(t=r[e-1],i+=j[t>>2],i+=j[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=j[t>>10],i+=j[t>>4&63],i+=j[t<<2&63],i+="="),o.push(i),o.join("")}function Wt(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Z(r,t){if(Wt()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=f.prototype):(r===null&&(r=new f(t)),r.length=t),r}function f(r,t,e){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return zr(this,r)}return Mi(this,r,t,e)}function Mi(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?sl(r,t,e,n):typeof t=="string"?al(r,t,e):ul(r,t)}function _i(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function ol(r,t,e,n){return _i(t),t<=0?Z(r,t):e!==void 0?typeof n=="string"?Z(r,t).fill(e,n):Z(r,t).fill(e):Z(r,t)}function zr(r,t){if(_i(t),r=Z(r,t<0?0:Yr(t)|0),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function al(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=$i(t,e)|0;r=Z(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function Vr(r,t){var e=t.length<0?0:Yr(t.length)|0;r=Z(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function sl(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),f.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=f.prototype):r=Vr(r,t),r}function ul(r,t){if(V(t)){var e=Yr(t.length)|0;return r=Z(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Tl(t.length)?Z(r,0):Vr(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Vr(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Yr(r){if(r>=Wt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Wt().toString(16)+" bytes");return r|0}function V(r){return!!(r!=null&&r._isBuffer)}function $i(r,t){if(V(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return jt(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Yi(r).length;default:if(n)return jt(r).length;t=(""+t).toLowerCase(),n=!0}}function fl(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return vl(this,t,e);case"utf8":case"utf-8":return ji(this,t,e);case"ascii":return gl(this,t,e);case"latin1":case"binary":return xl(this,t,e);case"base64":return ml(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wl(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function ve(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Di(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=f.from(t,n)),V(t))return t.length===0?-1:qi(r,t,e,n,i);if(typeof t=="number")return t=t&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):qi(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function qi(r,t,e,n,i){var o=1,u=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,u/=2,p/=2,e/=2}function c(b,w){return o===1?b[w]:b.readUInt16BE(w*o)}var h;if(i){var y=-1;for(h=e;h<u;h++)if(c(r,h)===c(t,y===-1?0:h-y)){if(y===-1&&(y=h),h-y+1===p)return y*o}else y!==-1&&(h-=h-y),y=-1}else for(e+p>u&&(e=u-p),h=e;h>=0;h--){for(var g=!0,v=0;v<p;v++)if(c(r,h+v)!==c(t,v)){g=!1;break}if(g)return h}return-1}function pl(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var p=parseInt(t.substr(u*2,2),16);if(isNaN(p))return u;r[e+u]=p}return u}function ll(r,t,e,n){return zt(jt(t,r.length-e),r,e,n)}function Wi(r,t,e,n){return zt(Il(t),r,e,n)}function cl(r,t,e,n){return Wi(r,t,e,n)}function dl(r,t,e,n){return zt(Yi(t),r,e,n)}function yl(r,t,e,n){return zt(Rl(t,r.length-e),r,e,n)}function ml(r,t,e){return t===0&&e===r.length?Bi(r):Bi(r.slice(t,e))}function ji(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],u=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var c,h,y,g;switch(p){case 1:o<128&&(u=o);break;case 2:c=r[i+1],(c&192)===128&&(g=(o&31)<<6|c&63,g>127&&(u=g));break;case 3:c=r[i+1],h=r[i+2],(c&192)===128&&(h&192)===128&&(g=(o&15)<<12|(c&63)<<6|h&63,g>2047&&(g<55296||g>57343)&&(u=g));break;case 4:c=r[i+1],h=r[i+2],y=r[i+3],(c&192)===128&&(h&192)===128&&(y&192)===128&&(g=(o&15)<<18|(c&63)<<12|(h&63)<<6|y&63,g>65535&&g<1114112&&(u=g))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=p}return hl(n)}function hl(r){var t=r.length;if(t<=ki)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=ki));return e}function gl(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function xl(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function vl(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=El(r[o]);return i}function wl(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function U(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function L(r,t,e,n,i,o){if(!V(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function Vt(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Gt(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Vi(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Gi(r,t,e,n,i){return i||Vi(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ji(r,t,e,n,23,4),e+4}function zi(r,t,e,n,i){return i||Vi(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ji(r,t,e,n,52,8),e+8}function Al(r){if(r=Sl(r).replace(bl,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Sl(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function El(r){return r<16?"0"+r.toString(16):r.toString(16)}function jt(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],u=0;u<n;++u){if(e=r.charCodeAt(u),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Il(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Rl(r,t){for(var e,n,i,o=[],u=0;u<r.length&&!((t-=2)<0);++u)e=r.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Yi(r){return rl(Al(r))}function zt(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Tl(r){return r!==r}function Pl(r){return r!=null&&(!!r._isBuffer||Hi(r)||Nl(r))}function Hi(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Nl(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Hi(r.slice(0,0))}function Yt(r,t,e,n,i){var o,u,p=i*8-n-1,c=(1<<p)-1,h=c>>1,y=-7,g=e?i-1:0,v=e?-1:1,b=r[t+g];for(g+=v,o=b&(1<<-y)-1,b>>=-y,y+=p;y>0;o=o*256+r[t+g],g+=v,y-=8);for(u=o&(1<<-y)-1,o>>=-y,y+=n;y>0;u=u*256+r[t+g],g+=v,y-=8);if(o===0)o=1-h;else{if(o===c)return u?NaN:(b?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(b?-1:1)*u*Math.pow(2,o-n)}function Ji(r,t,e,n,i,o){var u,p,c,h=o*8-i-1,y=(1<<h)-1,g=y>>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:o-1,w=n?1:-1,A=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,u=y):(u=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+g>=1?t+=v/c:t+=v*Math.pow(2,1-g),t*c>=2&&(u++,c/=2),u+g>=y?(p=0,u=y):u+g>=1?(p=(t*c-1)*Math.pow(2,i),u=u+g):(p=t*Math.pow(2,g-1)*Math.pow(2,i),u=0));i>=8;r[e+b]=p&255,b+=w,p/=256,i-=8);for(u=u<<i|p,h+=i;h>0;r[e+b]=u&255,b+=w,u/=256,h-=8);r[e+b-w]|=A*128}var j,M,tl,Gr,ki,bl,Qi=Fe(()=>{"use strict";a();s();j=[],M=[],tl=typeof Uint8Array!="undefined"?Uint8Array:Array,Gr=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(r){return r.__proto__=f.prototype,r};f.from=function(r,t,e){return Mi(null,r,t,e)};f.kMaxLength=Wt();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(r,t,e){return ol(null,r,t,e)};f.allocUnsafe=function(r){return zr(null,r)};f.allocUnsafeSlow=function(r){return zr(null,r)};f.isBuffer=Pl;f.compare=function(t,e){if(!V(t)||!V(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,u=Math.min(n,i);o<u;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=f.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var u=t[n];if(!V(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i};f.byteLength=$i;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)ve(this,e,e+1);return this};f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)ve(this,e,e+3),ve(this,e+1,e+2);return this};f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)ve(this,e,e+7),ve(this,e+1,e+6),ve(this,e+2,e+5),ve(this,e+3,e+4);return this};f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?ji(this,0,t):fl.apply(this,arguments)};f.prototype.equals=function(t){if(!V(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0};f.prototype.compare=function(t,e,n,i,o){if(!V(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var u=o-i,p=n-e,c=Math.min(u,p),h=this.slice(i,o),y=t.slice(e,n),g=0;g<c;++g)if(h[g]!==y[g]){u=h[g],p=y[g];break}return u<p?-1:p<u?1:0};f.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};f.prototype.indexOf=function(t,e,n){return Di(this,t,e,n,!0)};f.prototype.lastIndexOf=function(t,e,n){return Di(this,t,e,n,!1)};f.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return pl(this,t,e,n);case"utf8":case"utf-8":return ll(this,t,e,n);case"ascii":return Wi(this,t,e,n);case"latin1":case"binary":return cl(this,t,e,n);case"base64":return dl(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return yl(this,t,e,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ki=4096;f.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(f.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=f.prototype;else{var o=e-t;i=new f(o,void 0);for(var u=0;u<o;++u)i[u]=this[u+t]}return i};f.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=this[t],o=1,u=0;++u<e&&(o*=256);)i+=this[t+u]*o;return i};f.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};f.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]};f.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=this[t],o=1,u=0;++u<e&&(o*=256);)i+=this[t+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};f.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=e,o=1,u=this[t+--i];i>0&&(o*=256);)u+=this[t+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*e)),u};f.prototype.readInt8=function(t,e){return e||U(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};f.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),Yt(this,t,!0,23,4)};f.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),Yt(this,t,!1,23,4)};f.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),Yt(this,t,!0,52,8)};f.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),Yt(this,t,!1,52,8)};f.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var u=1,p=0;for(this[e]=t&255;++p<n&&(u*=256);)this[e+p]=t/u&255;return e+n};f.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var u=n-1,p=1;for(this[e+u]=t&255;--u>=0&&(p*=256);)this[e+u]=t/p&255;return e+n};f.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Vt(this,t,e,!0),e+2};f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Vt(this,t,e,!1),e+2};f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):Gt(this,t,e,!0),e+4};f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Gt(this,t,e,!1),e+4};f.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var u=0,p=1,c=0;for(this[e]=t&255;++u<n&&(p*=256);)t<0&&c===0&&this[e+u-1]!==0&&(c=1),this[e+u]=(t/p>>0)-c&255;return e+n};f.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var u=n-1,p=1,c=0;for(this[e+u]=t&255;--u>=0&&(p*=256);)t<0&&c===0&&this[e+u+1]!==0&&(c=1),this[e+u]=(t/p>>0)-c&255;return e+n};f.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};f.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Vt(this,t,e,!0),e+2};f.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Vt(this,t,e,!1),e+2};f.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Gt(this,t,e,!0),e+4};f.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Gt(this,t,e,!1),e+4};f.prototype.writeFloatLE=function(t,e,n){return Gi(this,t,e,!0,n)};f.prototype.writeFloatBE=function(t,e,n){return Gi(this,t,e,!1,n)};f.prototype.writeDoubleLE=function(t,e,n){return zi(this,t,e,!0,n)};f.prototype.writeDoubleBE=function(t,e,n){return zi(this,t,e,!1,n)};f.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,u;if(this===t&&n<e&&e<i)for(u=o-1;u>=0;--u)t[u+e]=this[u+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<o;++u)t[u+e]=this[u+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};f.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var u;if(typeof t=="number")for(u=e;u<n;++u)this[u]=t;else{var p=V(t)?t:jt(new f(t,i).toString()),c=p.length;for(u=0;u<n-e;++u)this[u+e]=p[u%c]}return this};bl=/[^+\/0-9A-Za-z-_]/g});var s=Fe(()=>{"use strict";Qi()});var Xi=x((Cx,Ki)=>{"use strict";a();s();var Fl="Function.prototype.bind called on incompatible ",Ol=Object.prototype.toString,Cl=Math.max,Ul="[object Function]",Zi=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<e.length;o+=1)n[o+t.length]=e[o];return n},Bl=function(t,e){for(var n=[],i=e||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n},ql=function(r,t){for(var e="",n=0;n<r.length;n+=1)e+=r[n],n+1<r.length&&(e+=t);return e};Ki.exports=function(t){var e=this;if(typeof e!="function"||Ol.apply(e)!==Ul)throw new TypeError(Fl+e);for(var n=Bl(arguments,1),i,o=function(){if(this instanceof i){var y=e.apply(this,Zi(n,arguments));return Object(y)===y?y:this}return e.apply(t,Zi(n,arguments))},u=Cl(0,e.length-n.length),p=[],c=0;c<u;c++)p[c]="$"+c;if(i=Function("binder","return function ("+ql(p,",")+"){ return binder.apply(this,arguments); }")(o),e.prototype){var h=function(){};h.prototype=e.prototype,i.prototype=new h,h.prototype=null}return i}});var we=x((qx,eo)=>{"use strict";a();s();var kl=Xi();eo.exports=Function.prototype.bind||kl});var Hr=x((Mx,to)=>{"use strict";a();s();to.exports=Error});var Jr=x((Dx,ro)=>{"use strict";a();s();ro.exports=EvalError});var Qr=x((Vx,no)=>{"use strict";a();s();no.exports=RangeError});var Zr=x((Yx,io)=>{"use strict";a();s();io.exports=ReferenceError});var Ht=x((Qx,oo)=>{"use strict";a();s();oo.exports=SyntaxError});var C=x((Xx,ao)=>{"use strict";a();s();ao.exports=TypeError});var Kr=x((rv,so)=>{"use strict";a();s();so.exports=URIError});var fo=x((ov,uo)=>{"use strict";a();s();uo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,e);if(u.value!==i||u.enumerable!==!0)return!1}return!0}});var Xr=x((uv,lo)=>{"use strict";a();s();var po=typeof Symbol!="undefined"&&Symbol,Ll=fo();lo.exports=function(){return typeof po!="function"||typeof Symbol!="function"||typeof po("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ll()}});var yo=x((lv,co)=>{"use strict";a();s();var en={__proto__:null,foo:{}},Ml=Object;co.exports=function(){return{__proto__:en}.foo===en.foo&&!(en instanceof Ml)}});var tn=x((yv,mo)=>{"use strict";a();s();var _l=Function.prototype.call,$l=Object.prototype.hasOwnProperty,Dl=we();mo.exports=Dl.call(_l,$l)});var G=x((gv,wo)=>{"use strict";a();s();var I,Wl=Hr(),jl=Jr(),Vl=Qr(),Gl=Zr(),ke=Ht(),qe=C(),zl=Kr(),vo=Function,rn=function(r){try{return vo('"use strict"; return ('+r+").constructor;")()}catch(t){}},be=Object.getOwnPropertyDescriptor;if(be)try{be({},"")}catch(r){be=null}var nn=function(){throw new qe},Yl=be?function(){try{return arguments.callee,nn}catch(r){try{return be(arguments,"callee").get}catch(t){return nn}}}():nn,Ue=Xr()(),Hl=yo()(),B=Object.getPrototypeOf||(Hl?function(r){return r.__proto__}:null),Be={},Jl=typeof Uint8Array=="undefined"||!B?I:B(Uint8Array),Ae={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?I:ArrayBuffer,"%ArrayIteratorPrototype%":Ue&&B?B([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":Be,"%AsyncGenerator%":Be,"%AsyncGeneratorFunction%":Be,"%AsyncIteratorPrototype%":Be,"%Atomics%":typeof Atomics=="undefined"?I:Atomics,"%BigInt%":typeof BigInt=="undefined"?I:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?I:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?I:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Wl,"%eval%":eval,"%EvalError%":jl,"%Float32Array%":typeof Float32Array=="undefined"?I:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?I:FinalizationRegistry,"%Function%":vo,"%GeneratorFunction%":Be,"%Int8Array%":typeof Int8Array=="undefined"?I:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?I:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ue&&B?B(B([][Symbol.iterator]())):I,"%JSON%":typeof JSON=="object"?JSON:I,"%Map%":typeof Map=="undefined"?I:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ue||!B?I:B(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?I:Promise,"%Proxy%":typeof Proxy=="undefined"?I:Proxy,"%RangeError%":Vl,"%ReferenceError%":Gl,"%Reflect%":typeof Reflect=="undefined"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?I:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ue||!B?I:B(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ue&&B?B(""[Symbol.iterator]()):I,"%Symbol%":Ue?Symbol:I,"%SyntaxError%":ke,"%ThrowTypeError%":Yl,"%TypedArray%":Jl,"%TypeError%":qe,"%Uint8Array%":typeof Uint8Array=="undefined"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?I:Uint32Array,"%URIError%":zl,"%WeakMap%":typeof WeakMap=="undefined"?I:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?I:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?I:WeakSet};if(B)try{null.error}catch(r){ho=B(B(r)),Ae["%Error.prototype%"]=ho}var ho,Ql=function r(t){var e;if(t==="%AsyncFunction%")e=rn("async function () {}");else if(t==="%GeneratorFunction%")e=rn("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=rn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&B&&(e=B(i.prototype))}return Ae[t]=e,e},go={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ut=we(),Jt=tn(),Zl=ut.call(Function.call,Array.prototype.concat),Kl=ut.call(Function.apply,Array.prototype.splice),xo=ut.call(Function.call,String.prototype.replace),Qt=ut.call(Function.call,String.prototype.slice),Xl=ut.call(Function.call,RegExp.prototype.exec),ec=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tc=/\\(\\)?/g,rc=function(t){var e=Qt(t,0,1),n=Qt(t,-1);if(e==="%"&&n!=="%")throw new ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new ke("invalid intrinsic syntax, expected opening `%`");var i=[];return xo(t,ec,function(o,u,p,c){i[i.length]=p?xo(c,tc,"$1"):u||o}),i},nc=function(t,e){var n=t,i;if(Jt(go,n)&&(i=go[n],n="%"+i[0]+"%"),Jt(Ae,n)){var o=Ae[n];if(o===Be&&(o=Ql(n)),typeof o=="undefined"&&!e)throw new qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new ke("intrinsic "+t+" does not exist!")};wo.exports=function(t,e){if(typeof t!="string"||t.length===0)throw new qe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new qe('"allowMissing" argument must be a boolean');if(Xl(/^%?[^%]*%?$/,t)===null)throw new ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=rc(t),i=n.length>0?n[0]:"",o=nc("%"+i+"%",e),u=o.name,p=o.value,c=!1,h=o.alias;h&&(i=h[0],Kl(n,Zl([0,1],h)));for(var y=1,g=!0;y<n.length;y+=1){var v=n[y],b=Qt(v,0,1),w=Qt(v,-1);if((b==='"'||b==="'"||b==="`"||w==='"'||w==="'"||w==="`")&&b!==w)throw new ke("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),i+="."+v,u="%"+i+"%",Jt(Ae,u))p=Ae[u];else if(p!=null){if(!(v in p)){if(!e)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(be&&y+1>=n.length){var A=be(p,v);g=!!A,g&&"get"in A&&!("originalValue"in A.get)?p=A.get:p=p[v]}else g=Jt(p,v),p=p[v];g&&!c&&(Ae[u]=p)}}return p}});var on=x((wv,bo)=>{"use strict";a();s();bo.exports=Object});var So=x((Sv,Ao)=>{"use strict";a();s();Ao.exports=Math.abs});var Io=x((Rv,Eo)=>{"use strict";a();s();Eo.exports=Math.floor});var To=x((Nv,Ro)=>{"use strict";a();s();Ro.exports=Math.max});var No=x((Cv,Po)=>{"use strict";a();s();Po.exports=Math.min});var Oo=x((qv,Fo)=>{"use strict";a();s();Fo.exports=Math.pow});var Uo=x((Mv,Co)=>{"use strict";a();s();Co.exports=Math.round});var qo=x((Dv,Bo)=>{"use strict";a();s();Bo.exports=Number.isNaN||function(t){return t!==t}});var Lo=x((Vv,ko)=>{"use strict";a();s();var ic=qo();ko.exports=function(t){return ic(t)||t===0?t:t<0?-1:1}});var _o=x((Yv,Mo)=>{"use strict";a();s();Mo.exports=Object.getOwnPropertyDescriptor});var ft=x((Qv,$o)=>{"use strict";a();s();var Zt=_o();if(Zt)try{Zt([],"length")}catch(r){Zt=null}$o.exports=Zt});var Xt=x((Xv,Do)=>{"use strict";a();s();var Kt=Object.defineProperty||!1;if(Kt)try{Kt({},"a",{value:1})}catch(r){Kt=!1}Do.exports=Kt});var an=x((r0,Wo)=>{"use strict";a();s();Wo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var u=Object.getOwnPropertySymbols(t);if(u.length!==1||u[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(t,e);if(p.value!==i||p.enumerable!==!0)return!1}return!0}});var Go=x((o0,Vo)=>{"use strict";a();s();var jo=typeof Symbol!="undefined"&&Symbol,oc=an();Vo.exports=function(){return typeof jo!="function"||typeof Symbol!="function"||typeof jo("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oc()}});var sn=x((u0,zo)=>{"use strict";a();s();zo.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var un=x((l0,Yo)=>{"use strict";a();s();var ac=on();Yo.exports=ac.getPrototypeOf||null});var er=x((y0,Ho)=>{"use strict";a();s();Ho.exports=Function.prototype.call});var fn=x((g0,Jo)=>{"use strict";a();s();Jo.exports=Function.prototype.apply});var Zo=x((w0,Qo)=>{"use strict";a();s();Qo.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Xo=x((S0,Ko)=>{"use strict";a();s();var sc=we(),uc=fn(),fc=er(),pc=Zo();Ko.exports=pc||sc.call(fc,uc)});var ta=x((R0,ea)=>{"use strict";a();s();var lc=we(),cc=C(),dc=er(),yc=Xo();ea.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new cc("a function is required");return yc(lc,dc,t)}});var sa=x((N0,aa)=>{"use strict";a();s();var mc=ta(),ra=ft(),ia;try{ia=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var pn=!!ia&&ra&&ra(Object.prototype,"__proto__"),oa=Object,na=oa.getPrototypeOf;aa.exports=pn&&typeof pn.get=="function"?mc([pn.get]):typeof na=="function"?function(t){return na(t==null?t:oa(t))}:!1});var ca=x((C0,la)=>{"use strict";a();s();var ua=sn(),fa=un(),pa=sa();la.exports=ua?function(t){return ua(t)}:fa?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return fa(t)}:pa?function(t){return pa(t)}:null});var dn=x((q0,xa)=>{"use strict";a();s();var E,hc=on(),gc=Hr(),xc=Jr(),vc=Qr(),wc=Zr(),$e=Ht(),_e=C(),bc=Kr(),Ac=So(),Sc=Io(),Ec=To(),Ic=No(),Rc=Oo(),Tc=Uo(),Pc=Lo(),ha=Function,ln=function(r){try{return ha('"use strict"; return ('+r+").constructor;")()}catch(t){}},pt=ft(),Nc=Xt(),cn=function(){throw new _e},Fc=pt?function(){try{return arguments.callee,cn}catch(r){try{return pt(arguments,"callee").get}catch(t){return cn}}}():cn,Le=Go()(),q=ca(),Oc=un(),Cc=sn(),ga=fn(),lt=er(),Me={},Uc=typeof Uint8Array=="undefined"||!q?E:q(Uint8Array),Se={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?E:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?E:ArrayBuffer,"%ArrayIteratorPrototype%":Le&&q?q([][Symbol.iterator]()):E,"%AsyncFromSyncIteratorPrototype%":E,"%AsyncFunction%":Me,"%AsyncGenerator%":Me,"%AsyncGeneratorFunction%":Me,"%AsyncIteratorPrototype%":Me,"%Atomics%":typeof Atomics=="undefined"?E:Atomics,"%BigInt%":typeof BigInt=="undefined"?E:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?E:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?E:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?E:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":gc,"%eval%":eval,"%EvalError%":xc,"%Float16Array%":typeof Float16Array=="undefined"?E:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?E:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?E:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?E:FinalizationRegistry,"%Function%":ha,"%GeneratorFunction%":Me,"%Int8Array%":typeof Int8Array=="undefined"?E:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?E:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?E:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Le&&q?q(q([][Symbol.iterator]())):E,"%JSON%":typeof JSON=="object"?JSON:E,"%Map%":typeof Map=="undefined"?E:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Le||!q?E:q(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":hc,"%Object.getOwnPropertyDescriptor%":pt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?E:Promise,"%Proxy%":typeof Proxy=="undefined"?E:Proxy,"%RangeError%":vc,"%ReferenceError%":wc,"%Reflect%":typeof Reflect=="undefined"?E:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?E:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Le||!q?E:q(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?E:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Le&&q?q(""[Symbol.iterator]()):E,"%Symbol%":Le?Symbol:E,"%SyntaxError%":$e,"%ThrowTypeError%":Fc,"%TypedArray%":Uc,"%TypeError%":_e,"%Uint8Array%":typeof Uint8Array=="undefined"?E:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?E:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?E:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?E:Uint32Array,"%URIError%":bc,"%WeakMap%":typeof WeakMap=="undefined"?E:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?E:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?E:WeakSet,"%Function.prototype.call%":lt,"%Function.prototype.apply%":ga,"%Object.defineProperty%":Nc,"%Object.getPrototypeOf%":Oc,"%Math.abs%":Ac,"%Math.floor%":Sc,"%Math.max%":Ec,"%Math.min%":Ic,"%Math.pow%":Rc,"%Math.round%":Tc,"%Math.sign%":Pc,"%Reflect.getPrototypeOf%":Cc};if(q)try{null.error}catch(r){da=q(q(r)),Se["%Error.prototype%"]=da}var da,Bc=function r(t){var e;if(t==="%AsyncFunction%")e=ln("async function () {}");else if(t==="%GeneratorFunction%")e=ln("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=ln("async function* () {}");else if(t==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&q&&(e=q(i.prototype))}return Se[t]=e,e},ya={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ct=we(),tr=tn(),qc=ct.call(lt,Array.prototype.concat),kc=ct.call(ga,Array.prototype.splice),ma=ct.call(lt,String.prototype.replace),rr=ct.call(lt,String.prototype.slice),Lc=ct.call(lt,RegExp.prototype.exec),Mc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_c=/\\(\\)?/g,$c=function(t){var e=rr(t,0,1),n=rr(t,-1);if(e==="%"&&n!=="%")throw new $e("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new $e("invalid intrinsic syntax, expected opening `%`");var i=[];return ma(t,Mc,function(o,u,p,c){i[i.length]=p?ma(c,_c,"$1"):u||o}),i},Dc=function(t,e){var n=t,i;if(tr(ya,n)&&(i=ya[n],n="%"+i[0]+"%"),tr(Se,n)){var o=Se[n];if(o===Me&&(o=Bc(n)),typeof o=="undefined"&&!e)throw new _e("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new $e("intrinsic "+t+" does not exist!")};xa.exports=function(t,e){if(typeof t!="string"||t.length===0)throw new _e("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new _e('"allowMissing" argument must be a boolean');if(Lc(/^%?[^%]*%?$/,t)===null)throw new $e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=$c(t),i=n.length>0?n[0]:"",o=Dc("%"+i+"%",e),u=o.name,p=o.value,c=!1,h=o.alias;h&&(i=h[0],kc(n,qc([0,1],h)));for(var y=1,g=!0;y<n.length;y+=1){var v=n[y],b=rr(v,0,1),w=rr(v,-1);if((b==='"'||b==="'"||b==="`"||w==='"'||w==="'"||w==="`")&&b!==w)throw new $e("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),i+="."+v,u="%"+i+"%",tr(Se,u))p=Se[u];else if(p!=null){if(!(v in p)){if(!e)throw new _e("base intrinsic for "+t+" exists, but the property is not available.");return}if(pt&&y+1>=n.length){var A=pt(p,v);g=!!A,g&&"get"in A&&!("originalValue"in A.get)?p=A.get:p=p[v]}else g=tr(p,v),p=p[v];g&&!c&&(Se[u]=p)}}return p}});var yn=x((M0,ba)=>{"use strict";a();s();var va=Xt(),Wc=Ht(),De=C(),wa=ft();ba.exports=function(t,e,n){if(!t||typeof t!="object"&&typeof t!="function")throw new De("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new De("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new De("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new De("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new De("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new De("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!wa&&wa(t,e);if(va)va(t,e,{configurable:u===null&&c?c.configurable:!u,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:o===null&&c?c.writable:!o});else if(p||!i&&!o&&!u)t[e]=n;else throw new Wc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var hn=x((D0,Sa)=>{"use strict";a();s();var mn=Xt(),Aa=function(){return!!mn};Aa.hasArrayLengthDefineBug=function(){if(!mn)return null;try{return mn([],"length",{value:1}).length!==1}catch(t){return!0}};Sa.exports=Aa});var Pa=x((V0,Ta)=>{"use strict";a();s();var jc=dn(),Ea=yn(),Vc=hn()(),Ia=ft(),Ra=C(),Gc=jc("%Math.floor%");Ta.exports=function(t,e){if(typeof t!="function")throw new Ra("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||Gc(e)!==e)throw new Ra("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in t&&Ia){var u=Ia(t,"length");u&&!u.configurable&&(i=!1),u&&!u.writable&&(o=!1)}return(i||o||!n)&&(Vc?Ea(t,"length",e,!0,!0):Ea(t,"length",e)),t}});var Fa=x((Y0,Na)=>{"use strict";a();s();var zc=dn(),nr=zc("%Object.defineProperty%",!0)||!1;if(nr)try{nr({},"a",{value:1})}catch(r){nr=!1}Na.exports=nr});var ar=x((Q0,ir)=>{"use strict";a();s();var gn=we(),or=G(),Yc=Pa(),Hc=C(),Ua=or("%Function.prototype.apply%"),Ba=or("%Function.prototype.call%"),qa=or("%Reflect.apply%",!0)||gn.call(Ba,Ua),Oa=Fa(),Jc=or("%Math.max%");ir.exports=function(t){if(typeof t!="function")throw new Hc("a function is required");var e=qa(gn,Ba,arguments);return Yc(e,1+Jc(0,t.length-(arguments.length-1)),!0)};var Ca=function(){return qa(gn,Ua,arguments)};Oa?Oa(ir.exports,"apply",{value:Ca}):ir.exports.apply=Ca});var xn=x((X0,La)=>{"use strict";a();s();var ka=Object.prototype.toString;La.exports=function(t){var e=ka.call(t),n=e==="[object Arguments]";return n||(n=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&ka.call(t.callee)==="[object Function]"),n}});var za=x((rw,Ga)=>{"use strict";a();s();var Va;Object.keys||(dt=Object.prototype.hasOwnProperty,vn=Object.prototype.toString,Ma=xn(),wn=Object.prototype.propertyIsEnumerable,_a=!wn.call({toString:null},"toString"),$a=wn.call(function(){},"prototype"),yt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],sr=function(r){var t=r.constructor;return t&&t.prototype===r},Da={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Wa=function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!Da["$"+r]&&dt.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{sr(window[r])}catch(t){return!0}}catch(t){return!0}return!1}(),ja=function(r){if(typeof window=="undefined"||!Wa)return sr(r);try{return sr(r)}catch(t){return!1}},Va=function(t){var e=t!==null&&typeof t=="object",n=vn.call(t)==="[object Function]",i=Ma(t),o=e&&vn.call(t)==="[object String]",u=[];if(!e&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var p=$a&&n;if(o&&t.length>0&&!dt.call(t,0))for(var c=0;c<t.length;++c)u.push(String(c));if(i&&t.length>0)for(var h=0;h<t.length;++h)u.push(String(h));else for(var y in t)!(p&&y==="prototype")&&dt.call(t,y)&&u.push(String(y));if(_a)for(var g=ja(t),v=0;v<yt.length;++v)!(g&&yt[v]==="constructor")&&dt.call(t,yt[v])&&u.push(yt[v]);return u});var dt,vn,Ma,wn,_a,$a,yt,sr,Da,Wa,ja;Ga.exports=Va});var Qa=x((ow,Ja)=>{"use strict";a();s();var Qc=Array.prototype.slice,Zc=xn(),Ya=Object.keys,ur=Ya?function(t){return Ya(t)}:za(),Ha=Object.keys;ur.shim=function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=function(n){return Zc(n)?Ha(Qc.call(n)):Ha(n)})}else Object.keys=ur;return Object.keys||ur};Ja.exports=ur});var mt=x((uw,es)=>{"use strict";a();s();var Kc=Qa(),Xc=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ed=Object.prototype.toString,td=Array.prototype.concat,Za=yn(),rd=function(r){return typeof r=="function"&&ed.call(r)==="[object Function]"},Ka=hn()(),nd=function(r,t,e,n){if(t in r){if(n===!0){if(r[t]===e)return}else if(!rd(n)||!n())return}Ka?Za(r,t,e,!0):Za(r,t,e)},Xa=function(r,t){var e=arguments.length>2?arguments[2]:{},n=Kc(t);Xc&&(n=td.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)nd(r,n[i],t[n[i]],e[n[i]])};Xa.supportsDescriptors=!!Ka;es.exports=Xa});var $=x((lw,ns)=>{"use strict";a();s();var ts=G(),rs=ar(),id=rs(ts("String.prototype.indexOf"));ns.exports=function(t,e){var n=ts(t,!!e);return typeof n=="function"&&id(t,".prototype.")>-1?rs(n):n}});var as=x((yw,os)=>{"use strict";a();s();var od=G(),is=od("%Array%"),ad=!is.isArray&&$()("Object.prototype.toString");os.exports=is.isArray||function(t){return ad(t)==="[object Array]"}});var bn=x((gw,ss)=>{"use strict";a();s();ss.exports=as()});var fs=x((ww,us)=>{"use strict";a();s();var sd=G(),ud=$(),fd=C(),pd=bn(),ld=sd("%Reflect.apply%",!0)||ud("Function.prototype.apply");us.exports=function(t,e){var n=arguments.length>2?arguments[2]:[];if(!pd(n))throw new fd("Assertion failed: optional `argumentsList`, if provided, must be a List");return ld(t,e,n)}});function ps(){throw new Error("setTimeout has not been defined")}function ls(){throw new Error("clearTimeout has not been defined")}function cs(r){if(ae===setTimeout)return setTimeout(r,0);if((ae===ps||!ae)&&setTimeout)return ae=setTimeout,setTimeout(r,0);try{return ae(r,0)}catch(t){try{return ae.call(null,r,0)}catch(e){return ae.call(this,r,0)}}}function cd(r){if(se===clearTimeout)return clearTimeout(r);if((se===ls||!se)&&clearTimeout)return se=clearTimeout,clearTimeout(r);try{return se(r)}catch(t){try{return se.call(null,r)}catch(e){return se.call(this,r)}}}function dd(){!je||!Ee||(je=!1,Ee.length?K=Ee.concat(K):fr=-1,K.length&&ds())}function ds(){if(!je){var r=cs(dd);je=!0;for(var t=K.length;t;){for(Ee=K,K=[];++fr<t;)Ee&&Ee[fr].run();fr=-1,t=K.length}Ee=null,je=!1,cd(r)}}function yd(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];K.push(new ys(r,t)),K.length===1&&!je&&cs(ds)}function ys(r,t){this.fun=r,this.array=t}function Ie(){}function Od(r){throw new Error("process.binding is not supported")}function Cd(){return"/"}function Ud(r){throw new Error("process.chdir is not supported")}function Bd(){return 0}function kd(r){var t=qd.call(We)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Md(){var r=new Date,t=r-Ld;return t/1e3}var ae,se,K,je,Ee,fr,md,hd,gd,xd,vd,wd,bd,Ad,Sd,Ed,Id,Rd,Td,Pd,Nd,Fd,We,qd,Ld,_d,ht,ms=Fe(()=>{"use strict";a();s();ae=ps,se=ls;typeof globalThis.setTimeout=="function"&&(ae=setTimeout);typeof globalThis.clearTimeout=="function"&&(se=clearTimeout);K=[],je=!1,fr=-1;ys.prototype.run=function(){this.fun.apply(null,this.array)};md="browser",hd="browser",gd=!0,xd={},vd=[],wd="",bd={},Ad={},Sd={};Ed=Ie,Id=Ie,Rd=Ie,Td=Ie,Pd=Ie,Nd=Ie,Fd=Ie;We=globalThis.performance||{},qd=We.now||We.mozNow||We.msNow||We.oNow||We.webkitNow||function(){return new Date().getTime()};Ld=new Date;_d={nextTick:yd,title:md,browser:gd,env:xd,argv:vd,version:wd,versions:bd,on:Ed,addListener:Id,once:Rd,off:Td,removeListener:Pd,removeAllListeners:Nd,emit:Fd,binding:Od,cwd:Cd,chdir:Ud,umask:Bd,hrtime:kd,platform:hd,release:Ad,config:Sd,uptime:Md},ht=_d});var An,Sn,hs=Fe(()=>{"use strict";a();s();typeof Object.create=="function"?An=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:An=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t};Sn=An});var Es={};jr(Es,{_extend:()=>Cn,debuglog:()=>gs,default:()=>Jd,deprecate:()=>Pn,format:()=>dr,inherits:()=>Sn,inspect:()=>Y,isArray:()=>Nn,isBoolean:()=>yr,isBuffer:()=>bs,isDate:()=>cr,isError:()=>xt,isFunction:()=>vt,isNull:()=>wt,isNullOrUndefined:()=>xs,isNumber:()=>Fn,isObject:()=>Re,isPrimitive:()=>ws,isRegExp:()=>gt,isString:()=>bt,isSymbol:()=>vs,isUndefined:()=>z,log:()=>As});function dr(r){if(!bt(r)){for(var t=[],e=0;e<arguments.length;e++)t.push(Y(arguments[e]));return t.join(" ")}for(var e=1,n=arguments,i=n.length,o=String(r).replace($d,function(p){if(p==="%%")return"%";if(e>=i)return p;switch(p){case"%s":return String(n[e++]);case"%d":return Number(n[e++]);case"%j":try{return JSON.stringify(n[e++])}catch(c){return"[Circular]"}default:return p}}),u=n[e];e<i;u=n[++e])wt(u)||!Re(u)?o+=" "+u:o+=" "+Y(u);return o}function Pn(r,t){if(z(globalThis.process))return function(){return Pn(r,t).apply(this,arguments)};if(ht.noDeprecation===!0)return r;var e=!1;function n(){if(!e){if(ht.throwDeprecation)throw new Error(t);ht.traceDeprecation?console.trace(t):console.error(t),e=!0}return r.apply(this,arguments)}return n}function gs(r){if(z(En)&&(En=ht.env.NODE_DEBUG||""),r=r.toUpperCase(),!pr[r])if(new RegExp("\\b"+r+"\\b","i").test(En)){var t=0;pr[r]=function(){var e=dr.apply(null,arguments);console.error("%s %d: %s",r,t,e)}}else pr[r]=function(){};return pr[r]}function Y(r,t){var e={seen:[],stylize:Wd};return arguments.length>=3&&(e.depth=arguments[2]),arguments.length>=4&&(e.colors=arguments[3]),yr(t)?e.showHidden=t:t&&Cn(e,t),z(e.showHidden)&&(e.showHidden=!1),z(e.depth)&&(e.depth=2),z(e.colors)&&(e.colors=!1),z(e.customInspect)&&(e.customInspect=!0),e.colors&&(e.stylize=Dd),lr(e,r,e.depth)}function Dd(r,t){var e=Y.styles[t];return e?"\x1B["+Y.colors[e][0]+"m"+r+"\x1B["+Y.colors[e][1]+"m":r}function Wd(r,t){return r}function jd(r){var t={};return r.forEach(function(e,n){t[e]=!0}),t}function lr(r,t,e){if(r.customInspect&&t&&vt(t.inspect)&&t.inspect!==Y&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(e,r);return bt(n)||(n=lr(r,n,e)),n}var i=Vd(r,t);if(i)return i;var o=Object.keys(t),u=jd(o);if(r.showHidden&&(o=Object.getOwnPropertyNames(t)),xt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return In(t);if(o.length===0){if(vt(t)){var p=t.name?": "+t.name:"";return r.stylize("[Function"+p+"]","special")}if(gt(t))return r.stylize(RegExp.prototype.toString.call(t),"regexp");if(cr(t))return r.stylize(Date.prototype.toString.call(t),"date");if(xt(t))return In(t)}var c="",h=!1,y=["{","}"];if(Nn(t)&&(h=!0,y=["[","]"]),vt(t)){var g=t.name?": "+t.name:"";c=" [Function"+g+"]"}if(gt(t)&&(c=" "+RegExp.prototype.toString.call(t)),cr(t)&&(c=" "+Date.prototype.toUTCString.call(t)),xt(t)&&(c=" "+In(t)),o.length===0&&(!h||t.length==0))return y[0]+c+y[1];if(e<0)return gt(t)?r.stylize(RegExp.prototype.toString.call(t),"regexp"):r.stylize("[Object]","special");r.seen.push(t);var v;return h?v=Gd(r,t,e,u,o):v=o.map(function(b){return Tn(r,t,e,u,b,h)}),r.seen.pop(),zd(v,c,y)}function Vd(r,t){if(z(t))return r.stylize("undefined","undefined");if(bt(t)){var e="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(e,"string")}if(Fn(t))return r.stylize(""+t,"number");if(yr(t))return r.stylize(""+t,"boolean");if(wt(t))return r.stylize("null","null")}function In(r){return"["+Error.prototype.toString.call(r)+"]"}function Gd(r,t,e,n,i){for(var o=[],u=0,p=t.length;u<p;++u)Ss(t,String(u))?o.push(Tn(r,t,e,n,String(u),!0)):o.push("");return i.forEach(function(c){c.match(/^\d+$/)||o.push(Tn(r,t,e,n,c,!0))}),o}function Tn(r,t,e,n,i,o){var u,p,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?c.set?p=r.stylize("[Getter/Setter]","special"):p=r.stylize("[Getter]","special"):c.set&&(p=r.stylize("[Setter]","special")),Ss(n,i)||(u="["+i+"]"),p||(r.seen.indexOf(c.value)<0?(wt(e)?p=lr(r,c.value,null):p=lr(r,c.value,e-1),p.indexOf(`
2
2
  `)>-1&&(o?p=p.split(`
3
3
  `).map(function(h){return" "+h}).join(`
4
4
  `).substr(2):p=`
@@ -22,7 +22,7 @@ ${i}`);this.isAtStartOfLine()&&(o=i+o),e&&(o+=`
22
22
  `);if(u.length<=1){e.write(this.escapeString((p=u[0])!=null?p:"")),e.write('"""');return}i&&e.writeNoIndent(`\\
23
23
  `),u.forEach((c,h)=>{e.writeNoIndent(this.escapeString(c)),h===u.length-1?o&&e.writeNoIndent(`\\
24
24
  `):e.writeNoIndent(`
25
- `)}),e.writeNoIndent('"""')}escapeString(e){let n=new RegExp(`(?<!\\\\)(["'\\\\\\t\\n\\r])`,"g"),i={'"':'\\"',"'":"\\'","\\":"\\\\"," ":"\\t","\n":"\\n","\r":"\\r"};return e.replace(n,o=>{var u;return(u=i[o])!=null?u:o})}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n?"True":"False");return;case"string":e.write(`"${this.escapeString(n)}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("None");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownObject({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,u]of i)e.write(`"${o}": `),e.writeNode(r.unknown(u)),e.writeLine(",");e.dedent(),e.write("}")}};function Xg({entries:r}){return r.filter(t=>!he.isNop(t.key)&&!he.isNop(t.value))}function ex({entries:r}){return r.filter(t=>!he.isNop(t.value))}function gi({values:r}){return r.filter(t=>!he.isNop(t))}function tx(r){return new He(r)}function rx(r){return new Or(r)}function nx(r){return new ot(r)}function ix(r){return new le(r)}function ox(r){return new Qe(r)}function ax(r){return new Ke(r)}function sx(r){return new _(r)}function ux(r){return new me(r)}function fx(r){return new ce(r)}function px(r){return new ne(r)}function lx(r){return new Ze(r)}function cx(r){return new Xe(r)}function dx(r){return new et(r)}function yx(r){return new ye(r)}function mx(r){return new Je(r)}function hx(r){return new nt(r)}function gx(r){return new de(r)}function xx(r){return new rt(r)}function vx(r){return new it(r)}var wx={type:"primitive",value:"STRING"},bx=["example"],xp="client",xi="request",Ur=class{constructor({context:t}){d(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return this.buildPythonFile({endpoint:t,snippet:e}).toString()}generateSnippetSync({endpoint:t,request:e}){return this.buildPythonFile({endpoint:t,snippet:e}).toString()}buildPythonFile({endpoint:t,snippet:e}){return m.file({path:bx,statements:[this.constructClient({endpoint:t,snippet:e}),this.callMethod({endpoint:t,snippet:e})]})}constructClient({endpoint:t,snippet:e}){return m.assign({lhs:m.reference({name:xp}),rhs:m.instantiateClass({classReference:this.context.getRootClientClassReference(),arguments_:this.getConstructorArgs({endpoint:t,snippet:e}).map(n=>m.methodArgument({name:n.name,value:n.value})),multiline:!0})})}getConstructorArgs({endpoint:t,snippet:e}){let n=[],i=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return i.length>0&&n.push(...i),t.auth!=null&&(e.auth!=null?n.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:R.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(W.PathParameters),this.context.ir.pathParameters!=null&&n.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(W.Headers),this.context.ir.headers!=null&&e.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),n}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let n=this.getEnvironmentValue({baseUrl:t,environment:e});return n==null?[]:[{name:this.getEnvironmentOptionName({environment:e}),value:n}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:R.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return m.TypeInstantiation.str(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let n=this.context.getEnvironmentTypeReferenceFromID(e);if(n==null){this.context.errors.add({severity:R.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return m.TypeInstantiation.reference(n)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?m.TypeInstantiation.reference(m.instantiateClass({classReference:this.context.getEnvironmentClassReference(),arguments_:Object.entries(e).map(([n,i])=>({name:n,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:wx,value:i})})).map(n=>m.methodArgument({name:n.name,value:n.value})),multiline:!0})):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorOAuthArgs({auth:t,values:e});default:T(t)}}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:m.TypeInstantiation.str(e.username)},{name:this.context.getPropertyName(t.password),value:m.TypeInstantiation.str(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:m.TypeInstantiation.str(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:m.TypeInstantiation.str(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:m.TypeInstantiation.str(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let n=[];for(let i of t){let o=this.getConstructorHeaderArg({header:i,value:e.value});o!=null&&n.push(o)}return n}getConstructorHeaderArg({header:t,value:e}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!m.TypeInstantiation.isNop(n))return{name:this.context.getPropertyName(t.name.name),value:n}}callMethod({endpoint:t,snippet:e}){return m.invokeMethod({on:m.reference({name:xp}),method:this.getMethod({endpoint:t}),arguments_:this.getMethodArgs({endpoint:t,snippet:e}).map(n=>m.methodArgument({name:n.name,value:n.value})),multiline:!0})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:T(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){var o,u;let n=[];this.context.errors.scope(W.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(u=t.pathParameters)!=null?u:[]];return i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(W.RequestBody),t.body!=null&&n.push(...this.getBodyRequestArgs({body:t.body,value:e.requestBody})),this.context.errors.unscope(),n}getBodyRequestArgs({body:t,value:e}){switch(t.type){case"bytes":return[{name:xi,value:this.getBytesBodyRequestTypeInstantiation({value:e})}];case"typeReference":return this.getBodyRequestArgsForTypeReference({typeReference:t.value,value:e});default:T(t)}}getBodyRequestArgsForTypeReference({typeReference:t,value:e}){switch(t.type){case"named":{let n=this.context.resolveNamedType({typeId:t.value});return n==null?[]:this.getBodyRequestArgsForNamedTypeReference({typeReference:t,named:n,value:e})}case"nullable":case"optional":return this.getBodyRequestArgsForTypeReference({typeReference:t.value,value:e});case"list":case"map":case"set":case"literal":case"primitive":case"unknown":return[{name:xi,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t,value:e})}];default:T(t)}}getBodyRequestArgsForNamedTypeReference({typeReference:t,named:e,value:n}){var i;switch(e.type){case"alias":return this.getBodyRequestArgsForTypeReference({typeReference:e.typeReference,value:n});case"enum":case"discriminatedUnion":case"undiscriminatedUnion":return[{name:xi,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t,value:n})}];case"object":return this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(n))!=null?i:{}}).map(u=>({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)}));default:T(e)}}getBodyRequestArgsForBytes({body:t,value:e}){let n=this.getBytesBodyRequestTypeInstantiation({value:e});return m.TypeInstantiation.isNop(n)?[]:[{name:this.context.getPropertyName(t.bodyKey),value:n}]}getBytesBodyRequestTypeInstantiation({value:t}){return typeof t!="string"?(this.context.errors.add({severity:R.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),m.TypeInstantiation.nop()):m.TypeInstantiation.bytes(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){let n=[],i=this.context.shouldInlinePathParameters();this.context.errors.scope(W.PathParameters);let o=[];t.pathParameters!=null&&o.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(W.RequestBody);let u=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})||n.push(...o),this.context.needsRequestParameter({request:t,inlinePathParameters:i,inlineFileProperties:!0})&&n.push(...this.getInlinedRequestArgs({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})?o:[],filePropertyInfo:u})),n}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArgs({request:t,snippet:e,pathParameterFields:n,filePropertyInfo:i}){var y,g,v,b;this.context.errors.scope(W.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(y=t.queryParameters)!=null?y:[],values:(g=e.queryParameters)!=null?g:{}}).map(w=>({name:this.context.getPropertyName(w.name.name),value:this.context.dynamicTypeLiteralMapper.convert(w)}));this.context.errors.unscope(),this.context.errors.scope(W.Headers);let c=this.context.associateByWireValue({parameters:(v=t.headers)!=null?v:[],values:(b=e.headers)!=null?b:{}}).map(w=>({name:this.context.getPropertyName(w.name.name),value:this.context.dynamicTypeLiteralMapper.convert(w)}));this.context.errors.unscope(),this.context.errors.scope(W.RequestBody);let h=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),[...n,...u,...c,...h]}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:n}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return this.getReferencedRequestBodyPropertyTypeInstantiation({body:t,value:e});case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:n});default:T(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){return[...t.fileFields,...t.bodyPropertyFields]}getReferencedRequestBodyPropertyTypeInstantiation({body:t,value:e}){let n=t.bodyType;switch(n.type){case"bytes":return this.getBodyRequestArgsForBytes({body:t,value:e});case"typeReference":return this.getBodyRequestArgsForTypeReference({typeReference:n.value,value:e});default:T(n)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=this.context.getRecord(e))!=null?o:{}});for(let u of i)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getPathParameters({namedParameters:t,snippet:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=e.pathParameters)!=null?o:{},ignoreMissingParameters:!0});for(let u of i)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}getEnvironmentOptionName({environment:t}){return t!=null?"environment":"base_url"}};a();s();a();s();var Ax="value",Br=class{constructor({context:t}){d(this,"context");this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?m.TypeInstantiation.none():(this.context.errors.add({severity:R.Critical,message:"Expected non-null value, but got null"}),m.TypeInstantiation.nop());if(t.value===void 0)return m.TypeInstantiation.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value});case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?m.TypeInstantiation.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"set":return this.convertSet({set:t.typeReference.value,value:t.value});case"unknown":return m.TypeInstantiation.unknown(t.value);default:T(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.bool(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.str(n)}default:T(t)}}convertList({list:t,value:e}){return Array.isArray(e)?m.TypeInstantiation.list(e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}}),{multiline:!0}):(this.context.errors.add({severity:R.Critical,message:`Expected array but got: ${typeof e}`}),m.TypeInstantiation.nop())}convertSet({set:t,value:e}){return Array.isArray(e)?m.TypeInstantiation.set(e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}}),{multiline:!0}):(this.context.errors.add({severity:R.Critical,message:`Expected array but got: ${typeof e}`}),m.TypeInstantiation.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:R.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),m.TypeInstantiation.nop()):m.TypeInstantiation.dict(Object.entries(e).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:t.key,value:n,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}}),{multiline:!0})}convertNamed({named:t,value:e,as:n}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e});default:T(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(n==null)return m.TypeInstantiation.nop();let i=n.singleDiscriminatedUnionType,o=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:i});if(o==null)return m.TypeInstantiation.nop();let u={name:this.context.getPropertyName(t.discriminant.name),value:m.TypeInstantiation.str(i.discriminantValue.wireValue)};return m.TypeInstantiation.typedDict([u,...o],{multiline:!0})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e}){let n=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});switch(e.type){case"samePropertiesAsObject":{let i=this.context.resolveNamedType({typeId:e.typeId});if(i==null)return;let o=this.convertNamed({named:i,value:t.value});if(!o.isTypedDict()){this.context.errors.add({severity:R.Critical,message:"Internal error; expected union value to be an object"});return}let u=o.asTypedDictOrThrow();return[...n,...u.entries]}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let i=this.context.getRecord(t.value);return i==null?[...n,{name:Ax,value:this.convert({typeReference:e.typeReference,value:t.value})}]:[...n,{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:i[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return n;default:T(e)}}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(u=>{this.context.errors.scope(u.name.wireValue);try{return{name:this.context.getPropertyName(u.name.name),value:this.convert(u)}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let n=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return m.TypeInstantiation.typedDict(n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getPropertyName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}}),{multiline:!0})}convertEnum({enum_:t,value:e}){let n=this.getEnumValue({enum_:t,value:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.str(n)}getEnumValue({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:R.Critical,message:`Expected enum value string, got: ${typeof e}`});return}if(t.values.find(i=>i.wireValue===e)==null){this.context.errors.add({severity:R.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return e}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e});return n==null?m.TypeInstantiation.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e}){for(let n of t.types)try{return this.convert({typeReference:n,value:e})}catch(i){continue}this.context.errors.add({severity:R.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertPrimitive({primitive:t,value:e,as:n}){switch(t){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:n});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.int(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:n});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.bool(i)}case"BASE_64":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.str(i)}case"UUID":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.uuid(i)}case"DATE":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.date(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.datetime(i)}default:T(t)}}getValueAsNumber({value:t,as:e}){let n=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:e}){let n=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};a();s();var qr=class{constructor({context:t}){d(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(e))!=null?o:{};for(let u of t.properties)switch(u.type){case"file":{let p=this.getSingleFileProperty({property:u,record:i});if(m.TypeInstantiation.isNop(p))break;n.fileFields.push({name:this.context.getPropertyName(u.name),value:p});break}case"fileArray":{let p=this.getArrayFileProperty({property:u,record:i});if(m.TypeInstantiation.isNop(p))break;n.fileFields.push({name:this.context.getPropertyName(u.name),value:p});break}case"bodyProperty":{let p=this.getBodyProperty({property:u,record:i});if(m.TypeInstantiation.isNop(p))break;n.bodyPropertyFields.push({name:this.context.getPropertyName(u.name.name),value:p});break}default:T(u)}return n}getSingleFileProperty({property:t,record:e}){let n=this.context.getSingleFileValue({property:t,record:e});return n==null?m.TypeInstantiation.nop():this.context.getFileFromString(n)}getArrayFileProperty({property:t,record:e}){let n=this.context.getFileArrayValues({property:t,record:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.list(n.map(i=>this.context.getFileFromString(i)))}getBodyProperty({property:t,record:e}){let n=e[t.name.wireValue];return n==null?m.TypeInstantiation.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:n})}};var Sx=["list","set"],kr=class r extends Bt{constructor({ir:e,config:n}){var i;super({ir:e,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");this.ir=e,this.customConfig=(i=n.customConfig)!=null?i:{},this.dynamicTypeLiteralMapper=new Br({context:this}),this.filePropertyMapper=new qr({context:this})}clone(){return new r({ir:this.ir,config:this.config})}getClassName(e){let n=e.pascalCase.safeName,i=this.getRootClientClassName();return n===i?`${i}Model`:n}getTypedDictClassName(e){return`${this.getClassName(e)}Params`}getPropertyName(e){let n=e.snakeCase.safeName;return n.startsWith("_")?"f_"+n.substring(n.lastIndexOf("_")+1):n}getMethodName(e){return Sx.includes(e.snakeCase.unsafeName)?e.snakeCase.unsafeName:e.snakeCase.safeName}getRootClientClassReference(){return m.reference({name:this.getRootClientClassName(),modulePath:this.getRootModulePath()})}getRootClientClassName(){var e,n;return((e=this.customConfig.client)==null?void 0:e.exported_class_name)!=null?this.customConfig.client.exported_class_name:this.customConfig.client_class_name!=null?this.customConfig.client_class_name:((n=this.customConfig.client)==null?void 0:n.class_name)!=null?this.customConfig.client.class_name:this.pascalCase(this.config.organization)+this.pascalCase(this.config.workspaceName)}getEnvironmentClassName(){return`${this.getRootClientClassName()}Environment`}getEnvironmentTypeReferenceFromID(e){let n=this.resolveEnvironmentName(e);if(n!=null)return m.accessAttribute({lhs:this.getEnvironmentClassReference(),rhs:m.codeBlock(this.getEnvironmentEnumName(n))})}getEnvironmentClassReference(){return m.reference({name:this.getEnvironmentClassName(),modulePath:this.getRootModulePath()})}getEnvironmentEnumName(e){return e.screamingSnakeCase.safeName}isPrimitive(e){switch(e.type){case"primitive":return!0;case"optional":case"nullable":return this.isPrimitive(e.value);case"named":{let n=this.resolveNamedType({typeId:e.value});if(n==null)return!1;switch(n.type){case"alias":return this.isPrimitive(n.typeReference);case"discriminatedUnion":case"undiscriminatedUnion":case"object":case"enum":return!1;default:T(n)}break}case"list":case"set":case"map":case"literal":case"unknown":return!1;default:T(e)}}getFileFromString(e){return m.TypeInstantiation.str(e)}getRootModulePath(){if(this.customConfig.package_name!=null)return[this.customConfig.package_name];let e=this.cleanOrganizationName();return this.customConfig.use_api_name_in_package?[e,this.getApiName()]:[e]}getCoreModulePath(){return this.getRootModulePath().concat("core")}shouldInlinePathParameters(){return!0}cleanOrganizationName(){return this.config.organization.replace(/[^a-zA-Z0-9]/g,"_")}getApiName(){return hi(this.config.workspaceName)}pascalCase(e){let n=mi(e);return n.charAt(0).toUpperCase()+n.slice(1)}};var Lr=class extends Ot{constructor({ir:t,config:e}){super(new kr({ir:t,config:e}))}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}createSnippetGenerator(t){return new Ur({context:t})}};0&&(module.exports={DynamicSnippetsGenerator});
25
+ `)}),e.writeNoIndent('"""')}escapeString(e){let n=new RegExp(`(?<!\\\\)(["'\\\\\\t\\n\\r])`,"g"),i={'"':'\\"',"'":"\\'","\\":"\\\\"," ":"\\t","\n":"\\n","\r":"\\r"};return e.replace(n,o=>{var u;return(u=i[o])!=null?u:o})}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n?"True":"False");return;case"string":e.write(`"${this.escapeString(n)}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("None");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownObject({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,u]of i)e.write(`"${o}": `),e.writeNode(r.unknown(u)),e.writeLine(",");e.dedent(),e.write("}")}};function Xg({entries:r}){return r.filter(t=>!he.isNop(t.key)&&!he.isNop(t.value))}function ex({entries:r}){return r.filter(t=>!he.isNop(t.value))}function gi({values:r}){return r.filter(t=>!he.isNop(t))}function tx(r){return new He(r)}function rx(r){return new Or(r)}function nx(r){return new ot(r)}function ix(r){return new le(r)}function ox(r){return new Qe(r)}function ax(r){return new Ke(r)}function sx(r){return new _(r)}function ux(r){return new me(r)}function fx(r){return new ce(r)}function px(r){return new ne(r)}function lx(r){return new Ze(r)}function cx(r){return new Xe(r)}function dx(r){return new et(r)}function yx(r){return new ye(r)}function mx(r){return new Je(r)}function hx(r){return new nt(r)}function gx(r){return new de(r)}function xx(r){return new rt(r)}function vx(r){return new it(r)}var wx={type:"primitive",value:"STRING"},bx=["example"],xp="client",xi="request",Ur=class{constructor({context:t}){d(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return this.buildPythonFile({endpoint:t,snippet:e}).toString()}generateSnippetSync({endpoint:t,request:e}){return this.buildPythonFile({endpoint:t,snippet:e}).toString()}buildPythonFile({endpoint:t,snippet:e}){return m.file({path:bx,statements:[this.constructClient({endpoint:t,snippet:e}),this.callMethod({endpoint:t,snippet:e})]})}constructClient({endpoint:t,snippet:e}){return m.assign({lhs:m.reference({name:xp}),rhs:m.instantiateClass({classReference:this.context.getRootClientClassReference(),arguments_:this.getConstructorArgs({endpoint:t,snippet:e}).map(n=>m.methodArgument({name:n.name,value:n.value})),multiline:!0})})}getConstructorArgs({endpoint:t,snippet:e}){let n=[],i=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return i.length>0&&n.push(...i),t.auth!=null&&(e.auth!=null?n.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:R.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(W.PathParameters),this.context.ir.pathParameters!=null&&n.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(W.Headers),this.context.ir.headers!=null&&e.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),n}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let n=this.getEnvironmentValue({baseUrl:t,environment:e});return n==null?[]:[{name:this.getEnvironmentOptionName({environment:e}),value:n}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:R.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return m.TypeInstantiation.str(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let n=this.context.getEnvironmentTypeReferenceFromID(e);if(n==null){this.context.errors.add({severity:R.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return m.TypeInstantiation.reference(n)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?m.TypeInstantiation.reference(m.instantiateClass({classReference:this.context.getEnvironmentClassReference(),arguments_:Object.entries(e).map(([n,i])=>({name:n,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:wx,value:i})})).map(n=>m.methodArgument({name:n.name,value:n.value})),multiline:!0})):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorOAuthArgs({auth:t,values:e});default:T(t)}}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:m.TypeInstantiation.str(e.username)},{name:this.context.getPropertyName(t.password),value:m.TypeInstantiation.str(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:m.TypeInstantiation.str(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:m.TypeInstantiation.str(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:m.TypeInstantiation.str(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let n=[];for(let i of t){let o=this.getConstructorHeaderArg({header:i,value:e.value});o!=null&&n.push(o)}return n}getConstructorHeaderArg({header:t,value:e}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!m.TypeInstantiation.isNop(n))return{name:this.context.getPropertyName(t.name.name),value:n}}callMethod({endpoint:t,snippet:e}){return m.invokeMethod({on:m.reference({name:xp}),method:this.getMethod({endpoint:t}),arguments_:this.getMethodArgs({endpoint:t,snippet:e}).map(n=>m.methodArgument({name:n.name,value:n.value})),multiline:!0})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:T(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){var o,u;let n=[];this.context.errors.scope(W.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(u=t.pathParameters)!=null?u:[]];return i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(W.RequestBody),t.body!=null&&n.push(...this.getBodyRequestArgs({body:t.body,value:e.requestBody})),this.context.errors.unscope(),n}getBodyRequestArgs({body:t,value:e}){switch(t.type){case"bytes":return[{name:xi,value:this.getBytesBodyRequestTypeInstantiation({value:e})}];case"typeReference":return this.getBodyRequestArgsForTypeReference({typeReference:t.value,value:e});default:T(t)}}getBodyRequestArgsForTypeReference({typeReference:t,value:e}){switch(t.type){case"named":{let n=this.context.resolveNamedType({typeId:t.value});return n==null?[]:this.getBodyRequestArgsForNamedTypeReference({typeReference:t,named:n,value:e})}case"nullable":case"optional":return this.getBodyRequestArgsForTypeReference({typeReference:t.value,value:e});case"list":case"map":case"set":case"literal":case"primitive":case"unknown":return[{name:xi,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t,value:e})}];default:T(t)}}getBodyRequestArgsForNamedTypeReference({typeReference:t,named:e,value:n}){var i;switch(e.type){case"alias":return this.getBodyRequestArgsForTypeReference({typeReference:e.typeReference,value:n});case"enum":case"discriminatedUnion":case"undiscriminatedUnion":return[{name:xi,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t,value:n})}];case"object":return this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(n))!=null?i:{}}).map(u=>({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)}));default:T(e)}}getBodyRequestArgsForBytes({body:t,value:e}){let n=this.getBytesBodyRequestTypeInstantiation({value:e});return m.TypeInstantiation.isNop(n)?[]:[{name:this.context.getPropertyName(t.bodyKey),value:n}]}getBytesBodyRequestTypeInstantiation({value:t}){return typeof t!="string"?(this.context.errors.add({severity:R.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),m.TypeInstantiation.nop()):m.TypeInstantiation.bytes(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){let n=[],i=this.context.shouldInlinePathParameters();this.context.errors.scope(W.PathParameters);let o=[];t.pathParameters!=null&&o.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(W.RequestBody);let u=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})||n.push(...o),this.context.needsRequestParameter({request:t,inlinePathParameters:i,inlineFileProperties:!0})&&n.push(...this.getInlinedRequestArgs({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})?o:[],filePropertyInfo:u})),n}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArgs({request:t,snippet:e,pathParameterFields:n,filePropertyInfo:i}){var y,g,v,b;this.context.errors.scope(W.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(y=t.queryParameters)!=null?y:[],values:(g=e.queryParameters)!=null?g:{}}).map(w=>({name:this.context.getPropertyName(w.name.name),value:this.context.dynamicTypeLiteralMapper.convert(w)}));this.context.errors.unscope(),this.context.errors.scope(W.Headers);let c=this.context.associateByWireValue({parameters:(v=t.headers)!=null?v:[],values:(b=e.headers)!=null?b:{}}).map(w=>({name:this.context.getPropertyName(w.name.name),value:this.context.dynamicTypeLiteralMapper.convert(w)}));this.context.errors.unscope(),this.context.errors.scope(W.RequestBody);let h=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),[...n,...u,...c,...h]}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:n}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return this.getReferencedRequestBodyPropertyTypeInstantiation({body:t,value:e});case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:n});default:T(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){return[...t.fileFields,...t.bodyPropertyFields]}getReferencedRequestBodyPropertyTypeInstantiation({body:t,value:e}){let n=t.bodyType;switch(n.type){case"bytes":return this.getBodyRequestArgsForBytes({body:t,value:e});case"typeReference":return this.getBodyRequestArgsForTypeReference({typeReference:n.value,value:e});default:T(n)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=this.context.getRecord(e))!=null?o:{}});for(let u of i)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getPathParameters({namedParameters:t,snippet:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=e.pathParameters)!=null?o:{},ignoreMissingParameters:!0});for(let u of i)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}getEnvironmentOptionName({environment:t}){return t!=null?"environment":"base_url"}};a();s();a();s();var Ax="value",Br=class{constructor({context:t}){d(this,"context");this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?m.TypeInstantiation.none():(this.context.errors.add({severity:R.Critical,message:"Expected non-null value, but got null"}),m.TypeInstantiation.nop());if(t.value===void 0)return m.TypeInstantiation.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value});case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?m.TypeInstantiation.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"set":return this.convertSet({set:t.typeReference.value,value:t.value});case"unknown":return m.TypeInstantiation.unknown(t.value);default:T(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.bool(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.str(n)}default:T(t)}}convertList({list:t,value:e}){return Array.isArray(e)?m.TypeInstantiation.list(e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}}),{multiline:!0}):(this.context.errors.add({severity:R.Critical,message:`Expected array but got: ${typeof e}`}),m.TypeInstantiation.nop())}convertSet({set:t,value:e}){return Array.isArray(e)?m.TypeInstantiation.set(e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}}),{multiline:!0}):(this.context.errors.add({severity:R.Critical,message:`Expected array but got: ${typeof e}`}),m.TypeInstantiation.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:R.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),m.TypeInstantiation.nop()):m.TypeInstantiation.dict(Object.entries(e).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:t.key,value:n,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}}),{multiline:!0})}convertNamed({named:t,value:e,as:n}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e});default:T(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(n==null)return m.TypeInstantiation.nop();let i=n.singleDiscriminatedUnionType,o=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:i});if(o==null)return m.TypeInstantiation.nop();let u={name:this.context.getPropertyName(t.discriminant.name),value:m.TypeInstantiation.str(i.discriminantValue.wireValue)};return m.TypeInstantiation.typedDict([u,...o],{multiline:!0})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e}){let n=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});switch(e.type){case"samePropertiesAsObject":{let i=this.context.resolveNamedType({typeId:e.typeId});if(i==null)return;let o=this.convertNamed({named:i,value:t.value});if(!o.isTypedDict()){this.context.errors.add({severity:R.Critical,message:"Internal error; expected union value to be an object"});return}let u=o.asTypedDictOrThrow();return[...n,...u.entries]}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let i=this.context.getRecord(t.value);return i==null?[...n,{name:Ax,value:this.convert({typeReference:e.typeReference,value:t.value})}]:[...n,{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:i[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return n;default:T(e)}}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(u=>{this.context.errors.scope(u.name.wireValue);try{return{name:this.context.getPropertyName(u.name.name),value:this.convert(u)}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let n=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return m.TypeInstantiation.typedDict(n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getPropertyName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}}),{multiline:!0})}convertEnum({enum_:t,value:e}){let n=this.getEnumValue({enum_:t,value:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.str(n)}getEnumValue({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:R.Critical,message:`Expected enum value string, got: ${typeof e}`});return}if(t.values.find(i=>i.wireValue===e)==null){this.context.errors.add({severity:R.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return e}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e});return n==null?m.TypeInstantiation.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e}){for(let n of t.types)try{return this.convert({typeReference:n,value:e})}catch(i){continue}this.context.errors.add({severity:R.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertPrimitive({primitive:t,value:e,as:n}){switch(t){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:n});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.int(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:n});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.bool(i)}case"BASE_64":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.str(i)}case"UUID":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.uuid(i)}case"DATE":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.date(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.datetime(i)}default:T(t)}}getValueAsNumber({value:t,as:e}){let n=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:e}){let n=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};a();s();var qr=class{constructor({context:t}){d(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(e))!=null?o:{};for(let u of t.properties)switch(u.type){case"file":{let p=this.getSingleFileProperty({property:u,record:i});if(m.TypeInstantiation.isNop(p))break;n.fileFields.push({name:this.context.getPropertyName(u.name),value:p});break}case"fileArray":{let p=this.getArrayFileProperty({property:u,record:i});if(m.TypeInstantiation.isNop(p))break;n.fileFields.push({name:this.context.getPropertyName(u.name),value:p});break}case"bodyProperty":{let p=this.getBodyProperty({property:u,record:i});if(m.TypeInstantiation.isNop(p))break;n.bodyPropertyFields.push({name:this.context.getPropertyName(u.name.name),value:p});break}default:T(u)}return n}getSingleFileProperty({property:t,record:e}){let n=this.context.getSingleFileValue({property:t,record:e});return n==null?m.TypeInstantiation.nop():this.context.getFileFromString(n)}getArrayFileProperty({property:t,record:e}){let n=this.context.getFileArrayValues({property:t,record:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.list(n.map(i=>this.context.getFileFromString(i)))}getBodyProperty({property:t,record:e}){let n=e[t.name.wireValue];return n==null?m.TypeInstantiation.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:n})}};var Sx=["list","set"],kr=class r extends Bt{constructor({ir:e,config:n}){var i;super({ir:e,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");this.ir=e,this.customConfig=(i=n.customConfig)!=null?i:{},this.dynamicTypeLiteralMapper=new Br({context:this}),this.filePropertyMapper=new qr({context:this})}clone(){return new r({ir:this.ir,config:this.config})}getClassName(e){let n=e.pascalCase.safeName,i=this.getRootClientClassName();return n===i?`${i}Model`:n}getTypedDictClassName(e){return`${this.getClassName(e)}Params`}getPropertyName(e){let n=e.snakeCase.safeName;return n.startsWith("_")?"f_"+n.substring(n.lastIndexOf("_")+1):n}getMethodName(e){return Sx.includes(e.snakeCase.unsafeName)?e.snakeCase.unsafeName:e.snakeCase.safeName}getRootClientClassReference(){return m.reference({name:this.getRootClientClassName(),modulePath:this.getRootModulePath()})}getRootClientClassName(){var e,n;return((e=this.customConfig.client)==null?void 0:e.exported_class_name)!=null?this.customConfig.client.exported_class_name:this.customConfig.client_class_name!=null?this.customConfig.client_class_name:((n=this.customConfig.client)==null?void 0:n.class_name)!=null?this.customConfig.client.class_name:this.pascalCase(this.config.organization)+this.pascalCase(this.config.workspaceName)}getEnvironmentClassName(){return`${this.getRootClientClassName()}Environment`}getEnvironmentTypeReferenceFromID(e){let n=this.resolveEnvironmentName(e);if(n!=null)return m.accessAttribute({lhs:this.getEnvironmentClassReference(),rhs:m.codeBlock(this.getEnvironmentEnumName(n))})}getEnvironmentClassReference(){return m.reference({name:this.getEnvironmentClassName(),modulePath:this.getEnvironmentModulePath()})}getEnvironmentEnumName(e){return e.screamingSnakeCase.safeName}isPrimitive(e){switch(e.type){case"primitive":return!0;case"optional":case"nullable":return this.isPrimitive(e.value);case"named":{let n=this.resolveNamedType({typeId:e.value});if(n==null)return!1;switch(n.type){case"alias":return this.isPrimitive(n.typeReference);case"discriminatedUnion":case"undiscriminatedUnion":case"object":case"enum":return!1;default:T(n)}break}case"list":case"set":case"map":case"literal":case"unknown":return!1;default:T(e)}}getFileFromString(e){return m.TypeInstantiation.str(e)}getRootModulePath(){if(this.customConfig.package_name!=null)return[this.customConfig.package_name];let e=this.cleanOrganizationName();return this.customConfig.use_api_name_in_package?[e,this.getApiName()]:[e]}getCoreModulePath(){return this.getRootModulePath().concat("core")}getEnvironmentModulePath(){return this.getRootModulePath().concat("environment")}shouldInlinePathParameters(){return!0}cleanOrganizationName(){return this.config.organization.replace(/[^a-zA-Z0-9]/g,"_")}getApiName(){return hi(this.config.workspaceName)}pascalCase(e){let n=mi(e);return n.charAt(0).toUpperCase()+n.slice(1)}};var Lr=class extends Ot{constructor({ir:t,config:e}){super(new kr({ir:t,config:e}))}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}createSnippetGenerator(t){return new Ur({context:t})}};0&&(module.exports={DynamicSnippetsGenerator});
26
26
  /*! Bundled license information:
27
27
 
28
28
  @esbuild-plugins/node-globals-polyfill/Buffer.js:
package/cjs/index.d.cts CHANGED
@@ -2,6 +2,6 @@ export { DynamicSnippetsGenerator } from './DynamicSnippetsGenerator.cjs';
2
2
  import '@fern-api/browser-compatible-base-generator';
3
3
  import '@fern-api/dynamic-ir-sdk';
4
4
  import './EndpointSnippetGenerator.cjs';
5
- import './DynamicSnippetsGeneratorContext-aXWxVpwD.cjs';
5
+ import './DynamicSnippetsGeneratorContext-4_I0JAlU.cjs';
6
6
  import '@fern-api/python-ast';
7
7
  import '@fern-api/python-browser-compatible-base';
@@ -1,7 +1,7 @@
1
1
  import { AbstractDynamicSnippetsGenerator, FernGeneratorExec } from '@fern-api/browser-compatible-base-generator';
2
2
  import { FernIr } from '@fern-api/dynamic-ir-sdk';
3
3
  import { EndpointSnippetGenerator } from './EndpointSnippetGenerator.js';
4
- import { D as DynamicSnippetsGeneratorContext } from './DynamicSnippetsGeneratorContext-aXWxVpwD.js';
4
+ import { D as DynamicSnippetsGeneratorContext } from './DynamicSnippetsGeneratorContext-4_I0JAlU.js';
5
5
  import '@fern-api/python-ast';
6
6
  import '@fern-api/python-browser-compatible-base';
7
7
 
@@ -1 +1 @@
1
- import{a}from"./chunk-ZMJ4WKFB.js";import"./chunk-IM4ZUKD4.js";import"./chunk-OCJMJMBV.js";import"./chunk-BVS32MTY.js";import"./chunk-EX7EKKG4.js";import"./chunk-LKHXBDU2.js";import"./chunk-NPWTXI2T.js";export{a as DynamicSnippetsGenerator};
1
+ import{a}from"./chunk-LZ7Y5YRK.js";import"./chunk-IM4ZUKD4.js";import"./chunk-EBPBFF5C.js";import"./chunk-BVS32MTY.js";import"./chunk-EX7EKKG4.js";import"./chunk-LKHXBDU2.js";import"./chunk-NPWTXI2T.js";export{a as DynamicSnippetsGenerator};
@@ -77,6 +77,7 @@ declare class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGen
77
77
  getFileFromString(content: string): python.TypeInstantiation;
78
78
  getRootModulePath(): string[];
79
79
  getCoreModulePath(): string[];
80
+ getEnvironmentModulePath(): string[];
80
81
  shouldInlinePathParameters(): boolean;
81
82
  private cleanOrganizationName;
82
83
  private getApiName;
@@ -1,5 +1,5 @@
1
1
  import { FernIr } from '@fern-api/dynamic-ir-sdk';
2
- import { D as DynamicSnippetsGeneratorContext } from './DynamicSnippetsGeneratorContext-aXWxVpwD.js';
2
+ import { D as DynamicSnippetsGeneratorContext } from './DynamicSnippetsGeneratorContext-4_I0JAlU.js';
3
3
  import '@fern-api/browser-compatible-base-generator';
4
4
  import '@fern-api/python-ast';
5
5
  import '@fern-api/python-browser-compatible-base';