@fern-api/swift-dynamic-snippets 0.1.1 → 0.25.4

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.
Files changed (95) hide show
  1. package/dist/index.cjs +39 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +145 -0
  4. package/dist/index.d.ts +145 -0
  5. package/dist/index.js +39 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +11 -12
  8. package/cjs/Config.cjs +0 -12
  9. package/cjs/Config.cjs.map +0 -1
  10. package/cjs/Config.d.cts +0 -4
  11. package/cjs/DynamicSnippetsGenerator.cjs +0 -41
  12. package/cjs/DynamicSnippetsGenerator.cjs.map +0 -1
  13. package/cjs/DynamicSnippetsGenerator.d.cts +0 -18
  14. package/cjs/EndpointSnippetGenerator.cjs +0 -41
  15. package/cjs/EndpointSnippetGenerator.cjs.map +0 -1
  16. package/cjs/EndpointSnippetGenerator.d.cts +0 -54
  17. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +0 -41
  18. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +0 -1
  19. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +0 -4
  20. package/cjs/context/DynamicTypeLiteralMapper.cjs +0 -41
  21. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +0 -1
  22. package/cjs/context/DynamicTypeLiteralMapper.d.cts +0 -4
  23. package/cjs/context/DynamicTypeMapper.cjs +0 -41
  24. package/cjs/context/DynamicTypeMapper.cjs.map +0 -1
  25. package/cjs/context/DynamicTypeMapper.d.cts +0 -4
  26. package/cjs/context/FilePropertyMapper.cjs +0 -41
  27. package/cjs/context/FilePropertyMapper.cjs.map +0 -1
  28. package/cjs/context/FilePropertyMapper.d.cts +0 -4
  29. package/cjs/context/index.cjs +0 -41
  30. package/cjs/context/index.cjs.map +0 -1
  31. package/cjs/context/index.d.cts +0 -4
  32. package/cjs/index-DS-GXEiz.d.cts +0 -89
  33. package/cjs/index.cjs +0 -53
  34. package/cjs/index.cjs.map +0 -1
  35. package/cjs/index.d.cts +0 -7
  36. package/cjs/util/pascal-case.cjs +0 -23
  37. package/cjs/util/pascal-case.cjs.map +0 -1
  38. package/cjs/util/pascal-case.d.cts +0 -3
  39. package/esm/Config.d.ts +0 -4
  40. package/esm/Config.js +0 -2
  41. package/esm/Config.js.map +0 -1
  42. package/esm/DynamicSnippetsGenerator.d.ts +0 -18
  43. package/esm/DynamicSnippetsGenerator.js +0 -2
  44. package/esm/DynamicSnippetsGenerator.js.map +0 -1
  45. package/esm/EndpointSnippetGenerator.d.ts +0 -54
  46. package/esm/EndpointSnippetGenerator.js +0 -2
  47. package/esm/EndpointSnippetGenerator.js.map +0 -1
  48. package/esm/chunk-2M2RBZK2.js +0 -2
  49. package/esm/chunk-2M2RBZK2.js.map +0 -1
  50. package/esm/chunk-6DFEQNIA.js +0 -2
  51. package/esm/chunk-6DFEQNIA.js.map +0 -1
  52. package/esm/chunk-7RC2HH3P.js +0 -2
  53. package/esm/chunk-7RC2HH3P.js.map +0 -1
  54. package/esm/chunk-FX6IFKZ7.js +0 -2
  55. package/esm/chunk-FX6IFKZ7.js.map +0 -1
  56. package/esm/chunk-HTU5V5TT.js +0 -2
  57. package/esm/chunk-HTU5V5TT.js.map +0 -1
  58. package/esm/chunk-IHG2VZKL.js +0 -2
  59. package/esm/chunk-IHG2VZKL.js.map +0 -1
  60. package/esm/chunk-JFTYS7SI.js +0 -20
  61. package/esm/chunk-JFTYS7SI.js.map +0 -1
  62. package/esm/chunk-KIHSBETU.js +0 -2
  63. package/esm/chunk-KIHSBETU.js.map +0 -1
  64. package/esm/chunk-PJTPV2D6.js +0 -15
  65. package/esm/chunk-PJTPV2D6.js.map +0 -1
  66. package/esm/chunk-PYMG6Y4R.js +0 -12
  67. package/esm/chunk-PYMG6Y4R.js.map +0 -1
  68. package/esm/chunk-WG3NZOM6.js +0 -2
  69. package/esm/chunk-WG3NZOM6.js.map +0 -1
  70. package/esm/chunk-WXHVUJ6D.js +0 -2
  71. package/esm/chunk-WXHVUJ6D.js.map +0 -1
  72. package/esm/chunk-ZIQ5ITTV.js +0 -2
  73. package/esm/chunk-ZIQ5ITTV.js.map +0 -1
  74. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +0 -4
  75. package/esm/context/DynamicSnippetsGeneratorContext.js +0 -2
  76. package/esm/context/DynamicSnippetsGeneratorContext.js.map +0 -1
  77. package/esm/context/DynamicTypeLiteralMapper.d.ts +0 -4
  78. package/esm/context/DynamicTypeLiteralMapper.js +0 -2
  79. package/esm/context/DynamicTypeLiteralMapper.js.map +0 -1
  80. package/esm/context/DynamicTypeMapper.d.ts +0 -4
  81. package/esm/context/DynamicTypeMapper.js +0 -2
  82. package/esm/context/DynamicTypeMapper.js.map +0 -1
  83. package/esm/context/FilePropertyMapper.d.ts +0 -4
  84. package/esm/context/FilePropertyMapper.js +0 -2
  85. package/esm/context/FilePropertyMapper.js.map +0 -1
  86. package/esm/context/index.d.ts +0 -4
  87. package/esm/context/index.js +0 -2
  88. package/esm/context/index.js.map +0 -1
  89. package/esm/index-DS-GXEiz.d.ts +0 -89
  90. package/esm/index.d.ts +0 -7
  91. package/esm/index.js +0 -14
  92. package/esm/index.js.map +0 -1
  93. package/esm/util/pascal-case.d.ts +0 -3
  94. package/esm/util/pascal-case.js +0 -2
  95. package/esm/util/pascal-case.js.map +0 -1
@@ -1,4 +0,0 @@
1
- import '@fern-api/dynamic-ir-sdk';
2
- import '@fern-api/swift-codegen';
3
- export { b as DynamicTypeMapper } from '../index-DS-GXEiz.cjs';
4
- import '@fern-api/browser-compatible-base-generator';
@@ -1,41 +0,0 @@
1
- "use strict";var xe=Object.defineProperty;var Ar=Object.getOwnPropertyDescriptor;var Lr=Object.getOwnPropertyNames,He=Object.getOwnPropertySymbols;var Qe=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable;var Ye=(r,t,e)=>t in r?xe(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,b=(r,t)=>{for(var e in t||(t={}))Qe.call(t,e)&&Ye(r,e,t[e]);if(He)for(var e of He(t))kr.call(t,e)&&Ye(r,e,t[e]);return r};var _e=(r,t)=>()=>(r&&(t=r(r=0)),t);var Xe=(r,t)=>{for(var e in t)xe(r,e,{get:t[e],enumerable:!0})},Rr=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Lr(t))!Qe.call(r,i)&&i!==e&&xe(r,i,{get:()=>t[i],enumerable:!(n=Ar(t,i))||n.enumerable});return r};var Br=r=>Rr(xe({},"__esModule",{value:!0}),r);var f=(r,t,e)=>Ye(r,typeof t!="symbol"?t+"":t,e);function tt(){throw new Error("setTimeout has not been defined")}function rt(){throw new Error("clearTimeout has not been defined")}function nt(r){if(Y===setTimeout)return setTimeout(r,0);if((Y===tt||!Y)&&setTimeout)return Y=setTimeout,setTimeout(r,0);try{return Y(r,0)}catch(t){try{return Y.call(null,r,0)}catch(e){return Y.call(this,r,0)}}}function Cr(r){if(_===clearTimeout)return clearTimeout(r);if((_===rt||!_)&&clearTimeout)return _=clearTimeout,clearTimeout(r);try{return _(r)}catch(t){try{return _.call(null,r)}catch(e){return _.call(this,r)}}}function Mr(){!Z||!j||(Z=!1,j.length?D=j.concat(D):ye=-1,D.length&&it())}function it(){if(!Z){var r=nt(Mr);Z=!0;for(var t=D.length;t;){for(j=D,D=[];++ye<t;)j&&j[ye].run();ye=-1,t=D.length}j=null,Z=!1,Cr(r)}}function Ur(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];D.push(new at(r,t)),D.length===1&&!Z&&nt(it)}function at(r,t){this.fun=r,this.array=t}function z(){}function Hr(r){throw new Error("process.binding is not supported")}function Qr(){return"/"}function Xr(r){throw new Error("process.chdir is not supported")}function en(){return 0}function rn(r){var t=tn.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 an(){var r=new Date,t=r-nn;return t/1e3}var Y,_,D,Z,j,ye,Or,Dr,Fr,Pr,Wr,Yr,_r,$r,jr,zr,qr,Vr,Kr,Gr,Jr,Zr,J,tn,nn,m,et,l=_e(()=>{"use strict";Y=tt,_=rt;typeof globalThis.setTimeout=="function"&&(Y=setTimeout);typeof globalThis.clearTimeout=="function"&&(_=clearTimeout);D=[],Z=!1,ye=-1;at.prototype.run=function(){this.fun.apply(null,this.array)};Or="browser",Dr="browser",Fr=!0,Pr={},Wr=[],Yr="",_r={},$r={},jr={};zr=z,qr=z,Vr=z,Kr=z,Gr=z,Jr=z,Zr=z;J=globalThis.performance||{},tn=J.now||J.mozNow||J.msNow||J.oNow||J.webkitNow||function(){return new Date().getTime()};nn=new Date;m={nextTick:Ur,title:Or,browser:Fr,env:Pr,argv:Wr,version:Yr,versions:_r,on:zr,addListener:qr,once:Vr,off:Kr,removeListener:Gr,removeAllListeners:Jr,emit:Zr,binding:Hr,cwd:Qr,chdir:Xr,umask:en,hrtime:rn,platform:Dr,release:$r,config:jr,uptime:an},et={};Object.keys(et).forEach(r=>{let t=r.split("."),e=m;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=et[r]:e=e[i]||(e[i]={})}})});function ut(){je=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)M[t]=r[t],L[r.charCodeAt(t)]=t;L[45]=62,L[95]=63}function sn(r){je||ut();var t,e,n,i,o,a,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,a=new on(p*3/4-o),n=o>0?p-4:p;var c=0;for(t=0,e=0;t<n;t+=4,e+=3)i=L[r.charCodeAt(t)]<<18|L[r.charCodeAt(t+1)]<<12|L[r.charCodeAt(t+2)]<<6|L[r.charCodeAt(t+3)],a[c++]=i>>16&255,a[c++]=i>>8&255,a[c++]=i&255;return o===2?(i=L[r.charCodeAt(t)]<<2|L[r.charCodeAt(t+1)]>>4,a[c++]=i&255):o===1&&(i=L[r.charCodeAt(t)]<<10|L[r.charCodeAt(t+1)]<<4|L[r.charCodeAt(t+2)]>>2,a[c++]=i>>8&255,a[c++]=i&255),a}function ln(r){return M[r>>18&63]+M[r>>12&63]+M[r>>6&63]+M[r&63]}function un(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(ln(n));return i.join("")}function ot(r){je||ut();for(var t,e=r.length,n=e%3,i="",o=[],a=16383,p=0,c=e-n;p<c;p+=a)o.push(un(r,p,p+a>c?c:p+a));return n===1?(t=r[e-1],i+=M[t>>2],i+=M[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=M[t>>10],i+=M[t>>4&63],i+=M[t<<2&63],i+="="),o.push(i),o.join("")}function we(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function F(r,t){if(we()<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 ze(this,r)}return ft(this,r,t,e)}function ft(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?cn(r,t,e,n):typeof t=="string"?pn(r,t,e):mn(r,t)}function pt(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 fn(r,t,e,n){return pt(t),t<=0?F(r,t):e!==void 0?typeof n=="string"?F(r,t).fill(e,n):F(r,t).fill(e):F(r,t)}function ze(r,t){if(pt(t),r=F(r,t<0?0:qe(t)|0),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function pn(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=ct(t,e)|0;r=F(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function $e(r,t){var e=t.length<0?0:qe(t.length)|0;r=F(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function cn(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=$e(r,t),r}function mn(r,t){if(U(t)){var e=qe(t.length)|0;return r=F(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"||Cn(t.length)?F(r,0):$e(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return $e(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function qe(r){if(r>=we())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+we().toString(16)+" bytes");return r|0}function U(r){return!!(r!=null&&r._isBuffer)}function ct(r,t){if(U(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 ge(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return gt(r).length;default:if(n)return ge(r).length;t=(""+t).toLowerCase(),n=!0}}function dn(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 En(this,t,e);case"utf8":case"utf-8":return ht(this,t,e);case"ascii":return Sn(this,t,e);case"latin1":case"binary":return vn(this,t,e);case"base64":return bn(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nn(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function q(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function mt(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)),U(t))return t.length===0?-1:st(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):st(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function st(r,t,e,n,i){var o=1,a=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,a/=2,p/=2,e/=2}function c(A,G){return o===1?A[G]:A.readUInt16BE(G*o)}var d;if(i){var x=-1;for(d=e;d<a;d++)if(c(r,d)===c(t,x===-1?0:d-x)){if(x===-1&&(x=d),d-x+1===p)return x*o}else x!==-1&&(d-=d-x),x=-1}else for(e+p>a&&(e=a-p),d=e;d>=0;d--){for(var w=!0,R=0;R<p;R++)if(c(r,d+R)!==c(t,R)){w=!1;break}if(w)return d}return-1}function hn(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 p=parseInt(t.substr(a*2,2),16);if(isNaN(p))return a;r[e+a]=p}return a}function xn(r,t,e,n){return Se(ge(t,r.length-e),r,e,n)}function dt(r,t,e,n){return Se(Rn(t),r,e,n)}function yn(r,t,e,n){return dt(r,t,e,n)}function wn(r,t,e,n){return Se(gt(t),r,e,n)}function gn(r,t,e,n){return Se(Bn(t,r.length-e),r,e,n)}function bn(r,t,e){return t===0&&e===r.length?ot(r):ot(r.slice(t,e))}function ht(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],a=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var c,d,x,w;switch(p){case 1:o<128&&(a=o);break;case 2:c=r[i+1],(c&192)===128&&(w=(o&31)<<6|c&63,w>127&&(a=w));break;case 3:c=r[i+1],d=r[i+2],(c&192)===128&&(d&192)===128&&(w=(o&15)<<12|(c&63)<<6|d&63,w>2047&&(w<55296||w>57343)&&(a=w));break;case 4:c=r[i+1],d=r[i+2],x=r[i+3],(c&192)===128&&(d&192)===128&&(x&192)===128&&(w=(o&15)<<18|(c&63)<<12|(d&63)<<6|x&63,w>65535&&w<1114112&&(a=w))}}a===null?(a=65533,p=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=p}return Tn(n)}function Tn(r){var t=r.length;if(t<=lt)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=lt));return e}function Sn(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 vn(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 En(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+=kn(r[o]);return i}function Nn(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 T(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 N(r,t,e,n,i,o){if(!U(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 be(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 Te(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 xt(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 yt(r,t,e,n,i){return i||xt(r,t,e,4,34028234663852886e22,-34028234663852886e22),Tt(r,t,e,n,23,4),e+4}function wt(r,t,e,n,i){return i||xt(r,t,e,8,17976931348623157e292,-17976931348623157e292),Tt(r,t,e,n,52,8),e+8}function An(r){if(r=Ln(r).replace(In,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Ln(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function kn(r){return r<16?"0"+r.toString(16):r.toString(16)}function ge(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 Rn(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Bn(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 gt(r){return sn(An(r))}function Se(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 Cn(r){return r!==r}function Mn(r){return r!=null&&(!!r._isBuffer||bt(r)||Un(r))}function bt(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Un(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&bt(r.slice(0,0))}function ve(r,t,e,n,i){var o,a,p=i*8-n-1,c=(1<<p)-1,d=c>>1,x=-7,w=e?i-1:0,R=e?-1:1,A=r[t+w];for(w+=R,o=A&(1<<-x)-1,A>>=-x,x+=p;x>0;o=o*256+r[t+w],w+=R,x-=8);for(a=o&(1<<-x)-1,o>>=-x,x+=n;x>0;a=a*256+r[t+w],w+=R,x-=8);if(o===0)o=1-d;else{if(o===c)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-d}return(A?-1:1)*a*Math.pow(2,o-n)}function Tt(r,t,e,n,i,o){var a,p,c,d=o*8-i-1,x=(1<<d)-1,w=x>>1,R=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=n?0:o-1,G=n?1:-1,Ir=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,a=x):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+w>=1?t+=R/c:t+=R*Math.pow(2,1-w),t*c>=2&&(a++,c/=2),a+w>=x?(p=0,a=x):a+w>=1?(p=(t*c-1)*Math.pow(2,i),a=a+w):(p=t*Math.pow(2,w-1)*Math.pow(2,i),a=0));i>=8;r[e+A]=p&255,A+=G,p/=256,i-=8);for(a=a<<i|p,d+=i;d>0;r[e+A]=a&255,A+=G,a/=256,d-=8);r[e+A-G]|=Ir*128}var M,L,on,je,lt,In,St=_e(()=>{"use strict";l();u();M=[],L=[],on=typeof Uint8Array!="undefined"?Uint8Array:Array,je=!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 ft(null,r,t,e)};s.kMaxLength=we();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 fn(null,r,t,e)};s.allocUnsafe=function(r){return ze(null,r)};s.allocUnsafeSlow=function(r){return ze(null,r)};s.isBuffer=Mn;s.compare=function(t,e){if(!U(t)||!U(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(!U(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i};s.byteLength=ct;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)q(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)q(this,e,e+3),q(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)q(this,e,e+7),q(this,e+1,e+6),q(this,e+2,e+5),q(this,e+3,e+4);return this};s.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?ht(this,0,t):dn.apply(this,arguments)};s.prototype.equals=function(t){if(!U(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(!U(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,p=n-e,c=Math.min(a,p),d=this.slice(i,o),x=t.slice(e,n),w=0;w<c;++w)if(d[w]!==x[w]){a=d[w],p=x[w];break}return a<p?-1:p<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 mt(this,t,e,n,!0)};s.prototype.lastIndexOf=function(t,e,n){return mt(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 hn(this,t,e,n);case"utf8":case"utf-8":return xn(this,t,e,n);case"ascii":return dt(this,t,e,n);case"latin1":case"binary":return yn(this,t,e,n);case"base64":return wn(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gn(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)}};lt=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||T(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||T(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||T(t,1,this.length),this[t]};s.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8};s.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]};s.prototype.readUInt32LE=function(t,e){return e||T(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||T(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||T(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||T(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||T(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};s.prototype.readInt16LE=function(t,e){e||T(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||T(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||T(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||T(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||T(t,4,this.length),ve(this,t,!0,23,4)};s.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),ve(this,t,!1,23,4)};s.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),ve(this,t,!0,52,8)};s.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),ve(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;N(this,t,e,n,o,0)}var a=1,p=0;for(this[e]=t&255;++p<n&&(a*=256);)this[e+p]=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;N(this,t,e,n,o,0)}var a=n-1,p=1;for(this[e+a]=t&255;--a>=0&&(p*=256);)this[e+a]=t/p&255;return e+n};s.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||N(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||N(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):be(this,t,e,!0),e+2};s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):be(this,t,e,!1),e+2};s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||N(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):Te(this,t,e,!0),e+4};s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||N(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):Te(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);N(this,t,e,n,o-1,-o)}var a=0,p=1,c=0;for(this[e]=t&255;++a<n&&(p*=256);)t<0&&c===0&&this[e+a-1]!==0&&(c=1),this[e+a]=(t/p>>0)-c&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);N(this,t,e,n,o-1,-o)}var a=n-1,p=1,c=0;for(this[e+a]=t&255;--a>=0&&(p*=256);)t<0&&c===0&&this[e+a+1]!==0&&(c=1),this[e+a]=(t/p>>0)-c&255;return e+n};s.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||N(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||N(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):be(this,t,e,!0),e+2};s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||N(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):be(this,t,e,!1),e+2};s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||N(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):Te(this,t,e,!0),e+4};s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||N(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):Te(this,t,e,!1),e+4};s.prototype.writeFloatLE=function(t,e,n){return yt(this,t,e,!0,n)};s.prototype.writeFloatBE=function(t,e,n){return yt(this,t,e,!1,n)};s.prototype.writeDoubleLE=function(t,e,n){return wt(this,t,e,!0,n)};s.prototype.writeDoubleBE=function(t,e,n){return wt(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 p=U(t)?t:ge(new s(t,i).toString()),c=p.length;for(a=0;a<n-e;++a)this[a+e]=p[a%c]}return this};In=/[^+\/0-9A-Za-z-_]/g});var u=_e(()=>{"use strict";St()});var Pa={};Xe(Pa,{FilePropertyMapper:()=>Ze});module.exports=Br(Pa);l();u();l();u();l();u();function Ee(r,t){if(r===void 0)throw new Error(t!=null?t:"Expected value to be defined but got undefined.")}function k(r,t){if(r===null)throw new Error(t!=null?t:"Expected value to be non-null but got null.")}function S(r){throw new Error("Unexpected value: "+JSON.stringify(r))}l();u();l();u();l();u();l();u();l();u();l();u();var On=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,vt=On;var Dn=typeof self=="object"&&self&&self.Object===Object&&self,Fn=vt||Dn||Function("return this")(),Et=Fn;var Pn=Et.Symbol,P=Pn;l();u();var Nt=Object.prototype,Wn=Nt.hasOwnProperty,Yn=Nt.toString,ce=P?P.toStringTag:void 0;function _n(r){var t=Wn.call(r,ce),e=r[ce];try{r[ce]=void 0;var n=!0}catch(o){}var i=Yn.call(r);return n&&(t?r[ce]=e:delete r[ce]),i}var It=_n;l();u();var $n=Object.prototype,jn=$n.toString;function zn(r){return jn.call(r)}var At=zn;var qn="[object Null]",Vn="[object Undefined]",Lt=P?P.toStringTag:void 0;function Kn(r){return r==null?r===void 0?Vn:qn:Lt&&Lt in Object(r)?It(r):At(r)}var kt=Kn;l();u();function Gn(r){return r!=null&&typeof r=="object"}var Rt=Gn;var Jn="[object Symbol]";function Zn(r){return typeof r=="symbol"||Rt(r)&&kt(r)==Jn}var Bt=Zn;l();u();l();u();function Hn(r,t){for(var e=-1,n=r==null?0:r.length,i=Array(n);++e<n;)i[e]=t(r[e],e,r);return i}var Ct=Hn;l();u();var Qn=Array.isArray,Mt=Qn;var Xn=1/0,Ut=P?P.prototype:void 0,Ot=Ut?Ut.toString:void 0;function Dt(r){if(typeof r=="string")return r;if(Mt(r))return Ct(r,Dt)+"";if(Bt(r))return Ot?Ot.call(r):"";var t=r+"";return t=="0"&&1/r==-Xn?"-0":t}var Ft=Dt;l();u();function ei(r){return r==null?"":Ft(r)}var $=ei;l();u();l();u();l();u();l();u();l();u();l();u();function ti(r,t,e){var n=-1,i=r.length;t<0&&(t=-t>i?0:i+t),e=e>i?i:e,e<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=r[n+t];return o}var Pt=ti;function ri(r,t,e){var n=r.length;return e=e===void 0?n:e,!t&&e>=n?r:Pt(r,t,e)}var Wt=ri;l();u();var ni="\\ud800-\\udfff",ii="\\u0300-\\u036f",ai="\\ufe20-\\ufe2f",oi="\\u20d0-\\u20ff",si=ii+ai+oi,li="\\ufe0e\\ufe0f",ui="\\u200d",fi=RegExp("["+ui+ni+si+li+"]");function pi(r){return fi.test(r)}var Ne=pi;l();u();l();u();function ci(r){return r.split("")}var Yt=ci;l();u();var _t="\\ud800-\\udfff",mi="\\u0300-\\u036f",di="\\ufe20-\\ufe2f",hi="\\u20d0-\\u20ff",xi=mi+di+hi,yi="\\ufe0e\\ufe0f",wi="["+_t+"]",Ve="["+xi+"]",Ke="\\ud83c[\\udffb-\\udfff]",gi="(?:"+Ve+"|"+Ke+")",$t="[^"+_t+"]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",zt="[\\ud800-\\udbff][\\udc00-\\udfff]",bi="\\u200d",qt=gi+"?",Vt="["+yi+"]?",Ti="(?:"+bi+"(?:"+[$t,jt,zt].join("|")+")"+Vt+qt+")*",Si=Vt+qt+Ti,vi="(?:"+[$t+Ve+"?",Ve,jt,zt,wi].join("|")+")",Ei=RegExp(Ke+"(?="+Ke+")|"+vi+Si,"g");function Ni(r){return r.match(Ei)||[]}var Kt=Ni;function Ii(r){return Ne(r)?Kt(r):Yt(r)}var Gt=Ii;function Ai(r){return function(t){t=$(t);var e=Ne(t)?Gt(t):void 0,n=e?e[0]:t.charAt(0),i=e?Wt(e,1).join(""):t.slice(1);return n[r]()+i}}var Ie=Ai;var Li=Ie("toUpperCase"),W=Li;function ki(r){return W($(r).toLowerCase())}var Jt=ki;l();u();l();u();function Ri(r,t,e,n){var i=-1,o=r==null?0:r.length;for(n&&o&&(e=r[++i]);++i<o;)e=t(e,r[i],i,r);return e}var Zt=Ri;l();u();l();u();l();u();function Bi(r){return function(t){return r==null?void 0:r[t]}}var Ht=Bi;var Ci={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Mi=Ht(Ci),Qt=Mi;var Ui=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Oi="\\u0300-\\u036f",Di="\\ufe20-\\ufe2f",Fi="\\u20d0-\\u20ff",Pi=Oi+Di+Fi,Wi="["+Pi+"]",Yi=RegExp(Wi,"g");function _i(r){return r=$(r),r&&r.replace(Ui,Qt).replace(Yi,"")}var Xt=_i;l();u();l();u();var $i=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function ji(r){return r.match($i)||[]}var er=ji;l();u();var zi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function qi(r){return zi.test(r)}var tr=qi;l();u();var or="\\ud800-\\udfff",Vi="\\u0300-\\u036f",Ki="\\ufe20-\\ufe2f",Gi="\\u20d0-\\u20ff",Ji=Vi+Ki+Gi,sr="\\u2700-\\u27bf",lr="a-z\\xdf-\\xf6\\xf8-\\xff",Zi="\\xac\\xb1\\xd7\\xf7",Hi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Qi="\\u2000-\\u206f",Xi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ur="A-Z\\xc0-\\xd6\\xd8-\\xde",ea="\\ufe0e\\ufe0f",fr=Zi+Hi+Qi+Xi,pr="['\u2019]",rr="["+fr+"]",ta="["+Ji+"]",cr="\\d+",ra="["+sr+"]",mr="["+lr+"]",dr="[^"+or+fr+cr+sr+lr+ur+"]",na="\\ud83c[\\udffb-\\udfff]",ia="(?:"+ta+"|"+na+")",aa="[^"+or+"]",hr="(?:\\ud83c[\\udde6-\\uddff]){2}",xr="[\\ud800-\\udbff][\\udc00-\\udfff]",H="["+ur+"]",oa="\\u200d",nr="(?:"+mr+"|"+dr+")",sa="(?:"+H+"|"+dr+")",ir="(?:"+pr+"(?:d|ll|m|re|s|t|ve))?",ar="(?:"+pr+"(?:D|LL|M|RE|S|T|VE))?",yr=ia+"?",wr="["+ea+"]?",la="(?:"+oa+"(?:"+[aa,hr,xr].join("|")+")"+wr+yr+")*",ua="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fa="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pa=wr+yr+la,ca="(?:"+[ra,hr,xr].join("|")+")"+pa,ma=RegExp([H+"?"+mr+"+"+ir+"(?="+[rr,H,"$"].join("|")+")",sa+"+"+ar+"(?="+[rr,H+nr,"$"].join("|")+")",H+"?"+nr+"+"+ir,H+"+"+ar,fa,ua,cr,ca].join("|"),"g");function da(r){return r.match(ma)||[]}var gr=da;function ha(r,t,e){return r=$(r),t=e?void 0:t,t===void 0?tr(r)?gr(r):er(r):r.match(t)||[]}var br=ha;var xa="['\u2019]",ya=RegExp(xa,"g");function wa(r){return function(t){return Zt(br(Xt(t).replace(ya,"")),r,"")}}var Tr=wa;var ga=Tr(function(r,t,e){return t=t.toLowerCase(),r+(e?Jt(t):t)}),Ge=ga;l();u();var ba=Ie("toLowerCase"),Ae=ba;l();u();function Je(){}l();u();function Le(r){return Object.values(r)}l();u();var E={};Xe(E,{AccessLevel:()=>Sr,Class:()=>Q,CodeBlock:()=>v,Comment:()=>X,ComputedProperty:()=>te,DeclarationType:()=>de,DocComment:()=>re,EnumWithAssociatedValues:()=>ne,EnumWithRawValues:()=>ie,Expression:()=>O,Extension:()=>ae,FunctionArgument:()=>oe,FunctionParameter:()=>se,Initializer:()=>le,LineBreak:()=>Be,Method:()=>ue,Pattern:()=>Ce,Property:()=>fe,Protocol:()=>Nr,Statement:()=>ee,Struct:()=>pe,Symbol:()=>g,SymbolRegistry:()=>We,Type:()=>Ue,TypeReference:()=>Oe,class_:()=>Ea,codeBlock:()=>Na,comment:()=>Ia,computedProperty:()=>Aa,docComment:()=>La,enumWithAssociatedValues:()=>ka,enumWithRawValues:()=>Ra,extension:()=>Ba,functionArgument:()=>Ca,functionParameter:()=>Ma,initializer:()=>Ua,method:()=>Oa,property:()=>Da,struct:()=>Fa});l();u();l();u();l();u();var Sr={Open:"open",Public:"public",Package:"package",Internal:"internal",Fileprivate:"fileprivate",Private:"private"};l();u();l();u();l();u();l();u();l();u();var V=class{};l();u();l();u();var B=class extends V{constructor(e){super();f(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 Ta=4,vr=!!m.env.FERN_STACK_TRACK;vr&&(Error.stackTraceLimit=50);var me=class{constructor(){f(this,"buffer","");f(this,"indentLevel",0);f(this,"hasWrittenAnything",!1);f(this,"lastCharacterIsSemicolon",!1);f(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=n?e.substring(0,e.length-1):e,o=this.getIndentString(),a=i.replaceAll(`
3
- `,`
4
- ${o}`);this.isAtStartOfLine()&&(a=o+a),n&&(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){t.write(this)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new B(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new B(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new B(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new B(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new B(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),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
6
- `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
7
- `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let a=t[o];a!=null&&n(a)}}}toString(){return this.buffer}writeInternal(t){if(t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
8
- `),this.lastCharacterIsSemicolon=t.endsWith(";")),this.buffer+=t,vr&&this.buffer.endsWith(`
9
- `)&&!this.buffer.endsWith(`"""
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 Ta}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[,p,c,d,x]=o;if(e||p!=null&&p.includes("runInteractiveTask")){e=!0;return}switch(p){case"Object.<anonymous>":p="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":p=`${p.substring(p.indexOf(".")+1)}()=> { ... }`;break}return{fn:p,path:(a=c==null?void 0:c.replace(/^.*?fern.*?\//,""))!=null?a:"",position:`${d}:${x}`}}}).filter(i=>{var o,a,p,c,d,x,w;return i&&!((o=i.path)!=null&&o.startsWith("node:"))&&!((a=i.path)!=null&&a.endsWith(".js"))&&!((p=i.path)!=null&&p.includes("AbstractWriter"))&&!((c=i.fn)!=null&&c.includes("stacktrace"))&&!((d=i.fn)!=null&&d.includes("stackLine"))&&!((x=i.fn)!=null&&x.includes("SdkGeneratorCLI"))&&!((w=i.fn)!=null&&w.includes("runCli"))}).slice(0,t)}};l();u();var ke=class extends me{toString(){return this.buffer}};var y=class extends V{toString(){let t=new ke;return this.write(t),t.toString()}};var Q=class extends y{constructor({accessLevel:e,name:n,final:i,conformances:o,properties:a,initializers:p,methods:c,docs:d}){super();f(this,"name");f(this,"final");f(this,"accessLevel");f(this,"conformances");f(this,"properties");f(this,"initializers");f(this,"methods");f(this,"docs");this.name=n,this.final=i,this.accessLevel=e,this.conformances=o!=null?o:[],this.properties=a,this.initializers=p!=null?p:[],this.methods=c!=null?c:[],this.docs=d}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),this.final&&e.write("final "),e.write(`class ${this.name}`),this.conformances.forEach((n,i)=>{i===0?e.write(": "):i>0&&e.write(", "),e.write(n)}),e.write(" {"),e.newLine(),e.indent(),this.properties.forEach(n=>{n.write(e),e.newLine()}),this.initializers.length>0&&(e.newLine(),this.initializers.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),this.methods.length>0&&(e.newLine(),this.methods.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),e.dedent(),e.write("}")}};l();u();var v=class r extends y{constructor(e){super();f(this,"args");this.args=e}write(e){let n=new B(this.args);e.write("{"),e.newLine(),e.indent(),n.write(e),e.dedent(),e.write("}")}static empty(){return new r(Je)}static withStatements(e){return new r(n=>{e.forEach(i=>{i.write(n)})})}};l();u();var X=class extends y{constructor({content:e}){super();f(this,"content");this.content=e}write(e){this.content.split(`
13
- `).forEach(i=>{e.write(`// ${i}`),e.newLine()})}};l();u();l();u();function Er(r){return r.replace(/\\u([0-9a-fA-F]{4})/g,"\\u{$1}").replace(new RegExp("(?<!\\\\)\\\\f","g"),"\\u{000C}").replace(new RegExp("(?<!\\\\)\\\\v","g"),"\\u{000B}").replace(new RegExp("(?<!\\\\)\\\\0","g"),"\\u{0000}").replace(new RegExp('(?<!\\\\)"',"g"),'\\"')}l();u();var Sa=["Any","as","associatedtype","break","case","catch","class","continue","default","defer","deinit","do","else","fallthrough","false","for","guard","enum","extension","fileprivate","func","if","import","in","init","inout","internal","is","let","nil","operator","private","precedencegroup","Protocol","protocol","public","repeat","rethrows","return","Self","self","static","struct","subscript","super","switch","throw","throws","true","try","Type","typealias","var","where","while"],va=new Set(Sa);function K(r){return va.has(r)}function I(r){return K(r)?`\`${r}\``:r}function Re(r){return r==="self"?"self_":r}l();u();var O=class extends y{constructor(e){super();f(this,"internalExpression");this.internalExpression=e}isNop(){return this.internalExpression.type==="nop"}isStructInitialization(){return this.internalExpression.type==="struct-initialization"}asStructInitializationOrThrow(){if(this.internalExpression.type!=="struct-initialization")throw new Error("Internal error; swift.Expression is not a struct initialization");return this.internalExpression}write(e){switch(this.internalExpression.type){case"reference":e.write(I(this.internalExpression.unsafeName));break;case"member-access":this.internalExpression.target.write(e),this.internalExpression.optionalChain&&e.write("?"),e.write("."),e.write(this.internalExpression.memberName);break;case"equals":this.internalExpression.left.write(e),e.write(" == "),this.internalExpression.right.write(e);break;case"enum-case-shorthand":e.write("."),e.write(this.internalExpression.caseName);break;case"function-call":this.writeCallableExpression({writer:e,target:I(this.internalExpression.unsafeName),arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"struct-initialization":this.writeCallableExpression({writer:e,target:I(this.internalExpression.unsafeName),arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"class-initialization":this.writeCallableExpression({writer:e,target:I(this.internalExpression.unsafeName),arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"method-call":this.internalExpression.target.write(e),e.write("."),this.writeCallableExpression({writer:e,target:this.internalExpression.methodName,arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"method-call-with-trailing-closure":this.internalExpression.target.write(e),e.write("."),e.write(this.internalExpression.methodName),e.write(" {"),this.internalExpression.multiline?(e.newLine(),e.indent()):e.write(" "),this.internalExpression.closureBody.write(e),this.internalExpression.multiline?(e.newLine(),e.dedent()):e.write(" "),e.write("}");break;case"contextual-method-call":e.write("."),this.writeCallableExpression({writer:e,target:this.internalExpression.methodName,arguments_:this.internalExpression.arguments_,multiline:!!this.internalExpression.multiline});break;case"try":e.write("try "),this.internalExpression.expression.write(e);break;case"optional-try":e.write("try? "),this.internalExpression.expression.write(e);break;case"force-try":e.write("try! "),this.internalExpression.expression.write(e);break;case"await":e.write("await "),this.internalExpression.expression.write(e);break;case"string-literal":e.write(`"${this.internalExpression.value}"`);break;case"number-literal":e.write(this.internalExpression.value.toString());break;case"bool-literal":e.write(this.internalExpression.value?"true":"false");break;case"date-literal":e.write(`try! Date("${this.internalExpression.isoString}", strategy: .iso8601)`);break;case"calendar-date-literal":e.write(`CalendarDate("${this.internalExpression.isoString}")!`);break;case"uuid-literal":e.write(`UUID(uuidString: "${this.internalExpression.value}")!`);break;case"dictionary-literal":this.writeDictionaryLiteral(e,this.internalExpression);break;case"array-literal":this.writeArrayLiteral(e,this.internalExpression);break;case"data-literal":e.write(`Data("${this.internalExpression.value}".utf8)`);break;case"raw-value":e.write(this.internalExpression.value);break;case"nop":break;default:S(this.internalExpression)}}writeCallableExpression({writer:e,target:n,arguments_:i,multiline:o}){e.write(n),e.write("("),o&&(e.newLine(),e.indent()),i==null||i.forEach((a,p)=>{p>0&&(e.write(","),o?e.newLine():e.write(" ")),a.write(e)}),o&&(e.newLine(),e.dedent()),e.write(")")}writeDictionaryLiteral(e,n){var o;if(!n.entries||n.entries.length===0){e.write("[:]");return}e.write("[");let i=!!n.multiline;i&&(e.newLine(),e.indent()),(o=n.entries)==null||o.forEach(([a,p],c)=>{c>0&&(e.write(", "),i&&e.newLine()),a.write(e),e.write(": "),p.write(e)}),i&&(e.newLine(),e.dedent()),e.write("]")}writeArrayLiteral(e,n){var o;if(!n.elements||n.elements.length===0){e.write("[]");return}e.write("[");let i=!!n.multiline;i&&(e.newLine(),e.indent()),(o=n.elements)==null||o.forEach((a,p)=>{p>0&&(e.write(","),i?e.newLine():e.write(" ")),a.write(e)}),i&&(e.newLine(),e.dedent()),e.write("]")}static reference(e){return new this({type:"reference",unsafeName:e})}static memberAccess(e){return new this(b({type:"member-access"},e))}static equals(e,n){return new this({type:"equals",left:e,right:n})}static enumCaseShorthand(e){return new this({type:"enum-case-shorthand",caseName:e})}static functionCall(e){return new this(b({type:"function-call"},e))}static structInitialization(e){return new this(b({type:"struct-initialization"},e))}static classInitialization(e){return new this(b({type:"class-initialization"},e))}static stringLiteral(e){return new this({type:"string-literal",value:e})}static numberLiteral(e){return new this({type:"number-literal",value:e})}static boolLiteral(e){return new this({type:"bool-literal",value:e})}static dateLiteral(e){return new this({type:"date-literal",isoString:e})}static calendarDateLiteral(e){return new this({type:"calendar-date-literal",isoString:e})}static uuidLiteral(e){return new this({type:"uuid-literal",value:e})}static dictionaryLiteral(e){return new this(b({type:"dictionary-literal"},e))}static arrayLiteral(e){return new this(b({type:"array-literal"},e))}static dataLiteral(e){return new this({type:"data-literal",value:e})}static methodCall(e){return new this(b({type:"method-call"},e))}static methodCallWithTrailingClosure(e){return new this(b({type:"method-call-with-trailing-closure"},e))}static contextualMethodCall(e){return new this(b({type:"contextual-method-call"},e))}static try(e){return new this({type:"try",expression:e})}static optionalTry(e){return new this({type:"optional-try",expression:e})}static forceTry(e){return new this({type:"force-try",expression:e})}static await(e){return new this({type:"await",expression:e})}static rawValue(e){return new this({type:"raw-value",value:e})}static nop(){return new this({type:"nop"})}static nil(){return new this({type:"raw-value",value:"nil"})}static self(){return new this({type:"raw-value",value:"self"})}};l();u();l();u();var de={Var:"var",Let:"let"};var ee=class extends y{constructor(e){super();f(this,"internalStatement");this.internalStatement=e}write(e){var n,i,o;switch(this.internalStatement.type){case"typealias-declaration":this.internalStatement.docs!=null&&this.internalStatement.docs.write(e),this.internalStatement.accessLevel&&(e.write(this.internalStatement.accessLevel),e.write(" ")),e.write("typealias "),e.write(this.internalStatement.unsafeName),e.write(" = "),this.internalStatement.aliasedType.write(e),e.newLine();break;case"constant-declaration":e.write(de.Let),e.write(" "),e.write(I(this.internalStatement.unsafeName)),e.write(" = "),this.internalStatement.value.write(e),this.internalStatement.noTrailingNewline||e.newLine();break;case"variable-declaration":e.write(de.Var),e.write(" "),e.write(I(this.internalStatement.unsafeName)),e.write(" = "),this.internalStatement.value.write(e),this.internalStatement.noTrailingNewline||e.newLine();break;case"function-declaration":this.internalStatement.docs!=null&&this.internalStatement.docs.write(e),this.internalStatement.accessLevel!=null&&(e.write(this.internalStatement.accessLevel),e.write(" ")),e.write("func "),e.write(I(this.internalStatement.unsafeName)),e.write("("),(n=this.internalStatement.parameters)==null||n.forEach((a,p)=>{p>0&&e.write(", "),a.write(e)}),e.write(")"),this.internalStatement.async&&e.write(" async"),this.internalStatement.throws&&e.write(" throws"),this.internalStatement.returnType&&(e.write(" -> "),this.internalStatement.returnType.write(e)),e.write(" "),((i=this.internalStatement.body)!=null?i:v.empty()).write(e),e.newLine();break;case"variable-assignment":e.write(I(this.internalStatement.unsafeName)),e.write(" = "),this.internalStatement.value.write(e),e.newLine();break;case"self-assignment":e.write("self = "),e.write(this.internalStatement.value.toString()),e.newLine();break;case"property-assignment":e.write("self."),e.write(this.internalStatement.unsafeName),e.write(" = "),this.internalStatement.value.write(e),e.newLine();break;case"discard-assignment":e.write("_ = "),this.internalStatement.value.write(e),e.newLine();break;case"return":e.write("return "),this.internalStatement.expression.write(e),e.newLine();break;case"throw":e.write("throw "),this.internalStatement.expression.write(e),e.newLine();break;case"expression-statement":this.internalStatement.expression.write(e),e.newLine();break;case"import":e.write("import "),e.write(this.internalStatement.moduleName),e.newLine();break;case"switch":e.write("switch "),this.internalStatement.target.write(e),e.write(" {"),e.newLine();for(let a of this.internalStatement.cases)if(e.write("case "),a.pattern.write(e),e.write(":"),e.newLine(),a.body.length>0){e.indent();for(let p of a.body)p.write(e);e.dedent()}if(this.internalStatement.defaultCase&&(e.write("default:"),e.newLine(),this.internalStatement.defaultCase.length>0)){e.indent();for(let a of this.internalStatement.defaultCase)a.write(e);e.dedent()}e.write("}"),e.newLine();break;case"if":{e.write("if "),this.internalStatement.condition.write(e),e.write(" "),v.withStatements(this.internalStatement.body).write(e);for(let a of(o=this.internalStatement.elseIfs)!=null?o:[])e.write(" else if "),a.condition.write(e),e.write(" "),v.withStatements(a.body).write(e);this.internalStatement.else&&(e.write(" else "),v.withStatements(this.internalStatement.else).write(e)),e.newLine();break}case"raw":e.write(this.internalStatement.content),e.newLine();break;default:S(this.internalStatement)}}static typealiasDeclaration(e){return new this(b({type:"typealias-declaration"},e))}static constantDeclaration(e){return new this(b({type:"constant-declaration"},e))}static variableDeclaration(e){return new this(b({type:"variable-declaration"},e))}static functionDeclaration(e){return new this(b({type:"function-declaration"},e))}static variableAssignment(e,n){return new this({type:"variable-assignment",unsafeName:e,value:n})}static selfAssignment(e){return new this({type:"self-assignment",value:e})}static propertyAssignment(e,n){return new this({type:"property-assignment",unsafeName:e,value:n})}static discardAssignment(e){return new this({type:"discard-assignment",value:e})}static return(e){return new this({type:"return",expression:e})}static throw(e){return new this({type:"throw",expression:e})}static expressionStatement(e){return new this({type:"expression-statement",expression:e})}static import(e){return new this({type:"import",moduleName:e})}static switch(e){return new this(b({type:"switch"},e))}static if(e){return new this(b({type:"if"},e))}static raw(e){return new this({type:"raw",content:e})}};var te=class extends y{constructor({unsafeName:e,accessLevel:n,type:i,body:o,docs:a}){super();f(this,"unsafeName");f(this,"accessLevel");f(this,"type");f(this,"body");f(this,"docs");this.unsafeName=e,this.accessLevel=n,this.type=i,this.body=o,this.docs=a}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),e.write("var "),e.write(I(this.unsafeName)),e.write(": "),this.type.write(e),e.write(" "),this.body instanceof v?this.body.write(e):this.body instanceof O?v.withStatements([ee.expressionStatement(this.body)]).write(e):S(this.body)}};l();u();var re=class r extends y{constructor({summary:e,description:n,parameters:i,returns:o,throws:a}){super();f(this,"summary");f(this,"description");f(this,"parameters");f(this,"returns");f(this,"throws");this.summary=r.sanitizeText(e),this.description=n!=null?r.sanitizeText(n):void 0,this.parameters=(i!=null?i:[]).map(p=>({name:p.name,description:r.sanitizeText(p.description)})),this.returns=o!=null?r.sanitizeText(o):void 0,this.throws=(a!=null?a:[]).map(p=>r.sanitizeText(p))}write(e){if(this.writeMultilineText(e,this.summary),this.description!=null&&(e.write("///"),e.newLine(),this.writeMultilineText(e,this.description)),this.parameters.length>0){e.write("///"),e.newLine();for(let n of this.parameters)n.description.split(`
14
- `).forEach((o,a)=>{a===0?(e.write("/// - Parameter "),e.write(n.name),e.write(": "),e.write(o)):(e.write("/// "),e.write(o)),e.newLine()})}if(this.returns!=null&&this.returns.split(`
15
- `).forEach((i,o)=>{o===0?(e.write("/// - Returns: "),e.write(i)):(e.write("/// "),e.write(i)),e.newLine()}),this.throws.length>0)for(let n of this.throws)n.split(`
16
- `).forEach((o,a)=>{a===0?(e.write("/// - Throws: "),e.write(o)):(e.write("/// "),e.write(o)),e.newLine()})}writeMultilineText(e,n){let i=n.split(`
17
- `);for(let o of i)e.write("/// "),e.write(o),e.newLine()}static sanitizeText(e){return e=e.replace(/\r\n/g,`
18
- `).replace(/\r/g,`
19
- `),e=e.replace(/\x00/g,""),e}};l();u();var ne=class extends y{constructor({accessLevel:e,name:n,conformances:i,cases:o,initializers:a,methods:p,nestedTypes:c,docs:d}){super();f(this,"name");f(this,"accessLevel");f(this,"conformances");f(this,"cases");f(this,"initializers");f(this,"methods");f(this,"nestedTypes");f(this,"docs");this.name=n,this.accessLevel=e,this.conformances=i!=null?i:[],this.cases=o,this.initializers=a!=null?a:[],this.methods=p!=null?p:[],this.nestedTypes=c!=null?c:[],this.docs=d}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),e.write(`enum ${this.name}`),this.conformances.forEach((n,i)=>{i===0?e.write(": "):i>0&&e.write(", "),e.write(n)}),e.write(" {"),e.newLine(),e.indent(),this.cases.forEach(n=>{n.docs!=null&&n.docs.write(e),e.write("case "),K(n.unsafeName)?e.write(`\`${n.unsafeName}\``):e.write(n.unsafeName),e.write("("),n.associatedValue.forEach((i,o)=>{o>0&&e.write(", "),i.write(e)}),e.write(")"),e.newLine()}),this.initializers.length>0&&(e.newLine(),this.initializers.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),this.methods.length>0&&(e.newLine(),this.methods.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),this.nestedTypes.length>0&&(e.newLine(),this.nestedTypes.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()})),e.dedent(),e.write("}")}};l();u();var ie=class extends y{constructor({accessLevel:e,name:n,conformances:i,cases:o,docs:a}){super();f(this,"name");f(this,"accessLevel");f(this,"conformances");f(this,"cases");f(this,"docs");this.name=n,this.accessLevel=e,this.conformances=i!=null?i:[],this.cases=o,this.docs=a}write(e){if(this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),e.write(`enum ${this.name}`),this.conformances.forEach((n,i)=>{i===0?e.write(": "):i>0&&e.write(", "),e.write(n)}),this.cases.length===0){e.write(" {}");return}e.write(" {"),e.newLine(),e.indent(),this.cases.forEach(n=>{n.docs!=null&&n.docs.write(e),e.write("case "),K(n.unsafeName)?e.write(`\`${n.unsafeName}\``):e.write(n.unsafeName),n.rawValue!==n.unsafeName&&(e.write(" = "),e.write(`"${Er(n.rawValue)}"`)),e.newLine()}),e.dedent(),e.write("}")}};l();u();var ae=class extends y{constructor({name:e,conformances:n,initializers:i,computedProperties:o,methods:a,nestedTypes:p,docs:c}){super();f(this,"name");f(this,"conformances");f(this,"initializers");f(this,"computedProperties");f(this,"methods");f(this,"nestedTypes");f(this,"docs");this.name=e,this.conformances=n!=null?n:[],this.initializers=i!=null?i:[],this.computedProperties=o!=null?o:[],this.methods=a!=null?a:[],this.nestedTypes=p!=null?p:[],this.docs=c}write(e){this.docs!=null&&this.docs.write(e),e.write(`extension ${this.name}`),this.conformances.forEach((n,i)=>{i===0?e.write(": "):i>0&&e.write(", "),e.write(n)}),e.write(" {"),this.initializers.length>0&&(e.newLine(),e.indent(),this.initializers.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()}),e.dedent()),this.computedProperties.length>0&&(e.newLine(),e.indent(),this.computedProperties.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()}),e.dedent()),this.methods.length>0&&(e.newLine(),e.indent(),this.methods.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()}),e.dedent()),this.nestedTypes.length>0&&(e.newLine(),e.indent(),this.nestedTypes.forEach((n,i)=>{i>0&&e.newLine(),n.write(e),e.newLine()}),e.dedent()),e.write("}")}};l();u();var oe=class extends y{constructor({label:e,value:n}){super();f(this,"label");f(this,"value");this.label=e,this.value=n}write(e){this.label!=null&&(e.write(this.label),e.write(": ")),this.value.write(e)}};l();u();var se=class extends y{constructor({argumentLabel:e,unsafeName:n,escaping:i,type:o,defaultValue:a,docsContent:p}){super();f(this,"argumentLabel");f(this,"unsafeName");f(this,"escaping");f(this,"type");f(this,"defaultValue");f(this,"docsContent");this.argumentLabel=e,this.unsafeName=n,this.escaping=i,this.type=o,this.defaultValue=a,this.docsContent=p}write(e){this.argumentLabel==null?e.write("_ "):this.argumentLabel!==this.unsafeName&&(e.write(this.argumentLabel),e.write(" ")),e.write(this.unsafeName),e.write(": "),this.escaping&&e.write("@escaping "),this.type.write(e),this.defaultValue!=null&&(e.write(" = "),this.defaultValue.write(e))}};l();u();var le=class extends y{constructor({accessLevel:e,convenience:n,failable:i,throws:o,parameters:a,body:p,multiline:c,docs:d}){super();f(this,"accessLevel");f(this,"convenience");f(this,"failable");f(this,"throws");f(this,"parameters");f(this,"body");f(this,"multiline");f(this,"docs");this.accessLevel=e,this.convenience=n,this.failable=i,this.throws=o,this.parameters=a!=null?a:[],this.body=p!=null?p:v.empty(),this.multiline=c,this.docs=d}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),this.convenience&&e.write("convenience "),e.write("init"),this.failable&&e.write("?"),e.write("("),this.multiline&&(e.newLine(),e.indent()),this.parameters.forEach((n,i)=>{i>0&&(e.write(","),this.multiline?e.newLine():e.write(" ")),n.write(e)}),this.multiline&&(e.newLine(),e.dedent()),e.write(") "),this.throws&&e.write("throws "),this.body.write(e)}};l();u();var Be=class r extends y{constructor({count:e=1}={}){super();f(this,"count");this.count=e}write(e){for(let n=0;n<this.count;n++)e.newLine()}static single(){return new r({count:1})}static double(){return new r({count:2})}static multiple(e){return new r({count:e})}};l();u();var ue=class extends y{constructor({attributes:e,unsafeName:n,accessLevel:i,static_:o,parameters:a,async:p,throws:c,returnType:d,body:x,docs:w}){super();f(this,"attributes");f(this,"unsafeName");f(this,"accessLevel");f(this,"static_");f(this,"parameters");f(this,"async");f(this,"throws");f(this,"returnType");f(this,"body");f(this,"docs");this.attributes=e!=null?e:[],this.unsafeName=n,this.accessLevel=i,this.static_=o,this.parameters=a!=null?a:[],this.async=p,this.throws=c,this.returnType=d,this.body=x!=null?x:v.empty(),this.docs=w}write(e){this.docs!=null&&this.docs.write(e),this.attributes.forEach(n=>{var i;(i=n.arguments)!=null&&i.length?O.functionCall({unsafeName:`@${n.name}`,arguments_:n.arguments}).write(e):(e.write("@"),e.write(n.name)),e.write(" ")}),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),this.static_&&e.write("static "),e.write("func "),e.write(I(this.unsafeName)),e.write("("),this.parameters.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write(")"),this.async&&e.write(" async"),this.throws&&e.write(" throws"),e.write(" -> "),this.returnType.write(e),e.write(" "),this.body.write(e)}};l();u();var Ce=class extends y{constructor(e){super();f(this,"internalPattern");this.internalPattern=e}write(e){switch(this.internalPattern.type){case"enum-case-value-binding":e.write("."),e.write(this.internalPattern.caseName),e.write("("),e.write(this.internalPattern.declarationType),e.write(" "),e.write(this.internalPattern.referenceName),e.write(")");break;default:S(this.internalPattern.type)}}static enumCaseValueBinding(e){return new this(b({type:"enum-case-value-binding"},e))}};l();u();var fe=class extends y{constructor({unsafeName:e,accessLevel:n,static_:i,declarationType:o,type:a,defaultValue:p,docs:c}){super();f(this,"unsafeName");f(this,"accessLevel");f(this,"static_");f(this,"declarationType");f(this,"type");f(this,"defaultValue");f(this,"docs");this.unsafeName=e,this.accessLevel=n,this.static_=i,this.declarationType=o,this.type=a,this.defaultValue=p,this.docs=c}write(e){this.docs!=null&&this.docs.write(e),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),this.static_&&e.write("static "),e.write(this.declarationType),e.write(" "),K(this.unsafeName)?e.write(`\`${this.unsafeName}\``):e.write(this.unsafeName),e.write(": "),this.type.write(e),this.defaultValue!=null&&(e.write(" = "),this.defaultValue.write(e))}};l();u();var Nr={CaseIterable:"CaseIterable",Codable:"Codable",CodingKey:"CodingKey",Decodable:"Decodable",Encodable:"Encodable",Equatable:"Equatable",Error:"Error",Hashable:"Hashable",Sendable:"Sendable",MultipartFormDataConvertible:"MultipartFormDataConvertible"};l();u();var pe=class extends y{constructor({attributes:e,accessLevel:n,name:i,conformances:o,properties:a,initializers:p,methods:c,nestedTypes:d,docs:x}){super();f(this,"attributes");f(this,"name");f(this,"accessLevel");f(this,"conformances");f(this,"properties");f(this,"initializers");f(this,"methods");f(this,"nestedTypes");f(this,"docs");this.attributes=e!=null?e:[],this.name=i,this.accessLevel=n,this.conformances=o!=null?o:[],this.properties=a!=null?a:[],this.initializers=p!=null?p:[],this.methods=c!=null?c:[],this.nestedTypes=d!=null?d:[],this.docs=x}write(e){this.docs!=null&&this.docs.write(e),this.attributes.forEach(c=>{var d;(d=c.arguments)!=null&&d.length?O.functionCall({unsafeName:`@${c.name}`,arguments_:c.arguments}).write(e):(e.write("@"),e.write(c.name)),e.write(" ")}),this.accessLevel!=null&&(e.write(this.accessLevel),e.write(" ")),e.write(`struct ${this.name}`),this.conformances.forEach((c,d)=>{d===0?e.write(": "):d>0&&e.write(", "),e.write(c)}),e.write(" {"),e.newLine(),e.indent();let n=this.properties.length>0,i=this.initializers.length>0,o=this.methods.length>0,a=this.nestedTypes.length>0;this.properties.forEach(c=>{c.write(e),e.newLine()});let p=n;i&&(p&&e.newLine(),this.initializers.forEach((c,d)=>{d>0&&e.newLine(),c.write(e),e.newLine()}),p=!0),o&&(p&&e.newLine(),this.methods.forEach((c,d)=>{d>0&&e.newLine(),c.write(e),e.newLine()}),p=!0),a&&(p&&e.newLine(),this.nestedTypes.forEach((c,d)=>{d>0&&e.newLine(),c.write(e),e.newLine()})),e.dedent(),e.write("}")}};l();u();var C={String:{type:"string",symbolName:"String"},Bool:{type:"bool",symbolName:"Bool"},Int:{type:"int",symbolName:"Int"},Int64:{type:"int64",symbolName:"Int64"},UInt:{type:"uint",symbolName:"UInt"},UInt64:{type:"uint64",symbolName:"UInt64"},Float:{type:"float",symbolName:"Float"},Double:{type:"double",symbolName:"Double"},Void:{type:"void",symbolName:"Void"},Any:{type:"any",symbolName:"Any"}},Me={Data:{type:"data",symbolName:"Data"},Date:{type:"date",symbolName:"Date"},UUID:{type:"uuid",symbolName:"UUID"}},Ue=class r extends y{constructor(e){super();f(this,"internalType");this.internalType=e}get type(){return this.internalType.type}get nonOptionalType(){return this.internalType.type==="optional"?this.internalType.valueType.nonOptionalType:this.internalType.type}get nonNullableType(){return this.internalType.type==="nullable"?this.internalType.valueType.nonNullableType:this.internalType.type}get isOptional(){return this.internalType.type==="optional"}get isNullable(){return this.internalType.type==="nullable"}get isOptionalNullable(){return this.isOptional&&this.nonOptional().isNullable}nonOptional(){return r.nonOptional(this)}nonNullable(){return r.nonNullable(this)}equals(e){switch(this.internalType.type){case"string":case"bool":case"int":case"int64":case"uint":case"uint64":case"float":case"double":case"void":case"any":case"data":case"date":case"uuid":case"json-value":return this.internalType.type===e.internalType.type;case"tuple":{if(e.internalType.type!=="tuple"||this.internalType.elements.length!==e.internalType.elements.length)return!1;for(let n=0;n<this.internalType.elements.length;n++){let i=this.internalType.elements[n],o=e.internalType.elements[n];if(!i||!o||!i.equals(o))return!1}return!0}case"array":return e.internalType.type==="array"&&this.internalType.elementType.equals(e.internalType.elementType);case"dictionary":return e.internalType.type==="dictionary"&&this.internalType.keyType.equals(e.internalType.keyType)&&this.internalType.valueType.equals(e.internalType.valueType);case"optional":return e.internalType.type=="optional"&&this.internalType.valueType.equals(e.internalType.valueType);case"nullable":return e.internalType.type==="nullable"&&this.internalType.valueType.equals(e.internalType.valueType);case"custom":return e.internalType.type==="custom"&&this.internalType.name===e.internalType.name;case"existential-any":return e.internalType.type==="existential-any"&&this.internalType.protocolName===e.internalType.protocolName;case"calendar-date":return e.internalType.type==="calendar-date";default:S(this.internalType)}}toCaseName(){return r.toCaseName(this)}static toCaseName(e){switch(e.internalType.type){case"string":return"string";case"bool":return"bool";case"int":return"int";case"int64":return"int64";case"uint":return"uint";case"uint64":return"uint64";case"float":return"float";case"double":return"double";case"void":return"void";case"any":return"any";case"data":return"data";case"date":return"date";case"uuid":return"uuid";case"tuple":{let n=e.internalType.elements.map(i=>r.toCaseName(i)).join("And");return`tuple${W(n)}`}case"array":return`${Ae(r.toCaseName(e.internalType.elementType))}Array`;case"dictionary":{let n=Ae(r.toCaseName(e.internalType.keyType)),i=W(r.toCaseName(e.internalType.valueType));return`${n}To${i}Dictionary`}case"optional":return`optional${W(r.toCaseName(e.internalType.valueType))}`;case"nullable":return`nullable${W(r.toCaseName(e.internalType.valueType))}`;case"custom":return Ge(e.internalType.name);case"existential-any":return`any${W(e.internalType.protocolName)}`;case"calendar-date":return"calendarDate";case"json-value":return"json";default:S(e.internalType)}}write(e){switch(this.internalType.type){case"string":e.write("String");break;case"bool":e.write("Bool");break;case"int":e.write("Int");break;case"int64":e.write("Int64");break;case"uint":e.write("UInt");break;case"uint64":e.write("UInt64");break;case"float":e.write("Float");break;case"double":e.write("Double");break;case"void":e.write("Void");break;case"any":e.write("Any");break;case"data":e.write("Data");break;case"date":e.write("Date");break;case"uuid":e.write("UUID");break;case"tuple":e.write("("),this.internalType.elements.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write(")");break;case"array":e.write("["),this.internalType.elementType.write(e),e.write("]");break;case"dictionary":e.write("["),this.internalType.keyType.write(e),e.write(": "),this.internalType.valueType.write(e),e.write("]");break;case"optional":this.internalType.valueType.write(e),e.write("?");break;case"nullable":e.write("Nullable<"),this.internalType.valueType.write(e),e.write(">");break;case"custom":e.write(this.internalType.name);break;case"existential-any":e.write("any "),e.write(this.internalType.protocolName);break;case"calendar-date":e.write("CalendarDate");break;case"json-value":e.write("JSONValue");break;default:S(this.internalType)}}static primitiveSymbolNames(){return Le(C).map(e=>e.symbolName)}static foundationSymbolNames(){return Le(Me).map(e=>e.symbolName)}static string(){return new this(C.String)}static bool(){return new this(C.Bool)}static int(){return new this(C.Int)}static uint(){return new this(C.UInt)}static uint64(){return new this(C.UInt64)}static int64(){return new this(C.Int64)}static float(){return new this(C.Float)}static double(){return new this(C.Double)}static void(){return new this(C.Void)}static any(){return new this(C.Any)}static data(){return new this(Me.Data)}static date(){return new this(Me.Date)}static uuid(){return new this(Me.UUID)}static tuple(e){return new this({type:"tuple",elements:e})}static array(e){return new this({type:"array",elementType:e})}static dictionary(e,n){return new this({type:"dictionary",keyType:e,valueType:n})}static optional(e){return e.internalType.type==="optional"?e:new this({type:"optional",valueType:e})}static nullable(e){return new this({type:"nullable",valueType:e})}static nonOptional(e){return e.internalType.type==="optional"?r.nonOptional(e.internalType.valueType):e}static nonNullable(e){return e.internalType.type==="nullable"?r.nonNullable(e.internalType.valueType):e}static custom(e){return new this({type:"custom",name:e})}static existentialAny(e){return new this({type:"existential-any",protocolName:e})}static calendarDate(){return new this({type:"calendar-date"})}static jsonValue(){return new this({type:"json-value"})}};l();u();var Oe=class r extends y{constructor(e){super();f(this,"variant");this.variant=e}nonOptional(){return r.nonOptional(this)}nonNullable(){return r.nonNullable(this)}getReferenceIfSymbolType(){return this.variant.type==="symbol"?this.variant.symbol:null}write(e){let{variant:n}=this;switch(n.type){case"symbol":e.write(n.symbol);break;case"generic":{n.reference.write(e),n.arguments.length>0&&(e.write("<"),n.arguments.forEach((i,o)=>{i.write(e),o<n.arguments.length-1&&e.write(", ")}),e.write(">"));break}case"tuple":e.write("("),n.elements.forEach((i,o)=>{o>0&&e.write(", "),i.write(e)}),e.write(")");break;case"array":e.write("["),n.elementType.write(e),e.write("]");break;case"dictionary":e.write("["),n.keyType.write(e),e.write(": "),n.valueType.write(e),e.write("]");break;case"optional":n.valueType.write(e),e.write("?");break;case"nullable":e.write("Nullable<"),n.valueType.write(e),e.write(">");break;case"member-access":n.target.write(e),e.write("."),e.write(n.memberName);break;default:S(n)}}equals(e){switch(this.variant.type){case"symbol":return e.variant.type==="symbol"&&this.variant.symbol===e.variant.symbol;case"generic":return e.variant.type==="generic"&&this.variant.reference.equals(e.variant.reference)&&this.variant.arguments.every((n,i)=>e.variant.type==="generic"&&e.variant.arguments[i]&&n.equals(e.variant.arguments[i]));case"tuple":return e.variant.type==="tuple"&&this.variant.elements.every((n,i)=>e.variant.type==="tuple"&&e.variant.elements[i]&&n.equals(e.variant.elements[i]));case"array":return e.variant.type==="array"&&this.variant.elementType.equals(e.variant.elementType);case"dictionary":return e.variant.type==="dictionary"&&this.variant.keyType.equals(e.variant.keyType)&&this.variant.valueType.equals(e.variant.valueType);case"optional":return e.variant.type=="optional"&&this.variant.valueType.equals(e.variant.valueType);case"nullable":return e.variant.type==="nullable"&&this.variant.valueType.equals(e.variant.valueType);case"member-access":return e.variant.type==="member-access"&&this.variant.target.equals(e.variant.target)&&this.variant.memberName===e.variant.memberName;default:S(this.variant)}}static symbol(e){return new this({type:"symbol",symbol:e})}static generic(e,n){return new this({type:"generic",reference:e,arguments:n})}static tuple(e){return new this({type:"tuple",elements:e})}static array(e){return new this({type:"array",elementType:e})}static dictionary(e,n){return new this({type:"dictionary",keyType:e,valueType:n})}static optional(e){return e.variant.type==="optional"?e:new this({type:"optional",valueType:e})}static nullable(e){return e.variant.type==="nullable"?e:new this({type:"nullable",valueType:e})}static memberAccess(e,n){return new this({type:"member-access",target:e,memberName:n})}static nonOptional(e){return e.variant.type==="optional"?r.nonOptional(e.variant.valueType):e}static nonNullable(e){return e.variant.type==="nullable"?r.nonNullable(e.variant.valueType):e}static unqualifiedToSwiftType(e){return r.symbol(e)}static unqualifiedToFoundationType(e){return r.symbol(e)}};l();u();l();u();var h=class h{constructor(t,e,n){f(this,"id");f(this,"name");f(this,"shape");this.id=t,this.name=e,this.shape=n}static isSwiftSymbol(t){return h.SWIFT_SYMBOL_ID===t||t.startsWith(`${h.SWIFT_SYMBOL_ID}.`)}static isSwiftSymbolName(t){return t in h.swiftTypeSymbolsByName}static isFoundationSymbol(t){return h.FOUNDATION_SYMBOL_ID===t||t.startsWith(`${h.FOUNDATION_SYMBOL_ID}.`)}static isFoundationSymbolName(t){return t in h.foundationTypeSymbolsByName}static isCustomSymbol(t){return!h.isSwiftSymbol(t)&&!h.isFoundationSymbol(t)}static create(t,e,n){return new h(t,e,n)}static swiftType(t){return h.create(`${h.SWIFT_SYMBOL_ID}.${t}`,t,{type:"system"})}static foundationType(t){return h.create(`${h.FOUNDATION_SYMBOL_ID}.${t}`,t,{type:"system"})}get isSwiftSymbol(){return h.isSwiftSymbol(this.id)}get isFoundationSymbol(){return h.isFoundationSymbol(this.id)}get isCustomSymbol(){return h.isCustomSymbol(this.id)}};f(h,"SWIFT_SYMBOL_NAME","Swift"),f(h,"SWIFT_SYMBOL_ID",h.SWIFT_SYMBOL_NAME),f(h,"swiftTypeSymbolsByName",{String:h.swiftType("String"),Bool:h.swiftType("Bool"),Int:h.swiftType("Int"),Int64:h.swiftType("Int64"),UInt:h.swiftType("UInt"),UInt64:h.swiftType("UInt64"),Float:h.swiftType("Float"),Double:h.swiftType("Double"),Void:h.swiftType("Void"),Encoder:h.swiftType("Encoder"),Decoder:h.swiftType("Decoder"),Any:h.swiftType("Any")}),f(h,"swiftTypeSymbols",Object.values(h.swiftTypeSymbolsByName)),f(h,"FOUNDATION_SYMBOL_NAME","Foundation"),f(h,"FOUNDATION_SYMBOL_ID",h.FOUNDATION_SYMBOL_NAME),f(h,"foundationTypeSymbolsByName",{Data:h.foundationType("Data"),Date:h.foundationType("Date"),URLSession:h.foundationType("URLSession"),UUID:h.foundationType("UUID")}),f(h,"foundationTypeSymbols",Object.values(h.foundationTypeSymbolsByName));var g=h;l();u();l();u();l();u();l();u();var De=class{constructor(t,e){f(this,"id");f(this,"name");f(this,"childrenByName");this.id=t,this.name=e,this.childrenByName=new Map}get children(){return Array.from(this.childrenByName.values())}addChild(t){if(this.childrenByName.has(t.name))throw new Error(`A child with the name '${t.name}' already exists in module '${this.name}'.`);this.childrenByName.set(t.name,t)}getChildByName(t){return this.childrenByName.get(t)}},Fe=class extends De{constructor(e,n){super(e,n);f(this,"kind","module");f(this,"imports");f(this,"parent",null);this.imports=[]}addImport(e){this.imports.push(e)}get qualifiedPath(){return[this.name]}get qualifiedName(){return this.name}},Pe=class extends De{constructor(e,n,i){super(n,e);f(this,"kind","type");f(this,"shape");f(this,"parent");this.parent=null,this.shape=i}getNearestModuleAncestorOrThrow(){let e=this.parent;for(;e!==null&&e.kind!=="module";)e=e.parent;return k(e,`No module ancestor found for type symbol '${this.id}'`),e}get qualifiedPath(){var e,n;return[...(n=(e=this.parent)==null?void 0:e.qualifiedPath)!=null?n:[],this.name]}get qualifiedName(){return this.qualifiedPath.join(".")}};var he=class{constructor(){f(this,"symbolsById",new Map)}createModuleSymbol({symbolId:t,symbolName:e}){this.validateSymbolNotExists(t);let n=new Fe(t,e);return this.symbolsById.set(t,n),n}createTypeSymbol({symbolId:t,symbolName:e,shape:n}){this.validateSymbolNotExists(t);let i=new Pe(e,t,n);return this.symbolsById.set(t,i),i}addImportRelation({clientSymbolId:t,importedSymbolId:e}){let n=this.getSymbolByIdOrThrow(t),i=this.getSymbolByIdOrThrow(e);if(n.kind!=="module"||i.kind!=="module")throw new Error(`Client module '${n.id}' and imported module '${i.id}' must both be module symbols.`);n.addImport(i)}nestSymbol({parentSymbolId:t,childSymbolId:e}){let n=this.getSymbolByIdOrThrow(t),i=this.getSymbolByIdOrThrow(e);n.addChild(i),i.parent=n}reference({fromSymbolId:t,targetSymbolId:e}){let n=this.getSymbolByIdOrThrow(t),i=this.getSymbolByIdOrThrow(e),o=i.qualifiedPath;for(let a=1;a<=o.length;a++){let p=o.slice(o.length-a),c=this.resolvePath(n,p);if((c==null?void 0:c.id)===i.id)return p.join(".")}return i.qualifiedName}resolveReference({fromSymbolId:t,reference:e}){let n=this.getSymbolByIdOrThrow(t),i=e.split(".").filter(o=>o.length>0);return this.resolvePath(n,i)}resolvePath(t,e){var p;let[n,...i]=e;if(n===void 0)return null;let o=this.resolveFirstSegment(t,n);if(o===null)return null;let a=o;for(let c=0;c<i.length;c++){let d=i[c];if(Ee(d),a=(p=a.getChildByName(d))!=null?p:null,a===null)return null}return a}resolveFirstSegment(t,e){let n=t;for(;n!==null;){let a=n.getChildByName(e);if(a)return a;n=n.parent}let i=t.kind==="module"?t:t.getNearestModuleAncestorOrThrow();if(i.name===e)return i;for(let a of i.imports)if(a.name===e)return a;let o=null;for(let a of i.imports){let p=a.getChildByName(e);if(p){if(o!=null&&o.id!==p.id)return null;o=p}}return o}getSymbolByIdOrThrow(t){let e=this.symbolsById.get(t);return Ee(e,`A symbol with the ID '${t}' was not found in the registry.`),e}getSymbolById(t){var e;return(e=this.symbolsById.get(t))!=null?e:null}validateSymbolNotExists(t){if(this.symbolsById.has(t))throw new Error(`A symbol with the ID '${t}' already exists in the registry.`)}};var We=class r{constructor(t,e,n){f(this,"graph");f(this,"swiftSymbol");f(this,"foundationSymbol");f(this,"registeredSourceModule");f(this,"registeredTestModule");this.graph=t,this.swiftSymbol=e,this.foundationSymbol=n,this.registeredSourceModule=null,this.registeredTestModule=null}static create(){let{graph:t,swiftSymbol:e,foundationSymbol:n}=r.createGraph();return new r(t,e,n)}static createGraph(){let t=new he,e=()=>{let a=t.createModuleSymbol({symbolId:g.SWIFT_SYMBOL_ID,symbolName:g.SWIFT_SYMBOL_NAME});return g.swiftTypeSymbols.forEach(p=>{let c=t.createTypeSymbol({symbolId:p.id,symbolName:p.name,shape:{type:"system"}});t.nestSymbol({parentSymbolId:a.id,childSymbolId:c.id})}),a},n=()=>{let a=t.createModuleSymbol({symbolId:g.FOUNDATION_SYMBOL_ID,symbolName:g.FOUNDATION_SYMBOL_NAME});return g.foundationTypeSymbols.forEach(p=>{let c=t.createTypeSymbol({symbolId:p.id,symbolName:p.name,shape:{type:"system"}});t.nestSymbol({parentSymbolId:a.id,childSymbolId:c.id})}),a},i=e(),o=n();return{graph:t,swiftSymbol:i,foundationSymbol:o}}getRegisteredSourceModuleSymbolOrThrow(){return k(this.registeredSourceModule,"Module symbol not found."),g.create(this.registeredSourceModule.id,this.registeredSourceModule.name,{type:"other"})}getRegisteredTestModuleSymbolOrThrow(){return k(this.registeredTestModule,"Module symbol not found."),g.create(this.registeredTestModule.id,this.registeredTestModule.name,{type:"other"})}getSymbolByIdOrThrow(t){let e=this.graph.getSymbolById(t);return k(e,`Symbol with ID '${t}' not found in registry.`),g.create(e.id,e.name,e.kind==="type"?e.shape:{type:"other"})}registerSourceModule(t){let e=t,n=this.graph.createModuleSymbol({symbolId:e,symbolName:t});return n.addImport(this.swiftSymbol),n.addImport(this.foundationSymbol),this.registeredSourceModule=n,g.create(n.id,n.name,{type:"other"})}registerTestModule(t){let e=t,n=this.graph.createModuleSymbol({symbolId:e,symbolName:t});return n.addImport(this.swiftSymbol),n.addImport(this.foundationSymbol),k(this.registeredSourceModule,"Cannot register a test module before registering a source module."),n.addImport(this.registeredSourceModule),this.registeredTestModule=n,g.create(n.id,n.name,{type:"other"})}registerSourceModuleType(t,e){k(this.registeredSourceModule,"Cannot register a type before registering a module.");let n=this.inferSymbolIdForSourceModuleType(t),i=this.graph.createTypeSymbol({symbolId:n,symbolName:t,shape:e});return this.graph.nestSymbol({parentSymbolId:this.registeredSourceModule.id,childSymbolId:i.id}),g.create(i.id,i.name,e)}registerTestModuleType(t,e){k(this.registeredTestModule,"Cannot register a type before registering a module.");let n=this.inferSymbolIdForTestModuleType(t),i=this.graph.createTypeSymbol({symbolId:n,symbolName:t,shape:e});return this.graph.nestSymbol({parentSymbolId:this.registeredTestModule.id,childSymbolId:i.id}),g.create(i.id,i.name,e)}registerNestedType({parentSymbol:t,symbolName:e,shape:n}){let i=typeof t=="string"?t:t.id,o=this.inferSymbolIdForNestedType(i,e),a=this.graph.createTypeSymbol({symbolId:o,symbolName:e,shape:n});return this.graph.nestSymbol({parentSymbolId:i,childSymbolId:a.id}),g.create(a.id,a.name,n)}reference({fromSymbol:t,toSymbol:e}){let n=typeof t=="string"?t:t.id,i=typeof e=="string"?e:e.id;return this.graph.reference({fromSymbolId:n,targetSymbolId:i})}resolveReference({fromSymbol:t,reference:e}){let n=typeof t=="string"?t:t.id,i=this.graph.resolveReference({fromSymbolId:n,reference:e});return i?g.create(i.id,i.name,i.kind==="type"?i.shape:{type:"other"}):null}inferSymbolIdForSourceModuleType(t){return k(this.registeredSourceModule,"Cannot get symbol id for a type before registering a module."),`${this.registeredSourceModule.id}.${t}`}inferSymbolIdForTestModuleType(t){return k(this.registeredTestModule,"Cannot get symbol id for a type before registering a module."),`${this.registeredTestModule.id}.${t}`}inferSymbolIdForNestedType(t,e){return`${t}.${e}`}};function Ea(r){return new Q(r)}function Na(r){return new v(r)}function Ia(r){return new X(r)}function Aa(r){return new te(r)}function La(r){return new re(r)}function ka(r){return new ne(r)}function Ra(r){return new ie(r)}function Ba(r){return new ae(r)}function Ca(r){return new oe(r)}function Ma(r){return new se(r)}function Ua(r){return new le(r)}function Oa(r){return new ue(r)}function Da(r){return new fe(r)}function Fa(r){return new pe(r)}var Ze=class{constructor({context:t}){f(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":{let p=E.functionArgument({label:Re(a.name.camelCase.unsafeName),value:this.getSingleFileProperty({property:a,record:i})});n.fileFields.push(p);break}case"fileArray":{let p=E.functionArgument({label:Re(a.name.camelCase.unsafeName),value:this.getArrayFileProperty({property:a,record:i})});n.fileFields.push(p);break}case"bodyProperty":{let p=E.functionArgument({label:Re(a.name.name.camelCase.unsafeName),value:this.getBodyProperty({property:a,record:i})});n.bodyPropertyFields.push(p);break}default:S(a)}return n}getSingleFileProperty({property:t,record:e}){let n=this.context.getSingleFileValue({property:t,record:e});return E.Expression.contextualMethodCall({methodName:"init",arguments_:[E.functionArgument({label:"data",value:E.Expression.dataLiteral(n!=null?n:"")})]})}getArrayFileProperty({property:t,record:e}){let n=this.context.getFileArrayValues({property:t,record:e});return E.Expression.arrayLiteral({elements:(n!=null?n:[]).map(i=>E.Expression.contextualMethodCall({methodName:"init",arguments_:[E.functionArgument({label:"data",value:E.Expression.dataLiteral(i)})]})),multiline:!0})}getBodyProperty({property:t,record:e}){let n=e[t.name.wireValue];return n==null?E.Expression.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:n})}};0&&(module.exports={FilePropertyMapper});
20
- /*! Bundled license information:
21
-
22
- @esbuild-plugins/node-globals-polyfill/Buffer.js:
23
- (*!
24
- * The buffer module from node.js, for the browser.
25
- *
26
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
27
- * @license MIT
28
- *)
29
-
30
- lodash-es/lodash.js:
31
- (**
32
- * @license
33
- * Lodash (Custom Build) <https://lodash.com/>
34
- * Build: `lodash modularize exports="es" -o ./`
35
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
36
- * Released under MIT license <https://lodash.com/license>
37
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
38
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
39
- *)
40
- */
41
- //# sourceMappingURL=FilePropertyMapper.cjs.map