@speclynx/apidom-ns-json-schema-draft-7 1.12.1
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 +82 -0
- package/LICENSE +202 -0
- package/LICENSES/AFL-3.0.txt +182 -0
- package/LICENSES/Apache-2.0.txt +202 -0
- package/LICENSES/BSD-3-Clause.txt +26 -0
- package/LICENSES/MIT.txt +9 -0
- package/NOTICE +65 -0
- package/README.md +188 -0
- package/dist/apidom-ns-json-schema-draft-7.browser.js +1 -0
- package/package.json +65 -0
- package/src/elements/JSONSchema.cjs +121 -0
- package/src/elements/JSONSchema.mjs +118 -0
- package/src/elements/LinkDescription.cjs +138 -0
- package/src/elements/LinkDescription.mjs +134 -0
- package/src/index.cjs +54 -0
- package/src/index.mjs +16 -0
- package/src/media-types.cjs +34 -0
- package/src/media-types.mjs +30 -0
- package/src/namespace.cjs +23 -0
- package/src/namespace.mjs +18 -0
- package/src/predicates.cjs +31 -0
- package/src/predicates.mjs +26 -0
- package/src/refractor/index.cjs +54 -0
- package/src/refractor/index.mjs +48 -0
- package/src/refractor/plugins/replace-empty-element.cjs +233 -0
- package/src/refractor/plugins/replace-empty-element.mjs +226 -0
- package/src/refractor/registration.cjs +13 -0
- package/src/refractor/registration.mjs +6 -0
- package/src/refractor/specification.cjs +15 -0
- package/src/refractor/specification.mjs +10 -0
- package/src/refractor/toolbox.cjs +21 -0
- package/src/refractor/toolbox.mjs +15 -0
- package/src/refractor/visitors/json-schema/index.cjs +20 -0
- package/src/refractor/visitors/json-schema/index.mjs +15 -0
- package/src/refractor/visitors/json-schema/link-description/index.cjs +17 -0
- package/src/refractor/visitors/json-schema/link-description/index.mjs +12 -0
- package/src/traversal/visitor.cjs +16 -0
- package/src/traversal/visitor.mjs +12 -0
- package/types/apidom-ns-json-schema-draft-7.d.ts +551 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Redistribution and use in source and binary forms, with or without
|
|
2
|
+
modification, are permitted provided that the following conditions are
|
|
3
|
+
met:
|
|
4
|
+
|
|
5
|
+
1. Redistributions of source code must retain the above copyright
|
|
6
|
+
notice, this list of conditions and the following disclaimer.
|
|
7
|
+
|
|
8
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
|
10
|
+
documentation and/or other materials provided with the distribution.
|
|
11
|
+
|
|
12
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
13
|
+
contributors may be used to endorse or promote products derived from
|
|
14
|
+
this software without specific prior written permission.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
17
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
18
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
19
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
20
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
21
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
22
|
+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
23
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
24
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
25
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
26
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/LICENSES/MIT.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) <year> <copyright holders>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Additional Notices for SpecLynx Distribution
|
|
2
|
+
Copyright 2025 SpecLynx
|
|
3
|
+
This distribution is known as "SpecLynx ApiDOM". It is a fork of the ApiDOM project maintained by SmartBear.
|
|
4
|
+
This distribution includes modifications by SpecLynx.
|
|
5
|
+
All such modifications are licensed under the Apache License, Version 2.0.
|
|
6
|
+
A copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt`.
|
|
7
|
+
|
|
8
|
+
ApiDOM
|
|
9
|
+
Copyright 2020 SmartBear Software Inc.
|
|
10
|
+
ApiDOM is licensed under Apache 2.0 license.
|
|
11
|
+
Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
|
|
12
|
+
|
|
13
|
+
json-schema-ref-parser
|
|
14
|
+
Copyright (c) 2015 James Messinger
|
|
15
|
+
File packages/apidom-reference/src/util/url.ts (the file) was originally created under MIT license in https://github.com/APIDevTools/json-schema-ref-parser repository.
|
|
16
|
+
The file has been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
|
|
17
|
+
Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
|
|
18
|
+
|
|
19
|
+
graphql-js
|
|
20
|
+
Copyright (c) GraphQL Contributors
|
|
21
|
+
File packages/apidom-ast/src/traversal/visitor.ts (the file) was originally created under MIT license in https://github.com/graphql/graphql-js repository.
|
|
22
|
+
The file has been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
|
|
23
|
+
Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
|
|
24
|
+
|
|
25
|
+
babel-plugin-add-import-extension
|
|
26
|
+
Copyright (c) 2019 Karl Prieb
|
|
27
|
+
File scripts/babel-plugin-add-import-extension.cjs (the file) was originally created under MIT license in https://codeberg.org/karl/babel-plugin-add-import-extension.
|
|
28
|
+
The file has been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
|
|
29
|
+
Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
|
|
30
|
+
|
|
31
|
+
refract-spec
|
|
32
|
+
Copyright (c) 2015 refractproject
|
|
33
|
+
Specific texts in README.md (the file) were originally created under MIT license in https://github.com/refractproject/refract-spec repository.
|
|
34
|
+
Specific texts have been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
|
|
35
|
+
Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
|
|
36
|
+
|
|
37
|
+
api-elements
|
|
38
|
+
Copyright (c) 2015 Apiary Inc.
|
|
39
|
+
Specific texts in README.md (the file) were originally created under MIT license in https://github.com/refractproject/refract-spec repository.
|
|
40
|
+
Specific texts have been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
|
|
41
|
+
Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
|
|
42
|
+
|
|
43
|
+
deepmerge
|
|
44
|
+
Copyright (c) 2012 James Halliday, Josh Duff, and other contributors
|
|
45
|
+
- File packages/apidom-core/src/deepmerge.ts contains algorithms that we originally created
|
|
46
|
+
in https://github.com/TehShrike/deepmerge/blob/master/index.js to handle deep merging of JavaScript Objects and Arrays.
|
|
47
|
+
These algorithms have been reverse engineered and adapted to support deep merging of ApiDOM structures.
|
|
48
|
+
- File packages/apidom-core/test/deepmerge.ts contains tests and fixtures that were originally created
|
|
49
|
+
in https://github.com/TehShrike/deepmerge/blob/master/test/merge.js to test deep merging of JavaScript Objects and Arrays.
|
|
50
|
+
These tests have been adapted to support testing deep merging of ApiDOM structures.
|
|
51
|
+
- File packages/apidom-core/README.md contains text fragments that were originally created
|
|
52
|
+
in https://github.com/TehShrike/deepmerge/blob/master/readme.md to document deepmerge library.
|
|
53
|
+
These text fragments have been amended to describe merging of ApiDOM structures.
|
|
54
|
+
Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
|
|
55
|
+
All modifications are licensed under Apache 2.0 License.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
If the SPDX-FileCopyrightText and SPDX-License-Identifier tags are not present in the file,
|
|
60
|
+
it is assumed that these tags have following implicit value:
|
|
61
|
+
|
|
62
|
+
SPDX-FileCopyrightText: Copyright 2025 SpecLynx
|
|
63
|
+
SPDX-FileCopyrightText: Copyright 2020-2021 SmartBear Software Inc.
|
|
64
|
+
SPDX-License-Identifier: Apache-2.0
|
|
65
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# @speclynx/apidom-ns-json-schema-draft-7
|
|
2
|
+
|
|
3
|
+
`@speclynx/apidom-ns-json-schema-draft-7` contains ApiDOM namespace specific to [JSON Schema Draft 7](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-01) specification.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
You can install this package via [npm CLI](https://docs.npmjs.com/cli) by running the following command:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
$ npm install @speclynx/apidom-ns-json-schema-draft-7
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## JSON Schema Draft 7 namespace
|
|
14
|
+
|
|
15
|
+
JSON Schema Draft 7 namespace consists of [number of elements](https://github.com/speclynx/apidom/tree/main/packages/apidom-ns-json-schema-draft-7/src/elements) implemented on top
|
|
16
|
+
of [primitive ones](https://github.com/refractproject/minim/tree/master/lib/primitives).
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import { createNamespace } from '@speclynx/apidom-core';
|
|
20
|
+
import jsonShemaDraft7Namespace from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
21
|
+
|
|
22
|
+
const namespace = createNamespace(jsonShemaDraft7Namespace);
|
|
23
|
+
|
|
24
|
+
const objectElement = new namespace.elements.Object();
|
|
25
|
+
const jsonSchemaElement = new namespace.elements.JSONSchemaDraft7();
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
When namespace instance is created in this way, it will extend the base namespace
|
|
29
|
+
with the namespace provided as an argument.
|
|
30
|
+
|
|
31
|
+
Elements from the namespace can also be used directly by importing them.
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
import { JSONSchemaElement, JSONReferenceElement, LinkDescriptionElement } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
35
|
+
|
|
36
|
+
const jsonSchemaElement = new JSONSchemaElement();
|
|
37
|
+
const jsonReferenceElement = new JSONReferenceElement();
|
|
38
|
+
const linkDescriptionElement = new LinkDescriptionElement();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Predicates
|
|
42
|
+
|
|
43
|
+
This package exposes [predicates](https://github.com/speclynx/apidom/blob/main/packages/apidom-ns-json-schema-draft-7/src/predicates.ts)
|
|
44
|
+
for all higher order elements that are part of this namespace.
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
import { isJSONSchemaElement, JSONSchemaElement } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
48
|
+
|
|
49
|
+
const jsonSchemaElement = new JSONSchemaElement();
|
|
50
|
+
|
|
51
|
+
isJSONSchemaElement(jsonSchemaElement); // => true
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Traversal
|
|
55
|
+
|
|
56
|
+
Traversing ApiDOM in this namespace is possible by using `visit` function from `apidom` package.
|
|
57
|
+
This package comes with its own [keyMap](https://github.com/speclynx/apidom/blob/main/packages/apidom-ns-json-schema-draft-7/src/traversal/visitor.ts#L11) and [nodeTypeGetter](https://github.com/speclynx/apidom/blob/main/packages/apidom-ns-json-schema-draft-7/src/traversal/visitor.ts#L4).
|
|
58
|
+
To learn more about these `visit` configuration options please refer to [@speclynx/apidom-ast documentation](https://github.com/speclynx/apidom/blob/main/packages/apidom-ast/README.md#visit).
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
import { visit } from '@speclynx/apidom-core';
|
|
62
|
+
import { JSONSchemaElement, keyMap, getNodeType } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
63
|
+
|
|
64
|
+
const element = new JSONSchemaElement();
|
|
65
|
+
|
|
66
|
+
const visitor = {
|
|
67
|
+
JSONSchemaDraft7Element(jsonSchemaElement) {
|
|
68
|
+
console.dir(jsonSchemaElement);
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
visit(element, visitor, { keyMap, nodeTypeGetter: getNodeType });
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Refractors
|
|
76
|
+
|
|
77
|
+
Refractor is a special layer inside the namespace that can transform either JavaScript structures
|
|
78
|
+
or generic ApiDOM structures into structures built from elements of this namespace.
|
|
79
|
+
|
|
80
|
+
**Refracting JavaScript structures**:
|
|
81
|
+
|
|
82
|
+
```js
|
|
83
|
+
import { LinkDescriptionElement } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
84
|
+
|
|
85
|
+
const object = {
|
|
86
|
+
anchor: 'nodes/{thisNodeId}',
|
|
87
|
+
anchorPointer: '#/relative/json/pointer',
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
LinkDescriptionElement.refract(object); // => LinkDescriptionElement({ anchor, anchorPointer })
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Refracting generic ApiDOM structures**:
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
import { ObjectElement } from '@speclynx/apidom-core';
|
|
97
|
+
import { LinkDescriptionElement } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
98
|
+
|
|
99
|
+
const objectElement = new ObjectElement({
|
|
100
|
+
anchor: 'nodes/{thisNodeId}',
|
|
101
|
+
anchorPointer: '#/relative/json/pointer',
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
LinkDescriptionElement.refract(objectElement); // => LinkDescriptionElement({ anchor = 'nodes/{thisNodeId}', anchorPointer = '#/relative/json/pointer' })
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Refractor plugins
|
|
108
|
+
|
|
109
|
+
Refractors can accept plugins as a second argument of refract static method.
|
|
110
|
+
|
|
111
|
+
```js
|
|
112
|
+
import { ObjectElement } from '@speclynx/apidom-core';
|
|
113
|
+
import { LinkDescriptionElement } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
114
|
+
|
|
115
|
+
const objectElement = new ObjectElement({
|
|
116
|
+
anchor: 'nodes/{thisNodeId}',
|
|
117
|
+
anchorPointer: '#/relative/json/pointer',
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const plugin = ({ predicates, namespace }) => ({
|
|
121
|
+
name: 'plugin',
|
|
122
|
+
pre() {
|
|
123
|
+
console.dir('runs before traversal');
|
|
124
|
+
},
|
|
125
|
+
visitor: {
|
|
126
|
+
LinkDescriptionElement(linkDescriptionElement) {
|
|
127
|
+
linkDescriptionElement.anchorPointer = '#/relative/json/pointer/x';
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
post() {
|
|
131
|
+
console.dir('runs after traversal');
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
LinkDescriptionElement.refract(objectElement, { plugins: [plugin] }); // => LinkDescriptionElement({ anchor = 'nodes/{thisNodeId}', anchorPointer = '#/relative/json/pointer/x' })
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
You can define as many plugins as needed to enhance the resulting namespaced ApiDOM structure.
|
|
139
|
+
If multiple plugins with the same visitor method are defined, they run in parallel (just like in Babel).
|
|
140
|
+
|
|
141
|
+
#### Replace Empty Element plugin
|
|
142
|
+
|
|
143
|
+
This plugin is specific to YAML 1.2 format, which allows defining key-value pairs with empty key,
|
|
144
|
+
empty value, or both. If the value is not provided in YAML format, this plugin compensates for
|
|
145
|
+
this missing value with the most appropriate semantic element type.
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
import { parse } from '@speclynx/apidom-parser-adapter-yaml-1-2';
|
|
149
|
+
import { refractorPluginReplaceEmptyElement, JSONSchemaElement } from '@speclynx/apidom-ns-json-schema-draft-7';
|
|
150
|
+
|
|
151
|
+
const yamlDefinition = `
|
|
152
|
+
$schema: 'https://json-schema.org/draft-07/schema#'
|
|
153
|
+
if:
|
|
154
|
+
`;
|
|
155
|
+
const apiDOM = await parse(yamlDefinition);
|
|
156
|
+
const jsonSchemaElement = JSONSchemaElement.refract(apiDOM.result, {
|
|
157
|
+
plugins: [refractorPluginReplaceEmptyElement()],
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// =>
|
|
161
|
+
// (JSONSchemaDraft7Element
|
|
162
|
+
// (MemberElement
|
|
163
|
+
// (StringElement)
|
|
164
|
+
// (StringElement))
|
|
165
|
+
// (MemberElement
|
|
166
|
+
// (StringElement)
|
|
167
|
+
// (JSONSchemaDraft7Element)))
|
|
168
|
+
|
|
169
|
+
// => without the plugin the result would be as follows:
|
|
170
|
+
// (JSONSchemaDraft7Element
|
|
171
|
+
// (MemberElement
|
|
172
|
+
// (StringElement)
|
|
173
|
+
// (StringElement))
|
|
174
|
+
// (MemberElement
|
|
175
|
+
// (StringElement)
|
|
176
|
+
// (StringElement)))
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Implementation progress
|
|
180
|
+
|
|
181
|
+
Only fully implemented specification objects should be checked here.
|
|
182
|
+
|
|
183
|
+
- [x] [JSON Schema Object](https://tools.ietf.org/html/draft-handrews-json-schema-01)
|
|
184
|
+
- [x] [JSON Reference Object](https://datatracker.ietf.org/doc/html/draft-pbryan-zyp-json-ref-03)
|
|
185
|
+
- [x] [Link Description Object](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apidomNsJSONSchemaDraft7=t():e.apidomNsJSONSchemaDraft7=t()}(self,()=>(()=>{var e={88:(e,t,n)=>{var r=n(4700);e.exports=function(e){return r(this,e).get(e)}},155:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},195:(e,t,n)=>{var r=n(4882),s=n(8121),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return s(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},353:(e,t,n)=>{var r=n(1340),s=n(3934),i=n(8861),o=n(1182),c=n(8486),a=n(3142),u=n(5853),l=n(8666),h="[object Arguments]",f="[object Array]",p="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,y,v){var g=a(e),b=a(t),j=g?f:c(e),E=b?f:c(t),S=(j=j==h?p:j)==p,O=(E=E==h?p:E)==p,w=j==E;if(w&&u(e)){if(!u(t))return!1;g=!0,S=!1}if(w&&!S)return v||(v=new r),g||l(e)?s(e,t,n,d,y,v):i(e,t,j,n,d,y,v);if(!(1&n)){var x=S&&m.call(e,"__wrapped__"),k=O&&m.call(t,"__wrapped__");if(x||k){var A=x?e.value():e,P=k?t.value():t;return v||(v=new r),y(A,P,n,d,v)}}return!!w&&(v||(v=new r),o(e,t,n,d,y,v))}},358:(e,t,n)=>{var r=n(6137),s=n(3283),i=n(3142),o=n(5853),c=n(9632),a=n(8666),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&s(e),h=!n&&!l&&o(e),f=!n&&!l&&!h&&a(e),p=n||l||h||f,m=p?r(e.length,String):[],d=m.length;for(var y in e)!t&&!u.call(e,y)||p&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||c(y,d))||m.push(y);return m}},393:(e,t,n)=>{var r=n(8244),s=n(7979),i=n(1211);e.exports=function(e){return r(e,i,s)}},394:e=>{e.exports=class{constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};e._meta&&e._meta.length>0&&(t.meta=this.serialiseObject(e.meta)),e._attributes&&e._attributes.length>0&&(t.attributes=this.serialiseObject(e.attributes));const n=this.serialiseContent(e.content);return void 0!==n&&(t.content=n),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));t.element!==e.element&&(t.element=e.element),e.meta&&this.deserialiseObject(e.meta,t.meta),e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const n=this.deserialiseContent(e.content);return void 0===n&&null!==t.content||(t.content=n),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}if(e&&e.map){if(0===e.length)return;return e.map(this.serialise,this)}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(e.map)return e.map(this.deserialise,this)}return e}serialiseObject(e){const t={};if(e.forEach((e,n)=>{e&&(t[n.toValue()]=this.serialise(e))}),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach(n=>{t.set(n,this.deserialise(e[n]))})}}},547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},593:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e||[],t,n),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}}},674:(e,t,n)=>{var r=n(7379),s=n(5387),i=n(547),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&s(e.length)&&!!o[r(e)]}},986:(e,t,n)=>{var r=n(7379),s=n(547);e.exports=function(e){return"number"==typeof e||s(e)&&"[object Number]"==r(e)}},1112:(e,t,n)=>{var r=n(4497),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return s.call(t,e)?t[e]:void 0}},1129:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}},1182:(e,t,n)=>{var r=n(393),s=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,o,c){var a=1&n,u=r(e),l=u.length;if(l!=r(t).length&&!a)return!1;for(var h=l;h--;){var f=u[h];if(!(a?f in t:s.call(t,f)))return!1}var p=c.get(e),m=c.get(t);if(p&&m)return p==t&&m==e;var d=!0;c.set(e,t),c.set(t,e);for(var y=a;++h<l;){var v=e[f=u[h]],g=t[f];if(i)var b=a?i(g,v,f,t,e,c):i(v,g,f,e,t,c);if(!(void 0===b?v===g||o(v,g,n,i,c):b)){d=!1;break}y||(y="constructor"==f)}if(d&&!y){var j=e.constructor,E=t.constructor;j==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof j&&j instanceof j&&"function"==typeof E&&E instanceof E||(d=!1)}return c.delete(e),c.delete(t),d}},1211:(e,t,n)=>{var r=n(358),s=n(195),i=n(6529);e.exports=function(e){return i(e)?r(e):s(e)}},1340:(e,t,n)=>{var r=n(1386),s=n(4103),i=n(1779),o=n(4162),c=n(7462),a=n(6638);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=s,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=c,u.prototype.set=a,e.exports=u},1386:(e,t,n)=>{var r=n(2393),s=n(2049),i=n(7144),o=n(7452),c=n(3964);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=s,a.prototype.get=i,a.prototype.has=o,a.prototype.set=c,e.exports=a},1517:e=>{e.exports=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}},1580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1623:(e,t,n)=>{var r=n(8942).Uint8Array;e.exports=r},1779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},1877:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1950:(e,t,n)=>{var r=n(8942)["__core-js_shared__"];e.exports=r},2049:(e,t,n)=>{var r=n(7034),s=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():s.call(t,n,1),--this.size,!0)}},2306:(e,t,n)=>{e=n.nmd(e);var r=n(4967),s=t&&!t.nodeType&&t,i=s&&e&&!e.nodeType&&e,o=i&&i.exports===s&&r.process,c=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=c},2322:e=>{class t{constructor(e,t){this.key=e,this.value=t}clone(){const e=new t;return this.key&&(e.key=this.key.clone()),this.value&&(e.value=this.value.clone()),e}}e.exports=t},2393:e=>{e.exports=function(){this.__data__=[],this.size=0}},2536:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e,t,n),this.element="number"}primitive(){return"number"}}},2555:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e,t,n),this.element="boolean"}primitive(){return"boolean"}}},2563:(e,t,n)=>{var r=n(7379),s=n(547);e.exports=function(e){return!0===e||!1===e||s(e)&&"[object Boolean]"==r(e)}},3004:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e||null,t,n),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}},3103:(e,t,n)=>{var r=n(4715)(n(8942),"DataView");e.exports=r},3142:e=>{var t=Array.isArray;e.exports=t},3148:(e,t,n)=>{const r=n(394);e.exports=class extends r{serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);let t;e._attributes&&e.attributes.get("variable")&&(t=e.attributes.get("variable"));const n={element:e.element};e._meta&&e._meta.length>0&&(n.meta=this.serialiseObject(e.meta));const r="enum"===e.element||-1!==e.attributes.keys().indexOf("enumerations");if(r){const t=this.enumSerialiseAttributes(e);t&&(n.attributes=t)}else if(e._attributes&&e._attributes.length>0){let{attributes:r}=e;r.get("metadata")&&(r=r.clone(),r.set("meta",r.get("metadata")),r.remove("metadata")),"member"===e.element&&t&&(r=r.clone(),r.remove("variable")),r.length>0&&(n.attributes=this.serialiseObject(r))}if(r)n.content=this.enumSerialiseContent(e,n);else if(this[`${e.element}SerialiseContent`])n.content=this[`${e.element}SerialiseContent`](e,n);else if(void 0!==e.content){let r;t&&e.content.key?(r=e.content.clone(),r.key.attributes.set("variable",t),r=this.serialiseContent(r)):r=this.serialiseContent(e.content),this.shouldSerialiseContent(e,r)&&(n.content=r)}else this.shouldSerialiseContent(e,e.content)&&e instanceof this.namespace.elements.Array&&(n.content=[]);return n}shouldSerialiseContent(e,t){return"parseResult"===e.element||"httpRequest"===e.element||"httpResponse"===e.element||"category"===e.element||"link"===e.element||void 0!==t&&(!Array.isArray(t)||0!==t.length)}refSerialiseContent(e,t){return delete t.attributes,{href:e.toValue(),path:e.path.toValue()}}sourceMapSerialiseContent(e){return e.toValue()}dataStructureSerialiseContent(e){return[this.serialiseContent(e.content)]}enumSerialiseAttributes(e){const t=e.attributes.clone(),n=t.remove("enumerations")||new this.namespace.elements.Array([]),r=t.get("default");let s=t.get("samples")||new this.namespace.elements.Array([]);if(r&&r.content&&(r.content.attributes&&r.content.attributes.remove("typeAttributes"),t.set("default",new this.namespace.elements.Array([r.content]))),s.forEach(e=>{e.content&&e.content.element&&e.content.attributes.remove("typeAttributes")}),e.content&&0!==n.length&&s.unshift(e.content),s=s.map(e=>e instanceof this.namespace.elements.Array?[e]:new this.namespace.elements.Array([e.content])),s.length&&t.set("samples",s),t.length>0)return this.serialiseObject(t)}enumSerialiseContent(e){if(e._attributes){const t=e.attributes.get("enumerations");if(t&&t.length>0)return t.content.map(e=>{const t=e.clone();return t.attributes.remove("typeAttributes"),this.serialise(t)})}if(e.content){const t=e.content.clone();return t.attributes.remove("typeAttributes"),[this.serialise(t)]}return[]}deserialise(e){if("string"==typeof e)return new this.namespace.elements.String(e);if("number"==typeof e)return new this.namespace.elements.Number(e);if("boolean"==typeof e)return new this.namespace.elements.Boolean(e);if(null===e)return new this.namespace.elements.Null;if(Array.isArray(e))return new this.namespace.elements.Array(e.map(this.deserialise,this));const t=this.namespace.getElementClass(e.element),n=new t;n.element!==e.element&&(n.element=e.element),e.meta&&this.deserialiseObject(e.meta,n.meta),e.attributes&&this.deserialiseObject(e.attributes,n.attributes);const r=this.deserialiseContent(e.content);if(void 0===r&&null!==n.content||(n.content=r),"enum"===n.element){n.content&&n.attributes.set("enumerations",n.content);let e=n.attributes.get("samples");if(n.attributes.remove("samples"),e){const r=e;e=new this.namespace.elements.Array,r.forEach(r=>{r.forEach(r=>{const s=new t(r);s.element=n.element,e.push(s)})});const s=e.shift();n.content=s?s.content:void 0,n.attributes.set("samples",e)}else n.content=void 0;let r=n.attributes.get("default");if(r&&r.length>0){r=r.get(0);const e=new t(r);e.element=n.element,n.attributes.set("default",e)}}else if("dataStructure"===n.element&&Array.isArray(n.content))[n.content]=n.content;else if("category"===n.element){const e=n.attributes.get("meta");e&&(n.attributes.set("metadata",e),n.attributes.remove("meta"))}else"member"===n.element&&n.key&&n.key._attributes&&n.key._attributes.getValue("variable")&&(n.attributes.set("variable",n.key.attributes.get("variable")),n.key.attributes.remove("variable"));return n}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}return e&&e.map?e.map(this.serialise,this):e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(e.map)return e.map(this.deserialise,this)}return e}shouldRefract(e){return!!(e._attributes&&e.attributes.keys().length||e._meta&&e.meta.keys().length)||"enum"!==e.element&&(e.element!==e.primitive()||"member"===e.element)}convertKeyToRefract(e,t){return this.shouldRefract(t)?this.serialise(t):"enum"===t.element?this.serialiseEnum(t):"array"===t.element?t.map(t=>this.shouldRefract(t)||"default"===e?this.serialise(t):"array"===t.element||"object"===t.element||"enum"===t.element?t.children.map(e=>this.serialise(e)):t.toValue()):"object"===t.element?(t.content||[]).map(this.serialise,this):t.toValue()}serialiseEnum(e){return e.children.map(e=>this.serialise(e))}serialiseObject(e){const t={};return e.forEach((e,n)=>{if(e){const r=n.toValue();t[r]=this.convertKeyToRefract(r,e)}}),t}deserialiseObject(e,t){Object.keys(e).forEach(n=>{t.set(n,this.deserialise(e[n]))})}}},3212:(e,t,n)=>{var r=n(8250),s=n(1877),i=n(8006);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=s,o.prototype.has=i,e.exports=o},3283:(e,t,n)=>{var r=n(6027),s=n(547),i=Object.prototype,o=i.hasOwnProperty,c=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(e){return s(e)&&o.call(e,"callee")&&!c.call(e,"callee")};e.exports=a},3305:(e,t,n)=>{var r=n(4497);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3311:(e,t,n)=>{const r=n(1517),s=n(4123);class i extends s{map(e,t){return this.elements.map(n=>e.bind(t)(n.value,n.key,n))}filter(e,t){return new i(this.elements.filter(n=>e.bind(t)(n.value,n.key,n)))}reject(e,t){return this.filter(r(e.bind(t)))}forEach(e,t){return this.elements.forEach((n,r)=>{e.bind(t)(n.value,n.key,n,r)})}keys(){return this.map((e,t)=>t.toValue())}values(){return this.map(e=>e.toValue())}}e.exports=i},3655:(e,t,n)=>{var r=n(7379),s=n(1580);e.exports=function(e){if(!s(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3766:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},3934:(e,t,n)=>{var r=n(3212),s=n(6465),i=n(5568);e.exports=function(e,t,n,o,c,a){var u=1&n,l=e.length,h=t.length;if(l!=h&&!(u&&h>l))return!1;var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=-1,d=!0,y=2&n?new r:void 0;for(a.set(e,t),a.set(t,e);++m<l;){var v=e[m],g=t[m];if(o)var b=u?o(g,v,m,t,e,a):o(v,g,m,e,t,a);if(void 0!==b){if(b)continue;d=!1;break}if(y){if(!s(t,function(e,t){if(!i(y,t)&&(v===e||c(v,e,n,o,a)))return y.push(t)})){d=!1;break}}else if(v!==g&&!c(v,g,n,o,a)){d=!1;break}}return a.delete(e),a.delete(t),d}},3964:(e,t,n)=>{var r=n(7034);e.exports=function(e,t){var n=this.__data__,s=r(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this}},4066:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},4103:(e,t,n)=>{var r=n(1386);e.exports=function(){this.__data__=new r,this.size=0}},4123:(e,t,n)=>{const r=n(1517);function s(e){return"string"==typeof e?t=>t.element===e:e.constructor&&e.extend?t=>t instanceof e:e}class i{constructor(e){this.elements=e||[]}toValue(){return this.elements.map(e=>e.toValue())}map(e,t){return this.elements.map(e,t)}flatMap(e,t){return this.map(e,t).reduce((e,t)=>e.concat(t),[])}compactMap(e,t){const n=[];return this.forEach(r=>{const s=e.bind(t)(r);s&&n.push(s)}),n}filter(e,t){return e=s(e),new i(this.elements.filter(e,t))}reject(e,t){return e=s(e),new i(this.elements.filter(r(e),t))}find(e,t){return e=s(e),this.elements.find(e,t)}forEach(e,t){this.elements.forEach(e,t)}reduce(e,t){return this.elements.reduce(e,t)}includes(e){return this.elements.some(t=>t.equals(e))}shift(){return this.elements.shift()}unshift(e){this.elements.unshift(this.refract(e))}push(e){return this.elements.push(this.refract(e)),this}add(e){this.push(e)}get(e){return this.elements[e]}getValue(e){const t=this.elements[e];if(t)return t.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}"undefined"!=typeof Symbol&&(i.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()}),e.exports=i},4162:e=>{e.exports=function(e){return this.__data__.get(e)}},4497:(e,t,n)=>{var r=n(4715)(Object,"create");e.exports=r},4512:(e,t,n)=>{var r=n(4715)(n(8942),"Set");e.exports=r},4687:(e,t,n)=>{var r=n(353),s=n(547);e.exports=function e(t,n,i,o,c){return t===n||(null==t||null==n||!s(t)&&!s(n)?t!=t&&n!=n:r(t,n,i,o,e,c))}},4700:(e,t,n)=>{var r=n(9067);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},4715:(e,t,n)=>{var r=n(9624),s=n(155);e.exports=function(e,t){var n=s(e,t);return r(n)?n:void 0}},4732:(e,t,n)=>{var r=n(4700);e.exports=function(e){return r(this,e).has(e)}},4759:(e,t,n)=>{var r,s=n(1950),i=(r=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},4772:e=>{e.exports=function(){return!1}},4882:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},4967:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},5071:(e,t,n)=>{var r=n(4497);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5098:(e,t,n)=>{var r=n(3305),s=n(9361),i=n(1112),o=n(5276),c=n(5071);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=s,a.prototype.get=i,a.prototype.has=o,a.prototype.set=c,e.exports=a},5276:(e,t,n)=>{var r=n(4497),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:s.call(t,e)}},5387:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5568:e=>{e.exports=function(e,t){return e.has(t)}},5642:(e,t,n)=>{const r=n(1517),s=n(1580),i=n(9796),o=n(7309),c=n(3311);e.exports=class extends i{constructor(e,t,n){super(e||[],t,n),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e),{})}get(e){const t=this.getMember(e);if(t)return t.value}getMember(e){if(void 0!==e)return this.content.find(t=>t.key.toValue()===e)}remove(e){let t=null;return this.content=this.content.filter(n=>n.key.toValue()!==e||(t=n,!1)),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if(s(e))return Object.keys(e).forEach(t=>{this.set(t,e[t])}),this;const n=e,r=this.getMember(n);return r?r.value=t:this.content.push(new o(n,t)),this}keys(){return this.content.map(e=>e.key.toValue())}values(){return this.content.map(e=>e.value.toValue())}hasKey(e){return this.content.some(t=>t.key.equals(e))}items(){return this.content.map(e=>[e.key.toValue(),e.value.toValue()])}map(e,t){return this.content.map(n=>e.bind(t)(n.value,n.key,n))}compactMap(e,t){const n=[];return this.forEach((r,s,i)=>{const o=e.bind(t)(r,s,i);o&&n.push(o)}),n}filter(e,t){return new c(this.content).filter(e,t)}reject(e,t){return this.filter(r(e),t)}forEach(e,t){return this.content.forEach(n=>e.bind(t)(n.value,n.key,n))}}},5650:(e,t,n)=>{var r=n(8942).Symbol;e.exports=r},5681:(e,t,n)=>{var r=n(4700);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},5735:(e,t,n)=>{const r=n(9310),s=n(8138),i=n(986),o=n(2563),c=n(1580),a=n(394),u=n(7547);class l{constructor(e){this.elementMap={},this.elementDetection=[],this.Element=u.Element,this.KeyValuePair=u.KeyValuePair,e&&e.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",u.NullElement).register("string",u.StringElement).register("number",u.NumberElement).register("boolean",u.BooleanElement).register("array",u.ArrayElement).register("object",u.ObjectElement).register("member",u.MemberElement).register("ref",u.RefElement).register("link",u.LinkElement),this.detect(r,u.NullElement,!1).detect(s,u.StringElement,!1).detect(i,u.NumberElement,!1).detect(o,u.BooleanElement,!1).detect(Array.isArray,u.ArrayElement,!1).detect(c,u.ObjectElement,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,n){return void 0===n||n?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(let n=0;n<this.elementDetection.length;n+=1){const r=this.elementDetection[n][0],s=this.elementDetection[n][1];if(r(e)){t=new s(e);break}}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(e=>{const t=e[0].toUpperCase()+e.substr(1);this._elements[t]=this.elementMap[e]})),this._elements}get serialiser(){return new a(this)}}a.prototype.Namespace=l,e.exports=l},5853:(e,t,n)=>{e=n.nmd(e);var r=n(8942),s=n(4772),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,c=o&&o.exports===i?r.Buffer:void 0,a=(c?c.isBuffer:void 0)||s;e.exports=a},5894:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},6027:(e,t,n)=>{var r=n(7379),s=n(547);e.exports=function(e){return s(e)&&"[object Arguments]"==r(e)}},6137:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},6285:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},6343:(e,t,n)=>{var r=n(4687);e.exports=function(e,t){return r(e,t)}},6465:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6529:(e,t,n)=>{var r=n(3655),s=n(5387);e.exports=function(e){return null!=e&&s(e.length)&&!r(e)}},6638:(e,t,n)=>{var r=n(1386),s=n(9770),i=n(8250);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!s||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(o)}return n.set(e,t),this.size=n.size,this}},7034:(e,t,n)=>{var r=n(6285);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},7144:(e,t,n)=>{var r=n(7034);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7309:(e,t,n)=>{const r=n(2322),s=n(8631);e.exports=class extends s{constructor(e,t,n,s){super(new r,n,s),this.element="member",this.key=e,this.value=t}get key(){return this.content.key}set key(e){this.content.key=this.refract(e)}get value(){return this.content.value}set value(e){this.content.value=this.refract(e)}}},7379:(e,t,n)=>{var r=n(5650),s=n(8870),i=n(9005),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?s(e):i(e)}},7452:(e,t,n)=>{var r=n(7034);e.exports=function(e){return r(this.__data__,e)>-1}},7462:e=>{e.exports=function(e){return this.__data__.has(e)}},7547:(e,t,n)=>{const r=n(8631),s=n(3004),i=n(8712),o=n(2536),c=n(2555),a=n(9796),u=n(7309),l=n(5642),h=n(9620),f=n(593),p=n(4123),m=n(3311),d=n(2322);function y(e){if(e instanceof r)return e;if("string"==typeof e)return new i(e);if("number"==typeof e)return new o(e);if("boolean"==typeof e)return new c(e);if(null===e)return new s;if(Array.isArray(e))return new a(e.map(y));if("object"==typeof e){return new l(e)}return e}r.prototype.ObjectElement=l,r.prototype.RefElement=f,r.prototype.MemberElement=u,r.prototype.refract=y,p.prototype.refract=y,e.exports={Element:r,NullElement:s,StringElement:i,NumberElement:o,BooleanElement:c,ArrayElement:a,MemberElement:u,ObjectElement:l,LinkElement:h,RefElement:f,refract:y,ArraySlice:p,ObjectSlice:m,KeyValuePair:d}},7979:(e,t,n)=>{var r=n(9847),s=n(9306),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,c=o?function(e){return null==e?[]:(e=Object(e),r(o(e),function(t){return i.call(e,t)}))}:s;e.exports=c},8006:e=>{e.exports=function(e){return this.__data__.has(e)}},8121:(e,t,n)=>{var r=n(3766)(Object.keys,Object);e.exports=r},8138:(e,t,n)=>{var r=n(7379),s=n(3142),i=n(547);e.exports=function(e){return"string"==typeof e||!s(e)&&i(e)&&"[object String]"==r(e)}},8244:(e,t,n)=>{var r=n(1129),s=n(3142);e.exports=function(e,t,n){var i=t(e);return s(e)?i:r(i,n(e))}},8250:(e,t,n)=>{var r=n(9753),s=n(5681),i=n(88),o=n(4732),c=n(9068);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=s,a.prototype.get=i,a.prototype.has=o,a.prototype.set=c,e.exports=a},8326:(e,t,n)=>{const r=n(5735),s=n(7547);t.g$=r,t.KeyValuePair=n(2322),t.G6=s.ArraySlice,t.ot=s.ObjectSlice,t.Hg=s.Element,t.Om=s.StringElement,t.kT=s.NumberElement,t.bd=s.BooleanElement,t.Os=s.NullElement,t.wE=s.ArrayElement,t.Sh=s.ObjectElement,t.Pr=s.MemberElement,t.sI=s.RefElement,t.Ft=s.LinkElement,t.e=s.refract,n(394),n(3148)},8486:(e,t,n)=>{var r=n(3103),s=n(9770),i=n(9413),o=n(4512),c=n(9270),a=n(7379),u=n(4066),l="[object Map]",h="[object Promise]",f="[object Set]",p="[object WeakMap]",m="[object DataView]",d=u(r),y=u(s),v=u(i),g=u(o),b=u(c),j=a;(r&&j(new r(new ArrayBuffer(1)))!=m||s&&j(new s)!=l||i&&j(i.resolve())!=h||o&&j(new o)!=f||c&&j(new c)!=p)&&(j=function(e){var t=a(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case d:return m;case y:return l;case v:return h;case g:return f;case b:return p}return t}),e.exports=j},8631:(e,t,n)=>{const r=n(6343),s=n(2322),i=n(4123);class o{constructor(e,t,n){t&&(this.meta=t),n&&(this.attributes=n),this.content=e}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach(e=>{e.parent=this,e.freeze()},this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const e=new this.constructor;return e.element=this.element,this.meta.length&&(e._meta=this.meta.clone()),this.attributes.length&&(e._attributes=this.attributes.clone()),this.content?this.content.clone?e.content=this.content.clone():Array.isArray(this.content)?e.content=this.content.map(e=>e.clone()):e.content=this.content:e.content=this.content,e}toValue(){return this.content instanceof o?this.content.toValue():this.content instanceof s?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map(e=>e.toValue(),this):this.content}toRef(e){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const t=new this.RefElement(this.id.toValue());return e&&(t.path=e),t}findRecursive(...e){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const t=e.pop();let n=new i;const r=(e,t)=>(e.push(t),e),o=(e,n)=>{n.element===t&&e.push(n);const i=n.findRecursive(t);return i&&i.reduce(r,e),n.content instanceof s&&(n.content.key&&o(e,n.content.key),n.content.value&&o(e,n.content.value)),e};return this.content&&(this.content.element&&o(n,this.content),Array.isArray(this.content)&&this.content.reduce(o,n)),e.isEmpty||(n=n.filter(t=>{let n=t.parents.map(e=>e.element);for(const t in e){const r=e[t],s=n.indexOf(r);if(-1===s)return!1;n=n.splice(0,s)}return!0})),n}set(e){return this.content=e,this}equals(e){return r(this.toValue(),e)}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}get element(){return this._storedElement||"element"}set element(e){this._storedElement=e}get content(){return this._content}set content(e){if(e instanceof o)this._content=e;else if(e instanceof i)this.content=e.elements;else if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"null"===e||null==e)this._content=e;else if(e instanceof s)this._content=e;else if(Array.isArray(e))this._content=e.map(this.refract);else{if("object"!=typeof e)throw new Error("Cannot set content to given value");this._content=Object.keys(e).map(t=>new this.MemberElement(t,e[t]))}}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof this.ObjectElement?this._meta=e:this.meta.set(e||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof this.ObjectElement?this._attributes=e:this.attributes.set(e||{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get title(){return this.getMetaProperty("title","")}set title(e){this.setMetaProperty("title",e)}get description(){return this.getMetaProperty("description","")}set description(e){this.setMetaProperty("description",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:e}=this;const t=new i;for(;e;)t.push(e),e=e.parent;return t}get children(){if(Array.isArray(this.content))return new i(this.content);if(this.content instanceof s){const e=new i([this.content.key]);return this.content.value&&e.push(this.content.value),e}return this.content instanceof o?new i([this.content]):new i}get recursiveChildren(){const e=new i;return this.children.forEach(t=>{e.push(t),t.recursiveChildren.forEach(t=>{e.push(t)})}),e}}e.exports=o},8666:(e,t,n)=>{var r=n(674),s=n(9460),i=n(2306),o=i&&i.isTypedArray,c=o?s(o):r;e.exports=c},8712:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e,t,n),this.element="string"}primitive(){return"string"}get length(){return this.content.length}}},8861:(e,t,n)=>{var r=n(5650),s=n(1623),i=n(6285),o=n(3934),c=n(5894),a=n(9828),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,h,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new s(e),new s(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=c;case"[object Set]":var m=1&r;if(p||(p=a),e.size!=t.size&&!m)return!1;var d=f.get(e);if(d)return d==t;r|=2,f.set(e,t);var y=o(p(e),p(t),r,u,h,f);return f.delete(e),y;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},8870:(e,t,n)=>{var r=n(5650),s=Object.prototype,i=s.hasOwnProperty,o=s.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var s=o.call(e);return r&&(t?e[c]=n:delete e[c]),s}},8942:(e,t,n)=>{var r=n(4967),s="object"==typeof self&&self&&self.Object===Object&&self,i=r||s||Function("return this")();e.exports=i},9005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9067:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},9068:(e,t,n)=>{var r=n(4700);e.exports=function(e,t){var n=r(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this}},9270:(e,t,n)=>{var r=n(4715)(n(8942),"WeakMap");e.exports=r},9306:e=>{e.exports=function(){return[]}},9310:e=>{e.exports=function(e){return null===e}},9361:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},9413:(e,t,n)=>{var r=n(4715)(n(8942),"Promise");e.exports=r},9460:e=>{e.exports=function(e){return function(t){return e(t)}}},9620:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e||[],t,n),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}}},9624:(e,t,n)=>{var r=n(3655),s=n(4759),i=n(1580),o=n(4066),c=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,l=a.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||s(e))&&(r(e)?f:c).test(o(e))}},9632:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},9753:(e,t,n)=>{var r=n(5098),s=n(1386),i=n(9770);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||s),string:new r}}},9770:(e,t,n)=>{var r=n(4715)(n(8942),"Map");e.exports=r},9796:(e,t,n)=>{const r=n(1517),s=n(8631),i=n(4123);class o extends s{constructor(e,t,n){super(e||[],t,n),this.element="array"}primitive(){return"array"}get(e){return this.content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}getIndex(e){return this.content[e]}set(e,t){return this.content[e]=this.refract(t),this}remove(e){const t=this.content.splice(e,1);return t.length?t[0]:null}map(e,t){return this.content.map(e,t)}flatMap(e,t){return this.map(e,t).reduce((e,t)=>e.concat(t),[])}compactMap(e,t){const n=[];return this.forEach(r=>{const s=e.bind(t)(r);s&&n.push(s)}),n}filter(e,t){return new i(this.content.filter(e,t))}reject(e,t){return this.filter(r(e),t)}reduce(e,t){let n,r;void 0!==t?(n=0,r=this.refract(t)):(n=1,r="object"===this.primitive()?this.first.value:this.first);for(let t=n;t<this.length;t+=1){const n=this.content[t];r="object"===this.primitive()?this.refract(e(r,n.value,n.key,n,this)):this.refract(e(r,n,t,this))}return r}forEach(e,t){this.content.forEach((n,r)=>{e.bind(t)(n,this.refract(r))})}shift(){return this.content.shift()}unshift(e){this.content.unshift(this.refract(e))}push(e){return this.content.push(this.refract(e)),this}add(e){this.push(e)}findElements(e,t){const n=t||{},r=!!n.recursive,s=void 0===n.results?[]:n.results;return this.forEach((t,n,i)=>{r&&void 0!==t.findElements&&t.findElements(e,{results:s,recursive:r}),e(t,n,i)&&s.push(t)}),s}find(e){return new i(this.findElements(e,{recursive:!0}))}findByElement(e){return this.find(t=>t.element===e)}findByClass(e){return this.find(t=>t.classes.includes(e))}getById(e){return this.find(t=>t.id.toValue()===e).first}includes(e){return this.content.some(t=>t.equals(e))}contains(e){return this.includes(e)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(e){return new this.constructor(this.content.concat(e.content))}"fantasy-land/concat"(e){return this.concat(e)}"fantasy-land/map"(e){return new this.constructor(this.map(e))}"fantasy-land/chain"(e){return this.map(t=>e(t),this).reduce((e,t)=>e.concat(t),this.empty())}"fantasy-land/filter"(e){return new this.constructor(this.content.filter(e))}"fantasy-land/reduce"(e,t){return this.content.reduce(e,t)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}o.empty=function(){return new this},o["fantasy-land/empty"]=o.empty,"undefined"!=typeof Symbol&&(o.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()}),e.exports=o},9828:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},9847:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[s++]=o)}return i}}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";n.r(r),n.d(r,{AlternatingVisitor:()=>qs,FallbackVisitor:()=>gr,FixedFieldsVisitor:()=>Ur,JSONReferenceElement:()=>Rn,JSONSchemaDraft7MediaTypes:()=>_e,JSONSchemaElement:()=>Ei,JSONSchemaVisitor:()=>Ai,LinkDescriptionElement:()=>Si,LinkDescriptionVisitor:()=>Pi,MapVisitor:()=>os,ParentSchemaAwareVisitor:()=>Kr,PatternedFieldsVisitor:()=>is,SpecificationVisitor:()=>Gr,Visitor:()=>vr,createRefractor:()=>Ji,default:()=>Oi,getNodeType:()=>Hs,isArrayElement:()=>ue,isBooleanElement:()=>ce,isElement:()=>re,isJSONReferenceElement:()=>Wr,isJSONReferenceLikeElement:()=>es,isJSONSchemaElement:()=>Ni,isLinkDescriptionElement:()=>Ti,isLinkElement:()=>he,isMemberElement:()=>le,isNullElement:()=>oe,isNumberElement:()=>ie,isObjectElement:()=>ae,isRefElement:()=>fe,isStringElement:()=>se,keyMap:()=>_i,mediaTypes:()=>Ne,refract:()=>Di,refractorPluginReplaceEmptyElement:()=>ki,specificationObj:()=>Mi});var e={};n.r(e),n.d(e,{hasElementSourceMap:()=>ge,includesClasses:()=>je,includesSymbols:()=>be,isAnnotationElement:()=>pe,isArrayElement:()=>ue,isBooleanElement:()=>ce,isCommentElement:()=>me,isElement:()=>re,isLinkElement:()=>he,isMemberElement:()=>le,isNullElement:()=>oe,isNumberElement:()=>ie,isObjectElement:()=>ae,isParseResultElement:()=>de,isPrimitiveElement:()=>ve,isRefElement:()=>fe,isSourceMapElement:()=>ye,isStringElement:()=>se});var t={};n.r(t),n.d(t,{isJSONReferenceElement:()=>Wr,isJSONSchemaElement:()=>Hr,isLinkDescriptionElement:()=>Yr,isMediaElement:()=>Xr});var s={};n.r(s),n.d(s,{isJSONReferenceElement:()=>Wr,isJSONSchemaElement:()=>di,isLinkDescriptionElement:()=>yi,isMediaElement:()=>Xr});var i={};n.r(i),n.d(i,{isJSONReferenceElement:()=>Wr,isJSONSchemaElement:()=>Ni,isLinkDescriptionElement:()=>Ti});var o=n(8326);function c(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function a(e){return function t(n){return 0===arguments.length||c(n)?t:e.apply(this,arguments)}}function u(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return c(n)?t:a(function(t){return e(n,t)});default:return c(n)&&c(r)?t:c(n)?a(function(t){return e(t,r)}):c(r)?a(function(t){return e(n,t)}):e(n,r)}}}const l=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function h(e,t,n){return function(){if(0===arguments.length)return n();var r=arguments[arguments.length-1];if(!l(r)){for(var s=0;s<e.length;){if("function"==typeof r[e[s]])return r[e[s]].apply(r,Array.prototype.slice.call(arguments,0,-1));s+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(r))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(r)}return n.apply(this,arguments)}}function f(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const p=function(){return this.xf["@@transducer/init"]()},m=function(e){return this.xf["@@transducer/result"](e)};var d=function(){function e(e,t){this.xf=t,this.f=e,this.all=!0}return e.prototype["@@transducer/init"]=p,e.prototype["@@transducer/result"]=function(e){return this.all&&(e=this.xf["@@transducer/step"](e,!0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)||(this.all=!1,e=f(this.xf["@@transducer/step"](e,!1))),e},e}();function y(e){return function(t){return new d(e,t)}}const v=u(h(["all"],y,function(e,t){for(var n=0;n<t.length;){if(!e(t[n]))return!1;n+=1}return!0}));function g(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,s){return t.apply(this,arguments)};case 5:return function(e,n,r,s,i){return t.apply(this,arguments)};case 6:return function(e,n,r,s,i,o){return t.apply(this,arguments)};case 7:return function(e,n,r,s,i,o,c){return t.apply(this,arguments)};case 8:return function(e,n,r,s,i,o,c,a){return t.apply(this,arguments)};case 9:return function(e,n,r,s,i,o,c,a,u){return t.apply(this,arguments)};case 10:return function(e,n,r,s,i,o,c,a,u,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function b(e,t,n){return function(){for(var r=[],s=0,i=e,o=0,a=!1;o<t.length||s<arguments.length;){var u;o<t.length&&(!c(t[o])||s>=arguments.length)?u=t[o]:(u=arguments[s],s+=1),r[o]=u,c(u)?a=!0:i-=1,o+=1}return!a&&i<=0?n.apply(this,r):g(Math.max(0,i),b(e,r,n))}}const j=u(function(e,t){return 1===e?a(t):g(e,b(e,[],t))});const E=a(function(e){return j(e.length,function(t,n){var r=Array.prototype.slice.call(arguments,0);return r[0]=n,r[1]=t,e.apply(this,r)})});function S(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function O(e,t,n){for(var r=0,s=n.length;r<s;){if(e(t,n[r]))return!0;r+=1}return!1}function w(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const x="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var k=Object.prototype.toString;const A=function(){return"[object Arguments]"===k.call(arguments)?function(e){return"[object Arguments]"===k.call(e)}:function(e){return w("callee",e)}}();var P=!{toString:null}.propertyIsEnumerable("toString"),M=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],_=function(){return arguments.propertyIsEnumerable("length")}(),N=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},T="function"!=typeof Object.keys||_?a(function(e){if(Object(e)!==e)return[];var t,n,r=[],s=_&&A(e);for(t in e)!w(t,e)||s&&"length"===t||(r[r.length]=t);if(P)for(n=M.length-1;n>=0;)w(t=M[n],e)&&!N(r,t)&&(r[r.length]=t),n-=1;return r}):a(function(e){return Object(e)!==e?[]:Object.keys(e)});const F=T;const $=a(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function J(e,t,n,r){var s=S(e);function i(e,t){return D(e,t,n.slice(),r.slice())}return!O(function(e,t){return!O(i,t,e)},S(t),s)}function D(e,t,n,r){if(x(e,t))return!0;var s,i,o=$(e);if(o!==$(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(s=e.constructor,null==(i=String(s).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!x(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!x(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var c=n.length-1;c>=0;){if(n[c]===e)return r[c]===t;c-=1}switch(o){case"Map":return e.size===t.size&&J(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&J(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=F(e);if(a.length!==F(t).length)return!1;var u=n.concat([e]),l=r.concat([t]);for(c=a.length-1;c>=0;){var h=a[c];if(!w(h,t)||!D(t[h],e[h],u,l))return!1;c-=1}return!0}const R=u(function(e,t){return D(e,t,[],[])});function V(e,t){return function(e,t,n){var r,s;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(r=1/t;n<e.length;){if(0===(s=e[n])&&1/s===r)return n;n+=1}return-1}if(t!=t){for(;n<e.length;){if("number"==typeof(s=e[n])&&s!=s)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(null===t)return e.indexOf(t,n)}for(;n<e.length;){if(R(e[n],t))return n;n+=1}return-1}(t,e,0)>=0}const I=E(u(V));class C extends o.Om{constructor(e,t,n){super(e,t,n),this.element="annotation"}get code(){return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}}const q=C;class B extends o.Om{constructor(e,t,n){super(e,t,n),this.element="comment"}}const L=B;const z=a(function(e){return function(){return e}});const G=z(void 0);const U=R(G());class K extends o.wE{constructor(e,t,n){super(e,t,n),this.element="parseResult"}get api(){return this.children.filter(e=>e.classes.contains("api")).first}get results(){return this.children.filter(e=>e.classes.contains("result"))}get result(){return this.results.first}get annotations(){return this.children.filter(e=>"annotation"===e.element)}get warnings(){return this.children.filter(e=>"annotation"===e.element&&e.classes.contains("warning"))}get errors(){return this.children.filter(e=>"annotation"===e.element&&e.classes.contains("error"))}get isEmpty(){return this.children.reject(e=>"annotation"===e.element).isEmpty}replaceResult(e){const{result:t}=this;if(U(t))return!1;const n=this.content.findIndex(e=>e===t);return-1!==n&&(this.content[n]=e,!0)}}const H=K;class W extends o.wE{constructor(e,t,n){super(e,t,n),this.element="sourceMap"}get positionStart(){return this.children.filter(e=>e.classes.contains("position")).get(0)}get positionEnd(){return this.children.filter(e=>e.classes.contains("position")).get(1)}set position(e){if(void 0===e)return;const t=new o.wE([e.start.row,e.start.column,e.start.char]),n=new o.wE([e.end.row,e.end.column,e.end.char]);t.classes.push("position"),n.classes.push("position"),this.push(t).push(n)}}const X=W,Y=(e,t)=>"object"==typeof t&&null!==t&&e in t&&"function"==typeof t[e],Z=e=>"object"==typeof e&&null!=e&&"_storedElement"in e&&"string"==typeof e._storedElement&&"_content"in e,Q=(e,t)=>"object"==typeof t&&null!==t&&"primitive"in t&&("function"==typeof t.primitive&&t.primitive()===e),ee=(e,t)=>"object"==typeof t&&null!==t&&"classes"in t&&(Array.isArray(t.classes)||t.classes instanceof o.wE)&&t.classes.includes(e),te=(e,t)=>"object"==typeof t&&null!==t&&"element"in t&&t.element===e,ne=e=>e({hasMethod:Y,hasBasicElementProps:Z,primitiveEq:Q,isElementType:te,hasClass:ee}),re=ne(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof o.Hg||e(n)&&t(void 0,n)),se=ne(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof o.Om||e(n)&&t("string",n)),ie=ne(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof o.kT||e(n)&&t("number",n)),oe=ne(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof o.Os||e(n)&&t("null",n)),ce=ne(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof o.bd||e(n)&&t("boolean",n)),ae=ne(({hasBasicElementProps:e,primitiveEq:t,hasMethod:n})=>r=>r instanceof o.Sh||e(r)&&t("object",r)&&n("keys",r)&&n("values",r)&&n("items",r)),ue=ne(({hasBasicElementProps:e,primitiveEq:t,hasMethod:n})=>r=>r instanceof o.wE&&!(r instanceof o.Sh)||e(r)&&t("array",r)&&n("push",r)&&n("unshift",r)&&n("map",r)&&n("reduce",r)),le=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof o.Pr||e(r)&&t("member",r)&&n(void 0,r)),he=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof o.Ft||e(r)&&t("link",r)&&n(void 0,r)),fe=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof o.sI||e(r)&&t("ref",r)&&n(void 0,r)),pe=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof q||e(r)&&t("annotation",r)&&n("array",r)),me=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof L||e(r)&&t("comment",r)&&n("string",r)),de=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof H||e(r)&&t("parseResult",r)&&n("array",r)),ye=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof X||e(r)&&t("sourceMap",r)&&n("array",r)),ve=e=>te("object",e)||te("array",e)||te("boolean",e)||te("number",e)||te("string",e)||te("null",e)||te("member",e),ge=e=>ye(e.meta.get("sourceMap")),be=(e,t)=>{if(0===e.length)return!0;const n=t.attributes.get("symbols");return!!ue(n)&&v(I(n.toValue()),e)},je=(e,t)=>0===e.length||v(I(t.classes.toValue()),e);function Ee(e,t){return t[e<0?t.length+e:e]}const Se=a(function(e){return Ee(-1,e)});class Oe extends AggregateError{constructor(e,t,n){super(e,t,n),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const we=Oe;class xe extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(we,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const ke=xe;const Ae=class extends ke{};const Pe=class extends Ae{};const Me=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new Pe("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new Pe("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new Pe("latest method in MediaTypes class is not yet implemented.")}};class _e extends Me{filterByFormat(e="generic"){const t="generic"===e?"schema;version":e;return this.filter(e=>e.includes(t))}findBy(e="draft-07",t="generic"){const n="generic"===t?`schema;version=${e}`:`schema+${t};version=${e}`;return this.find(e=>e.includes(n))||this.unknownMediaType}latest(e="generic"){return Se(this.filterByFormat(e))}}const Ne=new _e("application/schema;version=draft-07","application/schema+json;version=draft-07","application/schema+yaml;version=draft-07");function Te(e){return function t(n,r,s){switch(arguments.length){case 0:return t;case 1:return c(n)?t:u(function(t,r){return e(n,t,r)});case 2:return c(n)&&c(r)?t:c(n)?u(function(t,n){return e(t,r,n)}):c(r)?u(function(t,r){return e(n,t,r)}):a(function(t){return e(n,r,t)});default:return c(n)&&c(r)&&c(s)?t:c(n)&&c(r)?u(function(t,n){return e(t,n,s)}):c(n)&&c(s)?u(function(t,n){return e(t,r,n)}):c(r)&&c(s)?u(function(t,r){return e(n,t,r)}):c(n)?a(function(t){return e(t,r,s)}):c(r)?a(function(t){return e(n,t,s)}):c(s)?a(function(t){return e(n,r,t)}):e(n,r,s)}}}function Fe(e){return"[object Object]"===Object.prototype.toString.call(e)}const $e=Te(function(e,t,n){var r,s={};for(r in n=n||{},t=t||{})w(r,t)&&(s[r]=w(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)w(r,n)&&!w(r,s)&&(s[r]=n[r]);return s});const Je=Te(function e(t,n,r){return $e(function(n,r,s){return Fe(r)&&Fe(s)?e(t,r,s):t(n,r,s)},n,r)});const De=u(function(e,t){return Je(function(e,t,n){return n},e,t)});const Re=u(function(e,t){return null==t||t!=t?e:t}),Ve=Number.isInteger||function(e){return(e|0)===e};const Ie=function(e,t){if(null!=t)return Ve(e)?Ee(e,t):t[e]};const Ce=u(Ie);const qe=Te(function(e,t,n){return Re(e,Ce(t,n))});function Be(e,t){for(var n=t,r=0;r<e.length;r+=1){if(null==n)return;var s=e[r];n=Ve(s)?Ee(s,n):n[s]}return n}const Le=u(Be);function ze(e,t){return function(){var n=arguments.length;if(0===n)return t();var r=arguments[n-1];return l(r)||"function"!=typeof r[e]?t.apply(this,arguments):r[e].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}const Ge=Te(ze("slice",function(e,t,n){return Array.prototype.slice.call(n,e,t)}));const Ue=Ge(0,-1);const Ke=u(function(e,t){return g(e.length,function(){return e.apply(t,arguments)})});const He=u(function(e,t){return e.apply(this,t)});function We(e,t,n){for(var r=0,s=n.length;r<s;)t=e(t,n[r]),r+=1;return t}function Xe(e){return"[object String]"===Object.prototype.toString.call(e)}const Ye=a(function(e){return!!l(e)||!!e&&("object"==typeof e&&(!Xe(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var Ze="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function Qe(e,t,n){return function(r,s,i){if(Ye(i))return e(r,s,i);if(null==i)return s;if("function"==typeof i["fantasy-land/reduce"])return t(r,s,i,"fantasy-land/reduce");if(null!=i[Ze])return n(r,s,i[Ze]());if("function"==typeof i.next)return n(r,s,i);if("function"==typeof i.reduce)return t(r,s,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function et(e,t,n){for(var r=n.next();!r.done;)t=e(t,r.value),r=n.next();return t}function tt(e,t,n,r){return n[r](e,t)}const nt=Qe(We,tt,et);function rt(e,t){for(var n=0,r=t.length,s=Array(r);n<r;)s[n]=e(t[n]),n+=1;return s}var st=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=p,e.prototype["@@transducer/result"]=m,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const it=u(h(["fantasy-land/map","map"],function(e){return function(t){return new st(e,t)}},function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return j(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return We(function(n,r){return n[r]=e(t[r]),n},{},F(t));default:return rt(e,t)}}));const ot=u(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(n){return e(n)(t(n))}:nt(function(e,n){return function(e,t){var n;t=t||[];var r=(e=e||[]).length,s=t.length,i=[];for(n=0;n<r;)i[i.length]=e[n],n+=1;for(n=0;n<s;)i[i.length]=t[n],n+=1;return i}(e,it(n,t))},[],e)});const ct=u(function(e,t){var n=j(e,t);return j(e,function(){return We(ot,it(n,arguments[0]),Array.prototype.slice.call(arguments,1))})});const at=a(function(e){return ct(e.length,e)});const ut=at(a(function(e){return!e}));function lt(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var ht=function(e){return(e<10?"0":"")+e};const ft="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+ht(e.getUTCMonth()+1)+"-"+ht(e.getUTCDate())+"T"+ht(e.getUTCHours())+":"+ht(e.getUTCMinutes())+":"+ht(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var pt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=p,e.prototype["@@transducer/result"]=m,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function mt(e){return function(t){return new pt(e,t)}}var dt=u(h(["fantasy-land/filter","filter"],mt,function(e,t){return Fe(t)?We(function(n,r){return e(t[r])&&(n[r]=t[r]),n},{},F(t)):(n=t,"[object Map]"===Object.prototype.toString.call(n)?function(e,t){for(var n=new Map,r=t.entries(),s=r.next();!s.done;)e(s.value[1])&&n.set(s.value[0],s.value[1]),s=r.next();return n}(e,t):function(e,t){for(var n=0,r=t.length,s=[];n<r;)e(t[n])&&(s[s.length]=t[n]),n+=1;return s}(e,t));var n}));const yt=dt;const vt=u(function(e,t){return yt((n=e,function(){return!n.apply(this,arguments)}),t);var n});function gt(e,t){var n=function(n){var r=t.concat([e]);return V(n,r)?"<Circular>":gt(n,r)},r=function(e,t){return rt(function(t){return lt(t)+": "+n(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+rt(n,e).join(", ")+"))";case"[object Array]":return"["+rt(n,e).concat(r(e,vt(function(e){return/^\d+$/.test(e)},F(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):lt(ft(e)))+")";case"[object Map]":return"new Map("+n(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+n(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+n(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+n(e.valueOf())+")":lt(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var s=e.toString();if("[object Object]"!==s)return s}return"{"+r(e,F(e)).join(", ")+"}"}}const bt=a(function(e){return gt(e,[])});const jt=u(function(e,t){if(e===t)return t;function n(e,t){if(e>t!=t>e)return t>e?t:e}var r=n(e,t);if(void 0!==r)return r;var s=n(typeof e,typeof t);if(void 0!==s)return s===typeof e?e:t;var i=bt(e),o=n(i,bt(t));return void 0!==o&&o===i?e:t});const Et=u(function(e,t){return it(Ce(e),t)});function St(e,t,n){for(var r=0,s=n.length;r<s;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}function Ot(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function wt(e,t,n,r){return e["@@transducer/result"](n[r](Ke(e["@@transducer/step"],e),t))}const xt=Qe(St,wt,Ot);var kt=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();const At=Te(function(e,t,n){return xt("function"==typeof e?new kt(e):e,t,n)});const Pt=a(function(e){return j(At(jt,0,Et("length",e)),function(){for(var t=0,n=e.length;t<n;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});function Mt(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const _t=a(ze("tail",Ge(1,1/0)));function Nt(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return g(arguments[0].length,At(Mt,arguments[0],_t(arguments)))}var Tt=function(e,t){switch(arguments.length){case 0:return Tt;case 1:return function t(n){return 0===arguments.length?t:x(e,n)};default:return x(e,t)}};const Ft=Tt;const $t=j(1,Nt($,Ft("GeneratorFunction")));const Jt=j(1,Nt($,Ft("AsyncFunction")));const Dt=Pt([Nt($,Ft("Function")),$t,Jt]);const Rt=ut(Dt);function Vt(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const It=u(function(e,t){return e&&t});const Ct=u(function(e,t){return Vt(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:at(It)(e,t)});var qt=a(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:l(e)?[]:Xe(e)?"":Fe(e)?{}:A(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0});const Bt=qt;const Lt=a(function(e){return null!=e&&R(e,Bt(e))});const zt=j(1,Dt(Array.isArray)?Array.isArray:Nt($,Ft("Array")));const Gt=Ct(zt,Lt);const Ut=j(3,function(e,t,n){var r=Le(e,n),s=Le(Ue(e),n);if(!Rt(r)&&!Gt(e)){var i=Ke(r,s);return He(i,t)}});const Kt=Te(function(e,t,n){return e(Be(t,n))});const Ht=R(null);const Wt=ut(Ht);function Xt(e){return Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xt(e)}const Yt=function(e){return"object"===Xt(e)};const Zt=j(1,Ct(Wt,Yt));var Qt=Nt($,Ft("Object")),en=Nt(bt,R(bt(Object))),tn=Kt(Ct(Dt,en),["constructor"]);const nn=j(1,function(e){if(!Zt(e)||!Qt(e))return!1;var t=Object.getPrototypeOf(e);return!!Ht(t)||tn(t)});class rn extends o.g${constructor(){super(),this.register("annotation",q),this.register("comment",L),this.register("parseResult",H),this.register("sourceMap",X)}}const sn=new rn,on=e=>{const t=new rn;return nn(e)&&t.use(e),t},cn=sn,an=()=>({predicates:{...e},namespace:cn});const un=j(1,Nt($,Ft("String")));const ln=class extends ke{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...n}=t;Object.assign(this,n)}}},hn=(e,t,n)=>{const r=e[t];if(null!=r){if(!n&&"function"==typeof r)return r;const e=n?r.leave:r.enter;if("function"==typeof e)return e}else{const r=n?e.leave:e.enter;if(null!=r){if("function"==typeof r)return r;const e=r[t];if("function"==typeof e)return e}}return null},fn={},pn=e=>e?.type,mn=e=>"string"==typeof pn(e),dn=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),yn=(e,{visitFnGetter:t=hn,nodeTypeGetter:n=pn,breakSymbol:r=fn,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const c=Symbol("skip"),a=new Array(e.length).fill(c);return{enter(u,l,h,f,p,m){let d=u,y=!1;const v={...m,replaceWith(e,t){m.replaceWith(e,t),d=e}};for(let u=0;u<e.length;u+=1)if(a[u]===c){const c=t(e[u],n(d),!1);if("function"==typeof c){const t=c.call(e[u],d,l,h,f,p,v);if("function"==typeof t?.then)throw new ln("Async visitor not supported in sync mode",{visitor:e[u],visitFn:c});if(t===i)a[u]=d;else if(t===r)a[u]=r;else{if(t===s)return t;if(void 0!==t){if(!o)return t;d=t,y=!0}}}}return y?d:void 0},leave(s,o,u,l,h,f){let p=s;const m={...f,replaceWith(e,t){f.replaceWith(e,t),p=e}};for(let s=0;s<e.length;s+=1)if(a[s]===c){const c=t(e[s],n(p),!0);if("function"==typeof c){const t=c.call(e[s],p,o,u,l,h,m);if("function"==typeof t?.then)throw new ln("Async visitor not supported in sync mode",{visitor:e[s],visitFn:c});if(t===r)a[s]=r;else if(void 0!==t&&t!==i)return t}}else a[s]===p&&(a[s]=c)}}};yn[Symbol.for("nodejs.util.promisify.custom")]=(e,{visitFnGetter:t=hn,nodeTypeGetter:n=pn,breakSymbol:r=fn,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const c=Symbol("skip"),a=new Array(e.length).fill(c);return{async enter(u,l,h,f,p,m){let d=u,y=!1;const v={...m,replaceWith(e,t){m.replaceWith(e,t),d=e}};for(let u=0;u<e.length;u+=1)if(a[u]===c){const c=t(e[u],n(d),!1);if("function"==typeof c){const t=await c.call(e[u],d,l,h,f,p,v);if(t===i)a[u]=d;else if(t===r)a[u]=r;else{if(t===s)return t;if(void 0!==t){if(!o)return t;d=t,y=!0}}}}return y?d:void 0},async leave(s,o,u,l,h,f){let p=s;const m={...f,replaceWith(e,t){f.replaceWith(e,t),p=e}};for(let s=0;s<e.length;s+=1)if(a[s]===c){const c=t(e[s],n(p),!0);if("function"==typeof c){const t=await c.call(e[s],p,o,u,l,h,m);if(t===r)a[s]=r;else if(void 0!==t&&t!==i)return t}}else a[s]===p&&(a[s]=c)}}};const vn=(e,t,{keyMap:n=null,state:r={},breakSymbol:s=fn,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=hn,nodeTypeGetter:a=pn,nodePredicate:u=mn,nodeCloneFn:l=dn,detectCycles:h=!0}={})=>{const f=n||{};let p,m,d=Array.isArray(e),y=[e],v=-1,g=[],b=e;const j=[],E=[];do{v+=1;const e=v===y.length;let n;const S=e&&0!==g.length;if(e){if(n=0===E.length?void 0:j.pop(),b=m,m=E.pop(),S)if(d){b=b.slice();let e=0;for(const[t,n]of g){const r=t-e;n===i?(b.splice(r,1),e+=1):b[r]=n}}else{b=l(b);for(const[e,t]of g)b[e]=t}v=p.index,y=p.keys,g=p.edits,d=p.inArray,p=p.prev}else if(m!==i&&void 0!==m){if(n=d?v:y[v],b=m[n],b===i||void 0===b)continue;j.push(n)}let O;if(!Array.isArray(b)){if(!u(b))throw new ln(`Invalid AST Node: ${String(b)}`,{node:b});if(h&&E.includes(b)){j.pop();continue}const i=c(t,a(b),e);if(i){for(const[e,n]of Object.entries(r))t[e]=n;const s={replaceWith(t,r){"function"==typeof r?r(t,b,n,m,j,E):m&&(m[n]=t),e||(b=t)}};O=i.call(t,b,n,m,j,E,s)}if("function"==typeof O?.then)throw new ln("Async visitor not supported in sync mode",{visitor:t,visitFn:i});if(O===s)break;if(O===o){if(!e){j.pop();continue}}else if(void 0!==O&&(g.push([n,O]),!e)){if(!u(O)){j.pop();continue}b=O}}void 0===O&&S&&g.push([n,b]),e||(p={inArray:d,index:v,keys:y,edits:g,prev:p},d=Array.isArray(b),y=d?b:f[a(b)]??[],v=-1,g=[],m!==i&&void 0!==m&&E.push(m),m=b)}while(void 0!==p);return 0!==g.length?g.at(-1)[1]:e};vn[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:n=null,state:r={},breakSymbol:s=fn,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=hn,nodeTypeGetter:a=pn,nodePredicate:u=mn,nodeCloneFn:l=dn,detectCycles:h=!0}={})=>{const f=n||{};let p,m,d=Array.isArray(e),y=[e],v=-1,g=[],b=e;const j=[],E=[];do{v+=1;const e=v===y.length;let n;const S=e&&0!==g.length;if(e){if(n=0===E.length?void 0:j.pop(),b=m,m=E.pop(),S)if(d){b=b.slice();let e=0;for(const[t,n]of g){const r=t-e;n===i?(b.splice(r,1),e+=1):b[r]=n}}else{b=l(b);for(const[e,t]of g)b[e]=t}v=p.index,y=p.keys,g=p.edits,d=p.inArray,p=p.prev}else if(m!==i&&void 0!==m){if(n=d?v:y[v],b=m[n],b===i||void 0===b)continue;j.push(n)}let O;if(!Array.isArray(b)){if(!u(b))throw new ln(`Invalid AST Node: ${String(b)}`,{node:b});if(h&&E.includes(b)){j.pop();continue}const i=c(t,a(b),e);if(i){for(const[e,n]of Object.entries(r))t[e]=n;const s={replaceWith(t,r){"function"==typeof r?r(t,b,n,m,j,E):m&&(m[n]=t),e||(b=t)}};O=await i.call(t,b,n,m,j,E,s)}if(O===s)break;if(O===o){if(!e){j.pop();continue}}else if(void 0!==O&&(g.push([n,O]),!e)){if(!u(O)){j.pop();continue}b=O}}void 0===O&&S&&g.push([n,b]),e||(p={inArray:d,index:v,keys:y,edits:g,prev:p},d=Array.isArray(b),y=d?b:f[a(b)]??[],v=-1,g=[],m!==i&&void 0!==m&&E.push(m),m=b)}while(void 0!==p);return 0!==g.length?g.at(-1)[1]:e};const gn=class extends ln{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const bn=class extends gn{};const jn=class extends gn{},En=(e,t={})=>{const{visited:n=new WeakMap}=t,r={...t,visited:n};if(n.has(e))return n.get(e);if(e instanceof o.KeyValuePair){const{key:t,value:s}=e,i=re(t)?En(t,r):t,c=re(s)?En(s,r):s,a=new o.KeyValuePair(i,c);return n.set(e,a),a}if(e instanceof o.ot){const t=e=>En(e,r),s=[...e].map(t),i=new o.ot(s);return n.set(e,i),i}if(e instanceof o.G6){const t=e=>En(e,r),s=[...e].map(t),i=new o.G6(s);return n.set(e,i),i}if(re(e)){const t=wn(e);if(n.set(e,t),e.content)if(re(e.content))t.content=En(e.content,r);else if(e.content instanceof o.KeyValuePair)t.content=En(e.content,r);else if(Array.isArray(e.content)){const n=e=>En(e,r);t.content=e.content.map(n)}else t.content=e.content;else t.content=e.content;return t}throw new bn("Value provided to cloneDeep function couldn't be cloned",{value:e})};En.safe=e=>{try{return En(e)}catch{return e}};const Sn=e=>{const{key:t,value:n}=e;return new o.KeyValuePair(t,n)},On=e=>{const t=new e.constructor;if(t.element=e.element,e.meta.length>0&&(t._meta=En(e.meta)),e.attributes.length>0&&(t._attributes=En(e.attributes)),re(e.content)){const n=e.content;t.content=On(n)}else Array.isArray(e.content)?t.content=[...e.content]:e.content instanceof o.KeyValuePair?t.content=Sn(e.content):t.content=e.content;return t},wn=e=>{if(e instanceof o.KeyValuePair)return Sn(e);if(e instanceof o.ot)return(e=>{const t=[...e];return new o.ot(t)})(e);if(e instanceof o.G6)return(e=>{const t=[...e];return new o.G6(t)})(e);if(re(e))return On(e);throw new jn("Value provided to cloneShallow function couldn't be cloned",{value:e})};wn.safe=e=>{try{return wn(e)}catch{return e}};const xn=e=>ae(e)?"ObjectElement":ue(e)?"ArrayElement":le(e)?"MemberElement":se(e)?"StringElement":ce(e)?"BooleanElement":ie(e)?"NumberElement":oe(e)?"NullElement":he(e)?"LinkElement":fe(e)?"RefElement":void 0,kn=e=>re(e)?wn(e):dn(e),An=Nt(xn,un),Pn={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]};const Mn=(e,t,{keyMap:n=Pn,...r}={})=>vn(e,t,{keyMap:n,nodeTypeGetter:xn,nodePredicate:An,nodeCloneFn:kn,...r});Mn[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:n=Pn,...r}={})=>vn[Symbol.for("nodejs.util.promisify.custom")](e,t,{keyMap:n,nodeTypeGetter:xn,nodePredicate:An,nodeCloneFn:kn,...r});const _n={toolboxCreator:an,visitorOptions:{nodeTypeGetter:xn,exposeEdits:!0}},Nn=(e,t,n={})=>{if(0===t.length)return e;const r=De(_n,n),{toolboxCreator:s,visitorOptions:i}=r,o=s(),c=t.map(e=>e(o)),a=yn(c.map(qe({},"visitor")),{...i});c.forEach(Ut(["pre"],[]));const u=Mn(e,a,i);return c.forEach(Ut(["post"],[])),u};Nn[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,n={})=>{if(0===t.length)return e;const r=De(_n,n),{toolboxCreator:s,visitorOptions:i}=r,o=s(),c=t.map(e=>e(o)),a=yn[Symbol.for("nodejs.util.promisify.custom")],u=Mn[Symbol.for("nodejs.util.promisify.custom")],l=a(c.map(qe({},"visitor")),{...i});await Promise.allSettled(c.map(Ut(["pre"],[])));const h=await u(e,l,i);return await Promise.allSettled(c.map(Ut(["post"],[]))),h};const Tn=(e,{Type:t,plugins:n=[]})=>{const r=new t(e);return re(e)&&(e.meta.length>0&&(r.meta=En(e.meta)),e.attributes.length>0&&(r.attributes=En(e.attributes))),Nn(r,n,{toolboxCreator:an,visitorOptions:{nodeTypeGetter:xn}})},Fn=e=>(t,n={})=>Tn(t,{...n,Type:e});o.Sh.refract=Fn(o.Sh),o.wE.refract=Fn(o.wE),o.Om.refract=Fn(o.Om),o.bd.refract=Fn(o.bd),o.Os.refract=Fn(o.Os),o.kT.refract=Fn(o.kT),o.Ft.refract=Fn(o.Ft),o.sI.refract=Fn(o.sI),q.refract=Fn(q),L.refract=Fn(L),H.refract=Fn(H),X.refract=Fn(X);class $n extends o.Sh{constructor(e,t,n){super(e,t,n),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(e){this.set("id",e)}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get dependencies(){return this.get("dependencies")}set dependencies(e){this.set("dependencies",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){return this.get("base")}set base(e){this.set("base",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}get media(){return this.get("media")}set media(e){this.set("media",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}}const Jn=$n;class Dn extends o.Sh{constructor(e,t,n){super(e,t,n),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}}const Rn=Dn;class Vn extends o.Sh{constructor(e,t,n){super(e,t,n),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(e){this.set("binaryEncoding",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}}const In=Vn;class Cn extends o.Sh{constructor(e,t,n){super(e,t,n),this.element="linkDescription"}get href(){return this.get("href")}set href(e){this.set("href",e)}get rel(){return this.get("rel")}set rel(e){this.set("rel",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){return this.get("mediaType")}set mediaType(e){this.set("mediaType",e)}get method(){return this.get("method")}set method(e){this.set("method",e)}get encType(){return this.get("encType")}set encType(e){this.set("encType",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}const qn=Cn;const Bn=u(function(e,t){return We(function(n,r){return n[r]=e(t[r],r,t),n},{},F(t))});const Ln=a(function(e){return null==e});var zn=u(function(e,t){if(0===e.length||Ln(t))return!1;for(var n=t,r=0;r<e.length;){if(Ln(n)||!w(e[r],n))return!1;n=n[e[r]],r+=1}return!0});const Gn=zn;var Un=u(function(e,t){return Gn([e],t)});const Kn=Un;const Hn=Te(function(e,t,n){return e(Ce(t,n))});const Wn=a(function(e){return j(e.length,e)});const Xn=u(function(e,t){return j(e+1,function(){var n=arguments[e];if(null!=n&&Vt(n[t]))return n[t].apply(n,Array.prototype.slice.call(arguments,0,e));throw new TypeError(bt(n)+' does not have a method named "'+t+'"')})});const Yn=Xn(1,"split");var Zn=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=p,e.prototype["@@transducer/result"]=m,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();function Qn(e){return function(t){return new Zn(e,t)}}const er=u(h(["dropWhile"],Qn,function(e,t){for(var n=0,r=t.length;n<r&&e(t[n]);)n+=1;return Ge(n,1/0,t)}));const tr=Xn(1,"join");const nr=Wn(function(e,t){return Nt(Yn(""),er(I(e)),tr(""))(t)}),rr=(e,t)=>{const n=Re(e,t);return Bn(e=>{if(nn(e)&&Kn("$ref",e)&&Hn(un,"$ref",e)){const t=Le(["$ref"],e),r=nr("#/",t);return Le(r.split("/"),n)}return nn(e)?rr(e,n):e},e)};const sr=function(){return!0},ir=e=>"string"==typeof e?.type?e.type:xn(e),or={EphemeralObject:["content"],EphemeralArray:["content"],...Pn},cr=(e,t,{keyMap:n=or,...r}={})=>Mn(e,t,{keyMap:n,nodeTypeGetter:ir,nodePredicate:sr,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...r});cr[Symbol.for("nodejs.util.promisify.custom")]=async(e,{keyMap:t=or,...n}={})=>Mn[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:ir,nodePredicate:sr,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...n});const ar=class{type="EphemeralArray";content=[];reference=void 0;constructor(e){this.content=e,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}};const ur=class{type="EphemeralObject";content=[];reference=void 0;constructor(e){this.content=e,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}};class lr{ObjectElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new ur(e.content);return this.references.set(e,t),t}};EphemeralObject={leave:e=>e.toObject()};MemberElement={enter:e=>[e.key,e.value]};ArrayElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new ar(e.content);return this.references.set(e,t),t}};EphemeralArray={leave:e=>e.toArray()};references=new WeakMap;BooleanElement(e){return e.toValue()}NumberElement(e){return e.toValue()}StringElement(e){return e.toValue()}NullElement(){return null}RefElement(e,...t){const n=t[3];return"EphemeralObject"===n[n.length-1]?.type?Symbol.for("delete-node"):String(e.toValue())}LinkElement(e){return se(e.href)?e.href.toValue():""}}const hr=e=>re(e)?se(e)||ie(e)||ce(e)||oe(e)?e.toValue():cr(e,new lr):e,fr=e=>{const t=e.meta.length>0?En(e.meta):void 0,n=e.attributes.length>0?En(e.attributes):void 0;return new e.constructor(void 0,t,n)},pr=(e,t)=>t.clone&&t.isMergeableElement(e)?dr(fr(e),e,t):e,mr={clone:!0,isMergeableElement:e=>ae(e)||ue(e),arrayElementMerge:(e,t,n)=>e.concat(t)["fantasy-land/map"](e=>pr(e,n)),objectElementMerge:(e,t,n)=>{const r=ae(e)?fr(e):fr(t);return ae(e)&&e.forEach((e,t,s)=>{const i=wn(s);i.value=pr(e,n),r.content.push(i)}),t.forEach((t,s,i)=>{const o=hr(s);let c;if(ae(e)&&e.hasKey(o)&&n.isMergeableElement(t)){const r=e.get(o);c=wn(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return dr;const n=t.customMerge(e,t);return"function"==typeof n?n:dr})(s,n)(r,t,n)}else c=wn(i),c.value=pr(t,n);r.remove(o),r.content.push(c)}),r},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},dr=(e,t,n)=>{const r={...mr,...n};r.isMergeableElement=r.isMergeableElement??mr.isMergeableElement,r.arrayElementMerge=r.arrayElementMerge??mr.arrayElementMerge,r.objectElementMerge=r.objectElementMerge??mr.objectElementMerge;const s=ue(t);if(!(s===ue(e)))return pr(t,r);const i=s&&"function"==typeof r.arrayElementMerge?r.arrayElementMerge(e,t,r):r.objectElementMerge(e,t,r);return i.meta=(e=>"function"!=typeof e.customMetaMerge?e=>En(e):e.customMetaMerge)(r)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>En(e):e.customAttributesMerge)(r)(e.attributes,t.attributes),i};dr.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new o.Sh:e.reduce((e,n)=>dr(e,n,t),fr(e[0]))};const yr=dr;const vr=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){(e.meta.length>0||t.meta.length>0)&&(t.meta=yr(t.meta,e.meta),ge(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))),(e.attributes.length>0||e.meta.length>0)&&(t.attributes=yr(t.attributes,e.attributes))}};const gr=class extends vr{enter(e){return this.element=En(e),fn}},br=(e,t,n=[])=>{const r=Object.getOwnPropertyDescriptors(t);for(let e of n)delete r[e];Object.defineProperties(e,r)},jr=(e,t=[e])=>{const n=Object.getPrototypeOf(e);return null===n?t:jr(n,[...t,n])},Er=(e,t,n=[])=>{var r;const s=null!==(r=((...e)=>{if(0===e.length)return;let t;const n=e.map(e=>jr(e));for(;n.every(e=>e.length>0);){const e=n.map(e=>e.pop()),r=e[0];if(!e.every(e=>e===r))break;t=r}return t})(...e))&&void 0!==r?r:Object.prototype,i=Object.create(s),o=jr(s);for(let t of e){let e=jr(t);for(let t=e.length-1;t>=0;t--){let r=e[t];-1===o.indexOf(r)&&(br(i,r,["constructor",...n]),o.push(r))}}return i.constructor=t,i},Sr=e=>e.filter((t,n)=>e.indexOf(t)==n),Or=(e,t)=>{const n=t.map(e=>jr(e));let r=0,s=!0;for(;s;){s=!1;for(let i=t.length-1;i>=0;i--){const t=n[i][r];if(null!=t&&(s=!0,null!=Object.getOwnPropertyDescriptor(t,e)))return n[i][0]}r++}},wr=(e,t=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>t,setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor:(t,n)=>Object.getOwnPropertyDescriptor(Or(n,e)||{},n),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(n,r)=>void 0!==Or(r,e)||void 0!==t[r],get:(n,r)=>(Or(r,e)||t)[r],set(t,n,r){const s=Or(n,e);if(void 0===s)throw new Error("Cannot set new properties on Proxies created by ts-mixer");return s[n]=r,!0},deleteProperty(){throw new Error("Cannot delete properties on Proxies created by ts-mixer")},ownKeys:()=>e.map(Object.getOwnPropertyNames).reduce((e,t)=>t.concat(e.filter(e=>t.indexOf(e)<0)))}),xr=null,kr="copy",Ar="copy",Pr="deep",Mr=new WeakMap,_r=e=>Mr.get(e),Nr=(e,t)=>{var n,r;const s=Sr([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of s)i[o]=Sr([...null!==(n=null==e?void 0:e[o])&&void 0!==n?n:[],...null!==(r=null==t?void 0:t[o])&&void 0!==r?r:[]]);return i},Tr=(e,t)=>{var n,r,s,i;return{property:Nr(null!==(n=null==e?void 0:e.property)&&void 0!==n?n:{},null!==(r=null==t?void 0:t.property)&&void 0!==r?r:{}),method:Nr(null!==(s=null==e?void 0:e.method)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},Fr=(e,t)=>{var n,r,s,i,o,c;return{class:Sr([...null!==(n=null==e?void 0:e.class)&&void 0!==n?n:[],...null!==(r=null==t?void 0:t.class)&&void 0!==r?r:[]]),static:Tr(null!==(s=null==e?void 0:e.static)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:Tr(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},$r=new Map,Jr=(...e)=>{const t=((...e)=>{var t;const n=new Set,r=new Set([...e]);for(;r.size>0;)for(let e of r){const s=[...jr(e.prototype).map(e=>e.constructor),...null!==(t=_r(e))&&void 0!==t?t:[]].filter(e=>!n.has(e));for(let e of s)r.add(e);n.add(e),r.delete(e)}return[...n]})(...e).map(e=>$r.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>Fr(e,t))},Dr=e=>{let t=$r.get(e);return t||(t={},$r.set(e,t)),t};function Rr(...e){var t,n,r;const s=e.map(e=>e.prototype),i=xr;if(null!==i){const e=s.map(e=>e[i]).filter(e=>"function"==typeof e),t=function(...t){for(let n of e)n.apply(this,t)},n={[i]:t};s.push(n)}function o(...t){for(const n of e)br(this,new n(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===Ar?Er(s,o):(c=s,a=o,wr([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===kr?Er(e,null,["prototype"]):wr(e,Function.prototype));let u=o;if("none"!==Pr){const s="deep"===Pr?Jr(...e):((...e)=>{const t=e.map(e=>Dr(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>Fr(e,t))})(...e);for(let e of null!==(t=null==s?void 0:s.class)&&void 0!==t?t:[]){const t=e(u);t&&(u=t)}Vr(null!==(n=null==s?void 0:s.static)&&void 0!==n?n:{},u),Vr(null!==(r=null==s?void 0:s.instance)&&void 0!==r?r:{},u.prototype)}var l,h;return l=u,h=e,Mr.set(l,h),u}const Vr=(e,t)=>{const n=e.property,r=e.method;if(n)for(let e in n)for(let r of n[e])r(t,e);if(r)for(let e in r)for(let n of r[e])n(t,e,Object.getOwnPropertyDescriptor(t,e))};const Ir=a(function(e){return j(At(jt,0,Et("length",e)),function(){for(var t=0,n=e.length;t<n;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});const Cr=a(function(e){return!Lt(e)});const qr=u(function(e,t){return e||t});var Br=ut(j(1,Ct(Wt,u(function(e,t){return Vt(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:at(qr)(e,t)})(Yt,Dt))));const Lr=Ir([un,Br,Cr]);const zr=u(function(e,t){for(var n={},r=0;r<e.length;)e[r]in t&&(n[e[r]]=t[e[r]]),r+=1;return n});const Gr=class extends vr{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return zr(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=Le(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Kt(Dt,["visitors",...e],this.specObj)?Le(["visitors",...e],this.specObj):Le(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const n=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...n,...t})}toRefractedElement(e,t,n={}){const r=this.retrieveVisitorInstance(e,n);return r instanceof gr&&r?.constructor===gr?En(t):(Mn(t,r,n),r.element)}};const Ur=class extends Gr{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=this.specPath(e),n=this.retrieveFixedFields(t);return e.forEach((e,r,s)=>{if(se(r)&&n.includes(hr(r))&&!this.ignoredFields.includes(hr(r))){const n=this.toRefractedElement([...t,"fixedFields",hr(r)],e),i=new o.Pr(En(r),n);this.copyMetaAndAttributes(s,i),i.classes.push("fixed-field"),this.element.content.push(i)}else this.ignoredFields.includes(hr(r))||this.element.content.push(En(s))}),this.copyMetaAndAttributes(e,this.element),fn}};const Kr=class{parent;constructor({parent:e}){this.parent=e}},Hr=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof Jn||e(r)&&t("JSONSchemaDraft4",r)&&n("object",r)),Wr=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof Rn||e(r)&&t("JSONReference",r)&&n("object",r)),Xr=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof In||e(r)&&t("media",r)&&n("object",r)),Yr=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof qn||e(r)&&t("linkDescription",r)&&n("object",r));class Zr extends(Rr(Ur,Kr,gr)){constructor(e){super(e),this.element=new Jn,this.specPath=z(["document","objects","JSONSchema"])}get defaultDialectIdentifier(){return"http://json-schema.org/draft-04/schema#"}ObjectElement(e){return this.handleDialectIdentifier(e),this.handleSchemaIdentifier(e),this.parent=this.element,Ur.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(U(this.parent)&&!se(e.get("$schema")))this.element.setMetaProperty("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(Hr(this.parent)&&!se(e.get("$schema"))){const e=Re(hr(this.parent.meta.get("inheritedDialectIdentifier")),hr(this.parent.$schema));this.element.setMetaProperty("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const n=void 0!==this.parent?En(this.parent.getMetaProperty("ancestorsSchemaIdentifiers",[])):new o.wE,r=hr(e.get(t));Lr(r)&&n.push(r),this.element.setMetaProperty("ancestorsSchemaIdentifiers",n)}}const Qr=Zr,es=e=>ae(e)&&e.hasKey("$ref");class ts extends(Rr(Gr,Kr,gr)){ObjectElement(e){const t=es(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(t,e),fn}ArrayElement(e){return this.element=new o.wE,this.element.classes.push("json-schema-items"),e.forEach(e=>{const t=es(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),fn}}const ns=ts;const rs=class extends gr{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-required"),t}};const ss=function(){return!1};const is=class extends Gr{specPath;ignoredFields;fieldPatternPredicate=ss;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:n,...r}){super({...r}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof n&&(this.fieldPatternPredicate=n)}ObjectElement(e){return e.forEach((e,t,n)=>{if(!this.ignoredFields.includes(hr(t))&&this.fieldPatternPredicate(hr(t))){const r=this.specPath(e),s=this.toRefractedElement(r,e),i=new o.Pr(En(t),s);this.copyMetaAndAttributes(n,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(hr(t))||this.element.content.push(En(n))}),this.copyMetaAndAttributes(e,this.element),fn}};const os=class extends is{constructor(e){super(e),this.fieldPatternPredicate=Lr}};class cs extends(Rr(os,Kr,gr)){constructor(e){super(e),this.element=new o.Sh,this.element.classes.push("json-schema-properties"),this.specPath=e=>es(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}const as=cs;class us extends(Rr(os,Kr,gr)){constructor(e){super(e),this.element=new o.Sh,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>es(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}const ls=us;class hs extends(Rr(os,Kr,gr)){constructor(e){super(e),this.element=new o.Sh,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>es(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}const fs=hs;const ps=class extends gr{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-enum"),t}};const ms=class extends gr{StringElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}};class ds extends(Rr(Gr,Kr,gr)){constructor(e){super(e),this.element=new o.wE,this.element.classes.push("json-schema-allOf")}ArrayElement(e){return e.forEach(e=>{const t=es(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),fn}}const ys=ds;class vs extends(Rr(Gr,Kr,gr)){constructor(e){super(e),this.element=new o.wE,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){return e.forEach(e=>{const t=es(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),fn}}const gs=vs;class bs extends(Rr(Gr,Kr,gr)){constructor(e){super(e),this.element=new o.wE,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){return e.forEach(e=>{const t=es(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),fn}}const js=bs;class Es extends(Rr(os,Kr,gr)){constructor(e){super(e),this.element=new o.Sh,this.element.classes.push("json-schema-definitions"),this.specPath=e=>es(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}const Ss=Es;class Os extends(Rr(Gr,Kr,gr)){constructor(e){super(e),this.element=new o.wE,this.element.classes.push("json-schema-links")}ArrayElement(e){return e.forEach(e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(e,this.element),fn}}const ws=Os;class xs extends(Rr(Ur,gr)){constructor(e){super(e),this.element=new Rn,this.specPath=z(["document","objects","JSONReference"])}ObjectElement(e){const t=Ur.prototype.ObjectElement.call(this,e);return se(this.element.$ref)&&this.element.classes.push("reference-element"),t}}const ks=xs;const As=class extends gr{StringElement(e){const t=this.enter(e);return this.element.classes.push("reference-value"),t}};const Ps=Te(function(e,t,n){return j(Math.max(e.length,t.length,n.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):n.apply(this,arguments)})});const Ms=a(function(e){return function(t,n){return e(t,n)?-1:e(n,t)?1:0}});var _s=u(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const Ns=_s;const Ts=a(function(e){return Ee(0,e)});const Fs=a(f);const $s=ut(Ln);const Js=Ct(zt,Cr);function Ds(e){return function(e){if(Array.isArray(e))return Rs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Rs(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rs(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Vs=Nt(Ns(Ms(function(e,t){return e.length>t.length})),Ts,Ce("length")),Is=Wn(function(e,t,n){var r=n.apply(void 0,Ds(e));return $s(r)?Fs(r):t});const Cs=Ps(Js,function(e){var t=Vs(e);return j(t,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return At(Is(n),void 0,e)})},G);const qs=class extends Gr{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=this.alternator.map(({predicate:e,specPath:t})=>Ps(e,z(t),G)),n=Cs(t)(e);return this.element=this.toRefractedElement(n,e),fn}};const Bs=class extends qs{constructor(e){super(e),this.alternator=[{predicate:es,specPath:["document","objects","JSONReference"]},{predicate:sr,specPath:["document","objects","JSONSchema"]}]}};class Ls extends(Rr(Ur,gr)){constructor(e){super(e),this.element=new In,this.specPath=z(["document","objects","Media"])}}const zs=Ls;class Gs extends(Rr(Ur,gr)){constructor(e){super(e),this.element=new qn,this.specPath=z(["document","objects","LinkDescription"])}}const Us=Gs,Ks={visitors:{value:gr,JSONSchemaOrJSONReferenceVisitor:Bs,document:{objects:{JSONSchema:{$visitor:Qr,fixedFields:{id:{$ref:"#/visitors/value"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:Bs,items:ns,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:rs,properties:as,additionalProperties:Bs,patternProperties:ls,dependencies:fs,enum:ps,type:ms,allOf:ys,anyOf:gs,oneOf:js,not:Bs,definitions:Ss,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:ws,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:ks,fixedFields:{$ref:As}},Media:{$visitor:zs,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:Us,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:Bs,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:Bs}}}}}},Hs=e=>{if(re(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},Ws={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...Pn},Xs={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",Jn),t.register("jSONReference",Rn),t.register("media",In),t.register("linkDescription",qn),t}},Ys=()=>{const e=on(Xs);return{predicates:{...t,isStringElement:se},namespace:e}},Zs=(e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:n=[],specificationObj:r=Ks}={})=>{const s=(0,o.e)(e),i=rr(r),c=new(Le(t,i))({specObj:i});return Mn(s,c),Nn(c.element,n,{toolboxCreator:Ys,visitorOptions:{keyMap:Ws,nodeTypeGetter:Hs}})},Qs=e=>(t,n={})=>Zs(t,{specPath:e,...n});Jn.refract=Qs(["visitors","document","objects","JSONSchema","$visitor"]),Rn.refract=Qs(["visitors","document","objects","JSONReference","$visitor"]),In.refract=Qs(["visitors","document","objects","Media","$visitor"]),qn.refract=Qs(["visitors","document","objects","LinkDescription","$visitor"]);const ei=class extends Jn{constructor(e,t,n){super(e,t,n),this.element="JSONSchemaDraft6"}get idProp(){throw new Ae("id keyword from Core vocabulary has been renamed to $id.")}set idProp(e){throw new Ae("id keyword from Core vocabulary has been renamed to $id.")}get $id(){return this.get("$id")}set $id(e){this.set("$id",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get containsProp(){return this.get("contains")}set containsProp(e){this.set("contains",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get const(){return this.get("const")}set const(e){this.set("const",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}};const ti=class extends qn{get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get schema(){throw new Ae("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}set schema(e){throw new Ae("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get method(){throw new Ae("method keyword from Hyper-Schema vocabulary has been removed.")}set method(e){throw new Ae("method keyword from Hyper-Schema vocabulary has been removed.")}get encType(){throw new Ae("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}set encType(e){throw new Ae("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}get submissionEncType(){return this.get("submissionEncType")}set submissionEncType(e){this.set("submissionEncType",e)}};var ni=Te(function e(t,n,r){if(0===t.length)return n;var s=t[0];if(t.length>1){var i=Ie(s,r);(Ln(i)||"object"!=typeof i)&&(i=Ve(t[1])?[]:{}),n=e(Array.prototype.slice.call(t,1),n,i)}return function(e,t,n){if(Ve(e)&&l(n)){var r=e<0?n.length+e:e,s=[].concat(n);return s[r]=t,s}var i={};for(var o in n)i[o]=n[o];return i[e]=t,i}(s,n,r)});const ri=ni;const si=Te(function(e,t,n){var r=Array.prototype.slice.call(n,0);return r.splice(e,t),r});var ii=Te(function(e,t,n){return ri([e],t,n)});const oi=ii;var ci=u(function e(t,n){if(null==n)return n;switch(t.length){case 0:return n;case 1:return function(e,t){if(null==t)return t;if(Ve(e)&&l(t))return si(e,1,t);var n={};for(var r in t)n[r]=t[r];return delete n[e],n}(t[0],n);default:var r=t[0],s=Array.prototype.slice.call(t,1);return null==n[r]?function(e,t){if(Ve(e)&&l(t))return[].concat(t);var n={};for(var r in t)n[r]=t[r];return n}(r,n):oi(r,e(s,n[r]),n)}});const ai=ci;const ui=class extends Qr{constructor(e){super(e),this.element=new ei}get defaultDialectIdentifier(){return"http://json-schema.org/draft-06/schema#"}BooleanElement(e){const t=this.enter(e);return this.element.classes.push("boolean-json-schema"),t}handleSchemaIdentifier(e,t="$id"){return super.handleSchemaIdentifier(e,t)}};const li=class extends ns{BooleanElement(e){return this.element=this.toRefractedElement(["document","objects","JSONSchema"],e),fn}};const hi=class extends gr{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-examples"),t}};const fi=class extends Us{constructor(e){super(e),this.element=new ti}},pi=Nt(ri(["visitors","document","objects","JSONSchema","$visitor"],ui),ai(["visitors","document","objects","JSONSchema","fixedFields","id"]),ri(["visitors","document","objects","JSONSchema","fixedFields","$id"],Ks.visitors.value),ri(["visitors","document","objects","JSONSchema","fixedFields","contains"],Ks.visitors.JSONSchemaOrJSONReferenceVisitor),ri(["visitors","document","objects","JSONSchema","fixedFields","items"],li),ri(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Ks.visitors.JSONSchemaOrJSONReferenceVisitor),ri(["visitors","document","objects","JSONSchema","fixedFields","const"],Ks.visitors.value),ri(["visitors","document","objects","JSONSchema","fixedFields","examples"],hi),ri(["visitors","document","objects","LinkDescription","$visitor"],fi),ri(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Ks.visitors.JSONSchemaOrJSONReferenceVisitor),ai(["visitors","document","objects","LinkDescription","fixedFields","schema"]),ri(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Ks.visitors.JSONSchemaOrJSONReferenceVisitor),ai(["visitors","document","objects","LinkDescription","fixedFields","method"]),ai(["visitors","document","objects","LinkDescription","fixedFields","encType"]),ri(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"],Ks.visitors.value))(Ks),mi={JSONSchemaDraft6Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...Pn},di=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof ei||e(r)&&t("JSONSchemaDraft6",r)&&n("object",r)),yi=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof ti||e(r)&&t("linkDescription",r)&&n("object",r)),vi={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft6",ei),t.register("jSONReference",Rn),t.register("media",In),t.register("linkDescription",ti),t}},gi=()=>{const e=on(vi);return{predicates:{...s,isStringElement:se},namespace:e}},bi=(e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:n=[],specificationObj:r=pi}={})=>{const s=(0,o.e)(e),i=rr(r),c=new(Le(t,i))({specObj:i});return Mn(s,c),Nn(c.element,n,{toolboxCreator:gi,visitorOptions:{keyMap:mi,nodeTypeGetter:Hs}})},ji=e=>(t,n={})=>bi(t,{specPath:e,...n});ei.refract=ji(["visitors","document","objects","JSONSchema","$visitor"]),ti.refract=ji(["visitors","document","objects","LinkDescription","$visitor"]);const Ei=class extends ei{constructor(e,t,n){super(e,t,n),this.element="JSONSchemaDraft7"}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(e){this.set("contentEncoding",e)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(e){this.set("contentMediaType",e)}get media(){throw new Ae('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}set media(e){throw new Ae('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}};const Si=class extends ti{get anchor(){return this.get("anchor")}set anchor(e){this.set("anchor",e)}get anchorPointer(){return this.get("anchorPointer")}set anchorPointer(e){this.set("anchorPointer",e)}get templatePointers(){return this.get("templatePointers")}set templatePointers(e){this.set("templatePointers",e)}get templateRequired(){return this.get("templateRequired")}set templateRequired(e){this.set("templateRequired",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){throw new Ae("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}set mediaType(e){throw new Ae("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}get targetMediaType(){return this.get("targetMediaType")}set targetMediaType(e){this.set("targetMediaType",e)}get targetHints(){return this.get("targetHints")}set targetHints(e){this.set("targetHints",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get submissionEncType(){throw new Ae("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}set submissionEncType(e){throw new Ae("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}get submissionMediaType(){return this.get("submissionMediaType")}set submissionMediaType(e){this.set("submissionMediaType",e)}},Oi={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft7",Ei),t.register("jSONReference",Rn),t.register("linkDescription",Si),t}},wi={JSONSchemaDraft7Element:{additionalItems:(...e)=>new Ei(...e),items:(...e)=>new Ei(...e),contains:(...e)=>new Ei(...e),required(...e){const t=new o.wE(...e);return t.classes.push("json-schema-required"),t},properties(...e){const t=new o.Sh(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new Ei(...e),patternProperties(...e){const t=new o.Sh(...e);return t.classes.push("json-schema-patternProperties"),t},dependencies(...e){const t=new o.Sh(...e);return t.classes.push("json-schema-dependencies"),t},propertyNames:(...e)=>new Ei(...e),enum(...e){const t=new o.wE(...e);return t.classes.push("json-schema-enum"),t},allOf(...e){const t=new o.wE(...e);return t.classes.push("json-schema-allOf"),t},anyOf(...e){const t=new o.wE(...e);return t.classes.push("json-schema-anyOf"),t},oneOf(...e){const t=new o.wE(...e);return t.classes.push("json-schema-oneOf"),t},if:(...e)=>new Ei(...e),then:(...e)=>new Ei(...e),else:(...e)=>new Ei(...e),not:(...e)=>new Ei(...e),definitions(...e){const t=new o.Sh(...e);return t.classes.push("json-schema-definitions"),t},examples(...e){const t=new o.wE(...e);return t.classes.push("json-schema-examples"),t},links(...e){const t=new o.wE(...e);return t.classes.push("json-schema-links"),t}},LinkDescriptionElement:{hrefSchema:(...e)=>new Ei(...e),targetSchema:(...e)=>new Ei(...e),submissionSchema:(...e)=>new Ei(...e),templatePointers:(...e)=>new o.Sh(...e),templateRequired:(...e)=>new o.wE(...e),targetHints:(...e)=>new o.Sh(...e),headerSchema:(...e)=>new Ei(...e)},"json-schema-properties":{"[key: *]":function(...e){return new Ei(...e)}},"json-schema-patternProperties":{"[key: *]":function(...e){return new Ei(...e)}},"json-schema-dependencies":{"[key: *]":function(...e){return new Ei(...e)}},"json-schema-allOf":{"<*>":function(...e){return new Ei(...e)}},"json-schema-anyOf":{"<*>":function(...e){return new Ei(...e)}},"json-schema-oneOf":{"<*>":function(...e){return new Ei(...e)}},"json-schema-definitions":{"[key: *]":function(...e){return new Ei(...e)}},"json-schema-links":{"<*>":function(...e){return new Si(...e)}}},xi=(e,t)=>{const n=Hs(e),r=wi[n]||wi[hr(e.classes.first)];return void 0===r?void 0:Object.hasOwn(r,"[key: *]")?r["[key: *]"]:r[t]},ki=()=>()=>({visitor:{StringElement(e,t,n,r,s){if(!(e=>se(e)&&je(["yaml-e-node","yaml-e-scalar"],e))(e))return;const i=[...s,n].filter(re),o=i.at(-1);let c,a;return ue(o)?(a=e,c=xi(o,"<*>")):le(o)&&(a=i.at(-2),c=xi(a,hr(o.key))),"function"==typeof c?c.call({context:a},void 0,En(e.meta),En(e.attributes)):void 0}}});const Ai=class extends ui{constructor(e){super(e),this.element=new Ei}get defaultDialectIdentifier(){return"http://json-schema.org/draft-07/schema#"}};const Pi=class extends fi{constructor(e){super(e),this.element=new Si}},Mi=Nt(ri(["visitors","document","objects","JSONSchema","$visitor"],Ai),ri(["visitors","document","objects","JSONSchema","fixedFields","$comment"],pi.visitors.value),ri(["visitors","document","objects","JSONSchema","fixedFields","if"],pi.visitors.JSONSchemaOrJSONReferenceVisitor),ri(["visitors","document","objects","JSONSchema","fixedFields","then"],pi.visitors.JSONSchemaOrJSONReferenceVisitor),ri(["visitors","document","objects","JSONSchema","fixedFields","else"],pi.visitors.JSONSchemaOrJSONReferenceVisitor),ai(["visitors","document","objects","JSONSchema","fixedFields","media"]),ri(["visitors","document","objects","JSONSchema","fixedFields","contentEncoding"],pi.visitors.value),ri(["visitors","document","objects","JSONSchema","fixedFields","contentMediaType"],pi.visitors.value),ri(["visitors","document","objects","JSONSchema","fixedFields","writeOnly"],pi.visitors.value),ri(["visitors","document","objects","LinkDescription","$visitor"],Pi),ri(["visitors","document","objects","LinkDescription","fixedFields","anchor"],pi.visitors.value),ri(["visitors","document","objects","LinkDescription","fixedFields","anchorPointer"],pi.visitors.value),ai(["visitors","document","objects","LinkDescription","fixedFields","mediaType"]),ri(["visitors","document","objects","LinkDescription","fixedFields","targetMediaType"],pi.visitors.value),ri(["visitors","document","objects","LinkDescription","fixedFields","targetHints"],pi.visitors.value),ri(["visitors","document","objects","LinkDescription","fixedFields","description"],pi.visitors.value),ri(["visitors","document","objects","LinkDescription","fixedFields","$comment"],pi.visitors.value),ri(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],pi.visitors.JSONSchemaOrJSONReferenceVisitor),ai(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"]),ri(["visitors","document","objects","LinkDescription","fixedFields","submissionMediaType"],pi.visitors.value))(pi),_i={JSONSchemaDraft7Element:["content"],JSONReferenceElement:["content"],LinkDescriptionElement:["content"],...Pn},Ni=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof Ei||e(r)&&t("JSONSchemaDraft7",r)&&n("object",r)),Ti=ne(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof Si||e(r)&&t("linkDescription",r)&&n("object",r)),Fi=()=>{const e=on(Oi);return{predicates:{...i,isStringElement:se},namespace:e}},$i=(e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:n=[],specificationObj:r=Mi}={})=>{const s=(0,o.e)(e),i=rr(r),c=new(Le(t,i))({specObj:i});return Mn(s,c),Nn(c.element,n,{toolboxCreator:Fi,visitorOptions:{keyMap:_i,nodeTypeGetter:Hs}})},Ji=e=>(t,n={})=>$i(t,{specPath:e,...n}),Di=$i})(),r})());
|