@nocobase/plugin-api-doc 0.18.0-alpha.9 → 0.19.0-alpha.10

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.
@@ -141,7 +141,7 @@ new Remarkable().use(linkify)
141
141
  `)}(0,JSON.stringify(p,null,2))||"{}",l.createElement("br",null)))}}const E7=w7;class _7 extends l.Component{constructor(){super(...arguments);We(this,"onServerChange",n=>{this.setServer(n.target.value)});We(this,"onServerVariableValueChange",n=>{let{setServerVariableValue:r,currentServer:o}=this.props,a=n.target.getAttribute("data-variable"),p=n.target.value;typeof r=="function"&&r({server:o,key:a,val:p})});We(this,"setServer",n=>{let{setSelectedServer:r}=this.props;r(n)})}componentDidMount(){var o;let{servers:n,currentServer:r}=this.props;r||this.setServer((o=n.first())==null?void 0:o.get("url"))}UNSAFE_componentWillReceiveProps(n){let{servers:r,setServerVariableValue:o,getServerVariable:a}=n;if(this.props.currentServer!==n.currentServer||this.props.servers!==n.servers){let p=r.find(N=>N.get("url")===n.currentServer),u=this.props.servers.find(N=>N.get("url")===this.props.currentServer)||(0,ne.OrderedMap)();if(!p)return this.setServer(r.first().get("url"));let g=((u.get("variables")||(0,ne.OrderedMap)()).find(N=>N.get("default"))||(0,ne.OrderedMap)()).get("default"),x=p.get("variables")||(0,ne.OrderedMap)(),k=(x.find(N=>N.get("default"))||(0,ne.OrderedMap)()).get("default");x.map((N,M)=>{a(n.currentServer,M)&&g===k||o({server:n.currentServer,key:M,val:N.get("default")||""})})}}render(){let{servers:n,currentServer:r,getServerVariable:o,getEffectiveServerValue:a}=this.props,p=(n.find(g=>g.get("url")===r)||(0,ne.OrderedMap)()).get("variables")||(0,ne.OrderedMap)(),u=p.size!==0;return l.createElement("div",{className:"servers"},l.createElement("label",{htmlFor:"servers"},l.createElement("select",{onChange:this.onServerChange,value:r},n.valueSeq().map(g=>l.createElement("option",{value:g.get("url"),key:g.get("url")},g.get("url"),g.get("description")&&` - ${g.get("description")}`)).toArray())),u?l.createElement("div",null,l.createElement("div",{className:"computed-url"},"Computed URL:",l.createElement("code",null,a(r))),l.createElement("h4",null,"Server variables"),l.createElement("table",null,l.createElement("tbody",null,p.entrySeq().map(g=>{let[x,k]=g;return l.createElement("tr",{key:x},l.createElement("td",null,x),l.createElement("td",null,k.get("enum")?l.createElement("select",{"data-variable":x,onChange:this.onServerVariableValueChange},k.get("enum").map(N=>l.createElement("option",{selected:N===o(r,x),key:N,value:N},N))):l.createElement("input",{type:"text",value:o(r,x)||"",onChange:this.onServerVariableValueChange,"data-variable":x})))})))):null)}}class S7 extends l.Component{render(){const{specSelectors:e,oas3Selectors:n,oas3Actions:r,getComponent:o}=this.props,a=e.servers(),p=o("Servers");return a&&a.size?l.createElement("div",null,l.createElement("span",{className:"servers-title"},"Servers"),l.createElement(p,{servers:a,currentServer:n.selectedServer(),setSelectedServer:r.setSelectedServer,setServerVariableValue:r.setServerVariableValue,getServerVariable:n.serverVariableValue,getEffectiveServerValue:n.serverEffectiveValue})):null}}const x7=Function.prototype;class w2 extends l.PureComponent{constructor(n,r){super(n,r);We(this,"applyDefaultValue",n=>{const{onChange:r,defaultValue:o}=n||this.props;return this.setState({value:o}),r(o)});We(this,"onChange",n=>{this.props.onChange(ur(n))});We(this,"onDomChange",n=>{const r=n.target.value;this.setState({value:r},()=>this.onChange(r))});this.state={value:ur(n.value)||n.defaultValue},n.onChange(n.value)}UNSAFE_componentWillReceiveProps(n){this.props.value!==n.value&&n.value!==this.state.value&&this.setState({value:ur(n.value)}),!n.value&&n.defaultValue&&this.state.value&&this.applyDefaultValue(n)}render(){let{getComponent:n,errors:r}=this.props,{value:o}=this.state,a=r.size>0;const p=n("TextArea");return l.createElement("div",{className:"body-param"},l.createElement(p,{className:Nr()("body-param__text",{invalid:a}),title:r.size?r.join(", "):"",value:o,onChange:this.onDomChange}))}}We(w2,"defaultProps",{onChange:x7,userHasEditedBody:!1});class O7 extends l.Component{constructor(n,r){super(n,r);We(this,"onChange",n=>{let{onChange:r}=this.props,{value:o,name:a}=n.target,p=Object.assign({},this.state.value);a?p[a]=o:p=o,this.setState({value:p},()=>r(this.state))});let{name:o,schema:a}=this.props,p=this.getValue();this.state={name:o,schema:a,value:p}}getValue(){let{name:n,authorized:r}=this.props;return r&&r.getIn([n,"value"])}render(){let{schema:n,getComponent:r,errSelectors:o,name:a}=this.props;const p=r("Input"),u=r("Row"),g=r("Col"),x=r("authError"),k=r("Markdown",!0),N=r("JumpToPath",!0),M=(n.get("scheme")||"").toLowerCase();let D=this.getValue(),W=o.allErrors().filter(ee=>ee.get("authId")===a);if(M==="basic"){let ee=D?D.get("username"):null;return l.createElement("div",null,l.createElement("h4",null,l.createElement("code",null,a||n.get("name")),"  (http, Basic)",l.createElement(N,{path:["securityDefinitions",a]})),ee&&l.createElement("h6",null,"Authorized"),l.createElement(u,null,l.createElement(k,{source:n.get("description")})),l.createElement(u,null,l.createElement("label",null,"Username:"),ee?l.createElement("code",null," ",ee," "):l.createElement(g,null,l.createElement(p,{type:"text",required:"required",name:"username","aria-label":"auth-basic-username",onChange:this.onChange,autoFocus:!0}))),l.createElement(u,null,l.createElement("label",null,"Password:"),ee?l.createElement("code",null," ****** "):l.createElement(g,null,l.createElement(p,{autoComplete:"new-password",name:"password",type:"password","aria-label":"auth-basic-password",onChange:this.onChange}))),W.valueSeq().map((Y,ie)=>l.createElement(x,{error:Y,key:ie})))}return M==="bearer"?l.createElement("div",null,l.createElement("h4",null,l.createElement("code",null,a||n.get("name")),"  (http, Bearer)",l.createElement(N,{path:["securityDefinitions",a]})),D&&l.createElement("h6",null,"Authorized"),l.createElement(u,null,l.createElement(k,{source:n.get("description")})),l.createElement(u,null,l.createElement("label",null,"Value:"),D?l.createElement("code",null," ****** "):l.createElement(g,null,l.createElement(p,{type:"text","aria-label":"auth-bearer-value",onChange:this.onChange,autoFocus:!0}))),W.valueSeq().map((ee,Y)=>l.createElement(x,{error:ee,key:Y}))):l.createElement("div",null,l.createElement("em",null,l.createElement("b",null,a)," HTTP authentication: unsupported scheme ",`'${M}'`))}}class A7 extends l.Component{constructor(){super(...arguments);We(this,"setSelectedServer",n=>{const{path:r,method:o}=this.props;return this.forceUpdate(),this.props.setSelectedServer(n,`${r}:${o}`)});We(this,"setServerVariableValue",n=>{const{path:r,method:o}=this.props;return this.forceUpdate(),this.props.setServerVariableValue(bo(Tt({},n),{namespace:`${r}:${o}`}))});We(this,"getSelectedServer",()=>{const{path:n,method:r}=this.props;return this.props.getSelectedServer(`${n}:${r}`)});We(this,"getServerVariable",(n,r)=>{const{path:o,method:a}=this.props;return this.props.getServerVariable({namespace:`${o}:${a}`,server:n},r)});We(this,"getEffectiveServerValue",n=>{const{path:r,method:o}=this.props;return this.props.getEffectiveServerValue({server:n,namespace:`${r}:${o}`})})}render(){const{operationServers:n,pathServers:r,getComponent:o}=this.props;if(!n&&!r)return null;const a=o("Servers"),p=n||r,u=n?"operation":"path";return l.createElement("div",{className:"opblock-section operation-servers"},l.createElement("div",{className:"opblock-section-header"},l.createElement("div",{className:"tab-header"},l.createElement("h4",{className:"opblock-title"},"Servers"))),l.createElement("div",{className:"opblock-description-wrapper"},l.createElement("h4",{className:"message"},"These ",u,"-level options override the global server options."),l.createElement(a,{servers:p,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}const k7={Callbacks:v7,HttpAuth:O7,RequestBody:b7,Servers:_7,ServersContainer:S7,RequestBodyEditor:w2,OperationServers:A7,operationLink:E7},b1=new sl("commonmark");b1.block.ruler.enable(["table"]),b1.set({linkTarget:"_blank"});const E2=t=>{let{source:e,className:n="",getConfigs:r}=t;if(typeof e!="string")return null;if(e){const{useUnsafeMarkdown:o}=r(),a=Vd(b1.render(e),{useUnsafeMarkdown:o});let p;return typeof a=="string"&&(p=a.trim()),l.createElement("div",{dangerouslySetInnerHTML:{__html:p},className:Nr()(n,"renderedMarkdown")})}return null};E2.defaultProps={getConfigs:()=>({useUnsafeMarkdown:!1})};const C7=Kd(E2),j7=Kd(t=>{let k=t,{Ori:e}=k,n=Kr(k,["Ori"]);const{schema:r,getComponent:o,errSelectors:a,authorized:p,onAuthChange:u,name:g}=n,x=o("HttpAuth");return r.get("type")==="http"?l.createElement(x,{key:g,schema:r,name:g,errSelectors:a,authorized:p,getComponent:o,onChange:u}):l.createElement(e,n)}),P7=Kd(eS);class N7 extends l.Component{render(){let{getConfigs:e,schema:n}=this.props,r=["model-box"],o=null;return n.get("deprecated")===!0&&(r.push("deprecated"),o=l.createElement("span",{className:"model-deprecated-warning"},"Deprecated:")),l.createElement("div",{className:r.join(" ")},o,l.createElement(Zb,Wn()({},this.props,{getConfigs:e,depth:1,expandDepth:this.props.expandDepth||0})))}}const I7=Kd(N7),T7=Kd(t=>{let k=t,{Ori:e}=k,n=Kr(k,["Ori"]);const{schema:r,getComponent:o,errors:a,onChange:p}=n,u=r&&r.get?r.get("format"):null,g=r&&r.get?r.get("type"):null,x=o("Input");return g&&g==="string"&&u&&(u==="binary"||u==="base64")?l.createElement(x,{type:"file",className:a.length?"invalid":"",title:a.length?a:"",onChange:N=>{p(N.target.files[0])},disabled:e.isDisabled}):l.createElement(e,n)}),R7={Markdown:C7,AuthItem:j7,OpenAPIVersion:function(e){return(n,r)=>o=>{var a;return typeof((a=r.specSelectors)==null?void 0:a.isOAS30)=="function"?r.specSelectors.isOAS30()?l.createElement(e,Wn()({},o,r,{Ori:n})):l.createElement(n,o):(console.warn("OAS30 wrapper: couldn't get spec"),null)}}(t=>{const{Ori:e}=t;return l.createElement(e,{oasVersion:"3.0"})}),JsonSchema_string:T7,model:I7,onlineValidatorBadge:P7},w1="oas3_set_servers",E1="oas3_set_request_body_value",_1="oas3_set_request_body_retain_flag",S1="oas3_set_request_body_inclusion",x1="oas3_set_active_examples_member",O1="oas3_set_request_content_type",A1="oas3_set_response_content_type",k1="oas3_set_server_variable_value",C1="oas3_set_request_body_validate_error",zg="oas3_clear_request_body_validate_error",j1="oas3_clear_request_body_value";function M7(t,e){return{type:w1,payload:{selectedServerUrl:t,namespace:e}}}function D7(t){let{value:e,pathMethod:n}=t;return{type:E1,payload:{value:e,pathMethod:n}}}const L7=t=>{let{value:e,pathMethod:n}=t;return{type:_1,payload:{value:e,pathMethod:n}}};function B7(t){let{value:e,pathMethod:n,name:r}=t;return{type:S1,payload:{value:e,pathMethod:n,name:r}}}function F7(t){let{name:e,pathMethod:n,contextType:r,contextName:o}=t;return{type:x1,payload:{name:e,pathMethod:n,contextType:r,contextName:o}}}function $7(t){let{value:e,pathMethod:n}=t;return{type:O1,payload:{value:e,pathMethod:n}}}function q7(t){let{value:e,path:n,method:r}=t;return{type:A1,payload:{value:e,path:n,method:r}}}function U7(t){let{server:e,namespace:n,key:r,val:o}=t;return{type:k1,payload:{server:e,namespace:n,key:r,val:o}}}const z7=t=>{let{path:e,method:n,validationErrors:r}=t;return{type:C1,payload:{path:e,method:n,validationErrors:r}}},V7=t=>{let{path:e,method:n}=t;return{type:zg,payload:{path:e,method:n}}},W7=t=>{let{pathMethod:e}=t;return{type:zg,payload:{path:e[0],method:e[1]}}},K7=t=>{let{pathMethod:e}=t;return{type:j1,payload:{pathMethod:e}}},Ss=t=>function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return a=>{if(a.getSystem().specSelectors.isOAS3()){const p=t(e,...r);return typeof p=="function"?p(a):p}return null}},J7=Ss((t,e)=>{const n=e?[e,"selectedServer"]:["selectedServer"];return t.getIn(n)||""}),H7=Ss((t,e,n)=>t.getIn(["requestData",e,n,"bodyValue"])||null),G7=Ss((t,e,n)=>t.getIn(["requestData",e,n,"retainBodyValue"])||!1),Y7=(t,e,n)=>r=>{const{oas3Selectors:o,specSelectors:a,fn:p}=r.getSystem();if(a.isOAS3()){const u=o.requestContentType(e,n);if(u)return Ug(a.specResolvedSubtree(["paths",e,n,"requestBody"]),u,o.activeExamplesMember(e,n,"requestBody","requestBody"),p)}return null},Q7=Ss((t,e,n)=>r=>{const{oas3Selectors:o,specSelectors:a,fn:p}=r;let u=!1;const g=o.requestContentType(e,n);let x=o.requestBodyValue(e,n);const k=a.specResolvedSubtree(["paths",e,n,"requestBody"]);if(!k)return!1;if(ne.Map.isMap(x)&&(x=ur(x.mapEntries(N=>ne.Map.isMap(N[1])?[N[0],N[1].get("value")]:N).toJS())),ne.List.isList(x)&&(x=ur(x)),g){const N=Ug(k,g,o.activeExamplesMember(e,n,"requestBody","requestBody"),p);u=!!x&&x!==N}return u}),Z7=Ss((t,e,n)=>t.getIn(["requestData",e,n,"bodyInclusion"])||(0,ne.Map)()),X7=Ss((t,e,n)=>t.getIn(["requestData",e,n,"errors"])||null),eD=Ss((t,e,n,r,o)=>t.getIn(["examples",e,n,r,o,"activeExample"])||null),tD=Ss((t,e,n)=>t.getIn(["requestData",e,n,"requestContentType"])||null),nD=Ss((t,e,n)=>t.getIn(["requestData",e,n,"responseContentType"])||null),rD=Ss((t,e,n)=>{let r;if(typeof e!="string"){const{server:o,namespace:a}=e;r=a?[a,"serverVariableValues",o,n]:["serverVariableValues",o,n]}else r=["serverVariableValues",e,n];return t.getIn(r)||null}),oD=Ss((t,e)=>{let n;if(typeof e!="string"){const{server:r,namespace:o}=e;n=o?[o,"serverVariableValues",r]:["serverVariableValues",r]}else n=["serverVariableValues",e];return t.getIn(n)||(0,ne.OrderedMap)()}),aD=Ss((t,e)=>{var n,r;if(typeof e!="string"){const{server:a,namespace:p}=e;r=a,n=p?t.getIn([p,"serverVariableValues",r]):t.getIn(["serverVariableValues",r])}else r=e,n=t.getIn(["serverVariableValues",r]);n=n||(0,ne.OrderedMap)();let o=r;return n.map((a,p)=>{o=o.replace(new RegExp(`{${p}}`,"g"),a)}),o}),sD=function(e){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return a=>{const p=a.getSystem().specSelectors.specJson();let u=[...r][1]||[];return!p.getIn(["paths",...u,"requestBody","required"])||e(...r)}}}((t,e)=>((n,r)=>(r=r||[],!!n.getIn(["requestData",...r,"bodyValue"])))(t,e)),iD=(t,e)=>{let{oas3RequiredRequestBodyContentType:n,oas3RequestContentType:r,oas3RequestBodyValue:o}=e,a=[];if(!ne.Map.isMap(o))return a;let p=[];return Object.keys(n.requestContentType).forEach(u=>{u===r&&n.requestContentType[u].forEach(g=>{p.indexOf(g)<0&&p.push(g)})}),p.forEach(u=>{o.getIn([u,"value"])||a.push(u)}),a},lD=Ut(()=>["get","put","post","delete","options","head","patch","trace"]),cD={[w1]:(t,e)=>{let{payload:{selectedServerUrl:n,namespace:r}}=e;const o=r?[r,"selectedServer"]:["selectedServer"];return t.setIn(o,n)},[E1]:(t,e)=>{let{payload:{value:n,pathMethod:r}}=e,[o,a]=r;if(!ne.Map.isMap(n))return t.setIn(["requestData",o,a,"bodyValue"],n);let p,u=t.getIn(["requestData",o,a,"bodyValue"])||(0,ne.Map)();ne.Map.isMap(u)||(u=(0,ne.Map)());const[...g]=n.keys();return g.forEach(x=>{let k=n.getIn([x]);u.has(x)&&ne.Map.isMap(k)||(p=u.setIn([x,"value"],k))}),t.setIn(["requestData",o,a,"bodyValue"],p)},[_1]:(t,e)=>{let{payload:{value:n,pathMethod:r}}=e,[o,a]=r;return t.setIn(["requestData",o,a,"retainBodyValue"],n)},[S1]:(t,e)=>{let{payload:{value:n,pathMethod:r,name:o}}=e,[a,p]=r;return t.setIn(["requestData",a,p,"bodyInclusion",o],n)},[x1]:(t,e)=>{let{payload:{name:n,pathMethod:r,contextType:o,contextName:a}}=e,[p,u]=r;return t.setIn(["examples",p,u,o,a,"activeExample"],n)},[O1]:(t,e)=>{let{payload:{value:n,pathMethod:r}}=e,[o,a]=r;return t.setIn(["requestData",o,a,"requestContentType"],n)},[A1]:(t,e)=>{let{payload:{value:n,path:r,method:o}}=e;return t.setIn(["requestData",r,o,"responseContentType"],n)},[k1]:(t,e)=>{let{payload:{server:n,namespace:r,key:o,val:a}}=e;const p=r?[r,"serverVariableValues",n,o]:["serverVariableValues",n,o];return t.setIn(p,a)},[C1]:(t,e)=>{let{payload:{path:n,method:r,validationErrors:o}}=e,a=[];if(a.push("Required field is not provided"),o.missingBodyValue)return t.setIn(["requestData",n,r,"errors"],(0,ne.fromJS)(a));if(o.missingRequiredKeys&&o.missingRequiredKeys.length>0){const{missingRequiredKeys:p}=o;return t.updateIn(["requestData",n,r,"bodyValue"],(0,ne.fromJS)({}),u=>p.reduce((g,x)=>g.setIn([x,"errors"],(0,ne.fromJS)(a)),u))}return console.warn("unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR"),t},[zg]:(t,e)=>{let{payload:{path:n,method:r}}=e;const o=t.getIn(["requestData",n,r,"bodyValue"]);if(!ne.Map.isMap(o))return t.setIn(["requestData",n,r,"errors"],(0,ne.fromJS)([]));const[...a]=o.keys();return a?t.updateIn(["requestData",n,r,"bodyValue"],(0,ne.fromJS)({}),p=>a.reduce((u,g)=>u.setIn([g,"errors"],(0,ne.fromJS)([])),p)):t},[j1]:(t,e)=>{let{payload:{pathMethod:n}}=e,[r,o]=n;const a=t.getIn(["requestData",r,o,"bodyValue"]);return a?ne.Map.isMap(a)?t.setIn(["requestData",r,o,"bodyValue"],(0,ne.Map)()):t.setIn(["requestData",r,o,"bodyValue"],""):t}};function P1(){return{components:k7,wrapComponents:R7,statePlugins:{spec:{wrapSelectors:ke,selectors:Pe},auth:{wrapSelectors:Re},oas3:{actions:Tt({},Me),reducers:cD,selectors:Tt({},je)}}}}const uD=t=>{let{specSelectors:e,getComponent:n}=t;const r=e.selectWebhooksOperations(),o=Object.keys(r),a=n("OperationContainer",!0);return o.length===0?null:l.createElement("div",{className:"webhooks"},l.createElement("h2",null,"Webhooks"),o.map(p=>l.createElement("div",{key:`${p}-webhook`},r[p].map(u=>l.createElement(a,{key:`${p}-${u.method}-webhook`,op:u.operation,tag:"webhooks",method:u.method,path:p,specPath:u.specPath,allowTryItOut:!1})))))},pD=t=>{let{getComponent:e,specSelectors:n}=t;const r=n.selectLicenseNameField(),o=n.selectLicenseUrl(),a=e("Link");return l.createElement("div",{className:"info__license"},o?l.createElement("div",{className:"info__license__url"},l.createElement(a,{target:"_blank",href:It(o)},r)):l.createElement("span",null,r))},hD=t=>{let{getComponent:e,specSelectors:n}=t;const r=n.selectContactNameField(),o=n.selectContactUrl(),a=n.selectContactEmailField(),p=e("Link");return l.createElement("div",{className:"info__contact"},o&&l.createElement("div",null,l.createElement(p,{href:It(o),target:"_blank"},r," - Website")),a&&l.createElement(p,{href:It(`mailto:${a}`)},o?`Send email to ${r}`:`Contact ${r}`))},dD=t=>{let{getComponent:e,specSelectors:n}=t;const r=n.version(),o=n.url(),a=n.basePath(),p=n.host(),u=n.selectInfoSummaryField(),g=n.selectInfoDescriptionField(),x=n.selectInfoTitleField(),k=n.selectInfoTermsOfServiceUrl(),N=n.selectExternalDocsUrl(),M=n.selectExternalDocsDescriptionField(),D=n.contact(),W=n.license(),ee=e("Markdown",!0),Y=e("Link"),ie=e("VersionStamp"),H=e("OpenAPIVersion"),fe=e("InfoUrl"),oe=e("InfoBasePath"),ye=e("License",!0),be=e("Contact",!0),ce=e("JsonSchemaDialect",!0);return l.createElement("div",{className:"info"},l.createElement("hgroup",{className:"main"},l.createElement("h2",{className:"title"},x,l.createElement("span",null,r&&l.createElement(ie,{version:r}),l.createElement(H,{oasVersion:"3.1"}))),(p||a)&&l.createElement(oe,{host:p,basePath:a}),o&&l.createElement(fe,{getComponent:e,url:o})),u&&l.createElement("p",{className:"info__summary"},u),l.createElement("div",{className:"info__description description"},l.createElement(ee,{source:g})),k&&l.createElement("div",{className:"info__tos"},l.createElement(Y,{target:"_blank",href:It(k)},"Terms of service")),D.size>0&&l.createElement(be,null),W.size>0&&l.createElement(ye,null),N&&l.createElement(Y,{className:"info__extdocs",target:"_blank",href:It(N)},M||N),l.createElement(ce,null))},fD=t=>{let{getComponent:e,specSelectors:n}=t;const r=n.selectJsonSchemaDialectField(),o=n.selectJsonSchemaDialectDefault(),a=e("Link");return l.createElement(l.Fragment,null,r&&r===o&&l.createElement("p",{className:"info__jsonschemadialect"},"JSON Schema dialect:"," ",l.createElement(a,{target:"_blank",href:It(r)},r)),r&&r!==o&&l.createElement("div",{className:"error-wrapper"},l.createElement("div",{className:"no-margin"},l.createElement("div",{className:"errors"},l.createElement("div",{className:"errors-wrapper"},l.createElement("h4",{className:"center"},"Warning"),l.createElement("p",{className:"message"},l.createElement("strong",null,"OpenAPI.jsonSchemaDialect")," field contains a value different from the default value of"," ",l.createElement(a,{target:"_blank",href:o},o),". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value."))))))},mD=t=>{let{bypass:e,isSwagger2:n,isOAS3:r,isOAS31:o,alsoShow:a,children:p}=t;return e?l.createElement("div",null,p):n&&(r||o)?l.createElement("div",{className:"version-pragma"},a,l.createElement("div",{className:"version-pragma__message version-pragma__message--ambiguous"},l.createElement("div",null,l.createElement("h3",null,"Unable to render this definition"),l.createElement("p",null,l.createElement("code",null,"swagger")," and ",l.createElement("code",null,"openapi")," fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields."),l.createElement("p",null,"Supported version fields are ",l.createElement("code",null,'swagger: "2.0"')," and those that match ",l.createElement("code",null,"openapi: 3.x.y")," (for example,"," ",l.createElement("code",null,"openapi: 3.1.0"),").")))):n||r||o?l.createElement("div",null,p):l.createElement("div",{className:"version-pragma"},a,l.createElement("div",{className:"version-pragma__message version-pragma__message--missing"},l.createElement("div",null,l.createElement("h3",null,"Unable to render this definition"),l.createElement("p",null,"The provided definition does not specify a valid version field."),l.createElement("p",null,"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are ",l.createElement("code",null,'swagger: "2.0"')," and those that match ",l.createElement("code",null,"openapi: 3.x.y")," (for example,"," ",l.createElement("code",null,"openapi: 3.1.0"),")."))))},gD=t=>typeof t=="string"&&t.includes("#/components/schemas/")?(e=>{const n=e.replace(/~1/g,"/").replace(/~0/g,"~");try{return decodeURIComponent(n)}catch(r){return n}})(t.replace(/^.*#\/components\/schemas\//,"")):null,_2=(0,l.forwardRef)((t,e)=>{let{schema:n,getComponent:r,onToggle:o}=t;const a=r("JSONSchema202012"),p=gD(n.get("$$ref")),u=(0,l.useCallback)((g,x)=>{o(p,x)},[p,o]);return l.createElement(a,{name:p,schema:n.toJS(),ref:e,onExpand:u})});_2.defaultProps={name:"",displayName:"",isRef:!1,required:!1,expandDepth:0,depth:1,includeReadOnly:!1,includeWriteOnly:!1,onToggle:()=>{}};const yD=_2,vD=t=>{let{specActions:e,specSelectors:n,layoutSelectors:r,layoutActions:o,getComponent:a,getConfigs:p}=t;const u=n.selectSchemas(),g=Object.keys(u).length>0,x=["components","schemas"],{docExpansion:k,defaultModelsExpandDepth:N}=p(),M=N>0&&k!=="none",D=r.isShown(x,M),W=a("Collapse"),ee=a("JSONSchema202012"),Y=a("ArrowUpIcon"),ie=a("ArrowDownIcon");(0,l.useEffect)(()=>{const be=D&&N>1,ce=n.specResolvedSubtree(x)!=null;be&&!ce&&e.requestResolvedSubtree(x)},[D,N]);const H=(0,l.useCallback)(()=>{o.show(x,!D)},[D]),fe=(0,l.useCallback)(be=>{be!==null&&o.readyToScroll(x,be)},[]),oe=be=>ce=>{ce!==null&&o.readyToScroll([...x,be],ce)},ye=be=>(ce,me)=>{if(me){const we=[...x,be];n.specResolvedSubtree(we)!=null||e.requestResolvedSubtree([...x,be])}};return!g||N<0?null:l.createElement("section",{className:Nr()("models",{"is-open":D}),ref:fe},l.createElement("h4",null,l.createElement("button",{"aria-expanded":D,className:"models-control",onClick:H},l.createElement("span",null,"Schemas"),D?l.createElement(Y,null):l.createElement(ie,null))),l.createElement(W,{isOpened:D},Object.entries(u).map(be=>{let[ce,me]=be;return l.createElement(ee,{key:ce,ref:oe(ce),schema:me,name:ce,onExpand:ye(ce)})})))},bD=t=>{let{schema:e,getComponent:n}=t;const r=n("JumpToPath",!0);return l.createElement("div",null,l.createElement("h4",null,e.get("name")," (mutualTLS)"," ",l.createElement(r,{path:["securityDefinitions",e.get("name")]})),l.createElement("p",null,"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser."),l.createElement("p",null,e.get("description")))};class wD extends l.Component{constructor(n,r){super(n,r);We(this,"onAuthChange",n=>{let{name:r}=n;this.setState({[r]:n})});We(this,"submitAuth",n=>{n.preventDefault();let{authActions:r}=this.props;r.authorizeWithPersistOption(this.state)});We(this,"logoutClick",n=>{n.preventDefault();let{authActions:r,definitions:o}=this.props,a=o.map((p,u)=>u).toArray();this.setState(a.reduce((p,u)=>(p[u]="",p),{})),r.logoutWithPersistOption(a)});We(this,"close",n=>{n.preventDefault();let{authActions:r}=this.props;r.showDefinitions(!1)});this.state={}}render(){let{definitions:n,getComponent:r,authSelectors:o,errSelectors:a}=this.props;const p=r("AuthItem"),u=r("oauth2",!0),g=r("Button"),x=o.authorized(),k=n.filter((W,ee)=>!!x.get(ee)),N=n.filter(W=>W.get("type")!=="oauth2"&&W.get("type")!=="mutualTLS"),M=n.filter(W=>W.get("type")==="oauth2"),D=n.filter(W=>W.get("type")==="mutualTLS");return l.createElement("div",{className:"auth-container"},N.size>0&&l.createElement("form",{onSubmit:this.submitAuth},N.map((W,ee)=>l.createElement(p,{key:ee,schema:W,name:ee,getComponent:r,onAuthChange:this.onAuthChange,authorized:x,errSelectors:a})).toArray(),l.createElement("div",{className:"auth-btn-wrapper"},N.size===k.size?l.createElement(g,{className:"btn modal-btn auth",onClick:this.logoutClick,"aria-label":"Remove authorization"},"Logout"):l.createElement(g,{type:"submit",className:"btn modal-btn auth authorize","aria-label":"Apply credentials"},"Authorize"),l.createElement(g,{className:"btn modal-btn auth btn-done",onClick:this.close},"Close"))),M.size>0?l.createElement("div",null,l.createElement("div",{className:"scope-def"},l.createElement("p",null,"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes."),l.createElement("p",null,"API requires the following scopes. Select which ones you want to grant to Swagger UI.")),n.filter(W=>W.get("type")==="oauth2").map((W,ee)=>l.createElement("div",{key:ee},l.createElement(u,{authorized:x,schema:W,name:ee}))).toArray()):null,D.size>0&&l.createElement("div",null,D.map((W,ee)=>l.createElement(p,{key:ee,schema:W,name:ee,getComponent:r,onAuthChange:this.onAuthChange,authorized:x,errSelectors:a})).toArray()))}}const ED=wD,S2=t=>{const e=t.get("openapi");return typeof e=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(e)},x2=t=>function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return a=>{if(a.getSystem().specSelectors.isOAS31()){const p=t(e,...r);return typeof p=="function"?p(a):p}return null}},O2=t=>(e,n)=>function(r){for(var o=arguments.length,a=new Array(o>1?o-1:0),p=1;p<o;p++)a[p-1]=arguments[p];if(n.getSystem().specSelectors.isOAS31()){const u=t(r,...a);return typeof u=="function"?u(e,n):u}return e(...a)},A2=t=>function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return a=>{const p=t(e,a,...r);return typeof p=="function"?p(a):p}},gi=t=>(e,n)=>r=>n.specSelectors.isOAS31()?l.createElement(t,Wn()({},r,{originalComponent:e,getSystem:n.getSystem})):l.createElement(e,r),_D=gi(t=>{let{getSystem:e}=t;const n=e().getComponent("OAS31License",!0);return l.createElement(n,null)}),SD=gi(t=>{let{getSystem:e}=t;const n=e().getComponent("OAS31Contact",!0);return l.createElement(n,null)}),xD=gi(t=>{let{getSystem:e}=t;const n=e().getComponent("OAS31Info",!0);return l.createElement(n,null)}),OD=gi(t=>{let sa=t,{getSystem:e}=sa,n=Kr(sa,["getSystem"]);const r=e(),{getComponent:o,fn:a,getConfigs:p}=r,u=p(),g=o("OAS31Model"),x=o("JSONSchema202012"),k=o("JSONSchema202012Keyword$schema"),N=o("JSONSchema202012Keyword$vocabulary"),M=o("JSONSchema202012Keyword$id"),D=o("JSONSchema202012Keyword$anchor"),W=o("JSONSchema202012Keyword$dynamicAnchor"),ee=o("JSONSchema202012Keyword$ref"),Y=o("JSONSchema202012Keyword$dynamicRef"),ie=o("JSONSchema202012Keyword$defs"),H=o("JSONSchema202012Keyword$comment"),fe=o("JSONSchema202012KeywordAllOf"),oe=o("JSONSchema202012KeywordAnyOf"),ye=o("JSONSchema202012KeywordOneOf"),be=o("JSONSchema202012KeywordNot"),ce=o("JSONSchema202012KeywordIf"),me=o("JSONSchema202012KeywordThen"),we=o("JSONSchema202012KeywordElse"),Oe=o("JSONSchema202012KeywordDependentSchemas"),Ge=o("JSONSchema202012KeywordPrefixItems"),Ke=o("JSONSchema202012KeywordItems"),Ie=o("JSONSchema202012KeywordContains"),qe=o("JSONSchema202012KeywordProperties"),ut=o("JSONSchema202012KeywordPatternProperties"),Nt=o("JSONSchema202012KeywordAdditionalProperties"),Ht=o("JSONSchema202012KeywordPropertyNames"),Vt=o("JSONSchema202012KeywordUnevaluatedItems"),Dt=o("JSONSchema202012KeywordUnevaluatedProperties"),tt=o("JSONSchema202012KeywordType"),Pt=o("JSONSchema202012KeywordEnum"),sn=o("JSONSchema202012KeywordConst"),pt=o("JSONSchema202012KeywordConstraint"),On=o("JSONSchema202012KeywordDependentRequired"),wn=o("JSONSchema202012KeywordContentSchema"),$t=o("JSONSchema202012KeywordTitle"),En=o("JSONSchema202012KeywordDescription"),Rn=o("JSONSchema202012KeywordDefault"),ir=o("JSONSchema202012KeywordDeprecated"),An=o("JSONSchema202012KeywordReadOnly"),Cn=o("JSONSchema202012KeywordWriteOnly"),rr=o("JSONSchema202012Accordion"),hr=o("JSONSchema202012ExpandDeepButton"),lr=o("JSONSchema202012ChevronRightIcon"),ko=o("withJSONSchema202012Context")(g,{config:{default$schema:"https://spec.openapis.org/oas/3.1/dialect/base",defaultExpandedLevels:u.defaultModelExpandDepth,includeReadOnly:!!n.includeReadOnly,includeWriteOnly:!!n.includeWriteOnly},components:{JSONSchema:x,Keyword$schema:k,Keyword$vocabulary:N,Keyword$id:M,Keyword$anchor:D,Keyword$dynamicAnchor:W,Keyword$ref:ee,Keyword$dynamicRef:Y,Keyword$defs:ie,Keyword$comment:H,KeywordAllOf:fe,KeywordAnyOf:oe,KeywordOneOf:ye,KeywordNot:be,KeywordIf:ce,KeywordThen:me,KeywordElse:we,KeywordDependentSchemas:Oe,KeywordPrefixItems:Ge,KeywordItems:Ke,KeywordContains:Ie,KeywordProperties:qe,KeywordPatternProperties:ut,KeywordAdditionalProperties:Nt,KeywordPropertyNames:Ht,KeywordUnevaluatedItems:Vt,KeywordUnevaluatedProperties:Dt,KeywordType:tt,KeywordEnum:Pt,KeywordConst:sn,KeywordConstraint:pt,KeywordDependentRequired:On,KeywordContentSchema:wn,KeywordTitle:$t,KeywordDescription:En,KeywordDefault:Rn,KeywordDeprecated:ir,KeywordReadOnly:An,KeywordWriteOnly:Cn,Accordion:rr,ExpandDeepButton:hr,ChevronRightIcon:lr},fn:{upperFirst:a.upperFirst,isExpandable:a.jsonSchema202012.isExpandable,getProperties:a.jsonSchema202012.getProperties}});return l.createElement(ko,n)}),AD=OD,Np=gi(t=>{let{getSystem:e}=t;const{getComponent:n,fn:r,getConfigs:o}=e(),a=o();if(Np.ModelsWithJSONSchemaContext)return l.createElement(Np.ModelsWithJSONSchemaContext,null);const p=n("OAS31Models",!0),u=n("JSONSchema202012"),g=n("JSONSchema202012Keyword$schema"),x=n("JSONSchema202012Keyword$vocabulary"),k=n("JSONSchema202012Keyword$id"),N=n("JSONSchema202012Keyword$anchor"),M=n("JSONSchema202012Keyword$dynamicAnchor"),D=n("JSONSchema202012Keyword$ref"),W=n("JSONSchema202012Keyword$dynamicRef"),ee=n("JSONSchema202012Keyword$defs"),Y=n("JSONSchema202012Keyword$comment"),ie=n("JSONSchema202012KeywordAllOf"),H=n("JSONSchema202012KeywordAnyOf"),fe=n("JSONSchema202012KeywordOneOf"),oe=n("JSONSchema202012KeywordNot"),ye=n("JSONSchema202012KeywordIf"),be=n("JSONSchema202012KeywordThen"),ce=n("JSONSchema202012KeywordElse"),me=n("JSONSchema202012KeywordDependentSchemas"),we=n("JSONSchema202012KeywordPrefixItems"),Oe=n("JSONSchema202012KeywordItems"),Ge=n("JSONSchema202012KeywordContains"),Ke=n("JSONSchema202012KeywordProperties"),Ie=n("JSONSchema202012KeywordPatternProperties"),qe=n("JSONSchema202012KeywordAdditionalProperties"),ut=n("JSONSchema202012KeywordPropertyNames"),Nt=n("JSONSchema202012KeywordUnevaluatedItems"),Ht=n("JSONSchema202012KeywordUnevaluatedProperties"),Vt=n("JSONSchema202012KeywordType"),Dt=n("JSONSchema202012KeywordEnum"),tt=n("JSONSchema202012KeywordConst"),Pt=n("JSONSchema202012KeywordConstraint"),sn=n("JSONSchema202012KeywordDependentRequired"),pt=n("JSONSchema202012KeywordContentSchema"),On=n("JSONSchema202012KeywordTitle"),wn=n("JSONSchema202012KeywordDescription"),$t=n("JSONSchema202012KeywordDefault"),En=n("JSONSchema202012KeywordDeprecated"),Rn=n("JSONSchema202012KeywordReadOnly"),ir=n("JSONSchema202012KeywordWriteOnly"),An=n("JSONSchema202012Accordion"),Cn=n("JSONSchema202012ExpandDeepButton"),rr=n("JSONSchema202012ChevronRightIcon"),hr=n("withJSONSchema202012Context");return Np.ModelsWithJSONSchemaContext=hr(p,{config:{default$schema:"https://spec.openapis.org/oas/3.1/dialect/base",defaultExpandedLevels:a.defaultModelsExpandDepth-1,includeReadOnly:!0,includeWriteOnly:!0},components:{JSONSchema:u,Keyword$schema:g,Keyword$vocabulary:x,Keyword$id:k,Keyword$anchor:N,Keyword$dynamicAnchor:M,Keyword$ref:D,Keyword$dynamicRef:W,Keyword$defs:ee,Keyword$comment:Y,KeywordAllOf:ie,KeywordAnyOf:H,KeywordOneOf:fe,KeywordNot:oe,KeywordIf:ye,KeywordThen:be,KeywordElse:ce,KeywordDependentSchemas:me,KeywordPrefixItems:we,KeywordItems:Oe,KeywordContains:Ge,KeywordProperties:Ke,KeywordPatternProperties:Ie,KeywordAdditionalProperties:qe,KeywordPropertyNames:ut,KeywordUnevaluatedItems:Nt,KeywordUnevaluatedProperties:Ht,KeywordType:Vt,KeywordEnum:Dt,KeywordConst:tt,KeywordConstraint:Pt,KeywordDependentRequired:sn,KeywordContentSchema:pt,KeywordTitle:On,KeywordDescription:wn,KeywordDefault:$t,KeywordDeprecated:En,KeywordReadOnly:Rn,KeywordWriteOnly:ir,Accordion:An,ExpandDeepButton:Cn,ChevronRightIcon:rr},fn:{upperFirst:r.upperFirst,isExpandable:r.jsonSchema202012.isExpandable,getProperties:r.jsonSchema202012.getProperties}}),l.createElement(Np.ModelsWithJSONSchemaContext,null)});Np.ModelsWithJSONSchemaContext=null;const kD=Np,CD=(t,e)=>n=>{const r=e.specSelectors.isOAS31(),o=e.getComponent("OAS31VersionPragmaFilter");return l.createElement(o,Wn()({isOAS31:r},n))},jD=gi(t=>{let p=t,{originalComponent:e}=p,n=Kr(p,["originalComponent"]);const{getComponent:r,schema:o}=n,a=r("MutualTLSAuth",!0);return o.get("type")==="mutualTLS"?l.createElement(a,{schema:o}):l.createElement(e,n)}),PD=jD,ND=gi(t=>{let o=t,{getSystem:e}=o,n=Kr(o,["getSystem"]);const r=e().getComponent("OAS31Auths",!0);return l.createElement(r,n)}),N1=(0,ne.Map)(),ID=Ut((t,e)=>e.specSelectors.specJson(),S2),TD=()=>t=>t.specSelectors.specJson().get("webhooks",N1),RD=Ut((t,e)=>e.specSelectors.webhooks(),(t,e)=>e.specSelectors.validOperationMethods(),(t,e)=>e.specSelectors.specResolvedSubtree(["webhooks"]),(t,e)=>ne.Map.isMap(t)?t.reduce((n,r,o)=>{if(!ne.Map.isMap(r))return n;const a=r.entrySeq().filter(p=>{let[u]=p;return e.includes(u)}).map(p=>{let[u,g]=p;return{operation:(0,ne.Map)({operation:g}),method:u,path:o,specPath:(0,ne.List)(["webhooks",o,u])}});return n.concat(a)},(0,ne.List)()).groupBy(n=>n.path).map(n=>n.toArray()).toObject():{}),MD=()=>t=>t.specSelectors.info().get("license",N1),DD=()=>t=>t.specSelectors.license().get("name","License"),LD=()=>t=>t.specSelectors.license().get("url"),BD=Ut((t,e)=>e.specSelectors.url(),(t,e)=>e.oas3Selectors.selectedServer(),(t,e)=>e.specSelectors.selectLicenseUrlField(),(t,e,n)=>{if(n)return Vs(n,t,{selectedServer:e})}),FD=()=>t=>t.specSelectors.license().get("identifier"),$D=()=>t=>t.specSelectors.info().get("contact",N1),qD=()=>t=>t.specSelectors.contact().get("name","the developer"),UD=()=>t=>t.specSelectors.contact().get("email"),zD=()=>t=>t.specSelectors.contact().get("url"),VD=Ut((t,e)=>e.specSelectors.url(),(t,e)=>e.oas3Selectors.selectedServer(),(t,e)=>e.specSelectors.selectContactUrlField(),(t,e,n)=>{if(n)return Vs(n,t,{selectedServer:e})}),WD=()=>t=>t.specSelectors.info().get("title"),KD=()=>t=>t.specSelectors.info().get("summary"),JD=()=>t=>t.specSelectors.info().get("description"),HD=()=>t=>t.specSelectors.info().get("termsOfService"),GD=Ut((t,e)=>e.specSelectors.url(),(t,e)=>e.oas3Selectors.selectedServer(),(t,e)=>e.specSelectors.selectInfoTermsOfServiceField(),(t,e,n)=>{if(n)return Vs(n,t,{selectedServer:e})}),YD=()=>t=>t.specSelectors.externalDocs().get("description"),QD=()=>t=>t.specSelectors.externalDocs().get("url"),ZD=Ut((t,e)=>e.specSelectors.url(),(t,e)=>e.oas3Selectors.selectedServer(),(t,e)=>e.specSelectors.selectExternalDocsUrlField(),(t,e,n)=>{if(n)return Vs(n,t,{selectedServer:e})}),XD=()=>t=>t.specSelectors.specJson().get("jsonSchemaDialect"),eL=()=>"https://spec.openapis.org/oas/3.1/dialect/base",tL=Ut((t,e)=>e.specSelectors.definitions(),(t,e)=>e.specSelectors.specResolvedSubtree(["components","schemas"]),(t,e)=>ne.Map.isMap(t)?ne.Map.isMap(e)?Object.entries(t.toJS()).reduce((n,r)=>{let[o,a]=r;const p=e.get(o);return n[o]=(p==null?void 0:p.toJS())||a,n},{}):t.toJS():{}),nL=(t,e)=>function(n){const r=e.specSelectors.isOAS31();for(var o=arguments.length,a=new Array(o>1?o-1:0),p=1;p<o;p++)a[p-1]=arguments[p];return r||t(...a)},rL=O2(()=>(t,e)=>e.oas31Selectors.selectLicenseUrl()),oL=O2(()=>(t,e)=>{const n=e.specSelectors.securityDefinitions();let r=t();return n&&n.entrySeq().forEach(o=>{let[a,p]=o;p.get("type")==="mutualTLS"&&(r=r.push(new ne.Map({[a]:p})))}),r}),aL=Ut((t,e)=>e.specSelectors.url(),(t,e)=>e.oas3Selectors.selectedServer(),(t,e)=>e.specSelectors.selectLicenseUrlField(),(t,e)=>e.specSelectors.selectLicenseIdentifierField(),(t,e,n,r)=>n?Vs(n,t,{selectedServer:e}):r?`https://spdx.org/licenses/${r}.html`:void 0),sL=t=>{let{schema:e,getSystem:n}=t;const{fn:r}=n(),{hasKeyword:o,stringify:a}=r.jsonSchema202012.useFn();return o(e,"example")?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--example"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"Example"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const"},a(e.example))):null},iL=t=>{let{schema:e,getSystem:n}=t;const r=(e==null?void 0:e.xml)||{},{fn:o,getComponent:a}=n(),{useIsExpandedDeeply:p,useComponent:u}=o.jsonSchema202012,g=p(),x=!!(r.name||r.namespace||r.prefix),[k,N]=(0,l.useState)(g),[M,D]=(0,l.useState)(!1),W=u("Accordion"),ee=u("ExpandDeepButton"),Y=a("JSONSchema202012DeepExpansionContext")(),ie=(0,l.useCallback)(()=>{N(fe=>!fe)},[]),H=(0,l.useCallback)((fe,oe)=>{N(oe),D(oe)},[]);return Object.keys(r).length===0?null:l.createElement(Y.Provider,{value:M},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml"},x?l.createElement(l.Fragment,null,l.createElement(W,{expanded:k,onChange:ie},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"XML")),l.createElement(ee,{expanded:k,onClick:H})):l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"XML"),r.attribute===!0&&l.createElement("span",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted"},"attribute"),r.wrapped===!0&&l.createElement("span",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted"},"wrapped"),l.createElement("strong",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary"},"object"),l.createElement("ul",{className:Nr()("json-schema-2020-12-keyword__children",{"json-schema-2020-12-keyword__children--collapsed":!k})},k&&l.createElement(l.Fragment,null,r.name&&l.createElement("li",{className:"json-schema-2020-12-property"},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"name"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},r.name))),r.namespace&&l.createElement("li",{className:"json-schema-2020-12-property"},l.createElement("div",{className:"json-schema-2020-12-keyword"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"namespace"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},r.namespace))),r.prefix&&l.createElement("li",{className:"json-schema-2020-12-property"},l.createElement("div",{className:"json-schema-2020-12-keyword"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"prefix"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},r.prefix)))))))},k2=t=>{let{discriminator:e}=t;const n=(e==null?void 0:e.mapping)||{};return Object.keys(n).length===0?null:Object.entries(n).map(r=>{let[o,a]=r;return l.createElement("div",{key:`${o}-${a}`,className:"json-schema-2020-12-keyword"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},o),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},a))})};k2.defaultProps={mapping:void 0};const lL=k2,cL=t=>{let{schema:e,getSystem:n}=t;const r=(e==null?void 0:e.discriminator)||{},{fn:o,getComponent:a}=n(),{useIsExpandedDeeply:p,useComponent:u}=o.jsonSchema202012,g=p(),x=!!r.mapping,[k,N]=(0,l.useState)(g),[M,D]=(0,l.useState)(!1),W=u("Accordion"),ee=u("ExpandDeepButton"),Y=a("JSONSchema202012DeepExpansionContext")(),ie=(0,l.useCallback)(()=>{N(fe=>!fe)},[]),H=(0,l.useCallback)((fe,oe)=>{N(oe),D(oe)},[]);return Object.keys(r).length===0?null:l.createElement(Y.Provider,{value:M},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator"},x?l.createElement(l.Fragment,null,l.createElement(W,{expanded:k,onChange:ie},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"Discriminator")),l.createElement(ee,{expanded:k,onClick:H})):l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"Discriminator"),r.propertyName&&l.createElement("span",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted"},r.propertyName),l.createElement("strong",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary"},"object"),l.createElement("ul",{className:Nr()("json-schema-2020-12-keyword__children",{"json-schema-2020-12-keyword__children--collapsed":!k})},k&&l.createElement("li",{className:"json-schema-2020-12-property"},l.createElement(lL,{discriminator:r})))))},uL=t=>{let{schema:e,getSystem:n}=t;const r=(e==null?void 0:e.externalDocs)||{},{fn:o,getComponent:a}=n(),{useIsExpandedDeeply:p,useComponent:u}=o.jsonSchema202012,g=p(),x=!(!r.description&&!r.url),[k,N]=(0,l.useState)(g),[M,D]=(0,l.useState)(!1),W=u("Accordion"),ee=u("ExpandDeepButton"),Y=a("JSONSchema202012KeywordDescription"),ie=a("Link"),H=a("JSONSchema202012DeepExpansionContext")(),fe=(0,l.useCallback)(()=>{N(ye=>!ye)},[]),oe=(0,l.useCallback)((ye,be)=>{N(be),D(be)},[]);return Object.keys(r).length===0?null:l.createElement(H.Provider,{value:M},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs"},x?l.createElement(l.Fragment,null,l.createElement(W,{expanded:k,onChange:fe},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"External documentation")),l.createElement(ee,{expanded:k,onClick:oe})):l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"External documentation"),l.createElement("strong",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary"},"object"),l.createElement("ul",{className:Nr()("json-schema-2020-12-keyword__children",{"json-schema-2020-12-keyword__children--collapsed":!k})},k&&l.createElement(l.Fragment,null,r.description&&l.createElement("li",{className:"json-schema-2020-12-property"},l.createElement(Y,{schema:r,getSystem:n})),r.url&&l.createElement("li",{className:"json-schema-2020-12-property"},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"url"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},l.createElement(ie,{target:"_blank",href:It(r.url)},r.url))))))))},pL=t=>{let{schema:e,getSystem:n}=t;if(!(e!=null&&e.description))return null;const{getComponent:r}=n(),o=r("Markdown");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--description"},l.createElement("div",{className:"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary"},l.createElement(o,{source:e.description})))},hL=gi(pL),dL=gi(t=>{let{schema:e,getSystem:n,originalComponent:r}=t;const{getComponent:o}=n(),a=o("JSONSchema202012KeywordDiscriminator"),p=o("JSONSchema202012KeywordXml"),u=o("JSONSchema202012KeywordExample"),g=o("JSONSchema202012KeywordExternalDocs");return l.createElement(l.Fragment,null,l.createElement(r,{schema:e}),l.createElement(a,{schema:e,getSystem:n}),l.createElement(p,{schema:e,getSystem:n}),l.createElement(g,{schema:e,getSystem:n}),l.createElement(u,{schema:e,getSystem:n}))}),fL=dL,mL=t=>{let{schema:e,getSystem:n}=t;const{fn:r}=n(),{useComponent:o}=r.jsonSchema202012,{getDependentRequired:a,getProperties:p}=r.jsonSchema202012.useFn(),u=r.jsonSchema202012.useConfig(),g=Array.isArray(e==null?void 0:e.required)?e.required:[],x=o("JSONSchema"),k=p(e,u);return Object.keys(k).length===0?null:l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties"},l.createElement("ul",null,Object.entries(k).map(N=>{let[M,D]=N;const W=g.includes(M),ee=a(M,e);return l.createElement("li",{key:M,className:Nr()("json-schema-2020-12-property",{"json-schema-2020-12-property--required":W})},l.createElement(x,{name:M,schema:D,dependentRequired:ee}))})))},gL=gi(mL),yL=(t,e)=>{let{includeReadOnly:n,includeWriteOnly:r}=e;if(!(t!=null&&t.properties))return{};const o=Object.entries(t.properties).filter(a=>{let[,p]=a;return((p==null?void 0:p.readOnly)!==!0||n)&&((p==null?void 0:p.writeOnly)!==!0||r)});return Object.fromEntries(o)},vL=function(e){let{fn:n,getSystem:r}=e;if(n.jsonSchema202012){const o=((a,p)=>{const{fn:u}=p();if(typeof a!="function")return null;const{hasKeyword:g}=u.jsonSchema202012;return x=>a(x)||g(x,"example")||(x==null?void 0:x.xml)||(x==null?void 0:x.discriminator)||(x==null?void 0:x.externalDocs)})(n.jsonSchema202012.isExpandable,r);Object.assign(this.fn.jsonSchema202012,{isExpandable:o,getProperties:yL})}if(typeof n.sampleFromSchema=="function"&&n.jsonSchema202012){const o=((a,p)=>{const{fn:u,specSelectors:g}=p;return Object.fromEntries(Object.entries(a).map(x=>{let[k,N]=x;const M=u[k];return[k,function(){return g.isOAS31()?N(...arguments):typeof M=="function"?M(...arguments):void 0}]}))})({sampleFromSchema:n.jsonSchema202012.sampleFromSchema,sampleFromSchemaGeneric:n.jsonSchema202012.sampleFromSchemaGeneric,createXMLExample:n.jsonSchema202012.createXMLExample,memoizedSampleFromSchema:n.jsonSchema202012.memoizedSampleFromSchema,memoizedCreateXMLExample:n.jsonSchema202012.memoizedCreateXMLExample},r());Object.assign(this.fn,o)}},bL=t=>{let{fn:e}=t;const n=e.createSystemSelector||A2,r=e.createOnlyOAS31Selector||x2;return{afterLoad:vL,fn:{isOAS31:S2,createSystemSelector:A2,createOnlyOAS31Selector:x2},components:{Webhooks:uD,JsonSchemaDialect:fD,MutualTLSAuth:bD,OAS31Info:dD,OAS31License:pD,OAS31Contact:hD,OAS31VersionPragmaFilter:mD,OAS31Model:yD,OAS31Models:vD,OAS31Auths:ED,JSONSchema202012KeywordExample:sL,JSONSchema202012KeywordXml:iL,JSONSchema202012KeywordDiscriminator:cL,JSONSchema202012KeywordExternalDocs:uL},wrapComponents:{InfoContainer:xD,License:_D,Contact:SD,VersionPragmaFilter:CD,Model:AD,Models:kD,AuthItem:PD,auths:ND,JSONSchema202012KeywordDescription:hL,JSONSchema202012KeywordDefault:fL,JSONSchema202012KeywordProperties:gL},statePlugins:{auth:{wrapSelectors:{definitionsToAuthorize:oL}},spec:{selectors:{isOAS31:n(ID),license:MD,selectLicenseNameField:DD,selectLicenseUrlField:LD,selectLicenseIdentifierField:r(FD),selectLicenseUrl:n(BD),contact:$D,selectContactNameField:qD,selectContactEmailField:UD,selectContactUrlField:zD,selectContactUrl:n(VD),selectInfoTitleField:WD,selectInfoSummaryField:r(KD),selectInfoDescriptionField:JD,selectInfoTermsOfServiceField:HD,selectInfoTermsOfServiceUrl:n(GD),selectExternalDocsDescriptionField:YD,selectExternalDocsUrlField:QD,selectExternalDocsUrl:n(ZD),webhooks:r(TD),selectWebhooksOperations:r(n(RD)),selectJsonSchemaDialectField:XD,selectJsonSchemaDialectDefault:eL,selectSchemas:n(tL)},wrapSelectors:{isOAS3:nL,selectLicenseUrl:rL}},oas31:{selectors:{selectLicenseUrl:r(n(aL))}}}}},wL=za().object,EL=za().bool,Ip=(za().oneOfType([wL,EL]),(0,l.createContext)(null));Ip.displayName="JSONSchemaContext";const I1=(0,l.createContext)(0);I1.displayName="JSONSchemaLevelContext";const yi=(0,l.createContext)(!1);yi.displayName="JSONSchemaDeepExpansionContext";const T1=(0,l.createContext)(new Set),C2=()=>{const{config:t}=(0,l.useContext)(Ip);return t},Mt=t=>{const{components:e}=(0,l.useContext)(Ip);return e[t]||null},Mr=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;const{fn:e}=(0,l.useContext)(Ip);return t!==void 0?e[t]:e},R1=()=>{const t=(0,l.useContext)(I1);return[t,t+1]},il=()=>(0,l.useContext)(yi),j2=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;if(t===void 0)return(0,l.useContext)(T1);const e=(0,l.useContext)(T1);return new Set([...e,t])},P2=(0,l.forwardRef)((t,e)=>{let{schema:n,name:r,dependentRequired:o,onExpand:a}=t;const p=Mr(),u=(()=>{const[Fo]=R1(),{defaultExpandedLevels:Yo}=C2();return Yo-Fo>0})(),g=il(),[x,k]=(0,l.useState)(u||g),[N,M]=(0,l.useState)(g),[D,W]=R1(),ee=(()=>{const[Fo]=R1();return Fo>0})(),Y=p.isExpandable(n)||o.length>0,ie=(Fo=>j2().has(Fo))(n),H=j2(n),fe=p.stringifyConstraints(n),oe=Mt("Accordion"),ye=Mt("Keyword$schema"),be=Mt("Keyword$vocabulary"),ce=Mt("Keyword$id"),me=Mt("Keyword$anchor"),we=Mt("Keyword$dynamicAnchor"),Oe=Mt("Keyword$ref"),Ge=Mt("Keyword$dynamicRef"),Ke=Mt("Keyword$defs"),Ie=Mt("Keyword$comment"),qe=Mt("KeywordAllOf"),ut=Mt("KeywordAnyOf"),Nt=Mt("KeywordOneOf"),Ht=Mt("KeywordNot"),Vt=Mt("KeywordIf"),Dt=Mt("KeywordThen"),tt=Mt("KeywordElse"),Pt=Mt("KeywordDependentSchemas"),sn=Mt("KeywordPrefixItems"),pt=Mt("KeywordItems"),On=Mt("KeywordContains"),wn=Mt("KeywordProperties"),$t=Mt("KeywordPatternProperties"),En=Mt("KeywordAdditionalProperties"),Rn=Mt("KeywordPropertyNames"),ir=Mt("KeywordUnevaluatedItems"),An=Mt("KeywordUnevaluatedProperties"),Cn=Mt("KeywordType"),rr=Mt("KeywordEnum"),hr=Mt("KeywordConst"),lr=Mt("KeywordConstraint"),ko=Mt("KeywordDependentRequired"),sa=Mt("KeywordContentSchema"),Va=Mt("KeywordTitle"),Ks=Mt("KeywordDescription"),vi=Mt("KeywordDefault"),cl=Mt("KeywordDeprecated"),tc=Mt("KeywordReadOnly"),Mp=Mt("KeywordWriteOnly"),Wa=Mt("ExpandDeepButton");(0,l.useEffect)(()=>{M(g)},[g]),(0,l.useEffect)(()=>{M(N)},[N]);const nc=(0,l.useCallback)((Fo,Yo)=>{k(Yo),!Yo&&M(!1),a(Fo,Yo,!1)},[a]),bi=(0,l.useCallback)((Fo,Yo)=>{k(Yo),M(Yo),a(Fo,Yo,!0)},[a]);return l.createElement(I1.Provider,{value:W},l.createElement(yi.Provider,{value:N},l.createElement(T1.Provider,{value:H},l.createElement("article",{ref:e,"data-json-schema-level":D,className:Nr()("json-schema-2020-12",{"json-schema-2020-12--embedded":ee,"json-schema-2020-12--circular":ie})},l.createElement("div",{className:"json-schema-2020-12-head"},Y&&!ie?l.createElement(l.Fragment,null,l.createElement(oe,{expanded:x,onChange:nc},l.createElement(Va,{title:r,schema:n})),l.createElement(Wa,{expanded:x,onClick:bi})):l.createElement(Va,{title:r,schema:n}),l.createElement(cl,{schema:n}),l.createElement(tc,{schema:n}),l.createElement(Mp,{schema:n}),l.createElement(Cn,{schema:n,isCircular:ie}),fe.length>0&&fe.map(Fo=>l.createElement(lr,{key:`${Fo.scope}-${Fo.value}`,constraint:Fo}))),l.createElement("div",{className:Nr()("json-schema-2020-12-body",{"json-schema-2020-12-body--collapsed":!x})},x&&l.createElement(l.Fragment,null,l.createElement(Ks,{schema:n}),!ie&&Y&&l.createElement(l.Fragment,null,l.createElement(wn,{schema:n}),l.createElement($t,{schema:n}),l.createElement(En,{schema:n}),l.createElement(An,{schema:n}),l.createElement(Rn,{schema:n}),l.createElement(qe,{schema:n}),l.createElement(ut,{schema:n}),l.createElement(Nt,{schema:n}),l.createElement(Ht,{schema:n}),l.createElement(Vt,{schema:n}),l.createElement(Dt,{schema:n}),l.createElement(tt,{schema:n}),l.createElement(Pt,{schema:n}),l.createElement(sn,{schema:n}),l.createElement(pt,{schema:n}),l.createElement(ir,{schema:n}),l.createElement(On,{schema:n}),l.createElement(sa,{schema:n})),l.createElement(rr,{schema:n}),l.createElement(hr,{schema:n}),l.createElement(ko,{schema:n,dependentRequired:o}),l.createElement(vi,{schema:n}),l.createElement(ye,{schema:n}),l.createElement(be,{schema:n}),l.createElement(ce,{schema:n}),l.createElement(me,{schema:n}),l.createElement(we,{schema:n}),l.createElement(Oe,{schema:n}),!ie&&Y&&l.createElement(Ke,{schema:n}),l.createElement(Ge,{schema:n}),l.createElement(Ie,{schema:n})))))))});P2.defaultProps={name:"",dependentRequired:[],onExpand:()=>{}};const N2=P2,I2=t=>{let{schema:e}=t;return e!=null&&e.$schema?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"$schema"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},e.$schema)):null},T2=t=>{let{schema:e}=t;const n=il(),[r,o]=(0,l.useState)(n),a=Mt("Accordion"),p=(0,l.useCallback)(()=>{o(u=>!u)},[]);return e!=null&&e.$vocabulary?typeof e.$vocabulary!="object"?null:l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary"},l.createElement(a,{expanded:r,onChange:p},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"$vocabulary")),l.createElement("strong",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary"},"object"),l.createElement("ul",null,r&&Object.entries(e.$vocabulary).map(u=>{let[g,x]=u;return l.createElement("li",{key:g,className:Nr()("json-schema-2020-12-$vocabulary-uri",{"json-schema-2020-12-$vocabulary-uri--disabled":!x})},l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},g))}))):null},R2=t=>{let{schema:e}=t;return e!=null&&e.$id?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"$id"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},e.$id)):null},M2=t=>{let{schema:e}=t;return e!=null&&e.$anchor?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"$anchor"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},e.$anchor)):null},D2=t=>{let{schema:e}=t;return e!=null&&e.$dynamicAnchor?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"$dynamicAnchor"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},e.$dynamicAnchor)):null},L2=t=>{let{schema:e}=t;return e!=null&&e.$ref?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"$ref"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},e.$ref)):null},B2=t=>{let{schema:e}=t;return e!=null&&e.$dynamicRef?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"$dynamicRef"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},e.$dynamicRef)):null},F2=t=>{let{schema:e}=t;const n=(e==null?void 0:e.$defs)||{},r=il(),[o,a]=(0,l.useState)(r),[p,u]=(0,l.useState)(!1),g=Mt("Accordion"),x=Mt("ExpandDeepButton"),k=Mt("JSONSchema"),N=(0,l.useCallback)(()=>{a(D=>!D)},[]),M=(0,l.useCallback)((D,W)=>{a(W),u(W)},[]);return Object.keys(n).length===0?null:l.createElement(yi.Provider,{value:p},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs"},l.createElement(g,{expanded:o,onChange:N},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"$defs")),l.createElement(x,{expanded:o,onClick:M}),l.createElement("strong",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary"},"object"),l.createElement("ul",{className:Nr()("json-schema-2020-12-keyword__children",{"json-schema-2020-12-keyword__children--collapsed":!o})},o&&l.createElement(l.Fragment,null,Object.entries(n).map(D=>{let[W,ee]=D;return l.createElement("li",{key:W,className:"json-schema-2020-12-property"},l.createElement(k,{name:W,schema:ee}))})))))},$2=t=>{let{schema:e}=t;return e!=null&&e.$comment?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary"},"$comment"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary"},e.$comment)):null},q2=t=>{let{schema:e}=t;const n=(e==null?void 0:e.allOf)||[],r=Mr(),o=il(),[a,p]=(0,l.useState)(o),[u,g]=(0,l.useState)(!1),x=Mt("Accordion"),k=Mt("ExpandDeepButton"),N=Mt("JSONSchema"),M=Mt("KeywordType"),D=(0,l.useCallback)(()=>{p(ee=>!ee)},[]),W=(0,l.useCallback)((ee,Y)=>{p(Y),g(Y)},[]);return Array.isArray(n)&&n.length!==0?l.createElement(yi.Provider,{value:u},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf"},l.createElement(x,{expanded:a,onChange:D},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"All of")),l.createElement(k,{expanded:a,onClick:W}),l.createElement(M,{schema:{allOf:n}}),l.createElement("ul",{className:Nr()("json-schema-2020-12-keyword__children",{"json-schema-2020-12-keyword__children--collapsed":!a})},a&&l.createElement(l.Fragment,null,n.map((ee,Y)=>l.createElement("li",{key:`#${Y}`,className:"json-schema-2020-12-property"},l.createElement(N,{name:`#${Y} ${r.getTitle(ee)}`,schema:ee}))))))):null},U2=t=>{let{schema:e}=t;const n=(e==null?void 0:e.anyOf)||[],r=Mr(),o=il(),[a,p]=(0,l.useState)(o),[u,g]=(0,l.useState)(!1),x=Mt("Accordion"),k=Mt("ExpandDeepButton"),N=Mt("JSONSchema"),M=Mt("KeywordType"),D=(0,l.useCallback)(()=>{p(ee=>!ee)},[]),W=(0,l.useCallback)((ee,Y)=>{p(Y),g(Y)},[]);return Array.isArray(n)&&n.length!==0?l.createElement(yi.Provider,{value:u},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf"},l.createElement(x,{expanded:a,onChange:D},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Any of")),l.createElement(k,{expanded:a,onClick:W}),l.createElement(M,{schema:{anyOf:n}}),l.createElement("ul",{className:Nr()("json-schema-2020-12-keyword__children",{"json-schema-2020-12-keyword__children--collapsed":!a})},a&&l.createElement(l.Fragment,null,n.map((ee,Y)=>l.createElement("li",{key:`#${Y}`,className:"json-schema-2020-12-property"},l.createElement(N,{name:`#${Y} ${r.getTitle(ee)}`,schema:ee}))))))):null},z2=t=>{let{schema:e}=t;const n=(e==null?void 0:e.oneOf)||[],r=Mr(),o=il(),[a,p]=(0,l.useState)(o),[u,g]=(0,l.useState)(!1),x=Mt("Accordion"),k=Mt("ExpandDeepButton"),N=Mt("JSONSchema"),M=Mt("KeywordType"),D=(0,l.useCallback)(()=>{p(ee=>!ee)},[]),W=(0,l.useCallback)((ee,Y)=>{p(Y),g(Y)},[]);return Array.isArray(n)&&n.length!==0?l.createElement(yi.Provider,{value:u},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf"},l.createElement(x,{expanded:a,onChange:D},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"One of")),l.createElement(k,{expanded:a,onClick:W}),l.createElement(M,{schema:{oneOf:n}}),l.createElement("ul",{className:Nr()("json-schema-2020-12-keyword__children",{"json-schema-2020-12-keyword__children--collapsed":!a})},a&&l.createElement(l.Fragment,null,n.map((ee,Y)=>l.createElement("li",{key:`#${Y}`,className:"json-schema-2020-12-property"},l.createElement(N,{name:`#${Y} ${r.getTitle(ee)}`,schema:ee}))))))):null},V2=t=>{let{schema:e}=t;const n=Mr(),r=Mt("JSONSchema");if(!n.hasKeyword(e,"not"))return null;const o=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Not");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--not"},l.createElement(r,{name:o,schema:e.not}))},W2=t=>{let{schema:e}=t;const n=Mr(),r=Mt("JSONSchema");if(!n.hasKeyword(e,"if"))return null;const o=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"If");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--if"},l.createElement(r,{name:o,schema:e.if}))},K2=t=>{let{schema:e}=t;const n=Mr(),r=Mt("JSONSchema");if(!n.hasKeyword(e,"then"))return null;const o=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Then");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--then"},l.createElement(r,{name:o,schema:e.then}))},J2=t=>{let{schema:e}=t;const n=Mr(),r=Mt("JSONSchema");if(!n.hasKeyword(e,"else"))return null;const o=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Else");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--if"},l.createElement(r,{name:o,schema:e.else}))},H2=t=>{let{schema:e}=t;const n=(e==null?void 0:e.dependentSchemas)||[],r=il(),[o,a]=(0,l.useState)(r),[p,u]=(0,l.useState)(!1),g=Mt("Accordion"),x=Mt("ExpandDeepButton"),k=Mt("JSONSchema"),N=(0,l.useCallback)(()=>{a(D=>!D)},[]),M=(0,l.useCallback)((D,W)=>{a(W),u(W)},[]);return typeof n!="object"||Object.keys(n).length===0?null:l.createElement(yi.Provider,{value:p},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas"},l.createElement(g,{expanded:o,onChange:N},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Dependent schemas")),l.createElement(x,{expanded:o,onClick:M}),l.createElement("strong",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary"},"object"),l.createElement("ul",{className:Nr()("json-schema-2020-12-keyword__children",{"json-schema-2020-12-keyword__children--collapsed":!o})},o&&l.createElement(l.Fragment,null,Object.entries(n).map(D=>{let[W,ee]=D;return l.createElement("li",{key:W,className:"json-schema-2020-12-property"},l.createElement(k,{name:W,schema:ee}))})))))},G2=t=>{let{schema:e}=t;const n=(e==null?void 0:e.prefixItems)||[],r=Mr(),o=il(),[a,p]=(0,l.useState)(o),[u,g]=(0,l.useState)(!1),x=Mt("Accordion"),k=Mt("ExpandDeepButton"),N=Mt("JSONSchema"),M=Mt("KeywordType"),D=(0,l.useCallback)(()=>{p(ee=>!ee)},[]),W=(0,l.useCallback)((ee,Y)=>{p(Y),g(Y)},[]);return Array.isArray(n)&&n.length!==0?l.createElement(yi.Provider,{value:u},l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems"},l.createElement(x,{expanded:a,onChange:D},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Prefix items")),l.createElement(k,{expanded:a,onClick:W}),l.createElement(M,{schema:{prefixItems:n}}),l.createElement("ul",{className:Nr()("json-schema-2020-12-keyword__children",{"json-schema-2020-12-keyword__children--collapsed":!a})},a&&l.createElement(l.Fragment,null,n.map((ee,Y)=>l.createElement("li",{key:`#${Y}`,className:"json-schema-2020-12-property"},l.createElement(N,{name:`#${Y} ${r.getTitle(ee)}`,schema:ee}))))))):null},Y2=t=>{let{schema:e}=t;const n=Mr(),r=Mt("JSONSchema");if(!n.hasKeyword(e,"items"))return null;const o=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Items");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--items"},l.createElement(r,{name:o,schema:e.items}))},Q2=t=>{let{schema:e}=t;const n=Mr(),r=Mt("JSONSchema");if(!n.hasKeyword(e,"contains"))return null;const o=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Contains");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains"},l.createElement(r,{name:o,schema:e.contains}))},Z2=t=>{let{schema:e}=t;const n=Mr(),r=(e==null?void 0:e.properties)||{},o=Array.isArray(e==null?void 0:e.required)?e.required:[],a=Mt("JSONSchema");return Object.keys(r).length===0?null:l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties"},l.createElement("ul",null,Object.entries(r).map(p=>{let[u,g]=p;const x=o.includes(u),k=n.getDependentRequired(u,e);return l.createElement("li",{key:u,className:Nr()("json-schema-2020-12-property",{"json-schema-2020-12-property--required":x})},l.createElement(a,{name:u,schema:g,dependentRequired:k}))})))},X2=t=>{let{schema:e}=t;const n=(e==null?void 0:e.patternProperties)||{},r=Mt("JSONSchema");return Object.keys(n).length===0?null:l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties"},l.createElement("ul",null,Object.entries(n).map(o=>{let[a,p]=o;return l.createElement("li",{key:a,className:"json-schema-2020-12-property"},l.createElement(r,{name:a,schema:p}))})))},ex=t=>{let{schema:e}=t;const n=Mr(),{additionalProperties:r}=e,o=Mt("JSONSchema");if(!n.hasKeyword(e,"additionalProperties"))return null;const a=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Additional properties");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties"},r===!0?l.createElement(l.Fragment,null,a,l.createElement("span",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary"},"allowed")):r===!1?l.createElement(l.Fragment,null,a,l.createElement("span",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary"},"forbidden")):l.createElement(o,{name:a,schema:r}))},tx=t=>{let{schema:e}=t;const n=Mr(),{propertyNames:r}=e,o=Mt("JSONSchema"),a=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Property names");return n.hasKeyword(e,"propertyNames")?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames"},l.createElement(o,{name:a,schema:r})):null},nx=t=>{let{schema:e}=t;const n=Mr(),{unevaluatedItems:r}=e,o=Mt("JSONSchema");if(!n.hasKeyword(e,"unevaluatedItems"))return null;const a=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Unevaluated items");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems"},l.createElement(o,{name:a,schema:r}))},rx=t=>{let{schema:e}=t;const n=Mr(),{unevaluatedProperties:r}=e,o=Mt("JSONSchema");if(!n.hasKeyword(e,"unevaluatedProperties"))return null;const a=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Unevaluated properties");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties"},l.createElement(o,{name:a,schema:r}))},ox=t=>{let{schema:e,isCircular:n}=t;const r=Mr().getType(e),o=n?" [circular]":"";return l.createElement("strong",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary"},`${r}${o}`)};ox.defaultProps={isCircular:!1};const ax=ox,sx=t=>{let{schema:e}=t;const n=Mr();return Array.isArray(e==null?void 0:e.enum)?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Allowed values"),l.createElement("ul",null,e.enum.map(r=>{const o=n.stringify(r);return l.createElement("li",{key:o},l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const"},o))}))):null},ix=t=>{let{schema:e}=t;const n=Mr();return n.hasKeyword(e,"const")?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--const"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Const"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const"},n.stringify(e.const))):null},_L=t=>{let{constraint:e}=t;return l.createElement("span",{className:`json-schema-2020-12__constraint json-schema-2020-12__constraint--${e.scope}`},e.value)},lx=l.memo(_L),cx=t=>{let{dependentRequired:e}=t;return e.length===0?null:l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Required when defined"),l.createElement("ul",null,e.map(n=>l.createElement("li",{key:n},l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning"},n)))))},ux=t=>{let{schema:e}=t;const n=Mr(),r=Mt("JSONSchema");if(!n.hasKeyword(e,"contentSchema"))return null;const o=l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Content schema");return l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema"},l.createElement(r,{name:o,schema:e.contentSchema}))},px=t=>{let{title:e,schema:n}=t;const r=Mr();return e||r.getTitle(n)?l.createElement("div",{className:"json-schema-2020-12__title"},e||r.getTitle(n)):null};px.defaultProps={title:""};const hx=px,dx=t=>{let{schema:e}=t;return e!=null&&e.description?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--description"},l.createElement("div",{className:"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary"},e.description)):null},fx=t=>{let{schema:e}=t;const n=Mr();return n.hasKeyword(e,"default")?l.createElement("div",{className:"json-schema-2020-12-keyword json-schema-2020-12-keyword--default"},l.createElement("span",{className:"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary"},"Default"),l.createElement("span",{className:"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const"},n.stringify(e.default))):null},mx=t=>{let{schema:e}=t;return(e==null?void 0:e.deprecated)!==!0?null:l.createElement("span",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning"},"deprecated")},gx=t=>{let{schema:e}=t;return(e==null?void 0:e.readOnly)!==!0?null:l.createElement("span",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted"},"read-only")},yx=t=>{let{schema:e}=t;return(e==null?void 0:e.writeOnly)!==!0?null:l.createElement("span",{className:"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted"},"write-only")},vx=t=>{let{expanded:e,children:n,onChange:r}=t;const o=Mt("ChevronRightIcon"),a=(0,l.useCallback)(p=>{r(p,!e)},[e,r]);return l.createElement("button",{type:"button",className:"json-schema-2020-12-accordion",onClick:a},l.createElement("div",{className:"json-schema-2020-12-accordion__children"},n),l.createElement("span",{className:Nr()("json-schema-2020-12-accordion__icon",{"json-schema-2020-12-accordion__icon--expanded":e,"json-schema-2020-12-accordion__icon--collapsed":!e})},l.createElement(o,null)))};vx.defaultProps={expanded:!1};const bx=vx,wx=t=>{let{expanded:e,onClick:n}=t;const r=(0,l.useCallback)(o=>{n(o,!e)},[e,n]);return l.createElement("button",{type:"button",className:"json-schema-2020-12-expand-deep-button",onClick:r},e?"Collapse all":"Expand all")},Ex=()=>l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},l.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),_x=t=>typeof t=="string"?`${t.charAt(0).toUpperCase()}${t.slice(1)}`:t,SL=t=>{const e=Mr();return t!=null&&t.title?e.upperFirst(t.title):t!=null&&t.$anchor?e.upperFirst(t.$anchor):t!=null&&t.$id?t.$id:""},Tp=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakSet;const n=Mr();if(t==null)return"any";if(n.isBooleanJSONSchema(t))return t?"any":"never";if(typeof t!="object"||e.has(t))return"any";e.add(t);const{type:r,prefixItems:o,items:a}=t,p=()=>{if(Array.isArray(o)){const x=o.map(N=>Tp(N,e)),k=a?Tp(a,e):"any";return`array<[${x.join(", ")}], ${k}>`}return a?`array<${Tp(a,e)}>`:"array<any>"};if(t.not&&Tp(t.not)==="any")return"never";const u=(x,k)=>Array.isArray(t[x])?`(${t[x].map(N=>Tp(N,e)).join(k)})`:null,g=[Array.isArray(r)?r.map(x=>x==="array"?p():x).join(" | "):r==="array"?p():["null","boolean","object","array","number","integer","string"].includes(r)?r:(()=>{if(Object.hasOwn(t,"prefixItems")||Object.hasOwn(t,"items")||Object.hasOwn(t,"contains"))return p();if(Object.hasOwn(t,"properties")||Object.hasOwn(t,"additionalProperties")||Object.hasOwn(t,"patternProperties"))return"object";if(["int32","int64"].includes(t.format))return"integer";if(["float","double"].includes(t.format))return"number";if(Object.hasOwn(t,"minimum")||Object.hasOwn(t,"maximum")||Object.hasOwn(t,"exclusiveMinimum")||Object.hasOwn(t,"exclusiveMaximum")||Object.hasOwn(t,"multipleOf"))return"number | integer";if(Object.hasOwn(t,"pattern")||Object.hasOwn(t,"format")||Object.hasOwn(t,"minLength")||Object.hasOwn(t,"maxLength"))return"string";if(t.const!==void 0){if(t.const===null)return"null";if(typeof t.const=="boolean")return"boolean";if(typeof t.const=="number")return Number.isInteger(t.const)?"integer":"number";if(typeof t.const=="string")return"string";if(Array.isArray(t.const))return"array<any>";if(typeof t.const=="object")return"object"}return null})(),u("oneOf"," | "),u("anyOf"," | "),u("allOf"," & ")].filter(Boolean).join(" | ");return e.delete(t),g||"any"},xL=t=>typeof t=="boolean",Sx=(t,e)=>t!==null&&typeof t=="object"&&Object.hasOwn(t,e),xx=t=>{const e=Mr();return(t==null?void 0:t.$schema)||(t==null?void 0:t.$vocabulary)||(t==null?void 0:t.$id)||(t==null?void 0:t.$anchor)||(t==null?void 0:t.$dynamicAnchor)||(t==null?void 0:t.$ref)||(t==null?void 0:t.$dynamicRef)||(t==null?void 0:t.$defs)||(t==null?void 0:t.$comment)||(t==null?void 0:t.allOf)||(t==null?void 0:t.anyOf)||(t==null?void 0:t.oneOf)||e.hasKeyword(t,"not")||e.hasKeyword(t,"if")||e.hasKeyword(t,"then")||e.hasKeyword(t,"else")||(t==null?void 0:t.dependentSchemas)||(t==null?void 0:t.prefixItems)||e.hasKeyword(t,"items")||e.hasKeyword(t,"contains")||(t==null?void 0:t.properties)||(t==null?void 0:t.patternProperties)||e.hasKeyword(t,"additionalProperties")||e.hasKeyword(t,"propertyNames")||e.hasKeyword(t,"unevaluatedItems")||e.hasKeyword(t,"unevaluatedProperties")||(t==null?void 0:t.description)||(t==null?void 0:t.enum)||e.hasKeyword(t,"const")||e.hasKeyword(t,"contentSchema")||e.hasKeyword(t,"default")},Ox=t=>t===null||["number","bigint","boolean"].includes(typeof t)?String(t):Array.isArray(t)?`[${t.map(Ox).join(", ")}]`:JSON.stringify(t),Vg=(t,e,n)=>{const r=typeof e=="number",o=typeof n=="number";return r&&o?e===n?`${e} ${t}`:`[${e}, ${n}] ${t}`:r?`>= ${e} ${t}`:o?`<= ${n} ${t}`:null},OL=t=>{const e=[],n=(g=>{if(typeof(g==null?void 0:g.multipleOf)!="number"||g.multipleOf<=0||g.multipleOf===1)return null;const{multipleOf:x}=g;if(Number.isInteger(x))return`multiple of ${x}`;const k=wi(10,x.toString().split(".")[1].length);return`multiple of ${x*k}/${k}`})(t);n!==null&&e.push({scope:"number",value:n});const r=(g=>{const x=g==null?void 0:g.minimum,k=g==null?void 0:g.maximum,N=g==null?void 0:g.exclusiveMinimum,M=g==null?void 0:g.exclusiveMaximum,D=typeof x=="number",W=typeof k=="number",ee=typeof N=="number",Y=typeof M=="number",ie=ee&&(!D||x<N),H=Y&&(!W||k>M);return(D||ee)&&(W||Y)?`${ie?"(":"["}${ie?N:x}, ${H?M:k}${H?")":"]"}`:D||ee?`${ie?">":"≥"} ${ie?N:x}`:W||Y?`${H?"<":"≤"} ${H?M:k}`:null})(t);r!==null&&e.push({scope:"number",value:r}),t!=null&&t.format&&e.push({scope:"string",value:t.format});const o=Vg("characters",t==null?void 0:t.minLength,t==null?void 0:t.maxLength);o!==null&&e.push({scope:"string",value:o}),t!=null&&t.pattern&&e.push({scope:"string",value:`matches ${t==null?void 0:t.pattern}`}),t!=null&&t.contentMediaType&&e.push({scope:"string",value:`media type: ${t.contentMediaType}`}),t!=null&&t.contentEncoding&&e.push({scope:"string",value:`encoding: ${t.contentEncoding}`});const a=Vg(t!=null&&t.hasUniqueItems?"unique items":"items",t==null?void 0:t.minItems,t==null?void 0:t.maxItems);a!==null&&e.push({scope:"array",value:a});const p=Vg("contained items",t==null?void 0:t.minContains,t==null?void 0:t.maxContains);p!==null&&e.push({scope:"array",value:p});const u=Vg("properties",t==null?void 0:t.minProperties,t==null?void 0:t.maxProperties);return u!==null&&e.push({scope:"object",value:u}),e},AL=(t,e)=>e!=null&&e.dependentRequired?Array.from(Object.entries(e.dependentRequired).reduce((n,r)=>{let[o,a]=r;return Array.isArray(a)&&a.includes(t)&&n.add(o),n},new Set)):[],kL=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n={components:Tt({JSONSchema:N2,Keyword$schema:I2,Keyword$vocabulary:T2,Keyword$id:R2,Keyword$anchor:M2,Keyword$dynamicAnchor:D2,Keyword$ref:L2,Keyword$dynamicRef:B2,Keyword$defs:F2,Keyword$comment:$2,KeywordAllOf:q2,KeywordAnyOf:U2,KeywordOneOf:z2,KeywordNot:V2,KeywordIf:W2,KeywordThen:K2,KeywordElse:J2,KeywordDependentSchemas:H2,KeywordPrefixItems:G2,KeywordItems:Y2,KeywordContains:Q2,KeywordProperties:Z2,KeywordPatternProperties:X2,KeywordAdditionalProperties:ex,KeywordPropertyNames:tx,KeywordUnevaluatedItems:nx,KeywordUnevaluatedProperties:rx,KeywordType:ax,KeywordEnum:sx,KeywordConst:ix,KeywordConstraint:lx,KeywordDependentRequired:cx,KeywordContentSchema:ux,KeywordTitle:hx,KeywordDescription:dx,KeywordDefault:fx,KeywordDeprecated:mx,KeywordReadOnly:gx,KeywordWriteOnly:yx,Accordion:bx,ExpandDeepButton:wx,ChevronRightIcon:Ex},e.components),config:Tt({default$schema:"https://json-schema.org/draft/2020-12/schema",defaultExpandedLevels:0},e.config),fn:Tt({upperFirst:_x,getTitle:SL,getType:Tp,isBooleanJSONSchema:xL,hasKeyword:Sx,isExpandable:xx,stringify:Ox,stringifyConstraints:OL,getDependentRequired:AL},e.fn)},r=o=>l.createElement(Ip.Provider,{value:n},l.createElement(t,o));return r.contexts={JSONSchemaContext:Ip},r.displayName=t.displayName,r},Ax=()=>({components:{JSONSchema202012:N2,JSONSchema202012Keyword$schema:I2,JSONSchema202012Keyword$vocabulary:T2,JSONSchema202012Keyword$id:R2,JSONSchema202012Keyword$anchor:M2,JSONSchema202012Keyword$dynamicAnchor:D2,JSONSchema202012Keyword$ref:L2,JSONSchema202012Keyword$dynamicRef:B2,JSONSchema202012Keyword$defs:F2,JSONSchema202012Keyword$comment:$2,JSONSchema202012KeywordAllOf:q2,JSONSchema202012KeywordAnyOf:U2,JSONSchema202012KeywordOneOf:z2,JSONSchema202012KeywordNot:V2,JSONSchema202012KeywordIf:W2,JSONSchema202012KeywordThen:K2,JSONSchema202012KeywordElse:J2,JSONSchema202012KeywordDependentSchemas:H2,JSONSchema202012KeywordPrefixItems:G2,JSONSchema202012KeywordItems:Y2,JSONSchema202012KeywordContains:Q2,JSONSchema202012KeywordProperties:Z2,JSONSchema202012KeywordPatternProperties:X2,JSONSchema202012KeywordAdditionalProperties:ex,JSONSchema202012KeywordPropertyNames:tx,JSONSchema202012KeywordUnevaluatedItems:nx,JSONSchema202012KeywordUnevaluatedProperties:rx,JSONSchema202012KeywordType:ax,JSONSchema202012KeywordEnum:sx,JSONSchema202012KeywordConst:ix,JSONSchema202012KeywordConstraint:lx,JSONSchema202012KeywordDependentRequired:cx,JSONSchema202012KeywordContentSchema:ux,JSONSchema202012KeywordTitle:hx,JSONSchema202012KeywordDescription:dx,JSONSchema202012KeywordDefault:fx,JSONSchema202012KeywordDeprecated:mx,JSONSchema202012KeywordReadOnly:gx,JSONSchema202012KeywordWriteOnly:yx,JSONSchema202012Accordion:bx,JSONSchema202012ExpandDeepButton:wx,JSONSchema202012ChevronRightIcon:Ex,withJSONSchema202012Context:kL,JSONSchema202012DeepExpansionContext:()=>yi},fn:{upperFirst:_x,jsonSchema202012:{isExpandable:xx,hasKeyword:Sx,useFn:Mr,useConfig:C2,useComponent:Mt,useIsExpandedDeeply:il}}});var CL=De(68630),kx=De.n(CL);const jL=(t,e)=>{let{sample:n}=e;return function(r){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{minItems:a,maxItems:p,uniqueItems:u}=o,{contains:g,minContains:x,maxContains:k}=o;let N=[...r];if(g!=null&&typeof g=="object"&&Number.isInteger(x)&&x>1){const M=N.at(0);for(let D=1;D<x;D+=1)N.unshift(M)}if(Number.isInteger(p)&&p>0&&(N=r.slice(0,p)),Number.isInteger(a)&&a>0)for(let M=0;N.length<a;M+=1)N.push(N[M%N.length]);return u===!0&&(N=Array.from(new Set(N))),N}(n,t)},PL=()=>{throw new Error("Not implemented")},Wg=t=>rt()(t),Kg=t=>t.at(0),lu=t=>typeof t=="boolean",Ws=t=>kx()(t),ll=t=>lu(t)||Ws(t),NL=()=>"user@example.com",IL=()=>"실례@example.com",TL=()=>"example.com",RL=()=>"실례.com",ML=()=>"198.51.100.42",DL=()=>"2001:0db8:5b96:0000:0000:426f:8e17:642a",LL=()=>"https://example.com/",BL=()=>"path/index.html",FL=()=>"https://실례.com/",$L=()=>"path/실례.html",qL=()=>"3fa85f64-5717-4562-b3fc-2c963f66afa6",UL=()=>"https://example.com/dictionary/{term:1}/{term}",zL=()=>"/a/b/c",VL=()=>"1/0",WL=()=>new Date().toISOString(),KL=()=>new Date().toISOString().substring(0,10),JL=()=>new Date().toISOString().substring(11),HL=()=>"P3D",GL=()=>"********",YL=()=>"^[a-z]+$",M1=class{constructor(){We(this,"data",{})}register(e,n){this.data[e]=n}unregister(e){e===void 0?this.data={}:delete this.data[e]}get(e){return this.data[e]}},D1=new M1,Jg=(t,e)=>typeof e=="function"?D1.register(t,e):e===null?D1.unregister(t):D1.get(t);var QL=De(48764).Buffer;const ZL=t=>QL.from(t).toString("ascii");var XL=De(48764).Buffer;const eB=t=>XL.from(t).toString("utf8");var tB=De(48764).Buffer;const nB=t=>tB.from(t).toString("binary"),rB=t=>{let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===61)e+="=3D";else if(r>=33&&r<=60||r>=62&&r<=126||r===9||r===32)e+=t.charAt(n);else if(r===13||r===10)e+=`\r
142
142
  `;else if(r>126){const o=unescape(encodeURIComponent(t.charAt(n)));for(let a=0;a<o.length;a++)e+="="+("0"+o.charCodeAt(a).toString(16)).slice(-2).toUpperCase()}else e+="="+("0"+r.toString(16)).slice(-2).toUpperCase()}return e};var oB=De(48764).Buffer;const aB=t=>oB.from(t).toString("hex");var sB=De(48764).Buffer;const iB=t=>{const e=sB.from(t).toString("utf8"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";let r=0,o="",a=0,p=0;for(let u=0;u<e.length;u++)for(a=a<<8|e.charCodeAt(u),p+=8;p>=5;)o+=n.charAt(a>>>p-5&31),p-=5;p>0&&(o+=n.charAt(a<<5-p&31),r=(8-8*e.length%5)%5);for(let u=0;u<r;u++)o+="=";return o};var lB=De(48764).Buffer;const cB=t=>lB.from(t).toString("base64");var uB=De(48764).Buffer;const pB=t=>uB.from(t).toString("base64url"),Hg=new($x=class extends M1{constructor(){super(...arguments);V1(this,Yd,{"7bit":ZL,"8bit":eB,binary:nB,"quoted-printable":rB,base16:aB,base32:iB,base64:cB,base64url:pB});We(this,"data",Tt({},Zd(this,Yd)))}get defaults(){return Tt({},Zd(this,Yd))}},Yd=new WeakMap,$x),Cx=(t,e)=>typeof e=="function"?Hg.register(t,e):e===null?Hg.unregister(t):Hg.get(t);Cx.getDefaults=()=>Hg.defaults;const jx=Cx,hB={"text/plain":()=>"string","text/css":()=>".selector { border: 1px solid red }","text/csv":()=>"value1,value2,value3","text/html":()=>"<p>content</p>","text/calendar":()=>"BEGIN:VCALENDAR","text/javascript":()=>"console.dir('Hello world!');","text/xml":()=>'<person age="30">John Doe</person>',"text/*":()=>"string"},dB={"image/*":()=>Wg(25).toString("binary")},fB={"audio/*":()=>Wg(25).toString("binary")},mB={"video/*":()=>Wg(25).toString("binary")},gB={"application/json":()=>'{"key":"value"}',"application/ld+json":()=>'{"name": "John Doe"}',"application/x-httpd-php":()=>"<?php echo '<p>Hello World!</p>'; ?>","application/rtf":()=>String.raw`{\rtf1\adeflang1025\ansi\ansicpg1252\uc1`,"application/x-sh":()=>'echo "Hello World!"',"application/xhtml+xml":()=>"<p>content</p>","application/*":()=>Wg(25).toString("binary")},Rp=new(qx=class extends M1{constructor(){super(...arguments);V1(this,Qd,Tt(Tt(Tt(Tt(Tt({},hB),dB),fB),mB),gB));We(this,"data",Tt({},Zd(this,Qd)))}get defaults(){return Tt({},Zd(this,Qd))}},Qd=new WeakMap,qx),Px=(t,e)=>{if(typeof e=="function")return Rp.register(t,e);if(e===null)return Rp.unregister(t);const n=t.split(";").at(0),r=`${n.split("/").at(0)}/*`;return Rp.get(t)||Rp.get(n)||Rp.get(r)};Px.getDefaults=()=>Rp.defaults;const Nx=Px,yB=function(t){let{sample:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{contentEncoding:n,contentMediaType:r,contentSchema:o}=t,{pattern:a,format:p}=t,u=jx(n)||q_();let g;if(typeof a=="string")g=(x=>{try{return new(Kt())(x).gen()}catch(k){return"string"}})(a);else if(typeof p=="string")g=(x=>{const{format:k}=x,N=Jg(k);if(typeof N=="function")return N(x);switch(k){case"email":return NL();case"idn-email":return IL();case"hostname":return TL();case"idn-hostname":return RL();case"ipv4":return ML();case"ipv6":return DL();case"uri":return LL();case"uri-reference":return BL();case"iri":return FL();case"iri-reference":return $L();case"uuid":return qL();case"uri-template":return UL();case"json-pointer":return zL();case"relative-json-pointer":return VL();case"date-time":return WL();case"date":return KL();case"time":return JL();case"duration":return HL();case"password":return GL();case"regex":return YL()}return"string"})(t);else if(ll(o)&&typeof r=="string"&&e!==void 0)g=Array.isArray(e)||typeof e=="object"?JSON.stringify(e):String(e);else if(typeof r=="string"){const x=Nx(r);typeof x=="function"&&(g=x(t))}else g="string";return u(function(x){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{maxLength:N,minLength:M}=k;let D=x;if(Number.isInteger(N)&&N>0&&(D=D.slice(0,N)),Number.isInteger(M)&&M>0){let W=0;for(;D.length<M;)D+=D[W++%D.length]}return D}(g,t))},vB=()=>.1,bB=()=>.1,wB=t=>{const{format:e}=t;let n;return n=typeof e=="string"?(r=>{const{format:o}=r,a=Jg(o);if(typeof a=="function")return a(r);switch(o){case"float":return vB();case"double":return bB()}return 0})(t):0,function(r){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{minimum:a,maximum:p,exclusiveMinimum:u,exclusiveMaximum:g}=o,{multipleOf:x}=o,k=Number.isInteger(r)?1:Number.EPSILON;let N=typeof a=="number"?a:null,M=typeof p=="number"?p:null,D=r;if(typeof u=="number"&&(N=N!==null?Math.max(N,u+k):u+k),typeof g=="number"&&(M=M!==null?Math.min(M,g-k):g-k),D=N>M&&r||N||M||D,typeof x=="number"&&x>0){const W=D%x;D=W===0?D:D+x-W}return D}(n,t)},EB=()=>wi(2,30)>>>0,_B=()=>wi(2,53)-1,SB=t=>{const{format:e}=t;return typeof e=="string"?(n=>{const{format:r}=n,o=Jg(r);if(typeof o=="function")return o(n);switch(r){case"int32":return EB();case"int64":return _B()}return 0})(t):0},xB=t=>typeof t.default!="boolean"||t.default,Gg=new Proxy({array:jL,object:PL,string:yB,number:wB,integer:SB,boolean:xB,null:()=>null},{get:(t,e)=>typeof e=="string"&&Object.hasOwn(t,e)?t[e]:()=>`Unknown Type: ${e}`}),Ix=["array","object","number","integer","string","boolean","null"],Jd=t=>{if(!Ws(t))return!1;const{examples:e,example:n,default:r}=t;return!!(Array.isArray(e)&&e.length>=1)||r!==void 0||n!==void 0},L1=t=>{if(!Ws(t))return null;const{examples:e,example:n,default:r}=t;return Array.isArray(e)&&e.length>=1?e.at(0):r!==void 0?r:n!==void 0?n:void 0},Yg={array:["items","prefixItems","contains","maxContains","minContains","maxItems","minItems","uniqueItems","unevaluatedItems"],object:["properties","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","required","dependentSchemas","dependentRequired","unevaluatedProperties"],string:["pattern","format","minLength","maxLength","contentEncoding","contentMediaType","contentSchema"],integer:["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf"]};Yg.number=Yg.integer;const B1="string",Tx=t=>t===void 0?null:t===null?"null":Array.isArray(t)?"array":Number.isInteger(t)?"integer":typeof t,F1=t=>{if(Array.isArray(t)&&t.length>=1){if(t.includes("array"))return"array";if(t.includes("object"))return"object";{const e=Kg(t);if(Ix.includes(e))return e}}return Ix.includes(t)?t:null},$1=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakSet;if(!Ws(t)||e.has(t))return B1;e.add(t);let{type:n,const:r}=t;if(n=F1(n),typeof n!="string"){const o=Object.keys(Yg);e:for(let a=0;a<o.length;a+=1){const p=o[a],u=Yg[p];for(let g=0;g<u.length;g+=1){const x=u[g];if(Object.hasOwn(t,x)){n=p;break e}}}}if(typeof n!="string"&&r!==void 0){const o=Tx(r);n=typeof o=="string"?o:n}if(typeof n!="string"){const o=x=>{if(Array.isArray(t[x])){const k=t[x].map(N=>$1(N,e));return F1(k)}return null},a=o("allOf"),p=o("anyOf"),u=o("oneOf"),g=t.not?$1(t.not,e):null;(a||p||u||g)&&(n=F1([a,p,u,g].filter(Boolean)))}if(typeof n!="string"&&Jd(t)){const o=L1(t),a=Tx(o);n=typeof a=="string"?a:n}return e.delete(t),n||B1},Rx=t=>$1(t),q1=t=>lu(t)?(e=>e===!1?{not:{}}:{})(t):Ws(t)?t:{},Hd=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(lu(t)&&t===!0)return!0;if(lu(t)&&t===!1)return!1;if(lu(e)&&e===!0)return!0;if(lu(e)&&e===!1)return!1;if(!ll(t))return e;if(!ll(e))return t;const r=Tt(Tt({},e),t);if(e.type&&t.type&&Array.isArray(e.type)&&typeof e.type=="string"){const o=yr(e.type).concat(t.type);r.type=Array.from(new Set(o))}if(Array.isArray(e.required)&&Array.isArray(t.required)&&(r.required=[...new Set([...t.required,...e.required])]),e.properties&&t.properties){const o=new Set([...Object.keys(e.properties),...Object.keys(t.properties)]);r.properties={};for(const a of o){const p=e.properties[a]||{},u=t.properties[a]||{};p.readOnly&&!n.includeReadOnly||p.writeOnly&&!n.includeWriteOnly?r.required=(r.required||[]).filter(g=>g!==a):r.properties[a]=Hd(u,p,n)}}return ll(e.items)&&ll(t.items)&&(r.items=Hd(t.items,e.items,n)),ll(e.contains)&&ll(t.contains)&&(r.contains=Hd(t.contains,e.contains,n)),ll(e.contentSchema)&&ll(t.contentSchema)&&(r.contentSchema=Hd(t.contentSchema,e.contentSchema,n)),r},Gd=Hd,Go=function(t){var Ge,Ke,Ie,qe,ut,Nt,Ht,Vt,Dt;let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];typeof(t==null?void 0:t.toJS)=="function"&&(t=t.toJS()),t=q1(t);let o=n!==void 0||Jd(t);const a=!o&&Array.isArray(t.oneOf)&&t.oneOf.length>0,p=!o&&Array.isArray(t.anyOf)&&t.anyOf.length>0;if(!o&&(a||p)){const tt=q1(Kg(a?t.oneOf:t.anyOf));!(t=Gd(t,tt,e)).xml&&tt.xml&&(t.xml=tt.xml),Jd(t)&&Jd(tt)&&(o=!0)}const u={};let{xml:g,properties:x,additionalProperties:k,items:N,contains:M}=t||{},D=Rx(t),{includeReadOnly:W,includeWriteOnly:ee}=e;g=g||{};let Y,{name:ie,prefix:H,namespace:fe}=g,oe={};Object.hasOwn(t,"type")||(t.type=D),r&&(ie=ie||"notagname",Y=(H?`${H}:`:"")+ie,fe)&&(u[H?`xmlns:${H}`:"xmlns"]=fe),r&&(oe[Y]=[]);const ye=zn(x);let be,ce=0;const me=()=>Number.isInteger(t.maxProperties)&&t.maxProperties>0&&ce>=t.maxProperties,we=tt=>!(Number.isInteger(t.maxProperties)&&t.maxProperties>0)||!me()&&(!(Pt=>!Array.isArray(t.required)||t.required.length===0||!t.required.includes(Pt))(tt)||t.maxProperties-ce-(()=>{if(!Array.isArray(t.required)||t.required.length===0)return 0;let Pt=0;return r?t.required.forEach(sn=>Pt+=oe[sn]===void 0?0:1):t.required.forEach(sn=>{var pt;Pt+=((pt=oe[Y])==null?void 0:pt.find(On=>On[sn]!==void 0))===void 0?0:1}),t.required.length-Pt})()>0);if(be=r?function(tt){let Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;if(t&&ye[tt]){if(ye[tt].xml=ye[tt].xml||{},ye[tt].xml.attribute){const pt=Array.isArray(ye[tt].enum)?Kg(ye[tt].enum):void 0;if(Jd(ye[tt]))u[ye[tt].xml.name||tt]=L1(ye[tt]);else if(pt!==void 0)u[ye[tt].xml.name||tt]=pt;else{const On=q1(ye[tt]),wn=Rx(On),$t=ye[tt].xml.name||tt;u[$t]=Gg[wn](On)}return}ye[tt].xml.name=ye[tt].xml.name||tt}else ye[tt]||k===!1||(ye[tt]={xml:{name:tt}});let sn=Go(ye[tt],e,Pt,r);we(tt)&&(ce++,Array.isArray(sn)?oe[Y]=oe[Y].concat(sn):oe[Y].push(sn))}:(tt,Pt)=>{var sn;if(we(tt)){if(kx()((sn=t.discriminator)==null?void 0:sn.mapping)&&t.discriminator.propertyName===tt&&typeof t.$$ref=="string"){for(const pt in t.discriminator.mapping)if(t.$$ref.search(t.discriminator.mapping[pt])!==-1){oe[tt]=pt;break}}else oe[tt]=Go(ye[tt],e,Pt,r);ce++}},o){let tt;if(tt=n!==void 0?n:L1(t),!r){if(typeof tt=="number"&&D==="string")return`${tt}`;if(typeof tt!="string"||D==="string")return tt;try{return JSON.parse(tt)}catch(Pt){return tt}}if(D==="array"){if(!Array.isArray(tt)){if(typeof tt=="string")return tt;tt=[tt]}let Pt=[];return Ws(N)&&(N.xml=N.xml||g||{},N.xml.name=N.xml.name||g.name,Pt=tt.map(sn=>Go(N,e,sn,r))),Ws(M)&&(M.xml=M.xml||g||{},M.xml.name=M.xml.name||g.name,Pt=[Go(M,e,void 0,r),...Pt]),Pt=Gg.array(t,{sample:Pt}),g.wrapped?(oe[Y]=Pt,Fa()(u)||oe[Y].push({_attr:u})):oe=Pt,oe}if(D==="object"){if(typeof tt=="string")return tt;for(const Pt in tt)Object.hasOwn(tt,Pt)&&((Ge=ye[Pt])!=null&&Ge.readOnly&&!W||(Ke=ye[Pt])!=null&&Ke.writeOnly&&!ee||((qe=(Ie=ye[Pt])==null?void 0:Ie.xml)!=null&&qe.attribute?u[ye[Pt].xml.name||Pt]=tt[Pt]:be(Pt,tt[Pt])));return Fa()(u)||oe[Y].push({_attr:u}),oe}return oe[Y]=Fa()(u)?tt:[{_attr:u},tt],oe}if(D==="array"){let tt=[];if(Ws(M))if(r&&(M.xml=M.xml||t.xml||{},M.xml.name=M.xml.name||g.name),Array.isArray(M.anyOf))tt.push(...M.anyOf.map(Pt=>Go(Gd(Pt,M,e),e,void 0,r)));else if(Array.isArray(M.oneOf))tt.push(...M.oneOf.map(Pt=>Go(Gd(Pt,M,e),e,void 0,r)));else{if(!(!r||r&&g.wrapped))return Go(M,e,void 0,r);tt.push(Go(M,e,void 0,r))}if(Ws(N))if(r&&(N.xml=N.xml||t.xml||{},N.xml.name=N.xml.name||g.name),Array.isArray(N.anyOf))tt.push(...N.anyOf.map(Pt=>Go(Gd(Pt,N,e),e,void 0,r)));else if(Array.isArray(N.oneOf))tt.push(...N.oneOf.map(Pt=>Go(Gd(Pt,N,e),e,void 0,r)));else{if(!(!r||r&&g.wrapped))return Go(N,e,void 0,r);tt.push(Go(N,e,void 0,r))}return tt=Gg.array(t,{sample:tt}),r&&g.wrapped?(oe[Y]=tt,Fa()(u)||oe[Y].push({_attr:u}),oe):tt}if(D==="object"){for(let tt in ye)Object.hasOwn(ye,tt)&&((ut=ye[tt])!=null&&ut.deprecated||(Nt=ye[tt])!=null&&Nt.readOnly&&!W||(Ht=ye[tt])!=null&&Ht.writeOnly&&!ee||be(tt));if(r&&u&&oe[Y].push({_attr:u}),me())return oe;if(lu(k)&&k)r?oe[Y].push({additionalProp:"Anything can be here"}):oe.additionalProp1={},ce++;else if(Ws(k)){const tt=k,Pt=Go(tt,e,void 0,r);if(r&&typeof((Vt=tt==null?void 0:tt.xml)==null?void 0:Vt.name)=="string"&&((Dt=tt==null?void 0:tt.xml)==null?void 0:Dt.name)!=="notagname")oe[Y].push(Pt);else{const sn=Number.isInteger(t.minProperties)&&t.minProperties>0&&ce<t.minProperties?t.minProperties-ce:3;for(let pt=1;pt<=sn;pt++){if(me())return oe;if(r){const On={};On["additionalProp"+pt]=Pt.notagname,oe[Y].push(On)}else oe["additionalProp"+pt]=Pt;ce++}}}return oe}let Oe;if(t.const!==void 0)Oe=t.const;else if(t&&Array.isArray(t.enum))Oe=Kg(yr(t.enum));else{const tt=Ws(t.contentSchema)?Go(t.contentSchema,e,void 0,r):void 0;Oe=Gg[D](t,{sample:tt})}return r?(oe[Y]=Fa()(u)?Oe:[{_attr:u},Oe],oe):Oe},Mx=(t,e,n)=>{const r=Go(t,e,n,!0);if(r)return typeof r=="string"?r:Hi()(r,{declaration:!0,indent:" "})},Dx=(t,e,n)=>Go(t,e,n,!1),Lx=(t,e,n)=>[t,JSON.stringify(e),JSON.stringify(n)],OB=Ms(Mx,Lx),AB=Ms(Dx,Lx),kB=[{when:/json/,shouldStringifyTypes:["string"]}],CB=["object"],jB=t=>(e,n,r,o)=>{const{fn:a}=t(),p=a.jsonSchema202012.memoizedSampleFromSchema(e,n,o),u=typeof p,g=kB.reduce((x,k)=>k.when.test(r)?[...x,...k.shouldStringifyTypes]:x,CB);return no()(g,x=>x===u)?JSON.stringify(p,null,2):p},PB=t=>(e,n,r,o)=>{const{fn:a}=t(),p=a.jsonSchema202012.getJsonSampleSchema(e,n,r,o);let u;try{u=fa.dump(fa.load(p),{lineWidth:-1},{schema:ta}),u[u.length-1]===`
143
143
  `&&(u=u.slice(0,u.length-1))}catch(g){return console.error(g),"error: could not generate yaml example"}return u.replace(/\t/g," ")},NB=t=>(e,n,r)=>{const{fn:o}=t();if(e&&!e.xml&&(e.xml={}),e&&!e.xml.name){if(!e.$$ref&&(e.type||e.items||e.properties||e.additionalProperties))return`<?xml version="1.0" encoding="UTF-8"?>
144
- <!-- XML example cannot be generated; root element name is undefined -->`;if(e.$$ref){let a=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=a[1]}}return o.jsonSchema202012.memoizedCreateXMLExample(e,n,r)},IB=t=>function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:void 0;const{fn:a}=t();return typeof(e==null?void 0:e.toJS)=="function"&&(e=e.toJS()),typeof(o==null?void 0:o.toJS)=="function"&&(o=o.toJS()),/xml/.test(n)?a.jsonSchema202012.getXmlSampleSchema(e,r,o):/(yaml|yml)/.test(n)?a.jsonSchema202012.getYamlSampleSchema(e,r,n,o):a.jsonSchema202012.getJsonSampleSchema(e,r,n,o)},Bx=t=>{let{getSystem:e}=t;const n=jB(e),r=PB(e),o=NB(e),a=IB(e);return{fn:{jsonSchema202012:{sampleFromSchema:Dx,sampleFromSchemaGeneric:Go,sampleEncoderAPI:jx,sampleFormatAPI:Jg,sampleMediaTypeAPI:Nx,createXMLExample:Mx,memoizedSampleFromSchema:AB,memoizedCreateXMLExample:OB,getJsonSampleSchema:n,getYamlSampleSchema:r,getXmlSampleSchema:o,getSampleSchema:a}}}};function Fx(){return[v2,P1,Ax,Bx,bL]}const{GIT_DIRTY:TB,GIT_COMMIT:RB,PACKAGE_VERSION:MB,BUILD_TIME:DB}={PACKAGE_VERSION:"5.10.5",GIT_COMMIT:"g745cd2ac",GIT_DIRTY:!0,BUILD_TIME:"Thu, 14 Dec 2023 12:08:03 GMT"};function Qg(t){Qt.versions=Qt.versions||{},Qt.versions.swaggerUi={version:MB,gitRevision:RB,gitDirty:TB,buildTimestamp:DB};const e={dom_id:null,domNode:null,spec:{},url:"",urls:null,layout:"BaseLayout",docExpansion:"list",maxDisplayedTags:null,filter:null,validatorUrl:"https://validator.swagger.io/validator",oauth2RedirectUrl:`${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))}/oauth2-redirect.html`,persistAuthorization:!1,configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:N=>N,responseInterceptor:N=>N,showMutatedRequest:!0,defaultModelRendering:"example",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:void 0,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:"cURL (bash)",syntax:"bash"},curl_powershell:{title:"cURL (PowerShell)",syntax:"powershell"},curl_cmd:{title:"cURL (CMD)",syntax:"bash"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:["get","put","post","delete","options","head","patch","trace"],queryConfigEnabled:!1,presets:[Fx],plugins:[],pluginsOptions:{pluginLoadType:"legacy"},initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:"agate"}};let n=t.queryConfigEnabled?(()=>{let N={},M=Qt.location.search;if(!M)return{};if(M!=""){let D=M.substr(1).split("&");for(let W in D)Object.prototype.hasOwnProperty.call(D,W)&&(W=D[W].split("="),N[decodeURIComponent(W[0])]=W[1]&&decodeURIComponent(W[1])||"")}return N})():{};const r=t.domNode;delete t.domNode;const o=pe()({},e,t,n),a={system:{configs:o.configs},plugins:o.presets,pluginsOptions:o.pluginsOptions,state:pe()({layout:{layout:o.layout,filter:o.filter},spec:{spec:"",url:o.url},requestSnippets:o.requestSnippets},o.initialState)};if(o.initialState)for(var p in o.initialState)Object.prototype.hasOwnProperty.call(o.initialState,p)&&o.initialState[p]===void 0&&delete a.state[p];var u=new ia(a);u.register([o.plugins,()=>({fn:o.fn,components:o.components,state:o.state})]);var g=u.getSystem();const x=N=>{let M=g.specSelectors.getLocalConfig?g.specSelectors.getLocalConfig():{},D=pe()({},M,o,N||{},n);if(r&&(D.domNode=r),u.setConfigs(D),g.configsActions.loaded(),N!==null&&(!n.url&&typeof D.spec=="object"&&Object.keys(D.spec).length?(g.specActions.updateUrl(""),g.specActions.updateLoadingStatus("success"),g.specActions.updateSpec(JSON.stringify(D.spec))):g.specActions.download&&D.url&&!D.urls&&(g.specActions.updateUrl(D.url),g.specActions.download(D.url))),D.domNode)g.render(D.domNode,"App");else if(D.dom_id){let W=document.querySelector(D.dom_id);g.render(W,"App")}else D.dom_id===null||D.domNode===null||console.error("Skipped rendering: no `dom_id` or `domNode` was specified");return g},k=n.config||o.configUrl;return k&&g.specActions&&g.specActions.getConfigByUrl?(g.specActions.getConfigByUrl({url:k,loadRemoteConfig:!0,requestInterceptor:o.requestInterceptor,responseInterceptor:o.responseInterceptor},x),g):x()}Qg.System=ia,Qg.presets={base:v2,apis:Fx},Qg.plugins={Auth:nr,Configs:Nl,DeepLining:es,Err:Wr,Filter:mo,Icons:Tc,JSONSchema5Samples:Qu,JSONSchema202012:Ax,JSONSchema202012Samples:Bx,Layout:kf,Logs:Cf,OpenAPI30:P1,OpenAPI31:P1,OnComplete:na,RequestSnippets:Wu,Spec:ew,SwaggerClient:A_,Util:k_,View:W_,DownloadUrl:K_,SafeRender:Y_};const LB=Qg})(),Ja=Ja.default})())})(G1);var Gx=G1.exports;const Yx=Hx(Gx),Y1="API_DOC:DESTINATION_URL_KEY",Q1=()=>localStorage.getItem(Y1),Qx=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const ka=Yr.useAPIClient(),{t:Lp}=Dp(),Bp=Oa.useRef(),{data:Ka}=Yr.useRequest({url:"swagger:getUrls"}),De=C=>{if(!C.headers.Authorization){const i=location.pathname.match(/^\/apps\/([^/]*)\//);C.headers["X-App"]=(i==null?void 0:i[1])||"main",C.headers.Authorization=`Bearer ${ka.auth.getToken()}`}return C},[Ja,_]=Oa.useState(Q1());return Oa.useEffect(()=>{Ja&&localStorage.setItem(Y1,Ja)},[Ja]),Oa.useEffect(()=>{var C;(C=Ka==null?void 0:Ka.data)!=null&&C.length&&(!Ja||!Ka.data.find(i=>i.url===Q1()))&&_(Ka.data[0].url)},[Ja,Ka]),Oa.useEffect(()=>{Yx({requestInterceptor:De,url:Ja,domNode:Bp.current})},[Ja]),Ja?en.jsxs(Qo.Space,{direction:"vertical",style:{width:"100%"},children:[en.jsx("div",{style:{display:"flex",justifyContent:"center",width:"100%"},children:en.jsxs("div",{className:Yr.css`
144
+ <!-- XML example cannot be generated; root element name is undefined -->`;if(e.$$ref){let a=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=a[1]}}return o.jsonSchema202012.memoizedCreateXMLExample(e,n,r)},IB=t=>function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:void 0;const{fn:a}=t();return typeof(e==null?void 0:e.toJS)=="function"&&(e=e.toJS()),typeof(o==null?void 0:o.toJS)=="function"&&(o=o.toJS()),/xml/.test(n)?a.jsonSchema202012.getXmlSampleSchema(e,r,o):/(yaml|yml)/.test(n)?a.jsonSchema202012.getYamlSampleSchema(e,r,n,o):a.jsonSchema202012.getJsonSampleSchema(e,r,n,o)},Bx=t=>{let{getSystem:e}=t;const n=jB(e),r=PB(e),o=NB(e),a=IB(e);return{fn:{jsonSchema202012:{sampleFromSchema:Dx,sampleFromSchemaGeneric:Go,sampleEncoderAPI:jx,sampleFormatAPI:Jg,sampleMediaTypeAPI:Nx,createXMLExample:Mx,memoizedSampleFromSchema:AB,memoizedCreateXMLExample:OB,getJsonSampleSchema:n,getYamlSampleSchema:r,getXmlSampleSchema:o,getSampleSchema:a}}}};function Fx(){return[v2,P1,Ax,Bx,bL]}const{GIT_DIRTY:TB,GIT_COMMIT:RB,PACKAGE_VERSION:MB,BUILD_TIME:DB}={PACKAGE_VERSION:"5.10.5",GIT_COMMIT:"g745cd2ac",GIT_DIRTY:!0,BUILD_TIME:"Thu, 14 Dec 2023 12:08:03 GMT"};function Qg(t){Qt.versions=Qt.versions||{},Qt.versions.swaggerUi={version:MB,gitRevision:RB,gitDirty:TB,buildTimestamp:DB};const e={dom_id:null,domNode:null,spec:{},url:"",urls:null,layout:"BaseLayout",docExpansion:"list",maxDisplayedTags:null,filter:null,validatorUrl:"https://validator.swagger.io/validator",oauth2RedirectUrl:`${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))}/oauth2-redirect.html`,persistAuthorization:!1,configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:N=>N,responseInterceptor:N=>N,showMutatedRequest:!0,defaultModelRendering:"example",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:void 0,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:"cURL (bash)",syntax:"bash"},curl_powershell:{title:"cURL (PowerShell)",syntax:"powershell"},curl_cmd:{title:"cURL (CMD)",syntax:"bash"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:["get","put","post","delete","options","head","patch","trace"],queryConfigEnabled:!1,presets:[Fx],plugins:[],pluginsOptions:{pluginLoadType:"legacy"},initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:"agate"}};let n=t.queryConfigEnabled?(()=>{let N={},M=Qt.location.search;if(!M)return{};if(M!=""){let D=M.substr(1).split("&");for(let W in D)Object.prototype.hasOwnProperty.call(D,W)&&(W=D[W].split("="),N[decodeURIComponent(W[0])]=W[1]&&decodeURIComponent(W[1])||"")}return N})():{};const r=t.domNode;delete t.domNode;const o=pe()({},e,t,n),a={system:{configs:o.configs},plugins:o.presets,pluginsOptions:o.pluginsOptions,state:pe()({layout:{layout:o.layout,filter:o.filter},spec:{spec:"",url:o.url},requestSnippets:o.requestSnippets},o.initialState)};if(o.initialState)for(var p in o.initialState)Object.prototype.hasOwnProperty.call(o.initialState,p)&&o.initialState[p]===void 0&&delete a.state[p];var u=new ia(a);u.register([o.plugins,()=>({fn:o.fn,components:o.components,state:o.state})]);var g=u.getSystem();const x=N=>{let M=g.specSelectors.getLocalConfig?g.specSelectors.getLocalConfig():{},D=pe()({},M,o,N||{},n);if(r&&(D.domNode=r),u.setConfigs(D),g.configsActions.loaded(),N!==null&&(!n.url&&typeof D.spec=="object"&&Object.keys(D.spec).length?(g.specActions.updateUrl(""),g.specActions.updateLoadingStatus("success"),g.specActions.updateSpec(JSON.stringify(D.spec))):g.specActions.download&&D.url&&!D.urls&&(g.specActions.updateUrl(D.url),g.specActions.download(D.url))),D.domNode)g.render(D.domNode,"App");else if(D.dom_id){let W=document.querySelector(D.dom_id);g.render(W,"App")}else D.dom_id===null||D.domNode===null||console.error("Skipped rendering: no `dom_id` or `domNode` was specified");return g},k=n.config||o.configUrl;return k&&g.specActions&&g.specActions.getConfigByUrl?(g.specActions.getConfigByUrl({url:k,loadRemoteConfig:!0,requestInterceptor:o.requestInterceptor,responseInterceptor:o.responseInterceptor},x),g):x()}Qg.System=ia,Qg.presets={base:v2,apis:Fx},Qg.plugins={Auth:nr,Configs:Nl,DeepLining:es,Err:Wr,Filter:mo,Icons:Tc,JSONSchema5Samples:Qu,JSONSchema202012:Ax,JSONSchema202012Samples:Bx,Layout:kf,Logs:Cf,OpenAPI30:P1,OpenAPI31:P1,OnComplete:na,RequestSnippets:Wu,Spec:ew,SwaggerClient:A_,Util:k_,View:W_,DownloadUrl:K_,SafeRender:Y_};const LB=Qg})(),Ja=Ja.default})())})(G1);var Gx=G1.exports;const Yx=Hx(Gx),Y1="API_DOC:DESTINATION_URL_KEY",Q1=()=>localStorage.getItem(Y1),Qx=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const ka=Yr.useAPIClient(),{t:Lp}=Dp(),Bp=Oa.useRef(),{data:Ka}=Yr.useRequest({url:"swagger:getUrls"}),De=C=>{if(!C.headers.Authorization){const i=location.pathname.match(/^\/apps\/([^/]*)\//);i!=null&&i[1]&&(C.headers["X-App"]=i==null?void 0:i[1]),C.headers.Authorization=`Bearer ${ka.auth.getToken()}`}return C},[Ja,_]=Oa.useState(Q1());return Oa.useEffect(()=>{Ja&&localStorage.setItem(Y1,Ja)},[Ja]),Oa.useEffect(()=>{var C;(C=Ka==null?void 0:Ka.data)!=null&&C.length&&(!Ja||!Ka.data.find(i=>i.url===Q1()))&&_(Ka.data[0].url)},[Ja,Ka]),Oa.useEffect(()=>{Yx({requestInterceptor:De,url:Ja,domNode:Bp.current})},[Ja]),Ja?en.jsxs(Qo.Space,{direction:"vertical",style:{width:"100%"},children:[en.jsx("div",{style:{display:"flex",justifyContent:"center",width:"100%"},children:en.jsxs("div",{className:Yr.css`
145
145
  display: flex;
146
146
  align-items: center;
147
147
  gap: 8px;
@@ -1,12 +1,12 @@
1
1
  module.exports = {
2
- "@nocobase/client": "0.18.0-alpha.9",
3
- "antd": "5.12.2",
2
+ "@nocobase/client": "0.19.0-alpha.10",
3
+ "antd": "5.12.8",
4
4
  "react": "18.2.0",
5
5
  "@ant-design/icons": "5.2.6",
6
6
  "antd-style": "3.4.5",
7
7
  "react-i18next": "11.18.6",
8
- "@nocobase/actions": "0.18.0-alpha.9",
9
- "@nocobase/server": "0.18.0-alpha.9",
10
- "@nocobase/utils": "0.18.0-alpha.9",
11
- "@nocobase/database": "0.18.0-alpha.9"
8
+ "@nocobase/actions": "0.19.0-alpha.10",
9
+ "@nocobase/server": "0.19.0-alpha.10",
10
+ "@nocobase/utils": "0.19.0-alpha.10",
11
+ "@nocobase/database": "0.19.0-alpha.10"
12
12
  };
@@ -0,0 +1,5 @@
1
+ {
2
+ "API documentation": "API 문서",
3
+ "Documentation": "문서",
4
+ "Select a definition": "정의 선택"
5
+ }
@@ -3,6 +3,6 @@ import { SwaggerManager } from './swagger';
3
3
  export default class APIDoc extends Plugin {
4
4
  swagger: SwaggerManager;
5
5
  constructor(app: any, options: any);
6
- beforeLoad(): void;
6
+ beforeLoad(): Promise<void>;
7
7
  load(): Promise<void>;
8
8
  }
@@ -28,7 +28,7 @@ class APIDoc extends import_server.Plugin {
28
28
  super(app, options);
29
29
  this.swagger = new import_swagger.SwaggerManager(this);
30
30
  }
31
- beforeLoad() {
31
+ async beforeLoad() {
32
32
  }
33
33
  async load() {
34
34
  this.app.resource({
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-api-doc",
3
- "version": "0.18.0-alpha.9",
3
+ "version": "0.19.0-alpha.10",
4
4
  "displayName": "API documentation",
5
5
  "displayName.zh-CN": "API 文档",
6
- "description": "An OpenAPI documentation generator for NocoBase HTTP API",
7
- "description.zh-CN": "NocoBase HTTP API 的 OpenAPI 文档生成器",
6
+ "description": "An OpenAPI documentation generator for NocoBase HTTP API.",
7
+ "description.zh-CN": "NocoBase HTTP API 的 OpenAPI 文档生成器。",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
+ "homepage": "https://docs.nocobase.com/plugins/api-doc",
11
+ "homepage.zh-CN": "https://docs-cn.nocobase.com/plugins/api-doc",
10
12
  "types": "./dist/server/index.d.ts",
11
13
  "devDependencies": {
12
14
  "swagger-ui-dist": "^5.3.1"
@@ -21,5 +23,5 @@
21
23
  "url": "git+https://github.com/nocobase/nocobase.git",
22
24
  "directory": "packages/plugins/api-doc"
23
25
  },
24
- "gitHead": "34ca0df4eede2e83fc86297b0fe19eba970e2b1b"
26
+ "gitHead": "d09d81eba67339da36bcec27939a85b35d180770"
25
27
  }