This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
const load = async ({ locals }) => {
|
||||
return {
|
||||
user: locals.user
|
||||
};
|
||||
};
|
||||
|
||||
var _layout_server_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 0;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_layout.svelte-C9R7TwNZ.js')).default;
|
||||
const server_id = "src/routes/+layout.server.ts";
|
||||
const imports = ["_app/immutable/nodes/0.DsCqkoz9.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/Xjya7ye4.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/CoAkxMBS.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CvA4ASMA.js","_app/immutable/chunks/ggIfGDPQ.js"];
|
||||
const stylesheets = ["_app/immutable/assets/0.Ci1WSy1v.css"];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _layout_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=0-DANNRPIf.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"0-DANNRPIf.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_layout.server.ts.js","../../../.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["const load = async ({ locals }) => {\n return {\n user: locals.user\n };\n};\nexport {\n load\n};\n","import * as server from '../entries/pages/_layout.server.ts.js';\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/+layout.server.ts\";\nexport const imports = [\"_app/immutable/nodes/0.DsCqkoz9.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/CPmvlhtF.js\",\"_app/immutable/chunks/nEbfNkJh.js\",\"_app/immutable/chunks/zcqfpVBB.js\",\"_app/immutable/chunks/Xjya7ye4.js\",\"_app/immutable/chunks/BpNSSBPP.js\",\"_app/immutable/chunks/CoAkxMBS.js\",\"_app/immutable/chunks/BX9MO-1l.js\",\"_app/immutable/chunks/CvA4ASMA.js\",\"_app/immutable/chunks/ggIfGDPQ.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.Ci1WSy1v.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK;AACnC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,MAAM,CAAC;AACjB,GAAG;AACH,CAAC;;;;;;;ACFW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE;AAElG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxZ,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
const index = 1;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./error.svelte-C7iligE9.js')).default;
|
||||
const imports = ["_app/immutable/nodes/1.CwhQAky3.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/ggIfGDPQ.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/BX9MO-1l.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=1-BIdyPzep.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"1-BIdyPzep.js","sources":["../../../.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.CwhQAky3.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/ggIfGDPQ.js\",\"_app/immutable/chunks/nEbfNkJh.js\",\"_app/immutable/chunks/CPmvlhtF.js\",\"_app/immutable/chunks/BX9MO-1l.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsC,CAAC,EAAE;AACpG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpO,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
const index = 2;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-fWQjRNRW.js')).default;
|
||||
const imports = ["_app/immutable/nodes/2.B4w5AQ-r.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/uf3Is7Es.js","_app/immutable/chunks/Xjya7ye4.js","_app/immutable/chunks/DTd9pe6t.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=2-BM-ldjTW.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"2-BM-ldjTW.js","sources":["../../../.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/2.B4w5AQ-r.js\",\"_app/immutable/chunks/D4nn9Y_6.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/nEbfNkJh.js\",\"_app/immutable/chunks/zcqfpVBB.js\",\"_app/immutable/chunks/BpNSSBPP.js\",\"_app/immutable/chunks/uf3Is7Es.js\",\"_app/immutable/chunks/Xjya7ye4.js\",\"_app/immutable/chunks/DTd9pe6t.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAkC,CAAC,EAAE;AAChG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChV,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { r as redirect } from './index-wpIsICWW.js';
|
||||
|
||||
const actions = {
|
||||
default: async ({ locals }) => {
|
||||
locals.pb.authStore.clear();
|
||||
throw redirect(303, "/login");
|
||||
}
|
||||
};
|
||||
|
||||
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
actions: actions
|
||||
});
|
||||
|
||||
const index = 3;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-CzjPx6eH.js')).default;
|
||||
const server_id = "src/routes/logout/+page.server.ts";
|
||||
const imports = ["_app/immutable/nodes/3.sctq0uPd.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CoAkxMBS.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/Xjya7ye4.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/uf3Is7Es.js","_app/immutable/chunks/DTd9pe6t.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=3-CFvpokQ_.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"3-CFvpokQ_.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/logout/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/3.js"],"sourcesContent":["import { redirect } from \"@sveltejs/kit\";\nconst actions = {\n default: async ({ locals }) => {\n locals.pb.authStore.clear();\n throw redirect(303, \"/login\");\n }\n};\nexport {\n actions\n};\n","import * as server from '../entries/pages/logout/_page.server.ts.js';\n\nexport const index = 3;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/logout/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/logout/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/3.sctq0uPd.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/nEbfNkJh.js\",\"_app/immutable/chunks/CoAkxMBS.js\",\"_app/immutable/chunks/BX9MO-1l.js\",\"_app/immutable/chunks/CPmvlhtF.js\",\"_app/immutable/chunks/Xjya7ye4.js\",\"_app/immutable/chunks/zcqfpVBB.js\",\"_app/immutable/chunks/uf3Is7Es.js\",\"_app/immutable/chunks/DTd9pe6t.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;AACA,MAAM,OAAO,GAAG;AAChB,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK;AACjC,IAAI,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE;AAC/B,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;AACjC,EAAE;AACF,CAAC;;;;;;;ACJW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAyC,CAAC,EAAE;AAEvG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpX,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,52 @@
|
||||
import { r as redirect } from './index-wpIsICWW.js';
|
||||
|
||||
const load = async ({ url, locals }) => {
|
||||
if (locals.user) {
|
||||
throw redirect(303, url.searchParams.get("redirectTo") ?? "/");
|
||||
}
|
||||
return {
|
||||
redirectTo: url.searchParams.get("redirectTo") ?? "",
|
||||
error: null
|
||||
};
|
||||
};
|
||||
const actions = {
|
||||
default: async ({ request, locals, url }) => {
|
||||
const formData = await request.formData();
|
||||
const email = String(formData.get("email") ?? "").trim();
|
||||
const password = String(formData.get("password") ?? "");
|
||||
const redirectTo = String(formData.get("redirectTo") ?? "").trim() || "/";
|
||||
if (!email || !password) {
|
||||
return {
|
||||
redirectTo,
|
||||
error: "Email and password are required."
|
||||
};
|
||||
}
|
||||
try {
|
||||
await locals.pb.collection("users").authWithPassword(email, password);
|
||||
} catch (err) {
|
||||
const message = err && typeof err === "object" && "message" in err ? String(err.message) : "Invalid email or password.";
|
||||
return {
|
||||
redirectTo,
|
||||
error: message
|
||||
};
|
||||
}
|
||||
throw redirect(303, redirectTo);
|
||||
}
|
||||
};
|
||||
|
||||
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
actions: actions,
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 4;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-CYuAo59m.js')).default;
|
||||
const server_id = "src/routes/login/+page.server.ts";
|
||||
const imports = ["_app/immutable/nodes/4.BG9kRLiv.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/CoAkxMBS.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/Xjya7ye4.js","_app/immutable/chunks/uf3Is7Es.js","_app/immutable/chunks/DTd9pe6t.js","_app/immutable/chunks/CvA4ASMA.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=4-ano5Glp5.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"4-ano5Glp5.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/login/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/4.js"],"sourcesContent":["import { redirect } from \"@sveltejs/kit\";\nconst load = async ({ url, locals }) => {\n if (locals.user) {\n throw redirect(303, url.searchParams.get(\"redirectTo\") ?? \"/\");\n }\n return {\n redirectTo: url.searchParams.get(\"redirectTo\") ?? \"\",\n error: null\n };\n};\nconst actions = {\n default: async ({ request, locals, url }) => {\n const formData = await request.formData();\n const email = String(formData.get(\"email\") ?? \"\").trim();\n const password = String(formData.get(\"password\") ?? \"\");\n const redirectTo = String(formData.get(\"redirectTo\") ?? \"\").trim() || \"/\";\n if (!email || !password) {\n return {\n redirectTo,\n error: \"Email and password are required.\"\n };\n }\n try {\n await locals.pb.collection(\"users\").authWithPassword(email, password);\n } catch (err) {\n const message = err && typeof err === \"object\" && \"message\" in err ? String(err.message) : \"Invalid email or password.\";\n return {\n redirectTo,\n error: message\n };\n }\n throw redirect(303, redirectTo);\n }\n};\nexport {\n actions,\n load\n};\n","import * as server from '../entries/pages/login/_page.server.ts.js';\n\nexport const index = 4;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/login/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/login/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/4.BG9kRLiv.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/nEbfNkJh.js\",\"_app/immutable/chunks/CPmvlhtF.js\",\"_app/immutable/chunks/zcqfpVBB.js\",\"_app/immutable/chunks/BpNSSBPP.js\",\"_app/immutable/chunks/CoAkxMBS.js\",\"_app/immutable/chunks/BX9MO-1l.js\",\"_app/immutable/chunks/Xjya7ye4.js\",\"_app/immutable/chunks/uf3Is7Es.js\",\"_app/immutable/chunks/DTd9pe6t.js\",\"_app/immutable/chunks/CvA4ASMA.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;AACA,MAAM,IAAI,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK;AACxC,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE;AACnB,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC;AAClE,EAAE;AACF,EAAE,OAAO;AACT,IAAI,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE;AACxD,IAAI,KAAK,EAAE;AACX,GAAG;AACH,CAAC;AACD,MAAM,OAAO,GAAG;AAChB,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK;AAC/C,IAAI,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE;AAC7C,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;AAC5D,IAAI,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;AAC3D,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG;AAC7E,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE;AAC7B,MAAM,OAAO;AACb,QAAQ,UAAU;AAClB,QAAQ,KAAK,EAAE;AACf,OAAO;AACP,IAAI;AACJ,IAAI,IAAI;AACR,MAAM,MAAM,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC3E,IAAI,CAAC,CAAC,OAAO,GAAG,EAAE;AAClB,MAAM,MAAM,OAAO,GAAG,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,SAAS,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,4BAA4B;AAC7H,MAAM,OAAO;AACb,QAAQ,UAAU;AAClB,QAAQ,KAAK,EAAE;AACf,OAAO;AACP,IAAI;AACJ,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;AACnC,EAAE;AACF,CAAC;;;;;;;;AC/BW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAwC,CAAC,EAAE;AAEtG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5b,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,254 @@
|
||||
import { m as attributes, t as clsx, c as bind_props, r as attr, o as escape_html } from './index2-DHYCG7Ly.js';
|
||||
import './root-BEb1kut4.js';
|
||||
import './state.svelte-CsO7NG8X.js';
|
||||
import { B as Button } from './button-DEEgteap.js';
|
||||
import { c as cn } from './utils2-B05Dmz_H.js';
|
||||
import { L as Label } from './label-CsPa3Fds.js';
|
||||
import 'clsx';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function Input($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
value = void 0,
|
||||
type,
|
||||
files = void 0,
|
||||
class: className,
|
||||
"data-slot": dataSlot = "input",
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
if (type === "file") {
|
||||
$$renderer2.push("<!--[-->");
|
||||
$$renderer2.push(`<input${attributes(
|
||||
{
|
||||
"data-slot": dataSlot,
|
||||
class: clsx(cn("selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className)),
|
||||
type: "file",
|
||||
...restProps
|
||||
},
|
||||
void 0,
|
||||
void 0,
|
||||
void 0,
|
||||
4
|
||||
)}/>`);
|
||||
} else {
|
||||
$$renderer2.push("<!--[!-->");
|
||||
$$renderer2.push(`<input${attributes(
|
||||
{
|
||||
"data-slot": dataSlot,
|
||||
class: clsx(cn("border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className)),
|
||||
type,
|
||||
value,
|
||||
...restProps
|
||||
},
|
||||
void 0,
|
||||
void 0,
|
||||
void 0,
|
||||
4
|
||||
)}/>`);
|
||||
}
|
||||
$$renderer2.push(`<!--]-->`);
|
||||
bind_props($$props, { ref, value, files });
|
||||
});
|
||||
}
|
||||
function Card($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card",
|
||||
class: clsx(cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card_content($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card-content",
|
||||
class: clsx(cn("px-6", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card_description($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<p${attributes({
|
||||
"data-slot": "card-description",
|
||||
class: clsx(cn("text-muted-foreground text-sm", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></p>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card_header($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card-header",
|
||||
class: clsx(cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card_title($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card-title",
|
||||
class: clsx(cn("leading-none font-semibold", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function _page($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let { data, formAction } = $$props;
|
||||
const redirectTo = data.form?.redirectTo ?? data.redirectTo ?? "";
|
||||
const error = data.form?.error;
|
||||
$$renderer2.push(`<div class="app-shell max-w-sm mx-auto w-full">`);
|
||||
$$renderer2.push("<!---->");
|
||||
Card?.($$renderer2, {
|
||||
children: ($$renderer3) => {
|
||||
$$renderer3.push("<!---->");
|
||||
Card_header?.($$renderer3, {
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push("<!---->");
|
||||
Card_title?.($$renderer4, {
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->Sign in`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----> `);
|
||||
$$renderer4.push("<!---->");
|
||||
Card_description?.($$renderer4, {
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->Enter your email and password.`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer3.push(`<!----> `);
|
||||
$$renderer3.push("<!---->");
|
||||
Card_content?.($$renderer3, {
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<form method="POST"${attr("action", formAction)} class="flex flex-col gap-4"><input type="hidden" name="redirectTo"${attr("value", redirectTo)}/> <div class="grid gap-2">`);
|
||||
Label($$renderer4, {
|
||||
for: "email",
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->Email`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----> `);
|
||||
Input($$renderer4, {
|
||||
id: "email",
|
||||
name: "email",
|
||||
type: "email",
|
||||
placeholder: "you@example.com",
|
||||
required: true,
|
||||
autocomplete: "email"
|
||||
});
|
||||
$$renderer4.push(`<!----></div> <div class="grid gap-2">`);
|
||||
Label($$renderer4, {
|
||||
for: "password",
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->Password`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----> `);
|
||||
Input($$renderer4, {
|
||||
id: "password",
|
||||
name: "password",
|
||||
type: "password",
|
||||
required: true,
|
||||
autocomplete: "current-password"
|
||||
});
|
||||
$$renderer4.push(`<!----></div> `);
|
||||
if (error) {
|
||||
$$renderer4.push("<!--[-->");
|
||||
$$renderer4.push(`<p class="text-sm text-destructive">${escape_html(error)}</p>`);
|
||||
} else {
|
||||
$$renderer4.push("<!--[!-->");
|
||||
}
|
||||
$$renderer4.push(`<!--]--> `);
|
||||
Button($$renderer4, {
|
||||
type: "submit",
|
||||
class: "w-full",
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->Sign in`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----></form>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer3.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
});
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-CYuAo59m.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,23 @@
|
||||
import { r as attr } from './index2-DHYCG7Ly.js';
|
||||
import './root-BEb1kut4.js';
|
||||
import './state.svelte-CsO7NG8X.js';
|
||||
import { B as Button } from './button-DEEgteap.js';
|
||||
import 'clsx';
|
||||
import './utils2-B05Dmz_H.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function _page($$renderer, $$props) {
|
||||
let { formAction } = $$props;
|
||||
$$renderer.push(`<div class="app-shell flex items-center justify-center min-h-[200px]"><form method="POST"${attr("action", formAction)}>`);
|
||||
Button($$renderer, {
|
||||
type: "submit",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Log out`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></form></div>`);
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-CzjPx6eH.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_page.svelte-CzjPx6eH.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/logout/_page.svelte.js"],"sourcesContent":["import { i as attr } from \"../../../chunks/index2.js\";\nimport \"@sveltejs/kit/internal\";\nimport \"../../../chunks/exports.js\";\nimport \"../../../chunks/utils.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../../../chunks/root.js\";\nimport \"../../../chunks/state.svelte.js\";\nimport { B as Button } from \"../../../chunks/button.js\";\nfunction _page($$renderer, $$props) {\n let { formAction } = $$props;\n $$renderer.push(`<div class=\"app-shell flex items-center justify-center min-h-[200px]\"><form method=\"POST\"${attr(\"action\", formAction)}>`);\n Button($$renderer, {\n type: \"submit\",\n children: ($$renderer2) => {\n $$renderer2.push(`<!---->Log out`);\n },\n $$slots: { default: true }\n });\n $$renderer.push(`<!----></form></div>`);\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;;;AAQA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO;AAC9B,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,yFAAyF,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5I,EAAE,MAAM,CAAC,UAAU,EAAE;AACrB,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,QAAQ,EAAE,CAAC,WAAW,KAAK;AAC/B,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACxC,IAAI,CAAC;AACL,IAAI,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC5B,GAAG,CAAC;AACJ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC,CAAC;AACzC;;;;"}
|
||||
@@ -0,0 +1,52 @@
|
||||
import 'clsx';
|
||||
import { B as Button } from './button-DEEgteap.js';
|
||||
import './index2-DHYCG7Ly.js';
|
||||
import './utils2-B05Dmz_H.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function _page($$renderer, $$props) {
|
||||
let { data } = $$props;
|
||||
{
|
||||
$$renderer.push("<!--[!-->");
|
||||
$$renderer.push(`<main class="flex min-h-0 flex-1 flex-col items-center justify-center gap-6 p-6"><h1 class="text-2xl font-semibold">Base</h1> <div class="flex w-full max-w-xs flex-col gap-3"><a href="https://prism.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 w-full min-h-12",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Prism`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="https://tasgrid.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 min-h-12 w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->TasGrid`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="https://stackq.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 min-h-12 w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Stackq`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="https://hrm.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 min-h-12 w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->HRM`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a></div></main>`);
|
||||
}
|
||||
$$renderer.push(`<!--]-->`);
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-fWQjRNRW.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_page.svelte-fWQjRNRW.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_page.svelte.js"],"sourcesContent":["import \"clsx\";\nimport { B as Button } from \"../../chunks/button.js\";\nfunction _page($$renderer, $$props) {\n let { data } = $$props;\n {\n $$renderer.push(\"<!--[!-->\");\n $$renderer.push(`<main class=\"flex min-h-0 flex-1 flex-col items-center justify-center gap-6 p-6\"><h1 class=\"text-2xl font-semibold\">Base</h1> <div class=\"flex w-full max-w-xs flex-col gap-3\"><a href=\"https://prism.ccllc.pro\" class=\"block\" target=\"_blank\" rel=\"noopener noreferrer\">`);\n Button($$renderer, {\n class: \"h-12 w-full min-h-12\",\n children: ($$renderer2) => {\n $$renderer2.push(`<!---->Prism`);\n },\n $$slots: { default: true }\n });\n $$renderer.push(`<!----></a> <a href=\"https://tasgrid.ccllc.pro\" class=\"block\" target=\"_blank\" rel=\"noopener noreferrer\">`);\n Button($$renderer, {\n class: \"h-12 min-h-12 w-full\",\n variant: \"outline\",\n children: ($$renderer2) => {\n $$renderer2.push(`<!---->TasGrid`);\n },\n $$slots: { default: true }\n });\n $$renderer.push(`<!----></a> <a href=\"https://stackq.ccllc.pro\" class=\"block\" target=\"_blank\" rel=\"noopener noreferrer\">`);\n Button($$renderer, {\n class: \"h-12 min-h-12 w-full\",\n variant: \"outline\",\n children: ($$renderer2) => {\n $$renderer2.push(`<!---->Stackq`);\n },\n $$slots: { default: true }\n });\n $$renderer.push(`<!----></a> <a href=\"https://hrm.ccllc.pro\" class=\"block\" target=\"_blank\" rel=\"noopener noreferrer\">`);\n Button($$renderer, {\n class: \"h-12 min-h-12 w-full\",\n variant: \"outline\",\n children: ($$renderer2) => {\n $$renderer2.push(`<!---->HRM`);\n },\n $$slots: { default: true }\n });\n $$renderer.push(`<!----></a></div></main>`);\n }\n $$renderer.push(`<!--]-->`);\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;AAEA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO;AACxB,EAAE;AACF,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC;AAChC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,yQAAyQ,CAAC,CAAC;AAChS,IAAI,MAAM,CAAC,UAAU,EAAE;AACvB,MAAM,KAAK,EAAE,sBAAsB;AACnC,MAAM,QAAQ,EAAE,CAAC,WAAW,KAAK;AACjC,QAAQ,WAAW,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC;AACxC,MAAM,CAAC;AACP,MAAM,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC9B,KAAK,CAAC;AACN,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,wGAAwG,CAAC,CAAC;AAC/H,IAAI,MAAM,CAAC,UAAU,EAAE;AACvB,MAAM,KAAK,EAAE,sBAAsB;AACnC,MAAM,OAAO,EAAE,SAAS;AACxB,MAAM,QAAQ,EAAE,CAAC,WAAW,KAAK;AACjC,QAAQ,WAAW,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AAC1C,MAAM,CAAC;AACP,MAAM,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC9B,KAAK,CAAC;AACN,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,uGAAuG,CAAC,CAAC;AAC9H,IAAI,MAAM,CAAC,UAAU,EAAE;AACvB,MAAM,KAAK,EAAE,sBAAsB;AACnC,MAAM,OAAO,EAAE,SAAS;AACxB,MAAM,QAAQ,EAAE,CAAC,WAAW,KAAK;AACjC,QAAQ,WAAW,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,CAAC;AACzC,MAAM,CAAC;AACP,MAAM,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC9B,KAAK,CAAC;AACN,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,oGAAoG,CAAC,CAAC;AAC3H,IAAI,MAAM,CAAC,UAAU,EAAE;AACvB,MAAM,KAAK,EAAE,sBAAsB;AACnC,MAAM,OAAO,EAAE,SAAS;AACxB,MAAM,QAAQ,EAAE,CAAC,WAAW,KAAK;AACjC,QAAQ,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,CAAC;AACP,MAAM,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC9B,KAAK,CAAC;AACN,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,wBAAwB,CAAC,CAAC;AAC/C,EAAE;AACF,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC7B;;;;"}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { j as json } from './index-wpIsICWW.js';
|
||||
|
||||
const POST = async ({ request, locals }) => {
|
||||
if (!locals.user) {
|
||||
return json({ error: "Unauthorized" }, { status: 401 });
|
||||
}
|
||||
let body;
|
||||
try {
|
||||
body = await request.json();
|
||||
} catch {
|
||||
return json({ error: "Invalid JSON" }, { status: 400 });
|
||||
}
|
||||
const darkmode = !!body.darkmode;
|
||||
try {
|
||||
await locals.pb.collection("users").update(locals.user.id, { darkmode });
|
||||
await locals.pb.collection("users").authRefresh();
|
||||
} catch (e) {
|
||||
return json({ error: "Update failed" }, { status: 500 });
|
||||
}
|
||||
return json({ darkmode });
|
||||
};
|
||||
|
||||
export { POST };
|
||||
//# sourceMappingURL=_server.ts-DNQ95foO.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_server.ts-DNQ95foO.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/darkmode/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nconst POST = async ({ request, locals }) => {\n if (!locals.user) {\n return json({ error: \"Unauthorized\" }, { status: 401 });\n }\n let body;\n try {\n body = await request.json();\n } catch {\n return json({ error: \"Invalid JSON\" }, { status: 400 });\n }\n const darkmode = !!body.darkmode;\n try {\n await locals.pb.collection(\"users\").update(locals.user.id, { darkmode });\n await locals.pb.collection(\"users\").authRefresh();\n } catch (e) {\n return json({ error: \"Update failed\" }, { status: 500 });\n }\n return json({ darkmode });\n};\nexport {\n POST\n};\n"],"names":[],"mappings":";;AACK,MAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK;AAC5C,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;AACpB,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC3D,EAAE;AACF,EAAE,IAAI,IAAI;AACV,EAAE,IAAI;AACN,IAAI,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE;AAC/B,EAAE,CAAC,CAAC,MAAM;AACV,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC3D,EAAE;AACF,EAAE,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ;AAClC,EAAE,IAAI;AACN,IAAI,MAAM,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC;AAC5E,IAAI,MAAM,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE;AACrD,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE;AACd,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC5D,EAAE;AACF,EAAE,OAAO,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;AAC3B;;;;"}
|
||||
@@ -0,0 +1,472 @@
|
||||
import { m as attributes, t as clsx, c as bind_props } from './index2-DHYCG7Ly.js';
|
||||
import { c as cn } from './utils2-B05Dmz_H.js';
|
||||
import { twMerge, extendTailwindMerge } from 'tailwind-merge';
|
||||
|
||||
// src/utils.js
|
||||
var SPACE_REGEX = /\s+/g;
|
||||
var removeExtraSpaces = (str) => {
|
||||
if (typeof str !== "string" || !str) return str;
|
||||
return str.replace(SPACE_REGEX, " ").trim();
|
||||
};
|
||||
var cx = (...classnames) => {
|
||||
const classList = [];
|
||||
const buildClassString = (input) => {
|
||||
if (!input && input !== 0 && input !== 0n) return;
|
||||
if (Array.isArray(input)) {
|
||||
for (let i = 0, len = input.length; i < len; i++) buildClassString(input[i]);
|
||||
return;
|
||||
}
|
||||
const type = typeof input;
|
||||
if (type === "string" || type === "number" || type === "bigint") {
|
||||
if (type === "number" && input !== input) return;
|
||||
classList.push(String(input));
|
||||
} else if (type === "object") {
|
||||
const keys = Object.keys(input);
|
||||
for (let i = 0, len = keys.length; i < len; i++) {
|
||||
const key = keys[i];
|
||||
if (input[key]) classList.push(key);
|
||||
}
|
||||
}
|
||||
};
|
||||
for (let i = 0, len = classnames.length; i < len; i++) {
|
||||
const c = classnames[i];
|
||||
if (c !== null && c !== void 0) buildClassString(c);
|
||||
}
|
||||
return classList.length > 0 ? removeExtraSpaces(classList.join(" ")) : void 0;
|
||||
};
|
||||
var falsyToString = (value) => value === false ? "false" : value === true ? "true" : value === 0 ? "0" : value;
|
||||
var isEmptyObject = (obj) => {
|
||||
if (!obj || typeof obj !== "object") return true;
|
||||
for (const _ in obj) return false;
|
||||
return true;
|
||||
};
|
||||
var isEqual = (obj1, obj2) => {
|
||||
if (obj1 === obj2) return true;
|
||||
if (!obj1 || !obj2) return false;
|
||||
const keys1 = Object.keys(obj1);
|
||||
const keys2 = Object.keys(obj2);
|
||||
if (keys1.length !== keys2.length) return false;
|
||||
for (let i = 0; i < keys1.length; i++) {
|
||||
const key = keys1[i];
|
||||
if (!keys2.includes(key)) return false;
|
||||
if (obj1[key] !== obj2[key]) return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
var joinObjects = (obj1, obj2) => {
|
||||
for (const key in obj2) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj2, key)) {
|
||||
const val2 = obj2[key];
|
||||
if (key in obj1) {
|
||||
obj1[key] = cx(obj1[key], val2);
|
||||
} else {
|
||||
obj1[key] = val2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return obj1;
|
||||
};
|
||||
var flat = (arr, target) => {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
const el = arr[i];
|
||||
if (Array.isArray(el)) flat(el, target);
|
||||
else if (el) target.push(el);
|
||||
}
|
||||
};
|
||||
var flatMergeArrays = (...arrays) => {
|
||||
const result = [];
|
||||
flat(arrays, result);
|
||||
const filtered = [];
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
if (result[i]) filtered.push(result[i]);
|
||||
}
|
||||
return filtered;
|
||||
};
|
||||
var mergeObjects = (obj1, obj2) => {
|
||||
const result = {};
|
||||
for (const key in obj1) {
|
||||
const val1 = obj1[key];
|
||||
if (key in obj2) {
|
||||
const val2 = obj2[key];
|
||||
if (Array.isArray(val1) || Array.isArray(val2)) {
|
||||
result[key] = flatMergeArrays(val2, val1);
|
||||
} else if (typeof val1 === "object" && typeof val2 === "object" && val1 && val2) {
|
||||
result[key] = mergeObjects(val1, val2);
|
||||
} else {
|
||||
result[key] = val2 + " " + val1;
|
||||
}
|
||||
} else {
|
||||
result[key] = val1;
|
||||
}
|
||||
}
|
||||
for (const key in obj2) {
|
||||
if (!(key in obj1)) {
|
||||
result[key] = obj2[key];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
// src/config.js
|
||||
var defaultConfig = {
|
||||
twMerge: true,
|
||||
twMergeConfig: {}
|
||||
};
|
||||
|
||||
// src/state.js
|
||||
function createState() {
|
||||
let cachedTwMerge = null;
|
||||
let cachedTwMergeConfig = {};
|
||||
let didTwMergeConfigChange = false;
|
||||
return {
|
||||
get cachedTwMerge() {
|
||||
return cachedTwMerge;
|
||||
},
|
||||
set cachedTwMerge(value) {
|
||||
cachedTwMerge = value;
|
||||
},
|
||||
get cachedTwMergeConfig() {
|
||||
return cachedTwMergeConfig;
|
||||
},
|
||||
set cachedTwMergeConfig(value) {
|
||||
cachedTwMergeConfig = value;
|
||||
},
|
||||
get didTwMergeConfigChange() {
|
||||
return didTwMergeConfigChange;
|
||||
},
|
||||
set didTwMergeConfigChange(value) {
|
||||
didTwMergeConfigChange = value;
|
||||
},
|
||||
reset() {
|
||||
cachedTwMerge = null;
|
||||
cachedTwMergeConfig = {};
|
||||
didTwMergeConfigChange = false;
|
||||
}
|
||||
};
|
||||
}
|
||||
var state = createState();
|
||||
|
||||
// src/core.js
|
||||
var getTailwindVariants = (cn) => {
|
||||
const tv = (options, configProp) => {
|
||||
const {
|
||||
extend = null,
|
||||
slots: slotProps = {},
|
||||
variants: variantsProps = {},
|
||||
compoundVariants: compoundVariantsProps = [],
|
||||
compoundSlots = [],
|
||||
defaultVariants: defaultVariantsProps = {}
|
||||
} = options;
|
||||
const config = { ...defaultConfig, ...configProp };
|
||||
const base = extend?.base ? cx(extend.base, options?.base) : options?.base;
|
||||
const variants = extend?.variants && !isEmptyObject(extend.variants) ? mergeObjects(variantsProps, extend.variants) : variantsProps;
|
||||
const defaultVariants = extend?.defaultVariants && !isEmptyObject(extend.defaultVariants) ? { ...extend.defaultVariants, ...defaultVariantsProps } : defaultVariantsProps;
|
||||
if (!isEmptyObject(config.twMergeConfig) && !isEqual(config.twMergeConfig, state.cachedTwMergeConfig)) {
|
||||
state.didTwMergeConfigChange = true;
|
||||
state.cachedTwMergeConfig = config.twMergeConfig;
|
||||
}
|
||||
const isExtendedSlotsEmpty = isEmptyObject(extend?.slots);
|
||||
const componentSlots = !isEmptyObject(slotProps) ? {
|
||||
// add "base" to the slots object
|
||||
base: cx(options?.base, isExtendedSlotsEmpty && extend?.base),
|
||||
...slotProps
|
||||
} : {};
|
||||
const slots = isExtendedSlotsEmpty ? componentSlots : joinObjects(
|
||||
{ ...extend?.slots },
|
||||
isEmptyObject(componentSlots) ? { base: options?.base } : componentSlots
|
||||
);
|
||||
const compoundVariants = isEmptyObject(extend?.compoundVariants) ? compoundVariantsProps : flatMergeArrays(extend?.compoundVariants, compoundVariantsProps);
|
||||
const component = (props) => {
|
||||
if (isEmptyObject(variants) && isEmptyObject(slotProps) && isExtendedSlotsEmpty) {
|
||||
return cn(base, props?.class, props?.className)(config);
|
||||
}
|
||||
if (compoundVariants && !Array.isArray(compoundVariants)) {
|
||||
throw new TypeError(
|
||||
`The "compoundVariants" prop must be an array. Received: ${typeof compoundVariants}`
|
||||
);
|
||||
}
|
||||
if (compoundSlots && !Array.isArray(compoundSlots)) {
|
||||
throw new TypeError(
|
||||
`The "compoundSlots" prop must be an array. Received: ${typeof compoundSlots}`
|
||||
);
|
||||
}
|
||||
const getVariantValue = (variant, vrs = variants, _slotKey = null, slotProps2 = null) => {
|
||||
const variantObj = vrs[variant];
|
||||
if (!variantObj || isEmptyObject(variantObj)) {
|
||||
return null;
|
||||
}
|
||||
const variantProp = slotProps2?.[variant] ?? props?.[variant];
|
||||
if (variantProp === null) return null;
|
||||
const variantKey = falsyToString(variantProp);
|
||||
if (typeof variantKey === "object") {
|
||||
return null;
|
||||
}
|
||||
const defaultVariantProp = defaultVariants?.[variant];
|
||||
const key = variantKey != null ? variantKey : falsyToString(defaultVariantProp);
|
||||
const value = variantObj[key || "false"];
|
||||
return value;
|
||||
};
|
||||
const getVariantClassNames = () => {
|
||||
if (!variants) return null;
|
||||
const keys = Object.keys(variants);
|
||||
const result = [];
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
const value = getVariantValue(keys[i], variants);
|
||||
if (value) result.push(value);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
const getVariantClassNamesBySlotKey = (slotKey, slotProps2) => {
|
||||
if (!variants || typeof variants !== "object") return null;
|
||||
const result = [];
|
||||
for (const variant in variants) {
|
||||
const variantValue = getVariantValue(variant, variants, slotKey, slotProps2);
|
||||
const value = slotKey === "base" && typeof variantValue === "string" ? variantValue : variantValue && variantValue[slotKey];
|
||||
if (value) result.push(value);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
const propsWithoutUndefined = {};
|
||||
for (const prop in props) {
|
||||
const value = props[prop];
|
||||
if (value !== void 0) propsWithoutUndefined[prop] = value;
|
||||
}
|
||||
const getCompleteProps = (key, slotProps2) => {
|
||||
const initialProp = typeof props?.[key] === "object" ? {
|
||||
[key]: props[key]?.initial
|
||||
} : {};
|
||||
return {
|
||||
...defaultVariants,
|
||||
...propsWithoutUndefined,
|
||||
...initialProp,
|
||||
...slotProps2
|
||||
};
|
||||
};
|
||||
const getCompoundVariantsValue = (cv = [], slotProps2) => {
|
||||
const result = [];
|
||||
const cvLength = cv.length;
|
||||
for (let i = 0; i < cvLength; i++) {
|
||||
const { class: tvClass, className: tvClassName, ...compoundVariantOptions } = cv[i];
|
||||
let isValid = true;
|
||||
const completeProps = getCompleteProps(null, slotProps2);
|
||||
for (const key in compoundVariantOptions) {
|
||||
const value = compoundVariantOptions[key];
|
||||
const completePropsValue = completeProps[key];
|
||||
if (Array.isArray(value)) {
|
||||
if (!value.includes(completePropsValue)) {
|
||||
isValid = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if ((value == null || value === false) && (completePropsValue == null || completePropsValue === false))
|
||||
continue;
|
||||
if (completePropsValue !== value) {
|
||||
isValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isValid) {
|
||||
if (tvClass) result.push(tvClass);
|
||||
if (tvClassName) result.push(tvClassName);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
const getCompoundVariantClassNamesBySlot = (slotProps2) => {
|
||||
const compoundClassNames = getCompoundVariantsValue(compoundVariants, slotProps2);
|
||||
if (!Array.isArray(compoundClassNames)) return compoundClassNames;
|
||||
const result = {};
|
||||
const cnFn = cn;
|
||||
for (let i = 0; i < compoundClassNames.length; i++) {
|
||||
const className = compoundClassNames[i];
|
||||
if (typeof className === "string") {
|
||||
result.base = cnFn(result.base, className)(config);
|
||||
} else if (typeof className === "object") {
|
||||
for (const slot in className) {
|
||||
result[slot] = cnFn(result[slot], className[slot])(config);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
const getCompoundSlotClassNameBySlot = (slotProps2) => {
|
||||
if (compoundSlots.length < 1) return null;
|
||||
const result = {};
|
||||
const completeProps = getCompleteProps(null, slotProps2);
|
||||
for (let i = 0; i < compoundSlots.length; i++) {
|
||||
const {
|
||||
slots: slots2 = [],
|
||||
class: slotClass,
|
||||
className: slotClassName,
|
||||
...slotVariants
|
||||
} = compoundSlots[i];
|
||||
if (!isEmptyObject(slotVariants)) {
|
||||
let isValid = true;
|
||||
for (const key in slotVariants) {
|
||||
const completePropsValue = completeProps[key];
|
||||
const slotVariantValue = slotVariants[key];
|
||||
if (completePropsValue === void 0 || (Array.isArray(slotVariantValue) ? !slotVariantValue.includes(completePropsValue) : slotVariantValue !== completePropsValue)) {
|
||||
isValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isValid) continue;
|
||||
}
|
||||
for (let j = 0; j < slots2.length; j++) {
|
||||
const slotName = slots2[j];
|
||||
if (!result[slotName]) result[slotName] = [];
|
||||
result[slotName].push([slotClass, slotClassName]);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
if (!isEmptyObject(slotProps) || !isExtendedSlotsEmpty) {
|
||||
const slotsFns = {};
|
||||
if (typeof slots === "object" && !isEmptyObject(slots)) {
|
||||
const cnFn = cn;
|
||||
for (const slotKey in slots) {
|
||||
slotsFns[slotKey] = (slotProps2) => {
|
||||
const compoundVariantClasses = getCompoundVariantClassNamesBySlot(slotProps2);
|
||||
const compoundSlotClasses = getCompoundSlotClassNameBySlot(slotProps2);
|
||||
return cnFn(
|
||||
slots[slotKey],
|
||||
getVariantClassNamesBySlotKey(slotKey, slotProps2),
|
||||
compoundVariantClasses ? compoundVariantClasses[slotKey] : void 0,
|
||||
compoundSlotClasses ? compoundSlotClasses[slotKey] : void 0,
|
||||
slotProps2?.class,
|
||||
slotProps2?.className
|
||||
)(config);
|
||||
};
|
||||
}
|
||||
}
|
||||
return slotsFns;
|
||||
}
|
||||
return cn(
|
||||
base,
|
||||
getVariantClassNames(),
|
||||
getCompoundVariantsValue(compoundVariants),
|
||||
props?.class,
|
||||
props?.className
|
||||
)(config);
|
||||
};
|
||||
const getVariantKeys = () => {
|
||||
if (!variants || typeof variants !== "object") return;
|
||||
return Object.keys(variants);
|
||||
};
|
||||
component.variantKeys = getVariantKeys();
|
||||
component.extend = extend;
|
||||
component.base = base;
|
||||
component.slots = slots;
|
||||
component.variants = variants;
|
||||
component.defaultVariants = defaultVariants;
|
||||
component.compoundSlots = compoundSlots;
|
||||
component.compoundVariants = compoundVariants;
|
||||
return component;
|
||||
};
|
||||
const createTV = (configProp) => {
|
||||
return (options, config) => tv(options, config ? mergeObjects(configProp, config) : configProp);
|
||||
};
|
||||
return {
|
||||
tv,
|
||||
createTV
|
||||
};
|
||||
};
|
||||
|
||||
var createTwMerge = (cachedTwMergeConfig) => {
|
||||
return isEmptyObject(cachedTwMergeConfig) ? twMerge : extendTailwindMerge({
|
||||
...cachedTwMergeConfig,
|
||||
extend: {
|
||||
theme: cachedTwMergeConfig.theme,
|
||||
classGroups: cachedTwMergeConfig.classGroups,
|
||||
conflictingClassGroupModifiers: cachedTwMergeConfig.conflictingClassGroupModifiers,
|
||||
conflictingClassGroups: cachedTwMergeConfig.conflictingClassGroups,
|
||||
...cachedTwMergeConfig.extend
|
||||
}
|
||||
});
|
||||
};
|
||||
var executeMerge = (classnames, config) => {
|
||||
const base = cx(classnames);
|
||||
if (!base || !(config?.twMerge ?? true)) return base;
|
||||
if (!state.cachedTwMerge || state.didTwMergeConfigChange) {
|
||||
state.didTwMergeConfigChange = false;
|
||||
state.cachedTwMerge = createTwMerge(state.cachedTwMergeConfig);
|
||||
}
|
||||
return state.cachedTwMerge(base) || void 0;
|
||||
};
|
||||
var cnMerge = (...classnames) => {
|
||||
return (config) => executeMerge(classnames, config);
|
||||
};
|
||||
|
||||
// src/index.js
|
||||
var { tv } = getTailwindVariants(cnMerge);
|
||||
|
||||
const buttonVariants = tv({
|
||||
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
|
||||
destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
|
||||
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
|
||||
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
|
||||
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
||||
link: "text-primary underline-offset-4 hover:underline"
|
||||
},
|
||||
size: {
|
||||
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
||||
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
||||
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
||||
icon: "size-9",
|
||||
"icon-sm": "size-8",
|
||||
"icon-lg": "size-10"
|
||||
}
|
||||
},
|
||||
defaultVariants: { variant: "default", size: "default" }
|
||||
});
|
||||
function Button($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
class: className,
|
||||
variant = "default",
|
||||
size = "default",
|
||||
ref = null,
|
||||
href = void 0,
|
||||
type = "button",
|
||||
disabled,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
if (href) {
|
||||
$$renderer2.push("<!--[-->");
|
||||
$$renderer2.push(`<a${attributes({
|
||||
"data-slot": "button",
|
||||
class: clsx(cn(buttonVariants({ variant, size }), className)),
|
||||
href: disabled ? void 0 : href,
|
||||
"aria-disabled": disabled,
|
||||
role: disabled ? "link" : void 0,
|
||||
tabindex: disabled ? -1 : void 0,
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></a>`);
|
||||
} else {
|
||||
$$renderer2.push("<!--[!-->");
|
||||
$$renderer2.push(`<button${attributes({
|
||||
"data-slot": "button",
|
||||
class: clsx(cn(buttonVariants({ variant, size }), className)),
|
||||
type,
|
||||
disabled,
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></button>`);
|
||||
}
|
||||
$$renderer2.push(`<!--]-->`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
|
||||
export { Button as B };
|
||||
//# sourceMappingURL=button-DEEgteap.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,42 @@
|
||||
import { o as escape_html, f as getContext } from './index2-DHYCG7Ly.js';
|
||||
import 'clsx';
|
||||
import './state.svelte-CsO7NG8X.js';
|
||||
import './root-BEb1kut4.js';
|
||||
import { w as writable } from './index-BGaaC8Kf.js';
|
||||
|
||||
function create_updated_store() {
|
||||
const { set, subscribe } = writable(false);
|
||||
{
|
||||
return {
|
||||
subscribe,
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
check: async () => false
|
||||
};
|
||||
}
|
||||
}
|
||||
const stores = {
|
||||
updated: /* @__PURE__ */ create_updated_store()
|
||||
};
|
||||
({
|
||||
check: stores.updated.check
|
||||
});
|
||||
function context() {
|
||||
return getContext("__request__");
|
||||
}
|
||||
const page$1 = {
|
||||
get error() {
|
||||
return context().page.error;
|
||||
},
|
||||
get status() {
|
||||
return context().page.status;
|
||||
}
|
||||
};
|
||||
const page = page$1;
|
||||
function Error$1($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
$$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
|
||||
});
|
||||
}
|
||||
|
||||
export { Error$1 as default };
|
||||
//# sourceMappingURL=error.svelte-C7iligE9.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"error.svelte-C7iligE9.js","sources":["../../../.svelte-kit/adapter-node/entries/fallbacks/error.svelte.js"],"sourcesContent":["import { g as getContext, f as escape_html } from \"../../chunks/index2.js\";\nimport \"clsx\";\nimport \"../../chunks/state.svelte.js\";\nimport \"@sveltejs/kit/internal\";\nimport \"../../chunks/exports.js\";\nimport \"../../chunks/utils.js\";\nimport { w as writable } from \"../../chunks/index.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../../chunks/root.js\";\nfunction create_updated_store() {\n const { set, subscribe } = writable(false);\n {\n return {\n subscribe,\n // eslint-disable-next-line @typescript-eslint/require-await\n check: async () => false\n };\n }\n}\nconst stores = {\n updated: /* @__PURE__ */ create_updated_store()\n};\n({\n check: stores.updated.check\n});\nfunction context() {\n return getContext(\"__request__\");\n}\nconst page$1 = {\n get error() {\n return context().page.error;\n },\n get status() {\n return context().page.status;\n }\n};\nconst page = page$1;\nfunction Error$1($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n $$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);\n });\n}\nexport {\n Error$1 as default\n};\n"],"names":[],"mappings":";;;;;;AASA,SAAS,oBAAoB,GAAG;AAChC,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC5C,EAAE;AACF,IAAI,OAAO;AACX,MAAM,SAAS;AACf;AACA,MAAM,KAAK,EAAE,YAAY;AACzB,KAAK;AACL,EAAE;AACF;AACA,MAAM,MAAM,GAAG;AACf,EAAE,OAAO,kBAAkB,oBAAoB;AAC/C,CAAC;AACD,CAAC;AACD,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AACD,SAAS,OAAO,GAAG;AACnB,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC;AAClC;AACA,MAAM,MAAM,GAAG;AACf,EAAE,IAAI,KAAK,GAAG;AACd,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK;AAC/B,EAAE,CAAC;AACH,EAAE,IAAI,MAAM,GAAG;AACf,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM;AAChC,EAAE;AACF,CAAC;AACD,MAAM,IAAI,GAAG,MAAM;AACnB,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACvG,EAAE,CAAC,CAAC;AACJ;;;;"}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { r as redirect } from './index-wpIsICWW.js';
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const POCKETBASE_URL = process.env.VITE_POCKETBASE_URL ?? "https://pocketbase.ccllc.pro";
|
||||
const LOGIN_PATH = "/login";
|
||||
const LOGOUT_PATH = "/logout";
|
||||
function isPublicRoute(pathname) {
|
||||
return pathname === LOGIN_PATH || pathname.startsWith(LOGIN_PATH + "/") || pathname === LOGOUT_PATH;
|
||||
}
|
||||
const handle = async ({ event, resolve }) => {
|
||||
event.locals.pb = new PocketBase(POCKETBASE_URL);
|
||||
event.locals.pb.authStore.loadFromCookie(event.request.headers.get("cookie") ?? "");
|
||||
try {
|
||||
if (event.locals.pb.authStore.isValid) {
|
||||
await event.locals.pb.collection("users").authRefresh();
|
||||
}
|
||||
} catch {
|
||||
event.locals.pb.authStore.clear();
|
||||
}
|
||||
const record = event.locals.pb.authStore.record;
|
||||
event.locals.user = record ? {
|
||||
id: record.id,
|
||||
email: record.email,
|
||||
name: record.name,
|
||||
avatar: record.avatar,
|
||||
darkmode: !!record.darkmode
|
||||
} : null;
|
||||
if (!event.locals.user && !isPublicRoute(event.url.pathname)) {
|
||||
const redirectTo = event.url.pathname + event.url.search;
|
||||
const loginUrl = redirectTo && redirectTo !== "/" ? `${LOGIN_PATH}?redirectTo=${encodeURIComponent(redirectTo)}` : LOGIN_PATH;
|
||||
throw redirect(303, loginUrl);
|
||||
}
|
||||
const response = await resolve(event);
|
||||
response.headers.append(
|
||||
"set-cookie",
|
||||
event.locals.pb.authStore.exportToCookie({ httpOnly: false, sameSite: "Lax" })
|
||||
);
|
||||
return response;
|
||||
};
|
||||
|
||||
export { handle };
|
||||
//# sourceMappingURL=hooks.server-DlmQdTt1.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"hooks.server-DlmQdTt1.js","sources":["../../../.svelte-kit/adapter-node/entries/hooks.server.js"],"sourcesContent":["import { redirect } from \"@sveltejs/kit\";\nimport PocketBase from \"pocketbase\";\nconst POCKETBASE_URL = process.env.VITE_POCKETBASE_URL ?? \"https://pocketbase.ccllc.pro\";\nconst LOGIN_PATH = \"/login\";\nconst LOGOUT_PATH = \"/logout\";\nfunction isPublicRoute(pathname) {\n return pathname === LOGIN_PATH || pathname.startsWith(LOGIN_PATH + \"/\") || pathname === LOGOUT_PATH;\n}\nconst handle = async ({ event, resolve }) => {\n event.locals.pb = new PocketBase(POCKETBASE_URL);\n event.locals.pb.authStore.loadFromCookie(event.request.headers.get(\"cookie\") ?? \"\");\n try {\n if (event.locals.pb.authStore.isValid) {\n await event.locals.pb.collection(\"users\").authRefresh();\n }\n } catch {\n event.locals.pb.authStore.clear();\n }\n const record = event.locals.pb.authStore.record;\n event.locals.user = record ? {\n id: record.id,\n email: record.email,\n name: record.name,\n avatar: record.avatar,\n darkmode: !!record.darkmode\n } : null;\n if (!event.locals.user && !isPublicRoute(event.url.pathname)) {\n const redirectTo = event.url.pathname + event.url.search;\n const loginUrl = redirectTo && redirectTo !== \"/\" ? `${LOGIN_PATH}?redirectTo=${encodeURIComponent(redirectTo)}` : LOGIN_PATH;\n throw redirect(303, loginUrl);\n }\n const response = await resolve(event);\n response.headers.append(\n \"set-cookie\",\n event.locals.pb.authStore.exportToCookie({ httpOnly: false, sameSite: \"Lax\" })\n );\n return response;\n};\nexport {\n handle\n};\n"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,8BAA8B;AACxF,MAAM,UAAU,GAAG,QAAQ;AAC3B,MAAM,WAAW,GAAG,SAAS;AAC7B,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,EAAE,OAAO,QAAQ,KAAK,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,UAAU,GAAG,GAAG,CAAC,IAAI,QAAQ,KAAK,WAAW;AACrG;AACK,MAAC,MAAM,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK;AAC7C,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,UAAU,CAAC,cAAc,CAAC;AAClD,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;AACrF,EAAE,IAAI;AACN,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE;AAC3C,MAAM,MAAM,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE;AAC7D,IAAI;AACJ,EAAE,CAAC,CAAC,MAAM;AACV,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE;AACrC,EAAE;AACF,EAAE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM;AACjD,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,MAAM,GAAG;AAC/B,IAAI,EAAE,EAAE,MAAM,CAAC,EAAE;AACjB,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK;AACvB,IAAI,IAAI,EAAE,MAAM,CAAC,IAAI;AACrB,IAAI,MAAM,EAAE,MAAM,CAAC,MAAM;AACzB,IAAI,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;AACvB,GAAG,GAAG,IAAI;AACV,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;AAChE,IAAI,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM;AAC5D,IAAI,MAAM,QAAQ,GAAG,UAAU,IAAI,UAAU,KAAK,GAAG,GAAG,CAAC,EAAE,UAAU,CAAC,YAAY,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU;AACjI,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;AACjC,EAAE;AACF,EAAE,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC;AACvC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM;AACzB,IAAI,YAAY;AAChB,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;AACjF,GAAG;AACH,EAAE,OAAO,QAAQ;AACjB;;;;"}
|
||||
@@ -0,0 +1,60 @@
|
||||
import { q as noop } from './index2-DHYCG7Ly.js';
|
||||
import { s as safe_not_equal } from './root-BEb1kut4.js';
|
||||
import 'clsx';
|
||||
|
||||
const subscriber_queue = [];
|
||||
function readable(value, start) {
|
||||
return {
|
||||
subscribe: writable(value, start).subscribe
|
||||
};
|
||||
}
|
||||
function writable(value, start = noop) {
|
||||
let stop = null;
|
||||
const subscribers = /* @__PURE__ */ new Set();
|
||||
function set(new_value) {
|
||||
if (safe_not_equal(value, new_value)) {
|
||||
value = new_value;
|
||||
if (stop) {
|
||||
const run_queue = !subscriber_queue.length;
|
||||
for (const subscriber of subscribers) {
|
||||
subscriber[1]();
|
||||
subscriber_queue.push(subscriber, value);
|
||||
}
|
||||
if (run_queue) {
|
||||
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
||||
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
||||
}
|
||||
subscriber_queue.length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function update(fn) {
|
||||
set(fn(
|
||||
/** @type {T} */
|
||||
value
|
||||
));
|
||||
}
|
||||
function subscribe(run, invalidate = noop) {
|
||||
const subscriber = [run, invalidate];
|
||||
subscribers.add(subscriber);
|
||||
if (subscribers.size === 1) {
|
||||
stop = start(set, update) || noop;
|
||||
}
|
||||
run(
|
||||
/** @type {T} */
|
||||
value
|
||||
);
|
||||
return () => {
|
||||
subscribers.delete(subscriber);
|
||||
if (subscribers.size === 0 && stop) {
|
||||
stop();
|
||||
stop = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
return { set, update, subscribe };
|
||||
}
|
||||
|
||||
export { readable as r, writable as w };
|
||||
//# sourceMappingURL=index-BGaaC8Kf.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-BGaaC8Kf.js","sources":["../../../.svelte-kit/adapter-node/chunks/index.js"],"sourcesContent":["import { n as noop } from \"./index2.js\";\nimport { s as safe_not_equal } from \"./root.js\";\nimport \"clsx\";\nconst subscriber_queue = [];\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\nfunction writable(value, start = noop) {\n let stop = null;\n const subscribers = /* @__PURE__ */ new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) {\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(\n /** @type {T} */\n value\n ));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set, update) || noop;\n }\n run(\n /** @type {T} */\n value\n );\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0 && stop) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nexport {\n readable as r,\n writable as w\n};\n"],"names":[],"mappings":";;;;AAGA,MAAM,gBAAgB,GAAG,EAAE;AAC3B,SAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE;AAChC,EAAE,OAAO;AACT,IAAI,SAAS,EAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACtC,GAAG;AACH;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE;AACvC,EAAE,IAAI,IAAI,GAAG,IAAI;AACjB,EAAE,MAAM,WAAW,mBAAmB,IAAI,GAAG,EAAE;AAC/C,EAAE,SAAS,GAAG,CAAC,SAAS,EAAE;AAC1B,IAAI,IAAI,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;AAC1C,MAAM,KAAK,GAAG,SAAS;AACvB,MAAM,IAAI,IAAI,EAAE;AAChB,QAAQ,MAAM,SAAS,GAAG,CAAC,gBAAgB,CAAC,MAAM;AAClD,QAAQ,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;AAC9C,UAAU,UAAU,CAAC,CAAC,CAAC,EAAE;AACzB,UAAU,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC;AAClD,QAAQ;AACR,QAAQ,IAAI,SAAS,EAAE;AACvB,UAAU,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;AAC/D,YAAY,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3D,UAAU;AACV,UAAU,gBAAgB,CAAC,MAAM,GAAG,CAAC;AACrC,QAAQ;AACR,MAAM;AACN,IAAI;AACJ,EAAE;AACF,EAAE,SAAS,MAAM,CAAC,EAAE,EAAE;AACtB,IAAI,GAAG,CAAC,EAAE;AACV;AACA,MAAM;AACN,KAAK,CAAC;AACN,EAAE;AACF,EAAE,SAAS,SAAS,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,EAAE;AAC7C,IAAI,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC;AACxC,IAAI,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;AAC/B,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE;AAChC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,IAAI;AACvC,IAAI;AACJ,IAAI,GAAG;AACP;AACA,MAAM;AACN,KAAK;AACL,IAAI,OAAO,MAAM;AACjB,MAAM,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;AACpC,MAAM,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE;AAC1C,QAAQ,IAAI,EAAE;AACd,QAAQ,IAAI,GAAG,IAAI;AACnB,MAAM;AACN,IAAI,CAAC;AACL,EAAE;AACF,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE;AACnC;;;;"}
|
||||
@@ -0,0 +1,219 @@
|
||||
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
||||
|
||||
class HttpError {
|
||||
/**
|
||||
* @param {number} status
|
||||
* @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body
|
||||
*/
|
||||
constructor(status, body) {
|
||||
this.status = status;
|
||||
if (typeof body === 'string') {
|
||||
this.body = { message: body };
|
||||
} else if (body) {
|
||||
this.body = body;
|
||||
} else {
|
||||
this.body = { message: `Error: ${status}` };
|
||||
}
|
||||
}
|
||||
|
||||
toString() {
|
||||
return JSON.stringify(this.body);
|
||||
}
|
||||
}
|
||||
|
||||
class Redirect {
|
||||
/**
|
||||
* @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status
|
||||
* @param {string} location
|
||||
*/
|
||||
constructor(status, location) {
|
||||
this.status = status;
|
||||
this.location = location;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.
|
||||
* `SvelteKitError` goes through `handleError`.
|
||||
* @extends Error
|
||||
*/
|
||||
class SvelteKitError extends Error {
|
||||
/**
|
||||
* @param {number} status
|
||||
* @param {string} text
|
||||
* @param {string} message
|
||||
*/
|
||||
constructor(status, text, message) {
|
||||
super(message);
|
||||
this.status = status;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @template [T=undefined]
|
||||
*/
|
||||
class ActionFailure {
|
||||
/**
|
||||
* @param {number} status
|
||||
* @param {T} data
|
||||
*/
|
||||
constructor(status, data) {
|
||||
this.status = status;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
|
||||
const text_encoder = new TextEncoder();
|
||||
new TextDecoder();
|
||||
|
||||
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
||||
|
||||
|
||||
// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)
|
||||
/**
|
||||
* @template {number} TNumber
|
||||
* @template {any[]} [TArray=[]]
|
||||
* @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template {number} TStart
|
||||
* @template {number} TEnd
|
||||
* @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange
|
||||
*/
|
||||
|
||||
// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits
|
||||
// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780
|
||||
|
||||
// we have to repeat the JSDoc because the display for function overloads is broken
|
||||
// see https://github.com/microsoft/TypeScript/issues/55056
|
||||
|
||||
/**
|
||||
* Throws an error with a HTTP status code and an optional message.
|
||||
* When called during request handling, this will cause SvelteKit to
|
||||
* return an error response without invoking `handleError`.
|
||||
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
||||
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
||||
* @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
||||
* @overload
|
||||
* @param {number} status
|
||||
* @param {App.Error} body
|
||||
* @return {never}
|
||||
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
||||
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
||||
*/
|
||||
/**
|
||||
* Throws an error with a HTTP status code and an optional message.
|
||||
* When called during request handling, this will cause SvelteKit to
|
||||
* return an error response without invoking `handleError`.
|
||||
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
||||
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
||||
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
||||
* @overload
|
||||
* @param {number} status
|
||||
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]
|
||||
* @return {never}
|
||||
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
||||
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
||||
*/
|
||||
/**
|
||||
* Throws an error with a HTTP status code and an optional message.
|
||||
* When called during request handling, this will cause SvelteKit to
|
||||
* return an error response without invoking `handleError`.
|
||||
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
||||
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
||||
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
||||
* @return {never}
|
||||
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
||||
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
||||
*/
|
||||
function error(status, body) {
|
||||
if ((isNaN(status) || status < 400 || status > 599)) {
|
||||
throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);
|
||||
}
|
||||
|
||||
throw new HttpError(status, body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect a request. When called during request handling, SvelteKit will return a redirect response.
|
||||
* Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.
|
||||
*
|
||||
* Most common status codes:
|
||||
* * `303 See Other`: redirect as a GET request (often used after a form POST request)
|
||||
* * `307 Temporary Redirect`: redirect will keep the request method
|
||||
* * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page
|
||||
*
|
||||
* [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages)
|
||||
*
|
||||
* @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.
|
||||
* @param {string | URL} location The location to redirect to.
|
||||
* @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.
|
||||
* @throws {Error} If the provided status is invalid.
|
||||
* @return {never}
|
||||
*/
|
||||
function redirect(status, location) {
|
||||
if ((isNaN(status) || status < 300 || status > 308)) {
|
||||
throw new Error('Invalid status code');
|
||||
}
|
||||
|
||||
throw new Redirect(
|
||||
// @ts-ignore
|
||||
status,
|
||||
location.toString()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a JSON `Response` object from the supplied data.
|
||||
* @param {any} data The value that will be serialized as JSON.
|
||||
* @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.
|
||||
*/
|
||||
function json(data, init) {
|
||||
// TODO deprecate this in favour of `Response.json` when it's
|
||||
// more widely supported
|
||||
const body = JSON.stringify(data);
|
||||
|
||||
// we can't just do `text(JSON.stringify(data), init)` because
|
||||
// it will set a default `content-type` header. duplicated code
|
||||
// means less duplicated work
|
||||
const headers = new Headers(init?.headers);
|
||||
if (!headers.has('content-length')) {
|
||||
headers.set('content-length', text_encoder.encode(body).byteLength.toString());
|
||||
}
|
||||
|
||||
if (!headers.has('content-type')) {
|
||||
headers.set('content-type', 'application/json');
|
||||
}
|
||||
|
||||
return new Response(body, {
|
||||
...init,
|
||||
headers
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a `Response` object from the supplied body.
|
||||
* @param {string} body The value that will be used as-is.
|
||||
* @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.
|
||||
*/
|
||||
function text(body, init) {
|
||||
const headers = new Headers(init?.headers);
|
||||
if (!headers.has('content-length')) {
|
||||
const encoded = text_encoder.encode(body);
|
||||
headers.set('content-length', encoded.byteLength.toString());
|
||||
return new Response(encoded, {
|
||||
...init,
|
||||
headers
|
||||
});
|
||||
}
|
||||
|
||||
return new Response(body, {
|
||||
...init,
|
||||
headers
|
||||
});
|
||||
}
|
||||
|
||||
export { ActionFailure as A, HttpError as H, Redirect as R, SvelteKitError as S, error as e, json as j, redirect as r, text as t };
|
||||
//# sourceMappingURL=index-wpIsICWW.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,888 @@
|
||||
import { w as run, A as ATTACHMENT_KEY, c as bind_props, d as spread_props, p as props_id, m as attributes, k as derived } from './index2-DHYCG7Ly.js';
|
||||
import { c as cn } from './utils2-B05Dmz_H.js';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
// http://www.w3.org/TR/CSS21/grammar.html
|
||||
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
|
||||
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
||||
|
||||
var NEWLINE_REGEX = /\n/g;
|
||||
var WHITESPACE_REGEX = /^\s*/;
|
||||
|
||||
// declaration
|
||||
var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
|
||||
var COLON_REGEX = /^:\s*/;
|
||||
var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
|
||||
var SEMICOLON_REGEX = /^[;\s]*/;
|
||||
|
||||
// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
|
||||
var TRIM_REGEX = /^\s+|\s+$/g;
|
||||
|
||||
// strings
|
||||
var NEWLINE = '\n';
|
||||
var FORWARD_SLASH = '/';
|
||||
var ASTERISK = '*';
|
||||
var EMPTY_STRING = '';
|
||||
|
||||
// types
|
||||
var TYPE_COMMENT = 'comment';
|
||||
var TYPE_DECLARATION = 'declaration';
|
||||
|
||||
/**
|
||||
* @param {String} style
|
||||
* @param {Object} [options]
|
||||
* @return {Object[]}
|
||||
* @throws {TypeError}
|
||||
* @throws {Error}
|
||||
*/
|
||||
function index (style, options) {
|
||||
if (typeof style !== 'string') {
|
||||
throw new TypeError('First argument must be a string');
|
||||
}
|
||||
|
||||
if (!style) return [];
|
||||
|
||||
options = options || {};
|
||||
|
||||
/**
|
||||
* Positional.
|
||||
*/
|
||||
var lineno = 1;
|
||||
var column = 1;
|
||||
|
||||
/**
|
||||
* Update lineno and column based on `str`.
|
||||
*
|
||||
* @param {String} str
|
||||
*/
|
||||
function updatePosition(str) {
|
||||
var lines = str.match(NEWLINE_REGEX);
|
||||
if (lines) lineno += lines.length;
|
||||
var i = str.lastIndexOf(NEWLINE);
|
||||
column = ~i ? str.length - i : column + str.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark position and patch `node.position`.
|
||||
*
|
||||
* @return {Function}
|
||||
*/
|
||||
function position() {
|
||||
var start = { line: lineno, column: column };
|
||||
return function (node) {
|
||||
node.position = new Position(start);
|
||||
whitespace();
|
||||
return node;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Store position information for a node.
|
||||
*
|
||||
* @constructor
|
||||
* @property {Object} start
|
||||
* @property {Object} end
|
||||
* @property {undefined|String} source
|
||||
*/
|
||||
function Position(start) {
|
||||
this.start = start;
|
||||
this.end = { line: lineno, column: column };
|
||||
this.source = options.source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Non-enumerable source string.
|
||||
*/
|
||||
Position.prototype.content = style;
|
||||
|
||||
/**
|
||||
* Error `msg`.
|
||||
*
|
||||
* @param {String} msg
|
||||
* @throws {Error}
|
||||
*/
|
||||
function error(msg) {
|
||||
var err = new Error(
|
||||
options.source + ':' + lineno + ':' + column + ': ' + msg
|
||||
);
|
||||
err.reason = msg;
|
||||
err.filename = options.source;
|
||||
err.line = lineno;
|
||||
err.column = column;
|
||||
err.source = style;
|
||||
|
||||
if (options.silent) ; else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Match `re` and return captures.
|
||||
*
|
||||
* @param {RegExp} re
|
||||
* @return {undefined|Array}
|
||||
*/
|
||||
function match(re) {
|
||||
var m = re.exec(style);
|
||||
if (!m) return;
|
||||
var str = m[0];
|
||||
updatePosition(str);
|
||||
style = style.slice(str.length);
|
||||
return m;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse whitespace.
|
||||
*/
|
||||
function whitespace() {
|
||||
match(WHITESPACE_REGEX);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse comments.
|
||||
*
|
||||
* @param {Object[]} [rules]
|
||||
* @return {Object[]}
|
||||
*/
|
||||
function comments(rules) {
|
||||
var c;
|
||||
rules = rules || [];
|
||||
while ((c = comment())) {
|
||||
if (c !== false) {
|
||||
rules.push(c);
|
||||
}
|
||||
}
|
||||
return rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse comment.
|
||||
*
|
||||
* @return {Object}
|
||||
* @throws {Error}
|
||||
*/
|
||||
function comment() {
|
||||
var pos = position();
|
||||
if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
|
||||
|
||||
var i = 2;
|
||||
while (
|
||||
EMPTY_STRING != style.charAt(i) &&
|
||||
(ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))
|
||||
) {
|
||||
++i;
|
||||
}
|
||||
i += 2;
|
||||
|
||||
if (EMPTY_STRING === style.charAt(i - 1)) {
|
||||
return error('End of comment missing');
|
||||
}
|
||||
|
||||
var str = style.slice(2, i - 2);
|
||||
column += 2;
|
||||
updatePosition(str);
|
||||
style = style.slice(i);
|
||||
column += 2;
|
||||
|
||||
return pos({
|
||||
type: TYPE_COMMENT,
|
||||
comment: str
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse declaration.
|
||||
*
|
||||
* @return {Object}
|
||||
* @throws {Error}
|
||||
*/
|
||||
function declaration() {
|
||||
var pos = position();
|
||||
|
||||
// prop
|
||||
var prop = match(PROPERTY_REGEX);
|
||||
if (!prop) return;
|
||||
comment();
|
||||
|
||||
// :
|
||||
if (!match(COLON_REGEX)) return error("property missing ':'");
|
||||
|
||||
// val
|
||||
var val = match(VALUE_REGEX);
|
||||
|
||||
var ret = pos({
|
||||
type: TYPE_DECLARATION,
|
||||
property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
|
||||
value: val
|
||||
? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))
|
||||
: EMPTY_STRING
|
||||
});
|
||||
|
||||
// ;
|
||||
match(SEMICOLON_REGEX);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse declarations.
|
||||
*
|
||||
* @return {Object[]}
|
||||
*/
|
||||
function declarations() {
|
||||
var decls = [];
|
||||
|
||||
comments(decls);
|
||||
|
||||
// declarations
|
||||
var decl;
|
||||
while ((decl = declaration())) {
|
||||
if (decl !== false) {
|
||||
decls.push(decl);
|
||||
comments(decls);
|
||||
}
|
||||
}
|
||||
|
||||
return decls;
|
||||
}
|
||||
|
||||
whitespace();
|
||||
return declarations();
|
||||
}
|
||||
|
||||
/**
|
||||
* Trim `str`.
|
||||
*
|
||||
* @param {String} str
|
||||
* @return {String}
|
||||
*/
|
||||
function trim(str) {
|
||||
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses inline style to object.
|
||||
*
|
||||
* @param style - Inline style.
|
||||
* @param iterator - Iterator.
|
||||
* @returns - Style object or null.
|
||||
*
|
||||
* @example Parsing inline style to object:
|
||||
*
|
||||
* ```js
|
||||
* import parse from 'style-to-object';
|
||||
* parse('line-height: 42;'); // { 'line-height': '42' }
|
||||
* ```
|
||||
*/
|
||||
function StyleToObject(style, iterator) {
|
||||
let styleObject = null;
|
||||
if (!style || typeof style !== 'string') {
|
||||
return styleObject;
|
||||
}
|
||||
const declarations = index(style);
|
||||
const hasIterator = typeof iterator === 'function';
|
||||
declarations.forEach((declaration) => {
|
||||
if (declaration.type !== 'declaration') {
|
||||
return;
|
||||
}
|
||||
const { property, value } = declaration;
|
||||
if (hasIterator) {
|
||||
iterator(property, value, declaration);
|
||||
}
|
||||
else if (value) {
|
||||
styleObject = styleObject || {};
|
||||
styleObject[property] = value;
|
||||
}
|
||||
});
|
||||
return styleObject;
|
||||
}
|
||||
|
||||
function createAttachmentKey() {
|
||||
return Symbol(ATTACHMENT_KEY);
|
||||
}
|
||||
function isFunction(value) {
|
||||
return typeof value === "function";
|
||||
}
|
||||
function isObject(value) {
|
||||
return value !== null && typeof value === "object";
|
||||
}
|
||||
const CLASS_VALUE_PRIMITIVE_TYPES = ["string", "number", "bigint", "boolean"];
|
||||
function isClassValue(value) {
|
||||
if (value === null || value === void 0)
|
||||
return true;
|
||||
if (CLASS_VALUE_PRIMITIVE_TYPES.includes(typeof value))
|
||||
return true;
|
||||
if (Array.isArray(value))
|
||||
return value.every((item) => isClassValue(item));
|
||||
if (typeof value === "object") {
|
||||
if (Object.getPrototypeOf(value) !== Object.prototype)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
const BoxSymbol = Symbol("box");
|
||||
const isWritableSymbol = Symbol("is-writable");
|
||||
function boxWith(getter, setter) {
|
||||
const derived2 = getter();
|
||||
if (setter) {
|
||||
return {
|
||||
[BoxSymbol]: true,
|
||||
[isWritableSymbol]: true,
|
||||
get current() {
|
||||
return derived2;
|
||||
},
|
||||
set current(v) {
|
||||
setter(v);
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
[BoxSymbol]: true,
|
||||
get current() {
|
||||
return getter();
|
||||
}
|
||||
};
|
||||
}
|
||||
function isBox(value) {
|
||||
return isObject(value) && BoxSymbol in value;
|
||||
}
|
||||
function isWritableBox(value) {
|
||||
return isBox(value) && isWritableSymbol in value;
|
||||
}
|
||||
function boxFrom(value) {
|
||||
if (isBox(value)) return value;
|
||||
if (isFunction(value)) return boxWith(value);
|
||||
return simpleBox(value);
|
||||
}
|
||||
function boxFlatten(boxes) {
|
||||
return Object.entries(boxes).reduce(
|
||||
(acc, [key, b]) => {
|
||||
if (!isBox(b)) {
|
||||
return Object.assign(acc, { [key]: b });
|
||||
}
|
||||
if (isWritableBox(b)) {
|
||||
Object.defineProperty(acc, key, {
|
||||
get() {
|
||||
return b.current;
|
||||
},
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
set(v) {
|
||||
b.current = v;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Object.defineProperty(acc, key, {
|
||||
get() {
|
||||
return b.current;
|
||||
}
|
||||
});
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{}
|
||||
);
|
||||
}
|
||||
function toReadonlyBox(b) {
|
||||
if (!isWritableBox(b)) return b;
|
||||
return {
|
||||
[BoxSymbol]: true,
|
||||
get current() {
|
||||
return b.current;
|
||||
}
|
||||
};
|
||||
}
|
||||
function simpleBox(initialValue) {
|
||||
let current = initialValue;
|
||||
return {
|
||||
[BoxSymbol]: true,
|
||||
[isWritableSymbol]: true,
|
||||
get current() {
|
||||
return current;
|
||||
},
|
||||
set current(v) {
|
||||
current = v;
|
||||
}
|
||||
};
|
||||
}
|
||||
function composeHandlers(...handlers) {
|
||||
return function(e) {
|
||||
for (const handler of handlers) {
|
||||
if (!handler)
|
||||
continue;
|
||||
if (e.defaultPrevented)
|
||||
return;
|
||||
if (typeof handler === "function") {
|
||||
handler.call(this, e);
|
||||
} else {
|
||||
handler.current?.call(this, e);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
const NUMBER_CHAR_RE = /\d/;
|
||||
const STR_SPLITTERS = ["-", "_", "/", "."];
|
||||
function isUppercase(char = "") {
|
||||
if (NUMBER_CHAR_RE.test(char))
|
||||
return void 0;
|
||||
return char !== char.toLowerCase();
|
||||
}
|
||||
function splitByCase(str) {
|
||||
const parts = [];
|
||||
let buff = "";
|
||||
let previousUpper;
|
||||
let previousSplitter;
|
||||
for (const char of str) {
|
||||
const isSplitter = STR_SPLITTERS.includes(char);
|
||||
if (isSplitter === true) {
|
||||
parts.push(buff);
|
||||
buff = "";
|
||||
previousUpper = void 0;
|
||||
continue;
|
||||
}
|
||||
const isUpper = isUppercase(char);
|
||||
if (previousSplitter === false) {
|
||||
if (previousUpper === false && isUpper === true) {
|
||||
parts.push(buff);
|
||||
buff = char;
|
||||
previousUpper = isUpper;
|
||||
continue;
|
||||
}
|
||||
if (previousUpper === true && isUpper === false && buff.length > 1) {
|
||||
const lastChar = buff.at(-1);
|
||||
parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
|
||||
buff = lastChar + char;
|
||||
previousUpper = isUpper;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
buff += char;
|
||||
previousUpper = isUpper;
|
||||
previousSplitter = isSplitter;
|
||||
}
|
||||
parts.push(buff);
|
||||
return parts;
|
||||
}
|
||||
function pascalCase(str) {
|
||||
if (!str)
|
||||
return "";
|
||||
return splitByCase(str).map((p) => upperFirst(p)).join("");
|
||||
}
|
||||
function camelCase(str) {
|
||||
return lowerFirst(pascalCase(str || ""));
|
||||
}
|
||||
function upperFirst(str) {
|
||||
return str ? str[0].toUpperCase() + str.slice(1) : "";
|
||||
}
|
||||
function lowerFirst(str) {
|
||||
return str ? str[0].toLowerCase() + str.slice(1) : "";
|
||||
}
|
||||
function cssToStyleObj(css) {
|
||||
if (!css)
|
||||
return {};
|
||||
const styleObj = {};
|
||||
function iterator(name, value) {
|
||||
if (name.startsWith("-moz-") || name.startsWith("-webkit-") || name.startsWith("-ms-") || name.startsWith("-o-")) {
|
||||
styleObj[pascalCase(name)] = value;
|
||||
return;
|
||||
}
|
||||
if (name.startsWith("--")) {
|
||||
styleObj[name] = value;
|
||||
return;
|
||||
}
|
||||
styleObj[camelCase(name)] = value;
|
||||
}
|
||||
StyleToObject(css, iterator);
|
||||
return styleObj;
|
||||
}
|
||||
function executeCallbacks(...callbacks) {
|
||||
return (...args) => {
|
||||
for (const callback of callbacks) {
|
||||
if (typeof callback === "function") {
|
||||
callback(...args);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
function createParser(matcher, replacer) {
|
||||
const regex = RegExp(matcher, "g");
|
||||
return (str) => {
|
||||
if (typeof str !== "string") {
|
||||
throw new TypeError(`expected an argument of type string, but got ${typeof str}`);
|
||||
}
|
||||
if (!str.match(regex))
|
||||
return str;
|
||||
return str.replace(regex, replacer);
|
||||
};
|
||||
}
|
||||
const camelToKebab = createParser(/[A-Z]/, (match) => `-${match.toLowerCase()}`);
|
||||
function styleToCSS(styleObj) {
|
||||
if (!styleObj || typeof styleObj !== "object" || Array.isArray(styleObj)) {
|
||||
throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);
|
||||
}
|
||||
return Object.keys(styleObj).map((property) => `${camelToKebab(property)}: ${styleObj[property]};`).join("\n");
|
||||
}
|
||||
function styleToString(style = {}) {
|
||||
return styleToCSS(style).replace("\n", " ");
|
||||
}
|
||||
const EVENT_LIST = [
|
||||
"onabort",
|
||||
"onanimationcancel",
|
||||
"onanimationend",
|
||||
"onanimationiteration",
|
||||
"onanimationstart",
|
||||
"onauxclick",
|
||||
"onbeforeinput",
|
||||
"onbeforetoggle",
|
||||
"onblur",
|
||||
"oncancel",
|
||||
"oncanplay",
|
||||
"oncanplaythrough",
|
||||
"onchange",
|
||||
"onclick",
|
||||
"onclose",
|
||||
"oncompositionend",
|
||||
"oncompositionstart",
|
||||
"oncompositionupdate",
|
||||
"oncontextlost",
|
||||
"oncontextmenu",
|
||||
"oncontextrestored",
|
||||
"oncopy",
|
||||
"oncuechange",
|
||||
"oncut",
|
||||
"ondblclick",
|
||||
"ondrag",
|
||||
"ondragend",
|
||||
"ondragenter",
|
||||
"ondragleave",
|
||||
"ondragover",
|
||||
"ondragstart",
|
||||
"ondrop",
|
||||
"ondurationchange",
|
||||
"onemptied",
|
||||
"onended",
|
||||
"onerror",
|
||||
"onfocus",
|
||||
"onfocusin",
|
||||
"onfocusout",
|
||||
"onformdata",
|
||||
"ongotpointercapture",
|
||||
"oninput",
|
||||
"oninvalid",
|
||||
"onkeydown",
|
||||
"onkeypress",
|
||||
"onkeyup",
|
||||
"onload",
|
||||
"onloadeddata",
|
||||
"onloadedmetadata",
|
||||
"onloadstart",
|
||||
"onlostpointercapture",
|
||||
"onmousedown",
|
||||
"onmouseenter",
|
||||
"onmouseleave",
|
||||
"onmousemove",
|
||||
"onmouseout",
|
||||
"onmouseover",
|
||||
"onmouseup",
|
||||
"onpaste",
|
||||
"onpause",
|
||||
"onplay",
|
||||
"onplaying",
|
||||
"onpointercancel",
|
||||
"onpointerdown",
|
||||
"onpointerenter",
|
||||
"onpointerleave",
|
||||
"onpointermove",
|
||||
"onpointerout",
|
||||
"onpointerover",
|
||||
"onpointerup",
|
||||
"onprogress",
|
||||
"onratechange",
|
||||
"onreset",
|
||||
"onresize",
|
||||
"onscroll",
|
||||
"onscrollend",
|
||||
"onsecuritypolicyviolation",
|
||||
"onseeked",
|
||||
"onseeking",
|
||||
"onselect",
|
||||
"onselectionchange",
|
||||
"onselectstart",
|
||||
"onslotchange",
|
||||
"onstalled",
|
||||
"onsubmit",
|
||||
"onsuspend",
|
||||
"ontimeupdate",
|
||||
"ontoggle",
|
||||
"ontouchcancel",
|
||||
"ontouchend",
|
||||
"ontouchmove",
|
||||
"ontouchstart",
|
||||
"ontransitioncancel",
|
||||
"ontransitionend",
|
||||
"ontransitionrun",
|
||||
"ontransitionstart",
|
||||
"onvolumechange",
|
||||
"onwaiting",
|
||||
"onwebkitanimationend",
|
||||
"onwebkitanimationiteration",
|
||||
"onwebkitanimationstart",
|
||||
"onwebkittransitionend",
|
||||
"onwheel"
|
||||
];
|
||||
const EVENT_LIST_SET = new Set(EVENT_LIST);
|
||||
function isEventHandler(key) {
|
||||
return EVENT_LIST_SET.has(key);
|
||||
}
|
||||
function mergeProps(...args) {
|
||||
const result = { ...args[0] };
|
||||
for (let i = 1; i < args.length; i++) {
|
||||
const props = args[i];
|
||||
if (!props)
|
||||
continue;
|
||||
for (const key of Object.keys(props)) {
|
||||
const a = result[key];
|
||||
const b = props[key];
|
||||
const aIsFunction = typeof a === "function";
|
||||
const bIsFunction = typeof b === "function";
|
||||
if (aIsFunction && typeof bIsFunction && isEventHandler(key)) {
|
||||
const aHandler = a;
|
||||
const bHandler = b;
|
||||
result[key] = composeHandlers(aHandler, bHandler);
|
||||
} else if (aIsFunction && bIsFunction) {
|
||||
result[key] = executeCallbacks(a, b);
|
||||
} else if (key === "class") {
|
||||
const aIsClassValue = isClassValue(a);
|
||||
const bIsClassValue = isClassValue(b);
|
||||
if (aIsClassValue && bIsClassValue) {
|
||||
result[key] = clsx(a, b);
|
||||
} else if (aIsClassValue) {
|
||||
result[key] = clsx(a);
|
||||
} else if (bIsClassValue) {
|
||||
result[key] = clsx(b);
|
||||
}
|
||||
} else if (key === "style") {
|
||||
const aIsObject = typeof a === "object";
|
||||
const bIsObject = typeof b === "object";
|
||||
const aIsString = typeof a === "string";
|
||||
const bIsString = typeof b === "string";
|
||||
if (aIsObject && bIsObject) {
|
||||
result[key] = { ...a, ...b };
|
||||
} else if (aIsObject && bIsString) {
|
||||
const parsedStyle = cssToStyleObj(b);
|
||||
result[key] = { ...a, ...parsedStyle };
|
||||
} else if (aIsString && bIsObject) {
|
||||
const parsedStyle = cssToStyleObj(a);
|
||||
result[key] = { ...parsedStyle, ...b };
|
||||
} else if (aIsString && bIsString) {
|
||||
const parsedStyleA = cssToStyleObj(a);
|
||||
const parsedStyleB = cssToStyleObj(b);
|
||||
result[key] = { ...parsedStyleA, ...parsedStyleB };
|
||||
} else if (aIsObject) {
|
||||
result[key] = a;
|
||||
} else if (bIsObject) {
|
||||
result[key] = b;
|
||||
} else if (aIsString) {
|
||||
result[key] = a;
|
||||
} else if (bIsString) {
|
||||
result[key] = b;
|
||||
}
|
||||
} else {
|
||||
result[key] = b !== void 0 ? b : a;
|
||||
}
|
||||
}
|
||||
for (const key of Object.getOwnPropertySymbols(props)) {
|
||||
const a = result[key];
|
||||
const b = props[key];
|
||||
result[key] = b !== void 0 ? b : a;
|
||||
}
|
||||
}
|
||||
if (typeof result.style === "object") {
|
||||
result.style = styleToString(result.style).replaceAll("\n", " ");
|
||||
}
|
||||
if (result.hidden === false) {
|
||||
result.hidden = void 0;
|
||||
delete result.hidden;
|
||||
}
|
||||
if (result.disabled === false) {
|
||||
result.disabled = void 0;
|
||||
delete result.disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function attachRef(ref, onChange) {
|
||||
return {
|
||||
[createAttachmentKey()]: (node) => {
|
||||
if (isBox(ref)) {
|
||||
ref.current = node;
|
||||
run(() => onChange?.(node));
|
||||
return () => {
|
||||
if ("isConnected" in node && node.isConnected)
|
||||
return;
|
||||
ref.current = null;
|
||||
onChange?.(null);
|
||||
};
|
||||
}
|
||||
ref(node);
|
||||
run(() => onChange?.(node));
|
||||
return () => {
|
||||
if ("isConnected" in node && node.isConnected)
|
||||
return;
|
||||
ref(null);
|
||||
onChange?.(null);
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
function boolToStr(condition) {
|
||||
return condition ? "true" : "false";
|
||||
}
|
||||
function boolToEmptyStrOrUndef(condition) {
|
||||
return condition ? "" : void 0;
|
||||
}
|
||||
function boolToTrueOrUndef(condition) {
|
||||
return condition ? true : void 0;
|
||||
}
|
||||
function getDataOpenClosed(condition) {
|
||||
return condition ? "open" : "closed";
|
||||
}
|
||||
function getDataChecked(condition) {
|
||||
return condition ? "checked" : "unchecked";
|
||||
}
|
||||
function getAriaChecked(checked, indeterminate) {
|
||||
return checked ? "true" : "false";
|
||||
}
|
||||
class BitsAttrs {
|
||||
#variant;
|
||||
#prefix;
|
||||
attrs;
|
||||
constructor(config) {
|
||||
this.#variant = config.getVariant ? config.getVariant() : null;
|
||||
this.#prefix = this.#variant ? `data-${this.#variant}-` : `data-${config.component}-`;
|
||||
this.getAttr = this.getAttr.bind(this);
|
||||
this.selector = this.selector.bind(this);
|
||||
this.attrs = Object.fromEntries(config.parts.map((part) => [part, this.getAttr(part)]));
|
||||
}
|
||||
getAttr(part, variantOverride) {
|
||||
if (variantOverride)
|
||||
return `data-${variantOverride}-${part}`;
|
||||
return `${this.#prefix}${part}`;
|
||||
}
|
||||
selector(part, variantOverride) {
|
||||
return `[${this.getAttr(part, variantOverride)}]`;
|
||||
}
|
||||
}
|
||||
function createBitsAttrs(config) {
|
||||
const bitsAttrs = new BitsAttrs(config);
|
||||
return {
|
||||
...bitsAttrs.attrs,
|
||||
selector: bitsAttrs.selector,
|
||||
getAttr: bitsAttrs.getAttr
|
||||
};
|
||||
}
|
||||
function createId(prefixOrUid, uid) {
|
||||
return `bits-${prefixOrUid}`;
|
||||
}
|
||||
const labelAttrs = createBitsAttrs({ component: "label", parts: ["root"] });
|
||||
class LabelRootState {
|
||||
static create(opts) {
|
||||
return new LabelRootState(opts);
|
||||
}
|
||||
opts;
|
||||
attachment;
|
||||
constructor(opts) {
|
||||
this.opts = opts;
|
||||
this.attachment = attachRef(this.opts.ref);
|
||||
this.onmousedown = this.onmousedown.bind(this);
|
||||
}
|
||||
onmousedown(e) {
|
||||
if (e.detail > 1) e.preventDefault();
|
||||
}
|
||||
#props = derived(() => ({
|
||||
id: this.opts.id.current,
|
||||
[labelAttrs.root]: "",
|
||||
onmousedown: this.onmousedown,
|
||||
...this.attachment
|
||||
}));
|
||||
get props() {
|
||||
return this.#props();
|
||||
}
|
||||
set props($$value) {
|
||||
return this.#props($$value);
|
||||
}
|
||||
}
|
||||
function Label$1($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
const uid = props_id($$renderer2);
|
||||
let {
|
||||
children,
|
||||
child,
|
||||
id = createId(uid),
|
||||
ref = null,
|
||||
for: forProp,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
const rootState = LabelRootState.create({
|
||||
id: boxWith(() => id),
|
||||
ref: boxWith(() => ref, (v) => ref = v)
|
||||
});
|
||||
const mergedProps = mergeProps(restProps, rootState.props, { for: forProp });
|
||||
if (child) {
|
||||
$$renderer2.push("<!--[-->");
|
||||
child($$renderer2, { props: mergedProps });
|
||||
$$renderer2.push(`<!---->`);
|
||||
} else {
|
||||
$$renderer2.push("<!--[!-->");
|
||||
$$renderer2.push(`<label${attributes({ ...mergedProps, for: forProp })}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></label>`);
|
||||
}
|
||||
$$renderer2.push(`<!--]-->`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Label($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
let $$settled = true;
|
||||
let $$inner_renderer;
|
||||
function $$render_inner($$renderer3) {
|
||||
$$renderer3.push("<!---->");
|
||||
Label$1?.($$renderer3, spread_props([
|
||||
{
|
||||
"data-slot": "label",
|
||||
class: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className)
|
||||
},
|
||||
restProps,
|
||||
{
|
||||
get ref() {
|
||||
return ref;
|
||||
},
|
||||
set ref($$value) {
|
||||
ref = $$value;
|
||||
$$settled = false;
|
||||
}
|
||||
}
|
||||
]));
|
||||
$$renderer3.push(`<!---->`);
|
||||
}
|
||||
do {
|
||||
$$settled = true;
|
||||
$$inner_renderer = $$renderer2.copy();
|
||||
$$render_inner($$inner_renderer);
|
||||
} while (!$$settled);
|
||||
$$renderer2.subsume($$inner_renderer);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
|
||||
export { BoxSymbol as B, Label as L, styleToString as a, boxWith as b, createBitsAttrs as c, createId as d, attachRef as e, boxFrom as f, executeCallbacks as g, isObject as h, isWritableSymbol as i, boxFlatten as j, isBox as k, isWritableBox as l, mergeProps as m, getDataOpenClosed as n, boolToEmptyStrOrUndef as o, boolToStr as p, cssToStyleObj as q, getDataChecked as r, simpleBox as s, toReadonlyBox as t, getAriaChecked as u, boolToTrueOrUndef as v, composeHandlers as w };
|
||||
//# sourceMappingURL=label-CsPa3Fds.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
|
||||
import 'clsx';
|
||||
import { q as noop } from './index2-DHYCG7Ly.js';
|
||||
import './root-BEb1kut4.js';
|
||||
|
||||
const is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString());
|
||||
if (is_legacy) {
|
||||
({
|
||||
url: new URL("https://example.com")
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=state.svelte-CsO7NG8X.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"state.svelte-CsO7NG8X.js","sources":["../../../.svelte-kit/adapter-node/chunks/state.svelte.js"],"sourcesContent":["import \"clsx\";\nimport { n as noop } from \"./index2.js\";\nimport \"./exports.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"./root.js\";\nconst is_legacy = noop.toString().includes(\"$$\") || /function \\w+\\(\\) \\{\\}/.test(noop.toString());\nif (is_legacy) {\n ({\n data: {},\n form: null,\n error: null,\n params: {},\n route: { id: null },\n state: {},\n status: -1,\n url: new URL(\"https://example.com\")\n });\n}\n"],"names":[],"mappings":";;;;AAKA,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AACjG,IAAI,SAAS,EAAE;AACf,EAAE,CAAC;AACH,IAOI,GAAG,EAAE,IAAI,GAAG,CAAC,qBAAqB;AACtC,GAAG;AACH"}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { clsx } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
function cn(...inputs) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
export { cn as c };
|
||||
//# sourceMappingURL=utils2-B05Dmz_H.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils2-B05Dmz_H.js","sources":["../../../.svelte-kit/adapter-node/chunks/utils2.js"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nfunction cn(...inputs) {\n return twMerge(clsx(inputs));\n}\nexport {\n cn as c\n};\n"],"names":[],"mappings":";;;AAEA,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE;AACvB,EAAE,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9B;;;;"}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,69 @@
|
||||
const manifest = (() => {
|
||||
function __memo(fn) {
|
||||
let value;
|
||||
return () => value ??= (value = fn());
|
||||
}
|
||||
|
||||
return {
|
||||
appDir: "_app",
|
||||
appPath: "_app",
|
||||
assets: new Set([]),
|
||||
mimeTypes: {},
|
||||
_: {
|
||||
client: {start:"_app/immutable/entry/start.DoE5rVjp.js",app:"_app/immutable/entry/app.D90yBOXx.js",imports:["_app/immutable/entry/start.DoE5rVjp.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/entry/app.D90yBOXx.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/DTd9pe6t.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
||||
nodes: [
|
||||
__memo(() => import('./chunks/0-DANNRPIf.js')),
|
||||
__memo(() => import('./chunks/1-BIdyPzep.js')),
|
||||
__memo(() => import('./chunks/2-BM-ldjTW.js')),
|
||||
__memo(() => import('./chunks/3-CFvpokQ_.js')),
|
||||
__memo(() => import('./chunks/4-ano5Glp5.js'))
|
||||
],
|
||||
remotes: {
|
||||
|
||||
},
|
||||
routes: [
|
||||
{
|
||||
id: "/",
|
||||
pattern: /^\/$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 2 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/api/darkmode",
|
||||
pattern: /^\/api\/darkmode\/?$/,
|
||||
params: [],
|
||||
page: null,
|
||||
endpoint: __memo(() => import('./chunks/_server.ts-DNQ95foO.js'))
|
||||
},
|
||||
{
|
||||
id: "/login",
|
||||
pattern: /^\/login\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 4 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/logout",
|
||||
pattern: /^\/logout\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 3 },
|
||||
endpoint: null
|
||||
}
|
||||
],
|
||||
prerendered_routes: new Set([]),
|
||||
matchers: async () => {
|
||||
|
||||
return { };
|
||||
},
|
||||
server_assets: {}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
const prerendered = new Set([]);
|
||||
|
||||
const base = "";
|
||||
|
||||
export { base, manifest, prerendered };
|
||||
//# sourceMappingURL=manifest.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"manifest.js","sources":["../../.svelte-kit/adapter-node/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([]),\n\tmimeTypes: {},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.DoE5rVjp.js\",app:\"_app/immutable/entry/app.D90yBOXx.js\",imports:[\"_app/immutable/entry/start.DoE5rVjp.js\",\"_app/immutable/chunks/BX9MO-1l.js\",\"_app/immutable/chunks/CPmvlhtF.js\",\"_app/immutable/chunks/nEbfNkJh.js\",\"_app/immutable/entry/app.D90yBOXx.js\",\"_app/immutable/chunks/D4nn9Y_6.js\",\"_app/immutable/chunks/nEbfNkJh.js\",\"_app/immutable/chunks/CPmvlhtF.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/zcqfpVBB.js\",\"_app/immutable/chunks/BpNSSBPP.js\",\"_app/immutable/chunks/DTd9pe6t.js\"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/2.js')),\n\t\t\t__memo(() => import('./nodes/3.js')),\n\t\t\t__memo(() => import('./nodes/4.js'))\n\t\t],\n\t\tremotes: {\n\t\t\t\n\t\t},\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/\",\n\t\t\t\tpattern: /^\\/$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/darkmode\",\n\t\t\t\tpattern: /^\\/api\\/darkmode\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/darkmode/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/login\",\n\t\t\t\tpattern: /^\\/login\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 4 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/logout\",\n\t\t\t\tpattern: /^\\/logout\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 3 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tprerendered_routes: new Set([]),\n\t\tmatchers: async () => {\n\t\t\t\n\t\t\treturn { };\n\t\t},\n\t\tserver_assets: {}\n\t}\n}\n})();\n\nexport const prerendered = new Set([]);\n\nexport const base = \"\";"],"names":[],"mappings":"AAAY,MAAC,QAAQ,GAAG,CAAC,MAAM;AAC/B,SAAS,MAAM,CAAC,EAAE,EAAE;AACpB,CAAC,IAAI,KAAK;AACV,CAAC,OAAO,MAAM,KAAK,MAAM,KAAK,GAAG,EAAE,EAAE,CAAC;AACtC;;AAEA,OAAO;AACP,CAAC,MAAM,EAAE,MAAM;AACf,CAAC,OAAO,EAAE,MAAM;AAChB,CAAC,MAAM,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACpB,CAAC,SAAS,EAAE,EAAE;AACd,CAAC,CAAC,EAAE;AACJ,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,wCAAwC,CAAC,GAAG,CAAC,sCAAsC,CAAC,OAAO,CAAC,CAAC,wCAAwC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,sCAAsC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC;AAC7lB,EAAE,KAAK,EAAE;AACT,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC;AACtC,GAAG;AACH,EAAE,OAAO,EAAE;AACX;AACA,GAAG;AACH,EAAE,MAAM,EAAE;AACV,GAAG;AACH,IAAI,EAAE,EAAE,GAAG;AACX,IAAI,OAAO,EAAE,MAAM;AACnB,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,eAAe;AACvB,IAAI,OAAO,EAAE,sBAAsB;AACnC,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,iCAAgD,CAAC;AACnF,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,QAAQ;AAChB,IAAI,OAAO,EAAE,cAAc;AAC3B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,SAAS;AACjB,IAAI,OAAO,EAAE,eAAe;AAC5B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd;AACA,GAAG;AACH,EAAE,kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACjC,EAAE,QAAQ,EAAE,YAAY;AACxB;AACA,GAAG,OAAO,IAAI;AACd,EAAE,CAAC;AACH,EAAE,aAAa,EAAE;AACjB;AACA;AACA,CAAC;;AAEW,MAAC,WAAW,GAAG,IAAI,GAAG,CAAC,EAAE;;AAEzB,MAAC,IAAI,GAAG;;;;"}
|
||||
Reference in New Issue
Block a user