feat: init

This commit is contained in:
2026-02-13 22:02:30 +01:00
commit 8f9ff830fb
16711 changed files with 3307340 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import { escapeHtml } from '@vue/shared';
const _messages = {
"appName": "Nuxt",
"status": 500,
"statusText": "Internal server error",
"description": "This page is temporarily unavailable.",
"refresh": "Refresh this page"
};
const template = (messages) => {
messages = {
..._messages,
...messages
};
return "<!DOCTYPE html><html lang=\"en\"><head><title>" + escapeHtml(messages.status) + " - " + escapeHtml(messages.statusText) + " | " + escapeHtml(messages.appName) + "</title><meta charset=\"utf-8\"><meta content=\"width=device-width,initial-scale=1.0,minimum-scale=1.0\" name=\"viewport\"><script>!function(){const e=document.createElement(\"link\").relList;if(!(e&&e.supports&&e.supports(\"modulepreload\"))){for(const e of document.querySelectorAll('link[rel=\"modulepreload\"]'))r(e);new MutationObserver(e=>{for(const o of e)if(\"childList\"===o.type)for(const e of o.addedNodes)\"LINK\"===e.tagName&&\"modulepreload\"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),\"use-credentials\"===e.crossOrigin?r.credentials=\"include\":\"anonymous\"===e.crossOrigin?r.credentials=\"omit\":r.credentials=\"same-origin\",r}(e);fetch(e.href,r)}}();<\/script><style>*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:\"\"}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.grid{display:grid}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.place-content-center{place-content:center}.overflow-hidden{overflow:hidden}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2{padding-left:.5rem;padding-right:.5rem}.text-center{text-align:center}.text-\\[80px\\]{font-size:80px}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[\\#020420\\]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\\[\\#64748B\\]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-wide{letter-spacing:.025em}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-\\[\\#020420\\]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\\:text-\\[110px\\]{font-size:110px}.sm\\:text-3xl{font-size:1.875rem;line-height:2.25rem}}</style></head><body class=\"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide\"><div class=\"max-w-520px text-center\"><h1 class=\"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]\">" + escapeHtml(messages.status) + "</h1><h2 class=\"font-semibold mb-2 sm:text-3xl text-2xl\">" + escapeHtml(messages.statusText) + "</h2><p class=\"mb-4 px-2 text-[#64748B] text-md\">" + escapeHtml(messages.description) + "</p></div></body></html>";
};
export { template };
//# sourceMappingURL=error-500.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"error-500.mjs","sources":["../../../../node_modules/@nuxt/nitro-server/dist/runtime/templates/error-500.mjs"],"names":[],"mappings":"","x_google_ignoreList":[0]}

View File

@@ -0,0 +1,84 @@
import { u as useRuntimeConfig } from '../nitro/nitro.mjs';
const FALLBACK_RATES = [
{ country: "Austria", country_code: "AT", standard_rate: 20, reduced_rates: [10, 13], currency: "EUR" },
{ country: "Belgium", country_code: "BE", standard_rate: 21, reduced_rates: [6, 12], currency: "EUR" },
{ country: "Bulgaria", country_code: "BG", standard_rate: 20, reduced_rates: [9], currency: "EUR" },
{ country: "Croatia", country_code: "HR", standard_rate: 25, reduced_rates: [5, 13], currency: "EUR" },
{ country: "Cyprus", country_code: "CY", standard_rate: 19, reduced_rates: [5, 9], currency: "EUR" },
{ country: "Czech Republic", country_code: "CZ", standard_rate: 21, reduced_rates: [12, 15], currency: "EUR" },
{ country: "Denmark", country_code: "DK", standard_rate: 25, reduced_rates: [], currency: "EUR" },
{ country: "Estonia", country_code: "EE", standard_rate: 22, reduced_rates: [9], currency: "EUR" },
{ country: "Finland", country_code: "FI", standard_rate: 25.5, reduced_rates: [10, 14], currency: "EUR" },
{ country: "France", country_code: "FR", standard_rate: 20, reduced_rates: [5.5, 10], currency: "EUR" },
{ country: "Germany", country_code: "DE", standard_rate: 19, reduced_rates: [7], currency: "EUR" },
{ country: "Greece", country_code: "GR", standard_rate: 24, reduced_rates: [6, 13], currency: "EUR" },
{ country: "Hungary", country_code: "HU", standard_rate: 27, reduced_rates: [5, 18], currency: "EUR" },
{ country: "Ireland", country_code: "IE", standard_rate: 23, reduced_rates: [9, 13.5], currency: "EUR" },
{ country: "Italy", country_code: "IT", standard_rate: 22, reduced_rates: [5, 10], currency: "EUR" },
{ country: "Latvia", country_code: "LV", standard_rate: 21, reduced_rates: [5, 12], currency: "EUR" },
{ country: "Lithuania", country_code: "LT", standard_rate: 21, reduced_rates: [5, 9], currency: "EUR" },
{ country: "Luxembourg", country_code: "LU", standard_rate: 17, reduced_rates: [8], currency: "EUR" },
{ country: "Malta", country_code: "MT", standard_rate: 18, reduced_rates: [5, 7], currency: "EUR" },
{ country: "Netherlands", country_code: "NL", standard_rate: 21, reduced_rates: [9], currency: "EUR" },
{ country: "Poland", country_code: "PL", standard_rate: 23, reduced_rates: [5, 8], currency: "EUR" },
{ country: "Portugal", country_code: "PT", standard_rate: 23, reduced_rates: [6, 13], currency: "EUR" },
{ country: "Romania", country_code: "RO", standard_rate: 19, reduced_rates: [5, 9], currency: "EUR" },
{ country: "Slovakia", country_code: "SK", standard_rate: 23, reduced_rates: [5, 10], currency: "EUR" },
{ country: "Slovenia", country_code: "SI", standard_rate: 22, reduced_rates: [5, 9.5], currency: "EUR" },
{ country: "Spain", country_code: "ES", standard_rate: 21, reduced_rates: [4, 10], currency: "EUR" },
{ country: "Sweden", country_code: "SE", standard_rate: 25, reduced_rates: [6, 12], currency: "EUR" }
];
const TWENTY_FOUR_HOURS = 24 * 60 * 60 * 1e3;
let cache = null;
function todayDateString() {
return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
}
function isCacheValid() {
if (!cache) return false;
const age = Date.now() - cache.fetchedAt;
return age < TWENTY_FOUR_HOURS && cache.date === todayDateString();
}
function transformVatstackResponse(vatstackRates) {
return vatstackRates.map((r) => {
var _a, _b, _c, _d;
return {
country: (_a = r.country_name) != null ? _a : "",
country_code: (_b = r.country_code) != null ? _b : "",
standard_rate: (_c = r.standard_rate) != null ? _c : 0,
reduced_rates: (_d = r.reduced_rates) != null ? _d : [],
currency: "EUR"
};
});
}
async function getAllRates() {
var _a;
if (isCacheValid()) return cache.data;
const config = useRuntimeConfig();
const apiKey = config.vatstackApiKey;
if (!apiKey) {
cache = { data: FALLBACK_RATES, date: todayDateString(), fetchedAt: Date.now() };
return FALLBACK_RATES;
}
try {
const response = await $fetch("https://api.vatstack.com/v1/rates", {
headers: { "X-API-Key": apiKey },
query: { member_state: true, limit: 100 }
});
const items = (_a = response.rates) != null ? _a : response;
const euOnly = items.filter((r) => r.member_state === true);
const rates = transformVatstackResponse(euOnly);
cache = { data: rates, date: todayDateString(), fetchedAt: Date.now() };
return rates;
} catch {
cache = { data: FALLBACK_RATES, date: todayDateString(), fetchedAt: Date.now() };
return FALLBACK_RATES;
}
}
async function getRateByCode(code) {
const rates = await getAllRates();
return rates.find((r) => r.country_code === code.toUpperCase());
}
export { getAllRates as a, getRateByCode as g };
//# sourceMappingURL=vatRates.mjs.map

File diff suppressed because one or more lines are too long