@redocly/openapi-docs 3.9.0 → 3.9.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.
@@ -2,7 +2,7 @@
2
2
  * Redocly OpenAPI Docs
3
3
  * (c) Copyright 2018 Redocly LLC, all rights reserved.
4
4
  * -------------------------------------------------------------
5
- * Version: "3.9.0-next.4"
5
+ * Version: "3.9.1"
6
6
  */(function(Du,Lc){typeof exports=="object"&&typeof module=="object"?module.exports=Lc(require("null")):typeof define=="function"&&define.amd?define(["null"],Lc):typeof exports=="object"?exports.RedoclyOpenAPIDocs=Lc(require("null")):Du.RedoclyOpenAPIDocs=Lc(Du.null)})(this,Op=>(()=>{var Du={61203:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const o=e(85968),p=e(96735),u=e(67104),y=e(48226),c="https://json-schema.org/draft/2020-12/schema";class f extends o.default{constructor(P={}){super({...P,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),p.default.forEach(P=>this.addVocabulary(P)),this.opts.discriminator&&this.addKeyword(u.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:P,meta:C}=this.opts;C&&(y.default.call(this,P),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}O.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var d=e(9804);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var g=e(57287);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return g._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return g.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return g.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return g.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return g.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return g.CodeGen}})},76202:(O,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0,t._=u,t.str=c,t.addCodeArg=f,t.strConcat=v,t.stringify=C,t.safeStringify=S,t.getProperty=I,t.getEsmExportName=x,t.regexpCode=n;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class o extends e{constructor(a){if(super(),!t.IDENTIFIER.test(a))throw new Error("CodeGen: name must be a valid identifier");this.str=a}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=o;class p extends e{constructor(a){super(),this._items=typeof a=="string"?[a]:a}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const a=this._items[0];return a===""||a==='""'}get str(){var a;return(a=this._str)!==null&&a!==void 0?a:this._str=this._items.reduce((M,b)=>`${M}${b}`,"")}get names(){var a;return(a=this._names)!==null&&a!==void 0?a:this._names=this._items.reduce((M,b)=>(b instanceof o&&(M[b.str]=(M[b.str]||0)+1),M),{})}}t._Code=p,t.nil=new p("");function u(l,...a){const M=[l[0]];let b=0;for(;b<a.length;)f(M,a[b]),M.push(l[++b]);return new p(M)}const y=new p("+");function c(l,...a){const M=[S(l[0])];let b=0;for(;b<a.length;)M.push(y),f(M,a[b]),M.push(y,S(l[++b]));return d(M),new p(M)}function f(l,a){a instanceof p?l.push(...a._items):a instanceof o?l.push(a):l.push(P(a))}function d(l){let a=1;for(;a<l.length-1;){if(l[a]===y){const M=g(l[a-1],l[a+1]);if(M!==void 0){l.splice(a-1,3,M);continue}l[a++]="+"}a++}}function g(l,a){if(a==='""')return l;if(l==='""')return a;if(typeof l=="string")return a instanceof o||l[l.length-1]!=='"'?void 0:typeof a!="string"?`${l.slice(0,-1)}${a}"`:a[0]==='"'?l.slice(0,-1)+a.slice(1):void 0;if(typeof a=="string"&&a[0]==='"'&&!(l instanceof o))return`"${l}${a.slice(1)}`}function v(l,a){return a.emptyStr()?l:l.emptyStr()?a:c`${l}${a}`}function P(l){return typeof l=="number"||typeof l=="boolean"||l===null?l:S(Array.isArray(l)?l.join(","):l)}function C(l){return new p(S(l))}function S(l){return JSON.stringify(l).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function I(l){return typeof l=="string"&&t.IDENTIFIER.test(l)?new p(`.${l}`):u`[${l}]`}function x(l){if(typeof l=="string"&&t.IDENTIFIER.test(l))return new p(`${l}`);throw new Error(`CodeGen: invalid export name: ${l}, use explicit $id name mapping`)}function n(l){return new p(l.toString())}},57287:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0,t.not=me,t.and=xe,t.or=se;const o=e(76202),p=e(34863);var u=e(76202);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return u.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return u.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return u.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}});var y=e(34863);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return y.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return y.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return y.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return y.varKinds}}),t.operators={GT:new o._Code(">"),GTE:new o._Code(">="),LT:new o._Code("<"),LTE:new o._Code("<="),EQ:new o._Code("==="),NEQ:new o._Code("!=="),NOT:new o._Code("!"),OR:new o._Code("||"),AND:new o._Code("&&"),ADD:new o._Code("+")};class c{optimizeNodes(){return this}optimizeNames(Q,ue){return this}}class f extends c{constructor(Q,ue,he){super(),this.varKind=Q,this.name=ue,this.rhs=he}render({es5:Q,_n:ue}){const he=Q?p.varKinds.var:this.varKind,Me=this.rhs===void 0?"":` = ${this.rhs}`;return`${he} ${this.name}${Me};`+ue}optimizeNames(Q,ue){if(Q[this.name.str])return this.rhs&&(this.rhs=N(this.rhs,Q,ue)),this}get names(){return this.rhs instanceof o._CodeOrName?this.rhs.names:{}}}class d extends c{constructor(Q,ue,he){super(),this.lhs=Q,this.rhs=ue,this.sideEffects=he}render({_n:Q}){return`${this.lhs} = ${this.rhs};`+Q}optimizeNames(Q,ue){if(!(this.lhs instanceof o.Name&&!Q[this.lhs.str]&&!this.sideEffects))return this.rhs=N(this.rhs,Q,ue),this}get names(){const Q=this.lhs instanceof o.Name?{}:{...this.lhs.names};return Y(Q,this.rhs)}}class g extends d{constructor(Q,ue,he,Me){super(Q,he,Me),this.op=ue}render({_n:Q}){return`${this.lhs} ${this.op}= ${this.rhs};`+Q}}class v extends c{constructor(Q){super(),this.label=Q,this.names={}}render({_n:Q}){return`${this.label}:`+Q}}class P extends c{constructor(Q){super(),this.label=Q,this.names={}}render({_n:Q}){return`break${this.label?` ${this.label}`:""};`+Q}}class C extends c{constructor(Q){super(),this.error=Q}render({_n:Q}){return`throw ${this.error};`+Q}get names(){return this.error.names}}class S extends c{constructor(Q){super(),this.code=Q}render({_n:Q}){return`${this.code};`+Q}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(Q,ue){return this.code=N(this.code,Q,ue),this}get names(){return this.code instanceof o._CodeOrName?this.code.names:{}}}class I extends c{constructor(Q=[]){super(),this.nodes=Q}render(Q){return this.nodes.reduce((ue,he)=>ue+he.render(Q),"")}optimizeNodes(){const{nodes:Q}=this;let ue=Q.length;for(;ue--;){const he=Q[ue].optimizeNodes();Array.isArray(he)?Q.splice(ue,1,...he):he?Q[ue]=he:Q.splice(ue,1)}return Q.length>0?this:void 0}optimizeNames(Q,ue){const{nodes:he}=this;let Me=he.length;for(;Me--;){const ze=he[Me];ze.optimizeNames(Q,ue)||(oe(Q,ze.names),he.splice(Me,1))}return he.length>0?this:void 0}get names(){return this.nodes.reduce((Q,ue)=>J(Q,ue.names),{})}}class x extends I{render(Q){return"{"+Q._n+super.render(Q)+"}"+Q._n}}class n extends I{}class l extends x{}l.kind="else";class a extends x{constructor(Q,ue){super(ue),this.condition=Q}render(Q){let ue=`if(${this.condition})`+super.render(Q);return this.else&&(ue+="else "+this.else.render(Q)),ue}optimizeNodes(){super.optimizeNodes();const Q=this.condition;if(Q===!0)return this.nodes;let ue=this.else;if(ue){const he=ue.optimizeNodes();ue=this.else=Array.isArray(he)?new l(he):he}if(ue)return Q===!1?ue instanceof a?ue:ue.nodes:this.nodes.length?this:new a(me(Q),ue instanceof a?[ue]:ue.nodes);if(!(Q===!1||!this.nodes.length))return this}optimizeNames(Q,ue){var he;if(this.else=(he=this.else)===null||he===void 0?void 0:he.optimizeNames(Q,ue),!!(super.optimizeNames(Q,ue)||this.else))return this.condition=N(this.condition,Q,ue),this}get names(){const Q=super.names;return Y(Q,this.condition),this.else&&J(Q,this.else.names),Q}}a.kind="if";class M extends x{}M.kind="for";class b extends M{constructor(Q){super(),this.iteration=Q}render(Q){return`for(${this.iteration})`+super.render(Q)}optimizeNames(Q,ue){if(super.optimizeNames(Q,ue))return this.iteration=N(this.iteration,Q,ue),this}get names(){return J(super.names,this.iteration.names)}}class R extends M{constructor(Q,ue,he,Me){super(),this.varKind=Q,this.name=ue,this.from=he,this.to=Me}render(Q){const ue=Q.es5?p.varKinds.var:this.varKind,{name:he,from:Me,to:ze}=this;return`for(${ue} ${he}=${Me}; ${he}<${ze}; ${he}++)`+super.render(Q)}get names(){const Q=Y(super.names,this.from);return Y(Q,this.to)}}class D extends M{constructor(Q,ue,he,Me){super(),this.loop=Q,this.varKind=ue,this.name=he,this.iterable=Me}render(Q){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(Q)}optimizeNames(Q,ue){if(super.optimizeNames(Q,ue))return this.iterable=N(this.iterable,Q,ue),this}get names(){return J(super.names,this.iterable.names)}}class w extends x{constructor(Q,ue,he){super(),this.name=Q,this.args=ue,this.async=he}render(Q){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(Q)}}w.kind="func";class j extends I{render(Q){return"return "+super.render(Q)}}j.kind="return";class $ extends x{render(Q){let ue="try"+super.render(Q);return this.catch&&(ue+=this.catch.render(Q)),this.finally&&(ue+=this.finally.render(Q)),ue}optimizeNodes(){var Q,ue;return super.optimizeNodes(),(Q=this.catch)===null||Q===void 0||Q.optimizeNodes(),(ue=this.finally)===null||ue===void 0||ue.optimizeNodes(),this}optimizeNames(Q,ue){var he,Me;return super.optimizeNames(Q,ue),(he=this.catch)===null||he===void 0||he.optimizeNames(Q,ue),(Me=this.finally)===null||Me===void 0||Me.optimizeNames(Q,ue),this}get names(){const Q=super.names;return this.catch&&J(Q,this.catch.names),this.finally&&J(Q,this.finally.names),Q}}class T extends x{constructor(Q){super(),this.error=Q}render(Q){return`catch(${this.error})`+super.render(Q)}}T.kind="catch";class W extends x{render(Q){return"finally"+super.render(Q)}}W.kind="finally";class U{constructor(Q,ue={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...ue,_n:ue.lines?`
7
7
  `:""},this._extScope=Q,this._scope=new p.Scope({parent:Q}),this._nodes=[new n]}toString(){return this._root.render(this.opts)}name(Q){return this._scope.name(Q)}scopeName(Q){return this._extScope.name(Q)}scopeValue(Q,ue){const he=this._extScope.value(Q,ue);return(this._values[he.prefix]||(this._values[he.prefix]=new Set)).add(he),he}getScopeValue(Q,ue){return this._extScope.getValue(Q,ue)}scopeRefs(Q){return this._extScope.scopeRefs(Q,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(Q,ue,he,Me){const ze=this._scope.toName(ue);return he!==void 0&&Me&&(this._constants[ze.str]=he),this._leafNode(new f(Q,ze,he)),ze}const(Q,ue,he){return this._def(p.varKinds.const,Q,ue,he)}let(Q,ue,he){return this._def(p.varKinds.let,Q,ue,he)}var(Q,ue,he){return this._def(p.varKinds.var,Q,ue,he)}assign(Q,ue,he){return this._leafNode(new d(Q,ue,he))}add(Q,ue){return this._leafNode(new g(Q,t.operators.ADD,ue))}code(Q){return typeof Q=="function"?Q():Q!==o.nil&&this._leafNode(new S(Q)),this}object(...Q){const ue=["{"];for(const[he,Me]of Q)ue.length>1&&ue.push(","),ue.push(he),(he!==Me||this.opts.es5)&&(ue.push(":"),(0,o.addCodeArg)(ue,Me));return ue.push("}"),new o._Code(ue)}if(Q,ue,he){if(this._blockNode(new a(Q)),ue&&he)this.code(ue).else().code(he).endIf();else if(ue)this.code(ue).endIf();else if(he)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(Q){return this._elseNode(new a(Q))}else(){return this._elseNode(new l)}endIf(){return this._endBlockNode(a,l)}_for(Q,ue){return this._blockNode(Q),ue&&this.code(ue).endFor(),this}for(Q,ue){return this._for(new b(Q),ue)}forRange(Q,ue,he,Me,ze=this.opts.es5?p.varKinds.var:p.varKinds.let){const ke=this._scope.toName(Q);return this._for(new R(ze,ke,ue,he),()=>Me(ke))}forOf(Q,ue,he,Me=p.varKinds.const){const ze=this._scope.toName(Q);if(this.opts.es5){const ke=ue instanceof o.Name?ue:this.var("_arr",ue);return this.forRange("_i",0,(0,o._)`${ke}.length`,ot=>{this.var(ze,(0,o._)`${ke}[${ot}]`),he(ze)})}return this._for(new D("of",Me,ze,ue),()=>he(ze))}forIn(Q,ue,he,Me=this.opts.es5?p.varKinds.var:p.varKinds.const){if(this.opts.ownProperties)return this.forOf(Q,(0,o._)`Object.keys(${ue})`,he);const ze=this._scope.toName(Q);return this._for(new D("in",Me,ze,ue),()=>he(ze))}endFor(){return this._endBlockNode(M)}label(Q){return this._leafNode(new v(Q))}break(Q){return this._leafNode(new P(Q))}return(Q){const ue=new j;if(this._blockNode(ue),this.code(Q),ue.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(j)}try(Q,ue,he){if(!ue&&!he)throw new Error('CodeGen: "try" without "catch" and "finally"');const Me=new $;if(this._blockNode(Me),this.code(Q),ue){const ze=this.name("e");this._currNode=Me.catch=new T(ze),ue(ze)}return he&&(this._currNode=Me.finally=new W,this.code(he)),this._endBlockNode(T,W)}throw(Q){return this._leafNode(new C(Q))}block(Q,ue){return this._blockStarts.push(this._nodes.length),Q&&this.code(Q).endBlock(ue),this}endBlock(Q){const ue=this._blockStarts.pop();if(ue===void 0)throw new Error("CodeGen: not in self-balancing block");const he=this._nodes.length-ue;if(he<0||Q!==void 0&&he!==Q)throw new Error(`CodeGen: wrong number of nodes: ${he} vs ${Q} expected`);return this._nodes.length=ue,this}func(Q,ue=o.nil,he,Me){return this._blockNode(new w(Q,ue,he)),Me&&this.code(Me).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(Q=1){for(;Q-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(Q){return this._currNode.nodes.push(Q),this}_blockNode(Q){this._currNode.nodes.push(Q),this._nodes.push(Q)}_endBlockNode(Q,ue){const he=this._currNode;if(he instanceof Q||ue&&he instanceof ue)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${ue?`${Q.kind}/${ue.kind}`:Q.kind}"`)}_elseNode(Q){const ue=this._currNode;if(!(ue instanceof a))throw new Error('CodeGen: "else" without "if"');return this._currNode=ue.else=Q,this}get _root(){return this._nodes[0]}get _currNode(){const Q=this._nodes;return Q[Q.length-1]}set _currNode(Q){const ue=this._nodes;ue[ue.length-1]=Q}}t.CodeGen=U;function J(ee,Q){for(const ue in Q)ee[ue]=(ee[ue]||0)+(Q[ue]||0);return ee}function Y(ee,Q){return Q instanceof o._CodeOrName?J(ee,Q.names):ee}function N(ee,Q,ue){if(ee instanceof o.Name)return he(ee);if(!Me(ee))return ee;return new o._Code(ee._items.reduce((ze,ke)=>(ke instanceof o.Name&&(ke=he(ke)),ke instanceof o._Code?ze.push(...ke._items):ze.push(ke),ze),[]));function he(ze){const ke=ue[ze.str];return ke===void 0||Q[ze.str]!==1?ze:(delete Q[ze.str],ke)}function Me(ze){return ze instanceof o._Code&&ze._items.some(ke=>ke instanceof o.Name&&Q[ke.str]===1&&ue[ke.str]!==void 0)}}function oe(ee,Q){for(const ue in Q)ee[ue]=(ee[ue]||0)-(Q[ue]||0)}function me(ee){return typeof ee=="boolean"||typeof ee=="number"||ee===null?!ee:(0,o._)`!${G(ee)}`}const ie=z(t.operators.AND);function xe(...ee){return ee.reduce(ie)}const de=z(t.operators.OR);function se(...ee){return ee.reduce(de)}function z(ee){return(Q,ue)=>Q===o.nil?ue:ue===o.nil?Q:(0,o._)`${G(Q)} ${ee} ${G(ue)}`}function G(ee){return ee instanceof o.Name?ee:(0,o._)`(${ee})`}},34863:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const o=e(76202);class p extends Error{constructor(v){super(`CodeGen: "code" for ${v} not defined`),this.value=v.value}}var u;(function(g){g[g.Started=0]="Started",g[g.Completed=1]="Completed"})(u||(t.UsedValueState=u={})),t.varKinds={const:new o.Name("const"),let:new o.Name("let"),var:new o.Name("var")};class y{constructor({prefixes:v,parent:P}={}){this._names={},this._prefixes=v,this._parent=P}toName(v){return v instanceof o.Name?v:this.name(v)}name(v){return new o.Name(this._newName(v))}_newName(v){const P=this._names[v]||this._nameGroup(v);return`${v}${P.index++}`}_nameGroup(v){var P,C;if(!((C=(P=this._parent)===null||P===void 0?void 0:P._prefixes)===null||C===void 0)&&C.has(v)||this._prefixes&&!this._prefixes.has(v))throw new Error(`CodeGen: prefix "${v}" is not allowed in this scope`);return this._names[v]={prefix:v,index:0}}}t.Scope=y;class c extends o.Name{constructor(v,P){super(P),this.prefix=v}setValue(v,{property:P,itemIndex:C}){this.value=v,this.scopePath=(0,o._)`.${new o.Name(P)}[${C}]`}}t.ValueScopeName=c;const f=(0,o._)`\n`;class d extends y{constructor(v){super(v),this._values={},this._scope=v.scope,this.opts={...v,_n:v.lines?f:o.nil}}get(){return this._scope}name(v){return new c(v,this._newName(v))}value(v,P){var C;if(P.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const S=this.toName(v),{prefix:I}=S,x=(C=P.key)!==null&&C!==void 0?C:P.ref;let n=this._values[I];if(n){const M=n.get(x);if(M)return M}else n=this._values[I]=new Map;n.set(x,S);const l=this._scope[I]||(this._scope[I]=[]),a=l.length;return l[a]=P.ref,S.setValue(P,{property:I,itemIndex:a}),S}getValue(v,P){const C=this._values[v];if(C)return C.get(P)}scopeRefs(v,P=this._values){return this._reduceValues(P,C=>{if(C.scopePath===void 0)throw new Error(`CodeGen: name "${C}" has no value`);return(0,o._)`${v}${C.scopePath}`})}scopeCode(v=this._values,P,C){return this._reduceValues(v,S=>{if(S.value===void 0)throw new Error(`CodeGen: name "${S}" has no value`);return S.value.code},P,C)}_reduceValues(v,P,C={},S){let I=o.nil;for(const x in v){const n=v[x];if(!n)continue;const l=C[x]=C[x]||new Map;n.forEach(a=>{if(l.has(a))return;l.set(a,u.Started);let M=P(a);if(M){const b=this.opts.es5?t.varKinds.var:t.varKinds.const;I=(0,o._)`${I}${b} ${a} = ${M};${this.opts._n}`}else if(M=S?.(a))I=(0,o._)`${I}${M}${this.opts._n}`;else throw new p(a);l.set(a,u.Completed)})}return I}}t.ValueScope=d},39054:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keyword$DataError=t.keywordError=void 0,t.reportError=y,t.reportExtraError=c,t.resetErrorsCount=f,t.extendErrors=d;const o=e(57287),p=e(977),u=e(5057);t.keywordError={message:({keyword:l})=>(0,o.str)`must pass "${l}" keyword validation`},t.keyword$DataError={message:({keyword:l,schemaType:a})=>a?(0,o.str)`"${l}" keyword must be ${a} ($data)`:(0,o.str)`"${l}" keyword is invalid ($data)`};function y(l,a=t.keywordError,M,b){const{it:R}=l,{gen:D,compositeRule:w,allErrors:j}=R,$=C(l,a,M);b??(w||j)?g(D,$):v(R,(0,o._)`[${$}]`)}function c(l,a=t.keywordError,M){const{it:b}=l,{gen:R,compositeRule:D,allErrors:w}=b,j=C(l,a,M);g(R,j),D||w||v(b,u.default.vErrors)}function f(l,a){l.assign(u.default.errors,a),l.if((0,o._)`${u.default.vErrors} !== null`,()=>l.if(a,()=>l.assign((0,o._)`${u.default.vErrors}.length`,a),()=>l.assign(u.default.vErrors,null)))}function d({gen:l,keyword:a,schemaValue:M,data:b,errsCount:R,it:D}){if(R===void 0)throw new Error("ajv implementation error");const w=l.name("err");l.forRange("i",R,u.default.errors,j=>{l.const(w,(0,o._)`${u.default.vErrors}[${j}]`),l.if((0,o._)`${w}.instancePath === undefined`,()=>l.assign((0,o._)`${w}.instancePath`,(0,o.strConcat)(u.default.instancePath,D.errorPath))),l.assign((0,o._)`${w}.schemaPath`,(0,o.str)`${D.errSchemaPath}/${a}`),D.opts.verbose&&(l.assign((0,o._)`${w}.schema`,M),l.assign((0,o._)`${w}.data`,b))})}function g(l,a){const M=l.const("err",a);l.if((0,o._)`${u.default.vErrors} === null`,()=>l.assign(u.default.vErrors,(0,o._)`[${M}]`),(0,o._)`${u.default.vErrors}.push(${M})`),l.code((0,o._)`${u.default.errors}++`)}function v(l,a){const{gen:M,validateName:b,schemaEnv:R}=l;R.$async?M.throw((0,o._)`new ${l.ValidationError}(${a})`):(M.assign((0,o._)`${b}.errors`,a),M.return(!1))}const P={keyword:new o.Name("keyword"),schemaPath:new o.Name("schemaPath"),params:new o.Name("params"),propertyName:new o.Name("propertyName"),message:new o.Name("message"),schema:new o.Name("schema"),parentSchema:new o.Name("parentSchema")};function C(l,a,M){const{createErrors:b}=l.it;return b===!1?(0,o._)`{}`:S(l,a,M)}function S(l,a,M={}){const{gen:b,it:R}=l,D=[I(R,M),x(l,M)];return n(l,a,D),b.object(...D)}function I({errorPath:l},{instancePath:a}){const M=a?(0,o.str)`${l}${(0,p.getErrorPath)(a,p.Type.Str)}`:l;return[u.default.instancePath,(0,o.strConcat)(u.default.instancePath,M)]}function x({keyword:l,it:{errSchemaPath:a}},{schemaPath:M,parentSchema:b}){let R=b?a:(0,o.str)`${a}/${l}`;return M&&(R=(0,o.str)`${R}${(0,p.getErrorPath)(M,p.Type.Str)}`),[P.schemaPath,R]}function n(l,{params:a,message:M},b){const{keyword:R,data:D,schemaValue:w,it:j}=l,{opts:$,propertyName:T,topSchemaRef:W,schemaPath:U}=j;b.push([P.keyword,R],[P.params,typeof a=="function"?a(l):a||(0,o._)`{}`]),$.messages&&b.push([P.message,typeof M=="function"?M(l):M]),$.verbose&&b.push([P.schema,w],[P.parentSchema,(0,o._)`${W}${U}`],[u.default.data,D]),T&&b.push([P.propertyName,T])}},65545:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaEnv=void 0,t.compileSchema=g,t.resolveRef=v,t.getCompilingSchema=C,t.resolveSchema=x;const o=e(57287),p=e(84012),u=e(5057),y=e(95421),c=e(977),f=e(9804);class d{constructor(M){var b;this.refs={},this.dynamicAnchors={};let R;typeof M.schema=="object"&&(R=M.schema),this.schema=M.schema,this.schemaId=M.schemaId,this.root=M.root||this,this.baseId=(b=M.baseId)!==null&&b!==void 0?b:(0,y.normalizeId)(R?.[M.schemaId||"$id"]),this.schemaPath=M.schemaPath,this.localRefs=M.localRefs,this.meta=M.meta,this.$async=R?.$async,this.refs={}}}t.SchemaEnv=d;function g(a){const M=C.call(this,a);if(M)return M;const b=(0,y.getFullPath)(this.opts.uriResolver,a.root.baseId),{es5:R,lines:D}=this.opts.code,{ownProperties:w}=this.opts,j=new o.CodeGen(this.scope,{es5:R,lines:D,ownProperties:w});let $;a.$async&&($=j.scopeValue("Error",{ref:p.default,code:(0,o._)`require("ajv/dist/runtime/validation_error").default`}));const T=j.scopeName("validate");a.validateName=T;const W={gen:j,allErrors:this.opts.allErrors,data:u.default.data,parentData:u.default.parentData,parentDataProperty:u.default.parentDataProperty,dataNames:[u.default.data],dataPathArr:[o.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:j.scopeValue("schema",this.opts.code.source===!0?{ref:a.schema,code:(0,o.stringify)(a.schema)}:{ref:a.schema}),validateName:T,ValidationError:$,schema:a.schema,schemaEnv:a,rootId:b,baseId:a.baseId||b,schemaPath:o.nil,errSchemaPath:a.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,o._)`""`,opts:this.opts,self:this};let U;try{this._compilations.add(a),(0,f.validateFunctionCode)(W),j.optimize(this.opts.code.optimize);const J=j.toString();U=`const visitedNodesForRef = new WeakMap(); ${j.scopeRefs(u.default.scope)}return ${J}`,this.opts.code.process&&(U=this.opts.code.process(U,a));const N=new Function(`${u.default.self}`,`${u.default.scope}`,U)(this,this.scope.get());if(this.scope.value(T,{ref:N}),N.errors=null,N.schema=a.schema,N.schemaEnv=a,a.$async&&(N.$async=!0),this.opts.code.source===!0&&(N.source={validateName:T,validateCode:J,scopeValues:j._values}),this.opts.unevaluated){const{props:oe,items:me}=W;N.evaluated={props:oe instanceof o.Name?void 0:oe,items:me instanceof o.Name?void 0:me,dynamicProps:oe instanceof o.Name,dynamicItems:me instanceof o.Name},N.source&&(N.source.evaluated=(0,o.stringify)(N.evaluated))}return a.validate=N,a}catch(J){throw delete a.validate,delete a.validateName,U&&this.logger.error("Error compiling schema, function code:",U),J}finally{this._compilations.delete(a)}}function v(a,M,b){var R;const D=(0,y.resolveUrl)(this.opts.uriResolver,M,b),w=a.refs[D];if(w)return w;let j=I.call(this,a,D);if(j===void 0){const $=(R=a.localRefs)===null||R===void 0?void 0:R[D],{schemaId:T}=this.opts;$&&(j=new d({schema:$,schemaId:T,root:a,baseId:M}))}if(j===void 0&&this.opts.loadSchemaSync){const $=this.opts.loadSchemaSync(M,b,D);$&&!(this.refs[D]||this.schemas[D])&&(this.addSchema($,D,void 0),j=I.call(this,a,D))}if(j!==void 0)return a.refs[D]=P.call(this,j)}function P(a){return(0,y.inlineRef)(a.schema,this.opts.inlineRefs)?a.schema:a.validate?a:g.call(this,a)}function C(a){for(const M of this._compilations)if(S(M,a))return M}function S(a,M){return a.schema===M.schema&&a.root===M.root&&a.baseId===M.baseId}function I(a,M){let b;for(;typeof(b=this.refs[M])=="string";)M=b;return b||this.schemas[M]||x.call(this,a,M)}function x(a,M){const b=this.opts.uriResolver.parse(M),R=(0,y._getFullPath)(this.opts.uriResolver,b);let D=(0,y.getFullPath)(this.opts.uriResolver,a.baseId,void 0);if(Object.keys(a.schema).length>0&&R===D)return l.call(this,b,a);const w=(0,y.normalizeId)(R),j=this.refs[w]||this.schemas[w];if(typeof j=="string"){const $=x.call(this,a,j);return typeof $?.schema!="object"?void 0:l.call(this,b,$)}if(typeof j?.schema=="object"){if(j.validate||g.call(this,j),w===(0,y.normalizeId)(M)){const{schema:$}=j,{schemaId:T}=this.opts,W=$[T];return W&&(D=(0,y.resolveUrl)(this.opts.uriResolver,D,W)),new d({schema:$,schemaId:T,root:a,baseId:D})}return l.call(this,b,j)}}const n=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function l(a,{baseId:M,schema:b,root:R}){var D;if(((D=a.fragment)===null||D===void 0?void 0:D[0])!=="/")return;for(const $ of a.fragment.slice(1).split("/")){if(typeof b=="boolean")return;const T=b[(0,c.unescapeFragment)($)];if(T===void 0)return;b=T;const W=typeof b=="object"&&b[this.opts.schemaId];!n.has($)&&W&&(M=(0,y.resolveUrl)(this.opts.uriResolver,M,W))}let w;if(typeof b!="boolean"&&b.$ref&&!(0,c.schemaHasRulesButRef)(b,this.RULES)){const $=(0,y.resolveUrl)(this.opts.uriResolver,M,b.$ref);w=x.call(this,R,$)}const{schemaId:j}=this.opts;if(w=w||new d({schema:b,schemaId:j,root:R,baseId:M}),w.schema!==w.root.schema)return w}},5057:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=e(57287),p={data:new o.Name("data"),valCxt:new o.Name("valCxt"),instancePath:new o.Name("instancePath"),parentData:new o.Name("parentData"),parentDataProperty:new o.Name("parentDataProperty"),rootData:new o.Name("rootData"),dynamicAnchors:new o.Name("dynamicAnchors"),isAllOfVariant:new o.Name("isAllOfVariant"),vErrors:new o.Name("vErrors"),errors:new o.Name("errors"),this:new o.Name("this"),self:new o.Name("self"),scope:new o.Name("scope"),json:new o.Name("json"),jsonPos:new o.Name("jsonPos"),jsonLen:new o.Name("jsonLen"),jsonPart:new o.Name("jsonPart")};t.default=p},78805:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=e(95421);class p extends Error{constructor(y,c,f,d){super(d||`can't resolve reference ${f} from id ${c}`),this.missingRef=(0,o.resolveUrl)(y,c,f),this.missingSchema=(0,o.normalizeId)((0,o.getFullPath)(y,this.missingRef))}}t.default=p},95421:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inlineRef=c,t.getFullPath=v,t._getFullPath=P,t.normalizeId=S,t.resolveUrl=I,t.getSchemaRefs=n;const o=e(977),p=e(67371),u=e(50205),y=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(l,a=!0){return typeof l=="boolean"?!0:a===!0?!d(l):a?g(l)<=a:!1}const f=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function d(l){for(const a in l){if(f.has(a))return!0;const M=l[a];if(Array.isArray(M)&&M.some(d)||typeof M=="object"&&d(M))return!0}return!1}function g(l){let a=0;for(const M in l){if(M==="$ref")return 1/0;if(a++,!y.has(M)&&(typeof l[M]=="object"&&(0,o.eachItem)(l[M],b=>a+=g(b)),a===1/0))return 1/0}return a}function v(l,a="",M){M!==!1&&(a=S(a));const b=l.parse(a);return P(l,b)}function P(l,a){return l.serialize(a).split("#")[0]+"#"}const C=/#\/?$/;function S(l){return l?l.replace(C,""):""}function I(l,a,M){return M=S(M),l.resolve(a,M)}const x=/^[a-z_][-a-z0-9._]*$/i;function n(l,a){if(typeof l=="boolean")return{};const{schemaId:M,uriResolver:b}=this.opts,R=S(l[M]||a),D={"":R},w=v(b,R,!1),j={},$=new Set;return u(l,{allKeys:!0},(U,J,Y,N)=>{if(N===void 0)return;const oe=w+J;let me=D[N];typeof U[M]=="string"&&(me=ie.call(this,U[M])),xe.call(this,U.$anchor),xe.call(this,U.$dynamicAnchor),D[J]=me;function ie(de){const se=this.opts.uriResolver.resolve;if(de=S(me?se(me,de):de),$.has(de))throw W(de);$.add(de);let z=this.refs[de];return typeof z=="string"&&(z=this.refs[z]),typeof z=="object"?T(U,z.schema,de):de!==S(oe)&&(de[0]==="#"?(T(U,j[de],de),j[de]=U):this.refs[de]=oe),de}function xe(de){if(typeof de=="string"){if(!x.test(de))throw new Error(`invalid anchor "${de}"`);ie.call(this,`#${de}`)}}}),j;function T(U,J,Y){if(J!==void 0&&!p(U,J))throw W(Y)}function W(U){return new Error(`reference "${U}" resolves to more than one schema`)}}},90942:(O,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isJSONType=p,t.getRules=u;const e=["string","number","integer","boolean","null","object","array"],o=new Set(e);function p(y){return typeof y=="string"&&o.has(y)}function u(){const y={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...y,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},y.number,y.string,y.array,y.object],post:{rules:[]},all:{},keywords:{}}}},977:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Type=t.mergeEvaluated=void 0,t.toHash=u,t.alwaysValidSchema=y,t.checkUnknownRules=c,t.schemaHasRules=f,t.schemaHasRulesButRef=d,t.schemaRefOrVal=g,t.unescapeFragment=v,t.escapeFragment=P,t.escapeJsonPointer=C,t.unescapeJsonPointer=S,t.eachItem=I,t.evaluatedPropsToName=n,t.setEvaluated=l,t.useFunc=M,t.getErrorPath=R,t.checkStrictMode=D;const o=e(57287),p=e(76202);function u(w){const j={};for(const $ of w)j[$]=!0;return j}function y(w,j){return typeof j=="boolean"?j:Object.keys(j).length===0?!0:(c(w,j),!f(j,w.self.RULES.all))}function c(w,j=w.schema){const{opts:$,self:T}=w;if(!$.strictSchema||typeof j=="boolean")return;const W=T.RULES.keywords;for(const U in j)W[U]||D(w,`unknown keyword: "${U}"`)}function f(w,j){if(typeof w=="boolean")return!w;for(const $ in w)if(j[$])return!0;return!1}function d(w,j){if(typeof w=="boolean")return!w;for(const $ in w)if($!=="$ref"&&j.all[$])return!0;return!1}function g({topSchemaRef:w,schemaPath:j},$,T,W){if(!W){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return(0,o._)`${$}`}return(0,o._)`${w}${j}${(0,o.getProperty)(T)}`}function v(w){return S(decodeURIComponent(w))}function P(w){return encodeURIComponent(C(w))}function C(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}function S(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}function I(w,j){if(Array.isArray(w))for(const $ of w)j($);else j(w)}function x({mergeNames:w,mergeToName:j,mergeValues:$,resultToName:T}){return(W,U,J,Y)=>{const N=J===void 0?U:J instanceof o.Name?(U instanceof o.Name?w(W,U,J):j(W,U,J),J):U instanceof o.Name?(j(W,J,U),U):$(U,J);return Y===o.Name&&!(N instanceof o.Name)?T(W,N):N}}t.mergeEvaluated={props:x({mergeNames:(w,j,$)=>w.if((0,o._)`${$} !== true && ${j} !== undefined`,()=>{w.if((0,o._)`${j} === true`,()=>w.assign($,!0),()=>w.assign($,(0,o._)`${$} || {}`).code((0,o._)`Object.assign(${$}, ${j})`))}),mergeToName:(w,j,$)=>w.if((0,o._)`${$} !== true`,()=>{j===!0?w.assign($,!0):(w.assign($,(0,o._)`${$} || {}`),l(w,$,j))}),mergeValues:(w,j)=>w===!0?!0:{...w,...j},resultToName:n}),items:x({mergeNames:(w,j,$)=>w.if((0,o._)`${$} !== true && ${j} !== undefined`,()=>w.assign($,(0,o._)`${j} === true ? true : ${$} > ${j} ? ${$} : ${j}`)),mergeToName:(w,j,$)=>w.if((0,o._)`${$} !== true`,()=>w.assign($,j===!0?!0:(0,o._)`${$} > ${j} ? ${$} : ${j}`)),mergeValues:(w,j)=>w===!0?!0:Math.max(w,j),resultToName:(w,j)=>w.var("items",j)})};function n(w,j){if(j===!0)return w.var("props",!0);const $=w.var("props",(0,o._)`{}`);return j!==void 0&&l(w,$,j),$}function l(w,j,$){Object.keys($).forEach(T=>w.assign((0,o._)`${j}${(0,o.getProperty)(T)}`,!0))}const a={};function M(w,j){return w.scopeValue("func",{ref:j,code:a[j.code]||(a[j.code]=new p._Code(j.code))})}var b;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(b||(t.Type=b={}));function R(w,j,$){if(w instanceof o.Name){const T=j===b.Num;return $?T?(0,o._)`"[" + ${w} + "]"`:(0,o._)`"['" + ${w} + "']"`:T?(0,o._)`"/" + ${w}`:(0,o._)`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,o.getProperty)(w).toString():"/"+C(w)}function D(w,j,$=w.opts.strictSchema){if($){if(j=`strict mode: ${j}`,$===!0)throw new Error(j);w.self.logger.warn(j)}}},5413:(O,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schemaHasRulesForType=e,t.shouldUseGroup=o,t.shouldUseRule=p;function e({schema:u,self:y},c){const f=y.RULES.types[c];return f&&f!==!0&&o(u,f)}function o(u,y){return y.rules.some(c=>p(u,c))}function p(u,y){var c;return u[y.keyword]!==void 0||((c=y.definition.implements)===null||c===void 0?void 0:c.some(f=>u[f]!==void 0))}},98213:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.topBoolOrEmptySchema=c,t.boolOrEmptySchema=f;const o=e(39054),p=e(57287),u=e(5057),y={message:"boolean schema is false"};function c(g){const{gen:v,schema:P,validateName:C}=g;P===!1?d(g,!1):typeof P=="object"&&P.$async===!0?v.return(u.default.data):(v.assign((0,p._)`${C}.errors`,null),v.return(!0))}function f(g,v){const{gen:P,schema:C}=g;C===!1?(P.var(v,!1),d(g)):P.var(v,!0)}function d(g,v){const{gen:P,data:C}=g,S={gen:P,keyword:"false schema",data:C,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:g};(0,o.reportError)(S,y,void 0,v)}},41434:(O,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataType=void 0,t.getSchemaTypes=d,t.getJSONTypes=g,t.coerceAndCheckDataType=v,t.checkDataType=x,t.checkDataTypes=n,t.reportTypeError=a;const o=e(90942),p=e(5413),u=e(39054),y=e(57287),c=e(977);var f;(function(b){b[b.Correct=0]="Correct",b[b.Wrong=1]="Wrong"})(f||(t.DataType=f={}));function d(b){const R=g(b.type);if(R.includes("null")){if(b.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!R.length&&b.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');b.nullable===!0&&R.push("null")}return R}function g(b){const R=Array.isArray(b)?b:b?[b]:[];if(R.every(o.isJSONType))return R;throw new Error("type must be JSONType or JSONType[]: "+R.join(","))}function v(b,R){const{gen:D,data:w,opts:j}=b,$=C(R,j.coerceTypes),T=R.length>0&&!($.length===0&&R.length===1&&(0,p.schemaHasRulesForType)(b,R[0]));if(T){const W=n(R,w,j.strictNumbers,f.Wrong);D.if(W,()=>{$.length?S(b,R,$):a(b)})}return T}const P=new Set(["string","number","integer","boolean","null"]);function C(b,R){return R?b.filter(D=>P.has(D)||R==="array"&&D==="array"):[]}function S(b,R,D){const{gen:w,data:j,opts:$}=b,T=w.let("dataType",(0,y._)`typeof ${j}`),W=w.let("coerced",(0,y._)`undefined`);$.coerceTypes==="array"&&w.if((0,y._)`${T} == 'object' && Array.isArray(${j}) && ${j}.length == 1`,()=>w.assign(j,(0,y._)`${j}[0]`).assign(T,(0,y._)`typeof ${j}`).if(n(R,j,$.strictNumbers),()=>w.assign(W,j))),w.if((0,y._)`${W} !== undefined`);for(const J of D)(P.has(J)||J==="array"&&$.coerceTypes==="array")&&U(J);w.else(),a(b),w.endIf(),w.if((0,y._)`${W} !== undefined`,()=>{w.assign(j,W),I(b,W)});function U(J){switch(J){case"string":w.elseIf((0,y._)`${T} == "number" || ${T} == "boolean"`).assign(W,(0,y._)`"" + ${j}`).elseIf((0,y._)`${j} === null`).assign(W,(0,y._)`""`);return;case"number":w.elseIf((0,y._)`${T} == "boolean" || ${j} === null
8
8
  || (${T} == "string" && ${j} && ${j} == +${j})`).assign(W,(0,y._)`+${j}`);return;case"integer":w.elseIf((0,y._)`${T} === "boolean" || ${j} === null
@@ -12340,7 +12340,7 @@ Error generating stack: `+Ie.message+`
12340
12340
  border-bottom: 0;
12341
12341
  padding-right: var(--spacing-sm);
12342
12342
  }
12343
- `;var eg=Object.defineProperty,tg=Object.defineProperties,ng=Object.getOwnPropertyDescriptors,qp=Object.getOwnPropertySymbols,rg=Object.prototype.hasOwnProperty,og=Object.prototype.propertyIsEnumerable,_p=(A,B,F)=>B in A?eg(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,hf=(A,B)=>{for(var F in B||(B={}))rg.call(B,F)&&_p(A,F,B[F]);if(qp)for(var F of qp(B))og.call(B,F)&&_p(A,F,B[F]);return A},np=(A,B)=>tg(A,ng(B));function ig({payload:A,isWebhook:B,definitionSamples:F,pointer:re}){var Ee,Ue;const{parser:it,options:{codeSamples:dt,generatedSamplesMaxDepth:rt}}=he(Xt),Ot=he(ms),Jt=he(_n(re)),{languages:dn}=he(hl),[Tn]=he(ks),ar=Bt(),rr=new Map(dn?.map(({key:oo,order:Ci})=>[oo,Ci])),vr=F.filter(oo=>rr.has(vs(oo))),mo=new Set(vr.map(vs));let ao=[];if(!B){const oo=((Ee=dt.languages)==null?void 0:Ee.filter(({lang:Ci,label:Kn})=>Ci!=="Payload"&&!mo.has(vs({lang:Ci,label:Kn}))))||[];ao=ag(oo,dt,it.definition,rt,Jt,Tn,ar,Ot)}const So=[...vr,...ao],Eo=(Ue=dn?.find(({lang:oo})=>oo===A?.lang))==null?void 0:Ue.title,co=A&&vs({label:Eo,lang:A.lang});return A&&co&&rr.has(co)&&So.push(np(hf({},A),{label:Eo,order:rr.get(co)})),{samples:So.map(oo=>{var Ci;const Kn=(Ci=oo.label)!=null?Ci:oo.lang;return hf({key:vs(oo),title:Kn,order:typeof rr.get(Kn.toLowerCase())=="number"?rr.get(Kn.toLowerCase()):9999},oo)}).sort((oo,Ci)=>oo.order-Ci.order)}}function ag(A,{skipOptionalParameters:B,withOAuth2Call:F},re,Ee,Ue,it,dt,rt){return A.map(({lang:Ot,label:Jt,options:dn})=>({lang:Ot,label:Jt,get:Tn=>(0,ot.getCodeSample)(np(hf({},Tn),{lang:Ot,options:np(hf({},dn),{skipOptionalParameters:B,withOAuth2Call:F,spec:re,generatedPayloadSamplesMaxDepth:Ee,store:Ue,activeMimeName:rt}),environment:it,translate:dt}))}))}var mf=(A=>(A.CodeSampleLanguageSwitched="CodeSampleLanguageSwitched",A.CodeSampleCopied="CodeSampleCopied",A.OperationServerExpanded="OperationServerExpanded",A.PanelToggle="PanelToggle",A.TargetServerSwitched="TargetServerSwitched",A))(mf||{}),sg=Object.defineProperty,lg=Object.defineProperties,cg=Object.getOwnPropertyDescriptors,eh=Object.getOwnPropertySymbols,ug=Object.prototype.hasOwnProperty,dg=Object.prototype.propertyIsEnumerable,th=(A,B,F)=>B in A?sg(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,fg=(A,B)=>{for(var F in B||(B={}))ug.call(B,F)&&th(A,F,B[F]);if(eh)for(var F of eh(B))dg.call(B,F)&&th(A,F,B[F]);return A},pg=(A,B)=>lg(A,cg(B));function rp(A){return B=>pg(fg({},B),{eventType:A})}const hg=rp(mf.CodeSampleLanguageSwitched),yy=({operation:A,sample:B})=>{const{lang:F,label:re}=B;return hg({resource:"Redocly_CodeSample",action:"LanguageSwitched",operationId:A.id,operationPath:A.path,operationHttpVerb:A.httpVerb,operationSummary:A.name,label:re||F,lang:F})},mg=rp(mf.PanelToggle),Cy=({operation:A,isExpanded:B,panelType:F})=>mg({resource:"Redocly_Operation",action:"PanelToggled",operationId:A.id,operationPath:A.path,operationHttpVerb:A.httpVerb,operationSummary:A.name,panelType:F,state:B?"expanded":"collapsed"}),gg=rp(mf.CodeSampleCopied),nh=({operation:A,type:B,lang:F="",label:re="",activeMimeName:Ee,activeExampleName:Ue})=>gg({resource:"Redocly_CodeSample",action:"CodeSampleCopied",operationId:A.id,operationPath:A.path,operationHttpVerb:A.httpVerb,operationSummary:A.name,exampleId:Ue,exampleMimeType:Ee,label:re,lang:F,type:B}),vg=R(qe.xW.NOT_LOADED),rh=R([]);var yg=Object.defineProperty,Cg=Object.defineProperties,Og=Object.getOwnPropertyDescriptors,gf=Object.getOwnPropertySymbols,oh=Object.prototype.hasOwnProperty,ih=Object.prototype.propertyIsEnumerable,ah=(A,B,F)=>B in A?yg(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,op=(A,B)=>{for(var F in B||(B={}))oh.call(B,F)&&ah(A,F,B[F]);if(gf)for(var F of gf(B))ih.call(B,F)&&ah(A,F,B[F]);return A},ip=(A,B)=>Cg(A,Og(B)),Pg=(A,B)=>{var F={};for(var re in A)oh.call(A,re)&&B.indexOf(re)<0&&(F[re]=A[re]);if(A!=null&&gf)for(var re of gf(A))B.indexOf(re)<0&&ih.call(A,re)&&(F[re]=A[re]);return F};function sh(A,B,F,re){var Ee;if(!F)return;const Ue=new ot.OpenAPIParser(F),it=(Ee=Ue.definition.paths)==null?void 0:Ee[A],dt=it?.[B],rt=(0,Do.getOperation)(Ue,ip(op({},dt),{pathName:A,httpVerb:B,pathParameters:it.parameters||[],pathServers:it.servers||[]}),void 0,(0,ot.normalizeOptions)({}),"",{isCallback:!1},re);return rt?{id:rt.id,name:rt.name,method:rt.httpVerb,operationId:rt.operationId,parameters:Ig(rt.parameters),body:xg(rt.requestBody,F),path:rt.path,href:rt.href,servers:rt.servers,security:Ag(rt.security),responses:Object.fromEntries(rt.responses.map(Jt=>{var dn;return[Jt.code,{code:Jt.code,description:Jt.description,mediaTypes:(dn=Jt.content)==null?void 0:dn.mediaTypes.reduce((Tn,ar)=>{var rr;return Tn[ar.name]={name:ar.name,schema:lh((rr=ar.schema)==null?void 0:rr.rawSchema,F)},Tn},{})}]}))}:void 0}function Eg(A){return function(B,F,re){const Ee=sh(B,F,re,A);if(Ee)return ip(op({},Ee),{operationId:Ee.operationId||M.OG.compile(["paths",Ee.path,Ee.method])})}}function Ig(A,B){const F=new Set,re=A.map(Ee=>{var Ue;return F.add(Ee.in+":"+Ee.name),{name:Ee.name,in:Ee.in,required:Ee.required,description:Ee.description,example:((Ue=B?.[String(Ee.in)])==null?void 0:Ue[Ee.name])||Ee.example,schema:Ee.schema}});for(const[Ee,Ue]of Object.entries(B||{}))for(const[it,dt]of Object.entries(Ue||{}))F.has(Ee+":"+it)||re.push({name:it,in:Ee,required:!1,description:"",example:String(dt),schema:void 0});return re}function bg({type:A,format:B,enum:F}){return A==="string"&&(B==="binary"||B==="base64")?"file":A==="object"?"multiline":F.length>0?"select":"text"}function Sg(A,B){var F,re,Ee,Ue,it;const dt=((F=A[0])==null?void 0:F.example)||((re=A[0])==null?void 0:re.examples);if(dt)return dt;if((Ee=A.schema)!=null&&Ee.example)return A.schema.example;const rt=((Ue=B?.default)==null?void 0:Ue.value)||((it=B?.default)==null?void 0:it.rawValue);return rt?.[A.name]?(0,a.isPrimitive)(rt?.[A.name])?String(rt?.[A.name]):JSON.stringify(rt?.[A.name]):""}function xg(A,B,F){var re;if(!A||!((re=A.content)!=null&&re.mediaTypes)){if(!F)return;const Ee=F,{activeExampleName:Ue}=Ee,it=Pg(Ee,["activeExampleName"]);return{activeExampleName:Ue,mediaTypes:Object.fromEntries(Object.entries(it).map(([dt,rt])=>[dt,{name:dt,examples:{default:{value:rt}},schema:{},parameters:[]}]))}}return{required:A.required,activeExampleName:F?.activeExampleName,mediaTypes:A.content.mediaTypes.reduce((Ee,Ue)=>{var it,dt;const rt=Ue.schema,Ot=F?.[Ue.name]?{default:{value:F?.[Ue.name],rawValue:F?.[Ue.name],mime:Ue.name}}:Ue.examples||Ue.formExamples;return Ee[Ue.name]={name:Ue.name,examples:Ot,schema:lh((it=Ue.schema)==null?void 0:it.rawSchema,B),parameters:(dt=rt?.fields)==null?void 0:dt.map(Jt=>({inputType:bg(Jt.schema),name:Jt.name,example:Sg(Jt,Ot)}))},Ee},{})}}function lh(A,B){if(!(!A||!B))return ip(op({},A),{components:B?.components||{}})}function Ag(A){if(A)return A.map(({schemes:B})=>B.map(F=>{const re={id:F.id,type:F.type,in:F.in,openIdConnectUrl:F.openIdConnectUrl,scopes:F.scopes,scheme:F.scheme,name:F.name,flows:F.flows,"x-defaultAccessToken":F["x-defaultAccessToken"],"x-defaultTokenType":F["x-defaultTokenType"],"x-defaultClientId":F["x-defaultClientId"],"x-defaultClientSecret":F["x-defaultClientSecret"],"x-defaultUsername":F["x-defaultUsername"],"x-defaultPassword":F["x-defaultPassword"]};return Object.keys(re).forEach(Ee=>re[Ee]===void 0&&delete re[Ee]),re}))}var Dg=Object.defineProperty,ch=Object.getOwnPropertySymbols,jg=Object.prototype.hasOwnProperty,Mg=Object.prototype.propertyIsEnumerable,uh=(A,B,F)=>B in A?Dg(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,dh=(A,B)=>{for(var F in B||(B={}))jg.call(B,F)&&uh(A,F,B[F]);if(ch)for(var F of ch(B))Mg.call(B,F)&&uh(A,F,B[F]);return A},Tg=(A,B,F)=>new Promise((re,Ee)=>{var Ue=rt=>{try{dt(F.next(rt))}catch(Ot){Ee(Ot)}},it=rt=>{try{dt(F.throw(rt))}catch(Ot){Ee(Ot)}},dt=rt=>rt.done?re(rt.value):Promise.resolve(rt.value).then(Ue,it);dt((F=F.apply(A,B)).next())});const Rg=(0,n.lazy)(()=>Tg(void 0,null,function*(){return $r.e(63).then($r.bind($r,8063)).then(A=>({default:A.ReplayOverlay}))}));function Lg({operation:A,corsProxyUrl:B,fullOpenApi:F}){var re,Ee;const Ue=Bt(),it=vo(),dt=(0,n.useRef)(null),{mockServer:rt,oAuth2RedirectURI:Ot,routingBasePath:Jt}=he(er),dn=he(rh),{parser:Tn}=he(Xt),ar=he(za),[rr,vr]=(0,n.useState)(!1),[mo,ao]=ze(vg),[So,Eo]=ze(Kr),[[,co],Ki]=ze(ks);(0,a.useFocusTrap)(dt),(0,a.useModalScrollLock)(rr);const oo=(0,n.useCallback)(({operations:qr,environment:Co,environments:Vr})=>{const Jo=qr.reduce((si,Ro)=>{Ro.requestValues.body=Ro.requestValues.body instanceof URLSearchParams?Object.fromEntries(Ro.requestValues.body.entries()):Ro.requestValues.body;const{path:ci,method:Ba}=Ro.sourcePath,Mi=M.OG.compile(["paths",ci,Ba]);return si[Mi]=Gn()(Wr(Mi),Ro),si},{});Eo(dh(dh({},So),Jo)),Ki({environment:Co,environments:Vr})},[So,Eo,Ki]),Ci=()=>{mo!==qe.xW.LOADING&&(rr||it.send("openapi_docs.try_it.opened",{}),vr(!rr)),mo===qe.xW.NOT_LOADED&&ao(qe.xW.LOADING)},Kn=(0,n.useCallback)(qr=>{if(!qr)return;const Co=dn.find(Vr=>Vr.operationId===qr);return Jt+Co?.href},[dn,Jt]);return F?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(a.Button,{onClick:Ci,variant:"primary",iconPosition:"left",icon:mo===qe.xW.LOADING?(0,O.jsx)(a.CircleDashIcon,{}):(0,O.jsx)(a.RocketIcon,{}),children:mo===qe.xW.LOADING?Ue("openapi.loading","Loading..."):Ue("openapi.tryIt","Try it")}),rr&&(0,O.jsx)(n.Suspense,{children:(0,O.jsx)(a.Portal,{mountId:"api-content",children:(0,O.jsx)("div",{ref:dt,children:(0,O.jsx)(Rg,{activeOperationId:A.operationId||A.pointer,source:{data:F,type:"openapi"},onRequestChange:oo,onClose:Ci,onLoad:()=>ao(qe.xW.LOADED),settings:{corsProxyUrl:B,mockServer:rt,environment:co,apiId:(Ee=(re=Tn?.definition.info)==null?void 0:re["x-metadata"])==null?void 0:Ee.apiId,oAuth2RedirectURI:Ot,disableCollectionsTab:!0,disableWorkflowTab:!0,storageKey:Jt,convertOperationToReplayValue:(qr,Co,Vr)=>Eg(ar)(qr,Co,Vr),getOperationUrl:Kn}})})})})]}):null}const fh=(0,n.memo)(Lg);var wg=(A,B,F)=>new Promise((re,Ee)=>{var Ue=rt=>{try{dt(F.next(rt))}catch(Ot){Ee(Ot)}},it=rt=>{try{dt(F.throw(rt))}catch(Ot){Ee(Ot)}},dt=rt=>rt.done?re(rt.value):Promise.resolve(rt.value).then(Ue,it);dt((F=F.apply(A,B)).next())});const Bg=(0,n.lazy)(()=>wg(void 0,null,function*(){return $r.e(63).then($r.bind($r,8063)).then(A=>({default:A.EmbeddedReplay}))}));function Fg({activeOperationId:A,corsProxyUrl:B,fullOpenApi:F}){const re=Bt(),{mockServer:Ee}=he(er),Ue=he(Yi),it=he(Tl),[dt,rt]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{rt(!0)},[]),(0,O.jsx)(Ng,{children:dt?(0,O.jsx)(n.Suspense,{fallback:(0,O.jsx)(ph,{children:re("openapi.loading","Loading...")}),children:(0,O.jsx)(Bg,{activeOperationId:A,source:{data:F,type:"openapi"},settings:{environment:Ue.environment,predefinedEnvValues:it,corsProxyUrl:B,mockServer:Ee,disableCollectionsTab:!0,convertOperationToReplayValue:sh}})}):(0,O.jsx)(ph,{children:re("openapi.loading","Loading...")})})}const Oy=(0,n.memo)(Fg),ph=pe.Ay.div`
12343
+ `;var eg=Object.defineProperty,tg=Object.defineProperties,ng=Object.getOwnPropertyDescriptors,qp=Object.getOwnPropertySymbols,rg=Object.prototype.hasOwnProperty,og=Object.prototype.propertyIsEnumerable,_p=(A,B,F)=>B in A?eg(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,hf=(A,B)=>{for(var F in B||(B={}))rg.call(B,F)&&_p(A,F,B[F]);if(qp)for(var F of qp(B))og.call(B,F)&&_p(A,F,B[F]);return A},np=(A,B)=>tg(A,ng(B));function ig({payload:A,isWebhook:B,definitionSamples:F,pointer:re}){var Ee,Ue;const{parser:it,options:{codeSamples:dt,generatedSamplesMaxDepth:rt}}=he(Xt),Ot=he(ms),Jt=he(_n(re)),{languages:dn}=he(hl),[Tn]=he(ks),ar=Bt(),rr=new Map(dn?.map(({key:oo,order:Ci})=>[oo,Ci])),vr=F.filter(oo=>rr.has(vs(oo))),mo=new Set(vr.map(vs));let ao=[];if(!B){const oo=((Ee=dt.languages)==null?void 0:Ee.filter(({lang:Ci,label:Kn})=>Ci!=="Payload"&&!mo.has(vs({lang:Ci,label:Kn}))))||[];ao=ag(oo,dt,it.definition,rt,Jt,Tn,ar,Ot)}const So=[...vr,...ao],Eo=(Ue=dn?.find(({lang:oo})=>oo===A?.lang))==null?void 0:Ue.title,co=A&&vs({label:Eo,lang:A.lang});return A&&co&&rr.has(co)&&So.push(np(hf({},A),{label:Eo,order:rr.get(co)})),{samples:So.map(oo=>{var Ci;const Kn=(Ci=oo.label)!=null?Ci:oo.lang;return hf({key:vs(oo),title:Kn,order:typeof rr.get(Kn.toLowerCase())=="number"?rr.get(Kn.toLowerCase()):9999},oo)}).sort((oo,Ci)=>oo.order-Ci.order)}}function ag(A,{skipOptionalParameters:B,withOAuth2Call:F},re,Ee,Ue,it,dt,rt){return A.map(({lang:Ot,label:Jt,options:dn})=>({lang:Ot,label:Jt,get:Tn=>(0,ot.getCodeSample)(np(hf({},Tn),{lang:Ot,options:np(hf({},dn),{skipOptionalParameters:B,withOAuth2Call:F,spec:re,generatedPayloadSamplesMaxDepth:Ee,store:Ue,activeMimeName:rt}),environment:it,translate:dt}))}))}var mf=(A=>(A.CodeSampleLanguageSwitched="CodeSampleLanguageSwitched",A.CodeSampleCopied="CodeSampleCopied",A.OperationServerExpanded="OperationServerExpanded",A.PanelToggle="PanelToggle",A.TargetServerSwitched="TargetServerSwitched",A))(mf||{}),sg=Object.defineProperty,lg=Object.defineProperties,cg=Object.getOwnPropertyDescriptors,eh=Object.getOwnPropertySymbols,ug=Object.prototype.hasOwnProperty,dg=Object.prototype.propertyIsEnumerable,th=(A,B,F)=>B in A?sg(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,fg=(A,B)=>{for(var F in B||(B={}))ug.call(B,F)&&th(A,F,B[F]);if(eh)for(var F of eh(B))dg.call(B,F)&&th(A,F,B[F]);return A},pg=(A,B)=>lg(A,cg(B));function rp(A){return B=>pg(fg({},B),{eventType:A})}const hg=rp(mf.CodeSampleLanguageSwitched),yy=({operation:A,sample:B})=>{const{lang:F,label:re}=B;return hg({resource:"Redocly_CodeSample",action:"LanguageSwitched",operationId:A.id,operationPath:A.path,operationHttpVerb:A.httpVerb,operationSummary:A.name,label:re||F,lang:F})},mg=rp(mf.PanelToggle),Cy=({operation:A,isExpanded:B,panelType:F})=>mg({resource:"Redocly_Operation",action:"PanelToggled",operationId:A.id,operationPath:A.path,operationHttpVerb:A.httpVerb,operationSummary:A.name,panelType:F,state:B?"expanded":"collapsed"}),gg=rp(mf.CodeSampleCopied),nh=({operation:A,type:B,lang:F="",label:re="",activeMimeName:Ee,activeExampleName:Ue})=>gg({resource:"Redocly_CodeSample",action:"CodeSampleCopied",operationId:A.id,operationPath:A.path,operationHttpVerb:A.httpVerb,operationSummary:A.name,exampleId:Ue,exampleMimeType:Ee,label:re,lang:F,type:B}),vg=R(qe.xW.NOT_LOADED),rh=R([]);var yg=Object.defineProperty,Cg=Object.defineProperties,Og=Object.getOwnPropertyDescriptors,gf=Object.getOwnPropertySymbols,oh=Object.prototype.hasOwnProperty,ih=Object.prototype.propertyIsEnumerable,ah=(A,B,F)=>B in A?yg(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,op=(A,B)=>{for(var F in B||(B={}))oh.call(B,F)&&ah(A,F,B[F]);if(gf)for(var F of gf(B))ih.call(B,F)&&ah(A,F,B[F]);return A},ip=(A,B)=>Cg(A,Og(B)),Pg=(A,B)=>{var F={};for(var re in A)oh.call(A,re)&&B.indexOf(re)<0&&(F[re]=A[re]);if(A!=null&&gf)for(var re of gf(A))B.indexOf(re)<0&&ih.call(A,re)&&(F[re]=A[re]);return F};function sh(A,B,F,re){var Ee;if(!F)return;const Ue=new ot.OpenAPIParser(F),it=(Ee=Ue.definition.paths)==null?void 0:Ee[A],dt=it?.[B],rt=(0,Do.getOperation)(Ue,ip(op({},dt),{pathName:A,httpVerb:B,pathParameters:it.parameters||[],pathServers:it.servers||[]}),void 0,(0,ot.normalizeOptions)({}),"",{isCallback:!1},re);return rt?{id:rt.id,name:rt.name,method:rt.httpVerb,operationId:rt.operationId,parameters:Ig(rt.parameters),body:xg(rt.requestBody,F),path:rt.path,href:rt.href,servers:rt.servers,security:Ag(rt.security),responses:Object.fromEntries(rt.responses.map(Jt=>{var dn;return[Jt.code,{code:Jt.code,description:Jt.description,mediaTypes:(dn=Jt.content)==null?void 0:dn.mediaTypes.reduce((Tn,ar)=>{var rr;return Tn[ar.name]={name:ar.name,schema:lh((rr=ar.schema)==null?void 0:rr.rawSchema,F)},Tn},{})}]}))}:void 0}function Eg(A){return function(B,F,re){const Ee=sh(B,F,re,A);if(Ee)return ip(op({},Ee),{operationId:Ee.operationId||M.OG.compile(["paths",Ee.path,Ee.method])})}}function Ig(A,B){const F=new Set,re=A.map(Ee=>{var Ue;return F.add(Ee.in+":"+Ee.name),{name:Ee.name,in:Ee.in,required:Ee.required,description:Ee.description,example:((Ue=B?.[String(Ee.in)])==null?void 0:Ue[Ee.name])||Ee.example,schema:Ee.schema}});for(const[Ee,Ue]of Object.entries(B||{}))for(const[it,dt]of Object.entries(Ue||{}))F.has(Ee+":"+it)||re.push({name:it,in:Ee,required:!1,description:"",example:String(dt),schema:void 0});return re}function bg({type:A,format:B,enum:F}){return A==="string"&&(B==="binary"||B==="base64")?"file":A==="object"?"multiline":F.length>0?"select":"text"}function Sg(A,B){var F,re,Ee,Ue,it;const dt=((F=A[0])==null?void 0:F.example)||((re=A[0])==null?void 0:re.examples);if(dt)return dt;if((Ee=A.schema)!=null&&Ee.example)return A.schema.example;const rt=((Ue=B?.default)==null?void 0:Ue.value)||((it=B?.default)==null?void 0:it.rawValue);return rt?.[A.name]?(0,a.isPrimitive)(rt?.[A.name])?String(rt?.[A.name]):JSON.stringify(rt?.[A.name]):""}function xg(A,B,F){var re;if(!A||!((re=A.content)!=null&&re.mediaTypes)){if(!F)return;const Ee=F,{activeExampleName:Ue}=Ee,it=Pg(Ee,["activeExampleName"]);return{activeExampleName:Ue,mediaTypes:Object.fromEntries(Object.entries(it).map(([dt,rt])=>[dt,{name:dt,examples:{default:{value:rt}},schema:{},parameters:[]}]))}}return{required:A.required,activeExampleName:F?.activeExampleName,mediaTypes:A.content.mediaTypes.reduce((Ee,Ue)=>{var it,dt;const rt=Ue.schema,Ot=F?.[Ue.name]?{default:{value:F?.[Ue.name],rawValue:F?.[Ue.name],mime:Ue.name}}:Ue.examples||Ue.formExamples;return Ee[Ue.name]={name:Ue.name,examples:Ot,schema:lh((it=Ue.schema)==null?void 0:it.rawSchema,B),parameters:(dt=rt?.fields)==null?void 0:dt.map(Jt=>({inputType:bg(Jt.schema),name:Jt.name,example:Sg(Jt,Ot)}))},Ee},{})}}function lh(A,B){if(!(!A||!B))return ip(op({},A),{components:B?.components||{}})}function Ag(A){if(A)return A.map(({schemes:B})=>B.map(F=>{const re={id:F.id,type:F.type,in:F.in,openIdConnectUrl:F.openIdConnectUrl,scopes:F.scopes,scheme:F.scheme,name:F.name,flows:F.flows,"x-defaultAccessToken":F["x-defaultAccessToken"],"x-defaultTokenType":F["x-defaultTokenType"],"x-defaultClientId":F["x-defaultClientId"],"x-defaultClientSecret":F["x-defaultClientSecret"],"x-defaultUsername":F["x-defaultUsername"],"x-defaultPassword":F["x-defaultPassword"]};return Object.keys(re).forEach(Ee=>re[Ee]===void 0&&delete re[Ee]),re}))}var Dg=Object.defineProperty,ch=Object.getOwnPropertySymbols,jg=Object.prototype.hasOwnProperty,Mg=Object.prototype.propertyIsEnumerable,uh=(A,B,F)=>B in A?Dg(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,dh=(A,B)=>{for(var F in B||(B={}))jg.call(B,F)&&uh(A,F,B[F]);if(ch)for(var F of ch(B))Mg.call(B,F)&&uh(A,F,B[F]);return A},Tg=(A,B,F)=>new Promise((re,Ee)=>{var Ue=rt=>{try{dt(F.next(rt))}catch(Ot){Ee(Ot)}},it=rt=>{try{dt(F.throw(rt))}catch(Ot){Ee(Ot)}},dt=rt=>rt.done?re(rt.value):Promise.resolve(rt.value).then(Ue,it);dt((F=F.apply(A,B)).next())});const Rg=(0,n.lazy)(()=>Tg(void 0,null,function*(){return $r.e(196).then($r.bind($r,45196)).then(A=>({default:A.ReplayOverlay}))}));function Lg({operation:A,corsProxyUrl:B,fullOpenApi:F}){var re,Ee;const Ue=Bt(),it=vo(),dt=(0,n.useRef)(null),{mockServer:rt,oAuth2RedirectURI:Ot,routingBasePath:Jt}=he(er),dn=he(rh),{parser:Tn}=he(Xt),ar=he(za),[rr,vr]=(0,n.useState)(!1),[mo,ao]=ze(vg),[So,Eo]=ze(Kr),[[,co],Ki]=ze(ks);(0,a.useFocusTrap)(dt),(0,a.useModalScrollLock)(rr);const oo=(0,n.useCallback)(({operations:qr,environment:Co,environments:Vr})=>{const Jo=qr.reduce((si,Ro)=>{Ro.requestValues.body=Ro.requestValues.body instanceof URLSearchParams?Object.fromEntries(Ro.requestValues.body.entries()):Ro.requestValues.body;const{path:ci,method:Ba}=Ro.sourcePath,Mi=M.OG.compile(["paths",ci,Ba]);return si[Mi]=Gn()(Wr(Mi),Ro),si},{});Eo(dh(dh({},So),Jo)),Ki({environment:Co,environments:Vr})},[So,Eo,Ki]),Ci=()=>{mo!==qe.xW.LOADING&&(rr||it.send("openapi_docs.try_it.opened",{}),vr(!rr)),mo===qe.xW.NOT_LOADED&&ao(qe.xW.LOADING)},Kn=(0,n.useCallback)(qr=>{if(!qr)return;const Co=dn.find(Vr=>Vr.operationId===qr);return Jt+Co?.href},[dn,Jt]);return F?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(a.Button,{onClick:Ci,variant:"primary",iconPosition:"left",icon:mo===qe.xW.LOADING?(0,O.jsx)(a.CircleDashIcon,{}):(0,O.jsx)(a.RocketIcon,{}),children:mo===qe.xW.LOADING?Ue("openapi.loading","Loading..."):Ue("openapi.tryIt","Try it")}),rr&&(0,O.jsx)(n.Suspense,{children:(0,O.jsx)(a.Portal,{mountId:"api-content",children:(0,O.jsx)("div",{ref:dt,children:(0,O.jsx)(Rg,{activeOperationId:A.operationId||A.pointer,source:{data:F,type:"openapi"},onRequestChange:oo,onClose:Ci,onLoad:()=>ao(qe.xW.LOADED),settings:{corsProxyUrl:B,mockServer:rt,environment:co,apiId:(Ee=(re=Tn?.definition.info)==null?void 0:re["x-metadata"])==null?void 0:Ee.apiId,oAuth2RedirectURI:Ot,disableCollectionsTab:!0,disableWorkflowTab:!0,storageKey:Jt,convertOperationToReplayValue:(qr,Co,Vr)=>Eg(ar)(qr,Co,Vr),getOperationUrl:Kn}})})})})]}):null}const fh=(0,n.memo)(Lg);var wg=(A,B,F)=>new Promise((re,Ee)=>{var Ue=rt=>{try{dt(F.next(rt))}catch(Ot){Ee(Ot)}},it=rt=>{try{dt(F.throw(rt))}catch(Ot){Ee(Ot)}},dt=rt=>rt.done?re(rt.value):Promise.resolve(rt.value).then(Ue,it);dt((F=F.apply(A,B)).next())});const Bg=(0,n.lazy)(()=>wg(void 0,null,function*(){return $r.e(196).then($r.bind($r,45196)).then(A=>({default:A.EmbeddedReplay}))}));function Fg({activeOperationId:A,corsProxyUrl:B,fullOpenApi:F}){const re=Bt(),{mockServer:Ee}=he(er),Ue=he(Yi),it=he(Tl),[dt,rt]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{rt(!0)},[]),(0,O.jsx)(Ng,{children:dt?(0,O.jsx)(n.Suspense,{fallback:(0,O.jsx)(ph,{children:re("openapi.loading","Loading...")}),children:(0,O.jsx)(Bg,{activeOperationId:A,source:{data:F,type:"openapi"},settings:{environment:Ue.environment,predefinedEnvValues:it,corsProxyUrl:B,mockServer:Ee,disableCollectionsTab:!0,convertOperationToReplayValue:sh}})}):(0,O.jsx)(ph,{children:re("openapi.loading","Loading...")})})}const Oy=(0,n.memo)(Fg),ph=pe.Ay.div`
12344
12344
  display: flex;
12345
12345
  justify-content: center;
12346
12346
  align-items: center;
@@ -12431,4 +12431,4 @@ Error generating stack: `+Ie.message+`
12431
12431
  `,xy=({pointer:A,schema:B,disableDeepLinks:F,slug:re})=>{const{options:Ee,parser:Ue}=useAtomValue(globalStoreAtom),it=B||{$ref:A},dt=getSchema({parser:Ue,schemaOrRef:it,pointer:A||"",options:Ee,deps:{operation:{pointer:"RedocSchema"}}});return jsx(Row,{children:jsx(FullWidthPanel,{children:jsx(Schema,{schema:dt,level:1,disableDeepLinks:F,slug:re})})})},Ay=({pointer:A,mimeType:B,encoding:F})=>{const re=useAtomValue(globalParserAtom),Ee=useAtomValue(layoutAtom),Ue=getExamples({parser:re,infoOrRef:{$ref:A},mime:B,encoding:F});return jsx(Row,{layout:Ee,children:jsx(ExamplesWrap,{children:jsx(Example,{example:Ue,mimeType:B})})})},_v=pe.Ay.div`
12432
12432
  padding: 20px;
12433
12433
  color: red;
12434
- `;class Dy extends n.Component{constructor(B){super(B),this.state={error:void 0}}componentDidCatch(B){return this.setState({error:B}),!1}render(){return this.state.error?(0,O.jsxs)(_v,{children:[(0,O.jsx)("h1",{children:"Something went wrong..."}),(0,O.jsxs)("small",{children:[" ",this.state.error.message," "]}),(0,O.jsx)("p",{children:(0,O.jsxs)("details",{children:[(0,O.jsx)("summary",{children:"Stack trace"}),(0,O.jsx)("pre",{children:this.state.error.stack})]})}),typeof __REDOC_VERSION__<"u"?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("small",{children:[" References docs version: ",__REDOC_VERSION__]})," ",(0,O.jsx)("br",{})]}):null,typeof __REDOC_REVISION__<"u"?(0,O.jsxs)("small",{children:[" Commit: ",__REDOC_REVISION__]}):null]}):(0,O.jsx)(O.Fragment,{children:n.Children.only(this.props.children)})}}var ey=Object.defineProperty,Nh=Object.getOwnPropertySymbols,ty=Object.prototype.hasOwnProperty,ny=Object.prototype.propertyIsEnumerable,$h=(A,B,F)=>B in A?ey(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,Uh=(A,B)=>{for(var F in B||(B={}))ty.call(B,F)&&$h(A,F,B[F]);if(Nh)for(var F of Nh(B))ny.call(B,F)&&$h(A,F,B[F]);return A};const zh=(0,M.JA)(),ry=zh?(0,x.dirname)(zh)+"/":"";function oy(A){const B={},F=A.attributes;for(let re=0;re<F.length;re++){const Ee=F[re];B[Ee.name]=Ee.value}return B}function iy(A){const B=oy(A),F={};for(const re in B){const Ee=re.replace(/-(.)/g,(Ue,it)=>it.toUpperCase());F[Ee]=B[re]}return F}function ay(A,B=document.querySelector("redoc")){(0,l.c)(B,(0,O.jsx)(Fh,{store:A}))}function Wh(A,B={},F=(0,M.iT)("redoc")){if(F===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');let re,Ee;typeof A=="string"?re=A:typeof A=="object"&&(Ee=A),(0,l.H)(F).render((0,n.createElement)(Qv,{definition:Ee,definitionUrl:re,options:Uh(Uh({},B),iy(F))},["Loading..."]))}function Vh(A){$r.p=A}const sy="3.9.0-next.4",ly="4cc24b9559";function cy(){const A=(0,M.iT)("redoc");if(!A)return;const B=A.getAttribute("spec-url");B&&Wh(B,{},A)}a.IS_BROWSER&&Vh(ry),cy()})(),Df})());
12434
+ `;class Dy extends n.Component{constructor(B){super(B),this.state={error:void 0}}componentDidCatch(B){return this.setState({error:B}),!1}render(){return this.state.error?(0,O.jsxs)(_v,{children:[(0,O.jsx)("h1",{children:"Something went wrong..."}),(0,O.jsxs)("small",{children:[" ",this.state.error.message," "]}),(0,O.jsx)("p",{children:(0,O.jsxs)("details",{children:[(0,O.jsx)("summary",{children:"Stack trace"}),(0,O.jsx)("pre",{children:this.state.error.stack})]})}),typeof __REDOC_VERSION__<"u"?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("small",{children:[" References docs version: ",__REDOC_VERSION__]})," ",(0,O.jsx)("br",{})]}):null,typeof __REDOC_REVISION__<"u"?(0,O.jsxs)("small",{children:[" Commit: ",__REDOC_REVISION__]}):null]}):(0,O.jsx)(O.Fragment,{children:n.Children.only(this.props.children)})}}var ey=Object.defineProperty,Nh=Object.getOwnPropertySymbols,ty=Object.prototype.hasOwnProperty,ny=Object.prototype.propertyIsEnumerable,$h=(A,B,F)=>B in A?ey(A,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):A[B]=F,Uh=(A,B)=>{for(var F in B||(B={}))ty.call(B,F)&&$h(A,F,B[F]);if(Nh)for(var F of Nh(B))ny.call(B,F)&&$h(A,F,B[F]);return A};const zh=(0,M.JA)(),ry=zh?(0,x.dirname)(zh)+"/":"";function oy(A){const B={},F=A.attributes;for(let re=0;re<F.length;re++){const Ee=F[re];B[Ee.name]=Ee.value}return B}function iy(A){const B=oy(A),F={};for(const re in B){const Ee=re.replace(/-(.)/g,(Ue,it)=>it.toUpperCase());F[Ee]=B[re]}return F}function ay(A,B=document.querySelector("redoc")){(0,l.c)(B,(0,O.jsx)(Fh,{store:A}))}function Wh(A,B={},F=(0,M.iT)("redoc")){if(F===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');let re,Ee;typeof A=="string"?re=A:typeof A=="object"&&(Ee=A),(0,l.H)(F).render((0,n.createElement)(Qv,{definition:Ee,definitionUrl:re,options:Uh(Uh({},B),iy(F))},["Loading..."]))}function Vh(A){$r.p=A}const sy="3.9.1",ly="f029882b84";function cy(){const A=(0,M.iT)("redoc");if(!A)return;const B=A.getAttribute("spec-url");B&&Wh(B,{},A)}a.IS_BROWSER&&Vh(ry),cy()})(),Df})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-docs",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",
@@ -45,8 +45,8 @@
45
45
  "url-template": "^2.0.8",
46
46
  "util": "~0.12.5",
47
47
  "web-vitals": "3.3.1",
48
- "@redocly/config": "0.24.1",
49
- "@redocly/replay": "0.12.0"
48
+ "@redocly/replay": "0.12.1",
49
+ "@redocly/config": "0.24.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@shikijs/transformers": "1.24.0",