@fern-api/java-dynamic-snippets 0.0.4 → 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/Config.cjs.map +1 -1
- package/cjs/DynamicSnippetsGenerator.cjs +18 -9
- package/cjs/DynamicSnippetsGenerator.cjs.map +1 -1
- package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
- package/cjs/{DynamicSnippetsGeneratorContext-FbVOZ8Go.d.cts → DynamicSnippetsGeneratorContext-CqPRgNNz.d.cts} +15 -1
- package/cjs/EndpointSnippetGenerator.cjs +14 -11
- package/cjs/EndpointSnippetGenerator.cjs.map +1 -1
- package/cjs/EndpointSnippetGenerator.d.cts +2 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +18 -9
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
- package/cjs/context/DynamicTypeLiteralMapper.cjs +18 -9
- package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -1
- package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
- package/cjs/context/DynamicTypeMapper.cjs +12 -9
- package/cjs/context/DynamicTypeMapper.cjs.map +1 -1
- package/cjs/context/DynamicTypeMapper.d.cts +1 -1
- package/cjs/context/FilePropertyMapper.cjs +14 -11
- package/cjs/context/FilePropertyMapper.cjs.map +1 -1
- package/cjs/context/FilePropertyMapper.d.cts +1 -1
- package/cjs/index.cjs +20 -23
- package/cjs/index.cjs.map +1 -1
- package/cjs/index.d.cts +1 -1
- package/esm/Config.js +1 -1
- package/esm/DynamicSnippetsGenerator.d.ts +1 -1
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/{DynamicSnippetsGeneratorContext-FbVOZ8Go.d.ts → DynamicSnippetsGeneratorContext-CqPRgNNz.d.ts} +15 -1
- package/esm/EndpointSnippetGenerator.d.ts +2 -1
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/{chunk-JZBCQWQN.js → chunk-2KH7MFRW.js} +2 -2
- package/esm/chunk-2U3YQWRZ.js +12 -0
- package/esm/chunk-2U3YQWRZ.js.map +1 -0
- package/esm/chunk-6CITGEM3.js +23 -0
- package/esm/chunk-6CITGEM3.js.map +1 -0
- package/esm/chunk-G35HVZPV.js +2 -0
- package/esm/chunk-G35HVZPV.js.map +1 -0
- package/esm/{chunk-3LOINSB3.js → chunk-GESEOQT7.js} +2 -2
- package/esm/chunk-GTD7VYDZ.js +8 -0
- package/esm/chunk-GTD7VYDZ.js.map +1 -0
- package/esm/chunk-L6HHZWHP.js +2 -0
- package/esm/{chunk-PUPEW5QI.js.map → chunk-L6HHZWHP.js.map} +1 -1
- package/esm/chunk-N3AIOPEV.js +2 -0
- package/esm/chunk-OMKG67AN.js +15 -0
- package/esm/chunk-OMKG67AN.js.map +1 -0
- package/esm/{chunk-6YM2QG7U.js → chunk-SNGFCNTO.js} +2 -2
- package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
- package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
- package/esm/context/DynamicTypeLiteralMapper.js +1 -1
- package/esm/context/DynamicTypeMapper.d.ts +1 -1
- package/esm/context/DynamicTypeMapper.js +1 -1
- package/esm/context/FilePropertyMapper.d.ts +1 -1
- package/esm/context/FilePropertyMapper.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -13
- package/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/esm/chunk-3JSOCWNQ.js +0 -20
- package/esm/chunk-3JSOCWNQ.js.map +0 -1
- package/esm/chunk-E6GFFTKW.js +0 -12
- package/esm/chunk-E6GFFTKW.js.map +0 -1
- package/esm/chunk-JZ2FDMYI.js +0 -15
- package/esm/chunk-JZ2FDMYI.js.map +0 -1
- package/esm/chunk-PUPEW5QI.js +0 -2
- package/esm/chunk-SQKACQJK.js +0 -2
- package/esm/chunk-SQKACQJK.js.map +0 -1
- package/esm/chunk-WBGWLNLI.js +0 -2
- package/esm/chunk-ZYVZJBJN.js +0 -2
- package/esm/chunk-ZYVZJBJN.js.map +0 -1
- /package/esm/{chunk-JZBCQWQN.js.map → chunk-2KH7MFRW.js.map} +0 -0
- /package/esm/{chunk-3LOINSB3.js.map → chunk-GESEOQT7.js.map} +0 -0
- /package/esm/{chunk-WBGWLNLI.js.map → chunk-N3AIOPEV.js.map} +0 -0
- /package/esm/{chunk-6YM2QG7U.js.map → chunk-SNGFCNTO.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@fern-api/dynamic-ir-sdk';
|
|
2
2
|
import '@fern-api/java-ast';
|
|
3
|
-
export { b as DynamicTypeMapper } from '../DynamicSnippetsGeneratorContext-
|
|
3
|
+
export { b as DynamicTypeMapper } from '../DynamicSnippetsGeneratorContext-CqPRgNNz.cjs';
|
|
4
4
|
import '@fern-api/browser-compatible-base-generator';
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
"use strict";var Z=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var ze=Object.prototype.hasOwnProperty;var Ke=(r,t,e)=>t in r?Z(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var le=(r,t)=>()=>(r&&(t=r(r=0)),t);var ve=(r,t)=>{for(var e in t)Z(r,e,{get:t[e],enumerable:!0})},Xe=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qe(t))!ze.call(r,i)&&i!==e&&Z(r,i,{get:()=>t[i],enumerable:!(n=Ge(t,i))||n.enumerable});return r};var Ze=r=>Xe(Z({},"__esModule",{value:!0}),r);var p=(r,t,e)=>Ke(r,typeof t!="symbol"?t+"":t,e);function Ne(){throw new Error("setTimeout has not been defined")}function Ae(){throw new Error("clearTimeout has not been defined")}function ke(r){if(B===setTimeout)return setTimeout(r,0);if((B===Ne||!B)&&setTimeout)return B=setTimeout,setTimeout(r,0);try{return B(r,0)}catch(t){try{return B.call(null,r,0)}catch(e){return B.call(this,r,0)}}}function Qe(r){if(_===clearTimeout)return clearTimeout(r);if((_===Ae||!_)&&clearTimeout)return _=clearTimeout,clearTimeout(r);try{return _(r)}catch(t){try{return _.call(null,r)}catch(e){return _.call(this,r)}}}function et(){!G||!U||(G=!1,U.length?S=U.concat(S):Q=-1,S.length&&Ie())}function Ie(){if(!G){var r=ke(et);G=!0;for(var t=S.length;t;){for(U=S,S=[];++Q<t;)U&&U[Q].run();Q=-1,t=S.length}U=null,G=!1,Qe(r)}}function tt(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];S.push(new Ee(r,t)),S.length===1&&!G&&ke(Ie)}function Ee(r,t){this.fun=r,this.array=t}function M(){}function yt(r){throw new Error("process.binding is not supported")}function gt(){return"/"}function vt(r){throw new Error("process.chdir is not supported")}function Tt(){return 0}function At(r){var t=Nt.call(J)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function It(){var r=new Date,t=r-kt;return t/1e3}var B,_,S,G,U,Q,rt,nt,it,ot,at,st,ut,ct,ft,lt,pt,ht,mt,wt,dt,xt,J,Nt,kt,d,Te,c=le(()=>{"use strict";B=Ne,_=Ae;typeof globalThis.setTimeout=="function"&&(B=setTimeout);typeof globalThis.clearTimeout=="function"&&(_=clearTimeout);S=[],G=!1,Q=-1;Ee.prototype.run=function(){this.fun.apply(null,this.array)};rt="browser",nt="browser",it=!0,ot={},at=[],st="",ut={},ct={},ft={};lt=M,pt=M,ht=M,mt=M,wt=M,dt=M,xt=M;J=globalThis.performance||{},Nt=J.now||J.mozNow||J.msNow||J.oNow||J.webkitNow||function(){return new Date().getTime()};kt=new Date;d={nextTick:tt,title:rt,browser:it,env:ot,argv:at,version:st,versions:ut,on:lt,addListener:pt,once:ht,off:mt,removeListener:wt,removeAllListeners:dt,emit:xt,binding:yt,cwd:gt,chdir:vt,umask:Tt,hrtime:At,platform:nt,release:ct,config:ft,uptime:It},Te={};Object.keys(Te).forEach(r=>{let t=r.split("."),e=d;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Te[r]:e=e[i]||(e[i]={})}})});function Le(){he=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)b[t]=r[t],k[r.charCodeAt(t)]=t;k[45]=62,k[95]=63}function bt(r){he||Le();var t,e,n,i,o,a,u=r.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[u-2]==="="?2:r[u-1]==="="?1:0,a=new Et(u*3/4-o),n=o>0?u-4:u;var l=0;for(t=0,e=0;t<n;t+=4,e+=3)i=k[r.charCodeAt(t)]<<18|k[r.charCodeAt(t+1)]<<12|k[r.charCodeAt(t+2)]<<6|k[r.charCodeAt(t+3)],a[l++]=i>>16&255,a[l++]=i>>8&255,a[l++]=i&255;return o===2?(i=k[r.charCodeAt(t)]<<2|k[r.charCodeAt(t+1)]>>4,a[l++]=i&255):o===1&&(i=k[r.charCodeAt(t)]<<10|k[r.charCodeAt(t+1)]<<4|k[r.charCodeAt(t+2)]>>2,a[l++]=i>>8&255,a[l++]=i&255),a}function Rt(r){return b[r>>18&63]+b[r>>12&63]+b[r>>6&63]+b[r&63]}function St(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(Rt(n));return i.join("")}function be(r){he||Le();for(var t,e=r.length,n=e%3,i="",o=[],a=16383,u=0,l=e-n;u<l;u+=a)o.push(St(r,u,u+a>l?l:u+a));return n===1?(t=r[e-1],i+=b[t>>2],i+=b[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=b[t>>10],i+=b[t>>4&63],i+=b[t<<2&63],i+="="),o.push(i),o.join("")}function ee(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function L(r,t){if(ee()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=s.prototype):(r===null&&(r=new s(t)),r.length=t),r}function s(r,t,e){if(!s.TYPED_ARRAY_SUPPORT&&!(this instanceof s))return new s(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return me(this,r)}return Be(this,r,t,e)}function Be(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?_t(r,t,e,n):typeof t=="string"?Bt(r,t,e):Ct(r,t)}function _e(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 Lt(r,t,e,n){return _e(t),t<=0?L(r,t):e!==void 0?typeof n=="string"?L(r,t).fill(e,n):L(r,t).fill(e):L(r,t)}function me(r,t){if(_e(t),r=L(r,t<0?0:we(t)|0),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Bt(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Ce(t,e)|0;r=L(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function pe(r,t){var e=t.length<0?0:we(t.length)|0;r=L(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function _t(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),s.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=s.prototype):r=pe(r,t),r}function Ct(r,t){if(R(t)){var e=we(t.length)|0;return r=L(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Zt(t.length)?L(r,0):pe(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return pe(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function we(r){if(r>=ee())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ee().toString(16)+" bytes");return r|0}function R(r){return!!(r!=null&&r._isBuffer)}function Ce(r,t){if(R(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return te(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Ye(r).length;default:if(n)return te(r).length;t=(""+t).toLowerCase(),n=!0}}function Ut(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return Vt(this,t,e);case"utf8":case"utf-8":return Pe(this,t,e);case"ascii":return jt(this,t,e);case"latin1":case"binary":return Wt(this,t,e);case"base64":return Yt(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ht(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function P(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Ue(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=s.from(t,n)),R(t))return t.length===0?-1:Re(r,t,e,n,i);if(typeof t=="number")return t=t&255,s.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Re(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Re(r,t,e,n,i){var o=1,a=r.length,u=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,a/=2,u/=2,e/=2}function l(A,H){return o===1?A[H]:A.readUInt16BE(H*o)}var m;if(i){var w=-1;for(m=e;m<a;m++)if(l(r,m)===l(t,w===-1?0:m-w)){if(w===-1&&(w=m),m-w+1===u)return w*o}else w!==-1&&(m-=m-w),w=-1}else for(e+u>a&&(e=a-u),m=e;m>=0;m--){for(var h=!0,I=0;I<u;I++)if(l(r,m+I)!==l(t,I)){h=!1;break}if(h)return m}return-1}function Mt(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var u=parseInt(t.substr(a*2,2),16);if(isNaN(u))return a;r[e+a]=u}return a}function Pt(r,t,e,n){return ie(te(t,r.length-e),r,e,n)}function Me(r,t,e,n){return ie(Kt(t),r,e,n)}function Ft(r,t,e,n){return Me(r,t,e,n)}function Dt(r,t,e,n){return ie(Ye(t),r,e,n)}function Ot(r,t,e,n){return ie(Xt(t,r.length-e),r,e,n)}function Yt(r,t,e){return t===0&&e===r.length?be(r):be(r.slice(t,e))}function Pe(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],a=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=e){var l,m,w,h;switch(u){case 1:o<128&&(a=o);break;case 2:l=r[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(a=h));break;case 3:l=r[i+1],m=r[i+2],(l&192)===128&&(m&192)===128&&(h=(o&15)<<12|(l&63)<<6|m&63,h>2047&&(h<55296||h>57343)&&(a=h));break;case 4:l=r[i+1],m=r[i+2],w=r[i+3],(l&192)===128&&(m&192)===128&&(w&192)===128&&(h=(o&15)<<18|(l&63)<<12|(m&63)<<6|w&63,h>65535&&h<1114112&&(a=h))}}a===null?(a=65533,u=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=u}return $t(n)}function $t(r){var t=r.length;if(t<=Se)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Se));return e}function jt(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function Wt(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function Vt(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=zt(r[o]);return i}function Ht(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function v(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function T(r,t,e,n,i,o){if(!R(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function re(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function ne(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Fe(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function De(r,t,e,n,i){return i||Fe(r,t,e,4,34028234663852886e22,-34028234663852886e22),je(r,t,e,n,23,4),e+4}function Oe(r,t,e,n,i){return i||Fe(r,t,e,8,17976931348623157e292,-17976931348623157e292),je(r,t,e,n,52,8),e+8}function Gt(r){if(r=qt(r).replace(Jt,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function qt(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function zt(r){return r<16?"0"+r.toString(16):r.toString(16)}function te(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],a=0;a<n;++a){if(e=r.charCodeAt(a),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Kt(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Xt(r,t){for(var e,n,i,o=[],a=0;a<r.length&&!((t-=2)<0);++a)e=r.charCodeAt(a),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Ye(r){return bt(Gt(r))}function ie(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Zt(r){return r!==r}function Qt(r){return r!=null&&(!!r._isBuffer||$e(r)||er(r))}function $e(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function er(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&$e(r.slice(0,0))}function oe(r,t,e,n,i){var o,a,u=i*8-n-1,l=(1<<u)-1,m=l>>1,w=-7,h=e?i-1:0,I=e?-1:1,A=r[t+h];for(h+=I,o=A&(1<<-w)-1,A>>=-w,w+=u;w>0;o=o*256+r[t+h],h+=I,w-=8);for(a=o&(1<<-w)-1,o>>=-w,w+=n;w>0;a=a*256+r[t+h],h+=I,w-=8);if(o===0)o=1-m;else{if(o===l)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-m}return(A?-1:1)*a*Math.pow(2,o-n)}function je(r,t,e,n,i,o){var a,u,l,m=o*8-i-1,w=(1<<m)-1,h=w>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=n?0:o-1,H=n?1:-1,Je=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=w):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+h>=1?t+=I/l:t+=I*Math.pow(2,1-h),t*l>=2&&(a++,l/=2),a+h>=w?(u=0,a=w):a+h>=1?(u=(t*l-1)*Math.pow(2,i),a=a+h):(u=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;r[e+A]=u&255,A+=H,u/=256,i-=8);for(a=a<<i|u,m+=i;m>0;r[e+A]=a&255,A+=H,a/=256,m-=8);r[e+A-H]|=Je*128}var b,k,Et,he,Se,Jt,We=le(()=>{"use strict";c();f();b=[],k=[],Et=typeof Uint8Array!="undefined"?Uint8Array:Array,he=!1;s.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;s.poolSize=8192;s._augment=function(r){return r.__proto__=s.prototype,r};s.from=function(r,t,e){return Be(null,r,t,e)};s.kMaxLength=ee();s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&s[Symbol.species]);s.alloc=function(r,t,e){return Lt(null,r,t,e)};s.allocUnsafe=function(r){return me(null,r)};s.allocUnsafeSlow=function(r){return me(null,r)};s.isBuffer=Qt;s.compare=function(t,e){if(!R(t)||!R(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,a=Math.min(n,i);o<a;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return s.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=s.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var a=t[n];if(!R(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i};s.byteLength=Ce;s.prototype._isBuffer=!0;s.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)P(this,e,e+1);return this};s.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)P(this,e,e+3),P(this,e+1,e+2);return this};s.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)P(this,e,e+7),P(this,e+1,e+6),P(this,e+2,e+5),P(this,e+3,e+4);return this};s.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Pe(this,0,t):Ut.apply(this,arguments)};s.prototype.equals=function(t){if(!R(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:s.compare(this,t)===0};s.prototype.compare=function(t,e,n,i,o){if(!R(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var a=o-i,u=n-e,l=Math.min(a,u),m=this.slice(i,o),w=t.slice(e,n),h=0;h<l;++h)if(m[h]!==w[h]){a=m[h],u=w[h];break}return a<u?-1:u<a?1:0};s.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};s.prototype.indexOf=function(t,e,n){return Ue(this,t,e,n,!0)};s.prototype.lastIndexOf=function(t,e,n){return Ue(this,t,e,n,!1)};s.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return Mt(this,t,e,n);case"utf8":case"utf-8":return Pt(this,t,e,n);case"ascii":return Me(this,t,e,n);case"latin1":case"binary":return Ft(this,t,e,n);case"base64":return Dt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ot(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Se=4096;s.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(s.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=s.prototype;else{var o=e-t;i=new s(o,void 0);for(var a=0;a<o;++a)i[a]=this[a+t]}return i};s.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||v(t,e,this.length);for(var i=this[t],o=1,a=0;++a<e&&(o*=256);)i+=this[t+a]*o;return i};s.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||v(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};s.prototype.readUInt8=function(t,e){return e||v(t,1,this.length),this[t]};s.prototype.readUInt16LE=function(t,e){return e||v(t,2,this.length),this[t]|this[t+1]<<8};s.prototype.readUInt16BE=function(t,e){return e||v(t,2,this.length),this[t]<<8|this[t+1]};s.prototype.readUInt32LE=function(t,e){return e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};s.prototype.readUInt32BE=function(t,e){return e||v(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};s.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||v(t,e,this.length);for(var i=this[t],o=1,a=0;++a<e&&(o*=256);)i+=this[t+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};s.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||v(t,e,this.length);for(var i=e,o=1,a=this[t+--i];i>0&&(o*=256);)a+=this[t+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*e)),a};s.prototype.readInt8=function(t,e){return e||v(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};s.prototype.readInt16LE=function(t,e){e||v(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};s.prototype.readInt16BE=function(t,e){e||v(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};s.prototype.readInt32LE=function(t,e){return e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};s.prototype.readInt32BE=function(t,e){return e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};s.prototype.readFloatLE=function(t,e){return e||v(t,4,this.length),oe(this,t,!0,23,4)};s.prototype.readFloatBE=function(t,e){return e||v(t,4,this.length),oe(this,t,!1,23,4)};s.prototype.readDoubleLE=function(t,e){return e||v(t,8,this.length),oe(this,t,!0,52,8)};s.prototype.readDoubleBE=function(t,e){return e||v(t,8,this.length),oe(this,t,!1,52,8)};s.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;T(this,t,e,n,o,0)}var a=1,u=0;for(this[e]=t&255;++u<n&&(a*=256);)this[e+u]=t/a&255;return e+n};s.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;T(this,t,e,n,o,0)}var a=n-1,u=1;for(this[e+a]=t&255;--a>=0&&(u*=256);)this[e+a]=t/u&255;return e+n};s.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):re(this,t,e,!0),e+2};s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):re(this,t,e,!1),e+2};s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):ne(this,t,e,!0),e+4};s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ne(this,t,e,!1),e+4};s.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);T(this,t,e,n,o-1,-o)}var a=0,u=1,l=0;for(this[e]=t&255;++a<n&&(u*=256);)t<0&&l===0&&this[e+a-1]!==0&&(l=1),this[e+a]=(t/u>>0)-l&255;return e+n};s.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);T(this,t,e,n,o-1,-o)}var a=n-1,u=1,l=0;for(this[e+a]=t&255;--a>=0&&(u*=256);)t<0&&l===0&&this[e+a+1]!==0&&(l=1),this[e+a]=(t/u>>0)-l&255;return e+n};s.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};s.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):re(this,t,e,!0),e+2};s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):re(this,t,e,!1),e+2};s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ne(this,t,e,!0),e+4};s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ne(this,t,e,!1),e+4};s.prototype.writeFloatLE=function(t,e,n){return De(this,t,e,!0,n)};s.prototype.writeFloatBE=function(t,e,n){return De(this,t,e,!1,n)};s.prototype.writeDoubleLE=function(t,e,n){return Oe(this,t,e,!0,n)};s.prototype.writeDoubleBE=function(t,e,n){return Oe(this,t,e,!1,n)};s.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,a;if(this===t&&n<e&&e<i)for(a=o-1;a>=0;--a)t[a+e]=this[a+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(a=0;a<o;++a)t[a+e]=this[a+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};s.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!s.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var a;if(typeof t=="number")for(a=e;a<n;++a)this[a]=t;else{var u=R(t)?t:te(new s(t,i).toString()),l=u.length;for(a=0;a<n-e;++a)this[a+e]=u[a%l]}return this};Jt=/[^+\/0-9A-Za-z-_]/g});var f=le(()=>{"use strict";We()});var Er={};ve(Er,{FilePropertyMapper:()=>ge});module.exports=Ze(Er);c();f();c();f();c();f();function C(r){throw new Error("Unexpected value: "+JSON.stringify(r))}c();f();c();f();c();f();c();f();c();f();var F=class{};c();f();var ae=class{formatMultiple(t){return Promise.all(t.map(e=>this.format(e)))}formatMultipleSync(t){return t.map(e=>this.formatSync(e))}},q=class extends ae{async format(t){return t}formatSync(t){return t}};c();f();c();f();var E=class extends F{constructor(e){super();p(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var tr=4,Ve=!!d.env.FERN_STACK_TRACK;Ve&&(Error.stackTraceLimit=50);var z=class{constructor(){p(this,"buffer","");p(this,"indentLevel",0);p(this,"hasWrittenAnything",!1);p(this,"lastCharacterIsSemicolon",!1);p(this,"lastCharacterIsNewline",!1)}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let n=e.length>0&&e.endsWith(`
|
|
2
|
-
`),i
|
|
1
|
+
"use strict";var re=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames;var at=Object.prototype.hasOwnProperty;var st=(n,t,e)=>t in n?re(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var xe=(n,t)=>()=>(n&&(t=n(n=0)),t);var Se=(n,t)=>{for(var e in t)re(n,e,{get:t[e],enumerable:!0})},ut=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ot(t))!at.call(n,i)&&i!==e&&re(n,i,{get:()=>t[i],enumerable:!(r=it(t,i))||r.enumerable});return n};var lt=n=>ut(re({},"__esModule",{value:!0}),n);var c=(n,t,e)=>st(n,typeof t!="symbol"?t+"":t,e);function Le(){throw new Error("setTimeout has not been defined")}function Ce(){throw new Error("clearTimeout has not been defined")}function Be(n){if(U===setTimeout)return setTimeout(n,0);if((U===Le||!U)&&setTimeout)return U=setTimeout,setTimeout(n,0);try{return U(n,0)}catch(t){try{return U.call(null,n,0)}catch(e){return U.call(this,n,0)}}}function ft(n){if(F===clearTimeout)return clearTimeout(n);if((F===Ce||!F)&&clearTimeout)return F=clearTimeout,clearTimeout(n);try{return F(n)}catch(t){try{return F.call(null,n)}catch(e){return F.call(this,n)}}}function ct(){!z||!P||(z=!1,P.length?C=P.concat(C):ne=-1,C.length&&_e())}function _e(){if(!z){var n=Be(ct);z=!0;for(var t=C.length;t;){for(P=C,C=[];++ne<t;)P&&P[ne].run();ne=-1,t=C.length}P=null,z=!1,ft(n)}}function pt(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];C.push(new Ue(n,t)),C.length===1&&!z&&Be(_e)}function Ue(n,t){this.fun=n,this.array=t}function O(){}function Rt(n){throw new Error("process.binding is not supported")}function Lt(){return"/"}function Ct(n){throw new Error("process.chdir is not supported")}function Bt(){return 0}function Ut(n){var t=_t.call(H)*.001,e=Math.floor(t),r=Math.floor(t%1*1e9);return n&&(e=e-n[0],r=r-n[1],r<0&&(e--,r+=1e9)),[e,r]}function Mt(){var n=new Date,t=n-Ft;return t/1e3}var U,F,C,z,P,ne,ht,mt,wt,dt,xt,gt,yt,Tt,Nt,kt,vt,At,It,Et,bt,St,H,_t,Ft,d,Re,l=xe(()=>{"use strict";U=Le,F=Ce;typeof globalThis.setTimeout=="function"&&(U=setTimeout);typeof globalThis.clearTimeout=="function"&&(F=clearTimeout);C=[],z=!1,ne=-1;Ue.prototype.run=function(){this.fun.apply(null,this.array)};ht="browser",mt="browser",wt=!0,dt={},xt=[],gt="",yt={},Tt={},Nt={};kt=O,vt=O,At=O,It=O,Et=O,bt=O,St=O;H=globalThis.performance||{},_t=H.now||H.mozNow||H.msNow||H.oNow||H.webkitNow||function(){return new Date().getTime()};Ft=new Date;d={nextTick:pt,title:ht,browser:wt,env:dt,argv:xt,version:gt,versions:yt,on:kt,addListener:vt,once:At,off:It,removeListener:Et,removeAllListeners:bt,emit:St,binding:Rt,cwd:Lt,chdir:Ct,umask:Bt,hrtime:Ut,platform:mt,release:Tt,config:Nt,uptime:Mt},Re={};Object.keys(Re).forEach(n=>{let t=n.split("."),e=d;for(let r=0;r<t.length;r++){let i=t[r];r===t.length-1?e[i]=Re[n]:e=e[i]||(e[i]={})}})});function Oe(){ye=!0;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=n.length;t<e;++t)b[t]=n[t],I[n.charCodeAt(t)]=t;I[45]=62,I[95]=63}function Ot(n){ye||Oe();var t,e,r,i,o,a,u=n.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=n[u-2]==="="?2:n[u-1]==="="?1:0,a=new Pt(u*3/4-o),r=o>0?u-4:u;var p=0;for(t=0,e=0;t<r;t+=4,e+=3)i=I[n.charCodeAt(t)]<<18|I[n.charCodeAt(t+1)]<<12|I[n.charCodeAt(t+2)]<<6|I[n.charCodeAt(t+3)],a[p++]=i>>16&255,a[p++]=i>>8&255,a[p++]=i&255;return o===2?(i=I[n.charCodeAt(t)]<<2|I[n.charCodeAt(t+1)]>>4,a[p++]=i&255):o===1&&(i=I[n.charCodeAt(t)]<<10|I[n.charCodeAt(t+1)]<<4|I[n.charCodeAt(t+2)]>>2,a[p++]=i>>8&255,a[p++]=i&255),a}function Dt(n){return b[n>>18&63]+b[n>>12&63]+b[n>>6&63]+b[n&63]}function $t(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16)+(n[o+1]<<8)+n[o+2],i.push(Dt(r));return i.join("")}function Fe(n){ye||Oe();for(var t,e=n.length,r=e%3,i="",o=[],a=16383,u=0,p=e-r;u<p;u+=a)o.push($t(n,u,u+a>p?p:u+a));return r===1?(t=n[e-1],i+=b[t>>2],i+=b[t<<4&63],i+="=="):r===2&&(t=(n[e-2]<<8)+n[e-1],i+=b[t>>10],i+=b[t>>4&63],i+=b[t<<2&63],i+="="),o.push(i),o.join("")}function ie(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function B(n,t){if(ie()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t),n.__proto__=s.prototype):(n===null&&(n=new s(t)),n.length=t),n}function s(n,t,e){if(!s.TYPED_ARRAY_SUPPORT&&!(this instanceof s))return new s(n,t,e);if(typeof n=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return Te(this,n)}return De(this,n,t,e)}function De(n,t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Wt(n,t,e,r):typeof t=="string"?jt(n,t,e):Vt(n,t)}function $e(n){if(typeof n!="number")throw new TypeError('"size" argument must be a number');if(n<0)throw new RangeError('"size" argument must not be negative')}function Yt(n,t,e,r){return $e(t),t<=0?B(n,t):e!==void 0?typeof r=="string"?B(n,t).fill(e,r):B(n,t).fill(e):B(n,t)}function Te(n,t){if($e(t),n=B(n,t<0?0:Ne(t)|0),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)n[e]=0;return n}function jt(n,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=Ye(t,e)|0;n=B(n,r);var i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function ge(n,t){var e=t.length<0?0:Ne(t.length)|0;n=B(n,e);for(var r=0;r<e;r+=1)n[r]=t[r]&255;return n}function Wt(n,t,e,r){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");return e===void 0&&r===void 0?t=new Uint8Array(t):r===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,r),s.TYPED_ARRAY_SUPPORT?(n=t,n.__proto__=s.prototype):n=ge(n,t),n}function Vt(n,t){if(S(t)){var e=Ne(t.length)|0;return n=B(n,e),n.length===0||t.copy(n,0,0,e),n}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||lr(t.length)?B(n,0):ge(n,t);if(t.type==="Buffer"&&Array.isArray(t.data))return ge(n,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Ne(n){if(n>=ie())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ie().toString(16)+" bytes");return n|0}function S(n){return!!(n!=null&&n._isBuffer)}function Ye(n,t){if(S(n))return n.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;typeof n!="string"&&(n=""+n);var e=n.length;if(e===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return oe(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return He(n).length;default:if(r)return oe(n).length;t=(""+t).toLowerCase(),r=!0}}function Jt(n,t,e){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(n||(n="utf8");;)switch(n){case"hex":return tr(this,t,e);case"utf8":case"utf-8":return Ve(this,t,e);case"ascii":return Qt(this,t,e);case"latin1":case"binary":return er(this,t,e);case"base64":return Xt(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rr(this,t,e);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),r=!0}}function D(n,t,e){var r=n[t];n[t]=n[e],n[e]=r}function je(n,t,e,r,i){if(n.length===0)return-1;if(typeof e=="string"?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:n.length-1),e<0&&(e=n.length+e),e>=n.length){if(i)return-1;e=n.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=s.from(t,r)),S(t))return t.length===0?-1:Me(n,t,e,r,i);if(typeof t=="number")return t=t&255,s.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(n,t,e):Uint8Array.prototype.lastIndexOf.call(n,t,e):Me(n,[t],e,r,i);throw new TypeError("val must be string, number or Buffer")}function Me(n,t,e,r,i){var o=1,a=n.length,u=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(n.length<2||t.length<2)return-1;o=2,a/=2,u/=2,e/=2}function p(T,L){return o===1?T[L]:T.readUInt16BE(L*o)}var w;if(i){var m=-1;for(w=e;w<a;w++)if(p(n,w)===p(t,m===-1?0:w-m)){if(m===-1&&(m=w),w-m+1===u)return m*o}else m!==-1&&(w-=w-m),m=-1}else for(e+u>a&&(e=a-u),w=e;w>=0;w--){for(var h=!0,g=0;g<u;g++)if(p(n,w+g)!==p(t,g)){h=!1;break}if(h)return w}return-1}function qt(n,t,e,r){e=Number(e)||0;var i=n.length-e;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var u=parseInt(t.substr(a*2,2),16);if(isNaN(u))return a;n[e+a]=u}return a}function Gt(n,t,e,r){return ue(oe(t,n.length-e),n,e,r)}function We(n,t,e,r){return ue(sr(t),n,e,r)}function Ht(n,t,e,r){return We(n,t,e,r)}function zt(n,t,e,r){return ue(He(t),n,e,r)}function Kt(n,t,e,r){return ue(ur(t,n.length-e),n,e,r)}function Xt(n,t,e){return t===0&&e===n.length?Fe(n):Fe(n.slice(t,e))}function Ve(n,t,e){e=Math.min(n.length,e);for(var r=[],i=t;i<e;){var o=n[i],a=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=e){var p,w,m,h;switch(u){case 1:o<128&&(a=o);break;case 2:p=n[i+1],(p&192)===128&&(h=(o&31)<<6|p&63,h>127&&(a=h));break;case 3:p=n[i+1],w=n[i+2],(p&192)===128&&(w&192)===128&&(h=(o&15)<<12|(p&63)<<6|w&63,h>2047&&(h<55296||h>57343)&&(a=h));break;case 4:p=n[i+1],w=n[i+2],m=n[i+3],(p&192)===128&&(w&192)===128&&(m&192)===128&&(h=(o&15)<<18|(p&63)<<12|(w&63)<<6|m&63,h>65535&&h<1114112&&(a=h))}}a===null?(a=65533,u=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=u}return Zt(r)}function Zt(n){var t=n.length;if(t<=Pe)return String.fromCharCode.apply(String,n);for(var e="",r=0;r<t;)e+=String.fromCharCode.apply(String,n.slice(r,r+=Pe));return e}function Qt(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]&127);return r}function er(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]);return r}function tr(n,t,e){var r=n.length;(!t||t<0)&&(t=0),(!e||e<0||e>r)&&(e=r);for(var i="",o=t;o<e;++o)i+=ar(n[o]);return i}function rr(n,t,e){for(var r=n.slice(t,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+r[o+1]*256);return i}function k(n,t,e){if(n%1!==0||n<0)throw new RangeError("offset is not uint");if(n+t>e)throw new RangeError("Trying to access beyond buffer length")}function v(n,t,e,r,i,o){if(!S(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+r>n.length)throw new RangeError("Index out of range")}function ae(n,t,e,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(n.length-e,2);i<o;++i)n[e+i]=(t&255<<8*(r?i:1-i))>>>(r?i:1-i)*8}function se(n,t,e,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(n.length-e,4);i<o;++i)n[e+i]=t>>>(r?i:3-i)*8&255}function Je(n,t,e,r,i,o){if(e+r>n.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function qe(n,t,e,r,i){return i||Je(n,t,e,4,34028234663852886e22,-34028234663852886e22),Ke(n,t,e,r,23,4),e+4}function Ge(n,t,e,r,i){return i||Je(n,t,e,8,17976931348623157e292,-17976931348623157e292),Ke(n,t,e,r,52,8),e+8}function ir(n){if(n=or(n).replace(nr,""),n.length<2)return"";for(;n.length%4!==0;)n=n+"=";return n}function or(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function ar(n){return n<16?"0"+n.toString(16):n.toString(16)}function oe(n,t){t=t||1/0;for(var e,r=n.length,i=null,o=[],a=0;a<r;++a){if(e=n.charCodeAt(a),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function sr(n){for(var t=[],e=0;e<n.length;++e)t.push(n.charCodeAt(e)&255);return t}function ur(n,t){for(var e,r,i,o=[],a=0;a<n.length&&!((t-=2)<0);++a)e=n.charCodeAt(a),r=e>>8,i=e%256,o.push(i),o.push(r);return o}function He(n){return Ot(ir(n))}function ue(n,t,e,r){for(var i=0;i<r&&!(i+e>=t.length||i>=n.length);++i)t[i+e]=n[i];return i}function lr(n){return n!==n}function fr(n){return n!=null&&(!!n._isBuffer||ze(n)||cr(n))}function ze(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function cr(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&ze(n.slice(0,0))}function le(n,t,e,r,i){var o,a,u=i*8-r-1,p=(1<<u)-1,w=p>>1,m=-7,h=e?i-1:0,g=e?-1:1,T=n[t+h];for(h+=g,o=T&(1<<-m)-1,T>>=-m,m+=u;m>0;o=o*256+n[t+h],h+=g,m-=8);for(a=o&(1<<-m)-1,o>>=-m,m+=r;m>0;a=a*256+n[t+h],h+=g,m-=8);if(o===0)o=1-w;else{if(o===p)return a?NaN:(T?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-w}return(T?-1:1)*a*Math.pow(2,o-r)}function Ke(n,t,e,r,i,o){var a,u,p,w=o*8-i-1,m=(1<<w)-1,h=m>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=r?0:o-1,L=r?1:-1,te=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=m):(a=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-a))<1&&(a--,p*=2),a+h>=1?t+=g/p:t+=g*Math.pow(2,1-h),t*p>=2&&(a++,p/=2),a+h>=m?(u=0,a=m):a+h>=1?(u=(t*p-1)*Math.pow(2,i),a=a+h):(u=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;n[e+T]=u&255,T+=L,u/=256,i-=8);for(a=a<<i|u,w+=i;w>0;n[e+T]=a&255,T+=L,a/=256,w-=8);n[e+T-L]|=te*128}var b,I,Pt,ye,Pe,nr,Xe=xe(()=>{"use strict";l();f();b=[],I=[],Pt=typeof Uint8Array!="undefined"?Uint8Array:Array,ye=!1;s.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;s.poolSize=8192;s._augment=function(n){return n.__proto__=s.prototype,n};s.from=function(n,t,e){return De(null,n,t,e)};s.kMaxLength=ie();s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&s[Symbol.species]);s.alloc=function(n,t,e){return Yt(null,n,t,e)};s.allocUnsafe=function(n){return Te(null,n)};s.allocUnsafeSlow=function(n){return Te(null,n)};s.isBuffer=fr;s.compare=function(t,e){if(!S(t)||!S(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,o=0,a=Math.min(r,i);o<a;++o)if(t[o]!==e[o]){r=t[o],i=e[o];break}return r<i?-1:i<r?1:0};s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return s.alloc(0);var r;if(e===void 0)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=s.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var a=t[r];if(!S(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i};s.byteLength=Ye;s.prototype._isBuffer=!0;s.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)D(this,e,e+1);return this};s.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)D(this,e,e+3),D(this,e+1,e+2);return this};s.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)D(this,e,e+7),D(this,e+1,e+6),D(this,e+2,e+5),D(this,e+3,e+4);return this};s.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Ve(this,0,t):Jt.apply(this,arguments)};s.prototype.equals=function(t){if(!S(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:s.compare(this,t)===0};s.prototype.compare=function(t,e,r,i,o){if(!S(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||r>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=r)return 0;if(i>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var a=o-i,u=r-e,p=Math.min(a,u),w=this.slice(i,o),m=t.slice(e,r),h=0;h<p;++h)if(w[h]!==m[h]){a=w[h],u=m[h];break}return a<u?-1:u<a?1:0};s.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1};s.prototype.indexOf=function(t,e,r){return je(this,t,e,r,!0)};s.prototype.lastIndexOf=function(t,e,r){return je(this,t,e,r,!1)};s.prototype.write=function(t,e,r,i){if(e===void 0)i="utf8",r=this.length,e=0;else if(r===void 0&&typeof e=="string")i=e,r=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(r)?(r=r|0,i===void 0&&(i="utf8")):(i=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return qt(this,t,e,r);case"utf8":case"utf-8":return Gt(this,t,e,r);case"ascii":return We(this,t,e,r);case"latin1":case"binary":return Ht(this,t,e,r);case"base64":return zt(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Kt(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Pe=4096;s.prototype.slice=function(t,e){var r=this.length;t=~~t,e=e===void 0?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var i;if(s.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=s.prototype;else{var o=e-t;i=new s(o,void 0);for(var a=0;a<o;++a)i[a]=this[a+t]}return i};s.prototype.readUIntLE=function(t,e,r){t=t|0,e=e|0,r||k(t,e,this.length);for(var i=this[t],o=1,a=0;++a<e&&(o*=256);)i+=this[t+a]*o;return i};s.prototype.readUIntBE=function(t,e,r){t=t|0,e=e|0,r||k(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};s.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]};s.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8};s.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]};s.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};s.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};s.prototype.readIntLE=function(t,e,r){t=t|0,e=e|0,r||k(t,e,this.length);for(var i=this[t],o=1,a=0;++a<e&&(o*=256);)i+=this[t+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};s.prototype.readIntBE=function(t,e,r){t=t|0,e=e|0,r||k(t,e,this.length);for(var i=e,o=1,a=this[t+--i];i>0&&(o*=256);)a+=this[t+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*e)),a};s.prototype.readInt8=function(t,e){return e||k(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};s.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r};s.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r};s.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};s.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};s.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),le(this,t,!0,23,4)};s.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),le(this,t,!1,23,4)};s.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),le(this,t,!0,52,8)};s.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),le(this,t,!1,52,8)};s.prototype.writeUIntLE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;v(this,t,e,r,o,0)}var a=1,u=0;for(this[e]=t&255;++u<r&&(a*=256);)this[e+u]=t/a&255;return e+r};s.prototype.writeUIntBE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;v(this,t,e,r,o,0)}var a=r-1,u=1;for(this[e+a]=t&255;--a>=0&&(u*=256);)this[e+a]=t/u&255;return e+r};s.prototype.writeUInt8=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):ae(this,t,e,!0),e+2};s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):ae(this,t,e,!1),e+2};s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):se(this,t,e,!0),e+4};s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):se(this,t,e,!1),e+4};s.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);v(this,t,e,r,o-1,-o)}var a=0,u=1,p=0;for(this[e]=t&255;++a<r&&(u*=256);)t<0&&p===0&&this[e+a-1]!==0&&(p=1),this[e+a]=(t/u>>0)-p&255;return e+r};s.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);v(this,t,e,r,o-1,-o)}var a=r-1,u=1,p=0;for(this[e+a]=t&255;--a>=0&&(u*=256);)t<0&&p===0&&this[e+a+1]!==0&&(p=1),this[e+a]=(t/u>>0)-p&255;return e+r};s.prototype.writeInt8=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};s.prototype.writeInt16LE=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):ae(this,t,e,!0),e+2};s.prototype.writeInt16BE=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):ae(this,t,e,!1),e+2};s.prototype.writeInt32LE=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):se(this,t,e,!0),e+4};s.prototype.writeInt32BE=function(t,e,r){return t=+t,e=e|0,r||v(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):se(this,t,e,!1),e+4};s.prototype.writeFloatLE=function(t,e,r){return qe(this,t,e,!0,r)};s.prototype.writeFloatBE=function(t,e,r){return qe(this,t,e,!1,r)};s.prototype.writeDoubleLE=function(t,e,r){return Ge(this,t,e,!0,r)};s.prototype.writeDoubleBE=function(t,e,r){return Ge(this,t,e,!1,r)};s.prototype.copy=function(t,e,r,i){if(r||(r=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var o=i-r,a;if(this===t&&r<e&&e<i)for(a=o-1;a>=0;--a)t[a+e]=this[a+r];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(a=0;a<o;++a)t[a+e]=this[a+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o};s.prototype.fill=function(t,e,r,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,r=this.length):typeof r=="string"&&(i=r,r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!s.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e=e>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var a;if(typeof t=="number")for(a=e;a<r;++a)this[a]=t;else{var u=S(t)?t:oe(new s(t,i).toString()),p=u.length;for(a=0;a<r-e;++a)this[a+e]=u[a%p]}return this};nr=/[^+\/0-9A-Za-z-_]/g});var f=xe(()=>{"use strict";Xe()});var Dr={};Se(Dr,{FilePropertyMapper:()=>be});module.exports=lt(Dr);l();f();l();f();l();f();function M(n){throw new Error("Unexpected value: "+JSON.stringify(n))}l();f();l();f();l();f();l();f();l();f();l();f();var Ze,Qe,K=(Qe=(Ze=d.env.FERN_STACK_TRACK)==null?void 0:Ze.toLowerCase())!=null?Qe:"",R=K!==""&&K!=="0"&&K!=="false",ke=["single","multiline","box"].includes(K)?K:"single";R&&(Error.stackTraceLimit=50);var pr=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),hr=new Set(["stacktrace"]);function ce({maxFrames:n=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:i=[],filterNode:o=!0,filterJs:a=!0,formatFilename:u=p=>p}={}){var w;if(!R)return[];r=[...r,...pr],e=[...e,...hr],i=[...i,"runInteractiveTask"];let p=!1;return((w=new Error().stack)!=null?w:"").split(`
|
|
2
|
+
`).map(m=>{let h=m.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(h&&h.length===5){let[,g,T,L,te]=h;if(!g||!T||!L||!te)return;if(p||i.some(nt=>g==null?void 0:g.includes(nt))){p=!0;return}switch(g){case"Object.<anonymous>":g="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":g=`${g.substring(g.indexOf(".")+1)}()=> { ... }`;break}return{fn:g,path:u(T),position:`${L}:${te}`}}}).filter(m=>{var h,g;return m&&!r.some(T=>m.fn.includes(T))&&!(o&&((h=m.path)!=null&&h.startsWith("node:")))&&!(a&&((g=m.path)!=null&&g.endsWith(".js")))&&!e.some(T=>m.path.includes(T))}).slice(t,t+n)}var fe=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:r=[],filterFunctions:i=[],stopOn:o=[],filterNode:a=!0,filterJs:u=!0,multiline:p=!1,formatFilename:w=m=>m}={}){c(this,"maxFrames");c(this,"skip");c(this,"filterPaths");c(this,"filterFunctions");c(this,"stopOn");c(this,"filterNode");c(this,"filterJs");c(this,"multiline");c(this,"formatFilename");c(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=r,this.filterFunctions=i,this.stopOn=o,this.filterNode=a,this.filterJs=u,this.multiline=p,this.formatFilename=w}tag(t){let e=this.tracking.get(t)||new Set;ce({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(r=>e.add(r)),this.tracking.set(t,e)}trace(t){if(!R)return"";let e=this.tracking.get(t);return e?[...e].map(r=>`${this.multiline?`
|
|
3
|
+
`:""}${r.fn} - ${r.path}:${r.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},_;function et({maxFrames:n=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:i=[],filterNode:o=!0,filterJs:a=!0,multiline:u=!1,formatFilename:p=w=>w}={}){R&&(_!=null||(_=new fe({maxFrames:n,skip:t,filterPaths:e,filterFunctions:r,stopOn:i,filterNode:o,filterJs:a,multiline:u,formatFilename:p})))}function tt(n){_==null||_.tag(n)}function ve(n){var t;return(t=_==null?void 0:_.frames(n))!=null?t:[]}var $=class{constructor(){tt(this)}};l();f();var pe=class{formatMultiple(t){return Promise.all(t.map(e=>this.format(e)))}formatMultipleSync(t){return t.map(e=>this.formatSync(e))}},X=class extends pe{async format(t){return t}formatSync(t){return t}};l();f();l();f();l();f();var E=class extends ${constructor(e){super();c(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var mr=4;et({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var Z=class{constructor(){c(this,"lineBuffer",[]);c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsSemicolon",!1);c(this,"lastCharacterIsNewline",!1);c(this,"nodeStackFrames",[])}get buffer(){return R&&this.nodeStackFrames.length>0&&this.writeInternal(`
|
|
4
|
+
`),this.lineBuffer.join(`
|
|
5
|
+
`)+(this.lastCharacterIsNewline?`
|
|
6
|
+
`:"")}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let r=e.length>0&&e.endsWith(`
|
|
7
|
+
`),i=r?e.substring(0,e.length-1):e,o=this.getIndentString(),a=i.replaceAll(`
|
|
3
8
|
`,`
|
|
4
|
-
${o}`);this.isAtStartOfLine()&&(a=o+a),
|
|
5
|
-
`),this.writeInternal(a)}else this.writeNode(e)}writeStatement(...t){this.write(...t),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){
|
|
9
|
+
${o}`);this.isAtStartOfLine()&&(a=o+a),r&&(a+=`
|
|
10
|
+
`),this.writeInternal(a)}else this.writeNode(e)}writeStatement(...t){this.write(...t),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){R&&this.nodeStackFrames.push(...ve(t)),t.write(this),R&&ke!=="single"&&this.writeInternal(`
|
|
11
|
+
`)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){this.writeNode(t),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new E(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new E(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new E(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new E(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new E(t).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(t=!0){this.dedent(),this.writeNewLineIfLastLineNot(),t?this.writeLine("}"):this.write("}")}writeLine(...t){this.write(...t.length===0?[""]:t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
6
12
|
`)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
7
|
-
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:
|
|
8
|
-
`),this.lastCharacterIsSemicolon=t.endsWith(";")
|
|
9
|
-
`)&&!this.
|
|
10
|
-
`)){let e=this.stacktrace(15).map(n=>`${n.fn} - ${n.path}:${n.position}`).join(" ");e&&(this.buffer=this.buffer.slice(0,-1),this.buffer+=`//@@ ${e}
|
|
11
|
-
`)}return this.buffer}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return tr}stacktrace(t=50){var n;let e=!1;return((n=new Error().stack)!=null?n:"").split(`
|
|
12
|
-
`).map(i=>{var a;let o=i.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(o&&o.length===5){let[,u,l,m,w]=o;if(e||u!=null&&u.includes("runInteractiveTask")){e=!0;return}switch(u){case"Object.<anonymous>":u="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":u=`${u.substring(u.indexOf(".")+1)}()=> { ... }`;break}return{fn:u,path:(a=l==null?void 0:l.replace(/^.*?fern.*?\//,""))!=null?a:"",position:`${m}:${w}`}}}).filter(i=>{var o,a,u,l,m,w,h;return i&&!((o=i.path)!=null&&o.startsWith("node:"))&&!((a=i.path)!=null&&a.endsWith(".js"))&&!((u=i.path)!=null&&u.includes("AbstractWriter"))&&!((l=i.fn)!=null&&l.includes("stacktrace"))&&!((m=i.fn)!=null&&m.includes("stackLine"))&&!((w=i.fn)!=null&&w.includes("SdkGeneratorCLI"))&&!((h=i.fn)!=null&&h.includes("runCli"))}).slice(0,t)}};c();f();function de(r){return(r==null?void 0:r.name)!=null}var D=class extends z{constructor({packageName:e,customConfig:n,formatter:i}){super();p(this,"packageName");p(this,"customConfig");p(this,"formatter");p(this,"imports",new Set);this.packageName=e,this.customConfig=n,this.formatter=i!=null?i:new q}addImport(e){this.imports.add(e)}getImports(){return new Set(this.imports)}};var K=class extends D{constructor({packageName:t,customConfig:e,formatter:n}){super({packageName:t,customConfig:e,formatter:n})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Java file: ${e}
|
|
13
|
+
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:r}){if(t.length>0){let i=t[0];i!=null&&r(i);for(let o=1;o<t.length;o++){this.write(e);let a=t[o];a!=null&&r(a)}}}toString(){return this.buffer}writeInternal(t){if(t.length===0)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
|
|
14
|
+
`),this.lastCharacterIsSemicolon=t.endsWith(";");let r=t.split(`
|
|
15
|
+
`),i=R&&!this.shouldSkipTracking(r)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${r.shift()||""}`),this.lastCharacterIsNewline&&r.pop(),this.lineBuffer.push(...r),i&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(r=>`${e?`(${e}) `:""} ${r.fn} - ${r.path} : ${r.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(ce({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,ke){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return mr}};l();f();function Ae(n){return(n==null?void 0:n.name)!=null&&(n==null?void 0:n.assignment)!=null}var Y=class extends Z{constructor({packageName:e,customConfig:r,formatter:i}){super();c(this,"packageName");c(this,"customConfig");c(this,"formatter");c(this,"imports",new Set);this.packageName=e,this.customConfig=r,this.formatter=i!=null?i:new X}addImport(e){this.imports.add(e)}getImports(){return new Set(this.imports)}};var Q=class extends Y{constructor({packageName:t,customConfig:e,formatter:r}){super({packageName:t,customConfig:e,formatter:r})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Java file: ${e}
|
|
13
16
|
${t}`)}return t}toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(e){throw new Error(`Failed to format Java file: ${e}
|
|
14
17
|
${t}`)}return t}getContent(){let t=`package ${this.packageName};
|
|
15
18
|
|
|
16
19
|
`,e=this.stringifyImports();return e.length>0?`${t}${e}
|
|
17
20
|
|
|
18
21
|
${this.buffer}`:t+this.buffer}stringifyImports(){return Array.from(this.imports).filter(t=>t!==this.packageName).map(t=>`import ${t};`).sort().join(`
|
|
19
|
-
`)}};var g={};ve(g,{Access:()=>xe,AstNode:()=>y,Class:()=>O,ClassInstantiation:()=>Y,ClassReference:()=>x,CodeBlock:()=>$,Method:()=>j,MethodInvocation:()=>W,Parameter:()=>V,Type:()=>X,TypeLiteral:()=>N,Writer:()=>D,classReference:()=>Tr,class_:()=>vr,codeblock:()=>gr,instantiateClass:()=>Nr,invokeMethod:()=>Ar,method:()=>kr,parameter:()=>Ir});c();f();c();f();c();f();var xe={Public:"public",Protected:"protected",Private:"private"};c();f();c();f();var y=class extends F{async toStringAsync({packageName:t,customConfig:e,formatter:n}){let i=new K({packageName:t,customConfig:e,formatter:n});return this.write(i),i.toStringAsync()}toString({packageName:t,customConfig:e,formatter:n}){let i=new K({packageName:t,customConfig:e,formatter:n});return this.write(i),i.toString()}};var O=class extends y{constructor({name:e,access:n}){super();p(this,"name");p(this,"access");p(this,"methods",[]);this.name=e,this.access=n}write(e){if(e.write(`${this.access} class ${this.name}`),this.isEmpty()){e.writeLine(" {}");return}e.writeLine(" {"),e.indent();for(let n of this.methods)e.writeNode(n),e.newLine();e.dedent(),e.write("}")}addMethod(e){this.methods.push(e)}isEmpty(){return this.methods.length===0}};c();f();c();f();c();f();c();f();var x=class extends y{constructor({name:e,packageName:n,fullyQualified:i}){super();p(this,"name");p(this,"packageName");p(this,"fullyQualified");this.name=e,this.packageName=n,this.fullyQualified=i!=null?i:!1}write(e){if(e.addImport(`${this.packageName}.${this.name}`),this.fullyQualified){e.write(`${this.packageName}.${this.name}`);return}e.write(this.name)}};c();f();var X=class extends y{constructor(e){super();p(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"array":e.writeNode(this.internalType.value),e.write("[]");break;case"bigInteger":e.writeNode(rr);break;case"boolean":e.write("Boolean");break;case"bytes":e.write("byte[]");break;case"date":e.write("String");break;case"dateTime":e.writeNode(or);break;case"double":e.write("Double");break;case"float":e.write("Float");break;case"generic":e.writeNode(this.internalType.value),e.write("<");for(let[n,i]of this.internalType.parameters.entries())e.writeNode(i),n<this.internalType.parameters.length-1&&e.write(", ");e.write(">");break;case"inputStream":e.writeNode(ur);break;case"integer":e.write("Integer");break;case"iterable":this.writeIterable({writer:e,iterable:this.internalType});break;case"list":{this.writeList({writer:e,list:this.internalType});break}case"long":{e.write("Long");break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"object":{e.write("Object");break}case"optional":{this.writeOptional({writer:e,optional:this.internalType});break}case"reference":e.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:e,set:this.internalType});break}case"string":e.write("String");break;case"uuid":e.writeNode(sr);break;case"void":e.write("Void");break;default:C(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static array(e){return new this({type:"array",value:e})}static bigInteger(){return new this({type:"bigInteger"})}static boolean(){return new this({type:"boolean"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static double(){return new this({type:"double"})}static float(){return new this({type:"float"})}static integer(){return new this({type:"integer"})}static list(e){return new this({type:"list",value:e})}static long(){return new this({type:"long"})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static object(){return new this({type:"object"})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static reference(e){return new this({type:"reference",value:e})}static generic(e,n){return new this({type:"generic",value:e,parameters:n})}static set(e){return new this({type:"set",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static void(){return new this({type:"void"})}static iterable(e){return new this({type:"iterable",value:e})}static inputStream(){return new this({type:"inputStream"})}writeList({writer:e,list:n}){e.writeNode(nr),e.write("<"),n.value.write(e),e.write(">")}writeMap({writer:e,map:n}){e.writeNode(ir),e.write("<"),n.keyType.write(e),e.write(", "),n.valueType.write(e),e.write(">")}writeOptional({writer:e,optional:n}){e.writeNode(se),e.write("<"),n.value.write(e),e.write(">")}writeIterable({writer:e,iterable:n}){e.writeNode(se),e.write("<"),n.value.write(e),e.write(">")}writeSet({writer:e,set:n}){e.writeNode(ar),e.write("<"),n.value.write(e),e.write(">")}static isAlreadyOptional(e){return e.internalType.type==="optional"}},ue=new x({name:"Arrays",packageName:"java.util"}),rr=new x({name:"BigInteger",packageName:"java.math"}),Gn=new x({name:"HashMap",packageName:"java.util"}),nr=new x({name:"List",packageName:"java.util"}),ir=new x({name:"Map",packageName:"java.util"}),or=new x({name:"OffsetDateTime",packageName:"java.time"}),se=new x({name:"Optional",packageName:"java.util"}),ar=new x({name:"Set",packageName:"java.util"}),sr=new x({name:"UUID",packageName:"java.util"}),ur=new x({name:"InputStream",packageName:"java.io"});var N=class r extends y{constructor(e){super();p(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"bigInteger":this.writeBigInteger({writer:e,bigInteger:this.internalType});break;case"boolean":e.write(this.internalType.value.toString());break;case"builder":this.writeBuilder({writer:e,builder:this.internalType});break;case"bytes":e.write(`"${this.internalType.value}".getBytes()`);break;case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"date":e.write(`"${this.internalType.value}"`);break;case"dateTime":this.writeDateTime({writer:e,dateTime:this.internalType});break;case"double":{let n=this.internalType.value.toString();!n.includes(".")&&!n.includes("e")&&!n.includes("E")?e.write(`${n}.0`):e.write(n);break}case"enum":this.writeEnum({writer:e,enum_:this.internalType});break;case"float":e.write(`${this.internalType.value}f`);break;case"integer":e.write(Math.floor(this.internalType.value).toString());break;case"list":{this.writeList({writer:e,list:this.internalType});break}case"long":{e.write(`${Math.floor(this.internalType.value)}L`);break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"optional":{this.writeOptional({writer:e,optional:this.internalType});break}case"raw":{this.internalType.value instanceof y?e.writeNode(this.internalType.value):e.write(this.internalType.value);break}case"reference":e.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:e,set:this.internalType});break}case"string":e.write(`"${this.escapeString(this.internalType.value)}"`);break;case"unknown":this.writeUnknown({writer:e,value:this.internalType.value});break;case"uuid":this.writeUUID({writer:e,uuid:this.internalType});break;case"nop":break;default:C(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static bigInteger(e){return new this({type:"bigInteger",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static builder({classReference:e,parameters:n}){return new this({type:"builder",classReference:e,parameters:n})}static bytes(e){return new this({type:"bytes",value:e})}static class_({reference:e,parameters:n}){return new this({type:"class",reference:e,parameters:n})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static double(e){return new this({type:"double",value:e})}static enum_({classReference:e,value:n}){return new this({type:"enum",classReference:e,value:n})}static float(e){return new this({type:"float",value:e})}static integer(e){return new this({type:"integer",value:e})}static list({valueType:e,values:n,isParameter:i}){return new this({type:"list",valueType:e,values:n,isParameter:i})}static long(e){return new this({type:"long",value:e})}static map({keyType:e,valueType:n,entries:i}){return new this({type:"map",keyType:e,valueType:n,entries:i})}static optional({value:e,useOf:n}){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e,useOf:n})}static raw(e){return new this({type:"raw",value:e})}static reference(e){return new this({type:"reference",value:e})}static set({valueType:e,values:n}){return new this({type:"set",valueType:e,values:n})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static uuid(e){return new this({type:"uuid",value:e})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}shouldWriteInLine(){switch(this.internalType.type){case"bigInteger":case"boolean":case"bytes":case"date":case"dateTime":case"double":case"enum":case"float":case"integer":case"long":case"nop":case"raw":case"string":case"unknown":case"uuid":return!0;case"optional":return this.internalType.value.shouldWriteInLine();case"builder":case"class":case"list":case"map":case"reference":case"set":return!1;default:C(this.internalType)}}writeBigInteger({writer:e,bigInteger:n}){e.write("new "),e.writeNode(g.instantiateClass({classReference:cr,arguments_:[r.string(n.value)]}))}writeBuilder({writer:e,builder:n}){e.writeNode(n.classReference),e.writeNewLineIfLastLineNot(),e.indent(),this.writeBuilderParameters({writer:e,parameters:this.orderBuilderParameters(mr({parameters:n.parameters}))}),e.dedent()}writeBuilderParameters({writer:e,parameters:n}){e.writeLine(".builder()");for(let i of n)e.write(`.${i.name}(`),i.value.shouldWriteInLine()||e.newLine(),e.indent(),e.writeNode(i.value),e.dedent(),i.value.shouldWriteInLine()||e.newLine(),e.writeLine(")");e.writeNewLineIfLastLineNot(),e.write(".build()")}orderBuilderParameters(e){return e.sort((n,i)=>n.value.isOptional()&&!i.value.isOptional()?1:!n.value.isOptional()&&i.value.isOptional()?-1:0)}writeClass({writer:e,class_:n}){let i=hr({parameters:n.parameters});e.writeNode(g.instantiateClass({classReference:n.reference,arguments_:i.map(o=>o.value)}))}writeDateTime({writer:e,dateTime:n}){e.writeNode(g.invokeMethod({on:lr,method:"parse",arguments_:[r.string(n.value)]}))}writeEnum({writer:e,enum_:n}){e.writeNode(n.classReference),e.write("."+n.value)}writeList({writer:e,list:n}){this.writeIterable({writer:e,iterable:n})}writeMap({writer:e,map:n}){let i=wr({entries:n.entries});if(i.length===0){e.write("new "),e.writeNode(ce),e.write("<"),e.writeNode(n.keyType),e.write(", "),e.writeNode(n.valueType),e.write(">()");return}e.write("new "),e.writeNode(ce),e.write("<"),e.writeNode(n.keyType),e.write(", "),e.writeNode(n.valueType),e.writeLine(">() {{"),e.indent();for(let o of i)e.write("put("),e.writeNode(o.key),e.write(", "),e.writeNode(o.value),e.writeLine(");");e.dedent(),e.write("}}")}writeOptional({writer:e,optional:n}){if(!n.useOf){e.writeNode(n.value);return}e.writeNode(g.invokeMethod({on:se,method:"of",arguments_:[n.value]}))}writeSet({writer:e,set:n}){this.writeIterable({writer:e,iterable:n})}writeIterable({writer:e,iterable:n}){let i=n.type==="list"?ye:fr,o=dr({values:n.values});if(n.type==="list"&&n.isParameter&&o.length>0){e.writeNode(g.invokeMethod({on:ue,method:"asList",arguments_:o}));return}if(o.length===0){e.write(`new ${i.name}<`),e.writeNode(n.valueType),e.write(">()");return}e.write("new "),e.writeNode(i),e.write("<"),e.writeNode(n.valueType),e.writeLine(">("),e.indent(),e.writeNode(g.invokeMethod({on:ue,method:"asList",arguments_:o})),e.writeNewLineIfLastLineNot(),e.dedent(),e.write(")")}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(`"${this.escapeString(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("new "),e.writeNode(ye),e.write("<Object>()");return}e.write("new "),e.writeNode(ye),e.write("<Object>("),e.writeNode(g.invokeMethod({on:ue,method:"asList",arguments_:n.map(i=>r.unknown(i))})),e.write(")")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("new "),e.writeNode(ce),e.write("<String, Object>()");return}e.writeLine("new "),e.writeNode(ce),e.write("<String, Object>() {{"),e.indent();for(let[o,a]of i)e.write(`put("${o}", `),e.writeNode(r.unknown(a)),e.writeLine(");");e.dedent(),e.write("}}")}writeUUID({writer:e,uuid:n}){e.writeNode(g.invokeMethod({on:pr,method:"fromString",arguments_:[r.string(n.value)]}))}escapeString(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}static isAlreadyOptional(e){return e.internalType.type==="optional"}},ye=new x({name:"ArrayList",packageName:"java.util"}),cr=new x({name:"BigInteger",packageName:"java.math"}),ce=new x({name:"HashMap",packageName:"java.util"}),fr=new x({name:"HashSet",packageName:"java.util"}),ni=new x({name:"List",packageName:"java.util"}),ii=new x({name:"Map",packageName:"java.util"}),lr=new x({name:"OffsetDateTime",packageName:"java.time"}),oi=new x({name:"Set",packageName:"java.util"}),pr=new x({name:"UUID",packageName:"java.util"});function hr({parameters:r}){return r.filter(t=>!N.isNop(t.value))}function mr({parameters:r}){return r.filter(t=>!N.isNop(t.value))}function wr({entries:r}){return r.filter(t=>!N.isNop(t.key)&&!N.isNop(t.value))}function dr({values:r}){return r.filter(t=>!N.isNop(t))}function fe({writer:r,arguments_:t}){let e=yr(t);if(e.length===0){r.write("()");return}if(e.some(i=>i instanceof N&&!i.shouldWriteInLine())){xr({writer:r,arguments_:e});return}r.write("("),e.forEach((i,o)=>{o>0&&r.write(", "),He({writer:r,argument:i})}),r.write(")")}function xr({writer:r,arguments_:t}){r.writeLine("("),r.indent(),t.forEach((e,n)=>{n>0&&r.writeLine(","),He({writer:r,argument:e})}),r.dedent(),t.length>0&&r.newLine(),r.write(")")}function He({writer:r,argument:t}){de(t)?r.writeNodeOrString(t.assignment):t.write(r)}function yr(r){return r.filter(t=>!(t instanceof N&&N.isNop(t)))}var Y=class extends y{constructor({classReference:e,arguments_:n}){super();p(this,"classReference");p(this,"arguments_");this.classReference=e,this.arguments_=n}write(e){e.writeNode(this.classReference),fe({writer:e,arguments_:this.arguments_})}};c();f();var $=class extends y{constructor(e){super();p(this,"arg");this.arg=e}write(e){return new E(this.arg).write(e)}};c();f();var j=class extends y{constructor({name:e,access:n,parameters:i,body:o,static_:a,return_:u}){super();p(this,"name");p(this,"access");p(this,"parameters");p(this,"body");p(this,"return_");p(this,"static_");this.name=e,this.access=n,this.parameters=i,this.body=o,this.return_=u,this.static_=a!=null?a:!1}write(e){if(e.write(`${this.access} `),this.static_&&e.write("static "),this.return_!=null?e.writeNode(this.return_):e.write("void"),e.write(` ${this.name}`),this.parameters.length===0)e.write("()");else if(this.parameters.length===1){if(e.write("("),this.parameters[0]==null)throw new Error("Cannot render parameter "+this.parameters[0]);e.writeNode(this.parameters[0]),e.write(")")}else e.writeLine("("),e.indent(),this.parameters.forEach((n,i)=>{i>0&&e.writeLine(", "),e.writeNode(n)}),e.dedent(),e.write(")");if(this.body==null){e.write(";");return}e.writeLine(" {"),e.indent(),e.writeNode(this.body),e.writeNewLineIfLastLineNot(),e.dedent(),e.write("}")}};c();f();var W=class extends y{constructor({method:e,arguments_:n,on:i}){super();p(this,"on");p(this,"method");p(this,"arguments_");this.on=i,this.method=e,this.arguments_=n}write(e){this.on.write(e),e.write("."),e.write(this.method),fe({writer:e,arguments_:this.arguments_})}};c();f();var V=class extends y{constructor({name:e,type:n}){super();p(this,"name");p(this,"type");this.name=e,this.type=n}write(e){e.writeNode(this.type),e.write(` ${this.name}`)}};function gr(r){return new $(r)}function vr(r){return new O(r)}function Tr(r){return new x(r)}function Nr(r){return new Y(r)}function Ar(r){return new W(r)}function kr(r){return new j(r)}function Ir(r){return new V(r)}var ge=class{constructor({context:t}){p(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(e))!=null?o:{};for(let a of t.properties)switch(a.type){case"file":n.fileFields.push({name:this.context.getMethodName(a.name),value:this.getSingleFileProperty({property:a,record:i})});break;case"fileArray":n.fileFields.push({name:this.context.getMethodName(a.name),value:this.getArrayFileProperty({property:a,record:i})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getMethodName(a.name.name),value:this.getBodyProperty({property:a,record:i})});break;default:C(a)}return n}getSingleFileProperty({property:t,record:e}){let n=this.context.getSingleFileValue({property:t,record:e});return n==null?g.TypeLiteral.nop():g.TypeLiteral.reference(this.context.getFileStreamFromString(n))}getArrayFileProperty({property:t,record:e}){let n=this.context.getFileArrayValues({property:t,record:e});if(n==null)return g.TypeLiteral.nop();for(let i of n)return g.TypeLiteral.reference(this.context.getFileStreamFromString(i));return g.TypeLiteral.nop()}getBodyProperty({property:t,record:e}){let n=e[t.name.wireValue];return n==null?g.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:n})}};0&&(module.exports={FilePropertyMapper});
|
|
22
|
+
`)}};var N={};Se(N,{Access:()=>Ie,AstNode:()=>y,Class:()=>j,ClassInstantiation:()=>W,ClassReference:()=>x,CodeBlock:()=>V,Method:()=>J,MethodInvocation:()=>q,Parameter:()=>G,Type:()=>ee,TypeLiteral:()=>A,Writer:()=>Y,classReference:()=>Ur,class_:()=>_r,codeblock:()=>Br,instantiateClass:()=>Fr,invokeMethod:()=>Mr,method:()=>Pr,parameter:()=>Or});l();f();l();f();l();f();var Ie={Public:"public",Protected:"protected",Private:"private"};l();f();l();f();var y=class extends ${async toStringAsync({packageName:t,customConfig:e,formatter:r}){let i=new Q({packageName:t,customConfig:e,formatter:r});return this.write(i),i.toStringAsync()}toString({packageName:t,customConfig:e,formatter:r}){let i=new Q({packageName:t,customConfig:e,formatter:r});return this.write(i),i.toString()}};var j=class extends y{constructor({name:e,access:r}){super();c(this,"name");c(this,"access");c(this,"methods",[]);this.name=e,this.access=r}write(e){if(e.write(`${this.access} class ${this.name}`),this.isEmpty()){e.writeLine(" {}");return}e.writeLine(" {"),e.indent();for(let r of this.methods)e.writeNode(r),e.newLine();e.dedent(),e.write("}")}addMethod(e){this.methods.push(e)}isEmpty(){return this.methods.length===0}};l();f();l();f();l();f();l();f();var x=class extends y{constructor({name:e,packageName:r,fullyQualified:i}){super();c(this,"name");c(this,"packageName");c(this,"fullyQualified");this.name=e,this.packageName=r,this.fullyQualified=i!=null?i:!1}write(e){if(e.addImport(`${this.packageName}.${this.name}`),this.fullyQualified){e.write(`${this.packageName}.${this.name}`);return}e.write(this.name)}};l();f();var ee=class extends y{constructor(e){super();c(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"array":e.writeNode(this.internalType.value),e.write("[]");break;case"bigInteger":e.writeNode(wr);break;case"boolean":e.write("Boolean");break;case"bytes":e.write("byte[]");break;case"date":e.write("String");break;case"dateTime":e.writeNode(gr);break;case"double":e.write("Double");break;case"float":e.write("Float");break;case"generic":e.writeNode(this.internalType.value),e.write("<");for(let[r,i]of this.internalType.parameters.entries())e.writeNode(i),r<this.internalType.parameters.length-1&&e.write(", ");e.write(">");break;case"inputStream":e.writeNode(Nr);break;case"integer":e.write("Integer");break;case"iterable":this.writeIterable({writer:e,iterable:this.internalType});break;case"list":{this.writeList({writer:e,list:this.internalType});break}case"long":{e.write("Long");break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"object":{e.write("Object");break}case"optional":{this.writeOptional({writer:e,optional:this.internalType});break}case"reference":e.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:e,set:this.internalType});break}case"string":e.write("String");break;case"uuid":e.writeNode(Tr);break;case"void":e.write("Void");break;default:M(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static array(e){return new this({type:"array",value:e})}static bigInteger(){return new this({type:"bigInteger"})}static boolean(){return new this({type:"boolean"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static double(){return new this({type:"double"})}static float(){return new this({type:"float"})}static integer(){return new this({type:"integer"})}static list(e){return new this({type:"list",value:e})}static long(){return new this({type:"long"})}static map(e,r){return new this({type:"map",keyType:e,valueType:r})}static object(){return new this({type:"object"})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static reference(e){return new this({type:"reference",value:e})}static generic(e,r){return new this({type:"generic",value:e,parameters:r})}static set(e){return new this({type:"set",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static void(){return new this({type:"void"})}static iterable(e){return new this({type:"iterable",value:e})}static inputStream(){return new this({type:"inputStream"})}writeList({writer:e,list:r}){e.writeNode(dr),e.write("<"),r.value.write(e),e.write(">")}writeMap({writer:e,map:r}){e.writeNode(xr),e.write("<"),r.keyType.write(e),e.write(", "),r.valueType.write(e),e.write(">")}writeOptional({writer:e,optional:r}){e.writeNode(he),e.write("<"),r.value.write(e),e.write(">")}writeIterable({writer:e,iterable:r}){e.writeNode(he),e.write("<"),r.value.write(e),e.write(">")}writeSet({writer:e,set:r}){e.writeNode(yr),e.write("<"),r.value.write(e),e.write(">")}static isAlreadyOptional(e){return e.internalType.type==="optional"}},me=new x({name:"Arrays",packageName:"java.util"}),wr=new x({name:"BigInteger",packageName:"java.math"}),Ii=new x({name:"HashMap",packageName:"java.util"}),dr=new x({name:"List",packageName:"java.util"}),xr=new x({name:"Map",packageName:"java.util"}),gr=new x({name:"OffsetDateTime",packageName:"java.time"}),he=new x({name:"Optional",packageName:"java.util"}),yr=new x({name:"Set",packageName:"java.util"}),Tr=new x({name:"UUID",packageName:"java.util"}),Nr=new x({name:"InputStream",packageName:"java.io"});var A=class n extends y{constructor(e){super();c(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"bigInteger":this.writeBigInteger({writer:e,bigInteger:this.internalType});break;case"boolean":e.write(this.internalType.value.toString());break;case"builder":this.writeBuilder({writer:e,builder:this.internalType});break;case"bytes":e.write(`"${this.internalType.value}".getBytes()`);break;case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"date":e.write(`"${this.internalType.value}"`);break;case"dateTime":this.writeDateTime({writer:e,dateTime:this.internalType});break;case"double":{let r=this.internalType.value.toString();!r.includes(".")&&!r.includes("e")&&!r.includes("E")?e.write(`${r}.0`):e.write(r);break}case"enum":this.writeEnum({writer:e,enum_:this.internalType});break;case"float":e.write(`${this.internalType.value}f`);break;case"integer":e.write(Math.floor(this.internalType.value).toString());break;case"list":{this.writeList({writer:e,list:this.internalType});break}case"long":{e.write(`${Math.floor(this.internalType.value)}L`);break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"optional":{this.writeOptional({writer:e,optional:this.internalType});break}case"raw":{this.internalType.value instanceof y?e.writeNode(this.internalType.value):e.write(this.internalType.value);break}case"reference":e.writeNode(this.internalType.value);break;case"set":{this.writeSet({writer:e,set:this.internalType});break}case"string":e.write(`"${this.escapeString(this.internalType.value)}"`);break;case"unknown":this.writeUnknown({writer:e,value:this.internalType.value});break;case"uuid":this.writeUUID({writer:e,uuid:this.internalType});break;case"nop":break;default:M(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static bigInteger(e){return new this({type:"bigInteger",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static builder({classReference:e,parameters:r}){return new this({type:"builder",classReference:e,parameters:r})}static bytes(e){return new this({type:"bytes",value:e})}static class_({reference:e,parameters:r}){return new this({type:"class",reference:e,parameters:r})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static double(e){return new this({type:"double",value:e})}static enum_({classReference:e,value:r}){return new this({type:"enum",classReference:e,value:r})}static float(e){return new this({type:"float",value:e})}static integer(e){return new this({type:"integer",value:e})}static list({valueType:e,values:r,isParameter:i}){return new this({type:"list",valueType:e,values:r,isParameter:i})}static long(e){return new this({type:"long",value:e})}static map({keyType:e,valueType:r,entries:i}){return new this({type:"map",keyType:e,valueType:r,entries:i})}static optional({value:e,useOf:r}){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e,useOf:r})}static raw(e){return new this({type:"raw",value:e})}static reference(e){return new this({type:"reference",value:e})}static set({valueType:e,values:r}){return new this({type:"set",valueType:e,values:r})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static uuid(e){return new this({type:"uuid",value:e})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}shouldWriteInLine(){switch(this.internalType.type){case"bigInteger":case"boolean":case"bytes":case"date":case"dateTime":case"double":case"enum":case"float":case"integer":case"long":case"nop":case"raw":case"string":case"unknown":case"uuid":return!0;case"optional":return this.internalType.value.shouldWriteInLine();case"builder":case"class":case"list":case"map":case"reference":case"set":return!1;default:M(this.internalType)}}writeBigInteger({writer:e,bigInteger:r}){e.write("new "),e.writeNode(N.instantiateClass({classReference:kr,arguments_:[n.string(r.value)]}))}writeBuilder({writer:e,builder:r}){e.writeNode(r.classReference),e.writeNewLineIfLastLineNot(),e.indent(),this.writeBuilderParameters({writer:e,parameters:this.orderBuilderParameters(br({parameters:r.parameters}))}),e.dedent()}writeBuilderParameters({writer:e,parameters:r}){e.writeLine(".builder()");for(let i of r)e.write(`.${i.name}(`),i.value.shouldWriteInLine()||e.newLine(),e.indent(),e.writeNode(i.value),e.dedent(),i.value.shouldWriteInLine()||e.newLine(),e.writeLine(")");e.writeNewLineIfLastLineNot(),e.write(".build()")}orderBuilderParameters(e){return e.some(i=>!i.value.isOptional()&&!this.isCollection(i.value))?e.sort((i,o)=>{let a=this.isNonRequired(i.value),u=this.isNonRequired(o.value);return a&&!u?1:!a&&u?-1:0}):e.sort((i,o)=>{let a=i.value.isOptional(),u=o.value.isOptional();return a&&!u?1:!a&&u?-1:0})}isCollection(e){let r=e.internalType.type;return r==="list"||r==="set"||r==="map"}isNonRequired(e){return e.isOptional()||this.isCollection(e)}writeClass({writer:e,class_:r}){let i=Er({parameters:r.parameters});e.writeNode(N.instantiateClass({classReference:r.reference,arguments_:i.map(o=>o.value)}))}writeDateTime({writer:e,dateTime:r}){e.writeNode(N.invokeMethod({on:Ar,method:"parse",arguments_:[n.string(r.value)]}))}writeEnum({writer:e,enum_:r}){e.writeNode(r.classReference),e.write("."+r.value)}writeList({writer:e,list:r}){this.writeIterable({writer:e,iterable:r})}writeMap({writer:e,map:r}){let i=Sr({entries:r.entries});if(i.length===0){e.write("new "),e.writeNode(we),e.write("<"),e.writeNode(r.keyType),e.write(", "),e.writeNode(r.valueType),e.write(">()");return}e.write("new "),e.writeNode(we),e.write("<"),e.writeNode(r.keyType),e.write(", "),e.writeNode(r.valueType),e.writeLine(">() {{"),e.indent();for(let o of i)e.write("put("),e.writeNode(o.key),e.write(", "),e.writeNode(o.value),e.writeLine(");");e.dedent(),e.write("}}")}writeOptional({writer:e,optional:r}){if(!r.useOf){e.writeNode(r.value);return}e.writeNode(N.invokeMethod({on:he,method:"of",arguments_:[r.value]}))}writeSet({writer:e,set:r}){this.writeIterable({writer:e,iterable:r})}writeIterable({writer:e,iterable:r}){let i=r.type==="list"?Ee:vr,o=Rr({values:r.values});if(r.type==="list"&&r.isParameter&&o.length>0){e.writeNode(N.invokeMethod({on:me,method:"asList",arguments_:o}));return}if(o.length===0){e.write(`new ${i.name}<`),e.writeNode(r.valueType),e.write(">()");return}e.write("new "),e.writeNode(i),e.write("<"),e.writeNode(r.valueType),e.writeLine(">("),e.indent(),e.writeNode(N.invokeMethod({on:me,method:"asList",arguments_:o})),e.writeNewLineIfLastLineNot(),e.dedent(),e.write(")")}writeUnknown({writer:e,value:r}){switch(typeof r){case"boolean":e.write(r.toString());return;case"string":e.write(`"${this.escapeString(r)}"`);return;case"number":e.write(r.toString());return;case"object":if(r==null){e.write("null");return}if(Array.isArray(r)){this.writeUnknownArray({writer:e,value:r});return}this.writeUnknownMap({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeUnknownArray({writer:e,value:r}){if(r.length===0){e.write("new "),e.writeNode(Ee),e.write("<Object>()");return}e.write("new "),e.writeNode(Ee),e.write("<Object>("),e.writeNode(N.invokeMethod({on:me,method:"asList",arguments_:r.map(i=>n.unknown(i))})),e.write(")")}writeUnknownMap({writer:e,value:r}){let i=Object.entries(r);if(i.length===0){e.write("new "),e.writeNode(we),e.write("<String, Object>()");return}e.writeLine("new "),e.writeNode(we),e.write("<String, Object>() {{"),e.indent();for(let[o,a]of i)e.write(`put("${o}", `),e.writeNode(n.unknown(a)),e.writeLine(");");e.dedent(),e.write("}}")}writeUUID({writer:e,uuid:r}){e.writeNode(N.invokeMethod({on:Ir,method:"fromString",arguments_:[n.string(r.value)]}))}escapeString(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}static isAlreadyOptional(e){return e.internalType.type==="optional"}},Ee=new x({name:"ArrayList",packageName:"java.util"}),kr=new x({name:"BigInteger",packageName:"java.math"}),we=new x({name:"HashMap",packageName:"java.util"}),vr=new x({name:"HashSet",packageName:"java.util"}),Fi=new x({name:"List",packageName:"java.util"}),Mi=new x({name:"Map",packageName:"java.util"}),Ar=new x({name:"OffsetDateTime",packageName:"java.time"}),Pi=new x({name:"Set",packageName:"java.util"}),Ir=new x({name:"UUID",packageName:"java.util"});function Er({parameters:n}){return n.filter(t=>!A.isNop(t.value))}function br({parameters:n}){return n.filter(t=>!A.isNop(t.value))}function Sr({entries:n}){return n.filter(t=>!A.isNop(t.key)&&!A.isNop(t.value))}function Rr({values:n}){return n.filter(t=>!A.isNop(t))}function de({writer:n,arguments_:t}){let e=Cr(t);if(e.length===0){n.write("()");return}if(e.some(i=>i instanceof A&&!i.shouldWriteInLine())){Lr({writer:n,arguments_:e});return}n.write("("),e.forEach((i,o)=>{o>0&&n.write(", "),rt({writer:n,argument:i})}),n.write(")")}function Lr({writer:n,arguments_:t}){n.writeLine("("),n.indent(),t.forEach((e,r)=>{r>0&&n.writeLine(","),rt({writer:n,argument:e})}),n.dedent(),t.length>0&&n.newLine(),n.write(")")}function rt({writer:n,argument:t}){Ae(t)?n.writeNodeOrString(t.assignment):t.write(n)}function Cr(n){return n.filter(t=>!(t instanceof A&&A.isNop(t)))}var W=class extends y{constructor({classReference:e,arguments_:r}){super();c(this,"classReference");c(this,"arguments_");this.classReference=e,this.arguments_=r}write(e){e.writeNode(this.classReference),de({writer:e,arguments_:this.arguments_})}};l();f();var V=class extends y{constructor(e){super();c(this,"arg");this.arg=e}write(e){return new E(this.arg).write(e)}};l();f();var J=class extends y{constructor({name:e,access:r,parameters:i,body:o,static_:a,return_:u}){super();c(this,"name");c(this,"access");c(this,"parameters");c(this,"body");c(this,"return_");c(this,"static_");this.name=e,this.access=r,this.parameters=i,this.body=o,this.return_=u,this.static_=a!=null?a:!1}write(e){if(e.write(`${this.access} `),this.static_&&e.write("static "),this.return_!=null?e.writeNode(this.return_):e.write("void"),e.write(` ${this.name}`),this.parameters.length===0)e.write("()");else if(this.parameters.length===1){if(e.write("("),this.parameters[0]==null)throw new Error("Cannot render parameter "+this.parameters[0]);e.writeNode(this.parameters[0]),e.write(")")}else e.writeLine("("),e.indent(),this.parameters.forEach((r,i)=>{i>0&&e.writeLine(", "),e.writeNode(r)}),e.dedent(),e.write(")");if(this.body==null){e.write(";");return}e.writeLine(" {"),e.indent(),e.writeNode(this.body),e.writeNewLineIfLastLineNot(),e.dedent(),e.write("}")}};l();f();var q=class extends y{constructor({method:e,arguments_:r,on:i}){super();c(this,"on");c(this,"method");c(this,"arguments_");this.on=i,this.method=e,this.arguments_=r}write(e){this.on.write(e),e.write("."),e.write(this.method),de({writer:e,arguments_:this.arguments_})}};l();f();var G=class extends y{constructor({name:e,type:r}){super();c(this,"name");c(this,"type");this.name=e,this.type=r}write(e){e.writeNode(this.type),e.write(` ${this.name}`)}};function Br(n){return new V(n)}function _r(n){return new j(n)}function Ur(n){return new x(n)}function Fr(n){return new W(n)}function Mr(n){return new q(n)}function Pr(n){return new J(n)}function Or(n){return new G(n)}var be=class{constructor({context:t}){c(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let r={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(e))!=null?o:{};for(let a of t.properties)switch(a.type){case"file":r.fileFields.push({name:this.context.getMethodName(a.name),value:this.getSingleFileProperty({property:a,record:i})});break;case"fileArray":r.fileFields.push({name:this.context.getMethodName(a.name),value:this.getArrayFileProperty({property:a,record:i})});break;case"bodyProperty":r.bodyPropertyFields.push({name:this.context.getMethodName(a.name.name),value:this.getBodyProperty({property:a,record:i})});break;default:M(a)}return r}getSingleFileProperty({property:t,record:e}){let r=this.context.getSingleFileValue({property:t,record:e});return r==null?N.TypeLiteral.nop():N.TypeLiteral.reference(this.context.getFileStreamFromString(r))}getArrayFileProperty({property:t,record:e}){let r=this.context.getFileArrayValues({property:t,record:e});if(r==null)return N.TypeLiteral.nop();for(let i of r)return N.TypeLiteral.reference(this.context.getFileStreamFromString(i));return N.TypeLiteral.nop()}getBodyProperty({property:t,record:e}){let r=e[t.name.wireValue];return r==null?N.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:r})}};0&&(module.exports={FilePropertyMapper});
|
|
20
23
|
/*! Bundled license information:
|
|
21
24
|
|
|
22
25
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|