import "@js-temporal/polyfill";
import "urlpattern-polyfill";
globalThis.addEventListener = () => {};
import { $ as UrlError, et as expandIPv6Address, nt as isValidPublicIPv6Address, rt as validatePublicUrl, tt as isValidPublicIPv4Address } from "../vocab-DuJO9k13.mjs";
import { t as test } from "../testing-8TvaN83G.mjs";
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
import { t as assert } from "../assert-DikXweDx.mjs";
//#region src/runtime/url.test.ts
test("validatePublicUrl()", async () => {
	await assertRejects(() => validatePublicUrl("ftp://localhost"), UrlError);
	await assertRejects(() => validatePublicUrl("data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="), UrlError);
	await assertRejects(() => validatePublicUrl("https://localhost"), UrlError);
	await assertRejects(() => validatePublicUrl("https://127.0.0.1"), UrlError);
	await assertRejects(() => validatePublicUrl("https://[::1]"), UrlError);
});
test("isValidPublicIPv4Address()", () => {
	assert(isValidPublicIPv4Address("8.8.8.8"));
	assertFalse(isValidPublicIPv4Address("192.168.1.1"));
	assertFalse(isValidPublicIPv4Address("127.0.0.1"));
	assertFalse(isValidPublicIPv4Address("10.0.0.1"));
	assertFalse(isValidPublicIPv4Address("127.16.0.1"));
	assertFalse(isValidPublicIPv4Address("169.254.0.1"));
});
test("isValidPublicIPv6Address()", () => {
	assert(isValidPublicIPv6Address("2001:db8::1"));
	assertFalse(isValidPublicIPv6Address("::1"));
	assertFalse(isValidPublicIPv6Address("fc00::1"));
	assertFalse(isValidPublicIPv6Address("fe80::1"));
	assertFalse(isValidPublicIPv6Address("ff00::1"));
	assertFalse(isValidPublicIPv6Address("::"));
});
test("expandIPv6Address()", () => {
	assertEquals(expandIPv6Address("::"), "0000:0000:0000:0000:0000:0000:0000:0000");
	assertEquals(expandIPv6Address("::1"), "0000:0000:0000:0000:0000:0000:0000:0001");
	assertEquals(expandIPv6Address("2001:db8::"), "2001:0db8:0000:0000:0000:0000:0000:0000");
	assertEquals(expandIPv6Address("2001:db8::1"), "2001:0db8:0000:0000:0000:0000:0000:0001");
});
//#endregion
export {};
