import { r as getMediaTypeConfig$1 } from "./consts-CyGRb9dl.js";
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
import { r as DataTable_default, t as DataTableRow_default } from "./DataTableRow-c3XveEUO.js";
import { t as DataTableText_default } from "./DataTable-BqbZKW3K.js";
import { t as DataTableHeader_default } from "./DataTableHeader-DJVB0jCZ.js";
import { t as SectionFilter_default } from "./SectionFilter-hrtoRLwj.js";
import { t as ViewLayoutSection_default } from "./ViewLayoutSection-mUqKbQry.js";
import { t as CollapsibleSection_default } from "./layout-BWiL7dfb.js";
import { n as httpHeaders, r as HelpfulLink_default, t as computer_default } from "./computer-D7VW3Ruy.js";
import { t as ScalarAsciiArt_default } from "./ScalarAsciiArt-BjuSnj8e.js";
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toRef, unref, useId, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
import { ScalarButton, ScalarCodeBlockCopy, ScalarErrorBoundary, ScalarHotkey, ScalarIcon, ScalarLoading, ScalarVirtualText, useLoadingState } from "@scalar/components";
import { formatJsonOrYamlString, httpStatusCodes } from "@scalar/oas-utils/helpers";
import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
import { isDefined as isDefined$1 } from "@scalar/helpers/array/is-defined";
import MimeTypeParser from "whatwg-mimetype";
import { useCodeMirror } from "@scalar/use-codemirror";
import prettyMilliseconds from "pretty-ms";
import prettyBytes from "pretty-bytes";
//#region src/v2/blocks/response-block/components/Headers.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$12 = {
	key: 0,
	class: "max-h-[calc(100%-32px)] overflow-y-auto"
};
var _hoisted_2$8 = {
	key: 1,
	class: "text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm"
};
//#endregion
//#region src/v2/blocks/response-block/components/Headers.vue
var Headers_default = /* @__PURE__ */ defineComponent({
	__name: "Headers",
	props: { headers: {} },
	setup(__props) {
		const findHeaderInfo = (name) => {
			return httpHeaders.find((header) => header.name.toLowerCase() === name.toLowerCase());
		};
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CollapsibleSection_default), {
				class: "overflow-auto",
				defaultOpen: false,
				itemCount: __props.headers.length
			}, {
				title: withCtx(() => [renderSlot(_ctx.$slots, "title")]),
				default: withCtx(() => [__props.headers.length ? (openBlock(), createElementBlock("div", _hoisted_1$12, [createVNode(DataTable_default, {
					columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
					scroll: ""
				}, {
					default: withCtx(() => [createVNode(DataTableRow_default, { class: "sr-only !block" }, {
						default: withCtx(() => [createVNode(unref(DataTableHeader_default), null, {
							default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Header Key", -1)])]),
							_: 1
						}), createVNode(unref(DataTableHeader_default), null, {
							default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Header Value", -1)])]),
							_: 1
						})]),
						_: 1
					}), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.headers, (item) => {
						return openBlock(), createBlock(DataTableRow_default, {
							key: item.name,
							class: "group/row text-c-1"
						}, {
							default: withCtx(() => [createVNode(DataTableText_default, { class: "bg-b-1 sticky left-0 z-1 max-w-full group-first/row:border-t-0" }, {
								default: withCtx(() => [typeof findHeaderInfo(item.name)?.url === "string" ? (openBlock(), createBlock(HelpfulLink_default, {
									key: 0,
									class: "decoration-c-3",
									href: findHeaderInfo(item.name).url
								}, {
									default: withCtx(() => [createTextVNode(toDisplayString(item.name), 1)]),
									_: 2
								}, 1032, ["href"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(item.name), 1)], 64))]),
								_: 2
							}, 1024), createVNode(DataTableText_default, {
								class: "z-0 group-first/row:border-t-0",
								text: item.value
							}, null, 8, ["text"])]),
							_: 2
						}, 1024);
					}), 128))]),
					_: 1
				})])) : (openBlock(), createElementBlock("div", _hoisted_2$8, " No headers "))]),
				_: 3
			}, 8, ["itemCount"]);
		};
	}
});
//#endregion
//#region src/v2/blocks/response-block/helpers/media-types.ts
/** Media Type (MIME Type) Definitions */
var mediaTypes = {
	"application/epub+zip": { extension: ".epub" },
	"application/gzip": { extension: ".gz" },
	"application/java-archive": { extension: ".jar" },
	"application/javascript": {
		extension: ".js",
		raw: true
	},
	"application/json": {
		extension: ".json",
		raw: true,
		language: "json"
	},
	"application/ld+json": {
		extension: ".jsonld",
		raw: true,
		language: "json"
	},
	"application/problem+json": {
		extension: ".json",
		raw: true,
		language: "json"
	},
	"application/vnd.api+json": {
		extension: ".json",
		raw: true,
		language: "json"
	},
	"application/dns-json": {
		extension: ".json",
		raw: true,
		language: "json"
	},
	"application/msword": { extension: ".doc" },
	"application/octet-stream": { extension: ".bin" },
	"application/ogg": { extension: ".ogx" },
	"application/pdf": {
		extension: ".pdf",
		preview: "object"
	},
	"application/rtf": {
		extension: ".rtf",
		raw: true
	},
	"application/vnd.amazon.ebook": { extension: ".azw" },
	"application/vnd.apple.installer+xml": {
		extension: ".mpkg",
		raw: true,
		language: "xml"
	},
	"application/vnd.mozilla.xul+xml": {
		extension: ".xul",
		raw: true,
		language: "xml"
	},
	"application/vnd.ms-excel": { extension: ".xls" },
	"application/vnd.ms-fontobject": { extension: ".eot" },
	"application/vnd.ms-powerpoint": { extension: ".ppt" },
	"application/vnd.oasis.opendocument.presentation": { extension: ".odp" },
	"application/vnd.oasis.opendocument.spreadsheet": { extension: ".ods" },
	"application/vnd.oasis.opendocument.text": { extension: ".odt" },
	"application/vnd.openxmlformats-officedocument.presentationml.presentation": { extension: ".pptx" },
	"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { extension: ".xlsx" },
	"application/vnd.openxmlformats-officedocument.wordprocessingml.document": { extension: ".docx" },
	"application/vnd.rar": { extension: ".rar" },
	"application/vnd.visio": { extension: ".vsd" },
	"application/x-7z-compressed": { extension: ".7z" },
	"application/x-abiword": { extension: ".abw" },
	"application/x-bzip": { extension: ".bz" },
	"application/x-bzip2": { extension: ".bz2" },
	"application/x-cdf": { extension: ".cda" },
	"application/x-csh": { extension: ".csh" },
	"application/x-freearc": { extension: ".arc" },
	"application/x-httpd-php": {
		extension: ".php",
		raw: true
	},
	"application/x-sh": {
		extension: ".sh",
		raw: true
	},
	"application/x-tar": { extension: ".tar" },
	"application/xhtml+xml": {
		extension: ".xhtml",
		raw: true,
		language: "html"
	},
	"application/xml": {
		extension: ".xml",
		raw: true,
		language: "xml"
	},
	"application/yaml": {
		extension: ".yaml",
		raw: true,
		language: "yaml"
	},
	"application/zip": { extension: ".zip" },
	"audio/aac": { extension: ".aac" },
	"audio/midi": { extension: ".midi" },
	"audio/mpeg": {
		extension: ".mp3",
		preview: "audio"
	},
	"audio/ogg": { extension: ".oga" },
	"audio/wav": { extension: ".wav" },
	"audio/webm": { extension: ".weba" },
	"font/otf": { extension: ".otf" },
	"font/ttf": { extension: ".ttf" },
	"font/woff": { extension: ".woff" },
	"font/woff2": { extension: ".woff2" },
	"image/apng": {
		extension: ".apng",
		preview: "image",
		alpha: true
	},
	"image/avif": {
		extension: ".avif",
		preview: "image"
	},
	"image/bmp": {
		extension: ".bmp",
		preview: "image"
	},
	"image/gif": {
		extension: ".gif",
		preview: "image",
		alpha: true
	},
	"image/jpeg": {
		extension: ".jpg",
		preview: "image"
	},
	"image/png": {
		extension: ".png",
		preview: "image",
		alpha: true
	},
	"image/svg+xml": {
		extension: ".svg",
		raw: true,
		language: "xml",
		preview: "image",
		alpha: true
	},
	"image/tiff": { extension: ".tiff" },
	"image/vnd.microsoft.icon": {
		extension: ".ico",
		preview: "image"
	},
	"image/webp": {
		extension: ".webp",
		preview: "image",
		alpha: true
	},
	"text/calendar": {
		extension: ".ics",
		raw: true
	},
	"text/css": {
		extension: ".css",
		raw: true,
		language: "css"
	},
	"text/csv": {
		extension: ".csv",
		raw: true
	},
	"text/html": {
		extension: ".html",
		raw: true,
		language: "html",
		preview: "object"
	},
	"text/javascript": {
		extension: ".js",
		raw: true
	},
	"text/plain": {
		extension: ".txt",
		raw: true
	},
	"text/xml": {
		extension: ".xml",
		raw: true,
		language: "xml"
	},
	"text/yaml": {
		extension: ".yaml",
		raw: true,
		language: "yaml"
	},
	"video/3gpp": { extension: ".3gp" },
	"audio/3gpp": { extension: ".3gp" },
	"video/3gpp2": { extension: ".3g2" },
	"audio/3gpp2": { extension: ".3g2" },
	"video/mp2t": { extension: ".ts" },
	"video/mp4": {
		extension: ".mp4",
		preview: "video"
	},
	"video/mpeg": { extension: ".mpeg" },
	"video/ogg": { extension: ".ogv" },
	"video/webm": {
		extension: ".webm",
		preview: "video"
	},
	"video/x-msvideo": { extension: ".avi" }
};
/** Media Types (MIME Types) that can be displayed as raw text */
var textMediaTypes = Object.entries(mediaTypes).filter(([, config]) => config?.raw).map(([type]) => type);
/** Get the config for a media type */
function getMediaTypeConfig(type) {
	const config = mediaTypes[type];
	if (config) return config;
	if (type.endsWith("+json")) return {
		extension: ".json",
		raw: true,
		language: "json"
	};
}
//#endregion
//#region src/v2/blocks/response-block/helpers/extract-filename.ts
/**
* Safely decode a URI component, returning the original string if decoding fails
*/
var decodeURIComponentSafe = (str) => {
	try {
		return decodeURIComponent(str);
	} catch {
		return str;
	}
};
/**
* Extract the filename from a content disposition header
*/
function extractFilename(contentDisposition) {
	let filename = "";
	if (contentDisposition) {
		const fileNameMatch = contentDisposition.match(/filename\*=UTF-8''([^;]+)/)?.[1] ?? contentDisposition.match(/filename\s*=\s*"?([^";]+)"?/)?.[1];
		if (fileNameMatch) filename = decodeURIComponentSafe(fileNameMatch.trim());
	}
	return filename;
}
//#endregion
//#region src/v2/blocks/response-block/helpers/process-response-body.ts
var isBlob = (b) => b instanceof Blob;
/**
* Processes the response body of an HTTP request.
* Extracts MIME type, attachment filename, and generates a data URL.
*/
function processResponseBody({ data, headers }) {
	const contentType = headers.find((header) => header.name.toLowerCase() === "content-type");
	const mimeType = contentType?.value ? new MimeTypeParser(contentType.value) : void 0;
	return {
		mimeType,
		attachmentFilename: extractFilename(headers.find((header) => header.name.toLowerCase() === "content-disposition")?.value ?? ""),
		dataUrl: (() => {
			if (isBlob(data)) return URL.createObjectURL(data);
			if (typeof data === "string") return URL.createObjectURL(new Blob([data], { type: mimeType ? mimeType.toString() : void 0 }));
			if (data instanceof Object && Object.keys(data).length) return URL.createObjectURL(new Blob([JSON.stringify(data)], { type: mimeType ? mimeType.toString() : void 0 }));
			return "";
		})()
	};
}
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyDownload.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$11 = ["download", "href"];
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyDownload.vue
var ResponseBodyDownload_default = /* @__PURE__ */ defineComponent({
	__name: "ResponseBodyDownload",
	props: {
		href: {},
		type: {},
		filename: {}
	},
	setup(__props) {
		const props = __props;
		const filenameExtension = computed(() => {
			const extension = getMediaTypeConfig$1(props.type ?? "")?.extension ?? ".unknown";
			return props.filename ? props.filename : `response${extension}`;
		});
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("a", {
				class: "text-c-3 text-xxs hover:bg-b-3 flex items-center gap-1 rounded px-1.5 py-0.5 no-underline",
				download: `${filenameExtension.value}`,
				href: __props.href,
				onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
			}, [createVNode(unref(ScalarIcon), {
				icon: "Download",
				size: "xs"
			}), _cache[1] || (_cache[1] = createElementVNode("span", null, [createElementVNode("span", null, "Download"), createElementVNode("span", { class: "sr-only" }, "Response Body")], -1))], 8, _hoisted_1$11);
		};
	}
});
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyInfo.vue
var _sfc_main = {};
var _hoisted_1$10 = { class: "flex justify-center px-2 py-3" };
var _hoisted_2$7 = { class: "text-c-3 p-2 text-sm" };
function _sfc_render(_ctx, _cache) {
	return openBlock(), createElementBlock("div", _hoisted_1$10, [createElementVNode("div", _hoisted_2$7, [renderSlot(_ctx.$slots, "default")])]);
}
var ResponseBodyInfo_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyPreview.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$9 = ["src"];
var _hoisted_2$6 = ["src", "type"];
var _hoisted_3$4 = ["src", "type"];
var _hoisted_4$2 = ["data", "type"];
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyPreview.vue
var ResponseBodyPreview_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
	__name: "ResponseBodyPreview",
	props: {
		src: {},
		type: {},
		mode: {},
		alpha: {
			type: Boolean,
			default: false
		}
	},
	setup(__props) {
		const error = ref(false);
		watch(() => __props.src, () => error.value = false);
		return (_ctx, _cache) => {
			return !error.value && __props.src ? (openBlock(), createElementBlock("div", {
				key: 0,
				class: normalizeClass(["flex justify-center overflow-auto rounded-b", { "bg-preview p-2": __props.alpha }])
			}, [__props.mode === "image" ? (openBlock(), createElementBlock("img", {
				key: 0,
				class: normalizeClass(["h-full max-w-full", { rounded: __props.alpha }]),
				src: __props.src,
				onError: _cache[0] || (_cache[0] = ($event) => error.value = true)
			}, null, 42, _hoisted_1$9)) : __props.mode === "video" ? (openBlock(), createElementBlock("video", {
				key: 1,
				autoplay: "",
				controls: "",
				width: "100%",
				onError: _cache[1] || (_cache[1] = ($event) => error.value = true)
			}, [createElementVNode("source", {
				src: __props.src,
				type: __props.type
			}, null, 8, _hoisted_2$6)], 32)) : __props.mode === "audio" ? (openBlock(), createElementBlock("audio", {
				key: 2,
				class: "my-12",
				controls: "",
				onError: _cache[2] || (_cache[2] = ($event) => error.value = true)
			}, [createElementVNode("source", {
				src: __props.src,
				type: __props.type
			}, null, 8, _hoisted_3$4)], 32)) : (openBlock(), createElementBlock("object", {
				key: 3,
				class: "aspect-[4/3] w-full",
				data: __props.src,
				type: __props.type,
				onError: _cache[3] || (_cache[3] = ($event) => error.value = true)
			}, null, 40, _hoisted_4$2))], 2)) : (openBlock(), createBlock(ResponseBodyInfo_default, { key: 1 }, {
				default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode("Preview unavailable", -1)])]),
				_: 1
			}));
		};
	}
}), [["__scopeId", "data-v-c02b5bb8"]]);
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyRaw.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$8 = { class: "scalar-code-block group/code-block body-raw relative grid min-h-0 overflow-hidden p-px outline-none has-focus-visible:outline" };
var _hoisted_2$5 = {
	class: "body-raw-scroller custom-scroll relative pr-1",
	tabindex: "0"
};
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyRaw.vue
var ResponseBodyRaw_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
	__name: "ResponseBodyRaw",
	props: {
		content: {},
		language: {}
	},
	setup(__props) {
		const props = __props;
		const codeMirrorRef = ref(null);
		/** Base id for the code block */
		const id = useId();
		const { codeMirror } = useCodeMirror({
			codeMirrorRef,
			readOnly: true,
			lineNumbers: true,
			content: toRef(() => prettyPrintJson(props.content)),
			language: toRef(() => props.language),
			forceFoldGutter: true
		});
		const getCurrentContent = () => {
			return codeMirror.value?.state.doc.toString() || "";
		};
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("div", _hoisted_2$5, [createElementVNode("div", {
				ref_key: "codeMirrorRef",
				ref: codeMirrorRef
			}, null, 512)]), getCurrentContent() ? (openBlock(), createBlock(unref(ScalarCodeBlockCopy), {
				key: 0,
				class: "absolute top-2 right-2",
				content: getCurrentContent(),
				"aria-controls": unref(id)
			}, null, 8, ["content", "aria-controls"])) : createCommentVNode("", true)]);
		};
	}
}), [["__scopeId", "data-v-194605f9"]]);
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyToggle.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$7 = { class: "text-c-3 text-xxs -my-1 flex justify-center gap-0.5 rounded p-0.5" };
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyToggle.vue
var ResponseBodyToggle_default = /* @__PURE__ */ defineComponent({
	__name: "ResponseBodyToggle",
	props: { modelValue: { type: Boolean } },
	emits: ["update:modelValue"],
	setup(__props) {
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("div", _hoisted_1$7, [createElementVNode("button", {
				class: normalizeClass(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": __props.modelValue }]),
				type: "button",
				onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("update:modelValue", true), ["stop"]))
			}, " Preview ", 2), createElementVNode("button", {
				class: normalizeClass(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": !__props.modelValue }]),
				type: "button",
				onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.$emit("update:modelValue", false), ["stop"]))
			}, " Raw ", 2)]);
		};
	}
});
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBody.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$6 = {
	key: 0,
	class: "bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden"
};
var _hoisted_2$4 = { class: "box-content flex min-h-8 items-center justify-between border-y px-3" };
var _hoisted_3$3 = { class: "text-xxs font-code leading-5" };
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBody.vue
var ResponseBody_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
	__name: "ResponseBody",
	props: {
		title: {},
		layout: {},
		data: {},
		headers: {}
	},
	setup(__props) {
		/** Preview / Raw toggle */
		const toggle = ref(true);
		const showToggle = computed(() => !!(mediaConfig.value?.raw && mediaConfig.value.preview));
		const showPreview = computed(() => toggle.value || !showToggle.value);
		const showRaw = computed(() => !toggle.value || !showToggle.value);
		const responseBody = computed(() => processResponseBody({
			data: __props.data,
			headers: __props.headers
		}));
		const mediaConfig = computed(() => getMediaTypeConfig(responseBody.value.mimeType?.essence ?? ""));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CollapsibleSection_default), {
				class: "max-h-content overflow-y-hidden",
				isStatic: __props.layout === "reference"
			}, createSlots({
				title: withCtx(() => [createTextVNode(toDisplayString(__props.title), 1)]),
				default: withCtx(() => [__props.data ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
					createElementVNode("div", _hoisted_2$4, [createElementVNode("span", _hoisted_3$3, toDisplayString(responseBody.value.mimeType?.essence), 1), showToggle.value ? (openBlock(), createBlock(ResponseBodyToggle_default, {
						key: 0,
						modelValue: toggle.value,
						"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => toggle.value = $event)
					}, null, 8, ["modelValue"])) : createCommentVNode("", true)]),
					mediaConfig.value?.raw && showRaw.value ? (openBlock(), createBlock(ResponseBodyRaw_default, {
						key: responseBody.value.dataUrl,
						content: __props.data,
						language: mediaConfig.value.language
					}, null, 8, ["content", "language"])) : createCommentVNode("", true),
					mediaConfig.value?.preview && showPreview.value ? (openBlock(), createBlock(ResponseBodyPreview_default, {
						key: responseBody.value.dataUrl,
						alpha: mediaConfig.value.alpha,
						mode: mediaConfig.value.preview,
						src: responseBody.value.dataUrl,
						type: responseBody.value.mimeType?.essence ?? ""
					}, null, 8, [
						"alpha",
						"mode",
						"src",
						"type"
					])) : createCommentVNode("", true),
					!mediaConfig.value?.raw && !mediaConfig.value?.preview ? (openBlock(), createBlock(ResponseBodyInfo_default, { key: 2 }, {
						default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Binary file ", -1)])]),
						_: 1
					})) : createCommentVNode("", true)
				])) : createCommentVNode("", true)]),
				_: 2
			}, [__props.data && responseBody.value.dataUrl ? {
				name: "actions",
				fn: withCtx(() => [createVNode(ResponseBodyDownload_default, {
					filename: responseBody.value.attachmentFilename,
					href: responseBody.value.dataUrl,
					type: responseBody.value.mimeType?.essence
				}, null, 8, [
					"filename",
					"href",
					"type"
				])]),
				key: "0"
			} : void 0]), 1032, ["isStatic"]);
		};
	}
}), [["__scopeId", "data-v-94c74c13"]]);
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyStreaming.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$5 = { class: "flex w-full items-center justify-between" };
var _hoisted_2$3 = {
	key: 0,
	class: "mr-2 flex items-center gap-2"
};
var _hoisted_3$2 = {
	key: 0,
	class: "text-red bg-b-danger sticky top-0 border-b p-2"
};
var _hoisted_4$1 = {
	key: 1,
	class: "p-2"
};
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyStreaming.vue
var ResponseBodyStreaming_default = /* @__PURE__ */ defineComponent({
	__name: "ResponseBodyStreaming",
	props: { reader: {} },
	setup(__props) {
		const loader = useLoadingState();
		const textContent = ref("");
		const errorRef = ref(null);
		const contentContainer = ref(null);
		/** Track the current reader to prevent race conditions when reader changes */
		const currentReader = ref(null);
		/** Current decoder instance - reset for each new stream to prevent buffer corruption */
		const decoder = ref(null);
		/**
		* Scrolls the content container to the bottom
		*/
		const scrollToBottom = () => {
			if (contentContainer.value) contentContainer.value.scrollTop = contentContainer.value.scrollHeight;
		};
		watch(textContent, async () => {
			await nextTick(scrollToBottom);
		});
		/**
		* Reads the stream and appends the content
		*/
		async function readStream(streamReader) {
			try {
				while (loader.isLoading && currentReader.value === streamReader) {
					const { done, value } = await streamReader.read();
					if (currentReader.value !== streamReader) break;
					if (done) {
						loader.clear();
						break;
					}
					if (value && decoder.value) textContent.value += decoder.value.decode(value, { stream: true });
				}
			} catch (error) {
				if (currentReader.value === streamReader) {
					console.error("Error reading stream:", error);
					loader.clear();
					errorRef.value = error;
				}
			} finally {
				if (currentReader.value === streamReader && decoder.value) textContent.value += decoder.value.decode();
			}
		}
		const startStreaming = () => {
			if (currentReader.value) currentReader.value.cancel();
			currentReader.value = __props.reader;
			decoder.value = new TextDecoder();
			loader.start();
			textContent.value = "";
			errorRef.value = null;
			readStream(__props.reader);
		};
		const stopStreaming = () => {
			if (currentReader.value) {
				currentReader.value.cancel();
				currentReader.value = null;
			}
			loader.clear();
		};
		watch(() => __props.reader, startStreaming, { immediate: true });
		onBeforeUnmount(stopStreaming);
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CollapsibleSection_default), { class: "max-h-content overflow-y-hidden" }, createSlots({
				title: withCtx(() => [createElementVNode("div", _hoisted_1$5, [_cache[1] || (_cache[1] = createElementVNode("div", null, "Body", -1)), unref(loader).isLoading ? (openBlock(), createElementBlock("div", _hoisted_2$3, [createVNode(unref(ScalarLoading), {
					loadingState: unref(loader),
					size: "xs"
				}, null, 8, ["loadingState"]), _cache[0] || (_cache[0] = createElementVNode("span", { class: "text-c-2" }, " Listening… ", -1))])) : createCommentVNode("", true)])]),
				default: withCtx(() => [createElementVNode("div", {
					ref_key: "contentContainer",
					ref: contentContainer,
					class: "text-xxs font-code h-full overflow-auto leading-6 whitespace-pre-wrap"
				}, [errorRef.value ? (openBlock(), createElementBlock("div", _hoisted_3$2, toDisplayString(errorRef.value.message), 1)) : createCommentVNode("", true), textContent.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, toDisplayString(textContent.value), 1)) : createCommentVNode("", true)], 512)]),
				_: 2
			}, [unref(loader).isLoading ? {
				name: "actions",
				fn: withCtx(() => [createVNode(unref(ScalarButton), {
					size: "sm",
					variant: "ghost",
					onClick: stopStreaming
				}, {
					default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode(" Cancel ", -1)])]),
					_: 1
				})]),
				key: "0"
			} : void 0]), 1024);
		};
	}
});
//#endregion
//#region src/v2/blocks/response-block/components/ResponseBodyVirtual.vue
var ResponseBodyVirtual_default = /* @__PURE__ */ defineComponent({
	__name: "ResponseBodyVirtual",
	props: {
		content: {},
		data: {},
		headers: {}
	},
	setup(__props) {
		const textContent = computed(() => formatJsonOrYamlString(__props.content));
		const responseBody = computed(() => processResponseBody({
			data: __props.data,
			headers: __props.headers
		}));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CollapsibleSection_default), { class: "!max-h-100% response-body-virtual overflow-x-auto" }, createSlots({
				title: withCtx(() => [_cache[0] || (_cache[0] = createTextVNode("Body", -1))]),
				default: withCtx(() => [_cache[1] || (_cache[1] = createElementVNode("div", { class: "font-code text-xxs rounded-t border border-b-0 px-2.5 py-1.5" }, " This response body is massive! Syntax highlighting won't work here. ", -1)), createVNode(unref(ScalarVirtualText), {
					containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
					contentClass: "language-plaintext whitespace-pre font-code text-base",
					lineHeight: 20,
					text: textContent.value
				}, null, 8, ["text"])]),
				_: 2
			}, [responseBody.value.dataUrl ? {
				name: "actions",
				fn: withCtx(() => [createVNode(ResponseBodyDownload_default, {
					filename: responseBody.value.attachmentFilename,
					href: responseBody.value.dataUrl,
					type: responseBody.value.mimeType?.essence
				}, null, 8, [
					"filename",
					"href",
					"type"
				])]),
				key: "0"
			} : void 0]), 1024);
		};
	}
});
//#endregion
//#region src/v2/blocks/response-block/components/ResponseCookies.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$4 = {
	key: 1,
	class: "text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm"
};
//#endregion
//#region src/v2/blocks/response-block/components/ResponseCookies.vue
var ResponseCookies_default = /* @__PURE__ */ defineComponent({
	__name: "ResponseCookies",
	props: { cookies: {} },
	setup(__props) {
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CollapsibleSection_default), {
				defaultOpen: false,
				itemCount: __props.cookies.length
			}, {
				title: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Cookies", -1)])]),
				default: withCtx(() => [(openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.cookies.length ? (openBlock(), createBlock(DataTable_default, {
					key: 0,
					class: "flex-1",
					columns: ["", ""]
				}, {
					default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.cookies, (item) => {
						return openBlock(), createBlock(DataTableRow_default, { key: item.name }, {
							default: withCtx(() => [createVNode(DataTableText_default, { text: item.name }, null, 8, ["text"]), createVNode(DataTableText_default, { text: item.value }, null, 8, ["text"])]),
							_: 2
						}, 1024);
					}), 128))]),
					_: 1
				})) : (openBlock(), createElementBlock("div", _hoisted_1$4, " No cookies "))], 64))]),
				_: 1
			}, 8, ["itemCount"]);
		};
	}
});
//#endregion
//#region src/v2/blocks/response-block/components/ResponseEmpty.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$3 = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" };
var _hoisted_2$2 = {
	key: 0,
	class: "scalar-version-number"
};
var _hoisted_3$1 = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" };
//#endregion
//#region src/v2/blocks/response-block/components/ResponseEmpty.vue
var ResponseEmpty_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
	__name: "ResponseEmpty",
	props: {
		layout: {},
		totalPerformedRequests: {},
		appVersion: {}
	},
	emits: [
		"addRequest",
		"sendRequest",
		"openCommandPalette"
	],
	setup(__props, { emit: __emit }) {
		const emits = __emit;
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("div", { class: normalizeClass(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", { "hidden opacity-0": __props.totalPerformedRequests > 0 && __props.layout !== "modal" }]) }, [
				__props.layout !== "modal" ? (openBlock(), createElementBlock("div", _hoisted_2$2, [createTextVNode(" Scalar App V" + toDisplayString(__props.appVersion) + " Beta ", 1), _cache[3] || (_cache[3] = createElementVNode("div", { class: "mt-2" }, [createElementVNode("a", {
					href: "https://github.com/scalar/scalar/issues/2669",
					target: "_blank"
				}, " Roadmap ")], -1))])) : createCommentVNode("", true),
				_cache[4] || (_cache[4] = createElementVNode("a", {
					class: "gitbook-show scalar-version-number",
					href: "https://www.scalar.com",
					target: "_blank"
				}, " Powered By Scalar.com ", -1)),
				createVNode(ScalarAsciiArt_default, {
					art: unref(computer_default),
					class: "text-c-3"
				}, null, 8, ["art"])
			], 2), createElementVNode("div", _hoisted_3$1, [
				__props.layout !== "modal" ? (openBlock(), createElementBlock("button", {
					key: 0,
					class: "flex items-center gap-1.5",
					type: "button",
					onClick: _cache[0] || (_cache[0] = ($event) => emits("openCommandPalette"))
				}, [_cache[5] || (_cache[5] = createTextVNode(" Get Started ", -1)), createVNode(unref(ScalarHotkey), {
					hotkey: "k",
					modifier: ["default"]
				})])) : createCommentVNode("", true),
				__props.layout === "desktop" ? (openBlock(), createElementBlock("button", {
					key: 1,
					class: "flex items-center gap-1.5",
					type: "button",
					onClick: _cache[1] || (_cache[1] = ($event) => emits("addRequest"))
				}, [_cache[6] || (_cache[6] = createTextVNode(" New Request ", -1)), createVNode(unref(ScalarHotkey), { hotkey: "N" })])) : createCommentVNode("", true),
				createElementVNode("button", {
					class: "flex items-center gap-1.5",
					type: "button",
					onClick: _cache[2] || (_cache[2] = ($event) => emits("sendRequest"))
				}, [_cache[7] || (_cache[7] = createTextVNode(" Send Request ", -1)), createVNode(unref(ScalarHotkey), { hotkey: "↵" })])
			])]);
		};
	}
}), [["__scopeId", "data-v-34b57d9d"]]);
//#endregion
//#region src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$2 = {
	key: 0,
	class: "bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6"
};
//#endregion
//#region src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue
var ResponseLoadingOverlay_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
	__name: "ResponseLoadingOverlay",
	props: { eventBus: {} },
	setup(__props) {
		const loader = useLoadingState();
		const timeout = ref();
		const startLoading = () => {
			timeout.value = setTimeout(() => loader.start(), 1e3);
		};
		const stopLoading = () => {
			clearTimeout(timeout.value);
			timeout.value = void 0;
			loader.clear();
		};
		onMounted(() => {
			__props.eventBus.on("hooks:on:request:sent", startLoading);
			__props.eventBus.on("hooks:on:request:complete", stopLoading);
		});
		onBeforeUnmount(() => {
			__props.eventBus.off("hooks:on:request:sent", startLoading);
			__props.eventBus.off("hooks:on:request:complete", stopLoading);
			stopLoading();
		});
		return (_ctx, _cache) => {
			return openBlock(), createBlock(Transition, null, {
				default: withCtx(() => [unref(loader).isActive ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createVNode(unref(ScalarLoading), {
					class: "text-c-3",
					loader: unref(loader),
					size: "3xl"
				}, null, 8, ["loader"]), createVNode(unref(ScalarButton), {
					variant: "ghost",
					onClick: _cache[0] || (_cache[0] = ($event) => __props.eventBus.emit("operation:cancel:request"))
				}, {
					default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Cancel ", -1)])]),
					_: 1
				})])) : createCommentVNode("", true)]),
				_: 1
			});
		};
	}
}), [["__scopeId", "data-v-1f35725e"]]);
//#endregion
//#region src/v2/blocks/response-block/helpers/get-content-length.ts
/** Extract content length from headers */
var getContentLength = (response) => {
	const contentLength = Number.parseInt(response.headers?.["Content-Length"] || response.headers?.["content-length"] || "0", 10);
	if (isNaN(contentLength) || contentLength <= 0) return;
	return prettyBytes(contentLength);
};
//#endregion
//#region src/v2/blocks/response-block/components/ResponseMetaInformation.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$1 = { class: "text-c-1 flex gap-1.5" };
var _hoisted_2$1 = { key: 0 };
var _hoisted_3 = { key: 0 };
var _hoisted_4 = { key: 1 };
//#endregion
//#region src/v2/blocks/response-block/components/ResponseMetaInformation.vue
var ResponseMetaInformation_default = /* @__PURE__ */ defineComponent({
	__name: "ResponseMetaInformation",
	props: {
		response: {},
		eventBus: {}
	},
	setup(__props) {
		const interval = ref();
		const stopwatch = ref(0);
		const stopStopwatch = () => {
			clearInterval(interval.value);
			interval.value = void 0;
			stopwatch.value = 0;
		};
		const startStopwatch = () => {
			interval.value = setInterval(() => stopwatch.value += 1e3, 1e3);
		};
		onMounted(() => {
			__props.eventBus.on("hooks:on:request:sent", startStopwatch);
			__props.eventBus.on("hooks:on:request:complete", stopStopwatch);
		});
		onBeforeUnmount(() => {
			__props.eventBus.off("hooks:on:request:sent", startStopwatch);
			__props.eventBus.off("hooks:on:request:complete", stopStopwatch);
			stopStopwatch();
		});
		/** Status text for the response */
		const statusCodeInformation = computed(() => {
			const responseStatusCode = __props.response?.status;
			if (!responseStatusCode) return;
			return httpStatusCodes[responseStatusCode] ?? void 0;
		});
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("div", _hoisted_1$1, [interval.value && stopwatch.value ? (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(unref(prettyMilliseconds)(stopwatch.value)), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
				createElementVNode("span", null, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, "Response Information, Duration:", -1)), createTextVNode(" " + toDisplayString(unref(prettyMilliseconds)(__props.response.duration)), 1)]),
				unref(getContentLength)(__props.response) ? (openBlock(), createElementBlock("span", _hoisted_3, [_cache[1] || (_cache[1] = createElementVNode("span", { class: "sr-only" }, ", Size:", -1)), createTextVNode(" " + toDisplayString(unref(getContentLength)(__props.response)), 1)])) : createCommentVNode("", true),
				statusCodeInformation.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, ", Status:", -1)), statusCodeInformation.value.url ? (openBlock(), createBlock(HelpfulLink_default, {
					key: 0,
					class: "flex items-center gap-1.5",
					href: statusCodeInformation.value.url
				}, {
					default: withCtx(() => [createTextVNode(toDisplayString(__props.response.status) + " " + toDisplayString(statusCodeInformation.value.name) + " ", 1), createElementVNode("span", {
						class: "block h-1.5 w-1.5 rounded-full",
						style: normalizeStyle({ backgroundColor: statusCodeInformation.value.color })
					}, null, 4)]),
					_: 1
				}, 8, ["href"])) : (openBlock(), createElementBlock("span", _hoisted_4, [createTextVNode(toDisplayString(__props.response.status) + " " + toDisplayString(statusCodeInformation.value.name) + " ", 1), createElementVNode("span", {
					class: "block h-1.5 w-1.5 rounded-full",
					style: normalizeStyle({ backgroundColor: statusCodeInformation.value.color })
				}, null, 4)]))], 64)) : createCommentVNode("", true)
			], 64))]);
		};
	}
});
//#endregion
//#region src/v2/blocks/response-block/helpers/parse-set-cookie.ts
/**
* Parse a Set-Cookie header value into name and value.
*
* Set-Cookie headers have the format: name=value; attribute1; attribute2=value2
* We extract just the cookie name and value (the part before the first semicolon).
*
* @param setCookieValue - The full Set-Cookie header value
* @returns Object with cookie name and value, or null if parsing fails
*
* @example
* parseSetCookie('sessionId=abc123; Path=/; HttpOnly')
* // Returns: { name: 'sessionId', value: 'abc123; Path=/; HttpOnly' }
*/
var parseSetCookie = (setCookieValue) => {
	if (!setCookieValue || typeof setCookieValue !== "string") return null;
	const firstEqualsIndex = setCookieValue.indexOf("=");
	if (firstEqualsIndex === -1) return null;
	const name = setCookieValue.substring(0, firstEqualsIndex).trim();
	const value = setCookieValue.substring(firstEqualsIndex + 1).trim();
	if (!name) return null;
	return {
		name,
		value
	};
};
//#endregion
//#region src/v2/blocks/response-block/ResponseBlock.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1 = { class: "flex h-8 flex-1 items-center" };
var _hoisted_2 = ["id", "role"];
var VIRTUALIZATION_THRESHOLD = 2e5;
//#endregion
//#region src/v2/blocks/response-block/ResponseBlock.vue
var ResponseBlock_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
	__name: "ResponseBlock",
	props: {
		response: {},
		request: {},
		layout: {},
		totalPerformedRequests: {},
		appVersion: {},
		plugins: {},
		eventBus: {}
	},
	setup(__props, { expose: __expose }) {
		const responseHeaders = computed(() => {
			const headers = __props.response?.headers;
			return headers ? Object.keys(headers).map((key) => ({
				name: key,
				value: headers[key] ?? ""
			})) : [];
		});
		const responseCookies = computed(() => __props.response?.cookieHeaderKeys.map((setCookieValue) => parseSetCookie(setCookieValue)).filter(isDefined$1) ?? []);
		const responseSections = [
			"Cookies",
			"Headers",
			"Body"
		];
		const activeFilter = ref("All");
		const filters = computed(() => ["All", ...responseSections]);
		const filterIds = computed(() => Object.fromEntries(filters.value.map((section) => [section, useId()])));
		/** Threshold for virtualizing response bodies in bytes */
		const shouldVirtualize = computed(() => {
			if (!__props.response || !("size" in __props.response)) return false;
			const contentType = __props.response.headers?.["content-type"] || __props.response.headers?.["Content-Type"];
			if (!contentType || (__props.response.size ?? 0) <= VIRTUALIZATION_THRESHOLD) return false;
			if (contentType.includes("text/html")) return false;
			return textMediaTypes.some((type) => contentType.includes(type)) && (__props.response.size ?? 0) > VIRTUALIZATION_THRESHOLD;
		});
		const requestHeaders = computed(() => __props.request?.headers ? [...__props.request.headers].map((header) => ({
			name: header[0],
			value: header[1],
			required: false
		})) : []);
		const isSectionVisible = (section) => {
			if (activeFilter.value === "All" || activeFilter.value === section) return true;
			return false;
		};
		__expose({
			responseHeaders,
			responseCookies,
			requestHeaders,
			shouldVirtualize,
			activeFilter,
			filters
		});
		return (_ctx, _cache) => {
			return openBlock(), createBlock(ViewLayoutSection_default, { "aria-label": "Response" }, {
				title: withCtx(() => [createElementVNode("div", _hoisted_1, [createElementVNode("div", {
					"aria-live": "polite",
					class: normalizeClass(["flex items-center", { "animate-response-heading": __props.response }])
				}, [_cache[4] || (_cache[4] = createElementVNode("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)), __props.response ? (openBlock(), createBlock(ResponseMetaInformation_default, {
					key: 0,
					class: "animate-response-children",
					eventBus: __props.eventBus,
					response: __props.response
				}, null, 8, ["eventBus", "response"])) : createCommentVNode("", true)], 2), createVNode(SectionFilter_default, {
					modelValue: activeFilter.value,
					"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeFilter.value = $event),
					filterIds: filterIds.value,
					filters: filters.value
				}, null, 8, [
					"modelValue",
					"filterIds",
					"filters"
				])])]),
				default: withCtx(() => [createElementVNode("div", {
					id: filterIds.value.All,
					class: normalizeClass(["custom-scroll response-section-content relative grid h-full justify-stretch", { "content-start": __props.response }]),
					role: activeFilter.value === "All" && __props.response ? "tabpanel" : "none"
				}, [!__props.response ? (openBlock(), createBlock(ResponseEmpty_default, {
					key: 0,
					appVersion: __props.appVersion,
					layout: __props.layout,
					totalPerformedRequests: __props.totalPerformedRequests,
					onAddRequest: _cache[1] || (_cache[1] = ($event) => __props.eventBus.emit("ui:open:command-palette", {
						action: "create-request",
						payload: void 0
					})),
					onOpenCommandPalette: _cache[2] || (_cache[2] = ($event) => __props.eventBus.emit("ui:open:command-palette")),
					onSendRequest: _cache[3] || (_cache[3] = ($event) => __props.eventBus.emit("operation:send:request:hotkey"))
				}, null, 8, [
					"appVersion",
					"layout",
					"totalPerformedRequests"
				])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
					isSectionVisible("Cookies") ? (openBlock(), createBlock(ResponseCookies_default, {
						key: 0,
						id: filterIds.value.Cookies,
						class: "response-section-content-cookies",
						cookies: responseCookies.value,
						role: activeFilter.value === "All" ? "none" : "tabpanel"
					}, null, 8, [
						"id",
						"cookies",
						"role"
					])) : createCommentVNode("", true),
					isSectionVisible("Headers") ? (openBlock(), createBlock(Headers_default, {
						key: 1,
						id: filterIds.value.Headers,
						class: "response-section-content-headers",
						headers: requestHeaders.value,
						role: activeFilter.value === "All" ? "none" : "tabpanel"
					}, {
						title: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("Request Headers", -1)])]),
						_: 1
					}, 8, [
						"id",
						"headers",
						"role"
					])) : createCommentVNode("", true),
					isSectionVisible("Headers") ? (openBlock(), createBlock(Headers_default, {
						key: 2,
						id: filterIds.value.Headers,
						class: "response-section-content-headers",
						headers: responseHeaders.value,
						role: activeFilter.value === "All" ? "none" : "tabpanel"
					}, {
						title: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode("Response Headers", -1)])]),
						_: 1
					}, 8, [
						"id",
						"headers",
						"role"
					])) : createCommentVNode("", true),
					(openBlock(true), createElementBlock(Fragment, null, renderList(__props.plugins, (plugin, index) => {
						return openBlock(), createBlock(unref(ScalarErrorBoundary), { key: index }, {
							default: withCtx(() => [plugin?.components?.response ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(plugin.components.response.component), mergeProps({
								key: 0,
								ref_for: true
							}, plugin.components.response.additionalProps), null, 16)), [[vShow, activeFilter.value === "All"]]) : createCommentVNode("", true)]),
							_: 2
						}, 1024);
					}), 128)),
					activeFilter.value === "All" || activeFilter.value === "Body" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, ["reader" in __props.response ? (openBlock(), createBlock(ResponseBodyStreaming_default, {
						key: 0,
						id: filterIds.value.Body,
						class: "response-section-content-body",
						reader: __props.response.reader
					}, null, 8, ["id", "reader"])) : shouldVirtualize.value && typeof __props.response?.data === "string" ? (openBlock(), createBlock(ResponseBodyVirtual_default, {
						key: 1,
						id: filterIds.value.Body,
						content: __props.response.data,
						data: __props.response?.data,
						headers: responseHeaders.value,
						role: activeFilter.value === "All" ? "none" : "tabpanel"
					}, null, 8, [
						"id",
						"content",
						"data",
						"headers",
						"role"
					])) : (openBlock(), createBlock(ResponseBody_default, {
						key: 2,
						id: filterIds.value.Body,
						active: true,
						class: "response-section-content-body",
						data: __props.response?.data,
						headers: responseHeaders.value,
						layout: "client",
						role: activeFilter.value === "All" ? "none" : "tabpanel",
						title: "Body"
					}, null, 8, [
						"id",
						"data",
						"headers",
						"role"
					]))], 64)) : createCommentVNode("", true)
				], 64)), createVNode(ResponseLoadingOverlay_default, { eventBus: __props.eventBus }, null, 8, ["eventBus"])], 10, _hoisted_2)]),
				_: 1
			});
		};
	}
}), [["__scopeId", "data-v-9c1fd1c7"]]);
//#endregion
export { ResponseBlock_default as t };

//# sourceMappingURL=response-block-DmkaDZYs.js.map