@fern-api/php-dynamic-snippets 0.0.5 → 0.0.6
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/DynamicSnippetsGenerator.cjs +16 -15
- package/cjs/DynamicSnippetsGenerator.cjs.map +1 -0
- package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
- package/cjs/EndpointSnippetGenerator.cjs +27 -15
- package/cjs/EndpointSnippetGenerator.cjs.map +1 -0
- package/cjs/EndpointSnippetGenerator.d.cts +2 -0
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +15 -14
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -0
- package/cjs/context/DynamicTypeLiteralMapper.cjs +26 -14
- package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -0
- package/cjs/context/FilePropertyMapper.cjs +26 -14
- package/cjs/context/FilePropertyMapper.cjs.map +1 -0
- package/cjs/index.cjs +28 -27
- package/cjs/index.cjs.map +1 -0
- package/cjs/index.d.cts +1 -1
- package/esm/DynamicSnippetsGenerator.d.ts +1 -1
- package/esm/DynamicSnippetsGenerator.js +2 -1
- package/esm/DynamicSnippetsGenerator.js.map +1 -0
- package/esm/EndpointSnippetGenerator.d.ts +2 -0
- package/esm/EndpointSnippetGenerator.js +2 -1
- package/esm/EndpointSnippetGenerator.js.map +1 -0
- package/esm/{chunk-NXBUWG6C.js → chunk-625QSFAH.js} +2 -1
- package/esm/chunk-625QSFAH.js.map +1 -0
- package/esm/chunk-7MI6WLZG.js +2 -0
- package/esm/chunk-7MI6WLZG.js.map +1 -0
- package/esm/chunk-BYNT7UJT.js +2 -0
- package/esm/chunk-BYNT7UJT.js.map +1 -0
- package/esm/chunk-J4Y3S6QS.js +40 -0
- package/esm/chunk-J4Y3S6QS.js.map +1 -0
- package/esm/{chunk-2MVLIJOX.js → chunk-KU3OGJUU.js} +2 -1
- package/esm/chunk-KU3OGJUU.js.map +1 -0
- package/esm/chunk-YKXTGZL6.js +4 -0
- package/esm/chunk-YKXTGZL6.js.map +1 -0
- package/esm/chunk-ZYT6M32A.js +2 -0
- package/esm/chunk-ZYT6M32A.js.map +1 -0
- package/esm/context/DynamicSnippetsGeneratorContext.js +2 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js.map +1 -0
- package/esm/context/DynamicTypeLiteralMapper.js +2 -1
- package/esm/context/DynamicTypeLiteralMapper.js.map +1 -0
- package/esm/context/FilePropertyMapper.js +2 -1
- package/esm/context/FilePropertyMapper.js.map +1 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +12 -11
- package/esm/index.js.map +1 -0
- package/package.json +1 -1
- package/esm/chunk-6U4ZJ2VA.js +0 -14
- package/esm/chunk-AEXR2D5H.js +0 -1
- package/esm/chunk-ESPGWZRY.js +0 -3
- package/esm/chunk-H4KXMOP7.js +0 -1
- package/esm/chunk-JCUQ3FQP.js +0 -28
package/cjs/index.cjs
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";var Cf=Object.create;var cr=Object.defineProperty,Ff=Object.defineProperties,Of=Object.getOwnPropertyDescriptor,Lf=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertyNames,Gr=Object.getOwnPropertySymbols,Uf=Object.getPrototypeOf,zt=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable;var Vt=(t,r,e)=>r in t?cr(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,je=(t,r)=>{for(var e in r||(r={}))zt.call(r,e)&&Vt(t,e,r[e]);if(Gr)for(var e of Gr(r))Eo.call(r,e)&&Vt(t,e,r[e]);return t},Ge=(t,r)=>Ff(t,Lf(r));var Ro=t=>typeof t=="symbol"?t:t+"",Po=(t,r)=>{var e={};for(var n in t)zt.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&Gr)for(var n of Gr(t))r.indexOf(n)<0&&Eo.call(t,n)&&(e[n]=t[n]);return e};var Ve=(t,r)=>()=>(t&&(r=t(t=0)),r);var h=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),Yt=(t,r)=>{for(var e in r)cr(t,e,{get:r[e],enumerable:!0})},Io=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Bf(r))!zt.call(t,o)&&o!==e&&cr(t,o,{get:()=>r[o],enumerable:!(n=Of(r,o))||n.enumerable});return t};var qf=(t,r,e)=>(e=t!=null?Cf(Uf(t)):{},Io(r||!t||!t.__esModule?cr(e,"default",{value:t,enumerable:!0}):e,t)),No=t=>Io(cr({},"__esModule",{value:!0}),t);var d=(t,r,e)=>Vt(t,typeof r!="symbol"?r+"":r,e);function Fo(){throw new Error("setTimeout has not been defined")}function Oo(){throw new Error("clearTimeout has not been defined")}function Lo(t){if(ce===setTimeout)return setTimeout(t,0);if((ce===Fo||!ce)&&setTimeout)return ce=setTimeout,setTimeout(t,0);try{return ce(t,0)}catch(r){try{return ce.call(null,t,0)}catch(e){return ce.call(this,t,0)}}}function $f(t){if(de===clearTimeout)return clearTimeout(t);if((de===Oo||!de)&&clearTimeout)return de=clearTimeout,clearTimeout(t);try{return de(t)}catch(r){try{return de.call(null,t)}catch(e){return de.call(this,t)}}}function kf(){!Ye||!Se||(Ye=!1,Se.length?ee=Se.concat(ee):Vr=-1,ee.length&&Bo())}function Bo(){if(!Ye){var t=Lo(kf);Ye=!0;for(var r=ee.length;r;){for(Se=ee,ee=[];++Vr<r;)Se&&Se[Vr].run();Vr=-1,r=ee.length}Se=null,Ye=!1,$f(t)}}function _f(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];ee.push(new Uo(t,r)),ee.length===1&&!Ye&&Lo(Bo)}function Uo(t,r){this.fun=t,this.array=r}function Te(){}function tl(t){throw new Error("process.binding is not supported")}function nl(){return"/"}function ol(t){throw new Error("process.chdir is not supported")}function il(){return 0}function sl(t){var r=al.call(ze)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}function pl(){var t=new Date,r=t-ul;return r/1e3}var ce,de,ee,Ye,Se,Vr,Mf,Df,Wf,jf,Gf,Vf,zf,Yf,Hf,Jf,Kf,Zf,Qf,Xf,el,rl,ze,al,ul,l,Co,a=Ve(()=>{"use strict";ce=Fo,de=Oo;typeof globalThis.setTimeout=="function"&&(ce=setTimeout);typeof globalThis.clearTimeout=="function"&&(de=clearTimeout);ee=[],Ye=!1,Vr=-1;Uo.prototype.run=function(){this.fun.apply(null,this.array)};Mf="browser",Df="browser",Wf=!0,jf={},Gf=[],Vf="",zf={},Yf={},Hf={};Jf=Te,Kf=Te,Zf=Te,Qf=Te,Xf=Te,el=Te,rl=Te;ze=globalThis.performance||{},al=ze.now||ze.mozNow||ze.msNow||ze.oNow||ze.webkitNow||function(){return new Date().getTime()};ul=new Date;l={nextTick:_f,title:Mf,browser:Wf,env:jf,argv:Gf,version:Vf,versions:zf,on:Jf,addListener:Kf,once:Zf,off:Qf,removeListener:Xf,removeAllListeners:el,emit:rl,binding:tl,cwd:nl,chdir:ol,umask:il,hrtime:sl,platform:Df,release:Yf,config:Hf,uptime:pl},Co={};Object.keys(Co).forEach(t=>{let r=t.split("."),e=l;for(let n=0;n<r.length;n++){let o=r[n];n===r.length-1?e[o]=Co[t]:e=e[o]||(e[o]={})}})});function _o(){Jt=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)j[r]=t[r],_[t.charCodeAt(r)]=r;_[45]=62,_[95]=63}function ll(t){Jt||_o();var r,e,n,o,i,u,f=t.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=t[f-2]==="="?2:t[f-1]==="="?1:0,u=new fl(f*3/4-i),n=i>0?f-4:f;var c=0;for(r=0,e=0;r<n;r+=4,e+=3)o=_[t.charCodeAt(r)]<<18|_[t.charCodeAt(r+1)]<<12|_[t.charCodeAt(r+2)]<<6|_[t.charCodeAt(r+3)],u[c++]=o>>16&255,u[c++]=o>>8&255,u[c++]=o&255;return i===2?(o=_[t.charCodeAt(r)]<<2|_[t.charCodeAt(r+1)]>>4,u[c++]=o&255):i===1&&(o=_[t.charCodeAt(r)]<<10|_[t.charCodeAt(r+1)]<<4|_[t.charCodeAt(r+2)]>>2,u[c++]=o>>8&255,u[c++]=o&255),u}function cl(t){return j[t>>18&63]+j[t>>12&63]+j[t>>6&63]+j[t&63]}function dl(t,r,e){for(var n,o=[],i=r;i<e;i+=3)n=(t[i]<<16)+(t[i+1]<<8)+t[i+2],o.push(cl(n));return o.join("")}function qo(t){Jt||_o();for(var r,e=t.length,n=e%3,o="",i=[],u=16383,f=0,c=e-n;f<c;f+=u)i.push(dl(t,f,f+u>c?c:f+u));return n===1?(r=t[e-1],o+=j[r>>2],o+=j[r<<4&63],o+="=="):n===2&&(r=(t[e-2]<<8)+t[e-1],o+=j[r>>10],o+=j[r>>4&63],o+=j[r<<2&63],o+="="),i.push(o),i.join("")}function zr(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function re(t,r){if(zr()<r)throw new RangeError("Invalid typed array length");return p.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=p.prototype):(t===null&&(t=new p(r)),t.length=r),t}function p(t,r,e){if(!p.TYPED_ARRAY_SUPPORT&&!(this instanceof p))return new p(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return Kt(this,t)}return Mo(this,t,r,e)}function Mo(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&r instanceof ArrayBuffer?hl(t,r,e,n):typeof r=="string"?ml(t,r,e):gl(t,r)}function Do(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function yl(t,r,e,n){return Do(r),r<=0?re(t,r):e!==void 0?typeof n=="string"?re(t,r).fill(e,n):re(t,r).fill(e):re(t,r)}function Kt(t,r){if(Do(r),t=re(t,r<0?0:Zt(r)|0),!p.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function ml(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!p.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Wo(r,e)|0;t=re(t,n);var o=t.write(r,e);return o!==n&&(t=t.slice(0,o)),t}function Ht(t,r){var e=r.length<0?0:Zt(r.length)|0;t=re(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function hl(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),p.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=p.prototype):t=Ht(t,r),t}function gl(t,r){if(G(r)){var e=Zt(r.length)|0;return t=re(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer!="undefined"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||ql(r.length)?re(t,0):Ht(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return Ht(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Zt(t){if(t>=zr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zr().toString(16)+" bytes");return t|0}function G(t){return!!(t!=null&&t._isBuffer)}function Wo(t,r){if(G(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Yr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Jo(t).length;default:if(n)return Yr(t).length;r=(""+r).toLowerCase(),n=!0}}function xl(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return Il(this,r,e);case"utf8":case"utf-8":return Vo(this,r,e);case"ascii":return Rl(this,r,e);case"latin1":case"binary":return Pl(this,r,e);case"base64":return Tl(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nl(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Ee(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function jo(t,r,e,n,o){if(t.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=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0)if(o)e=0;else return-1;if(typeof r=="string"&&(r=p.from(r,n)),G(r))return r.length===0?-1:$o(t,r,e,n,o);if(typeof r=="number")return r=r&255,p.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):$o(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function $o(t,r,e,n,o){var i=1,u=t.length,f=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;i=2,u/=2,f/=2,e/=2}function c(b,E){return i===1?b[E]:b.readUInt16BE(E*i)}var y;if(o){var m=-1;for(y=e;y<u;y++)if(c(t,y)===c(r,m===-1?0:y-m)){if(m===-1&&(m=y),y-m+1===f)return m*i}else m!==-1&&(y-=y-m),m=-1}else for(e+f>u&&(e=u-f),y=e;y>=0;y--){for(var g=!0,v=0;v<f;v++)if(c(t,y+v)!==c(r,v)){g=!1;break}if(g)return y}return-1}function vl(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n),n>o&&(n=o)):n=o;var i=r.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(u*2,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function wl(t,r,e,n){return Kr(Yr(r,t.length-e),t,e,n)}function Go(t,r,e,n){return Kr(Bl(r),t,e,n)}function bl(t,r,e,n){return Go(t,r,e,n)}function Al(t,r,e,n){return Kr(Jo(r),t,e,n)}function Sl(t,r,e,n){return Kr(Ul(r,t.length-e),t,e,n)}function Tl(t,r,e){return r===0&&e===t.length?qo(t):qo(t.slice(r,e))}function Vo(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i=t[o],u=null,f=i>239?4:i>223?3:i>191?2:1;if(o+f<=e){var c,y,m,g;switch(f){case 1:i<128&&(u=i);break;case 2:c=t[o+1],(c&192)===128&&(g=(i&31)<<6|c&63,g>127&&(u=g));break;case 3:c=t[o+1],y=t[o+2],(c&192)===128&&(y&192)===128&&(g=(i&15)<<12|(c&63)<<6|y&63,g>2047&&(g<55296||g>57343)&&(u=g));break;case 4:c=t[o+1],y=t[o+2],m=t[o+3],(c&192)===128&&(y&192)===128&&(m&192)===128&&(g=(i&15)<<18|(c&63)<<12|(y&63)<<6|m&63,g>65535&&g<1114112&&(u=g))}}u===null?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),o+=f}return El(n)}function El(t){var r=t.length;if(r<=ko)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=ko));return e}function Rl(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]&127);return n}function Pl(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function Il(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=Ll(t[i]);return o}function Nl(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}function N(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function q(t,r,e,n,o,i){if(!G(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function Hr(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o<i;++o)t[e+o]=(r&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function Jr(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o<i;++o)t[e+o]=r>>>(n?o:3-o)*8&255}function zo(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Yo(t,r,e,n,o){return o||zo(t,r,e,4,34028234663852886e22,-34028234663852886e22),Zo(t,r,e,n,23,4),e+4}function Ho(t,r,e,n,o){return o||zo(t,r,e,8,17976931348623157e292,-17976931348623157e292),Zo(t,r,e,n,52,8),e+8}function Fl(t){if(t=Ol(t).replace(Cl,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Ol(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ll(t){return t<16?"0"+t.toString(16):t.toString(16)}function Yr(t,r){r=r||1/0;for(var e,n=t.length,o=null,i=[],u=0;u<n;++u){if(e=t.charCodeAt(u),e>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=(o-55296<<10|e-56320)+65536}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return i}function Bl(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function Ul(t,r){for(var e,n,o,i=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,o=e%256,i.push(o),i.push(n);return i}function Jo(t){return ll(Fl(t))}function Kr(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function ql(t){return t!==t}function $l(t){return t!=null&&(!!t._isBuffer||Ko(t)||kl(t))}function Ko(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function kl(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Ko(t.slice(0,0))}function Zr(t,r,e,n,o){var i,u,f=o*8-n-1,c=(1<<f)-1,y=c>>1,m=-7,g=e?o-1:0,v=e?-1:1,b=t[r+g];for(g+=v,i=b&(1<<-m)-1,b>>=-m,m+=f;m>0;i=i*256+t[r+g],g+=v,m-=8);for(u=i&(1<<-m)-1,i>>=-m,m+=n;m>0;u=u*256+t[r+g],g+=v,m-=8);if(i===0)i=1-y;else{if(i===c)return u?NaN:(b?-1:1)*(1/0);u=u+Math.pow(2,n),i=i-y}return(b?-1:1)*u*Math.pow(2,i-n)}function Zo(t,r,e,n,o,i){var u,f,c,y=i*8-o-1,m=(1<<y)-1,g=m>>1,v=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:i-1,E=n?1:-1,P=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=m):(u=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+g>=1?r+=v/c:r+=v*Math.pow(2,1-g),r*c>=2&&(u++,c/=2),u+g>=m?(f=0,u=m):u+g>=1?(f=(r*c-1)*Math.pow(2,o),u=u+g):(f=r*Math.pow(2,g-1)*Math.pow(2,o),u=0));o>=8;t[e+b]=f&255,b+=E,f/=256,o-=8);for(u=u<<o|f,y+=o;y>0;t[e+b]=u&255,b+=E,u/=256,y-=8);t[e+b-E]|=P*128}var j,_,fl,Jt,ko,Cl,Qo=Ve(()=>{"use strict";a();s();j=[],_=[],fl=typeof Uint8Array!="undefined"?Uint8Array:Array,Jt=!1;p.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;p.poolSize=8192;p._augment=function(t){return t.__proto__=p.prototype,t};p.from=function(t,r,e){return Mo(null,t,r,e)};p.kMaxLength=zr();p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&p[Symbol.species]);p.alloc=function(t,r,e){return yl(null,t,r,e)};p.allocUnsafe=function(t){return Kt(null,t)};p.allocUnsafeSlow=function(t){return Kt(null,t)};p.isBuffer=$l;p.compare=function(r,e){if(!G(r)||!G(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,o=e.length,i=0,u=Math.min(n,o);i<u;++i)if(r[i]!==e[i]){n=r[i],o=e[i];break}return n<o?-1:o<n?1:0};p.isEncoding=function(r){switch(String(r).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}};p.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return p.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var o=p.allocUnsafe(e),i=0;for(n=0;n<r.length;++n){var u=r[n];if(!G(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(o,i),i+=u.length}return o};p.byteLength=Wo;p.prototype._isBuffer=!0;p.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)Ee(this,e,e+1);return this};p.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)Ee(this,e,e+3),Ee(this,e+1,e+2);return this};p.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)Ee(this,e,e+7),Ee(this,e+1,e+6),Ee(this,e+2,e+5),Ee(this,e+3,e+4);return this};p.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?Vo(this,0,r):xl.apply(this,arguments)};p.prototype.equals=function(r){if(!G(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:p.compare(this,r)===0};p.prototype.compare=function(r,e,n,o,i){if(!G(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),e<0||n>r.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&e>=n)return 0;if(o>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,o>>>=0,i>>>=0,this===r)return 0;for(var u=i-o,f=n-e,c=Math.min(u,f),y=this.slice(o,i),m=r.slice(e,n),g=0;g<c;++g)if(y[g]!==m[g]){u=y[g],f=m[g];break}return u<f?-1:f<u?1:0};p.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};p.prototype.indexOf=function(r,e,n){return jo(this,r,e,n,!0)};p.prototype.lastIndexOf=function(r,e,n){return jo(this,r,e,n,!1)};p.prototype.write=function(r,e,n,o){if(e===void 0)o="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")o=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-e;if((n===void 0||n>i)&&(n=i),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var u=!1;;)switch(o){case"hex":return vl(this,r,e,n);case"utf8":case"utf-8":return wl(this,r,e,n);case"ascii":return Go(this,r,e,n);case"latin1":case"binary":return bl(this,r,e,n);case"base64":return Al(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sl(this,r,e,n);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}};p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ko=4096;p.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var o;if(p.TYPED_ARRAY_SUPPORT)o=this.subarray(r,e),o.__proto__=p.prototype;else{var i=e-r;o=new p(i,void 0);for(var u=0;u<i;++u)o[u]=this[u+r]}return o};p.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||N(r,e,this.length);for(var o=this[r],i=1,u=0;++u<e&&(i*=256);)o+=this[r+u]*i;return o};p.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||N(r,e,this.length);for(var o=this[r+--e],i=1;e>0&&(i*=256);)o+=this[r+--e]*i;return o};p.prototype.readUInt8=function(r,e){return e||N(r,1,this.length),this[r]};p.prototype.readUInt16LE=function(r,e){return e||N(r,2,this.length),this[r]|this[r+1]<<8};p.prototype.readUInt16BE=function(r,e){return e||N(r,2,this.length),this[r]<<8|this[r+1]};p.prototype.readUInt32LE=function(r,e){return e||N(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};p.prototype.readUInt32BE=function(r,e){return e||N(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};p.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||N(r,e,this.length);for(var o=this[r],i=1,u=0;++u<e&&(i*=256);)o+=this[r+u]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o};p.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||N(r,e,this.length);for(var o=e,i=1,u=this[r+--o];o>0&&(i*=256);)u+=this[r+--o]*i;return i*=128,u>=i&&(u-=Math.pow(2,8*e)),u};p.prototype.readInt8=function(r,e){return e||N(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};p.prototype.readInt16LE=function(r,e){e||N(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};p.prototype.readInt16BE=function(r,e){e||N(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};p.prototype.readInt32LE=function(r,e){return e||N(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};p.prototype.readInt32BE=function(r,e){return e||N(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};p.prototype.readFloatLE=function(r,e){return e||N(r,4,this.length),Zr(this,r,!0,23,4)};p.prototype.readFloatBE=function(r,e){return e||N(r,4,this.length),Zr(this,r,!1,23,4)};p.prototype.readDoubleLE=function(r,e){return e||N(r,8,this.length),Zr(this,r,!0,52,8)};p.prototype.readDoubleBE=function(r,e){return e||N(r,8,this.length),Zr(this,r,!1,52,8)};p.prototype.writeUIntLE=function(r,e,n,o){if(r=+r,e=e|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;q(this,r,e,n,i,0)}var u=1,f=0;for(this[e]=r&255;++f<n&&(u*=256);)this[e+f]=r/u&255;return e+n};p.prototype.writeUIntBE=function(r,e,n,o){if(r=+r,e=e|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;q(this,r,e,n,i,0)}var u=n-1,f=1;for(this[e+u]=r&255;--u>=0&&(f*=256);)this[e+u]=r/f&255;return e+n};p.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,1,255,0),p.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};p.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):Hr(this,r,e,!0),e+2};p.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):Hr(this,r,e,!1),e+2};p.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):Jr(this,r,e,!0),e+4};p.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Jr(this,r,e,!1),e+4};p.prototype.writeIntLE=function(r,e,n,o){if(r=+r,e=e|0,!o){var i=Math.pow(2,8*n-1);q(this,r,e,n,i-1,-i)}var u=0,f=1,c=0;for(this[e]=r&255;++u<n&&(f*=256);)r<0&&c===0&&this[e+u-1]!==0&&(c=1),this[e+u]=(r/f>>0)-c&255;return e+n};p.prototype.writeIntBE=function(r,e,n,o){if(r=+r,e=e|0,!o){var i=Math.pow(2,8*n-1);q(this,r,e,n,i-1,-i)}var u=n-1,f=1,c=0;for(this[e+u]=r&255;--u>=0&&(f*=256);)r<0&&c===0&&this[e+u+1]!==0&&(c=1),this[e+u]=(r/f>>0)-c&255;return e+n};p.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,1,127,-128),p.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};p.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):Hr(this,r,e,!0),e+2};p.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):Hr(this,r,e,!1),e+2};p.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):Jr(this,r,e,!0),e+4};p.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),p.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Jr(this,r,e,!1),e+4};p.prototype.writeFloatLE=function(r,e,n){return Yo(this,r,e,!0,n)};p.prototype.writeFloatBE=function(r,e,n){return Yo(this,r,e,!1,n)};p.prototype.writeDoubleLE=function(r,e,n){return Ho(this,r,e,!0,n)};p.prototype.writeDoubleBE=function(r,e,n){return Ho(this,r,e,!1,n)};p.prototype.copy=function(r,e,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),e>=r.length&&(e=r.length),e||(e=0),o>0&&o<n&&(o=n),o===n||r.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(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),r.length-e<o-n&&(o=r.length-e+n);var i=o-n,u;if(this===r&&n<e&&e<o)for(u=i-1;u>=0;--u)r[u+e]=this[u+n];else if(i<1e3||!p.TYPED_ARRAY_SUPPORT)for(u=0;u<i;++u)r[u+e]=this[u+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+i),e);return i};p.prototype.fill=function(r,e,n,o){if(typeof r=="string"){if(typeof e=="string"?(o=e,e=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),r.length===1){var i=r.charCodeAt(0);i<256&&(r=i)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!p.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof r=="number"&&(r=r&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,r||(r=0);var u;if(typeof r=="number")for(u=e;u<n;++u)this[u]=r;else{var f=G(r)?r:Yr(new p(r,o).toString()),c=f.length;for(u=0;u<n-e;++u)this[u+e]=f[u%c]}return this};Cl=/[^+\/0-9A-Za-z-_]/g});var s=Ve(()=>{"use strict";Qo()});var ri=h((Vx,ei)=>{"use strict";a();s();var _l="Function.prototype.bind called on incompatible ",Ml=Object.prototype.toString,Dl=Math.max,Wl="[object Function]",Xo=function(r,e){for(var n=[],o=0;o<r.length;o+=1)n[o]=r[o];for(var i=0;i<e.length;i+=1)n[i+r.length]=e[i];return n},jl=function(r,e){for(var n=[],o=e||0,i=0;o<r.length;o+=1,i+=1)n[i]=r[o];return n},Gl=function(t,r){for(var e="",n=0;n<t.length;n+=1)e+=t[n],n+1<t.length&&(e+=r);return e};ei.exports=function(r){var e=this;if(typeof e!="function"||Ml.apply(e)!==Wl)throw new TypeError(_l+e);for(var n=jl(arguments,1),o,i=function(){if(this instanceof o){var m=e.apply(this,Xo(n,arguments));return Object(m)===m?m:this}return e.apply(r,Xo(n,arguments))},u=Dl(0,e.length-n.length),f=[],c=0;c<u;c++)f[c]="$"+c;if(o=Function("binder","return function ("+Gl(f,",")+"){ return binder.apply(this,arguments); }")(i),e.prototype){var y=function(){};y.prototype=e.prototype,o.prototype=new y,y.prototype=null}return o}});var Re=h((Hx,ti)=>{"use strict";a();s();var Vl=ri();ti.exports=Function.prototype.bind||Vl});var Qt=h((Zx,ni)=>{"use strict";a();s();ni.exports=Error});var Xt=h((e0,oi)=>{"use strict";a();s();oi.exports=EvalError});var en=h((n0,ii)=>{"use strict";a();s();ii.exports=RangeError});var rn=h((a0,ai)=>{"use strict";a();s();ai.exports=ReferenceError});var Qr=h((p0,si)=>{"use strict";a();s();si.exports=SyntaxError});var I=h((c0,ui)=>{"use strict";a();s();ui.exports=TypeError});var tn=h((m0,pi)=>{"use strict";a();s();pi.exports=URIError});var li=h((x0,fi)=>{"use strict";a();s();fi.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},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 o=42;r[e]=o;for(e in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==e||!Object.prototype.propertyIsEnumerable.call(r,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(r,e);if(u.value!==o||u.enumerable!==!0)return!1}return!0}});var nn=h((b0,di)=>{"use strict";a();s();var ci=typeof Symbol!="undefined"&&Symbol,zl=li();di.exports=function(){return typeof ci!="function"||typeof Symbol!="function"||typeof ci("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:zl()}});var mi=h((T0,yi)=>{"use strict";a();s();var on={__proto__:null,foo:{}},Yl=Object;yi.exports=function(){return{__proto__:on}.foo===on.foo&&!(on instanceof Yl)}});var an=h((P0,hi)=>{"use strict";a();s();var Hl=Function.prototype.call,Jl=Object.prototype.hasOwnProperty,Kl=Re();hi.exports=Kl.call(Hl,Jl)});var V=h((C0,bi)=>{"use strict";a();s();var S,Zl=Qt(),Ql=Xt(),Xl=en(),ec=rn(),Ze=Qr(),Ke=I(),rc=tn(),wi=Function,sn=function(t){try{return wi('"use strict"; return ('+t+").constructor;")()}catch(r){}},Pe=Object.getOwnPropertyDescriptor;if(Pe)try{Pe({},"")}catch(t){Pe=null}var un=function(){throw new Ke},tc=Pe?function(){try{return arguments.callee,un}catch(t){try{return Pe(arguments,"callee").get}catch(r){return un}}}():un,He=nn()(),nc=mi()(),C=Object.getPrototypeOf||(nc?function(t){return t.__proto__}:null),Je={},oc=typeof Uint8Array=="undefined"||!C?S:C(Uint8Array),Ie={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?S:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?S:ArrayBuffer,"%ArrayIteratorPrototype%":He&&C?C([][Symbol.iterator]()):S,"%AsyncFromSyncIteratorPrototype%":S,"%AsyncFunction%":Je,"%AsyncGenerator%":Je,"%AsyncGeneratorFunction%":Je,"%AsyncIteratorPrototype%":Je,"%Atomics%":typeof Atomics=="undefined"?S:Atomics,"%BigInt%":typeof BigInt=="undefined"?S:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?S:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?S:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?S:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Zl,"%eval%":eval,"%EvalError%":Ql,"%Float32Array%":typeof Float32Array=="undefined"?S:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?S:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?S:FinalizationRegistry,"%Function%":wi,"%GeneratorFunction%":Je,"%Int8Array%":typeof Int8Array=="undefined"?S:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?S:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?S:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&C?C(C([][Symbol.iterator]())):S,"%JSON%":typeof JSON=="object"?JSON:S,"%Map%":typeof Map=="undefined"?S:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!He||!C?S:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?S:Promise,"%Proxy%":typeof Proxy=="undefined"?S:Proxy,"%RangeError%":Xl,"%ReferenceError%":ec,"%Reflect%":typeof Reflect=="undefined"?S:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?S:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!He||!C?S:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?S:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&C?C(""[Symbol.iterator]()):S,"%Symbol%":He?Symbol:S,"%SyntaxError%":Ze,"%ThrowTypeError%":tc,"%TypedArray%":oc,"%TypeError%":Ke,"%Uint8Array%":typeof Uint8Array=="undefined"?S:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?S:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?S:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?S:Uint32Array,"%URIError%":rc,"%WeakMap%":typeof WeakMap=="undefined"?S:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?S:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?S:WeakSet};if(C)try{null.error}catch(t){gi=C(C(t)),Ie["%Error.prototype%"]=gi}var gi,ic=function t(r){var e;if(r==="%AsyncFunction%")e=sn("async function () {}");else if(r==="%GeneratorFunction%")e=sn("function* () {}");else if(r==="%AsyncGeneratorFunction%")e=sn("async function* () {}");else if(r==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&C&&(e=C(o.prototype))}return Ie[r]=e,e},xi={__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"]},dr=Re(),Xr=an(),ac=dr.call(Function.call,Array.prototype.concat),sc=dr.call(Function.apply,Array.prototype.splice),vi=dr.call(Function.call,String.prototype.replace),et=dr.call(Function.call,String.prototype.slice),uc=dr.call(Function.call,RegExp.prototype.exec),pc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fc=/\\(\\)?/g,lc=function(r){var e=et(r,0,1),n=et(r,-1);if(e==="%"&&n!=="%")throw new Ze("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new Ze("invalid intrinsic syntax, expected opening `%`");var o=[];return vi(r,pc,function(i,u,f,c){o[o.length]=f?vi(c,fc,"$1"):u||i}),o},cc=function(r,e){var n=r,o;if(Xr(xi,n)&&(o=xi[n],n="%"+o[0]+"%"),Xr(Ie,n)){var i=Ie[n];if(i===Je&&(i=ic(n)),typeof i=="undefined"&&!e)throw new Ke("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ze("intrinsic "+r+" does not exist!")};bi.exports=function(r,e){if(typeof r!="string"||r.length===0)throw new Ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Ke('"allowMissing" argument must be a boolean');if(uc(/^%?[^%]*%?$/,r)===null)throw new Ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=lc(r),o=n.length>0?n[0]:"",i=cc("%"+o+"%",e),u=i.name,f=i.value,c=!1,y=i.alias;y&&(o=y[0],sc(n,ac([0,1],y)));for(var m=1,g=!0;m<n.length;m+=1){var v=n[m],b=et(v,0,1),E=et(v,-1);if((b==='"'||b==="'"||b==="`"||E==='"'||E==="'"||E==="`")&&b!==E)throw new Ze("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",Xr(Ie,u))f=Ie[u];else if(f!=null){if(!(v in f)){if(!e)throw new Ke("base intrinsic for "+r+" exists, but the property is not available.");return}if(Pe&&m+1>=n.length){var P=Pe(f,v);g=!!P,g&&"get"in P&&!("originalValue"in P.get)?f=P.get:f=f[v]}else g=Xr(f,v),f=f[v];g&&!c&&(Ie[u]=f)}}return f}});var pn=h((L0,Ai)=>{"use strict";a();s();Ai.exports=Object});var Ti=h((q0,Si)=>{"use strict";a();s();Si.exports=Math.abs});var Ri=h((_0,Ei)=>{"use strict";a();s();Ei.exports=Math.floor});var Ii=h((W0,Pi)=>{"use strict";a();s();Pi.exports=Math.max});var Ci=h((V0,Ni)=>{"use strict";a();s();Ni.exports=Math.min});var Oi=h((H0,Fi)=>{"use strict";a();s();Fi.exports=Math.pow});var Bi=h((Z0,Li)=>{"use strict";a();s();Li.exports=Math.round});var qi=h((ev,Ui)=>{"use strict";a();s();Ui.exports=Number.isNaN||function(r){return r!==r}});var ki=h((nv,$i)=>{"use strict";a();s();var dc=qi();$i.exports=function(r){return dc(r)||r===0?r:r<0?-1:1}});var Mi=h((av,_i)=>{"use strict";a();s();_i.exports=Object.getOwnPropertyDescriptor});var yr=h((pv,Di)=>{"use strict";a();s();var rt=Mi();if(rt)try{rt([],"length")}catch(t){rt=null}Di.exports=rt});var nt=h((cv,Wi)=>{"use strict";a();s();var tt=Object.defineProperty||!1;if(tt)try{tt({},"a",{value:1})}catch(t){tt=!1}Wi.exports=tt});var fn=h((mv,ji)=>{"use strict";a();s();ji.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},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 o=42;r[e]=o;for(var i in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var u=Object.getOwnPropertySymbols(r);if(u.length!==1||u[0]!==e||!Object.prototype.propertyIsEnumerable.call(r,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(r,e);if(f.value!==o||f.enumerable!==!0)return!1}return!0}});var zi=h((xv,Vi)=>{"use strict";a();s();var Gi=typeof Symbol!="undefined"&&Symbol,yc=fn();Vi.exports=function(){return typeof Gi!="function"||typeof Symbol!="function"||typeof Gi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:yc()}});var ln=h((bv,Yi)=>{"use strict";a();s();Yi.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var cn=h((Tv,Hi)=>{"use strict";a();s();var mc=pn();Hi.exports=mc.getPrototypeOf||null});var ot=h((Pv,Ji)=>{"use strict";a();s();Ji.exports=Function.prototype.call});var dn=h((Cv,Ki)=>{"use strict";a();s();Ki.exports=Function.prototype.apply});var Qi=h((Lv,Zi)=>{"use strict";a();s();Zi.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var ea=h((qv,Xi)=>{"use strict";a();s();var hc=Re(),gc=dn(),xc=ot(),vc=Qi();Xi.exports=vc||hc.call(xc,gc)});var ta=h((_v,ra)=>{"use strict";a();s();var wc=Re(),bc=I(),Ac=ot(),Sc=ea();ra.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new bc("a function is required");return Sc(wc,Ac,r)}});var ua=h((Wv,sa)=>{"use strict";a();s();var Tc=ta(),na=yr(),ia;try{ia=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var yn=!!ia&&na&&na(Object.prototype,"__proto__"),aa=Object,oa=aa.getPrototypeOf;sa.exports=yn&&typeof yn.get=="function"?Tc([yn.get]):typeof oa=="function"?function(r){return oa(r==null?r:aa(r))}:!1});var da=h((Vv,ca)=>{"use strict";a();s();var pa=ln(),fa=cn(),la=ua();ca.exports=pa?function(r){return pa(r)}:fa?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return fa(r)}:la?function(r){return la(r)}:null});var gn=h((Hv,va)=>{"use strict";a();s();var T,Ec=pn(),Rc=Qt(),Pc=Xt(),Ic=en(),Nc=rn(),rr=Qr(),er=I(),Cc=tn(),Fc=Ti(),Oc=Ri(),Lc=Ii(),Bc=Ci(),Uc=Oi(),qc=Bi(),$c=ki(),ga=Function,mn=function(t){try{return ga('"use strict"; return ('+t+").constructor;")()}catch(r){}},mr=yr(),kc=nt(),hn=function(){throw new er},_c=mr?function(){try{return arguments.callee,hn}catch(t){try{return mr(arguments,"callee").get}catch(r){return hn}}}():hn,Qe=zi()(),F=da(),Mc=cn(),Dc=ln(),xa=dn(),hr=ot(),Xe={},Wc=typeof Uint8Array=="undefined"||!F?T:F(Uint8Array),Ne={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?T:ArrayBuffer,"%ArrayIteratorPrototype%":Qe&&F?F([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":Xe,"%AsyncGenerator%":Xe,"%AsyncGeneratorFunction%":Xe,"%AsyncIteratorPrototype%":Xe,"%Atomics%":typeof Atomics=="undefined"?T:Atomics,"%BigInt%":typeof BigInt=="undefined"?T:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?T:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?T:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?T:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Rc,"%eval%":eval,"%EvalError%":Pc,"%Float32Array%":typeof Float32Array=="undefined"?T:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?T:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?T:FinalizationRegistry,"%Function%":ga,"%GeneratorFunction%":Xe,"%Int8Array%":typeof Int8Array=="undefined"?T:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?T:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Qe&&F?F(F([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map=="undefined"?T:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Qe||!F?T:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Ec,"%Object.getOwnPropertyDescriptor%":mr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?T:Promise,"%Proxy%":typeof Proxy=="undefined"?T:Proxy,"%RangeError%":Ic,"%ReferenceError%":Nc,"%Reflect%":typeof Reflect=="undefined"?T:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?T:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Qe||!F?T:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Qe&&F?F(""[Symbol.iterator]()):T,"%Symbol%":Qe?Symbol:T,"%SyntaxError%":rr,"%ThrowTypeError%":_c,"%TypedArray%":Wc,"%TypeError%":er,"%Uint8Array%":typeof Uint8Array=="undefined"?T:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?T:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?T:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?T:Uint32Array,"%URIError%":Cc,"%WeakMap%":typeof WeakMap=="undefined"?T:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?T:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?T:WeakSet,"%Function.prototype.call%":hr,"%Function.prototype.apply%":xa,"%Object.defineProperty%":kc,"%Object.getPrototypeOf%":Mc,"%Math.abs%":Fc,"%Math.floor%":Oc,"%Math.max%":Lc,"%Math.min%":Bc,"%Math.pow%":Uc,"%Math.round%":qc,"%Math.sign%":$c,"%Reflect.getPrototypeOf%":Dc};if(F)try{null.error}catch(t){ya=F(F(t)),Ne["%Error.prototype%"]=ya}var ya,jc=function t(r){var e;if(r==="%AsyncFunction%")e=mn("async function () {}");else if(r==="%GeneratorFunction%")e=mn("function* () {}");else if(r==="%AsyncGeneratorFunction%")e=mn("async function* () {}");else if(r==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&F&&(e=F(o.prototype))}return Ne[r]=e,e},ma={__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"]},gr=Re(),it=an(),Gc=gr.call(hr,Array.prototype.concat),Vc=gr.call(xa,Array.prototype.splice),ha=gr.call(hr,String.prototype.replace),at=gr.call(hr,String.prototype.slice),zc=gr.call(hr,RegExp.prototype.exec),Yc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Hc=/\\(\\)?/g,Jc=function(r){var e=at(r,0,1),n=at(r,-1);if(e==="%"&&n!=="%")throw new rr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new rr("invalid intrinsic syntax, expected opening `%`");var o=[];return ha(r,Yc,function(i,u,f,c){o[o.length]=f?ha(c,Hc,"$1"):u||i}),o},Kc=function(r,e){var n=r,o;if(it(ma,n)&&(o=ma[n],n="%"+o[0]+"%"),it(Ne,n)){var i=Ne[n];if(i===Xe&&(i=jc(n)),typeof i=="undefined"&&!e)throw new er("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new rr("intrinsic "+r+" does not exist!")};va.exports=function(r,e){if(typeof r!="string"||r.length===0)throw new er("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new er('"allowMissing" argument must be a boolean');if(zc(/^%?[^%]*%?$/,r)===null)throw new rr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Jc(r),o=n.length>0?n[0]:"",i=Kc("%"+o+"%",e),u=i.name,f=i.value,c=!1,y=i.alias;y&&(o=y[0],Vc(n,Gc([0,1],y)));for(var m=1,g=!0;m<n.length;m+=1){var v=n[m],b=at(v,0,1),E=at(v,-1);if((b==='"'||b==="'"||b==="`"||E==='"'||E==="'"||E==="`")&&b!==E)throw new rr("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",it(Ne,u))f=Ne[u];else if(f!=null){if(!(v in f)){if(!e)throw new er("base intrinsic for "+r+" exists, but the property is not available.");return}if(mr&&m+1>=n.length){var P=mr(f,v);g=!!P,g&&"get"in P&&!("originalValue"in P.get)?f=P.get:f=f[v]}else g=it(f,v),f=f[v];g&&!c&&(Ne[u]=f)}}return f}});var xn=h((Zv,Aa)=>{"use strict";a();s();var wa=nt(),Zc=Qr(),tr=I(),ba=yr();Aa.exports=function(r,e,n){if(!r||typeof r!="object"&&typeof r!="function")throw new tr("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new tr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new tr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new tr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new tr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new tr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,c=!!ba&&ba(r,e);if(wa)wa(r,e,{configurable:u===null&&c?c.configurable:!u,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:i===null&&c?c.writable:!i});else if(f||!o&&!i&&!u)r[e]=n;else throw new Zc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var wn=h((ew,Ta)=>{"use strict";a();s();var vn=nt(),Sa=function(){return!!vn};Sa.hasArrayLengthDefineBug=function(){if(!vn)return null;try{return vn([],"length",{value:1}).length!==1}catch(r){return!0}};Ta.exports=Sa});var Na=h((nw,Ia)=>{"use strict";a();s();var Qc=gn(),Ea=xn(),Xc=wn()(),Ra=yr(),Pa=I(),ed=Qc("%Math.floor%");Ia.exports=function(r,e){if(typeof r!="function")throw new Pa("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||ed(e)!==e)throw new Pa("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in r&&Ra){var u=Ra(r,"length");u&&!u.configurable&&(o=!1),u&&!u.writable&&(i=!1)}return(o||i||!n)&&(Xc?Ea(r,"length",e,!0,!0):Ea(r,"length",e)),r}});var Fa=h((aw,Ca)=>{"use strict";a();s();var rd=gn(),st=rd("%Object.defineProperty%",!0)||!1;if(st)try{st({},"a",{value:1})}catch(t){st=!1}Ca.exports=st});var ft=h((pw,ut)=>{"use strict";a();s();var bn=Re(),pt=V(),td=Na(),nd=I(),Ba=pt("%Function.prototype.apply%"),Ua=pt("%Function.prototype.call%"),qa=pt("%Reflect.apply%",!0)||bn.call(Ua,Ba),Oa=Fa(),od=pt("%Math.max%");ut.exports=function(r){if(typeof r!="function")throw new nd("a function is required");var e=qa(bn,Ua,arguments);return td(e,1+od(0,r.length-(arguments.length-1)),!0)};var La=function(){return qa(bn,Ba,arguments)};Oa?Oa(ut.exports,"apply",{value:La}):ut.exports.apply=La});var An=h((cw,ka)=>{"use strict";a();s();var $a=Object.prototype.toString;ka.exports=function(r){var e=$a.call(r),n=e==="[object Arguments]";return n||(n=e!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&$a.call(r.callee)==="[object Function]"),n}});var Ya=h((mw,za)=>{"use strict";a();s();var Va;Object.keys||(xr=Object.prototype.hasOwnProperty,Sn=Object.prototype.toString,_a=An(),Tn=Object.prototype.propertyIsEnumerable,Ma=!Tn.call({toString:null},"toString"),Da=Tn.call(function(){},"prototype"),vr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],lt=function(t){var r=t.constructor;return r&&r.prototype===t},Wa={$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},ja=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Wa["$"+t]&&xr.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{lt(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),Ga=function(t){if(typeof window=="undefined"||!ja)return lt(t);try{return lt(t)}catch(r){return!1}},Va=function(r){var e=r!==null&&typeof r=="object",n=Sn.call(r)==="[object Function]",o=_a(r),i=e&&Sn.call(r)==="[object String]",u=[];if(!e&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var f=Da&&n;if(i&&r.length>0&&!xr.call(r,0))for(var c=0;c<r.length;++c)u.push(String(c));if(o&&r.length>0)for(var y=0;y<r.length;++y)u.push(String(y));else for(var m in r)!(f&&m==="prototype")&&xr.call(r,m)&&u.push(String(m));if(Ma)for(var g=Ga(r),v=0;v<vr.length;++v)!(g&&vr[v]==="constructor")&&xr.call(r,vr[v])&&u.push(vr[v]);return u});var xr,Sn,_a,Tn,Ma,Da,vr,lt,Wa,ja,Ga;za.exports=Va});var Za=h((xw,Ka)=>{"use strict";a();s();var id=Array.prototype.slice,ad=An(),Ha=Object.keys,ct=Ha?function(r){return Ha(r)}:Ya(),Ja=Object.keys;ct.shim=function(){if(Object.keys){var r=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);r||(Object.keys=function(n){return ad(n)?Ja(id.call(n)):Ja(n)})}else Object.keys=ct;return Object.keys||ct};Ka.exports=ct});var wr=h((bw,rs)=>{"use strict";a();s();var sd=Za(),ud=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",pd=Object.prototype.toString,fd=Array.prototype.concat,Qa=xn(),ld=function(t){return typeof t=="function"&&pd.call(t)==="[object Function]"},Xa=wn()(),cd=function(t,r,e,n){if(r in t){if(n===!0){if(t[r]===e)return}else if(!ld(n)||!n())return}Xa?Qa(t,r,e,!0):Qa(t,r,e)},es=function(t,r){var e=arguments.length>2?arguments[2]:{},n=sd(r);ud&&(n=fd.call(n,Object.getOwnPropertySymbols(r)));for(var o=0;o<n.length;o+=1)cd(t,n[o],r[n[o]],e[n[o]])};es.supportsDescriptors=!!Xa;rs.exports=es});var M=h((Tw,os)=>{"use strict";a();s();var ts=V(),ns=ft(),dd=ns(ts("String.prototype.indexOf"));os.exports=function(r,e){var n=ts(r,!!e);return typeof n=="function"&&dd(r,".prototype.")>-1?ns(n):n}});var ss=h((Pw,as)=>{"use strict";a();s();var yd=V(),is=yd("%Array%"),md=!is.isArray&&M()("Object.prototype.toString");as.exports=is.isArray||function(r){return md(r)==="[object Array]"}});var En=h((Cw,us)=>{"use strict";a();s();us.exports=ss()});var fs=h((Lw,ps)=>{"use strict";a();s();var hd=V(),gd=M(),xd=I(),vd=En(),wd=hd("%Reflect.apply%",!0)||gd("Function.prototype.apply");ps.exports=function(r,e){var n=arguments.length>2?arguments[2]:[];if(!vd(n))throw new xd("Assertion failed: optional `argumentsList`, if provided, must be a List");return wd(r,e,n)}});function ls(){throw new Error("setTimeout has not been defined")}function cs(){throw new Error("clearTimeout has not been defined")}function ds(t){if(ye===setTimeout)return setTimeout(t,0);if((ye===ls||!ye)&&setTimeout)return ye=setTimeout,setTimeout(t,0);try{return ye(t,0)}catch(r){try{return ye.call(null,t,0)}catch(e){return ye.call(this,t,0)}}}function bd(t){if(me===clearTimeout)return clearTimeout(t);if((me===cs||!me)&&clearTimeout)return me=clearTimeout,clearTimeout(t);try{return me(t)}catch(r){try{return me.call(null,t)}catch(e){return me.call(this,t)}}}function Ad(){!or||!Ce||(or=!1,Ce.length?te=Ce.concat(te):dt=-1,te.length&&ys())}function ys(){if(!or){var t=ds(Ad);or=!0;for(var r=te.length;r;){for(Ce=te,te=[];++dt<r;)Ce&&Ce[dt].run();dt=-1,r=te.length}Ce=null,or=!1,bd(t)}}function Sd(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];te.push(new ms(t,r)),te.length===1&&!or&&ds(ys)}function ms(t,r){this.fun=t,this.array=r}function Fe(){}function Md(t){throw new Error("process.binding is not supported")}function Dd(){return"/"}function Wd(t){throw new Error("process.chdir is not supported")}function jd(){return 0}function Vd(t){var r=Gd.call(nr)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}function Yd(){var t=new Date,r=t-zd;return r/1e3}var ye,me,te,or,Ce,dt,Td,Ed,Rd,Pd,Id,Nd,Cd,Fd,Od,Ld,Bd,Ud,qd,$d,kd,_d,nr,Gd,zd,Hd,br,hs=Ve(()=>{"use strict";a();s();ye=ls,me=cs;typeof globalThis.setTimeout=="function"&&(ye=setTimeout);typeof globalThis.clearTimeout=="function"&&(me=clearTimeout);te=[],or=!1,dt=-1;ms.prototype.run=function(){this.fun.apply(null,this.array)};Td="browser",Ed="browser",Rd=!0,Pd={},Id=[],Nd="",Cd={},Fd={},Od={};Ld=Fe,Bd=Fe,Ud=Fe,qd=Fe,$d=Fe,kd=Fe,_d=Fe;nr=globalThis.performance||{},Gd=nr.now||nr.mozNow||nr.msNow||nr.oNow||nr.webkitNow||function(){return new Date().getTime()};zd=new Date;Hd={nextTick:Sd,title:Td,browser:Rd,env:Pd,argv:Id,version:Nd,versions:Cd,on:Ld,addListener:Bd,once:Ud,off:qd,removeListener:$d,removeAllListeners:kd,emit:_d,binding:Md,cwd:Dd,chdir:Wd,umask:jd,hrtime:Vd,platform:Ed,release:Fd,config:Od,uptime:Yd},br=Hd});var Rn,Pn,gs=Ve(()=>{"use strict";a();s();typeof Object.create=="function"?Rn=function(r,e){r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:Rn=function(r,e){r.super_=e;var n=function(){};n.prototype=e.prototype,r.prototype=new n,r.prototype.constructor=r};Pn=Rn});var Es={};Yt(Es,{_extend:()=>qn,debuglog:()=>xs,default:()=>oy,deprecate:()=>On,format:()=>gt,inherits:()=>Pn,inspect:()=>Y,isArray:()=>Ln,isBoolean:()=>xt,isBuffer:()=>As,isDate:()=>ht,isError:()=>Sr,isFunction:()=>Tr,isNull:()=>Er,isNullOrUndefined:()=>vs,isNumber:()=>Bn,isObject:()=>Oe,isPrimitive:()=>bs,isRegExp:()=>Ar,isString:()=>Rr,isSymbol:()=>ws,isUndefined:()=>z,log:()=>Ss});function gt(t){if(!Rr(t)){for(var r=[],e=0;e<arguments.length;e++)r.push(Y(arguments[e]));return r.join(" ")}for(var e=1,n=arguments,o=n.length,i=String(t).replace(Jd,function(f){if(f==="%%")return"%";if(e>=o)return f;switch(f){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 f}}),u=n[e];e<o;u=n[++e])Er(u)||!Oe(u)?i+=" "+u:i+=" "+Y(u);return i}function On(t,r){if(z(globalThis.process))return function(){return On(t,r).apply(this,arguments)};if(br.noDeprecation===!0)return t;var e=!1;function n(){if(!e){if(br.throwDeprecation)throw new Error(r);br.traceDeprecation?console.trace(r):console.error(r),e=!0}return t.apply(this,arguments)}return n}function xs(t){if(z(In)&&(In=br.env.NODE_DEBUG||""),t=t.toUpperCase(),!yt[t])if(new RegExp("\\b"+t+"\\b","i").test(In)){var r=0;yt[t]=function(){var e=gt.apply(null,arguments);console.error("%s %d: %s",t,r,e)}}else yt[t]=function(){};return yt[t]}function Y(t,r){var e={seen:[],stylize:Zd};return arguments.length>=3&&(e.depth=arguments[2]),arguments.length>=4&&(e.colors=arguments[3]),xt(r)?e.showHidden=r:r&&qn(e,r),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=Kd),mt(e,t,e.depth)}function Kd(t,r){var e=Y.styles[r];return e?"\x1B["+Y.colors[e][0]+"m"+t+"\x1B["+Y.colors[e][1]+"m":t}function Zd(t,r){return t}function Qd(t){var r={};return t.forEach(function(e,n){r[e]=!0}),r}function mt(t,r,e){if(t.customInspect&&r&&Tr(r.inspect)&&r.inspect!==Y&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(e,t);return Rr(n)||(n=mt(t,n,e)),n}var o=Xd(t,r);if(o)return o;var i=Object.keys(r),u=Qd(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(r)),Sr(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Nn(r);if(i.length===0){if(Tr(r)){var f=r.name?": "+r.name:"";return t.stylize("[Function"+f+"]","special")}if(Ar(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(ht(r))return t.stylize(Date.prototype.toString.call(r),"date");if(Sr(r))return Nn(r)}var c="",y=!1,m=["{","}"];if(Ln(r)&&(y=!0,m=["[","]"]),Tr(r)){var g=r.name?": "+r.name:"";c=" [Function"+g+"]"}if(Ar(r)&&(c=" "+RegExp.prototype.toString.call(r)),ht(r)&&(c=" "+Date.prototype.toUTCString.call(r)),Sr(r)&&(c=" "+Nn(r)),i.length===0&&(!y||r.length==0))return m[0]+c+m[1];if(e<0)return Ar(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var v;return y?v=ey(t,r,e,u,i):v=i.map(function(b){return Fn(t,r,e,u,b,y)}),t.seen.pop(),ry(v,c,m)}function Xd(t,r){if(z(r))return t.stylize("undefined","undefined");if(Rr(r)){var e="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(e,"string")}if(Bn(r))return t.stylize(""+r,"number");if(xt(r))return t.stylize(""+r,"boolean");if(Er(r))return t.stylize("null","null")}function Nn(t){return"["+Error.prototype.toString.call(t)+"]"}function ey(t,r,e,n,o){for(var i=[],u=0,f=r.length;u<f;++u)Ts(r,String(u))?i.push(Fn(t,r,e,n,String(u),!0)):i.push("");return o.forEach(function(c){c.match(/^\d+$/)||i.push(Fn(t,r,e,n,c,!0))}),i}function Fn(t,r,e,n,o,i){var u,f,c;if(c=Object.getOwnPropertyDescriptor(r,o)||{value:r[o]},c.get?c.set?f=t.stylize("[Getter/Setter]","special"):f=t.stylize("[Getter]","special"):c.set&&(f=t.stylize("[Setter]","special")),Ts(n,o)||(u="["+o+"]"),f||(t.seen.indexOf(c.value)<0?(Er(e)?f=mt(t,c.value,null):f=mt(t,c.value,e-1),f.indexOf(`
|
|
2
|
-
`)>-1&&(
|
|
3
|
-
`).map(function(
|
|
4
|
-
`).substr(2):
|
|
5
|
-
`+
|
|
6
|
-
`).map(function(
|
|
7
|
-
`))):
|
|
8
|
-
`)>=0&&n++,
|
|
9
|
-
`)+" "+
|
|
10
|
-
`)+" "+e[1]:e[0]+r+" "+t.join(", ")+" "+e[1]}function Ln(t){return Array.isArray(t)}function xt(t){return typeof t=="boolean"}function Er(t){return t===null}function vs(t){return t==null}function Bn(t){return typeof t=="number"}function Rr(t){return typeof t=="string"}function ws(t){return typeof t=="symbol"}function z(t){return t===void 0}function Ar(t){return Oe(t)&&Un(t)==="[object RegExp]"}function Oe(t){return typeof t=="object"&&t!==null}function ht(t){return Oe(t)&&Un(t)==="[object Date]"}function Sr(t){return Oe(t)&&(Un(t)==="[object Error]"||t instanceof Error)}function Tr(t){return typeof t=="function"}function bs(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function As(t){return p.isBuffer(t)}function Un(t){return Object.prototype.toString.call(t)}function Cn(t){return t<10?"0"+t.toString(10):t.toString(10)}function ny(){var t=new Date,r=[Cn(t.getHours()),Cn(t.getMinutes()),Cn(t.getSeconds())].join(":");return[t.getDate(),ty[t.getMonth()],r].join(" ")}function Ss(){console.log("%s - %s",ny(),gt.apply(null,arguments))}function qn(t,r){if(!r||!Oe(r))return t;for(var e=Object.keys(r),n=e.length;n--;)t[e[n]]=r[e[n]];return t}function Ts(t,r){return Object.prototype.hasOwnProperty.call(t,r)}var Jd,yt,In,ty,oy,Rs=Ve(()=>{"use strict";a();s();hs();gs();Jd=/%[sdj%]/g;yt={};Y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};ty=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];oy={inherits:Pn,_extend:qn,log:Ss,isBuffer:As,isPrimitive:bs,isFunction:Tr,isError:Sr,isDate:ht,isObject:Oe,isRegExp:Ar,isUndefined:z,isSymbol:ws,isString:Rr,isNumber:Bn,isNullOrUndefined:vs,isNull:Er,isBoolean:xt,isArray:Ln,inspect:Y,deprecate:On,format:gt,debuglog:xs}});var Ps=h((zw,vt)=>{"use strict";a();s();var Le=(Rs(),No(Es));if(Le&&Le.default){vt.exports=Le.default;for(let t in Le)vt.exports[t]=Le[t]}else Le&&(vt.exports=Le)});var Ns=h((Jw,Is)=>{"use strict";a();s();Is.exports=Ps().inspect});var Cr=h((Qw,Js)=>{"use strict";a();s();var zn=typeof Map=="function"&&Map.prototype,$n=Object.getOwnPropertyDescriptor&&zn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,bt=zn&&$n&&typeof $n.get=="function"?$n.get:null,Cs=zn&&Map.prototype.forEach,Yn=typeof Set=="function"&&Set.prototype,kn=Object.getOwnPropertyDescriptor&&Yn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,At=Yn&&kn&&typeof kn.get=="function"?kn.get:null,Fs=Yn&&Set.prototype.forEach,iy=typeof WeakMap=="function"&&WeakMap.prototype,Ir=iy?WeakMap.prototype.has:null,ay=typeof WeakSet=="function"&&WeakSet.prototype,Nr=ay?WeakSet.prototype.has:null,sy=typeof WeakRef=="function"&&WeakRef.prototype,Os=sy?WeakRef.prototype.deref:null,uy=Boolean.prototype.valueOf,py=Object.prototype.toString,fy=Function.prototype.toString,ly=String.prototype.match,Hn=String.prototype.slice,he=String.prototype.replace,cy=String.prototype.toUpperCase,Ls=String.prototype.toLowerCase,Ws=RegExp.prototype.test,Bs=Array.prototype.concat,H=Array.prototype.join,dy=Array.prototype.slice,Us=Math.floor,Dn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_n=Object.getOwnPropertySymbols,Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ir=typeof Symbol=="function"&&typeof Symbol.iterator=="object",L=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ir||!0)?Symbol.toStringTag:null,js=Object.prototype.propertyIsEnumerable,qs=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $s(t,r){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ws.call(/e/,r))return r;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Us(-t):Us(t);if(n!==t){var o=String(n),i=Hn.call(r,o.length+1);return he.call(o,e,"$&_")+"."+he.call(he.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return he.call(r,e,"$&_")}var jn=Ns(),ks=jn.custom,_s=zs(ks)?ks:null,Gs={__proto__:null,double:'"',single:"'"},yy={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Js.exports=function t(r,e,n,o){var i=e||{};if(ne(i,"quoteStyle")&&!ne(Gs,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ne(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=ne(i,"customInspect")?i.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ne(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ne(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=i.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return Hs(r,i);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var c=String(r);return f?$s(r,c):c}if(typeof r=="bigint"){var y=String(r)+"n";return f?$s(r,y):y}var m=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=m&&m>0&&typeof r=="object")return Gn(r)?"[Array]":"[Object]";var g=Oy(i,n);if(typeof o=="undefined")o=[];else if(Ys(o,r)>=0)return"[Circular]";function v(We,jr,Nf){if(jr&&(o=dy.call(o),o.push(jr)),Nf){var To={depth:i.depth};return ne(i,"quoteStyle")&&(To.quoteStyle=i.quoteStyle),t(We,To,n+1,o)}return t(We,i,n+1,o)}if(typeof r=="function"&&!Ms(r)){var b=Sy(r),E=wt(r,v);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(E.length>0?" { "+H.call(E,", ")+" }":"")}if(zs(r)){var P=ir?he.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wn.call(r);return typeof r=="object"&&!ir?Pr(P):P}if(Ny(r)){for(var U="<"+Ls.call(String(r.nodeName)),$=r.attributes||[],X=0;X<$.length;X++)U+=" "+$[X].name+"="+Vs(my($[X].value),"double",i);return U+=">",r.childNodes&&r.childNodes.length&&(U+="..."),U+="</"+Ls.call(String(r.nodeName))+">",U}if(Gn(r)){if(r.length===0)return"[]";var Ae=wt(r,v);return g&&!Fy(Ae)?"["+Vn(Ae,g)+"]":"[ "+H.call(Ae,", ")+" ]"}if(gy(r)){var lr=wt(r,v);return!("cause"in Error.prototype)&&"cause"in r&&!js.call(r,"cause")?"{ ["+String(r)+"] "+H.call(Bs.call("[cause]: "+v(r.cause),lr),", ")+" }":lr.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+H.call(lr,", ")+" }"}if(typeof r=="object"&&u){if(_s&&typeof r[_s]=="function"&&jn)return jn(r,{depth:m-n});if(u!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(Ty(r)){var Wr=[];return Cs&&Cs.call(r,function(We,jr){Wr.push(v(jr,r,!0)+" => "+v(We,r))}),Ds("Map",bt.call(r),Wr,g)}if(Py(r)){var bo=[];return Fs&&Fs.call(r,function(We){bo.push(v(We,r))}),Ds("Set",At.call(r),bo,g)}if(Ey(r))return Mn("WeakMap");if(Iy(r))return Mn("WeakSet");if(Ry(r))return Mn("WeakRef");if(vy(r))return Pr(v(Number(r)));if(by(r))return Pr(v(Dn.call(r)));if(wy(r))return Pr(uy.call(r));if(xy(r))return Pr(v(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&r===globalThis||typeof globalThis!="undefined"&&r===globalThis)return"{ [object globalThis] }";if(!hy(r)&&!Ms(r)){var Wt=wt(r,v),Ao=qs?qs(r)===Object.prototype:r instanceof Object||r.constructor===Object,jt=r instanceof Object?"":"null prototype",So=!Ao&&L&&Object(r)===r&&L in r?Hn.call(ge(r),8,-1):jt?"Object":"",If=Ao||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",Gt=If+(So||jt?"["+H.call(Bs.call([],So||[],jt||[]),": ")+"] ":"");return Wt.length===0?Gt+"{}":g?Gt+"{"+Vn(Wt,g)+"}":Gt+"{ "+H.call(Wt,", ")+" }"}return String(r)};function Vs(t,r,e){var n=e.quoteStyle||r,o=Gs[n];return o+t+o}function my(t){return he.call(String(t),/"/g,""")}function Gn(t){return ge(t)==="[object Array]"&&(!L||!(typeof t=="object"&&L in t))}function hy(t){return ge(t)==="[object Date]"&&(!L||!(typeof t=="object"&&L in t))}function Ms(t){return ge(t)==="[object RegExp]"&&(!L||!(typeof t=="object"&&L in t))}function gy(t){return ge(t)==="[object Error]"&&(!L||!(typeof t=="object"&&L in t))}function xy(t){return ge(t)==="[object String]"&&(!L||!(typeof t=="object"&&L in t))}function vy(t){return ge(t)==="[object Number]"&&(!L||!(typeof t=="object"&&L in t))}function wy(t){return ge(t)==="[object Boolean]"&&(!L||!(typeof t=="object"&&L in t))}function zs(t){if(ir)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Wn)return!1;try{return Wn.call(t),!0}catch(r){}return!1}function by(t){if(!t||typeof t!="object"||!Dn)return!1;try{return Dn.call(t),!0}catch(r){}return!1}var Ay=Object.prototype.hasOwnProperty||function(t){return t in this};function ne(t,r){return Ay.call(t,r)}function ge(t){return py.call(t)}function Sy(t){if(t.name)return t.name;var r=ly.call(fy.call(t),/^function\s*([\w$]+)/);return r?r[1]:null}function Ys(t,r){if(t.indexOf)return t.indexOf(r);for(var e=0,n=t.length;e<n;e++)if(t[e]===r)return e;return-1}function Ty(t){if(!bt||!t||typeof t!="object")return!1;try{bt.call(t);try{At.call(t)}catch(r){return!0}return t instanceof Map}catch(r){}return!1}function Ey(t){if(!Ir||!t||typeof t!="object")return!1;try{Ir.call(t,Ir);try{Nr.call(t,Nr)}catch(r){return!0}return t instanceof WeakMap}catch(r){}return!1}function Ry(t){if(!Os||!t||typeof t!="object")return!1;try{return Os.call(t),!0}catch(r){}return!1}function Py(t){if(!At||!t||typeof t!="object")return!1;try{At.call(t);try{bt.call(t)}catch(r){return!0}return t instanceof Set}catch(r){}return!1}function Iy(t){if(!Nr||!t||typeof t!="object")return!1;try{Nr.call(t,Nr);try{Ir.call(t,Ir)}catch(r){return!0}return t instanceof WeakSet}catch(r){}return!1}function Ny(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Hs(t,r){if(t.length>r.maxStringLength){var e=t.length-r.maxStringLength,n="... "+e+" more character"+(e>1?"s":"");return Hs(Hn.call(t,0,r.maxStringLength),r)+n}var o=yy[r.quoteStyle||"single"];o.lastIndex=0;var i=he.call(he.call(t,o,"\\$1"),/[\x00-\x1f]/g,Cy);return Vs(i,"single",r)}function Cy(t){var r=t.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return e?"\\"+e:"\\x"+(r<16?"0":"")+cy.call(r.toString(16))}function Pr(t){return"Object("+t+")"}function Mn(t){return t+" { ? }"}function Ds(t,r,e,n){var o=n?Vn(e,n):H.call(e,", ");return t+" ("+r+") {"+o+"}"}function Fy(t){for(var r=0;r<t.length;r++)if(Ys(t[r],`
|
|
11
|
-
`)>=0)return!1;return!0}function
|
|
12
|
-
`+
|
|
13
|
-
`+r.prev}function wt(t,r){var e=Gn(t),n=[];if(e){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=ne(t,o)?r(t[o],t):""}var i=typeof _n=="function"?_n(t):[],u;if(ir){u={};for(var f=0;f<i.length;f++)u["$"+i[f]]=i[f]}for(var c in t)ne(t,c)&&(e&&String(Number(c))===c&&c<t.length||ir&&u["$"+c]instanceof Symbol||(Ws.call(/[^\w$]/,c)?n.push(r(c,t)+": "+r(t[c],t)):n.push(c+": "+r(t[c],t))));if(typeof _n=="function")for(var y=0;y<i.length;y++)js.call(t,i[y])&&n.push("["+r(i[y])+"]: "+r(t[i[y]],t));return n}});var St=h((rb,Ks)=>{"use strict";a();s();Ks.exports=function(r){return typeof r=="string"||typeof r=="symbol"}});var Qs=h((ob,Zs)=>{"use strict";a();s();var Ly=I(),By=Cr(),Uy=St();Zs.exports=function(r,e){if(!Uy(e))throw new Ly("Assertion failed: IsPropertyKey(P) is not true, got "+By(e));return r[e]}});var tu=h((sb,ru)=>{"use strict";a();s();var eu=Function.prototype.toString,ar=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Kn,Tt;if(typeof ar=="function"&&typeof Object.defineProperty=="function")try{Kn=Object.defineProperty({},"length",{get:function(){throw Tt}}),Tt={},ar(function(){throw 42},null,Kn)}catch(t){t!==Tt&&(ar=null)}else ar=null;var qy=/^\s*class\b/,Zn=function(r){try{var e=eu.call(r);return qy.test(e)}catch(n){return!1}},Jn=function(r){try{return Zn(r)?!1:(eu.call(r),!0)}catch(e){return!1}},Et=Object.prototype.toString,$y="[object Object]",ky="[object Function]",_y="[object GeneratorFunction]",My="[object HTMLAllCollection]",Dy="[object HTML document.all class]",Wy="[object HTMLCollection]",jy=typeof Symbol=="function"&&!!Symbol.toStringTag,Gy=!(0 in[,]),Qn=function(){return!1};typeof document=="object"&&(Xs=document.all,Et.call(Xs)===Et.call(document.all)&&(Qn=function(r){if((Gy||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var e=Et.call(r);return(e===My||e===Dy||e===Wy||e===$y)&&r("")==null}catch(n){}return!1}));var Xs;ru.exports=ar?function(r){if(Qn(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{ar(r,null,Kn)}catch(e){if(e!==Tt)return!1}return!Zn(r)&&Jn(r)}:function(r){if(Qn(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(jy)return Jn(r);if(Zn(r))return!1;var e=Et.call(r);return e!==ky&&e!==_y&&!/^\[object HTML/.test(e)?!1:Jn(r)}});var Xn=h((fb,nu)=>{"use strict";a();s();nu.exports=tu()});var su=h((db,au)=>{"use strict";a();s();var ou=I(),Vy=Qs(),zy=Xn(),Yy=St(),iu=Cr();au.exports=function(r,e){if(!Yy(e))throw new ou("Assertion failed: IsPropertyKey(P) is not true");var n=Vy(r,e);if(n!=null){if(!zy(n))throw new ou(iu(e)+" is not a function: "+iu(n));return n}}});var pu=h((hb,uu)=>{"use strict";a();s();var Hy=fn();uu.exports=function(){return Hy()&&!!Symbol.toStringTag}});var no=h((vb,du)=>{"use strict";a();s();var eo=M(),fu=pu()(),lu,cu,ro,to;fu&&(lu=eo("Object.prototype.hasOwnProperty"),cu=eo("RegExp.prototype.exec"),ro={},Rt=function(){throw ro},to={toString:Rt,valueOf:Rt},typeof Symbol.toPrimitive=="symbol"&&(to[Symbol.toPrimitive]=Rt));var Rt,Jy=eo("Object.prototype.toString"),Ky=Object.getOwnPropertyDescriptor,Zy="[object RegExp]";du.exports=fu?function(r){if(!r||typeof r!="object")return!1;var e=Ky(r,"lastIndex"),n=e&&lu(e,"value");if(!n)return!1;try{cu(r,to)}catch(o){return o===ro}}:function(r){return!r||typeof r!="object"&&typeof r!="function"?!1:Jy(r)===Zy}});var oo=h((Ab,yu)=>{"use strict";a();s();var Qy=M(),Xy=no(),em=Qy("RegExp.prototype.exec"),rm=I();yu.exports=function(r){if(!Xy(r))throw new rm("`regex` must be a RegExp");return function(n){return em(r,n)!==null}}});var hu=h((Eb,mu)=>{"use strict";a();s();mu.exports=function(r,e){for(var n=0;n<r.length;n+=1)if(!e(r[n],n,r))return!1;return!0}});var xu=h((Ib,gu)=>{"use strict";a();s();gu.exports=function(r){if(r===null)return"Null";if(typeof r=="undefined")return"Undefined";if(typeof r=="function"||typeof r=="object")return"Object";if(typeof r=="number")return"Number";if(typeof r=="boolean")return"Boolean";if(typeof r=="string")return"String"}});var io=h((Fb,vu)=>{"use strict";a();s();var tm=xu();vu.exports=function(r){return typeof r=="symbol"?"Symbol":typeof r=="bigint"?"BigInt":tm(r)}});var Au=h((Bb,bu)=>{"use strict";a();s();var wu=I(),nm=Cr(),om=St(),im=io();bu.exports=function(r,e){if(im(r)!=="Object")throw new wu("Assertion failed: Type(O) is not Object");if(!om(e))throw new wu("Assertion failed: IsPropertyKey(P) is not true, got "+nm(e));return r[e]}});var Tu=h(($b,Su)=>{"use strict";a();s();var am=V();Su.exports=am("%Math.min%")});var ao=h((Mb,Eu)=>{"use strict";a();s();Eu.exports=Number.isNaN||function(r){return r!==r}});var Pu=h((jb,Ru)=>{"use strict";a();s();var sm=ao();Ru.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!sm(t)&&t!==1/0&&t!==-1/0}});var Pt=h((zb,Nu)=>{"use strict";a();s();var Iu=V(),um=Iu("%Math.abs%"),pm=Iu("%Math.floor%"),fm=ao(),lm=Pu();Nu.exports=function(r){if(typeof r!="number"||fm(r)||!lm(r))return!1;var e=um(r);return pm(e)===e}});var uo=h((Jb,Cu)=>{"use strict";a();s();var cm=M(),so=I(),dm=Pt(),ym=cm("String.prototype.slice");Cu.exports=function(r,e,n){if(typeof r!="string")throw new so("Assertion failed: `string` must be a String");if(typeof e!="string")throw new so("Assertion failed: `searchValue` must be a String");if(!dm(n)||n<0)throw new so("Assertion failed: `fromIndex` must be a non-negative integer");var o=r.length;if(e===""&&n<=o)return n;for(var i=e.length,u=n;u<=o-i;u+=1){var f=ym(r,u,u+i);if(f===e)return u}return-1}});var It=h((Qb,Fu)=>{"use strict";a();s();var mm=I();Fu.exports=function(r){if(r==null)throw new mm(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r}});var Nt=h((rA,Ou)=>{"use strict";a();s();var hm=V(),gm=hm("%String%"),xm=I();Ou.exports=function(r){if(typeof r=="symbol")throw new xm("Cannot convert a Symbol value to a string");return gm(r)}});var po=h((oA,Uu)=>{"use strict";a();s();var vm=It(),wm=Nt(),bm=M(),Lu=bm("String.prototype.replace"),Bu=/^\s$/.test("\u180E"),Am=Bu?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Sm=Bu?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;Uu.exports=function(){var r=wm(vm(this));return Lu(Lu(r,Am,""),Sm,"")}});var fo=h((sA,$u)=>{"use strict";a();s();var Tm=po(),qu="\u200B",sr="\u180E";$u.exports=function(){return String.prototype.trim&&qu.trim()===qu&&sr.trim()===sr&&("_"+sr).trim()==="_"+sr&&(sr+"_").trim()===sr+"_"?String.prototype.trim:Tm}});var _u=h((fA,ku)=>{"use strict";a();s();var Em=wr(),Rm=fo();ku.exports=function(){var r=Rm();return Em(String.prototype,{trim:r},{trim:function(){return String.prototype.trim!==r}}),r}});var ju=h((dA,Wu)=>{"use strict";a();s();var Pm=ft(),Im=wr(),Nm=It(),Cm=po(),Mu=fo(),Fm=_u(),Om=Pm(Mu()),Du=function(r){return Nm(r),Om(r)};Im(Du,{getPolyfill:Mu,implementation:Cm,shim:Fm});Wu.exports=Du});var Yu=h((hA,zu)=>{"use strict";a();s();var co=V(),lo=co("%Number%"),Lm=co("%RegExp%"),Bm=I(),Gu=co("%parseInt%"),Um=M(),Ct=oo(),Vu=Um("String.prototype.slice"),qm=Ct(/^0b[01]+$/i),$m=Ct(/^0o[0-7]+$/i),km=Ct(/^[-+]0x[0-9a-f]+$/i),_m=["\x85","\u200B","\uFFFE"].join(""),Mm=new Lm("["+_m+"]","g"),Dm=Ct(Mm),Wm=ju();zu.exports=function t(r){if(typeof r!="string")throw new Bm("Assertion failed: `argument` is not a String");if(qm(r))return lo(Gu(Vu(r,2),2));if($m(r))return lo(Gu(Vu(r,2),8));if(Dm(r)||km(r))return NaN;var e=Wm(r);return e!==r?t(e):lo(r)}});var Ku=h((vA,Ju)=>{"use strict";a();s();var jm=I(),Hu=Pt(),Gm=M(),Vm=Gm("String.prototype.slice");Ju.exports=function(r,e,n){if(typeof r!="string"||!Hu(e)||arguments.length>2&&!Hu(n))throw new jm("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Vm(r,e,arguments.length>2?n:r.length)}});var Qu=h((AA,Zu)=>{"use strict";a();s();Zu.exports=function(r){return typeof r=="string"||typeof r=="undefined"}});var ep=h((EA,Xu)=>{"use strict";a();s();var zm=M()("String.prototype.slice");Xu.exports=function(r,e){return r===e?!0:r.length>e.length?!1:zm(e,0,r.length)===r}});var ip=h((IA,op)=>{"use strict";a();s();var oe=I(),np=oo(),Ym=hu(),yo=Cr(),Hm=Au(),Jm=En(),Km=Tu(),Zm=uo(),rp=Yu(),ie=Ku(),Qm=Nt(),tp=io(),Xm=Pt(),eh=Qu(),Fr=ep(),rh=np(/^\$[0-9]/),th=np(/^\$[0-9][0-9]/);op.exports=function(r,e,n,o,i,u){if(typeof r!="string")throw new oe("Assertion failed: `matched` must be a String");if(typeof e!="string")throw new oe("Assertion failed: `str` must be a String");if(!Xm(n)||n<0)throw new oe("Assertion failed: `position` must be a nonnegative integer, got "+yo(n));if(!Jm(o)||!Ym(o,eh))throw new oe("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+yo(o));if(typeof i!="undefined"&&tp(i)!=="Object")throw new oe("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof u!="string")throw new oe("Assertion failed: `replacementTemplate` must be a String");var f=e.length;if(n>f)throw new oe("Assertion failed: position > stringLength, got "+yo(n));for(var c=u,y="";c!=="";){var m,g,v;if(Fr("$$",c))m="$$",g="$";else if(Fr("$`",c))m="$`",g=ie(e,0,n);else if(Fr("$&",c))m="$&",g=r;else if(Fr("$'",c)){m="$'";var b=r.length,E=n+b;g=ie(e,Km(E,f))}else if(rh(c)){var P=th(c)?2:1,U=ie(c,1,1+P),$=rp(U);if($<0||$>99)throw new oe("Assertion failed: `index` must be >= 0 and <= 99");var X=o.length;$>X&&P===2&&(P=1,U=ie(U,0,1),$=rp(U)),m=ie(c,0,1+P),1<=$&&$<=X?(v=o[$-1],typeof v=="undefined"?g="":g=v):g=m}else if(Fr("$<",c)){var Ae=Zm(c,">",0);if(Ae===-1||typeof i=="undefined")m="$<",g=m;else{m=ie(c,0,Ae+1);var lr=ie(c,2,Ae);if(tp(i)!=="Object")throw new oe("Assertion failed: Type(namedCaptures) is not Object");v=Hm(i,lr),typeof v=="undefined"?g="":g=Qm(v)}}else m=ie(c,0,1),g=m;var Wr=m.length;c=ie(c,Wr),y+=g}return y}});var ho=h((FA,pp)=>{"use strict";a();s();var ap=fs(),nh=su(),oh=ip(),ih=Xn(),ah=It(),Ft=Nt(),sp=uo(),sh=V(),Ot=M(),uh=nn()(),ph=no(),fh=sh("%Math.max%"),up=I(),lh=Ot("Array.prototype.push"),mo=Ot("String.prototype.slice"),ch=Ot("String.prototype.indexOf"),dh=Ot("String.prototype.replace");pp.exports=function(r,e){var n=ah(this),o=ph(r);if(o&&ch(mo(r,r.source.length+2),"g")===-1)throw new up("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(uh&&Symbol.replace){if(r!=null){var i=nh(r,Symbol.replace);if(typeof i!="undefined")return ap(i,r,[n,e])}}else if(o)return dh(n,r,e);var u=Ft(n),f=Ft(r),c=ih(e);c||(e=Ft(e));for(var y=f.length,m=fh(1,y),g=[],v=sp(u,f,0);v!==-1;)lh(g,v),v=sp(u,f,v+m);for(var b=0,E="",P=0;P<g.length;P+=1){var U;if(c)U=Ft(ap(e,void 0,[f,g[P],u]));else{if(typeof e!="string")throw new up("Assertion failed: `replaceValue` should be a string at this point");var $=[];U=oh(f,u,g[P],$,void 0,e)}var X=mo(u,b,g[P]);E+=X+U,b=g[P]+y}return b<u.length&&(E+=mo(u,b)),E}});var go=h((BA,fp)=>{"use strict";a();s();var yh=ho();fp.exports=function(){return String.prototype.replaceAll||yh}});var cp=h(($A,lp)=>{"use strict";a();s();var mh=wr(),hh=go();lp.exports=function(){var r=hh();return mh(String.prototype,{replaceAll:r},{replaceAll:function(){return String.prototype.replaceAll!==r}}),r}});var hp=h((MA,mp)=>{"use strict";a();s();var gh=ft(),xh=wr(),dp=ho(),vh=go(),wh=cp(),yp=gh(dp);xh(yp,{getPolyfill:vh,implementation:dp,shim:wh});mp.exports=yp});var $x={};Yt($x,{DynamicSnippetsGenerator:()=>Dt});module.exports=No($x);a();s();var lC=qf(hp(),1);a();s();a();s();a();s();function R(t){throw new Error("Unexpected value: "+JSON.stringify(t))}a();s();function Or(t){return Object.keys(t)}a();s();a();s();a();s();a();s();a();s();a();s();var bh=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,gp=bh;var Ah=typeof self=="object"&&self&&self.Object===Object&&self,Sh=gp||Ah||Function("return this")(),xp=Sh;var Th=xp.Symbol,ae=Th;a();s();var vp=Object.prototype,Eh=vp.hasOwnProperty,Rh=vp.toString,Lr=ae?ae.toStringTag:void 0;function Ph(t){var r=Eh.call(t,Lr),e=t[Lr];try{t[Lr]=void 0;var n=!0}catch(i){}var o=Rh.call(t);return n&&(r?t[Lr]=e:delete t[Lr]),o}var wp=Ph;a();s();var Ih=Object.prototype,Nh=Ih.toString;function Ch(t){return Nh.call(t)}var bp=Ch;var Fh="[object Null]",Oh="[object Undefined]",Ap=ae?ae.toStringTag:void 0;function Lh(t){return t==null?t===void 0?Oh:Fh:Ap&&Ap in Object(t)?wp(t):bp(t)}var Sp=Lh;a();s();function Bh(t){return t!=null&&typeof t=="object"}var Tp=Bh;var Uh="[object Symbol]";function qh(t){return typeof t=="symbol"||Tp(t)&&Sp(t)==Uh}var Ep=qh;a();s();a();s();function $h(t,r){for(var e=-1,n=t==null?0:t.length,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o}var Rp=$h;a();s();var kh=Array.isArray,Pp=kh;var _h=1/0,Ip=ae?ae.prototype:void 0,Np=Ip?Ip.toString:void 0;function Cp(t){if(typeof t=="string")return t;if(Pp(t))return Rp(t,Cp)+"";if(Ep(t))return Np?Np.call(t):"";var r=t+"";return r=="0"&&1/t==-_h?"-0":r}var Fp=Cp;a();s();function Mh(t){return t==null?"":Fp(t)}var xe=Mh;a();s();a();s();a();s();a();s();a();s();a();s();function Dh(t,r,e){var n=-1,o=t.length;r<0&&(r=-r>o?0:o+r),e=e>o?o:e,e<0&&(e+=o),o=r>e?0:e-r>>>0,r>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+r];return i}var Op=Dh;function Wh(t,r,e){var n=t.length;return e=e===void 0?n:e,!r&&e>=n?t:Op(t,r,e)}var Lp=Wh;a();s();var jh="\\ud800-\\udfff",Gh="\\u0300-\\u036f",Vh="\\ufe20-\\ufe2f",zh="\\u20d0-\\u20ff",Yh=Gh+Vh+zh,Hh="\\ufe0e\\ufe0f",Jh="\\u200d",Kh=RegExp("["+Jh+jh+Yh+Hh+"]");function Zh(t){return Kh.test(t)}var Lt=Zh;a();s();a();s();function Qh(t){return t.split("")}var Bp=Qh;a();s();var Up="\\ud800-\\udfff",Xh="\\u0300-\\u036f",eg="\\ufe20-\\ufe2f",rg="\\u20d0-\\u20ff",tg=Xh+eg+rg,ng="\\ufe0e\\ufe0f",og="["+Up+"]",xo="["+tg+"]",vo="\\ud83c[\\udffb-\\udfff]",ig="(?:"+xo+"|"+vo+")",qp="[^"+Up+"]",$p="(?:\\ud83c[\\udde6-\\uddff]){2}",kp="[\\ud800-\\udbff][\\udc00-\\udfff]",ag="\\u200d",_p=ig+"?",Mp="["+ng+"]?",sg="(?:"+ag+"(?:"+[qp,$p,kp].join("|")+")"+Mp+_p+")*",ug=Mp+_p+sg,pg="(?:"+[qp+xo+"?",xo,$p,kp,og].join("|")+")",fg=RegExp(vo+"(?="+vo+")|"+pg+ug,"g");function lg(t){return t.match(fg)||[]}var Dp=lg;function cg(t){return Lt(t)?Dp(t):Bp(t)}var Wp=cg;function dg(t){return function(r){r=xe(r);var e=Lt(r)?Wp(r):void 0,n=e?e[0]:r.charAt(0),o=e?Lp(e,1).join(""):r.slice(1);return n[t]()+o}}var jp=dg;var yg=jp("toUpperCase"),ur=yg;function mg(t){return ur(xe(t).toLowerCase())}var Gp=mg;a();s();a();s();function hg(t,r,e,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(e=t[++o]);++o<i;)e=r(e,t[o],o,t);return e}var Vp=hg;a();s();a();s();a();s();function gg(t){return function(r){return t==null?void 0:t[r]}}var zp=gg;var xg={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},vg=zp(xg),Yp=vg;var wg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bg="\\u0300-\\u036f",Ag="\\ufe20-\\ufe2f",Sg="\\u20d0-\\u20ff",Tg=bg+Ag+Sg,Eg="["+Tg+"]",Rg=RegExp(Eg,"g");function Pg(t){return t=xe(t),t&&t.replace(wg,Yp).replace(Rg,"")}var Hp=Pg;a();s();a();s();var Ig=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ng(t){return t.match(Ig)||[]}var Jp=Ng;a();s();var Cg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Fg(t){return Cg.test(t)}var Kp=Fg;a();s();var rf="\\ud800-\\udfff",Og="\\u0300-\\u036f",Lg="\\ufe20-\\ufe2f",Bg="\\u20d0-\\u20ff",Ug=Og+Lg+Bg,tf="\\u2700-\\u27bf",nf="a-z\\xdf-\\xf6\\xf8-\\xff",qg="\\xac\\xb1\\xd7\\xf7",$g="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kg="\\u2000-\\u206f",_g=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",of="A-Z\\xc0-\\xd6\\xd8-\\xde",Mg="\\ufe0e\\ufe0f",af=qg+$g+kg+_g,sf="['\u2019]",Zp="["+af+"]",Dg="["+Ug+"]",uf="\\d+",Wg="["+tf+"]",pf="["+nf+"]",ff="[^"+rf+af+uf+tf+nf+of+"]",jg="\\ud83c[\\udffb-\\udfff]",Gg="(?:"+Dg+"|"+jg+")",Vg="[^"+rf+"]",lf="(?:\\ud83c[\\udde6-\\uddff]){2}",cf="[\\ud800-\\udbff][\\udc00-\\udfff]",pr="["+of+"]",zg="\\u200d",Qp="(?:"+pf+"|"+ff+")",Yg="(?:"+pr+"|"+ff+")",Xp="(?:"+sf+"(?:d|ll|m|re|s|t|ve))?",ef="(?:"+sf+"(?:D|LL|M|RE|S|T|VE))?",df=Gg+"?",yf="["+Mg+"]?",Hg="(?:"+zg+"(?:"+[Vg,lf,cf].join("|")+")"+yf+df+")*",Jg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Kg="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zg=yf+df+Hg,Qg="(?:"+[Wg,lf,cf].join("|")+")"+Zg,Xg=RegExp([pr+"?"+pf+"+"+Xp+"(?="+[Zp,pr,"$"].join("|")+")",Yg+"+"+ef+"(?="+[Zp,pr+Qp,"$"].join("|")+")",pr+"?"+Qp+"+"+Xp,pr+"+"+ef,Kg,Jg,uf,Qg].join("|"),"g");function ex(t){return t.match(Xg)||[]}var mf=ex;function rx(t,r,e){return t=xe(t),r=e?void 0:r,r===void 0?Kp(t)?mf(t):Jp(t):t.match(r)||[]}var hf=rx;var tx="['\u2019]",nx=RegExp(tx,"g");function ox(t){return function(r){return Vp(hf(Hp(r).replace(nx,"")),t,"")}}var gf=ox;var ix=gf(function(t,r,e){return r=r.toLowerCase(),t+(e?Gp(r):r)}),Bt=ix;a();s();a();s();var se=class{};a();s();a();s();var J=class extends se{constructor(e){super();d(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var ax=4,Br=class{constructor(){d(this,"buffer","");d(this,"indentLevel",0);d(this,"hasWrittenAnything",!1);d(this,"lastCharacterIsNewline",!1)}write(r){let e=r.length>0&&r.endsWith(`
|
|
14
|
-
`),n=e
|
|
1
|
+
"use strict";var pc=Object.create;var Et=Object.defineProperty,lc=Object.defineProperties,cc=Object.getOwnPropertyDescriptor,dc=Object.getOwnPropertyDescriptors,mc=Object.getOwnPropertyNames,rr=Object.getOwnPropertySymbols,hc=Object.getPrototypeOf,Sn=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable;var Tn=(r,e,t)=>e in r?Et(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,et=(r,e)=>{for(var t in e||(e={}))Sn.call(e,t)&&Tn(r,t,e[t]);if(rr)for(var t of rr(e))Xo.call(e,t)&&Tn(r,t,e[t]);return r},tt=(r,e)=>lc(r,dc(e));var ei=r=>typeof r=="symbol"?r:r+"",ti=(r,e)=>{var t={};for(var n in r)Sn.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&rr)for(var n of rr(r))e.indexOf(n)<0&&Xo.call(r,n)&&(t[n]=r[n]);return t};var rt=(r,e)=>()=>(r&&(e=r(r=0)),e);var x=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),En=(r,e)=>{for(var t in e)Et(r,t,{get:e[t],enumerable:!0})},ri=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of mc(e))!Sn.call(r,o)&&o!==t&&Et(r,o,{get:()=>e[o],enumerable:!(n=cc(e,o))||n.enumerable});return r};var yc=(r,e,t)=>(t=r!=null?pc(hc(r)):{},ri(e||!r||!r.__esModule?Et(t,"default",{value:r,enumerable:!0}):t,r)),ni=r=>ri(Et({},"__esModule",{value:!0}),r);var d=(r,e,t)=>Tn(r,typeof e!="symbol"?e+"":e,t);function ii(){throw new Error("setTimeout has not been defined")}function ai(){throw new Error("clearTimeout has not been defined")}function si(r){if(we===setTimeout)return setTimeout(r,0);if((we===ii||!we)&&setTimeout)return we=setTimeout,setTimeout(r,0);try{return we(r,0)}catch(e){try{return we.call(null,r,0)}catch(t){return we.call(this,r,0)}}}function gc(r){if(be===clearTimeout)return clearTimeout(r);if((be===ai||!be)&&clearTimeout)return be=clearTimeout,clearTimeout(r);try{return be(r)}catch(e){try{return be.call(null,r)}catch(t){return be.call(this,r)}}}function xc(){!ot||!Be||(ot=!1,Be.length?ie=Be.concat(ie):nr=-1,ie.length&&ui())}function ui(){if(!ot){var r=si(xc);ot=!0;for(var e=ie.length;e;){for(Be=ie,ie=[];++nr<e;)Be&&Be[nr].run();nr=-1,e=ie.length}Be=null,ot=!1,gc(r)}}function vc(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ie.push(new fi(r,e)),ie.length===1&&!ot&&si(ui)}function fi(r,e){this.fun=r,this.array=e}function qe(){}function qc(r){throw new Error("process.binding is not supported")}function Uc(){return"/"}function Mc(r){throw new Error("process.chdir is not supported")}function Dc(){return 0}function kc(r){var e=$c.call(nt)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}function Wc(){var r=new Date,e=r-jc;return e/1e3}var we,be,ie,ot,Be,nr,wc,bc,Ac,Tc,Sc,Ec,Rc,Ic,Pc,Cc,Nc,Oc,Lc,Fc,_c,Bc,nt,$c,jc,p,oi,i=rt(()=>{"use strict";we=ii,be=ai;typeof globalThis.setTimeout=="function"&&(we=setTimeout);typeof globalThis.clearTimeout=="function"&&(be=clearTimeout);ie=[],ot=!1,nr=-1;fi.prototype.run=function(){this.fun.apply(null,this.array)};wc="browser",bc="browser",Ac=!0,Tc={},Sc=[],Ec="",Rc={},Ic={},Pc={};Cc=qe,Nc=qe,Oc=qe,Lc=qe,Fc=qe,_c=qe,Bc=qe;nt=globalThis.performance||{},$c=nt.now||nt.mozNow||nt.msNow||nt.oNow||nt.webkitNow||function(){return new Date().getTime()};jc=new Date;p={nextTick:vc,title:wc,browser:Ac,env:Tc,argv:Sc,version:Ec,versions:Rc,on:Cc,addListener:Nc,once:Oc,off:Lc,removeListener:Fc,removeAllListeners:_c,emit:Bc,binding:qc,cwd:Uc,chdir:Mc,umask:Dc,hrtime:kc,platform:bc,release:Ic,config:Pc,uptime:Wc},oi={};Object.keys(oi).forEach(r=>{let e=r.split("."),t=p;for(let n=0;n<e.length;n++){let o=e[n];n===e.length-1?t[o]=oi[r]:t=t[o]||(t[o]={})}})});function di(){In=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)K[e]=r[e],D[r.charCodeAt(e)]=e;D[45]=62,D[95]=63}function zc(r){In||di();var e,t,n,o,s,f,l=r.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s=r[l-2]==="="?2:r[l-1]==="="?1:0,f=new Gc(l*3/4-s),n=s>0?l-4:l;var c=0;for(e=0,t=0;e<n;e+=4,t+=3)o=D[r.charCodeAt(e)]<<18|D[r.charCodeAt(e+1)]<<12|D[r.charCodeAt(e+2)]<<6|D[r.charCodeAt(e+3)],f[c++]=o>>16&255,f[c++]=o>>8&255,f[c++]=o&255;return s===2?(o=D[r.charCodeAt(e)]<<2|D[r.charCodeAt(e+1)]>>4,f[c++]=o&255):s===1&&(o=D[r.charCodeAt(e)]<<10|D[r.charCodeAt(e+1)]<<4|D[r.charCodeAt(e+2)]>>2,f[c++]=o>>8&255,f[c++]=o&255),f}function Vc(r){return K[r>>18&63]+K[r>>12&63]+K[r>>6&63]+K[r&63]}function Hc(r,e,t){for(var n,o=[],s=e;s<t;s+=3)n=(r[s]<<16)+(r[s+1]<<8)+r[s+2],o.push(Vc(n));return o.join("")}function pi(r){In||di();for(var e,t=r.length,n=t%3,o="",s=[],f=16383,l=0,c=t-n;l<c;l+=f)s.push(Hc(r,l,l+f>c?c:l+f));return n===1?(e=r[t-1],o+=K[e>>2],o+=K[e<<4&63],o+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],o+=K[e>>10],o+=K[e>>4&63],o+=K[e<<2&63],o+="="),s.push(o),s.join("")}function or(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ae(r,e){if(or()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=u.prototype):(r===null&&(r=new u(e)),r.length=e),r}function u(r,e,t){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return Pn(this,r)}return mi(this,r,e,t)}function mi(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?Jc(r,e,t,n):typeof e=="string"?Kc(r,e,t):Zc(r,e)}function hi(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 Yc(r,e,t,n){return hi(e),e<=0?ae(r,e):t!==void 0?typeof n=="string"?ae(r,e).fill(t,n):ae(r,e).fill(t):ae(r,e)}function Pn(r,e){if(hi(e),r=ae(r,e<0?0:Cn(e)|0),!u.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}function Kc(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!u.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=yi(e,t)|0;r=ae(r,n);var o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Rn(r,e){var t=e.length<0?0:Cn(e.length)|0;r=ae(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Jc(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),u.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=u.prototype):r=Rn(r,e),r}function Zc(r,e){if(J(e)){var t=Cn(e.length)|0;return r=ae(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||yd(e.length)?ae(r,0):Rn(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Rn(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Cn(r){if(r>=or())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+or().toString(16)+" bytes");return r|0}function J(r){return!!(r!=null&&r._isBuffer)}function yi(r,e){if(J(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 t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return ir(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Ti(r).length;default:if(n)return ir(r).length;e=(""+e).toLowerCase(),n=!0}}function Qc(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return ud(this,e,t);case"utf8":case"utf-8":return vi(this,e,t);case"ascii":return ad(this,e,t);case"latin1":case"binary":return sd(this,e,t);case"base64":return od(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fd(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function Ue(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function gi(r,e,t,n,o){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=o?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(o)return-1;t=r.length-1}else if(t<0)if(o)t=0;else return-1;if(typeof e=="string"&&(e=u.from(e,n)),J(e))return e.length===0?-1:li(r,e,t,n,o);if(typeof e=="number")return e=e&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):li(r,[e],t,n,o);throw new TypeError("val must be string, number or Buffer")}function li(r,e,t,n,o){var s=1,f=r.length,l=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;s=2,f/=2,l/=2,t/=2}function c(w,A){return s===1?w[A]:w.readUInt16BE(A*s)}var m;if(o){var h=-1;for(m=t;m<f;m++)if(c(r,m)===c(e,h===-1?0:m-h)){if(h===-1&&(h=m),m-h+1===l)return h*s}else h!==-1&&(m-=m-h),h=-1}else for(t+l>f&&(t=f-l),m=t;m>=0;m--){for(var y=!0,g=0;g<l;g++)if(c(r,m+g)!==c(e,g)){y=!1;break}if(y)return m}return-1}function Xc(r,e,t,n){t=Number(t)||0;var o=r.length-t;n?(n=Number(n),n>o&&(n=o)):n=o;var s=e.length;if(s%2!==0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var f=0;f<n;++f){var l=parseInt(e.substr(f*2,2),16);if(isNaN(l))return f;r[t+f]=l}return f}function ed(r,e,t,n){return ur(ir(e,r.length-t),r,t,n)}function xi(r,e,t,n){return ur(md(e),r,t,n)}function td(r,e,t,n){return xi(r,e,t,n)}function rd(r,e,t,n){return ur(Ti(e),r,t,n)}function nd(r,e,t,n){return ur(hd(e,r.length-t),r,t,n)}function od(r,e,t){return e===0&&t===r.length?pi(r):pi(r.slice(e,t))}function vi(r,e,t){t=Math.min(r.length,t);for(var n=[],o=e;o<t;){var s=r[o],f=null,l=s>239?4:s>223?3:s>191?2:1;if(o+l<=t){var c,m,h,y;switch(l){case 1:s<128&&(f=s);break;case 2:c=r[o+1],(c&192)===128&&(y=(s&31)<<6|c&63,y>127&&(f=y));break;case 3:c=r[o+1],m=r[o+2],(c&192)===128&&(m&192)===128&&(y=(s&15)<<12|(c&63)<<6|m&63,y>2047&&(y<55296||y>57343)&&(f=y));break;case 4:c=r[o+1],m=r[o+2],h=r[o+3],(c&192)===128&&(m&192)===128&&(h&192)===128&&(y=(s&15)<<18|(c&63)<<12|(m&63)<<6|h&63,y>65535&&y<1114112&&(f=y))}}f===null?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|f&1023),n.push(f),o+=l}return id(n)}function id(r){var e=r.length;if(e<=ci)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=ci));return t}function ad(r,e,t){var n="";t=Math.min(r.length,t);for(var o=e;o<t;++o)n+=String.fromCharCode(r[o]&127);return n}function sd(r,e,t){var n="";t=Math.min(r.length,t);for(var o=e;o<t;++o)n+=String.fromCharCode(r[o]);return n}function ud(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var o="",s=e;s<t;++s)o+=dd(r[s]);return o}function fd(r,e,t){for(var n=r.slice(e,t),o="",s=0;s<n.length;s+=2)o+=String.fromCharCode(n[s]+n[s+1]*256);return o}function N(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}function U(r,e,t,n,o,s){if(!J(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<s)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}function ar(r,e,t,n){e<0&&(e=65535+e+1);for(var o=0,s=Math.min(r.length-t,2);o<s;++o)r[t+o]=(e&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function sr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var o=0,s=Math.min(r.length-t,4);o<s;++o)r[t+o]=e>>>(n?o:3-o)*8&255}function wi(r,e,t,n,o,s){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function bi(r,e,t,n,o){return o||wi(r,e,t,4,34028234663852886e22,-34028234663852886e22),Ei(r,e,t,n,23,4),t+4}function Ai(r,e,t,n,o){return o||wi(r,e,t,8,17976931348623157e292,-17976931348623157e292),Ei(r,e,t,n,52,8),t+8}function ld(r){if(r=cd(r).replace(pd,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function cd(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function dd(r){return r<16?"0"+r.toString(16):r.toString(16)}function ir(r,e){e=e||1/0;for(var t,n=r.length,o=null,s=[],f=0;f<n;++f){if(t=r.charCodeAt(f),t>55295&&t<57344){if(!o){if(t>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(f+1===n){(e-=3)>-1&&s.push(239,191,189);continue}o=t;continue}if(t<56320){(e-=3)>-1&&s.push(239,191,189),o=t;continue}t=(o-55296<<10|t-56320)+65536}else o&&(e-=3)>-1&&s.push(239,191,189);if(o=null,t<128){if((e-=1)<0)break;s.push(t)}else if(t<2048){if((e-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function md(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function hd(r,e){for(var t,n,o,s=[],f=0;f<r.length&&!((e-=2)<0);++f)t=r.charCodeAt(f),n=t>>8,o=t%256,s.push(o),s.push(n);return s}function Ti(r){return zc(ld(r))}function ur(r,e,t,n){for(var o=0;o<n&&!(o+t>=e.length||o>=r.length);++o)e[o+t]=r[o];return o}function yd(r){return r!==r}function gd(r){return r!=null&&(!!r._isBuffer||Si(r)||xd(r))}function Si(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function xd(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Si(r.slice(0,0))}function fr(r,e,t,n,o){var s,f,l=o*8-n-1,c=(1<<l)-1,m=c>>1,h=-7,y=t?o-1:0,g=t?-1:1,w=r[e+y];for(y+=g,s=w&(1<<-h)-1,w>>=-h,h+=l;h>0;s=s*256+r[e+y],y+=g,h-=8);for(f=s&(1<<-h)-1,s>>=-h,h+=n;h>0;f=f*256+r[e+y],y+=g,h-=8);if(s===0)s=1-m;else{if(s===c)return f?NaN:(w?-1:1)*(1/0);f=f+Math.pow(2,n),s=s-m}return(w?-1:1)*f*Math.pow(2,s-n)}function Ei(r,e,t,n,o,s){var f,l,c,m=s*8-o-1,h=(1<<m)-1,y=h>>1,g=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:s-1,A=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,f=h):(f=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-f))<1&&(f--,c*=2),f+y>=1?e+=g/c:e+=g*Math.pow(2,1-y),e*c>=2&&(f++,c/=2),f+y>=h?(l=0,f=h):f+y>=1?(l=(e*c-1)*Math.pow(2,o),f=f+y):(l=e*Math.pow(2,y-1)*Math.pow(2,o),f=0));o>=8;r[t+w]=l&255,w+=A,l/=256,o-=8);for(f=f<<o|l,m+=o;m>0;r[t+w]=f&255,w+=A,f/=256,m-=8);r[t+w-A]|=E*128}var K,D,Gc,In,ci,pd,Ri=rt(()=>{"use strict";i();a();K=[],D=[],Gc=typeof Uint8Array!="undefined"?Uint8Array:Array,In=!1;u.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;u.poolSize=8192;u._augment=function(r){return r.__proto__=u.prototype,r};u.from=function(r,e,t){return mi(null,r,e,t)};u.kMaxLength=or();u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]);u.alloc=function(r,e,t){return Yc(null,r,e,t)};u.allocUnsafe=function(r){return Pn(null,r)};u.allocUnsafeSlow=function(r){return Pn(null,r)};u.isBuffer=gd;u.compare=function(e,t){if(!J(e)||!J(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,o=t.length,s=0,f=Math.min(n,o);s<f;++s)if(e[s]!==t[s]){n=e[s],o=t[s];break}return n<o?-1:o<n?1:0};u.isEncoding=function(e){switch(String(e).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}};u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return u.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var o=u.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var f=e[n];if(!J(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(o,s),s+=f.length}return o};u.byteLength=yi;u.prototype._isBuffer=!0;u.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Ue(this,t,t+1);return this};u.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Ue(this,t,t+3),Ue(this,t+1,t+2);return this};u.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Ue(this,t,t+7),Ue(this,t+1,t+6),Ue(this,t+2,t+5),Ue(this,t+3,t+4);return this};u.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?vi(this,0,e):Qc.apply(this,arguments)};u.prototype.equals=function(e){if(!J(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:u.compare(this,e)===0};u.prototype.compare=function(e,t,n,o,s){if(!J(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),s===void 0&&(s=this.length),t<0||n>e.length||o<0||s>this.length)throw new RangeError("out of range index");if(o>=s&&t>=n)return 0;if(o>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,o>>>=0,s>>>=0,this===e)return 0;for(var f=s-o,l=n-t,c=Math.min(f,l),m=this.slice(o,s),h=e.slice(t,n),y=0;y<c;++y)if(m[y]!==h[y]){f=m[y],l=h[y];break}return f<l?-1:l<f?1:0};u.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};u.prototype.indexOf=function(e,t,n){return gi(this,e,t,n,!0)};u.prototype.lastIndexOf=function(e,t,n){return gi(this,e,t,n,!1)};u.prototype.write=function(e,t,n,o){if(t===void 0)o="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")o=t,n=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s=this.length-t;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var f=!1;;)switch(o){case"hex":return Xc(this,e,t,n);case"utf8":case"utf-8":return ed(this,e,t,n);case"ascii":return xi(this,e,t,n);case"latin1":case"binary":return td(this,e,t,n);case"base64":return rd(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nd(this,e,t,n);default:if(f)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),f=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ci=4096;u.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var o;if(u.TYPED_ARRAY_SUPPORT)o=this.subarray(e,t),o.__proto__=u.prototype;else{var s=t-e;o=new u(s,void 0);for(var f=0;f<s;++f)o[f]=this[f+e]}return o};u.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||N(e,t,this.length);for(var o=this[e],s=1,f=0;++f<t&&(s*=256);)o+=this[e+f]*s;return o};u.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||N(e,t,this.length);for(var o=this[e+--t],s=1;t>0&&(s*=256);)o+=this[e+--t]*s;return o};u.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]};u.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8};u.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]};u.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};u.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};u.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||N(e,t,this.length);for(var o=this[e],s=1,f=0;++f<t&&(s*=256);)o+=this[e+f]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*t)),o};u.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||N(e,t,this.length);for(var o=t,s=1,f=this[e+--o];o>0&&(s*=256);)f+=this[e+--o]*s;return s*=128,f>=s&&(f-=Math.pow(2,8*t)),f};u.prototype.readInt8=function(e,t){return t||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};u.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};u.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};u.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),fr(this,e,!0,23,4)};u.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),fr(this,e,!1,23,4)};u.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),fr(this,e,!0,52,8)};u.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),fr(this,e,!1,52,8)};u.prototype.writeUIntLE=function(e,t,n,o){if(e=+e,t=t|0,n=n|0,!o){var s=Math.pow(2,8*n)-1;U(this,e,t,n,s,0)}var f=1,l=0;for(this[t]=e&255;++l<n&&(f*=256);)this[t+l]=e/f&255;return t+n};u.prototype.writeUIntBE=function(e,t,n,o){if(e=+e,t=t|0,n=n|0,!o){var s=Math.pow(2,8*n)-1;U(this,e,t,n,s,0)}var f=n-1,l=1;for(this[t+f]=e&255;--f>=0&&(l*=256);)this[t+f]=e/l&255;return t+n};u.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):ar(this,e,t,!0),t+2};u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):ar(this,e,t,!1),t+2};u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):sr(this,e,t,!0),t+4};u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):sr(this,e,t,!1),t+4};u.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t=t|0,!o){var s=Math.pow(2,8*n-1);U(this,e,t,n,s-1,-s)}var f=0,l=1,c=0;for(this[t]=e&255;++f<n&&(l*=256);)e<0&&c===0&&this[t+f-1]!==0&&(c=1),this[t+f]=(e/l>>0)-c&255;return t+n};u.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t=t|0,!o){var s=Math.pow(2,8*n-1);U(this,e,t,n,s-1,-s)}var f=n-1,l=1,c=0;for(this[t+f]=e&255;--f>=0&&(l*=256);)e<0&&c===0&&this[t+f+1]!==0&&(c=1),this[t+f]=(e/l>>0)-c&255;return t+n};u.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1};u.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):ar(this,e,t,!0),t+2};u.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):ar(this,e,t,!1),t+2};u.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):sr(this,e,t,!0),t+4};u.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):sr(this,e,t,!1),t+4};u.prototype.writeFloatLE=function(e,t,n){return bi(this,e,t,!0,n)};u.prototype.writeFloatBE=function(e,t,n){return bi(this,e,t,!1,n)};u.prototype.writeDoubleLE=function(e,t,n){return Ai(this,e,t,!0,n)};u.prototype.writeDoubleBE=function(e,t,n){return Ai(this,e,t,!1,n)};u.prototype.copy=function(e,t,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-n&&(o=e.length-t+n);var s=o-n,f;if(this===e&&n<t&&t<o)for(f=s-1;f>=0;--f)e[f+t]=this[f+n];else if(s<1e3||!u.TYPED_ARRAY_SUPPORT)for(f=0;f<s;++f)e[f+t]=this[f+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s};u.prototype.fill=function(e,t,n,o){if(typeof e=="string"){if(typeof t=="string"?(o=t,t=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var s=e.charCodeAt(0);s<256&&(e=s)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!u.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var f;if(typeof e=="number")for(f=t;f<n;++f)this[f]=e;else{var l=J(e)?e:ir(new u(e,o).toString()),c=l.length;for(f=0;f<n-t;++f)this[f+t]=l[f%c]}return this};pd=/[^+\/0-9A-Za-z-_]/g});var a=rt(()=>{"use strict";Ri()});var Nn=x((wA,Ii)=>{"use strict";i();a();Ii.exports=Object});var Ci=x((TA,Pi)=>{"use strict";i();a();Pi.exports=Error});var Oi=x((RA,Ni)=>{"use strict";i();a();Ni.exports=EvalError});var Fi=x((CA,Li)=>{"use strict";i();a();Li.exports=RangeError});var Bi=x((LA,_i)=>{"use strict";i();a();_i.exports=ReferenceError});var On=x((BA,qi)=>{"use strict";i();a();qi.exports=SyntaxError});var _=x((MA,Ui)=>{"use strict";i();a();Ui.exports=TypeError});var Di=x((kA,Mi)=>{"use strict";i();a();Mi.exports=URIError});var Ln=x((GA,$i)=>{"use strict";i();a();$i.exports=Math.abs});var Fn=x((HA,ki)=>{"use strict";i();a();ki.exports=Math.floor});var Wi=x((JA,ji)=>{"use strict";i();a();ji.exports=Math.max});var _n=x((XA,Gi)=>{"use strict";i();a();Gi.exports=Math.min});var Vi=x((rT,zi)=>{"use strict";i();a();zi.exports=Math.pow});var Yi=x((iT,Hi)=>{"use strict";i();a();Hi.exports=Math.round});var pr=x((uT,Ki)=>{"use strict";i();a();Ki.exports=Number.isNaN||function(e){return e!==e}});var Zi=x((lT,Ji)=>{"use strict";i();a();var vd=pr();Ji.exports=function(e){return vd(e)||e===0?e:e<0?-1:1}});var Xi=x((mT,Qi)=>{"use strict";i();a();Qi.exports=Object.getOwnPropertyDescriptor});var it=x((gT,ea)=>{"use strict";i();a();var lr=Xi();if(lr)try{lr([],"length")}catch(r){lr=null}ea.exports=lr});var Rt=x((wT,ta)=>{"use strict";i();a();var cr=Object.defineProperty||!1;if(cr)try{cr({},"a",{value:1})}catch(r){cr=!1}ta.exports=cr});var Bn=x((TT,ra)=>{"use strict";i();a();ra.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var f=Object.getOwnPropertySymbols(e);if(f.length!==1||f[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,t);if(l.value!==o||l.enumerable!==!0)return!1}return!0}});var qn=x((RT,oa)=>{"use strict";i();a();var na=typeof Symbol!="undefined"&&Symbol,wd=Bn();oa.exports=function(){return typeof na!="function"||typeof Symbol!="function"||typeof na("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:wd()}});var Un=x((CT,ia)=>{"use strict";i();a();ia.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Mn=x((LT,aa)=>{"use strict";i();a();var bd=Nn();aa.exports=bd.getPrototypeOf||null});var fa=x((BT,ua)=>{"use strict";i();a();var Ad="Function.prototype.bind called on incompatible ",Td=Object.prototype.toString,Sd=Math.max,Ed="[object Function]",sa=function(e,t){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var s=0;s<t.length;s+=1)n[s+e.length]=t[s];return n},Rd=function(e,t){for(var n=[],o=t||0,s=0;o<e.length;o+=1,s+=1)n[s]=e[o];return n},Id=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t};ua.exports=function(e){var t=this;if(typeof t!="function"||Td.apply(t)!==Ed)throw new TypeError(Ad+t);for(var n=Rd(arguments,1),o,s=function(){if(this instanceof o){var h=t.apply(this,sa(n,arguments));return Object(h)===h?h:this}return t.apply(e,sa(n,arguments))},f=Sd(0,t.length-n.length),l=[],c=0;c<f;c++)l[c]="$"+c;if(o=Function("binder","return function ("+Id(l,",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var m=function(){};m.prototype=t.prototype,o.prototype=new m,m.prototype=null}return o}});var at=x((MT,pa)=>{"use strict";i();a();var Pd=fa();pa.exports=Function.prototype.bind||Pd});var dr=x((kT,la)=>{"use strict";i();a();la.exports=Function.prototype.call});var mr=x((GT,ca)=>{"use strict";i();a();ca.exports=Function.prototype.apply});var ma=x((HT,da)=>{"use strict";i();a();da.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Dn=x((JT,ha)=>{"use strict";i();a();var Cd=at(),Nd=mr(),Od=dr(),Ld=ma();ha.exports=Ld||Cd.call(Od,Nd)});var hr=x((XT,ya)=>{"use strict";i();a();var Fd=at(),_d=_(),Bd=dr(),qd=Dn();ya.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new _d("a function is required");return qd(Fd,Bd,e)}});var Aa=x((rS,ba)=>{"use strict";i();a();var Ud=hr(),ga=it(),va;try{va=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var $n=!!va&&ga&&ga(Object.prototype,"__proto__"),wa=Object,xa=wa.getPrototypeOf;ba.exports=$n&&typeof $n.get=="function"?Ud([$n.get]):typeof xa=="function"?function(e){return xa(e==null?e:wa(e))}:!1});var Ia=x((iS,Ra)=>{"use strict";i();a();var Ta=Un(),Sa=Mn(),Ea=Aa();Ra.exports=Ta?function(e){return Ta(e)}:Sa?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Sa(e)}:Ea?function(e){return Ea(e)}:null});var kn=x((uS,Pa)=>{"use strict";i();a();var Md=Function.prototype.call,Dd=Object.prototype.hasOwnProperty,$d=at();Pa.exports=$d.call(Md,Dd)});var se=x((lS,_a)=>{"use strict";i();a();var T,kd=Nn(),jd=Ci(),Wd=Oi(),Gd=Fi(),zd=Bi(),pt=On(),ft=_(),Vd=Di(),Hd=Ln(),Yd=Fn(),Kd=Wi(),Jd=_n(),Zd=Vi(),Qd=Yi(),Xd=Zi(),La=Function,jn=function(r){try{return La('"use strict"; return ('+r+").constructor;")()}catch(e){}},It=it(),em=Rt(),Wn=function(){throw new ft},tm=It?(function(){try{return arguments.callee,Wn}catch(r){try{return It(arguments,"callee").get}catch(e){return Wn}}})():Wn,st=qn()(),O=Ia(),rm=Mn(),nm=Un(),Fa=mr(),Pt=dr(),ut={},om=typeof Uint8Array=="undefined"||!O?T:O(Uint8Array),Me={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?T:ArrayBuffer,"%ArrayIteratorPrototype%":st&&O?O([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":ut,"%AsyncGenerator%":ut,"%AsyncGeneratorFunction%":ut,"%AsyncIteratorPrototype%":ut,"%Atomics%":typeof Atomics=="undefined"?T:Atomics,"%BigInt%":typeof BigInt=="undefined"?T:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?T:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?T:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?T:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":jd,"%eval%":eval,"%EvalError%":Wd,"%Float16Array%":typeof Float16Array=="undefined"?T:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?T:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?T:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?T:FinalizationRegistry,"%Function%":La,"%GeneratorFunction%":ut,"%Int8Array%":typeof Int8Array=="undefined"?T:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?T:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":st&&O?O(O([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map=="undefined"?T:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!st||!O?T:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":kd,"%Object.getOwnPropertyDescriptor%":It,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?T:Promise,"%Proxy%":typeof Proxy=="undefined"?T:Proxy,"%RangeError%":Gd,"%ReferenceError%":zd,"%Reflect%":typeof Reflect=="undefined"?T:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?T:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!st||!O?T:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":st&&O?O(""[Symbol.iterator]()):T,"%Symbol%":st?Symbol:T,"%SyntaxError%":pt,"%ThrowTypeError%":tm,"%TypedArray%":om,"%TypeError%":ft,"%Uint8Array%":typeof Uint8Array=="undefined"?T:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?T:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?T:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?T:Uint32Array,"%URIError%":Vd,"%WeakMap%":typeof WeakMap=="undefined"?T:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?T:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?T:WeakSet,"%Function.prototype.call%":Pt,"%Function.prototype.apply%":Fa,"%Object.defineProperty%":em,"%Object.getPrototypeOf%":rm,"%Math.abs%":Hd,"%Math.floor%":Yd,"%Math.max%":Kd,"%Math.min%":Jd,"%Math.pow%":Zd,"%Math.round%":Qd,"%Math.sign%":Xd,"%Reflect.getPrototypeOf%":nm};if(O)try{null.error}catch(r){Ca=O(O(r)),Me["%Error.prototype%"]=Ca}var Ca,im=function r(e){var t;if(e==="%AsyncFunction%")t=jn("async function () {}");else if(e==="%GeneratorFunction%")t=jn("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=jn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=r("%AsyncGenerator%");o&&O&&(t=O(o.prototype))}return Me[e]=t,t},Na={__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=at(),yr=kn(),am=Ct.call(Pt,Array.prototype.concat),sm=Ct.call(Fa,Array.prototype.splice),Oa=Ct.call(Pt,String.prototype.replace),gr=Ct.call(Pt,String.prototype.slice),um=Ct.call(Pt,RegExp.prototype.exec),fm=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pm=/\\(\\)?/g,lm=function(e){var t=gr(e,0,1),n=gr(e,-1);if(t==="%"&&n!=="%")throw new pt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new pt("invalid intrinsic syntax, expected opening `%`");var o=[];return Oa(e,fm,function(s,f,l,c){o[o.length]=l?Oa(c,pm,"$1"):f||s}),o},cm=function(e,t){var n=e,o;if(yr(Na,n)&&(o=Na[n],n="%"+o[0]+"%"),yr(Me,n)){var s=Me[n];if(s===ut&&(s=im(n)),typeof s=="undefined"&&!t)throw new ft("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:s}}throw new pt("intrinsic "+e+" does not exist!")};_a.exports=function(e,t){if(typeof e!="string"||e.length===0)throw new ft("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ft('"allowMissing" argument must be a boolean');if(um(/^%?[^%]*%?$/,e)===null)throw new pt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=lm(e),o=n.length>0?n[0]:"",s=cm("%"+o+"%",t),f=s.name,l=s.value,c=!1,m=s.alias;m&&(o=m[0],sm(n,am([0,1],m)));for(var h=1,y=!0;h<n.length;h+=1){var g=n[h],w=gr(g,0,1),A=gr(g,-1);if((w==='"'||w==="'"||w==="`"||A==='"'||A==="'"||A==="`")&&w!==A)throw new pt("property names with quotes must have matching quotes");if((g==="constructor"||!y)&&(c=!0),o+="."+g,f="%"+o+"%",yr(Me,f))l=Me[f];else if(l!=null){if(!(g in l)){if(!t)throw new ft("base intrinsic for "+e+" exists, but the property is not available.");return}if(It&&h+1>=n.length){var E=It(l,g);y=!!E,y&&"get"in E&&!("originalValue"in E.get)?l=E.get:l=l[g]}else y=yr(l,g),l=l[g];y&&!c&&(Me[f]=l)}}return l}});var xr=x((mS,Ua)=>{"use strict";i();a();var Ba=Rt(),dm=On(),lt=_(),qa=it();Ua.exports=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new lt("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new lt("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new lt("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new lt("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new lt("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new lt("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,c=!!qa&&qa(e,t);if(Ba)Ba(e,t,{configurable:f===null&&c?c.configurable:!f,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:s===null&&c?c.writable:!s});else if(l||!o&&!s&&!f)e[t]=n;else throw new dm("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var vr=x((gS,Da)=>{"use strict";i();a();var Gn=Rt(),Ma=function(){return!!Gn};Ma.hasArrayLengthDefineBug=function(){if(!Gn)return null;try{return Gn([],"length",{value:1}).length!==1}catch(e){return!0}};Da.exports=Ma});var Ga=x((wS,Wa)=>{"use strict";i();a();var mm=se(),$a=xr(),hm=vr()(),ka=it(),ja=_(),ym=mm("%Math.floor%");Wa.exports=function(e,t){if(typeof e!="function")throw new ja("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||ym(t)!==t)throw new ja("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in e&&ka){var f=ka(e,"length");f&&!f.configurable&&(o=!1),f&&!f.writable&&(s=!1)}return(o||s||!n)&&(hm?$a(e,"length",t,!0,!0):$a(e,"length",t)),e}});var Va=x((TS,za)=>{"use strict";i();a();var gm=at(),xm=mr(),vm=Dn();za.exports=function(){return vm(gm,xm,arguments)}});var br=x((RS,wr)=>{"use strict";i();a();var wm=Ga(),Ha=Rt(),bm=hr(),Ya=Va();wr.exports=function(e){var t=bm(arguments),n=e.length-(arguments.length-1);return wm(t,1+(n>0?n:0),!0)};Ha?Ha(wr.exports,"apply",{value:Ya}):wr.exports.apply=Ya});var zn=x((CS,Ja)=>{"use strict";i();a();var Ka=Object.prototype.toString;Ja.exports=function(e){var t=Ka.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ka.call(e.callee)==="[object Function]"),n}});var is=x((LS,os)=>{"use strict";i();a();var ns;Object.keys||(Nt=Object.prototype.hasOwnProperty,Vn=Object.prototype.toString,Za=zn(),Hn=Object.prototype.propertyIsEnumerable,Qa=!Hn.call({toString:null},"toString"),Xa=Hn.call(function(){},"prototype"),Ot=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ar=function(r){var e=r.constructor;return e&&e.prototype===r},es={$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},ts=(function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!es["$"+r]&&Nt.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{Ar(window[r])}catch(e){return!0}}catch(e){return!0}return!1})(),rs=function(r){if(typeof window=="undefined"||!ts)return Ar(r);try{return Ar(r)}catch(e){return!1}},ns=function(e){var t=e!==null&&typeof e=="object",n=Vn.call(e)==="[object Function]",o=Za(e),s=t&&Vn.call(e)==="[object String]",f=[];if(!t&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var l=Xa&&n;if(s&&e.length>0&&!Nt.call(e,0))for(var c=0;c<e.length;++c)f.push(String(c));if(o&&e.length>0)for(var m=0;m<e.length;++m)f.push(String(m));else for(var h in e)!(l&&h==="prototype")&&Nt.call(e,h)&&f.push(String(h));if(Qa)for(var y=rs(e),g=0;g<Ot.length;++g)!(y&&Ot[g]==="constructor")&&Nt.call(e,Ot[g])&&f.push(Ot[g]);return f});var Nt,Vn,Za,Hn,Qa,Xa,Ot,Ar,es,ts,rs;os.exports=ns});var fs=x((BS,us)=>{"use strict";i();a();var Am=Array.prototype.slice,Tm=zn(),as=Object.keys,Tr=as?function(e){return as(e)}:is(),ss=Object.keys;Tr.shim=function(){if(Object.keys){var e=(function(){var t=Object.keys(arguments);return t&&t.length===arguments.length})(1,2);e||(Object.keys=function(n){return Tm(n)?ss(Am.call(n)):ss(n)})}else Object.keys=Tr;return Object.keys||Tr};us.exports=Tr});var Sr=x((MS,ds)=>{"use strict";i();a();var Sm=fs(),Em=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Rm=Object.prototype.toString,Im=Array.prototype.concat,ps=xr(),Pm=function(r){return typeof r=="function"&&Rm.call(r)==="[object Function]"},ls=vr()(),Cm=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!Pm(n)||!n())return}ls?ps(r,e,t,!0):ps(r,e,t)},cs=function(r,e){var t=arguments.length>2?arguments[2]:{},n=Sm(e);Em&&(n=Im.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)Cm(r,n[o],e[n[o]],t[n[o]])};cs.supportsDescriptors=!!ls;ds.exports=cs});var Z=x((kS,ys)=>{"use strict";i();a();var ms=se(),hs=hr(),Nm=hs([ms("%String.prototype.indexOf%")]);ys.exports=function(e,t){var n=ms(e,!!t);return typeof n=="function"&&Nm(e,".prototype.")>-1?hs([n]):n}});var vs=x((GS,xs)=>{"use strict";i();a();var Om=se(),gs=Om("%Array%"),Lm=!gs.isArray&&Z()("Object.prototype.toString");xs.exports=gs.isArray||function(e){return Lm(e)==="[object Array]"}});var Yn=x((HS,ws)=>{"use strict";i();a();ws.exports=vs()});var As=x((JS,bs)=>{"use strict";i();a();var Fm=se(),_m=Z(),Bm=_(),qm=Yn(),Um=Fm("%Reflect.apply%",!0)||_m("Function.prototype.apply");bs.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!qm(n))throw new Bm("Assertion failed: optional `argumentsList`, if provided, must be a List");return Um(e,t,n)}});function Ts(){throw new Error("setTimeout has not been defined")}function Ss(){throw new Error("clearTimeout has not been defined")}function Es(r){if(Ae===setTimeout)return setTimeout(r,0);if((Ae===Ts||!Ae)&&setTimeout)return Ae=setTimeout,setTimeout(r,0);try{return Ae(r,0)}catch(e){try{return Ae.call(null,r,0)}catch(t){return Ae.call(this,r,0)}}}function Mm(r){if(Te===clearTimeout)return clearTimeout(r);if((Te===Ss||!Te)&&clearTimeout)return Te=clearTimeout,clearTimeout(r);try{return Te(r)}catch(e){try{return Te.call(null,r)}catch(t){return Te.call(this,r)}}}function Dm(){!dt||!De||(dt=!1,De.length?ue=De.concat(ue):Er=-1,ue.length&&Rs())}function Rs(){if(!dt){var r=Es(Dm);dt=!0;for(var e=ue.length;e;){for(De=ue,ue=[];++Er<e;)De&&De[Er].run();Er=-1,e=ue.length}De=null,dt=!1,Mm(r)}}function $m(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ue.push(new Is(r,e)),ue.length===1&&!dt&&Es(Rs)}function Is(r,e){this.fun=r,this.array=e}function $e(){}function nh(r){throw new Error("process.binding is not supported")}function oh(){return"/"}function ih(r){throw new Error("process.chdir is not supported")}function ah(){return 0}function uh(r){var e=sh.call(ct)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}function ph(){var r=new Date,e=r-fh;return e/1e3}var Ae,Te,ue,dt,De,Er,km,jm,Wm,Gm,zm,Vm,Hm,Ym,Km,Jm,Zm,Qm,Xm,eh,th,rh,ct,sh,fh,lh,Lt,Ps=rt(()=>{"use strict";i();a();Ae=Ts,Te=Ss;typeof globalThis.setTimeout=="function"&&(Ae=setTimeout);typeof globalThis.clearTimeout=="function"&&(Te=clearTimeout);ue=[],dt=!1,Er=-1;Is.prototype.run=function(){this.fun.apply(null,this.array)};km="browser",jm="browser",Wm=!0,Gm={},zm=[],Vm="",Hm={},Ym={},Km={};Jm=$e,Zm=$e,Qm=$e,Xm=$e,eh=$e,th=$e,rh=$e;ct=globalThis.performance||{},sh=ct.now||ct.mozNow||ct.msNow||ct.oNow||ct.webkitNow||function(){return new Date().getTime()};fh=new Date;lh={nextTick:$m,title:km,browser:Wm,env:Gm,argv:zm,version:Vm,versions:Hm,on:Jm,addListener:Zm,once:Qm,off:Xm,removeListener:eh,removeAllListeners:th,emit:rh,binding:nh,cwd:oh,chdir:ih,umask:ah,hrtime:uh,platform:jm,release:Ym,config:Km,uptime:ph},Lt=lh});var Kn,Jn,Cs=rt(()=>{"use strict";i();a();typeof Object.create=="function"?Kn=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Kn=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};Jn=Kn});var Us={};En(Us,{_extend:()=>io,debuglog:()=>Ns,default:()=>bh,deprecate:()=>to,format:()=>Cr,inherits:()=>Jn,inspect:()=>X,isArray:()=>ro,isBoolean:()=>Nr,isBuffer:()=>_s,isDate:()=>Pr,isError:()=>_t,isFunction:()=>Bt,isNull:()=>qt,isNullOrUndefined:()=>Os,isNumber:()=>no,isObject:()=>ke,isPrimitive:()=>Fs,isRegExp:()=>Ft,isString:()=>Ut,isSymbol:()=>Ls,isUndefined:()=>Q,log:()=>Bs});function Cr(r){if(!Ut(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(X(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,o=n.length,s=String(r).replace(ch,function(l){if(l==="%%")return"%";if(t>=o)return l;switch(l){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(c){return"[Circular]"}default:return l}}),f=n[t];t<o;f=n[++t])qt(f)||!ke(f)?s+=" "+f:s+=" "+X(f);return s}function to(r,e){if(Q(globalThis.process))return function(){return to(r,e).apply(this,arguments)};if(Lt.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Lt.throwDeprecation)throw new Error(e);Lt.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}function Ns(r){if(Q(Zn)&&(Zn=Lt.env.NODE_DEBUG||""),r=r.toUpperCase(),!Rr[r])if(new RegExp("\\b"+r+"\\b","i").test(Zn)){var e=0;Rr[r]=function(){var t=Cr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else Rr[r]=function(){};return Rr[r]}function X(r,e){var t={seen:[],stylize:mh};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Nr(e)?t.showHidden=e:e&&io(t,e),Q(t.showHidden)&&(t.showHidden=!1),Q(t.depth)&&(t.depth=2),Q(t.colors)&&(t.colors=!1),Q(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=dh),Ir(t,r,t.depth)}function dh(r,e){var t=X.styles[e];return t?"\x1B["+X.colors[t][0]+"m"+r+"\x1B["+X.colors[t][1]+"m":r}function mh(r,e){return r}function hh(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function Ir(r,e,t){if(r.customInspect&&e&&Bt(e.inspect)&&e.inspect!==X&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return Ut(n)||(n=Ir(r,n,t)),n}var o=yh(r,e);if(o)return o;var s=Object.keys(e),f=hh(s);if(r.showHidden&&(s=Object.getOwnPropertyNames(e)),_t(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return Qn(e);if(s.length===0){if(Bt(e)){var l=e.name?": "+e.name:"";return r.stylize("[Function"+l+"]","special")}if(Ft(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(Pr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(_t(e))return Qn(e)}var c="",m=!1,h=["{","}"];if(ro(e)&&(m=!0,h=["[","]"]),Bt(e)){var y=e.name?": "+e.name:"";c=" [Function"+y+"]"}if(Ft(e)&&(c=" "+RegExp.prototype.toString.call(e)),Pr(e)&&(c=" "+Date.prototype.toUTCString.call(e)),_t(e)&&(c=" "+Qn(e)),s.length===0&&(!m||e.length==0))return h[0]+c+h[1];if(t<0)return Ft(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var g;return m?g=gh(r,e,t,f,s):g=s.map(function(w){return eo(r,e,t,f,w,m)}),r.seen.pop(),xh(g,c,h)}function yh(r,e){if(Q(e))return r.stylize("undefined","undefined");if(Ut(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(no(e))return r.stylize(""+e,"number");if(Nr(e))return r.stylize(""+e,"boolean");if(qt(e))return r.stylize("null","null")}function Qn(r){return"["+Error.prototype.toString.call(r)+"]"}function gh(r,e,t,n,o){for(var s=[],f=0,l=e.length;f<l;++f)qs(e,String(f))?s.push(eo(r,e,t,n,String(f),!0)):s.push("");return o.forEach(function(c){c.match(/^\d+$/)||s.push(eo(r,e,t,n,c,!0))}),s}function eo(r,e,t,n,o,s){var f,l,c;if(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},c.get?c.set?l=r.stylize("[Getter/Setter]","special"):l=r.stylize("[Getter]","special"):c.set&&(l=r.stylize("[Setter]","special")),qs(n,o)||(f="["+o+"]"),l||(r.seen.indexOf(c.value)<0?(qt(t)?l=Ir(r,c.value,null):l=Ir(r,c.value,t-1),l.indexOf(`
|
|
2
|
+
`)>-1&&(s?l=l.split(`
|
|
3
|
+
`).map(function(m){return" "+m}).join(`
|
|
4
|
+
`).substr(2):l=`
|
|
5
|
+
`+l.split(`
|
|
6
|
+
`).map(function(m){return" "+m}).join(`
|
|
7
|
+
`))):l=r.stylize("[Circular]","special")),Q(f)){if(s&&o.match(/^\d+$/))return l;f=JSON.stringify(""+o),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.substr(1,f.length-2),f=r.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=r.stylize(f,"string"))}return f+": "+l}function xh(r,e,t){var n=0,o=r.reduce(function(s,f){return n++,f.indexOf(`
|
|
8
|
+
`)>=0&&n++,s+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?t[0]+(e===""?"":e+`
|
|
9
|
+
`)+" "+r.join(`,
|
|
10
|
+
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function ro(r){return Array.isArray(r)}function Nr(r){return typeof r=="boolean"}function qt(r){return r===null}function Os(r){return r==null}function no(r){return typeof r=="number"}function Ut(r){return typeof r=="string"}function Ls(r){return typeof r=="symbol"}function Q(r){return r===void 0}function Ft(r){return ke(r)&&oo(r)==="[object RegExp]"}function ke(r){return typeof r=="object"&&r!==null}function Pr(r){return ke(r)&&oo(r)==="[object Date]"}function _t(r){return ke(r)&&(oo(r)==="[object Error]"||r instanceof Error)}function Bt(r){return typeof r=="function"}function Fs(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r=="undefined"}function _s(r){return u.isBuffer(r)}function oo(r){return Object.prototype.toString.call(r)}function Xn(r){return r<10?"0"+r.toString(10):r.toString(10)}function wh(){var r=new Date,e=[Xn(r.getHours()),Xn(r.getMinutes()),Xn(r.getSeconds())].join(":");return[r.getDate(),vh[r.getMonth()],e].join(" ")}function Bs(){console.log("%s - %s",wh(),Cr.apply(null,arguments))}function io(r,e){if(!e||!ke(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function qs(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var ch,Rr,Zn,vh,bh,Ms=rt(()=>{"use strict";i();a();Ps();Cs();ch=/%[sdj%]/g;Rr={};X.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};X.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};vh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];bh={inherits:Jn,_extend:io,log:Bs,isBuffer:_s,isPrimitive:Fs,isFunction:Bt,isError:_t,isDate:Pr,isObject:ke,isRegExp:Ft,isUndefined:Q,isSymbol:Ls,isString:Ut,isNumber:no,isNullOrUndefined:Os,isNull:qt,isBoolean:Nr,isArray:ro,inspect:X,deprecate:to,format:Cr,debuglog:Ns}});var Ds=x((f1,Or)=>{"use strict";i();a();var je=(Ms(),ni(Us));if(je&&je.default){Or.exports=je.default;for(let r in je)Or.exports[r]=je[r]}else je&&(Or.exports=je)});var ks=x((c1,$s)=>{"use strict";i();a();$s.exports=Ds().inspect});var jt=x((h1,su)=>{"use strict";i();a();var yo=typeof Map=="function"&&Map.prototype,ao=Object.getOwnPropertyDescriptor&&yo?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Fr=yo&&ao&&typeof ao.get=="function"?ao.get:null,js=yo&&Map.prototype.forEach,go=typeof Set=="function"&&Set.prototype,so=Object.getOwnPropertyDescriptor&&go?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,_r=go&&so&&typeof so.get=="function"?so.get:null,Ws=go&&Set.prototype.forEach,Ah=typeof WeakMap=="function"&&WeakMap.prototype,Dt=Ah?WeakMap.prototype.has:null,Th=typeof WeakSet=="function"&&WeakSet.prototype,$t=Th?WeakSet.prototype.has:null,Sh=typeof WeakRef=="function"&&WeakRef.prototype,Gs=Sh?WeakRef.prototype.deref:null,Eh=Boolean.prototype.valueOf,Rh=Object.prototype.toString,Ih=Function.prototype.toString,Ph=String.prototype.match,xo=String.prototype.slice,Se=String.prototype.replace,Ch=String.prototype.toUpperCase,zs=String.prototype.toLowerCase,eu=RegExp.prototype.test,Vs=Array.prototype.concat,ee=Array.prototype.join,Nh=Array.prototype.slice,Hs=Math.floor,po=typeof BigInt=="function"?BigInt.prototype.valueOf:null,uo=Object.getOwnPropertySymbols,lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,mt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",kt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===mt||!0)?Symbol.toStringTag:null,tu=Object.prototype.propertyIsEnumerable,Ys=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Ks(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||eu.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Hs(-r):Hs(r);if(n!==r){var o=String(n),s=xo.call(e,o.length+1);return Se.call(o,t,"$&_")+"."+Se.call(Se.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Se.call(e,t,"$&_")}var co=ks(),Js=co.custom,Zs=ou(Js)?Js:null,ru={__proto__:null,double:'"',single:"'"},Oh={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};su.exports=function r(e,t,n,o){var s=t||{};if(fe(s,"quoteStyle")&&!fe(ru,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fe(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=fe(s,"customInspect")?s.customInspect:!0;if(typeof f!="boolean"&&f!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fe(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fe(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=s.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return au(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return l?Ks(e,c):c}if(typeof e=="bigint"){var m=String(e)+"n";return l?Ks(e,m):m}var h=typeof s.depth=="undefined"?5:s.depth;if(typeof n=="undefined"&&(n=0),n>=h&&h>0&&typeof e=="object")return mo(e)?"[Array]":"[Object]";var y=Kh(s,n);if(typeof o=="undefined")o=[];else if(iu(o,e)>=0)return"[Circular]";function g(Xe,tr,fc){if(tr&&(o=Nh.call(o),o.push(tr)),fc){var Qo={depth:s.depth};return fe(s,"quoteStyle")&&(Qo.quoteStyle=s.quoteStyle),r(Xe,Qo,n+1,o)}return r(Xe,s,n+1,o)}if(typeof e=="function"&&!Qs(e)){var w=$h(e),A=Lr(e,g);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(A.length>0?" { "+ee.call(A,", ")+" }":"")}if(ou(e)){var E=mt?Se.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):lo.call(e);return typeof e=="object"&&!mt?Mt(E):E}if(Vh(e)){for(var P="<"+zs.call(String(e.nodeName)),C=e.attributes||[],F=0;F<C.length;F++)P+=" "+C[F].name+"="+nu(Lh(C[F].value),"double",s);return P+=">",e.childNodes&&e.childNodes.length&&(P+="..."),P+="</"+zs.call(String(e.nodeName))+">",P}if(mo(e)){if(e.length===0)return"[]";var H=Lr(e,g);return y&&!Yh(H)?"["+ho(H,y)+"]":"[ "+ee.call(H,", ")+" ]"}if(_h(e)){var Y=Lr(e,g);return!("cause"in Error.prototype)&&"cause"in e&&!tu.call(e,"cause")?"{ ["+String(e)+"] "+ee.call(Vs.call("[cause]: "+g(e.cause),Y),", ")+" }":Y.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+ee.call(Y,", ")+" }"}if(typeof e=="object"&&f){if(Zs&&typeof e[Zs]=="function"&&co)return co(e,{depth:h-n});if(f!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(kh(e)){var oe=[];return js&&js.call(e,function(Xe,tr){oe.push(g(tr,e,!0)+" => "+g(Xe,e))}),Xs("Map",Fr.call(e),oe,y)}if(Gh(e)){var Ko=[];return Ws&&Ws.call(e,function(Xe){Ko.push(g(Xe,e))}),Xs("Set",_r.call(e),Ko,y)}if(jh(e))return fo("WeakMap");if(zh(e))return fo("WeakSet");if(Wh(e))return fo("WeakRef");if(qh(e))return Mt(g(Number(e)));if(Mh(e))return Mt(g(po.call(e)));if(Uh(e))return Mt(Eh.call(e));if(Bh(e))return Mt(g(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof globalThis!="undefined"&&e===globalThis)return"{ [object globalThis] }";if(!Fh(e)&&!Qs(e)){var wn=Lr(e,g),Jo=Ys?Ys(e)===Object.prototype:e instanceof Object||e.constructor===Object,bn=e instanceof Object?"":"null prototype",Zo=!Jo&&kt&&Object(e)===e&&kt in e?xo.call(Ee(e),8,-1):bn?"Object":"",uc=Jo||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",An=uc+(Zo||bn?"["+ee.call(Vs.call([],Zo||[],bn||[]),": ")+"] ":"");return wn.length===0?An+"{}":y?An+"{"+ho(wn,y)+"}":An+"{ "+ee.call(wn,", ")+" }"}return String(e)};function nu(r,e,t){var n=t.quoteStyle||e,o=ru[n];return o+r+o}function Lh(r){return Se.call(String(r),/"/g,""")}function We(r){return!kt||!(typeof r=="object"&&(kt in r||typeof r[kt]!="undefined"))}function mo(r){return Ee(r)==="[object Array]"&&We(r)}function Fh(r){return Ee(r)==="[object Date]"&&We(r)}function Qs(r){return Ee(r)==="[object RegExp]"&&We(r)}function _h(r){return Ee(r)==="[object Error]"&&We(r)}function Bh(r){return Ee(r)==="[object String]"&&We(r)}function qh(r){return Ee(r)==="[object Number]"&&We(r)}function Uh(r){return Ee(r)==="[object Boolean]"&&We(r)}function ou(r){if(mt)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!lo)return!1;try{return lo.call(r),!0}catch(e){}return!1}function Mh(r){if(!r||typeof r!="object"||!po)return!1;try{return po.call(r),!0}catch(e){}return!1}var Dh=Object.prototype.hasOwnProperty||function(r){return r in this};function fe(r,e){return Dh.call(r,e)}function Ee(r){return Rh.call(r)}function $h(r){if(r.name)return r.name;var e=Ph.call(Ih.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function iu(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function kh(r){if(!Fr||!r||typeof r!="object")return!1;try{Fr.call(r);try{_r.call(r)}catch(e){return!0}return r instanceof Map}catch(e){}return!1}function jh(r){if(!Dt||!r||typeof r!="object")return!1;try{Dt.call(r,Dt);try{$t.call(r,$t)}catch(e){return!0}return r instanceof WeakMap}catch(e){}return!1}function Wh(r){if(!Gs||!r||typeof r!="object")return!1;try{return Gs.call(r),!0}catch(e){}return!1}function Gh(r){if(!_r||!r||typeof r!="object")return!1;try{_r.call(r);try{Fr.call(r)}catch(e){return!0}return r instanceof Set}catch(e){}return!1}function zh(r){if(!$t||!r||typeof r!="object")return!1;try{$t.call(r,$t);try{Dt.call(r,Dt)}catch(e){return!0}return r instanceof WeakSet}catch(e){}return!1}function Vh(r){return!r||typeof r!="object"?!1:typeof HTMLElement!="undefined"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function au(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return au(xo.call(r,0,e.maxStringLength),e)+n}var o=Oh[e.quoteStyle||"single"];o.lastIndex=0;var s=Se.call(Se.call(r,o,"\\$1"),/[\x00-\x1f]/g,Hh);return nu(s,"single",e)}function Hh(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+Ch.call(e.toString(16))}function Mt(r){return"Object("+r+")"}function fo(r){return r+" { ? }"}function Xs(r,e,t,n){var o=n?ho(t,n):ee.call(t,", ");return r+" ("+e+") {"+o+"}"}function Yh(r){for(var e=0;e<r.length;e++)if(iu(r[e],`
|
|
11
|
+
`)>=0)return!1;return!0}function Kh(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=ee.call(Array(r.indent+1)," ");else return null;return{base:t,prev:ee.call(Array(e+1),t)}}function ho(r,e){if(r.length===0)return"";var t=`
|
|
12
|
+
`+e.prev+e.base;return t+ee.call(r,","+t)+`
|
|
13
|
+
`+e.prev}function Lr(r,e){var t=mo(r),n=[];if(t){n.length=r.length;for(var o=0;o<r.length;o++)n[o]=fe(r,o)?e(r[o],r):""}var s=typeof uo=="function"?uo(r):[],f;if(mt){f={};for(var l=0;l<s.length;l++)f["$"+s[l]]=s[l]}for(var c in r)fe(r,c)&&(t&&String(Number(c))===c&&c<r.length||mt&&f["$"+c]instanceof Symbol||(eu.call(/[^\w$]/,c)?n.push(e(c,r)+": "+e(r[c],r)):n.push(c+": "+e(r[c],r))));if(typeof uo=="function")for(var m=0;m<s.length;m++)tu.call(r,s[m])&&n.push("["+e(s[m])+"]: "+e(r[s[m]],r));return n}});var Br=x((x1,uu)=>{"use strict";i();a();uu.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var pu=x((b1,fu)=>{"use strict";i();a();var Jh=_(),Zh=jt(),Qh=Br();fu.exports=function(e,t){if(!Qh(t))throw new Jh("Assertion failed: P is not a Property Key, got "+Zh(t));return e[t]}});var mu=x((S1,du)=>{"use strict";i();a();var cu=Function.prototype.toString,ht=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,wo,qr;if(typeof ht=="function"&&typeof Object.defineProperty=="function")try{wo=Object.defineProperty({},"length",{get:function(){throw qr}}),qr={},ht(function(){throw 42},null,wo)}catch(r){r!==qr&&(ht=null)}else ht=null;var Xh=/^\s*class\b/,bo=function(e){try{var t=cu.call(e);return Xh.test(t)}catch(n){return!1}},vo=function(e){try{return bo(e)?!1:(cu.call(e),!0)}catch(t){return!1}},Ur=Object.prototype.toString,ey="[object Object]",ty="[object Function]",ry="[object GeneratorFunction]",ny="[object HTMLAllCollection]",oy="[object HTML document.all class]",iy="[object HTMLCollection]",ay=typeof Symbol=="function"&&!!Symbol.toStringTag,sy=!(0 in[,]),Ao=function(){return!1};typeof document=="object"&&(lu=document.all,Ur.call(lu)===Ur.call(document.all)&&(Ao=function(e){if((sy||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var t=Ur.call(e);return(t===ny||t===oy||t===iy||t===ey)&&e("")==null}catch(n){}return!1}));var lu;du.exports=ht?function(e){if(Ao(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ht(e,null,wo)}catch(t){if(t!==qr)return!1}return!bo(e)&&vo(e)}:function(e){if(Ao(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(ay)return vo(e);if(bo(e))return!1;var t=Ur.call(e);return t!==ty&&t!==ry&&!/^\[object HTML/.test(t)?!1:vo(e)}});var To=x((I1,hu)=>{"use strict";i();a();hu.exports=mu()});var vu=x((N1,xu)=>{"use strict";i();a();var yu=_(),uy=pu(),fy=To(),py=Br(),gu=jt();xu.exports=function(e,t){if(!py(t))throw new yu("Assertion failed: P is not a Property Key");var n=uy(e,t);if(n!=null){if(!fy(n))throw new yu(gu(t)+" is not a function: "+gu(n));return n}}});var bu=x((F1,wu)=>{"use strict";i();a();var ly=pr();wu.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!ly(e)&&e!==1/0&&e!==-1/0}});var Mr=x((q1,Au)=>{"use strict";i();a();var cy=Ln(),dy=Fn(),my=pr(),hy=bu();Au.exports=function(e){if(typeof e!="number"||my(e)||!hy(e))return!1;var t=cy(e);return dy(t)===t}});var So=x((D1,Tu)=>{"use strict";i();a();Tu.exports=function(e){return!!e&&(typeof e=="function"||typeof e=="object")}});var Eu=x((j1,Su)=>{"use strict";i();a();var yy=Bn();Su.exports=function(){return yy()&&!!Symbol.toStringTag}});var Po=x((z1,Nu)=>{"use strict";i();a();var Ru=Z(),gy=Eu()(),xy=kn(),vy=it(),Io;gy?(Iu=Ru("RegExp.prototype.exec"),Eo={},Dr=function(){throw Eo},Ro={toString:Dr,valueOf:Dr},typeof Symbol.toPrimitive=="symbol"&&(Ro[Symbol.toPrimitive]=Dr),Io=function(e){if(!e||typeof e!="object")return!1;var t=vy(e,"lastIndex"),n=t&&xy(t,"value");if(!n)return!1;try{Iu(e,Ro)}catch(o){return o===Eo}}):(Pu=Ru("Object.prototype.toString"),Cu="[object RegExp]",Io=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Pu(e)===Cu});var Iu,Eo,Dr,Ro,Pu,Cu;Nu.exports=Io});var Co=x((Y1,Ou)=>{"use strict";i();a();var wy=Z(),by=Po(),Ay=wy("RegExp.prototype.exec"),Ty=_();Ou.exports=function(e){if(!by(e))throw new Ty("`regex` must be a RegExp");return function(n){return Ay(e,n)!==null}}});var _u=x((Z1,Fu)=>{"use strict";i();a();var Lu=_(),Sy=jt(),Ey=Br(),Ry=So();Fu.exports=function(e,t){if(!Ry(e))throw new Lu("Assertion failed: Type(O) is not Object");if(!Ey(t))throw new Lu("Assertion failed: P is not a Property Key, got "+Sy(t));return e[t]}});var qu=x((eE,Bu)=>{"use strict";i();a();Bu.exports=_n()});var Oo=x((nE,Uu)=>{"use strict";i();a();var Iy=Z(),No=_(),Py=Mr(),Cy=Iy("String.prototype.slice");Uu.exports=function(e,t,n){if(typeof e!="string")throw new No("Assertion failed: `string` must be a String");if(typeof t!="string")throw new No("Assertion failed: `searchValue` must be a String");if(!Py(n)||n<0)throw new No("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(t===""&&n<=o)return n;for(var s=t.length,f=n;f<=o-s;f+=1){var l=Cy(e,f,f+s);if(l===t)return f}return-1}});var $r=x((aE,Mu)=>{"use strict";i();a();var Ny=_();Mu.exports=function(e){if(e==null)throw new Ny(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var kr=x((fE,Du)=>{"use strict";i();a();var Oy=se(),Ly=Oy("%String%"),Fy=_();Du.exports=function(e){if(typeof e=="symbol")throw new Fy("Cannot convert a Symbol value to a string");return Ly(e)}});var Lo=x((cE,ju)=>{"use strict";i();a();var _y=$r(),By=kr(),qy=Z(),$u=qy("String.prototype.replace"),ku=/^\s$/.test("\u180E"),Uy=ku?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,My=ku?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;ju.exports=function(){var e=By(_y(this));return $u($u(e,Uy,""),My,"")}});var Fo=x((hE,Gu)=>{"use strict";i();a();var Dy=Lo(),Wu="\u200B",yt="\u180E";Gu.exports=function(){return String.prototype.trim&&Wu.trim()===Wu&&yt.trim()===yt&&("_"+yt).trim()==="_"+yt&&(yt+"_").trim()===yt+"_"?String.prototype.trim:Dy}});var Hu=x((xE,Vu)=>{"use strict";i();a();var $y=vr()(),zu=xr(),ky=Fo();Vu.exports=function(){var e=ky();return String.prototype.trim!==e&&($y?zu(String.prototype,"trim",e,!0):zu(String.prototype,"trim",e)),e}});var Zu=x((bE,Ju)=>{"use strict";i();a();var jy=br(),Wy=Sr(),Gy=$r(),zy=Lo(),Yu=Fo(),Vy=Hu(),Hy=jy(Yu()),Ku=function(e){return Gy(e),Hy(e)};Wy(Ku,{getPolyfill:Yu,implementation:zy,shim:Vy});Ju.exports=Ku});var rf=x((SE,tf)=>{"use strict";i();a();var ef=se(),Yy=ef("%RegExp%"),Ky=_(),Qu=ef("%parseInt%"),Jy=Z(),jr=Co(),Xu=Jy("String.prototype.slice"),Zy=jr(/^0b[01]+$/i),Qy=jr(/^0o[0-7]+$/i),Xy=jr(/^[-+]0x[0-9a-f]+$/i),eg=["\x85","\u200B","\uFFFE"].join(""),tg=new Yy("["+eg+"]","g"),rg=jr(tg),ng=Zu();tf.exports=function r(e){if(typeof e!="string")throw new Ky("Assertion failed: `argument` is not a String");if(Zy(e))return+Qu(Xu(e,2),2);if(Qy(e))return+Qu(Xu(e,2),8);if(rg(e)||Xy(e))return NaN;var t=ng(e);return t!==e?r(t):+e}});var af=x((IE,of)=>{"use strict";i();a();var og=_(),nf=Mr(),ig=Z(),ag=ig("String.prototype.slice");of.exports=function(e,t,n){if(typeof e!="string"||!nf(t)||arguments.length>2&&!nf(n))throw new og("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return ag(e,t,arguments.length>2?n:e.length)}});var uf=x((NE,sf)=>{"use strict";i();a();sf.exports=function(e,t){for(var n=0;n<e.length;n+=1)if(!t(e[n],n,e))return!1;return!0}});var pf=x((FE,ff)=>{"use strict";i();a();var sg=Z()("String.prototype.slice");ff.exports=function(e,t){return e===t?!0:e.length>t.length?!1:sg(t,0,e.length)===e}});var cf=x((qE,lf)=>{"use strict";i();a();lf.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var gf=x((DE,yf)=>{"use strict";i();a();var pe=_(),_o=jt(),ug=Mr(),df=So(),hf=Co(),fg=_u(),pg=Yn(),lg=qu(),cg=Oo(),mf=rf(),le=af(),dg=kr(),mg=uf(),Wt=pf(),hg=cf(),yg=hf(/^\$[0-9]/),gg=hf(/^\$[0-9][0-9]/);yf.exports=function(e,t,n,o,s,f){if(typeof e!="string")throw new pe("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new pe("Assertion failed: `str` must be a String");if(!ug(n)||n<0)throw new pe("Assertion failed: `position` must be a nonnegative integer, got "+_o(n));if(!pg(o)||!mg(o,hg))throw new pe("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+_o(o));if(typeof s!="undefined"&&!df(s))throw new pe("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof f!="string")throw new pe("Assertion failed: `replacementTemplate` must be a String");var l=t.length;if(n>l)throw new pe("Assertion failed: position > stringLength, got "+_o(n));for(var c=f,m="";c!=="";){var h,y,g;if(Wt("$$",c))h="$$",y="$";else if(Wt("$`",c))h="$`",y=le(t,0,n);else if(Wt("$&",c))h="$&",y=e;else if(Wt("$'",c)){h="$'";var w=e.length,A=n+w;y=le(t,lg(A,l))}else if(yg(c)){var E=gg(c)?2:1,P=le(c,1,1+E),C=mf(P);if(C<0||C>99)throw new pe("Assertion failed: `index` must be >= 0 and <= 99");var F=o.length;C>F&&E===2&&(E=1,P=le(P,0,1),C=mf(P)),h=le(c,0,1+E),1<=C&&C<=F?(g=o[C-1],typeof g=="undefined"?y="":y=g):y=h}else if(Wt("$<",c)){var H=cg(c,">",0);if(!(H>-1)||typeof s=="undefined")h="$<",y=h;else{h=le(c,0,H+1);var Y=le(c,2,H);if(!df(s))throw new pe("Assertion failed: Type(namedCaptures) is not Object");g=fg(s,Y),typeof g=="undefined"?y="":y=dg(g)}}else h=le(c,0,1),y=h;var oe=h.length;c=le(c,oe),m+=y}return m}});var bf=x((jE,wf)=>{"use strict";i();a();var xf=se(),vf=br(),xg=vf(xf("String.prototype.indexOf"));wf.exports=function(e,t){var n=xf(e,!!t);return typeof n=="function"&&xg(e,".prototype.")>-1?vf(n):n}});var qo=x((zE,Ef)=>{"use strict";i();a();var Af=As(),vg=vu(),wg=gf(),bg=To(),Ag=$r(),Wr=kr(),Tf=Oo(),Tg=se(),Gr=bf(),Sg=qn()(),Eg=Po(),Rg=Tg("%Math.max%"),Sf=_(),Ig=Gr("Array.prototype.push"),Bo=Gr("String.prototype.slice"),Pg=Gr("String.prototype.indexOf"),Cg=Gr("String.prototype.replace");Ef.exports=function(e,t){var n=Ag(this),o=Eg(e);if(o&&Pg(Bo(e,e.source.length+2),"g")===-1)throw new Sf("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Sg&&Symbol.replace){if(e!=null){var s=vg(e,Symbol.replace);if(typeof s!="undefined")return Af(s,e,[n,t])}}else if(o)return Cg(n,e,t);var f=Wr(n),l=Wr(e),c=bg(t);c||(t=Wr(t));for(var m=l.length,h=Rg(1,m),y=[],g=Tf(f,l,0);g!==-1;)Ig(y,g),g=Tf(f,l,g+h);for(var w=0,A="",E=0;E<y.length;E+=1){var P;if(c)P=Wr(Af(t,void 0,[l,y[E],f]));else{if(typeof t!="string")throw new Sf("Assertion failed: `replaceValue` should be a string at this point");var C=[];P=wg(l,f,y[E],C,void 0,t)}var F=Bo(f,w,y[E]);A+=F+P,w=y[E]+m}return w<f.length&&(A+=Bo(f,w)),A}});var Uo=x((YE,Rf)=>{"use strict";i();a();var Ng=qo();Rf.exports=function(){return String.prototype.replaceAll||Ng}});var Pf=x((ZE,If)=>{"use strict";i();a();var Og=Sr(),Lg=Uo();If.exports=function(){var e=Lg();return Og(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var Lf=x((eR,Of)=>{"use strict";i();a();var Fg=br(),_g=Sr(),Cf=qo(),Bg=Uo(),qg=Pf(),Nf=Fg(Cf);_g(Nf,{getPolyfill:Bg,implementation:Cf,shim:qg});Of.exports=Nf});var cA={};En(cA,{DynamicSnippetsGenerator:()=>vn});module.exports=ni(cA);i();a();var fk=yc(Lf(),1);i();a();i();a();i();a();function R(r){throw new Error("Unexpected value: "+JSON.stringify(r))}i();a();i();a();i();a();i();a();i();a();i();a();var Ug=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,zr=Ug;var Mg=typeof self=="object"&&self&&self.Object===Object&&self,Dg=zr||Mg||Function("return this")(),L=Dg;var $g=L.Symbol,$=$g;i();a();var Ff=Object.prototype,kg=Ff.hasOwnProperty,jg=Ff.toString,Gt=$?$.toStringTag:void 0;function Wg(r){var e=kg.call(r,Gt),t=r[Gt];try{r[Gt]=void 0;var n=!0}catch(s){}var o=jg.call(r);return n&&(e?r[Gt]=t:delete r[Gt]),o}var _f=Wg;i();a();var Gg=Object.prototype,zg=Gg.toString;function Vg(r){return zg.call(r)}var Bf=Vg;var Hg="[object Null]",Yg="[object Undefined]",qf=$?$.toStringTag:void 0;function Kg(r){return r==null?r===void 0?Yg:Hg:qf&&qf in Object(r)?_f(r):Bf(r)}var j=Kg;i();a();function Jg(r){return r!=null&&typeof r=="object"}var W=Jg;var Zg="[object Symbol]";function Qg(r){return typeof r=="symbol"||W(r)&&j(r)==Zg}var Uf=Qg;i();a();i();a();function Xg(r,e){for(var t=-1,n=r==null?0:r.length,o=Array(n);++t<n;)o[t]=e(r[t],t,r);return o}var Mf=Xg;i();a();var ex=Array.isArray,ce=ex;var tx=1/0,Df=$?$.prototype:void 0,$f=Df?Df.toString:void 0;function kf(r){if(typeof r=="string")return r;if(ce(r))return Mf(r,kf)+"";if(Uf(r))return $f?$f.call(r):"";var e=r+"";return e=="0"&&1/r==-tx?"-0":e}var jf=kf;i();a();function rx(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var Vr=rx;i();a();i();a();i();a();i();a();var nx="[object AsyncFunction]",ox="[object Function]",ix="[object GeneratorFunction]",ax="[object Proxy]";function sx(r){if(!Vr(r))return!1;var e=j(r);return e==ox||e==ix||e==nx||e==ax}var Hr=sx;i();a();i();a();var ux=L["__core-js_shared__"],Yr=ux;var Wf=(function(){var r=/[^.]+$/.exec(Yr&&Yr.keys&&Yr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function fx(r){return!!Wf&&Wf in r}var Gf=fx;i();a();var px=Function.prototype,lx=px.toString;function cx(r){if(r!=null){try{return lx.call(r)}catch(e){}try{return r+""}catch(e){}}return""}var de=cx;var dx=/[\\^$.*+?()[\]{}|]/g,mx=/^\[object .+?Constructor\]$/,hx=Function.prototype,yx=Object.prototype,gx=hx.toString,xx=yx.hasOwnProperty,vx=RegExp("^"+gx.call(xx).replace(dx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wx(r){if(!Vr(r)||Gf(r))return!1;var e=Hr(r)?vx:mx;return e.test(de(r))}var zf=wx;i();a();function bx(r,e){return r==null?void 0:r[e]}var Vf=bx;function Ax(r,e){var t=Vf(r,e);return zf(t)?t:void 0}var k=Ax;var Tx=k(L,"WeakMap"),Kr=Tx;i();a();function Sx(){}var Hf=Sx;i();a();i();a();i();a();function Ex(r,e,t,n){for(var o=r.length,s=t+(n?1:-1);n?s--:++s<o;)if(e(r[s],s,r))return s;return-1}var Yf=Ex;i();a();function Rx(r){return r!==r}var Kf=Rx;i();a();function Ix(r,e,t){for(var n=t-1,o=r.length;++n<o;)if(r[n]===e)return n;return-1}var Jf=Ix;function Px(r,e,t){return e===e?Jf(r,e,t):Yf(r,Kf,t)}var Zf=Px;function Cx(r,e){var t=r==null?0:r.length;return!!t&&Zf(r,e,0)>-1}var Qf=Cx;i();a();var Nx=9007199254740991,Ox=/^(?:0|[1-9]\d*)$/;function Lx(r,e){var t=typeof r;return e=e==null?Nx:e,!!e&&(t=="number"||t!="symbol"&&Ox.test(r))&&r>-1&&r%1==0&&r<e}var Xf=Lx;i();a();function Fx(r,e){return r===e||r!==r&&e!==e}var Jr=Fx;i();a();i();a();var _x=9007199254740991;function Bx(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=_x}var Zr=Bx;function qx(r){return r!=null&&Zr(r.length)&&!Hr(r)}var ep=qx;i();a();var Ux=Object.prototype;function Mx(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Ux;return r===t}var tp=Mx;i();a();i();a();i();a();function Dx(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var rp=Dx;i();a();i();a();var $x="[object Arguments]";function kx(r){return W(r)&&j(r)==$x}var Mo=kx;var np=Object.prototype,jx=np.hasOwnProperty,Wx=np.propertyIsEnumerable,Gx=Mo((function(){return arguments})())?Mo:function(r){return W(r)&&jx.call(r,"callee")&&!Wx.call(r,"callee")},op=Gx;i();a();i();a();function zx(){return!1}var ip=zx;var up=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ap=up&&typeof module=="object"&&module&&!module.nodeType&&module,Vx=ap&&ap.exports===up,sp=Vx?L.Buffer:void 0,Hx=sp?sp.isBuffer:void 0,Yx=Hx||ip,zt=Yx;i();a();i();a();var Kx="[object Arguments]",Jx="[object Array]",Zx="[object Boolean]",Qx="[object Date]",Xx="[object Error]",e0="[object Function]",t0="[object Map]",r0="[object Number]",n0="[object Object]",o0="[object RegExp]",i0="[object Set]",a0="[object String]",s0="[object WeakMap]",u0="[object ArrayBuffer]",f0="[object DataView]",p0="[object Float32Array]",l0="[object Float64Array]",c0="[object Int8Array]",d0="[object Int16Array]",m0="[object Int32Array]",h0="[object Uint8Array]",y0="[object Uint8ClampedArray]",g0="[object Uint16Array]",x0="[object Uint32Array]",I={};I[p0]=I[l0]=I[c0]=I[d0]=I[m0]=I[h0]=I[y0]=I[g0]=I[x0]=!0;I[Kx]=I[Jx]=I[u0]=I[Zx]=I[f0]=I[Qx]=I[Xx]=I[e0]=I[t0]=I[r0]=I[n0]=I[o0]=I[i0]=I[a0]=I[s0]=!1;function v0(r){return W(r)&&Zr(r.length)&&!!I[j(r)]}var fp=v0;i();a();function w0(r){return function(e){return r(e)}}var pp=w0;i();a();var lp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vt=lp&&typeof module=="object"&&module&&!module.nodeType&&module,b0=Vt&&Vt.exports===lp,Do=b0&&zr.process,A0=(function(){try{var r=Vt&&Vt.require&&Vt.require("util").types;return r||Do&&Do.binding&&Do.binding("util")}catch(e){}})(),$o=A0;var cp=$o&&$o.isTypedArray,T0=cp?pp(cp):fp,Qr=T0;var S0=Object.prototype,E0=S0.hasOwnProperty;function R0(r,e){var t=ce(r),n=!t&&op(r),o=!t&&!n&&zt(r),s=!t&&!n&&!o&&Qr(r),f=t||n||o||s,l=f?rp(r.length,String):[],c=l.length;for(var m in r)(e||E0.call(r,m))&&!(f&&(m=="length"||o&&(m=="offset"||m=="parent")||s&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Xf(m,c)))&&l.push(m);return l}var dp=R0;i();a();i();a();i();a();function I0(r,e){return function(t){return r(e(t))}}var mp=I0;var P0=mp(Object.keys,Object),hp=P0;var C0=Object.prototype,N0=C0.hasOwnProperty;function O0(r){if(!tp(r))return hp(r);var e=[];for(var t in Object(r))N0.call(r,t)&&t!="constructor"&&e.push(t);return e}var yp=O0;function L0(r){return ep(r)?dp(r):yp(r)}var gp=L0;i();a();i();a();i();a();i();a();i();a();var F0=k(Object,"create"),me=F0;function _0(){this.__data__=me?me(null):{},this.size=0}var xp=_0;i();a();function B0(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var vp=B0;i();a();var q0="__lodash_hash_undefined__",U0=Object.prototype,M0=U0.hasOwnProperty;function D0(r){var e=this.__data__;if(me){var t=e[r];return t===q0?void 0:t}return M0.call(e,r)?e[r]:void 0}var wp=D0;i();a();var $0=Object.prototype,k0=$0.hasOwnProperty;function j0(r){var e=this.__data__;return me?e[r]!==void 0:k0.call(e,r)}var bp=j0;i();a();var W0="__lodash_hash_undefined__";function G0(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=me&&e===void 0?W0:e,this}var Ap=G0;function gt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}gt.prototype.clear=xp;gt.prototype.delete=vp;gt.prototype.get=wp;gt.prototype.has=bp;gt.prototype.set=Ap;var ko=gt;i();a();i();a();function z0(){this.__data__=[],this.size=0}var Tp=z0;i();a();i();a();function V0(r,e){for(var t=r.length;t--;)if(Jr(r[t][0],e))return t;return-1}var Re=V0;var H0=Array.prototype,Y0=H0.splice;function K0(r){var e=this.__data__,t=Re(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Y0.call(e,t,1),--this.size,!0}var Sp=K0;i();a();function J0(r){var e=this.__data__,t=Re(e,r);return t<0?void 0:e[t][1]}var Ep=J0;i();a();function Z0(r){return Re(this.__data__,r)>-1}var Rp=Z0;i();a();function Q0(r,e){var t=this.__data__,n=Re(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var Ip=Q0;function xt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}xt.prototype.clear=Tp;xt.prototype.delete=Sp;xt.prototype.get=Ep;xt.prototype.has=Rp;xt.prototype.set=Ip;var Ie=xt;i();a();var X0=k(L,"Map"),Pe=X0;function ev(){this.size=0,this.__data__={hash:new ko,map:new(Pe||Ie),string:new ko}}var Pp=ev;i();a();i();a();i();a();function tv(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var Cp=tv;function rv(r,e){var t=r.__data__;return Cp(e)?t[typeof e=="string"?"string":"hash"]:t.map}var Ce=rv;function nv(r){var e=Ce(this,r).delete(r);return this.size-=e?1:0,e}var Np=nv;i();a();function ov(r){return Ce(this,r).get(r)}var Op=ov;i();a();function iv(r){return Ce(this,r).has(r)}var Lp=iv;i();a();function av(r,e){var t=Ce(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var Fp=av;function vt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}vt.prototype.clear=Pp;vt.prototype.delete=Np;vt.prototype.get=Op;vt.prototype.has=Lp;vt.prototype.set=Fp;var Xr=vt;i();a();function sv(r){return r==null?"":jf(r)}var Ne=sv;i();a();function uv(r,e){for(var t=-1,n=e.length,o=r.length;++t<n;)r[o+t]=e[t];return r}var _p=uv;i();a();i();a();i();a();i();a();i();a();i();a();function fv(r,e,t){var n=-1,o=r.length;e<0&&(e=-e>o?0:o+e),t=t>o?o:t,t<0&&(t+=o),o=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(o);++n<o;)s[n]=r[n+e];return s}var Bp=fv;function pv(r,e,t){var n=r.length;return t=t===void 0?n:t,!e&&t>=n?r:Bp(r,e,t)}var qp=pv;i();a();var lv="\\ud800-\\udfff",cv="\\u0300-\\u036f",dv="\\ufe20-\\ufe2f",mv="\\u20d0-\\u20ff",hv=cv+dv+mv,yv="\\ufe0e\\ufe0f",gv="\\u200d",xv=RegExp("["+gv+lv+hv+yv+"]");function vv(r){return xv.test(r)}var en=vv;i();a();i();a();function wv(r){return r.split("")}var Up=wv;i();a();var Mp="\\ud800-\\udfff",bv="\\u0300-\\u036f",Av="\\ufe20-\\ufe2f",Tv="\\u20d0-\\u20ff",Sv=bv+Av+Tv,Ev="\\ufe0e\\ufe0f",Rv="["+Mp+"]",jo="["+Sv+"]",Wo="\\ud83c[\\udffb-\\udfff]",Iv="(?:"+jo+"|"+Wo+")",Dp="[^"+Mp+"]",$p="(?:\\ud83c[\\udde6-\\uddff]){2}",kp="[\\ud800-\\udbff][\\udc00-\\udfff]",Pv="\\u200d",jp=Iv+"?",Wp="["+Ev+"]?",Cv="(?:"+Pv+"(?:"+[Dp,$p,kp].join("|")+")"+Wp+jp+")*",Nv=Wp+jp+Cv,Ov="(?:"+[Dp+jo+"?",jo,$p,kp,Rv].join("|")+")",Lv=RegExp(Wo+"(?="+Wo+")|"+Ov+Nv,"g");function Fv(r){return r.match(Lv)||[]}var Gp=Fv;function _v(r){return en(r)?Gp(r):Up(r)}var zp=_v;function Bv(r){return function(e){e=Ne(e);var t=en(e)?zp(e):void 0,n=t?t[0]:e.charAt(0),o=t?qp(t,1).join(""):e.slice(1);return n[r]()+o}}var Vp=Bv;var qv=Vp("toUpperCase"),wt=qv;function Uv(r){return wt(Ne(r).toLowerCase())}var Hp=Uv;i();a();i();a();function Mv(r,e,t,n){var o=-1,s=r==null?0:r.length;for(n&&s&&(t=r[++o]);++o<s;)t=e(t,r[o],o,r);return t}var Yp=Mv;i();a();i();a();i();a();function Dv(r){return function(e){return r==null?void 0:r[e]}}var Kp=Dv;var $v={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},kv=Kp($v),Jp=kv;var jv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wv="\\u0300-\\u036f",Gv="\\ufe20-\\ufe2f",zv="\\u20d0-\\u20ff",Vv=Wv+Gv+zv,Hv="["+Vv+"]",Yv=RegExp(Hv,"g");function Kv(r){return r=Ne(r),r&&r.replace(jv,Jp).replace(Yv,"")}var Zp=Kv;i();a();i();a();var Jv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Zv(r){return r.match(Jv)||[]}var Qp=Zv;i();a();var Qv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Xv(r){return Qv.test(r)}var Xp=Xv;i();a();var ol="\\ud800-\\udfff",ew="\\u0300-\\u036f",tw="\\ufe20-\\ufe2f",rw="\\u20d0-\\u20ff",nw=ew+tw+rw,il="\\u2700-\\u27bf",al="a-z\\xdf-\\xf6\\xf8-\\xff",ow="\\xac\\xb1\\xd7\\xf7",iw="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",aw="\\u2000-\\u206f",sw=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",sl="A-Z\\xc0-\\xd6\\xd8-\\xde",uw="\\ufe0e\\ufe0f",ul=ow+iw+aw+sw,fl="['\u2019]",el="["+ul+"]",fw="["+nw+"]",pl="\\d+",pw="["+il+"]",ll="["+al+"]",cl="[^"+ol+ul+pl+il+al+sl+"]",lw="\\ud83c[\\udffb-\\udfff]",cw="(?:"+fw+"|"+lw+")",dw="[^"+ol+"]",dl="(?:\\ud83c[\\udde6-\\uddff]){2}",ml="[\\ud800-\\udbff][\\udc00-\\udfff]",bt="["+sl+"]",mw="\\u200d",tl="(?:"+ll+"|"+cl+")",hw="(?:"+bt+"|"+cl+")",rl="(?:"+fl+"(?:d|ll|m|re|s|t|ve))?",nl="(?:"+fl+"(?:D|LL|M|RE|S|T|VE))?",hl=cw+"?",yl="["+uw+"]?",yw="(?:"+mw+"(?:"+[dw,dl,ml].join("|")+")"+yl+hl+")*",gw="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xw="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vw=yl+hl+yw,ww="(?:"+[pw,dl,ml].join("|")+")"+vw,bw=RegExp([bt+"?"+ll+"+"+rl+"(?="+[el,bt,"$"].join("|")+")",hw+"+"+nl+"(?="+[el,bt+tl,"$"].join("|")+")",bt+"?"+tl+"+"+rl,bt+"+"+nl,xw,gw,pl,ww].join("|"),"g");function Aw(r){return r.match(bw)||[]}var gl=Aw;function Tw(r,e,t){return r=Ne(r),e=t?void 0:e,e===void 0?Xp(r)?gl(r):Qp(r):r.match(e)||[]}var xl=Tw;var Sw="['\u2019]",Ew=RegExp(Sw,"g");function Rw(r){return function(e){return Yp(xl(Zp(e).replace(Ew,"")),r,"")}}var vl=Rw;var Iw=vl(function(r,e,t){return e=e.toLowerCase(),r+(t?Hp(e):e)}),tn=Iw;i();a();i();a();function Pw(){this.__data__=new Ie,this.size=0}var wl=Pw;i();a();function Cw(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var bl=Cw;i();a();function Nw(r){return this.__data__.get(r)}var Al=Nw;i();a();function Ow(r){return this.__data__.has(r)}var Tl=Ow;i();a();var Lw=200;function Fw(r,e){var t=this.__data__;if(t instanceof Ie){var n=t.__data__;if(!Pe||n.length<Lw-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Xr(n)}return t.set(r,e),this.size=t.size,this}var Sl=Fw;function At(r){var e=this.__data__=new Ie(r);this.size=e.size}At.prototype.clear=wl;At.prototype.delete=bl;At.prototype.get=Al;At.prototype.has=Tl;At.prototype.set=Sl;var rn=At;i();a();i();a();function _w(r,e){for(var t=-1,n=r==null?0:r.length,o=0,s=[];++t<n;){var f=r[t];e(f,t,r)&&(s[o++]=f)}return s}var El=_w;i();a();function Bw(){return[]}var Rl=Bw;var qw=Object.prototype,Uw=qw.propertyIsEnumerable,Il=Object.getOwnPropertySymbols,Mw=Il?function(r){return r==null?[]:(r=Object(r),El(Il(r),function(e){return Uw.call(r,e)}))}:Rl,Pl=Mw;i();a();i();a();function Dw(r,e,t){var n=e(r);return ce(r)?n:_p(n,t(r))}var Cl=Dw;function $w(r){return Cl(r,gp,Pl)}var Go=$w;i();a();i();a();var kw=k(L,"DataView"),nn=kw;i();a();var jw=k(L,"Promise"),on=jw;i();a();var Ww=k(L,"Set"),Oe=Ww;var Nl="[object Map]",Gw="[object Object]",Ol="[object Promise]",Ll="[object Set]",Fl="[object WeakMap]",_l="[object DataView]",zw=de(nn),Vw=de(Pe),Hw=de(on),Yw=de(Oe),Kw=de(Kr),Ge=j;(nn&&Ge(new nn(new ArrayBuffer(1)))!=_l||Pe&&Ge(new Pe)!=Nl||on&&Ge(on.resolve())!=Ol||Oe&&Ge(new Oe)!=Ll||Kr&&Ge(new Kr)!=Fl)&&(Ge=function(r){var e=j(r),t=e==Gw?r.constructor:void 0,n=t?de(t):"";if(n)switch(n){case zw:return _l;case Vw:return Nl;case Hw:return Ol;case Yw:return Ll;case Kw:return Fl}return e});var zo=Ge;i();a();var Jw=L.Uint8Array,Vo=Jw;i();a();i();a();i();a();i();a();i();a();var Zw="__lodash_hash_undefined__";function Qw(r){return this.__data__.set(r,Zw),this}var Bl=Qw;i();a();function Xw(r){return this.__data__.has(r)}var ql=Xw;function an(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Xr;++e<t;)this.add(r[e])}an.prototype.add=an.prototype.push=Bl;an.prototype.has=ql;var sn=an;i();a();function eb(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}var Ul=eb;i();a();function tb(r,e){return r.has(e)}var un=tb;var rb=1,nb=2;function ob(r,e,t,n,o,s){var f=t&rb,l=r.length,c=e.length;if(l!=c&&!(f&&c>l))return!1;var m=s.get(r),h=s.get(e);if(m&&h)return m==e&&h==r;var y=-1,g=!0,w=t&nb?new sn:void 0;for(s.set(r,e),s.set(e,r);++y<l;){var A=r[y],E=e[y];if(n)var P=f?n(E,A,y,e,r,s):n(A,E,y,r,e,s);if(P!==void 0){if(P)continue;g=!1;break}if(w){if(!Ul(e,function(C,F){if(!un(w,F)&&(A===C||o(A,C,t,n,s)))return w.push(F)})){g=!1;break}}else if(!(A===E||o(A,E,t,n,s))){g=!1;break}}return s.delete(r),s.delete(e),g}var fn=ob;i();a();i();a();function ib(r){var e=-1,t=Array(r.size);return r.forEach(function(n,o){t[++e]=[o,n]}),t}var Ml=ib;i();a();function ab(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var Tt=ab;var sb=1,ub=2,fb="[object Boolean]",pb="[object Date]",lb="[object Error]",cb="[object Map]",db="[object Number]",mb="[object RegExp]",hb="[object Set]",yb="[object String]",gb="[object Symbol]",xb="[object ArrayBuffer]",vb="[object DataView]",Dl=$?$.prototype:void 0,Ho=Dl?Dl.valueOf:void 0;function wb(r,e,t,n,o,s,f){switch(t){case vb:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case xb:return!(r.byteLength!=e.byteLength||!s(new Vo(r),new Vo(e)));case fb:case pb:case db:return Jr(+r,+e);case lb:return r.name==e.name&&r.message==e.message;case mb:case yb:return r==e+"";case cb:var l=Ml;case hb:var c=n&sb;if(l||(l=Tt),r.size!=e.size&&!c)return!1;var m=f.get(r);if(m)return m==e;n|=ub,f.set(r,e);var h=fn(l(r),l(e),n,o,s,f);return f.delete(r),h;case gb:if(Ho)return Ho.call(r)==Ho.call(e)}return!1}var $l=wb;i();a();var bb=1,Ab=Object.prototype,Tb=Ab.hasOwnProperty;function Sb(r,e,t,n,o,s){var f=t&bb,l=Go(r),c=l.length,m=Go(e),h=m.length;if(c!=h&&!f)return!1;for(var y=c;y--;){var g=l[y];if(!(f?g in e:Tb.call(e,g)))return!1}var w=s.get(r),A=s.get(e);if(w&&A)return w==e&&A==r;var E=!0;s.set(r,e),s.set(e,r);for(var P=f;++y<c;){g=l[y];var C=r[g],F=e[g];if(n)var H=f?n(F,C,g,e,r,s):n(C,F,g,r,e,s);if(!(H===void 0?C===F||o(C,F,t,n,s):H)){E=!1;break}P||(P=g=="constructor")}if(E&&!P){var Y=r.constructor,oe=e.constructor;Y!=oe&&"constructor"in r&&"constructor"in e&&!(typeof Y=="function"&&Y instanceof Y&&typeof oe=="function"&&oe instanceof oe)&&(E=!1)}return s.delete(r),s.delete(e),E}var kl=Sb;var Eb=1,jl="[object Arguments]",Wl="[object Array]",pn="[object Object]",Rb=Object.prototype,Gl=Rb.hasOwnProperty;function Ib(r,e,t,n,o,s){var f=ce(r),l=ce(e),c=f?Wl:zo(r),m=l?Wl:zo(e);c=c==jl?pn:c,m=m==jl?pn:m;var h=c==pn,y=m==pn,g=c==m;if(g&&zt(r)){if(!zt(e))return!1;f=!0,h=!1}if(g&&!h)return s||(s=new rn),f||Qr(r)?fn(r,e,t,n,o,s):$l(r,e,c,t,n,o,s);if(!(t&Eb)){var w=h&&Gl.call(r,"__wrapped__"),A=y&&Gl.call(e,"__wrapped__");if(w||A){var E=w?r.value():r,P=A?e.value():e;return s||(s=new rn),o(E,P,t,n,s)}}return g?(s||(s=new rn),kl(r,e,t,n,o,s)):!1}var zl=Ib;function Vl(r,e,t,n,o){return r===e?!0:r==null||e==null||!W(r)&&!W(e)?r!==r&&e!==e:zl(r,e,t,n,Vl,o)}var Hl=Vl;i();a();function Pb(r,e,t){for(var n=-1,o=r==null?0:r.length;++n<o;)if(t(e,r[n]))return!0;return!1}var Yl=Pb;i();a();function Cb(r,e){return Hl(r,e)}var ln=Cb;i();a();i();a();var Nb=1/0,Ob=Oe&&1/Tt(new Oe([,-0]))[1]==Nb?function(r){return new Oe(r)}:Hf,Kl=Ob;var Lb=200;function Fb(r,e,t){var n=-1,o=Qf,s=r.length,f=!0,l=[],c=l;if(t)f=!1,o=Yl;else if(s>=Lb){var m=e?null:Kl(r);if(m)return Tt(m);f=!1,o=un,c=new sn}else c=e?[]:l;e:for(;++n<s;){var h=r[n],y=e?e(h):h;if(h=t||h!==0?h:0,f&&y===y){for(var g=c.length;g--;)if(c[g]===y)continue e;e&&c.push(y),l.push(h)}else o(c,y,t)||(c!==l&&c.push(y),l.push(h))}return l}var Jl=Fb;i();a();function _b(r,e){return e=typeof e=="function"?e:void 0,r&&r.length?Jl(r,void 0,e):[]}var cn=_b;i();a();function Ht(r){return Object.keys(r)}i();a();i();a();var he=class{};i();a();i();a();var G=class extends he{constructor(t){super();d(this,"value");this.value=t}write(t){typeof this.value=="string"?t.write(this.value):typeof this.value=="function"?this.value(t):this.value.write(t)}};var Bb=4,Yt=class{constructor(){d(this,"buffer","");d(this,"indentLevel",0);d(this,"hasWrittenAnything",!1);d(this,"lastCharacterIsSemicolon",!1);d(this,"lastCharacterIsNewline",!1)}write(e){let t=e.length>0&&e.endsWith(`
|
|
14
|
+
`),n=t?e.substring(0,e.length-1):e,o=this.getIndentString(),s=n.replaceAll(`
|
|
15
15
|
`,`
|
|
16
|
-
${o}`);this.isAtStartOfLine()&&(
|
|
17
|
-
`),this.writeInternal(
|
|
18
|
-
`)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
19
|
-
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:
|
|
20
|
-
`)),this.buffer+=r}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*ax)}};a();s();function wo(t){return(t==null?void 0:t.name)!=null}a();s();var Ur=class extends se{constructor({condition:e,true_:n,false_:o}){super();d(this,"condition");d(this,"true_");d(this,"false_");this.condition=e,this.true_=n,this.false_=o}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};a();s();a();s();a();s();var qr=class{constructor(){d(this,"reporter");d(this,"snippet");d(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:r,snippet:e}){(this.reporter==null||this.reporter.size()>r.errors.size())&&(this.reporter=r.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:r}){var e;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(e=this.err)!=null?e:new Error(`Failed to generate snippet for endpoint "${r.method} ${r.path}"`)}};var $r=class{constructor(r){d(this,"context");this.context=r}async generate(r){let e=this.context.resolveEndpointLocationOrThrow(r.endpoint);if(e.length===0)throw new Error(`No endpoints found that match "${r.endpoint.method} ${r.endpoint.path}"`);let n=new qr;for(let o of e){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let f=await u.generateSnippet({endpoint:o,request:r});if(i.errors.empty())return{snippet:f,errors:void 0};n.update({context:i,snippet:f})}catch(f){n.err==null&&(n.err=f)}}return n.getResponseOrThrow({endpoint:r.endpoint})}generateSync(r){let e=this.context.resolveEndpointLocationOrThrow(r.endpoint);if(e.length===0)throw new Error(`No endpoints found that match "${r.endpoint.method} ${r.endpoint.path}"`);let n=new qr;for(let o of e){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let f=u.generateSnippetSync({endpoint:o,request:r});if(i.errors.empty())return{snippet:f,errors:void 0};n.update({context:i,snippet:f})}catch(f){n.err==null&&(n.err=f)}}return n.getResponseOrThrow({endpoint:r.endpoint})}};a();s();a();s();a();s();var kr=class{constructor(){d(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(r){return this.REFERENCE_REGEX.test(r)?{type:"valid"}:{type:"invalid"}}tryParse(r){if(this.validate(r).type==="invalid")return;let n=r.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};a();s();var A={Critical:"CRITICAL",Warning:"WARNING"},_r=class t{constructor(){d(this,"errors");d(this,"path");this.errors=[],this.path=[]}add(r){this.errors.push(Ge(je({},r),{path:[...this.path]}))}scope(r){this.path.push(r)}unscope(){this.path.pop()}getBySeverity(r){return this.errors.filter(e=>e.severity===r)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let r=new t;return r.errors=[...this.errors],r.path=[...this.path],r}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(r=>({severity:r.severity,path:r.path!=null?this.pathToStringArray(r.path):void 0,message:r.message}))}pathToStringArray(r){let e=[];for(let n of r){if(typeof n=="string"){e.push(n);continue}e[e.length-1]+=`[${n.index}]`}return e}};var Mr=class{constructor({ir:r,config:e}){d(this,"config");d(this,"errors");d(this,"_ir");d(this,"httpEndpointReferenceParser");this._ir=r,this.config=e,this.errors=new _r,this.httpEndpointReferenceParser=new kr}associateQueryParametersByWireValue({parameters:r,values:e}){let n=[];for(let[o,i]of Object.entries(e)){this.errors.scope(o);try{let u=r.find(c=>c.name.wireValue===o);if(u==null)throw this.newParameterNotRecognizedError(o);let f=this.isListTypeReference(u.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:u.name,typeReference:u.typeReference,value:f})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:r,values:e,ignoreMissingParameters:n}){let o=[];for(let[i,u]of Object.entries(e)){this.errors.scope(i);try{let f=r.find(c=>c.name.wireValue===i);if(f==null){if(n)continue;this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:f.name,typeReference:f.typeReference,value:u})}finally{this.errors.unscope()}}return o}getSingleFileValue({property:r,record:e}){let n=e[r.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:A.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:r,record:e}){let n=e[r.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let i of n){if(typeof i!="string"){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}o.push(i)}return o}getRecord(r){if(typeof r!="object"||Array.isArray(r)){this.errors.add({severity:A.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(r)?"array":typeof r}`});return}return r==null?{}:r}resolveNamedType({typeId:r}){let e=this._ir.types[r];if(e==null){this.errors.add({severity:A.Critical,message:`Type identified by "${r}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:r,value:e}){let n=this.getRecord(e);if(n==null)return;let o=r.discriminant.wireValue,i=n[o];if(i==null){this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:A.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let u=r.types[i];if(u==null){this.errors.add({severity:A.Critical,message:`No type found for discriminant value "${i}"`});return}let y=n,{[o]:f}=y,c=Po(y,[Ro(o)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.discriminantValue,value:c}}resolveEndpointOrThrow(r){let e=this.httpEndpointReferenceParser.tryParse(r);if(e==null)throw new Error(`Failed to parse endpoint reference "${r}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocationOrThrow(r){let e=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:r})&&e.push(n);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${r.method} ${r.path}"`);return e}needsRequestParameter({request:r,inlinePathParameters:e,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:r,inlinePathParameters:e})||r.queryParameters!=null&&r.queryParameters.length>0||r.headers!=null&&r.headers.length>0?!0:r.body!=null?this.includeRequestBodyInWrappedRequest({body:r.body,inlineFileProperties:n}):!((o=r.metadata)!=null&&o.onlyPathParameters)}includePathParametersInWrappedRequest({request:r,inlinePathParameters:e}){var n,o;return e&&((o=(n=r.metadata)==null?void 0:n.includePathParameters)!=null?o:!1)}isFileUploadRequestBody(r){switch(r.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:R(r)}}resolveEnvironmentName(r){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let n=e.environments.find(o=>o.id===r);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=e.environments.find(o=>o.id===r);return n==null?void 0:n.name}default:R(e)}}isSingleEnvironmentID(r){return typeof r=="string"}isMultiEnvironmentValues(r){return typeof r=="object"}validateMultiEnvironmentUrlValues(r){if(this._ir.environments==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=e.environments[0];if(n==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(Or(n.urls));for(let i of Or(r))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:A.Critical,message:`The provided environments are invalid; got: [${Object.keys(r).join(", ")}], expected: [${Or(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:r}){if(typeof r!="number"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"number",value:r}).message});return}return r}getValueAsBoolean({value:r}){if(typeof r!="boolean"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"boolean",value:r}).message});return}return r}getValueAsString({value:r}){if(typeof r!="string"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"string",value:r}).message});return}return r}isOptional(r){switch(r.type){case"nullable":return this.isOptional(r.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:r.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(r){switch(r.type){case"nullable":return!0;case"optional":return this.isNullable(r.value);case"named":{let e=this.resolveNamedType({typeId:r.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:r,values:e}){return new Error(`Expected auth type ${r.type}, got ${e.type}`)}newParameterNotRecognizedError(r){return new Error(`"${r}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:r,value:e}){return new Error(`Expected ${r}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:r,inlineFileProperties:e}){switch(r.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:r,inlineFileProperties:e});default:R(r)}}includeFileUploadBodyInWrappedRequest({fileUpload:r,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:r})||e&&this.fileUploadHasFileProperties({fileUpload:r})}fileUploadHasBodyProperties({fileUpload:r}){return r.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:R(e)}})}fileUploadHasFileProperties({fileUpload:r}){return r.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:R(e)}})}isListTypeReference(r){return r.type==="optional"?this.isListTypeReference(r.value):r.type==="list"||r.type==="set"}parsedEndpointMatches({endpoint:r,parsedEndpoint:e}){return r.location.method===e.method&&r.location.path===e.path}};a();s();var K={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();a();s();var Dr="",xf="self",vf="static";var x={};Yt(x,{Access:()=>ve,Array:()=>Be,AstNode:()=>w,Attribute:()=>Ue,Class:()=>ue,ClassInstantiation:()=>Q,ClassReference:()=>O,CodeBlock:()=>B,DataClass:()=>$e,Enum:()=>ke,Field:()=>_e,Map:()=>Me,Method:()=>le,MethodInvocation:()=>fe,Parameter:()=>pe,Trait:()=>qe,Type:()=>W,TypeLiteral:()=>D,Writer:()=>Z,array:()=>yx,assignVariable:()=>Ix,attribute:()=>mx,classReference:()=>xx,class_:()=>hx,codeblock:()=>De,dataClass:()=>vx,enum_:()=>wx,field:()=>bx,instantiateClass:()=>Ef,invokeMethod:()=>Ax,map:()=>Tx,mergeArrays:()=>Fx,method:()=>Ex,parameter:()=>Rx,string:()=>Cx,ternary:()=>Px,this_:()=>Ox,throwException:()=>Sx,trait:()=>gx,variable:()=>Nx});a();s();a();s();a();s();var ve={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};a();s();a();s();a();s();function wf(t){return{namespace:t.substring(0,t.lastIndexOf("\\")),name:t.substring(t.lastIndexOf("\\")+1)}}var Z=class extends Br{constructor({namespace:e,rootNamespace:n,customConfig:o}){super();d(this,"namespace");d(this,"rootNamespace");d(this,"customConfig");d(this,"references",{});this.namespace=e,this.rootNamespace=n,this.customConfig=o}addReference(e){var u,f;if(e.namespace==null)return;if(Object.keys(this.references).filter(c=>{let y=wf(c);return y.namespace!==e.namespace&&y.name===e.name}).length>0){e.requireFullyQualified();return}let o=e.namespace===Dr?e.name:`${e.namespace}\\${e.name}`;((f=(u=this.references)[o])!=null?f:u[o]=[]).push(e)}toString(){let e=`namespace ${this.namespace};`,n=this.stringifyImports();return n.length>0?`${e}
|
|
16
|
+
${o}`);this.isAtStartOfLine()&&(s=o+s),t&&(s+=`
|
|
17
|
+
`),this.writeInternal(s)}writeNoIndent(e){let t=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=t}writeNode(e){e.write(this)}writeNodeOrString(e){if(typeof e=="string"){this.write(e);return}this.writeNode(e)}writeNodeStatement(e){e.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(e){new G(e).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,t){new G(e).write(this),this.write(" ("),this.writeNode(t),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}controlFlowWithoutStatement(e){new G(e).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(e,t){this.dedent(),this.write("} "),new G(e).write(this),this.write(" ("),this.writeNode(t),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(e){this.dedent(),this.write("} "),new G(e).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}writeLine(e=""){this.write(e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
18
|
+
`)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
19
|
+
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:t,writeFunction:n}){if(e.length>0){let o=e[0];o!=null&&n(o);for(let s=1;s<e.length;s++){this.write(t);let f=e[s];f!=null&&n(f)}}}toString(){return this.buffer}writeInternal(e){return e.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=e.endsWith(`
|
|
20
|
+
`),this.lastCharacterIsSemicolon=e.endsWith(";")),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return Bb}};i();a();function Yo(r){return(r==null?void 0:r.name)!=null}i();a();var Kt=class extends he{constructor({condition:t,true_:n,false_:o}){super();d(this,"condition");d(this,"true_");d(this,"false_");this.condition=t,this.true_=n,this.false_=o}write(t){t.writeNode(this.condition),t.write(" ? "),t.writeNode(this.true_),t.write(" : "),t.writeNode(this.false_)}};i();a();i();a();i();a();var Jt=class{constructor(){d(this,"reporter");d(this,"snippet");d(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:t}){this.shouldUpdate({snippet:t,reporter:e.errors})&&(this.reporter=e.errors.clone(),this.snippet=t)}getResponseOrThrow({endpoint:e}){var t;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(t=this.err)!=null?t:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}shouldUpdate({snippet:e,reporter:t}){var n,o;return this.reporter==null||this.reporter.size()>0&&t.size()===0?!0:e.length>((o=(n=this.snippet)==null?void 0:n.length)!=null?o:0)}};var Zt=class{constructor(e){d(this,"context");this.context=e}async generate(e,t={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let o=new Jt;for(let s of n){let f=this.context.clone(),l=this.createSnippetGenerator(f);try{let c=await l.generateSnippet({endpoint:s,request:e,options:t});if(f.errors.empty())return{snippet:c,errors:void 0};o.update({context:f,snippet:c})}catch(c){o.err==null&&(o.err=c)}}return o.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e,t={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let o=new Jt;for(let s of n){let f=this.context.clone(),l=this.createSnippetGenerator(f);try{let c=l.generateSnippetSync({endpoint:s,request:e,options:t});if(f.errors.empty())return{snippet:c,errors:void 0};o.update({context:f,snippet:c})}catch(c){o.err==null&&(o.err=c)}}return o.getResponseOrThrow({endpoint:e.endpoint})}};i();a();i();a();i();a();var Qt=class{constructor(){d(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};i();a();var S={Critical:"CRITICAL",Warning:"WARNING"},Xt=class r{constructor(){d(this,"errors");d(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(tt(et({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(t=>t.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new r;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let t=[];for(let n of e){if(typeof n=="string"){t.push(n);continue}t[t.length-1]+=`[${n.index}]`}return t}};var er=class{constructor({ir:e,config:t,options:n={}}){d(this,"config");d(this,"options");d(this,"errors");d(this,"_ir");d(this,"httpEndpointReferenceParser");this._ir=e,this.config=t,this.options=n,this.errors=new Xt,this.httpEndpointReferenceParser=new Qt}associateQueryParametersByWireValue({parameters:e,values:t}){let n=[];for(let[o,s]of Object.entries(t)){this.errors.scope(o);try{let f=e.find(c=>c.name.wireValue===o);if(f==null)throw this.newParameterNotRecognizedError(o);let l=this.isListTypeReference(f.typeReference)&&!Array.isArray(s)?[s]:s;n.push({name:f.name,typeReference:f.typeReference,value:l})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:t,ignoreMissingParameters:n}){let o=[];for(let[s,f]of Object.entries(t)){this.errors.scope(s);try{let l=e.find(c=>c.name.wireValue===s);if(l==null){if(n)continue;this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(s).message});continue}o.push({name:l.name,typeReference:l.typeReference,value:f})}finally{this.errors.unscope()}}return o}getSingleFileValue({property:e,record:t}){let n=t[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:S.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:t}){let n=t[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let s of n){if(typeof s!="string"){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof s}`});return}o.push(s)}return o}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:S.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let t=this._ir.types[e];if(t==null){this.errors.add({severity:S.Critical,message:`Type identified by "${e}" could not be found`});return}return t}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t}){let n=this.getRecord(t);if(n==null)return;let o=e.discriminant.wireValue,s=n[o];if(s==null){this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof s!="string"){this.errors.add({severity:S.Critical,message:`Expected discriminant value to be a string but got: ${typeof s}`});return}let f=e.types[s];if(f==null){this.errors.add({severity:S.Critical,message:`No type found for discriminant value "${s}"`});return}let m=n,{[o]:l}=m,c=ti(m,[ei(o)]);return{singleDiscriminatedUnionType:f,discriminantValue:f.discriminantValue,value:c}}resolveEndpointOrThrow(e){let t=this.httpEndpointReferenceParser.tryParse(e);if(t==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(t)}resolveEndpointLocationOrThrow(e){let t=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:e})&&t.push(n);if(t.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return t}needsRequestParameter({request:e,inlinePathParameters:t,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:t})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:n}):!((o=e.metadata)!=null&&o.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:t}){var n,o;return t&&((o=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?o:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:R(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let t=this._ir.environments.environments;switch(t.type){case"singleBaseUrl":{let n=t.environments.find(o=>o.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=t.environments.find(o=>o.id===e);return n==null?void 0:n.name}default:R(t)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let t=this._ir.environments.environments;switch(t.type){case"singleBaseUrl":return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=t.environments[0];if(n==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(Ht(n.urls));for(let s of Ht(e))o.has(s)&&o.delete(s);return o.size>0?(this.errors.add({severity:S.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${Ht(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let t=this.resolveNamedType({typeId:e.value});return t==null?!1:t.type==="alias"?this.isNullable(t.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let t=this.resolveNamedType({typeId:e.value});return t==null?!1:t.type==="alias"?this.isNullable(t.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:t}){return new Error(`Expected auth type ${e.type}, got ${t.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:t}){return new Error(`Expected ${e}, got ${typeof t}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:t}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:t});default:R(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:t}){return this.fileUploadHasBodyProperties({fileUpload:e})||t&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:R(t)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:R(t)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:t}){return e.location.method===t.method&&e.location.path===t.path}};i();a();var te={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};i();a();i();a();i();a();var Zl="self",Ql="static";var v={};En(v,{Access:()=>Le,Array:()=>ze,AstNode:()=>b,Attribute:()=>Ve,Class:()=>ye,ClassInstantiation:()=>ne,ClassReference:()=>B,CodeBlock:()=>q,DataClass:()=>He,Enum:()=>Ye,Field:()=>Ke,Map:()=>Je,Method:()=>ve,MethodInvocation:()=>xe,Parameter:()=>ge,Trait:()=>Ze,Type:()=>V,TypeLiteral:()=>z,Writer:()=>re,array:()=>Wb,assignVariable:()=>nA,attribute:()=>Gb,classReference:()=>Hb,class_:()=>zb,codeblock:()=>Qe,dataClass:()=>Yb,enum_:()=>Kb,field:()=>Jb,instantiateClass:()=>ic,invokeMethod:()=>Zb,map:()=>Xb,mergeArrays:()=>aA,method:()=>eA,parameter:()=>tA,string:()=>iA,ternary:()=>rA,this_:()=>sA,throwException:()=>Qb,trait:()=>Vb,variable:()=>oA});i();a();i();a();i();a();var Le={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};i();a();i();a();i();a();function Xl(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var re=class extends Yt{constructor({namespace:t,rootNamespace:n,customConfig:o}){super();d(this,"namespace");d(this,"rootNamespace");d(this,"customConfig");d(this,"references",{});this.namespace=t,this.rootNamespace=n,this.customConfig=o}addReference(t){var f,l;if(t.namespace==null)return;if(Object.keys(this.references).filter(c=>{let m=Xl(c);return m.namespace!==t.namespace&&m.name===t.name}).length>0){t.requireFullyQualified();return}let o=t.namespace===""?t.name:`${t.namespace}\\${t.name}`;((l=(f=this.references)[o])!=null?l:f[o]=[]).push(t)}toString(t=!1){if(t)return this.buffer;let n=`namespace ${this.namespace};`,o=this.stringifyImports();return o.length>0?`${n}
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${o}
|
|
23
23
|
|
|
24
|
-
${this.buffer}`:
|
|
24
|
+
${this.buffer}`:n+`
|
|
25
25
|
|
|
26
|
-
`+this.buffer}stringifyImports(){let
|
|
27
|
-
`)}};var
|
|
28
|
-
`).forEach(n=>{
|
|
29
|
-
`):void 0;o!=null&&o.length>1&&(o.forEach(
|
|
30
|
-
`)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}if(this.internalType.value.includes("'")){e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}e.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:R(this.internalType)}}isClass(){return this.internalType.type==="class"}asClassOrThrow(){if(this.isClass())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a class")}writeStringWithHeredoc({writer:e,value:n}){e.writeLine("<<<EOT"),e.writeNoIndent(n),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:n}){e.writeNode(new Q({classReference:n.reference,arguments_:[t.map({entries:n.fields.map(o=>({key:t.string(o.name),value:o.value}))})]}))}writeList({writer:e,list:n}){let o=dx({values:n.values});if(o.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of o)i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:n}){let o=cx({entries:n.entries});if(o.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of o)i.key.write(e),e.write(" => "),i.value.write(e),e.writeLine(",");e.dedent(),e.write("]")}static list({values:e}){return new this({type:"list",values:e})}static boolean(e){return new this({type:"boolean",value:e})}static class_({reference:e,fields:n}){return new this({type:"class",reference:e,fields:n})}static file(e){return new this({type:"file",value:e})}static float(e){return new this({type:"float",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static map({entries:e}){return new this({type:"map",entries:e})}static reference(e){return new this({type:"reference",value:e})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({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 o of n)e.writeNode(t.unknown(o)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:n}){let o=Object.entries(n);if(o.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[i,u]of o)e.write(`'${i}' => `),e.writeNode(t.unknown(u)),e.writeLine(",");e.dedent(),e.write("]")}};function fx({writer:t,value:r}){return new Q({classReference:new O({name:"DateTime",namespace:""}),arguments_:[new B(`'${r}'`)]})}function lx({writer:t,value:r}){return new fe({on:new O({name:"File",namespace:`${t.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new B(`"${r}"`)]})}function cx({entries:t}){return t.filter(r=>!D.isNop(r.key)&&!D.isNop(r.value))}function dx({values:t}){return t.filter(r=>!D.isNop(r))}var W=class t extends w{constructor(e){super();d(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"int":e.write("int");break;case"string":e.write("string");break;case"bool":e.write("bool");break;case"float":e.write("float");break;case"date":e.addReference(Af),e.write("DateTime");break;case"dateTime":e.addReference(Af),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!n){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:n}),e.write(">");break;case"map":{if(!n){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:n}),e.write(", "),this.internalType.valueType.write(e,{comment:n}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!n){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");let o=this.internalType.entries.filter(f=>!f.valueType.isOptional()),i=this.internalType.entries.filter(f=>f.valueType.isOptional()),u=[...o,...i];for(let f of u)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:f,comment:n}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((o,i)=>{i>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:o,comment:n})}),e.write("}");break}case"union":{let o=this.getUniqueTypes({types:this.internalType.types,comment:n,writer:e}),i=o.filter(u=>u.underlyingType().internalType.type==="mixed").length>0;if(i&&!n){e.write("mixed");break}o.length>0&&n?(e.writeLine("("),o.forEach((u,f)=>{f>0?e.write(" * |"):e.write(" * "),i&&(u=u.underlyingType()),u.write(e,{comment:n}),e.writeLine(),f++}),e.write(" * )")):o.forEach((u,f)=>{f>0&&e.write("|"),i&&(u=u.underlyingType()),u.write(e,{comment:n}),f++});break}case"optional":{let o=this.internalType.value.internalType.type==="mixed",i=this.internalType.value.internalType.type==="union";!i&&!o&&e.write("?"),this.internalType.value.write(e,{comment:n}),i&&(e.write("|"),e.writeNode(t.null()));break}case"reference":if(n){e.writeNode(this.internalType.value);let o=this.internalType.value.generics;o&&o.length>0&&(e.write("<"),o.forEach((i,u)=>{u>0&&e.write(", "),i.write(e,{comment:n})}),e.write(">"))}else e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;case"literal":if(n)e.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":e.write("string");break;case"boolean":e.write("bool");break;default:R(this.internalType.value.internalType)}break;default:R(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:t.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new O({name:"DateTime",namespace:Dr});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:R(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static typeDict(e,{multiline:n}={}){return new this({type:"typeDict",entries:e,multiline:n})}static union(e){return new this({type:"union",types:e})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static null(){return new this({type:"null"})}static reference(e){return new this({type:"reference",value:e})}static enumString(e){return new this({type:"enumString",value:e})}static literalString(e){return new this({type:"literal",value:D.string(e)})}static literalBoolean(e){return new this({type:"literal",value:D.boolean(e)})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeTypeDictEntry({writer:e,entry:n,comment:o}){e.write(n.key),n.optional&&e.write("?"),e.write(": "),n.valueType.write(e,{comment:o})}getUniqueTypes({writer:e,types:n,comment:o}){let i=new Set;return n.filter(u=>{let f=u.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig,comment:o});return i.has(f)?!1:(i.add(f),!0)})}toString({namespace:e,rootNamespace:n,customConfig:o,comment:i}){let u=new Z({namespace:e,rootNamespace:n,customConfig:o});return this.write(u,{comment:i!=null?i:!1}),u.toString()}},Af=new O({namespace:Dr,name:"DateTime"});a();s();function Sf(t){return t.startsWith("$")?t.slice(1):t}var Tf="values",$e=class extends w{constructor({name:e,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:f,constructorAccess:c}){super();d(this,"name");d(this,"namespace");d(this,"constructorAccess");d(this,"class_");this.name=e,this.namespace=n,this.constructorAccess=c!=null?c:"public",this.class_=new ue({name:e,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:f})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=be(this.class_.fields).map(o=>Ge(je({},o),{name:Sf(o.name)}));n.length>0&&this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:x.codeblock(o=>{for(let i of n)o.write(`$this->${i.name} = $${Tf}['${i.name}']`),i.type.isOptional()&&o.write(" ?? null"),o.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new pe({name:Tf,type:W.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new B("[]"):void 0})]}};a();s();a();s();var le=class extends w{constructor({name:e,access:n,parameters:o,throws:i,return_:u,body:f,docs:c,classReference:y,static_:m}){super();d(this,"name");d(this,"access");d(this,"parameters");d(this,"throws");d(this,"return_");d(this,"body");d(this,"docs");d(this,"classReference");d(this,"static_");this.name=e,this.access=n,this.parameters=o,this.throws=i!=null?i:[],this.return_=u,this.body=f,this.docs=c,this.classReference=y,this.static_=m!=null?m:!1}write(e){var u;this.writeComment(e),e.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(f=>!f.type.isOptional()),o=this.parameters.filter(f=>f.type.isOptional());[...n,...o].forEach((f,c)=>{c>0&&e.write(", "),f.write(e)}),e.write("): "),this.return_!=null?e.writeNodeOrString(this.return_):e.write("void"),e.writeLine(" {"),e.indent(),(u=this.body)==null||u.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let n=new k({docs:this.docs});for(let o of this.parameters)n.addTag({tagType:"param",type:o.type,name:o.name,docs:o.docs});this.return_!=null&&this.return_!==xf&&this.return_!==vf&&n.addTag({tagType:"return",type:this.return_});for(let o of this.throws)n.addTag({tagType:"throws",type:W.reference(o)});e.writeNode(n)}};var ke=class extends w{constructor({name:e,namespace:n,backing:o,docs:i,serializable:u}){super();d(this,"name");d(this,"namespace");d(this,"backing");d(this,"docs");d(this,"members",[]);d(this,"serializable");this.name=e,this.namespace=n,this.backing=o,this.docs=i,this.serializable=u!=null?u:!1}addMember(e){this.members.push(e)}write(e){this.writeComment(e),e.write("enum "),e.writeLine(`${this.name}`),this.backing!=null&&e.write(` : ${this.backing}`),this.serializable&&(e.addReference(new O({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let n of this.members)e.write(`case ${n.name}`),n.value!=null&&(typeof n.value=="string"?e.write(` = "${n.value}"`):e.write(` = ${n.value}`)),e.writeTextStatement("");this.serializable&&(e.newLine(),e.writeNode(new le({name:"jsonSerialize",return_:W.string(),access:"public",parameters:[],body:new B("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new k({docs:this.docs}).write(e)}};a();s();var _e=class extends w{constructor({name:e,type:n,access:o,readonly_:i,initializer:u,docs:f,inlineDocs:c,attributes:y,inherited:m}){super();d(this,"name");d(this,"type");d(this,"access");d(this,"readonly_");d(this,"initializer");d(this,"docs");d(this,"inlineDocs");d(this,"attributes");d(this,"inherited");this.name=we(e),this.type=n,this.access=o,this.readonly_=i!=null?i:!1,this.initializer=u,this.docs=f,this.inlineDocs=c,this.attributes=y!=null?y:[],this.inherited=m!=null?m:!1}write(e){this.writeComment(e),this.writeAttributesIfPresent(e),e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null&&(e.write(" = "),this.initializer.write(e)),e.write(";"),this.inlineDocs!=null&&e.write(` // ${this.inlineDocs}`),e.newLine()}writeComment(e){let n=new k;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((n,o)=>{o>0&&e.write(", "),n.write(e)}),e.writeLine("]"))}};a();s();var Me=class extends w{constructor({entries:e,multiline:n}){super();d(this,"entries");d(this,"multiline");this.entries=e!=null?e:[],this.multiline=n!=null?n:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:n,value:o}of this.entries)n.write(e),e.write(" => "),o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[n,{key:o,value:i}]of this.entries.entries())n>0&&e.write(", "),o.write(e),e.write(" => "),i.write(e);e.write("]")}};a();s();var Ut=class extends w{constructor(e){super();d(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),fr({writer:e,arguments_:this.arrays.map(n=>De(o=>{if(typeof n=="string"||n instanceof w){o.writeNodeOrString(n);return}o.writeNodeOrString(n.ref),n.fallback&&(o.write(" ?? "),o.writeNodeOrString(n.fallback))}))})}};function yx(t){return new Be(t)}function mx(t){return new Ue(t)}function hx(t){return new ue(t)}function gx(t){return new qe(t)}function xx(t){return new O(t)}function De(t){return new B(t)}function vx(t){return new $e(t)}function wx(t){return new ke(t)}function bx(t){return new _e(t)}function Ef(t){return new Q(t)}function Ax(t){return new fe(t)}function Sx(t){return De(r=>{r.write("throw "),r.writeNode(Ef(t))})}function Tx(t){return new Me(t)}function Ex(t){return new le(t)}function Rx(t){return new pe(t)}function Px(t){return new Ur(t)}function Ix(t,r){return De(e=>{e.writeNodeOrString(t),e.write(" = "),e.writeNodeOrString(r)})}function Nx(t){return De(we(t))}function Cx(t){return De(`"${t}"`)}function Fx(...t){return new Ut(t)}function Ox(){return new B(t=>{t.write("$this")})}var Rf="$client",qt="Example",Pf=`<?php
|
|
26
|
+
`+this.buffer}stringifyImports(){let t=Object.keys(this.references);return t.length===0?"":t.filter(n=>Xl(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
|
|
27
|
+
`)}};var b=class extends he{toString(e){if(e==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:t,rootNamespace:n,customConfig:o,skipImports:s=!1}=e,f=new re({namespace:t,rootNamespace:n,customConfig:o});return this.write(f),f.toString(s)}async toStringAsync({namespace:e,rootNamespace:t,customConfig:n}){let o=new re({namespace:e,rootNamespace:t,customConfig:n});return this.write(o),o.toString()}};var ze=class extends b{constructor({entries:t}){super();d(this,"entries");this.entries=t!=null?t:[]}write(t){t.write("["),this.entries.forEach((n,o)=>{o>0&&t.write(", "),n.write(t)}),t.write("]")}};i();a();var Ve=class extends b{constructor(t){var n;super();d(this,"reference");d(this,"arguments");this.reference=t.reference,this.arguments=(n=t.arguments)!=null?n:[]}write(t){t.addReference(this.reference),t.write(`${this.reference.name}`),this.arguments.length>0&&(t.write("("),this.arguments.forEach((n,o)=>{o>0&&t.write(","),typeof n=="string"?t.write(n):n.write(t)}),t.write(")"))}};i();a();i();a();var B=class extends b{constructor({name:t,namespace:n,generics:o}){super();d(this,"name");d(this,"namespace");d(this,"generics");d(this,"fullyQualified");this.name=t,this.namespace=n,this.generics=o,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(t){t.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;t.write(`${n}`)}};i();a();i();a();function Fe(r){return r.startsWith("$")?r:`$${r}`}var M=class extends b{constructor({docs:t}={}){super();d(this,"docs");d(this,"tags",[]);this.docs=t}addTag(t){this.tags.push(tt(et({},t),{name:t.name!=null?Fe(t.name):void 0}))}write(t){t.writeLine("/**"),this.docs!=null&&(this.docs.split(`
|
|
28
|
+
`).forEach(n=>{t.writeLine(` * ${n}`)}),this.tags.length>0&&t.writeLine(" *"));for(let n of this.tags)this.writeTag({writer:t,tag:n});t.writeLine(" */")}writeTag({writer:t,tag:n}){let o=n.docs!=null?n.docs.split(`
|
|
29
|
+
`):void 0;o!=null&&o.length>1&&(o.forEach(s=>{t.writeLine(` * ${s}`)}),t.writeLine(" *")),t.write(` * @${n.tagType} `),n.type.write(t,{comment:!0}),n.name!=null&&t.write(` ${n.name}`),o!=null&&o.length===1&&t.write(` ${o[0]}`),t.newLine()}};i();a();function _e(r){return qb(r,[Le.Public,Le.PublicReadonly,Le.Protected,Le.Private])}function qb(r,e){return e.reduce((t,n)=>[...t,...r.filter(o=>o.access===n)],[])}var ye=class extends b{constructor({name:t,namespace:n,abstract:o,docs:s,parentClassReference:f,traits:l}){super();d(this,"name");d(this,"namespace");d(this,"abstract");d(this,"docs");d(this,"parentClassReference");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);d(this,"constructor_");this.name=t,this.namespace=n,this.abstract=o!=null?o:!1,this.docs=s,this.parentClassReference=f,this.traits=l!=null?l:[]}addConstructor(t){this.constructor_=t}addField(t){this.fields.push(t)}addMethod(t){this.methods.push(t)}addMethods(t){this.methods.push(...t)}addTrait(t){this.traits.push(t)}write(t){t.addReference(new B({name:this.name,namespace:this.namespace})),this.abstract&&t.write("abstract "),this.writeComment(t),t.write(`class ${this.name} `),this.parentClassReference!=null&&(t.write("extends "),this.parentClassReference.write(t)),t.newLine(),t.writeLine("{"),t.indent(),this.traits.length>0&&(t.write("use "),this.traits.forEach((n,o)=>{o>0&&t.write(","),t.writeNode(n)}),t.writeTextStatement(""),t.newLine()),this.writeFields({writer:t,fields:_e(this.fields)}),(this.constructor!=null||this.methods.length>0)&&t.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:t,constructor:this.constructor_}),this.methods.length>0&&t.newLine()),this.writeMethods({writer:t,methods:_e(this.methods)}),t.dedent(),t.writeLine("}")}writeComment(t){if(this.docs==null)return;new M({docs:this.docs}).write(t)}writeConstructor({writer:t,constructor:n}){var o;this.writeConstructorComment({writer:t,constructor:n}),n.access!=null&&t.write(`${n.access} `),t.write("function __construct("),t.indent(),n.parameters.forEach((s,f)=>{f===0&&t.newLine(),s.write(t),t.writeLine(",")}),t.dedent(),t.writeLine(")"),t.writeLine("{"),t.indent(),(o=n.body)==null||o.write(t),t.writeNewLineIfLastLineNot(),t.dedent(),t.writeLine("}")}writeConstructorComment({writer:t,constructor:n}){if(n.parameters.length===0)return;let o=new M;for(let s of n.parameters)o.addTag(s.getCommentTag());o.write(t)}writeFields({writer:t,fields:n}){n.filter(o=>!o.inherited).forEach((o,s)=>{s>0&&t.newLine(),o.write(t),t.writeNewLineIfLastLineNot()})}writeMethods({writer:t,methods:n}){n.forEach((o,s)=>{s>0&&t.newLine(),o.write(t),t.writeNewLineIfLastLineNot()})}};i();a();i();a();function St({writer:r,arguments_:e,multiline:t}){if(e.length===0){r.write("()");return}if(t){Ub({writer:r,arguments_:e});return}Mb({writer:r,arguments_:e})}function Ub({writer:r,arguments_:e}){r.writeLine("("),r.indent();for(let t of e)tc({writer:r,argument:t,writeCompact:!1}),r.writeLine(",");r.dedent(),r.write(")")}function Mb({writer:r,arguments_:e}){r.write("("),e.forEach((t,n)=>{n>0&&r.write(", "),tc({writer:r,argument:t,writeCompact:!0})}),r.write(")")}function tc({writer:r,argument:e,writeCompact:t}){Yo(e)?(e.docs&&(t?r.write(`/* ${e.docs} */ `):r.writeLine(`/* ${e.docs} */`)),r.write(`${e.name}: `),r.writeNodeOrString(e.assignment)):e.write(r)}var ne=class extends b{constructor({classReference:t,arguments_:n,multiline:o}){super();d(this,"classReference");d(this,"arguments_");d(this,"multiline");this.classReference=t,this.arguments_=n,this.multiline=o!=null?o:!1}write(t){t.write("new "),t.writeNode(this.classReference),St({writer:t,arguments_:this.arguments_,multiline:this.multiline})}};i();a();var q=class extends b{constructor(t){super();d(this,"arg");this.arg=t}write(t){return new G(this.arg).write(t)}};i();a();i();a();var ge=class extends b{constructor({name:t,type:n,docs:o,initializer:s,access:f,readonly_:l}){super();d(this,"name");d(this,"type");d(this,"docs");d(this,"initializer");d(this,"access");d(this,"readonly_");this.name=Fe(t),this.type=n,this.docs=o,this.initializer=s,this.access=f,this.readonly_=l!=null?l:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(t){this.access!=null&&t.write(`${this.access} `),this.readonly_&&t.write("readonly "),this.type.write(t),t.write(` ${this.name}`),this.initializer!=null?(t.write(" = "),this.initializer.write(t)):this.type.isOptional()&&t.write(" = null")}};i();a();i();a();i();a();i();a();var xe=class extends b{constructor({method:t,arguments_:n,static_:o,multiline:s,on:f}){super();d(this,"method");d(this,"arguments_");d(this,"multiline");d(this,"static_");d(this,"on");this.method=t,this.arguments_=n,this.static_=o!=null?o:!1,this.multiline=s!=null?s:!1,this.on=f}write(t){this.on!=null&&(this.on.write(t),t.write(this.getMethodAccessor())),t.write(this.method),St({writer:t,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};var z=class r extends b{constructor(t){super();d(this,"internalType");this.internalType=t}write(t){switch(this.internalType.type){case"list":{this.writeList({writer:t,list:this.internalType});break}case"boolean":{t.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:t,class_:this.internalType});break}case"file":{t.writeNode($b({writer:t,value:this.internalType.value}));break}case"float":{t.write(this.internalType.value.toString());break}case"number":{t.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:t,map:this.internalType});break}case"reference":{t.writeNode(this.internalType.value);break}case"datetime":{t.writeNode(Db({writer:t,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
|
|
30
|
+
`)){this.writeStringWithHeredoc({writer:t,value:this.internalType.value});break}if(this.internalType.value.includes("'")){t.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}t.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:t,value:this.internalType.value});break}case"null":{t.write("null");break}case"nop":break;default:R(this.internalType)}}isClass(){return this.internalType.type==="class"}asClassOrThrow(){if(this.isClass())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a class")}writeStringWithHeredoc({writer:t,value:n}){t.writeLine("<<<EOT"),t.writeNoIndent(n),t.newLine(),t.writeNoIndent("EOT")}writeClass({writer:t,class_:n}){t.writeNode(new ne({classReference:n.reference,arguments_:[r.map({entries:n.fields.map(o=>({key:r.string(o.name),value:o.value}))})]}))}writeList({writer:t,list:n}){let o=jb({values:n.values});if(o.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let s of o)s.write(t),t.writeLine(",");t.dedent(),t.write("]")}writeMap({writer:t,map:n}){let o=kb({entries:n.entries});if(o.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let s of o)s.key.write(t),t.write(" => "),s.value.write(t),t.writeLine(",");t.dedent(),t.write("]")}static list({values:t}){return new this({type:"list",values:t})}static boolean(t){return new this({type:"boolean",value:t})}static class_({reference:t,fields:n}){return new this({type:"class",reference:t,fields:n})}static file(t){return new this({type:"file",value:t})}static float(t){return new this({type:"float",value:t})}static datetime(t){return new this({type:"datetime",value:t})}static number(t){return new this({type:"number",value:t})}static map({entries:t}){return new this({type:"map",entries:t})}static reference(t){return new this({type:"reference",value:t})}static string(t){return new this({type:"string",value:t})}static unknown(t){return new this({type:"unknown",value:t})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(t){return t.internalType.type==="nop"}writeUnknown({writer:t,value:n}){switch(typeof n){case"boolean":t.write(n.toString());return;case"string":t.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":t.write(n.toString());return;case"object":if(n==null){t.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:t,value:n});return}this.writeUnknownMap({writer:t,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:t,value:n}){if(n.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let o of n)t.writeNode(r.unknown(o)),t.writeLine(",");t.dedent(),t.write("]")}writeUnknownMap({writer:t,value:n}){let o=Object.entries(n);if(o.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let[s,f]of o)t.write(`'${s}' => `),t.writeNode(r.unknown(f)),t.writeLine(",");t.dedent(),t.write("]")}};function Db({writer:r,value:e}){return new ne({classReference:new B({name:"DateTime",namespace:""}),arguments_:[new q(`'${e}'`)]})}function $b({writer:r,value:e}){return new xe({on:new B({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new q(`"${e}"`)]})}function kb({entries:r}){return r.filter(e=>!z.isNop(e.key)&&!z.isNop(e.value))}function jb({values:r}){return r.filter(e=>!z.isNop(e))}var V=class r extends b{constructor(t){super();d(this,"internalType");this.internalType=t}write(t,{comment:n}={}){switch(this.internalType.type){case"int":t.write("int");break;case"string":t.write("string");break;case"bool":t.write("bool");break;case"float":t.write("float");break;case"date":t.addReference(rc),t.write("DateTime");break;case"dateTime":t.addReference(rc),t.write("DateTime");break;case"mixed":t.write("mixed");break;case"object":t.write("object");break;case"array":if(!n){t.write("array");break}t.write("array<"),this.internalType.value.write(t,{comment:n}),t.write(">");break;case"map":{if(!n){t.write("array");break}t.write("array<"),this.internalType.keyType.write(t,{comment:n}),t.write(", "),this.internalType.valueType.write(t,{comment:n}),t.write(">");break}case"null":{t.write("null");break}case"typeDict":{if(!n){t.write("array");break}if(this.internalType.multiline){t.writeLine("array{");let o=this.internalType.entries.filter(l=>!l.valueType.isOptional()),s=this.internalType.entries.filter(l=>l.valueType.isOptional()),f=[...o,...s];for(let l of f)t.write(" * "),this.writeTypeDictEntry({writer:t,entry:l,comment:n}),t.writeLine(",");t.write(" * }");break}t.write("array{"),this.internalType.entries.forEach((o,s)=>{s>0&&t.write(", "),this.writeTypeDictEntry({writer:t,entry:o,comment:n})}),t.write("}");break}case"union":{this.writeUnion({writer:t,unionTypes:this.internalType.types,comment:n});break}case"optional":{let o=this.internalType.value.internalType,s=o.type==="mixed",f=o.type==="union";!f&&!s&&t.write("?"),this.internalType.value.write(t,{comment:n}),f&&!this.unionHasOptional(o.types)&&(t.write("|"),t.writeNode(r.null()));break}case"reference":if(n){t.writeNode(this.internalType.value);let o=this.internalType.value.generics;o&&o.length>0&&(t.write("<"),o.forEach((s,f)=>{f>0&&t.write(", "),s.write(t,{comment:n})}),t.write(">"))}else t.writeNode(this.internalType.value);break;case"enumString":n?(t.write("value-of<"),t.writeNode(this.internalType.value),t.write(">")):t.write("string");break;case"literal":if(n)t.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":t.write("string");break;case"boolean":t.write("bool");break;default:R(this.internalType.value.internalType)}break;default:R(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var t;return(t=this.underlyingTypeIfOptional())!=null?t:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new B({name:"DateTime",namespace:""});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:R(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(t){return new this({type:"array",value:t})}static map(t,n){return new this({type:"map",keyType:t,valueType:n})}static typeDict(t,{multiline:n}={}){return new this({type:"typeDict",entries:t,multiline:n})}static union(t){let n=this.flattenUnionTypes(t),o=cn(n,ln);return new this({type:"union",types:o})}static flattenUnionTypes(t){let n=[];for(let o of t)o.internalType.type==="union"?n.push(...this.flattenUnionTypes(o.internalType.types)):n.push(o);return n}static optional(t){return this.isAlreadyOptional(t)?t:new this({type:"optional",value:t})}static null(){return new this({type:"null"})}static reference(t){return new this({type:"reference",value:t})}static enumString(t){return new this({type:"enumString",value:t})}static literalString(t){return new this({type:"literal",value:z.string(t)})}static literalBoolean(t){return new this({type:"literal",value:z.boolean(t)})}static isAlreadyOptional(t){return t.internalType.type==="optional"}writeUnion({writer:t,unionTypes:n,comment:o}){let s=this.getUniqueTypes({types:n,comment:o,writer:t}),f=this.unwrapOptionalTypes(s),l=f.filter(c=>c.underlyingType().internalType.type==="mixed").length>0;if(l&&!o){t.write("mixed");return}if(f.length>0&&o){t.writeLine("("),f.forEach((c,m)=>{m>0?t.write(" * |"):t.write(" * "),l&&(c=c.underlyingType()),c.write(t,{comment:o}),t.writeLine(),m++}),t.write(" * )");return}f.forEach((c,m)=>{m>0&&t.write("|"),l&&(c=c.underlyingType()),c.write(t,{comment:o}),m++})}writeTypeDictEntry({writer:t,entry:n,comment:o}){t.write(n.key),n.optional&&t.write("?"),t.write(": "),n.valueType.write(t,{comment:o})}getUniqueTypes({writer:t,types:n,comment:o}){let s=cn(n,ln),f=new Set;return s.filter(l=>{let c=l.toString({namespace:t.namespace,rootNamespace:t.rootNamespace,customConfig:t.customConfig,comment:o});return f.has(c)?!1:(f.add(c),!0)})}unwrapOptionalTypes(t){let n=!1,o=t.map(s=>s.internalType.type==="optional"?(n=!0,s.internalType.value):s);return n&&o.push(r.null()),o}unionHasOptional(t){return t.filter(n=>n.internalType.type==="optional").length>0}toString({namespace:t,rootNamespace:n,customConfig:o,comment:s}){let f=new re({namespace:t,rootNamespace:n,customConfig:o});return this.write(f,{comment:s!=null?s:!1}),f.toString()}},rc=new B({namespace:"",name:"DateTime"});i();a();function nc(r){return r.startsWith("$")?r.slice(1):r}var oc="values",He=class extends b{constructor({name:t,namespace:n,abstract:o,docs:s,parentClassReference:f,traits:l,constructorAccess:c}){super();d(this,"name");d(this,"namespace");d(this,"constructorAccess");d(this,"class_");this.name=t,this.namespace=n,this.constructorAccess=c!=null?c:"public",this.class_=new ye({name:t,namespace:n,abstract:o,docs:s,parentClassReference:f,traits:l})}addField(t){this.class_.addField(t)}addMethod(t){this.class_.addMethod(t)}addTrait(t){this.class_.addTrait(t)}write(t){let n=_e(this.class_.fields).map(o=>tt(et({},o),{name:nc(o.name)}));n.length>0&&this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:v.codeblock(o=>{for(let s of n)o.write(`$this->${s.name} = $${oc}['${s.name}']`),s.type.isOptional()&&o.write(" ?? null"),o.write(";")})}),this.class_.write(t)}allFieldsAreOptional(){return this.class_.fields.every(t=>t.type.isOptional())}getConstructorParameters({orderedFields:t}){return[new ge({name:oc,type:V.typeDict(t.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new q("[]"):void 0})]}};i();a();i();a();var ve=class extends b{constructor({name:t,access:n,parameters:o,throws:s,return_:f,body:l,docs:c,classReference:m,static_:h}){super();d(this,"name");d(this,"access");d(this,"parameters");d(this,"throws");d(this,"return_");d(this,"body");d(this,"docs");d(this,"classReference");d(this,"static_");this.name=t,this.access=n,this.parameters=o,this.throws=s!=null?s:[],this.return_=f,this.body=l,this.docs=c,this.classReference=m,this.static_=h!=null?h:!1}write(t){var f;this.writeComment(t),t.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(l=>!l.type.isOptional()),o=this.parameters.filter(l=>l.type.isOptional());[...n,...o].forEach((l,c)=>{c>0&&t.write(", "),l.write(t)}),t.write("): "),this.return_!=null?t.writeNodeOrString(this.return_):t.write("void"),t.writeLine(" {"),t.indent(),(f=this.body)==null||f.write(t),t.dedent(),t.writeLine("}")}writeComment(t){let n=new M({docs:this.docs});for(let o of this.parameters)n.addTag({tagType:"param",type:o.type,name:o.name,docs:o.docs});this.return_!=null&&this.return_!==Zl&&this.return_!==Ql&&n.addTag({tagType:"return",type:this.return_});for(let o of this.throws)n.addTag({tagType:"throws",type:V.reference(o)});t.writeNode(n)}};var Ye=class extends b{constructor({name:t,namespace:n,backing:o,docs:s,serializable:f}){super();d(this,"name");d(this,"namespace");d(this,"backing");d(this,"docs");d(this,"members",[]);d(this,"serializable");this.name=t,this.namespace=n,this.backing=o,this.docs=s,this.serializable=f!=null?f:!1}addMember(t){this.members.push(t)}write(t){this.writeComment(t),t.write("enum "),t.writeLine(`${this.name}`),this.backing!=null&&t.write(` : ${this.backing}`),this.serializable&&(t.addReference(new B({name:"JsonSerializable",namespace:""})),t.writeLine(" implements JsonSerializable")),t.writeLine(" {"),t.indent();for(let n of this.members)t.write(`case ${n.name}`),n.value!=null&&(typeof n.value=="string"?t.write(` = "${n.value}"`):t.write(` = ${n.value}`)),t.writeTextStatement("");this.serializable&&(t.newLine(),t.writeNode(new ve({name:"jsonSerialize",return_:V.string(),access:"public",parameters:[],body:new q("return $this->value;")}))),t.writeNewLineIfLastLineNot(),t.dedent(),t.writeLine("}")}writeComment(t){if(this.docs==null)return;new M({docs:this.docs}).write(t)}};i();a();var Ke=class extends b{constructor({name:t,type:n,access:o,readonly_:s,initializer:f,docs:l,inlineDocs:c,attributes:m,inherited:h}){super();d(this,"name");d(this,"type");d(this,"access");d(this,"readonly_");d(this,"initializer");d(this,"docs");d(this,"inlineDocs");d(this,"attributes");d(this,"inherited");this.name=Fe(t),this.type=n,this.access=o,this.readonly_=s!=null?s:!1,this.initializer=f,this.docs=l,this.inlineDocs=c,this.attributes=m!=null?m:[],this.inherited=h!=null?h:!1}write(t){this.writeComment(t),this.writeAttributesIfPresent(t),t.write(`${this.access} `),this.readonly_&&t.write("readonly "),this.type.write(t),t.write(` ${this.name}`),this.initializer!=null&&(t.write(" = "),this.initializer.write(t)),t.write(";"),this.inlineDocs!=null&&t.write(` // ${this.inlineDocs}`),t.newLine()}writeComment(t){let n=new M;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(t)}writeAttributesIfPresent(t){this.attributes.length>0&&(t.write("#["),this.attributes.forEach((n,o)=>{o>0&&t.write(", "),n.write(t)}),t.writeLine("]"))}};i();a();var Je=class extends b{constructor({entries:t,multiline:n}){super();d(this,"entries");d(this,"multiline");this.entries=t!=null?t:[],this.multiline=n!=null?n:!1}write(t){if(this.multiline){this.writeMultiline(t);return}this.writeCompact(t)}writeMultiline(t){t.writeLine("["),t.indent();for(let{key:n,value:o}of this.entries)n.write(t),t.write(" => "),o.write(t),t.writeLine(",");t.dedent(),t.write("]")}writeCompact(t){t.write("[");for(let[n,{key:o,value:s}]of this.entries.entries())n>0&&t.write(", "),o.write(t),t.write(" => "),s.write(t);t.write("]")}};i();a();var Ze=class extends b{constructor({name:t,namespace:n,docs:o,traits:s}){super();d(this,"name");d(this,"namespace");d(this,"docs");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);this.name=t,this.namespace=n,this.docs=o,this.traits=s!=null?s:[]}addField(t){this.fields.push(t)}addMethod(t){this.methods.push(t)}write(t){this.writeComment(t),t.write(`trait ${this.name} `),t.newLine(),t.writeLine("{"),t.indent(),this.traits.length>0&&(t.write("use "),this.traits.forEach((n,o)=>{o>0&&t.write(","),t.writeNode(n)}),t.writeTextStatement(""),t.newLine()),this.writeFields({writer:t,fields:_e(this.fields)}),this.fields.length>0&&this.methods.length>0&&t.newLine(),this.writeMethods({writer:t,methods:_e(this.methods)}),t.dedent(),t.writeLine("}")}writeComment(t){let n=new M({docs:this.docs});for(let o of this.fields)n.addTag({tagType:"property",type:o.type,name:o.name});n.write(t)}writeFields({writer:t,fields:n}){n.forEach((o,s)=>{s>0&&t.newLine(),o.write(t),t.writeNewLineIfLastLineNot()})}writeMethods({writer:t,methods:n}){n.forEach((o,s)=>{s>0&&t.newLine(),o.write(t),t.writeNewLineIfLastLineNot()})}};i();a();var dn=class extends b{constructor(t){super();d(this,"arrays");this.arrays=t}write(t){t.write("array_merge"),St({writer:t,arguments_:this.arrays.map(n=>Qe(o=>{if(typeof n=="string"||n instanceof b){o.writeNodeOrString(n);return}o.writeNodeOrString(n.ref),n.fallback&&(o.write(" ?? "),o.writeNodeOrString(n.fallback))}))})}};function Wb(r){return new ze(r)}function Gb(r){return new Ve(r)}function zb(r){return new ye(r)}function Vb(r){return new Ze(r)}function Hb(r){return new B(r)}function Qe(r){return new q(r)}function Yb(r){return new He(r)}function Kb(r){return new Ye(r)}function Jb(r){return new Ke(r)}function ic(r){return new ne(r)}function Zb(r){return new xe(r)}function Qb(r){return Qe(e=>{e.write("throw "),e.writeNode(ic(r))})}function Xb(r){return new Je(r)}function eA(r){return new ve(r)}function tA(r){return new ge(r)}function rA(r){return new Kt(r)}function nA(r,e){return Qe(t=>{t.writeNodeOrString(r),t.write(" = "),t.writeNodeOrString(e)})}function oA(r){return Qe(Fe(r))}function iA(r){return Qe(`"${r}"`)}function aA(...r){return new dn(r)}function sA(){return new q(r=>{r.write("$this")})}i();a();var mn=class{constructor({context:e}){d(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?v.TypeLiteral.null():(this.context.errors.add({severity:S.Critical,message:"Expected non-null value, but got null"}),v.TypeLiteral.nop());if(e.value===void 0)return v.TypeLiteral.nop();switch(e.typeReference.type){case"list":case"set":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?v.TypeLiteral.nop():this.convertNamed({named:t,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"unknown":return this.convertUnknown({value:e.value});default:R(e.typeReference)}}convertLiteral({literalType:e,value:t}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.string(n)}default:R(e)}}convertList({list:e,value:t}){return Array.isArray(t)?v.TypeLiteral.list({values:t.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:S.Critical,message:`Expected array but got: ${typeof t}`}),v.TypeLiteral.nop())}convertMap({map:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:S.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),v.TypeLiteral.nop()):v.TypeLiteral.map({entries:Object.entries(t).map(([n,o])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:t,as:n}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference,value:t,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:t});case"enum":return this.convertEnum({enum_:e,value:t});case"object":return this.convertObject({object_:e,value:t});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t});default:R(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:t}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t});if(n==null)return v.TypeLiteral.nop();let o=n.singleDiscriminatedUnionType,s=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:o});return s==null?v.TypeLiteral.nop():v.TypeLiteral.reference(v.codeblock(f=>{f.writeNode(v.invokeMethod({on:v.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)}),method:this.context.getMethodName(o.discriminantValue.name),arguments_:this.convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:n,unionVariant:o,unionProperties:s}),static_:!0}))}))}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:e,unionVariant:t}){switch(t.type){case"samePropertiesAsObject":{let n=this.context.resolveNamedType({typeId:t.typeId});if(n==null)return;let o=this.convertNamed({named:n,value:e.value});if(!o.isClass()){this.context.errors.add({severity:S.Critical,message:"Internal error; expected union value to be an object"});return}return o.asClassOrThrow().fields}case"singleProperty":try{this.context.errors.scope(t.discriminantValue.wireValue);let n=this.context.getRecord(e.value);return n==null?[{name:this.context.getPropertyName(t.discriminantValue.name),value:this.convert({typeReference:t.typeReference,value:e.value})}]:[{name:this.context.getPropertyName(t.discriminantValue.name),value:this.convert({typeReference:t.typeReference,value:n[t.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return[];default:R(t)}}convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:e,unionVariant:t,unionProperties:n}){let o=this.getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:t});if(t.type==="singleProperty"&&this.context.getRecord(e.value)==null&&n.length===1)return[...o,this.convert({typeReference:t.typeReference,value:e.value})];if(t.type==="samePropertiesAsObject"){let s=this.context.resolveNamedType({typeId:t.typeId});return s==null?[]:[...o,v.TypeLiteral.class_({reference:v.classReference({name:this.context.getClassName(s.declaration.name),namespace:this.context.getTypesNamespace(s.declaration.fernFilepath)}),fields:n})]}return o}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:t}){var o,s;return this.context.associateByWireValue({parameters:(o=t.properties)!=null?o:[],values:(s=this.context.getRecord(e.value))!=null?s:{},ignoreMissingParameters:!0}).map(f=>{this.context.errors.scope(f.name.wireValue);try{return this.convert(f)}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:t}){var o;let n=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(t))!=null?o:{}});return v.TypeLiteral.class_({reference:v.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)}),fields:n.map(s=>{this.context.errors.scope(s.name.wireValue);try{return{name:this.context.getPropertyName(s.name.name),value:this.convert(s)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:t}){let n=this.getEnumValueName({enum_:e,value:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.reference(v.codeblock(o=>{o.writeNode(v.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)})),o.write("::"),o.write(n),o.write("->value")}))}getEnumValueName({enum_:e,value:t}){if(typeof t!="string"){this.context.errors.add({severity:S.Critical,message:`Expected enum value string, got: ${typeof t}`});return}let n=e.values.find(o=>o.wireValue===t);if(n==null){this.context.errors.add({severity:S.Critical,message:`An enum value named "${t}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t});return n==null?v.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t}){for(let n of e.types)try{return this.convert({typeReference:n,value:t})}catch(o){continue}this.context.errors.add({severity:S.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof t}" value`})}convertUnknown({value:e}){return v.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:t,as:n}){switch(e){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let o=this.getValueAsNumber({value:t,as:n});return o==null?v.TypeLiteral.nop():v.TypeLiteral.number(o)}case"FLOAT":case"DOUBLE":{let o=this.getValueAsNumber({value:t});return o==null?v.TypeLiteral.nop():v.TypeLiteral.float(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:t,as:n});return o==null?v.TypeLiteral.nop():v.TypeLiteral.boolean(o)}case"DATE":case"DATE_TIME":{let o=this.context.getValueAsString({value:t});return o==null?v.TypeLiteral.nop():v.TypeLiteral.datetime(o)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let o=this.context.getValueAsString({value:t});return o==null?v.TypeLiteral.nop():v.TypeLiteral.string(o)}default:R(e)}}getValueAsNumber({value:e,as:t}){let n=t==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:t}){let n=t==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};i();a();var hn=class{constructor({context:e}){d(this,"context");this.context=e}getFilePropertyInfo({body:e,value:t}){var s;let n={fileFields:[],bodyPropertyFields:[]},o=(s=this.context.getRecord(t))!=null?s:{};for(let f of e.properties)switch(f.type){case"file":n.fileFields.push({name:this.context.getPropertyName(f.name),value:this.getSingleFileProperty({property:f,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(f.name),value:this.getArrayFileProperty({property:f,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(f.name.name),value:this.getBodyProperty({property:f,record:o})});break;default:R(f)}return n}getSingleFileProperty({property:e,record:t}){let n=this.context.getSingleFileValue({property:e,record:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.file(n)}getArrayFileProperty({property:e,record:t}){let n=this.context.getFileArrayValues({property:e,record:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.list({values:n.map(o=>v.TypeLiteral.file(o))})}getBodyProperty({property:e,record:t}){let n=t[e.name.wireValue];return n==null?v.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var uA=["use","clone","list"],fA="Requests",pA="Types",yn=class r extends er{constructor({ir:t,config:n}){var o;super({ir:t,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");d(this,"rootNamespace");this.ir=t,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new mn({context:this}),this.filePropertyMapper=new hn({context:this}),this.rootNamespace=lA({organization:n.organization,namespaceOverride:(o=this.customConfig)==null?void 0:o.namespace})}clone(){return new r({ir:this.ir,config:this.config})}getParameterName(t){return this.prependUnderscoreIfNeeded(t.camelCase.unsafeName)}getPropertyName(t){return this.prependUnderscoreIfNeeded(t.camelCase.unsafeName)}getMethodName(t){let n=t.camelCase.unsafeName;return uA.includes(n)?n:t.camelCase.safeName}getClassName(t){return t.pascalCase.safeName}getRootClientClassName(){var t,n,o;return((t=this.customConfig)==null?void 0:t.clientName)!=null?this.customConfig.clientName:((n=this.customConfig)==null?void 0:n["client-class-name"])!=null?(o=this.customConfig)==null?void 0:o["client-class-name"]:this.getComputedClientName()}getEnvironmentsClassReference(){return v.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(t){return this.getNamespace(t,fA)}getTypesNamespace(t){return this.getNamespace(t,pA)}getNamespace(t,n){let o=t.allParts.map(s=>s.pascalCase.safeName);return o=n!=null?[...o,n]:o,[this.rootNamespace,...o].join("\\")}getEnvironmentClassAccessFromID(t){let n=this.resolveEnvironmentName(t);if(n!=null)return v.codeblock(o=>{o.writeNode(this.getEnvironmentClassReference(n)),o.write("::"),o.write(this.getClassName(n))})}getEnvironmentClassReference(t){return v.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(t){return/^[a-zA-Z_]/.test(t)?t:`_${t}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${wt(tn(this.config.organization))}`}};function lA({organization:r,namespaceOverride:e}){return e!=null?e:`${wt(tn(r))}`}i();a();var ac="$client",gn="Example",sc=`<?php
|
|
31
31
|
|
|
32
|
-
`,$t=class{constructor({context:r}){d(this,"context");this.context=r}async generateSnippet({endpoint:r,request:e}){var o;let n=this.buildCodeBlock({endpoint:r,snippet:e});return Pf+await n.toStringAsync({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}generateSnippetSync({endpoint:r,request:e}){var o;let n=this.buildCodeBlock({endpoint:r,snippet:e});return Pf+n.toString({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}buildCodeBlock({endpoint:r,snippet:e}){return x.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:r,snippet:e})),n.writeNodeStatement(this.callMethod({endpoint:r,snippet:e}))})}constructClient({endpoint:r,snippet:e}){return x.codeblock(n=>{n.write(`${Rf} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:r,snippet:e})))})}callMethod({endpoint:r,snippet:e}){return x.invokeMethod({on:x.codeblock(Rf),method:this.getMethod({endpoint:r}),arguments_:this.getMethodArgs({endpoint:r,snippet:e}),multiline:!0})}getConstructorArgs({endpoint:r,snippet:e}){let n=[];r.auth!=null&&(e.auth!=null?n.push(...this.getConstructorAuthArgs({auth:r.auth,values:e.auth})):this.context.errors.add({severity:A.Warning,message:`Auth with ${r.auth.type} configuration is required for this endpoint`}));let o=[],i=this.getConstructorBaseUrlArgs({baseUrl:e.baseURL,environment:e.environment});return i.length>0&&o.push(...i),this.context.errors.scope(K.Headers),this.context.ir.headers!=null&&e.headers!=null&&o.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),o.length===0?n:[...n,{name:"options",assignment:x.TypeLiteral.map({entries:o.map(u=>({key:x.TypeLiteral.string(u.name),value:u.value}))})}]}getConstructorAuthArgs({auth:r,values:e}){switch(r.type){case"basic":return e.type!=="basic"?(this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:r,values:e}).message}),[]):this.getConstructorBasicAuthArgs({auth:r,values:e});case"bearer":return e.type!=="bearer"?(this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:r,values:e}).message}),[]):this.getConstructorBearerAuthArgs({auth:r,values:e});case"header":return e.type!=="header"?(this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:r,values:e}).message}),[]):this.getConstructorHeaderAuthArgs({auth:r,values:e});case"oauth":return e.type!=="oauth"?(this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:r,values:e}).message}),[]):(this.context.errors.add({severity:A.Warning,message:"The PHP SDK doesn't support OAuth client credentials yet"}),[]);default:R(r)}}getConstructorBasicAuthArgs({auth:r,values:e}){return[{name:this.context.getPropertyName(r.username),assignment:x.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(r.password),assignment:x.TypeLiteral.string(e.password)}]}getConstructorBaseUrlArgs({baseUrl:r,environment:e}){let n=this.getBaseUrlArg({baseUrl:r,environment:e});return x.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:r,environment:e}){if(r!=null&&e!=null)return this.context.errors.add({severity:A.Critical,message:"Cannot specify both baseUrl and environment options"}),x.TypeLiteral.nop();if(r!=null)return x.TypeLiteral.string(r);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let n=this.context.getEnvironmentClassAccessFromID(e);return n==null?(this.context.errors.add({severity:A.Warning,message:`Environment ${JSON.stringify(e)} was not found`}),x.TypeLiteral.nop()):x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(n),o.write("->value")}))}this.context.isMultiEnvironmentValues(e)&&this.context.errors.add({severity:A.Warning,message:"The PHP SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}return x.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:r,values:e}){return[{name:this.context.getPropertyName(r.token),assignment:x.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:r,values:e}){return[{name:this.context.getPropertyName(r.header.name.name),assignment:this.context.dynamicTypeLiteralMapper.convert({typeReference:r.header.typeReference,value:e.value})}]}getConstructorHeaderArgs({headers:r,values:e}){let n=[];for(let o of r){let i=this.getConstructorHeaderArg({header:o,value:e.value});i!=null&&n.push({name:this.context.getPropertyName(o.name.name),value:i})}return n}getConstructorHeaderArg({header:r,value:e}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:r.typeReference,value:e});if(!x.TypeLiteral.isNop(n))return n}getMethodArgs({endpoint:r,snippet:e}){switch(r.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:r.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:r.request,snippet:e});default:R(r.request)}}getMethodArgsForBodyRequest({request:r,snippet:e}){var i,u;let n=[];this.context.errors.scope(K.PathParameters);let o=[...(i=this.context.ir.pathParameters)!=null?i:[],...(u=r.pathParameters)!=null?u:[]];return o.length>0&&n.push(...this.getPathParameters({namedParameters:o,snippet:e}).map(f=>f.value)),this.context.errors.unscope(),this.context.errors.scope(K.RequestBody),r.body!=null&&n.push(this.getBodyRequestArg({body:r.body,value:e.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:r,value:e}){switch(r.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:r.value,value:e});default:R(r)}}getBytesBodyRequestArg({value:r}){return this.context.errors.add({severity:A.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),x.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:r,snippet:e}){var c,y,m,g;let n=[],o=(y=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?y:!1;this.context.errors.scope(K.PathParameters);let i=[],u=[...(m=this.context.ir.pathParameters)!=null?m:[],...(g=r.pathParameters)!=null?g:[]];u.length>0&&i.push(...this.getPathParameters({namedParameters:u,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(K.RequestBody);let f=this.getFilePropertyInfo({request:r,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:r,inlinePathParameters:o})||n.push(...i.map(v=>v.value)),this.context.needsRequestParameter({request:r,inlinePathParameters:o,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:r,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:r,inlinePathParameters:o})?i:[],filePropertyInfo:f})),n}getFilePropertyInfo({request:r,snippet:e}){return r.body==null||!this.context.isFileUploadRequestBody(r.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:r.body,value:e.requestBody})}getInlinedRequestArg({request:r,snippet:e,pathParameterFields:n,filePropertyInfo:o}){var m,g,v,b;this.context.errors.scope(K.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(m=r.queryParameters)!=null?m:[],values:(g=e.queryParameters)!=null?g:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope(K.Headers);let c=this.context.associateByWireValue({parameters:(v=r.headers)!=null?v:[],values:(b=e.headers)!=null?b:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope(K.RequestBody);let y=r.body!=null?this.getInlinedRequestBodyConstructorFields({body:r.body,value:e.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(r.declaration.name),namespace:this.context.getRequestNamespace(r.declaration.fernFilepath)}),fields:[...n,...u,...c,...y]})}getInlinedRequestBodyConstructorFields({body:r,value:e,filePropertyInfo:n}){switch(r.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:r.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:r,value:e})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:R(r)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:r}){return[...r.fileFields,...r.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:r,value:e}){return{name:this.context.getPropertyName(r.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:r.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:r,value:e}){switch(r.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:r.value,value:e});default:R(r)}}getInlinedRequestBodyPropertyConstructorFields({parameters:r,value:e}){var i;let n=[],o=this.context.associateByWireValue({parameters:r,values:(i=this.context.getRecord(e))!=null?i:{}});for(let u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getPathParameters({namedParameters:r,snippet:e}){var i;let n=[],o=this.context.associateByWireValue({parameters:r,values:(i=e.pathParameters)!=null?i:{}});for(let u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getMethod({endpoint:r}){return r.declaration.fernFilepath.allParts.length>0?`${r.declaration.fernFilepath.allParts.map(e=>this.context.getPropertyName(e)).join("->")}->${this.context.getMethodName(r.declaration.name)}`:this.context.getMethodName(r.declaration.name)}getRootClientClassInstantiation(r){return x.instantiateClass({classReference:x.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:r,multiline:!0})}};a();s();a();s();var kt=class{constructor({context:r}){d(this,"context");this.context=r}convert(r){if(r.value===null)return this.context.isNullable(r.typeReference)?x.TypeLiteral.null():(this.context.errors.add({severity:A.Critical,message:"Expected non-null value, but got null"}),x.TypeLiteral.nop());if(r.value===void 0)return x.TypeLiteral.nop();switch(r.typeReference.type){case"list":case"set":return this.convertList({list:r.typeReference.value,value:r.value});case"literal":return this.convertLiteral({literalType:r.typeReference.value,value:r.value});case"map":return this.convertMap({map:r.typeReference,value:r.value});case"named":{let e=this.context.resolveNamedType({typeId:r.typeReference.value});return e==null?x.TypeLiteral.nop():this.convertNamed({named:e,value:r.value,as:r.as})}case"optional":return this.convert({typeReference:r.typeReference.value,value:r.value,as:r.as});case"nullable":return this.convert({typeReference:r.typeReference.value,value:r.value,as:r.as});case"primitive":return this.convertPrimitive({primitive:r.typeReference.value,value:r.value,as:r.as});case"unknown":return this.convertUnknown({value:r.value});default:R(r.typeReference)}}convertLiteral({literalType:r,value:e}){switch(r.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.string(n)}default:R(r)}}convertList({list:r,value:e}){return Array.isArray(e)?x.TypeLiteral.list({values:e.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:r,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),x.TypeLiteral.nop())}convertMap({map:r,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:A.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),x.TypeLiteral.nop()):x.TypeLiteral.map({entries:Object.entries(e).map(([n,o])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:r.key,value:n,as:"key"}),value:this.convert({typeReference:r.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:r,value:e,as:n}){switch(r.type){case"alias":return this.convert({typeReference:r.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:r,value:e});case"enum":return this.convertEnum({enum_:r,value:e});case"object":return this.convertObject({object_:r,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:r,value:e});default:R(r)}}convertDiscriminatedUnion({discriminatedUnion:r,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:r,value:e});if(n==null)return x.TypeLiteral.nop();let o=n.singleDiscriminatedUnionType,i=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:o});return i==null?x.TypeLiteral.nop():x.TypeLiteral.reference(x.codeblock(u=>{u.writeNode(x.invokeMethod({on:x.classReference({name:this.context.getClassName(r.declaration.name),namespace:this.context.getTypesNamespace(r.declaration.fernFilepath)}),method:this.context.getMethodName(o.discriminantValue.name),arguments_:this.convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:n,unionVariant:o,unionProperties:i}),static_:!0}))}))}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:r,unionVariant:e}){switch(e.type){case"samePropertiesAsObject":{let n=this.context.resolveNamedType({typeId:e.typeId});if(n==null)return;let o=this.convertNamed({named:n,value:r.value});if(!o.isClass()){this.context.errors.add({severity:A.Critical,message:"Internal error; expected union value to be an object"});return}return o.asClassOrThrow().fields}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let n=this.context.getRecord(r.value);return n==null?[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:r.value})}]:[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:n[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return[];default:R(e)}}convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:r,unionVariant:e,unionProperties:n}){let o=this.getBaseFields({discriminatedUnionTypeInstance:r,singleDiscriminatedUnionType:e});if(e.type==="singleProperty"&&this.context.getRecord(r.value)==null&&n.length===1)return[...o,this.convert({typeReference:e.typeReference,value:r.value})];if(e.type==="samePropertiesAsObject"){let i=this.context.resolveNamedType({typeId:e.typeId});return i==null?[]:[...o,x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(i.declaration.name),namespace:this.context.getTypesNamespace(i.declaration.fernFilepath)}),fields:n})]}return o}getBaseFields({discriminatedUnionTypeInstance:r,singleDiscriminatedUnionType:e}){var o,i;return this.context.associateByWireValue({parameters:(o=e.properties)!=null?o:[],values:(i=this.context.getRecord(r.value))!=null?i:{},ignoreMissingParameters:!0}).map(u=>{this.context.errors.scope(u.name.wireValue);try{return this.convert(u)}finally{this.context.errors.unscope()}})}convertObject({object_:r,value:e}){var o;let n=this.context.associateByWireValue({parameters:r.properties,values:(o=this.context.getRecord(e))!=null?o:{}});return x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(r.declaration.name),namespace:this.context.getTypesNamespace(r.declaration.fernFilepath)}),fields:n.map(i=>{this.context.errors.scope(i.name.wireValue);try{return{name:this.context.getPropertyName(i.name.name),value:this.convert(i)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:r,value:e}){let n=this.getEnumValueName({enum_:r,value:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(x.classReference({name:this.context.getClassName(r.declaration.name),namespace:this.context.getTypesNamespace(r.declaration.fernFilepath)})),o.write("::"),o.write(n),o.write("->value")}))}getEnumValueName({enum_:r,value:e}){if(typeof e!="string"){this.context.errors.add({severity:A.Critical,message:`Expected enum value string, got: ${typeof e}`});return}let n=r.values.find(o=>o.wireValue===e);if(n==null){this.context.errors.add({severity:A.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:r,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:r,value:e});return n==null?x.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:r,value:e}){for(let n of r.types)try{return this.convert({typeReference:n,value:e})}catch(o){continue}this.context.errors.add({severity:A.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:r}){return x.TypeLiteral.unknown(r)}convertPrimitive({primitive:r,value:e,as:n}){switch(r){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let o=this.getValueAsNumber({value:e,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.number(o)}case"FLOAT":case"DOUBLE":{let o=this.getValueAsNumber({value:e});return o==null?x.TypeLiteral.nop():x.TypeLiteral.float(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:e,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(o)}case"DATE":case"DATE_TIME":{let o=this.context.getValueAsString({value:e});return o==null?x.TypeLiteral.nop():x.TypeLiteral.datetime(o)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let o=this.context.getValueAsString({value:e});return o==null?x.TypeLiteral.nop():x.TypeLiteral.string(o)}default:R(r)}}getValueAsNumber({value:r,as:e}){let n=e==="key"&&typeof r=="string"?Number(r):r;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:r,as:e}){let n=e==="key"?typeof r=="string"?r==="true":r==="false"?!1:r:r;return this.context.getValueAsBoolean({value:n})}};a();s();var _t=class{constructor({context:r}){d(this,"context");this.context=r}getFilePropertyInfo({body:r,value:e}){var i;let n={fileFields:[],bodyPropertyFields:[]},o=(i=this.context.getRecord(e))!=null?i:{};for(let u of r.properties)switch(u.type){case"file":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getSingleFileProperty({property:u,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getArrayFileProperty({property:u,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(u.name.name),value:this.getBodyProperty({property:u,record:o})});break;default:R(u)}return n}getSingleFileProperty({property:r,record:e}){let n=this.context.getSingleFileValue({property:r,record:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.file(n)}getArrayFileProperty({property:r,record:e}){let n=this.context.getFileArrayValues({property:r,record:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.list({values:n.map(o=>x.TypeLiteral.file(o))})}getBodyProperty({property:r,record:e}){let n=e[r.name.wireValue];return n==null?x.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:r.typeReference,value:n})}};var Lx=["use","clone","list"],Bx="Requests",Ux="Types",Mt=class t extends Mr{constructor({ir:e,config:n}){var o;super({ir:e,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");d(this,"rootNamespace");this.ir=e,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new kt({context:this}),this.filePropertyMapper=new _t({context:this}),this.rootNamespace=qx({organization:n.organization,namespaceOverride:(o=this.customConfig)==null?void 0:o.namespace})}clone(){return new t({ir:this.ir,config:this.config})}getParameterName(e){return this.prependUnderscoreIfNeeded(e.camelCase.unsafeName)}getPropertyName(e){return this.prependUnderscoreIfNeeded(e.camelCase.unsafeName)}getMethodName(e){let n=e.camelCase.unsafeName;return Lx.includes(n)?n:e.camelCase.safeName}getClassName(e){return e.pascalCase.safeName}getRootClientClassName(){var e,n,o;return((e=this.customConfig)==null?void 0:e.clientName)!=null?this.customConfig.clientName:((n=this.customConfig)==null?void 0:n["client-class-name"])!=null?(o=this.customConfig)==null?void 0:o["client-class-name"]:this.getComputedClientName()}getEnvironmentsClassReference(){return x.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(e){return this.getNamespace(e,Bx)}getTypesNamespace(e){return this.getNamespace(e,Ux)}getNamespace(e,n){let o=e.allParts.map(i=>i.pascalCase.safeName);return o=n!=null?[...o,n]:o,[this.rootNamespace,...o].join("\\")}getEnvironmentClassAccessFromID(e){let n=this.resolveEnvironmentName(e);if(n!=null)return x.codeblock(o=>{o.writeNode(this.getEnvironmentClassReference(n)),o.write("::"),o.write(this.getClassName(n))})}getEnvironmentClassReference(e){return x.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(e){return/^[a-zA-Z_]/.test(e)?e:`_${e}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${ur(Bt(this.config.organization))}`}};function qx({organization:t,namespaceOverride:r}){return r!=null?r:`${ur(Bt(t))}`}var Dt=class extends $r{constructor({ir:r,config:e}){super(new Mt({ir:r,config:e}))}async generate(r){return super.generate(r)}generateSync(r){return super.generateSync(r)}createSnippetGenerator(r){return new $t({context:r})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
32
|
+
`,xn=class{constructor({context:e}){d(this,"context");this.context=e}async generateSnippet({endpoint:e,request:t}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:t});return sc+await n.toStringAsync({namespace:gn,rootNamespace:gn,customConfig:(o=this.context.customConfig)!=null?o:{}})}generateSnippetSync({endpoint:e,request:t}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:t});return sc+n.toString({namespace:gn,rootNamespace:gn,customConfig:(o=this.context.customConfig)!=null?o:{}})}buildCodeBlock({endpoint:e,snippet:t}){return v.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:e,snippet:t})),n.writeNodeStatement(this.callMethod({endpoint:e,snippet:t}))})}constructClient({endpoint:e,snippet:t}){return v.codeblock(n=>{n.write(`${ac} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:e,snippet:t})))})}callMethod({endpoint:e,snippet:t}){return v.invokeMethod({on:v.codeblock(ac),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:t}),multiline:!0})}getConstructorArgs({endpoint:e,snippet:t}){let n=[];e.auth!=null&&(t.auth!=null?n.push(...this.getConstructorAuthArgs({auth:e.auth,values:t.auth})):this.context.errors.add({severity:S.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let o=[],s=this.getConstructorBaseUrlArgs({baseUrl:t.baseURL,environment:t.environment});return s.length>0&&o.push(...s),this.context.errors.scope(te.Headers),this.context.ir.headers!=null&&t.headers!=null&&o.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:t.headers})),this.context.errors.unscope(),o.length===0?n:[...n,{name:"options",assignment:v.TypeLiteral.map({entries:o.map(f=>({key:v.TypeLiteral.string(f.name),value:f.value}))})}]}getConstructorAuthArgs({auth:e,values:t}){if(t.type!==e.type)return this.addError(this.context.newAuthMismatchError({auth:e,values:t}).message),[];switch(e.type){case"basic":return t.type==="basic"?this.getConstructorBasicAuthArgs({auth:e,values:t}):[];case"bearer":return t.type==="bearer"?this.getConstructorBearerAuthArgs({auth:e,values:t}):[];case"header":return t.type==="header"?this.getConstructorHeaderAuthArgs({auth:e,values:t}):[];case"oauth":return this.addWarning("The PHP SDK doesn't support OAuth client credentials yet"),[];case"inferred":return this.addWarning("The PHP SDK Generator does not support Inferred auth scheme yet"),[];default:R(e)}}addError(e){this.context.errors.add({severity:S.Critical,message:e})}addWarning(e){this.context.errors.add({severity:S.Warning,message:e})}getConstructorBasicAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.username),assignment:v.TypeLiteral.string(t.username)},{name:this.context.getPropertyName(e.password),assignment:v.TypeLiteral.string(t.password)}]}getConstructorBaseUrlArgs({baseUrl:e,environment:t}){let n=this.getBaseUrlArg({baseUrl:e,environment:t});return v.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:e,environment:t}){if(e!=null&&t!=null)return this.context.errors.add({severity:S.Critical,message:"Cannot specify both baseUrl and environment options"}),v.TypeLiteral.nop();if(e!=null)return v.TypeLiteral.string(e);if(t!=null){if(this.context.isSingleEnvironmentID(t)){let n=this.context.getEnvironmentClassAccessFromID(t);return n==null?(this.context.errors.add({severity:S.Warning,message:`Environment ${JSON.stringify(t)} was not found`}),v.TypeLiteral.nop()):v.TypeLiteral.reference(v.codeblock(o=>{o.writeNode(n),o.write("->value")}))}this.context.isMultiEnvironmentValues(t)&&this.context.errors.add({severity:S.Warning,message:"The PHP SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}return v.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.token),assignment:v.TypeLiteral.string(t.token)}]}getConstructorHeaderAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.header.name.name),assignment:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:t.value})}]}getConstructorHeaderArgs({headers:e,values:t}){let n=[];for(let o of e){let s=this.getConstructorHeaderArg({header:o,value:t.value});s!=null&&n.push({name:this.context.getPropertyName(o.name.name),value:s})}return n}getConstructorHeaderArg({header:e,value:t}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:t});if(!v.TypeLiteral.isNop(n))return n}getMethodArgs({endpoint:e,snippet:t}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:t});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:t});default:R(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:t}){var s,f;let n=[];this.context.errors.scope(te.PathParameters);let o=[...(s=this.context.ir.pathParameters)!=null?s:[],...(f=e.pathParameters)!=null?f:[]];return o.length>0&&n.push(...this.getPathParameters({namedParameters:o,snippet:t}).map(l=>l.value)),this.context.errors.unscope(),this.context.errors.scope(te.RequestBody),e.body!=null&&n.push(this.getBodyRequestArg({body:e.body,value:t.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:R(e)}}getBytesBodyRequestArg({value:e}){return this.context.errors.add({severity:S.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),v.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:e,snippet:t}){var c,m,h,y;let n=[],o=(m=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?m:!1;this.context.errors.scope(te.PathParameters);let s=[],f=[...(h=this.context.ir.pathParameters)!=null?h:[],...(y=e.pathParameters)!=null?y:[]];f.length>0&&s.push(...this.getPathParameters({namedParameters:f,snippet:t})),this.context.errors.unscope(),this.context.errors.scope(te.RequestBody);let l=this.getFilePropertyInfo({request:e,snippet:t});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})||n.push(...s.map(g=>g.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:o,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:e,snippet:t,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})?s:[],filePropertyInfo:l})),n}getFilePropertyInfo({request:e,snippet:t}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:t.requestBody})}getInlinedRequestArg({request:e,snippet:t,pathParameterFields:n,filePropertyInfo:o}){var h,y,g,w;this.context.errors.scope(te.QueryParameters);let f=this.context.associateQueryParametersByWireValue({parameters:(h=e.queryParameters)!=null?h:[],values:(y=t.queryParameters)!=null?y:{}}).map(A=>({name:this.context.getPropertyName(A.name.name),value:this.context.dynamicTypeLiteralMapper.convert(A)}));this.context.errors.unscope(),this.context.errors.scope(te.Headers);let c=this.context.associateByWireValue({parameters:(g=e.headers)!=null?g:[],values:(w=t.headers)!=null?w:{}}).map(A=>({name:this.context.getPropertyName(A.name.name),value:this.context.dynamicTypeLiteralMapper.convert(A)}));this.context.errors.unscope(),this.context.errors.scope(te.RequestBody);let m=e.body!=null?this.getInlinedRequestBodyConstructorFields({body:e.body,value:t.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),v.TypeLiteral.class_({reference:v.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getRequestNamespace(e.declaration.fernFilepath)}),fields:[...n,...f,...c,...m]})}getInlinedRequestBodyConstructorFields({body:e,value:t,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:e.value,value:t});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:e,value:t})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:R(e)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:e}){return[...e.fileFields,...e.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:e,value:t}){return{name:this.context.getPropertyName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:t})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:R(e)}}getInlinedRequestBodyPropertyConstructorFields({parameters:e,value:t}){var s;let n=[],o=this.context.associateByWireValue({parameters:e,values:(s=this.context.getRecord(t))!=null?s:{}});for(let f of o)n.push({name:this.context.getPropertyName(f.name.name),value:this.context.dynamicTypeLiteralMapper.convert(f)});return n}getPathParameters({namedParameters:e,snippet:t}){var s;let n=[],o=this.context.associateByWireValue({parameters:e,values:(s=t.pathParameters)!=null?s:{}});for(let f of o)n.push({name:this.context.getPropertyName(f.name.name),value:this.context.dynamicTypeLiteralMapper.convert(f)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(t=>this.context.getPropertyName(t)).join("->")}->${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getRootClientClassInstantiation(e){return v.instantiateClass({classReference:v.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:e,multiline:!0})}};var vn=class extends Zt{constructor({ir:e,config:t}){super(new yn({ir:e,config:t}))}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}createSnippetGenerator(e){return new xn({context:e})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
33
33
|
/*! Bundled license information:
|
|
34
34
|
|
|
35
35
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|
|
@@ -51,3 +51,4 @@ lodash-es/lodash.js:
|
|
|
51
51
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
52
52
|
*)
|
|
53
53
|
*/
|
|
54
|
+
//# sourceMappingURL=index.cjs.map
|