@fern-api/java-dynamic-snippets 0.0.3 → 0.0.5

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 (78) hide show
  1. package/cjs/Config.cjs +1 -0
  2. package/cjs/Config.cjs.map +1 -0
  3. package/cjs/DynamicSnippetsGenerator.cjs +25 -11
  4. package/cjs/DynamicSnippetsGenerator.cjs.map +1 -0
  5. package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
  6. package/cjs/{DynamicSnippetsGeneratorContext-B2BA5MLv.d.cts → DynamicSnippetsGeneratorContext-DGzYoCz3.d.cts} +19 -6
  7. package/cjs/EndpointSnippetGenerator.cjs +15 -7
  8. package/cjs/EndpointSnippetGenerator.cjs.map +1 -0
  9. package/cjs/EndpointSnippetGenerator.d.cts +4 -1
  10. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +25 -11
  11. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -0
  12. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
  13. package/cjs/context/DynamicTypeLiteralMapper.cjs +21 -7
  14. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -0
  15. package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
  16. package/cjs/context/DynamicTypeMapper.cjs +15 -7
  17. package/cjs/context/DynamicTypeMapper.cjs.map +1 -0
  18. package/cjs/context/DynamicTypeMapper.d.cts +1 -1
  19. package/cjs/context/FilePropertyMapper.cjs +15 -7
  20. package/cjs/context/FilePropertyMapper.cjs.map +1 -0
  21. package/cjs/context/FilePropertyMapper.d.cts +1 -1
  22. package/cjs/index.cjs +23 -21
  23. package/cjs/index.cjs.map +1 -0
  24. package/cjs/index.d.cts +2 -2
  25. package/esm/Config.js +2 -1
  26. package/esm/Config.js.map +1 -0
  27. package/esm/DynamicSnippetsGenerator.d.ts +1 -1
  28. package/esm/DynamicSnippetsGenerator.js +2 -1
  29. package/esm/DynamicSnippetsGenerator.js.map +1 -0
  30. package/esm/{DynamicSnippetsGeneratorContext-B2BA5MLv.d.ts → DynamicSnippetsGeneratorContext-DGzYoCz3.d.ts} +19 -6
  31. package/esm/EndpointSnippetGenerator.d.ts +4 -1
  32. package/esm/EndpointSnippetGenerator.js +2 -1
  33. package/esm/EndpointSnippetGenerator.js.map +1 -0
  34. package/esm/chunk-2U3YQWRZ.js +12 -0
  35. package/esm/chunk-2U3YQWRZ.js.map +1 -0
  36. package/esm/chunk-3X524Y2I.js +23 -0
  37. package/esm/chunk-3X524Y2I.js.map +1 -0
  38. package/esm/chunk-5CTXVUPZ.js +8 -0
  39. package/esm/chunk-5CTXVUPZ.js.map +1 -0
  40. package/esm/chunk-EOZMORS3.js +2 -0
  41. package/esm/chunk-EOZMORS3.js.map +1 -0
  42. package/esm/chunk-JFD4YVTW.js +15 -0
  43. package/esm/chunk-JFD4YVTW.js.map +1 -0
  44. package/esm/chunk-KQE3JYZ2.js +2 -0
  45. package/esm/chunk-KQE3JYZ2.js.map +1 -0
  46. package/esm/chunk-N3AIOPEV.js +2 -0
  47. package/esm/chunk-N3AIOPEV.js.map +1 -0
  48. package/esm/chunk-PBNDQMXA.js +2 -0
  49. package/esm/chunk-PBNDQMXA.js.map +1 -0
  50. package/esm/chunk-QH22Z5KY.js +2 -0
  51. package/esm/chunk-QH22Z5KY.js.map +1 -0
  52. package/esm/{chunk-452HWDL4.js → chunk-VYJE6STI.js} +2 -1
  53. package/esm/chunk-VYJE6STI.js.map +1 -0
  54. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
  55. package/esm/context/DynamicSnippetsGeneratorContext.js +2 -1
  56. package/esm/context/DynamicSnippetsGeneratorContext.js.map +1 -0
  57. package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
  58. package/esm/context/DynamicTypeLiteralMapper.js +2 -1
  59. package/esm/context/DynamicTypeLiteralMapper.js.map +1 -0
  60. package/esm/context/DynamicTypeMapper.d.ts +1 -1
  61. package/esm/context/DynamicTypeMapper.js +2 -1
  62. package/esm/context/DynamicTypeMapper.js.map +1 -0
  63. package/esm/context/FilePropertyMapper.d.ts +1 -1
  64. package/esm/context/FilePropertyMapper.js +2 -1
  65. package/esm/context/FilePropertyMapper.js.map +1 -0
  66. package/esm/index.d.ts +2 -2
  67. package/esm/index.js +2 -13
  68. package/esm/index.js.map +1 -0
  69. package/package.json +1 -1
  70. package/esm/chunk-2AZXIWKY.js +0 -11
  71. package/esm/chunk-7CY27UU7.js +0 -1
  72. package/esm/chunk-AASPH6YC.js +0 -15
  73. package/esm/chunk-BKM7JFLZ.js +0 -1
  74. package/esm/chunk-HN67B7VQ.js +0 -1
  75. package/esm/chunk-JSEUWNSK.js +0 -1
  76. package/esm/chunk-N3DIPQCT.js +0 -14
  77. package/esm/chunk-TTNRR5YY.js +0 -1
  78. package/esm/chunk-WFKWXM7L.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{b as m,d as y,e as u}from"./chunk-EOZMORS3.js";import{a as h,d as a}from"./chunk-3X524Y2I.js";import{f,h as B,i as A}from"./chunk-2U3YQWRZ.js";B();A();var q="com.example.usage",M="Example",L="main",E="args",b="client",S={type:"primitive",value:"STRING"},C=class{constructor({context:e,formatter:t}){f(this,"context");f(this,"formatter");this.context=e,this.formatter=t}async generateSnippet({endpoint:e,request:t,options:r}){var i;let n=this.getConfig(r);return await this.buildCodeBlock({endpoint:e,snippet:t,options:r}).toStringAsync({packageName:(i=n.fullStylePackageName)!=null?i:q,customConfig:this.context.customConfig,formatter:this.formatter})}generateSnippetSync({endpoint:e,request:t,options:r}){var i;let n=this.getConfig(r);return this.buildCodeBlock({endpoint:e,snippet:t,options:r}).toString({packageName:(i=n.fullStylePackageName)!=null?i:q,customConfig:this.context.customConfig,formatter:this.formatter})}buildCodeBlock({endpoint:e,snippet:t,options:r}){let n=a.codeblock(i=>{i.writeNodeStatement(this.constructClient({endpoint:e,snippet:t})),i.newLine(),i.writeNodeStatement(this.callMethod({endpoint:e,snippet:t}))}),s=this.getStyle(r);switch(s){case y.Concise:return n;case y.Full:return this.buildFullCodeBlock({body:n,options:r});default:h(s)}}constructClient({endpoint:e,snippet:t}){return a.codeblock(r=>{r.writeNode(this.context.getRootClientClassReference()),r.write(` ${b} = `),r.writeNode(a.TypeLiteral.builder({classReference:this.context.getRootClientClassReference(),parameters:this.getRootClientBuilderArgs({endpoint:e,snippet:t})}))})}buildFullCodeBlock({body:e,options:t}){var i;let r=this.getConfig(t),n=a.class_({name:(i=r.fullStyleClassName)!=null?i:M,access:a.Access.Public}),s=a.parameter({name:E,type:a.Type.array(a.Type.string())});return n.addMethod(a.method({name:L,access:a.Access.Public,static_:!0,parameters:[s],body:e})),n}getRootClientBuilderArgs({endpoint:e,snippet:t}){var o,p;let r=[];e.auth!=null&&(t.auth!=null?r.push(...this.getRootClientAuthArgs({auth:e.auth,values:t.auth})):this.context.errors.add({severity:m.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let n=this.getRootClientBaseUrlArg({baseUrl:t.baseURL,environment:t.environment});n!=null&&r.push(n),this.context.errors.scope(u.Headers),this.context.ir.headers!=null&&t.headers!=null&&r.push(...this.getRootClientHeaderArgs({headers:this.context.ir.headers,values:t.headers})),this.context.errors.unscope();let s=new Set;if([...(o=this.context.ir.pathParameters)!=null?o:[],...(p=e.request.pathParameters)!=null?p:[]].forEach(c=>{c.variable!=null&&s.add(c.variable)}),this.context.ir.variables!=null&&this.context.ir.variables.length>0){for(let c of this.context.ir.variables)if(s.has(c.id)){let l=c.name.camelCase.unsafeName;r.push({name:l,value:a.TypeLiteral.string(`YOUR_${c.name.screamingSnakeCase.unsafeName}`)})}}if(this.context.errors.scope(u.PathParameters),this.context.ir.pathParameters!=null&&this.context.ir.pathParameters.length>0){let c=this.context.ir.pathParameters.filter(l=>l.variable==null);c.length>0&&r.push(...this.getPathParameters({namedParameters:c,snippet:t}))}return this.context.errors.unscope(),r}getRootClientBaseUrlArg({baseUrl:e,environment:t}){var r;if(e!=null&&t!=null){this.context.errors.add({severity:m.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null){if(((r=this.context.ir.environments)==null?void 0:r.environments.type)==="multipleBaseUrls"){this.context.errors.add({severity:m.Critical,message:"The Java SDK doesn't support a baseUrl when multiple URL environments are configured"});return}return{name:"url",value:a.TypeLiteral.string(e)}}if(t!=null){if(this.context.isSingleEnvironmentID(t)){let n=this.context.getEnvironmentTypeReferenceFromID(t);if(n==null){this.context.errors.add({severity:m.Warning,message:`Environment ${JSON.stringify(t)} was not found`});return}return{name:"environment",value:a.TypeLiteral.reference(n)}}if(this.context.isMultiEnvironmentValues(t))return this.context.validateMultiEnvironmentUrlValues(t)?{name:"environment",value:a.TypeLiteral.reference(a.instantiateClass({classReference:this.context.getEnvironmentClassReference(),arguments_:Object.values(t).map(n=>this.context.dynamicTypeLiteralMapper.convert({typeReference:S,value:n}))}))}:void 0}}getRootClientAuthArgs({auth:e,values:t}){if(t.type!==e.type)return this.addError(this.context.newAuthMismatchError({auth:e,values:t}).message),[];switch(e.type){case"basic":return t.type==="basic"?this.getRootClientBasicAuthArgs({auth:e,values:t}):[];case"bearer":return t.type==="bearer"?this.getRootClientBearerAuthArgs({auth:e,values:t}):[];case"header":return t.type==="header"?this.getRootClientHeaderAuthArgs({auth:e,values:t}):[];case"oauth":return t.type==="oauth"?this.getRootClientOAuthArgs({auth:e,values:t}):[];case"inferred":return this.addWarning("The Java SDK Generator does not support Inferred auth scheme yet"),[];default:h(e)}}addError(e){this.context.errors.add({severity:m.Critical,message:e})}addWarning(e){this.context.errors.add({severity:m.Warning,message:e})}getRootClientBasicAuthArgs({auth:e,values:t}){return[{name:"credentials",value:a.TypeLiteral.raw(`"${t.username}", "${t.password}"`)}]}getRootClientBearerAuthArgs({auth:e,values:t}){return[{name:this.context.getMethodName(e.token),value:a.TypeLiteral.string(t.token)}]}getRootClientHeaderAuthArgs({auth:e,values:t}){return[{name:this.context.getMethodName(e.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:t.value})}]}getRootClientOAuthArgs({auth:e,values:t}){return[{name:this.context.getMethodName(e.clientId),value:a.TypeLiteral.string(t.clientId)},{name:this.context.getMethodName(e.clientSecret),value:a.TypeLiteral.string(t.clientSecret)}]}getRootClientHeaderArgs({headers:e,values:t}){let r=[];for(let n of e){let s=this.getRootClientHeaderArg({header:n,value:t.value});s!=null&&r.push({name:this.context.getMethodName(n.name.name),value:s})}return r}getRootClientHeaderArg({header:e,value:t}){let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:t});if(!a.TypeLiteral.isNop(r))return r}callMethod({endpoint:e,snippet:t}){return a.invokeMethod({on:a.codeblock(b),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:t})})}getMethodArgs({endpoint:e,snippet:t}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:t});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:t});default:h(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:t}){var i;let r=[];this.context.errors.scope(u.PathParameters);let n=((i=e.pathParameters)!=null?i:[]).filter(o=>o.variable==null);n.length>0&&r.push(...this.getPathParameters({namedParameters:n,snippet:t}).map(o=>o.value)),this.context.errors.unscope(),this.context.errors.scope(u.RequestBody),e.body!=null&&r.push(this.getBodyRequestArg({body:e.body,value:t.requestBody})),this.context.errors.unscope();let s=this.getRequestOptionsArg({request:e,snippet:t});return s!=null&&r.push(s),r}getBodyRequestArg({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":{if(e.value.type==="optional"){if(t==null)return a.TypeLiteral.reference(a.invokeMethod({on:a.classReference({name:"Optional",packageName:"java.util"}),method:"empty",arguments_:[]}));let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value.value,value:t,as:"request"});return r.toString({packageName:"com.example",customConfig:this.context.customConfig}).includes("Optional.empty()")?r:a.TypeLiteral.optional({value:r,useOf:!0})}return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t,as:"request"})}default:h(e)}}getBytesBodyRequestArg({value:e}){return e==null?a.TypeLiteral.bytes(""):typeof e!="string"?(this.context.errors.add({severity:m.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),a.TypeLiteral.nop()):a.TypeLiteral.bytes(e)}getMethodArgsForInlinedRequest({request:e,snippet:t}){var c;let r=[],{inlinePathParameters:n,inlineFileProperties:s}={inlinePathParameters:this.context.shouldInlinePathParameters(),inlineFileProperties:this.context.shouldInlineFileProperties()};this.context.errors.scope(u.PathParameters);let i=[],o=((c=e.pathParameters)!=null?c:[]).filter(l=>l.variable==null);o.length>0&&i.push(...this.getPathParameters({namedParameters:o,snippet:t})),this.context.errors.unscope(),this.context.errors.scope(u.RequestBody);let p=this.getFilePropertyInfo({request:e,snippet:t});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:n})||r.push(...i.map(l=>l.value)),s||r.push(...p.fileFields.map(l=>l.value)),r.push(this.getInlinedRequestArg({request:e,snippet:t,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:n})?i:[],filePropertyInfo:p})),r}getFilePropertyInfo({request:e,snippet:t}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:t.requestBody})}getInlinedRequestArg({request:e,snippet:t,pathParameterFields:r,filePropertyInfo:n}){var v,P,R,x,F,I;this.context.errors.scope(u.QueryParameters);let i=this.context.associateQueryParametersByWireValue({parameters:(v=e.queryParameters)!=null?v:[],values:(P=t.queryParameters)!=null?P:{}}).filter(d=>!this.context.isDirectLiteral(d.typeReference)),p=this.context.sortTypeInstancesByRequiredFirst(i,(R=e.queryParameters)!=null?R:[]).map(d=>({name:this.context.getMethodName(d.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:d.typeReference,value:d.value,as:"request"})}));this.context.errors.unscope(),this.context.errors.scope(u.Headers);let l=this.context.associateByWireValue({parameters:(x=e.headers)!=null?x:[],values:(F=t.headers)!=null?F:{}}).filter(d=>!this.context.isDirectLiteral(d.typeReference)),T=this.context.sortTypeInstancesByRequiredFirst(l,(I=e.headers)!=null?I:[]).map(d=>({name:this.context.getMethodName(d.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:d.typeReference,value:d.value,as:"request"})}));this.context.errors.unscope(),this.context.errors.scope(u.RequestBody);let N=e.body!=null?this.getInlinedRequestBodyBuilderParameters({body:e.body,value:t.requestBody,filePropertyInfo:n}):[];return this.context.errors.unscope(),a.TypeLiteral.builder({classReference:a.classReference({name:this.context.getClassName(e.declaration.name),packageName:this.context.getRequestsPackageName(e.declaration.fernFilepath)}),parameters:[...r,...T,...p,...N]})}getRequestOptionsArg({request:e,snippet:t}){var p,c,l;let r="headers"in e?(p=e.headers)!=null?p:[]:[];if(r.length===0||Object.keys((c=t.headers)!=null?c:{}).length===0)return;this.context.errors.scope(u.Headers);let n=this.context.associateByWireValue({parameters:r,values:(l=t.headers)!=null?l:{}});if(this.context.errors.unscope(),n.length===0)return;let s=a.classReference({name:"RequestOptions",packageName:this.context.getCorePackageName()}),i=a.invokeMethod({on:s,method:"builder",arguments_:[]});for(let g of n)i=a.invokeMethod({on:i,method:"addHeader",arguments_:[a.TypeLiteral.string(g.name.wireValue),this.context.dynamicTypeLiteralMapper.convert(g)]});let o=a.invokeMethod({on:i,method:"build",arguments_:[]});return a.TypeLiteral.reference(o)}getInlinedRequestBodyBuilderParameters({body:e,value:t,filePropertyInfo:r}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyBuilderParameters({parameters:e.value,value:t});case"referenced":return[this.getReferencedRequestBodyPropertyBuilderParameter({body:e,value:t})];case"fileUpload":return this.getFileUploadRequestBodyBuilderParameters({filePropertyInfo:r});default:h(e)}}getFileUploadRequestBodyBuilderParameters({filePropertyInfo:e}){return this.context.shouldInlineFileProperties()?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyBuilderParameter({body:e,value:t}){return{name:this.context.getMethodName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:t})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t,as:"request"});default:h(e)}}getInlinedRequestBodyPropertyBuilderParameters({parameters:e,value:t}){var i;let n=this.context.associateByWireValue({parameters:e,values:(i=this.context.getRecord(t))!=null?i:{}}).filter(o=>!this.context.isDirectLiteral(o.typeReference));return this.context.sortTypeInstancesByRequiredFirst(n,e).map(o=>({name:this.context.getMethodName(o.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:o.typeReference,value:o.value,as:"request"})}))}getPathParameters({namedParameters:e,snippet:t}){var s;let r=[],n=this.context.associateByWireValue({parameters:e,values:(s=t.pathParameters)!=null?s:{}});for(let i of n)r.push({name:this.context.getMethodName(i.name.name),value:this.context.dynamicTypeLiteralMapper.convert(i)});return r}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(t=>`${this.context.getMethodName(t)}()`).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getStyle(e){var t,r;return(r=(t=e.style)!=null?t:this.context.options.style)!=null?r:y.Full}getConfig(e){var t,r;return(r=(t=e.config)!=null?t:this.context.options.config)!=null?r:{}}};export{C as a};
2
+ //# sourceMappingURL=chunk-KQE3JYZ2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/EndpointSnippetGenerator.ts"],"sourcesContent":["import { AbstractFormatter, Options, Scope, Severity, Style } from \"@fern-api/browser-compatible-base-generator\";\nimport { assertNever } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { java } from \"@fern-api/java-ast\";\n\nimport { Config } from \"./Config\";\nimport { DynamicSnippetsGeneratorContext } from \"./context/DynamicSnippetsGeneratorContext\";\nimport { FilePropertyInfo } from \"./context/FilePropertyMapper\";\n\nconst SNIPPET_PACKAGE_NAME = \"com.example.usage\";\nconst SNIPPET_CLASS_NAME = \"Example\";\nconst SNIPPET_METHOD_NAME = \"main\";\nconst SNIPPET_METHOD_ARG = \"args\";\nconst CLIENT_VAR_NAME = \"client\";\nconst STRING_TYPE_REFERENCE: FernIr.dynamic.TypeReference = {\n type: \"primitive\",\n value: \"STRING\"\n};\n\nexport class EndpointSnippetGenerator {\n private context: DynamicSnippetsGeneratorContext;\n private formatter: AbstractFormatter | undefined;\n\n constructor({ context, formatter }: { context: DynamicSnippetsGeneratorContext; formatter?: AbstractFormatter }) {\n this.context = context;\n this.formatter = formatter;\n }\n\n public async generateSnippet({\n endpoint,\n request,\n options\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n request: FernIr.dynamic.EndpointSnippetRequest;\n options: Options;\n }): Promise<string> {\n const config = this.getConfig(options);\n const code = this.buildCodeBlock({ endpoint, snippet: request, options });\n return await code.toStringAsync({\n packageName: config.fullStylePackageName ?? SNIPPET_PACKAGE_NAME,\n customConfig: this.context.customConfig,\n formatter: this.formatter\n });\n }\n\n public generateSnippetSync({\n endpoint,\n request,\n options\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n request: FernIr.dynamic.EndpointSnippetRequest;\n options: Options;\n }): string {\n const config = this.getConfig(options);\n const code = this.buildCodeBlock({ endpoint, snippet: request, options });\n return code.toString({\n packageName: config.fullStylePackageName ?? SNIPPET_PACKAGE_NAME,\n customConfig: this.context.customConfig,\n formatter: this.formatter\n });\n }\n\n private buildCodeBlock({\n endpoint,\n snippet,\n options\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n options: Options;\n }): java.AstNode {\n const body = java.codeblock((writer) => {\n writer.writeNodeStatement(this.constructClient({ endpoint, snippet }));\n writer.newLine();\n writer.writeNodeStatement(this.callMethod({ endpoint, snippet }));\n });\n const style = this.getStyle(options);\n switch (style) {\n case Style.Concise:\n return body;\n case Style.Full:\n return this.buildFullCodeBlock({ body, options });\n default:\n assertNever(style);\n }\n }\n\n private constructClient({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): java.CodeBlock {\n return java.codeblock((writer) => {\n writer.writeNode(this.context.getRootClientClassReference());\n writer.write(` ${CLIENT_VAR_NAME} = `);\n writer.writeNode(\n java.TypeLiteral.builder({\n classReference: this.context.getRootClientClassReference(),\n parameters: this.getRootClientBuilderArgs({ endpoint, snippet })\n })\n );\n });\n }\n\n private buildFullCodeBlock({ body, options }: { body: java.CodeBlock; options: Options }): java.AstNode {\n const config = this.getConfig(options);\n const class_ = java.class_({\n name: config.fullStyleClassName ?? SNIPPET_CLASS_NAME,\n access: java.Access.Public\n });\n const stringArgs = java.parameter({\n name: SNIPPET_METHOD_ARG,\n type: java.Type.array(java.Type.string())\n });\n class_.addMethod(\n java.method({\n name: SNIPPET_METHOD_NAME,\n access: java.Access.Public,\n static_: true,\n parameters: [stringArgs],\n body\n })\n );\n return class_;\n }\n\n private getRootClientBuilderArgs({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): java.BuilderParameter[] {\n const builderArgs: java.BuilderParameter[] = [];\n if (endpoint.auth != null) {\n if (snippet.auth != null) {\n builderArgs.push(...this.getRootClientAuthArgs({ auth: endpoint.auth, values: snippet.auth }));\n } else {\n this.context.errors.add({\n severity: Severity.Warning,\n message: `Auth with ${endpoint.auth.type} configuration is required for this endpoint`\n });\n }\n }\n const baseUrlArg = this.getRootClientBaseUrlArg({\n baseUrl: snippet.baseURL,\n environment: snippet.environment\n });\n if (baseUrlArg != null) {\n builderArgs.push(baseUrlArg);\n }\n this.context.errors.scope(Scope.Headers);\n if (this.context.ir.headers != null && snippet.headers != null) {\n builderArgs.push(\n ...this.getRootClientHeaderArgs({ headers: this.context.ir.headers, values: snippet.headers })\n );\n }\n this.context.errors.unscope();\n\n const usedVariables = new Set<string>();\n const allPathParams = [...(this.context.ir.pathParameters ?? []), ...(endpoint.request.pathParameters ?? [])];\n\n allPathParams.forEach((param) => {\n if (param.variable != null) {\n usedVariables.add(param.variable);\n }\n });\n\n if (this.context.ir.variables != null && this.context.ir.variables.length > 0) {\n for (const variable of this.context.ir.variables) {\n if (usedVariables.has(variable.id)) {\n const variableName = variable.name.camelCase.unsafeName;\n builderArgs.push({\n name: variableName,\n value: java.TypeLiteral.string(`YOUR_${variable.name.screamingSnakeCase.unsafeName}`)\n });\n }\n }\n }\n\n this.context.errors.scope(Scope.PathParameters);\n if (this.context.ir.pathParameters != null && this.context.ir.pathParameters.length > 0) {\n const apiPathParams = this.context.ir.pathParameters.filter((param) => param.variable == null);\n if (apiPathParams.length > 0) {\n builderArgs.push(...this.getPathParameters({ namedParameters: apiPathParams, snippet }));\n }\n }\n this.context.errors.unscope();\n\n return builderArgs;\n }\n\n private getRootClientBaseUrlArg({\n baseUrl,\n environment\n }: {\n baseUrl: string | undefined;\n environment: FernIr.dynamic.EnvironmentValues | undefined;\n }): java.BuilderParameter | undefined {\n if (baseUrl != null && environment != null) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: \"Cannot specify both baseUrl and environment options\"\n });\n return undefined;\n }\n if (baseUrl != null) {\n if (this.context.ir.environments?.environments.type === \"multipleBaseUrls\") {\n this.context.errors.add({\n severity: Severity.Critical,\n message: \"The Java SDK doesn't support a baseUrl when multiple URL environments are configured\"\n });\n return undefined;\n }\n return {\n name: \"url\",\n value: java.TypeLiteral.string(baseUrl)\n };\n }\n if (environment != null) {\n if (this.context.isSingleEnvironmentID(environment)) {\n const classReference = this.context.getEnvironmentTypeReferenceFromID(environment);\n if (classReference == null) {\n this.context.errors.add({\n severity: Severity.Warning,\n message: `Environment ${JSON.stringify(environment)} was not found`\n });\n return undefined;\n }\n return {\n name: \"environment\",\n value: java.TypeLiteral.reference(classReference)\n };\n }\n if (this.context.isMultiEnvironmentValues(environment)) {\n if (!this.context.validateMultiEnvironmentUrlValues(environment)) {\n return undefined;\n }\n return {\n name: \"environment\",\n value: java.TypeLiteral.reference(\n java.instantiateClass({\n classReference: this.context.getEnvironmentClassReference(),\n arguments_: Object.values(environment).map((value) =>\n this.context.dynamicTypeLiteralMapper.convert({\n typeReference: STRING_TYPE_REFERENCE,\n value\n })\n )\n })\n )\n };\n }\n }\n return undefined;\n }\n\n private getRootClientAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.Auth;\n values: FernIr.dynamic.AuthValues;\n }): java.BuilderParameter[] {\n if (values.type !== auth.type) {\n this.addError(this.context.newAuthMismatchError({ auth, values }).message);\n return [];\n }\n switch (auth.type) {\n case \"basic\":\n return values.type === \"basic\" ? this.getRootClientBasicAuthArgs({ auth, values }) : [];\n case \"bearer\":\n return values.type === \"bearer\" ? this.getRootClientBearerAuthArgs({ auth, values }) : [];\n case \"header\":\n return values.type === \"header\" ? this.getRootClientHeaderAuthArgs({ auth, values }) : [];\n case \"oauth\":\n return values.type === \"oauth\" ? this.getRootClientOAuthArgs({ auth, values }) : [];\n case \"inferred\":\n this.addWarning(\"The Java SDK Generator does not support Inferred auth scheme yet\");\n return [];\n default:\n assertNever(auth);\n }\n }\n\n private addError(message: string): void {\n this.context.errors.add({ severity: Severity.Critical, message });\n }\n\n private addWarning(message: string): void {\n this.context.errors.add({ severity: Severity.Warning, message });\n }\n\n private getRootClientBasicAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.BasicAuth;\n values: FernIr.dynamic.BasicAuthValues;\n }): java.BuilderParameter[] {\n return [\n {\n name: \"credentials\",\n value: java.TypeLiteral.raw(`\"${values.username}\", \"${values.password}\"`)\n }\n ];\n }\n\n private getRootClientBearerAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.BearerAuth;\n values: FernIr.dynamic.BearerAuthValues;\n }): java.BuilderParameter[] {\n return [\n {\n name: this.context.getMethodName(auth.token),\n value: java.TypeLiteral.string(values.token)\n }\n ];\n }\n\n private getRootClientHeaderAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.HeaderAuth;\n values: FernIr.dynamic.HeaderAuthValues;\n }): java.BuilderParameter[] {\n return [\n {\n name: this.context.getMethodName(auth.header.name.name),\n value: this.context.dynamicTypeLiteralMapper.convert({\n typeReference: auth.header.typeReference,\n value: values.value\n })\n }\n ];\n }\n\n private getRootClientOAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.OAuth;\n values: FernIr.dynamic.OAuthValues;\n }): java.BuilderParameter[] {\n return [\n {\n name: this.context.getMethodName(auth.clientId),\n value: java.TypeLiteral.string(values.clientId)\n },\n {\n name: this.context.getMethodName(auth.clientSecret),\n value: java.TypeLiteral.string(values.clientSecret)\n }\n ];\n }\n\n private getRootClientHeaderArgs({\n headers,\n values\n }: {\n headers: FernIr.dynamic.NamedParameter[];\n values: FernIr.dynamic.Values;\n }): java.BuilderParameter[] {\n const args: java.BuilderParameter[] = [];\n for (const header of headers) {\n const arg = this.getRootClientHeaderArg({ header, value: values.value });\n if (arg != null) {\n args.push({\n name: this.context.getMethodName(header.name.name),\n value: arg\n });\n }\n }\n return args;\n }\n\n private getRootClientHeaderArg({\n header,\n value\n }: {\n header: FernIr.dynamic.NamedParameter;\n value: unknown;\n }): java.TypeLiteral | undefined {\n const typeLiteral = this.context.dynamicTypeLiteralMapper.convert({\n typeReference: header.typeReference,\n value\n });\n if (java.TypeLiteral.isNop(typeLiteral)) {\n // Literal header values (e.g. \"X-API-Version\") should not be included in the\n // client constructor.\n return undefined;\n }\n return typeLiteral;\n }\n\n private callMethod({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): java.MethodInvocation {\n return java.invokeMethod({\n on: java.codeblock(CLIENT_VAR_NAME),\n method: this.getMethod({ endpoint }),\n arguments_: this.getMethodArgs({ endpoint, snippet })\n });\n }\n\n private getMethodArgs({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): java.TypeLiteral[] {\n switch (endpoint.request.type) {\n case \"inlined\":\n return this.getMethodArgsForInlinedRequest({ request: endpoint.request, snippet });\n case \"body\":\n return this.getMethodArgsForBodyRequest({ request: endpoint.request, snippet });\n default:\n assertNever(endpoint.request);\n }\n }\n\n private getMethodArgsForBodyRequest({\n request,\n snippet\n }: {\n request: FernIr.dynamic.BodyRequest;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): java.TypeLiteral[] {\n const args: java.TypeLiteral[] = [];\n\n this.context.errors.scope(Scope.PathParameters);\n // Only include endpoint-level path parameters that don't reference variables\n // Variables are configured at client level, not passed as method args\n const pathParameters = (request.pathParameters ?? []).filter((param) => param.variable == null);\n if (pathParameters.length > 0) {\n args.push(\n ...this.getPathParameters({ namedParameters: pathParameters, snippet }).map((field) => field.value)\n );\n }\n this.context.errors.unscope();\n\n this.context.errors.scope(Scope.RequestBody);\n if (request.body != null) {\n args.push(this.getBodyRequestArg({ body: request.body, value: snippet.requestBody }));\n }\n this.context.errors.unscope();\n\n // For body requests, headers are passed via RequestOptions\n const requestOptionsArg = this.getRequestOptionsArg({ request, snippet });\n if (requestOptionsArg != null) {\n args.push(requestOptionsArg);\n }\n\n return args;\n }\n\n private getBodyRequestArg({\n body,\n value\n }: {\n body: FernIr.dynamic.ReferencedRequestBodyType;\n value: unknown;\n }): java.TypeLiteral {\n switch (body.type) {\n case \"bytes\": {\n return this.getBytesBodyRequestArg({ value });\n }\n case \"typeReference\": {\n if (body.value.type === \"optional\") {\n // TODO(amckinney): This endpoint defines an optional request body, so the\n // Java SDK requires the Optional.of(...) wrapper.\n //\n // We should fix the generator to permit the non-Optional type and\n // remove this special case.\n\n // Check if value is undefined/null and use Optional.empty() in that case\n if (value === undefined || value === null) {\n return java.TypeLiteral.reference(\n java.invokeMethod({\n on: java.classReference({\n name: \"Optional\",\n packageName: \"java.util\"\n }),\n method: \"empty\",\n arguments_: []\n })\n );\n }\n\n const convertedValue = this.context.dynamicTypeLiteralMapper.convert({\n typeReference: body.value.value,\n value,\n as: \"request\"\n });\n\n // Check if the converted value is already Optional.empty() to avoid double-wrapping\n const convertedValueStr = convertedValue.toString({\n packageName: \"com.example\",\n customConfig: this.context.customConfig\n });\n\n if (convertedValueStr.includes(\"Optional.empty()\")) {\n return convertedValue;\n }\n\n return java.TypeLiteral.optional({\n value: convertedValue,\n useOf: true\n });\n }\n return this.context.dynamicTypeLiteralMapper.convert({\n typeReference: body.value,\n value,\n as: \"request\"\n });\n }\n default:\n assertNever(body);\n }\n }\n\n private getBytesBodyRequestArg({ value }: { value: unknown }): java.TypeLiteral {\n if (value === undefined || value === null) {\n return java.TypeLiteral.bytes(\"\");\n }\n if (typeof value !== \"string\") {\n this.context.errors.add({\n severity: Severity.Critical,\n message: `Expected bytes value to be a string, got ${typeof value}`\n });\n return java.TypeLiteral.nop();\n }\n return java.TypeLiteral.bytes(value as string);\n }\n\n private getMethodArgsForInlinedRequest({\n request,\n snippet\n }: {\n request: FernIr.dynamic.InlinedRequest;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): java.TypeLiteral[] {\n const args: java.TypeLiteral[] = [];\n\n const { inlinePathParameters, inlineFileProperties } = {\n inlinePathParameters: this.context.shouldInlinePathParameters(),\n inlineFileProperties: this.context.shouldInlineFileProperties()\n };\n\n this.context.errors.scope(Scope.PathParameters);\n const pathParameterFields: java.BuilderParameter[] = [];\n // Only include endpoint-level path parameters that don't reference variables\n const nonVariablePathParams = (request.pathParameters ?? []).filter((param) => param.variable == null);\n if (nonVariablePathParams.length > 0) {\n pathParameterFields.push(...this.getPathParameters({ namedParameters: nonVariablePathParams, snippet }));\n }\n this.context.errors.unscope();\n\n this.context.errors.scope(Scope.RequestBody);\n const filePropertyInfo = this.getFilePropertyInfo({ request, snippet });\n this.context.errors.unscope();\n\n if (\n !this.context.includePathParametersInWrappedRequest({\n request,\n inlinePathParameters\n })\n ) {\n args.push(...pathParameterFields.map((field) => field.value));\n }\n\n // For now, the Java SDK always includes file properties as positional parameters.\n if (!inlineFileProperties) {\n args.push(...filePropertyInfo.fileFields.map((field) => field.value));\n }\n\n // For now, the Java SDK always requires the inlined request parameter.\n args.push(\n this.getInlinedRequestArg({\n request,\n snippet,\n pathParameterFields: this.context.includePathParametersInWrappedRequest({\n request,\n inlinePathParameters\n })\n ? pathParameterFields\n : [],\n filePropertyInfo\n })\n );\n\n return args;\n }\n\n private getFilePropertyInfo({\n request,\n snippet\n }: {\n request: FernIr.dynamic.InlinedRequest;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): FilePropertyInfo {\n if (request.body == null || !this.context.isFileUploadRequestBody(request.body)) {\n return {\n fileFields: [],\n bodyPropertyFields: []\n };\n }\n return this.context.filePropertyMapper.getFilePropertyInfo({\n body: request.body,\n value: snippet.requestBody\n });\n }\n\n private getInlinedRequestArg({\n request,\n snippet,\n pathParameterFields,\n filePropertyInfo\n }: {\n request: FernIr.dynamic.InlinedRequest;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n pathParameterFields: java.BuilderParameter[];\n filePropertyInfo: FilePropertyInfo;\n }): java.TypeLiteral {\n this.context.errors.scope(Scope.QueryParameters);\n const queryParameters = this.context.associateQueryParametersByWireValue({\n parameters: request.queryParameters ?? [],\n values: snippet.queryParameters ?? {}\n });\n const filteredQueryParameters = queryParameters.filter(\n (queryParameter) => !this.context.isDirectLiteral(queryParameter.typeReference)\n );\n const sortedQueryParameters = this.context.sortTypeInstancesByRequiredFirst(\n filteredQueryParameters,\n request.queryParameters ?? []\n );\n const queryParameterFields = sortedQueryParameters.map((queryParameter) => ({\n name: this.context.getMethodName(queryParameter.name.name),\n value: this.context.dynamicTypeLiteralMapper.convert({\n typeReference: queryParameter.typeReference,\n value: queryParameter.value,\n as: \"request\"\n })\n }));\n this.context.errors.unscope();\n\n this.context.errors.scope(Scope.Headers);\n const headers = this.context.associateByWireValue({\n parameters: request.headers ?? [],\n values: snippet.headers ?? {}\n });\n const filteredHeaders = headers.filter((header) => !this.context.isDirectLiteral(header.typeReference));\n const sortedHeaders = this.context.sortTypeInstancesByRequiredFirst(filteredHeaders, request.headers ?? []);\n const headerFields = sortedHeaders.map((header) => ({\n name: this.context.getMethodName(header.name.name),\n value: this.context.dynamicTypeLiteralMapper.convert({\n typeReference: header.typeReference,\n value: header.value,\n as: \"request\"\n })\n }));\n this.context.errors.unscope();\n\n this.context.errors.scope(Scope.RequestBody);\n const requestBodyFields =\n request.body != null\n ? this.getInlinedRequestBodyBuilderParameters({\n body: request.body,\n value: snippet.requestBody,\n filePropertyInfo\n })\n : [];\n this.context.errors.unscope();\n\n return java.TypeLiteral.builder({\n classReference: java.classReference({\n name: this.context.getClassName(request.declaration.name),\n packageName: this.context.getRequestsPackageName(request.declaration.fernFilepath)\n }),\n parameters: [...pathParameterFields, ...headerFields, ...queryParameterFields, ...requestBodyFields]\n });\n }\n\n private getRequestOptionsArg({\n request,\n snippet\n }: {\n request: FernIr.dynamic.InlinedRequest | FernIr.dynamic.BodyRequest;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): java.TypeLiteral | undefined {\n const requestHeaders = \"headers\" in request ? (request.headers ?? []) : [];\n\n if (requestHeaders.length === 0 || Object.keys(snippet.headers ?? {}).length === 0) {\n return undefined;\n }\n\n this.context.errors.scope(Scope.Headers);\n const headers = this.context.associateByWireValue({\n parameters: requestHeaders,\n values: snippet.headers ?? {}\n });\n this.context.errors.unscope();\n\n if (headers.length === 0) {\n return undefined;\n }\n\n const requestOptionsClass = java.classReference({\n name: \"RequestOptions\",\n packageName: this.context.getCorePackageName()\n });\n\n let builderChain: java.AstNode = java.invokeMethod({\n on: requestOptionsClass,\n method: \"builder\",\n arguments_: []\n });\n\n for (const header of headers) {\n builderChain = java.invokeMethod({\n on: builderChain,\n method: \"addHeader\",\n arguments_: [\n java.TypeLiteral.string(header.name.wireValue),\n this.context.dynamicTypeLiteralMapper.convert(header)\n ]\n });\n }\n\n const buildMethodCall = java.invokeMethod({\n on: builderChain,\n method: \"build\",\n arguments_: []\n });\n\n return java.TypeLiteral.reference(buildMethodCall);\n }\n\n private getInlinedRequestBodyBuilderParameters({\n body,\n value,\n filePropertyInfo\n }: {\n body: FernIr.dynamic.InlinedRequestBody;\n value: unknown;\n filePropertyInfo: FilePropertyInfo;\n }): java.BuilderParameter[] {\n switch (body.type) {\n case \"properties\":\n return this.getInlinedRequestBodyPropertyBuilderParameters({ parameters: body.value, value });\n case \"referenced\":\n return [this.getReferencedRequestBodyPropertyBuilderParameter({ body, value })];\n case \"fileUpload\":\n return this.getFileUploadRequestBodyBuilderParameters({ filePropertyInfo });\n default:\n assertNever(body);\n }\n }\n\n private getFileUploadRequestBodyBuilderParameters({\n filePropertyInfo\n }: {\n filePropertyInfo: FilePropertyInfo;\n }): java.BuilderParameter[] {\n if (this.context.shouldInlineFileProperties()) {\n return [...filePropertyInfo.fileFields, ...filePropertyInfo.bodyPropertyFields];\n }\n return filePropertyInfo.bodyPropertyFields;\n }\n\n private getReferencedRequestBodyPropertyBuilderParameter({\n body,\n value\n }: {\n body: FernIr.dynamic.ReferencedRequestBody;\n value: unknown;\n }): java.BuilderParameter {\n return {\n name: this.context.getMethodName(body.bodyKey),\n value: this.getReferencedRequestBodyPropertyTypeLiteral({ body: body.bodyType, value })\n };\n }\n\n private getReferencedRequestBodyPropertyTypeLiteral({\n body,\n value\n }: {\n body: FernIr.dynamic.ReferencedRequestBodyType;\n value: unknown;\n }): java.TypeLiteral {\n switch (body.type) {\n case \"bytes\":\n return this.getBytesBodyRequestArg({ value });\n case \"typeReference\":\n return this.context.dynamicTypeLiteralMapper.convert({\n typeReference: body.value,\n value,\n as: \"request\"\n });\n default:\n assertNever(body);\n }\n }\n\n private getInlinedRequestBodyPropertyBuilderParameters({\n parameters,\n value\n }: {\n parameters: FernIr.dynamic.NamedParameter[];\n value: unknown;\n }): java.BuilderParameter[] {\n const bodyProperties = this.context.associateByWireValue({\n parameters,\n values: this.context.getRecord(value) ?? {}\n });\n const filteredProperties = bodyProperties.filter(\n (parameter) => !this.context.isDirectLiteral(parameter.typeReference)\n );\n const sortedProperties = this.context.sortTypeInstancesByRequiredFirst(filteredProperties, parameters);\n return sortedProperties.map((parameter) => ({\n name: this.context.getMethodName(parameter.name.name),\n value: this.context.dynamicTypeLiteralMapper.convert({\n typeReference: parameter.typeReference,\n value: parameter.value,\n as: \"request\"\n })\n }));\n }\n\n private getPathParameters({\n namedParameters,\n snippet\n }: {\n namedParameters: FernIr.dynamic.NamedParameter[];\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): java.BuilderParameter[] {\n const args: java.BuilderParameter[] = [];\n const pathParameters = this.context.associateByWireValue({\n parameters: namedParameters,\n values: snippet.pathParameters ?? {}\n });\n for (const parameter of pathParameters) {\n args.push({\n name: this.context.getMethodName(parameter.name.name),\n value: this.context.dynamicTypeLiteralMapper.convert(parameter)\n });\n }\n return args;\n }\n\n private getMethod({ endpoint }: { endpoint: FernIr.dynamic.Endpoint }): string {\n if (endpoint.declaration.fernFilepath.allParts.length > 0) {\n return `${endpoint.declaration.fernFilepath.allParts\n .map((val) => `${this.context.getMethodName(val)}()`)\n .join(\".\")}.${this.context.getMethodName(endpoint.declaration.name)}`;\n }\n return this.context.getMethodName(endpoint.declaration.name);\n }\n\n private getStyle(options: Options): Style {\n return options.style ?? this.context.options.style ?? Style.Full;\n }\n\n private getConfig(options: Options): Config {\n return options.config ?? this.context.options.config ?? {};\n }\n}\n"],"mappings":"sJAAAA,IAAAC,IASA,IAAMC,EAAuB,oBACvBC,EAAqB,UACrBC,EAAsB,OACtBC,EAAqB,OACrBC,EAAkB,SAClBC,EAAsD,CACxD,KAAM,YACN,MAAO,QACX,EAEaC,EAAN,KAA+B,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K+D,GAAQ,GAAG,KAAK,QAAQ,cAAcA,CAAG,CAAC,IAAI,EACnD,KAAK,GAAG,CAAC,IAAI,KAAK,QAAQ,cAAc/D,EAAS,YAAY,IAAI,CAAC,GAEpE,KAAK,QAAQ,cAAcA,EAAS,YAAY,IAAI,CAC/D,CAEQ,SAASE,EAAyB,CAx2B9C,IAAAC,EAAAW,EAy2BQ,OAAOA,GAAAX,EAAAD,EAAQ,QAAR,KAAAC,EAAiB,KAAK,QAAQ,QAAQ,QAAtC,KAAAW,EAA+CJ,EAAM,IAChE,CAEQ,UAAUR,EAA0B,CA52BhD,IAAAC,EAAAW,EA62BQ,OAAOA,GAAAX,EAAAD,EAAQ,SAAR,KAAAC,EAAkB,KAAK,QAAQ,QAAQ,SAAvC,KAAAW,EAAiD,CAAC,CAC7D,CACJ","names":["init_process","init_buffer","SNIPPET_PACKAGE_NAME","SNIPPET_CLASS_NAME","SNIPPET_METHOD_NAME","SNIPPET_METHOD_ARG","CLIENT_VAR_NAME","STRING_TYPE_REFERENCE","EndpointSnippetGenerator","context","formatter","__publicField","endpoint","request","options","_a","config","snippet","body","java_exports","writer","style","Style","assertNever","class_","stringArgs","_b","builderArgs","Severity","baseUrlArg","Scope","usedVariables","param","variable","variableName","apiPathParams","baseUrl","environment","classReference","value","auth","values","message","headers","args","header","arg","typeLiteral","pathParameters","field","requestOptionsArg","convertedValue","inlinePathParameters","inlineFileProperties","pathParameterFields","nonVariablePathParams","filePropertyInfo","_c","_d","_e","_f","filteredQueryParameters","queryParameter","queryParameterFields","filteredHeaders","headerFields","requestBodyFields","requestHeaders","requestOptionsClass","builderChain","buildMethodCall","parameters","filteredProperties","parameter","namedParameters","val"]}
@@ -0,0 +1,2 @@
1
+ import{h as e,i as l}from"./chunk-2U3YQWRZ.js";e();l();
2
+ //# sourceMappingURL=chunk-N3AIOPEV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/Config.ts"],"sourcesContent":["// Config for the Java dynamic snippets generator\nexport interface Config {\n // Controls the name of the class that is generated for the full style.\n // By default, the class is named \"Example\", i.e.\n //\n // package com.example.usage;\n //\n // class Example {\n // public static void do() {\n // var client = new Client();\n // ...\n // }\n // }\n fullStyleClassName?: string;\n fullStylePackageName?: string;\n}\n"],"mappings":"+CAAAA,IAAAC","names":["init_process","init_buffer"]}
@@ -0,0 +1,2 @@
1
+ import{a as r,d as t}from"./chunk-3X524Y2I.js";import{f as a,h as c,i}from"./chunk-2U3YQWRZ.js";c();i();var p=class{constructor({context:e}){a(this,"context");this.context=e}convert(e){switch(e.typeReference.type){case"list":return t.Type.list(this.convert({typeReference:e.typeReference}));case"literal":return this.convertLiteral({literal:e.typeReference.value});case"map":return t.Type.map(this.convert({typeReference:e.typeReference.key}),this.convert({typeReference:e.typeReference.value}));case"named":{let n=this.context.resolveNamedType({typeId:e.typeReference.value});return n==null?this.convertUnknown():this.convertNamed({named:n})}case"optional":case"nullable":return t.Type.optional(this.convert({typeReference:e.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:e.typeReference.value});case"set":return t.Type.set(this.convert({typeReference:e.typeReference}));case"unknown":return this.convertUnknown();default:r(e.typeReference)}}convertNamed({named:e}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference});case"enum":case"discriminatedUnion":case"object":case"undiscriminatedUnion":return t.Type.reference(t.classReference({name:this.context.getClassName(e.declaration.name),packageName:this.context.getTypesPackageName(e.declaration.fernFilepath)}));default:r(e)}}convertLiteral({literal:e}){switch(e.type){case"boolean":return t.Type.boolean();case"string":return t.Type.string()}}convertUnknown(){return t.Type.object()}convertPrimitive({primitive:e}){switch(e){case"INTEGER":return t.Type.integer();case"UINT":return t.Type.integer();case"LONG":return t.Type.long();case"UINT_64":return t.Type.long();case"FLOAT":return t.Type.float();case"DOUBLE":return t.Type.double();case"BOOLEAN":return t.Type.boolean();case"STRING":return t.Type.string();case"DATE":return t.Type.date();case"DATE_TIME":return t.Type.dateTime();case"UUID":return t.Type.uuid();case"BASE_64":return t.Type.bytes();case"BIG_INTEGER":return t.Type.bigInteger();default:r(e)}}};export{p as a};
2
+ //# sourceMappingURL=chunk-PBNDQMXA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/context/DynamicTypeMapper.ts"],"sourcesContent":["import { assertNever } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { java } from \"@fern-api/java-ast\";\n\nimport { DynamicSnippetsGeneratorContext } from \"./DynamicSnippetsGeneratorContext\";\n\nexport declare namespace DynamicTypeMapper {\n interface Args {\n typeReference: FernIr.dynamic.TypeReference;\n }\n}\n\nexport class DynamicTypeMapper {\n private context: DynamicSnippetsGeneratorContext;\n\n constructor({ context }: { context: DynamicSnippetsGeneratorContext }) {\n this.context = context;\n }\n\n public convert(args: DynamicTypeMapper.Args): java.Type {\n switch (args.typeReference.type) {\n case \"list\":\n return java.Type.list(this.convert({ typeReference: args.typeReference }));\n case \"literal\":\n return this.convertLiteral({ literal: args.typeReference.value });\n case \"map\": {\n return java.Type.map(\n this.convert({ typeReference: args.typeReference.key }),\n this.convert({ typeReference: args.typeReference.value })\n );\n }\n case \"named\": {\n const named = this.context.resolveNamedType({ typeId: args.typeReference.value });\n if (named == null) {\n return this.convertUnknown();\n }\n return this.convertNamed({ named });\n }\n case \"optional\":\n case \"nullable\": {\n return java.Type.optional(this.convert({ typeReference: args.typeReference.value }));\n }\n case \"primitive\":\n return this.convertPrimitive({ primitive: args.typeReference.value });\n case \"set\":\n return java.Type.set(this.convert({ typeReference: args.typeReference }));\n case \"unknown\":\n return this.convertUnknown();\n default:\n assertNever(args.typeReference);\n }\n }\n\n private convertNamed({ named }: { named: FernIr.dynamic.NamedType }): java.Type {\n switch (named.type) {\n case \"alias\":\n return this.convert({ typeReference: named.typeReference });\n case \"enum\":\n case \"discriminatedUnion\":\n case \"object\":\n case \"undiscriminatedUnion\":\n return java.Type.reference(\n java.classReference({\n name: this.context.getClassName(named.declaration.name),\n packageName: this.context.getTypesPackageName(named.declaration.fernFilepath)\n })\n );\n default:\n assertNever(named);\n }\n }\n\n private convertLiteral({ literal }: { literal: FernIr.dynamic.LiteralType }): java.Type {\n switch (literal.type) {\n case \"boolean\":\n return java.Type.boolean();\n case \"string\":\n return java.Type.string();\n }\n }\n\n private convertUnknown(): java.Type {\n return java.Type.object();\n }\n\n private convertPrimitive({ primitive }: { primitive: FernIr.dynamic.PrimitiveTypeV1 }): java.Type {\n switch (primitive) {\n case \"INTEGER\":\n return java.Type.integer();\n case \"UINT\":\n return java.Type.integer();\n case \"LONG\":\n return java.Type.long();\n case \"UINT_64\":\n return java.Type.long();\n case \"FLOAT\":\n return java.Type.float();\n case \"DOUBLE\":\n return java.Type.double();\n case \"BOOLEAN\":\n return java.Type.boolean();\n case \"STRING\":\n return java.Type.string();\n case \"DATE\":\n return java.Type.date();\n case \"DATE_TIME\":\n return java.Type.dateTime();\n case \"UUID\":\n return java.Type.uuid();\n case \"BASE_64\":\n return java.Type.bytes();\n case \"BIG_INTEGER\":\n return java.Type.bigInteger();\n default:\n assertNever(primitive);\n }\n }\n}\n"],"mappings":"gGAAAA,IAAAC,IAYO,IAAMC,EAAN,KAAwB,CAG3B,YAAY,CAAE,QAAAC,CAAQ,EAAiD,CAFvEC,EAAA,KAAQ,WAGJ,KAAK,QAAUD,CACnB,CAEO,QAAQE,EAAyC,CACpD,OAAQA,EAAK,cAAc,KAAM,CAC7B,IAAK,OACD,OAAOC,EAAK,KAAK,KAAK,KAAK,QAAQ,CAAE,cAAeD,EAAK,aAAc,CAAC,CAAC,EAC7E,IAAK,UACD,OAAO,KAAK,eAAe,CAAE,QAASA,EAAK,cAAc,KAAM,CAAC,EACpE,IAAK,MACD,OAAOC,EAAK,KAAK,IACb,KAAK,QAAQ,CAAE,cAAeD,EAAK,cAAc,GAAI,CAAC,EACtD,KAAK,QAAQ,CAAE,cAAeA,EAAK,cAAc,KAAM,CAAC,CAC5D,EAEJ,IAAK,QAAS,CACV,IAAME,EAAQ,KAAK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AK,KAAK,QAAQ,EAC7B,IAAK,OACD,OAAOA,EAAK,KAAK,KAAK,EAC1B,IAAK,UACD,OAAOA,EAAK,KAAK,KAAK,EAC1B,IAAK,QACD,OAAOA,EAAK,KAAK,MAAM,EAC3B,IAAK,SACD,OAAOA,EAAK,KAAK,OAAO,EAC5B,IAAK,UACD,OAAOA,EAAK,KAAK,QAAQ,EAC7B,IAAK,SACD,OAAOA,EAAK,KAAK,OAAO,EAC5B,IAAK,OACD,OAAOA,EAAK,KAAK,KAAK,EAC1B,IAAK,YACD,OAAOA,EAAK,KAAK,SAAS,EAC9B,IAAK,OACD,OAAOA,EAAK,KAAK,KAAK,EAC1B,IAAK,UACD,OAAOA,EAAK,KAAK,MAAM,EAC3B,IAAK,cACD,OAAOA,EAAK,KAAK,WAAW,EAChC,QACIE,EAAYE,CAAS,CAC7B,CACJ,CACJ","names":["init_process","init_buffer","DynamicTypeMapper","context","__publicField","args","java_exports","named","assertNever","literal","primitive"]}
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-KQE3JYZ2.js";import{a as i}from"./chunk-JFD4YVTW.js";import{a as o}from"./chunk-EOZMORS3.js";import{f as t,h as r,i as p}from"./chunk-2U3YQWRZ.js";r();p();var s=class extends o{constructor({ir:e,config:n,options:c={}}){super(new i({ir:e,config:n,options:c}));t(this,"formatter")}async generate(e,n={}){return super.generate(e,n)}generateSync(e,n={}){return super.generateSync(e,n)}createSnippetGenerator(e){return new a({context:e})}};export{s as a};
2
+ //# sourceMappingURL=chunk-QH22Z5KY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/DynamicSnippetsGenerator.ts"],"sourcesContent":["import {\n AbstractDynamicSnippetsGenerator,\n AbstractFormatter,\n FernGeneratorExec,\n Options\n} from \"@fern-api/browser-compatible-base-generator\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { DynamicSnippetsGeneratorContext } from \"./context/DynamicSnippetsGeneratorContext\";\nimport { EndpointSnippetGenerator } from \"./EndpointSnippetGenerator\";\n\nexport class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<\n DynamicSnippetsGeneratorContext,\n EndpointSnippetGenerator\n> {\n private formatter: AbstractFormatter | undefined;\n\n constructor({\n ir,\n config,\n options = {}\n }: {\n ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n config: FernGeneratorExec.GeneratorConfig;\n options?: Options;\n }) {\n super(new DynamicSnippetsGeneratorContext({ ir, config, options }));\n }\n\n public async generate(\n request: FernIr.dynamic.EndpointSnippetRequest,\n options: Options = {}\n ): Promise<FernIr.dynamic.EndpointSnippetResponse> {\n return super.generate(request, options);\n }\n\n public generateSync(\n request: FernIr.dynamic.EndpointSnippetRequest,\n options: Options = {}\n ): FernIr.dynamic.EndpointSnippetResponse {\n return super.generateSync(request, options);\n }\n\n protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator {\n return new EndpointSnippetGenerator({ context });\n }\n}\n"],"mappings":"yKAAAA,IAAAC,IAUO,IAAMC,EAAN,cAAuCC,CAG5C,CAGE,YAAY,CACR,GAAAC,EACA,OAAAC,EACA,QAAAC,EAAU,CAAC,CACf,EAIG,CACC,MAAM,IAAIC,EAAgC,CAAE,GAAAH,EAAI,OAAAC,EAAQ,QAAAC,CAAQ,CAAC,CAAC,EAXtEE,EAAA,KAAQ,YAYR,CAEA,MAAa,SACTC,EACAH,EAAmB,CAAC,EAC2B,CAC/C,OAAO,MAAM,SAASG,EAASH,CAAO,CAC1C,CAEO,aACHG,EACAH,EAAmB,CAAC,EACkB,CACtC,OAAO,MAAM,aAAaG,EAASH,CAAO,CAC9C,CAEU,uBAAuBI,EAAoE,CACjG,OAAO,IAAIC,EAAyB,CAAE,QAAAD,CAAQ,CAAC,CACnD,CACJ","names":["init_process","init_buffer","DynamicSnippetsGenerator","AbstractDynamicSnippetsGenerator","ir","config","options","DynamicSnippetsGeneratorContext","__publicField","request","context","EndpointSnippetGenerator"]}
@@ -1 +1,2 @@
1
- import{a as s,c as n}from"./chunk-AASPH6YC.js";import{j as l,k as p,m as y}from"./chunk-2AZXIWKY.js";p();y();var c=class{constructor({context:r}){l(this,"context");this.context=r}getFilePropertyInfo({body:r,value:o}){var a;let e={fileFields:[],bodyPropertyFields:[]},i=(a=this.context.getRecord(o))!=null?a:{};for(let t of r.properties)switch(t.type){case"file":e.fileFields.push({name:this.context.getMethodName(t.name),value:this.getSingleFileProperty({property:t,record:i})});break;case"fileArray":e.fileFields.push({name:this.context.getMethodName(t.name),value:this.getArrayFileProperty({property:t,record:i})});break;case"bodyProperty":e.bodyPropertyFields.push({name:this.context.getMethodName(t.name.name),value:this.getBodyProperty({property:t,record:i})});break;default:s(t)}return e}getSingleFileProperty({property:r,record:o}){let e=this.context.getSingleFileValue({property:r,record:o});return e==null?n.TypeLiteral.nop():n.TypeLiteral.reference(this.context.getFileStreamFromString(e))}getArrayFileProperty({property:r,record:o}){let e=this.context.getFileArrayValues({property:r,record:o});if(e==null)return n.TypeLiteral.nop();for(let i of e)return n.TypeLiteral.reference(this.context.getFileStreamFromString(i));return n.TypeLiteral.nop()}getBodyProperty({property:r,record:o}){let e=o[r.name.wireValue];return e==null?n.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:r.typeReference,value:e})}};export{c as a};
1
+ import{a as s,d as n}from"./chunk-3X524Y2I.js";import{f as l,h as p,i as y}from"./chunk-2U3YQWRZ.js";p();y();var c=class{constructor({context:r}){l(this,"context");this.context=r}getFilePropertyInfo({body:r,value:o}){var a;let e={fileFields:[],bodyPropertyFields:[]},i=(a=this.context.getRecord(o))!=null?a:{};for(let t of r.properties)switch(t.type){case"file":e.fileFields.push({name:this.context.getMethodName(t.name),value:this.getSingleFileProperty({property:t,record:i})});break;case"fileArray":e.fileFields.push({name:this.context.getMethodName(t.name),value:this.getArrayFileProperty({property:t,record:i})});break;case"bodyProperty":e.bodyPropertyFields.push({name:this.context.getMethodName(t.name.name),value:this.getBodyProperty({property:t,record:i})});break;default:s(t)}return e}getSingleFileProperty({property:r,record:o}){let e=this.context.getSingleFileValue({property:r,record:o});return e==null?n.TypeLiteral.nop():n.TypeLiteral.reference(this.context.getFileStreamFromString(e))}getArrayFileProperty({property:r,record:o}){let e=this.context.getFileArrayValues({property:r,record:o});if(e==null)return n.TypeLiteral.nop();for(let i of e)return n.TypeLiteral.reference(this.context.getFileStreamFromString(i));return n.TypeLiteral.nop()}getBodyProperty({property:r,record:o}){let e=o[r.name.wireValue];return e==null?n.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:r.typeReference,value:e})}};export{c as a};
2
+ //# sourceMappingURL=chunk-VYJE6STI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/context/FilePropertyMapper.ts"],"sourcesContent":["import { assertNever } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { java } from \"@fern-api/java-ast\";\n\nimport { DynamicSnippetsGeneratorContext } from \"./DynamicSnippetsGeneratorContext\";\n\nexport interface FilePropertyInfo {\n fileFields: java.BuilderParameter[];\n bodyPropertyFields: java.BuilderParameter[];\n}\n\nexport class FilePropertyMapper {\n private context: DynamicSnippetsGeneratorContext;\n\n constructor({ context }: { context: DynamicSnippetsGeneratorContext }) {\n this.context = context;\n }\n\n public getFilePropertyInfo({\n body,\n value\n }: {\n body: FernIr.dynamic.FileUploadRequestBody;\n value: unknown;\n }): FilePropertyInfo {\n const result: FilePropertyInfo = {\n fileFields: [],\n bodyPropertyFields: []\n };\n const record = this.context.getRecord(value) ?? {};\n for (const property of body.properties) {\n switch (property.type) {\n case \"file\":\n result.fileFields.push({\n name: this.context.getMethodName(property.name),\n value: this.getSingleFileProperty({ property, record })\n });\n break;\n case \"fileArray\":\n result.fileFields.push({\n name: this.context.getMethodName(property.name),\n value: this.getArrayFileProperty({ property, record })\n });\n break;\n case \"bodyProperty\":\n result.bodyPropertyFields.push({\n name: this.context.getMethodName(property.name.name),\n value: this.getBodyProperty({ property, record })\n });\n break;\n default:\n assertNever(property);\n }\n }\n return result;\n }\n\n private getSingleFileProperty({\n property,\n record\n }: {\n property: FernIr.dynamic.FileUploadRequestBodyProperty.File_;\n record: Record<string, unknown>;\n }): java.TypeLiteral {\n const fileValue = this.context.getSingleFileValue({ property, record });\n if (fileValue == null) {\n return java.TypeLiteral.nop();\n }\n return java.TypeLiteral.reference(this.context.getFileStreamFromString(fileValue));\n }\n\n private getArrayFileProperty({\n property,\n record\n }: {\n property: FernIr.dynamic.FileUploadRequestBodyProperty.FileArray;\n record: Record<string, unknown>;\n }): java.TypeLiteral {\n const fileValues = this.context.getFileArrayValues({ property, record });\n if (fileValues == null) {\n return java.TypeLiteral.nop();\n }\n for (const fileValue of fileValues) {\n // The Java SDK doesn't support file array properties correctly, so we just\n // return a single file stream.\n return java.TypeLiteral.reference(this.context.getFileStreamFromString(fileValue));\n }\n return java.TypeLiteral.nop();\n }\n\n private getBodyProperty({\n property,\n record\n }: {\n property: FernIr.dynamic.NamedParameter;\n record: Record<string, unknown>;\n }): java.TypeLiteral {\n const bodyPropertyValue = record[property.name.wireValue];\n if (bodyPropertyValue == null) {\n return java.TypeLiteral.nop();\n }\n return this.context.dynamicTypeLiteralMapper.convert({\n typeReference: property.typeReference,\n value: bodyPropertyValue\n });\n }\n}\n"],"mappings":"qGAAAA,IAAAC,IAWO,IAAMC,EAAN,KAAyB,CAG5B,YAAY,CAAE,QAAAC,CAAQ,EAAiD,CAFvEC,EAAA,KAAQ,WAGJ,KAAK,QAAUD,CACnB,CAEO,oBAAoB,CACvB,KAAAE,EACA,MAAAC,CACJ,EAGqB,CAxBzB,IAAAC,EAyBQ,IAAMC,EAA2B,CAC7B,WAAY,CAAC,EACb,mBAAoB,CAAC,CACzB,EACMC,GAASF,EAAA,KAAK,QAAQ,UAAUD,CAAK,IAA5B,KAAAC,EAAiC,CAAC,EACjD,QAAWG,KAAYL,EAAK,WACxB,OAAQK,EAAS,KAAM,CACnB,IAAK,OACDF,EAAO,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AEzB,KAAK,QAAQ,yBAAyB,QAAQ,CACjD,cAAeH,EAAS,cACxB,MAAOK,CACX,CAAC,CACL,CACJ","names":["init_process","init_buffer","FilePropertyMapper","context","__publicField","body","value","_a","result","record","property","assertNever","fileValue","java_exports","fileValues","bodyPropertyValue"]}
@@ -1,4 +1,4 @@
1
1
  import '@fern-api/browser-compatible-base-generator';
2
2
  import '@fern-api/dynamic-ir-sdk';
3
3
  import '@fern-api/java-ast';
4
- export { D as DynamicSnippetsGeneratorContext } from '../DynamicSnippetsGeneratorContext-B2BA5MLv.js';
4
+ export { D as DynamicSnippetsGeneratorContext } from '../DynamicSnippetsGeneratorContext-DGzYoCz3.js';
@@ -1 +1,2 @@
1
- import{a}from"../chunk-N3DIPQCT.js";import"../chunk-JSEUWNSK.js";import"../chunk-WFKWXM7L.js";import"../chunk-7CY27UU7.js";import"../chunk-452HWDL4.js";import"../chunk-AASPH6YC.js";import"../chunk-2AZXIWKY.js";export{a as DynamicSnippetsGeneratorContext};
1
+ import{a}from"../chunk-JFD4YVTW.js";import"../chunk-5CTXVUPZ.js";import"../chunk-EOZMORS3.js";import"../chunk-PBNDQMXA.js";import"../chunk-VYJE6STI.js";import"../chunk-3X524Y2I.js";import"../chunk-2U3YQWRZ.js";export{a as DynamicSnippetsGeneratorContext};
2
+ //# sourceMappingURL=DynamicSnippetsGeneratorContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,4 +1,4 @@
1
1
  import '@fern-api/dynamic-ir-sdk';
2
2
  import '@fern-api/java-ast';
3
- export { a as DynamicTypeLiteralMapper } from '../DynamicSnippetsGeneratorContext-B2BA5MLv.js';
3
+ export { a as DynamicTypeLiteralMapper } from '../DynamicSnippetsGeneratorContext-DGzYoCz3.js';
4
4
  import '@fern-api/browser-compatible-base-generator';
@@ -1 +1,2 @@
1
- import{a}from"../chunk-JSEUWNSK.js";import"../chunk-WFKWXM7L.js";import"../chunk-AASPH6YC.js";import"../chunk-2AZXIWKY.js";export{a as DynamicTypeLiteralMapper};
1
+ import{a}from"../chunk-5CTXVUPZ.js";import"../chunk-EOZMORS3.js";import"../chunk-3X524Y2I.js";import"../chunk-2U3YQWRZ.js";export{a as DynamicTypeLiteralMapper};
2
+ //# sourceMappingURL=DynamicTypeLiteralMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -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-B2BA5MLv.js';
3
+ export { b as DynamicTypeMapper } from '../DynamicSnippetsGeneratorContext-DGzYoCz3.js';
4
4
  import '@fern-api/browser-compatible-base-generator';
@@ -1 +1,2 @@
1
- import{a}from"../chunk-7CY27UU7.js";import"../chunk-AASPH6YC.js";import"../chunk-2AZXIWKY.js";export{a as DynamicTypeMapper};
1
+ import{a}from"../chunk-PBNDQMXA.js";import"../chunk-3X524Y2I.js";import"../chunk-2U3YQWRZ.js";export{a as DynamicTypeMapper};
2
+ //# sourceMappingURL=DynamicTypeMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,4 +1,4 @@
1
1
  import '@fern-api/dynamic-ir-sdk';
2
2
  import '@fern-api/java-ast';
3
- export { F as FilePropertyInfo, c as FilePropertyMapper } from '../DynamicSnippetsGeneratorContext-B2BA5MLv.js';
3
+ export { F as FilePropertyInfo, c as FilePropertyMapper } from '../DynamicSnippetsGeneratorContext-DGzYoCz3.js';
4
4
  import '@fern-api/browser-compatible-base-generator';
@@ -1 +1,2 @@
1
- import{a}from"../chunk-452HWDL4.js";import"../chunk-AASPH6YC.js";import"../chunk-2AZXIWKY.js";export{a as FilePropertyMapper};
1
+ import{a}from"../chunk-VYJE6STI.js";import"../chunk-3X524Y2I.js";import"../chunk-2U3YQWRZ.js";export{a as FilePropertyMapper};
2
+ //# sourceMappingURL=FilePropertyMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/esm/index.d.ts CHANGED
@@ -2,6 +2,6 @@ export { Config } from './Config.js';
2
2
  export { DynamicSnippetsGenerator } from './DynamicSnippetsGenerator.js';
3
3
  import '@fern-api/browser-compatible-base-generator';
4
4
  import '@fern-api/dynamic-ir-sdk';
5
- import './EndpointSnippetGenerator.js';
6
- import './DynamicSnippetsGeneratorContext-B2BA5MLv.js';
5
+ import './DynamicSnippetsGeneratorContext-DGzYoCz3.js';
7
6
  import '@fern-api/java-ast';
7
+ import './EndpointSnippetGenerator.js';
package/esm/index.js CHANGED
@@ -1,13 +1,2 @@
1
- import"./chunk-HN67B7VQ.js";import{a as yu}from"./chunk-BKM7JFLZ.js";import"./chunk-TTNRR5YY.js";import"./chunk-N3DIPQCT.js";import"./chunk-JSEUWNSK.js";import"./chunk-WFKWXM7L.js";import"./chunk-7CY27UU7.js";import"./chunk-452HWDL4.js";import"./chunk-AASPH6YC.js";import{e as be,f as l,g as su,h as lu,i as cu,k as o,l as p,m as i}from"./chunk-2AZXIWKY.js";var Lt=l((Ql,kt)=>{"use strict";o();i();var vu="Function.prototype.bind called on incompatible ",gu=Object.prototype.toString,du=Math.max,hu="[object Function]",Wt=function(r,t){for(var n=[],a=0;a<r.length;a+=1)n[a]=r[a];for(var u=0;u<t.length;u+=1)n[u+r.length]=t[u];return n},mu=function(r,t){for(var n=[],a=t||0,u=0;a<r.length;a+=1,u+=1)n[u]=r[a];return n},bu=function(e,r){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=r);return t};kt.exports=function(r){var t=this;if(typeof t!="function"||gu.apply(t)!==hu)throw new TypeError(vu+t);for(var n=mu(arguments,1),a,u=function(){if(this instanceof a){var g=t.apply(this,Wt(n,arguments));return Object(g)===g?g:this}return t.apply(r,Wt(n,arguments))},f=du(0,t.length-n.length),c=[],y=0;y<f;y++)c[y]="$"+y;if(a=Function("binder","return function ("+bu(c,",")+"){ return binder.apply(this,arguments); }")(u),t.prototype){var h=function(){};h.prototype=t.prototype,a.prototype=new h,h.prototype=null}return a}});var L=l((rc,zt)=>{"use strict";o();i();var Su=Lt();zt.exports=Function.prototype.bind||Su});var Se=l((nc,Jt)=>{"use strict";o();i();Jt.exports=Error});var Ae=l((ac,Ht)=>{"use strict";o();i();Ht.exports=EvalError});var we=l((pc,Kt)=>{"use strict";o();i();Kt.exports=RangeError});var Pe=l((cc,Vt)=>{"use strict";o();i();Vt.exports=ReferenceError});var Ur=l((gc,Yt)=>{"use strict";o();i();Yt.exports=SyntaxError});var w=l((mc,Qt)=>{"use strict";o();i();Qt.exports=TypeError});var Oe=l((Ac,Xt)=>{"use strict";o();i();Xt.exports=URIError});var rn=l((Oc,Zt)=>{"use strict";o();i();Zt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;r[t]=a;for(t in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var u=Object.getOwnPropertySymbols(r);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(r,t);if(f.value!==a||f.enumerable!==!0)return!1}return!0}});var Ee=l((xc,tn)=>{"use strict";o();i();var en=typeof Symbol!="undefined"&&Symbol,Au=rn();tn.exports=function(){return typeof en!="function"||typeof Symbol!="function"||typeof en("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Au()}});var on=l((Fc,nn)=>{"use strict";o();i();var qe={__proto__:null,foo:{}},wu=Object;nn.exports=function(){return{__proto__:qe}.foo===qe.foo&&!(qe instanceof wu)}});var xe=l((Nc,an)=>{"use strict";o();i();var Pu=Function.prototype.call,Ou=Object.prototype.hasOwnProperty,Eu=L();an.exports=Eu.call(Pu,Ou)});var F=l((Dc,ln)=>{"use strict";o();i();var m,qu=Se(),xu=Ae(),$u=we(),Iu=Pe(),tr=Ur(),er=w(),Fu=Oe(),sn=Function,$e=function(e){try{return sn('"use strict"; return ('+e+").constructor;")()}catch(r){}},z=Object.getOwnPropertyDescriptor;if(z)try{z({},"")}catch(e){z=null}var Ie=function(){throw new er},Tu=z?function(){try{return arguments.callee,Ie}catch(e){try{return z(arguments,"callee").get}catch(r){return Ie}}}():Ie,Z=Ee()(),Ru=on()(),O=Object.getPrototypeOf||(Ru?function(e){return e.__proto__}:null),rr={},Nu=typeof Uint8Array=="undefined"||!O?m:O(Uint8Array),J={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?m:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?m:ArrayBuffer,"%ArrayIteratorPrototype%":Z&&O?O([][Symbol.iterator]()):m,"%AsyncFromSyncIteratorPrototype%":m,"%AsyncFunction%":rr,"%AsyncGenerator%":rr,"%AsyncGeneratorFunction%":rr,"%AsyncIteratorPrototype%":rr,"%Atomics%":typeof Atomics=="undefined"?m:Atomics,"%BigInt%":typeof BigInt=="undefined"?m:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?m:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?m:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?m:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":qu,"%eval%":eval,"%EvalError%":xu,"%Float32Array%":typeof Float32Array=="undefined"?m:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?m:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?m:FinalizationRegistry,"%Function%":sn,"%GeneratorFunction%":rr,"%Int8Array%":typeof Int8Array=="undefined"?m:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?m:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?m:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Z&&O?O(O([][Symbol.iterator]())):m,"%JSON%":typeof JSON=="object"?JSON:m,"%Map%":typeof Map=="undefined"?m:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Z||!O?m:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?m:Promise,"%Proxy%":typeof Proxy=="undefined"?m:Proxy,"%RangeError%":$u,"%ReferenceError%":Iu,"%Reflect%":typeof Reflect=="undefined"?m:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?m:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Z||!O?m:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?m:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Z&&O?O(""[Symbol.iterator]()):m,"%Symbol%":Z?Symbol:m,"%SyntaxError%":tr,"%ThrowTypeError%":Tu,"%TypedArray%":Nu,"%TypeError%":er,"%Uint8Array%":typeof Uint8Array=="undefined"?m:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?m:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?m:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?m:Uint32Array,"%URIError%":Fu,"%WeakMap%":typeof WeakMap=="undefined"?m:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?m:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?m:WeakSet};if(O)try{null.error}catch(e){un=O(O(e)),J["%Error.prototype%"]=un}var un,_u=function e(r){var t;if(r==="%AsyncFunction%")t=$e("async function () {}");else if(r==="%GeneratorFunction%")t=$e("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=$e("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&O&&(t=O(a.prototype))}return J[r]=t,t},fn={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},vr=L(),Dr=xe(),Uu=vr.call(Function.call,Array.prototype.concat),Du=vr.call(Function.apply,Array.prototype.splice),pn=vr.call(Function.call,String.prototype.replace),Br=vr.call(Function.call,String.prototype.slice),Bu=vr.call(Function.call,RegExp.prototype.exec),Mu=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cu=/\\(\\)?/g,ju=function(r){var t=Br(r,0,1),n=Br(r,-1);if(t==="%"&&n!=="%")throw new tr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new tr("invalid intrinsic syntax, expected opening `%`");var a=[];return pn(r,Mu,function(u,f,c,y){a[a.length]=c?pn(y,Cu,"$1"):f||u}),a},Gu=function(r,t){var n=r,a;if(Dr(fn,n)&&(a=fn[n],n="%"+a[0]+"%"),Dr(J,n)){var u=J[n];if(u===rr&&(u=_u(n)),typeof u=="undefined"&&!t)throw new er("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:u}}throw new tr("intrinsic "+r+" does not exist!")};ln.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new er("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new er('"allowMissing" argument must be a boolean');if(Bu(/^%?[^%]*%?$/,r)===null)throw new tr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ju(r),a=n.length>0?n[0]:"",u=Gu("%"+a+"%",t),f=u.name,c=u.value,y=!1,h=u.alias;h&&(a=h[0],Du(n,Uu([0,1],h)));for(var g=1,d=!0;g<n.length;g+=1){var v=n[g],A=Br(v,0,1),P=Br(v,-1);if((A==='"'||A==="'"||A==="`"||P==='"'||P==="'"||P==="`")&&A!==P)throw new tr("property names with quotes must have matching quotes");if((v==="constructor"||!d)&&(y=!0),a+="."+v,f="%"+a+"%",Dr(J,f))c=J[f];else if(c!=null){if(!(v in c)){if(!t)throw new er("base intrinsic for "+r+" exists, but the property is not available.");return}if(z&&g+1>=n.length){var S=z(c,v);d=!!S,d&&"get"in S&&!("originalValue"in S.get)?c=S.get:c=c[v]}else d=Dr(c,v),c=c[v];d&&!y&&(J[f]=c)}}return c}});var Fe=l((Cc,cn)=>{"use strict";o();i();cn.exports=Object});var vn=l((Wc,yn)=>{"use strict";o();i();yn.exports=Math.abs});var dn=l((zc,gn)=>{"use strict";o();i();gn.exports=Math.floor});var mn=l((Kc,hn)=>{"use strict";o();i();hn.exports=Math.max});var Sn=l((Qc,bn)=>{"use strict";o();i();bn.exports=Math.min});var wn=l((ry,An)=>{"use strict";o();i();An.exports=Math.pow});var On=l((ny,Pn)=>{"use strict";o();i();Pn.exports=Math.round});var qn=l((ay,En)=>{"use strict";o();i();En.exports=Number.isNaN||function(r){return r!==r}});var $n=l((py,xn)=>{"use strict";o();i();var Wu=qn();xn.exports=function(r){return Wu(r)||r===0?r:r<0?-1:1}});var Fn=l((cy,In)=>{"use strict";o();i();In.exports=Object.getOwnPropertyDescriptor});var gr=l((gy,Tn)=>{"use strict";o();i();var Mr=Fn();if(Mr)try{Mr([],"length")}catch(e){Mr=null}Tn.exports=Mr});var jr=l((my,Rn)=>{"use strict";o();i();var Cr=Object.defineProperty||!1;if(Cr)try{Cr({},"a",{value:1})}catch(e){Cr=!1}Rn.exports=Cr});var Te=l((Ay,Nn)=>{"use strict";o();i();Nn.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;r[t]=a;for(var u in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var f=Object.getOwnPropertySymbols(r);if(f.length!==1||f[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(r,t);if(c.value!==a||c.enumerable!==!0)return!1}return!0}});var Dn=l((Oy,Un)=>{"use strict";o();i();var _n=typeof Symbol!="undefined"&&Symbol,ku=Te();Un.exports=function(){return typeof _n!="function"||typeof Symbol!="function"||typeof _n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ku()}});var Re=l((xy,Bn)=>{"use strict";o();i();Bn.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Ne=l((Fy,Mn)=>{"use strict";o();i();var Lu=Fe();Mn.exports=Lu.getPrototypeOf||null});var Gr=l((Ny,Cn)=>{"use strict";o();i();Cn.exports=Function.prototype.call});var _e=l((Dy,jn)=>{"use strict";o();i();jn.exports=Function.prototype.apply});var Wn=l((Cy,Gn)=>{"use strict";o();i();Gn.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Ln=l((Wy,kn)=>{"use strict";o();i();var zu=L(),Ju=_e(),Hu=Gr(),Ku=Wn();kn.exports=Ku||zu.call(Hu,Ju)});var Jn=l((zy,zn)=>{"use strict";o();i();var Vu=L(),Yu=w(),Qu=Gr(),Xu=Ln();zn.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new Yu("a function is required");return Xu(Vu,Qu,r)}});var Xn=l((Ky,Qn)=>{"use strict";o();i();var Zu=Jn(),Hn=gr(),Vn;try{Vn=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ue=!!Vn&&Hn&&Hn(Object.prototype,"__proto__"),Yn=Object,Kn=Yn.getPrototypeOf;Qn.exports=Ue&&typeof Ue.get=="function"?Zu([Ue.get]):typeof Kn=="function"?function(r){return Kn(r==null?r:Yn(r))}:!1});var no=l((Qy,to)=>{"use strict";o();i();var Zn=Re(),ro=Ne(),eo=Xn();to.exports=Zn?function(r){return Zn(r)}:ro?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return ro(r)}:eo?function(r){return eo(r)}:null});var Me=l((rv,po)=>{"use strict";o();i();var b,rf=Fe(),ef=Se(),tf=Ae(),nf=we(),of=Pe(),ar=Ur(),ir=w(),af=Oe(),uf=vn(),ff=dn(),pf=mn(),sf=Sn(),lf=wn(),cf=On(),yf=$n(),uo=Function,De=function(e){try{return uo('"use strict"; return ('+e+").constructor;")()}catch(r){}},dr=gr(),vf=jr(),Be=function(){throw new ir},gf=dr?function(){try{return arguments.callee,Be}catch(e){try{return dr(arguments,"callee").get}catch(r){return Be}}}():Be,nr=Dn()(),E=no(),df=Ne(),hf=Re(),fo=_e(),hr=Gr(),or={},mf=typeof Uint8Array=="undefined"||!E?b:E(Uint8Array),H={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?b:ArrayBuffer,"%ArrayIteratorPrototype%":nr&&E?E([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":or,"%AsyncGenerator%":or,"%AsyncGeneratorFunction%":or,"%AsyncIteratorPrototype%":or,"%Atomics%":typeof Atomics=="undefined"?b:Atomics,"%BigInt%":typeof BigInt=="undefined"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ef,"%eval%":eval,"%EvalError%":tf,"%Float32Array%":typeof Float32Array=="undefined"?b:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?b:FinalizationRegistry,"%Function%":uo,"%GeneratorFunction%":or,"%Int8Array%":typeof Int8Array=="undefined"?b:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?b:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":nr&&E?E(E([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map=="undefined"?b:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!nr||!E?b:E(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":rf,"%Object.getOwnPropertyDescriptor%":dr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?b:Promise,"%Proxy%":typeof Proxy=="undefined"?b:Proxy,"%RangeError%":nf,"%ReferenceError%":of,"%Reflect%":typeof Reflect=="undefined"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?b:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!nr||!E?b:E(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":nr&&E?E(""[Symbol.iterator]()):b,"%Symbol%":nr?Symbol:b,"%SyntaxError%":ar,"%ThrowTypeError%":gf,"%TypedArray%":mf,"%TypeError%":ir,"%Uint8Array%":typeof Uint8Array=="undefined"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?b:Uint32Array,"%URIError%":af,"%WeakMap%":typeof WeakMap=="undefined"?b:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?b:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?b:WeakSet,"%Function.prototype.call%":hr,"%Function.prototype.apply%":fo,"%Object.defineProperty%":vf,"%Object.getPrototypeOf%":df,"%Math.abs%":uf,"%Math.floor%":ff,"%Math.max%":pf,"%Math.min%":sf,"%Math.pow%":lf,"%Math.round%":cf,"%Math.sign%":yf,"%Reflect.getPrototypeOf%":hf};if(E)try{null.error}catch(e){oo=E(E(e)),H["%Error.prototype%"]=oo}var oo,bf=function e(r){var t;if(r==="%AsyncFunction%")t=De("async function () {}");else if(r==="%GeneratorFunction%")t=De("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=De("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&E&&(t=E(a.prototype))}return H[r]=t,t},io={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},mr=L(),Wr=xe(),Sf=mr.call(hr,Array.prototype.concat),Af=mr.call(fo,Array.prototype.splice),ao=mr.call(hr,String.prototype.replace),kr=mr.call(hr,String.prototype.slice),wf=mr.call(hr,RegExp.prototype.exec),Pf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Of=/\\(\\)?/g,Ef=function(r){var t=kr(r,0,1),n=kr(r,-1);if(t==="%"&&n!=="%")throw new ar("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new ar("invalid intrinsic syntax, expected opening `%`");var a=[];return ao(r,Pf,function(u,f,c,y){a[a.length]=c?ao(y,Of,"$1"):f||u}),a},qf=function(r,t){var n=r,a;if(Wr(io,n)&&(a=io[n],n="%"+a[0]+"%"),Wr(H,n)){var u=H[n];if(u===or&&(u=bf(n)),typeof u=="undefined"&&!t)throw new ir("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:u}}throw new ar("intrinsic "+r+" does not exist!")};po.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new ir("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ir('"allowMissing" argument must be a boolean');if(wf(/^%?[^%]*%?$/,r)===null)throw new ar("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ef(r),a=n.length>0?n[0]:"",u=qf("%"+a+"%",t),f=u.name,c=u.value,y=!1,h=u.alias;h&&(a=h[0],Af(n,Sf([0,1],h)));for(var g=1,d=!0;g<n.length;g+=1){var v=n[g],A=kr(v,0,1),P=kr(v,-1);if((A==='"'||A==="'"||A==="`"||P==='"'||P==="'"||P==="`")&&A!==P)throw new ar("property names with quotes must have matching quotes");if((v==="constructor"||!d)&&(y=!0),a+="."+v,f="%"+a+"%",Wr(H,f))c=H[f];else if(c!=null){if(!(v in c)){if(!t)throw new ir("base intrinsic for "+r+" exists, but the property is not available.");return}if(dr&&g+1>=n.length){var S=dr(c,v);d=!!S,d&&"get"in S&&!("originalValue"in S.get)?c=S.get:c=c[v]}else d=Wr(c,v),c=c[v];d&&!y&&(H[f]=c)}}return c}});var Ce=l((nv,co)=>{"use strict";o();i();var so=jr(),xf=Ur(),ur=w(),lo=gr();co.exports=function(r,t,n){if(!r||typeof r!="object"&&typeof r!="function")throw new ur("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ur("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ur("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ur("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ur("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ur("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,y=!!lo&&lo(r,t);if(so)so(r,t,{configurable:f===null&&y?y.configurable:!f,enumerable:a===null&&y?y.enumerable:!a,value:n,writable:u===null&&y?y.writable:!u});else if(c||!a&&!u&&!f)r[t]=n;else throw new xf("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Ge=l((av,vo)=>{"use strict";o();i();var je=jr(),yo=function(){return!!je};yo.hasArrayLengthDefineBug=function(){if(!je)return null;try{return je([],"length",{value:1}).length!==1}catch(r){return!0}};vo.exports=yo});var So=l((pv,bo)=>{"use strict";o();i();var $f=Me(),go=Ce(),If=Ge()(),ho=gr(),mo=w(),Ff=$f("%Math.floor%");bo.exports=function(r,t){if(typeof r!="function")throw new mo("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Ff(t)!==t)throw new mo("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,u=!0;if("length"in r&&ho){var f=ho(r,"length");f&&!f.configurable&&(a=!1),f&&!f.writable&&(u=!1)}return(a||u||!n)&&(If?go(r,"length",t,!0,!0):go(r,"length",t)),r}});var wo=l((cv,Ao)=>{"use strict";o();i();var Tf=Me(),Lr=Tf("%Object.defineProperty%",!0)||!1;if(Lr)try{Lr({},"a",{value:1})}catch(e){Lr=!1}Ao.exports=Lr});var Hr=l((gv,zr)=>{"use strict";o();i();var We=L(),Jr=F(),Rf=So(),Nf=w(),Eo=Jr("%Function.prototype.apply%"),qo=Jr("%Function.prototype.call%"),xo=Jr("%Reflect.apply%",!0)||We.call(qo,Eo),Po=wo(),_f=Jr("%Math.max%");zr.exports=function(r){if(typeof r!="function")throw new Nf("a function is required");var t=xo(We,qo,arguments);return Rf(t,1+_f(0,r.length-(arguments.length-1)),!0)};var Oo=function(){return xo(We,Eo,arguments)};Po?Po(zr.exports,"apply",{value:Oo}):zr.exports.apply=Oo});var ke=l((mv,Io)=>{"use strict";o();i();var $o=Object.prototype.toString;Io.exports=function(r){var t=$o.call(r),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&$o.call(r.callee)==="[object Function]"),n}});var Mo=l((Av,Bo)=>{"use strict";o();i();var Do;Object.keys||(br=Object.prototype.hasOwnProperty,Le=Object.prototype.toString,Fo=ke(),ze=Object.prototype.propertyIsEnumerable,To=!ze.call({toString:null},"toString"),Ro=ze.call(function(){},"prototype"),Sr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Kr=function(e){var r=e.constructor;return r&&r.prototype===e},No={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},_o=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!No["$"+e]&&br.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Kr(window[e])}catch(r){return!0}}catch(r){return!0}return!1}(),Uo=function(e){if(typeof window=="undefined"||!_o)return Kr(e);try{return Kr(e)}catch(r){return!1}},Do=function(r){var t=r!==null&&typeof r=="object",n=Le.call(r)==="[object Function]",a=Fo(r),u=t&&Le.call(r)==="[object String]",f=[];if(!t&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var c=Ro&&n;if(u&&r.length>0&&!br.call(r,0))for(var y=0;y<r.length;++y)f.push(String(y));if(a&&r.length>0)for(var h=0;h<r.length;++h)f.push(String(h));else for(var g in r)!(c&&g==="prototype")&&br.call(r,g)&&f.push(String(g));if(To)for(var d=Uo(r),v=0;v<Sr.length;++v)!(d&&Sr[v]==="constructor")&&br.call(r,Sr[v])&&f.push(Sr[v]);return f});var br,Le,Fo,ze,To,Ro,Sr,Kr,No,_o,Uo;Bo.exports=Do});var Wo=l((Ov,Go)=>{"use strict";o();i();var Uf=Array.prototype.slice,Df=ke(),Co=Object.keys,Vr=Co?function(r){return Co(r)}:Mo(),jo=Object.keys;Vr.shim=function(){if(Object.keys){var r=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);r||(Object.keys=function(n){return Df(n)?jo(Uf.call(n)):jo(n)})}else Object.keys=Vr;return Object.keys||Vr};Go.exports=Vr});var Ar=l((xv,Jo)=>{"use strict";o();i();var Bf=Wo(),Mf=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Cf=Object.prototype.toString,jf=Array.prototype.concat,ko=Ce(),Gf=function(e){return typeof e=="function"&&Cf.call(e)==="[object Function]"},Lo=Ge()(),Wf=function(e,r,t,n){if(r in e){if(n===!0){if(e[r]===t)return}else if(!Gf(n)||!n())return}Lo?ko(e,r,t,!0):ko(e,r,t)},zo=function(e,r){var t=arguments.length>2?arguments[2]:{},n=Bf(r);Mf&&(n=jf.call(n,Object.getOwnPropertySymbols(r)));for(var a=0;a<n.length;a+=1)Wf(e,n[a],r[n[a]],t[n[a]])};zo.supportsDescriptors=!!Lo;Jo.exports=zo});var I=l((Fv,Vo)=>{"use strict";o();i();var Ho=F(),Ko=Hr(),kf=Ko(Ho("String.prototype.indexOf"));Vo.exports=function(r,t){var n=Ho(r,!!t);return typeof n=="function"&&kf(r,".prototype.")>-1?Ko(n):n}});var Xo=l((Nv,Qo)=>{"use strict";o();i();var Lf=F(),Yo=Lf("%Array%"),zf=!Yo.isArray&&I()("Object.prototype.toString");Qo.exports=Yo.isArray||function(r){return zf(r)==="[object Array]"}});var Je=l((Dv,Zo)=>{"use strict";o();i();Zo.exports=Xo()});var ei=l((Cv,ri)=>{"use strict";o();i();var Jf=F(),Hf=I(),Kf=w(),Vf=Je(),Yf=Jf("%Reflect.apply%",!0)||Hf("Function.prototype.apply");ri.exports=function(r,t){var n=arguments.length>2?arguments[2]:[];if(!Vf(n))throw new Kf("Assertion failed: optional `argumentsList`, if provided, must be a List");return Yf(r,t,n)}});function ti(){throw new Error("setTimeout has not been defined")}function ni(){throw new Error("clearTimeout has not been defined")}function oi(e){if(C===setTimeout)return setTimeout(e,0);if((C===ti||!C)&&setTimeout)return C=setTimeout,setTimeout(e,0);try{return C(e,0)}catch(r){try{return C.call(null,e,0)}catch(t){return C.call(this,e,0)}}}function Qf(e){if(j===clearTimeout)return clearTimeout(e);if((j===ni||!j)&&clearTimeout)return j=clearTimeout,clearTimeout(e);try{return j(e)}catch(r){try{return j.call(null,e)}catch(t){return j.call(this,e)}}}function Xf(){!pr||!K||(pr=!1,K.length?U=K.concat(U):Yr=-1,U.length&&ii())}function ii(){if(!pr){var e=oi(Xf);pr=!0;for(var r=U.length;r;){for(K=U,U=[];++Yr<r;)K&&K[Yr].run();Yr=-1,r=U.length}K=null,pr=!1,Qf(e)}}function Zf(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];U.push(new ai(e,r)),U.length===1&&!pr&&oi(ii)}function ai(e,r){this.fun=e,this.array=r}function V(){}function dp(e){throw new Error("process.binding is not supported")}function hp(){return"/"}function mp(e){throw new Error("process.chdir is not supported")}function bp(){return 0}function Ap(e){var r=Sp.call(fr)*.001,t=Math.floor(r),n=Math.floor(r%1*1e9);return e&&(t=t-e[0],n=n-e[1],n<0&&(t--,n+=1e9)),[t,n]}function Pp(){var e=new Date,r=e-wp;return r/1e3}var C,j,U,pr,K,Yr,rp,ep,tp,np,op,ip,ap,up,fp,pp,sp,lp,cp,yp,vp,gp,fr,Sp,wp,Op,wr,ui=be(()=>{"use strict";o();i();C=ti,j=ni;typeof globalThis.setTimeout=="function"&&(C=setTimeout);typeof globalThis.clearTimeout=="function"&&(j=clearTimeout);U=[],pr=!1,Yr=-1;ai.prototype.run=function(){this.fun.apply(null,this.array)};rp="browser",ep="browser",tp=!0,np={},op=[],ip="",ap={},up={},fp={};pp=V,sp=V,lp=V,cp=V,yp=V,vp=V,gp=V;fr=globalThis.performance||{},Sp=fr.now||fr.mozNow||fr.msNow||fr.oNow||fr.webkitNow||function(){return new Date().getTime()};wp=new Date;Op={nextTick:Zf,title:rp,browser:tp,env:np,argv:op,version:ip,versions:ap,on:pp,addListener:sp,once:lp,off:cp,removeListener:yp,removeAllListeners:vp,emit:gp,binding:dp,cwd:hp,chdir:mp,umask:bp,hrtime:Ap,platform:ep,release:up,config:fp,uptime:Pp},wr=Op});var He,Ke,fi=be(()=>{"use strict";o();i();typeof Object.create=="function"?He=function(r,t){r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:He=function(r,t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r};Ke=He});var di={};su(di,{_extend:()=>nt,debuglog:()=>pi,default:()=>_p,deprecate:()=>Ze,format:()=>re,inherits:()=>Ke,inspect:()=>R,isArray:()=>rt,isBoolean:()=>ee,isBuffer:()=>yi,isDate:()=>Zr,isError:()=>Or,isFunction:()=>Er,isNull:()=>qr,isNullOrUndefined:()=>si,isNumber:()=>et,isObject:()=>Y,isPrimitive:()=>ci,isRegExp:()=>Pr,isString:()=>xr,isSymbol:()=>li,isUndefined:()=>T,log:()=>vi});function re(e){if(!xr(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(R(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,a=n.length,u=String(e).replace(Ep,function(c){if(c==="%%")return"%";if(t>=a)return c;switch(c){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(y){return"[Circular]"}default:return c}}),f=n[t];t<a;f=n[++t])qr(f)||!Y(f)?u+=" "+f:u+=" "+R(f);return u}function Ze(e,r){if(T(globalThis.process))return function(){return Ze(e,r).apply(this,arguments)};if(wr.noDeprecation===!0)return e;var t=!1;function n(){if(!t){if(wr.throwDeprecation)throw new Error(r);wr.traceDeprecation?console.trace(r):console.error(r),t=!0}return e.apply(this,arguments)}return n}function pi(e){if(T(Ve)&&(Ve=wr.env.NODE_DEBUG||""),e=e.toUpperCase(),!Qr[e])if(new RegExp("\\b"+e+"\\b","i").test(Ve)){var r=0;Qr[e]=function(){var t=re.apply(null,arguments);console.error("%s %d: %s",e,r,t)}}else Qr[e]=function(){};return Qr[e]}function R(e,r){var t={seen:[],stylize:xp};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),ee(r)?t.showHidden=r:r&&nt(t,r),T(t.showHidden)&&(t.showHidden=!1),T(t.depth)&&(t.depth=2),T(t.colors)&&(t.colors=!1),T(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=qp),Xr(t,e,t.depth)}function qp(e,r){var t=R.styles[r];return t?"\x1B["+R.colors[t][0]+"m"+e+"\x1B["+R.colors[t][1]+"m":e}function xp(e,r){return e}function $p(e){var r={};return e.forEach(function(t,n){r[t]=!0}),r}function Xr(e,r,t){if(e.customInspect&&r&&Er(r.inspect)&&r.inspect!==R&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(t,e);return xr(n)||(n=Xr(e,n,t)),n}var a=Ip(e,r);if(a)return a;var u=Object.keys(r),f=$p(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(r)),Or(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return Ye(r);if(u.length===0){if(Er(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(Pr(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(Zr(r))return e.stylize(Date.prototype.toString.call(r),"date");if(Or(r))return Ye(r)}var y="",h=!1,g=["{","}"];if(rt(r)&&(h=!0,g=["[","]"]),Er(r)){var d=r.name?": "+r.name:"";y=" [Function"+d+"]"}if(Pr(r)&&(y=" "+RegExp.prototype.toString.call(r)),Zr(r)&&(y=" "+Date.prototype.toUTCString.call(r)),Or(r)&&(y=" "+Ye(r)),u.length===0&&(!h||r.length==0))return g[0]+y+g[1];if(t<0)return Pr(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var v;return h?v=Fp(e,r,t,f,u):v=u.map(function(A){return Xe(e,r,t,f,A,h)}),e.seen.pop(),Tp(v,y,g)}function Ip(e,r){if(T(r))return e.stylize("undefined","undefined");if(xr(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(et(r))return e.stylize(""+r,"number");if(ee(r))return e.stylize(""+r,"boolean");if(qr(r))return e.stylize("null","null")}function Ye(e){return"["+Error.prototype.toString.call(e)+"]"}function Fp(e,r,t,n,a){for(var u=[],f=0,c=r.length;f<c;++f)gi(r,String(f))?u.push(Xe(e,r,t,n,String(f),!0)):u.push("");return a.forEach(function(y){y.match(/^\d+$/)||u.push(Xe(e,r,t,n,y,!0))}),u}function Xe(e,r,t,n,a,u){var f,c,y;if(y=Object.getOwnPropertyDescriptor(r,a)||{value:r[a]},y.get?y.set?c=e.stylize("[Getter/Setter]","special"):c=e.stylize("[Getter]","special"):y.set&&(c=e.stylize("[Setter]","special")),gi(n,a)||(f="["+a+"]"),c||(e.seen.indexOf(y.value)<0?(qr(t)?c=Xr(e,y.value,null):c=Xr(e,y.value,t-1),c.indexOf(`
2
- `)>-1&&(u?c=c.split(`
3
- `).map(function(h){return" "+h}).join(`
4
- `).substr(2):c=`
5
- `+c.split(`
6
- `).map(function(h){return" "+h}).join(`
7
- `))):c=e.stylize("[Circular]","special")),T(f)){if(u&&a.match(/^\d+$/))return c;f=JSON.stringify(""+a),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.substr(1,f.length-2),f=e.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=e.stylize(f,"string"))}return f+": "+c}function Tp(e,r,t){var n=0,a=e.reduce(function(u,f){return n++,f.indexOf(`
8
- `)>=0&&n++,u+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?t[0]+(r===""?"":r+`
9
- `)+" "+e.join(`,
10
- `)+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function rt(e){return Array.isArray(e)}function ee(e){return typeof e=="boolean"}function qr(e){return e===null}function si(e){return e==null}function et(e){return typeof e=="number"}function xr(e){return typeof e=="string"}function li(e){return typeof e=="symbol"}function T(e){return e===void 0}function Pr(e){return Y(e)&&tt(e)==="[object RegExp]"}function Y(e){return typeof e=="object"&&e!==null}function Zr(e){return Y(e)&&tt(e)==="[object Date]"}function Or(e){return Y(e)&&(tt(e)==="[object Error]"||e instanceof Error)}function Er(e){return typeof e=="function"}function ci(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}function yi(e){return p.isBuffer(e)}function tt(e){return Object.prototype.toString.call(e)}function Qe(e){return e<10?"0"+e.toString(10):e.toString(10)}function Np(){var e=new Date,r=[Qe(e.getHours()),Qe(e.getMinutes()),Qe(e.getSeconds())].join(":");return[e.getDate(),Rp[e.getMonth()],r].join(" ")}function vi(){console.log("%s - %s",Np(),re.apply(null,arguments))}function nt(e,r){if(!r||!Y(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e}function gi(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var Ep,Qr,Ve,Rp,_p,hi=be(()=>{"use strict";o();i();ui();fi();Ep=/%[sdj%]/g;Qr={};R.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};R.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Rp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];_p={inherits:Ke,_extend:nt,log:vi,isBuffer:yi,isPrimitive:ci,isFunction:Er,isError:Or,isDate:Zr,isObject:Y,isRegExp:Pr,isUndefined:T,isSymbol:li,isString:xr,isNumber:et,isNullOrUndefined:si,isNull:qr,isBoolean:ee,isArray:rt,inspect:R,deprecate:Ze,format:re,debuglog:pi}});var mi=l((Xv,te)=>{"use strict";o();i();var Q=(hi(),cu(di));if(Q&&Q.default){te.exports=Q.default;for(let e in Q)te.exports[e]=Q[e]}else Q&&(te.exports=Q)});var Si=l((eg,bi)=>{"use strict";o();i();bi.exports=mi().inspect});var Tr=l((og,ji)=>{"use strict";o();i();var yt=typeof Map=="function"&&Map.prototype,ot=Object.getOwnPropertyDescriptor&&yt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,oe=yt&&ot&&typeof ot.get=="function"?ot.get:null,Ai=yt&&Map.prototype.forEach,vt=typeof Set=="function"&&Set.prototype,it=Object.getOwnPropertyDescriptor&&vt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ie=vt&&it&&typeof it.get=="function"?it.get:null,wi=vt&&Set.prototype.forEach,Up=typeof WeakMap=="function"&&WeakMap.prototype,Ir=Up?WeakMap.prototype.has:null,Dp=typeof WeakSet=="function"&&WeakSet.prototype,Fr=Dp?WeakSet.prototype.has:null,Bp=typeof WeakRef=="function"&&WeakRef.prototype,Pi=Bp?WeakRef.prototype.deref:null,Mp=Boolean.prototype.valueOf,Cp=Object.prototype.toString,jp=Function.prototype.toString,Gp=String.prototype.match,gt=String.prototype.slice,G=String.prototype.replace,Wp=String.prototype.toUpperCase,Oi=String.prototype.toLowerCase,Ni=RegExp.prototype.test,Ei=Array.prototype.concat,N=Array.prototype.join,kp=Array.prototype.slice,qi=Math.floor,ft=typeof BigInt=="function"?BigInt.prototype.valueOf:null,at=Object.getOwnPropertySymbols,pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,sr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===sr||!0)?Symbol.toStringTag:null,_i=Object.prototype.propertyIsEnumerable,xi=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function $i(e,r){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Ni.call(/e/,r))return r;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-qi(-e):qi(e);if(n!==e){var a=String(n),u=gt.call(r,a.length+1);return G.call(a,t,"$&_")+"."+G.call(G.call(u,/([0-9]{3})/g,"$&_"),/_$/,"")}}return G.call(r,t,"$&_")}var st=Si(),Ii=st.custom,Fi=Bi(Ii)?Ii:null,Ui={__proto__:null,double:'"',single:"'"},Lp={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ji.exports=function e(r,t,n,a){var u=t||{};if(D(u,"quoteStyle")&&!D(Ui,u.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(D(u,"maxStringLength")&&(typeof u.maxStringLength=="number"?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=D(u,"customInspect")?u.customInspect:!0;if(typeof f!="boolean"&&f!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(D(u,"indent")&&u.indent!==null&&u.indent!==" "&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(D(u,"numericSeparator")&&typeof u.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=u.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return Ci(r,u);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var y=String(r);return c?$i(r,y):y}if(typeof r=="bigint"){var h=String(r)+"n";return c?$i(r,h):h}var g=typeof u.depth=="undefined"?5:u.depth;if(typeof n=="undefined"&&(n=0),n>=g&&g>0&&typeof r=="object")return lt(r)?"[Array]":"[Object]";var d=fs(u,n);if(typeof a=="undefined")a=[];else if(Mi(a,r)>=0)return"[Circular]";function v(X,_r,pu){if(_r&&(a=kp.call(a),a.push(_r)),pu){var Gt={depth:u.depth};return D(u,"quoteStyle")&&(Gt.quoteStyle=u.quoteStyle),e(X,Gt,n+1,a)}return e(X,u,n+1,a)}if(typeof r=="function"&&!Ti(r)){var A=Zp(r),P=ne(r,v);return"[Function"+(A?": "+A:" (anonymous)")+"]"+(P.length>0?" { "+N.call(P,", ")+" }":"")}if(Bi(r)){var S=sr?G.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):pt.call(r);return typeof r=="object"&&!sr?$r(S):S}if(is(r)){for(var x="<"+Oi.call(String(r.nodeName)),$=r.attributes||[],_=0;_<$.length;_++)x+=" "+$[_].name+"="+Di(zp($[_].value),"double",u);return x+=">",r.childNodes&&r.childNodes.length&&(x+="..."),x+="</"+Oi.call(String(r.nodeName))+">",x}if(lt(r)){if(r.length===0)return"[]";var k=ne(r,v);return d&&!us(k)?"["+ct(k,d)+"]":"[ "+N.call(k,", ")+" ]"}if(Hp(r)){var yr=ne(r,v);return!("cause"in Error.prototype)&&"cause"in r&&!_i.call(r,"cause")?"{ ["+String(r)+"] "+N.call(Ei.call("[cause]: "+v(r.cause),yr),", ")+" }":yr.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+N.call(yr,", ")+" }"}if(typeof r=="object"&&f){if(Fi&&typeof r[Fi]=="function"&&st)return st(r,{depth:g-n});if(f!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(rs(r)){var Nr=[];return Ai&&Ai.call(r,function(X,_r){Nr.push(v(_r,r,!0)+" => "+v(X,r))}),Ri("Map",oe.call(r),Nr,d)}if(ns(r)){var Mt=[];return wi&&wi.call(r,function(X){Mt.push(v(X,r))}),Ri("Set",ie.call(r),Mt,d)}if(es(r))return ut("WeakMap");if(os(r))return ut("WeakSet");if(ts(r))return ut("WeakRef");if(Vp(r))return $r(v(Number(r)));if(Qp(r))return $r(v(ft.call(r)));if(Yp(r))return $r(Mp.call(r));if(Kp(r))return $r(v(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&r===globalThis||typeof globalThis!="undefined"&&r===globalThis)return"{ [object globalThis] }";if(!Jp(r)&&!Ti(r)){var de=ne(r,v),Ct=xi?xi(r)===Object.prototype:r instanceof Object||r.constructor===Object,he=r instanceof Object?"":"null prototype",jt=!Ct&&q&&Object(r)===r&&q in r?gt.call(W(r),8,-1):he?"Object":"",fu=Ct||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",me=fu+(jt||he?"["+N.call(Ei.call([],jt||[],he||[]),": ")+"] ":"");return de.length===0?me+"{}":d?me+"{"+ct(de,d)+"}":me+"{ "+N.call(de,", ")+" }"}return String(r)};function Di(e,r,t){var n=t.quoteStyle||r,a=Ui[n];return a+e+a}function zp(e){return G.call(String(e),/"/g,"&quot;")}function lt(e){return W(e)==="[object Array]"&&(!q||!(typeof e=="object"&&q in e))}function Jp(e){return W(e)==="[object Date]"&&(!q||!(typeof e=="object"&&q in e))}function Ti(e){return W(e)==="[object RegExp]"&&(!q||!(typeof e=="object"&&q in e))}function Hp(e){return W(e)==="[object Error]"&&(!q||!(typeof e=="object"&&q in e))}function Kp(e){return W(e)==="[object String]"&&(!q||!(typeof e=="object"&&q in e))}function Vp(e){return W(e)==="[object Number]"&&(!q||!(typeof e=="object"&&q in e))}function Yp(e){return W(e)==="[object Boolean]"&&(!q||!(typeof e=="object"&&q in e))}function Bi(e){if(sr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!pt)return!1;try{return pt.call(e),!0}catch(r){}return!1}function Qp(e){if(!e||typeof e!="object"||!ft)return!1;try{return ft.call(e),!0}catch(r){}return!1}var Xp=Object.prototype.hasOwnProperty||function(e){return e in this};function D(e,r){return Xp.call(e,r)}function W(e){return Cp.call(e)}function Zp(e){if(e.name)return e.name;var r=Gp.call(jp.call(e),/^function\s*([\w$]+)/);return r?r[1]:null}function Mi(e,r){if(e.indexOf)return e.indexOf(r);for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function rs(e){if(!oe||!e||typeof e!="object")return!1;try{oe.call(e);try{ie.call(e)}catch(r){return!0}return e instanceof Map}catch(r){}return!1}function es(e){if(!Ir||!e||typeof e!="object")return!1;try{Ir.call(e,Ir);try{Fr.call(e,Fr)}catch(r){return!0}return e instanceof WeakMap}catch(r){}return!1}function ts(e){if(!Pi||!e||typeof e!="object")return!1;try{return Pi.call(e),!0}catch(r){}return!1}function ns(e){if(!ie||!e||typeof e!="object")return!1;try{ie.call(e);try{oe.call(e)}catch(r){return!0}return e instanceof Set}catch(r){}return!1}function os(e){if(!Fr||!e||typeof e!="object")return!1;try{Fr.call(e,Fr);try{Ir.call(e,Ir)}catch(r){return!0}return e instanceof WeakSet}catch(r){}return!1}function is(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Ci(e,r){if(e.length>r.maxStringLength){var t=e.length-r.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Ci(gt.call(e,0,r.maxStringLength),r)+n}var a=Lp[r.quoteStyle||"single"];a.lastIndex=0;var u=G.call(G.call(e,a,"\\$1"),/[\x00-\x1f]/g,as);return Di(u,"single",r)}function as(e){var r=e.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return t?"\\"+t:"\\x"+(r<16?"0":"")+Wp.call(r.toString(16))}function $r(e){return"Object("+e+")"}function ut(e){return e+" { ? }"}function Ri(e,r,t,n){var a=n?ct(t,n):N.call(t,", ");return e+" ("+r+") {"+a+"}"}function us(e){for(var r=0;r<e.length;r++)if(Mi(e[r],`
11
- `)>=0)return!1;return!0}function fs(e,r){var t;if(e.indent===" ")t=" ";else if(typeof e.indent=="number"&&e.indent>0)t=N.call(Array(e.indent+1)," ");else return null;return{base:t,prev:N.call(Array(r+1),t)}}function ct(e,r){if(e.length===0)return"";var t=`
12
- `+r.prev+r.base;return t+N.call(e,","+t)+`
13
- `+r.prev}function ne(e,r){var t=lt(e),n=[];if(t){n.length=e.length;for(var a=0;a<e.length;a++)n[a]=D(e,a)?r(e[a],e):""}var u=typeof at=="function"?at(e):[],f;if(sr){f={};for(var c=0;c<u.length;c++)f["$"+u[c]]=u[c]}for(var y in e)D(e,y)&&(t&&String(Number(y))===y&&y<e.length||sr&&f["$"+y]instanceof Symbol||(Ni.call(/[^\w$]/,y)?n.push(r(y,e)+": "+r(e[y],e)):n.push(y+": "+r(e[y],e))));if(typeof at=="function")for(var h=0;h<u.length;h++)_i.call(e,u[h])&&n.push("["+r(u[h])+"]: "+r(e[u[h]],e));return n}});var ae=l((ug,Gi)=>{"use strict";o();i();Gi.exports=function(r){return typeof r=="string"||typeof r=="symbol"}});var ki=l((sg,Wi)=>{"use strict";o();i();var ps=w(),ss=Tr(),ls=ae();Wi.exports=function(r,t){if(!ls(t))throw new ps("Assertion failed: IsPropertyKey(P) is not true, got "+ss(t));return r[t]}});var Hi=l((yg,Ji)=>{"use strict";o();i();var zi=Function.prototype.toString,lr=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ht,ue;if(typeof lr=="function"&&typeof Object.defineProperty=="function")try{ht=Object.defineProperty({},"length",{get:function(){throw ue}}),ue={},lr(function(){throw 42},null,ht)}catch(e){e!==ue&&(lr=null)}else lr=null;var cs=/^\s*class\b/,mt=function(r){try{var t=zi.call(r);return cs.test(t)}catch(n){return!1}},dt=function(r){try{return mt(r)?!1:(zi.call(r),!0)}catch(t){return!1}},fe=Object.prototype.toString,ys="[object Object]",vs="[object Function]",gs="[object GeneratorFunction]",ds="[object HTMLAllCollection]",hs="[object HTML document.all class]",ms="[object HTMLCollection]",bs=typeof Symbol=="function"&&!!Symbol.toStringTag,Ss=!(0 in[,]),bt=function(){return!1};typeof document=="object"&&(Li=document.all,fe.call(Li)===fe.call(document.all)&&(bt=function(r){if((Ss||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var t=fe.call(r);return(t===ds||t===hs||t===ms||t===ys)&&r("")==null}catch(n){}return!1}));var Li;Ji.exports=lr?function(r){if(bt(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{lr(r,null,ht)}catch(t){if(t!==ue)return!1}return!mt(r)&&dt(r)}:function(r){if(bt(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(bs)return dt(r);if(mt(r))return!1;var t=fe.call(r);return t!==vs&&t!==gs&&!/^\[object HTML/.test(t)?!1:dt(r)}});var St=l((dg,Ki)=>{"use strict";o();i();Ki.exports=Hi()});var Xi=l((bg,Qi)=>{"use strict";o();i();var Vi=w(),As=ki(),ws=St(),Ps=ae(),Yi=Tr();Qi.exports=function(r,t){if(!Ps(t))throw new Vi("Assertion failed: IsPropertyKey(P) is not true");var n=As(r,t);if(n!=null){if(!ws(n))throw new Vi(Yi(t)+" is not a function: "+Yi(n));return n}}});var ra=l((wg,Zi)=>{"use strict";o();i();var Os=Te();Zi.exports=function(){return Os()&&!!Symbol.toStringTag}});var Ot=l((Eg,oa)=>{"use strict";o();i();var At=I(),ea=ra()(),ta,na,wt,Pt;ea&&(ta=At("Object.prototype.hasOwnProperty"),na=At("RegExp.prototype.exec"),wt={},pe=function(){throw wt},Pt={toString:pe,valueOf:pe},typeof Symbol.toPrimitive=="symbol"&&(Pt[Symbol.toPrimitive]=pe));var pe,Es=At("Object.prototype.toString"),qs=Object.getOwnPropertyDescriptor,xs="[object RegExp]";oa.exports=ea?function(r){if(!r||typeof r!="object")return!1;var t=qs(r,"lastIndex"),n=t&&ta(t,"value");if(!n)return!1;try{na(r,Pt)}catch(a){return a===wt}}:function(r){return!r||typeof r!="object"&&typeof r!="function"?!1:Es(r)===xs}});var Et=l(($g,ia)=>{"use strict";o();i();var $s=I(),Is=Ot(),Fs=$s("RegExp.prototype.exec"),Ts=w();ia.exports=function(r){if(!Is(r))throw new Ts("`regex` must be a RegExp");return function(n){return Fs(r,n)!==null}}});var ua=l((Tg,aa)=>{"use strict";o();i();aa.exports=function(r,t){for(var n=0;n<r.length;n+=1)if(!t(r[n],n,r))return!1;return!0}});var pa=l((_g,fa)=>{"use strict";o();i();fa.exports=function(r){if(r===null)return"Null";if(typeof r=="undefined")return"Undefined";if(typeof r=="function"||typeof r=="object")return"Object";if(typeof r=="number")return"Number";if(typeof r=="boolean")return"Boolean";if(typeof r=="string")return"String"}});var qt=l((Bg,sa)=>{"use strict";o();i();var Rs=pa();sa.exports=function(r){return typeof r=="symbol"?"Symbol":typeof r=="bigint"?"BigInt":Rs(r)}});var ya=l((jg,ca)=>{"use strict";o();i();var la=w(),Ns=Tr(),_s=ae(),Us=qt();ca.exports=function(r,t){if(Us(r)!=="Object")throw new la("Assertion failed: Type(O) is not Object");if(!_s(t))throw new la("Assertion failed: IsPropertyKey(P) is not true, got "+Ns(t));return r[t]}});var ga=l((kg,va)=>{"use strict";o();i();var Ds=F();va.exports=Ds("%Math.min%")});var xt=l((Jg,da)=>{"use strict";o();i();da.exports=Number.isNaN||function(r){return r!==r}});var ma=l((Vg,ha)=>{"use strict";o();i();var Bs=xt();ha.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!Bs(e)&&e!==1/0&&e!==-1/0}});var se=l((Xg,Sa)=>{"use strict";o();i();var ba=F(),Ms=ba("%Math.abs%"),Cs=ba("%Math.floor%"),js=xt(),Gs=ma();Sa.exports=function(r){if(typeof r!="number"||js(r)||!Gs(r))return!1;var t=Ms(r);return Cs(t)===t}});var It=l((ed,Aa)=>{"use strict";o();i();var Ws=I(),$t=w(),ks=se(),Ls=Ws("String.prototype.slice");Aa.exports=function(r,t,n){if(typeof r!="string")throw new $t("Assertion failed: `string` must be a String");if(typeof t!="string")throw new $t("Assertion failed: `searchValue` must be a String");if(!ks(n)||n<0)throw new $t("Assertion failed: `fromIndex` must be a non-negative integer");var a=r.length;if(t===""&&n<=a)return n;for(var u=t.length,f=n;f<=a-u;f+=1){var c=Ls(r,f,f+u);if(c===t)return f}return-1}});var le=l((od,wa)=>{"use strict";o();i();var zs=w();wa.exports=function(r){if(r==null)throw new zs(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r}});var ce=l((ud,Pa)=>{"use strict";o();i();var Js=F(),Hs=Js("%String%"),Ks=w();Pa.exports=function(r){if(typeof r=="symbol")throw new Ks("Cannot convert a Symbol value to a string");return Hs(r)}});var Ft=l((sd,qa)=>{"use strict";o();i();var Vs=le(),Ys=ce(),Qs=I(),Oa=Qs("String.prototype.replace"),Ea=/^\s$/.test("\u180E"),Xs=Ea?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Zs=Ea?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;qa.exports=function(){var r=Ys(Vs(this));return Oa(Oa(r,Xs,""),Zs,"")}});var Tt=l((yd,$a)=>{"use strict";o();i();var rl=Ft(),xa="\u200B",cr="\u180E";$a.exports=function(){return String.prototype.trim&&xa.trim()===xa&&cr.trim()===cr&&("_"+cr).trim()==="_"+cr&&(cr+"_").trim()===cr+"_"?String.prototype.trim:rl}});var Fa=l((dd,Ia)=>{"use strict";o();i();var el=Ar(),tl=Tt();Ia.exports=function(){var r=tl();return el(String.prototype,{trim:r},{trim:function(){return String.prototype.trim!==r}}),r}});var _a=l((bd,Na)=>{"use strict";o();i();var nl=Hr(),ol=Ar(),il=le(),al=Ft(),Ta=Tt(),ul=Fa(),fl=nl(Ta()),Ra=function(r){return il(r),fl(r)};ol(Ra,{getPolyfill:Ta,implementation:al,shim:ul});Na.exports=Ra});var Ma=l((wd,Ba)=>{"use strict";o();i();var Nt=F(),Rt=Nt("%Number%"),pl=Nt("%RegExp%"),sl=w(),Ua=Nt("%parseInt%"),ll=I(),ye=Et(),Da=ll("String.prototype.slice"),cl=ye(/^0b[01]+$/i),yl=ye(/^0o[0-7]+$/i),vl=ye(/^[-+]0x[0-9a-f]+$/i),gl=["\x85","\u200B","\uFFFE"].join(""),dl=new pl("["+gl+"]","g"),hl=ye(dl),ml=_a();Ba.exports=function e(r){if(typeof r!="string")throw new sl("Assertion failed: `argument` is not a String");if(cl(r))return Rt(Ua(Da(r,2),2));if(yl(r))return Rt(Ua(Da(r,2),8));if(hl(r)||vl(r))return NaN;var t=ml(r);return t!==r?e(t):Rt(r)}});var Ga=l((Ed,ja)=>{"use strict";o();i();var bl=w(),Ca=se(),Sl=I(),Al=Sl("String.prototype.slice");ja.exports=function(r,t,n){if(typeof r!="string"||!Ca(t)||arguments.length>2&&!Ca(n))throw new bl("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Al(r,t,arguments.length>2?n:r.length)}});var ka=l(($d,Wa)=>{"use strict";o();i();Wa.exports=function(r){return typeof r=="string"||typeof r=="undefined"}});var za=l((Td,La)=>{"use strict";o();i();var wl=I()("String.prototype.slice");La.exports=function(r,t){return r===t?!0:r.length>t.length?!1:wl(t,0,r.length)===r}});var Ya=l((_d,Va)=>{"use strict";o();i();var B=w(),Ka=Et(),Pl=ua(),_t=Tr(),Ol=ya(),El=Je(),ql=ga(),xl=It(),Ja=Ma(),M=Ga(),$l=ce(),Ha=qt(),Il=se(),Fl=ka(),Rr=za(),Tl=Ka(/^\$[0-9]/),Rl=Ka(/^\$[0-9][0-9]/);Va.exports=function(r,t,n,a,u,f){if(typeof r!="string")throw new B("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new B("Assertion failed: `str` must be a String");if(!Il(n)||n<0)throw new B("Assertion failed: `position` must be a nonnegative integer, got "+_t(n));if(!El(a)||!Pl(a,Fl))throw new B("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+_t(a));if(typeof u!="undefined"&&Ha(u)!=="Object")throw new B("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof f!="string")throw new B("Assertion failed: `replacementTemplate` must be a String");var c=t.length;if(n>c)throw new B("Assertion failed: position > stringLength, got "+_t(n));for(var y=f,h="";y!=="";){var g,d,v;if(Rr("$$",y))g="$$",d="$";else if(Rr("$`",y))g="$`",d=M(t,0,n);else if(Rr("$&",y))g="$&",d=r;else if(Rr("$'",y)){g="$'";var A=r.length,P=n+A;d=M(t,ql(P,c))}else if(Tl(y)){var S=Rl(y)?2:1,x=M(y,1,1+S),$=Ja(x);if($<0||$>99)throw new B("Assertion failed: `index` must be >= 0 and <= 99");var _=a.length;$>_&&S===2&&(S=1,x=M(x,0,1),$=Ja(x)),g=M(y,0,1+S),1<=$&&$<=_?(v=a[$-1],typeof v=="undefined"?d="":d=v):d=g}else if(Rr("$<",y)){var k=xl(y,">",0);if(k===-1||typeof u=="undefined")g="$<",d=g;else{g=M(y,0,k+1);var yr=M(y,2,k);if(Ha(u)!=="Object")throw new B("Assertion failed: Type(namedCaptures) is not Object");v=Ol(u,yr),typeof v=="undefined"?d="":d=$l(v)}}else g=M(y,0,1),d=g;var Nr=g.length;y=M(y,Nr),h+=d}return h}});var Dt=l((Bd,ru)=>{"use strict";o();i();var Qa=ei(),Nl=Xi(),_l=Ya(),Ul=St(),Dl=le(),ve=ce(),Xa=It(),Bl=F(),ge=I(),Ml=Ee()(),Cl=Ot(),jl=Bl("%Math.max%"),Za=w(),Gl=ge("Array.prototype.push"),Ut=ge("String.prototype.slice"),Wl=ge("String.prototype.indexOf"),kl=ge("String.prototype.replace");ru.exports=function(r,t){var n=Dl(this),a=Cl(r);if(a&&Wl(Ut(r,r.source.length+2),"g")===-1)throw new Za("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Ml&&Symbol.replace){if(r!=null){var u=Nl(r,Symbol.replace);if(typeof u!="undefined")return Qa(u,r,[n,t])}}else if(a)return kl(n,r,t);var f=ve(n),c=ve(r),y=Ul(t);y||(t=ve(t));for(var h=c.length,g=jl(1,h),d=[],v=Xa(f,c,0);v!==-1;)Gl(d,v),v=Xa(f,c,v+g);for(var A=0,P="",S=0;S<d.length;S+=1){var x;if(y)x=ve(Qa(t,void 0,[c,d[S],f]));else{if(typeof t!="string")throw new Za("Assertion failed: `replaceValue` should be a string at this point");var $=[];x=_l(c,f,d[S],$,void 0,t)}var _=Ut(f,A,d[S]);P+=_+x,A=d[S]+h}return A<f.length&&(P+=Ut(f,A)),P}});var Bt=l((jd,eu)=>{"use strict";o();i();var Ll=Dt();eu.exports=function(){return String.prototype.replaceAll||Ll}});var nu=l((kd,tu)=>{"use strict";o();i();var zl=Ar(),Jl=Bt();tu.exports=function(){var r=Jl();return zl(String.prototype,{replaceAll:r},{replaceAll:function(){return String.prototype.replaceAll!==r}}),r}});var uu=l((Jd,au)=>{"use strict";o();i();var Hl=Hr(),Kl=Ar(),ou=Dt(),Vl=Bt(),Yl=nu(),iu=Hl(ou);Kl(iu,{getPolyfill:Vl,implementation:ou,shim:Yl});au.exports=iu});o();i();var Vd=lu(uu(),1);export{yu as DynamicSnippetsGenerator};
1
+ import"./chunk-N3AIOPEV.js";import{a as r}from"./chunk-QH22Z5KY.js";import"./chunk-KQE3JYZ2.js";import"./chunk-JFD4YVTW.js";import"./chunk-5CTXVUPZ.js";import"./chunk-EOZMORS3.js";import"./chunk-PBNDQMXA.js";import"./chunk-VYJE6STI.js";import"./chunk-3X524Y2I.js";import{h as e,i as o}from"./chunk-2U3YQWRZ.js";e();o();export{r as DynamicSnippetsGenerator};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export { type Config } from \"./Config\";\nexport { DynamicSnippetsGenerator } from \"./DynamicSnippetsGenerator\";\n"],"mappings":"uTAAAA,IAAAC","names":["init_process","init_buffer"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/java-dynamic-snippets",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",