function deepMerge(opts, overrides, lowerCase) {
		let out = /** @type {any} */ ({}),
			i;
		if (Array.isArray(opts)) {
			// @ts-ignore
			return opts.concat(overrides);
		}
		for (i in opts) {
			const key = lowerCase ? i.toLowerCase() : i;
			out[key] = opts[i];
		}
		for (i in overrides) {
			const key = lowerCase ? i.toLowerCase() : i;
			const value = /** @type {any} */ (overrides)[i];
			out[key] = key in out && typeof value == 'object' ? deepMerge(out[key], value, key == 'headers') : value;
		}
		return out;
	}
@private
@template T, U
@param {T} opts
@param {U} [overrides]
@param {boolean} [lowerCase]
@returns {{} & (T | U)}