redoc/redoc-demo.bundle.js

1944 lines
920 KiB
JavaScript
Raw Normal View History

2021-07-01 12:47:52 +03:00
/*! For license information please see redoc-demo.bundle.js.LICENSE.txt */
2023-08-17 17:09:11 +03:00
(()=>{var e={3675:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.mapTypeToComponent=t.bundleDocument=t.bundle=t.OasVersion=void 0;const o=n(2307),i=n(4182),a=n(8065),s=n(5241),l=n(388),c=n(2608),u=n(5220),p=n(9443),d=n(1510),f=n(7468),h=n(5030),m=n(348),g=n(771),y=n(1094),b=n(4508),v=n(6350);var x;function w(e){return r(this,void 0,void 0,(function*(){const{document:t,config:n,customTypes:r,externalRefResolver:o,dereference:f=!1,skipRedoclyRegistryRefs:m=!1,removeUnusedComponents:g=!1,keepUrlRefs:y=!1}=e,w=d.detectOpenAPI(t.parsed),k=d.openAPIMajor(w),S=n.getRulesForOasVersion(k),E=u.normalizeTypes(n.extendTypes((null!=r?r:k===d.OasMajorVersion.Version3)?w===x.Version3_1?c.Oas3_1Types:s.Oas3Types:l.Oas2Types,w),n),_=h.initRules(S,n,"preprocessors",w),j=h.initRules(S,n,"decorators",w),A={problems:[],oasVersion:w,refTypes:new Map,visitorsData:{}};g&&j.push({severity:"error",ruleId:"remove-unused-components",visitor:k===d.OasMajorVersion.Version2?b.RemoveUnusedComponents({}):v.RemoveUnusedComponents({})});let P=yield i.resolveDocument({rootDocument:t,rootType:E.Root,externalRefResolver:o});_.length>0&&(p.walkDocument({document:t,rootType:E.Root,normalizedVisitors:a.normalizeVisitors(_,E),resolvedRefMap:P,ctx:A}),P=yield i.resolveDocument({rootDocument:t,rootType:E.Root,externalRefResolver:o}));const C=a.normalizeVisitors([{severity:"error",ruleId:"bundler",visitor:O(k,f,m,t,P,y)},...j],E);return p.walkDocument({document:t,rootType:E.Root,normalizedVisitors:C,resolvedRefMap:P,ctx:A}),{bundle:t,problems:A.problems.map((e=>n.addProblemToIgnore(e))),fileDependencies:o.getFiles(),rootType:E.Root,refTypes:A.refTypes,visitorsData:A.visitorsData}}))}function k(e,t){switch(t){case d.OasMajorVersion.Version3:switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";default:return null}case d.OasMajorVersion.Version2:switch(e){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}}}function O(e,t,n,r,a,s){let l,c;const u={ref:{leave(o,l,c){if(!c.location||void 0===c.node)return void m.reportUnresolvedRef(c,l.report,l.location);if(c.location.source===r.source&&c.location.source===l.location.source&&"scalar"!==l.type.name&&!t)return;if(n&&y.isRedoclyRegistryURL(o.$ref))return;if(s&&f.isAbsoluteUrl(o.$ref))return;const u=k(l.type.name,e);u?t?(h(u,c,l),p(o,c,l)):(o.$ref=h(u,c,l),function(e,t,n){const o=i.makeRefId(n.location.source.absoluteRef,e.$ref);a.set(o,{document:r,isRemote:!1,node:t.node,nodePointer:e.$ref,resolved:!0})}(o,c,l)):p(o,c,l)}},Root:{enter(t,n){c=n.location,e===d.OasMajorVersion.Version3?l=t.components=t.components||{}:e===d.OasMajorVersion.Version2&&(l=t)}}};function p(e,t,n){if(g.isPlainObject(t.node)){delete e.$ref;const n=Object.assign({},t.node,e);Object.assign(e,n)}else n.parent[n.key]=t.node}function h(t,n,r){l[t]=l[t]||{};const o=function(e,t,n){const[r,o]=[e.location.source.absoluteRef,e.location.pointer],i=l[t];let a="";const s=o.slice(2).split("/").filter(g.isTruthy);for(;s.length>0;)if(a=s.pop()+(a?`-${a}`:""),!i||!i[a]||b(i[a],e,n))return a;if(a=f.refBaseName(r)+(a?`_${a}`:""),!i[a]||b(i[a],e,n))return a;const c=a;let u=2;for(;i[a]&&!b(i[a],e,n);)a=`${c}-${u}`,u++;return i[a]||n.report({message:`Two schemas are referenced with the same name but different content. Renamed ${c} to ${a}.`,location:n.location,forceSeverity:"warn"}),a}(n,t,r);return l[t][o]=n.node,e===d.OasMajorVersion.Version3?`#/components/${t}/${o}`:`#/${t}/${o}`}function b(e,t,n){v
@media ${t?"print, ":""} screen and (max-width: ${t=>t.theme.breakpoints[e]}) ${n||""} {
${mn(...r)};
2022-02-04 13:00:46 +03:00
}
2023-08-17 17:09:11 +03:00
`,xn=hn;function wn(e){return t=>{if(t.theme.extensionsHook)return t.theme.extensionsHook(e,t)}}const kn=xn.div`
2022-02-04 13:00:46 +03:00
padding: 20px;
color: red;
2023-08-18 00:19:00 +03:00
`;class On extends r.Component{constructor(e){super(e),this.state={error:void 0}}componentDidCatch(e){return this.setState({error:e}),!1}render(){return this.state.error?r.createElement(kn,null,r.createElement("h1",null,"Something went wrong..."),r.createElement("small",null," ",this.state.error.message," "),r.createElement("p",null,r.createElement("details",null,r.createElement("summary",null,"Stack trace"),r.createElement("pre",null,this.state.error.stack))),r.createElement("small",null," ReDoc Version: ","2.1.1")," ",r.createElement("br",null),r.createElement("small",null," Commit: ","c86fd7f5")):r.createElement(r.Fragment,null,r.Children.only(this.props.children))}}const Sn=yn`
2022-02-04 13:00:46 +03:00
0% {
transform: rotate(0deg); }
100% {
transform: rotate(360deg);
}
2023-08-17 17:09:11 +03:00
`,En=xn((e=>r.createElement("svg",{className:e.className,version:"1.1",width:"512",height:"512",viewBox:"0 0 512 512"},r.createElement("path",{d:"M275.682 147.999c0 10.864-8.837 19.661-19.682 19.661v0c-10.875 0-19.681-8.796-19.681-19.661v-96.635c0-10.885 8.806-19.661 19.681-19.661v0c10.844 0 19.682 8.776 19.682 19.661v96.635z"}),r.createElement("path",{d:"M275.682 460.615c0 10.865-8.837 19.682-19.682 19.682v0c-10.875 0-19.681-8.817-19.681-19.682v-96.604c0-10.885 8.806-19.681 19.681-19.681v0c10.844 0 19.682 8.796 19.682 19.682v96.604z"}),r.createElement("path",{d:"M147.978 236.339c10.885 0 19.681 8.755 19.681 19.641v0c0 10.885-8.796 19.702-19.681 19.702h-96.624c-10.864 0-19.661-8.817-19.661-19.702v0c0-10.885 8.796-19.641 19.661-19.641h96.624z"}),r.createElement("path",{d:"M460.615 236.339c10.865 0 19.682 8.755 19.682 19.641v0c0 10.885-8.817 19.702-19.682 19.702h-96.584c-10.885 0-19.722-8.817-19.722-19.702v0c0-10.885 8.837-19.641 19.722-19.641h96.584z"}),r.createElement("path",{d:"M193.546 165.703c7.69 7.66 7.68 20.142 0 27.822v0c-7.701 7.701-20.162 7.701-27.853 0.020l-68.311-68.322c-7.68-7.701-7.68-20.142 0-27.863v0c7.68-7.68 20.121-7.68 27.822 0l68.342 68.342z"}),r.createElement("path",{d:"M414.597 386.775c7.7 7.68 7.7 20.163 0.021 27.863v0c-7.7 7.659-20.142 7.659-27.843-0.062l-68.311-68.26c-7.68-7.7-7.68-20.204 0-27.863v0c7.68-7.7 20.163-7.7 27.842 0l68.291 68.322z"}),r.createElement("path",{d:"M165.694 318.464c7.69-7.7 20.153-7.7 27.853 0v0c7.68 7.659 7.69 20.163 0 27.863l-68.342 68.322c-7.67 7.659-20.142 7.659-27.822-0.062v0c-7.68-7.68-7.68-20.122 0-27.801l68.311-68.322z"}),r.createElement("path",{d:"M386.775 97.362c7.7-7.68 20.142-7.68 27.822 0v0c7.7 7.68 7.7 20.183 0.021 27.863l-68.322 68.311c-7.68 7.68-20.163 7.68-27.843-0.020v0c-7.68-7.68-7.68-20.162 0-27.822l68.322-68.332z"}))))`
animation: 2s ${Sn} linear infinite;
2022-02-04 13:00:46 +03:00
width: 50px;
height: 50px;
content: '';
display: inline-block;
margin-left: -25px;
path {
fill: ${e=>e.color};
}
2023-08-17 17:09:11 +03:00
`,_n=xn.div`
2022-02-04 13:00:46 +03:00
font-family: helvetica, sans;
width: 100%;
text-align: center;
font-size: 25px;
margin: 30px 0 20px 0;
color: ${e=>e.color};
2023-08-18 00:19:00 +03:00
`;class jn extends r.PureComponent{render(){return r.createElement("div",{style:{textAlign:"center"}},r.createElement(_n,{color:this.props.color},"Loading ..."),r.createElement(En,{color:this.props.color}))}}var An=n(5697);const Pn=r.createContext(new fn({})),Cn=Pn.Provider,Tn=Pn.Consumer;function In(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Rn={};function Nn(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:Rn}var $n=Object.assign,Ln=Object.getOwnPropertyDescriptor,Dn=Object.defineProperty,Mn=Object.prototype,Fn=[];Object.freeze(Fn);var zn={};Object.freeze(zn);var Un="undefined"!=typeof Proxy,Bn=Object.toString();function qn(){Un||In("Proxy not available")}function Wn(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Vn=function(){};function Hn(e){return"function"==typeof e}function Yn(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Qn(e){return null!==e&&"object"==typeof e}function Gn(e){var t;if(!Qn(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===Bn}function Xn(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function Kn(e,t,n){Dn(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Zn(e,t,n){Dn(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Jn(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Qn(e)&&!0===e[n]}}function er(e){return e instanceof Map}function tr(e){return e instanceof Set}var nr=void 0!==Object.getOwnPropertySymbols,rr="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:nr?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function or(e){return null===e?null:"object"==typeof e?""+e:e}function ir(e,t){return Mn.hasOwnProperty.call(e,t)}var ar=Object.getOwnPropertyDescriptors||function(e){var t={};return rr(e).forEach((function(n){t[n]=Ln(e,n)})),t};function sr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lr(e,t,n){return t&&sr(e.prototype,t),n&&sr(e,n),e}function cr(){return cr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cr.apply(this,arguments)}function ur(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function pr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fr(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var hr=Symbol("mobx-stored-annotations");function mr(e){return Object.assign((function(t,n){gr(t,n,e)}),e)}function gr(e,t,n){ir(e,hr)||Kn(e,hr,cr({},e[hr])),function(e){return e.annotationType_===Sr}(n)||(e[hr][t]=n)}var yr=Symbol("mobx administration"),b
2022-02-04 13:00:46 +03:00
width: calc(100% - ${e=>e.theme.rightPanel.width});
padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px;
2023-08-17 17:09:11 +03:00
${({compact:e,theme:t})=>vn("medium",!0)`
2022-02-04 13:00:46 +03:00
width: 100%;
padding: ${`${e?0:t.spacing.sectionVertical}px ${t.spacing.sectionHorizontal}px`};
`};
2023-08-17 17:09:11 +03:00
`,fp=xn.div.attrs((e=>({[ip]:e.id})))`
2022-02-04 13:00:46 +03:00
padding: ${e=>e.theme.spacing.sectionVertical}px 0;
&:last-child {
min-height: calc(100vh + 1px);
}
& > &:last-child {
min-height: initial;
}
2023-08-17 17:09:11 +03:00
${vn("medium",!0)`
2022-02-04 13:00:46 +03:00
padding: 0;
`}
${e=>e.underlined?"\n position: relative;\n\n &:not(:last-of-type):after {\n position: absolute;\n bottom: 0;\n width: 100%;\n display: block;\n content: '';\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n }\n ":""}
2023-08-17 17:09:11 +03:00
`,hp=xn.div`
2022-02-04 13:00:46 +03:00
width: ${e=>e.theme.rightPanel.width};
color: ${({theme:e})=>e.rightPanel.textColor};
background-color: ${e=>e.theme.rightPanel.backgroundColor};
padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px;
2023-08-17 17:09:11 +03:00
${vn("medium",!0)`
2022-02-04 13:00:46 +03:00
width: 100%;
padding: ${e=>`${e.theme.spacing.sectionVertical}px ${e.theme.spacing.sectionHorizontal}px`};
`};
2023-08-17 17:09:11 +03:00
`,mp=xn(hp)`
2022-02-04 13:00:46 +03:00
background-color: ${e=>e.theme.rightPanel.backgroundColor};
2023-08-17 17:09:11 +03:00
`,gp=xn.div`
2022-02-04 13:00:46 +03:00
display: flex;
width: 100%;
padding: 0;
2023-08-17 17:09:11 +03:00
${vn("medium",!0)`
2022-02-04 13:00:46 +03:00
flex-direction: column;
`};
2023-08-17 17:09:11 +03:00
`,yp={1:"1.85714em",2:"1.57143em",3:"1.27em"},bp=e=>mn`
2022-02-04 13:00:46 +03:00
font-family: ${({theme:e})=>e.typography.headings.fontFamily};
font-weight: ${({theme:e})=>e.typography.headings.fontWeight};
font-size: ${yp[e]};
2022-02-04 13:00:46 +03:00
line-height: ${({theme:e})=>e.typography.headings.lineHeight};
2023-08-17 17:09:11 +03:00
`,vp=xn.h1`
${bp(1)};
color: ${({theme:e})=>e.colors.text.primary};
2022-02-04 13:00:46 +03:00
2023-08-17 17:09:11 +03:00
${wn("H1")};
`,xp=xn.h2`
${bp(2)};
color: ${({theme:e})=>e.colors.text.primary};
margin: 0 0 20px;
2022-02-04 13:00:46 +03:00
2023-08-17 17:09:11 +03:00
${wn("H2")};
`,wp=(xn.h2`
${bp(3)};
color: ${({theme:e})=>e.colors.text.primary};
2022-02-04 13:00:46 +03:00
2023-08-17 17:09:11 +03:00
${wn("H3")};
`,xn.h3`
2022-02-04 13:00:46 +03:00
color: ${({theme:e})=>e.rightPanel.textColor};
2023-08-17 17:09:11 +03:00
${wn("RightPanelHeader")};
`),kp=xn.h5`
2022-02-04 13:00:46 +03:00
border-bottom: 1px solid rgba(38, 50, 56, 0.3);
margin: 1em 0 1em 0;
color: rgba(38, 50, 56, 0.5);
font-weight: normal;
text-transform: uppercase;
font-size: 0.929em;
line-height: 20px;
2023-08-17 17:09:11 +03:00
${wn("UnderlinedHeader")};
`,Op=(0,r.createContext)(void 0),{Provider:Sp,Consumer:Ep}=Op;function _p(e){const{spec:t,specUrl:o,options:i,onLoaded:a,children:s}=e,[l,c]=r.useState(null),[u,p]=r.useState(null);if(u)throw u;r.useEffect((()=>{!function(){return e=this,null,r=function*(){if(t||o){c(null);try{const e=yield function(e){return Aa(this,null,(function*(){const t=new _a.Config({}),r={config:t,base:Lt?window.location.href:process.cwd()};Lt&&(t.resolve.http.customFetch=n.g.fetch),"object"==typeof e&&null!==e?r.doc={source:{absoluteRef:""},parsed:e}:r.ref=e;const{bundle:{parsed:o}}=yield(0,Ea.bundle)(r);return void 0!==o.swagger?(i=o,console.warn("[ReDoc Compatibility mode]: Converting OpenAPI 2.0 to OpenAPI 3.0"),new Promise(((e,t)=>(0,ja.convertObj)(i,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},((n,r)=>{if(n)return t(n);e(r&&r.openapi)}))))):o;var i}))}(t||o);c(e)}catch(e){throw a&&a(e),p(e),e}}},new Promise(((t,n)=>{var o=e=>{try{a(r.next(e))}catch(e){n(e)}},i=e=>{try{a(r.throw(e))}catch(e){n(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,i);a((r=r.apply(e,null)).next())}));var e,r}()}),[t,o]);const d=r.useMemo((()=>{if(!l)return null;try{return new Jg(l,o,i)}catch(e){throw a&&a(e),e}}),[l,o,i]);return r.useEffect((()=>{d&&a&&a()}),[d,a]),s({loading:!d,store:d})}const jp=e=>mn`
2022-02-04 13:00:46 +03:00
${e} {
cursor: pointer;
margin-left: -20px;
padding: 0;
line-height: 1;
width: 20px;
display: inline-block;
outline: 0;
}
${e}:before {
content: '';
width: 15px;
height: 15px;
background-size: contain;
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMDEwMTAxIiBkPSJNNDU5LjcgMjMzLjRsLTkwLjUgOTAuNWMtNTAgNTAtMTMxIDUwLTE4MSAwIC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNSAtMjQuOS0yNS02NS41LTI1LTkwLjUgMGwtMzIuMiAzMi4yYy0yNi4xLTEwLjItNTQuMi0xMi45LTgxLjYtOC45bDY4LjYtNjguNmM1MC01MCAxMzEtNTAgMTgxIDBDNTA5LjYgMTAyLjMgNTA5LjYgMTgzLjQgNDU5LjcgMjMzLjR6TTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44IC01MC01MC0xMzEtNTAtMTgxIDBsLTkwLjUgOTAuNWMtNTAgNTAtNTAgMTMxIDAgMTgxIDUwIDUwIDEzMSA1MCAxODEgMGw2OC42LTY4LjZDMjc0LjYgMzk1LjEgMjQ2LjQgMzkyLjMgMjIwLjMgMzgyLjJ6Ii8+PC9zdmc+Cg==');
opacity: 0.5;
visibility: hidden;
display: inline-block;
vertical-align: middle;
}
h1:hover > ${e}::before, h2:hover > ${e}::before, ${e}:hover::before {
visibility: visible;
}
2023-08-17 17:09:11 +03:00
`,Ap=xn((function(e){const t=r.useContext(Op),n=r.useCallback((n=>{t&&function(e,t,n){t.defaultPrevented||0!==t.button||(e=>!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey))(t)||(t.preventDefault(),e.replace(encodeURI(n)))}(t.menu.history,n,e.to)}),[t,e.to]);return t?r.createElement("a",{className:e.className,href:t.menu.history.linkForId(e.to),onClick:n,"aria-label":e.to},e.children):null}))`
${jp("&")};
`;function Pp(e){return r.createElement(Ap,{to:e.to})}const Cp={left:"90deg",right:"-90deg",up:"-180deg",down:"0"},Tp=xn((e=>r.createElement("svg",{className:e.className,style:e.style,version:"1.1",viewBox:"0 0 24 24",x:"0",xmlns:"http://www.w3.org/2000/svg",y:"0","aria-hidden":"true"},r.createElement("polygon",{points:"17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "}))))`
2022-02-04 13:00:46 +03:00
height: ${e=>e.size||"18px"};
width: ${e=>e.size||"18px"};
min-width: ${e=>e.size||"18px"};
2022-02-04 13:00:46 +03:00
vertical-align: middle;
float: ${e=>e.float||""};
transition: transform 0.2s ease-out;
transform: rotateZ(${e=>Cp[e.direction||"down"]});
2022-02-04 13:00:46 +03:00
polygon {
fill: ${({color:e,theme:t})=>e&&t.colors.responses[e]&&t.colors.responses[e].color||e};
}
2023-08-17 17:09:11 +03:00
`,Ip=xn.span`
2022-02-04 13:00:46 +03:00
display: inline-block;
padding: 2px 8px;
margin: 0;
background-color: ${e=>e.theme.colors[e.type].main};
color: ${e=>e.theme.colors[e.type].contrastText};
font-size: ${e=>e.theme.typography.code.fontSize};
vertical-align: middle;
line-height: 1.6;
border-radius: 4px;
font-weight: ${({theme:e})=>e.typography.fontWeightBold};
font-size: 12px;
+ span[type] {
margin-left: 4px;
}
2023-08-17 17:09:11 +03:00
`,Rp=mn`
2022-02-04 13:00:46 +03:00
text-decoration: line-through;
color: #707070;
2023-08-17 17:09:11 +03:00
`,Np=xn.caption`
2022-02-04 13:00:46 +03:00
text-align: right;
font-size: 0.9em;
font-weight: normal;
color: ${e=>e.theme.colors.text.secondary};
2023-08-17 17:09:11 +03:00
`,$p=xn.td`
2022-02-04 13:00:46 +03:00
border-left: 1px solid ${e=>e.theme.schema.linesColor};
box-sizing: border-box;
position: relative;
padding: 10px 10px 10px 0;
2023-08-17 17:09:11 +03:00
${vn("small")`
2022-02-04 13:00:46 +03:00
display: block;
overflow: hidden;
`}
tr:first-of-type > &,
tr.last > & {
border-left-width: 0;
background-position: top left;
background-repeat: no-repeat;
background-size: 1px 100%;
}
tr:first-of-type > & {
background-image: linear-gradient(
to bottom,
transparent 0%,
transparent 22px,
${e=>e.theme.schema.linesColor} 22px,
${e=>e.theme.schema.linesColor} 100%
);
}
tr.last > & {
background-image: linear-gradient(
to bottom,
${e=>e.theme.schema.linesColor} 0%,
${e=>e.theme.schema.linesColor} 22px,
transparent 22px,
transparent 100%
);
}
tr.last + tr > & {
border-left-color: transparent;
}
tr.last:first-child > & {
background: none;
border-left-color: transparent;
}
2023-08-17 17:09:11 +03:00
`,Lp=xn($p)`
2022-02-04 13:00:46 +03:00
padding: 0;
2023-08-17 17:09:11 +03:00
`,Dp=xn($p)`
2022-02-04 13:00:46 +03:00
vertical-align: top;
line-height: 20px;
white-space: nowrap;
font-size: 13px;
font-family: ${e=>e.theme.typography.code.fontFamily};
&.deprecated {
2023-08-17 17:09:11 +03:00
${Rp};
2022-02-04 13:00:46 +03:00
}
2023-08-17 17:09:11 +03:00
${({kind:e})=>"patternProperties"===e&&mn`
> span.property-name {
display: inline-table;
white-space: break-spaces;
margin-right: 20px;
2022-02-04 13:00:46 +03:00
::before,
::after {
content: '/';
filter: opacity(0.2);
}
}
`}
${({kind:e=""})=>["field","additionalProperties","patternProperties"].includes(e)?"":"font-style: italic"};
2023-08-17 17:09:11 +03:00
${wn("PropertyNameCell")};
`,Mp=xn.td`
2022-02-04 13:00:46 +03:00
border-bottom: 1px solid #9fb4be;
padding: 10px 0;
width: ${e=>e.theme.schema.defaultDetailsWidth};
box-sizing: border-box;
tr.expanded & {
border-bottom: none;
}
2023-08-17 17:09:11 +03:00
${vn("small")`
2022-02-04 13:00:46 +03:00
padding: 0 20px;
border-bottom: none;
border-left: 1px solid ${e=>e.theme.schema.linesColor};
tr.last > & {
border-left: none;
}
`}
2023-08-17 17:09:11 +03:00
${wn("PropertyDetailsCell")};
`,Fp=xn.span`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.linesColor};
font-family: ${e=>e.theme.typography.code.fontFamily};
margin-right: 10px;
&::before {
content: '';
display: inline-block;
vertical-align: middle;
width: 10px;
height: 1px;
background: ${e=>e.theme.schema.linesColor};
}
&::after {
content: '';
display: inline-block;
vertical-align: middle;
width: 1px;
background: ${e=>e.theme.schema.linesColor};
height: 7px;
}
2023-08-17 17:09:11 +03:00
`,zp=xn.div`
2022-02-04 13:00:46 +03:00
padding: ${({theme:e})=>e.schema.nestingSpacing};
2023-08-17 17:09:11 +03:00
`,Up=xn.table`
2022-02-04 13:00:46 +03:00
border-collapse: separate;
border-radius: 3px;
font-size: ${e=>e.theme.typography.fontSize};
border-spacing: 0;
width: 100%;
> tr {
vertical-align: middle;
}
2023-08-17 17:09:11 +03:00
${vn("small")`
2022-02-04 13:00:46 +03:00
display: block;
> tr, > tbody > tr {
display: block;
}
`}
2023-08-17 17:09:11 +03:00
${vn("small",!1," and (-ms-high-contrast:none)")`
2022-02-04 13:00:46 +03:00
td {
float: left;
width: 100%;
}
`}
&
${zp},
2022-02-04 13:00:46 +03:00
&
${zp}
${zp}
${zp},
2022-02-04 13:00:46 +03:00
&
${zp}
${zp}
${zp}
${zp}
${zp} {
2022-02-04 13:00:46 +03:00
margin: ${({theme:e})=>e.schema.nestingSpacing};
margin-right: 0;
background: ${({theme:e})=>e.schema.nestedBackground};
}
&
${zp}
${zp},
2022-02-04 13:00:46 +03:00
&
${zp}
${zp}
${zp}
${zp},
2022-02-04 13:00:46 +03:00
&
${zp}
${zp}
${zp}
${zp}
${zp}
${zp} {
2022-02-04 13:00:46 +03:00
background: #ffffff;
}
2023-08-17 17:09:11 +03:00
`,Bp=xn.div`
2022-02-04 13:00:46 +03:00
margin: 0 0 3px 0;
display: inline-block;
2023-08-17 17:09:11 +03:00
`,qp=xn.span`
2022-02-04 13:00:46 +03:00
font-size: 0.9em;
margin-right: 10px;
color: ${e=>e.theme.colors.primary.main};
font-family: ${e=>e.theme.typography.headings.fontFamily};
}
2023-08-17 17:09:11 +03:00
`,Wp=xn.button`
2022-02-04 13:00:46 +03:00
display: inline-block;
margin-right: 10px;
margin-bottom: 5px;
font-size: 0.8em;
cursor: pointer;
border: 1px solid ${e=>e.theme.colors.primary.main};
padding: 2px 10px;
line-height: 1.5em;
outline: none;
&:focus {
box-shadow: 0 0 0 1px ${e=>e.theme.colors.primary.main};
}
2023-08-17 17:09:11 +03:00
${({deprecated:e})=>e&&Rp||""};
2023-08-17 17:09:11 +03:00
${e=>e.active?`\n color: white;\n background-color: ${e.theme.colors.primary.main};\n &:focus {\n box-shadow: none;\n background-color: ${Ot(.15,e.theme.colors.primary.main)};\n }\n `:`\n color: ${e.theme.colors.primary.main};\n background-color: white;\n `}
`,Vp=xn.div`
2022-02-04 13:00:46 +03:00
font-size: 0.9em;
font-family: ${e=>e.theme.typography.code.fontFamily};
&::after {
content: ' [';
}
2023-08-17 17:09:11 +03:00
`,Hp=xn.div`
2022-02-04 13:00:46 +03:00
font-size: 0.9em;
font-family: ${e=>e.theme.typography.code.fontFamily};
&::after {
content: ']';
}
2023-08-17 17:09:11 +03:00
`;function Yp(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var Qp=Yp("Tab"),Gp=Yp("TabList"),Xp=Yp("TabPanel");function Kp(){return Kp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kp.apply(this,arguments)}function Zp(e,t){return r.Children.map(e,(function(e){return null===e?null:function(e){return Qp(e)||Gp(e)||Xp(e)}(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children?(0,r.cloneElement)(e,Kp({},e.props,{children:Zp(e.props.children,t)})):e}))}function Jp(e,t){return r.Children.forEach(e,(function(e){null!==e&&(Qp(e)||Xp(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children&&(Gp(e)&&t(e),Jp(e.props.children,t)))}))}function ed(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ed(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function td(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ed(e))&&(r&&(r+=" "),r+=t);return r}var nd,rd=0;function od(){return"react-tabs-"+rd++}function id(e){var t=0;return Jp(e,(function(e){Qp(e)&&t++})),t}function ad(){return ad=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ad.apply(this,arguments)}function sd(e,t){return sd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},sd(e,t)}function ld(e){return e&&"getAttribute"in e}function cd(e){return ld(e)&&"tab"===e.getAttribute("role")}function ud(e){return ld(e)&&"true"===e.getAttribute("aria-disabled")}var pd=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).tabNodes=[],t.handleKeyDown=function(e){var n=t.props,r=n.direction,o=n.disableUpDownKeys;if(t.isTabFromContainer(e.target)){var i=t.props.selectedIndex,a=!1,s=!1;32!==e.keyCode&&13!==e.keyCode||(a=!0,s=!1,t.handleClick(e)),37===e.keyCode||!o&&38===e.keyCode?(i="rtl"===r?t.getNextTab(i):t.getPrevTab(i),a=!0,s=!0):39===e.keyCode||!o&&40===e.keyCode?(i="rtl"===r?t.getPrevTab(i):t.getNextTab(i),a=!0,s=!0):35===e.keyCode?(i=t.getLastTab(),a=!0,s=!0):36===e.keyCode&&(i=t.getFirstTab(),a=!0,s=!0),a&&e.preventDefault(),s&&t.setSelected(i,e)}},t.handleClick=function(e){var n=e.target;do{if(t.isTabFromContainer(n)){if(ud(n))return;var r=[].slice.call(n.parentNode.children).filter(cd).indexOf(n);return void t.setSelected(r,e)}}while(null!=(n=n.parentNode))},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,sd(t,n);var i=o.prototype;return i.setSelected=function(e,t){if(!(e<0||e>=this.getTabsCount())){var n=this.props;(0,n.onSelect)(e,n.selectedIndex,t)}},i.getNextTab=function(e){for(var t=this.getTabsCount(),n=e+1;n<t;n++)if(!ud(this.getTab(n)))return n;for(var r=0;r<e;r++)if(!ud(this.getTab(r)))return r;return e},i.getPrevTab=function(e){for(var t=e;t--;)if(!ud(this.getTab(t)))return t;for(t=this.getTabsCount();t-- >e;)if(!ud(this.getTab(t)))return t;return e},i.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t<e;t++)if(!ud(this.getTab(t)))return t;return null},i.getLastTab=function(){for(var e=this.getTabsCount();e--;)if(!ud(this.getTab(e)))return e;return null},i.getTabsCount=function(){return id(this.props.children)},i.getPanelsCount=function(){return e=this.props.children,t=0,Jp(e,(function(e){Xp(e)&&t++})),t;var e,t},i.getTab=function(e){return this.tabNodes["tabs-"+e]},i.getChildren=function(){var e=this,t=0,n=this.props,o=n.children,i=n.disabledTabClassName,a=n.focus,s=n.forceRenderTabPanel,l=n.selectedIndex,c=n.selectedTabClassName,u=n.selectedTabPanelClassName,p=n.environment;this.tabIds=this.tabIds||[],this.panelIds=this.panelIds||[];for(var d=this.tabIds.length-this.getTabsCount();d++<0;)this.tabIds.push(od()),this.panelIds.push(od());return Zp(o,(function(n){var o=n;if(Gp(n)){var d=0,f=!1;null==nd&&function(e){var t=e||("undefi
2022-02-04 13:00:46 +03:00
> ul {
list-style: none;
padding: 0;
margin: 0;
margin: 0 -5px;
> li {
padding: 5px 10px;
display: inline-block;
background-color: ${({theme:e})=>e.codeBlock.backgroundColor};
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
cursor: pointer;
text-align: center;
outline: none;
2023-08-17 17:09:11 +03:00
color: ${({theme:e})=>Ot(e.colors.tonalOffset,e.rightPanel.textColor)};
2022-02-04 13:00:46 +03:00
margin: 0
${({theme:e})=>`${e.spacing.unit}px ${e.spacing.unit}px ${e.spacing.unit}px`};
2023-08-17 17:09:11 +03:00
border: 1px solid ${({theme:e})=>Ot(.05,e.codeBlock.backgroundColor)};
2022-02-04 13:00:46 +03:00
border-radius: 5px;
min-width: 60px;
font-size: 0.9em;
font-weight: bold;
&.react-tabs__tab--selected {
color: ${e=>e.theme.colors.text.primary};
background: ${({theme:e})=>e.rightPanel.textColor};
&:focus {
outline: auto;
}
}
&:only-child {
flex: none;
min-width: 100px;
}
&.tab-success {
color: ${e=>e.theme.colors.responses.success.tabTextColor};
}
&.tab-redirect {
color: ${e=>e.theme.colors.responses.redirect.tabTextColor};
}
&.tab-info {
color: ${e=>e.theme.colors.responses.info.tabTextColor};
}
&.tab-error {
color: ${e=>e.theme.colors.responses.error.tabTextColor};
}
}
}
> .react-tabs__tab-panel {
background: ${({theme:e})=>e.codeBlock.backgroundColor};
& > div,
& > pre {
padding: ${e=>4*e.theme.spacing.unit}px;
margin: 0;
}
& > div > pre {
padding: 0;
}
}
2023-08-17 17:09:11 +03:00
`,_d=(xn(Ed)`
2022-02-04 13:00:46 +03:00
> ul {
display: block;
> li {
padding: 2px 5px;
min-width: auto;
margin: 0 15px 0 0;
font-size: 13px;
font-weight: normal;
border-bottom: 1px dashed;
2023-08-17 17:09:11 +03:00
color: ${({theme:e})=>Ot(e.colors.tonalOffset,e.rightPanel.textColor)};
2022-02-04 13:00:46 +03:00
border-radius: 0;
background: none;
&:last-child {
margin-right: 0;
}
&.react-tabs__tab--selected {
color: ${({theme:e})=>e.rightPanel.textColor};
background: none;
}
}
}
> .react-tabs__tab-panel {
& > div,
& > pre {
padding: ${e=>2*e.theme.spacing.unit}px 0;
}
}
2023-08-17 17:09:11 +03:00
`,xn.div`
2022-02-04 13:00:46 +03:00
/**
* Based on prism-dark.css
*/
code[class*='language-'],
pre[class*='language-'] {
/* color: white;
background: none; */
text-shadow: 0 -0.1em 0.2em black;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
@media print {
code[class*='language-'],
pre[class*='language-'] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*='language-'] {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: hsl(30, 20%, 50%);
}
.token.punctuation {
opacity: 0.7;
}
.namespace {
opacity: 0.7;
}
.token.property,
.token.tag,
.token.number,
.token.constant,
.token.symbol {
color: #4a8bb3;
}
.token.boolean {
color: #e64441;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #a0fbaa;
& + a,
& + a:visited {
color: #4ed2ba;
text-decoration: underline;
}
}
.token.property.string {
color: white;
}
.token.operator,
.token.entity,
.token.url,
.token.variable {
color: hsl(40, 90%, 60%);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: hsl(350, 40%, 70%);
}
.token.regex,
.token.important {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.deleted {
color: red;
}
2023-08-17 17:09:11 +03:00
${wn("Prism")};
`),jd=xn.div`
2022-02-04 13:00:46 +03:00
opacity: 0.7;
transition: opacity 0.3s ease;
text-align: right;
&:focus-within {
opacity: 1;
}
> button {
background-color: transparent;
border: 0;
color: inherit;
padding: 2px 10px;
font-family: ${({theme:e})=>e.typography.fontFamily};
font-size: ${({theme:e})=>e.typography.fontSize};
line-height: ${({theme:e})=>e.typography.lineHeight};
cursor: pointer;
outline: 0;
:hover,
:focus {
background: rgba(255, 255, 255, 0.1);
}
}
2023-08-17 17:09:11 +03:00
`,Ad=xn.div`
&:hover ${jd} {
2022-02-04 13:00:46 +03:00
opacity: 1;
}
2023-08-17 17:09:11 +03:00
`,Pd=xn(_d).attrs({as:"pre"})`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: ${e=>e.theme.typography.code.fontSize};
overflow-x: auto;
margin: 0;
white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"};
2023-08-17 17:09:11 +03:00
`;function Cd(e){return getComputedStyle(e)}function Td(e,t){for(var n in t){var r=t[n];"number"==typeof r&&(r+="px"),e.style[n]=r}return e}function Id(e){var t=document.createElement("div");return t.className=e,t}var Rd="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function Nd(e,t){if(!Rd)throw new Error("No element matching method supported");return Rd.call(e,t)}function $d(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function Ld(e,t){return Array.prototype.filter.call(e.children,(function(e){return Nd(e,t)}))}var Dd={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},Md={x:null,y:null};function Fd(e,t){var n=e.element.classList,r=Dd.state.scrolling(t);n.contains(r)?clearTimeout(Md[t]):n.add(r)}function zd(e,t){Md[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(Dd.state.scrolling(t))}),e.settings.scrollingThreshold)}var Ud=function(e){this.element=e,this.handlers={}},Bd={isEmpty:{configurable:!0}};Ud.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},Ud.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter((function(r){return!(!t||r===t)||(n.element.removeEventListener(e,r,!1),!1)}))},Ud.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},Bd.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(Ud.prototype,Bd);var qd=function(){this.eventElements=[]};function Wd(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function Vd(e,t,n,r,o){var i;if(void 0===r&&(r=!0),void 0===o&&(o=!1),"top"===t)i=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");i=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,r,o){var i=n[0],a=n[1],s=n[2],l=n[3],c=n[4],u=n[5];void 0===r&&(r=!0),void 0===o&&(o=!1);var p=e.element;e.reach[l]=null,p[s]<1&&(e.reach[l]="start"),p[s]>e[i]-e[a]-1&&(e.reach[l]="end"),t&&(p.dispatchEvent(Wd("ps-scroll-"+l)),t<0?p.dispatchEvent(Wd("ps-scroll-"+c)):t>0&&p.dispatchEvent(Wd("ps-scroll-"+u)),r&&function(e,t){Fd(e,t),zd(e,t)}(e,l)),e.reach[l]&&(t||o)&&p.dispatchEvent(Wd("ps-"+l+"-reach-"+e.reach[l]))}(e,n,i,r,o)}function Hd(e){return parseInt(e,10)||0}qd.prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new Ud(e),this.eventElements.push(t)),t},qd.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},qd.prototype.unbind=function(e,t,n){var r=this.eventElement(e);r.unbind(t,n),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},qd.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},qd.prototype.once=function(e,t,n){var r=this.eventElement(e),o=function(e){r.unbind(t,o),n(e)};r.bind(t,o)};var Yd={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function Qd(e){var t=e.element,n=Math.floor(t.scrollTop),r=t.getBoundingClientRect();e.containerWidth=Math.round(r.width),e.containerHeight=Math.round(r.height),e.contentW
position: relative;
2023-08-17 17:09:11 +03:00
`;class uf extends r.Component{constructor(){super(...arguments),this.handleRef=e=>{this._container=e}}componentDidMount(){const e=this._container.parentElement&&this._container.parentElement.scrollTop||0;this.inst=new af(this._container,this.props.options||{}),this._container.scrollTo&&this._container.scrollTo(0,e)}componentDidUpdate(){this.inst.update()}componentWillUnmount(){this.inst.destroy()}render(){const{children:e,className:t,updateFn:n}=this.props;return n&&n(this.componentDidUpdate.bind(this)),r.createElement(r.Fragment,null,sf&&r.createElement(lf,null),r.createElement(cf,{className:`scrollbar-container ${t}`,ref:this.handleRef},e))}}function pf(e){return r.createElement(Pn.Consumer,null,(t=>t.nativeScrollbars?r.createElement("div",{style:{overflow:"auto",overscrollBehavior:"contain",msOverflowStyle:"-ms-autohiding-scrollbar"}},e.children):r.createElement(uf,((e,t)=>{for(var n in t||(t={}))nf.call(t,n)&&of(e,n,t[n]);if(tf)for(var n of tf(t))rf.call(t,n)&&of(e,n,t[n]);return e})({},e),e.children)))}const df=xn((({className:e,style:t})=>r.createElement("svg",{className:e,style:t,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("polyline",{points:"6 9 12 15 18 9"}))))`
position: absolute;
pointer-events: none;
z-index: 1;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
right: 8px;
margin: auto;
text-align: center;
polyline {
color: ${e=>"dark"===e.variant&&"white"};
}
2023-08-17 17:09:11 +03:00
`,ff=r.memo((e=>{const{options:t,onChange:n,placeholder:o,value:i="",variant:a,className:s}=e;return r.createElement("div",{className:s},r.createElement(df,{variant:a}),r.createElement("select",{onChange:e=>{const{selectedIndex:r}=e.target;n(t[o?r-1:r])},value:i,className:"dropdown-select"},o&&r.createElement("option",{disabled:!0,hidden:!0,value:o},o),t.map((({idx:e,value:t,title:n},o)=>r.createElement("option",{key:e||t+o,value:t},n||t)))),r.createElement("label",null,i))})),hf=ze(ff)`
label {
box-sizing: border-box;
min-width: 100px;
outline: none;
display: inline-block;
font-family: ${e=>e.theme.typography.headings.fontFamily};
color: ${({theme:e})=>e.colors.text.primary};
vertical-align: bottom;
width: ${({fullWidth:e})=>e?"100%":"auto"};
text-transform: none;
padding: 0 22px 0 4px;
font-size: 0.929em;
line-height: 1.5em;
font-family: inherit;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.dropdown-select {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
border: none;
appearance: none;
cursor: pointer;
color: ${({theme:e})=>e.colors.text.primary};
line-height: inherit;
font-family: inherit;
}
box-sizing: border-box;
min-width: 100px;
outline: none;
display: inline-block;
border-radius: 2px;
border: 1px solid rgba(38, 50, 56, 0.5);
vertical-align: bottom;
padding: 2px 0px 2px 6px;
2022-02-04 13:00:46 +03:00
position: relative;
width: auto;
background: white;
color: #263238;
font-family: ${e=>e.theme.typography.headings.fontFamily};
font-size: 0.929em;
line-height: 1.5em;
cursor: pointer;
transition: border 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
&:hover,
&:focus-within {
border: 1px solid ${e=>e.theme.colors.primary.main};
color: ${e=>e.theme.colors.primary.main};
box-shadow: 0px 0px 0px 1px ${e=>e.theme.colors.primary.main};
}
2023-08-17 17:09:11 +03:00
`,mf=ze(hf)`
margin-left: 10px;
text-transform: none;
font-size: 0.969em;
font-size: 1em;
border: none;
padding: 0 1.2em 0 0;
background: transparent;
&:hover,
&:focus-within {
border: none;
box-shadow: none;
label {
color: ${e=>e.theme.colors.primary.main};
text-shadow: 0px 0px 0px ${e=>e.theme.colors.primary.main};
}
}
2023-08-17 17:09:11 +03:00
`,gf=ze.span`
margin-left: 10px;
text-transform: none;
font-size: 0.929em;
color: black;
2023-08-17 17:09:11 +03:00
`;var yf=Object.defineProperty,bf=Object.getOwnPropertySymbols,vf=Object.prototype.hasOwnProperty,xf=Object.prototype.propertyIsEnumerable,wf=(e,t,n)=>t in e?yf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kf=(e,t)=>{for(var n in t||(t={}))vf.call(t,n)&&wf(e,n,t[n]);if(bf)for(var n of bf(t))xf.call(t,n)&&wf(e,n,t[n]);return e};function Of(e){const{Label:t=gf,Dropdown:n=mf}=e;return 1===e.options.length?r.createElement(t,null,e.options[0].value):r.createElement(n,kf({},e))}var Sf=n(7856);const Ef=mn`
2022-02-04 13:00:46 +03:00
a {
text-decoration: ${e=>e.theme.typography.links.textDecoration};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.typography.links.color};
&:visited {
color: ${e=>e.theme.typography.links.visited};
}
&:hover {
color: ${e=>e.theme.typography.links.hover};
text-decoration: ${e=>e.theme.typography.links.hoverTextDecoration};
2022-02-04 13:00:46 +03:00
}
}
2023-08-17 17:09:11 +03:00
`,_f=xn(_d)`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.fontFamily};
font-weight: ${e=>e.theme.typography.fontWeightRegular};
line-height: ${e=>e.theme.typography.lineHeight};
p {
&:last-child {
margin-bottom: 0;
}
}
${({compact:e})=>e&&"\n p:first-child {\n margin-top: 0;\n }\n p:last-child {\n margin-bottom: 0;\n }\n "}
${({inline:e})=>e&&" p {\n display: inline-block;\n }"}
h1 {
2023-08-17 17:09:11 +03:00
${bp(1)};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.primary.main};
margin-top: 0;
}
h2 {
2023-08-17 17:09:11 +03:00
${bp(2)};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.text.primary};
}
code {
color: ${({theme:e})=>e.typography.code.color};
background-color: ${({theme:e})=>e.typography.code.backgroundColor};
font-family: ${e=>e.theme.typography.code.fontFamily};
border-radius: 2px;
border: 1px solid rgba(38, 50, 56, 0.1);
padding: 0 ${({theme:e})=>e.spacing.unit}px;
font-size: ${e=>e.theme.typography.code.fontSize};
font-weight: ${({theme:e})=>e.typography.code.fontWeight};
word-break: break-word;
}
pre {
font-family: ${e=>e.theme.typography.code.fontFamily};
white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"};
background-color: ${({theme:e})=>e.codeBlock.backgroundColor};
color: white;
padding: ${e=>4*e.theme.spacing.unit}px;
overflow-x: auto;
line-height: normal;
border-radius: 0px;
border: 1px solid rgba(38, 50, 56, 0.1);
code {
background-color: transparent;
color: white;
padding: 0;
&:before,
&:after {
content: none;
}
}
}
blockquote {
margin: 0;
margin-bottom: 1em;
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
img {
max-width: 100%;
box-sizing: content-box;
}
ul,
ol {
padding-left: 2em;
margin: 0;
margin-bottom: 1em;
ul,
ol {
margin-bottom: 0;
margin-top: 0;
}
}
table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
border-collapse: collapse;
border-spacing: 0;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
table tr {
background-color: #fff;
border-top: 1px solid #ccc;
&:nth-child(2n) {
background-color: ${({theme:e})=>e.schema.nestedBackground};
}
}
table th,
table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
table th {
text-align: left;
font-weight: bold;
}
2023-08-17 17:09:11 +03:00
${jp(".share-link")};
2022-02-04 13:00:46 +03:00
2023-08-17 17:09:11 +03:00
${Ef}
2022-02-04 13:00:46 +03:00
2023-08-17 17:09:11 +03:00
${wn("Markdown")};
`;var jf=Object.defineProperty,Af=Object.getOwnPropertySymbols,Pf=Object.prototype.hasOwnProperty,Cf=Object.prototype.propertyIsEnumerable,Tf=(e,t,n)=>t in e?jf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const If=ze(_f)`
display: inline;
`;function Rf(e){const t=e.inline?If:_f;return r.createElement(Tn,null,(n=>{return r.createElement(t,((e,t)=>{for(var n in t||(t={}))Pf.call(t,n)&&Tf(e,n,t[n]);if(Af)for(var n of Af(t))Cf.call(t,n)&&Tf(e,n,t[n]);return e})({className:"redoc-markdown "+(e.className||""),dangerouslySetInnerHTML:{__html:(o=n.untrustedSpec,i=e.html,o?Sf.sanitize(i):i)},"data-role":e["data-role"]},e));var o,i}))}class Nf extends r.Component{render(){const{source:e,inline:t,compact:n,className:o,"data-role":i}=this.props,a=new Tl;return r.createElement(Rf,{html:a.renderMd(e),inline:t,compact:n,className:o,"data-role":i})}}const $f=xn.div`
2022-02-04 13:00:46 +03:00
position: relative;
2023-08-17 17:09:11 +03:00
`,Lf=xn.div`
2022-02-04 13:00:46 +03:00
position: absolute;
min-width: 80px;
max-width: 500px;
background: #fff;
bottom: 100%;
left: 50%;
margin-bottom: 10px;
transform: translateX(-50%);
border-radius: 4px;
padding: 0.3em 0.6em;
text-align: center;
box-shadow: 0px 0px 5px 0px rgba(204, 204, 204, 1);
2023-08-17 17:09:11 +03:00
`,Df=xn.div`
2022-02-04 13:00:46 +03:00
background: #fff;
color: #000;
display: inline;
font-size: 0.85em;
white-space: nowrap;
2023-08-17 17:09:11 +03:00
`,Mf=xn.div`
2022-02-04 13:00:46 +03:00
position: absolute;
width: 0;
height: 0;
bottom: -5px;
left: 50%;
margin-left: -5px;
border-left: solid transparent 5px;
border-right: solid transparent 5px;
border-top: solid #fff 5px;
2023-08-17 17:09:11 +03:00
`,Ff=xn.div`
2022-02-04 13:00:46 +03:00
position: absolute;
width: 100%;
height: 20px;
bottom: -20px;
2023-08-17 17:09:11 +03:00
`;class zf extends r.Component{render(){const{open:e,title:t,children:n}=this.props;return r.createElement($f,null,n,e&&r.createElement(Lf,null,r.createElement(Df,null,t),r.createElement(Mf,null),r.createElement(Ff,null)))}}const Uf="undefined"!=typeof document&&document.queryCommandSupported&&document.queryCommandSupported("copy");class Bf{static isSupported(){return Uf}static selectElement(e){let t,n;document.body.createTextRange?(t=document.body.createTextRange(),t.moveToElementText(e),t.select()):document.createRange&&window.getSelection&&(n=window.getSelection(),t=document.createRange(),t.selectNodeContents(e),n.removeAllRanges(),n.addRange(t))}static deselect(){if(document.selection)document.selection.empty();else if(window.getSelection){const e=window.getSelection();e&&e.removeAllRanges()}}static copySelected(){let e;try{e=document.execCommand("copy")}catch(t){e=!1}return e}static copyElement(e){Bf.selectElement(e);const t=Bf.copySelected();return t&&Bf.deselect(),t}static copyCustom(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="2em",t.style.height="2em",t.style.padding="0",t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select();const n=Bf.copySelected();return document.body.removeChild(t),n}}const qf=e=>{const[t,n]=r.useState(!1),o=()=>{const t="string"==typeof e.data?e.data:JSON.stringify(e.data,null,2);Bf.copyCustom(t),i()},i=()=>{n(!0),setTimeout((()=>{n(!1)}),1500)};return e.children({renderCopyButton:()=>r.createElement("button",{onClick:o},r.createElement(zf,{title:Bf.isSupported()?"Copied":"Not supported in your browser",open:t},"Copy"))})};let Wf=1;function Vf(e,t){Wf=1;let n="";return n+='<div class="redoc-json">',n+="<code>",n+=Xf(e,t),n+="</code>",n+="</div>",n}function Hf(e){return void 0!==e?e.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""}function Yf(e){return JSON.stringify(e).slice(1,-1)}function Qf(e,t){return'<span class="'+t+'">'+Hf(e)+"</span>"}function Gf(e){return'<span class="token punctuation">'+e+"</span>"}function Xf(e,t){const n=typeof e;let r="";return null==e?r+=Qf("null","token keyword"):e&&e.constructor===Array?(Wf++,r+=function(e,t){const n=Wf>t?"collapsed":"";let r=`<button class="collapser" aria-label="${Wf>t+1?"expand":"collapse"}"></button>${Gf("[")}<span class="ellipsis"></span><ul class="array collapsible">`,o=!1;const i=e.length;for(let a=0;a<i;a++)o=!0,r+='<li><div class="hoverable '+n+'">',r+=Xf(e[a],t),a<i-1&&(r+=","),r+="</div></li>";return r+=`</ul>${Gf("]")}`,o||(r=Gf("[ ]")),r}(e,t),Wf--):e&&e.constructor===Date?r+=Qf('"'+e.toISOString()+'"',"token string"):"object"===n?(Wf++,r+=function(e,t){const n=Wf>t?"collapsed":"",r=Object.keys(e),o=r.length;let i=`<button class="collapser" aria-label="${Wf>t+1?"expand":"collapse"}"></button>${Gf("{")}<span class="ellipsis"></span><ul class="obj collapsible">`,a=!1;for(let s=0;s<o;s++){const l=r[s];a=!0,i+='<li><div class="hoverable '+n+'">',i+='<span class="property token string">"'+Hf(l)+'"</span>: ',i+=Xf(e[l],t),s<o-1&&(i+=Gf(",")),i+="</div></li>"}return i+=`</ul>${Gf("}")}`,a||(i=Gf("{ }")),i}(e,t),Wf--):"number"===n?r+=Qf(e,"token number"):"string"===n?/^(http|https):\/\/[^\s]+$/.test(e)?r+=Qf('"',"token string")+'<a href="'+encodeURI(e)+'">'+Hf(Yf(e))+"</a>"+Qf('"',"token string"):r+=Qf('"'+Yf(e)+'"',"token string"):"boolean"===n&&(r+=Qf(e,"token boolean")),r}const Kf=mn`
2022-02-04 13:00:46 +03:00
.redoc-json code > .collapser {
display: none;
pointer-events: none;
}
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: ${e=>e.theme.typography.code.fontSize};
white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"};
contain: content;
overflow-x: auto;
.callback-function {
color: gray;
}
.collapser:after {
content: '-';
cursor: pointer;
}
.collapsed > .collapser:after {
content: '+';
cursor: pointer;
}
.ellipsis:after {
content: ' … ';
}
.collapsible {
margin-left: 2em;
}
.hoverable {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 2px;
padding-right: 2px;
border-radius: 2px;
}
.hovered {
background-color: rgba(235, 238, 249, 1);
}
.collapser {
background-color: transparent;
border: 0;
color: #fff;
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: ${e=>e.theme.typography.code.fontSize};
padding-right: 6px;
padding-left: 6px;
padding-top: 0;
padding-bottom: 0;
display: flex;
align-items: center;
justify-content: center;
width: 15px;
height: 15px;
position: absolute;
top: 4px;
left: -1.5em;
cursor: default;
user-select: none;
-webkit-user-select: none;
padding: 2px;
&:focus {
outline-color: #fff;
outline-style: dotted;
outline-width: 1px;
}
}
ul {
list-style-type: none;
padding: 0px;
margin: 0px 0px 0px 26px;
}
li {
position: relative;
display: block;
}
.hoverable {
display: inline-block;
}
.selected {
outline-style: solid;
outline-width: 1px;
outline-style: dotted;
}
.collapsed > .collapsible {
display: none;
}
.ellipsis {
display: none;
}
.collapsed > .ellipsis {
display: inherit;
}
2023-08-17 17:09:11 +03:00
`,Zf=xn.div`
&:hover > ${jd} {
2022-02-04 13:00:46 +03:00
opacity: 1;
}
2023-08-17 17:09:11 +03:00
`,Jf=xn((e=>{const[t,n]=r.useState(),o=({renderCopyButton:t})=>{const o=e.data&&Object.values(e.data).some((e=>"object"==typeof e&&null!==e));return r.createElement(Zf,null,r.createElement(jd,null,t(),o&&r.createElement(r.Fragment,null,r.createElement("button",{onClick:i}," Expand all "),r.createElement("button",{onClick:a}," Collapse all "))),r.createElement(Pn.Consumer,null,(t=>r.createElement(_d,{className:e.className,ref:e=>n(e),dangerouslySetInnerHTML:{__html:Vf(e.data,t.jsonSampleExpandLevel)}}))))},i=()=>{const e=null==t?void 0:t.getElementsByClassName("collapsible");for(const t of Array.prototype.slice.call(e)){const e=t.parentNode;e.classList.remove("collapsed"),e.querySelector(".collapser").setAttribute("aria-label","collapse")}},a=()=>{const e=null==t?void 0:t.getElementsByClassName("collapsible"),n=Array.prototype.slice.call(e,1);for(const e of n){const t=e.parentNode;t.classList.add("collapsed"),t.querySelector(".collapser").setAttribute("aria-label","expand")}},s=e=>{let t;"collapser"===e.className&&(t=e.parentElement.getElementsByClassName("collapsible")[0],t.parentElement.classList.contains("collapsed")?(t.parentElement.classList.remove("collapsed"),e.setAttribute("aria-label","collapse")):(t.parentElement.classList.add("collapsed"),e.setAttribute("aria-label","expand")))},l=r.useCallback((e=>{s(e.target)}),[]),c=r.useCallback((e=>{"Enter"===e.key&&s(e.target)}),[]);return r.useEffect((()=>(null==t||t.addEventListener("click",l),null==t||t.addEventListener("focus",c),()=>{null==t||t.removeEventListener("click",l),null==t||t.removeEventListener("focus",c)})),[l,c,t]),r.createElement(qf,{data:e.data},o)}))`
${Kf};
`,eh=e=>{const{source:t,lang:n}=e;return r.createElement(Pd,{dangerouslySetInnerHTML:{__html:ys(t,n)}})},th=e=>{const{source:t,lang:n}=e;return r.createElement(qf,{data:t},(({renderCopyButton:e})=>r.createElement(Ad,null,r.createElement(jd,null,e()),r.createElement(eh,{lang:n,source:t}))))};function nh({value:e,mimeType:t}){return Za(t)?r.createElement(Jf,{data:e}):("object"==typeof e&&(e=JSON.stringify(e,null,2)),r.createElement(th,{lang:(n=t,-1!==n.search(/xml/i)?"xml":-1!==n.search(/csv/i)?"csv":-1!==n.search(/plain/i)?"tex":"clike"),source:e}));var n}var rh=(e,t,n)=>new Promise(((r,o)=>{var i=e=>{try{s(n.next(e))}catch(e){o(e)}},a=e=>{try{s(n.throw(e))}catch(e){o(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,a);s((n=n.apply(e,t)).next())}));function oh({example:e,mimeType:t}){return void 0===e.value&&e.externalValueUrl?r.createElement(ih,{example:e,mimeType:t}):r.createElement(nh,{value:e.value,mimeType:t})}function ih({example:e,mimeType:t}){const n=function(e,t){const[,n]=(0,r.useState)(!0),o=(0,r.useRef)(void 0),i=(0,r.useRef)(void 0);return i.current!==e&&(o.current=void 0),i.current=e,(0,r.useEffect)((()=>{(()=>{rh(this,null,(function*(){n(!0);try{o.current=yield e.getExternalValue(t)}catch(e){o.current=e}n(!1)}))})()}),[e,t]),o.current}(e,t);return void 0===n?r.createElement("span",null,"Loading..."):n instanceof Error?r.createElement(Pd,null,"Error loading external example: ",r.createElement("br",null),r.createElement("a",{className:"token string",href:e.externalValueUrl,target:"_blank",rel:"noopener noreferrer"},e.externalValueUrl)):r.createElement(nh,{value:n,mimeType:t})}const ah=xn.div`
2022-02-04 13:00:46 +03:00
padding: 0.9em;
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>Rt(.6,e.rightPanel.backgroundColor)};
2022-02-04 13:00:46 +03:00
margin: 0 0 10px 0;
display: block;
font-family: ${({theme:e})=>e.typography.headings.fontFamily};
font-size: 0.929em;
line-height: 1.5em;
2023-08-17 17:09:11 +03:00
`,sh=xn.span`
2022-02-04 13:00:46 +03:00
font-family: ${({theme:e})=>e.typography.headings.fontFamily};
font-size: 12px;
position: absolute;
z-index: 1;
top: -11px;
left: 12px;
font-weight: ${({theme:e})=>e.typography.fontWeightBold};
2023-08-17 17:09:11 +03:00
color: ${({theme:e})=>Rt(.3,e.rightPanel.textColor)};
`,lh=xn.div`
2022-02-04 13:00:46 +03:00
position: relative;
2023-08-17 17:09:11 +03:00
`,ch=xn(hf)`
label {
color: ${({theme:e})=>e.rightPanel.textColor};
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
2022-02-04 13:00:46 +03:00
font-size: 1em;
text-transform: none;
border: none;
}
margin: 0 0 10px 0;
display: block;
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>Rt(.6,e.rightPanel.backgroundColor)};
border: none;
padding: 0.9em 1.6em 0.9em 0.9em;
box-shadow: none;
&:hover,
&:focus-within {
2022-02-04 13:00:46 +03:00
border: none;
box-shadow: none;
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>Rt(.3,e.rightPanel.backgroundColor)};
2022-02-04 13:00:46 +03:00
}
2023-08-17 17:09:11 +03:00
`,uh=xn.div`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: 12px;
color: #ee807f;
2023-08-17 17:09:11 +03:00
`;class ph extends r.Component{constructor(){super(...arguments),this.state={activeIdx:0},this.switchMedia=({idx:e})=>{void 0!==e&&this.setState({activeIdx:e})}}render(){const{activeIdx:e}=this.state,t=this.props.mediaType.examples||{},n=this.props.mediaType.name,o=r.createElement(uh,null,"No sample"),i=Object.keys(t);if(0===i.length)return o;if(i.length>1){const o=i.map(((e,n)=>({value:t[e].summary||e,idx:n}))),a=t[i[e]],s=a.description;return r.createElement(dh,null,r.createElement(lh,null,r.createElement(sh,null,"Example"),this.props.renderDropdown({value:o[e].value,options:o,onChange:this.switchMedia,ariaLabel:"Example"})),r.createElement("div",null,s&&r.createElement(Nf,{source:s}),r.createElement(oh,{example:a,mimeType:n})))}{const e=t[i[0]];return r.createElement(dh,null,e.description&&r.createElement(Nf,{source:e.description}),r.createElement(oh,{example:e,mimeType:n}))}}}const dh=xn.div`
2022-02-04 13:00:46 +03:00
margin-top: 15px;
2023-08-17 17:09:11 +03:00
`;if(!r.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Pi)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function fh(e){e()}var hh=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},mh=[];function gh(e){return pi(ga(e,t));var t}var yh="undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry;function bh(e){return{reaction:e,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+vh}}var vh=1e4,xh=yh?function(e){var t=new Map,n=1,r=new e((function(e){var n=t.get(e);n&&(n.reaction.dispose(),t.delete(e))}));return{addReactionToTrack:function(e,o,i){var a=n++;return r.register(i,a,e),e.current=bh(o),e.current.finalizationRegistryCleanupToken=a,t.set(a,e.current),e.current},recordReactionAsCommitted:function(e){r.unregister(e),e.current&&e.current.finalizationRegistryCleanupToken&&t.delete(e.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}(yh):function(){var e,t=new Set;function n(){void 0===e&&(e=setTimeout(r,1e4))}function r(){e=void 0;var r=Date.now();t.forEach((function(e){var n=e.current;n&&r>=n.cleanAt&&(n.reaction.dispose(),e.current=null,t.delete(e))})),t.size>0&&n()}return{addReactionToTrack:function(e,r,o){var i;return e.current=bh(r),i=e,t.add(i),n(),e.current},recordReactionAsCommitted:function(e){t.delete(e)},forceCleanupTimerToRunNowForTests:function(){e&&(clearTimeout(e),r())},resetCleanupScheduleForTests:function(){var n,r;if(t.size>0){try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),i=o.next();!i.done;i=o.next()){var a=i.value,s=a.current;s&&(s.reaction.dispose(),a.current=null)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}t.clear()}e&&(clearTimeout(e),e=void 0)}}}(),wh=xh.addReactionToTrack,kh=xh.recordReactionAsCommitted,Oh=(xh.resetCleanupScheduleForTests,xh.forceCleanupTimerToRunNowForTests,!1);function Sh(){return Oh}var Eh=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function _h(e){return"observer"+e}var jh=function(){};function Ah(e,t){if(void 0===t&&(t="observed"),Sh())return e();var n,o=Eh(r.useState(new jh),1)[0],i=(n=hh((0,r.useState)(0),2)[1],(0,r.useCallback)((function(){n((function(e){return e+1}))}),mh)),a=r.useRef(null);if(!a.current)var s=new Bo(_h(t),(function(){l.mounted?i():l.changedBeforeMount=!0})),l=wh(a,s,o);var c,u,p=a.current.reaction;if(r.useDebugValue(p,gh),r.useEffect((function(){return kh(a),a.current?(a.current.mounted=!0,a.current.changedBeforeMount&&(a.current.changedBeforeMount=!1,i())):(a.current={reaction:new Bo(_h(t),(function(){i()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},i()),function(){a.current.reaction.dispose(),a.current=null}}),[]),p.track((function(){try{c=e()}catch(e){u=e}})),u)throw u;return c}var Ph=function(){return Ph=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ph.apply(this,arguments)};var Ch={$$typeof:!0,render:!0,compare:!0,type:!0};function Th(e){var t=e.children,n=e.render,r=t||n;return"function"!=typeof r?null:Ah(r)}Th.displayName="Observer",function(e){e||(e=fh),ui({reactionScheduler:e})}(o.unstable_batchedUpdates);var Ih=0,Rh={};function Nh(e){return Rh[e]||(Rh[e]=function(e){if("function"==typeof
2022-02-04 13:00:46 +03:00
button {
background-color: transparent;
border: 0;
outline: 0;
font-size: 13px;
font-family: ${e=>e.theme.typography.code.fontFamily};
cursor: pointer;
padding: 0;
color: ${e=>e.theme.colors.text.primary};
&:focus {
font-weight: ${({theme:e})=>e.typography.fontWeightBold};
}
2023-08-17 17:09:11 +03:00
${({kind:e})=>"patternProperties"===e&&mn`
display: inline-flex;
margin-right: 20px;
> span.property-name {
white-space: break-spaces;
text-align: left;
::before,
::after {
content: '/';
filter: opacity(0.2);
}
}
> svg {
align-self: center;
}
`}
2022-02-04 13:00:46 +03:00
}
2023-08-17 17:09:11 +03:00
${Tp} {
2022-02-04 13:00:46 +03:00
height: ${({theme:e})=>e.schema.arrow.size};
width: ${({theme:e})=>e.schema.arrow.size};
polygon {
fill: ${({theme:e})=>e.schema.arrow.color};
}
}
2023-08-17 17:09:11 +03:00
`,im=xn.span`
2022-02-04 13:00:46 +03:00
vertical-align: middle;
font-size: ${({theme:e})=>e.typography.code.fontSize};
line-height: 20px;
2023-08-17 17:09:11 +03:00
`,am=xn(im)`
color: ${e=>Rt(.1,e.theme.schema.typeNameColor)};
`,sm=xn(im)`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.typeNameColor};
2023-08-17 17:09:11 +03:00
`,lm=xn(im)`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.typeTitleColor};
word-break: break-word;
2023-08-17 17:09:11 +03:00
`,cm=sm,um=xn(im).attrs({as:"div"})`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.requireLabelColor};
font-size: ${e=>e.theme.schema.labelsTextSize};
font-weight: normal;
margin-left: 20px;
line-height: 1;
2023-08-17 17:09:11 +03:00
`,pm=xn(um)`
color: ${e=>e.theme.colors.primary.light};
2023-08-17 17:09:11 +03:00
`,dm=xn(im)`
2022-02-04 13:00:46 +03:00
color: ${({theme:e})=>e.colors.warning.main};
font-size: 13px;
2023-08-17 17:09:11 +03:00
`,fm=xn(im)`
2022-02-04 13:00:46 +03:00
color: #0e7c86;
&::before,
&::after {
font-weight: bold;
}
2023-08-17 17:09:11 +03:00
`,hm=xn(im)`
2022-02-04 13:00:46 +03:00
border-radius: 2px;
word-break: break-word;
2023-08-17 17:09:11 +03:00
${({theme:e})=>`\n background-color: ${Rt(.95,e.colors.text.primary)};\n color: ${Rt(.1,e.colors.text.primary)};\n\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${Rt(.9,e.colors.text.primary)};\n font-family: ${e.typography.code.fontFamily};\n}`};
2022-02-04 13:00:46 +03:00
& + & {
margin-left: 0;
}
2023-08-17 17:09:11 +03:00
${wn("ExampleValue")};
`,mm=xn(hm)``,gm=xn(im)`
2022-02-04 13:00:46 +03:00
border-radius: 2px;
2023-08-17 17:09:11 +03:00
${({theme:e})=>`\n background-color: ${Rt(.95,e.colors.primary.light)};\n color: ${Rt(.1,e.colors.primary.main)};\n\n margin: 0 ${e.spacing.unit}px;\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${Rt(.9,e.colors.primary.main)};\n}`};
2022-02-04 13:00:46 +03:00
& + & {
margin-left: 0;
}
2023-08-17 17:09:11 +03:00
${wn("ConstraintItem")};
`,ym=xn.button`
2022-02-04 13:00:46 +03:00
background-color: transparent;
border: 0;
color: ${({theme:e})=>e.colors.text.secondary};
margin-left: ${({theme:e})=>e.spacing.unit}px;
border-radius: 2px;
cursor: pointer;
outline-color: ${({theme:e})=>e.colors.text.secondary};
font-size: 12px;
2023-08-17 17:09:11 +03:00
`;Object.defineProperty,Object.getOwnPropertyDescriptor;const bm=xn.div`
${Ef};
2022-02-04 13:00:46 +03:00
${({compact:e})=>e?"":"margin: 1em 0"}
2023-08-17 17:09:11 +03:00
`;let vm=class extends r.Component{render(){const{externalDocs:e}=this.props;return e&&e.url?r.createElement(bm,{compact:this.props.compact},r.createElement("a",{href:e.url},e.description||e.url)):null}};vm=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],vm);class xm extends r.PureComponent{constructor(){super(...arguments),this.state={collapsed:!0}}toggle(){this.setState({collapsed:!this.state.collapsed})}render(){const{values:e,isArrayType:t}=this.props,{collapsed:n}=this.state,{enumSkipQuotes:o,maxDisplayedEnumValues:i}=this.context;if(!e.length)return null;const a=this.state.collapsed&&i?e.slice(0,i):e,s=!!i&&e.length>i,l=i?n?` ${e.length-i} more`:"Hide":"";return r.createElement("div",null,r.createElement(im,null,t?en("enumArray"):""," ",1===e.length?en("enumSingleValue"):en("enum"),":")," ",a.map(((e,t)=>{const n=o?String(e):JSON.stringify(e);return r.createElement(r.Fragment,{key:t},r.createElement(hm,null,n)," ")})),s?r.createElement(wm,{onClick:()=>{this.toggle()}},l):null)}}xm.contextType=Pn;const wm=xn.span`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.primary.main};
vertical-align: middle;
font-size: 13px;
line-height: 20px;
padding: 0 5px;
cursor: pointer;
2023-08-17 17:09:11 +03:00
`,km=xn(_f)`
2022-02-04 13:00:46 +03:00
margin: 2px 0;
2023-08-17 17:09:11 +03:00
`;class Om extends r.PureComponent{render(){const e=this.props.extensions;return r.createElement(Pn.Consumer,null,(t=>r.createElement(r.Fragment,null,t.showExtensions&&Object.keys(e).map((t=>r.createElement(km,{key:t},r.createElement(im,null," ",t.substring(2),": ")," ",r.createElement(mm,null,"string"==typeof e[t]?e[t]:JSON.stringify(e[t]))))))))}}function Sm({field:e}){return e.examples?r.createElement(r.Fragment,null,r.createElement(im,null," ",en("examples"),": "),Kt(e.examples)?e.examples.map(((t,n)=>{const o=rs(e,t),i=e.in?String(o):JSON.stringify(o);return r.createElement(r.Fragment,{key:n},r.createElement(hm,null,i)," ")})):r.createElement(Em,null,Object.values(e.examples).map(((t,n)=>r.createElement("li",{key:n+t.value},r.createElement(hm,null,rs(e,t.value))," -"," ",t.summary||t.description))))):null}const Em=xn.ul`
2022-02-04 13:00:46 +03:00
margin-top: 1em;
list-style-position: outside;
2023-08-17 17:09:11 +03:00
`;class _m extends r.PureComponent{render(){return 0===this.props.constraints.length?null:r.createElement("span",null," ",this.props.constraints.map((e=>r.createElement(gm,{key:e}," ",e," "))))}}const jm=r.memo((function({value:e,label:t,raw:n}){if(void 0===e)return null;const o=n?String(e):JSON.stringify(e);return r.createElement("div",null,r.createElement(im,null," ",t," ")," ",r.createElement(hm,null,o))})),Am=45;function Pm(e){const t=e.schema.pattern,{hideSchemaPattern:n}=r.useContext(Pn),[o,i]=r.useState(!1),a=r.useCallback((()=>i(!o)),[o]);return!t||n?null:r.createElement(r.Fragment,null,r.createElement(fm,null,o||t.length<Am?t:`${t.substr(0,Am)}...`),t.length>Am&&r.createElement(ym,{onClick:a},o?"Hide pattern":"Show pattern"))}function Cm({schema:e}){const{hideSchemaPattern:t}=r.useContext(Pn);return e&&("string"!==e.type||e.constraints.length)&&((null==e?void 0:e.pattern)&&!t||e.items||e.displayFormat||e.constraints.length)?r.createElement(Tm,null,"[ items",e.displayFormat&&r.createElement(cm,null," <",e.displayFormat," >"),r.createElement(_m,{constraints:e.constraints}),r.createElement(Pm,{schema:e}),e.items&&r.createElement(Cm,{schema:e.items})," ]"):null}const Tm=xn(am)`
2022-02-04 13:00:46 +03:00
margin: 0 5px;
vertical-align: text-top;
2023-08-17 17:09:11 +03:00
`;var Im=Object.defineProperty,Rm=Object.getOwnPropertySymbols,Nm=Object.prototype.hasOwnProperty,$m=Object.prototype.propertyIsEnumerable,Lm=(e,t,n)=>t in e?Im(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dm=(e,t)=>{for(var n in t||(t={}))Nm.call(t,n)&&Lm(e,n,t[n]);if(Rm)for(var n of Rm(t))$m.call(t,n)&&Lm(e,n,t[n]);return e};const Mm=rm((e=>{const{enumSkipQuotes:t,hideSchemaTitles:n}=r.useContext(Pn),{showExamples:o,field:i,renderDiscriminatorSwitch:a}=e,{schema:s,description:l,deprecated:c,extensions:u,in:p,const:d}=i,f="array"===s.type,h=t||"header"===p,m=r.useMemo((()=>!o||void 0===i.example&&void 0===i.examples?null:void 0!==i.examples?r.createElement(Sm,{field:i}):r.createElement(jm,{label:en("example")+":",value:rs(i,i.example),raw:Boolean(i.in)})),[i,o]),g=Ht(s.default)?rs(i,s.default).replace(`${i.name}=`,""):s.default;return r.createElement("div",null,r.createElement("div",null,r.createElement(am,null,s.typePrefix),r.createElement(sm,null,s.displayType),s.displayFormat&&r.createElement(cm,null," ","<",s.displayFormat,">"," "),s.contentEncoding&&r.createElement(cm,null," ","<",s.contentEncoding,">"," "),s.contentMediaType&&r.createElement(cm,null," ","<",s.contentMediaType,">"," "),s.title&&!n&&r.createElement(lm,null," (",s.title,") "),r.createElement(_m,{constraints:s.constraints}),r.createElement(Pm,{schema:s}),s.isCircular&&r.createElement(dm,null," ",en("recursive")," "),f&&s.items&&r.createElement(Cm,{schema:s.items})),c&&r.createElement("div",null,r.createElement(Ip,{type:"warning"}," ",en("deprecated")," ")),r.createElement(jm,{raw:h,label:en("default")+":",value:g}),!a&&r.createElement(xm,{isArrayType:f,values:s.enum})," ",m,r.createElement(Om,{extensions:Dm(Dm({},u),s.extensions)}),r.createElement("div",null,r.createElement(Nf,{compact:!0,source:l})),s.externalDocs&&r.createElement(vm,{externalDocs:s.externalDocs,compact:!0}),a&&a(e)||null,d&&r.createElement(jm,{label:en("const")+":",value:d})||null)})),Fm=r.memo(Mm);var zm=Object.defineProperty,Um=(Object.getOwnPropertyDescriptor,Object.getOwnPropertySymbols),Bm=Object.prototype.hasOwnProperty,qm=Object.prototype.propertyIsEnumerable,Wm=(e,t,n)=>t in e?zm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Vm=class extends r.Component{constructor(){super(...arguments),this.toggle=()=>{void 0===this.props.field.expanded&&this.props.expandByDefault?this.props.field.collapse():this.props.field.toggle()},this.handleKeyPress=e=>{"Enter"===e.key&&(e.preventDefault(),this.toggle())}}render(){const{className:e="",field:t,isLast:n,expandByDefault:o}=this.props,{name:i,deprecated:a,required:s,kind:l}=t,c=!t.schema.isPrimitive&&!t.schema.isCircular,u=void 0===t.expanded?o:t.expanded,p=r.createElement(r.Fragment,null,"additionalProperties"===l&&r.createElement(pm,null,"additional property"),"patternProperties"===l&&r.createElement(pm,null,"pattern property"),s&&r.createElement(um,null,"required")),d=c?r.createElement(om,{className:a?"deprecated":"",kind:l,title:i},r.createElement(Fp,null),r.createElement("button",{onClick:this.toggle,onKeyPress:this.handleKeyPress,"aria-label":`expand ${i}`},r.createElement("span",{className:"property-name"},i),r.createElement(Tp,{direction:u?"down":"right"})),p):r.createElement(Dp,{className:a?"deprecated":void 0,kind:l,title:i},r.createElement(Fp,null),r.createElement("span",{className:"property-name"},i),p);return r.createElement(r.Fragment,null,r.createElement("tr",{className:n?"last "+e:e},d,r.createElement(Mp,null,r.createElement(Fm,((e,t)=>{for(var n in t||(t={}))Bm.call(t,n)&&Wm(e,n,t[n]);if(Um)for(var n of Um(t))qm.call(t,n)&&Wm(e,n,t[n]);return e})({},this.props)))),u&&c&&r.createElement("tr",{key:t.name+"inner"},r.createElement(Lp,{colSpan:2},r.createElement(zp,null,r.createElement(_g,{schema:t.schema,skipReadOnly:this.props.skipReadOnly,skipWriteOnly:this.props.skipWriteOnly,showTitle:this.props.showTitle,level:this.props.level})))))}};Vm=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Vm);Object.defineProperty,Object.getOwnPropertyDescriptor;
2022-02-04 13:00:46 +03:00
padding-left: ${({theme:e})=>2*e.spacing.unit}px;
2023-08-17 17:09:11 +03:00
`;class og extends r.PureComponent{render(){const e=this.props.schema,t=e.items,n=void 0===e.minItems&&void 0===e.maxItems?"":`(${ls(e)})`;return e.fields?r.createElement(Ym,ng(tg({},this.props),{level:this.props.level})):!e.displayType||t||n.length?r.createElement("div",null,r.createElement(Vp,null," Array ",n),r.createElement(rg,null,r.createElement(_g,ng(tg({},this.props),{schema:t}))),r.createElement(Hp,null)):r.createElement("div",null,r.createElement(sm,null,e.displayType))}}var ig=Object.defineProperty,ag=Object.defineProperties,sg=Object.getOwnPropertyDescriptor,lg=Object.getOwnPropertyDescriptors,cg=Object.getOwnPropertySymbols,ug=Object.prototype.hasOwnProperty,pg=Object.prototype.propertyIsEnumerable,dg=(e,t,n)=>t in e?ig(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fg=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?sg(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&ig(t,n,i),i};let hg=class extends r.Component{constructor(){super(...arguments),this.activateOneOf=()=>{this.props.schema.activateOneOf(this.props.idx)}}render(){const{idx:e,schema:t,subSchema:n}=this.props;return r.createElement(Wp,{deprecated:n.deprecated,active:e===t.activeOneOf,onClick:this.activateOneOf},n.title||n.typePrefix+n.displayType)}};hg=fg([rm],hg);let mg=class extends r.Component{render(){const{schema:{oneOf:e},schema:t}=this.props;if(void 0===e)return null;const n=e[t.activeOneOf];return r.createElement("div",null,r.createElement(qp,null," ",t.oneOfType," "),r.createElement(Bp,null,e.map(((e,n)=>r.createElement(hg,{key:e.pointer,schema:t,subSchema:e,idx:n})))),r.createElement("div",null,e[t.activeOneOf].deprecated&&r.createElement(Ip,{type:"warning"},"Deprecated")),r.createElement(_m,{constraints:n.constraints}),r.createElement(_g,((e,t)=>ag(e,lg(t)))(((e,t)=>{for(var n in t||(t={}))ug.call(t,n)&&dg(e,n,t[n]);if(cg)for(var n of cg(t))pg.call(t,n)&&dg(e,n,t[n]);return e})({},this.props),{schema:n})))}};mg=fg([rm],mg);const gg=rm((({schema:e})=>r.createElement("div",null,r.createElement(sm,null,e.displayType),e.title&&r.createElement(lm,null," ",e.title," "),r.createElement(dm,null," ",en("recursive")," "))));var yg=Object.defineProperty,bg=Object.defineProperties,vg=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),xg=Object.getOwnPropertySymbols,wg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable,Og=(e,t,n)=>t in e?yg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sg=(e,t)=>{for(var n in t||(t={}))wg.call(t,n)&&Og(e,n,t[n]);if(xg)for(var n of xg(t))kg.call(t,n)&&Og(e,n,t[n]);return e},Eg=(e,t)=>bg(e,vg(t));let _g=class extends r.Component{render(){var e;const t=this.props,{schema:n}=t,o=((e,t)=>{var n={};for(var r in e)wg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&xg)for(var r of xg(e))t.indexOf(r)<0&&kg.call(e,r)&&(n[r]=e[r]);return n})(t,["schema"]),i=(o.level||0)+1;if(!n)return r.createElement("em",null," Schema not provided ");const{type:a,oneOf:s,discriminatorProp:l,isCircular:c}=n;if(c)return r.createElement(gg,{schema:n});if(void 0!==l){if(!s||!s.length)return console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${n.title}`),null;const e=s[n.activeOneOf];return e.isCircular?r.createElement(gg,{schema:e}):r.createElement(Ym,Eg(Sg({},o),{level:i,schema:e,discriminator:{fieldName:l,parentSchema:n}}))}if(void 0!==s)return r.createElement(mg,Sg({schema:n},o));const u=Kt(a)?a:[a];if(u.includes("object")){if(null==(e=n.fields)?void 0:e.length)return r.createElement(Ym,Eg(Sg({},this.props),{level:i}))}else if(u.includes("array"))return r.createElement(og,Eg(Sg({},this.props),{level:i}));const p={schema:n,name:"",required:!1,description:n.description,externalDocs:n.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1};return r.createElement("div",null,r.createElement(Fm,{field:p}))}};_g=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],_g);var jg=Object.defineProperty,Ag=Object.defineProperties,Pg=Object.getOwnPropertyDescriptors,Cg=Object
2022-02-04 13:00:46 +03:00
background: ${({theme:e})=>e.codeBlock.backgroundColor};
& > div,
& > pre {
padding: ${e=>4*e.theme.spacing.unit}px;
margin: 0;
}
& > div > pre {
padding: 0;
}
2023-08-17 17:09:11 +03:00
`,Lg=(ze.div`
background-color: #e4e7eb;
2023-08-17 17:09:11 +03:00
`,ze.ul`
display: inline;
list-style: none;
padding: 0;
li {
display: inherit;
&:after {
content: ',';
}
&:last-child:after {
content: none;
}
}
2023-08-17 17:09:11 +03:00
`,ze.code`
font-size: ${e=>e.theme.typography.code.fontSize};
font-family: ${e=>e.theme.typography.code.fontFamily};
margin: 0 3px;
padding: 0.2em;
display: inline-block;
line-height: 1;
&:after {
content: ',';
font-weight: normal;
}
&:last-child:after {
content: none;
}
2023-08-17 17:09:11 +03:00
`),Dg=ze.span`
&:after {
content: ' and ';
font-weight: normal;
}
&:last-child:after {
content: none;
}
2023-08-17 17:09:11 +03:00
${Ef};
`,Mg=ze.span`
${e=>!e.expanded&&"white-space: nowrap;"}
&:after {
content: ' or ';
${e=>e.expanded&&"content: ' or \\a';"}
white-space: pre;
}
&:last-child:after,
&:only-child:after {
content: none;
}
2023-08-17 17:09:11 +03:00
${Ef};
`,Fg=ze.div`
flex: 1 1 auto;
cursor: pointer;
2023-08-17 17:09:11 +03:00
`,zg=ze.div`
width: ${e=>e.theme.schema.defaultDetailsWidth};
text-overflow: ellipsis;
border-radius: 4px;
overflow: hidden;
${e=>e.expanded&&`background: ${e.theme.colors.gray[100]};\n padding: 8px 9.6px;\n margin: 20px 0;\n width: 100%;\n `};
2023-08-17 17:09:11 +03:00
${vn("small")`
margin-top: 10px;
`}
2023-08-17 17:09:11 +03:00
`,Ug=ze(kp)`
display: inline-block;
margin: 0;
2023-08-17 17:09:11 +03:00
`,Bg=ze.div`
width: 100%;
display: flex;
margin: 1em 0;
flex-direction: ${e=>e.expanded?"column":"row"};
2023-08-17 17:09:11 +03:00
${vn("small")`
flex-direction: column;
`}
2023-08-17 17:09:11 +03:00
`,qg=ze.div`
margin: 0.5em 0;
2023-08-17 17:09:11 +03:00
`,Wg=ze.div`
border-bottom: 1px solid ${({theme:e})=>e.colors.border.dark};
margin-bottom: 1.5em;
padding-bottom: 0.7em;
h5 {
line-height: 1em;
margin: 0 0 0.6em;
font-size: ${({theme:e})=>e.typography.fontSize};
}
.redoc-markdown p:first-child {
display: inline;
}
2023-08-17 17:09:11 +03:00
`;function Vg({children:e,height:t}){const n=r.createRef(),[o,i]=r.useState(!1),[a,s]=r.useState(!1);return r.useEffect((()=>{n.current&&n.current.clientHeight+20<n.current.scrollHeight&&s(!0)}),[n]),r.createElement(r.Fragment,null,r.createElement(Hg,{ref:n,className:o?"":"container",style:{height:o?"auto":t}},e),r.createElement(Yg,{dimmed:!o},a&&r.createElement(Qg,{onClick:()=>{i(!o)}},o?"See less":"See more")))}const Hg=ze.div`
overflow-y: hidden;
2023-08-17 17:09:11 +03:00
`,Yg=ze.div`
text-align: center;
line-height: 1.5em;
${({dimmed:e})=>e&&"background-image: linear-gradient(to bottom, transparent,rgb(255 255 255));\n position: relative;\n top: -0.5em;\n padding-top: 0.5em;\n background-position-y: -1em;\n "}
2023-08-17 17:09:11 +03:00
`,Qg=ze.a`
cursor: pointer;
2023-08-17 17:09:11 +03:00
`,Gg=r.memo((function(e){const{type:t,flow:n,RequiredScopes:o}=e,i=Object.keys((null==n?void 0:n.scopes)||{});return r.createElement(r.Fragment,null,r.createElement(qg,null,r.createElement("b",null,"Flow type: "),r.createElement("code",null,t," ")),("implicit"===t||"authorizationCode"===t)&&r.createElement(qg,null,r.createElement("strong",null," Authorization URL: "),r.createElement("code",null,r.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:n.authorizationUrl},n.authorizationUrl))),("password"===t||"clientCredentials"===t||"authorizationCode"===t)&&r.createElement(qg,null,r.createElement("b",null," Token URL: "),r.createElement("code",null,n.tokenUrl)),n.refreshUrl&&r.createElement(qg,null,r.createElement("strong",null," Refresh URL: "),n.refreshUrl),!!i.length&&r.createElement(r.Fragment,null,o||null,r.createElement(qg,null,r.createElement("b",null," Scopes: ")),r.createElement(Vg,{height:"4em"},r.createElement("ul",null,i.map((e=>r.createElement("li",{key:e},r.createElement("code",null,e)," -"," ",r.createElement(Nf,{className:"redoc-markdown",inline:!0,source:n.scopes[e]||""}))))))))}));function Xg(e){const{RequiredScopes:t,scheme:n}=e;return r.createElement(_f,null,n.apiKey?r.createElement(r.Fragment,null,r.createElement(qg,null,r.createElement("b",null,(o=n.apiKey.in||"").charAt(0).toUpperCase()+o.slice(1)," parameter name: "),r.createElement("code",null,n.apiKey.name)),t):n.http?r.createElement(r.Fragment,null,r.createElement(qg,null,r.createElement("b",null,"HTTP Authorization Scheme: "),r.createElement("code",null,n.http.scheme)),r.createElement(qg,null,"bearer"===n.http.scheme&&n.http.bearerFormat&&r.createElement(r.Fragment,null,r.createElement("b",null,"Bearer format: "),r.createElement("code",null,n.http.bearerFormat))),t):n.openId?r.createElement(r.Fragment,null,r.createElement(qg,null,r.createElement("b",null,"Connect URL: "),r.createElement("code",null,r.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:n.openId.connectUrl},n.openId.connectUrl))),t):n.flows?Object.keys(n.flows).map((e=>r.createElement(Gg,{key:e,type:e,RequiredScopes:t,flow:n.flows[e]}))):null);var o}const Kg={oauth2:"OAuth2",apiKey:"API Key",http:"HTTP",openIdConnect:"OpenID Connect"};class Zg extends r.PureComponent{render(){return this.props.securitySchemes.schemes.map((e=>r.createElement(fp,{id:e.sectionId,key:e.id},r.createElement(gp,null,r.createElement(dp,null,r.createElement(xp,null,r.createElement(Pp,{to:e.sectionId}),e.displayName),r.createElement(Nf,{source:e.description||""}),r.createElement(Wg,null,r.createElement(qg,null,r.createElement("b",null,"Security Scheme Type: "),r.createElement("span",null,Kg[e.type]||e.type)),r.createElement(Xg,{scheme:e})))))))}}class Jg{constructor(e,t,n={},r=!0){var o,i,a,s;this.marker=new Ls,this.disposer=null,this.rawOptions=n,this.options=new fn(n,ey),this.scroll=new up(this.options),ap.updateOnHistory(Ns.currentId,this.scroll),this.spec=new Uu(e,t,this.options),this.menu=new ap(this.spec,this.scroll,Ns),this.options.disableSearch||(this.search=new pp,r&&this.search.indexItems(this.menu.items),this.disposer=(o=this.menu,i="activeItemIdx",Hn(a=e=>{this.updateMarkOnMenu(e.newValue)})?function(e,t,n,r){return ya(e,t).observe_(n,r)}(o,i,a,s):function(e,t,n){return ya(e).observe_(t,n)}(o,i,a)))}static fromJS(e){const t=new Jg(e.spec.data,e.spec.url,e.options,!1);return t.menu.activeItemIdx=e.menu.activeItemIdx||0,t.menu.activate(t.menu.flatItems[t.menu.activeItemIdx]),t.options.disableSearch||t.search.load(e.searchIndex),t}onDidMount(){this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx)}dispose(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),null!=this.disposer&&this.disposer()}toJS(){return e=this,t=null,n=function*(){return{menu:{activeItemIdx:this.menu.activeItemIdx},spec:{url:this.spec.parser.specUrl,data:this.spec.parser.spec},searchIndex:this.search?yield this.search.toJS():void 0,options:this.rawOptions}},new Promise(((r,o)=>{var i=e=>{try{s(n.next(e))}catch(e){o(e)}},a=e=>{try{s(n.throw(e))}catch(e){o
2022-02-04 13:00:46 +03:00
margin-top: 0;
margin-bottom: 0.5em;
2023-08-17 17:09:11 +03:00
${wn("ApiHeader")};
`,ny=xn.a`
2022-02-04 13:00:46 +03:00
border: 1px solid ${e=>e.theme.colors.primary.main};
color: ${e=>e.theme.colors.primary.main};
font-weight: normal;
margin-left: 0.5em;
padding: 4px 8px 4px;
display: inline-block;
text-decoration: none;
cursor: pointer;
2023-08-17 17:09:11 +03:00
${wn("DownloadButton")};
`,ry=xn.span`
2022-02-04 13:00:46 +03:00
&::before {
content: '|';
display: inline-block;
opacity: 0.5;
width: ${15}px;
text-align: center;
}
&:last-child::after {
display: none;
}
2023-08-17 17:09:11 +03:00
`,oy=xn.div`
2022-02-04 13:00:46 +03:00
overflow: hidden;
2023-08-17 17:09:11 +03:00
`,iy=xn.div`
2022-02-04 13:00:46 +03:00
display: flex;
flex-wrap: wrap;
// hide separator on new lines: idea from https://stackoverflow.com/a/31732902/1749888
margin-left: -${15}px;
2023-08-17 17:09:11 +03:00
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let ay=class extends r.Component{constructor(){super(...arguments),this.handleDownloadClick=e=>{e.target.href||(e.target.href=this.props.store.spec.info.downloadLink)}}render(){const{store:e}=this.props,{info:t,externalDocs:n}=e.spec,o=e.options.hideDownloadButton,i=t.downloadFileName,a=t.downloadLink,s=t.license&&r.createElement(ry,null,"License:"," ",t.license.identifier?t.license.identifier:r.createElement("a",{href:t.license.url},t.license.name))||null,l=t.contact&&t.contact.url&&r.createElement(ry,null,"URL: ",r.createElement("a",{href:t.contact.url},t.contact.url))||null,c=t.contact&&t.contact.email&&r.createElement(ry,null,t.contact.name||"E-mail",":"," ",r.createElement("a",{href:"mailto:"+t.contact.email},t.contact.email))||null,u=t.termsOfService&&r.createElement(ry,null,r.createElement("a",{href:t.termsOfService},"Terms of Service"))||null,p=t.version&&r.createElement("span",null,"(",t.version,")")||null;return r.createElement(fp,null,r.createElement(gp,null,r.createElement(dp,{className:"api-info"},r.createElement(ty,null,t.title," ",p),!o&&r.createElement("p",null,en("downloadSpecification"),":",r.createElement(ny,{download:i||!0,target:"_blank",href:a,onClick:this.handleDownloadClick},en("download"))),r.createElement(_f,null,(t.license||t.contact||t.termsOfService)&&r.createElement(oy,null,r.createElement(iy,null,c," ",l," ",s," ",u))||null),r.createElement(Nf,{source:e.spec.info.summary,"data-role":"redoc-summary"}),r.createElement(Nf,{source:e.spec.info.description,"data-role":"redoc-description"}),n&&r.createElement(vm,{externalDocs:n}))))}};ay=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],ay);const sy=xn.img`
2022-02-04 13:00:46 +03:00
max-height: ${e=>e.theme.logo.maxHeight};
max-width: ${e=>e.theme.logo.maxWidth};
padding: ${e=>e.theme.logo.gutter};
width: 100%;
display: block;
2023-08-17 17:09:11 +03:00
`,ly=xn.div`
2022-02-04 13:00:46 +03:00
text-align: center;
2023-08-17 17:09:11 +03:00
`,cy=xn.a`
2022-02-04 13:00:46 +03:00
display: inline-block;
2023-08-17 17:09:11 +03:00
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let uy=class extends r.Component{render(){const{info:e}=this.props,t=e["x-logo"];if(!t||!t.url)return null;const n=t.href||e.contact&&e.contact.url,o=t.altText?t.altText:"logo",i=r.createElement(sy,{src:t.url,alt:o});return r.createElement(ly,{style:{backgroundColor:t.backgroundColor}},n?(a=n,e=>r.createElement(cy,{href:a},e))(i):i);var a}};uy=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],uy);var py=Object.defineProperty,dy=Object.getOwnPropertySymbols,fy=Object.prototype.hasOwnProperty,hy=Object.prototype.propertyIsEnumerable,my=(e,t,n)=>t in e?py(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gy=(e,t)=>{for(var n in t||(t={}))fy.call(t,n)&&my(e,n,t[n]);if(dy)for(var n of dy(t))hy.call(t,n)&&my(e,n,t[n]);return e};class yy extends r.Component{render(){return r.createElement(Tn,null,(e=>r.createElement(Ep,null,(t=>this.renderWithOptionsAndStore(e,t)))))}renderWithOptionsAndStore(e,t){const{source:n,htmlWrap:o=(e=>e)}=this.props;if(!t)throw new Error("When using components in markdown, store prop must be provided");const i=new Tl(e,this.props.parentId).renderMdWithComponents(n);return i.length?i.map(((e,n)=>{if("string"==typeof e)return r.cloneElement(o(r.createElement(Rf,{html:e,inline:!1,compact:!1})),{key:n});const i=e.component;return r.createElement(i,gy({key:n},gy(gy({},e.props),e.propsSelector(t))))})):null}}var by=n(4184),vy=n.n(by);const xy=xn.span.attrs((e=>({className:`operation-type ${e.type}`})))`
2022-02-04 13:00:46 +03:00
width: 9ex;
display: inline-block;
height: ${e=>e.theme.typography.code.fontSize};
line-height: ${e=>e.theme.typography.code.fontSize};
background-color: #333;
border-radius: 3px;
background-repeat: no-repeat;
background-position: 6px 4px;
font-size: 7px;
font-family: Verdana, sans-serif; // web-safe
color: white;
text-transform: uppercase;
text-align: center;
font-weight: bold;
vertical-align: middle;
margin-right: 6px;
margin-top: 2px;
&.get {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.http.get};
2022-02-04 13:00:46 +03:00
}
&.post {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.http.post};
2022-02-04 13:00:46 +03:00
}
&.put {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.http.put};
2022-02-04 13:00:46 +03:00
}
&.options {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.http.options};
2022-02-04 13:00:46 +03:00
}
&.patch {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.http.patch};
2022-02-04 13:00:46 +03:00
}
&.delete {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.http.delete};
2022-02-04 13:00:46 +03:00
}
&.basic {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.http.basic};
2022-02-04 13:00:46 +03:00
}
&.link {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.http.link};
2022-02-04 13:00:46 +03:00
}
&.head {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.http.head};
2022-02-04 13:00:46 +03:00
}
&.hook {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>e.colors.primary.main};
}
&.schema {
background-color: ${({theme:e})=>e.colors.http.basic};
2022-02-04 13:00:46 +03:00
}
2023-08-17 17:09:11 +03:00
`;function wy(e,{theme:t},n){return e>1?t.sidebar.level1Items[n]:1===e?t.sidebar.groupItems[n]:""}const ky=xn.ul`
2022-02-04 13:00:46 +03:00
margin: 0;
padding: 0;
&:first-child {
padding-bottom: 32px;
}
2022-02-04 13:00:46 +03:00
& & {
font-size: 0.929em;
}
${e=>e.expanded?"":"display: none;"};
2023-08-17 17:09:11 +03:00
`,Oy=xn.li`
2022-02-04 13:00:46 +03:00
list-style: none inside none;
overflow: hidden;
text-overflow: ellipsis;
padding: 0;
${e=>0===e.depth?"margin-top: 15px":""};
2023-08-17 17:09:11 +03:00
`,Sy={0:mn`
2022-02-04 13:00:46 +03:00
opacity: 0.7;
text-transform: ${({theme:e})=>e.sidebar.groupItems.textTransform};
font-size: 0.8em;
padding-bottom: 0;
cursor: default;
2023-08-17 17:09:11 +03:00
`,1:mn`
2022-02-04 13:00:46 +03:00
font-size: 0.929em;
text-transform: ${({theme:e})=>e.sidebar.level1Items.textTransform};
2023-08-17 17:09:11 +03:00
`},Ey=xn.label.attrs((e=>({className:vy()("-depth"+e.depth,{active:e.active})})))`
2022-02-04 13:00:46 +03:00
cursor: pointer;
2023-08-17 17:09:11 +03:00
color: ${e=>e.active?wy(e.depth,e,"activeTextColor"):e.theme.sidebar.textColor};
2022-02-04 13:00:46 +03:00
margin: 0;
padding: 12.5px ${e=>4*e.theme.spacing.unit}px;
2023-08-17 17:09:11 +03:00
${({depth:e,type:t,theme:n})=>"section"===t&&e>1&&"padding-left: "+8*n.spacing.unit+"px;"||""}
2022-02-04 13:00:46 +03:00
display: flex;
justify-content: space-between;
font-family: ${e=>e.theme.typography.headings.fontFamily};
${e=>Sy[e.depth]};
2023-08-17 17:09:11 +03:00
background-color: ${e=>e.active?wy(e.depth,e,"activeBackgroundColor"):e.theme.sidebar.backgroundColor};
2022-02-04 13:00:46 +03:00
2023-08-17 17:09:11 +03:00
${e=>e.deprecated&&Rp||""};
2022-02-04 13:00:46 +03:00
&:hover {
2023-08-17 17:09:11 +03:00
color: ${e=>wy(e.depth,e,"activeTextColor")};
background-color: ${e=>wy(e.depth,e,"activeBackgroundColor")};
2022-02-04 13:00:46 +03:00
}
2023-08-17 17:09:11 +03:00
${Tp} {
2022-02-04 13:00:46 +03:00
height: ${({theme:e})=>e.sidebar.arrow.size};
width: ${({theme:e})=>e.sidebar.arrow.size};
polygon {
fill: ${({theme:e})=>e.sidebar.arrow.color};
}
}
2023-08-17 17:09:11 +03:00
`,_y=xn.span`
2022-02-04 13:00:46 +03:00
display: inline-block;
vertical-align: middle;
width: ${e=>e.width?e.width:"auto"};
overflow: hidden;
text-overflow: ellipsis;
2023-08-17 17:09:11 +03:00
`,jy=xn.div`
${({theme:e})=>mn`
font-size: 0.8em;
margin-top: ${2*e.spacing.unit}px;
text-align: center;
position: fixed;
width: ${e.sidebar.width};
bottom: 0;
background: ${e.sidebar.backgroundColor};
a,
a:visited,
a:hover {
color: ${e.sidebar.textColor} !important;
padding: ${e.spacing.unit}px 0;
2023-08-17 17:09:11 +03:00
border-top: 1px solid ${Ot(.1,e.sidebar.backgroundColor)};
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
}
`};
img {
width: 15px;
margin-right: 5px;
}
2023-08-17 17:09:11 +03:00
${vn("small")`
width: 100%;
`};
2023-08-17 17:09:11 +03:00
`,Ay=xn.button`
2022-02-04 13:00:46 +03:00
border: 0;
width: 100%;
text-align: left;
& > * {
vertical-align: middle;
}
2023-08-17 17:09:11 +03:00
${Tp} {
2022-02-04 13:00:46 +03:00
polygon {
2023-08-17 17:09:11 +03:00
fill: ${({theme:e})=>Ot(e.colors.tonalOffset,e.colors.gray[100])};
2022-02-04 13:00:46 +03:00
}
}
2023-08-17 17:09:11 +03:00
`,Py=xn.span`
2022-02-04 13:00:46 +03:00
text-decoration: ${e=>e.deprecated?"line-through":"none"};
margin-right: 8px;
2023-08-17 17:09:11 +03:00
`,Cy=xn(xy)`
2022-02-04 13:00:46 +03:00
margin: 0 5px 0 0;
2023-08-17 17:09:11 +03:00
`,Ty=xn((e=>{const{name:t,opened:n,className:o,onClick:i,httpVerb:a,deprecated:s}=e;return r.createElement(Ay,{className:o,onClick:i||void 0},r.createElement(Cy,{type:a},fs(a)),r.createElement(Tp,{size:"1.5em",direction:n?"down":"right",float:"left"}),r.createElement(Py,{deprecated:s},t),s?r.createElement(Ip,{type:"warning"}," ",en("deprecated")," "):null)}))`
2022-02-04 13:00:46 +03:00
padding: 10px;
border-radius: 2px;
margin-bottom: 4px;
line-height: 1.5em;
background-color: ${({theme:e})=>e.colors.gray[100]};
cursor: pointer;
2023-08-17 17:09:11 +03:00
outline-color: ${({theme:e})=>Ot(e.colors.tonalOffset,e.colors.gray[100])};
`,Iy=xn.div`
2022-02-04 13:00:46 +03:00
padding: 10px 25px;
background-color: ${({theme:e})=>e.colors.gray[50]};
margin-bottom: 5px;
margin-top: 5px;
2023-08-17 17:09:11 +03:00
`;class Ry extends r.PureComponent{constructor(){super(...arguments),this.selectElement=()=>{Bf.selectElement(this.child)}}render(){const{children:e}=this.props;return r.createElement("div",{ref:e=>this.child=e,onClick:this.selectElement,onFocus:this.selectElement,tabIndex:0,role:"button"},e)}}const Ny=xn.div`
2022-02-04 13:00:46 +03:00
cursor: pointer;
position: relative;
margin-bottom: 5px;
2023-08-17 17:09:11 +03:00
`,$y=xn.span`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.code.fontFamily};
margin-left: 10px;
flex: 1;
overflow-x: hidden;
text-overflow: ellipsis;
2023-08-17 17:09:11 +03:00
`,Ly=xn.button`
2022-02-04 13:00:46 +03:00
outline: 0;
color: inherit;
width: 100%;
text-align: left;
cursor: pointer;
padding: 10px 30px 10px ${e=>e.inverted?"10px":"20px"};
border-radius: ${e=>e.inverted?"0":"4px 4px 0 0"};
background-color: ${e=>e.inverted?"transparent":e.theme.codeBlock.backgroundColor};
display: flex;
white-space: nowrap;
align-items: center;
border: ${e=>e.inverted?"0":"1px solid transparent"};
border-bottom: ${e=>e.inverted?"1px solid #ccc":"0"};
transition: border-color 0.25s ease;
${e=>e.expanded&&!e.inverted&&`border-color: ${e.theme.colors.border.dark};`||""}
2023-08-17 17:09:11 +03:00
.${$y} {
2022-02-04 13:00:46 +03:00
color: ${e=>e.inverted?e.theme.colors.text.primary:"#ffffff"};
}
&:focus {
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(128, 128, 128, 0.25);
}
2023-08-17 17:09:11 +03:00
`,Dy=xn.span.attrs((e=>({className:`http-verb ${e.type}`})))`
2022-02-04 13:00:46 +03:00
font-size: ${e=>e.compact?"0.8em":"0.929em"};
line-height: ${e=>e.compact?"18px":"20px"};
background-color: ${e=>e.theme.colors.http[e.type]||"#999999"};
color: #ffffff;
padding: ${e=>e.compact?"2px 8px":"3px 10px"};
text-transform: uppercase;
font-family: ${e=>e.theme.typography.headings.fontFamily};
margin: 0;
2023-08-17 17:09:11 +03:00
`,My=xn.div`
2022-02-04 13:00:46 +03:00
position: absolute;
width: 100%;
z-index: 100;
background: ${e=>e.theme.rightPanel.servers.overlay.backgroundColor};
color: ${e=>e.theme.rightPanel.servers.overlay.textColor};
2022-02-04 13:00:46 +03:00
box-sizing: border-box;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.33);
overflow: hidden;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
transition: all 0.25s ease;
visibility: hidden;
${e=>e.expanded?"visibility: visible;":"transform: translateY(-50%) scaleY(0);"}
2023-08-17 17:09:11 +03:00
`,Fy=xn.div`
2022-02-04 13:00:46 +03:00
padding: 10px;
2023-08-17 17:09:11 +03:00
`,zy=xn.div`
2022-02-04 13:00:46 +03:00
padding: 5px;
border: 1px solid #ccc;
background: ${e=>e.theme.rightPanel.servers.url.backgroundColor};
2022-02-04 13:00:46 +03:00
word-break: break-all;
color: ${e=>e.theme.colors.primary.main};
> span {
color: ${e=>e.theme.colors.text.primary};
}
2023-08-17 17:09:11 +03:00
`;class Uy extends r.Component{constructor(e){super(e),this.toggle=()=>{this.setState({expanded:!this.state.expanded})},this.state={expanded:!1}}render(){const{operation:e,inverted:t,hideHostname:n}=this.props,{expanded:o}=this.state;return r.createElement(Pn.Consumer,null,(i=>r.createElement(Ny,null,r.createElement(Ly,{onClick:this.toggle,expanded:o,inverted:t},r.createElement(Dy,{type:e.httpVerb,compact:this.props.compact},e.httpVerb),r.createElement($y,null,e.path),r.createElement(Tp,{float:"right",color:t?"black":"white",size:"20px",direction:o?"up":"down",style:{marginRight:"-25px"}})),r.createElement(My,{expanded:o,"aria-hidden":!o},e.servers.map((t=>{const o=i.expandDefaultServerVariables?function(e,t={}){return e.replace(/(?:{)([\w-.]+)(?:})/g,((e,n)=>t[n]&&t[n].default||e))}(t.url,t.variables):t.url,a=function(e){try{return Gt(e).pathname}catch(t){return e}}(o);return r.createElement(Fy,{key:o},r.createElement(Nf,{source:t.description||"",compact:!0}),r.createElement(Ry,null,r.createElement(zy,null,r.createElement("span",null,n||i.hideHostname?"/"===a?"":a:o),e.path)))}))))))}}class By extends r.PureComponent{render(){const{place:e,parameters:t}=this.props;return t&&t.length?r.createElement("div",{key:e},r.createElement(kp,null,e," Parameters"),r.createElement(Up,null,r.createElement("tbody",null,Ut(t,((e,t)=>r.createElement(Vm,{key:e.name,isLast:t,field:e,showExamples:!0})))))):null}}Object.defineProperty,Object.getOwnPropertyDescriptor;let qy=class extends r.Component{constructor(){super(...arguments),this.switchMedia=({idx:e})=>{this.props.content&&void 0!==e&&this.props.content.activate(e)}}render(){const{content:e}=this.props;if(!e||!e.mediaTypes||!e.mediaTypes.length)return null;const t=e.activeMimeIdx,n=e.mediaTypes.map(((e,t)=>({value:e.name,idx:t}))),o=({children:e})=>this.props.withLabel?r.createElement(lh,null,r.createElement(sh,null,"Content type"),e):e;return r.createElement(r.Fragment,null,r.createElement(o,null,this.props.renderDropdown({value:n[t].value,options:n,onChange:this.switchMedia,ariaLabel:"Content type"})),this.props.children(e.active))}};qy=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],qy);var Wy=Object.defineProperty,Vy=Object.getOwnPropertySymbols,Hy=Object.prototype.hasOwnProperty,Yy=Object.prototype.propertyIsEnumerable,Qy=(e,t,n)=>t in e?Wy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gy=(e,t)=>{for(var n in t||(t={}))Hy.call(t,n)&&Qy(e,n,t[n]);if(Vy)for(var n of Vy(t))Yy.call(t,n)&&Qy(e,n,t[n]);return e},Xy=(e,t)=>{var n={};for(var r in e)Hy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Vy)for(var r of Vy(e))t.indexOf(r)<0&&Yy.call(e,r)&&(n[r]=e[r]);return n};const Ky=["path","query","cookie","header"];class Zy extends r.PureComponent{orderParams(e){const t={};return e.forEach((e=>{var n,r,o;o=e,(n=t)[r=e.in]||(n[r]=[]),n[r].push(o)})),t}render(){const{body:e,parameters:t=[]}=this.props;if(void 0===e&&void 0===t)return null;const n=this.orderParams(t),o=t.length>0?Ky:[],i=e&&e.content,a=e&&e.description,s=e&&e.required;return r.createElement(r.Fragment,null,o.map((e=>r.createElement(By,{key:e,place:e,parameters:n[e]}))),i&&r.createElement(eb,{content:i,description:a,bodyRequired:s}))}}function Jy(e){var t=e,{bodyRequired:n}=t,o=Xy(t,["bodyRequired"]);const i="boolean"==typeof n&&!!n,a="boolean"==typeof n&&!n;return r.createElement(kp,{key:"header"},"Request Body schema: ",r.createElement(Of,Gy({},o)),i&&r.createElement(nb,null,"required"),a&&r.createElement(rb,null,"optional"))}function eb(e){const{content:t,description:n,bodyRequired:o}=e,{isRequestType:i}=t;return r.createElement(qy,{content:t,renderDropdown:e=>r.createElement(Jy,Gy({bodyRequired:o},e))},(({schema:e})=>r.createElement(r.Fragment,null,void 0!==n&&r.createElement(Nf,{source:n}),"object"===(null==e?void 0:e.type)&&r.createElement(_m,{constraints:(null==e?void 0:e.constraints)||[]}),r.createElement(_g,{skipReadOnly:i,skipWriteOnly:!i,key:"schema",schema:e}))))}const tb="\n text-transform: lowercase;\n margin-left: 0;\n line-height: 1.5em;\n",nb=xn
${tb}
`,rb=xn("div")`
${tb}
color: ${({theme:e})=>e.colors.text.secondary};
font-size: ${e=>e.theme.schema.labelsTextSize};
`,ob=r.memo((function({title:e,type:t,empty:n,code:o,opened:i,className:a,onClick:s}){return r.createElement("button",{className:a,onClick:!n&&s||void 0,"aria-expanded":i,disabled:n},!n&&r.createElement(Tp,{size:"1.5em",color:t,direction:i?"down":"right",float:"left"}),r.createElement(lb,null,o," "),r.createElement(Nf,{compact:!0,inline:!0,source:e}))})),ib=xn(ob)`
2022-02-04 13:00:46 +03:00
display: block;
border: 0;
width: 100%;
text-align: left;
padding: 10px;
border-radius: 2px;
margin-bottom: 4px;
line-height: 1.5em;
cursor: pointer;
color: ${e=>e.theme.colors.responses[e.type].color};
background-color: ${e=>e.theme.colors.responses[e.type].backgroundColor};
&:focus {
outline: auto ${e=>e.theme.colors.responses[e.type].color};
}
${e=>e.empty?'\ncursor: default;\n&::before {\n content: "—";\n font-weight: bold;\n width: 1.5em;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n}\n&:focus {\n outline: 0;\n}\n':""};
2023-08-17 17:09:11 +03:00
`,ab=xn.div`
2022-02-04 13:00:46 +03:00
padding: 10px;
2023-08-17 17:09:11 +03:00
`,sb=xn(kp).attrs({as:"caption"})`
2022-02-04 13:00:46 +03:00
text-align: left;
margin-top: 1em;
caption-side: top;
2023-08-17 17:09:11 +03:00
`,lb=xn.strong`
2022-02-04 13:00:46 +03:00
vertical-align: top;
2023-08-17 17:09:11 +03:00
`;class cb extends r.PureComponent{render(){const{headers:e}=this.props;return void 0===e||0===e.length?null:r.createElement(Up,null,r.createElement(sb,null," Response Headers "),r.createElement("tbody",null,Ut(e,((e,t)=>r.createElement(Vm,{isLast:t,key:e.name,field:e,showExamples:!0})))))}}var ub=Object.defineProperty,pb=Object.getOwnPropertySymbols,db=Object.prototype.hasOwnProperty,fb=Object.prototype.propertyIsEnumerable,hb=(e,t,n)=>t in e?ub(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class mb extends r.PureComponent{constructor(){super(...arguments),this.renderDropdown=e=>r.createElement(kp,{key:"header"},"Response Schema: ",r.createElement(Of,((e,t)=>{for(var n in t||(t={}))db.call(t,n)&&hb(e,n,t[n]);if(pb)for(var n of pb(t))fb.call(t,n)&&hb(e,n,t[n]);return e})({},e)))}render(){const{description:e,extensions:t,headers:n,content:o}=this.props.response;return r.createElement(r.Fragment,null,e&&r.createElement(Nf,{source:e}),r.createElement(Om,{extensions:t}),r.createElement(cb,{headers:n}),r.createElement(qy,{content:o,renderDropdown:this.renderDropdown},(({schema:e})=>r.createElement(r.Fragment,null,"object"===(null==e?void 0:e.type)&&r.createElement(_m,{constraints:(null==e?void 0:e.constraints)||[]}),r.createElement(_g,{skipWriteOnly:!0,key:"schema",schema:e})))))}}const gb=rm((({response:e})=>{const{extensions:t,headers:n,type:o,summary:i,description:a,code:s,expanded:l,content:c}=e,u=r.useMemo((()=>void 0===c?[]:c.mediaTypes.filter((e=>void 0!==e.schema))),[c]),p=r.useMemo((()=>!(t&&0!==Object.keys(t).length||0!==n.length||0!==u.length||a)),[t,n,u,a]);return r.createElement("div",null,r.createElement(ib,{onClick:()=>e.toggle(),type:o,empty:p,title:i||"",code:s,opened:l}),l&&!p&&r.createElement(ab,null,r.createElement(mb,{response:e})))})),yb=xn.h3`
2022-02-04 13:00:46 +03:00
font-size: 1.3em;
padding: 0.2em 0;
margin: 3em 0 1.1em;
color: ${({theme:e})=>e.colors.text.primary};
font-weight: normal;
2023-08-17 17:09:11 +03:00
`;class bb extends r.PureComponent{render(){const{responses:e,isCallback:t}=this.props;return e&&0!==e.length?r.createElement("div",null,r.createElement(yb,null,en(t?"callbackResponses":"responses")),e.map((e=>r.createElement(gb,{key:e.code,response:e})))):null}}function vb(e){const{security:t,showSecuritySchemeType:n,expanded:o}=e,i=t.schemes.length>1;return 0===t.schemes.length?r.createElement(Mg,{expanded:o},"None"):r.createElement(Mg,{expanded:o},i&&"(",t.schemes.map((e=>r.createElement(Dg,{key:e.id},n&&`${Kg[e.type]||e.type}: `,r.createElement("i",null,e.displayName),o&&e.scopes.length?[" (",e.scopes.map((e=>r.createElement(Lg,{key:e},e))),") "]:null))),i&&") ")}const xb=({scopes:e})=>e.length?r.createElement("div",null,r.createElement("b",null,"Required scopes: "),e.map(((e,t)=>r.createElement(r.Fragment,{key:t},r.createElement("code",null,e)," ")))):null;function wb(e){const t=(0,r.useContext)(Op),n=null==t?void 0:t.options.showSecuritySchemeType,[o,i]=(0,r.useState)(!1),{securities:a}=e;if(!(null==a?void 0:a.length)||(null==t?void 0:t.options.hideSecuritySection))return null;const s=null==t?void 0:t.spec.securitySchemes.schemes.filter((({id:e})=>a.find((t=>t.schemes.find((t=>t.id===e))))));return r.createElement(r.Fragment,null,r.createElement(Bg,{expanded:o},r.createElement(Fg,{onClick:()=>i(!o)},r.createElement(Ug,null,"Authorizations:"),r.createElement(Tp,{size:"1.3em",direction:o?"down":"right"})),r.createElement(zg,{expanded:o},a.map(((e,t)=>r.createElement(vb,{key:t,expanded:o,showSecuritySchemeType:n,security:e}))))),o&&(null==s?void 0:s.length)&&s.map(((e,t)=>r.createElement(Wg,{key:t},r.createElement("h5",null,r.createElement(kb,null)," ",Kg[e.type]||e.type,": ",e.id),r.createElement(Nf,{source:e.description||""}),r.createElement(Xg,{key:e.id,scheme:e,RequiredScopes:r.createElement(xb,{scopes:Ob(e.id,a)})})))))}const kb=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"11",height:"11"},r.createElement("path",{fill:"currentColor",d:"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z"}));function Ob(e,t){const n=[];let r=t.length;for(;r--;){const o=t[r];let i=o.schemes.length;for(;i--;){const t=o.schemes[i];t.id===e&&Array.isArray(t.scopes)&&n.push(...t.scopes)}}return Array.from(new Set(n))}Object.defineProperty,Object.getOwnPropertyDescriptor;let Sb=class extends r.Component{render(){const{operation:e}=this.props,{description:t,externalDocs:n}=e,o=!(!t&&!n);return r.createElement(Iy,null,o&&r.createElement(Eb,null,void 0!==t&&r.createElement(Nf,{source:t}),n&&r.createElement(vm,{externalDocs:n})),r.createElement(Uy,{operation:this.props.operation,inverted:!0,compact:!0}),r.createElement(Om,{extensions:e.extensions}),r.createElement(wb,{securities:e.security}),r.createElement(Zy,{parameters:e.parameters,body:e.requestBody}),r.createElement(bb,{responses:e.responses,isCallback:e.isCallback}))}};Sb=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Sb);const Eb=xn.div`
2022-02-04 13:00:46 +03:00
margin-bottom: ${({theme:e})=>3*e.spacing.unit}px;
2023-08-17 17:09:11 +03:00
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let _b=class extends r.Component{constructor(){super(...arguments),this.toggle=()=>{this.props.callbackOperation.toggle()}}render(){const{name:e,expanded:t,httpVerb:n,deprecated:o}=this.props.callbackOperation;return r.createElement(r.Fragment,null,r.createElement(Ty,{onClick:this.toggle,name:e,opened:t,httpVerb:n,deprecated:o}),t&&r.createElement(Sb,{operation:this.props.callbackOperation}))}};_b=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],_b);class jb extends r.PureComponent{render(){const{callbacks:e}=this.props;return e&&0!==e.length?r.createElement("div",null,r.createElement(Ab,null," Callbacks "),e.map((e=>e.operations.map(((t,n)=>r.createElement(_b,{key:`${e.name}_${n}`,callbackOperation:t})))))):null}}const Ab=xn.h3`
2022-02-04 13:00:46 +03:00
font-size: 1.3em;
padding: 0.2em 0;
margin: 3em 0 1.1em;
color: ${({theme:e})=>e.colors.text.primary};
font-weight: normal;
2023-08-17 17:09:11 +03:00
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Pb=class extends r.Component{constructor(e){super(e),this.switchItem=({idx:e})=>{this.props.items&&void 0!==e&&this.setState({activeItemIdx:e})},this.state={activeItemIdx:0}}render(){const{items:e}=this.props;if(!e||!e.length)return null;const t=({children:e})=>this.props.label?r.createElement(lh,null,r.createElement(sh,null,this.props.label),e):e;return r.createElement(r.Fragment,null,r.createElement(t,null,this.props.renderDropdown({value:this.props.options[this.state.activeItemIdx].value,options:this.props.options,onChange:this.switchItem,ariaLabel:this.props.label||"Callback"})),this.props.children(e[this.state.activeItemIdx]))}};Pb=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Pb);var Cb=Object.defineProperty,Tb=Object.defineProperties,Ib=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),Rb=Object.getOwnPropertySymbols,Nb=Object.prototype.hasOwnProperty,$b=Object.prototype.propertyIsEnumerable,Lb=(e,t,n)=>t in e?Cb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Db=class extends r.Component{constructor(){super(...arguments),this.renderDropdown=e=>{return r.createElement(Of,(t=((e,t)=>{for(var n in t||(t={}))Nb.call(t,n)&&Lb(e,n,t[n]);if(Rb)for(var n of Rb(t))$b.call(t,n)&&Lb(e,n,t[n]);return e})({Label:ah,Dropdown:ch},e),Tb(t,Ib({variant:"dark"}))));var t}}render(){const e=this.props.content;return void 0===e?null:r.createElement(qy,{content:e,renderDropdown:this.renderDropdown,withLabel:!0},(e=>r.createElement(ph,{key:"samples",mediaType:e,renderDropdown:this.renderDropdown})))}};Db=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Db);class Mb extends r.Component{render(){const e=this.props.callback.codeSamples.find((e=>xu(e)));return e?r.createElement(Fb,null,r.createElement(Db,{content:e.requestBodyContent})):null}}const Fb=xn.div`
2022-02-04 13:00:46 +03:00
margin-top: 15px;
2023-08-17 17:09:11 +03:00
`;var zb=Object.defineProperty,Ub=Object.defineProperties,Bb=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),qb=Object.getOwnPropertySymbols,Wb=Object.prototype.hasOwnProperty,Vb=Object.prototype.propertyIsEnumerable,Hb=(e,t,n)=>t in e?zb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Yb=class extends r.Component{constructor(){super(...arguments),this.renderDropdown=e=>{return r.createElement(Of,(t=((e,t)=>{for(var n in t||(t={}))Wb.call(t,n)&&Hb(e,n,t[n]);if(qb)for(var n of qb(t))Vb.call(t,n)&&Hb(e,n,t[n]);return e})({Label:ah,Dropdown:ch},e),Ub(t,Bb({variant:"dark"}))));var t}}render(){const{callbacks:e}=this.props;if(!e||0===e.length)return null;const t=e.map((e=>e.operations.map((e=>e)))).reduce(((e,t)=>e.concat(t)),[]);if(!t.some((e=>e.codeSamples.length>0)))return null;const n=t.map(((e,t)=>({value:`${e.httpVerb.toUpperCase()}: ${e.name}`,idx:t})));return r.createElement("div",null,r.createElement(wp,null," Callback payload samples "),r.createElement(Qb,null,r.createElement(Pb,{items:t,renderDropdown:this.renderDropdown,label:"Callback",options:n},(e=>r.createElement(Mb,{key:"callbackPayloadSample",callback:e,renderDropdown:this.renderDropdown})))))}};Yb.contextType=Pn,Yb=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Yb);const Qb=xn.div`
2022-02-04 13:00:46 +03:00
background: ${({theme:e})=>e.codeBlock.backgroundColor};
padding: ${e=>4*e.theme.spacing.unit}px;
2023-08-17 17:09:11 +03:00
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Gb=class extends r.Component{render(){const{operation:e}=this.props,t=e.codeSamples,n=t.length>0,o=1===t.length&&this.context.hideSingleRequestSampleTab;return n&&r.createElement("div",null,r.createElement(wp,null," ",en("requestSamples")," "),r.createElement(Ed,{defaultIndex:0},r.createElement(gd,{hidden:o},t.map((e=>r.createElement(xd,{key:e.lang+"_"+(e.label||"")},void 0!==e.label?e.label:e.lang)))),t.map((e=>r.createElement(Sd,{key:e.lang+"_"+(e.label||"")},xu(e)?r.createElement("div",null,r.createElement(Db,{content:e.requestBodyContent})):r.createElement(th,{lang:e.lang,source:e.source}))))))||null}};Gb.contextType=Pn,Gb=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Gb);Object.defineProperty,Object.getOwnPropertyDescriptor;let Xb=class extends r.Component{render(){const{operation:e}=this.props,t=e.responses.filter((e=>e.content&&e.content.hasSample));return t.length>0&&r.createElement("div",null,r.createElement(wp,null," ",en("responseSamples")," "),r.createElement(Ed,{defaultIndex:0},r.createElement(gd,null,t.map((e=>r.createElement(xd,{className:"tab-"+e.type,key:e.code},e.code)))),t.map((e=>r.createElement(Sd,{key:e.code},r.createElement("div",null,r.createElement(Db,{content:e.content})))))))||null}};Xb=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Xb);var Kb=Object.defineProperty,Zb=Object.defineProperties,Jb=Object.getOwnPropertyDescriptors,ev=Object.getOwnPropertySymbols,tv=Object.prototype.hasOwnProperty,nv=Object.prototype.propertyIsEnumerable,rv=(e,t,n)=>t in e?Kb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const ov=xn.div`
2022-02-04 13:00:46 +03:00
margin-bottom: ${({theme:e})=>6*e.spacing.unit}px;
2023-08-17 17:09:11 +03:00
`,iv=rm((({operation:e})=>{const{name:t,description:n,deprecated:o,externalDocs:i,isWebhook:a,httpVerb:s}=e,l=!(!n&&!i),{showWebhookVerb:c}=r.useContext(Pn);return r.createElement(Pn.Consumer,null,(u=>r.createElement(gp,((e,t)=>Zb(e,Jb(t)))(((e,t)=>{for(var n in t||(t={}))tv.call(t,n)&&rv(e,n,t[n]);if(ev)for(var n of ev(t))nv.call(t,n)&&rv(e,n,t[n]);return e})({},{[ip]:e.operationHash}),{id:e.operationHash}),r.createElement(dp,null,r.createElement(xp,null,r.createElement(Pp,{to:e.id}),t," ",o&&r.createElement(Ip,{type:"warning"}," Deprecated "),a&&r.createElement(Ip,{type:"primary"}," ","Webhook ",c&&s&&"| "+s.toUpperCase())),u.pathInMiddlePanel&&!a&&r.createElement(Uy,{operation:e,inverted:!0}),l&&r.createElement(ov,null,void 0!==n&&r.createElement(Nf,{source:n}),i&&r.createElement(vm,{externalDocs:i})),r.createElement(Om,{extensions:e.extensions}),r.createElement(wb,{securities:e.security}),r.createElement(Zy,{parameters:e.parameters,body:e.requestBody}),r.createElement(bb,{responses:e.responses}),r.createElement(jb,{callbacks:e.callbacks})),r.createElement(mp,null,!u.pathInMiddlePanel&&!a&&r.createElement(Uy,{operation:e}),r.createElement(Gb,{operation:e}),r.createElement(Xb,{operation:e}),r.createElement(Yb,{callbacks:e.callbacks})))))}));var av=Object.defineProperty,sv=Object.getOwnPropertyDescriptor,lv=Object.getOwnPropertySymbols,cv=Object.prototype.hasOwnProperty,uv=Object.prototype.propertyIsEnumerable,pv=(e,t,n)=>t in e?av(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dv=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?sv(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&av(t,n,i),i};let fv=class extends r.Component{render(){const e=this.props.items;return 0===e.length?null:e.map((e=>r.createElement(hv,{key:e.id,item:e})))}};fv=dv([rm],fv);let hv=class extends r.Component{render(){const e=this.props.item;let t;const{type:n}=e;switch(n){case"group":t=null;break;case"tag":case"section":default:t=r.createElement(gv,((e,t)=>{for(var n in t||(t={}))cv.call(t,n)&&pv(e,n,t[n]);if(lv)for(var n of lv(t))uv.call(t,n)&&pv(e,n,t[n]);return e})({},this.props));break;case"operation":t=r.createElement(yv,{item:e})}return r.createElement(r.Fragment,null,t&&r.createElement(fp,{id:e.id,underlined:"operation"===e.type},t),e.items&&r.createElement(fv,{items:e.items}))}};hv=dv([rm],hv);const mv=e=>r.createElement(dp,{compact:!0},e);let gv=class extends r.Component{render(){const{name:e,description:t,externalDocs:n,level:o}=this.props.item,i=2===o?xp:vp;return r.createElement(r.Fragment,null,r.createElement(gp,null,r.createElement(dp,{compact:!1},r.createElement(i,null,r.createElement(Pp,{to:this.props.item.id}),e))),r.createElement(yy,{parentId:this.props.item.id,source:t||"",htmlWrap:mv}),n&&r.createElement(gp,null,r.createElement(dp,null,r.createElement(vm,{externalDocs:n}))))}};gv=dv([rm],gv);let yv=class extends r.Component{render(){return r.createElement(iv,{operation:this.props.item})}};yv=dv([rm],yv);var bv=Object.defineProperty,vv=Object.defineProperties,xv=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),wv=Object.getOwnPropertySymbols,kv=Object.prototype.hasOwnProperty,Ov=Object.prototype.propertyIsEnumerable,Sv=(e,t,n)=>t in e?bv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Ev=class extends r.Component{constructor(){super(...arguments),this.ref=r.createRef(),this.activate=e=>{this.props.onActivate(this.props.item),e.stopPropagation()}}componentDidMount(){this.scrollIntoViewIfActive()}componentDidUpdate(){this.scrollIntoViewIfActive()}scrollIntoViewIfActive(){this.props.item.active&&this.ref.current&&Mt(this.ref.current)}render(){const{item:e,withoutChildren:t}=this.props;return r.createElement(Oy,{tabIndex:0,onClick:this.activate,depth:e.depth,"data-item-id":e.id,role:"menuitem"},"operation"===e.type?r.createElement(_v,((e,t)=>vv(e,xv(t)))(((e,t)=>{for(var n in t||(t={}))kv.call(t,n)&&Sv(e,n,t[n]);if(wv)for(var n of wv(t))Ov.call(t,n)&&Sv(e,n,t[n]);return e})({},this.props),{item:e})):r.createElement(Ey,{depth:e.depth,active:e.active,type:e.type,r
2022-02-04 13:00:46 +03:00
user-select: none;
width: 20px;
height: 20px;
align-self: center;
display: flex;
flex-direction: column;
color: ${e=>e.theme.colors.primary.main};
2023-08-17 17:09:11 +03:00
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Mv;Lt&&(Mv=n(5114));const Fv=Mv&&Mv(),zv=xn.div`
2022-02-04 13:00:46 +03:00
width: ${e=>e.theme.sidebar.width};
background-color: ${e=>e.theme.sidebar.backgroundColor};
overflow: hidden;
display: flex;
flex-direction: column;
backface-visibility: hidden;
/* contain: strict; TODO: breaks layout since Chrome 80*/
height: 100vh;
position: sticky;
position: -webkit-sticky;
top: 0;
2023-08-17 17:09:11 +03:00
${vn("small")`
2022-02-04 13:00:46 +03:00
position: fixed;
z-index: 20;
width: 100%;
background: ${({theme:e})=>e.sidebar.backgroundColor};
display: ${e=>e.open?"flex":"none"};
`};
@media print {
display: none;
}
2023-08-17 17:09:11 +03:00
`,Uv=xn.div`
2022-02-04 13:00:46 +03:00
outline: none;
user-select: none;
background-color: ${({theme:e})=>e.fab.backgroundColor};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.primary.main};
display: none;
cursor: pointer;
position: fixed;
right: 20px;
z-index: 100;
border-radius: 50%;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
2023-08-17 17:09:11 +03:00
${vn("small")`
2022-02-04 13:00:46 +03:00
display: flex;
`};
bottom: 44px;
width: 60px;
height: 60px;
padding: 0 20px;
svg {
color: ${({theme:e})=>e.fab.color};
}
2022-02-04 13:00:46 +03:00
@media print {
display: none;
}
2023-08-17 17:09:11 +03:00
`;let Bv=class extends r.Component{constructor(){super(...arguments),this.state={offsetTop:"0px"},this.toggleNavMenu=()=>{this.props.menu.toggleSidebar()}}componentDidMount(){Fv&&Fv.add(this.stickyElement),this.setState({offsetTop:this.getScrollYOffset(this.context)})}componentWillUnmount(){Fv&&Fv.remove(this.stickyElement)}getScrollYOffset(e){let t;return t=void 0!==this.props.scrollYOffset?fn.normalizeScrollYOffset(this.props.scrollYOffset)():e.scrollYOffset(),t+"px"}render(){const e=this.props.menu.sideBarOpened,t=this.state.offsetTop;return r.createElement(r.Fragment,null,r.createElement(zv,{open:e,className:this.props.className,style:{top:t,height:`calc(100vh - ${t})`},ref:e=>{this.stickyElement=e}},this.props.children),!this.context.hideFab&&r.createElement(Uv,{onClick:this.toggleNavMenu},r.createElement($v,{open:e})))}};Bv.contextType=Pn,Bv=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Bv);const qv=xn.div`
2022-02-04 13:00:46 +03:00
${({theme:e})=>`\n font-family: ${e.typography.fontFamily};\n font-size: ${e.typography.fontSize};\n font-weight: ${e.typography.fontWeightRegular};\n line-height: ${e.typography.lineHeight};\n color: ${e.colors.text.primary};\n display: flex;\n position: relative;\n text-align: left;\n\n -webkit-font-smoothing: ${e.typography.smoothing};\n font-smoothing: ${e.typography.smoothing};\n ${e.typography.optimizeSpeed?"text-rendering: optimizeSpeed !important":""};\n\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n`};
2023-08-17 17:09:11 +03:00
`,Wv=xn.div`
2022-02-04 13:00:46 +03:00
z-index: 1;
position: relative;
overflow: hidden;
width: calc(100% - ${e=>e.theme.sidebar.width});
2023-08-17 17:09:11 +03:00
${vn("small",!0)`
2022-02-04 13:00:46 +03:00
width: 100%;
`};
contain: layout;
2023-08-17 17:09:11 +03:00
`,Vv=xn.div`
2022-02-04 13:00:46 +03:00
background: ${({theme:e})=>e.rightPanel.backgroundColor};
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: ${({theme:e})=>{if(e.rightPanel.width.endsWith("%")){const t=parseInt(e.rightPanel.width,10);return`calc((100% - ${e.sidebar.width}) * ${t/100})`}return e.rightPanel.width}};
2023-08-17 17:09:11 +03:00
${vn("medium",!0)`
2022-02-04 13:00:46 +03:00
display: none;
`};
2023-08-17 17:09:11 +03:00
`,Hv=xn.div`
2022-02-04 13:00:46 +03:00
padding: 5px 0;
2023-08-17 17:09:11 +03:00
`,Yv=xn.input.attrs((()=>({className:"search-input"})))`
2022-02-04 13:00:46 +03:00
width: calc(100% - ${e=>8*e.theme.spacing.unit}px);
box-sizing: border-box;
margin: 0 ${e=>4*e.theme.spacing.unit}px;
padding: 5px ${e=>2*e.theme.spacing.unit}px 5px
${e=>4*e.theme.spacing.unit}px;
border: 0;
border-bottom: 1px solid
2023-08-17 17:09:11 +03:00
${({theme:e})=>(_t(e.sidebar.backgroundColor)>.5?Ot:At)(.1,e.sidebar.backgroundColor)};
2022-02-04 13:00:46 +03:00
font-family: ${({theme:e})=>e.typography.fontFamily};
font-weight: bold;
font-size: 13px;
color: ${e=>e.theme.sidebar.textColor};
background-color: transparent;
outline: none;
2023-08-17 17:09:11 +03:00
`,Qv=xn((e=>r.createElement("svg",{className:e.className,version:"1.1",viewBox:"0 0 1000 1000",x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px"},r.createElement("path",{d:"M968.2,849.4L667.3,549c83.9-136.5,66.7-317.4-51.7-435.6C477.1-25,252.5-25,113.9,113.4c-138.5,138.3-138.5,362.6,0,501C219.2,730.1,413.2,743,547.6,666.5l301.9,301.4c43.6,43.6,76.9,14.9,104.2-12.4C981,928.3,1011.8,893,968.2,849.4z M524.5,522c-88.9,88.7-233,88.7-321.8,0c-88.9-88.7-88.9-232.6,0-321.3c88.9-88.7,233-88.7,321.8,0C613.4,289.4,613.4,433.3,524.5,522z"})))).attrs({className:"search-icon"})`
2022-02-04 13:00:46 +03:00
position: absolute;
left: ${e=>4*e.theme.spacing.unit}px;
height: 1.8em;
width: 0.9em;
path {
fill: ${e=>e.theme.sidebar.textColor};
}
2023-08-17 17:09:11 +03:00
`,Gv=xn.div`
2022-02-04 13:00:46 +03:00
padding: ${e=>e.theme.spacing.unit}px 0;
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>Ot(.05,e.sidebar.backgroundColor)}};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.sidebar.textColor};
min-height: 150px;
max-height: 250px;
2023-08-17 17:09:11 +03:00
border-top: ${({theme:e})=>Ot(.1,e.sidebar.backgroundColor)}};
border-bottom: ${({theme:e})=>Ot(.1,e.sidebar.backgroundColor)}};
2022-02-04 13:00:46 +03:00
margin-top: 10px;
line-height: 1.4;
font-size: 0.9em;
li {
background-color: inherit;
}
2023-08-17 17:09:11 +03:00
${Ey} {
2022-02-04 13:00:46 +03:00
padding-top: 6px;
padding-bottom: 6px;
&:hover,
&.active {
2023-08-17 17:09:11 +03:00
background-color: ${({theme:e})=>Ot(.1,e.sidebar.backgroundColor)};
2022-02-04 13:00:46 +03:00
}
> svg {
display: none;
}
}
2023-08-17 17:09:11 +03:00
`,Xv=xn.i`
2022-02-04 13:00:46 +03:00
position: absolute;
display: inline-block;
width: ${e=>2*e.theme.spacing.unit}px;
text-align: center;
right: ${e=>4*e.theme.spacing.unit}px;
line-height: 2em;
vertical-align: middle;
margin-right: 2px;
cursor: pointer;
font-style: normal;
color: '#666';
2023-08-17 17:09:11 +03:00
`;var Kv=Object.defineProperty,Zv=Object.getOwnPropertyDescriptor;class Jv extends r.PureComponent{constructor(e){super(e),this.activeItemRef=null,this.clear=()=>{this.setState({results:[],noResults:!1,term:"",activeItemIdx:-1}),this.props.marker.unmark()},this.handleKeyDown=e=>{if(27===e.keyCode&&this.clear(),40===e.keyCode&&(this.setState({activeItemIdx:Math.min(this.state.activeItemIdx+1,this.state.results.length-1)}),e.preventDefault()),38===e.keyCode&&(this.setState({activeItemIdx:Math.max(0,this.state.activeItemIdx-1)}),e.preventDefault()),13===e.keyCode){const e=this.state.results[this.state.activeItemIdx];if(e){const t=this.props.getItemById(e.meta);t&&this.props.onActivate(t)}}},this.search=e=>{const{minCharacterLengthToInitSearch:t}=this.context,n=e.target.value;n.length<t?this.clearResults(n):this.setState({term:n},(()=>this.searchCallback(this.state.term)))},this.state={results:[],noResults:!1,term:"",activeItemIdx:-1}}clearResults(e){this.setState({results:[],noResults:!1,term:e}),this.props.marker.unmark()}setResults(e,t){this.setState({results:e,noResults:0===e.length}),this.props.marker.mark(t)}searchCallback(e){this.props.search.search(e).then((t=>{this.setResults(t,e)}))}render(){const{activeItemIdx:e}=this.state,t=this.state.results.filter((e=>this.props.getItemById(e.meta))).map((e=>({item:this.props.getItemById(e.meta),score:e.score}))).sort(((e,t)=>t.score-e.score));return r.createElement(Hv,{role:"search"},this.state.term&&r.createElement(Xv,{onClick:this.clear},"×"),r.createElement(Qv,null),r.createElement(Yv,{value:this.state.term,onKeyDown:this.handleKeyDown,placeholder:"Search...","aria-label":"Search",type:"text",onChange:this.search}),t.length>0&&r.createElement(pf,{options:{wheelPropagation:!1}},r.createElement(Gv,{"data-role":"search:results"},t.map(((t,n)=>r.createElement(Ev,{item:Object.create(t.item,{active:{value:n===e}}),onActivate:this.props.onActivate,withoutChildren:!0,key:t.item.id,"data-role":"search:result"}))))),this.state.term&&this.state.noResults?r.createElement(Gv,{"data-role":"search:results"},en("noResultsFound")):null)}}Jv.contextType=Pn,((e,t,n,r)=>{for(var o,i=Zv(t,n),a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);i&&Kv(t,n,i)})([Pa.bind,(0,Pa.debounce)(400)],Jv.prototype,"searchCallback");class ex extends r.Component{componentDidMount(){this.props.store.onDidMount()}componentWillUnmount(){this.props.store.dispose()}render(){const{store:{spec:e,menu:t,options:n,search:o,marker:i}}=this.props,a=this.props.store;return r.createElement(bn,{theme:n.theme},r.createElement(Sp,{value:a},r.createElement(Cn,{value:n},r.createElement(qv,{className:"redoc-wrap"},r.createElement(Bv,{menu:t,className:"menu-content"},r.createElement(uy,{info:e.info}),!n.disableSearch&&r.createElement(Jv,{search:o,marker:i,getItemById:t.getItemById,onActivate:t.activateAndScroll})||null,r.createElement(Nv,{menu:t})),r.createElement(Wv,{className:"api-content"},r.createElement(ay,{store:a}),r.createElement(fv,{items:t.items})),r.createElement(Vv,null)))))}}ex.propTypes={store:An.instanceOf(Jg).isRequired};var tx=Object.defineProperty,nx=Object.getOwnPropertySymbols,rx=Object.prototype.hasOwnProperty,ox=Object.prototype.propertyIsEnumerable,ix=(e,t,n)=>t in e?tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ax=(e,t)=>{for(var n in t||(t={}))rx.call(t,n)&&ix(e,n,t[n]);if(nx)for(var n of nx(t))ox.call(t,n)&&ix(e,n,t[n]);return e};const sx=function(e){const{spec:t,specUrl:o,options:i={},onLoaded:a}=e,s=pn(i.hideLoading,!1),l=new fn(i);if(void 0!==l.nonce)try{n.nc=l.nonce}catch(e){}return r.createElement(On,null,r.createElement(_p,{spec:t?ax({},t):void 0,specUrl:o,options:i,onLoaded:a},(({loading:e,store:t})=>e?s?null:r.createElement(jn,{color:l.theme.colors.primary.main}):r.createElement(ex,{store:t}))))},lx=xn.li`
2022-02-04 13:00:46 +03:00
${e=>e.active?"background-color: #eee":""};
padding: 13px 16px;
&:hover {
background-color: #eee;
}
cursor: pointer;
text-overflow: ellipsis;
overflow: hidden;
2023-08-17 17:09:11 +03:00
`,cx=xn.ul`
2022-02-04 13:00:46 +03:00
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
background: #fff;
border-radius: 0 0 2px 2px;
top: 100%;
left: 0;
right: 0;
z-index: 200;
overflow: hidden;
position: absolute;
list-style: none;
margin: 4px 0 0 0;
padding: 5px 0;
font-family: Roboto,sans-serif;
overflow: hidden;
2023-08-17 17:09:11 +03:00
`,ux=xn.div`
2022-02-04 13:00:46 +03:00
position: relative;
width: 100%;
max-width: 500px;
display: flex;
2023-08-17 17:09:11 +03:00
`,px=xn.input`
2022-02-04 13:00:46 +03:00
box-sizing: border-box;
width: 100%;
padding: 0 10px;
color: #555;
background-color: #fff;
border: 1px solid #ccc;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
&:focus {
border-color: #66afe9;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
2023-08-17 17:09:11 +03:00
`,dx=xn.button`
2022-02-04 13:00:46 +03:00
background-color: #fff;
color: #333;
padding: 2px 10px;
touch-action: manipulation;
cursor: pointer;
user-select: none;
border: 1px solid #ccc;
border-left: 0;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
width: 80px;
white-space: nowrap;
@media screen and (max-width: 450px) {
display: none;
}
2023-08-17 17:09:11 +03:00
`;class fx extends r.Component{constructor(){super(...arguments),this.state={open:!1,value:this.props.value||"",activeItemIdx:-1},this.open=()=>{this.setState({open:!0})},this.close=()=>{this.setState({open:!1,activeItemIdx:-1})},this.handleChange=e=>{this.updateValue(e.currentTarget.value)},this.handleTryItClick=()=>{this.handleSelect(this.state.value)},this.handleKeyPress=e=>{if(13===e.keyCode)this.handleSelect(e.currentTarget.value);else if(40===e.keyCode){const t=Math.min(this.props.options.length-1,++this.state.activeItemIdx);this.setState({open:!0,activeItemIdx:t,value:this.props.options[t].value}),e.preventDefault()}else if(38===e.keyCode){const t=Math.max(0,--this.state.activeItemIdx);this.setState({activeItemIdx:t,value:this.props.options[t].value}),e.preventDefault()}else 27===e.keyCode&&this.close()},this.handleBlur=()=>{setTimeout((()=>this.close()),100)},this.handleItemClick=(e,t)=>{this.handleSelect(e),this.setState({activeItemIdx:t})},this.renderOption=(e,t)=>r.createElement(lx,{active:t===this.state.activeItemIdx,key:e.value,onMouseDown:()=>{this.handleItemClick(e.value,t)}},r.createElement("small",null,r.createElement("strong",null,e.label)),r.createElement("br",null),e.value)}updateValue(e){this.setState({value:e,activeItemIdx:-1})}handleSelect(e){this.updateValue(e),this.props.onChange&&this.props.onChange(e),this.close()}render(){const{open:e,value:t}=this.state,{options:n,placeholder:o}=this.props;return r.createElement(ux,null,r.createElement(px,{placeholder:o,onChange:this.handleChange,value:t,onFocus:this.open,onBlur:this.handleBlur,onKeyDown:this.handleKeyPress,"aria-label":"URL to an OpenAPI definition to try"}),r.createElement(dx,{onClick:this.handleTryItClick}," TRY IT "),e&&r.createElement(cx,null,n.map(this.renderOption)))}}function hx(e){return null==e}var mx={isNothing:hx,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:hx(e)?[]:[e]},repeat:function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var n,r,o,i;if(t)for(n=0,r=(i=Object.keys(t)).length;n<r;n+=1)e[o=i[n]]=t[o];return e}};function gx(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),r+" "+n):r}function yx(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=gx(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}yx.prototype=Object.create(Error.prototype),yx.prototype.constructor=yx,yx.prototype.toString=function(e){return this.name+": "+gx(this,e)};var bx=yx;function vx(e,t,n,r,o){var i="",a="",s=Math.floor(o/2)-1;return r-t>s&&(t=r-s+(i=" ... ").length),n-r>s&&(n=r+s-(a=" ...").length),{str:i+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+i.length}}function xx(e,t){return mx.repeat(" ",t-e.length)+e}var wx=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,o=[0],i=[],a=-1;n=r.exec(e.buffer);)i.push(n.index),o.push(n.index+n[0].length),e.position<=n.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var s,l,c="",u=Math.min(e.line+t.linesAfter,i.length).toString().length,p=t.maxLength-(t.indent+u+3);for(s=1;s<=t.linesBefore&&!(a-s<0);s++)l=vx(e.buffer,o[a-s],i[a-s],e.position-(o[a]-o[a-s]),p),c=mx.repeat(" ",t.indent)+xx((e.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=vx(e.buffer,o[a],i[a],e.position,p),c+=mx.repeat(" ",t.indent)+xx((e.line+1).toString(),u)+" | "+l.str+"\n",c+=mx.repeat("-",t.indent+u+3+l.pos)+"^\n",s=1;s<=t.linesAfter&&!(a+s>=i.length);s++)l=vx(e.buffer,o[a+s],i[a+s],e.position-(o[a]-o[a+s]),p),c+=mx.repeat(" ",t.indent)+xx((e.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")},kx=["kind","multi","resolve","co
2022-02-04 13:00:46 +03:00
background-color: #fff;
color: #333;
padding: 2px 10px;
touch-action: manipulation;
cursor: pointer;
user-select: none;
border: 1px solid #ccc;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
white-space: nowrap;
@media (max-width: 699px) {
display: none;
}
2023-08-17 17:09:11 +03:00
`,qw=function(e){const t=(0,r.useRef)(null);return r.createElement("span",null,r.createElement(Bw,{onClick:()=>{t&&t.current&&t.current.click()}},"Upload a file"),r.createElement("input",{type:"file",style:{display:"none"},onChange:t=>{const n=t.target.files[0],r=new FileReader;r.onload=()=>{e.onUpload(Uw(r.result))},r.readAsText(n)},ref:t}))},Ww="openapi.yaml",Vw="openapi-3-1.yaml",Hw=[{value:Vw,label:"Petstore OpenAPI 3.1"},{value:"https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml",label:"Instagram"},{value:"https://api.apis.guru/v2/specs/googleapis.com/calendar/v3/openapi.yaml",label:"Google Calendar"},{value:"https://api.apis.guru/v2/specs/slack.com/1.7.0/openapi.yaml",label:"Slack"},{value:"https://api.apis.guru/v2/specs/zoom.us/2.0.0/openapi.yaml",label:"Zoom.us"}];class Yw extends r.Component{constructor(e){super(e),this.handleUploadFile=e=>{this.setState({spec:e,specUrl:""})},this.handleChange=e=>{e===Vw&&this.setState({cors:!1}),this.setState({specUrl:e}),window.history.pushState(void 0,"",Zw(location.search,"url",e))},this.toggleCors=e=>{const t=e.currentTarget.checked;this.setState({cors:t}),window.history.pushState(void 0,"",Zw(location.search,"nocors",t?void 0:""))};let t=window.location.search.match(/url=([^&]+)/),n=Ww;t&&t.length>1&&(n=decodeURIComponent(t[1])),t=window.location.search.match(/[?&]nocors(&|#|$)/);let r=!0;t&&t.length>1&&(r=!1),this.state={spec:void 0,specUrl:n,dropdownOpen:!1,cors:r}}render(){const{specUrl:e,cors:t}=this.state;let n=e;return e!==Ww&&(n=t?"https://cors.redoc.ly/"+new URL(e,window.location.href).href:e),r.createElement(r.Fragment,null,r.createElement(Xw,null,r.createElement("a",{href:"."},r.createElement(Kw,{src:"https://github.com/Redocly/redoc/raw/main/docs/images/redoc.png",alt:"Redoc logo"})),r.createElement(Qw,null,r.createElement(qw,{onUpload:this.handleUploadFile}),r.createElement(fx,{placeholder:"URL to a spec to try",options:Hw,onChange:this.handleChange,value:e===Ww?"":e}),r.createElement(Gw,{title:"Use CORS proxy"},r.createElement("input",{id:"cors_checkbox",type:"checkbox",onChange:this.toggleCors,checked:t}),r.createElement("label",{htmlFor:"cors_checkbox"},"CORS"))),r.createElement("iframe",{src:"https://ghbtns.com/github-btn.html?user=Redocly&repo=redoc&type=star&count=true&size=large",frameBorder:"0",scrolling:"0",width:"160px",height:"30px"})),r.createElement(sx,{spec:this.state.spec,specUrl:n,options:{scrollYOffset:"nav",untrustedSpec:!0}}))}}const Qw=ze.div`
2022-02-04 13:00:46 +03:00
display: flex;
justify-content: center;
flex: 1;
margin: 0 15px;
align-items: center;
2023-08-17 17:09:11 +03:00
`,Gw=ze.div`
2022-02-04 13:00:46 +03:00
margin-left: 10px;
white-space: nowrap;
label {
font-size: 13px;
}
@media screen and (max-width: 550px) {
display: none;
}
2023-08-17 17:09:11 +03:00
`,Xw=ze.nav`
2022-02-04 13:00:46 +03:00
position: sticky;
top: 0;
width: 100%;
height: 50px;
box-sizing: border-box;
background: white;
border-bottom: 1px solid #cccccc;
z-index: 10;
padding: 5px;
display: flex;
align-items: center;
font-family: Roboto, sans-serif;
2023-08-17 17:09:11 +03:00
`,Kw=ze.img`
2022-02-04 13:00:46 +03:00
height: 40px;
width: 124px;
display: inline-block;
margin-right: 15px;
@media screen and (max-width: 950px) {
display: none;
}
2023-08-17 17:09:11 +03:00
`;function Zw(e,t,n){const r=""===n?t:t+"="+n,o=new RegExp("([?|&])"+t+"=?.*?(&|#|$)","i");if(e.match(o))return void 0!==n?e.replace(o,"$1"+r+"$2"):e.replace(o,((e,t,n)=>(n.startsWith("&")&&(n=n.substring(1)),"&"===t?n:t+n)));{if(void 0===n)return e;let t="";-1!==e.indexOf("#")&&(t=e.replace(/.*#/,"#"),e=e.replace(/#.*/,""));const o=-1!==e.indexOf("?")?"&":"?";return e+o+r+t}}(0,o.render)(r.createElement(Yw,null),document.getElementById("container"))})()})();