ts-openapi-codegen 0.1.29 → 0.2.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/README.md +75 -12
- package/bin/index.js +72 -27
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,46 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.2-beta] - 2022-01-19
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Names of inner enums should start with an upper char and has a prefix
|
|
13
|
+
|
|
14
|
+
## [0.2.1-beta] - 2022-01-15
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Bug with an incorrect paths in a generator input parameters
|
|
19
|
+
|
|
20
|
+
## [0.2.0-beta] - 2021-12-13
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Add setting up the tag to the publication(CI)
|
|
25
|
+
- The common configuration is moved from the array to the root block
|
|
26
|
+
- Output paths for models, services, schemas and core can be set up separately
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- Bug with an incorrect prefix which set to an enum if one has property - "type"
|
|
31
|
+
|
|
32
|
+
## [0.1.32] - 2021-12-03
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- Bug with context
|
|
37
|
+
|
|
38
|
+
## [0.1.30] - 2021-12-01
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- Add prefix to class name (I - interface, E - enum, T - type)
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- Starts a class name from a component block with capital char
|
|
47
|
+
|
|
8
48
|
## [0.1.29] - 2021-11-19
|
|
9
49
|
|
|
10
50
|
### Added
|
package/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[![NPM][npm-image]][npm-url]
|
|
4
4
|
[![License][license-image]][license-url]
|
|
5
|
-
[![Build Status][travis-image]][travis-url]
|
|
6
5
|
[![Downloads][downloads-image]][downloads-url]
|
|
7
6
|
[![Downloads][coverage-image]][coverage-url]
|
|
8
7
|
[![TypeScript][typescript-image]][typescript-url]
|
|
@@ -28,6 +27,7 @@
|
|
|
28
27
|
- Supports generation through CLI, Node.js and NPX
|
|
29
28
|
- Supports tsc and @babel/plugin-transform-typescript
|
|
30
29
|
- Supports axios
|
|
30
|
+
- Supports customization names of models
|
|
31
31
|
- Supports external references using [`json-schema-ref-parser`](https://github.com/APIDevTools/json-schema-ref-parser/)
|
|
32
32
|
|
|
33
33
|
## Install
|
|
@@ -50,17 +50,24 @@ $ openapi --help
|
|
|
50
50
|
Usage: openapi [options]
|
|
51
51
|
|
|
52
52
|
Options:
|
|
53
|
-
-V, --version
|
|
54
|
-
-i, --input <value>
|
|
55
|
-
-o, --output <value>
|
|
56
|
-
-
|
|
57
|
-
--
|
|
58
|
-
--
|
|
59
|
-
--
|
|
60
|
-
--
|
|
61
|
-
--
|
|
62
|
-
--
|
|
63
|
-
--
|
|
53
|
+
-V, --version Output the version number
|
|
54
|
+
-i, --input <value> OpenAPI specification, can be a path, url or string content (required)
|
|
55
|
+
-o, --output <value> Output directory (required)
|
|
56
|
+
-oc, --outputCore <value> Output directory for core files
|
|
57
|
+
-os, --outputServices <value> Output directory for services
|
|
58
|
+
-om, --outputModels <value> Output directory for models
|
|
59
|
+
-osm, --outputSchemas <value> Output directory for schemas
|
|
60
|
+
-c, --client <value> HTTP client to generate [fetch, xhr, node] (default: "fetch")
|
|
61
|
+
--useOptions <value> Use options instead of arguments (default: false)
|
|
62
|
+
--useUnionTypes <value> Use union types instead of enums (default: false)
|
|
63
|
+
--exportCore <value> Write core files to disk (default: true)
|
|
64
|
+
--exportServices <value> Write services to disk (default: true)
|
|
65
|
+
--exportModels <value> Write models to disk (default: true)
|
|
66
|
+
--exportSchemas <value> Write schemas to disk (default: false)
|
|
67
|
+
--clean <value> Clean a directory before generation (default: true)
|
|
68
|
+
--interfacePrefix <value> Prefix for interface model(default: "I")
|
|
69
|
+
--enumPrefix <value> Prefix for enum model(default: "E")
|
|
70
|
+
--typePrefix <value> Prefix for type model(default: "T")
|
|
64
71
|
|
|
65
72
|
Examples
|
|
66
73
|
$ openapi --input ./spec.json
|
|
@@ -91,6 +98,62 @@ You should create a file in the root of a project with the name 'openapi.config.
|
|
|
91
98
|
"exportSchemas": true
|
|
92
99
|
}]
|
|
93
100
|
```
|
|
101
|
+
or with common block
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"output": "./dist",
|
|
105
|
+
"client": "xhr",
|
|
106
|
+
"exportCore": true,
|
|
107
|
+
"exportServices": true,
|
|
108
|
+
"exportModels": true,
|
|
109
|
+
"exportSchemas": true,
|
|
110
|
+
"items": [{
|
|
111
|
+
"input": "./first.yml"
|
|
112
|
+
},{
|
|
113
|
+
"input": "./second.yml"
|
|
114
|
+
}]
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
| Name | Item | type | Default | Description |
|
|
119
|
+
|----------------|----------------|-------------|----------|-----------------------------------------------------------|
|
|
120
|
+
|output | | string | |The relative location of the output directory |
|
|
121
|
+
|outputCore | | string | {output} |The relative location of the output directory for core |
|
|
122
|
+
|outputServices | | string | {output} |The relative location of the output directory for services |
|
|
123
|
+
|outputModels | | string | {output} |The relative location of the output directory for models |
|
|
124
|
+
|outputSchemas | | string | {output} |The relative location of the output directory for schemas |
|
|
125
|
+
|httpClient | | string |'fetch' |The selected httpClient (fetch or XHR) |
|
|
126
|
+
|useOptions | | boolean |false |Use options or arguments functions |
|
|
127
|
+
|useUnionTypes | | boolean |false |Use union types instead of enums |
|
|
128
|
+
|exportCore | | boolean |true |Generate core client classes |
|
|
129
|
+
|exportServices | | boolean |true |Generate services |
|
|
130
|
+
|exportModels | | boolean |true |Generate models |
|
|
131
|
+
|exportSchemas | | boolean |false |Generate schemas |
|
|
132
|
+
|clean | | boolean |true |Clean a directory before generation |
|
|
133
|
+
|request | | string | |Path to custom request file |
|
|
134
|
+
|interfacePrefix | | string |'I' |Prefix for interface model |
|
|
135
|
+
|enumPrefix | | string |'E' |Prefix for enum model |
|
|
136
|
+
|typePrefix | | string |'T' |Prefix for type model |
|
|
137
|
+
|items | | array | | |
|
|
138
|
+
| |input | string | |The relative location of the OpenAPI spec |
|
|
139
|
+
| |output | string | | |
|
|
140
|
+
| |outputCore | string | | |
|
|
141
|
+
| |outputServices | string | | |
|
|
142
|
+
| |outputModels | string | | |
|
|
143
|
+
| |outputSchemas | string | | |
|
|
144
|
+
| |httpClient | string |'fetch' |The selected httpClient (fetch or XHR) |
|
|
145
|
+
| |useOptions | boolean |false |Use options or arguments functions |
|
|
146
|
+
| |useUnionTypes | boolean |false |Use union types instead of enums |
|
|
147
|
+
| |exportCore | boolean |true |Generate core client classes |
|
|
148
|
+
| |exportServices | boolean |true |Generate services client classes |
|
|
149
|
+
| |exportModels | boolean |true |Generate models client classes |
|
|
150
|
+
| |exportSchemas | boolean |true |Generate schemas client classes |
|
|
151
|
+
| |clean | boolean |true |Clean a directory before generation |
|
|
152
|
+
| |request | string | |Path to custom request file |
|
|
153
|
+
| |write | boolean |true |Write the files to disk (true or false) |
|
|
154
|
+
| |interfacePrefix | string | |Prefix for interface model(I) |
|
|
155
|
+
| |enumPrefix | string | |Prefix for enum model(E) |
|
|
156
|
+
| |typePrefix | string | |Prefix for type model(T) |
|
|
94
157
|
|
|
95
158
|
## Example
|
|
96
159
|
|
package/bin/index.js
CHANGED
|
@@ -7,7 +7,6 @@ const program = require('commander');
|
|
|
7
7
|
const pkg = require('../package.json');
|
|
8
8
|
|
|
9
9
|
const OpenAPI = require(path.resolve(__dirname, '../dist/index.js'));
|
|
10
|
-
const { rmdirSync } = require('fs');
|
|
11
10
|
|
|
12
11
|
const params = program
|
|
13
12
|
.name('openapi')
|
|
@@ -15,6 +14,10 @@ const params = program
|
|
|
15
14
|
.version(pkg.version)
|
|
16
15
|
.option('-i, --input <value>', 'OpenAPI specification, can be a path, url or string content (required)')
|
|
17
16
|
.option('-o, --output <value>', 'Output directory (required)')
|
|
17
|
+
.option('-oc, --outputCore <value>', 'Output directory for core files')
|
|
18
|
+
.option('-os, --outputServices <value>', 'Output directory for services')
|
|
19
|
+
.option('-om, --outputModels <value>', 'Output directory for models')
|
|
20
|
+
.option('-osm, --outputSchemas <value>', 'Output directory for schemas')
|
|
18
21
|
.option('-c, --client <value>', 'HTTP client to generate [fetch, xhr, node]', 'fetch')
|
|
19
22
|
.option('--useOptions <value>', 'Use options instead of arguments', false)
|
|
20
23
|
.option('--useUnionTypes <value>', 'Use union types instead of enums', false)
|
|
@@ -24,6 +27,9 @@ const params = program
|
|
|
24
27
|
.option('--exportSchemas <value>', 'Write schemas to disk', false)
|
|
25
28
|
.option('--clean <value>', 'Clean a directory before generation', true)
|
|
26
29
|
.option('--request <value>', 'Path to custom request file')
|
|
30
|
+
.option('--interfacePrefix <value>', 'Prefix for interface model(default: "I")')
|
|
31
|
+
.option('--enumPrefix <value>', 'Prefix for enum model(default: "E")')
|
|
32
|
+
.option('--typePrefix <value>', 'Prefix for type model(default: "T")')
|
|
27
33
|
.parse(process.argv)
|
|
28
34
|
.opts();
|
|
29
35
|
|
|
@@ -36,24 +42,69 @@ function isValidJson(value) {
|
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Preparation the configuration from the root level
|
|
47
|
+
*/
|
|
48
|
+
function prepareRootOptions(options) {
|
|
49
|
+
return {
|
|
50
|
+
output: options.output,
|
|
51
|
+
outputCore: options.outputCore,
|
|
52
|
+
outputServices: options.outputServices,
|
|
53
|
+
outputModels: options.outputModels,
|
|
54
|
+
outputSchemas: options.outputSchemas,
|
|
55
|
+
httpClient: options.client,
|
|
56
|
+
useOptions: isValidJson(options.useOptions) ? JSON.parse(options.useOptions) : false,
|
|
57
|
+
useUnionTypes: isValidJson(options.useUnionTypes) ? JSON.parse(options.useUnionTypes) : false,
|
|
58
|
+
exportCore: isValidJson(options.exportCore) ? JSON.parse(options.exportCore) : false,
|
|
59
|
+
exportServices: isValidJson(options.exportServices) ? JSON.parse(options.exportServices) : false,
|
|
60
|
+
exportModels: isValidJson(options.exportModels) ? JSON.parse(options.exportModels) : false,
|
|
61
|
+
exportSchemas: isValidJson(options.exportSchemas) ? JSON.parse(options.exportSchemas) : false,
|
|
62
|
+
clean: isValidJson(options.clean) ? JSON.parse(options.clean) : false,
|
|
63
|
+
request: options.request,
|
|
64
|
+
interfacePrefix: options.interfacePrefix ? options.interfacePrefix : 'I',
|
|
65
|
+
enumPrefix: options.enumPrefix ? options.enumPrefix : 'E',
|
|
66
|
+
typePrefix: options.typePrefix ? options.typePrefix : 'T',
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Preparation the configuration from second level
|
|
72
|
+
*/
|
|
73
|
+
function prepareOptions(options, rootOptions) {
|
|
74
|
+
return options.map(option => {
|
|
75
|
+
return {
|
|
76
|
+
input: option.input,
|
|
77
|
+
output: option.output ? option.output : rootOptions ? rootOptions.output : '',
|
|
78
|
+
outputCore: option.outputCore ? option.outputCore : rootOptions ? rootOptions.outputCore : '',
|
|
79
|
+
outputServices: option.outputServices ? option.outputServices : rootOptions ? rootOptions.outputServices : '',
|
|
80
|
+
outputModels: option.outputModels ? option.outputModels : rootOptions ? rootOptions.outputModels : '',
|
|
81
|
+
outputSchemas: option.outputSchemas ? option.outputSchemas : rootOptions ? rootOptions.outputSchemas : '',
|
|
82
|
+
httpClient: option.client ? option.client : rootOptions ? rootOptions.client : '',
|
|
83
|
+
useOptions: isValidJson(option.useOptions) ? JSON.parse(option.useOptions) : rootOptions ? rootOptions.useOptions : false,
|
|
84
|
+
useUnionTypes: isValidJson(option.useUnionTypes) ? JSON.parse(option.useUnionTypes) : rootOptions ? rootOptions.useUnionTypes : false,
|
|
85
|
+
exportCore: isValidJson(option.exportCore) ? JSON.parse(option.exportCore) : rootOptions ? rootOptions.exportCore : false,
|
|
86
|
+
exportServices: isValidJson(option.exportServices) ? JSON.parse(option.exportServices) : rootOptions ? rootOptions.exportServices : false,
|
|
87
|
+
exportModels: isValidJson(option.exportModels) ? JSON.parse(option.exportModels) : rootOptions ? rootOptions.exportModels : false,
|
|
88
|
+
exportSchemas: isValidJson(option.exportSchemas) ? JSON.parse(option.exportSchemas) : rootOptions ? rootOptions.exportSchemas : false,
|
|
89
|
+
clean: isValidJson(option.clean) ? JSON.parse(option.clean) : rootOptions ? rootOptions.clean : false,
|
|
90
|
+
request: option.request ? option.request : rootOptions ? rootOptions.request : '',
|
|
91
|
+
interfacePrefix: option.interfacePrefix ? option.interfacePrefix : rootOptions ? rootOptions.interfacePrefix : 'I',
|
|
92
|
+
enumPrefix: option.enumPrefix ? option.enumPrefix : rootOptions ? rootOptions.enumPrefix : 'E',
|
|
93
|
+
typePrefix: option.typePrefix ? option.typePrefix : rootOptions ? rootOptions.typePrefix : 'T',
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function generate(options) {
|
|
99
|
+
return OpenAPI.generate(options)
|
|
53
100
|
.then(() => {
|
|
54
|
-
console.group(`Generation from
|
|
55
|
-
|
|
56
|
-
|
|
101
|
+
console.group(`Generation from has been finished`);
|
|
102
|
+
const group = Array.isArray(options) ? options : Array.of(options);
|
|
103
|
+
group.forEach(option => {
|
|
104
|
+
console.log(`Generation from "${option.input}" was finished`);
|
|
105
|
+
console.log(`Output folder: ${path.resolve(process.cwd(), option.output)}`);
|
|
106
|
+
console.log('==================================');
|
|
107
|
+
});
|
|
57
108
|
console.groupEnd();
|
|
58
109
|
})
|
|
59
110
|
.catch(error => {
|
|
@@ -68,15 +119,9 @@ if (OpenAPI) {
|
|
|
68
119
|
if (fs.existsSync(configFile)) {
|
|
69
120
|
const dataString = fs.readFileSync(configFile, { encoding: `UTF-8` });
|
|
70
121
|
const configs = isValidJson(dataString) ? JSON.parse(dataString) : [];
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
rmdirSync(config.output, { recursive: true, force: true });
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
configs.forEach(config => {
|
|
77
|
-
generate(config);
|
|
78
|
-
});
|
|
122
|
+
let operations = Array.isArray(configs) ? prepareOptions(configs) : prepareOptions(configs.items, prepareRootOptions(configs));
|
|
123
|
+
generate(operations);
|
|
79
124
|
} else {
|
|
80
|
-
generate(params);
|
|
125
|
+
generate(prepareOptions(params));
|
|
81
126
|
}
|
|
82
127
|
}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),n=require("os"),t=require("camelcase"),r=require("json-schema-ref-parser"),a=require("fs"),o=require("mkdirp"),l=require("rimraf"),i=require("util"),s=require("handlebars/runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var c=u(e),m=u(t),d=u(r),f=u(o),h=u(l),y=p(s);function v(n){const t=e.extname(n),r=e.basename(n);return t?r.substr(0,r.length-t.length):r}function g(e){return"string"==typeof e}const P=/\\/g;function b(e){return c.default.dirname(e).replace(P,"/")}function O(...e){return c.default.join(...e).replace(P,"/")}function x(...e){return c.default.resolve(...e).replace(P,"/")}class k{constructor(e){this._refs={},g(e)?this._root={path:b(e),fileName:v(e)}:this._root={path:""}}addRefs(e){return this._refs=e,this}values(...e){return this._refs.values(...e)}get(e){return this._refs.get(e)}paths(...e){return this._refs.paths(...e)}exists(e){return this._refs.exists(e)}fileName(){return this._root.fileName?this._root.fileName:""}}var R;exports.HttpClient=void 0,(R=exports.HttpClient||(exports.HttpClient={})).FETCH="fetch",R.XHR="xhr",R.NODE="node",R.AXIOS="axios";var w,q=function e(n,t){if(n===t)return!0;if(n&&t&&"object"==typeof n&&"object"==typeof t){if(n.constructor!==t.constructor)return!1;var r,a,o;if(Array.isArray(n)){if((r=n.length)!=t.length)return!1;for(a=r;0!=a--;)if(!e(n[a],t[a]))return!1;return!0}if(n.constructor===RegExp)return n.source===t.source&&n.flags===t.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===t.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===t.toString();if((r=(o=Object.keys(n)).length)!==Object.keys(t).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,o[a]))return!1;for(a=r;0!=a--;){var l=o[a];if(!e(n[l],t[l]))return!1}return!0}return n!=n&&t!=t};function j(e,n,t=[],r="",a=!1){if(n.$ref){const o=n.$ref.match(/^(http:\/\/|https:\/\/)/g)?n.$ref:n.$ref.match(/^(#\/)/g)?O(r,n.$ref):O(b(r),n.$ref);if(function(e,n){return-1!==e.findIndex((e=>q(e.value,n)))}(t,o))return t;a?t.push({value:o,type:w.SCHEMA}):t.push({value:o,type:w.OTHERS});const l=e.get(o),i=n.$ref.match(/^(http:\/\/|https:\/\/)/g)?"":n.$ref.match(/^(#\/)/g)?r:O(b(r),n.$ref);return j(e,l,t,i,a)}return n.schema?Object.values(n).forEach(((n,a)=>{n instanceof Object&&j(e,n,t,r,!0)})):Object.values(n).forEach(((n,o)=>{n instanceof Object&&j(e,n,t,r,a)})),t}function A(e,n){return j(e,n).filter((e=>e.type===w.SCHEMA)).map((e=>e.value))}function C(e,n,t){return function(e,n,t){for(let r=0;r<t.length;++r)if(q(e,t[r]))return n===r;return!1}(e,n,t)}function $(e){return null==e?void 0:e.replace(/\\/g,"\\\\")}function S(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}function I(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function D(e){return null!=e&&""!==e}function H(e){return Array.isArray(e)?e.filter(((e,n,t)=>t.indexOf(e)===n)).filter(D).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]}function E(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}function T(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}!function(e){e[e.SCHEMA=0]="SCHEMA",e[e.OTHERS=1]="OTHERS"}(w||(w={}));const B=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function N(e){if(!e)return e;return e.replace(/\\/g,"/")}function M(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}function L(e,n){const t={type:"any",base:"any",template:null,imports:[],path:""},r=function(e){return e.trim().replace(/^#\/definitions\//,"").replace(/^#\/parameters\//,"").replace(/^#\/responses\//,"").replace(/^#\/securityDefinitions\//,"")}(N(e)||"");if(t.path=function(e){if(!e)return"";const n=e.lastIndexOf("/");return-1===n?"":e.substring(0,n+1)}(r),/\[.*\]$/g.test(r)){const e=r.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=L(e[1]);t.path=n.path;const r=L(e[2]);"any[]"===n.type?(t.type=`${r.type}[]`,t.base=r.type,n.imports=[]):r.type?(t.type=`${n.type}<${r.type}>`,t.base=n.type,t.template=r.type):(t.type=n.type,t.base=n.type,t.template=n.type),t.imports.push(...n.imports),t.imports.push(...r.imports)}}else if(a=r,B.has(a)){const e=function(e){return B.get(e)}(r);t.path=r,e&&(t.type=e,t.base=e)}else if(r){const e=function(e){const n=e.lastIndexOf("/");return M(-1===n?e:e.substring(n,e.length))}(r);t.path=r,t.type=e,t.base=e,t.imports.push({name:e,alias:"",path:r})}var a;return t.type===n&&(t.type="T",t.base="T",t.imports=[]),t}function U(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=L(l.$ref);a.push({name:T(o),alias:"",path:"",export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:I(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:$(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=t({openApi:e,definition:l});a.push({name:T(o),alias:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:I(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:$(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}function _(e){var n;const{openApi:t,definition:r,isDefinition:a=!1,name:o="",path:l=""}=e,i={name:o,path:l,alias:"",export:"interface",type:"any",base:"any",template:null,link:null,description:I(r.description),isDefinition:a,isReadOnly:!0===r.readOnly,isNullable:!0===r["x-nullable"],isRequired:void 0!==r.default,format:r.format,maximum:r.maximum,exclusiveMaximum:r.exclusiveMaximum,minimum:r.minimum,exclusiveMinimum:r.exclusiveMinimum,multipleOf:r.multipleOf,maxLength:r.maxLength,minLength:r.minLength,maxItems:r.maxItems,minItems:r.minItems,uniqueItems:r.uniqueItems,maxProperties:r.maxProperties,minProperties:r.minProperties,pattern:$(r.pattern),imports:[],enum:[],enums:[],properties:[]};if(r.$ref){const e=L(r.$ref);return i.export="reference",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}if(r.enum&&"boolean"!==r.type){const e=S(H(r.enum),r);if(e.length)return i.export="enum",i.type="string",i.base="string",i.enum.push(...e),i}if(("int"===r.type||"integer"===r.type)&&r.description){const e=E(r.description);if(e.length)return i.export="enum",i.type="number",i.base="number",i.enum.push(...e),i}if("array"===r.type&&r.items){if(r.items.$ref){const e=L(r.items.$ref);return i.export="array",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}{const e=_({openApi:t,definition:r.items});return i.export="array",i.type=e.type,i.base=e.base,i.template=e.template,i.link=e,i.imports.push(...e.imports),i}}if("object"===r.type&&"object"==typeof r.additionalProperties){if(r.additionalProperties.$ref){const e=L(r.additionalProperties.$ref);return i.export="dictionary",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}{const e=_({openApi:t,definition:r.additionalProperties});return i.export="dictionary",i.type=e.type,i.base=e.base,i.template=e.template,i.link=e,i.imports.push(...e.imports),i}}if(null===(n=r.allOf)||void 0===n?void 0:n.length){const e=function(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>a({openApi:e,definition:n})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=U(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o}(t,r,r.allOf,"all-of",_);return i.export=e.type,i.imports.push(...e.imports),i.properties.push(...e.properties),i.enums.push(...e.enums),i}if("object"===r.type){if(i.export="interface",i.type="any",i.base="any",r.properties){U(t,r,_).forEach((e=>{i.imports.push(...e.imports),i.enums.push(...e.enums),i.properties.push(e),"enum"===e.export&&i.enums.push(e)}))}return i}if(r.type){const e=L(r.type);return i.export="generic",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}return i}function F(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===n.export&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}const W=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function V(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(W,"_$1")}function Q(e,n){const t=e.isRequired&&void 0===e.default,r=n.isRequired&&void 0===n.default;return t&&!r?-1:!t&&r?1:0}function z(e,n,t){const r={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return t.forEach((t=>{const a=t.$ref?e.get(t.$ref):t,o=function(e,n){const t={path:"",in:n.in,prop:n.name,export:"interface",name:V(n.name),alias:"",type:"any",base:"any",template:null,link:null,description:I(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n["x-nullable"],format:n.format,maximum:n.maximum,exclusiveMaximum:n.exclusiveMaximum,minimum:n.minimum,exclusiveMinimum:n.exclusiveMinimum,multipleOf:n.multipleOf,maxLength:n.maxLength,minLength:n.minLength,maxItems:n.maxItems,minItems:n.minItems,uniqueItems:n.uniqueItems,pattern:$(n.pattern),imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=L(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=F(n,t),t.path=e.path,t}if(n.enum){const e=S(H(n.enum),n);if(e.length)return t.export="enum",t.type="string",t.base="string",t.enum.push(...e),t.default=F(n,t),t}if(("int"===n.type||"integer"===n.type)&&n.description){const e=E(n.description);if(e.length)return t.export="enum",t.type="number",t.base="number",t.enum.push(...e),t.default=F(n,t),t}if("array"===n.type&&n.items){const e=L(n.items.type);return t.export="array",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=F(n,t),t}if("object"===n.type&&n.items){const e=L(n.items.type);return t.export="dictionary",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=F(n,t),t}if(n.schema){if(n.schema.$ref){const e=L(n.schema.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=F(n,t),t}{const r=_({openApi:e,definition:n.schema});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t.default=F(n,t),t}}if(n.type){const e=L(n.type);return t.export="generic",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=F(n,t),t}return t}(n,a);if("api-version"!==o.prop)switch(o.in){case"path":r.parametersPath.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"query":r.parametersQuery.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"header":r.parametersHeader.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"formData":r.parametersForm.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"body":r.parametersBody=o,r.parameters.push(o),r.imports.push(...o.imports)}})),r.parameters=r.parameters.sort(Q),r.parametersPath=r.parametersPath.sort(Q),r.parametersQuery=r.parametersQuery.sort(Q),r.parametersForm=r.parametersForm.sort(Q),r.parametersCookie=r.parametersCookie.sort(Q),r.parametersHeader=r.parametersHeader.sort(Q),r}function J(e,n,t){const r={in:"response",name:"",alias:"",path:"",code:t,description:I(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.schema){if(n.schema.$ref){const e=L(n.schema.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}{const t=_({openApi:e,definition:n.schema});return r.export=t.export,r.type=t.type,r.base=t.base,r.template=t.template,r.link=t.link,r.isReadOnly=t.isReadOnly,r.isRequired=t.isRequired,r.isNullable=t.isNullable,r.format=t.format,r.maximum=t.maximum,r.exclusiveMaximum=t.exclusiveMaximum,r.minimum=t.minimum,r.exclusiveMinimum=t.exclusiveMinimum,r.multipleOf=t.multipleOf,r.maxLength=t.maxLength,r.minLength=t.minLength,r.maxItems=t.maxItems,r.minItems=t.minItems,r.uniqueItems=t.uniqueItems,r.maxProperties=t.maxProperties,r.minProperties=t.minProperties,r.pattern=$(t.pattern),r.imports.push(...t.imports),r.enum.push(...t.enum),r.enums.push(...t.enums),r.properties.push(...t.properties),r}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return r.in="header",r.name=e,r.type="string",r.base="string",r;return r}function Z(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function G(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?G(e.link,n.link):t}function X(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>G(n,e)))===n))}function K(e,n,t,r,a,o){var l;const i=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=m.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(l=a.tags)||void 0===l?void 0:l[0])||"Service"),s=`${r}${i}`,u=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n)}(a.operationId||s),p=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${V(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(t),c={service:i,name:u,summary:I(a.summary),description:I(a.description),deprecated:!0===a.deprecated,method:r.toUpperCase(),path:p,parameters:[...o.parameters],parametersPath:[...o.parametersPath],parametersQuery:[...o.parametersQuery],parametersForm:[...o.parametersForm],parametersHeader:[...o.parametersHeader],parametersCookie:[...o.parametersCookie],parametersBody:o.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(a.parameters){const t=z(e,n,a.parameters);c.imports.push(...t.imports),c.parameters.push(...t.parameters),c.parametersPath.push(...t.parametersPath),c.parametersQuery.push(...t.parametersQuery),c.parametersForm.push(...t.parametersForm),c.parametersHeader.push(...t.parametersHeader),c.parametersCookie.push(...t.parametersCookie),c.parametersBody=t.parametersBody}if(a.responses){const t=function(e,n,t){const r=[];for(const a in t)if(t.hasOwnProperty(a)){const o=t[a],l=o.$ref?e.get(o.$ref):o,i=Z(a);if(i){const e=J(n,l,i);r.push(e)}}return r.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}(e,n,a.responses),r=X(t);c.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(t),c.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(r),r.forEach((e=>{c.results.push(e),c.imports.push(...e.imports)}))}return c}function Y(e,n){const t=function(e="1.0"){return e.replace(/^v/gi,"")}(n.info.version),r=function(e){var n;const t=(null===(n=e.schemes)||void 0===n?void 0:n[0])||"http",r=e.host,a=e.basePath||"";return r?`${t}://${r}${a}`:a}(n),a=function(e,n){const t=[],r=A(e,n);if(r)for(const a of r){const r=e.get(a),o=L(a),l=_({openApi:n,definition:r,isDefinition:!0,name:o.base,path:o.path});t.push(l)}return t.filter(C)}(e,n),o=function(e,n){const t=new Map;for(const r in n.paths)if(n.paths.hasOwnProperty(r)){const a=n.paths[r],o=z(e,n,a.parameters||[]);for(const l in a)if(a.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=K(e,n,r,l,a[l],o),s=t.get(i.service)||{name:i.service,operations:[],imports:[]};s.operations.push(i),s.imports.push(...i.imports),t.set(i.service,s)}}return Array.from(t.values())}(e,n);return{version:t,server:r,models:a,services:o}}function ee(e){return e.sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}))}function ne(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function te(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}function re(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}const ae=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function oe(e){return ae.has(e)}function le(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(/^./,(e=>e.toUpperCase()))}function ie(n,t){const r={type:"any",base:"any",template:null,imports:[],path:""},a=function(n){if(!n.match(/^(http:\/\/|https:\/\/|#\/)/g)&&!oe(n)&&!n.match(/^array\[[a-z]+\]$/g)){const t=b(n),r=e.extname(n),a=r.toLowerCase().match(/(\.json|\.yaml|\.yml)$/g)?le(e.basename(n,r)):le(e.basename(n));return t?O(t,a):a}return n.trim().replace(/^#\/components\/schemas\//,"").replace(/^#\/components\/responses\//,"").replace(/^#\/components\/parameters\//,"").replace(/^#\/components\/examples\//,"").replace(/^#\/components\/requestBodies\//,"").replace(/^#\/components\/headers\//,"").replace(/^#\/components\/securitySchemes\//,"").replace(/^#\/components\/links\//,"").replace(/^#\/components\/callbacks\//,"")}(N(n)||"");if(/\[.*\]$/g.test(a)){const e=a.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=ie(e[1]);r.path=n.path;const t=ie(e[2]);"any[]"===n.type?(r.type=`${t.type}[]`,r.base=`${t.type}`,n.imports=[]):t.type?(r.type=`${n.type}<${t.type}>`,r.base=n.type,r.template=t.type):(r.type=n.type,r.base=n.type,r.template=n.type),r.imports.push(...n.imports),r.imports.push(...t.imports)}}else if(oe(a)){const e=(o=a,ae.get(o));r.path=a,e&&(r.type=e,r.base=e)}else if(a){const e=function(e){const n=e.lastIndexOf("/");return re(-1===n?e:e.substring(n,e.length))}(a);r.path=a,r.type=e,r.base=e,r.imports.push({name:e,alias:"",path:a})}var o;return r.type===t&&(r.type="T",r.base="T",r.imports=[]),r}function se(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=ie(l.$ref);a.push({name:te(o),alias:"",path:e.path,export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:ne(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:$(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=t({openApi:e,definition:l});a.push({name:te(o),alias:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:ne(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:$(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}function ue(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>a({openApi:e,definition:n})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=se(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o.imports=o.imports.filter(C),o}function pe(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===(null==n?void 0:n.export)&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function ce(e){var n,t,r;const{openApi:a,definition:o,isDefinition:l=!1,name:i="",path:s=""}=e,u={name:i,alias:"",path:s,export:"interface",type:"any",base:"any",template:null,link:null,description:ne(o.description),isDefinition:l,isReadOnly:!0===o.readOnly,isNullable:!0===o.nullable,isRequired:void 0!==o.default,format:o.format,maximum:o.maximum,exclusiveMaximum:o.exclusiveMaximum,minimum:o.minimum,exclusiveMinimum:o.exclusiveMinimum,multipleOf:o.multipleOf,maxLength:o.maxLength,minLength:o.minLength,maxItems:o.maxItems,minItems:o.minItems,uniqueItems:o.uniqueItems,maxProperties:o.maxProperties,minProperties:o.minProperties,pattern:$(o.pattern),imports:[],enum:[],enums:[],properties:[]};if(o.$ref){const e=ie(o.$ref);return u.export="reference",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=pe(o,u),u}if(o.enum&&"boolean"!==o.type){const e=function(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}((p=o.enum,Array.isArray(p)?p.filter(((e,n,t)=>t.indexOf(e)===n)).filter(D).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]),o);if(e.length)return u.export="enum",u.type="string",u.base="string",u.enum.push(...e),u.default=pe(o,u),u}var p;if(("int"===o.type||"integer"===o.type)&&o.description){const e=function(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}(o.description);if(e.length)return u.export="enum",u.type="number",u.base="number",u.enum.push(...e),u.default=pe(o,u),u}if("array"===o.type&&o.items){if(o.items.$ref){const e=ie(o.items.$ref);return u.export="array",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=pe(o,u),u}{const e=ce({openApi:a,definition:o.items});return u.export="array",u.type=e.type,u.base=e.base,u.template=e.template,u.link=e,u.imports.push(...e.imports),u.default=pe(o,u),u}}if("object"===o.type&&"object"==typeof o.additionalProperties){if(o.additionalProperties.$ref){const e=ie(o.additionalProperties.$ref);return u.export="dictionary",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=pe(o,u),u}{const e=ce({openApi:a,definition:o.additionalProperties});return u.export="dictionary",u.type=e.type,u.base=e.base,u.template=e.template,u.link=e,u.imports.push(...e.imports),u.default=pe(o,u),u}}if(null===(n=o.oneOf)||void 0===n?void 0:n.length){const e=ue(a,o,o.oneOf,"one-of",ce);return u.export=e.type,u.imports.push(...e.imports),u.properties.push(...e.properties),u.enums.push(...e.enums),u}if(null===(t=o.anyOf)||void 0===t?void 0:t.length){const e=ue(a,o,o.anyOf,"any-of",ce);return u.export=e.type,u.imports.push(...e.imports),u.properties.push(...e.properties),u.enums.push(...e.enums),u}if(null===(r=o.allOf)||void 0===r?void 0:r.length){const e=ue(a,o,o.allOf,"all-of",ce);return u.export=e.type,u.imports.push(...e.imports),u.properties.push(...e.properties),u.enums.push(...e.enums),u}if("object"===o.type){if(u.export="interface",u.type="any",u.base="any",u.default=pe(o,u),o.properties){se(a,o,ce).forEach((e=>{u.imports.push(...e.imports),u.enums.push(...e.enums),u.properties.push(e),"enum"===e.export&&u.enums.push(e)}))}return u}if(o.type){const e=ie(o.type);return u.export="generic",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=pe(o,u),u}return u}const me=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function de(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(me,"_$1")}function fe(e,n){const t=e.isRequired&&void 0===e.default,r=n.isRequired&&void 0===n.default;return t&&!r?-1:!t&&r?1:0}function he(e,n,t){const r={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return t.forEach((t=>{const a=t.$ref?e.get(t.$ref):t,o=function(e,n){const t={in:n.in,prop:n.name,export:"interface",name:de(n.name),alias:"",path:"",type:"any",base:"any",template:null,link:null,description:ne(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=ie(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t}if(n.schema){if(n.schema.$ref){const e=ie(n.schema.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=pe(n.schema),t}{const r=ce({openApi:e,definition:n.schema});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.isReadOnly=r.isReadOnly,t.isRequired=t.isRequired||r.isRequired,t.isNullable=t.isNullable||r.isNullable,t.format=r.format,t.maximum=r.maximum,t.exclusiveMaximum=r.exclusiveMaximum,t.minimum=r.minimum,t.exclusiveMinimum=r.exclusiveMinimum,t.multipleOf=r.multipleOf,t.maxLength=r.maxLength,t.minLength=r.minLength,t.maxItems=r.maxItems,t.minItems=r.minItems,t.uniqueItems=r.uniqueItems,t.maxProperties=r.maxProperties,t.minProperties=r.minProperties,t.pattern=$(r.pattern),t.default=r.default,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t}}return t}(n,a);if("api-version"!==o.prop)switch(a.in){case"path":r.parametersPath.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"query":r.parametersQuery.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"formData":r.parametersForm.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"cookie":r.parametersCookie.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"header":r.parametersHeader.push(o),r.parameters.push(o),r.imports.push(...o.imports)}})),r.parameters=r.parameters.sort(fe),r.parametersPath=r.parametersPath.sort(fe),r.parametersQuery=r.parametersQuery.sort(fe),r.parametersForm=r.parametersForm.sort(fe),r.parametersCookie=r.parametersCookie.sort(fe),r.parametersHeader=r.parametersHeader.sort(fe),r}function ye(e,n){return n["application/json-patch+json"]&&n["application/json-patch+json"].schema||n["application/json"]&&n["application/json"].schema||n["text/json"]&&n["text/json"].schema||n["text/plain"]&&n["text/plain"].schema||n["multipart/mixed"]&&n["multipart/mixed"].schema||n["multipart/related"]&&n["multipart/related"].schema||n["multipart/batch"]&&n["multipart/batch"].schema||null}function ve(e,n){const t={in:"body",prop:"body",export:"interface",name:"requestBody",alias:"",path:"",type:"any",base:"any",template:null,link:null,description:ne(n.description),default:void 0,isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.content){const a=ye(0,n.content);if(a){if(t.mediaType=(r=n.content,Object.keys(r).find((e=>["application/json-patch+json","application/json","text/json","text/plain","multipart/mixed","multipart/related","multipart/batch"].includes(e)))||null),null==a?void 0:a.$ref){const e=ie(a.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.path=e.path,t.template=e.template,t.imports.push(...e.imports),t}{const n=ce({openApi:e,definition:a});return t.export=n.export,t.type=n.type,t.base=n.base,t.path=n.path,t.template=n.template,t.link=n.link,t.isReadOnly=n.isReadOnly,t.isRequired=t.isRequired||n.isRequired,t.isNullable=t.isNullable||n.isNullable,t.format=n.format,t.maximum=n.maximum,t.exclusiveMaximum=n.exclusiveMaximum,t.minimum=n.minimum,t.exclusiveMinimum=n.exclusiveMinimum,t.multipleOf=n.multipleOf,t.maxLength=n.maxLength,t.minLength=n.minLength,t.maxItems=n.maxItems,t.minItems=n.minItems,t.uniqueItems=n.uniqueItems,t.maxProperties=n.maxProperties,t.minProperties=n.minProperties,t.pattern=$(n.pattern),t.imports.push(...n.imports),t.enum.push(...n.enum),t.enums.push(...n.enums),t.properties.push(...n.properties),t}}}var r;return t}function ge(e,n,t){const r={in:"response",name:"",alias:"",path:"",code:t,description:ne(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.content){const t=ye(0,n.content);if(t){if(null==t?void 0:t.$ref){const e=ie(t.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.path=e.path,r.template=e.template,r.imports.push(...e.imports),r}{const n=ce({openApi:e,definition:t});return r.export=n.export,r.type=n.type,r.base=n.base,r.path=n.path,r.template=n.template,r.link=n.link,r.isReadOnly=n.isReadOnly,r.isRequired=n.isRequired,r.isNullable=n.isNullable,r.format=n.format,r.maximum=n.maximum,r.exclusiveMaximum=n.exclusiveMaximum,r.minimum=n.minimum,r.exclusiveMinimum=n.exclusiveMinimum,r.multipleOf=n.multipleOf,r.maxLength=n.maxLength,r.minLength=n.minLength,r.maxItems=n.maxItems,r.minItems=n.minItems,r.uniqueItems=n.uniqueItems,r.maxProperties=n.maxProperties,r.minProperties=n.minProperties,r.pattern=$(n.pattern),r.imports.push(...n.imports),r.enum.push(...n.enum),r.enums.push(...n.enums),r.properties.push(...n.properties),r}}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return r.in="header",r.name=e,r.type="string",r.base="string",r;return r}function Pe(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function be(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?be(e.link,n.link):t}function Oe(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>be(n,e)))===n))}function xe(e,n,t,r,a,o,l){const i=`${r}${l}`,s=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n)}(a.operationId||i),u=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${de(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(t),p={service:l,name:s,summary:ne(a.summary),description:ne(a.description),deprecated:!0===a.deprecated,method:r.toUpperCase(),path:u,parameters:[...o.parameters],parametersPath:[...o.parametersPath],parametersQuery:[...o.parametersQuery],parametersForm:[...o.parametersForm],parametersHeader:[...o.parametersHeader],parametersCookie:[...o.parametersCookie],parametersBody:o.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(a.parameters){const t=he(e,n,a.parameters);p.imports.push(...t.imports),p.parameters.push(...t.parameters),p.parametersPath.push(...t.parametersPath),p.parametersQuery.push(...t.parametersQuery),p.parametersForm.push(...t.parametersForm),p.parametersHeader.push(...t.parametersHeader),p.parametersCookie.push(...t.parametersCookie),p.parametersBody=t.parametersBody}if(a.requestBody){const t=ve(n,a.requestBody.$ref?e.get(a.requestBody.$ref):a.requestBody);p.imports.push(...t.imports),p.parameters.push(t),p.parameters=p.parameters.sort(fe),p.parametersBody=t}if(a.responses){const t=function(e,n,t){const r=[];for(const a in t)if(t.hasOwnProperty(a)){const o=t[a],l=o.$ref?e.get(o.$ref):o,i=Pe(a);if(i){const e=ge(n,l,i);r.push(e)}}return r.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}(e,n,a.responses),r=Oe(t);p.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(t),p.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(r),r.forEach((e=>{p.results.push(e),p.imports.push(...e.imports)}))}return p}function ke(e,n){var t;return function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=m.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(t=e.tags)||void 0===t?void 0:t[0])||`${le(n)}Service`)}function Re(e,n){e.filter((e=>e.path===n.path&&e.type===n.name&&n.alias)).forEach((e=>{e.alias=n.alias,e.base=n.alias}))}function we(e,n){const t=function(e="1.0"){return e.replace(/^v/gi,"")}(n.info.version),r=function(e){var n;const t=null===(n=e.servers)||void 0===n?void 0:n[0],r=(null==t?void 0:t.variables)||{};let a=(null==t?void 0:t.url)||"";for(const e in r)r.hasOwnProperty(e)&&(a=a.replace(`{${e}}`,r[e].default));return a}(n),a=function(e,n){let t=[];const r=A(e,n);if(r){for(const a of r){const r=e.get(a),o=ie(a),l=ce({openApi:n,definition:r,isDefinition:!0,name:o.base,path:o.path});t.push(l)}let a;t=ee(t.filter(C));let o=1;t.forEach((e=>{a&&a.name===e.name?(1===o&&(a.alias=`${e.name}$${o}`,o++),e.alias=`${e.name}$${o}`,o++):(e.alias="",o=1),a=e})),t.forEach((e=>{e.imports=e.imports.map((n=>{const r=t.filter((e=>`${e.path}${e.name}`===n.path&&e.name===n.name));return r.length>0?Object.assign(n,{alias:r[0].alias,path:O((a=e.path,o=r[0].path,c.default.relative(a,o).replace(P,"/")),n.name)}):n;var a,o}))}))}return t.filter(C)}(e,n),o=function(e,n){const t=new Map;for(const r in n.paths)if(n.paths.hasOwnProperty(r)){const a=n.paths[r],o=he(e,n,a.parameters||[]);for(const l in a)if(a.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=a[l],s=ke(i,e.fileName()),u=t.get(s)||{name:s,operations:[],imports:[]},p=xe(e,n,r,l,i,o,s);u.operations.push(p),p.imports=p.imports.map((e=>u.imports.find((n=>n.path===e.path))||e)),u.imports.push(...p.imports),t.set(p.service,u)}}return t.forEach((e=>{let n;e.imports=e.imports.filter(C).sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}));let t=1;e.imports=e.imports.map((e=>(n&&n.name===e.name?(1===t&&(n.alias=`${e.name}$${t}`,t++),e.alias=`${e.name}$${t}`,t++):(e.alias="",t=1),n=e,e))),e.imports.forEach((n=>{for(const t of e.operations)Re(t.results,n),Re(t.parameters,n)}))})),Array.from(t.values())}(e,n);return{version:t,server:r,models:a,services:o}}i.promisify(a.readFile);const qe=i.promisify(a.writeFile),je=i.promisify(a.copyFile),Ae=i.promisify(a.exists),Ce=f.default,$e=e=>new Promise(((n,t)=>{h.default(e,(e=>{e?t(e):n()}))}));function Se(n,t,r){if(!n.$ref||e.isAbsolute(n.$ref)||n.$ref.match(/^(http:\/\/|https:\/\/|#\/)/g))for(const e of Object.keys(n))n[e]instanceof Object&&Se(n[e],t,r);else n.$ref=O(r,n.$ref);return n}var Ie;function De(e){var n;return null===(n=null==e?void 0:e.enum)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function He(e){var n;return null===(n=null==e?void 0:e.enums)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function Ee(e,n){return e instanceof Object&&"name"in e&&"alias"in e&&"path"in e?function(e,n){const t=`${e.path}${e.name}`.toLowerCase(),r=`${n.path}${n.name}`.toLowerCase();return t.localeCompare(r,"en")}(e,n):function(e,n){const t=e.toLowerCase(),r=n.toLowerCase();return t.localeCompare(r,"en")}(e,n)}function Te(e){var n,t,r;return null===(r=null===(t=null===(n=null==e?void 0:e.imports)||void 0===n?void 0:n.filter(C))||void 0===t?void 0:t.sort(Ee))||void 0===r?void 0:r.filter((n=>e.name!==n.name))}function Be(e,n){const t=[];return e.map(n).forEach((e=>{t.push(...e)})),t}function Ne(e){const n=Object.assign({},e);return n.operations=function(e){const n=new Map;return e.operations.map((t=>{const r=Object.assign({},t);r.imports.push(...Be(r.parameters,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0]))))),r.imports.push(...Be(r.results,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0])))));const a=r.name,o=n.get(a)||0;return o>0&&(r.name=`${a}${o}`),n.set(a,o+1),r}))}(n),n.operations.forEach((e=>{n.imports.push(...e.imports)})),n.imports=n.imports.filter(C),n.imports=function(e){return e.imports.filter(C).sort(Ee).filter((n=>e.name!==n.name))}(n),n}function Me(e){return Object.assign(Object.assign({},e),{models:e.models.map((e=>function(e){return Object.assign(Object.assign({},e),{imports:Te(e),enums:He(e),enum:De(e)})}(e))),services:e.services.map((e=>Ne(e)))})}!function(e){e[e.V2=2]="V2",e[e.V3=3]="V3"}(Ie||(Ie={}));var Le={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n public readonly url: string;\n public readonly status: number;\n public readonly statusText: string;\n public readonly body: any;\n\n constructor(response: ApiResult, message: string) {\n super(message);\n\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.body = response.body;\n }\n}"},usePartial:!0,useData:!0},Ue={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiRequestOptions = {\n readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';\n readonly path: string;\n readonly cookies?: Record<string, any>;\n readonly headers?: Record<string, any>;\n readonly query?: Record<string, any>;\n readonly formData?: Record<string, any>;\n readonly body?: any;\n readonly mediaType?: string;\n readonly responseHeader?: string;\n // TODO TS2344: Redesign the logic for generating errors. Use the string value of the error code.\n // @ts-ignore\n readonly errors?: Record<number, string>;\n}"},usePartial:!0,useData:!0},_e={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiResult = {\n readonly url: string;\n readonly ok: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly body: any;\n}"},usePartial:!0,useData:!0},Fe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<AxiosRequestHeaders> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers: AxiosRequestHeaders = {\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n };\n\n if (isStringWithValue(token)) {\n headers['Authorization'] = `Bearer ${token}`;\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers['Authorization'] = `Bearer ${credentials}`;\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers['Content-Type'] = options.mediaType;\n } else if (isBinary(options.body)) {\n headers['Content-Type'] = 'application/octet-stream';\n } else if (isString(options.body)) {\n headers['Content-Type'] = 'text/plain';\n } else {\n headers['Content-Type'] = 'application/json';\n }\n }\n return headers;\n}"},useData:!0},We={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},Ve={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(response: AxiosResponse): any {\n try {\n const contentType = response.headers['content-type'];\n if (contentType) {\n const isJSON = typeof contentType === 'string' && contentType.toLowerCase().startsWith('application/json');\n\n if (isJSON && isString(response.data)) {\n return JSON.parse(response.data);\n } else {\n return response.data;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},Qe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: AxiosResponse, responseHeader?: string): string | null {\n if (responseHeader) {\n let content = undefined;\n\n Object.keys(response.headers).forEach((header) => {\n if (header === responseHeader) {\n content = header;\n }\n });\n\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},ze={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport FormData from 'form-data';\nimport axios, { AxiosRequestConfig, AxiosResponse, AxiosRequestHeaders } from 'axios';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/getRequestBody"),n,{name:"axios/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/sendRequest"),n,{name:"axios/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/getHeaders"),n,{name:"axios/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/getResponseHeader"),n,{name:"axios/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/getResponseBody"),n,{name:"axios/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using axios client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\n export async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},Je={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<AxiosResponse> {\n const config: AxiosRequestConfig = {\n method: options.method,\n headers: await getHeaders(options),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data: getRequestBody(options),\n url,\n timeout: 1000,\n };\n\n return axios(config).then((response) => response);\n}"},useData:!0},Ze={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},Ge={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},Xe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},Ke={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},Ye={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getRequestBody"),n,{name:"fetch/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/sendRequest"),n,{name:"fetch/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getResponseHeader"),n,{name:"fetch/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getResponseBody"),n,{name:"fetch/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},en={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n };\n if (OpenAPI.WITH_CREDENTIALS) {\n request.credentials = 'include';\n }\n return await fetch(url, request);\n}"},useData:!0},nn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function catchErrors(options: ApiRequestOptions, result: ApiResult): void {\n const errors: Record<number, string> = {\n 400: 'Bad Request',\n 401: 'Unauthorized',\n 403: 'Forbidden',\n 404: 'Not Found',\n 500: 'Internal Server Error',\n 502: 'Bad Gateway',\n 503: 'Service Unavailable',\n ...options.errors,\n }\n\n const error = errors[result.status];\n if (error) {\n throw new ApiError(result, error);\n }\n\n if (!result.ok) {\n throw new ApiError(result, 'Generic Error');\n }\n}"},useData:!0},tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getFormData(params: Record<string, any>): FormData {\n const formData = new FormData();\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n formData.append(key, value);\n }\n });\n return formData;\n}"},useData:!0},rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getQueryString(params: Record<string, any>): string {\n const qs: string[] = [];\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n if (Array.isArray(value)) {\n value.forEach(value => {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n });\n } else {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n }\n }\n });\n if (qs.length > 0) {\n return `?${qs.join('&')}`;\n }\n return '';\n}"},useData:!0},an={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getUrl(options: ApiRequestOptions): string {\n const path = options.path.replace(/[:]/g, '_');\n const url = `${OpenAPI.BASE}${path}`;\n\n if (options.query) {\n return `${url}${getQueryString(options.query)}`;\n }\n return url;\n}"},useData:!0},on={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBinary(value: any): value is Buffer | ArrayBuffer | ArrayBufferView {\n const isBuffer = Buffer.isBuffer(value);\n const isArrayBuffer = types.isArrayBuffer(value);\n const isArrayBufferView = types.isArrayBufferView(value);\n return isBuffer || isArrayBuffer || isArrayBufferView;\n}"},useData:!0},ln={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBlob(value: any): value is Blob {\n return value instanceof Blob;\n}"},useData:!0},sn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isDefined<T>(value: T | null | undefined): value is Exclude<T, null | undefined> {\n return value !== undefined && value !== null;\n}"},useData:!0},un={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isString(value: any): value is string {\n return typeof value === 'string';\n}"},useData:!0},pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isStringWithValue(value: any): value is string {\n return isString(value) && value !== '';\n}"},useData:!0},cn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isSuccess(status: number): boolean {\n return status >= 200 && status < 300;\n}"},useData:!0},mn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nasync function resolve<T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> {\n if (typeof resolver === 'function') {\n return (resolver as Resolver<T>)(options);\n }\n return resolver;\n}"},useData:!0},dn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBinary(options.body)) {\n headers.append('Content-Type', 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},fn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},hn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},yn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},vn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport FormData from 'form-data';\nimport fetch, { BodyInit, Headers, RequestInit, Response } from 'node-fetch';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getHeaders"),n,{name:"node/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getRequestBody"),n,{name:"node/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/sendRequest"),n,{name:"node/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getResponseHeader"),n,{name:"node/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getResponseBody"),n,{name:"node/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using node-fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},gn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n };\n return await fetch(url, request);\n}"},useData:!0},Pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\ntype Config = {\n BASE: string;\n VERSION: string;\n WITH_CREDENTIALS: boolean;\n TOKEN?: string | Resolver<string>;\n USERNAME?: string | Resolver<string>;\n PASSWORD?: string | Resolver<string>;\n HEADERS?: Headers | Resolver<Headers>;\n}\n\nexport const OpenAPI: Config = {\n BASE: '"+(null!=(o=i(l(n,"server",{start:{line:19,column:14},end:{line:19,column:20}}),n))?o:"")+"',\n VERSION: '"+(null!=(o=i(l(n,"version",{start:{line:20,column:17},end:{line:20,column:24}}),n))?o:"")+"',\n WITH_CREDENTIALS: false,\n TOKEN: undefined,\n USERNAME: undefined,\n PASSWORD: undefined,\n HEADERS: undefined,\n};"},usePartial:!0,useData:!0},bn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"fetch/request"),n,{name:"fetch/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"xhr/request"),n,{name:"xhr/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"node/request"),n,{name:"node/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"axios/request"),n,{name:"axios/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:67}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:63}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:65}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:67}}}))?o:"")},usePartial:!0,useData:!0},On={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},xn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},kn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(xhr: XMLHttpRequest): any {\n try {\n const contentType = xhr.getResponseHeader('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return JSON.parse(xhr.responseText);\n } else {\n return xhr.responseText;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},Rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(xhr: XMLHttpRequest, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = xhr.getResponseHeader(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},wn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getRequestBody"),n,{name:"xhr/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/sendRequest"),n,{name:"xhr/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getResponseHeader"),n,{name:"xhr/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getResponseBody"),n,{name:"xhr/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using XHR client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},qn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<XMLHttpRequest> {\n\n const xhr = new XMLHttpRequest();\n xhr.open(options.method, url, true);\n xhr.withCredentials = OpenAPI.WITH_CREDENTIALS;\n\n const headers = await getHeaders(options);\n headers.forEach((value: string, key: string) => {\n xhr.setRequestHeader(key, value);\n });\n\n return new Promise<XMLHttpRequest>(resolve => {\n xhr.onreadystatechange = () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n resolve(xhr);\n }\n };\n xhr.send(getRequestBody(options));\n });\n}"},useData:!0},jn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:9}}}))?o:"")},2:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=i(l(n,"name",{start:{line:6,column:17},end:{line:6,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:24},end:{line:6,column:59}}}))?o:"")+" } from './"+(null!=(o=i(l(n,"path",{start:{line:6,column:73},end:{line:6,column:77}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:6,column:44},end:{line:6,column:49}}),n))?o:"")},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportInterface"),n,{name:"exportInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:12,column:0},end:{line:22,column:0}}}))?o:""},8:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportComposition"),n,{name:"exportComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:14,column:0},end:{line:22,column:0}}}))?o:""},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:16,column:0},end:{line:22,column:0}}}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:18,column:0},end:{line:22,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportEnum"),n,{name:"exportEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportType"),n,{name:"exportType",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=i(t,"if").call(l,i(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:8,column:7}}}))?o:"")+"\n"+(null!=(o=i(t,"equals").call(l,i(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a,loc:{start:{line:10,column:0},end:{line:22,column:11}}}))?o:"")},usePartial:!0,useData:!0},An={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport const "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:3,column:16},end:{line:3,column:20}}),n))?o:"")+"Schema = "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},Cn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=i(l(n,"name",{start:{line:5,column:17},end:{line:5,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:24},end:{line:5,column:59}}}))?o:"")+" } from '../models/"+(null!=(o=i(l(n,"path",{start:{line:5,column:81},end:{line:5,column:85}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:5,column:44},end:{line:5,column:49}}),n))?o:"")},5:function(e,n,t,r,a){return"import { OpenAPI } from '../core/OpenAPI';\n"},7:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.strict,s=e.lambda,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" /**\n"+(null!=(o=u(t,"if").call(l,u(n,"deprecated"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:4},end:{line:19,column:11}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"summary"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:4},end:{line:22,column:11}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"description"),{name:"if",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:4},end:{line:25,column:11}}}))?o:"")+(null!=(o=u(t,"unless").call(l,u(u(a,"root"),"useOptions"),{name:"unless",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:4},end:{line:32,column:15}}}))?o:"")+(null!=(o=u(t,"each").call(l,u(n,"results"),{name:"each",hash:{},fn:e.program(18,a,0),inverse:e.noop,data:a,loc:{start:{line:33,column:4},end:{line:35,column:13}}}))?o:"")+" * @throws ApiError\n */\n public static async "+(null!=(o=s(i(n,"name",{start:{line:38,column:27},end:{line:38,column:31}}),n))?o:"")+"("+(null!=(o=e.invokePartial(u(r,"parameters"),n,{name:"parameters",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"): Promise<"+(null!=(o=e.invokePartial(u(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"> {\n"+(null!=(o=u(t,"if").call(l,u(u(a,"root"),"useCustomRequest"),{name:"if",hash:{},fn:e.program(20,a,0),inverse:e.program(22,a,0),data:a,loc:{start:{line:39,column:8},end:{line:43,column:15}}}))?o:"")+" method: '"+(null!=(o=s(i(n,"method",{start:{line:44,column:24},end:{line:44,column:30}}),n))?o:"")+"',\n path: `"+(null!=(o=s(i(n,"path",{start:{line:45,column:22},end:{line:45,column:26}}),n))?o:"")+"`,\n"+(null!=(o=u(t,"if").call(l,u(n,"parametersCookie"),{name:"if",hash:{},fn:e.program(24,a,0),inverse:e.noop,data:a,loc:{start:{line:46,column:12},end:{line:52,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersHeader"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:53,column:12},end:{line:59,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersQuery"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:60,column:12},end:{line:66,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersForm"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:67,column:12},end:{line:73,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersBody"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:74,column:12},end:{line:79,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"responseHeader"),{name:"if",hash:{},fn:e.program(36,a,0),inverse:e.noop,data:a,loc:{start:{line:80,column:12},end:{line:82,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"errors"),{name:"if",hash:{},fn:e.program(38,a,0),inverse:e.noop,data:a,loc:{start:{line:83,column:12},end:{line:89,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(u(a,"root"),"useCustomRequest"),{name:"if",hash:{},fn:e.program(41,a,0),inverse:e.program(43,a,0),data:a,loc:{start:{line:90,column:8},end:{line:95,column:15}}}))?o:"")+" }\n\n"},8:function(e,n,t,r,a){return" * @deprecated\n"},10:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"summary",{start:{line:21,column:10},end:{line:21,column:17}}),n))?o:"")+"\n"},12:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:24,column:10},end:{line:24,column:21}}),n))?o:"")+"\n"},14:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:27,column:4},end:{line:31,column:11}}}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a,loc:{start:{line:28,column:4},end:{line:30,column:13}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" * @param "+(null!=(o=i(l(n,"name",{start:{line:29,column:17},end:{line:29,column:21}}),n))?o:"")+" "+(null!=(o=i(l(n,"description",{start:{line:29,column:28},end:{line:29,column:39}}),n))?o:"")+"\n"},18:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" * @returns "+(null!=(o=i(l(n,"type",{start:{line:34,column:19},end:{line:34,column:23}}),n))?o:"")+" "+(null!=(o=i(l(n,"description",{start:{line:34,column:30},end:{line:34,column:41}}),n))?o:"")+"\n"},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" return await __request<"+(null!=(o=e.invokePartial(l(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">({\n"},22:function(e,n,t,r,a){return" const result = await __request({\n"},24:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" cookies: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersCookie"),{name:"each",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:48,column:16},end:{line:50,column:25}}}))?o:"")+" },\n"},25:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" '"+(null!=(o=i(l(n,"prop",{start:{line:49,column:20},end:{line:49,column:24}}),n))?o:"")+"': "+(null!=(o=i(l(n,"name",{start:{line:49,column:33},end:{line:49,column:37}}),n))?o:"")+",\n"},27:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" headers: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersHeader"),{name:"each",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:55,column:16},end:{line:57,column:25}}}))?o:"")+" },\n"},29:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" query: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersQuery"),{name:"each",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:62,column:16},end:{line:64,column:25}}}))?o:"")+" },\n"},31:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" formData: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersForm"),{name:"each",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:69,column:16},end:{line:71,column:25}}}))?o:"")+" },\n"},33:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" body: "+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"name",{start:{line:75,column:21},end:{line:75,column:40}}),n))?o:"")+",\n"+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(n,"parametersBody"),"mediaType"),{name:"if",hash:{},fn:e.program(34,a,0),inverse:e.noop,data:a,loc:{start:{line:76,column:12},end:{line:78,column:19}}}))?o:"")},34:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" mediaType: '"+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"mediaType",{start:{line:77,column:27},end:{line:77,column:51}}),n))?o:"")+"',\n"},36:function(e,n,t,r,a){var o;return" responseHeader: '"+(null!=(o=e.lambda(e.strict(n,"responseHeader",{start:{line:81,column:32},end:{line:81,column:46}}),n))?o:"")+"',\n"},38:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" errors: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"errors"),{name:"each",hash:{},fn:e.program(39,a,0),inverse:e.noop,data:a,loc:{start:{line:85,column:16},end:{line:87,column:25}}}))?o:"")+" },\n"},39:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"code",{start:{line:86,column:19},end:{line:86,column:23}}),n))?o:"")+": `"+(null!=(o=i(l(n,"description",{start:{line:86,column:32},end:{line:86,column:43}}),n))?o:"")+"`,\n"},41:function(e,n,t,r,a){return" }).then((resp) => resp);\n"},43:function(e,n,t,r,a){return" });\n return result.body;\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=i(t,"if").call(l,i(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+"import { request as __request } from '../core/request';\n"+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"useVersion"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"\nexport class "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:13,column:16},end:{line:13,column:20}}),n))?o:"")+" {\n\n"+(null!=(o=i(t,"each").call(l,i(n,"operations"),{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:4},end:{line:98,column:13}}}))?o:"")+"}"},usePartial:!0,useData:!0},$n={1:function(e,n,t,r,a){return"\nexport { ApiError } from './core/ApiError';\nexport { OpenAPI } from './core/OpenAPI';\n"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:21,column:7}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:20,column:9}}}))?o:"")},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enum"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:7}}}))?o:""},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=i(l(n,"name",{start:{line:12,column:12},end:{line:12,column:16}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:19},end:{line:12,column:55}}}))?o:"")+" } from './models/"+(null!=(o=i(l(n,"path",{start:{line:12,column:76},end:{line:12,column:80}}),n))?o:"")+"';\n"},7:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:12,column:40},end:{line:12,column:45}}),n))?o:"")},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export type { "+(null!=(o=i(l(n,"name",{start:{line:14,column:17},end:{line:14,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:24},end:{line:14,column:60}}}))?o:"")+" } from './models/"+(null!=(o=i(l(n,"path",{start:{line:14,column:81},end:{line:14,column:85}}),n))?o:"")+"';\n"},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},14:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:24,column:0},end:{line:29,column:7}}}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:9}}}))?o:"")},16:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=i(l(n,"name",{start:{line:27,column:12},end:{line:27,column:16}}),n))?o:"")+"Schema"+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:27,column:25},end:{line:27,column:67}}}))?o:"")+" } from './schemas/"+(null!=(o=i(l(n,"path",{start:{line:27,column:89},end:{line:27,column:93}}),n))?o:"")+"Schema';\n"},17:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:27,column:46},end:{line:27,column:51}}),n))?o:"")+"Schema"},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"if",hash:{},fn:e.program(20,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:37,column:7}}}))?o:""},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"each",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:34,column:0},end:{line:36,column:9}}}))?o:"")},21:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return"export { "+(null!=(o=i(l(n,"name",{start:{line:35,column:12},end:{line:35,column:16}}),n))?o:"")+" } from './services/"+(null!=(o=i(l(n,"name",{start:{line:35,column:42},end:{line:35,column:46}}),n))?o:"")+"';\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportCore"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportModels"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportSchemas"),{name:"if",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:30,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportServices"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:31,column:0},end:{line:38,column:7}}}))?o:"")},usePartial:!0,useData:!0},Sn={1:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:53}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:51}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:86}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:5,column:87}}}))?o:"")},2:function(e,n,t,r,a){return"Blob"},4:function(e,n,t,r,a){return"Buffer | ArrayBuffer | ArrayBufferView"},6:function(e,n,t,r,a){var o;return null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:3},end:{line:7,column:7}}),n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"base"),"File",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:8,column:13}}}))?o:""},useData:!0},In={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:27,column:11}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:10,column:20},end:{line:10,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:4},end:{line:24,column:13}}}))?o:"")+"\n}\n"},5:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:19},end:{line:18,column:23}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:8},end:{line:21,column:17}}}))?o:"")+" }\n\n"},6:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:15,column:10},end:{line:15,column:21}}),n))?o:"")+"\n */\n"},8:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:20,column:11},end:{line:20,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:20,column:24},end:{line:20,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(i(r,"type"),n,{name:"type",hash:{parent:i(n,"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";\n"+(null!=(o=i(t,"if").call(l,i(n,"enums"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:28,column:7}}}))?o:"")},usePartial:!0,useData:!0},Dn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?o:"")+(null!=(o=i(t,"containsSpaces").call(l,i(n,"name"),{name:"containsSpaces",hash:{},fn:e.program(6,a,0),inverse:e.program(8,a,0),data:a,loc:{start:{line:13,column:4},end:{line:17,column:23}}}))?o:"")},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return' "'+(null!=(o=i(l(n,"name",{start:{line:14,column:8},end:{line:14,column:12}}),n))?o:"")+'" = '+(null!=(o=i(l(n,"value",{start:{line:14,column:22},end:{line:14,column:27}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:16,column:7},end:{line:16,column:11}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:16,column:20},end:{line:16,column:25}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?o:"")+"}"},useData:!0},Hn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(n,"alias"),{name:"if",hash:{},fn:e.program(6,a,0,o,l),inverse:e.program(8,a,0,o,l),data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?i:"")},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=i(l(n,"name",{start:{line:14,column:22},end:{line:14,column:26}}),n))?o:"")+(null!=(o=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=i(l(n,"alias",{start:{line:14,column:49},end:{line:14,column:54}}),n))?o:"")+";\n"},8:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(i=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:16,column:22},end:{line:16,column:26}}),n))?i:"")+(null!=(i=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(l[1],"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+";\n"},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:21,column:0},end:{line:40,column:11}}}))?o:""},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:23,column:20},end:{line:23,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a,loc:{start:{line:25,column:4},end:{line:37,column:13}}}))?o:"")+"\n}\n"},12:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:4},end:{line:30,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:31,column:19},end:{line:31,column:23}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:8},end:{line:34,column:17}}}))?o:"")+" }\n\n"},13:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:33,column:11},end:{line:33,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:33,column:24},end:{line:33,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?i:"")+"export interface "+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:6,column:20},end:{line:6,column:24}}),n))?i:"")+" {\n"+(null!=(i=u(t,"each").call(s,u(n,"properties"),{name:"each",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?i:"")+"}\n"+(null!=(i=u(t,"if").call(s,u(n,"enums"),{name:"if",hash:{},fn:e.program(10,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:41,column:7}}}))?i:"")},usePartial:!0,useData:!0,useDepths:!0},En={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},Tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */"},useData:!0},Bn={1:function(e,n,t,r,a){return" | null"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isNullable"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:32}}}))?o:""},useData:!0},Nn={1:function(e,n,t,r,a){return"readonly "},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:34}}}))?o:""},useData:!0},Mn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:2,column:0},end:{line:2,column:54}}}))?o:""},2:function(e,n,t,r,a){return"?"},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:23},end:{line:2,column:43}}}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:64}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:22},end:{line:4,column:53}}}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},useData:!0},Ln={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:2,column:0},end:{line:20,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:"")+"}: {\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:13,column:9}}}))?o:"")+"}"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:3},end:{line:5,column:7}}),n))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:10},end:{line:5,column:48}}}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" = "+(null!=(o=e.lambda(e.strict(n,"default",{start:{line:5,column:31},end:{line:5,column:38}}),n))?o:"")},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:3},end:{line:12,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return"/** "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:7},end:{line:10,column:18}}),n))?o:"")+" **/\n"},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:9}}}))?o:"")},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:3},end:{line:18,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:18,column:36},end:{line:18,column:74}}}))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:21,column:7}}}))?o:""},usePartial:!0,useData:!0},Un={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:66}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:26},end:{line:2,column:57}}}))?o:"")},3:function(e,n,t,r,a){return" | "},5:function(e,n,t,r,a){return"void"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},_n={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaInterface"),n,{name:"schemaInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:17,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaEnum"),n,{name:"schemaEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:17,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaArray"),n,{name:"schemaArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:17,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaDictionary"),n,{name:"schemaDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:17,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaComposition"),n,{name:"schemaComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(16,a,0),data:a,loc:{start:{line:11,column:0},end:{line:17,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(17,a,0),data:a,loc:{start:{line:13,column:0},end:{line:17,column:0}}}))?o:""},17:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaGeneric"),n,{name:"schemaGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:17,column:11}}}))?o:""},usePartial:!0,useData:!0},Fn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'array',\n"+(null!=(o=i(t,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Wn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:46},end:{line:3,column:76}}}))?o:"")},2:function(e,n,t,r,a){return", "},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:5,column:19},end:{line:5,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:8,column:19},end:{line:8,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: '"+(null!=(o=e.lambda(e.strict(n,"export",{start:{line:2,column:13},end:{line:2,column:19}}),n))?o:"")+"',\n contains: ["+(null!=(o=i(t,"each").call(l,i(n,"properties"),{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:15},end:{line:3,column:85}}}))?o:"")+"],\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Vn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'dictionary',\n"+(null!=(o=i(t,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Qn={1:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:4,column:19},end:{line:4,column:29}}),n))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:7,column:19},end:{line:7,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'Enum',\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"}"},useData:!0},zn={1:function(e,n,t,r,a){var o;return" type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:3,column:14},end:{line:3,column:18}}),n))?o:"")+"',\n"},3:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:6,column:19},end:{line:6,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:9,column:19},end:{line:9,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:12,column:19},end:{line:12,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" format: '"+(null!=(o=e.lambda(e.strict(n,"format",{start:{line:15,column:16},end:{line:15,column:22}}),n))?o:"")+"',\n"},11:function(e,n,t,r,a){var o;return" maximum: "+(null!=(o=e.lambda(e.strict(n,"maximum",{start:{line:18,column:16},end:{line:18,column:23}}),n))?o:"")+",\n"},13:function(e,n,t,r,a){var o;return" exclusiveMaximum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMaximum",{start:{line:21,column:25},end:{line:21,column:41}}),n))?o:"")+",\n"},15:function(e,n,t,r,a){var o;return" minimum: "+(null!=(o=e.lambda(e.strict(n,"minimum",{start:{line:24,column:16},end:{line:24,column:23}}),n))?o:"")+",\n"},17:function(e,n,t,r,a){var o;return" exclusiveMinimum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMinimum",{start:{line:27,column:25},end:{line:27,column:41}}),n))?o:"")+",\n"},19:function(e,n,t,r,a){var o;return" multipleOf: "+(null!=(o=e.lambda(e.strict(n,"multipleOf",{start:{line:30,column:19},end:{line:30,column:29}}),n))?o:"")+",\n"},21:function(e,n,t,r,a){var o;return" maxLength: "+(null!=(o=e.lambda(e.strict(n,"maxLength",{start:{line:33,column:18},end:{line:33,column:27}}),n))?o:"")+",\n"},23:function(e,n,t,r,a){var o;return" minLength: "+(null!=(o=e.lambda(e.strict(n,"minLength",{start:{line:36,column:18},end:{line:36,column:27}}),n))?o:"")+",\n"},25:function(e,n,t,r,a){var o;return" pattern: '"+(null!=(o=e.lambda(e.strict(n,"pattern",{start:{line:39,column:17},end:{line:39,column:24}}),n))?o:"")+"',\n"},27:function(e,n,t,r,a){var o;return" maxItems: "+(null!=(o=e.lambda(e.strict(n,"maxItems",{start:{line:42,column:17},end:{line:42,column:25}}),n))?o:"")+",\n"},29:function(e,n,t,r,a){var o;return" minItems: "+(null!=(o=e.lambda(e.strict(n,"minItems",{start:{line:45,column:17},end:{line:45,column:25}}),n))?o:"")+",\n"},31:function(e,n,t,r,a){var o;return" uniqueItems: "+(null!=(o=e.lambda(e.strict(n,"uniqueItems",{start:{line:48,column:20},end:{line:48,column:31}}),n))?o:"")+",\n"},33:function(e,n,t,r,a){var o;return" maxProperties: "+(null!=(o=e.lambda(e.strict(n,"maxProperties",{start:{line:51,column:22},end:{line:51,column:35}}),n))?o:"")+",\n"},35:function(e,n,t,r,a){var o;return" minProperties: "+(null!=(o=e.lambda(e.strict(n,"minProperties",{start:{line:54,column:22},end:{line:54,column:35}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=i(t,"if").call(l,i(n,"type"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"format"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maximum"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"exclusiveMaximum"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minimum"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:25,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"exclusiveMinimum"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"multipleOf"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxLength"),{name:"if",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:34,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minLength"),{name:"if",hash:{},fn:e.program(23,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:0},end:{line:37,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"pattern"),{name:"if",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:38,column:0},end:{line:40,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxItems"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:41,column:0},end:{line:43,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minItems"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:44,column:0},end:{line:46,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"uniqueItems"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:47,column:0},end:{line:49,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxProperties"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:50,column:0},end:{line:52,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minProperties"),{name:"if",hash:{},fn:e.program(35,a,0),inverse:e.noop,data:a,loc:{start:{line:53,column:0},end:{line:55,column:7}}}))?o:"")+"}"},useData:!0},Jn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:11},end:{line:5,column:15}}),n))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:13,column:19},end:{line:13,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:16,column:19},end:{line:16,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n properties: {\n"+(null!=(o=i(t,"if").call(l,i(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+" },\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:0},end:{line:14,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:0},end:{line:17,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Zn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeInterface"),n,{name:"typeInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"reference",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:19,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeReference"),n,{name:"typeReference",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:19,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeEnum"),n,{name:"typeEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeArray"),n,{name:"typeArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:19,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeDictionary"),n,{name:"typeDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(18,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeUnion"),n,{name:"typeUnion",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},18:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(19,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(20,a,0),inverse:e.program(22,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeIntersection"),n,{name:"typeIntersection",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},22:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeGeneric"),n,{name:"typeGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:19,column:11}}}))?o:""},usePartial:!0,useData:!0},Gn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},Xn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},Kn={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"enumerator").call(null!=n?n:e.nullContext||{},l(n,"enum"),l(n,"parent"),l(n,"name"),{name:"enumerator",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:55}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Yn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},et={1:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(i=s(t,"each").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:14,column:9}}}))?i:"")+"}"+(null!=(i=e.invokePartial(s(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")},2:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:8,column:7}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(l[1],"parent"),{name:"if",hash:{},fn:e.program(5,a,0,o,l),inverse:e.program(7,a,0,o,l),data:a,loc:{start:{line:9,column:0},end:{line:13,column:7}}}))?i:"")},3:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:6,column:6},end:{line:6,column:17}}),n))?o:"")+"\n */\n"},5:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:10,column:18},end:{line:10,column:22}}),n))?i:"")+(null!=(i=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(l[1],"parent")},data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+",\n"},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:18},end:{line:12,column:22}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},9:function(e,n,t,r,a){return"any"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(i=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.program(9,a,0,o,l),data:a,loc:{start:{line:1,column:0},end:{line:18,column:9}}}))?i:""},usePartial:!0,useData:!0,useDepths:!0},nt={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"intersection").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"intersection",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:60}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},tt={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},rt={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"union").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"union",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:46}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0};function at(e){!function(e){y.registerHelper("equals",(function(e,n,t){return e===n?t.fn(this):t.inverse(this)})),y.registerHelper("notEquals",(function(e,n,t){return e!==n?t.fn(this):t.inverse(this)})),y.registerHelper("containsSpaces",(function(e,n){return/\s+/.test(e)?n.fn(this):n.inverse(this)})),y.registerHelper("union",(function(n,t,r){const a=y.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(C);let l=o.join(" | ");return o.length>1&&(l=`(${l})`),r.fn(l)})),y.registerHelper("intersection",(function(n,t,r){const a=y.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(C);let l=o.join(" & ");return o.length>1&&(l=`(${l})`),r.fn(l)})),y.registerHelper("enumerator",(function(n,t,r,a){return!e.useUnionTypes&&t&&r?`${t}.${r}`:a.fn(n.map((e=>e.value)).filter(C).join(" | "))}))}(e);const n={index:y.template($n),exports:{model:y.template(jn),schema:y.template(An),service:y.template(Cn)},core:{settings:y.template(Pn),apiError:y.template(Le),apiRequestOptions:y.template(Ue),apiResult:y.template(_e),request:y.template(bn)}};return y.registerPartial("exportEnum",y.template(Dn)),y.registerPartial("exportInterface",y.template(Hn)),y.registerPartial("exportComposition",y.template(In)),y.registerPartial("exportType",y.template(En)),y.registerPartial("header",y.template(Tn)),y.registerPartial("isNullable",y.template(Bn)),y.registerPartial("isReadOnly",y.template(Nn)),y.registerPartial("isRequired",y.template(Mn)),y.registerPartial("parameters",y.template(Ln)),y.registerPartial("result",y.template(Un)),y.registerPartial("schema",y.template(_n)),y.registerPartial("schemaArray",y.template(Fn)),y.registerPartial("schemaDictionary",y.template(Vn)),y.registerPartial("schemaEnum",y.template(Qn)),y.registerPartial("schemaGeneric",y.template(zn)),y.registerPartial("schemaInterface",y.template(Jn)),y.registerPartial("schemaComposition",y.template(Wn)),y.registerPartial("type",y.template(Zn)),y.registerPartial("typeArray",y.template(Gn)),y.registerPartial("typeDictionary",y.template(Xn)),y.registerPartial("typeEnum",y.template(Kn)),y.registerPartial("typeGeneric",y.template(Yn)),y.registerPartial("typeInterface",y.template(et)),y.registerPartial("typeReference",y.template(tt)),y.registerPartial("typeUnion",y.template(rt)),y.registerPartial("typeIntersection",y.template(nt)),y.registerPartial("base",y.template(Sn)),y.registerPartial("functions/catchErrors",y.template(nn)),y.registerPartial("functions/getFormData",y.template(tn)),y.registerPartial("functions/getQueryString",y.template(rn)),y.registerPartial("functions/getUrl",y.template(an)),y.registerPartial("functions/isBinary",y.template(on)),y.registerPartial("functions/isBlob",y.template(ln)),y.registerPartial("functions/isDefined",y.template(sn)),y.registerPartial("functions/isString",y.template(un)),y.registerPartial("functions/isStringWithValue",y.template(pn)),y.registerPartial("functions/isSuccess",y.template(cn)),y.registerPartial("functions/resolve",y.template(mn)),y.registerPartial("fetch/getHeaders",y.template(Ze)),y.registerPartial("fetch/getRequestBody",y.template(Ge)),y.registerPartial("fetch/getResponseBody",y.template(Xe)),y.registerPartial("fetch/getResponseHeader",y.template(Ke)),y.registerPartial("fetch/sendRequest",y.template(en)),y.registerPartial("fetch/request",y.template(Ye)),y.registerPartial("xhr/getHeaders",y.template(On)),y.registerPartial("xhr/getRequestBody",y.template(xn)),y.registerPartial("xhr/getResponseBody",y.template(kn)),y.registerPartial("xhr/getResponseHeader",y.template(Rn)),y.registerPartial("xhr/sendRequest",y.template(qn)),y.registerPartial("xhr/request",y.template(wn)),y.registerPartial("node/getHeaders",y.template(dn)),y.registerPartial("node/getRequestBody",y.template(fn)),y.registerPartial("node/getResponseBody",y.template(hn)),y.registerPartial("node/getResponseHeader",y.template(yn)),y.registerPartial("node/sendRequest",y.template(gn)),y.registerPartial("node/request",y.template(vn)),y.registerPartial("axios/getHeaders",y.template(Fe)),y.registerPartial("axios/getRequestBody",y.template(We)),y.registerPartial("axios/getResponseBody",y.template(Ve)),y.registerPartial("axios/getResponseHeader",y.template(Qe)),y.registerPartial("axios/sendRequest",y.template(Je)),y.registerPartial("axios/request",y.template(ze)),n}function ot(e){let t=0,r=e.split(n.EOL);return r=r.map((e=>{e=e.trim().replace(/^\*/g," *");let n=t;(e.endsWith("(")||e.endsWith("{")||e.endsWith("["))&&t++,(e.startsWith(")")||e.startsWith("}")||e.startsWith("]"))&&n&&(t--,n--);const r=`${" ".repeat(n)}${e}`;return""===r.trim()?"":r})),r.join(n.EOL)}async function lt(n){const{client:t,templates:r,output:o,httpClient:l,useOptions:i,useUnionTypes:s,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,clean:d,request:f}=n,h=e.resolve(process.cwd(),o),y=e.resolve(h,"core"),v=e.resolve(h,"models"),g=e.resolve(h,"schemas"),P=e.resolve(h,"services");if(O=process.cwd(),k=o,!e.relative(k,O).startsWith(".."))throw new Error("Output folder is not a subdirectory of the current working directory");var O,k;u&&(d&&await $e(y),await Ce(y),await async function(n){const{client:t,templates:r,outputPath:a,httpClient:o,request:l}=n,i={httpClient:o,server:t.server,version:t.version};if(await qe(e.resolve(a,"OpenAPI.ts"),r.core.settings(i)),await qe(e.resolve(a,"ApiError.ts"),r.core.apiError({})),await qe(e.resolve(a,"ApiRequestOptions.ts"),r.core.apiRequestOptions({})),await qe(e.resolve(a,"ApiResult.ts"),r.core.apiResult({})),await qe(e.resolve(a,"request.ts"),r.core.request(i)),l){const n=e.resolve(process.cwd(),l);if(!await Ae(n))throw new Error(`Custom request file "${n}" does not exists`);await je(n,e.resolve(a,"request.ts"))}}({client:t,templates:r,outputPath:y,httpClient:l,request:f})),p&&(d&&await $e(P),await Ce(P),await async function(n){const{services:t,templates:r,outputPath:a,httpClient:o,useUnionTypes:l,useOptions:i,useCustomRequest:s}=n;for(const n of t){const t=e.resolve(a,`${n.name}.ts`),u=n.operations.some((e=>e.path.includes("OpenAPI.VERSION"))),p=r.exports.service(Object.assign(Object.assign({},n),{httpClient:o,useUnionTypes:l,useVersion:u,useOptions:i,useCustomRequest:s}));await qe(t,ot(p))}}({services:t.services,templates:r,outputPath:P,httpClient:l,useUnionTypes:s,useOptions:i,useCustomRequest:!!f})),m&&(d&&await $e(g),await Ce(g),await async function(e){const{models:n,templates:t,outputPath:r,httpClient:o,useUnionTypes:l}=e;for(const e of n){const n=b(e.path);if(n){const e=x(r,n);a.mkdirSync(e,{recursive:!0})}const i=x(r,`${e.path}Schema.ts`),s=t.exports.schema(Object.assign(Object.assign({},e),{httpClient:o,useUnionTypes:l}));await qe(i,ot(s))}}({models:t.models,templates:r,outputPath:g,httpClient:l,useUnionTypes:s})),c&&(d&&await $e(v),await Ce(v),await async function(n){const{models:t,templates:r,outputPath:o,httpClient:l,useUnionTypes:i}=n;for(const n of t){const t=b(n.path);if(t){const n=e.resolve(o,t);a.mkdirSync(n,{recursive:!0})}const s=e.resolve(o,`${n.path}.ts`),u=r.exports.model(Object.assign(Object.assign({},n),{httpClient:l,useUnionTypes:i}));await qe(s,ot(u))}}({models:t.models,templates:r,outputPath:v,httpClient:l,useUnionTypes:s})),(u||p||m||c)&&(await Ce(h),await async function(n){const{client:t,templates:r,outputPath:a,useUnionTypes:o,exportCore:l,exportServices:i,exportModels:s,exportSchemas:u}=n;var p;await qe(e.resolve(a,"index.ts"),r.index({exportCore:l,exportServices:i,exportModels:s,exportSchemas:u,useUnionTypes:o,server:t.server,version:t.version,models:ee(t.models),services:(p=t.services,p.sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")})))}))}({client:t,templates:r,outputPath:h,useUnionTypes:s,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m}))}exports.generate=async function({input:e,output:n,httpClient:t=exports.HttpClient.FETCH,useOptions:r=!1,useUnionTypes:a=!1,exportCore:o=!0,exportServices:l=!0,exportModels:i=!0,exportSchemas:s=!1,clean:u=!0,request:p,write:c=!0}){const m=new k(e),f=g(e)?await async function(e,n){const t=x(process.cwd(),e);if(!e)throw new Error(`Could not find OpenApi spec: "${t}"`);if(!await Ae(t))throw new Error(`Could not read OpenApi spec: "${t}"`);const r=new d.default;n.addRefs(await r.resolve(e));const a=Object.assign({},r.schema);let o={};for(const e of Object.entries(a.paths)){const t=e[0],r=e[1];if(r.$ref){let e=n.get(r.$ref);e=Se(e,n,b(r.$ref)),o=Object.assign(o,{[t]:e})}else Object.assign(o,{[t]:r})}return r.schema=Object.assign(r.schema,{paths:o}),new Promise((e=>e(r.schema)))}(e,m):e,h=function(e){const n=e.swagger||e.openapi;if("string"==typeof n){const e=n.charAt(0),t=Number.parseInt(e);if(t===Ie.V2||t===Ie.V3)return t}throw new Error(`Unsupported Open API version: "${String(n)}"`)}(f),y=at({httpClient:t,useUnionTypes:a,useOptions:r});switch(h){case Ie.V2:{const e=Me(Y(m,f));if(!c)break;await lt({client:e,templates:y,output:n,httpClient:t,useOptions:r,useUnionTypes:a,exportCore:o,exportServices:l,exportModels:i,exportSchemas:s,clean:u,request:p});break}case Ie.V3:{const e=Me(we(m,f));if(!c)break;await lt({client:e,templates:y,output:n,httpClient:t,useOptions:r,useUnionTypes:a,exportCore:o,exportServices:l,exportModels:i,exportSchemas:s,clean:u,request:p});break}}};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),n=require("os"),t=require("camelcase"),r=require("fs"),a=require("mkdirp"),o=require("rimraf"),i=require("util"),s=require("json-schema-ref-parser"),l=require("handlebars/runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var c=u(e),m=u(t),d=u(a),f=u(o),h=u(s),y=p(l);function g(n){const t=e.extname(n),r=e.basename(n);return t?r.substr(0,r.length-t.length):r}function v(e){return"string"==typeof e}const P=/\\/g;function b(e){return c.default.dirname(e).replace(P,"/")}function O(...e){return c.default.join(...e).replace(P,"/")}function x(e,n){return c.default.relative(e,n).replace(P,"/")}function k(...e){return c.default.resolve(...e).replace(P,"/")}class R{constructor(e,n,t){this.prefix={interface:"I",enum:"E",type:"T"};const r=k(process.cwd(),n.output);return this._output={output:r,outputCore:n.outputCore?k(process.cwd(),n.outputCore):r,outputServices:n.outputServices?k(process.cwd(),n.outputServices):r,outputModels:n.outputModels?k(process.cwd(),n.outputModels):r,outputSchemas:n.outputSchemas?k(process.cwd(),n.outputSchemas):r},this._refs={},v(e)?this._root={path:b(e),fileName:g(e)}:this._root={path:""},t&&(this.prefix=t),this}addRefs(e){return this._refs=e,this}values(...e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.values(...e)}get(e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.get(e)}paths(...e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.paths(...e)}exists(e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.exists(e)}fileName(){if(!this._root)throw new Error("Context must be initialized");return this._root.fileName?this._root.fileName:""}}var w;function q(e){return null==e?void 0:e.replace(/\\/g,"\\\\")}function C(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}function j(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function A(e){return null!=e&&""!==e}function $(e){return Array.isArray(e)?e.filter(((e,n,t)=>t.indexOf(e)===n)).filter(A).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]}function S(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}function I(e){if(!e)return e;return e.replace(/\\/g,"/")}exports.HttpClient=void 0,(w=exports.HttpClient||(exports.HttpClient={})).FETCH="fetch",w.XHR="xhr",w.NODE="node",w.AXIOS="axios";const E=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function D(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}function T(e,n){const t={type:"any",base:"any",template:null,imports:[],path:""},r=function(e){return e.trim().replace(/^#\/definitions\//,"").replace(/^#\/parameters\//,"").replace(/^#\/responses\//,"").replace(/^#\/securityDefinitions\//,"")}(I(e)||"");if(t.path=function(e){if(!e)return"";const n=e.lastIndexOf("/");return-1===n?"":e.substring(0,n+1)}(r),/\[.*\]$/g.test(r)){const e=r.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=T(e[1]);t.path=n.path;const r=T(e[2]);"any[]"===n.type?(t.type=`${r.type}[]`,t.base=r.type,n.imports=[]):r.type?(t.type=`${n.type}<${r.type}>`,t.base=n.type,t.template=r.type):(t.type=n.type,t.base=n.type,t.template=n.type),t.imports.push(...n.imports),t.imports.push(...r.imports)}}else if(a=r,E.has(a)){const e=function(e){return E.get(e)}(r);t.path=r,e&&(t.type=e,t.base=e)}else if(r){const e=function(e){const n=e.lastIndexOf("/");return D(-1===n?e:e.substring(n,e.length))}(r);t.path=r,t.type=e,t.base=e,t.imports.push({name:e,alias:"",path:r})}var a;return t.type===n&&(t.type="T",t.base="T",t.imports=[]),t}function H(e){var n;const{openApi:t,definition:r,isDefinition:a=!1,name:o="",path:i="",parentRef:s}=e,l={name:o,path:i,alias:"",export:"interface",type:"any",base:"any",template:null,link:null,description:j(r.description),isDefinition:a,isReadOnly:!0===r.readOnly,isNullable:!0===r["x-nullable"],isRequired:void 0!==r.default,format:r.format,maximum:r.maximum,exclusiveMaximum:r.exclusiveMaximum,minimum:r.minimum,exclusiveMinimum:r.exclusiveMinimum,multipleOf:r.multipleOf,maxLength:r.maxLength,minLength:r.minLength,maxItems:r.maxItems,minItems:r.minItems,uniqueItems:r.uniqueItems,maxProperties:r.maxProperties,minProperties:r.minProperties,pattern:q(r.pattern),imports:[],enum:[],enums:[],properties:[]};if(r.$ref){const e=T(r.$ref);return l.export="reference",l.type=e.type,l.base=e.base,l.template=e.template,l.imports.push(...e.imports),l}if(r.enum&&"boolean"!==r.type){const e=C($(r.enum),r);if(e.length)return l.export="enum",l.type="string",l.base="string",l.enum.push(...e),l}if(("int"===r.type||"integer"===r.type)&&r.description){const e=S(r.description);if(e.length)return l.export="enum",l.type="number",l.base="number",l.enum.push(...e),l}if("array"===r.type&&r.items){if(r.items.$ref){const e=T(r.items.$ref);return l.export="array",l.type=e.type,l.base=e.base,l.template=e.template,l.imports.push(...e.imports),l}{const e=this.getModel({openApi:t,definition:r.items,parentRef:s});return l.export="array",l.type=e.type,l.base=e.base,l.template=e.template,l.link=e,l.imports.push(...e.imports),l}}if("object"===r.type&&"object"==typeof r.additionalProperties){if(r.additionalProperties.$ref){const e=T(r.additionalProperties.$ref);return l.export="dictionary",l.type=e.type,l.base=e.base,l.template=e.template,l.imports.push(...e.imports),l}{const e=this.getModel({openApi:t,definition:r.additionalProperties,parentRef:s});return l.export="dictionary",l.type=e.type,l.base=e.base,l.template=e.template,l.link=e,l.imports.push(...e.imports),l}}if(null===(n=r.allOf)||void 0===n?void 0:n.length){const e=this.getModelComposition(t,r,r.allOf,"all-of",s);return l.export=e.type,l.imports.push(...e.imports),l.properties.push(...e.properties),l.enums.push(...e.enums),l}if("object"===r.type){if(l.export="interface",l.type="any",l.base="any",r.properties){this.getModelProperties(t,r,s).forEach((e=>{l.imports.push(...e.imports),l.enums.push(...e.enums),l.properties.push(e),"enum"===e.export&&l.enums.push(e)}))}return l}if(r.type){const e=T(r.type);return l.export="generic",l.type=e.type,l.base=e.base,l.template=e.template,l.imports.push(...e.imports),l}return l}function M(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},i=t.map((n=>this.getModel({openApi:e,definition:n,parentRef:a})));if(i.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=this.getModelProperties(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o}function B(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}function N(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const i=n.properties[o],s=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==i.default;if(i.$ref){const e=T(i.$ref);a.push({name:B(o),alias:"",path:"",export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:j(i.description),isDefinition:!1,isReadOnly:!0===i.readOnly,isRequired:s,isNullable:!0===i["x-nullable"],format:i.format,maximum:i.maximum,exclusiveMaximum:i.exclusiveMaximum,minimum:i.minimum,exclusiveMinimum:i.exclusiveMinimum,multipleOf:i.multipleOf,maxLength:i.maxLength,minLength:i.minLength,maxItems:i.maxItems,minItems:i.minItems,uniqueItems:i.uniqueItems,maxProperties:i.maxProperties,minProperties:i.minProperties,pattern:q(i.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=this.getModel({openApi:e,definition:i,parentRef:t});a.push({name:B(o),alias:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:j(i.description),isDefinition:!1,isReadOnly:!0===i.readOnly,isRequired:s,isNullable:!0===i["x-nullable"],format:i.format,maximum:i.maximum,exclusiveMaximum:i.exclusiveMaximum,minimum:i.minimum,exclusiveMinimum:i.exclusiveMinimum,multipleOf:i.multipleOf,maxLength:i.maxLength,minLength:i.minLength,maxItems:i.maxItems,minItems:i.minItems,uniqueItems:i.uniqueItems,maxProperties:i.maxProperties,minProperties:i.minProperties,pattern:q(i.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}var L,U=function e(n,t){if(n===t)return!0;if(n&&t&&"object"==typeof n&&"object"==typeof t){if(n.constructor!==t.constructor)return!1;var r,a,o;if(Array.isArray(n)){if((r=n.length)!=t.length)return!1;for(a=r;0!=a--;)if(!e(n[a],t[a]))return!1;return!0}if(n.constructor===RegExp)return n.source===t.source&&n.flags===t.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===t.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===t.toString();if((r=(o=Object.keys(n)).length)!==Object.keys(t).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,o[a]))return!1;for(a=r;0!=a--;){var i=o[a];if(!e(n[i],t[i]))return!1}return!0}return n!=n&&t!=t};function _(e,n,t=[],r="",a=!1){if(n.$ref){const o=n.$ref.match(/^(http:\/\/|https:\/\/)/g)?n.$ref:n.$ref.match(/^(#\/)/g)?O(r,n.$ref):O(b(r),n.$ref);if(function(e,n){return-1!==e.findIndex((e=>U(e.value,n)))}(t,o))return t;a?t.push({value:o,type:L.SCHEMA}):t.push({value:o,type:L.OTHERS});const i=e.get(o),s=n.$ref.match(/^(http:\/\/|https:\/\/)/g)?"":n.$ref.match(/^(#\/)/g)?r:O(b(r),n.$ref);return _(e,i,t,s,a)}return n.schema?Object.values(n).forEach(((n,a)=>{n instanceof Object&&_(e,n,t,r,!0)})):Object.values(n).forEach(((n,o)=>{n instanceof Object&&_(e,n,t,r,a)})),t}function W(e,n){return _(e,n).filter((e=>e.type===L.SCHEMA)).map((e=>e.value))}function F(e){return e.sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}))}function V(e,n,t){return function(e,n,t){for(let r=0;r<t.length;++r)if(U(e,t[r]))return n===r;return!1}(e,n,t)}function z(e){let n=[];const t=W(this.context,e);if(t){for(const r of t){const t=this.context.get(r),a=this.getType(r,""),o=this.getModel({openApi:e,definition:t,isDefinition:!0,name:a.base,path:a.path,parentRef:r});n.push(o)}let r;n=F(n.filter(V));let a=1;n.forEach((e=>{r&&r.name===e.name?(1===a&&(r.alias=`${e.name}$${a}`,a++),e.alias=`${e.name}$${a}`,a++):(e.alias="",a=1),r=e})),n.forEach((e=>{e.imports=e.imports.map((t=>{const r=n.filter((e=>`${e.path}${e.name}`===t.path&&e.name===t.name));return r.length>0?Object.assign(t,{alias:r[0].alias,path:O(x(e.path,r[0].path),t.name)}):t}))}))}return n.filter(V)}!function(e){e[e.SCHEMA=0]="SCHEMA",e[e.OTHERS=1]="OTHERS"}(L||(L={}));const Q=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function J(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(Q,"_$1")}function Z(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?Z(e.link,n.link):t}function G(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>Z(n,e)))===n))}function X(e,n,t,r,a){var o;const i=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=m.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(o=r.tags)||void 0===o?void 0:o[0])||"Service"),s=`${t}${i}`,l=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n)}(r.operationId||s),u=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${J(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),p={service:i,name:l,summary:j(r.summary),description:j(r.description),deprecated:!0===r.deprecated,method:t.toUpperCase(),path:u,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(r.parameters){const n=this.getOperationParameters(e,r.parameters);p.imports.push(...n.imports),p.parameters.push(...n.parameters),p.parametersPath.push(...n.parametersPath),p.parametersQuery.push(...n.parametersQuery),p.parametersForm.push(...n.parametersForm),p.parametersHeader.push(...n.parametersHeader),p.parametersCookie.push(...n.parametersCookie),p.parametersBody=n.parametersBody}if(r.responses){const n=this.getOperationResponses(e,r.responses),t=G(n);p.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),p.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(t),t.forEach((e=>{p.results.push(e),p.imports.push(...e.imports)}))}return p}function K(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===n.export&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function Y(e,n){const t={path:"",in:n.in,prop:n.name,export:"interface",name:J(n.name),alias:"",type:"any",base:"any",template:null,link:null,description:j(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n["x-nullable"],format:n.format,maximum:n.maximum,exclusiveMaximum:n.exclusiveMaximum,minimum:n.minimum,exclusiveMinimum:n.exclusiveMinimum,multipleOf:n.multipleOf,maxLength:n.maxLength,minLength:n.minLength,maxItems:n.maxItems,minItems:n.minItems,uniqueItems:n.uniqueItems,pattern:q(n.pattern),imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=T(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t.path=e.path,t}if(n.enum){const e=C($(n.enum),n);if(e.length)return t.export="enum",t.type="string",t.base="string",t.enum.push(...e),t.default=K(n,t),t}if(("int"===n.type||"integer"===n.type)&&n.description){const e=S(n.description);if(e.length)return t.export="enum",t.type="number",t.base="number",t.enum.push(...e),t.default=K(n,t),t}if("array"===n.type&&n.items){const e=T(n.items.type);return t.export="array",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}if("object"===n.type&&n.items){const e=T(n.items.type);return t.export="dictionary",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}if(n.schema){if(n.schema.$ref){const e=T(n.schema.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}{const r=this.getModel({openApi:e,definition:n.schema,parentRef:""});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t.default=K(n,t),t}}if(n.type){const e=T(n.type);return t.export="generic",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}return t}function ee(e,n){const t=e.isRequired&&void 0===e.default,r=n.isRequired&&void 0===n.default;return t&&!r?-1:!t&&r?1:0}function ne(e,n){const t={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const r=n.$ref?this.context.get(n.$ref):n,a=this.getOperationParameter(e,r);if("api-version"!==a.prop)switch(a.in){case"path":t.parametersPath.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"query":t.parametersQuery.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"header":t.parametersHeader.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"formData":t.parametersForm.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"body":t.parametersBody=a,t.parameters.push(a),t.imports.push(...a.imports)}})),t.parameters=t.parameters.sort(ee),t.parametersPath=t.parametersPath.sort(ee),t.parametersQuery=t.parametersQuery.sort(ee),t.parametersForm=t.parametersForm.sort(ee),t.parametersCookie=t.parametersCookie.sort(ee),t.parametersHeader=t.parametersHeader.sort(ee),t}function te(e,n,t){const r={in:"response",name:"",alias:"",path:"",code:t,description:j(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.schema){if(n.schema.$ref){const e=T(n.schema.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}{const t=this.getModel({openApi:e,definition:n.schema,parentRef:""});return r.export=t.export,r.type=t.type,r.base=t.base,r.template=t.template,r.link=t.link,r.isReadOnly=t.isReadOnly,r.isRequired=t.isRequired,r.isNullable=t.isNullable,r.format=t.format,r.maximum=t.maximum,r.exclusiveMaximum=t.exclusiveMaximum,r.minimum=t.minimum,r.exclusiveMinimum=t.exclusiveMinimum,r.multipleOf=t.multipleOf,r.maxLength=t.maxLength,r.minLength=t.minLength,r.maxItems=t.maxItems,r.minItems=t.minItems,r.uniqueItems=t.uniqueItems,r.maxProperties=t.maxProperties,r.minProperties=t.minProperties,r.pattern=q(t.pattern),r.imports.push(...t.imports),r.enum.push(...t.enum),r.enums.push(...t.enums),r.properties.push(...t.properties),r}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return r.in="header",r.name=e,r.type="string",r.base="string",r;return r}function re(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function ae(e,n){const t=[];for(const r in n)if(n.hasOwnProperty(r)){const a=n[r],o=a.$ref?this.context.get(a.$ref):a,i=re(r);if(i){const n=this.getOperationResponse(e,o,i);t.push(n)}}return t.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}function oe(e){const n=new Map;for(const t in e.paths)if(e.paths.hasOwnProperty(t)){const r=e.paths[t],a=this.getOperationParameters(e,r.parameters||[]);for(const o in r)if(r.hasOwnProperty(o))switch(o){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=r[o],s=this.getOperation(e,t,o,i,a),l=n.get(s.service)||{name:s.service,operations:[],imports:[]};l.operations.push(s),l.imports.push(...s.imports),n.set(s.service,l)}}return Array.from(n.values())}function ie(e){const n=function(e="1.0"){return e.replace(/^v/gi,"")}(e.info.version),t=function(e){var n;const t=(null===(n=e.schemes)||void 0===n?void 0:n[0])||"http",r=e.host,a=e.basePath||"";return r?`${t}://${r}${a}`:a}(e);return{version:n,server:t,models:this.getModels(e),services:this.getServices(e)}}class se{constructor(e){this.parse=ie,this.getModels=z,this.getType=T,this.getModel=H,this.getModelComposition=M,this.getModelProperties=N,this.getServices=oe,this.getOperationParameters=ne,this.getOperationParameter=Y,this.getOperation=X,this.getOperationResponses=ae,this.getOperationResponse=te,this.context=e}getTypeNameByRef(e,n){if(n){const t=this.context.get(n);if(t.oneOf||t.anyOf||t.allOf||["string","number","integer","boolean","array"].includes(t.type))return`${this.context.prefix.type}${e}`;if(t.enum&&"boolean"!==t)return`${this.context.prefix.enum}${e}`;if("object"===t.type)return`${this.context.prefix.interface}${e}`}return e}}function le(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function ue(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===(null==n?void 0:n.export)&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function pe(e){var n,t,r;const{openApi:a,definition:o,isDefinition:i=!1,name:s="",path:l="",parentRef:u}=e,p={name:s,alias:"",path:l,export:"interface",type:"any",base:"any",link:null,template:null,description:le(o.description),isDefinition:i,isReadOnly:!0===o.readOnly,isNullable:!0===o.nullable,isRequired:void 0!==o.default,format:o.format,maximum:o.maximum,exclusiveMaximum:o.exclusiveMaximum,minimum:o.minimum,exclusiveMinimum:o.exclusiveMinimum,multipleOf:o.multipleOf,maxLength:o.maxLength,minLength:o.minLength,maxItems:o.maxItems,minItems:o.minItems,uniqueItems:o.uniqueItems,maxProperties:o.maxProperties,minProperties:o.minProperties,pattern:q(o.pattern),imports:[],enum:[],enums:[],properties:[]};if(o.$ref){const e=this.getType(o.$ref,u);return p.export="reference",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}if(o.enum&&"boolean"!==o.type){const e=function(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}((c=o.enum,Array.isArray(c)?c.filter(((e,n,t)=>t.indexOf(e)===n)).filter(A).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]),o);if(e.length)return p.export="enum",p.type="string",p.base="string",p.enum.push(...e),p.default=ue(o,p),p}var c;if(("int"===o.type||"integer"===o.type)&&o.description){const e=function(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}(o.description);if(e.length)return p.export="enum",p.type="number",p.base="number",p.enum.push(...e),p.default=ue(o,p),p}if("array"===o.type&&o.items){if(o.items.$ref){const e=this.getType(o.items.$ref,u);return p.export="array",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}{const e=this.getModel({openApi:a,definition:o.items,parentRef:u});return p.export="array",p.type=e.type,p.base=e.base,p.link=e,p.imports.push(...e.imports),p.default=ue(o,p),p}}if("object"===o.type&&"object"==typeof o.additionalProperties){if(o.additionalProperties.$ref){const e=this.getType(o.additionalProperties.$ref,u);return p.export="dictionary",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}{const e=this.getModel({openApi:a,definition:o.additionalProperties,parentRef:u});return p.export="dictionary",p.type=e.type,p.base=e.base,p.link=e,p.imports.push(...e.imports),p.default=ue(o,p),p}}if(null===(n=o.oneOf)||void 0===n?void 0:n.length){const e=this.getModelComposition(a,o,o.oneOf,"one-of",u);return p.export=e.type,p.imports.push(...e.imports),p.properties.push(...e.properties),p.enums.push(...e.enums),p}if(null===(t=o.anyOf)||void 0===t?void 0:t.length){const e=this.getModelComposition(a,o,o.anyOf,"any-of",u);return p.export=e.type,p.imports.push(...e.imports),p.properties.push(...e.properties),p.enums.push(...e.enums),p}if(null===(r=o.allOf)||void 0===r?void 0:r.length){const e=this.getModelComposition(a,o,o.allOf,"all-of",u);return p.export=e.type,p.imports.push(...e.imports),p.properties.push(...e.properties),p.enums.push(...e.enums),p}if("object"===o.type){if(p.export="interface",p.type="any",p.base="any",p.default=ue(o,p),o.properties){this.getModelProperties(a,o,u).forEach((e=>{p.imports.push(...e.imports),p.enums.push(...e.enums),p.properties.push(e),"enum"===e.export&&p.enums.push(e)}))}return p}if(o.type){const e=this.getType(o.type,u);return p.export="generic",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}return p}function ce(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},i=t.map((n=>this.getModel({openApi:e,definition:n,parentRef:a})));if(i.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=this.getModelProperties(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o.imports=o.imports.filter(V),o}function me(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}function de(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(/^./,(e=>e.toUpperCase()))}function fe(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const i=n.properties[o],s=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==i.default;if(i.$ref){const e=this.getType(i.$ref,t);a.push({name:me(o),alias:"",path:e.path,export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:le(i.description),isDefinition:!1,isReadOnly:!0===i.readOnly,isRequired:s,isNullable:!0===i.nullable,format:i.format,maximum:i.maximum,exclusiveMaximum:i.exclusiveMaximum,minimum:i.minimum,exclusiveMinimum:i.exclusiveMinimum,multipleOf:i.multipleOf,maxLength:i.maxLength,minLength:i.minLength,maxItems:i.maxItems,minItems:i.minItems,uniqueItems:i.uniqueItems,maxProperties:i.maxProperties,minProperties:i.minProperties,pattern:q(i.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=this.getModel({openApi:e,definition:i,parentRef:t});a.push({name:me(o),alias:"enum"===n.export?`${this.context.prefix.enum}${de(me(o))}`:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:le(i.description),isDefinition:!1,isReadOnly:!0===i.readOnly,isRequired:s,isNullable:!0===i.nullable,format:i.format,maximum:i.maximum,exclusiveMaximum:i.exclusiveMaximum,minimum:i.minimum,exclusiveMinimum:i.exclusiveMinimum,multipleOf:i.multipleOf,maxLength:i.maxLength,minLength:i.minLength,maxItems:i.maxItems,minItems:i.minItems,uniqueItems:i.uniqueItems,maxProperties:i.maxProperties,minProperties:i.minProperties,pattern:q(i.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}function he(e){let n=[];const t=W(this.context,e);if(t){for(const r of t){const t=this.context.get(r),a=this.getType(r,""),o=this.getModel({openApi:e,definition:t,isDefinition:!0,name:a.base,path:a.path,parentRef:r});n.push(o)}let r;n=F(n.filter(V));let a=1;n.forEach((e=>{r&&r.name===e.name?(1===a&&(r.alias=`${e.name}$${a}`,a++),e.alias=`${e.name}$${a}`,a++):(e.alias="",a=1),r=e})),n.forEach((e=>{e.imports=e.imports.map((t=>{const r=n.filter((e=>`${e.path}${e.name}`===t.path&&e.name===t.name));return r.length>0?Object.assign(t,{alias:r[0].alias,path:O(x(e.path,r[0].path),t.name)}):t}))}))}return n.filter(V)}const ye=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function ge(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(ye,"_$1")}function ve(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?ve(e.link,n.link):t}function Pe(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>ve(n,e)))===n))}function be(e,n){const t=e.isRequired&&void 0===e.default,r=n.isRequired&&void 0===n.default;return t&&!r?-1:!t&&r?1:0}function Oe(e,n,t,r,a,o){const i=`${t}${o}`,s=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n)}(r.operationId||i),l=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${ge(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),u={service:o,name:s,summary:le(r.summary),description:le(r.description),deprecated:!0===r.deprecated,method:t.toUpperCase(),path:l,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(r.parameters){const n=this.getOperationParameters(e,r.parameters);u.imports.push(...n.imports),u.parameters.push(...n.parameters),u.parametersPath.push(...n.parametersPath),u.parametersQuery.push(...n.parametersQuery),u.parametersForm.push(...n.parametersForm),u.parametersHeader.push(...n.parametersHeader),u.parametersCookie.push(...n.parametersCookie),u.parametersBody=n.parametersBody}if(r.requestBody){const n=r.requestBody.$ref?this.context.get(r.requestBody.$ref):r.requestBody,t=this.getOperationRequestBody(e,n,"");u.imports.push(...t.imports),u.parameters.push(t),u.parameters=u.parameters.sort(be),u.parametersBody=t}if(r.responses){const n=this.getOperationResponses(e,r.responses),t=Pe(n);u.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),u.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(t),t.forEach((e=>{u.results.push(e),u.imports.push(...e.imports)}))}return u}function xe(e,n){const t={in:n.in,prop:n.name,export:"interface",name:ge(n.name),alias:"",path:"",type:"any",base:"any",template:null,link:null,description:le(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=this.getType(n.$ref,"");return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t}if(n.schema){if(n.schema.$ref){const e=this.getType(n.schema.$ref,"");return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=ue(n.schema),t}{const r=this.getModel({openApi:e,definition:n.schema,parentRef:""});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.isReadOnly=r.isReadOnly,t.isRequired=t.isRequired||r.isRequired,t.isNullable=t.isNullable||r.isNullable,t.format=r.format,t.maximum=r.maximum,t.exclusiveMaximum=r.exclusiveMaximum,t.minimum=r.minimum,t.exclusiveMinimum=r.exclusiveMinimum,t.multipleOf=r.multipleOf,t.maxLength=r.maxLength,t.minLength=r.minLength,t.maxItems=r.maxItems,t.minItems=r.minItems,t.uniqueItems=r.uniqueItems,t.maxProperties=r.maxProperties,t.minProperties=r.minProperties,t.pattern=q(r.pattern),t.default=r.default,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t}}return t}function ke(e,n){const t={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const r=n.$ref?this.context.get(n.$ref):n,a=this.getOperationParameter(e,r);if("api-version"!==a.prop)switch(r.in){case"path":t.parametersPath.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"query":t.parametersQuery.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"formData":t.parametersForm.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"cookie":t.parametersCookie.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"header":t.parametersHeader.push(a),t.parameters.push(a),t.imports.push(...a.imports)}})),t.parameters=t.parameters.sort(be),t.parametersPath=t.parametersPath.sort(be),t.parametersQuery=t.parametersQuery.sort(be),t.parametersForm=t.parametersForm.sort(be),t.parametersCookie=t.parametersCookie.sort(be),t.parametersHeader=t.parametersHeader.sort(be),t}function Re(e,n){return n["application/json-patch+json"]&&n["application/json-patch+json"].schema||n["application/json"]&&n["application/json"].schema||n["text/json"]&&n["text/json"].schema||n["text/plain"]&&n["text/plain"].schema||n["multipart/mixed"]&&n["multipart/mixed"].schema||n["multipart/related"]&&n["multipart/related"].schema||n["multipart/batch"]&&n["multipart/batch"].schema||null}function we(e,n,t){const r={in:"body",prop:"body",export:"interface",name:"requestBody",alias:"",path:"",type:"any",base:"any",template:null,link:null,description:le(n.description),default:void 0,isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.content){const o=Re(0,n.content);if(o){if(r.mediaType=(a=n.content,Object.keys(a).find((e=>["application/json-patch+json","application/json","text/json","text/plain","multipart/mixed","multipart/related","multipart/batch"].includes(e)))||null),null==o?void 0:o.$ref){const e=this.getType(o.$ref,t);return r.export="reference",r.type=e.type,r.base=e.base,r.path=e.path,r.template=e.template,r.imports.push(...e.imports),r}{const n=this.getModel({openApi:e,definition:o,parentRef:t});return r.export=n.export,r.type=n.type,r.base=n.base,r.path=n.path,r.template=n.template,r.link=n.link,r.isReadOnly=n.isReadOnly,r.isRequired=r.isRequired||n.isRequired,r.isNullable=r.isNullable||n.isNullable,r.format=n.format,r.maximum=n.maximum,r.exclusiveMaximum=n.exclusiveMaximum,r.minimum=n.minimum,r.exclusiveMinimum=n.exclusiveMinimum,r.multipleOf=n.multipleOf,r.maxLength=n.maxLength,r.minLength=n.minLength,r.maxItems=n.maxItems,r.minItems=n.minItems,r.uniqueItems=n.uniqueItems,r.maxProperties=n.maxProperties,r.minProperties=n.minProperties,r.pattern=q(n.pattern),r.imports.push(...n.imports),r.enum.push(...n.enum),r.enums.push(...n.enums),r.properties.push(...n.properties),r}}}var a;return r}function qe(e,n,t,r){const a={in:"response",name:"",alias:"",path:"",code:t,description:le(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.content){const t=Re(0,n.content);if(t){if(null==t?void 0:t.$ref){const e=this.getType(t.$ref,r);return a.export="reference",a.type=e.type,a.base=e.base,a.path=e.path,a.template=e.template,a.imports.push(...e.imports),a}{const n=this.getModel({openApi:e,definition:t,parentRef:r});return a.export=n.export,a.type=n.type,a.base=n.base,a.path=n.path,a.template=n.template,a.link=n.link,a.isReadOnly=n.isReadOnly,a.isRequired=n.isRequired,a.isNullable=n.isNullable,a.format=n.format,a.maximum=n.maximum,a.exclusiveMaximum=n.exclusiveMaximum,a.minimum=n.minimum,a.exclusiveMinimum=n.exclusiveMinimum,a.multipleOf=n.multipleOf,a.maxLength=n.maxLength,a.minLength=n.minLength,a.maxItems=n.maxItems,a.minItems=n.minItems,a.uniqueItems=n.uniqueItems,a.maxProperties=n.maxProperties,a.minProperties=n.minProperties,a.pattern=q(n.pattern),a.imports.push(...n.imports),a.enum.push(...n.enum),a.enums.push(...n.enums),a.properties.push(...n.properties),a}}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return a.in="header",a.name=e,a.type="string",a.base="string",a;return a}function Ce(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function je(e,n){const t=[];for(const r in n)if(n.hasOwnProperty(r)){const a=n[r],o=a.$ref?this.context.get(a.$ref):a,i=Ce(r);if(i){const n=this.getOperationResponse(e,o,i,"");t.push(n)}}return t.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}function Ae(e,n){var t;return function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=m.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(t=e.tags)||void 0===t?void 0:t[0])||`${de(n)}Service`)}function $e(e,n){e.filter((e=>e.path===n.path&&e.type===n.name&&n.alias)).forEach((e=>{e.alias=n.alias,e.base=n.alias}))}function Se(e){const n=new Map;for(const t in e.paths)if(e.paths.hasOwnProperty(t)){const r=e.paths[t],a=this.getOperationParameters(e,r.parameters||[]);for(const o in r)if(r.hasOwnProperty(o))switch(o){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=r[o],s=Ae(i,this.context.fileName()),l=n.get(s)||{name:s,operations:[],imports:[]},u=this.getOperation(e,t,o,i,a,s);l.operations.push(u),u.imports=u.imports.map((e=>{const n=l.imports.find((n=>n.path===e.path));return n||e})),l.imports.push(...u.imports),n.set(u.service,l)}}return n.forEach((e=>{let n;e.imports=e.imports.filter(V).sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}));let t=1;e.imports=e.imports.map((e=>(n&&n.name===e.name?(1===t&&(n.alias=`${e.name}$${t}`,t++),e.alias=`${e.name}$${t}`,t++):(e.alias="",t=1),n=e,e))),e.imports.forEach((n=>{for(const t of e.operations)$e(t.results,n),$e(t.parameters,n)}))})),Array.from(n.values())}function Ie(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}const Ee=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function De(e){return Ee.has(e)}function Te(n,t){const r={type:"any",base:"any",imports:[],path:"",template:null},a=function(n){if(!n||De(n))return n;if(!n.match(/^(http:\/\/|https:\/\/|#\/)/g)&&!De(n)&&!n.match(/^array\[[a-z]+\]$/g)){const t=b(n),r=e.extname(n),a=r.toLowerCase().match(/(\.json|\.yaml|\.yml)$/g)?de(e.basename(n,r)):de(e.basename(n));return t?O(t,a):a}const t=n.trim().replace(/^#\/components\/schemas\//,"").replace(/^#\/components\/responses\//,"").replace(/^#\/components\/parameters\//,"").replace(/^#\/components\/examples\//,"").replace(/^#\/components\/requestBodies\//,"").replace(/^#\/components\/headers\//,"").replace(/^#\/components\/securitySchemes\//,"").replace(/^#\/components\/links\//,"").replace(/^#\/components\/callbacks\//,""),r=b(t),a=de(e.basename(t));return r?O(r,a):a}(I(n)||"");if(De(a)){const e=(o=a,Ee.get(o));r.path=a,e&&(r.type=e,r.base=e)}else if(a){const e=this.getTypeNameByRef(function(e){const n=e.lastIndexOf("/");return Ie(-1===n?e:e.substring(n,e.length))}(a),function(e,n){return e?n&&n.match(/^(#\/)/g)?e:e.match(/^(#\/)/g)?`${n}${e}`:O(b(n),e):n.match(/^(#\/)/g)?"":n}(n,t));r.path=a,r.type=e,r.base=e,r.imports.push({name:e,alias:"",path:a})}var o;return r}function He(e){const n=function(e="1.0"){return e.replace(/^v/gi,"")}(e.info.version),t=function(e){var n;const t=null===(n=e.servers)||void 0===n?void 0:n[0],r=(null==t?void 0:t.variables)||{};let a=(null==t?void 0:t.url)||"";for(const e in r)r.hasOwnProperty(e)&&(a=a.replace(`{${e}}`,r[e].default));return a}(e);return{version:n,server:t,models:this.getModels(e),services:this.getServices(e)}}class Me{constructor(e){this.parse=He,this.getModels=he,this.getType=Te,this.getModel=pe,this.getModelComposition=ce,this.getModelProperties=fe,this.getServices=Se,this.getOperationParameters=ke,this.getOperationParameter=xe,this.getOperation=Oe,this.getOperationResponses=je,this.getOperationResponse=qe,this.getOperationRequestBody=we,this._context=e}get context(){return this._context}getTypeNameByRef(e,n){if(n){const t=this.context.get(n);if(t.enum&&"boolean"!==t)return`${this.context.prefix.enum}${e}`;if(t.oneOf||t.anyOf||t.allOf||["string","number","integer","boolean","array"].includes(t.type))return`${this.context.prefix.type}${e}`;if("object"===t.type)return`${this.context.prefix.interface}${e}`}return e}}i.promisify(r.readFile);const Be=i.promisify(r.writeFile),Ne=i.promisify(r.copyFile),Le=i.promisify(r.exists),Ue=d.default,_e=e=>new Promise(((n,t)=>{f.default(e,(e=>{e?t(e):n()}))}));function We(n,t,r){if(!n.$ref||e.isAbsolute(n.$ref)||n.$ref.match(/^(http:\/\/|https:\/\/|#\/)/g))for(const e of Object.keys(n))n[e]instanceof Object&&We(n[e],t,r);else n.$ref=O(r,n.$ref);return n}var Fe;function Ve(e){var n;return null===(n=null==e?void 0:e.enum)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function ze(e){var n;return null===(n=null==e?void 0:e.enums)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function Qe(e,n){return e instanceof Object&&"name"in e&&"alias"in e&&"path"in e?function(e,n){const t=`${e.path}${e.name}`.toLowerCase(),r=`${n.path}${n.name}`.toLowerCase();return t.localeCompare(r,"en")}(e,n):function(e,n){const t=e.toLowerCase(),r=n.toLowerCase();return t.localeCompare(r,"en")}(e,n)}function Je(e){var n,t,r;return null===(r=null===(t=null===(n=null==e?void 0:e.imports)||void 0===n?void 0:n.filter(V))||void 0===t?void 0:t.sort(Qe))||void 0===r?void 0:r.filter((n=>e.name!==n.name))}function Ze(e,n){const t=[];return e.map(n).forEach((e=>{t.push(...e)})),t}function Ge(e){const n=Object.assign({},e);return n.operations=function(e){const n=new Map;return e.operations.map((t=>{const r=Object.assign({},t);r.imports.push(...Ze(r.parameters,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0]))))),r.imports.push(...Ze(r.results,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0])))));const a=r.name,o=n.get(a)||0;return o>0&&(r.name=`${a}${o}`),n.set(a,o+1),r}))}(n),n.operations.forEach((e=>{n.imports.push(...e.imports)})),n.imports=n.imports.filter(V),n.imports=function(e){return e.imports.filter(V).sort(Qe).filter((n=>e.name!==n.name))}(n),n}function Xe(e){return Object.assign(Object.assign({},e),{models:e.models.map((e=>function(e){return Object.assign(Object.assign({},e),{imports:Je(e),enums:ze(e),enum:Ve(e)})}(e))),services:e.services.map((e=>Ge(e)))})}!function(e){e[e.V2=2]="V2",e[e.V3=3]="V3"}(Fe||(Fe={}));var Ke={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n public readonly url: string;\n public readonly status: number;\n public readonly statusText: string;\n public readonly body: any;\n\n constructor(response: ApiResult, message: string) {\n super(message);\n\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.body = response.body;\n }\n}"},usePartial:!0,useData:!0},Ye={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiRequestOptions = {\n readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';\n readonly path: string;\n readonly cookies?: Record<string, any>;\n readonly headers?: Record<string, any>;\n readonly query?: Record<string, any>;\n readonly formData?: Record<string, any>;\n readonly body?: any;\n readonly mediaType?: string;\n readonly responseHeader?: string;\n // TODO TS2344: Redesign the logic for generating errors. Use the string value of the error code.\n // @ts-ignore\n readonly errors?: Record<number, string>;\n}"},usePartial:!0,useData:!0},en={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiResult = {\n readonly url: string;\n readonly ok: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly body: any;\n}"},usePartial:!0,useData:!0},nn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<AxiosRequestHeaders> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers: AxiosRequestHeaders = {\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n };\n\n if (isStringWithValue(token)) {\n headers['Authorization'] = `Bearer ${token}`;\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers['Authorization'] = `Bearer ${credentials}`;\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers['Content-Type'] = options.mediaType;\n } else if (isBinary(options.body)) {\n headers['Content-Type'] = 'application/octet-stream';\n } else if (isString(options.body)) {\n headers['Content-Type'] = 'text/plain';\n } else {\n headers['Content-Type'] = 'application/json';\n }\n }\n return headers;\n}"},useData:!0},tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(response: AxiosResponse): any {\n try {\n const contentType = response.headers['content-type'];\n if (contentType) {\n const isJSON = typeof contentType === 'string' && contentType.toLowerCase().startsWith('application/json');\n\n if (isJSON && isString(response.data)) {\n return JSON.parse(response.data);\n } else {\n return response.data;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},an={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: AxiosResponse, responseHeader?: string): string | null {\n if (responseHeader) {\n let content = undefined;\n\n Object.keys(response.headers).forEach((header) => {\n if (header === responseHeader) {\n content = header;\n }\n });\n\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},on={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport FormData from 'form-data';\nimport axios, { AxiosRequestConfig, AxiosResponse, AxiosRequestHeaders } from 'axios';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"axios/getRequestBody"),n,{name:"axios/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"axios/sendRequest"),n,{name:"axios/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"axios/getHeaders"),n,{name:"axios/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"axios/getResponseHeader"),n,{name:"axios/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"axios/getResponseBody"),n,{name:"axios/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using axios client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\n export async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},sn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<AxiosResponse> {\n const config: AxiosRequestConfig = {\n method: options.method,\n headers: await getHeaders(options),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data: getRequestBody(options),\n url,\n timeout: 1000,\n };\n\n return axios(config).then((response) => response);\n}"},useData:!0},ln={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},un={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},cn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},mn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"fetch/getRequestBody"),n,{name:"fetch/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"fetch/sendRequest"),n,{name:"fetch/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"fetch/getResponseHeader"),n,{name:"fetch/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"fetch/getResponseBody"),n,{name:"fetch/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},dn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n };\n if (OpenAPI.WITH_CREDENTIALS) {\n request.credentials = 'include';\n }\n return await fetch(url, request);\n}"},useData:!0},fn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function catchErrors(options: ApiRequestOptions, result: ApiResult): void {\n const errors: Record<number, string> = {\n 400: 'Bad Request',\n 401: 'Unauthorized',\n 403: 'Forbidden',\n 404: 'Not Found',\n 500: 'Internal Server Error',\n 502: 'Bad Gateway',\n 503: 'Service Unavailable',\n ...options.errors,\n }\n\n const error = errors[result.status];\n if (error) {\n throw new ApiError(result, error);\n }\n\n if (!result.ok) {\n throw new ApiError(result, 'Generic Error');\n }\n}"},useData:!0},hn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getFormData(params: Record<string, any>): FormData {\n const formData = new FormData();\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n formData.append(key, value);\n }\n });\n return formData;\n}"},useData:!0},yn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getQueryString(params: Record<string, any>): string {\n const qs: string[] = [];\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n if (Array.isArray(value)) {\n value.forEach(value => {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n });\n } else {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n }\n }\n });\n if (qs.length > 0) {\n return `?${qs.join('&')}`;\n }\n return '';\n}"},useData:!0},gn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getUrl(options: ApiRequestOptions): string {\n const path = options.path.replace(/[:]/g, '_');\n const url = `${OpenAPI.BASE}${path}`;\n\n if (options.query) {\n return `${url}${getQueryString(options.query)}`;\n }\n return url;\n}"},useData:!0},vn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBinary(value: any): value is Buffer | ArrayBuffer | ArrayBufferView {\n const isBuffer = Buffer.isBuffer(value);\n const isArrayBuffer = types.isArrayBuffer(value);\n const isArrayBufferView = types.isArrayBufferView(value);\n return isBuffer || isArrayBuffer || isArrayBufferView;\n}"},useData:!0},Pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBlob(value: any): value is Blob {\n return value instanceof Blob;\n}"},useData:!0},bn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isDefined<T>(value: T | null | undefined): value is Exclude<T, null | undefined> {\n return value !== undefined && value !== null;\n}"},useData:!0},On={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isString(value: any): value is string {\n return typeof value === 'string';\n}"},useData:!0},xn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isStringWithValue(value: any): value is string {\n return isString(value) && value !== '';\n}"},useData:!0},kn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isSuccess(status: number): boolean {\n return status >= 200 && status < 300;\n}"},useData:!0},Rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nasync function resolve<T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> {\n if (typeof resolver === 'function') {\n return (resolver as Resolver<T>)(options);\n }\n return resolver;\n}"},useData:!0},wn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBinary(options.body)) {\n headers.append('Content-Type', 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},qn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},Cn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},jn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},An={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport FormData from 'form-data';\nimport fetch, { BodyInit, Headers, RequestInit, Response } from 'node-fetch';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"node/getHeaders"),n,{name:"node/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"node/getRequestBody"),n,{name:"node/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"node/sendRequest"),n,{name:"node/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"node/getResponseHeader"),n,{name:"node/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"node/getResponseBody"),n,{name:"node/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using node-fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},$n={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n };\n return await fetch(url, request);\n}"},useData:!0},Sn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\ntype Config = {\n BASE: string;\n VERSION: string;\n WITH_CREDENTIALS: boolean;\n TOKEN?: string | Resolver<string>;\n USERNAME?: string | Resolver<string>;\n PASSWORD?: string | Resolver<string>;\n HEADERS?: Headers | Resolver<Headers>;\n}\n\nexport const OpenAPI: Config = {\n BASE: '"+(null!=(o=s(i(n,"server",{start:{line:19,column:14},end:{line:19,column:20}}),n))?o:"")+"',\n VERSION: '"+(null!=(o=s(i(n,"version",{start:{line:20,column:17},end:{line:20,column:24}}),n))?o:"")+"',\n WITH_CREDENTIALS: false,\n TOKEN: undefined,\n USERNAME: undefined,\n PASSWORD: undefined,\n HEADERS: undefined,\n};"},usePartial:!0,useData:!0},In={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"fetch/request"),n,{name:"fetch/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"xhr/request"),n,{name:"xhr/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},5:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"node/request"),n,{name:"node/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"axios/request"),n,{name:"axios/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"equals").call(i,s(s(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:67}}}))?o:"")+(null!=(o=s(t,"equals").call(i,s(s(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:63}}}))?o:"")+(null!=(o=s(t,"equals").call(i,s(s(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:65}}}))?o:"")+(null!=(o=s(t,"equals").call(i,s(s(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:67}}}))?o:"")},usePartial:!0,useData:!0},En={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},Dn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},Tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(xhr: XMLHttpRequest): any {\n try {\n const contentType = xhr.getResponseHeader('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return JSON.parse(xhr.responseText);\n } else {\n return xhr.responseText;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},Hn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(xhr: XMLHttpRequest, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = xhr.getResponseHeader(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},Mn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"xhr/getRequestBody"),n,{name:"xhr/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"xhr/sendRequest"),n,{name:"xhr/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"xhr/getResponseHeader"),n,{name:"xhr/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"xhr/getResponseBody"),n,{name:"xhr/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(i(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using XHR client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},Bn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<XMLHttpRequest> {\n\n const xhr = new XMLHttpRequest();\n xhr.open(options.method, url, true);\n xhr.withCredentials = OpenAPI.WITH_CREDENTIALS;\n\n const headers = await getHeaders(options);\n headers.forEach((value: string, key: string) => {\n xhr.setRequestHeader(key, value);\n });\n\n return new Promise<XMLHttpRequest>(resolve => {\n xhr.onreadystatechange = () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n resolve(xhr);\n }\n };\n xhr.send(getRequestBody(options));\n });\n}"},useData:!0},Nn={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:9}}}))?o:"")},2:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=s(i(n,"name",{start:{line:6,column:17},end:{line:6,column:21}}),n))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:24},end:{line:6,column:59}}}))?o:"")+" } from './"+(null!=(o=s(i(n,"path",{start:{line:6,column:73},end:{line:6,column:77}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:6,column:44},end:{line:6,column:49}}),n))?o:"")},5:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"exportInterface"),n,{name:"exportInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:12,column:0},end:{line:22,column:0}}}))?o:""},8:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"exportComposition"),n,{name:"exportComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},10:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:14,column:0},end:{line:22,column:0}}}))?o:""},11:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:16,column:0},end:{line:22,column:0}}}))?o:""},12:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:18,column:0},end:{line:22,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"exportEnum"),n,{name:"exportEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"exportType"),n,{name:"exportType",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=s(t,"if").call(i,s(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:8,column:7}}}))?o:"")+"\n"+(null!=(o=s(t,"equals").call(i,s(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a,loc:{start:{line:10,column:0},end:{line:22,column:11}}}))?o:"")},usePartial:!0,useData:!0},Ln={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport const "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:3,column:16},end:{line:3,column:20}}),n))?o:"")+"Schema = "+(null!=(o=e.invokePartial(i(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},Un={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:""},2:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=s(i(n,"name",{start:{line:5,column:17},end:{line:5,column:21}}),n))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:24},end:{line:5,column:59}}}))?o:"")+" } from '"+(null!=(o=s(i(l(a,"root"),"outputModels",{start:{line:5,column:71},end:{line:5,column:89}}),n))?o:"")+(null!=(o=s(i(n,"path",{start:{line:5,column:95},end:{line:5,column:99}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:5,column:44},end:{line:5,column:49}}),n))?o:"")},5:function(e,n,t,r,a){var o;return"import { OpenAPI } from '"+(null!=(o=e.lambda(e.strict(n,"outputCore",{start:{line:10,column:28},end:{line:10,column:38}}),n))?o:"")+"OpenAPI';\n"},7:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.strict,l=e.lambda,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" /**\n"+(null!=(o=u(t,"if").call(i,u(n,"deprecated"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:4},end:{line:19,column:11}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"summary"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:4},end:{line:22,column:11}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"description"),{name:"if",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:4},end:{line:25,column:11}}}))?o:"")+(null!=(o=u(t,"unless").call(i,u(u(a,"root"),"useOptions"),{name:"unless",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:4},end:{line:32,column:15}}}))?o:"")+(null!=(o=u(t,"each").call(i,u(n,"results"),{name:"each",hash:{},fn:e.program(18,a,0),inverse:e.noop,data:a,loc:{start:{line:33,column:4},end:{line:35,column:13}}}))?o:"")+" * @throws ApiError\n */\n public static async "+(null!=(o=l(s(n,"name",{start:{line:38,column:27},end:{line:38,column:31}}),n))?o:"")+"("+(null!=(o=e.invokePartial(u(r,"parameters"),n,{name:"parameters",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"): Promise<"+(null!=(o=e.invokePartial(u(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"> {\n"+(null!=(o=u(t,"if").call(i,u(u(a,"root"),"useCustomRequest"),{name:"if",hash:{},fn:e.program(20,a,0),inverse:e.program(22,a,0),data:a,loc:{start:{line:39,column:8},end:{line:43,column:15}}}))?o:"")+" method: '"+(null!=(o=l(s(n,"method",{start:{line:44,column:24},end:{line:44,column:30}}),n))?o:"")+"',\n path: `"+(null!=(o=l(s(n,"path",{start:{line:45,column:22},end:{line:45,column:26}}),n))?o:"")+"`,\n"+(null!=(o=u(t,"if").call(i,u(n,"parametersCookie"),{name:"if",hash:{},fn:e.program(24,a,0),inverse:e.noop,data:a,loc:{start:{line:46,column:12},end:{line:52,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"parametersHeader"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:53,column:12},end:{line:59,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"parametersQuery"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:60,column:12},end:{line:66,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"parametersForm"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:67,column:12},end:{line:73,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"parametersBody"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:74,column:12},end:{line:79,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"responseHeader"),{name:"if",hash:{},fn:e.program(36,a,0),inverse:e.noop,data:a,loc:{start:{line:80,column:12},end:{line:82,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"errors"),{name:"if",hash:{},fn:e.program(38,a,0),inverse:e.noop,data:a,loc:{start:{line:83,column:12},end:{line:89,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(u(a,"root"),"useCustomRequest"),{name:"if",hash:{},fn:e.program(41,a,0),inverse:e.program(43,a,0),data:a,loc:{start:{line:90,column:8},end:{line:95,column:15}}}))?o:"")+" }\n\n"},8:function(e,n,t,r,a){return" * @deprecated\n"},10:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"summary",{start:{line:21,column:10},end:{line:21,column:17}}),n))?o:"")+"\n"},12:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:24,column:10},end:{line:24,column:21}}),n))?o:"")+"\n"},14:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"parameters"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:27,column:4},end:{line:31,column:11}}}))?o:""},15:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"parameters"),{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a,loc:{start:{line:28,column:4},end:{line:30,column:13}}}))?o:""},16:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda;return" * @param "+(null!=(o=s(i(n,"name",{start:{line:29,column:17},end:{line:29,column:21}}),n))?o:"")+" "+(null!=(o=s(i(n,"description",{start:{line:29,column:28},end:{line:29,column:39}}),n))?o:"")+"\n"},18:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda;return" * @returns "+(null!=(o=s(i(n,"type",{start:{line:34,column:19},end:{line:34,column:23}}),n))?o:"")+" "+(null!=(o=s(i(n,"description",{start:{line:34,column:30},end:{line:34,column:41}}),n))?o:"")+"\n"},20:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" return await __request<"+(null!=(o=e.invokePartial(i(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">({\n"},22:function(e,n,t,r,a){return" const result = await __request({\n"},24:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" cookies: {\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"parametersCookie"),{name:"each",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:48,column:16},end:{line:50,column:25}}}))?o:"")+" },\n"},25:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda;return" '"+(null!=(o=s(i(n,"prop",{start:{line:49,column:20},end:{line:49,column:24}}),n))?o:"")+"': "+(null!=(o=s(i(n,"name",{start:{line:49,column:33},end:{line:49,column:37}}),n))?o:"")+",\n"},27:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" headers: {\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"parametersHeader"),{name:"each",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:55,column:16},end:{line:57,column:25}}}))?o:"")+" },\n"},29:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" query: {\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"parametersQuery"),{name:"each",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:62,column:16},end:{line:64,column:25}}}))?o:"")+" },\n"},31:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" formData: {\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"parametersForm"),{name:"each",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:69,column:16},end:{line:71,column:25}}}))?o:"")+" },\n"},33:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" body: "+(null!=(o=e.lambda(e.strict(i(n,"parametersBody"),"name",{start:{line:75,column:21},end:{line:75,column:40}}),n))?o:"")+",\n"+(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(i(n,"parametersBody"),"mediaType"),{name:"if",hash:{},fn:e.program(34,a,0),inverse:e.noop,data:a,loc:{start:{line:76,column:12},end:{line:78,column:19}}}))?o:"")},34:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" mediaType: '"+(null!=(o=e.lambda(e.strict(i(n,"parametersBody"),"mediaType",{start:{line:77,column:27},end:{line:77,column:51}}),n))?o:"")+"',\n"},36:function(e,n,t,r,a){var o;return" responseHeader: '"+(null!=(o=e.lambda(e.strict(n,"responseHeader",{start:{line:81,column:32},end:{line:81,column:46}}),n))?o:"")+"',\n"},38:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" errors: {\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"errors"),{name:"each",hash:{},fn:e.program(39,a,0),inverse:e.noop,data:a,loc:{start:{line:85,column:16},end:{line:87,column:25}}}))?o:"")+" },\n"},39:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda;return" "+(null!=(o=s(i(n,"code",{start:{line:86,column:19},end:{line:86,column:23}}),n))?o:"")+": `"+(null!=(o=s(i(n,"description",{start:{line:86,column:32},end:{line:86,column:43}}),n))?o:"")+"`,\n"},41:function(e,n,t,r,a){return" }).then((resp) => resp);\n"},43:function(e,n,t,r,a){return" });\n return result.body;\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.strict,l=e.lambda,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(u(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=u(t,"if").call(i,u(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+"import { request as __request } from '"+(null!=(o=l(s(n,"outputCore",{start:{line:8,column:41},end:{line:8,column:51}}),n))?o:"")+"request';\n"+(null!=(o=u(t,"if").call(i,u(u(a,"root"),"useVersion"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"\nexport class "+(null!=(o=l(s(n,"name",{start:{line:13,column:16},end:{line:13,column:20}}),n))?o:"")+" {\n\n"+(null!=(o=u(t,"each").call(i,u(n,"operations"),{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:4},end:{line:98,column:13}}}))?o:"")+"}"},usePartial:!0,useData:!0},_n={1:function(e,n,t,r,a,o,i){var s,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(s=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"core"),{name:"each",hash:{},fn:e.program(2,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:7,column:9}}}))?s:"")},2:function(e,n,t,r,a,o,i){var s,l=null!=n?n:e.nullContext||{},u=e.lambda,p=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { ApiError"+(null!=(s=p(t,"notEquals").call(l,p(p(i[1],"core"),"length"),1,{name:"notEquals",hash:{},fn:e.program(3,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:5,column:17},end:{line:5,column:87}}}))?s:"")+" } from './"+(null!=(s=u(n,n))?s:"")+"ApiError';\nexport { OpenAPI"+(null!=(s=p(t,"notEquals").call(l,p(p(i[1],"core"),"length"),1,{name:"notEquals",hash:{},fn:e.program(5,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:6,column:16},end:{line:6,column:86}}}))?s:"")+" } from './"+(null!=(s=u(n,n))?s:"")+"OpenAPI';\n"},3:function(e,n,t,r,a){var o;return" as ApiError$"+(null!=(o=e.lambda(e.strict(a,"index",{start:{line:5,column:64},end:{line:5,column:70}}),n))?o:"")},5:function(e,n,t,r,a){var o;return" as OpenAPI$"+(null!=(o=e.lambda(e.strict(a,"index",{start:{line:6,column:63},end:{line:6,column:69}}),n))?o:"")},7:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"models"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:21,column:9}}}))?o:"")},8:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"enum"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:12,column:0},end:{line:20,column:7}}}))?o:""},9:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=s(i(n,"name",{start:{line:13,column:12},end:{line:13,column:16}}),n))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"alias"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:19},end:{line:13,column:55}}}))?o:"")+" } from './"+(null!=(o=s(i(n,"package",{start:{line:13,column:69},end:{line:13,column:76}}),n))?o:"")+(null!=(o=s(i(n,"path",{start:{line:13,column:82},end:{line:13,column:86}}),n))?o:"")+"';\n"},10:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:13,column:40},end:{line:13,column:45}}),n))?o:"")},12:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"useUnionTypes"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:14,column:0},end:{line:20,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export type { "+(null!=(o=s(i(n,"name",{start:{line:15,column:17},end:{line:15,column:21}}),n))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"alias"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:24},end:{line:15,column:60}}}))?o:"")+" } from './"+(null!=(o=s(i(n,"package",{start:{line:15,column:74},end:{line:15,column:81}}),n))?o:"")+(null!=(o=s(i(n,"path",{start:{line:15,column:87},end:{line:15,column:91}}),n))?o:"")+"';\n"},15:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"enums"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(13,a,0),data:a,loc:{start:{line:16,column:0},end:{line:20,column:0}}}))?o:""},17:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"schemas"),{name:"each",hash:{},fn:e.program(18,a,0),inverse:e.noop,data:a,loc:{start:{line:25,column:0},end:{line:27,column:9}}}))?o:"")},18:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=s(i(n,"name",{start:{line:26,column:12},end:{line:26,column:16}}),n))?o:"")+"Schema"+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"alias"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:25},end:{line:26,column:67}}}))?o:"")+" } from './"+(null!=(o=s(i(n,"package",{start:{line:26,column:81},end:{line:26,column:88}}),n))?o:"")+(null!=(o=s(i(n,"path",{start:{line:26,column:94},end:{line:26,column:98}}),n))?o:"")+"Schema';\n"},19:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:26,column:46},end:{line:26,column:51}}),n))?o:"")+"Schema"},21:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"services"),{name:"each",hash:{},fn:e.program(22,a,0),inverse:e.noop,data:a,loc:{start:{line:31,column:0},end:{line:33,column:9}}}))?o:"")},22:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda;return"export { "+(null!=(o=s(i(n,"name",{start:{line:32,column:12},end:{line:32,column:16}}),n))?o:"")+" } from './"+(null!=(o=s(i(n,"package",{start:{line:32,column:33},end:{line:32,column:40}}),n))?o:"")+(null!=(o=s(i(n,"name",{start:{line:32,column:46},end:{line:32,column:50}}),n))?o:"")+"';\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,i){var s,l=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=e.invokePartial(u(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=u(t,"if").call(l,u(n,"core"),{name:"if",hash:{},fn:e.program(1,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:8,column:7}}}))?s:"")+(null!=(s=u(t,"if").call(l,u(n,"models"),{name:"if",hash:{},fn:e.program(7,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:22,column:7}}}))?s:"")+(null!=(s=u(t,"if").call(l,u(n,"schemas"),{name:"if",hash:{},fn:e.program(17,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:28,column:7}}}))?s:"")+(null!=(s=u(t,"if").call(l,u(n,"services"),{name:"if",hash:{},fn:e.program(21,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:34,column:7}}}))?s:"")},usePartial:!0,useData:!0,useDepths:!0},Wn={1:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"equals").call(i,s(s(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:53}}}))?o:"")+(null!=(o=s(t,"equals").call(i,s(s(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:51}}}))?o:"")+(null!=(o=s(t,"equals").call(i,s(s(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:86}}}))?o:"")+(null!=(o=s(t,"equals").call(i,s(s(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:5,column:87}}}))?o:"")},2:function(e,n,t,r,a){return"Blob"},4:function(e,n,t,r,a){return"Buffer | ArrayBuffer | ArrayBufferView"},6:function(e,n,t,r,a){var o;return null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:3},end:{line:7,column:7}}),n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"base"),"File",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:8,column:13}}}))?o:""},useData:!0},Fn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"unless").call(null!=n?n:e.nullContext||{},i(i(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:27,column:11}}}))?o:""},4:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:10,column:20},end:{line:10,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"enums"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:4},end:{line:24,column:13}}}))?o:"")+"\n}\n"},5:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(i,s(n,"description"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:19},end:{line:18,column:23}}),n))?o:"")+" {\n"+(null!=(o=s(t,"each").call(i,s(n,"enum"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:8},end:{line:21,column:17}}}))?o:"")+" }\n\n"},6:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:15,column:10},end:{line:15,column:21}}),n))?o:"")+"\n */\n"},8:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda;return" "+(null!=(o=s(i(n,"name",{start:{line:20,column:11},end:{line:20,column:15}}),n))?o:"")+" = "+(null!=(o=s(i(n,"value",{start:{line:20,column:24},end:{line:20,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(i,s(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(n,"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";\n"+(null!=(o=s(t,"if").call(i,s(n,"enums"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:28,column:7}}}))?o:"")},usePartial:!0,useData:!0},Vn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(i,s(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?o:"")+(null!=(o=s(t,"containsSpaces").call(i,s(n,"name"),{name:"containsSpaces",hash:{},fn:e.program(6,a,0),inverse:e.program(8,a,0),data:a,loc:{start:{line:13,column:4},end:{line:17,column:23}}}))?o:"")},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda;return' "'+(null!=(o=s(i(n,"name",{start:{line:14,column:8},end:{line:14,column:12}}),n))?o:"")+'" = '+(null!=(o=s(i(n,"value",{start:{line:14,column:22},end:{line:14,column:27}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda;return" "+(null!=(o=s(i(n,"name",{start:{line:16,column:7},end:{line:16,column:11}}),n))?o:"")+" = "+(null!=(o=s(i(n,"value",{start:{line:16,column:20},end:{line:16,column:25}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(i,s(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" {\n"+(null!=(o=s(t,"each").call(i,s(n,"enum"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?o:"")+"}"},useData:!0},zn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a,o,i){var s,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?s:"")+" "+(null!=(s=e.invokePartial(l(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=e.lambda(e.strict(n,"name",{start:{line:13,column:22},end:{line:13,column:26}}),n))?s:"")+(null!=(s=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+": "+(null!=(s=e.invokePartial(l(r,"type"),n,{name:"type",hash:{parent:l(i[1],"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+";\n"},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"unless").call(null!=n?n:e.nullContext||{},i(i(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:40,column:11}}}))?o:""},7:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:19,column:20},end:{line:19,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"enums"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:21,column:4},end:{line:37,column:13}}}))?o:"")+"\n}\n"},8:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(i,s(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:22,column:4},end:{line:26,column:11}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"alias"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:27,column:4},end:{line:31,column:11}}}))?o:"")+(null!=(o=s(t,"each").call(i,s(n,"enum"),{name:"each",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:8},end:{line:34,column:17}}}))?o:"")+" }\n\n"},9:function(e,n,t,r,a){var o;return" export enum "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:28,column:19},end:{line:28,column:24}}),n))?o:"")+" {\n"},11:function(e,n,t,r,a){var o;return" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:30,column:19},end:{line:30,column:23}}),n))?o:"")+" {\n"},13:function(e,n,t,r,a){var o,i=e.strict,s=e.lambda;return" "+(null!=(o=s(i(n,"name",{start:{line:33,column:11},end:{line:33,column:15}}),n))?o:"")+" = "+(null!=(o=s(i(n,"value",{start:{line:33,column:24},end:{line:33,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,i){var s,l=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=u(t,"if").call(l,u(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?s:"")+"export interface "+(null!=(s=e.lambda(e.strict(n,"name",{start:{line:6,column:20},end:{line:6,column:24}}),n))?s:"")+" {\n"+(null!=(s=u(t,"each").call(l,u(n,"properties"),{name:"each",hash:{},fn:e.program(3,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:14,column:13}}}))?s:"")+"}\n"+(null!=(s=u(t,"if").call(l,u(n,"enums"),{name:"if",hash:{},fn:e.program(6,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:41,column:7}}}))?s:"")},usePartial:!0,useData:!0,useDepths:!0},Qn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(i(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},Jn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */"},useData:!0},Zn={1:function(e,n,t,r,a){return" | null"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"isNullable"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:32}}}))?o:""},useData:!0},Gn={1:function(e,n,t,r,a){return"readonly "},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:34}}}))?o:""},useData:!0},Xn={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"unless").call(null!=n?n:e.nullContext||{},i(n,"isRequired"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:2,column:0},end:{line:2,column:54}}}))?o:""},2:function(e,n,t,r,a){return"?"},4:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"default"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:23},end:{line:2,column:43}}}))?o:""},6:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"unless").call(null!=n?n:e.nullContext||{},i(n,"isRequired"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:64}}}))?o:""},7:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"unless").call(null!=n?n:e.nullContext||{},i(n,"default"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:22},end:{line:4,column:53}}}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(i(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},useData:!0},Kn={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(i(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:2,column:0},end:{line:20,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=s(t,"each").call(i,s(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:"")+"}: {\n"+(null!=(o=s(t,"each").call(i,s(n,"parameters"),{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:13,column:9}}}))?o:"")+"}"},3:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:3},end:{line:5,column:7}}),n))?o:"")+(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:10},end:{line:5,column:48}}}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" = "+(null!=(o=e.lambda(e.strict(n,"default",{start:{line:5,column:31},end:{line:5,column:38}}),n))?o:"")},6:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"description"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:3},end:{line:12,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(i(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(i(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return"/** "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:7},end:{line:10,column:18}}),n))?o:"")+" **/\n"},9:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"parameters"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:9}}}))?o:"")},10:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:3},end:{line:18,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(i(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(i(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:18,column:36},end:{line:18,column:74}}}))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:21,column:7}}}))?o:""},usePartial:!0,useData:!0},Yn={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"results"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:66}}}))?o:""},2:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=i(t,"unless").call(null!=n?n:e.nullContext||{},i(a,"last"),{name:"unless",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:26},end:{line:2,column:57}}}))?o:"")},3:function(e,n,t,r,a){return" | "},5:function(e,n,t,r,a){return"void"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"results"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},et={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"schemaInterface"),n,{name:"schemaInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:17,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"schemaEnum"),n,{name:"schemaEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"array",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:17,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"schemaArray"),n,{name:"schemaArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:17,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"schemaDictionary"),n,{name:"schemaDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:17,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"schemaComposition"),n,{name:"schemaComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(16,a,0),data:a,loc:{start:{line:11,column:0},end:{line:17,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(17,a,0),data:a,loc:{start:{line:13,column:0},end:{line:17,column:0}}}))?o:""},17:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"schemaGeneric"),n,{name:"schemaGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:17,column:11}}}))?o:""},usePartial:!0,useData:!0},nt={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(i(r,"schema"),i(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'array',\n"+(null!=(o=s(t,"if").call(i,s(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},tt={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=i(t,"unless").call(null!=n?n:e.nullContext||{},i(a,"last"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:46},end:{line:3,column:76}}}))?o:"")},2:function(e,n,t,r,a){return", "},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:5,column:19},end:{line:5,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:8,column:19},end:{line:8,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: '"+(null!=(o=e.lambda(e.strict(n,"export",{start:{line:2,column:13},end:{line:2,column:19}}),n))?o:"")+"',\n contains: ["+(null!=(o=s(t,"each").call(i,s(n,"properties"),{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:15},end:{line:3,column:85}}}))?o:"")+"],\n"+(null!=(o=s(t,"if").call(i,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},rt={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(i(r,"schema"),i(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'dictionary',\n"+(null!=(o=s(t,"if").call(i,s(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},at={1:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:4,column:19},end:{line:4,column:29}}),n))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:7,column:19},end:{line:7,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'Enum',\n"+(null!=(o=s(t,"if").call(i,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"}"},useData:!0},ot={1:function(e,n,t,r,a){var o;return" type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:3,column:14},end:{line:3,column:18}}),n))?o:"")+"',\n"},3:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:6,column:19},end:{line:6,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:9,column:19},end:{line:9,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:12,column:19},end:{line:12,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" format: '"+(null!=(o=e.lambda(e.strict(n,"format",{start:{line:15,column:16},end:{line:15,column:22}}),n))?o:"")+"',\n"},11:function(e,n,t,r,a){var o;return" maximum: "+(null!=(o=e.lambda(e.strict(n,"maximum",{start:{line:18,column:16},end:{line:18,column:23}}),n))?o:"")+",\n"},13:function(e,n,t,r,a){var o;return" exclusiveMaximum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMaximum",{start:{line:21,column:25},end:{line:21,column:41}}),n))?o:"")+",\n"},15:function(e,n,t,r,a){var o;return" minimum: "+(null!=(o=e.lambda(e.strict(n,"minimum",{start:{line:24,column:16},end:{line:24,column:23}}),n))?o:"")+",\n"},17:function(e,n,t,r,a){var o;return" exclusiveMinimum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMinimum",{start:{line:27,column:25},end:{line:27,column:41}}),n))?o:"")+",\n"},19:function(e,n,t,r,a){var o;return" multipleOf: "+(null!=(o=e.lambda(e.strict(n,"multipleOf",{start:{line:30,column:19},end:{line:30,column:29}}),n))?o:"")+",\n"},21:function(e,n,t,r,a){var o;return" maxLength: "+(null!=(o=e.lambda(e.strict(n,"maxLength",{start:{line:33,column:18},end:{line:33,column:27}}),n))?o:"")+",\n"},23:function(e,n,t,r,a){var o;return" minLength: "+(null!=(o=e.lambda(e.strict(n,"minLength",{start:{line:36,column:18},end:{line:36,column:27}}),n))?o:"")+",\n"},25:function(e,n,t,r,a){var o;return" pattern: '"+(null!=(o=e.lambda(e.strict(n,"pattern",{start:{line:39,column:17},end:{line:39,column:24}}),n))?o:"")+"',\n"},27:function(e,n,t,r,a){var o;return" maxItems: "+(null!=(o=e.lambda(e.strict(n,"maxItems",{start:{line:42,column:17},end:{line:42,column:25}}),n))?o:"")+",\n"},29:function(e,n,t,r,a){var o;return" minItems: "+(null!=(o=e.lambda(e.strict(n,"minItems",{start:{line:45,column:17},end:{line:45,column:25}}),n))?o:"")+",\n"},31:function(e,n,t,r,a){var o;return" uniqueItems: "+(null!=(o=e.lambda(e.strict(n,"uniqueItems",{start:{line:48,column:20},end:{line:48,column:31}}),n))?o:"")+",\n"},33:function(e,n,t,r,a){var o;return" maxProperties: "+(null!=(o=e.lambda(e.strict(n,"maxProperties",{start:{line:51,column:22},end:{line:51,column:35}}),n))?o:"")+",\n"},35:function(e,n,t,r,a){var o;return" minProperties: "+(null!=(o=e.lambda(e.strict(n,"minProperties",{start:{line:54,column:22},end:{line:54,column:35}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=s(t,"if").call(i,s(n,"type"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"format"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"maximum"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"exclusiveMaximum"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"minimum"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:25,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"exclusiveMinimum"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"multipleOf"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"maxLength"),{name:"if",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:34,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"minLength"),{name:"if",hash:{},fn:e.program(23,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:0},end:{line:37,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"pattern"),{name:"if",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:38,column:0},end:{line:40,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"maxItems"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:41,column:0},end:{line:43,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"minItems"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:44,column:0},end:{line:46,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"uniqueItems"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:47,column:0},end:{line:49,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"maxProperties"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:50,column:0},end:{line:52,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"minProperties"),{name:"if",hash:{},fn:e.program(35,a,0),inverse:e.noop,data:a,loc:{start:{line:53,column:0},end:{line:55,column:7}}}))?o:"")+"}"},useData:!0},it={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))?o:""},2:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:11},end:{line:5,column:15}}),n))?o:"")+": "+(null!=(o=e.invokePartial(i(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:13,column:19},end:{line:13,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:16,column:19},end:{line:16,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n properties: {\n"+(null!=(o=s(t,"if").call(i,s(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+" },\n"+(null!=(o=s(t,"if").call(i,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:0},end:{line:14,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(i,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:0},end:{line:17,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},st={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"typeInterface"),n,{name:"typeInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"reference",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:19,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"typeReference"),n,{name:"typeReference",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:19,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"typeEnum"),n,{name:"typeEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"array",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"typeArray"),n,{name:"typeArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:19,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"typeDictionary"),n,{name:"typeDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(18,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"typeUnion"),n,{name:"typeUnion",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},18:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(19,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},19:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(20,a,0),inverse:e.program(22,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},20:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"typeIntersection"),n,{name:"typeIntersection",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},22:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(i(r,"typeGeneric"),n,{name:"typeGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"equals").call(null!=n?n:e.nullContext||{},i(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:19,column:11}}}))?o:""},usePartial:!0,useData:!0},lt={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(i(r,"type"),i(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(i(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},ut={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(i(r,"type"),i(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(i(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},pt={1:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"enumerator").call(null!=n?n:e.nullContext||{},i(n,"enum"),i(n,"parent"),i(n,"alias"),{name:"enumerator",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:58}}}))?o:"")+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},2:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},4:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"enumerator").call(null!=n?n:e.nullContext||{},i(n,"enum"),i(n,"parent"),i(n,"name"),{name:"enumerator",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:57}}}))?o:"")+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"alias"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},ct={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},mt={1:function(e,n,t,r,a,o,i){var s,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(s=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:14,column:9}}}))?s:"")+"}"+(null!=(s=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")},2:function(e,n,t,r,a,o,i){var s,l=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=u(t,"if").call(l,u(n,"description"),{name:"if",hash:{},fn:e.program(3,a,0,o,i),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:8,column:7}}}))?s:"")+(null!=(s=u(t,"if").call(l,u(i[1],"parent"),{name:"if",hash:{},fn:e.program(5,a,0,o,i),inverse:e.program(7,a,0,o,i),data:a,loc:{start:{line:9,column:0},end:{line:13,column:7}}}))?s:"")},3:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:6,column:6},end:{line:6,column:17}}),n))?o:"")+"\n */\n"},5:function(e,n,t,r,a,o,i){var s,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=e.invokePartial(l(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=e.lambda(e.strict(n,"name",{start:{line:10,column:18},end:{line:10,column:22}}),n))?s:"")+(null!=(s=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+": "+(null!=(s=e.invokePartial(l(r,"type"),n,{name:"type",hash:{parent:l(i[1],"parent")},data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+",\n"},7:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:18},end:{line:12,column:22}}),n))?o:"")+(null!=(o=e.invokePartial(i(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(i(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},9:function(e,n,t,r,a){return"any"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,i){var s,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(s=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0,o,i),inverse:e.program(9,a,0,o,i),data:a,loc:{start:{line:1,column:0},end:{line:18,column:9}}}))?s:""},usePartial:!0,useData:!0,useDepths:!0},dt={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"intersection").call(null!=n?n:e.nullContext||{},i(n,"properties"),i(n,"parent"),{name:"intersection",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:60}}}))?o:"")+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},ft={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},ht={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"union").call(null!=n?n:e.nullContext||{},i(n,"properties"),i(n,"parent"),{name:"union",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:46}}}))?o:"")+(null!=(o=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0};function yt(e){!function(e){y.registerHelper("equals",(function(e,n,t){return e===n?t.fn(this):t.inverse(this)})),y.registerHelper("notEquals",(function(e,n,t){return e!==n?t.fn(this):t.inverse(this)})),y.registerHelper("containsSpaces",(function(e,n){return/\s+/.test(e)?n.fn(this):n.inverse(this)})),y.registerHelper("union",(function(n,t,r){const a=y.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(V);let i=o.join(" | ");return o.length>1&&(i=`(${i})`),r.fn(i)})),y.registerHelper("intersection",(function(n,t,r){const a=y.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(V);let i=o.join(" & ");return o.length>1&&(i=`(${i})`),r.fn(i)})),y.registerHelper("enumerator",(function(n,t,r,a){return!e.useUnionTypes&&t&&r?`${t}.${r}`:a.fn(n.map((e=>e.value)).filter(V).join(" | "))}))}(e);const n={index:y.template(_n),exports:{model:y.template(Nn),schema:y.template(Ln),service:y.template(Un)},core:{settings:y.template(Sn),apiError:y.template(Ke),apiRequestOptions:y.template(Ye),apiResult:y.template(en),request:y.template(In)}};return y.registerPartial("exportEnum",y.template(Vn)),y.registerPartial("exportInterface",y.template(zn)),y.registerPartial("exportComposition",y.template(Fn)),y.registerPartial("exportType",y.template(Qn)),y.registerPartial("header",y.template(Jn)),y.registerPartial("isNullable",y.template(Zn)),y.registerPartial("isReadOnly",y.template(Gn)),y.registerPartial("isRequired",y.template(Xn)),y.registerPartial("parameters",y.template(Kn)),y.registerPartial("result",y.template(Yn)),y.registerPartial("schema",y.template(et)),y.registerPartial("schemaArray",y.template(nt)),y.registerPartial("schemaDictionary",y.template(rt)),y.registerPartial("schemaEnum",y.template(at)),y.registerPartial("schemaGeneric",y.template(ot)),y.registerPartial("schemaInterface",y.template(it)),y.registerPartial("schemaComposition",y.template(tt)),y.registerPartial("type",y.template(st)),y.registerPartial("typeArray",y.template(lt)),y.registerPartial("typeDictionary",y.template(ut)),y.registerPartial("typeEnum",y.template(pt)),y.registerPartial("typeGeneric",y.template(ct)),y.registerPartial("typeInterface",y.template(mt)),y.registerPartial("typeReference",y.template(ft)),y.registerPartial("typeUnion",y.template(ht)),y.registerPartial("typeIntersection",y.template(dt)),y.registerPartial("base",y.template(Wn)),y.registerPartial("functions/catchErrors",y.template(fn)),y.registerPartial("functions/getFormData",y.template(hn)),y.registerPartial("functions/getQueryString",y.template(yn)),y.registerPartial("functions/getUrl",y.template(gn)),y.registerPartial("functions/isBinary",y.template(vn)),y.registerPartial("functions/isBlob",y.template(Pn)),y.registerPartial("functions/isDefined",y.template(bn)),y.registerPartial("functions/isString",y.template(On)),y.registerPartial("functions/isStringWithValue",y.template(xn)),y.registerPartial("functions/isSuccess",y.template(kn)),y.registerPartial("functions/resolve",y.template(Rn)),y.registerPartial("fetch/getHeaders",y.template(ln)),y.registerPartial("fetch/getRequestBody",y.template(un)),y.registerPartial("fetch/getResponseBody",y.template(pn)),y.registerPartial("fetch/getResponseHeader",y.template(cn)),y.registerPartial("fetch/sendRequest",y.template(dn)),y.registerPartial("fetch/request",y.template(mn)),y.registerPartial("xhr/getHeaders",y.template(En)),y.registerPartial("xhr/getRequestBody",y.template(Dn)),y.registerPartial("xhr/getResponseBody",y.template(Tn)),y.registerPartial("xhr/getResponseHeader",y.template(Hn)),y.registerPartial("xhr/sendRequest",y.template(Bn)),y.registerPartial("xhr/request",y.template(Mn)),y.registerPartial("node/getHeaders",y.template(wn)),y.registerPartial("node/getRequestBody",y.template(qn)),y.registerPartial("node/getResponseBody",y.template(Cn)),y.registerPartial("node/getResponseHeader",y.template(jn)),y.registerPartial("node/sendRequest",y.template($n)),y.registerPartial("node/request",y.template(An)),y.registerPartial("axios/getHeaders",y.template(nn)),y.registerPartial("axios/getRequestBody",y.template(tn)),y.registerPartial("axios/getResponseBody",y.template(rn)),y.registerPartial("axios/getResponseHeader",y.template(an)),y.registerPartial("axios/sendRequest",y.template(sn)),y.registerPartial("axios/request",y.template(on)),n}function gt(n,t){return e.relative(t,n).startsWith("..")}async function vt(n){const{templates:t,outputPath:r,core:a,models:o,schemas:i,services:s}=n;await Be(e.resolve(r,"index.ts"),t.index({core:a,models:o,schemas:i,services:s}))}function Pt(e){let t=0,r=e.split(n.EOL);return r=r.map((e=>{e=e.trim().replace(/^\*/g," *");let n=t;(e.endsWith("(")||e.endsWith("{")||e.endsWith("["))&&t++,(e.startsWith(")")||e.startsWith("}")||e.startsWith("]"))&&n&&(t--,n--);const r=`${" ".repeat(n)}${e}`;return""===r.trim()?"":r})),r.join(n.EOL)}function bt(e,n){return e.name>n.name?1:e.name<n.name?-1:0}function Ot(e){let n,t=1;for(const r of e)n&&r.name===n.name?(r.alias=`${r.name}$${t}`,n.alias||(n.alias=`${n.name}$${t-1}`),t++):n&&r.name!==n.name&&(t=1),n=r}class xt{constructor(){this.options=new Map}async writeClient(n){const{client:t,templates:a,output:o,httpClient:i,useOptions:s,useUnionTypes:l,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,request:d}=n,f=k(process.cwd(),o.output),h=o.outputCore?k(process.cwd(),o.outputCore):k(f,"core"),y=o.outputModels?k(process.cwd(),o.outputModels):k(f,"models"),g=o.outputSchemas?k(process.cwd(),o.outputSchemas):k(f,"schemas"),v=o.outputServices?k(process.cwd(),o.outputServices):k(f,"services");if(!gt(process.cwd(),o.output))throw new Error("Output folder is not a subdirectory of the current working directory");if(o.outputCore&&!gt(process.cwd(),o.outputCore))throw new Error("Output folder(core) is not a subdirectory of the current working directory");if(o.outputSchemas&&!gt(process.cwd(),o.outputSchemas))throw new Error("Output folder(schemas) is not a subdirectory of the current working directory");if(o.outputModels&&!gt(process.cwd(),o.outputModels))throw new Error("Output folder(models) is not a subdirectory of the current working directory");if(o.outputServices&&!gt(process.cwd(),o.outputServices))throw new Error("Output folder(services) is not a subdirectory of the current working directory");u&&(await Ue(h),await async function(n){const{client:t,templates:r,outputPath:a,httpClient:o,request:i}=n,s={httpClient:o,server:t.server,version:t.version};if(await Be(e.resolve(a,"OpenAPI.ts"),r.core.settings(s)),await Be(e.resolve(a,"ApiError.ts"),r.core.apiError({})),await Be(e.resolve(a,"ApiRequestOptions.ts"),r.core.apiRequestOptions({})),await Be(e.resolve(a,"ApiResult.ts"),r.core.apiResult({})),await Be(e.resolve(a,"request.ts"),r.core.request(s)),i){const n=e.resolve(process.cwd(),i);if(!await Le(n))throw new Error(`Custom request file "${n}" does not exists`);await Ne(n,e.resolve(a,"request.ts"))}}({client:t,templates:a,outputPath:h,httpClient:i,request:d})),p&&(await Ue(v),await async function(n){const{services:t,templates:r,outputPath:a,httpClient:o,useUnionTypes:i,useOptions:s,useCustomRequest:l,outputCore:u,outputModels:p}=n;for(const n of t){const t=e.resolve(a,`${n.name}.ts`),c=n.operations.some((e=>e.path.includes("OpenAPI.VERSION"))),m=r.exports.service(Object.assign(Object.assign({},n),{httpClient:o,useUnionTypes:i,useVersion:c,useOptions:s,useCustomRequest:l,outputCore:u,outputModels:p}));await Be(t,Pt(m))}}({services:t.services,templates:a,outputPath:v,httpClient:i,useUnionTypes:l,useOptions:s,useCustomRequest:!!d,outputModels:c?`${x(v,y)}/`:"../models/",outputCore:u?`${x(v,h)}/`:"../core/"})),m&&(await Ue(g),await async function(e){const{models:n,templates:t,outputPath:a,httpClient:o,useUnionTypes:i}=e;for(const e of n){const n=b(e.path);if(n){const e=k(a,n);r.mkdirSync(e,{recursive:!0})}const s=k(a,`${e.path}Schema.ts`),l=t.exports.schema(Object.assign(Object.assign({},e),{httpClient:o,useUnionTypes:i}));await Be(s,Pt(l))}}({models:t.models,templates:a,outputPath:g,httpClient:i,useUnionTypes:l})),c&&(await Ue(y),await async function(n){const{models:t,templates:a,outputPath:o,httpClient:i,useUnionTypes:s}=n;for(const n of t){const t=b(n.path);if(t){const n=e.resolve(o,t);r.mkdirSync(n,{recursive:!0})}const l=e.resolve(o,`${n.path}.ts`),u=a.exports.model(Object.assign(Object.assign({},n),{httpClient:i,useUnionTypes:s}));await Be(l,Pt(u))}}({models:t.models,templates:a,outputPath:y,httpClient:i,useUnionTypes:l})),(u||p||m||c)&&(await Ue(f),await this.writeClientIndex({client:t,templates:a,output:{output:f,outputCore:h,outputServices:v,outputModels:y,outputSchemas:g},useUnionTypes:l,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m}))}async writeClientIndex(e){const{output:n}=e,t=this.options.get(n.output);t?t.push(e):this.options.set(n.output,Array.of(e))}async combineAndWrite(){const e=new Map;for(const[n,t]of this.options.entries())for(const r of t){const{exportCore:t,output:a,exportModels:o,exportSchemas:i,exportServices:s,client:l,templates:u}=r,p=a.outputCore?k(process.cwd(),a.outputCore):k(n,"core"),c=a.outputModels?k(process.cwd(),a.outputModels):k(n,"models"),m=a.outputSchemas?k(process.cwd(),a.outputSchemas):k(n,"schemas"),d=a.outputServices?k(process.cwd(),a.outputServices):k(n,"services");let f=e.get(`${n}`);if(f||(f={templates:u,outputPath:n,core:[],models:[],schemas:[],services:[]},e.set(`${n}`,f)),t){const e=`${x(n,p)}/`,t=f.core.find((n=>n===e));t||f.core.push(e)}if(o||i){const e=`${x(n,c)}/`,t=`${x(n,m)}/`;for(const n of l.models){const a={name:n.name,alias:"",path:n.path,package:e,enum:n.enum&&n.enum.length>0,useUnionTypes:r.useUnionTypes,enums:n.enums&&n.enums.length>0};if(o){const e=f.models.find((e=>e.name===a.name&&e.path===a.path&&e.package===a.package&&e.enum===a.enum&&e.enums===a.enums&&e.useUnionTypes===a.useUnionTypes));e||f.models.push(a)}if(i){const e=Object.assign(Object.assign({},a),{package:t}),n=f.schemas.find((n=>n.name===e.name&&n.path===e.path&&n.package===e.package));n||f.schemas.push(e)}}}if(s){const e=`${x(n,d)}/`;for(const n of l.services){const t=f.services.find((t=>t.name===n.name&&t.package===e));t||f.services.push({name:n.name,package:e})}}}for(const n of e.values())n.models=n.models.filter(V).sort(bt),Ot(n.models),n.schemas=n.schemas.filter(V).sort(bt),Ot(n.schemas),await vt(n)}}async function kt({input:e,output:n,outputCore:t,outputServices:r,outputModels:a,outputSchemas:o,httpClient:i=exports.HttpClient.FETCH,useOptions:s=!1,useUnionTypes:l=!1,exportCore:u=!0,exportServices:p=!0,exportModels:c=!0,exportSchemas:m=!1,clean:d=!0,request:f,write:y=!0,interfacePrefix:g="I",enumPrefix:P="E",typePrefix:O="T"},x){const w={output:n,outputCore:t,outputServices:r,outputModels:a,outputSchemas:o},q=new R(e,w,{interface:g,enum:P,type:O}),C=v(e)?await async function(e,n){const t=k(process.cwd(),n);if(!n)throw new Error(`Could not find OpenApi spec: "${t}"`);if(!await Le(t))throw new Error(`Could not read OpenApi spec: "${t}"`);const r=new h.default;e.addRefs(await r.resolve(n));const a=Object.assign({},r.schema);let o={};for(const n of Object.entries(a.paths)){const t=n[0],r=n[1];if(r.$ref){let n=e.get(r.$ref);n=We(n,e,b(r.$ref)),o=Object.assign(o,{[t]:n})}else Object.assign(o,{[t]:r})}return r.schema=Object.assign(r.schema,{paths:o}),new Promise((e=>e(r.schema)))}(q,e):e,j=function(e){const n=e.swagger||e.openapi;if("string"==typeof n){const e=n.charAt(0),t=Number.parseInt(e);if(t===Fe.V2||t===Fe.V3)return t}throw new Error(`Unsupported Open API version: "${String(n)}"`)}(C),A=yt({httpClient:i,useUnionTypes:l,useOptions:s});switch(j){case Fe.V2:{const e=Xe(new se(q).parse(C));if(!y)break;await x.writeClient({client:e,templates:A,output:w,httpClient:i,useOptions:s,useUnionTypes:l,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,clean:d,request:f});break}case Fe.V3:{const e=Xe(new Me(q).parse(C));if(!y)break;await x.writeClient({client:e,templates:A,output:w,httpClient:i,useOptions:s,useUnionTypes:l,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,clean:d,request:f});break}}}exports.generate=async function(e){const n=Array.isArray(e)?e:Array.of(e);for(const e of n)e.output&&await _e(e.output),e.outputCore&&await _e(e.outputCore),e.outputSchemas&&await _e(e.outputSchemas),e.outputModels&&await _e(e.outputModels),e.outputServices&&await _e(e.outputServices);const t=new xt;for(const e of n)await kt(e,t);await t.combineAndWrite()};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-openapi-codegen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2-beta",
|
|
4
4
|
"description": "Library that generates Typescript clients based on the OpenAPI specification. It bases on openapi-typescript-codegen",
|
|
5
5
|
"author": "Alexey Zverev",
|
|
6
6
|
"homepage": "https://github.com/ozonophore/openapi-codegen.git",
|