UNPKG

@asyncapi/react-component

Version:

A React component for AsyncAPI specification.

2 lines 2.12 MB
/*! For license information please see without-parser.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("AsyncApiStandalone",[],t):"object"==typeof exports?exports.AsyncApiStandalone=t():e.AsyncApiStandalone=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={11821:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.lastVersion=t.specVersions=t.EXTENSION_REGEX=t.xParserObjectUniqueId=t.xParserCircularProps=t.xParserCircular=t.xParserOriginalTraits=t.xParserOriginalPayload=t.xParserOriginalSchemaFormat=t.xParserSchemaId=t.xParserMessageParsed=t.xParserMessageName=t.xParserApiVersion=t.xParserSpecStringified=t.xParserSpecParsed=void 0;const r=i(n(24764));t.xParserSpecParsed="x-parser-spec-parsed",t.xParserSpecStringified="x-parser-spec-stringified",t.xParserApiVersion="x-parser-api-version",t.xParserMessageName="x-parser-message-name",t.xParserMessageParsed="x-parser-message-parsed",t.xParserSchemaId="x-parser-schema-id",t.xParserOriginalSchemaFormat="x-parser-original-schema-format",t.xParserOriginalPayload="x-parser-original-payload",t.xParserOriginalTraits="x-parser-original-traits",t.xParserCircular="x-parser-circular",t.xParserCircularProps="x-parser-circular-props",t.xParserObjectUniqueId="x-parser-unique-object-id",t.EXTENSION_REGEX=/^x-[\w\d.\-_]+$/,t.specVersions=Object.keys(r.default.schemas),t.lastVersion=t.specVersions[t.specVersions.length-1]},68009:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStringifiedDocument=t.isParsedDocument=t.isOldAsyncAPIDocument=t.isAsyncAPIDocument=t.toAsyncAPIDocument=t.createAsyncAPIDocument=void 0;const i=n(6573),r=n(67943),o=n(1698),s=n(11821);function a(e){switch(e.semver.major){case 2:return new i.AsyncAPIDocumentV2(e.parsed,{asyncapi:e,pointer:"/"});case 3:return new i.AsyncAPIDocumentV3(e.parsed,{asyncapi:e,pointer:"/"});default:throw new Error(`Unsupported AsyncAPI version: ${e.semver.version}`)}}function c(e){return!!e&&(e instanceof i.AsyncAPIDocumentV2||e instanceof i.AsyncAPIDocumentV3||!(!e||"function"!=typeof e.json)&&e.json()[s.xParserApiVersion]===i.ParserAPIVersion)}function p(e){return"object"==typeof e&&null!==e&&Boolean(e[s.xParserSpecParsed])}t.createAsyncAPIDocument=a,t.toAsyncAPIDocument=function(e){return c(e)?e:p(e)?a((0,o.createDetailedAsyncAPI)(e,e)):(0,r.unstringify)(e)},t.isAsyncAPIDocument=c,t.isOldAsyncAPIDocument=function(e){if(e&&"function"==typeof e.json){const t=e.json()[s.xParserApiVersion];return void 0===t||0===t}return!1},t.isParsedDocument=p,t.isStringifiedDocument=function(e){try{return"object"==typeof(e="string"==typeof e?JSON.parse(e):e)&&null!==e&&Boolean(e[s.xParserSpecParsed])&&Boolean(e[s.xParserSpecStringified])}catch(e){return!1}}},31277:(e,t)=>{"use strict";var n,i;function r(e,t,o){if(!e)return;const{schemaTypesToIterate:s,callback:a,seenSchemas:c}=o,p=e.json();if(c.has(p))return;c.add(p);let l=e.type()||[];Array.isArray(l)||(l=[l]),!s.includes(i.Objects)&&l.includes("object")||!s.includes(i.Arrays)&&l.includes("array")||!1!==a(e,t,n.NEW_SCHEMA)&&(s.includes(i.Objects)&&l.includes("object")&&function(e,t){Object.entries(e.properties()||{}).forEach((([e,n])=>{r(n,e,t)}));const n=e.additionalProperties();"object"==typeof n&&r(n,null,t);const o=t.schemaTypesToIterate;o.includes(i.PropertyNames)&&e.propertyNames()&&r(e.propertyNames(),null,t),o.includes(i.PatternProperties)&&Object.entries(e.patternProperties()||{}).forEach((([e,n])=>{r(n,e,t)}))}(e,o),s.includes(i.Arrays)&&l.includes("array")&&function(e,t){const n=e.items();n&&(Array.isArray(n)?n.forEach(((e,n)=>{r(e,n,t)})):r(n,null,t));const i=e.additionalItems();"object"==typeof i&&r(i,null,t),t.schemaTypesToIterate.includes("contains")&&e.contains()&&r(e.contains(),null,t)}(e,o),s.includes(i.OneOfs)&&(e.oneOf()||[]).forEach(((e,t)=>{r(e,t,o)})),s.includes(i.AnyOfs)&&(e.anyOf()||[]).forEach(((e,t)=>{r(e,t,o)})),s.includes(i.AllOfs)&&(e.allOf()||[]).forEach(((e,t)=>{r(e,t,o)})),s.includes(i.Nots)&&e.not()&&r(e.not(),null,o),s.includes(i.Ifs)&&e.if()&&r(e.if(),null,o),s.includes(i.Thenes)&&e.then()&&r(e.then(),null,o),s.includes(i.Elses)&&e.else()&&r(e.else(),null,o),s.includes(i.Dependencies)&&Object.entries(e.dependencies()||{}).forEach((([e,t])=>{t&&!Array.isArray(t)&&r(t,e,o)})),s.includes(i.Definitions)&&Object.entries(e.definitions()||{}).forEach((([e,t])=>{r(t,e,o)})),a(e,t,n.END_SCHEMA),c.delete(p))}function o(e,t){if(!e)return;const{schemaTypesToIterate:n}=t;n.includes(i.Headers)&&e.hasHeaders()&&r(e.headers(),null,t),n.includes(i.Payloads)&&e.hasPayload()&&r(e.payload(),null,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.traverseAsyncApiDocument=t.SchemaTypesToIterate=t.SchemaIteratorCallbackType=void 0,function(e){e.NEW_SCHEMA="NEW_SCHEMA",e.END_SCHEMA="END_SCHEMA"}(n=t.SchemaIteratorCallbackType||(t.SchemaIteratorCallbackType={})),function(e){e.Parameters="parameters",e.Payloads="payloads",e.Headers="headers",e.Components="components",e.Objects="objects",e.Arrays="arrays",e.OneOfs="oneOfs",e.AllOfs="allOfs",e.AnyOfs="anyOfs",e.Nots="nots",e.PropertyNames="propertyNames",e.PatternProperties="patternProperties",e.Contains="contains",e.Ifs="ifs",e.Thenes="thenes",e.Elses="elses",e.Dependencies="dependencies",e.Definitions="definitions"}(i=t.SchemaTypesToIterate||(t.SchemaTypesToIterate={})),t.traverseAsyncApiDocument=function(e,t,n=[]){0===n.length&&(n=Object.values(i));const s={callback:t,schemaTypesToIterate:n,seenSchemas:new Set};if(e.channels().isEmpty()||e.channels().all().forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:n}=t;n.includes(i.Parameters)&&Object.values(e.parameters().filterBy((e=>e.hasSchema()))||{}).forEach((e=>{r(e.schema(),null,t)})),e.messages().all().forEach((e=>{o(e,t)}))}(e,s)})),n.includes(i.Components)&&!e.components().isEmpty()){const t=e.components();Object.values(t.messages().all()||{}).forEach((e=>{o(e,s)})),Object.values(t.schemas().all()||{}).forEach((e=>{r(e,null,s)})),n.includes(i.Parameters)&&Object.values(t.channelParameters().filterBy((e=>e.hasSchema()))).forEach((e=>{r(e.schema(),null,s)})),Object.values(t.messageTraits().all()||{}).forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:n}=t;n.includes(i.Headers)&&e.hasHeaders()&&r(e.headers(),null,t)}(e,s)}))}}},100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParserAPIVersion=void 0,t.ParserAPIVersion=3},64864:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseModel=void 0,t.BaseModel=class{constructor(e,t={}){this._json=e,this._meta=t}json(e){return void 0===e||null===this._json||void 0===this._json?this._json:this._json[e]}meta(e){return void 0===e?this._meta:this._meta?this._meta[e]:void 0}jsonPath(e){return"string"!=typeof e?this._meta.pointer:`${this._meta.pointer}/${e}`}createModel(e,t,n){return new e(t,Object.assign(Object.assign({},n),{asyncapi:this._meta.asyncapi}))}}},17187:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},26044:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},64605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89130:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},93422:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},40956:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60323:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0,t.Collection=class extends Array{constructor(e,t={}){super(...e),this.collections=e,this._meta=t}has(e){return void 0!==this.get(e)}all(){return this.collections}isEmpty(){return 0===this.collections.length}filterBy(e){return this.collections.filter(e)}meta(e){return void 0===e?this._meta:this._meta?this._meta[String(e)]:void 0}}},99130:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},40937:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},11765:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49487:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24454:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3112:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91679:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalDocumentations=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.meta("id")===e))}}t.ExternalDocumentations=r},6573:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(18063),t),r(n(60995),t),r(n(100),t),r(n(64864),t),r(n(17187),t),r(n(26044),t),r(n(64605),t),r(n(89130),t),r(n(93422),t),r(n(40956),t),r(n(60323),t),r(n(99130),t),r(n(23838),t),r(n(40937),t),r(n(11765),t),r(n(49487),t),r(n(24454),t),r(n(3112),t),r(n(38447),t),r(n(39402),t),r(n(34448),t),r(n(42584),t),r(n(3482),t),r(n(18522),t),r(n(97383),t),r(n(94856),t),r(n(43166),t),r(n(4327),t),r(n(85850),t),r(n(18895),t),r(n(36045),t),r(n(35510),t),r(n(2149),t),r(n(32653),t),r(n(21051),t),r(n(94627),t),r(n(63407),t),r(n(91506),t),r(n(83977),t),r(n(92512),t),r(n(24400),t),r(n(10933),t),r(n(13030),t),r(n(37876),t),r(n(18360),t),r(n(9998),t),r(n(55006),t),r(n(9159),t)},38447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39402:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},42584:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},97383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},94856:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},43166:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4327:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85850:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},36045:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35510:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2149:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32653:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},21051:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},94627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},63407:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91506:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},83977:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92512:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24400:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10933:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},13030:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},37876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18360:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9998:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9159:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},38415:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schemasFromDocument=t.createModel=void 0;const i=n(31277);t.createModel=function(e,t,n,i){return new e(t,Object.assign(Object.assign({},n),{asyncapi:n.asyncapi||(null==i?void 0:i.meta().asyncapi)}))},t.schemasFromDocument=function(e,t,n){const r=new Set,o=new Set;let s=Object.values(i.SchemaTypesToIterate);return n||(s=s.filter((e=>e!==i.SchemaTypesToIterate.Components))),(0,i.traverseAsyncApiDocument)(e,(function(e){r.has(e.json())||(r.add(e.json()),o.add(e))}),s),new t(Array.from(o))}},7961:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAPIDocument=void 0;const i=n(64864),r=n(78090),o=n(91346),s=n(13133),a=n(39775),c=n(57868),p=n(55975),l=n(33655),d=n(3813),u=n(50739),f=n(67695),m=n(31943),h=n(44886),y=n(1698),g=n(38415);class b extends i.BaseModel{version(){return this._json.asyncapi}defaultContentType(){return this._json.defaultContentType}hasDefaultContentType(){return!!this._json.defaultContentType}info(){return this.createModel(r.Info,this._json.info,{pointer:"/info"})}servers(){return new l.Servers(Object.entries(this._json.servers||{}).map((([e,t])=>this.createModel(d.Server,t,{id:e,pointer:`/servers/${e}`}))))}channels(){return new o.Channels(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(s.Channel,t,{id:e,address:e,pointer:`/channels/${(0,y.tilde)(e)}`}))))}operations(){const e=[];return this.channels().forEach((t=>e.push(...t.operations()))),new p.Operations(e)}messages(){const e=[];return this.operations().forEach((t=>t.messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))))),new c.Messages(e)}schemas(){return(0,g.schemasFromDocument)(this,m.Schemas,!1)}securitySchemes(){var e;return new u.SecuritySchemes(Object.entries((null===(e=this._json.components)||void 0===e?void 0:e.securitySchemes)||{}).map((([e,t])=>this.createModel(f.SecurityScheme,t,{id:e,pointer:`/components/securitySchemes/${e}`}))))}components(){return this.createModel(a.Components,this._json.components||{},{pointer:"/components"})}allServers(){const e=this.servers().all();return this.components().servers().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new l.Servers(e)}allChannels(){const e=this.channels().all();return this.components().channels().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new o.Channels(e)}allOperations(){const e=[];return this.allChannels().forEach((t=>e.push(...t.operations()))),new p.Operations(e)}allMessages(){const e=[];return this.allOperations().forEach((t=>t.messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))))),this.components().messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new c.Messages(e)}allSchemas(){return(0,g.schemasFromDocument)(this,m.Schemas,!0)}extensions(){return(0,h.extensions)(this)}}t.AsyncAPIDocument=b},32470:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Binding=void 0;const i=n(64864),r=n(44886);class o extends i.BaseModel{protocol(){return this._meta.protocol}version(){return this._json.bindingVersion||"latest"}value(){const e=Object.assign({},this._json);return delete e.bindingVersion,e}extensions(){return(0,r.extensions)(this)}}t.Binding=o},79492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bindings=void 0;const i=n(60323),r=n(48300),o=n(41371),s=n(38415),a=n(11821);class c extends i.Collection{get(e){return this.collections.find((t=>t.protocol()===e))}extensions(){const e=[];return Object.entries(this._meta.originalData||{}).forEach((([t,n])=>{a.EXTENSION_REGEX.test(t)&&e.push((0,s.createModel)(o.Extension,n,{id:t,pointer:`${this._meta.pointer}/${t}`,asyncapi:this._meta.asyncapi}))})),new r.Extensions(e)}}t.Bindings=c},228:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelParameter=void 0;const i=n(64864),r=n(90193),o=n(44886);class s extends i.BaseModel{id(){return this._meta.id}hasSchema(){return!!this._json.schema}schema(){if(this._json.schema)return this.createModel(r.Schema,this._json.schema,{pointer:`${this._meta.pointer}/schema`})}hasLocation(){return!!this._json.location}location(){return this._json.location}hasDescription(){return(0,o.hasDescription)(this)}description(){return(0,o.description)(this)}extensions(){return(0,o.extensions)(this)}}t.ChannelParameter=s},51311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelParameters=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.ChannelParameters=r},13133:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Channel=void 0;const i=n(64864),r=n(51311),o=n(228),s=n(57868),a=n(55975),c=n(27956),p=n(33655),l=n(3813),d=n(44886);class u extends i.BaseModel{id(){return this._meta.id}address(){return this._meta.address}hasDescription(){return(0,d.hasDescription)(this)}description(){return(0,d.description)(this)}servers(){var e;const t=[],n=this._json.servers||[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.servers)||{}).forEach((([e,i])=>{(0===n.length||n.includes(e))&&t.push(this.createModel(l.Server,i,{id:e,pointer:`/servers/${e}`}))})),new p.Servers(t)}operations(){const e=[];return["publish","subscribe"].forEach((t=>{const n=this._json[t],i=n&&n.operationId||t;n&&e.push(this.createModel(c.Operation,n,{id:i,action:t,pointer:`${this._meta.pointer}/${t}`}))})),new a.Operations(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new s.Messages(e)}parameters(){return new r.ChannelParameters(Object.entries(this._json.parameters||{}).map((([e,t])=>this.createModel(o.ChannelParameter,t,{id:e,pointer:`${this._meta.pointer}/parameters/${e}`}))))}bindings(){return(0,d.bindings)(this)}extensions(){return(0,d.extensions)(this)}}t.Channel=u},91346:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Channels=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}t.Channels=r},39775:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Components=void 0;const i=n(64864),r=n(79492),o=n(32470),s=n(13133),a=n(228),c=n(98031),p=n(13279),l=n(3657),d=n(90193),u=n(67695),f=n(3813),m=n(87126),h=n(44886),y=n(33655),g=n(91346),b=n(57868),v=n(31943),j=n(51311),x=n(48510),$=n(10214),_=n(82465),w=n(50739),S=n(37300),P=n(55975),O=n(68851),E=n(1698);class A extends i.BaseModel{servers(){return this.createCollection("servers",y.Servers,f.Server)}channels(){return new g.Channels(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(s.Channel,t,{id:e,address:"",pointer:`/components/channels/${(0,E.tilde)(e)}`}))))}operations(){return new P.Operations([])}messages(){return this.createCollection("messages",b.Messages,O.Message)}schemas(){return this.createCollection("schemas",v.Schemas,d.Schema)}channelParameters(){return this.createCollection("parameters",j.ChannelParameters,a.ChannelParameter)}serverVariables(){return this.createCollection("serverVariables",x.ServerVariables,m.ServerVariable)}operationTraits(){return this.createCollection("operationTraits",$.OperationTraits,l.OperationTrait)}messageTraits(){return this.createCollection("messageTraits",_.MessageTraits,p.MessageTrait)}correlationIds(){return this.createCollection("correlationIds",S.CorrelationIds,c.CorrelationId)}securitySchemes(){return this.createCollection("securitySchemes",w.SecuritySchemes,u.SecurityScheme)}serverBindings(){return this.createBindings("serverBindings")}channelBindings(){return this.createBindings("channelBindings")}operationBindings(){return this.createBindings("operationBindings")}messageBindings(){return this.createBindings("messageBindings")}extensions(){return(0,h.extensions)(this)}isEmpty(){return 0===Object.keys(this._json).length}createCollection(e,t,n){const i=[];return Object.entries(this._json[e]||{}).forEach((([t,r])=>{i.push(this.createModel(n,r,{id:t,pointer:`/components/${e}/${t}`}))})),new t(i)}createBindings(e){return Object.entries(this._json[e]||{}).reduce(((t,[n,i])=>{const s=i||{},a=this.meta("asyncapi"),c=`components/${e}/${n}`;return t[n]=new r.Bindings(Object.entries(s).map((([e,t])=>this.createModel(o.Binding,t,{protocol:e,pointer:`${c}/${e}`}))),{originalData:s,asyncapi:a,pointer:c}),t}),{})}}t.Components=A},38033:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contact=void 0;const i=n(64864),r=n(44886);class o extends i.BaseModel{hasName(){return!!this._json.name}name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}hasEmail(){return!!this._json.email}email(){return this._json.email}extensions(){return(0,r.extensions)(this)}}t.Contact=o},98031:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorrelationId=void 0;const i=n(64864),r=n(44886);class o extends i.BaseModel{location(){return this._json.location}hasDescription(){return(0,r.hasDescription)(this)}description(){return(0,r.description)(this)}extensions(){return(0,r.extensions)(this)}}t.CorrelationId=o},37300:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorrelationIds=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.meta("id")===e))}}t.CorrelationIds=r},41371:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extension=void 0;const i=n(64864);class r extends i.BaseModel{id(){return this._meta.id}value(){return this._json}}t.Extension=r},48300:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions=void 0;const i=n(60323);class r extends i.Collection{get(e){return e=e.startsWith("x-")?e:`x-${e}`,this.collections.find((t=>t.id()===e))}}t.Extensions=r},13241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalDocumentation=void 0;const i=n(64864),r=n(44886);class o extends i.BaseModel{url(){return this._json.url}hasDescription(){return(0,r.hasDescription)(this)}description(){return(0,r.description)(this)}extensions(){return(0,r.extensions)(this)}}t.ExternalDocumentation=o},18063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagsV2=t.TagV2=t.ServersV2=t.ServerV2=t.ServerVariablesV2=t.ServerVariableV2=t.SecuritySchemesV2=t.SecuritySchemeV2=t.SchemasV2=t.SchemaV2=t.OperationsV2=t.OperationV2=t.OperationTraitsV2=t.OperationTraitV2=t.OAuthFlowsV2=t.OAuthFlowV2=t.MessagesV2=t.MessageV2=t.MessageTraitsV2=t.MessageTraitV2=t.MessageExamplesV2=t.MessageExampleV2=t.LicenseV2=t.InfoV2=t.ExternalDocumentationV2=t.ExtensionsV2=t.ExtensionV2=t.CorrelationIdV2=t.ContactV2=t.ComponentsV2=t.ChannelsV2=t.ChannelV2=t.ChannelParametersV2=t.ChannelParameterV2=t.BindingsV2=t.BindingV2=t.AsyncAPIDocumentV2=void 0;var i=n(7961);Object.defineProperty(t,"AsyncAPIDocumentV2",{enumerable:!0,get:function(){return i.AsyncAPIDocument}});var r=n(32470);Object.defineProperty(t,"BindingV2",{enumerable:!0,get:function(){return r.Binding}});var o=n(79492);Object.defineProperty(t,"BindingsV2",{enumerable:!0,get:function(){return o.Bindings}});var s=n(228);Object.defineProperty(t,"ChannelParameterV2",{enumerable:!0,get:function(){return s.ChannelParameter}});var a=n(51311);Object.defineProperty(t,"ChannelParametersV2",{enumerable:!0,get:function(){return a.ChannelParameters}});var c=n(13133);Object.defineProperty(t,"ChannelV2",{enumerable:!0,get:function(){return c.Channel}});var p=n(91346);Object.defineProperty(t,"ChannelsV2",{enumerable:!0,get:function(){return p.Channels}});var l=n(39775);Object.defineProperty(t,"ComponentsV2",{enumerable:!0,get:function(){return l.Components}});var d=n(38033);Object.defineProperty(t,"ContactV2",{enumerable:!0,get:function(){return d.Contact}});var u=n(98031);Object.defineProperty(t,"CorrelationIdV2",{enumerable:!0,get:function(){return u.CorrelationId}});var f=n(41371);Object.defineProperty(t,"ExtensionV2",{enumerable:!0,get:function(){return f.Extension}});var m=n(48300);Object.defineProperty(t,"ExtensionsV2",{enumerable:!0,get:function(){return m.Extensions}});var h=n(13241);Object.defineProperty(t,"ExternalDocumentationV2",{enumerable:!0,get:function(){return h.ExternalDocumentation}});var y=n(78090);Object.defineProperty(t,"InfoV2",{enumerable:!0,get:function(){return y.Info}});var g=n(47783);Object.defineProperty(t,"LicenseV2",{enumerable:!0,get:function(){return g.License}});var b=n(96115);Object.defineProperty(t,"MessageExampleV2",{enumerable:!0,get:function(){return b.MessageExample}});var v=n(68792);Object.defineProperty(t,"MessageExamplesV2",{enumerable:!0,get:function(){return v.MessageExamples}});var j=n(13279);Object.defineProperty(t,"MessageTraitV2",{enumerable:!0,get:function(){return j.MessageTrait}});var x=n(82465);Object.defineProperty(t,"MessageTraitsV2",{enumerable:!0,get:function(){return x.MessageTraits}});var $=n(68851);Object.defineProperty(t,"MessageV2",{enumerable:!0,get:function(){return $.Message}});var _=n(57868);Object.defineProperty(t,"MessagesV2",{enumerable:!0,get:function(){return _.Messages}});var w=n(18034);Object.defineProperty(t,"OAuthFlowV2",{enumerable:!0,get:function(){return w.OAuthFlow}});var S=n(47865);Object.defineProperty(t,"OAuthFlowsV2",{enumerable:!0,get:function(){return S.OAuthFlows}});var P=n(3657);Object.defineProperty(t,"OperationTraitV2",{enumerable:!0,get:function(){return P.OperationTrait}});var O=n(10214);Object.defineProperty(t,"OperationTraitsV2",{enumerable:!0,get:function(){return O.OperationTraits}});var E=n(27956);Object.defineProperty(t,"OperationV2",{enumerable:!0,get:function(){return E.Operation}});var A=n(55975);Object.defineProperty(t,"OperationsV2",{enumerable:!0,get:function(){return A.Operations}});var T=n(90193);Object.defineProperty(t,"SchemaV2",{enumerable:!0,get:function(){return T.Schema}});var I=n(31943);Object.defineProperty(t,"SchemasV2",{enumerable:!0,get:function(){return I.Schemas}});var k=n(67695);Object.defineProperty(t,"SecuritySchemeV2",{enumerable:!0,get:function(){return k.SecurityScheme}});var M=n(50739);Object.defineProperty(t,"SecuritySchemesV2",{enumerable:!0,get:function(){return M.SecuritySchemes}});var R=n(87126);Object.defineProperty(t,"ServerVariableV2",{enumerable:!0,get:function(){return R.ServerVariable}});var C=n(48510);Object.defineProperty(t,"ServerVariablesV2",{enumerable:!0,get:function(){return C.ServerVariables}});var q=n(3813);Object.defineProperty(t,"ServerV2",{enumerable:!0,get:function(){return q.Server}});var N=n(33655);Object.defineProperty(t,"ServersV2",{enumerable:!0,get:function(){return N.Servers}});var D=n(75124);Object.defineProperty(t,"TagV2",{enumerable:!0,get:function(){return D.Tag}});var F=n(64981);Object.defineProperty(t,"TagsV2",{enumerable:!0,get:function(){return F.Tags}})},78090:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Info=void 0;const i=n(64864),r=n(38033),o=n(13241),s=n(47783),a=n(64981),c=n(75124),p=n(44886);class l extends i.BaseModel{title(){return this._json.title}version(){return this._json.version}hasId(){return!!this._meta.asyncapi.parsed.id}id(){return this._meta.asyncapi.parsed.id}hasDescription(){return(0,p.hasDescription)(this)}description(){return(0,p.description)(this)}hasTermsOfService(){return!!this._json.termsOfService}termsOfService(){return this._json.termsOfService}hasContact(){return Object.keys(this._json.contact||{}).length>0}contact(){const e=this._json.contact;return e&&this.createModel(r.Contact,e,{pointer:"/info/contact"})}hasLicense(){return Object.keys(this._json.license||{}).length>0}license(){const e=this._json.license;return e&&this.createModel(s.License,e,{pointer:"/info/license"})}hasExternalDocs(){const e=this._meta.asyncapi.parsed;return Object.keys(e.externalDocs||{}).length>0}externalDocs(){if(this.hasExternalDocs()){const e=this._meta.asyncapi.parsed;return this.createModel(o.ExternalDocumentation,e.externalDocs,{pointer:"/externalDocs"})}}tags(){const e=this._meta.asyncapi.parsed.tags||[];return new a.Tags(e.map(((e,t)=>this.createModel(c.Tag,e,{pointer:`/tags/${t}`}))))}extensions(){return(0,p.extensions)(this)}}t.Info=l},47783:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.License=void 0;const i=n(64864),r=n(44886);class o extends i.BaseModel{name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}extensions(){return(0,r.extensions)(this)}}t.License=o},96115:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageExample=void 0;const i=n(64864),r=n(44886);class o extends i.BaseModel{hasName(){return!!this._json.name}name(){return this._json.name}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasHeaders(){return!!this._json.headers}headers(){return this._json.headers}hasPayload(){return!!this._json.payload}payload(){return this._json.payload}extensions(){return(0,r.extensions)(this)}}t.MessageExample=o},68792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageExamples=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.name()===e))}}t.MessageExamples=r},13279:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageTrait=void 0;const i=n(64864),r=n(98031),o=n(68792),s=n(96115),a=n(90193),c=n(11821),p=n(44886),l=n(52741);class d extends i.BaseModel{id(){return this._json.messageId||this._meta.id||this.json(c.xParserMessageName)}hasSchemaFormat(){return void 0!==this.schemaFormat()}schemaFormat(){return this._json.schemaFormat||(0,l.getDefaultSchemaFormat)(this._meta.asyncapi.semver.version)}hasMessageId(){return!!this._json.messageId}hasCorrelationId(){return!!this._json.correlationId}correlationId(){if(this._json.correlationId)return this.createModel(r.CorrelationId,this._json.correlationId,{pointer:`${this._meta.pointer}/correlationId`})}hasContentType(){return!!this._json.contentType}contentType(){var e;return this._json.contentType||(null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.defaultContentType)}hasHeaders(){return!!this._json.headers}headers(){if(this._json.headers)return this.createModel(a.Schema,this._json.headers,{pointer:`${this._meta.pointer}/headers`})}hasName(){return!!this._json.name}name(){return this._json.name}hasTitle(){return!!this._json.title}title(){return this._json.title}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return(0,p.hasDescription)(this)}description(){return(0,p.description)(this)}hasExternalDocs(){return(0,p.hasExternalDocs)(this)}externalDocs(){return(0,p.externalDocs)(this)}examples(){return new o.MessageExamples((this._json.examples||[]).map(((e,t)=>this.createModel(s.MessageExample,e,{pointer:`${this._meta.pointer}/examples/${t}`}))))}tags(){return(0,p.tags)(this)}bindings(){return(0,p.bindings)(this)}extensions(){return(0,p.extensions)(this)}}t.MessageTrait=d},82465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageTraits=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.MessageTraits=r},68851:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;const i=n(91346),r=n(55975),o=n(27956),s=n(82465),a=n(13279),c=n(33655),p=n(90193),l=n(1698);class d extends a.MessageTrait{hasPayload(){return!!this._json.payload}payload(){if(this._json.payload)return this.createModel(p.Schema,this._json.payload,{pointer:`${this._meta.pointer}/payload`,schemaFormat:this._json.schemaFormat})}servers(){const e=[],t=[];return this.channels().forEach((n=>{n.servers().forEach((n=>{t.includes(n.json())||(t.push(n.json()),e.push(n))}))})),new c.Servers(e)}channels(){const e=[],t=[];return this.operations().all().forEach((n=>{n.channels().forEach((n=>{t.includes(n.json())||(t.push(n.json()),e.push(n))}))})),new i.Channels(e)}operations(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,n])=>{["subscribe","publish"].forEach((i=>{const r=n[i];r&&(r.message===this._json||(r.message.oneOf||[]).includes(this._json))&&t.push(this.createModel(o.Operation,r,{id:"",pointer:`/channels/${(0,l.tilde)(e)}/${i}`,action:i}))}))})),new r.Operations(t)}traits(){return new s.MessageTraits((this._json.traits||[]).map(((e,t)=>this.createModel(a.MessageTrait,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`}))))}}t.Message=d},57868:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}t.Messages=r},44886:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tags=t.externalDocs=t.hasExternalDocs=t.extensions=t.description=t.hasDescription=t.bindings=void 0;const i=n(79492),r=n(32470),o=n(48300),s=n(41371),a=n(13241),c=n(64981),p=n(75124),l=n(38415),d=n(11821);function u(e){return e.json("description")}function f(e){return Object.keys(e.json("externalDocs")||{}).length>0}t.bindings=function(e){const t=e.json("bindings")||{};return new i.Bindings(Object.entries(t||{}).map((([t,n])=>(0,l.createModel)(r.Binding,n,{protocol:t,pointer:e.jsonPath(`bindings/${t}`)},e))),{originalData:t,asyncapi:e.meta("asyncapi"),pointer:e.jsonPath("bindings")})},t.hasDescription=function(e){return Boolean(u(e))},t.description=u,t.extensions=function(e){const t=[];return Object.entries(e.json()).forEach((([n,i])=>{d.EXTENSION_REGEX.test(n)&&t.push((0,l.createModel)(s.Extension,i,{id:n,pointer:e.jsonPath(n)},e))})),new o.Extensions(t)},t.hasExternalDocs=f,t.externalDocs=function(e){if(f(e))return new a.ExternalDocumentation(e.json("externalDocs"))},t.tags=function(e){return new c.Tags((e.json("tags")||[]).map(((t,n)=>(0,l.createModel)(p.Tag,t,{pointer:e.jsonPath(`tags/${n}`)},e))))}},18034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthFlow=void 0;const i=n(64864),r=n(44886);class o extends i.BaseModel{hasAuthorizationUrl(){return!!this.json().authorizationUrl}authorizationUrl(){return this.json().authorizationUrl}hasTokenUrl(){return!!this.json().tokenUrl}tokenUrl(){return this.json().tokenUrl}hasRefreshUrl(){return!!this._json.refreshUrl}refreshUrl(){return this._json.refreshUrl}scopes(){return this._json.scopes}extensions(){return(0,r.extensions)(this)}}t.OAuthFlow=o},47865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthFlows=void 0;const i=n(64864),r=n(18034),o=n(44886);class s extends i.BaseModel{hasAuthorizationCode(){return!!this._json.authorizationCode}authorizationCode(){if(this._json.authorizationCode)return new r.OAuthFlow(this._json.authorizationCode)}hasClientCredentials(){return!!this._json.clientCredentials}clientCredentials(){if(this._json.clientCredentials)return new r.OAuthFlow(this._json.clientCredentials)}hasImplicit(){return!!this._json.implicit}implicit(){if(this._json.implicit)return new r.OAuthFlow(this._json.implicit)}hasPassword(){return!!this._json.password}password(){if(this._json.password)return new r.OAuthFlow(this._json.password)}extensions(){return(0,o.extensions)(this)}}t.OAuthFlows=s},3657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationTrait=void 0;const i=n(64864),r=n(67695),o=n(1631),s=n(41975),a=n(44886);class c extends i.BaseModel{id(){return this.operationId()||this._meta.id}hasOperationId(){return!!this._json.operationId}operationId(){return this._json.operationId}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return(0,a.hasDescription)(this)}description(){return(0,a.description)(this)}hasExternalDocs(){return(0,a.hasExternalDocs)(this)}externalDocs(){return(0,a.externalDocs)(this)}security(){var e,t,n,i;const a=(null===(i=null===(n=null===(t=null===(e=this._meta)||void 0===e?void 0:e.asyncapi)||void 0===t?void 0:t.parsed)||void 0===n?void 0:n.components)||void 0===i?void 0:i.securitySchemes)||{};return(this._json.security||[]).map(((e,t)=>{const n=[];return Object.entries(e).forEach((([e,i])=>{const o=this.createModel(r.SecurityScheme,a[e],{id:e,pointer:`/components/securitySchemes/${e}`});n.push(this.createModel(s.SecurityRequirement,{scheme:o,scopes:i},{id:e,pointer:`${this.meta().pointer}/security/${t}/${e}`}))})),new o.SecurityRequirements(n)}))}tags(){return(0,a.tags)(this)}bindings(){return(0,a.bindings)(this)}extensions(){return(0,a.extensions)(this)}}t.OperationTrait=c},10214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationTraits=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.OperationTraits=r},27956:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=void 0;const i=n(91346),r=n(13133),o=n(57868),s=n(68851),a=n(10214),c=n(3657),p=n(33655),l=n(1698);class d extends c.OperationTrait{action(){return this._meta.action}isSend(){return"subscribe"===this.action()}isReceive(){return"publish"===this.action()}servers(){const e=[],t=[];return this.channels().forEach((n=>{n.servers().forEach((n=>{t.includes(n.json())||(t.push(n.json()),e.push(n))}))})),new p.Servers(e)}channels(){const e=[];return Object.entries(this._meta.asyncapi.parsed.channels||{}).forEach((([t,n])=>{n.subscribe!==this._json&&n.publish!==this._json||e.push(this.createModel(r.Channel,n,{id:t,address:t,pointer:`/channels/${(0,l.tilde)(t)}`}))})),new i.Channels(e)}messages(){let e=!1,t=[];return this._json.message&&(Array.isArray(this._json.message.oneOf)?(t=this._json.message.oneOf,e=!0):t=[this._json.message]),new o.Messages(t.map(((t,n)=>this.createModel(s.Message,t,{id:"",pointer:`${this._meta.pointer}/message${e?`/oneOf/${n}`:""}`}))))}reply(){}traits(){return new a.OperationTraits((this._json.traits||[]).map(((e,t)=>this.createModel(c.OperationTrait,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`,action:""}))))}}t.Operation=d},55975:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operations=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.isSend()))}filterByReceive(){return this.filterBy((e=>e.isReceive()))}}t.Operations=r},90193:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Schema=void 0;const i=n(64864),r=n(11821),o=n(44886),s=n(52741);class a extends i.BaseModel{id(){return this.$id()||this._meta.id||this.json(r.xParserSchemaId)}$comment(){if("boolean"!=typeof this._json)return this._json.$comment}$id(){if("boolean"!=typeof this._json)return this._json.$id}$schema(){return"boolean"==typeof this._json?"http://json-schema.org/draft-07/schema#":this._json.$schema||"http://json-schema.org/draft-07/schema#"}additionalItems(){return"boolean"==typeof this._json?this._json:"boolean"==typeof this._json.additionalItems?this._json.additionalItems:void 0===this._json.additionalItems||null!==this._json.additionalItems&&this.createModel(a,this._json.additionalItems,{pointer:`${this._meta.pointer}/additionalItems`,parent:this})}additionalProperties(){return"boolean"==typeof this._json?this._json:"boolean"==typeof this._json.additionalProperties?this._json.additionalProperties:void 0===this._json.additionalProperties||null!==this._json.additionalProperties&&this.createModel(a,this._json.additionalProperties,{pointer:`${this._meta.pointer}/additionalProperties`,parent:this})}allOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.allOf))return this._json.allOf.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/allOf/${t}`,parent:this})))}anyOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.anyOf))return this._json.anyOf.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/anyOf/${t}`,parent:this})))}const(){if("boolean"!=typeof this._json)return this._json.const}contains(){if("boolean"!=typeof this._json&&"object"==typeof this._json.contains)return this.createModel(a,this._json.contains,{pointer:`${this._meta.pointer}/contains`,parent:this})}contentEncoding(){if("boolean"!=typeof this._json)return this._json.contentEncoding}contentMediaType(){if("boolean"!=typeof this._json)return this._json.contentMediaType}default(){if("boolean"!=typeof this._json)return this._json.default}definitions(){if("boolean"!=typeof this._json&&"object"==typeof this._json.definitions)return Object.entries(this._json.definitions).reduce(((e,[t,n])=>(e[t]=this.createModel(a,n,{pointer:`${this._meta.pointer}/definitions/${t}`,parent:this}),e)),{})}description(){if("boolean"!=typeof this._json)return this._json.description}dependencies(){if("boolean"!=typeof this._json&&"object"==typeof this._json.dependencies)return Object.entries(this._json.dependencies).reduce(((e,[t,n])=>(e[t]=Array.isArray(n)?n:this.createModel(a,n,{pointer:`${this._meta.pointer}/dependencies/${t}`,parent:this}),e)),{})}deprecated(){return"boolean"!=typeof this._json&&(this._json.deprecated||!1)}discriminator(){if("boolean"!=typeof this._json)return this._json.discriminator}else(){if("boolean"!=typeof this._json&&"object"==typeof this._json.else)return this.createModel(a,this._json.else,{pointer:`${this._meta.pointer}/else`,parent:this})}enum(){if("boolean"!=typeof this._json)return this._json.enum}examples(){if("boolean"!=typeof this._json)return this._json.examples}exclusiveMaximum(){if("boolean"!=typeof this._json)return this._json.exclusiveMaximum}exclusiveMinimum(){if("boolean"!=typeof this._json)return this._json.exclusiveMinimum}format(){if("boolean"!=typeof this._json)return this._json.format}isBooleanSchema(){return"boolean"==typeof this._json}if(){if("boolean"!=typeof this._json&&"object"==typeof this._json.if)return this.createModel(a,this._json.if,{pointer:`${this._meta.pointer}/if`,parent:this})}isCircular(){let e=this._meta.parent;for(;e;){if(e._json===this._json)return!0;e=e._meta.parent}return!1}items(){if("boolean"!=typeof this._json&&"object"==typeof this._json.items)return Array.isArray(this._json.items)?this._json.items.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/items/${t}`,parent:this}))):this.createModel(a,this._json.items,{pointer:`${this._meta.pointer}/items`,parent:this})}maximum(){if("boolean"!=typeof this._json)return this._json.maximum}maxItems(){if("boolean"!=typeof this._json)return this._json.maxItems}maxLength(){if("boolean"!=typeof this._json)return this._json.maxLength}maxProperties(){if("boolean"!=typeof this._json)return this._json.maxProperties}minimum(){if("boolean"!=typeof this._json)return this._json.minimum}minItems(){if("boolean"!=typeof this._json)return this._json.minItems}minLength(){if("boolean"!=typeof this._json)return this._json.minLength}minProperties(){if("boolean"!=typeof this._json)return this._json.minProperties}multipleOf(){if("boolean"!=typeof this._json)return this._json.multipleOf}not(){if("boolean"!=typeof this._json&&"object"==typeof this._json.not)return this.createModel(a,this._json.not,{pointer:`${this._meta.pointer}/not`,parent:this})}oneOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.oneOf))return this._json.oneOf.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/oneOf/${t}`,parent:this})))}pattern(){if("boolean"!=typeof this._json)return this._json.pattern}patternProperties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.patternProperties)return Object.entries(this._json.patternProperties).reduce(((e,[t,n])=>(e[t]=this.createModel(a,n,{pointer:`${this._meta.pointer}/patternProperties/${t}`,parent:this}),e)),{})}properties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties)return Object.entries(this._json.properties).reduce(((e,[t,n])=>(e[t]=this.createModel(a,n,{pointer:`${this._meta.pointer}/properties/${t}`,parent:this}),e)),{})}property(e){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties&&"object"==typeof this._json.properties[e])return this.createModel(a,this._json.properties[e],{pointer:`${this._meta.pointer}/properties/${e}`,parent:this})}propertyNames(){if("boolean"!=typeof this._json&&"object"==typeof this._json.propertyNames)return this.createModel(a,this._json.propertyNames,{pointer:`${this._meta.pointer}/propertyNames`,parent:this})}readOnly(){return"boolean"!=typeof this._json&&(this._json.readOnly||!1)}required(){if("boolean"!=typeof this._json)return this._json.required}schemaFormat(){return this._meta.schemaFormat||(0,s.getDefaultSchemaFormat)(this._meta.asyncapi.semver.version)}then(){if("boolean"!=typeof this._json&&"object"==typeof this._json.then)return this.createModel(a,this._json.then,{pointer:`${this._meta.pointer}/then`,parent:this})}title(){if("boolean"!=typeof this._json)return this._json.title}type(){if("boolean"!=typeof this._json)return this._json.type}uniqueItems(){return"boolean"!=typeof this._json&&(this._json.uniqueItems||!1)}writeOnly(){return"boolean"!=typeof this._json&&(this._json.writeOnly||!1)}hasExternalDocs(){return(0,o.hasExternalDocs)(this)}externalDocs(){return(0,o.externalDocs)(this)}extensions(){return(0,o.extensions)(this)}}t.Schema=a},31943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Schemas=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.Schemas=r},41975:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityRequirement=void 0;const i=n(64864);class r extends i.BaseModel{scheme(){return this._json.scheme}scopes(){return this._json.scopes||[]}}t.SecurityRequirement=r},1631:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityRequirements=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.meta("id")===e))}}t.SecurityRequirements=r},67695:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityScheme=void 0;const i=n(64864),r=n(47865),o=n(44886);class s extends i.BaseModel{id(){return this._meta.id}type(){return this._json.type}hasDescription(){return(0,o.hasDescription)(this)}description(){return(0,o.description)(this)}hasName(){return!!this._json.name}name(){return this._json.name}hasIn(){return!!this._json.in}in(){return this._json.in}hasScheme(){return!!this._json.scheme}scheme(){return this._json.scheme}hasBearerFormat(){return!!this._json.bearerFormat}bearerFormat(){return this._json.bearerFormat}hasFlows(){return!!this._json.flows}flows(){if(this._json.flows)return new r.OAuthFlows(this._json.flows)}hasOpenIdConnectUrl(){return!!this._json.openIdConnectUrl}openIdConnectUrl(){return this._json.openIdConnectUrl}extensions(){return(0,o.extensions)(this)}}t.SecurityScheme=s},50739:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecuritySchemes=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.SecuritySchemes=r},87126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerVariable=void 0;const i=n(64864),r=n(44886);class o extends i.BaseModel{id(){return this._meta.id}hasDescription(){return(0,r.hasDescription)(this)}description(){return(0,r.description)(this)}hasDefaultValue(){return!!this._json.default}defaultValue(){return this._json.default}hasAllowedValues(){return!!this._json.enum}allowedValues(){return this._json.enum||[]}examples(){return this._json.examples||[]}extensions(){return(0,r.extensions)(this)}}t.ServerVariable=o},48510:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerVariables=void 0;const i=n(60323);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.ServerVariables=r},3813:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Server=void 0;const i=n(64864),r=n(91346),o=n(13133),s=n(57868),a=n(55975),c=n(67695),p=n(48510),l=n(87126),d=n(1631),u=n(41975),f=n(44886),m=n(1698);class h extends i.BaseModel{id(){return this._meta.id}url(){return this._json.url}host(){return new URL(this.url()).host}hasPathname(){return!!this.pathname()}pathname(){return new URL(this.url()).pathname}protocol(){return this._json.protocol}hasProtocolVersion(){return!!this._json.protocolVersion}protocolVersion(){return this._json.protocolVersion}hasDescription(){return(0,f.hasDescription)(this)}description(){return(0,f.description)(this)}channels(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,n])=>{const i=n.servers||[];(0===i.length||i.includes(this._meta.id))&&t.push(this.createModel(o.Channel,n,{id:e,address:e,pointer:`/channels/${(0,m.tilde)(e)}`}))})),new r.Channels(t)}operations(){const e=[];return this.channels().forEach((t=>{e.push(...t.operations().all())})),new a.Operations(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new s.Messages(e)}variables(){return new p.ServerVariables(Object.entries(this._json.variables||{}).map((([e,t])=>this.createModel(l.ServerVariable,t,{id:e,pointer:`${this._meta.pointer}/variables/${e}`}))))}security(){var e,t,n,i;const r=(null===(i=null===(n=null===(t=null===(e=this._meta)||void 0===e?void 0:e.asyncapi)||void 0===t?void 0:t.parsed)||voi