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B,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,qBAAqB;IAC/B,WAAW,EAAE,KAAK;IAClB,IAAI,EAAE,KAAK;CACF,CAAC;AAEX,oDAAoD;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import type {Expect, Equal} from '@type-challenges/utils';\nimport {HttpMethod} from '../types/options.js';\n\nexport const supportsRequestStreams = (() => {\n\tlet duplexAccessed = false;\n\tlet hasContentType = false;\n\tconst supportsReadableStream = typeof globalThis.ReadableStream === 'function';\n\tconst supportsRequest = typeof globalThis.Request === 'function';\n\n\tif (supportsReadableStream && supportsRequest) {\n\t\thasContentType = new globalThis.Request('https://a.com', {\n\t\t\tbody: new globalThis.ReadableStream(),\n\t\t\tmethod: 'POST',\n\t\t\t// @ts-expect-error - Types are outdated.\n\t\t\tget duplex() {\n\t\t\t\tduplexAccessed = true;\n\t\t\t\treturn 'half';\n\t\t\t},\n\t\t}).headers.has('Content-Type');\n\t}\n\n\treturn duplexAccessed && !hasContentType;\n})();\n\nexport const supportsAbortController = typeof globalThis.AbortController === 'function';\nexport const supportsResponseStreams = typeof globalThis.ReadableStream === 'function';\nexport const supportsFormData = typeof globalThis.FormData === 'function';\n\nexport const requestMethods = ['get', 'post', 'put', 'patch', 'head', 'delete'] as const;\n\nconst validate = >() => undefined as unknown as T;\nvalidate<[\n\tExpect>,\n]>();\n\nexport const responseTypes = {\n\tjson: 'application/json',\n\ttext: 'text/*',\n\tformData: 'multipart/form-data',\n\tarrayBuffer: '*/*',\n\tblob: '*/*',\n} as const;\n\n// The maximum value of a 32bit int (see issue #117)\nexport const maxSafeTimeout = 2_147_483_647;\n\nexport const stop = Symbol('stop');\n"]}