import { n as e } from "../../fn-BbK27qJY.js";
import { a as t, i as n, n as r, r as i } from "../../import-url-YUIKviqI.js";
import { forwardRef as a, useCallback as o, useImperativeHandle as s, useMemo as c, useRef as l, useState as u } from "react";
import d from "prop-types";
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
import { createSelector as h } from "reselect";
import g from "js-yaml";
import * as _ from "monaco-editor";
import { List as v } from "immutable";
import y from "axios";
import b from "file-dialog";
import x from "js-file-download";
//#region src/plugins/top-bar/components/TopBar/TopBar.jsx
var S = ({ getComponent: e }) => {
	let t = e("TopBarLogo"), n = e("TopBarFileMenu", !0), r = e("TopBarEditMenu", !0), i = e("TopBarOpenAPI3GenerateServerMenu", !0), a = e("TopBarOpenAPI3GenerateClientMenu", !0), o = e("TopBarOpenAPI2GenerateServerMenu", !0), s = e("TopBarOpenAPI2GenerateClientMenu", !0), c = e("TopBarAboutMenu", !0);
	return /* @__PURE__ */ p("div", {
		className: "swagger-editor__top-bar",
		children: /* @__PURE__ */ m("div", {
			className: "swagger-editor__top-bar-wrapper",
			children: [
				/* @__PURE__ */ p(t, {}),
				/* @__PURE__ */ p(n, {}),
				/* @__PURE__ */ p(r, {}),
				/* @__PURE__ */ p(i, {}),
				/* @__PURE__ */ p(a, {}),
				/* @__PURE__ */ p(o, {}),
				/* @__PURE__ */ p(s, {}),
				/* @__PURE__ */ p(c, {})
			]
		})
	});
};
S.propTypes = { getComponent: d.func.isRequired };
//#endregion
//#region src/plugins/top-bar/assets/logo-small.svg
var C = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20536%20116'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20clip-path:%20url(%23clip-SWE_TM-logo-on-dark);%20}%20.cls-2%20{%20fill:%20%23fff;%20}%20.cls-3%20{%20fill:%20%2385ea2d;%20}%20.cls-4%20{%20fill:%20%23173647;%20}%20%3c/style%3e%3cclipPath%20id='clip-SWE_TM-logo-on-dark'%3e%3crect%20width='536'%20height='116'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20id='SWE_TM-logo-on-dark'%20class='cls-1'%3e%3cg%20id='SWE_In-Product'%3e%3cpath%20id='Path_3002'%20data-name='Path%203002'%20class='cls-2'%20d='M528.911,70.857h-.7V67.176h-1.26v-.6h3.219v.6h-1.26Z'/%3e%3cpath%20id='Path_3003'%20data-name='Path%203003'%20class='cls-2'%20d='M532.979,70.857l-1.242-3.576h-.023q.049.8.05,1.494v2.082h-.636V66.574h.987l1.19,3.408h.017l1.225-3.408h.99v4.283h-.674V68.74q0-.319.016-.832t.028-.621h-.023l-1.286,3.57Z'/%3e%3cpath%20id='Path_3004'%20data-name='Path%203004'%20class='cls-3'%20d='M50.027,97.669A47.642,47.642,0,1,1,97.67,50.027,47.642,47.642,0,0,1,50.027,97.669Z'/%3e%3cpath%20id='Path_3005'%20data-name='Path%203005'%20class='cls-3'%20d='M50.027,4.769A45.258,45.258,0,1,1,4.769,50.027,45.258,45.258,0,0,1,50.027,4.769m0-4.769a50.027,50.027,0,1,0,50.027,50.027A50.027,50.027,0,0,0,50.027,0Z'/%3e%3cpath%20id='Path_3006'%20data-name='Path%203006'%20class='cls-4'%20d='M31.5,33.854c-.154,1.712.058,3.482-.057,5.213a42.665,42.665,0,0,1-.693,5.156,9.532,9.532,0,0,1-4.1,5.829c4.078,2.654,4.539,6.771,4.809,10.946.135,2.25.077,4.52.308,6.752.173,1.731.846,2.174,2.636,2.231.731.02,1.48,0,2.327,0V75.33c-5.29.9-9.657-.6-10.734-5.079a30.76,30.76,0,0,1-.654-5c-.116-1.789.076-3.578-.058-5.367-.385-4.906-1.02-6.56-5.713-6.791v-6.1a9.189,9.189,0,0,1,1.019-.173c2.577-.135,3.674-.924,4.232-3.463a29.573,29.573,0,0,0,.481-4.329,81.809,81.809,0,0,1,.6-8.406c.674-3.982,3.136-5.906,7.234-6.137,1.154-.057,2.327,0,3.655,0v5.464c-.558.038-1.039.115-1.539.115C31.925,29.949,31.751,31.084,31.5,33.854Zm6.407,12.658H37.83a3.515,3.515,0,1,0-.347,7.021h.231a3.461,3.461,0,0,0,3.655-3.251V50.09a3.523,3.523,0,0,0-3.461-3.578Zm12.061,0a3.373,3.373,0,0,0-3.482,3.251,1.79,1.79,0,0,0,.02.327,3.3,3.3,0,0,0,3.578,3.443,3.264,3.264,0,0,0,3.444-3.558,3.309,3.309,0,0,0-3.559-3.463Zm12.351,0a3.592,3.592,0,0,0-3.655,3.482A3.529,3.529,0,0,0,62.2,53.533h.039c1.769.309,3.559-1.4,3.674-3.462a3.571,3.571,0,0,0-3.593-3.559Zm16.948.288c-2.232-.1-3.348-.846-3.9-2.962a21.523,21.523,0,0,1-.635-4.136c-.154-2.578-.135-5.175-.308-7.753-.4-6.117-4.828-8.252-11.254-7.195v5.31c1.019,0,1.808,0,2.6.019,1.366.019,2.4.539,2.539,2.059.136,1.385.136,2.789.27,4.193.269,2.79.423,5.618.9,8.369A8.715,8.715,0,0,0,73.4,50.052c-3.4,2.289-4.4,5.559-4.578,9.234-.1,2.52-.154,5.059-.289,7.6-.115,2.308-.923,3.058-3.251,3.116-.653.019-1.288.077-2.019.115v5.445c1.366,0,2.616.077,3.866,0,3.886-.231,6.233-2.117,7-5.887A48.9,48.9,0,0,0,74.7,63.4c.135-1.923.116-3.866.309-5.771.288-2.982,1.654-4.213,4.635-4.4a4.037,4.037,0,0,0,.828-.192v-6.1c-.5-.058-.844-.115-1.209-.135Z'/%3e%3cpath%20id='Path_3007'%20data-name='Path%203007'%20class='cls-2'%20d='M151.972,58.122a11.231,11.231,0,0,1-4.383,9.425q-4.385,3.381-11.9,3.381-8.14,0-12.523-2.1V63.7a32.95,32.95,0,0,0,6.137,1.879,32.279,32.279,0,0,0,6.574.689q5.323,0,8.015-2.02a6.629,6.629,0,0,0,2.693-5.62,7.216,7.216,0,0,0-.955-3.9,8.868,8.868,0,0,0-3.194-2.8,44.614,44.614,0,0,0-6.809-2.911q-6.388-2.286-9.127-5.417a11.959,11.959,0,0,1-2.739-8.171A10.164,10.164,0,0,1,127.739,27q3.976-3.131,10.52-3.131a31,31,0,0,1,12.555,2.5L149.154,31a28.377,28.377,0,0,0-11.02-2.38,10.665,10.665,0,0,0-6.607,1.816,5.985,5.985,0,0,0-2.379,5.041,7.733,7.733,0,0,0,.876,3.9,8.259,8.259,0,0,0,2.959,2.786,36.732,36.732,0,0,0,6.371,2.8q7.2,2.568,9.91,5.509a10.843,10.843,0,0,1,2.708,7.647Z'/%3e%3cpath%20id='Path_3008'%20data-name='Path%203008'%20class='cls-2'%20d='M184.988,70.3,178.7,50.17q-.6-1.848-2.223-8.391h-.25q-1.254,5.479-2.192,8.453L167.549,70.3h-6.012l-9.361-34.316h5.448q3.318,12.932,5.056,19.694a79.655,79.655,0,0,1,1.988,9.111h.251q.343-1.784,1.111-4.618t1.331-4.493l6.293-19.694h5.635l6.137,19.694a66.551,66.551,0,0,1,2.38,9.049h.25a33.338,33.338,0,0,1,.673-3.476q.547-2.347,6.528-25.267h5.385L191.156,70.3Z'/%3e%3cpath%20id='Path_3009'%20data-name='Path%203009'%20class='cls-2'%20d='M224.815,70.3l-1.033-4.885h-.251a14.446,14.446,0,0,1-5.119,4.368,15.6,15.6,0,0,1-6.372,1.143q-5.1,0-8-2.63t-2.9-7.484q0-10.394,16.625-10.894l5.824-.189V47.6q0-4.04-1.738-5.964T216.3,39.713a22.644,22.644,0,0,0-9.706,2.63L205,38.366a24.492,24.492,0,0,1,5.558-2.16,24.094,24.094,0,0,1,6.058-.782q6.137,0,9.1,2.723t2.959,8.736V70.3Zm-11.741-3.663a10.548,10.548,0,0,0,7.624-2.662,9.846,9.846,0,0,0,2.771-7.452v-3.1l-5.2.219q-6.2.219-8.939,1.925a5.81,5.81,0,0,0-2.739,5.307,5.357,5.357,0,0,0,1.706,4.29,7.082,7.082,0,0,0,4.777,1.475Z'/%3e%3cpath%20id='Path_3010'%20data-name='Path%203010'%20class='cls-2'%20d='M264.3,35.986v3.288l-6.356.751a11.175,11.175,0,0,1,2.254,6.858,10.144,10.144,0,0,1-3.444,8.046q-3.444,3.006-9.455,3.006a15.655,15.655,0,0,1-2.881-.251Q241.1,59.439,241.1,62.1a2.243,2.243,0,0,0,1.158,2.082,8.459,8.459,0,0,0,3.976.673h6.074q5.572,0,8.563,2.348a8.159,8.159,0,0,1,2.99,6.825,9.742,9.742,0,0,1-4.571,8.688q-4.57,2.991-13.337,2.99-6.732,0-10.379-2.5a8.088,8.088,0,0,1-3.648-7.076,7.943,7.943,0,0,1,2-5.416,10.209,10.209,0,0,1,5.635-3.1,5.435,5.435,0,0,1-2.207-1.847,4.887,4.887,0,0,1-.892-2.912,5.524,5.524,0,0,1,1-3.287,10.517,10.517,0,0,1,3.162-2.724,9.266,9.266,0,0,1-4.336-3.726,10.949,10.949,0,0,1-1.675-6.011q0-5.635,3.381-8.689t9.581-3.053a17.449,17.449,0,0,1,4.853.626ZM236.932,76.063a4.658,4.658,0,0,0,2.349,4.226,12.969,12.969,0,0,0,6.731,1.44q6.543,0,9.691-1.956a5.992,5.992,0,0,0,3.146-5.307q0-2.788-1.722-3.867t-6.481-1.08h-6.231a8.207,8.207,0,0,0-5.51,1.69,6.044,6.044,0,0,0-1.973,4.854Zm2.818-29.086a6.985,6.985,0,0,0,2.036,5.447,8.121,8.121,0,0,0,5.667,1.847q7.607,0,7.607-7.388,0-7.734-7.7-7.735a7.628,7.628,0,0,0-5.635,1.973q-1.974,1.979-1.975,5.856Z'/%3e%3cpath%20id='Path_3011'%20data-name='Path%203011'%20class='cls-2'%20d='M298.835,35.986v3.288l-6.356.751a11.166,11.166,0,0,1,2.255,6.858,10.147,10.147,0,0,1-3.444,8.046q-3.444,3.006-9.456,3.006a15.644,15.644,0,0,1-2.88-.251q-3.32,1.755-3.319,4.415a2.242,2.242,0,0,0,1.159,2.082,8.456,8.456,0,0,0,3.976.673h6.074q5.573,0,8.563,2.348a8.159,8.159,0,0,1,2.99,6.825,9.742,9.742,0,0,1-4.571,8.688q-4.572,2.991-13.338,2.99-6.732,0-10.379-2.5a8.087,8.087,0,0,1-3.647-7.076,7.942,7.942,0,0,1,2-5.416,10.212,10.212,0,0,1,5.636-3.1,5.429,5.429,0,0,1-2.207-1.847A4.887,4.887,0,0,1,271,62.85a5.524,5.524,0,0,1,1-3.287,10.517,10.517,0,0,1,3.162-2.724,9.275,9.275,0,0,1-4.336-3.726,10.949,10.949,0,0,1-1.675-6.011q0-5.635,3.382-8.689t9.58-3.053a17.439,17.439,0,0,1,4.853.626ZM271.471,76.063a4.659,4.659,0,0,0,2.348,4.226,12.973,12.973,0,0,0,6.732,1.44q6.543,0,9.69-1.956a5.991,5.991,0,0,0,3.147-5.307q0-2.788-1.723-3.867t-6.481-1.08h-6.23a8.2,8.2,0,0,0-5.51,1.69A6.044,6.044,0,0,0,271.471,76.063Zm2.818-29.086a6.985,6.985,0,0,0,2.035,5.447,8.123,8.123,0,0,0,5.667,1.847q7.608,0,7.608-7.388,0-7.734-7.7-7.735a7.628,7.628,0,0,0-5.635,1.973q-1.976,1.979-1.975,5.856Z'/%3e%3cpath%20id='Path_3012'%20data-name='Path%203012'%20class='cls-2'%20d='M316.477,70.928q-7.606,0-12.006-4.634t-4.4-12.868q0-8.3,4.086-13.181A13.567,13.567,0,0,1,315.13,35.36a12.94,12.94,0,0,1,10.208,4.24q3.762,4.246,3.762,11.2v3.288H305.457q.156,6.042,3.052,9.173t8.156,3.131a27.629,27.629,0,0,0,10.958-2.317v4.634a27.541,27.541,0,0,1-5.212,1.706,29.262,29.262,0,0,1-5.934.513Zm-1.408-31.215a8.488,8.488,0,0,0-6.591,2.692,12.41,12.41,0,0,0-2.9,7.451h17.94q0-4.914-2.192-7.529a7.712,7.712,0,0,0-6.257-2.614Z'/%3e%3cpath%20id='Path_3013'%20data-name='Path%203013'%20class='cls-2'%20d='M350.6,35.36a20.372,20.372,0,0,1,4.1.376l-.72,4.822a17.72,17.72,0,0,0-3.757-.47A9.144,9.144,0,0,0,343.1,43.47a12.326,12.326,0,0,0-2.959,8.422V70.3h-5.2V35.986h4.289l.6,6.357h.251a15.069,15.069,0,0,1,4.6-5.166A10.366,10.366,0,0,1,350.6,35.36Z'/%3e%3cpath%20id='Path_3014'%20data-name='Path%203014'%20class='cls-2'%20d='M394.454,70.3H368.937V24.527h25.517v4.729H374.26V44h18.973v4.7H374.26V65.543h20.194Z'/%3e%3cpath%20id='Path_3015'%20data-name='Path%203015'%20class='cls-2'%20d='M423.683,65.7H423.4q-3.6,5.231-10.77,5.229-6.734,0-10.473-4.6t-3.742-13.087q0-8.484,3.757-13.181t10.458-4.7q6.981,0,10.707,5.073h.407l-.219-2.474-.125-2.41V21.585h5.2V70.3h-4.227Zm-10.394.877q5.322,0,7.718-2.9t2.395-9.346v-1.1q0-7.294-2.427-10.41t-7.749-3.115a7.953,7.953,0,0,0-7,3.553Q403.8,46.821,403.8,53.3q0,6.574,2.41,9.925a8.166,8.166,0,0,0,7.079,3.351Z'/%3e%3cpath%20id='Path_3016'%20data-name='Path%203016'%20class='cls-2'%20d='M435.918,26.688a3.449,3.449,0,0,1,.877-2.614,3.243,3.243,0,0,1,4.351.016,3.385,3.385,0,0,1,.909,2.6,3.442,3.442,0,0,1-.909,2.615,3.182,3.182,0,0,1-4.351,0,3.515,3.515,0,0,1-.877-2.617ZM441.554,70.3h-5.2V35.986h5.2Z'/%3e%3cpath%20id='Path_3017'%20data-name='Path%203017'%20class='cls-2'%20d='M461.26,66.639a17.07,17.07,0,0,0,2.661-.2,17.339,17.339,0,0,0,2.035-.423v3.976a9.508,9.508,0,0,1-2.489.674,18.741,18.741,0,0,1-2.959.266q-9.955,0-9.956-10.489V40.025h-4.915v-2.5l4.915-2.161,2.191-7.326h3.006V35.99h9.956v4.039h-9.956v20.2a6.943,6.943,0,0,0,1.472,4.759,5.117,5.117,0,0,0,4.039,1.651Z'/%3e%3cpath%20id='Path_3018'%20data-name='Path%203018'%20class='cls-2'%20d='M499.014,53.113q0,8.391-4.227,13.1t-11.68,4.712a15.478,15.478,0,0,1-8.171-2.16,14.264,14.264,0,0,1-5.51-6.2,21.6,21.6,0,0,1-1.941-9.455q0-8.389,4.2-13.072t11.647-4.681q7.2,0,11.443,4.79T499.014,53.113Zm-26.144,0q0,6.575,2.63,10.019t7.732,3.444q5.1,0,7.75-3.429t2.645-10.034q0-6.543-2.645-9.941t-7.812-3.4q-5.1,0-7.7,3.35T472.87,53.113Z'/%3e%3cpath%20id='Path_3019'%20data-name='Path%203019'%20class='cls-2'%20d='M520.726,35.36a20.376,20.376,0,0,1,4.1.376l-.721,4.822a17.712,17.712,0,0,0-3.757-.47,9.145,9.145,0,0,0-7.123,3.382,12.335,12.335,0,0,0-2.958,8.422V70.3h-5.2V35.986h4.289l.6,6.357h.251a15.078,15.078,0,0,1,4.6-5.166A10.368,10.368,0,0,1,520.726,35.36Z'/%3e%3cpath%20id='Path_3020'%20data-name='Path%203020'%20class='cls-2'%20d='M255.556,96.638s-3.43-.391-4.85-.391c-2.058,0-3.111.735-3.111,2.18,0,1.568.882,1.935,3.748,2.719,3.527.98,4.8,1.911,4.8,4.777,0,3.675-2.3,5.267-5.61,5.267a35.667,35.667,0,0,1-5.486-.662l.269-2.18s3.307.441,5.046.441c2.082,0,3.037-.931,3.037-2.7,0-1.421-.759-1.91-3.331-2.523-3.626-.93-5.193-2.033-5.193-4.948,0-3.381,2.229-4.776,5.585-4.776a37.222,37.222,0,0,1,5.316.587Z'/%3e%3cpath%20id='Path_3021'%20data-name='Path%203021'%20class='cls-2'%20d='M262.666,94.14h4.728l3.748,13.106L274.89,94.14h4.752v16.78H276.9V96.42h-.144l-4.192,13.816h-2.841L265.53,96.418h-.145v14.5h-2.719Z'/%3e%3cpath%20id='Path_3022'%20data-name='Path%203022'%20class='cls-2'%20d='M321.756,94.14H334v2.425h-4.728V110.92h-2.743V96.565h-4.777Z'/%3e%3cpath%20id='Path_3023'%20data-name='Path%203023'%20class='cls-2'%20d='M345.837,94.14c3.331,0,5.119,1.249,5.119,4.361,0,2.033-.636,3.037-1.984,3.772,1.445.563,2.4,1.592,2.4,3.9,0,3.43-2.082,4.752-5.34,4.752h-6.566V94.14Zm-3.651,2.352v4.8h3.6c1.667,0,2.4-.832,2.4-2.474,0-1.617-.833-2.327-2.5-2.327Zm0,7.1v4.973h3.7c1.689,0,2.694-.539,2.694-2.548,0-1.911-1.421-2.425-2.743-2.425Z'/%3e%3cpath%20id='Path_3024'%20data-name='Path%203024'%20class='cls-2'%20d='M358.113,94.14H368.7v2.377h-7.864v4.751h6.394V103.6h-6.394v4.924H368.7v2.4H358.113Z'/%3e%3cpath%20id='Path_3025'%20data-name='Path%203025'%20class='cls-2'%20d='M378.446,94.14h5.414l4.164,16.78h-2.743l-1.24-4.92h-5.777l-1.239,4.923h-2.719Zm.362,9.456h4.707l-1.737-7.178h-1.225Z'/%3e%3cpath%20id='Path_3026'%20data-name='Path%203026'%20class='cls-2'%20d='M396.8,105.947v4.973h-2.72V94.14h6.37c3.7,0,5.683,2.12,5.683,5.843,0,2.376-.956,4.519-2.744,5.352l2.769,5.585h-2.989l-2.425-4.973Zm3.65-9.455H396.8v7.1h3.7c2.058,0,2.841-1.85,2.841-3.589-.005-1.9-.935-3.511-2.895-3.511Z'/%3e%3cpath%20id='Path_3027'%20data-name='Path%203027'%20class='cls-2'%20d='M289.712,94.14h5.413l4.165,16.78h-2.744L295.307,106H289.53l-1.239,4.923h-2.719Zm.361,9.456h4.707l-1.737-7.178h-1.224Z'/%3e%3cpath%20id='Path_3028'%20data-name='Path%203028'%20class='cls-2'%20d='M308.061,105.947v4.973h-2.719V94.14h6.369c3.7,0,5.683,2.12,5.683,5.843,0,2.376-.955,4.519-2.743,5.352l2.768,5.585h-2.988l-2.426-4.973Zm3.65-9.455h-3.65v7.1h3.7c2.057,0,2.841-1.85,2.841-3.589C314.6,98.1,313.671,96.492,311.711,96.492Z'/%3e%3cpath%20id='Path_3029'%20data-name='Path%203029'%20class='cls-2'%20d='M130.306,107.644a3.021,3.021,0,0,1-1.18,2.536,5.115,5.115,0,0,1-3.2.91,8.009,8.009,0,0,1-3.371-.565v-1.381a8.932,8.932,0,0,0,1.651.5,8.672,8.672,0,0,0,1.77.186,3.57,3.57,0,0,0,2.158-.544,1.782,1.782,0,0,0,.724-1.512,1.943,1.943,0,0,0-.257-1.049,2.382,2.382,0,0,0-.859-.755,12.173,12.173,0,0,0-1.833-.784,5.853,5.853,0,0,1-2.457-1.458,3.218,3.218,0,0,1-.737-2.2,2.734,2.734,0,0,1,1.07-2.266,4.44,4.44,0,0,1,2.832-.844,8.337,8.337,0,0,1,3.379.675l-.447,1.247a7.635,7.635,0,0,0-2.966-.641,2.877,2.877,0,0,0-1.778.489,1.613,1.613,0,0,0-.641,1.357,2.078,2.078,0,0,0,.236,1.049,2.218,2.218,0,0,0,.8.75,9.873,9.873,0,0,0,1.715.755,6.77,6.77,0,0,1,2.667,1.483,2.914,2.914,0,0,1,.724,2.062Z'/%3e%3cpath%20id='Path_3030'%20data-name='Path%203030'%20class='cls-2'%20d='M134.147,101.686v5.992a2.41,2.41,0,0,0,.514,1.685,2.091,2.091,0,0,0,1.609.556,2.627,2.627,0,0,0,2.12-.792,4,4,0,0,0,.67-2.587v-4.854h1.4v9.236H139.3l-.2-1.238h-.076a2.8,2.8,0,0,1-1.192,1.045,4.019,4.019,0,0,1-1.74.361,3.527,3.527,0,0,1-2.524-.8,3.408,3.408,0,0,1-.839-2.561v-6.043Z'/%3e%3cpath%20id='Path_3031'%20data-name='Path%203031'%20class='cls-2'%20d='M147.906,111.09a4,4,0,0,1-1.648-.332,3.113,3.113,0,0,1-1.251-1.024h-.1a12.458,12.458,0,0,1,.1,1.534v3.8h-1.4V101.686h1.137l.194,1.263h.068a3.244,3.244,0,0,1,1.256-1.094,3.81,3.81,0,0,1,1.643-.337,3.414,3.414,0,0,1,2.836,1.255,6.686,6.686,0,0,1-.018,7.057,3.417,3.417,0,0,1-2.817,1.26Zm-.2-8.385a2.48,2.48,0,0,0-2.047.784,4.03,4.03,0,0,0-.649,2.494v.312a4.616,4.616,0,0,0,.649,2.785,2.464,2.464,0,0,0,2.081.839,2.162,2.162,0,0,0,1.875-.97,4.588,4.588,0,0,0,.679-2.67,4.423,4.423,0,0,0-.679-2.65,2.232,2.232,0,0,0-1.915-.924Z'/%3e%3cpath%20id='Path_3032'%20data-name='Path%203032'%20class='cls-2'%20d='M158.739,111.09a4,4,0,0,1-1.648-.332,3.113,3.113,0,0,1-1.251-1.024h-.1a12.461,12.461,0,0,1,.1,1.534v3.8h-1.4V101.686h1.137l.194,1.263h.068a3.244,3.244,0,0,1,1.256-1.094,3.81,3.81,0,0,1,1.643-.337,3.414,3.414,0,0,1,2.836,1.255,6.686,6.686,0,0,1-.018,7.057,3.417,3.417,0,0,1-2.817,1.26Zm-.2-8.385a2.48,2.48,0,0,0-2.048.784,4.03,4.03,0,0,0-.649,2.494v.312a4.616,4.616,0,0,0,.649,2.785,2.464,2.464,0,0,0,2.081.839,2.162,2.162,0,0,0,1.875-.97,4.588,4.588,0,0,0,.679-2.67,4.423,4.423,0,0,0-.679-2.65,2.231,2.231,0,0,0-1.91-.924Z'/%3e%3cpath%20id='Path_3033'%20data-name='Path%203033'%20class='cls-2'%20d='M173.312,106.3a5.092,5.092,0,0,1-1.138,3.527,4,4,0,0,1-3.143,1.268,4.172,4.172,0,0,1-2.2-.581,3.843,3.843,0,0,1-1.482-1.669,5.8,5.8,0,0,1-.523-2.545,5.087,5.087,0,0,1,1.129-3.518,4,4,0,0,1,3.135-1.259,3.9,3.9,0,0,1,3.08,1.289A5.067,5.067,0,0,1,173.312,106.3Zm-7.037,0a4.384,4.384,0,0,0,.708,2.7,2.809,2.809,0,0,0,4.167,0,4.36,4.36,0,0,0,.713-2.7,4.294,4.294,0,0,0-.713-2.676,2.5,2.5,0,0,0-2.1-.914,2.462,2.462,0,0,0-2.073.9A4.344,4.344,0,0,0,166.275,106.3Z'/%3e%3cpath%20id='Path_3034'%20data-name='Path%203034'%20class='cls-2'%20d='M180.224,101.518a5.5,5.5,0,0,1,1.1.1l-.193,1.3a4.8,4.8,0,0,0-1.012-.127,2.467,2.467,0,0,0-1.917.91,3.324,3.324,0,0,0-.8,2.268v4.955H176v-9.236h1.154l.161,1.71h.067a4.056,4.056,0,0,1,1.239-1.39,2.786,2.786,0,0,1,1.6-.49Z'/%3e%3cpath%20id='Path_3035'%20data-name='Path%203035'%20class='cls-2'%20d='M187.062,109.936a4.53,4.53,0,0,0,.717-.055,4.647,4.647,0,0,0,.548-.113v1.07a2.613,2.613,0,0,1-.67.181,5.124,5.124,0,0,1-.8.071q-2.679,0-2.679-2.822v-5.5h-1.324V102.1l1.324-.581.589-1.973h.809v2.141h2.68v1.087h-2.68v5.436a1.868,1.868,0,0,0,.4,1.28,1.378,1.378,0,0,0,1.086.446Z'/%3e%3cpath%20id='Path_3036'%20data-name='Path%203036'%20class='cls-2'%20d='M194.238,111.09a4.243,4.243,0,0,1-3.232-1.246,4.833,4.833,0,0,1-1.184-3.464,5.352,5.352,0,0,1,1.1-3.548,3.651,3.651,0,0,1,2.953-1.314,3.48,3.48,0,0,1,2.747,1.141,4.374,4.374,0,0,1,1.012,3.013v.885h-6.363a3.665,3.665,0,0,0,.822,2.468,2.839,2.839,0,0,0,2.2.844,7.453,7.453,0,0,0,2.95-.624v1.247a7.377,7.377,0,0,1-1.4.459,7.875,7.875,0,0,1-1.6.139Zm-.379-8.4a2.282,2.282,0,0,0-1.774.726,3.329,3.329,0,0,0-.78,2h4.829a3.073,3.073,0,0,0-.59-2.026,2.077,2.077,0,0,0-1.685-.7Z'/%3e%3cpath%20id='Path_3037'%20data-name='Path%203037'%20class='cls-2'%20d='M206.65,109.684h-.075a3.289,3.289,0,0,1-2.9,1.406,3.428,3.428,0,0,1-2.819-1.238,5.452,5.452,0,0,1-1.007-3.523,5.548,5.548,0,0,1,1.011-3.548,3.4,3.4,0,0,1,2.815-1.263,3.359,3.359,0,0,1,2.882,1.365h.109l-.059-.666-.033-.649V97.81h1.4v13.112h-1.138Zm-2.8.235a2.55,2.55,0,0,0,2.077-.779,3.94,3.94,0,0,0,.645-2.516v-.3a4.638,4.638,0,0,0-.653-2.8,2.485,2.485,0,0,0-2.086-.839,2.142,2.142,0,0,0-1.883.957,4.754,4.754,0,0,0-.654,2.7,4.57,4.57,0,0,0,.649,2.672,2.2,2.2,0,0,0,1.908.905Z'/%3e%3cpath%20id='Path_3038'%20data-name='Path%203038'%20class='cls-2'%20d='M220.411,101.534a3.437,3.437,0,0,1,2.828,1.243,6.659,6.659,0,0,1-.009,7.053,3.42,3.42,0,0,1-2.819,1.26,3.993,3.993,0,0,1-1.647-.332,3.109,3.109,0,0,1-1.252-1.024h-.1l-.295,1.188h-1V97.81h1.4v3.184q0,1.073-.067,1.922h.067a3.32,3.32,0,0,1,2.894-1.382Zm-.2,1.171a2.446,2.446,0,0,0-2.065.822,6.338,6.338,0,0,0,.017,5.553,2.466,2.466,0,0,0,2.082.839,2.16,2.16,0,0,0,1.921-.939,4.832,4.832,0,0,0,.632-2.7,4.645,4.645,0,0,0-.632-2.689,2.239,2.239,0,0,0-1.957-.886Z'/%3e%3cpath%20id='Path_3039'%20data-name='Path%203039'%20class='cls-2'%20d='M225.458,101.686h1.5l2.022,5.267a20.027,20.027,0,0,1,.826,2.6h.067q.11-.431.46-1.471t2.287-6.4h1.5L230.152,112.2a5.256,5.256,0,0,1-1.378,2.212,2.933,2.933,0,0,1-1.934.653,5.645,5.645,0,0,1-1.264-.143V113.8a4.9,4.9,0,0,0,1.036.1,2.137,2.137,0,0,0,2.056-1.618l.514-1.314Z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", w = ({ link: e = "https://swagger.io/tools/swagger-editor/" }) => {
	let t = /* @__PURE__ */ p("img", {
		className: "swagger-editor__top-bar-logo-img",
		src: C,
		alt: "Swagger Editor"
	});
	return /* @__PURE__ */ p("div", {
		className: "swagger-editor__top-bar-logo",
		children: e ? /* @__PURE__ */ p("a", {
			href: e,
			rel: "noopener noreferrer",
			children: t
		}) : t
	});
};
w.propTypes = { link: d.string };
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/ImportUrlMenuItemHandler.jsx
var T = a(({ getComponent: e, editorActions: t }, n) => {
	let [r, i] = u(!1), [a, o] = u(!1), c = l(""), [d, h] = u(""), g = e("ConfirmDialog", !0), _ = e("AlertDialog", !0);
	return s(n, () => ({ openModal() {
		i(!0);
	} })), /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(_, {
		isOpen: a,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			o(!1);
		},
		children: c.current
	}), /* @__PURE__ */ p(g, {
		isOpen: r,
		title: "Import URL",
		onClose: async (e) => {
			if (e) {
				let e = await t.importUrl(d);
				e.error ? (c.current = e.meta.errorMessage, i(!1), o(!0)) : (h(""), c.current = "", i(!1));
			} else c.current = "", i(!1);
		},
		children: /* @__PURE__ */ m("div", {
			className: "input-group",
			children: [/* @__PURE__ */ p("label", {
				htmlFor: "input-import-url",
				"aria-labelledby": "input-import-url",
				children: "Enter the URL to import from"
			}), /* @__PURE__ */ p("input", {
				id: "input-import-url",
				type: "text",
				className: "form-control",
				placeholder: "type url here",
				value: d,
				onChange: (e) => {
					h(e.target.value);
				}
			})]
		})
	})] });
});
T.propTypes = {
	getComponent: d.func.isRequired,
	editorActions: d.shape({ importUrl: d.func.isRequired }).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/ImportFileMenuItemHandler.jsx
var E = a(({ getComponent: e, editorActions: t }, n) => {
	let [r, i] = u(!1), a = l(""), o = e("AlertDialog", !0);
	return s(n, () => ({ async openFileDialog() {
		let e = await t.uploadFile();
		e.error && (a.current = e.error.message || "Unknown error while reading uploaded file.", i(!0));
	} })), /* @__PURE__ */ p(o, {
		isOpen: r,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			a.current = "", i(!1);
		},
		children: a.current
	});
});
E.propTypes = {
	getComponent: d.func.isRequired,
	editorActions: d.shape({ uploadFile: d.func.isRequired }).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/SaveAsMenuItemHandler.jsx
var D = a(({ getComponent: e, editorSelectors: t, editorActions: n }, r) => {
	let [i, a] = u(!1), o = l(""), c = e("AlertDialog", !0);
	return s(r, () => ({ async downloadContent() {
		let e = t.selectContent(), r = t.selectInferFileNameWithExtensionFromContent(), i = await n.downloadContent({
			content: e,
			fileNameWithExtension: r
		});
		i.error && (o.current = i.meta.errorMessage, a(!0));
	} })), /* @__PURE__ */ p(c, {
		isOpen: i,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			o.current = "", a(!1);
		},
		children: o.current
	});
});
D.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectInferFileNameWithExtensionFromContent: d.func.isRequired
	}).isRequired,
	editorActions: d.shape({ downloadContent: d.func.isRequired }).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/ConvertAndSaveAsJSONMenuItemHandler.jsx
var O = a(({ getComponent: e, editorSelectors: t, editorActions: n }, r) => {
	let [i, a] = u(!1), o = l(""), c = e("AlertDialog", !0);
	return s(r, () => ({ async convertAndSaveAsJSON() {
		let e = t.selectContent(), r = `${t.selectInferFileNameFromContent()}.json`, i = await n.convertContentToJSON(e);
		if (i.error) {
			o.current = i.meta.errorMessage, a(!0);
			return;
		}
		let s = await n.downloadContent({
			content: i.payload,
			fileNameWithExtension: r
		});
		s.error && (o.current = s.meta.errorMessage, a(!0));
	} })), /* @__PURE__ */ p(c, {
		isOpen: i,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			o.current = "", a(!1);
		},
		children: o.current
	});
});
O.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectInferFileNameFromContent: d.func.isRequired
	}).isRequired,
	editorActions: d.shape({
		convertContentToJSON: d.func.isRequired,
		downloadContent: d.func.isRequired
	}).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/ConvertAndSaveAsYAMLMenuItemHandler.jsx
var k = a(({ getComponent: e, editorSelectors: t, editorActions: n }, r) => {
	let [i, a] = u(!1), o = l(""), c = e("AlertDialog", !0);
	return s(r, () => ({ async convertAndSaveAsYAML() {
		let e = t.selectContent(), r = `${t.selectInferFileNameFromContent()}.yaml`, i = await n.convertContentToYAML(e);
		if (i.error) {
			o.current = i.meta.errorMessage, a(!0);
			return;
		}
		let s = await n.downloadContent({
			content: i.payload,
			fileNameWithExtension: r
		});
		s.error && (o.current = s.meta.errorMessage, a(!0));
	} })), /* @__PURE__ */ p(c, {
		isOpen: i,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			o.current = "", a(!1);
		},
		children: o.current
	});
});
k.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectInferFileNameFromContent: d.func.isRequired
	}).isRequired,
	editorActions: d.shape({
		convertContentToYAML: d.func.isRequired,
		downloadContent: d.func.isRequired
	}).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/DownloadResolvedJSONMenuItemHandler.jsx
var ee = a(({ getComponent: e, editorSelectors: t, editorActions: n }, r) => {
	let [i, a] = u(!1), o = l(""), c = e("AlertDialog", !0);
	return s(r, () => ({ async downloadResolvedJSON() {
		let e = t.selectContent(), r = e, i = t.selectIsContentFormatJSON(), s = `${t.selectInferFileNameFromContent()}.json`, c = await n.dereferenceContent({ content: e });
		if (c.error) {
			o.current = c.meta.errorMessage, a(!0);
			return;
		}
		if (r = c.payload, !i) {
			let e = await n.convertContentToJSON(c.payload);
			if (e.error) {
				o.current = e.meta.errorMessage, a(!0);
				return;
			}
			r = e.payload;
		}
		let l = await n.downloadContent({
			content: r,
			fileNameWithExtension: s
		});
		l.error && (o.current = l.meta.errorMessage, a(!0));
	} })), /* @__PURE__ */ p(c, {
		isOpen: i,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			o.current = "", a(!1);
		},
		children: o.current
	});
});
ee.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectInferFileNameFromContent: d.func.isRequired,
		selectIsContentFormatJSON: d.func.isRequired
	}).isRequired,
	editorActions: d.shape({
		dereferenceContent: d.func.isRequired,
		convertContentToJSON: d.func.isRequired,
		downloadContent: d.func.isRequired
	}).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/DownloadResolvedYAMLMenuItemHandler.jsx
var te = a(({ getComponent: e, editorSelectors: t, editorActions: n }, r) => {
	let [i, a] = u(!1), o = l(""), c = e("AlertDialog", !0);
	return s(r, () => ({ async downloadResolvedYAML() {
		let e = t.selectContent(), r = e, i = t.selectIsContentFormatYAML(), s = `${t.selectInferFileNameFromContent()}.yaml`, c = await n.dereferenceContent({ content: e });
		if (c.error) {
			o.current = c.meta.errorMessage, a(!0);
			return;
		}
		if (r = c.payload, !i) {
			let e = await n.convertContentToYAML(r);
			if (e.error) {
				o.current = e.meta.errorMessage, a(!0);
				return;
			}
			r = e.payload;
		}
		let l = await n.downloadContent({
			content: r,
			fileNameWithExtension: s
		});
		l.error && (o.current = l.meta.errorMessage, a(!0));
	} })), /* @__PURE__ */ p(c, {
		isOpen: i,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			o.current = "", a(!1);
		},
		children: o.current
	});
});
te.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectInferFileNameFromContent: d.func.isRequired,
		selectIsContentFormatYAML: d.func.isRequired
	}).isRequired,
	editorActions: d.shape({
		dereferenceContent: d.func.isRequired,
		convertContentToYAML: d.func.isRequired,
		downloadContent: d.func.isRequired
	}).isRequired
};
var ne = a((e, t) => {
	let n = l(null), r = l(null), i = l(null), a = l(null), o = l(null), c = l(null), u = l(null);
	return s(t, () => ({
		importURL(e) {
			n.current.openModal(e);
		},
		async importFile(e) {
			await r.current.openFileDialog(e);
		},
		async saveAs(e) {
			await i.current.downloadContent(e);
		},
		async convertAndSaveAsJSON(e) {
			await a.current.convertAndSaveAsJSON(e);
		},
		async convertAndSaveAsYAML(e) {
			await o.current.convertAndSaveAsYAML(e);
		},
		async downloadResolvedJSON(e) {
			await c.current.downloadResolvedJSON(e);
		},
		async downloadResolvedYAML(e) {
			await u.current.downloadResolvedYAML(e);
		}
	})), /* @__PURE__ */ m(f, { children: [
		/* @__PURE__ */ p(T, {
			ref: n,
			...e
		}),
		/* @__PURE__ */ p(E, {
			ref: r,
			...e
		}),
		/* @__PURE__ */ p(D, {
			ref: i,
			...e
		}),
		/* @__PURE__ */ p(O, {
			ref: a,
			...e
		}),
		/* @__PURE__ */ p(k, {
			ref: o,
			...e
		}),
		/* @__PURE__ */ p(ee, {
			ref: c,
			...e
		}),
		/* @__PURE__ */ p(te, {
			ref: u,
			...e
		})
	] });
}), re = (e) => {
	let { getComponent: t } = e, n = l(null), r = t("DropdownMenu"), i = t("DropdownMenuItemDivider"), a = t("TopBarFileMenuImportUrlMenuItem", !0), s = t("TopBarFileMenuImportFileMenuItem", !0), c = t("TopBarFileMenuLoadExampleNestedMenu", !0), u = t("TopBarFileMenuSaveAsMenuItem", !0), d = t("TopBarFileMenuConvertAndSaveAsJSONMenuItem", !0), h = t("TopBarFileMenuConvertAndSaveAsYAMLMenuItem", !0), g = t("TopBarFileMenuDownloadResolvedJSONMenuItem", !0), _ = t("TopBarFileMenuDownloadResolvedYAMLMenuItem", !0), v = o((e) => {
		n.current.importURL(e);
	}, []), y = o(async (e) => {
		await n.current.importFile(e);
	}, []), b = o(async (e) => {
		await n.current.saveAs(e);
	}, []), x = o(async (e) => {
		await n.current.convertAndSaveAsJSON(e);
	}, []), S = o(async (e) => {
		await n.current.convertAndSaveAsYAML(e);
	}, []), C = o(async (e) => {
		await n.current.downloadResolvedJSON(e);
	}, []), w = o(async (e) => {
		await n.current.downloadResolvedYAML(e);
	}, []);
	return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ne, {
		...e,
		ref: n
	}), /* @__PURE__ */ m(r, {
		label: "File",
		children: [
			/* @__PURE__ */ p(a, { onClick: v }),
			/* @__PURE__ */ p(s, { onClick: y }),
			/* @__PURE__ */ p(c, {}),
			/* @__PURE__ */ p(i, {}),
			/* @__PURE__ */ p(u, { onClick: b }),
			/* @__PURE__ */ p(d, { onClick: x }),
			/* @__PURE__ */ p(h, { onClick: S }),
			/* @__PURE__ */ p(i, {}),
			/* @__PURE__ */ p(g, { onClick: C }),
			/* @__PURE__ */ p(_, { onClick: w })
		]
	})] });
};
re.propTypes = { getComponent: d.func.isRequired };
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/ImportUrlMenuItem.jsx
var ie = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "Import URL"
});
ie.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/ImportFileMenuItem.jsx
var ae = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "Import File"
});
ae.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/LoadExampleNestedMenuHandler.jsx
var oe = a((e, t) => {
	let { EditorContentOrigin: n, editorActions: r, editorContentFixturesSelectors: i } = e;
	return s(t, () => ({
		loadOpenAP32PetstoreFixture() {
			let e = i.selectOpenAPI320PetstoreYAML();
			r.setContent(e, n.FixtureLoad);
		},
		loadOpenAP31PetstoreFixture() {
			let e = i.selectOpenAPI310PetstoreYAML();
			r.setContent(e, n.FixtureLoad);
		},
		loadOpenAP30PetstoreFixture() {
			let e = i.selectOpenAPI304PetstoreYAML();
			r.setContent(e, n.FixtureLoad);
		},
		loadOpenAP20PetstoreFixture() {
			let e = i.selectOpenAPI20PetstoreYAML();
			r.setContent(e, n.FixtureLoad);
		},
		loadAsyncAPI26PetstoreFixture() {
			let e = i.selectAsyncAPI260PetstoreYAML();
			r.setContent(e, n.FixtureLoad);
		},
		loadAsyncAPI30PetstoreFixture() {
			let e = i.selectAsyncAPI300PetstoreYAML();
			r.setContent(e, n.FixtureLoad);
		},
		loadAsyncAPI26StreetlightsFixture() {
			let e = i.selectAsyncAPI260StreetlightsYAML();
			r.setContent(e, n.FixtureLoad);
		},
		loadAsyncAPI30StreetlightsFixture() {
			let e = i.selectAsyncAPI300StreetlightsYAML();
			r.setContent(e, n.FixtureLoad);
		},
		loadJSONSchema202012Fixture() {
			let e = i.selectJSONSchema202012YAML();
			r.setContent(e, n.FixtureLoad);
		},
		loadAPIDesignSystemsFixture() {
			let e = i.selectAPIDesignSystemsYAML();
			r.setContent(e, n.FixtureLoad);
		}
	})), null;
});
oe.propTypes = {
	EditorContentOrigin: d.shape({ FixtureLoad: d.string.isRequired }).isRequired,
	editorActions: d.shape({ setContent: d.func.isRequired }).isRequired,
	editorContentFixturesSelectors: d.shape({
		selectOpenAPI320PetstoreYAML: d.func.isRequired,
		selectOpenAPI310PetstoreYAML: d.func.isRequired,
		selectOpenAPI304PetstoreYAML: d.func.isRequired,
		selectOpenAPI20PetstoreYAML: d.func.isRequired,
		selectAsyncAPI260PetstoreYAML: d.func.isRequired,
		selectAsyncAPI300PetstoreYAML: d.func.isRequired,
		selectAsyncAPI260StreetlightsYAML: d.func.isRequired,
		selectAsyncAPI300StreetlightsYAML: d.func.isRequired,
		selectJSONSchema202012YAML: d.func.isRequired,
		selectAPIDesignSystemsYAML: d.func.isRequired
	}).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/LoadExampleNestedMenu.jsx
var se = (e) => {
	let { getComponent: t } = e, n = l(null), r = t("DropdownMenuNested"), i = t("DropdownMenuItemDivider"), a = t("TopBarFileMenuLoadExampleNestedMenuOpenAPI32PetstoreMenuItem", !0), s = t("TopBarFileMenuLoadExampleNestedMenuOpenAPI31PetstoreMenuItem", !0), c = t("TopBarFileMenuLoadExampleNestedMenuOpenAPI30PetstoreMenuItem", !0), u = t("TopBarFileMenuLoadExampleNestedMenuOpenAPI20PetstoreMenuItem", !0), d = t("TopBarFileMenuLoadExampleNestedMenuAsyncAPI26PetstoreMenuItem", !0), h = t("TopBarFileMenuLoadExampleNestedMenuAsyncAPI30PetstoreMenuItem", !0), g = t("TopBarFileMenuLoadExampleNestedMenuAsyncAPI26StreetlightsMenuItem", !0), _ = t("TopBarFileMenuLoadExampleNestedMenuAsyncAPI30StreetlightsMenuItem", !0), v = t("TopBarFileMenuLoadExampleNestedMenuJSONSchema202012MenuItem", !0), y = t("TopBarFileMenuLoadExampleNestedMenuAPIDesignSystemsMenuItem", !0), b = o(async (e) => {
		await n.current.loadOpenAP32PetstoreFixture(e);
	}, []), x = o(async (e) => {
		await n.current.loadOpenAP31PetstoreFixture(e);
	}, []), S = o(async (e) => {
		await n.current.loadOpenAP30PetstoreFixture(e);
	}, []), C = o(async (e) => {
		await n.current.loadOpenAP20PetstoreFixture(e);
	}, []), w = o(async (e) => {
		await n.current.loadAsyncAPI26PetstoreFixture(e);
	}, []), T = o(async (e) => {
		await n.current.loadAsyncAPI30PetstoreFixture(e);
	}, []), E = o(async (e) => {
		await n.current.loadAsyncAPI26StreetlightsFixture(e);
	}, []), D = o(async (e) => {
		await n.current.loadAsyncAPI30StreetlightsFixture(e);
	}, []), O = o(async (e) => {
		await n.current.loadJSONSchema202012Fixture(e);
	}, []), k = o(async (e) => {
		await n.current.loadAPIDesignSystemsFixture(e);
	}, []);
	return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(oe, {
		...e,
		ref: n
	}), /* @__PURE__ */ m(r, {
		label: "Load Example",
		children: [
			/* @__PURE__ */ p(a, { onClick: b }),
			/* @__PURE__ */ p(s, { onClick: x }),
			/* @__PURE__ */ p(c, { onClick: S }),
			/* @__PURE__ */ p(u, { onClick: C }),
			/* @__PURE__ */ p(i, {}),
			/* @__PURE__ */ p(h, { onClick: T }),
			/* @__PURE__ */ p(d, { onClick: w }),
			/* @__PURE__ */ p(_, { onClick: D }),
			/* @__PURE__ */ p(g, { onClick: E }),
			/* @__PURE__ */ p(i, {}),
			/* @__PURE__ */ p(v, { onClick: O }),
			/* @__PURE__ */ p(i, {}),
			/* @__PURE__ */ p(y, { onClick: k })
		]
	})] });
};
se.propTypes = { getComponent: d.func.isRequired };
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/OpenAPI32PetstoreMenuItem.jsx
var ce = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "OpenAPI 3.2 Petstore"
});
ce.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/OpenAPI31PetstoreMenuItem.jsx
var A = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "OpenAPI 3.1 Petstore"
});
A.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/OpenAPI30PetstoreMenuItem.jsx
var j = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "OpenAPI 3.0 Petstore"
});
j.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/OpenAPI20PetstoreMenuItem.jsx
var M = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "OpenAPI 2.0 Petstore"
});
M.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/AsyncAPI26PetstoreMenuItem.jsx
var N = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "AsyncAPI 2.6 Petstore"
});
N.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/AsyncAPI30PetstoreMenuItem.jsx
var P = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "AsyncAPI 3.0 Petstore"
});
P.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/AsyncAPI26StreetlightsMenuItem.jsx
var F = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "AsyncAPI 2.6 Streetlights"
});
F.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/AsyncAPI30StreetlightsMenuItem.jsx
var I = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "AsyncAPI 3.0 Streetlights"
});
I.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/JSONSchema202012MenuItem.jsx
var L = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "JSON Schema 2020-12"
});
L.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/LoadExampleNestedMenu/items/APIDesignSystemsMenuItem.jsx
var R = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "API Design Systems"
});
R.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/SaveAsMenuItem.jsx
var z = ({ getComponent: e, editorSelectors: t, onClick: n, children: r = null }) => {
	let i = e("DropdownMenuItem"), a = t.selectIsContentFormatJSON() ? "Save (as JSON)" : t.selectIsContentFormatYAML() ? "Save (as YAML)" : "Save";
	return /* @__PURE__ */ p(i, {
		onClick: n,
		children: r || a
	});
};
z.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectIsContentFormatJSON: d.func.isRequired,
		selectIsContentFormatYAML: d.func.isRequired
	}).isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/ConvertAndSaveAsJSONMenuItem.jsx
var B = ({ getComponent: e, editorSelectors: t, children: n = null, onClick: r }) => {
	let i = e("DropdownMenuItem");
	return t.selectIsContentFormatYAML() ? /* @__PURE__ */ p(i, {
		onClick: r,
		children: n || "Convert and Save as JSON"
	}) : null;
};
B.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({ selectIsContentFormatYAML: d.func.isRequired }).isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/ConvertAndSaveAsYAMLMenuItem.jsx
var V = ({ getComponent: e, editorSelectors: t, children: n = null, onClick: r }) => {
	let i = e("DropdownMenuItem");
	return t.selectIsContentFormatJSON() ? /* @__PURE__ */ p(i, {
		onClick: r,
		children: n || "Convert and Save as YAML"
	}) : null;
};
V.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({ selectIsContentFormatJSON: d.func.isRequired }).isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/DownloadResolvedJSONMenuItem.jsx
var H = ({ getComponent: e, editorSelectors: t, onClick: n, children: r = null }) => {
	let i = e("DropdownMenuItem"), a = t.selectIsContentTypeOpenAPI(), o = t.selectIsContentTypeAsyncAPI(), s = t.selectIsContentFormatJSON(), c = t.selectIsContentFormatYAML();
	return (a || o) && (s || c) ? /* @__PURE__ */ p(i, {
		onClick: n,
		children: r || "Download Resolved JSON"
	}) : null;
};
H.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectIsContentTypeOpenAPI: d.func.isRequired,
		selectIsContentTypeAsyncAPI: d.func.isRequired,
		selectIsContentFormatJSON: d.func.isRequired,
		selectIsContentFormatYAML: d.func.isRequired
	}).isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/FileMenu/items/DownloadResolvedYAMLMenuItem.jsx
var U = ({ getComponent: e, editorSelectors: t, onClick: n, children: r = null }) => {
	let i = e("DropdownMenuItem"), a = t.selectIsContentTypeOpenAPI(), o = t.selectIsContentTypeAsyncAPI(), s = t.selectIsContentFormatJSON(), c = t.selectIsContentFormatYAML();
	return (a || o) && (s || c) ? /* @__PURE__ */ p(i, {
		onClick: n,
		children: r || "Download Resolved YAML"
	}) : null;
};
U.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectIsContentTypeOpenAPI: d.func.isRequired,
		selectIsContentTypeAsyncAPI: d.func.isRequired,
		selectIsContentFormatJSON: d.func.isRequired,
		selectIsContentFormatYAML: d.func.isRequired
	}).isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/EditMenu/items/ConvertToJSONMenuItemHandler.jsx
var W = a(({ getComponent: e, editorSelectors: t, editorActions: n, EditorContentOrigin: r }, i) => {
	let [a, o] = u(!1), c = l(""), d = e("AlertDialog", !0);
	return s(i, () => ({ async convertToJSON() {
		let e = t.selectContent(), i = await n.convertContentToJSON(e);
		if (i.error) {
			c.current = i.meta.errorMessage, o(!0);
			return;
		}
		n.setContent(i.payload, r.Conversion);
	} })), /* @__PURE__ */ p(d, {
		isOpen: a,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			c.current = "", o(!1);
		},
		children: c.current
	});
});
W.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectInferFileNameWithExtensionFromContent: d.func.isRequired
	}).isRequired,
	editorActions: d.shape({
		convertContentToJSON: d.func.isRequired,
		setContent: d.func.isRequired
	}).isRequired,
	EditorContentOrigin: d.shape({ Conversion: d.string.isRequired }).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/EditMenu/items/ConvertToYAMLMenuItemHandler.jsx
var G = a(({ getComponent: e, editorSelectors: t, editorActions: n, EditorContentOrigin: r }, i) => {
	let [a, o] = u(!1), c = l(""), d = e("AlertDialog", !0);
	return s(i, () => ({ async convertToYAML() {
		let e = t.selectContent(), i = await n.convertContentToYAML(e);
		if (i.error) {
			c.current = i.meta.errorMessage, o(!0);
			return;
		}
		n.setContent(i.payload, r.Conversion);
	} })), /* @__PURE__ */ p(d, {
		isOpen: a,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			c.current = "", o(!1);
		},
		children: c.current
	});
});
G.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectInferFileNameWithExtensionFromContent: d.func.isRequired
	}).isRequired,
	editorActions: d.shape({
		convertContentToYAML: d.func.isRequired,
		setContent: d.func.isRequired
	}).isRequired,
	EditorContentOrigin: d.shape({ Conversion: d.string.isRequired }).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/EditMenu/items/ConvertToOpenAPI30xMenuItemHandler.jsx
var K = a(({ getComponent: e, editorSelectors: t, editorActions: n, EditorContentOrigin: r, getConfigs: i }, a) => {
	let [o, d] = u(!1), [h, g] = u(!1), _ = l(""), v = c(() => i().swagger2ConverterUrl ?? t.selectOpenAPI20ConverterURL(), [i, t]), y = e("AlertDialog", !0), b = e("ConfirmDialog", !0);
	return s(a, () => ({ openModal() {
		g(!0);
	} })), /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(y, {
		isOpen: o,
		title: "Uh oh, an error has occurred",
		onClose: () => {
			d(!1);
		},
		children: _.current
	}), /* @__PURE__ */ m(b, {
		isOpen: h,
		title: "Convert to OpenAPI 3.0.x",
		onClose: async (e) => {
			if (e) {
				let e = t.selectContent(), i = t.selectIsContentFormatJSON() ? "application/json" : "application/yaml", a = await n.convertOpenAPI20ToOpenAPI30x({
					openAPI2Content: e,
					contentType: i
				});
				a.error ? (_.current = a.meta.errorMessage, g(!1), d(!0)) : (n.setContent(a.payload, r.Conversion), _.current = "", g(!1));
			} else _.current = "", g(!1);
		},
		children: [/* @__PURE__ */ p("p", { children: "This feature uses the Swagger Converter API to convert your OpenAPI 2.0 definition to OpenAPI 3.0.x." }), /* @__PURE__ */ m("p", { children: [
			"Swagger Editor's contents will be sent to ",
			/* @__PURE__ */ p("strong", { children: v }),
			" and overwritten by the conversion result."
		] })]
	})] });
});
K.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectContentType: d.func.isRequired,
		selectIsContentFormatJSON: d.func.isRequired,
		selectInferFileNameWithExtensionFromContent: d.func.isRequired,
		selectOpenAPI20ConverterURL: d.func.isRequired
	}).isRequired,
	editorActions: d.shape({
		convertOpenAPI20ToOpenAPI30x: d.func.isRequired,
		setContent: d.func.isRequired
	}).isRequired,
	EditorContentOrigin: d.shape({ Conversion: d.string.isRequired }).isRequired,
	getConfigs: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/EditMenu/EditMenuHandler.jsx
var q = a((e, t) => {
	let { editorActions: n } = e, r = l(null), i = l(null), a = l(null);
	return s(t, () => ({
		clear() {
			n.clearContent();
		},
		async convertToJSON() {
			await r.current.convertToJSON();
		},
		async convertToYAML() {
			await i.current.convertToYAML();
		},
		convertOpenAPI20ToOpenAPI30xClick() {
			a.current.openModal();
		}
	})), /* @__PURE__ */ m(f, { children: [
		/* @__PURE__ */ p(W, {
			ref: r,
			...e
		}),
		/* @__PURE__ */ p(G, {
			ref: i,
			...e
		}),
		/* @__PURE__ */ p(K, {
			ref: a,
			...e
		})
	] });
});
q.propTypes = {
	editorActions: d.shape({
		clearContent: d.func.isRequired,
		convertContentToYAML: d.func.isRequired,
		setContent: d.func.isRequired
	}).isRequired,
	editorContentFixturesSelectors: d.shape({}).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/EditMenu/EditMenu.jsx
var le = (e) => {
	let { getComponent: t } = e, n = t("DropdownMenu"), r = t("TopBarEditMenuClearMenuItem", !0), i = t("TopBarEditMenuConvertToJSONMenuItem", !0), a = t("TopBarEditMenuConvertToYAMLMenuItem", !0), s = t("TopBarEditMenuConvertToOpenAPI30xMenuItem", !0), c = l(null), u = o(() => {
		c.current.clear();
	}, []), d = o(async () => {
		await c.current.convertToJSON();
	}, []), h = o(async () => {
		await c.current.convertToYAML();
	}, []), g = o(async () => {
		await c.current.convertOpenAPI20ToOpenAPI30xClick();
	}, []);
	return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(q, {
		...e,
		ref: c
	}), /* @__PURE__ */ m(n, {
		label: "Edit",
		children: [
			/* @__PURE__ */ p(r, { onClick: u }),
			/* @__PURE__ */ p(i, { onClick: d }),
			/* @__PURE__ */ p(a, { onClick: h }),
			/* @__PURE__ */ p(s, { onClick: g })
		]
	})] });
};
le.propTypes = { getComponent: d.func.isRequired };
//#endregion
//#region src/plugins/top-bar/components/EditMenu/items/ClearMenuItem.jsx
var ue = ({ getComponent: e, onClick: t, children: n = null }) => /* @__PURE__ */ p(e("DropdownMenuItem"), {
	onClick: t,
	children: n || "Clear"
});
ue.propTypes = {
	getComponent: d.func.isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/EditMenu/items/ConvertToJSONMenuItem.jsx
var de = ({ getComponent: e, editorSelectors: t, onClick: n, children: r = null }) => {
	let i = e("DropdownMenuItem"), a = e("DropdownMenuItemDivider");
	return t.selectIsContentFormatYAML() ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(a, {}), /* @__PURE__ */ p(i, {
		onClick: n,
		children: r || "Convert to JSON"
	})] }) : null;
};
de.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({ selectIsContentFormatYAML: d.func.isRequired }).isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/EditMenu/items/ConvertToYAMLMenuItem.jsx
var fe = ({ getComponent: e, editorSelectors: t, onClick: n, children: r = null }) => {
	let i = e("DropdownMenuItem"), a = e("DropdownMenuItemDivider");
	return t.selectIsContentFormatJSON() ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(a, {}), /* @__PURE__ */ p(i, {
		onClick: n,
		children: r || "Convert to YAML"
	})] }) : null;
};
fe.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({ selectIsContentFormatJSON: d.func.isRequired }).isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/EditMenu/items/ConvertToOpenAPI30xMenuItem.jsx
var pe = ({ getComponent: e, editorSelectors: t, onClick: n, children: r = null }) => {
	let i = e("DropdownMenuItem");
	return t.selectIsContentTypeOpenAPI20() ? /* @__PURE__ */ p(i, {
		onClick: n,
		children: r || "Convert to OpenAPI 3.0.x"
	}) : null;
};
pe.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({ selectIsContentTypeOpenAPI20: d.func.isRequired }).isRequired,
	children: d.node,
	onClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/GenerateServerMenu/GenerateMenu.jsx
var J = ({ getComponent: e, items: t, label: n, onMenuItemClick: r }) => {
	let i = e("DropdownMenu"), a = e("DropdownMenuItem"), o = (e) => (t) => {
		r(t, e);
	};
	return /* @__PURE__ */ p(i, {
		label: n,
		isLong: !0,
		children: t.map((e) => /* @__PURE__ */ p(a, {
			onClick: o(e),
			children: e
		}, e))
	});
};
J.propTypes = {
	getComponent: d.func.isRequired,
	items: d.arrayOf(d.string).isRequired,
	label: d.string.isRequired,
	onMenuItemClick: d.func.isRequired
};
//#endregion
//#region src/plugins/top-bar/components/GenerateServerMenu/OpenAPI3GenerateServerMenu.jsx
var me = (e) => {
	let { getComponent: t, editorSelectors: n, editorTopBarSelectors: r, editorTopBarActions: i } = e, [a, s] = u(!1), c = n.selectIsContentTypeOpenAPI30x(), d = n.selectIsContentTypeOpenAPI31x(), h = r.selectOpenAPI3GeneratorServerList(), g = (c || d) && h !== null, _ = l(""), v = t("AlertDialog", !0), y = o(() => {
		_.current = "", s(!1);
	}, []), b = o(async (e, t) => {
		let r = n.selectContent(), a = await i.generateServerCodeFromOpenAPI3({
			content: r,
			framework: t
		});
		a.error && (_.current = a.meta.errorMessage, s(!0));
	}, [n, i]);
	return g ? /* @__PURE__ */ m(f, { children: [
		/* @__PURE__ */ p(v, {
			isOpen: a,
			title: "Uh oh, an error has occurred",
			onClose: y,
			children: _.current
		}),
		" ",
		/* @__PURE__ */ p(J, {
			label: "Generate Server",
			items: h,
			onMenuItemClick: b,
			...e
		})
	] }) : null;
};
me.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectIsContentTypeOpenAPI30x: d.func.isRequired,
		selectIsContentTypeOpenAPI31x: d.func.isRequired
	}).isRequired,
	editorTopBarSelectors: d.shape({ selectOpenAPI3GeneratorServerList: d.func.isRequired }).isRequired,
	editorTopBarActions: d.shape({ generateServerCodeFromOpenAPI3: d.func.isRequired }).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/GenerateServerMenu/OpenAPI3GenerateClientMenu.jsx
var he = (e) => {
	let { getComponent: t, editorSelectors: n, editorTopBarSelectors: r, editorTopBarActions: i } = e, [a, s] = u(!1), c = n.selectIsContentTypeOpenAPI30x(), d = n.selectIsContentTypeOpenAPI31x(), h = r.selectOpenAPI3GeneratorClientList(), g = (c || d) && h !== null, _ = l(""), v = t("AlertDialog", !0), y = o(() => {
		_.current = "", s(!1);
	}, []), b = o(async (e, t) => {
		let r = n.selectContent(), a = await i.generateClientCodeFromOpenAPI3({
			content: r,
			language: t
		});
		a.error && (_.current = a.meta.errorMessage, s(!0));
	}, [n, i]);
	return g ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
		isOpen: a,
		title: "Uh oh, an error has occurred",
		onClose: y,
		children: _.current
	}), /* @__PURE__ */ p(J, {
		label: "Generate Client",
		items: h,
		onMenuItemClick: b,
		...e
	})] }) : null;
};
he.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectIsContentTypeOpenAPI30x: d.func.isRequired,
		selectIsContentTypeOpenAPI31x: d.func.isRequired
	}).isRequired,
	editorTopBarSelectors: d.shape({ selectOpenAPI3GeneratorClientList: d.func.isRequired }).isRequired,
	editorTopBarActions: d.shape({ generateClientCodeFromOpenAPI3: d.func.isRequired }).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/GenerateServerMenu/OpenAPI2GenerateServerMenu.jsx
var ge = (e) => {
	let { editorTopBarActions: t, editorSelectors: n, editorTopBarSelectors: r, getComponent: i } = e, [a, s] = u(!1), c = n.selectIsContentTypeOpenAPI20(), d = r.selectOpenAPI2GeneratorServerList(), h = c && d !== null, g = l(""), _ = i("AlertDialog", !0), v = o(() => {
		g.current = "", s(!1);
	}, []), y = o(async (e, r) => {
		let i = n.selectContent(), a = await t.generateServerCodeFromOpenAPI20({
			content: i,
			framework: r
		});
		a.error && (g.current = a.meta.errorMessage, s(!0));
	}, [n, t]);
	return h ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(_, {
		isOpen: a,
		title: "Uh oh, an error has occurred",
		onClose: v,
		children: g.current
	}), /* @__PURE__ */ p(J, {
		label: "Generate Server",
		items: d,
		onMenuItemClick: y,
		...e
	})] }) : null;
};
ge.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectIsContentTypeOpenAPI20: d.func.isRequired
	}).isRequired,
	editorTopBarSelectors: d.shape({ selectOpenAPI2GeneratorServerList: d.func.isRequired }).isRequired,
	editorTopBarActions: d.shape({ generateServerCodeFromOpenAPI20: d.func.isRequired }).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/GenerateServerMenu/OpenAPI2GenerateClientMenu.jsx
var _e = (e) => {
	let { getComponent: t, editorSelectors: n, editorTopBarSelectors: r, editorTopBarActions: i } = e, [a, s] = u(!1), c = n.selectIsContentTypeOpenAPI20(), d = r.selectOpenAPI2GeneratorClientList(), h = c && d !== null, g = l(""), _ = t("AlertDialog", !0), v = o(() => {
		g.current = "", s(!1);
	}, []), y = o(async (e, t) => {
		let r = n.selectContent(), a = await i.generateClientCodeFromOpenAPI20({
			content: r,
			language: t
		});
		a.error && (g.current = a.meta.errorMessage, s(!0));
	}, [n, i]);
	return h ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(_, {
		isOpen: a,
		title: "Uh oh, an error has occurred",
		onClose: v,
		children: g.current
	}), /* @__PURE__ */ p(J, {
		label: "Generate Client",
		items: d,
		onMenuItemClick: y,
		...e
	})] }) : null;
};
_e.propTypes = {
	getComponent: d.func.isRequired,
	editorSelectors: d.shape({
		selectContent: d.func.isRequired,
		selectIsContentTypeOpenAPI20: d.func.isRequired
	}).isRequired,
	editorTopBarSelectors: d.shape({ selectOpenAPI2GeneratorClientList: d.func.isRequired }).isRequired,
	editorTopBarActions: d.shape({ generateClientCodeFromOpenAPI20: d.func.isRequired }).isRequired
};
//#endregion
//#region src/plugins/top-bar/components/AboutMenu/AboutMenu.jsx
var ve = ({ getComponent: e }) => {
	let t = e("DropdownMenu"), n = e("Link");
	return /* @__PURE__ */ m(t, {
		label: "About",
		children: [
			/* @__PURE__ */ p("div", { children: /* @__PURE__ */ p("li", {
				className: "dropdown-item",
				children: /* @__PURE__ */ p(n, {
					href: "https://swagger.io/tools/swagger-editor/",
					target: "_blank",
					children: "About Swagger Editor"
				})
			}) }),
			/* @__PURE__ */ p("div", { children: /* @__PURE__ */ p("li", {
				className: "dropdown-item",
				children: /* @__PURE__ */ p(n, {
					href: "https://swagger.io/docs/open-source-tools/swagger-editor/",
					target: "_blank",
					children: "View Docs"
				})
			}) }),
			/* @__PURE__ */ p("div", { children: /* @__PURE__ */ p("li", {
				className: "dropdown-item",
				children: /* @__PURE__ */ p(n, {
					href: "https://github.com/swagger-api/swagger-editor/tree/main",
					target: "_blank",
					children: "View on GitHub"
				})
			}) })
		]
	});
};
ve.propTypes = { getComponent: d.func.isRequired };
//#endregion
//#region src/plugins/top-bar/actions/upload-file.js
var ye = "editor_upload_file_started", be = "editor_upload_file_success", xe = "editor_upload_file_failure", Se = ({ requestId: e }) => ({
	type: ye,
	meta: { requestId: e }
}), Ce = ({ content: e, file: t, requestId: n }) => ({
	type: be,
	payload: e,
	meta: {
		file: t,
		requestId: n
	}
}), we = ({ error: e, requestId: t }) => ({
	type: xe,
	payload: e,
	error: !0,
	meta: { requestId: t }
}), Te = () => async (e) => {
	let { editorActions: t, fn: n } = e, r = n.generateRequestId();
	t.uploadFileStarted({ requestId: r });
	try {
		let [e] = await b({ multiple: !1 }), n = await e.text();
		return t.uploadFileSuccess({
			content: n,
			file: e,
			requestId: r
		});
	} catch (e) {
		return t.uploadFileFailure({
			error: e,
			requestId: r
		});
	}
}, Ee = "editor_download_content_started", De = "editor_download_content_success", Oe = "editor_download_content_failure", ke = ({ content: e, fileNameWithExtension: t, requestId: n }) => ({
	type: Ee,
	payload: e,
	meta: {
		requestId: n,
		fileNameWithExtension: t
	}
}), Ae = ({ fileNameWithExtension: e, content: t, requestId: n }) => ({
	type: De,
	payload: e,
	meta: {
		content: t,
		requestId: n
	}
}), je = ({ error: e, content: t, fileNameWithExtension: n, requestId: r }) => ({
	type: Oe,
	payload: e,
	error: !0,
	meta: {
		content: t,
		errorMessage: e.message || "Unknown error while downloading editor content",
		fileNameWithExtension: n,
		requestId: r
	}
}), Me = ({ content: e, fileNameWithExtension: t }) => async (n) => {
	let { editorActions: r, fn: i } = n, a = i.generateRequestId();
	r.downloadContentStarted({
		content: e,
		fileNameWithExtension: t,
		requestId: a
	});
	try {
		return x(e, t), r.downloadContentSuccess({
			fileNameWithExtension: t,
			content: e,
			requestId: a
		});
	} catch (n) {
		return r.downloadContentFailure({
			error: n,
			content: e,
			fileNameWithExtension: t,
			requestId: a
		});
	}
}, Ne = "editor_convert_content_to_json_started", Pe = "editor_convert_content_to_json_success", Fe = "editor_convert_content_to_json_failure", Ie = ({ content: e, requestId: t }) => ({
	type: Ne,
	payload: e,
	meta: { requestId: t }
}), Le = ({ contentJSON: e, content: t, requestId: n }) => ({
	type: Pe,
	payload: e,
	meta: {
		content: t,
		requestId: n
	}
}), Re = ({ error: e, content: t, requestId: n }) => ({
	type: Fe,
	payload: e,
	error: !0,
	meta: {
		content: t,
		errorMessage: e.message || "Unknown error while converting editor content to JSON",
		requestId: n
	}
}), ze = (e) => async (t) => {
	let { editorActions: n, fn: r } = t, i = r.generateRequestId();
	n.convertContentToJSONStarted({
		content: e,
		requestId: i
	});
	try {
		let t = g.load(e), r = JSON.stringify(t, null, 2);
		return n.convertContentToJSONSuccess({
			contentJSON: r,
			content: e,
			requestId: i
		});
	} catch (t) {
		return n.convertContentToJSONFailure({
			error: t,
			content: e,
			requestId: i
		});
	}
}, Be = "editor_convert_content_to_yaml_started", Ve = "editor_convert_content_to_yaml_success", He = "editor_convert_content_to_yaml_failure", Ue = ({ content: e, requestId: t }) => ({
	type: Be,
	payload: e,
	meta: { requestId: t }
}), We = ({ contentYAML: e, content: t, requestId: n }) => ({
	type: Ve,
	payload: e,
	meta: {
		content: t,
		requestId: n
	}
}), Ge = ({ error: e, content: t, requestId: n }) => ({
	type: He,
	payload: e,
	error: !0,
	meta: {
		content: t,
		errorMessage: e.message || "Unknown error while converting editor content to JSON",
		requestId: n
	}
}), Ke = (e) => async (t) => {
	let { editorActions: n, fn: r } = t, i = r.generateRequestId();
	n.convertContentToYAMLStarted({
		content: e,
		requestId: i
	});
	try {
		let t = JSON.parse(e), r = g.dump(t);
		return n.convertContentToYAMLSuccess({
			contentYAML: r,
			content: e,
			requestId: i
		});
	} catch (t) {
		return n.convertContentToYAMLFailure({
			error: t,
			content: e,
			requestId: i
		});
	}
}, qe = "editor_dereference_content_started", Je = "editor_dereference_content_success", Ye = "editor_dereference_content_failure", Xe = ({ content: e, baseURI: t, requestId: n }) => ({
	type: qe,
	payload: e,
	meta: {
		baseURI: t,
		requestId: n
	}
}), Ze = ({ contentDereferenced: e, content: t, baseURI: n, requestId: r }) => ({
	type: Je,
	payload: e,
	meta: {
		content: t,
		baseURI: n,
		requestId: r
	}
}), Qe = ({ error: e, content: t, baseURI: n, requestId: r }) => ({
	type: Ye,
	payload: e,
	error: !0,
	meta: {
		content: t,
		errorMessage: e.message || "Unknown error while dereferencing editor content",
		baseURI: n,
		requestId: r
	}
}), $e = ({ content: e, baseURI: t }) => async (n) => {
	let { editorActions: r, fn: i } = n, a = i.generateRequestId();
	r.dereferenceContentStarted({
		content: e,
		baseURI: t,
		requestId: a
	});
	try {
		let n = _.editor.getModels().find((t) => t.getValue() === e), o = await (await i.getApiDOMWorker()(n.uri)).doDeref(n.uri.toString(), { baseURI: t ?? globalThis.location.href });
		return r.dereferenceContentSuccess({
			contentDereferenced: o,
			content: e,
			baseURI: t,
			requestId: a
		});
	} catch (n) {
		return r.dereferenceContentFailure({
			error: n,
			content: e,
			baseURI: t,
			requestId: a
		});
	}
}, et = "editor_convert_openapi_2_to_openapi_3_started", tt = "editor_convert_openapi_2_to_openapi_3_success", nt = "editor_convert_openapi_2_to_openapi_3_failure", rt = ({ openAPI2Content: e, requestId: t }) => ({
	type: et,
	payload: e,
	meta: { requestId: t }
}), it = ({ openAPI30xContent: e, openAPI2Content: t, requestId: n }) => ({
	type: tt,
	payload: e,
	meta: {
		openAPI2Content: t,
		requestId: n
	}
}), at = ({ error: e, openAPI2Content: t, requestId: n }) => ({
	type: nt,
	payload: e,
	error: !0,
	meta: {
		openAPI2Content: t,
		errorMessage: e.response ? "The request was made and the server responded with a status code that falls out of the range of 2xx" : e.request ? "The request was made but no response was received" : e.message ? e.message : "Unknown error occurred",
		requestId: n
	}
}), ot = ({ openAPI2Content: e, contentType: t }) => async (n) => {
	let { editorActions: r, editorSelectors: i, fn: a } = n, { swagger2ConverterUrl: o } = n.getConfigs(), s = o ?? i.selectOpenAPI20ConverterURL(), c = a.generateRequestId();
	r.convertOpenAPI20ToOpenAPI30xStarted({
		openAPI2Content: e,
		requestId: c
	});
	try {
		let n = await y.post(s, e, { headers: {
			"Content-Type": t,
			Accept: t
		} }), i = t === "application/json" ? JSON.stringify(n.data, null, 2) : n.request.responseText;
		return r.convertOpenAPI20ToOpenAPI30xSuccess({
			openAPI30xContent: i,
			openAPI2Content: e,
			requestId: c
		});
	} catch (t) {
		return r.convertOpenAPI20ToOpenAPI30xFailure({
			error: t,
			openAPI2Content: e,
			requestId: c
		});
	}
}, st = "editor_top_bar_fetch_openapi3_generator_server_list_started", ct = "editor_top_bar_fetch_openapi3_generator_server_list_success", lt = "editor_top_bar_fetch_openapi3_generator_server_list_failure", ut = ({ url: e, requestId: t }) => ({
	type: st,
	meta: {
		url: e,
		requestId: t
	}
}), dt = ({ serverList: e, url: t, requestId: n }) => ({
	type: ct,
	payload: e,
	meta: {
		url: t,
		requestId: n
	}
}), ft = ({ error: e, url: t, requestId: n }) => ({
	type: lt,
	payload: e,
	error: !0,
	meta: {
		errorMessage: e.response ? "The request was made and the server responded with a status code that falls out of the range of 2xx" : e.request ? "The request was made but no response was received" : e.message ? e.message : "Unknown error occurred",
		url: t,
		requestId: n
	}
}), pt = () => async (e) => {
	let { editorTopBarActions: t, editorTopBarSelectors: n, fn: r } = e, i = r.generateRequestId(), a = n.selectOpenAPI3GeneratorServerListURL();
	t.fetchOpenAPI3GeneratorServerListStarted({
		url: a,
		requestId: i
	});
	try {
		let e = await y.get(a);
		return t.fetchOpenAPI3GeneratorServerListSuccess({
			serverList: e.data,
			url: a,
			requestId: i
		});
	} catch (e) {
		return t.fetchOpenAPI3GeneratorServerListFailure({
			error: e,
			url: a,
			requestId: i
		});
	}
}, mt = "editor_top_bar_fetch_openapi3_generator_client_list_started", ht = "editor_top_bar_fetch_openapi3_generator_client_list_success", gt = "editor_top_bar_fetch_openapi3_generator_client_list_failure", _t = ({ url: e, requestId: t }) => ({
	type: mt,
	meta: {
		url: e,
		requestId: t
	}
}), vt = ({ clientList: e, url: t, requestId: n }) => ({
	type: ht,
	payload: e,
	meta: {
		url: t,
		requestId: n
	}
}), yt = ({ error: e, url: t, requestId: n }) => ({
	type: gt,
	payload: e,
	error: !0,
	meta: {
		errorMessage: e.response ? "The request was made and the server responded with a status code that falls out of the range of 2xx" : e.request ? "The request was made but no response was received" : e.message ? e.message : "Unknown error occurred",
		url: t,
		requestId: n
	}
}), bt = () => async (e) => {
	let { editorTopBarActions: t, editorTopBarSelectors: n, fn: r } = e, i = r.generateRequestId(), a = n.selectOpenAPI3GeneratorClientListURL();
	t.fetchOpenAPI3GeneratorClientListStarted({
		url: a,
		requestId: i
	});
	try {
		let e = await y.get(a);
		return t.fetchOpenAPI3GeneratorClientListSuccess({
			clientList: e.data,
			url: a,
			requestId: i
		});
	} catch (e) {
		return t.fetchOpenAPI3GeneratorClientListFailure({
			error: e,
			url: a,
			requestId: i
		});
	}
}, xt = "editor_top_bar_fetch_openapi2_generator_server_list_started", St = "editor_top_bar_fetch_openapi2_generator_server_list_success", Y = "editor_top_bar_fetch_openapi2_generator_server_list_failure", Ct = ({ url: e, requestId: t }) => ({
	type: xt,
	meta: {
		url: e,
		requestId: t
	}
}), wt = ({ serverList: e, url: t, requestId: n }) => ({
	type: St,
	payload: e,
	meta: {
		url: t,
		requestId: n
	}
}), Tt = ({ error: e, url: t, requestId: n }) => ({
	type: Y,
	payload: e,
	error: !0,
	meta: {
		errorMessage: e.response ? "The request was made and the server responded with a status code that falls out of the range of 2xx" : e.request ? "The request was made but no response was received" : e.message ? e.message : "Unknown error occurred",
		url: t,
		requestId: n
	}
}), Et = () => async (e) => {
	let { editorTopBarActions: t, editorTopBarSelectors: n, fn: r } = e, i = r.generateRequestId(), a = n.selectOpenAPI2GeneratorServerListURL();
	t.fetchOpenAPI2GeneratorServerListStarted({
		url: a,
		requestId: i
	});
	try {
		let e = await y.get(a);
		return t.fetchOpenAPI2GeneratorServerListSuccess({
			serverList: e.data,
			url: a,
			requestId: i
		});
	} catch (e) {
		return t.fetchOpenAPI2GeneratorServerListFailure({
			error: e,
			url: a,
			requestId: i
		});
	}
}, Dt = "editor_top_bar_fetch_openapi2_generator_client_list_started", Ot = "editor_top_bar_fetch_openapi2_generator_client_list_success", kt = "editor_top_bar_fetch_openapi2_generator_client_list_failure", At = ({ url: e, requestId: t }) => ({
	type: Dt,
	meta: {
		url: e,
		requestId: t
	}
}), jt = ({ clientList: e, url: t, requestId: n }) => ({
	type: Ot,
	payload: e,
	meta: {
		url: t,
		requestId: n
	}
}), Mt = ({ error: e, url: t, requestId: n }) => ({
	type: kt,
	payload: e,
	error: !0,
	meta: {
		errorMessage: e.response ? "The request was made and the server responded with a status code that falls out of the range of 2xx" : e.request ? "The request was made but no response was received" : e.message ? e.message : "Unknown error occurred",
		url: t,
		requestId: n
	}
}), Nt = () => async (e) => {
	let { editorTopBarActions: t, editorTopBarSelectors: n, fn: r } = e, i = r.generateRequestId(), a = n.selectOpenAPI2GeneratorClientListURL();
	t.fetchOpenAPI2GeneratorClientListStarted({
		url: a,
		requestId: i
	});
	try {
		let e = await y.get(a);
		return t.fetchOpenAPI2GeneratorClientListSuccess({
			clientList: e.data,
			url: a,
			requestId: i
		});
	} catch (e) {
		return t.fetchOpenAPI2GeneratorClientListFailure({
			error: e,
			url: a,
			requestId: i
		});
	}
}, Pt = "editor_top_bar_generate_server_code_from_openapi3_started", Ft = "editor_top_bar_generate_server_code_from_openapi3_success", It = "editor_top_bar_generate_server_code_from_openapi3_failure", Lt = ({ content: e, framework: t, requestId: n }) => ({
	type: Pt,
	payload: e,
	meta: {
		framework: t,
		requestId: n
	}
}), Rt = ({ blob: e, content: t, framework: n, fileNameWithExtension: r, requestId: i }) => ({
	type: Ft,
	payload: e,
	meta: {
		content: t,
		framework: n,
		fileNameWithExtension: r,
		requestId: i
	}
}), zt = ({ error: e, content: t, framework: n, requestId: r }) => ({
	type: It,
	payload: e,
	error: !0,
	meta: {
		errorMessage: e.response ? "The request was made and the server responded with a status code that falls out of the range of 2xx" : e.request ? "The request was made but no response was received" : e.message ? e.message : "Unknown error occurred",
		content: t,
		framework: n,
		requestId: r
	}
}), Bt = ({ content: e, framework: t }) => async (n) => {
	let { editorTopBarActions: r, editorTopBarSelectors: i, fn: a } = n, o = a.generateRequestId(), s = i.selectOpenAPI3GenerateServerURL(), c = `${t}-server-generated.zip`;
	r.generateServerCodeFromOpenAPI3Started({
		content: e,
		framework: t,
		requestId: o
	});
	try {
		let n = {
			spec: g.load(e),
			lang: t,
			type: "SERVER"
		}, i = await y.post(s, n, { responseType: "blob" });
		return x(i.data, c), r.generateServerCodeFromOpenAPI3Success({
			blob: i.data,
			fileNameWithExtension: c,
			content: e,
			framework: t,
			requestId: o
		});
	} catch (n) {
		return r.generateServerCodeFromOpenAPI3Failure({
			error: n,
			content: e,
			framework: t,
			requestId: o
		});
	}
}, Vt = "editor_top_bar_generate_client_code_from_openapi3_started", Ht = "editor_top_bar_generate_client_code_from_openapi3_success", Ut = "editor_top_bar_generate_client_code_from_openapi3_failure", Wt = ({ content: e, language: t, requestId: n }) => ({
	type: Vt,
	payload: e,
	meta: {
		language: t,
		requestId: n
	}
}), Gt = ({ blob: e, content: t, language: n, fileNameWithExtension: r, requestId: i }) => ({
	type: Ht,
	payload: e,
	meta: {
		content: t,
		language: n,
		fileNameWithExtension: r,
		requestId: i
	}
}), Kt = ({ error: e, content: t, language: n, requestId: r }) => ({
	type: Ut,
	payload: e,
	error: !0,
	meta: {
		errorMessage: e.response ? "The request was made and the server responded with a status code that falls out of the range of 2xx" : e.request ? "The request was made but no response was received" : e.message ? e.message : "Unknown error occurred",
		content: t,
		language: n,
		requestId: r
	}
}), qt = ({ content: e, language: t }) => async (n) => {
	let { editorTopBarActions: r, editorTopBarSelectors: i, fn: a } = n, o = a.generateRequestId(), s = i.selectOpenAPI3GenerateClientURL(), c = `${t}-client-generated.zip`;
	r.generateClientCodeFromOpenAPI3Started({
		content: e,
		language: t,
		requestId: o
	});
	try {
		let n = {
			spec: g.load(e),
			lang: t,
			type: "CLIENT"
		}, i = await y.post(s, n, { responseType: "blob" });
		return x(i.data, c), r.generateClientCodeFromOpenAPI3Success({
			blob: i.data,
			fileNameWithExtension: c,
			content: e,
			language: t,
			requestId: o
		});
	} catch (n) {
		return r.generateClientCodeFromOpenAPI3Failure({
			error: n,
			content: e,
			language: t,
			requestId: o
		});
	}
}, Jt = "editor_top_bar_generate_server_code_from_openapi20_started", Yt = "editor_top_bar_generate_server_code_from_openapi20_success", Xt = "editor_top_bar_generate_server_code_from_openapi20_failure", Zt = ({ content: e, framework: t, requestId: n }) => ({
	type: Jt,
	payload: e,
	meta: {
		framework: t,
		requestId: n
	}
}), Qt = ({ blob: e, content: t, framework: n, fileNameWithExtension: r, requestId: i }) => ({
	type: Yt,
	payload: e,
	meta: {
		content: t,
		framework: n,
		fileNameWithExtension: r,
		requestId: i
	}
}), $t = ({ error: e, content: t, framework: n, requestId: r }) => ({
	type: Xt,
	payload: e,
	error: !0,
	meta: {
		errorMessage: e.response ? "The request was made and the server responded with a status code that falls out of the range of 2xx" : e.request ? "The request was made but no response was received" : e.message ? e.message : "Unknown error occurred",
		content: t,
		framework: n,
		requestId: r
	}
}), en = ({ content: e, framework: t }) => async (n) => {
	let { editorTopBarActions: r, editorTopBarSelectors: i, fn: a } = n, o = a.generateRequestId(), s = `${i.selectOpenAPI2GenerateServerURL()}/${t}`, c = `${t}-server-generated.zip`;
	r.generateServerCodeFromOpenAPI20Started({
		content: e,
		framework: t,
		requestId: o
	});
	try {
		let n = { spec: g.load(e) }, { data: { link: i } } = await y.post(s, n), a = await y.get(i, { responseType: "blob" });
		return x(a.data, c), r.generateServerCodeFromOpenAPI20Success({
			blob: a.data,
			fileNameWithExtension: c,
			content: e,
			framework: t,
			requestId: o
		});
	} catch (n) {
		return r.generateServerCodeFromOpenAPI20Failure({
			error: n,
			content: e,
			framework: t,
			requestId: o
		});
	}
}, tn = "editor_top_bar_generate_client_code_from_openapi20_started", nn = "editor_top_bar_generate_client_code_from_openapi20_success", rn = "editor_top_bar_generate_client_code_from_openapi20_failure", an = ({ content: e, language: t, requestId: n }) => ({
	type: tn,
	payload: e,
	meta: {
		language: t,
		requestId: n
	}
}), on = ({ blob: e, content: t, language: n, fileNameWithExtension: r, requestId: i }) => ({
	type: nn,
	payload: e,
	meta: {
		content: t,
		language: n,
		fileNameWithExtension: r,
		requestId: i
	}
}), sn = ({ error: e, content: t, language: n, requestId: r }) => ({
	type: rn,
	payload: e,
	error: !0,
	meta: {
		errorMessage: e.response ? "The request was made and the server responded with a status code that falls out of the range of 2xx" : e.request ? "The request was made but no response was received" : e.message ? e.message : "Unknown error occurred",
		content: t,
		language: n,
		requestId: r
	}
}), cn = ({ content: e, language: t }) => async (n) => {
	let { editorTopBarActions: r, editorTopBarSelectors: i, fn: a } = n, o = a.generateRequestId(), s = `${i.selectOpenAPI2GenerateClientURL()}/${t}`, c = `${t}-client-generated.zip`;
	r.generateClientCodeFromOpenAPI20Started({
		content: e,
		language: t,
		requestId: o
	});
	try {
		let n = { spec: g.load(e) }, { data: { link: i } } = await y.post(s, n), a = await y.get(i, { responseType: "blob" });
		return x(a.data, c), r.generateClientCodeFromOpenAPI20Success({
			blob: a.data,
			fileNameWithExtension: c,
			content: e,
			language: t,
			requestId: o
		});
	} catch (n) {
		return r.generateClientCodeFromOpenAPI20Failure({
			error: n,
			content: e,
			language: t,
			requestId: o
		});
	}
}, ln = e((e, t) => ({ definition: e }) => {
	let { editorActions: n, EditorContentOrigin: r } = t;
	n.setContent(e, r.ImportUrl);
}), un = e((e, t) => ({ content: e }) => {
	let { editorActions: n, EditorContentOrigin: r } = t;
	n.setContent(e, r.ImportFile);
}), dn = "idle", X = "fetching", Z = "success", Q = "failure", fn = (e, t) => (e.get("openAPI3GeneratorServerListStatus") || "idle") === "fetching" ? e : e.merge({
	openAPI3GeneratorServerListStatus: X,
	openAPI3GeneratorServerListRequestId: t.meta.requestId
}), pn = (e, t) => {
	let n = e.get("openAPI3GeneratorServerListStatus") || "idle", r = e.get("openAPI3GeneratorServerListRequestId");
	return n === "fetching" && r === t.meta.requestId ? e.merge({
		openAPI3GeneratorServerListStatus: Z,
		openAPI3GeneratorServerList: v.of(...t.payload),
		openAPI3GeneratorServerListError: null,
		openAPI3GeneratorServerListRequestId: null
	}) : e;
}, mn = (e, t) => {
	let n = e.get("openAPI3GeneratorServerListStatus") || "idle", r = e.get("openAPI3GeneratorServerListRequestId");
	return n === "fetching" && r === t.meta.requestId ? e.merge({
		openAPI3GeneratorServerListStatus: Q,
		openAPI3GeneratorServerList: null,
		openAPI3GeneratorServerListError: t.payload,
		openAPI3GeneratorServerListRequestId: null
	}) : e;
}, hn = (e, t) => (e.get("openAPI3GeneratorClientListStatus") || "idle") === "fetching" ? e : e.merge({
	openAPI3GeneratorClientListStatus: X,
	openAPI3GeneratorClientListRequestId: t.meta.requestId
}), gn = (e, t) => {
	let n = e.get("openAPI3GeneratorClientListStatus") || "idle", r = e.get("openAPI3GeneratorClientListRequestId");
	return n === "fetching" && r === t.meta.requestId ? e.merge({
		openAPI3GeneratorClientListStatus: Z,
		openAPI3GeneratorClientList: v.of(...t.payload),
		openAPI3GeneratorClientListError: null,
		openAPI3GeneratorClientListRequestId: null
	}) : e;
}, _n = (e, t) => {
	let n = e.get("openAPI3GeneratorClientListStatus") || "idle", r = e.get("openAPI3GeneratorClientListRequestId");
	return n === "fetching" && r === t.meta.requestId ? e.merge({
		openAPI3GeneratorClientListStatus: Q,
		openAPI3GeneratorClientList: null,
		openAPI3GeneratorClientListError: t.payload,
		openAPI3GeneratorClientListRequestId: null
	}) : e;
}, vn = (e, t) => (e.get("openAPI2GeneratorServerListStatus") || "idle") === "fetching" ? e : e.merge({
	openAPI2GeneratorServerListStatus: X,
	openAPI2GeneratorServerListRequestId: t.meta.requestId
}), yn = (e, t) => {
	let n = e.get("openAPI2GeneratorServerListStatus") || "idle", r = e.get("openAPI2GeneratorServerListRequestId");
	return n === "fetching" && r === t.meta.requestId ? e.merge({
		openAPI2GeneratorServerListStatus: Z,
		openAPI2GeneratorServerList: v.of(...t.payload),
		openAPI2GeneratorServerListError: null,
		openAPI2GeneratorServerListRequestId: null
	}) : e;
}, bn = (e, t) => {
	let n = e.get("openAPI2GeneratorServerListStatus") || "idle", r = e.get("openAPI2GeneratorServerListRequestId");
	return n === "fetching" && r === t.meta.requestId ? e.merge({
		openAPI2GeneratorServerListStatus: Q,
		openAPI2GeneratorServerList: null,
		openAPI2GeneratorServerListError: t.payload,
		openAPI2GeneratorServerListRequestId: null
	}) : e;
}, xn = (e, t) => (e.get("openAPI2GeneratorClientListStatus") || "idle") === "fetching" ? e : e.merge({
	openAPI2GeneratorClientListStatus: X,
	openAPI2GeneratorClientListRequestId: t.meta.requestId
}), Sn = (e, t) => {
	let n = e.get("openAPI2GeneratorClientListStatus") || "idle", r = e.get("openAPI2GeneratorClientListRequestId");
	return n === "fetching" && r === t.meta.requestId ? e.merge({
		openAPI2GeneratorClientListStatus: Z,
		openAPI2GeneratorClientList: v.of(...t.payload),
		openAPI2GeneratorClientListError: null,
		openAPI2GeneratorClientListRequestId: null
	}) : e;
}, Cn = (e, t) => {
	let n = e.get("openAPI2GeneratorClientListStatus") || "idle", r = e.get("openAPI2GeneratorClientListRequestId");
	return n === "fetching" && r === t.meta.requestId ? e.merge({
		openAPI2GeneratorClientListStatus: Q,
		openAPI2GeneratorClientList: null,
		openAPI2GeneratorClientListError: t.payload,
		openAPI2GeneratorClientListRequestId: null
	}) : e;
}, wn = {
	[st]: fn,
	[ct]: pn,
	[lt]: mn,
	[mt]: hn,
	[ht]: gn,
	[gt]: _n,
	[xt]: vn,
	[St]: yn,
	[Y]: bn,
	[Dt]: xn,
	[Ot]: Sn,
	[kt]: Cn
}, Tn = e((e, t) => () => {
	let { editorSelectors: e, editorTopBarSelectors: n, editorTopBarActions: r } = t, i = [dn, Q];
	i.includes(n.selectOpenAPI3GeneratorServerListStatus()) && (e.selectIsContentTypeOpenAPI30x() || e.selectIsContentTypeOpenAPI31x()) && r.fetchOpenAPI3GeneratorServerList(), i.includes(n.selectOpenAPI3GeneratorClientListStatus()) && (e.selectIsContentTypeOpenAPI30x() || e.selectIsContentTypeOpenAPI31x()) && r.fetchOpenAPI3GeneratorClientList(), i.includes(n.selectOpenAPI2GeneratorServerListStatus()) && e.selectIsContentTypeOpenAPI20() && r.fetchOpenAPI2GeneratorServerList(), i.includes(n.selectOpenAPI2GeneratorClientListStatus()) && e.selectIsContentTypeOpenAPI20() && r.fetchOpenAPI2GeneratorClientList();
}), En = () => "https://converter.swagger.io/api/convert", $ = (e) => e, Dn = () => "https://generator3.swagger.io/api/servers", On = () => "https://generator3.swagger.io/api/generate", kn = (e) => e.get("openAPI3GeneratorServerListStatus") || "idle", An = h(kn, $, (e, t) => e === "success" ? t.get("openAPI3GeneratorServerList").toJS() : null), jn = () => "https://generator3.swagger.io/api/clients", Mn = () => "https://generator3.swagger.io/api/generate", Nn = (e) => e.get("openAPI3GeneratorClientListStatus") || "idle", Pn = h(Nn, $, (e, t) => e === "success" ? t.get("openAPI3GeneratorClientList").toJS() : null), Fn = () => "https://generator.swagger.io/api/gen/servers", In = () => "https://generator.swagger.io/api/gen/servers", Ln = (e) => e.get("openAPI2GeneratorServerListStatus") || "idle", Rn = h(Ln, $, (e, t) => e === "success" ? t.get("openAPI2GeneratorServerList").toJS() : null), zn = () => "https://generator.swagger.io/api/gen/clients", Bn = () => "https://generator.swagger.io/api/gen/clients", Vn = (e) => e.get("openAPI2GeneratorClientListStatus") || "idle", Hn = h(Vn, $, (e, t) => e === "success" ? t.get("openAPI2GeneratorClientList").toJS() : null), Un = () => ({
	components: {
		TopBar: S,
		TopBarLogo: w,
		TopBarFileMenu: re,
		TopBarFileMenuImportUrlMenuItem: ie,
		TopBarFileMenuImportFileMenuItem: ae,
		TopBarFileMenuLoadExampleNestedMenu: se,
		TopBarFileMenuLoadExampleNestedMenuOpenAPI32PetstoreMenuItem: ce,
		TopBarFileMenuLoadExampleNestedMenuOpenAPI31PetstoreMenuItem: A,
		TopBarFileMenuLoadExampleNestedMenuOpenAPI30PetstoreMenuItem: j,
		TopBarFileMenuLoadExampleNestedMenuOpenAPI20PetstoreMenuItem: M,
		TopBarFileMenuLoadExampleNestedMenuAsyncAPI30PetstoreMenuItem: P,
		TopBarFileMenuLoadExampleNestedMenuAsyncAPI26PetstoreMenuItem: N,
		TopBarFileMenuLoadExampleNestedMenuAsyncAPI26StreetlightsMenuItem: F,
		TopBarFileMenuLoadExampleNestedMenuAsyncAPI30StreetlightsMenuItem: I,
		TopBarFileMenuLoadExampleNestedMenuJSONSchema202012MenuItem: L,
		TopBarFileMenuLoadExampleNestedMenuAPIDesignSystemsMenuItem: R,
		TopBarFileMenuSaveAsMenuItem: z,
		TopBarFileMenuConvertAndSaveAsJSONMenuItem: B,
		TopBarFileMenuConvertAndSaveAsYAMLMenuItem: V,
		TopBarFileMenuDownloadResolvedJSONMenuItem: H,
		TopBarFileMenuDownloadResolvedYAMLMenuItem: U,
		TopBarEditMenu: le,
		TopBarEditMenuClearMenuItem: ue,
		TopBarEditMenuConvertToJSONMenuItem: de,
		TopBarEditMenuConvertToYAMLMenuItem: fe,
		TopBarEditMenuConvertToOpenAPI30xMenuItem: pe,
		TopBarOpenAPI3GenerateServerMenu: me,
		TopBarOpenAPI3GenerateClientMenu: he,
		TopBarOpenAPI2GenerateServerMenu: ge,
		TopBarOpenAPI2GenerateClientMenu: _e,
		TopBarAboutMenu: ve
	},
	statePlugins: {
		editor: {
			actions: {
				importUrl: r,
				importUrlStarted: n,
				importUrlSuccess: t,
				importUrlFailure: i,
				uploadFile: Te,
				uploadFileStarted: Se,
				uploadFileSuccess: Ce,
				uploadFileFailure: we,
				downloadContent: Me,
				downloadContentStarted: ke,
				downloadContentSuccess: Ae,
				downloadContentFailure: je,
				convertContentToJSON: ze,
				convertContentToJSONStarted: Ie,
				convertContentToJSONSuccess: Le,
				convertContentToJSONFailure: Re,
				convertContentToYAML: Ke,
				convertContentToYAMLStarted: Ue,
				convertContentToYAMLSuccess: We,
				convertContentToYAMLFailure: Ge,
				dereferenceContent: $e,
				dereferenceContentStarted: Xe,
				dereferenceContentSuccess: Ze,
				dereferenceContentFailure: Qe,
				convertOpenAPI20ToOpenAPI30x: ot,
				convertOpenAPI20ToOpenAPI30xStarted: rt,
				convertOpenAPI20ToOpenAPI30xSuccess: it,
				convertOpenAPI20ToOpenAPI30xFailure: at
			},
			wrapActions: {
				detectContentTypeSuccess: Tn,
				importUrlSuccess: ln,
				uploadFileSuccess: un
			},
			selectors: { selectOpenAPI20ConverterURL: En }
		},
		editorTopBar: {
			actions: {
				fetchOpenAPI3GeneratorServerList: pt,
				fetchOpenAPI3GeneratorServerListStarted: ut,
				fetchOpenAPI3GeneratorServerListSuccess: dt,
				fetchOpenAPI3GeneratorServerListFailure: ft,
				fetchOpenAPI3GeneratorClientList: bt,
				fetchOpenAPI3GeneratorClientListStarted: _t,
				fetchOpenAPI3GeneratorClientListSuccess: vt,
				fetchOpenAPI3GeneratorClientListFailure: yt,
				fetchOpenAPI2GeneratorServerList: Et,
				fetchOpenAPI2GeneratorServerListStarted: Ct,
				fetchOpenAPI2GeneratorServerListSuccess: wt,
				fetchOpenAPI2GeneratorServerListFailure: Tt,
				fetchOpenAPI2GeneratorClientList: Nt,
				fetchOpenAPI2GeneratorClientListStarted: At,
				fetchOpenAPI2GeneratorClientListSuccess: jt,
				fetchOpenAPI2GeneratorClientListFailure: Mt,
				generateServerCodeFromOpenAPI3: Bt,
				generateServerCodeFromOpenAPI3Started: Lt,
				generateServerCodeFromOpenAPI3Success: Rt,
				generateServerCodeFromOpenAPI3Failure: zt,
				generateClientCodeFromOpenAPI3: qt,
				generateClientCodeFromOpenAPI3Started: Wt,
				generateClientCodeFromOpenAPI3Success: Gt,
				generateClientCodeFromOpenAPI3Failure: Kt,
				generateServerCodeFromOpenAPI20: en,
				generateServerCodeFromOpenAPI20Started: Zt,
				generateServerCodeFromOpenAPI20Success: Qt,
				generateServerCodeFromOpenAPI20Failure: $t,
				generateClientCodeFromOpenAPI20: cn,
				generateClientCodeFromOpenAPI20Started: an,
				generateClientCodeFromOpenAPI20Success: on,
				generateClientCodeFromOpenAPI20Failure: sn
			},
			selectors: {
				selectOpenAPI3GeneratorServerListURL: Dn,
				selectOpenAPI3GenerateServerURL: On,
				selectOpenAPI3GeneratorServerListStatus: kn,
				selectOpenAPI3GeneratorServerList: An,
				selectOpenAPI3GeneratorClientListURL: jn,
				selectOpenAPI3GenerateClientURL: Mn,
				selectOpenAPI3GeneratorClientListStatus: Nn,
				selectOpenAPI3GeneratorClientList: Pn,
				selectOpenAPI2GeneratorServerListURL: Fn,
				selectOpenAPI2GenerateServerURL: In,
				selectOpenAPI2GeneratorServerListStatus: Ln,
				selectOpenAPI2GeneratorServerList: Rn,
				selectOpenAPI2GeneratorClientListURL: zn,
				selectOpenAPI2GenerateClientURL: Bn,
				selectOpenAPI2GeneratorClientListStatus: Vn,
				selectOpenAPI2GeneratorClientList: Hn
			},
			reducers: wn
		}
	}
});
//#endregion
export { Un as default };

//# sourceMappingURL=index.js.map