globalThis.process ??= {}; globalThis.process.env ??= {};
function getHeaders(type, contentLength) {
  const headers = {
    "Content-Type": `${type}; charset=utf-8`,
    "Cache-Control": "no-cache",
    Date: (/* @__PURE__ */ new Date()).toUTCString()
  };
  if (contentLength) {
    headers["Content-Length"] = contentLength.toString();
  }
  return headers;
}
function createJsonResponse(data, status = 200) {
  const body = JSON.stringify(data);
  return new Response(body, {
    status,
    headers: getHeaders("application/json", body.length)
  });
}
function createTextResponse(content, status = 200) {
  return new Response(content, {
    status,
    headers: getHeaders("text/plain", content.length)
  });
}
function createIndexKey(...parts) {
  return parts.join("::");
}

export { createTextResponse as a, createIndexKey as b, createJsonResponse as c };
