82 lines
8.0 KiB
JavaScript
82 lines
8.0 KiB
JavaScript
import { s as subscribe } from "../../../chunks/utils.js";
|
|
import { c as create_ssr_component, a as add_attribute, e as escape, v as validate_component } from "../../../chunks/ssr.js";
|
|
import { p as page } from "../../../chunks/stores.js";
|
|
import { S as SidebarMenu } from "../../../chunks/SidebarMenu.js";
|
|
import { w as writable } from "../../../chunks/index2.js";
|
|
import { w as walletStore } from "../../../chunks/walletStoreFix.js";
|
|
import "@stellar/stellar-sdk";
|
|
const GithubIcon = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
let { size = "24" } = $$props;
|
|
let { strokeWidth = 2 } = $$props;
|
|
let { class: customClass = "" } = $$props;
|
|
if (size !== "100%") {
|
|
size = size.slice(-1) === "x" ? size.slice(0, size.length - 1) + "em" : parseInt(size) + "px";
|
|
}
|
|
if ($$props.size === void 0 && $$bindings.size && size !== void 0) $$bindings.size(size);
|
|
if ($$props.strokeWidth === void 0 && $$bindings.strokeWidth && strokeWidth !== void 0) $$bindings.strokeWidth(strokeWidth);
|
|
if ($$props.class === void 0 && $$bindings.class && customClass !== void 0) $$bindings.class(customClass);
|
|
return `<svg xmlns="http://www.w3.org/2000/svg"${add_attribute("width", size, 0)}${add_attribute("height", size, 0)} fill="none" viewBox="0 0 24 24" stroke="currentColor"${add_attribute("stroke-width", strokeWidth, 0)} stroke-linecap="round" stroke-linejoin="round" class="${"feather feather-github " + escape(customClass, true)}"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>`;
|
|
});
|
|
const MenuIcon = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
let { size = "24" } = $$props;
|
|
let { strokeWidth = 2 } = $$props;
|
|
let { class: customClass = "" } = $$props;
|
|
if (size !== "100%") {
|
|
size = size.slice(-1) === "x" ? size.slice(0, size.length - 1) + "em" : parseInt(size) + "px";
|
|
}
|
|
if ($$props.size === void 0 && $$bindings.size && size !== void 0) $$bindings.size(size);
|
|
if ($$props.strokeWidth === void 0 && $$bindings.strokeWidth && strokeWidth !== void 0) $$bindings.strokeWidth(strokeWidth);
|
|
if ($$props.class === void 0 && $$bindings.class && customClass !== void 0) $$bindings.class(customClass);
|
|
return `<svg xmlns="http://www.w3.org/2000/svg"${add_attribute("width", size, 0)}${add_attribute("height", size, 0)} fill="none" viewBox="0 0 24 24" stroke="currentColor"${add_attribute("stroke-width", strokeWidth, 0)} stroke-linecap="round" stroke-linejoin="round" class="${"feather feather-menu " + escape(customClass, true)}"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>`;
|
|
});
|
|
const XCircleIcon = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
let { size = "24" } = $$props;
|
|
let { strokeWidth = 2 } = $$props;
|
|
let { class: customClass = "" } = $$props;
|
|
if (size !== "100%") {
|
|
size = size.slice(-1) === "x" ? size.slice(0, size.length - 1) + "em" : parseInt(size) + "px";
|
|
}
|
|
if ($$props.size === void 0 && $$bindings.size && size !== void 0) $$bindings.size(size);
|
|
if ($$props.strokeWidth === void 0 && $$bindings.strokeWidth && strokeWidth !== void 0) $$bindings.strokeWidth(strokeWidth);
|
|
if ($$props.class === void 0 && $$bindings.class && customClass !== void 0) $$bindings.class(customClass);
|
|
return `<svg xmlns="http://www.w3.org/2000/svg"${add_attribute("width", size, 0)}${add_attribute("height", size, 0)} fill="none" viewBox="0 0 24 24" stroke="currentColor"${add_attribute("stroke-width", strokeWidth, 0)} stroke-linecap="round" stroke-linejoin="round" class="${"feather feather-x-circle " + escape(customClass, true)}"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>`;
|
|
});
|
|
let errorMessage = writable("");
|
|
const ErrorAlert = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
let $errorMessage, $$unsubscribe_errorMessage;
|
|
$$unsubscribe_errorMessage = subscribe(errorMessage, (value) => $errorMessage = value);
|
|
let { dismissible = true } = $$props;
|
|
if ($$props.dismissible === void 0 && $$bindings.dismissible && dismissible !== void 0) $$bindings.dismissible(dismissible);
|
|
$$unsubscribe_errorMessage();
|
|
return ` ${$errorMessage ? `<div class="alert alert-error dark:prose-invert">${validate_component(XCircleIcon, "XCircleIcon").$$render($$result, {}, {}, {})} <span>Error: ${escape($errorMessage)}</span> ${dismissible ? `<button class="btn-neutral btn-sm btn" data-svelte-h="svelte-z7xsw2">Dismiss</button>` : ``}</div>` : ``}`;
|
|
});
|
|
const Navbar = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
let $page, $$unsubscribe_page;
|
|
$$unsubscribe_page = subscribe(page, (value) => $page = value);
|
|
$$unsubscribe_page();
|
|
return ` <header class="navbar bg-base-300"><label for="drawer-toggle" class="btn-ghost drawer-button btn-square btn lg:hidden">${validate_component(MenuIcon, "MenuIcon").$$render($$result, { size: "24" }, {}, {})}</label> <div class="flex-1" data-svelte-h="svelte-f01t9e"><a href="/dashboard" class="btn-ghost btn text-xl normal-case">InstantPay</a></div> <div class="flex-none"><div class="dropdown-end dropdown"><button tabindex="0" class="btn-ghost btn-circle avatar btn"><div class="w-10 rounded-full"><img${add_attribute("src", `https://id.lobstr.co/${$page.data.publicKey}.png`, 0)} alt="stellar-account-identicon"></div></button> <ul class="menu-compact dropdown-content menu rounded-box z-10 mt-3 w-52 bg-base-100 p-2 shadow" data-svelte-h="svelte-1qwgqdv"><li><a href="/dashboard/settings/kyc" class="justify-between">Manage KYC Information</a></li> <li><a href="/dashboard/settings/dev">Dev Helpers</a></li></ul></div></div></header>`;
|
|
});
|
|
const Drawer = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
return ` <div class="drawer grow lg:drawer-open"><input id="drawer-toggle" type="checkbox" class="drawer-toggle"> <div class="drawer-content flex flex-col"><main class="prose max-w-full p-6">${validate_component(ErrorAlert, "ErrorAlert").$$render($$result, {}, {}, {})} ${slots.default ? slots.default({}) : ``}</main></div> <div class="drawer-side z-10 lg:h-auto"><label for="drawer-toggle" class="drawer-overlay"></label> ${validate_component(SidebarMenu, "SidebarMenu").$$render($$result, {}, {}, {})}</div></div>`;
|
|
});
|
|
const Footer = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
return ` <footer class="footer items-center bg-base-300 p-4"><div class="grid-flow-col items-center" data-svelte-h="svelte-1dsvymc"><ul class="menu menu-vertical md:menu-horizontal"><li><a href="https://www.stellar.org/terms-of-service" target="_blank">Terms of Service</a></li> <li><a href="https://www.stellar.org/privacy-policy" target="_blank">Privacy Policy</a></li></ul></div> <div class="grid-flow-col gap-4 md:place-self-center md:justify-self-end"><ul class="menu"><li><a href="https://github.com/stellar/basic-payment-app" target="_blank">${validate_component(GithubIcon, "GithubIcon").$$render($$result, { size: "16" }, {}, {})}
|
|
GitHub</a></li></ul></div></footer>`;
|
|
});
|
|
const Layout = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
let $$unsubscribe_walletStore;
|
|
$$unsubscribe_walletStore = subscribe(walletStore, (value) => value);
|
|
let { data } = $$props;
|
|
console.log("routes/dashboard/+layout.svelte data", data);
|
|
if ($$props.data === void 0 && $$bindings.data && data !== void 0) $$bindings.data(data);
|
|
$$unsubscribe_walletStore();
|
|
return `<div class="flex min-h-screen flex-col">${validate_component(Navbar, "Navbar").$$render($$result, {}, {}, {})} ${validate_component(Drawer, "Drawer").$$render($$result, {}, {}, {
|
|
default: () => {
|
|
return ` ${slots.default ? slots.default({}) : ``}`;
|
|
}
|
|
})} ${validate_component(Footer, "Footer").$$render($$result, {}, {}, {})}</div> ${``}`;
|
|
});
|
|
export {
|
|
Layout as default
|
|
};
|