import { defineComponent, mergeProps, ref, unref, computed, readonly, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrRenderAttr, ssrInterpolate, ssrRenderStyle, ssrRenderClass, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual } from 'vue/server-renderer';
import { _ as _export_sfc } from './server.mjs';
import { u as useHead } from './composables-Piy9capG.mjs';
import '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';
import 'vue-router';
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
__name: "Navbar",
__ssrInlineRender: true,
setup(__props) {
const scrolled = ref(false);
const links = [
{ label: "Features", href: "#features" },
{ label: "Rates", href: "#rates" },
{ label: "API Docs", href: "#playground" }
];
const mobileOpen = ref(false);
return (_ctx, _push, _parent, _attrs) => {
_push(``);
};
}
});
const _sfc_setup$7 = _sfc_main$7.setup;
_sfc_main$7.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/Navbar.vue");
return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
};
const __nuxt_component_0 = Object.assign(_sfc_main$7, { __name: "Navbar" });
const _sfc_main$6 = {};
function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs) {
_push(` Free & Open
EU VAT Rates API
Free. No API key. Always up-to-date.
Get current VAT rates for all 27 EU member states with a single API call. No registration, no rate limits, no nonsense.
// Response 200 OK
{
"country": "Germany",
"country_code": "DE",
"standard_rate": 19,
"reduced_rates": [7],
"currency": "EUR"
} `);
}
const _sfc_setup$6 = _sfc_main$6.setup;
_sfc_main$6.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/HeroSection.vue");
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
};
const __nuxt_component_1 = /* @__PURE__ */ Object.assign(_export_sfc(_sfc_main$6, [["ssrRender", _sfc_ssrRender$1]]), { __name: "HeroSection" });
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
__name: "FeaturesGrid",
__ssrInlineRender: true,
setup(__props) {
const features = [
{
icon: ``,
title: "All 27 EU Countries",
description: "Standard, reduced, and special VAT rates for every member state."
},
{
icon: ``,
title: "No Authentication",
description: "No API keys, no sign-up. Just send a GET request."
},
{
icon: ``,
title: "Always Current",
description: "Rates sourced and synced regularly from official EU data."
},
{
icon: ``,
title: "Simple JSON",
description: "Clean, predictable JSON responses. Easy to integrate anywhere."
}
];
return (_ctx, _push, _parent, _attrs) => {
_push(` Built for developers
A straightforward API that does one thing well — delivering EU VAT rates without friction.
`);
ssrRenderList(features, (feature, i) => {
_push(`
`);
});
_push(`
`);
};
}
});
const _sfc_setup$5 = _sfc_main$5.setup;
_sfc_main$5.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/FeaturesGrid.vue");
return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
};
const __nuxt_component_2 = Object.assign(_sfc_main$5, { __name: "FeaturesGrid" });
const euVatRates = [
{ country: "Austria", code: "AT", flag: "🇦🇹", standard: 20, reduced: [10, 13] },
{ country: "Belgium", code: "BE", flag: "🇧🇪", standard: 21, reduced: [6, 12] },
{ country: "Bulgaria", code: "BG", flag: "🇧🇬", standard: 20, reduced: [9] },
{ country: "Croatia", code: "HR", flag: "🇭🇷", standard: 25, reduced: [5, 13] },
{ country: "Cyprus", code: "CY", flag: "🇨🇾", standard: 19, reduced: [5, 9] },
{ country: "Czech Republic", code: "CZ", flag: "🇨🇿", standard: 21, reduced: [12, 15] },
{ country: "Denmark", code: "DK", flag: "🇩🇰", standard: 25, reduced: [] },
{ country: "Estonia", code: "EE", flag: "🇪🇪", standard: 22, reduced: [9] },
{ country: "Finland", code: "FI", flag: "🇫🇮", standard: 25.5, reduced: [10, 14] },
{ country: "France", code: "FR", flag: "🇫🇷", standard: 20, reduced: [5.5, 10] },
{ country: "Germany", code: "DE", flag: "🇩🇪", standard: 19, reduced: [7] },
{ country: "Greece", code: "GR", flag: "🇬🇷", standard: 24, reduced: [6, 13] },
{ country: "Hungary", code: "HU", flag: "🇭🇺", standard: 27, reduced: [5, 18] },
{ country: "Ireland", code: "IE", flag: "🇮🇪", standard: 23, reduced: [9, 13.5] },
{ country: "Italy", code: "IT", flag: "🇮🇹", standard: 22, reduced: [5, 10] },
{ country: "Latvia", code: "LV", flag: "🇱🇻", standard: 21, reduced: [5, 12] },
{ country: "Lithuania", code: "LT", flag: "🇱🇹", standard: 21, reduced: [5, 9] },
{ country: "Luxembourg", code: "LU", flag: "🇱🇺", standard: 17, reduced: [8] },
{ country: "Malta", code: "MT", flag: "🇲🇹", standard: 18, reduced: [5, 7] },
{ country: "Netherlands", code: "NL", flag: "🇳🇱", standard: 21, reduced: [9] },
{ country: "Poland", code: "PL", flag: "🇵🇱", standard: 23, reduced: [5, 8] },
{ country: "Portugal", code: "PT", flag: "🇵🇹", standard: 23, reduced: [6, 13] },
{ country: "Romania", code: "RO", flag: "🇷🇴", standard: 19, reduced: [5, 9] },
{ country: "Slovakia", code: "SK", flag: "🇸🇰", standard: 23, reduced: [5, 10] },
{ country: "Slovenia", code: "SI", flag: "🇸🇮", standard: 22, reduced: [5, 9.5] },
{ country: "Spain", code: "ES", flag: "🇪🇸", standard: 21, reduced: [4, 10] },
{ country: "Sweden", code: "SE", flag: "🇸🇪", standard: 25, reduced: [6, 12] }
];
function useVatRates() {
const rates = readonly(ref(euVatRates));
function getRateByCode(code) {
return euVatRates.find((r) => r.code === code.toUpperCase());
}
function formatApiResponse(rate) {
return {
country: rate.country,
country_code: rate.code,
standard_rate: rate.standard,
reduced_rates: rate.reduced,
currency: "EUR"
};
}
function formatAllRatesResponse() {
return euVatRates.map(formatApiResponse);
}
return { rates, getRateByCode, formatApiResponse, formatAllRatesResponse };
}
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
__name: "VatRateTable",
__ssrInlineRender: true,
setup(__props) {
const rates = ref([]);
const search = ref("");
const filtered = computed(() => {
const q = search.value.toLowerCase().trim();
if (!q) return rates.value;
return rates.value.filter(
(r) => r.country.toLowerCase().includes(q) || r.code.toLowerCase().includes(q)
);
});
return (_ctx, _push, _parent, _attrs) => {
_push(` VAT Rates across the EU
Current standard and reduced rates for all 27 member states.
Data updated regularly from official EU sources.
`);
};
}
});
const _sfc_setup$4 = _sfc_main$4.setup;
_sfc_main$4.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/VatRateTable.vue");
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
};
const __nuxt_component_3 = Object.assign(_sfc_main$4, { __name: "VatRateTable" });
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
__name: "ApiPlayground",
__ssrInlineRender: true,
setup(__props) {
const { rates } = useVatRates();
const selectedCode = ref("DE");
const response = ref("");
const statusCode = ref(null);
const isLoading = ref(false);
const showAllRates = ref(false);
const endpointUrl = computed(
() => showAllRates.value ? "https://vat-api.eu/api/v1/rates" : `https://vat-api.eu/api/v1/rates/${selectedCode.value}`
);
return (_ctx, _push, _parent, _attrs) => {
_push(` Try it out
Build your request, send it, and see the response.
`);
};
}
});
const _sfc_setup$3 = _sfc_main$3.setup;
_sfc_main$3.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ApiPlayground.vue");
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
};
const __nuxt_component_4 = Object.assign(_sfc_main$3, { __name: "ApiPlayground" });
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
__name: "CodeExamples",
__ssrInlineRender: true,
setup(__props) {
const tabs = ["cURL", "JavaScript", "Python"];
const activeTab = ref("cURL");
const code = {
cURL: `# Get all EU VAT rates
curl https://vat-api.eu/api/v1/rates
# Get rates for a specific country
curl https://vat-api.eu/api/v1/rates/DE`,
JavaScript: `const response = await fetch('https://vat-api.eu/api/v1/rates/DE');
const data = await response.json();
console.log(data.standard_rate); // 19`,
Python: `import requests
response = requests.get('https://vat-api.eu/api/v1/rates/DE')
data = response.json()
print(data['standard_rate']) # 19`
};
const highlighted = {
cURL: highlightBash(code.cURL),
JavaScript: highlightJS(code.JavaScript),
Python: highlightPython(code.Python)
};
function highlightBash(src) {
return src.replace(/(#.*)/g, '$1').replace(/(curl)\s/g, '$1 ').replace(/(https?:\/\/[^\s]+)/g, '$1');
}
function highlightJS(src) {
return src.replace(/(\/\/\s*\d+)/g, '$1').replace(/(const|await)\s/g, '$1 ').replace(/(fetch|json|log)\(/g, '$1(').replace(/('https?:\/\/[^']*')/g, '$1').replace(/(\.standard_rate)/g, '$1').replace(/(console)\./g, '$1.').replace(/(response)\./g, '$1.');
}
function highlightPython(src) {
return src.replace(/(#\s*\d+)/g, '$1').replace(/(import|from)\s/g, '$1 ').replace(/(requests)/g, '$1').replace(/('https?:\/\/[^']*')/g, '$1').replace(/(\['standard_rate'\])/g, '$1').replace(/(print|get)\(/g, '$1(').replace(/(response)\./g, '$1.');
}
const copied = ref(false);
return (_ctx, _push, _parent, _attrs) => {
_push(` Quick start
Integrate EU VAT rates into your project in seconds.
`);
};
}
});
const _sfc_setup$2 = _sfc_main$2.setup;
_sfc_main$2.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/CodeExamples.vue");
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
};
const __nuxt_component_5 = Object.assign(_sfc_main$2, { __name: "CodeExamples" });
const _sfc_main$1 = {};
function _sfc_ssrRender(_ctx, _push, _parent, _attrs) {
_push(``);
}
const _sfc_setup$1 = _sfc_main$1.setup;
_sfc_main$1.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/FooterSection.vue");
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const __nuxt_component_6 = /* @__PURE__ */ Object.assign(_export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender]]), { __name: "FooterSection" });
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "index",
__ssrInlineRender: true,
setup(__props) {
useHead({
title: "vat-api.eu — Free EU VAT Rates API",
meta: [
{
name: "description",
content: "Get current VAT rates for all 27 EU member states with a free, open REST API. No API key required."
},
{ property: "og:title", content: "vat-api.eu — Free EU VAT Rates API" },
{
property: "og:description",
content: "Get current VAT rates for all 27 EU member states with a free, open REST API. No API key required."
},
{ property: "og:type", content: "website" },
{ property: "og:url", content: "https://vat-api.eu" },
{ name: "twitter:card", content: "summary_large_image" },
{ name: "twitter:title", content: "vat-api.eu — Free EU VAT Rates API" },
{
name: "twitter:description",
content: "Get current VAT rates for all 27 EU member states with a free, open REST API. No API key required."
}
]
});
return (_ctx, _push, _parent, _attrs) => {
const _component_Navbar = __nuxt_component_0;
const _component_HeroSection = __nuxt_component_1;
const _component_FeaturesGrid = __nuxt_component_2;
const _component_VatRateTable = __nuxt_component_3;
const _component_ApiPlayground = __nuxt_component_4;
const _component_CodeExamples = __nuxt_component_5;
const _component_FooterSection = __nuxt_component_6;
_push(`
`);
_push(ssrRenderComponent(_component_Navbar, null, null, _parent));
_push(``);
_push(ssrRenderComponent(_component_HeroSection, null, null, _parent));
_push(ssrRenderComponent(_component_FeaturesGrid, null, null, _parent));
_push(ssrRenderComponent(_component_VatRateTable, null, null, _parent));
_push(ssrRenderComponent(_component_ApiPlayground, null, null, _parent));
_push(ssrRenderComponent(_component_CodeExamples, null, null, _parent));
_push(``);
_push(ssrRenderComponent(_component_FooterSection, null, null, _parent));
_push(`
`);
};
}
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/index.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export { _sfc_main as default };
//# sourceMappingURL=index-BDcJu3_l.mjs.map