mirror of
https://github.com/GMWalletApp/epusdt.git
synced 2026-07-08 18:56:14 +00:00
fix(server): prevent SPA fallback from swallowing API routes
- add ShouldSkipSPAFallback() deny prefixes: /api, /admin/api, /payments, /pay - apply StaticWithConfig Skipper in both main http server and install server - add unit tests for fallback skip matching behavior
This commit is contained in:
@@ -1 +1 @@
|
||||
import{nu as e}from"./messages-BovT1T-w.js";import{t}from"./_error-pTC_lrQu.js";import{h as n}from"./search-provider-C8LIhlNg.js";import{n as r,t as i}from"./theme-switch-BjXQNOij.js";import{t as a}from"./general-error-DKtbS-qh.js";import{t as o}from"./not-found-error-toRsO1Fi.js";import{t as s}from"./unauthorized-error-CxmfHb-a.js";import{t as c}from"./forbidden-BEz-zjy_.js";import{t as l}from"./maintenance-error-PO6kK4Oj.js";import{n as u,r as d,t as f}from"./header-59tkUdc-.js";var p=e();function m(){let{error:e}=t.useParams(),m={unauthorized:s,forbidden:c,"not-found":o,"internal-server-error":a,"maintenance-error":l}[e]||o;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(f,{className:`border-b`,fixed:!0,children:[(0,p.jsx)(u,{}),(0,p.jsxs)(`div`,{className:`ms-auto flex items-center space-x-4`,children:[(0,p.jsx)(r,{}),(0,p.jsx)(i,{}),(0,p.jsx)(n,{}),(0,p.jsx)(d,{})]})]}),(0,p.jsx)(`div`,{className:`flex-1 [&>div]:h-full`,children:(0,p.jsx)(m,{})})]})}export{m as component};
|
||||
import{nu as e}from"./messages-BovT1T-w.js";import{t}from"./_error-IYb4e1PQ.js";import{h as n}from"./search-provider-Ddt37OW6.js";import{n as r,t as i}from"./theme-switch-BjXQNOij.js";import{t as a}from"./general-error-DKtbS-qh.js";import{t as o}from"./not-found-error-toRsO1Fi.js";import{t as s}from"./unauthorized-error-CxmfHb-a.js";import{t as c}from"./forbidden-BEz-zjy_.js";import{t as l}from"./maintenance-error-PO6kK4Oj.js";import{n as u,r as d,t as f}from"./header-D89HFI50.js";var p=e();function m(){let{error:e}=t.useParams(),m={unauthorized:s,forbidden:c,"not-found":o,"internal-server-error":a,"maintenance-error":l}[e]||o;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(f,{className:`border-b`,fixed:!0,children:[(0,p.jsx)(u,{}),(0,p.jsxs)(`div`,{className:`ms-auto flex items-center space-x-4`,children:[(0,p.jsx)(r,{}),(0,p.jsx)(i,{}),(0,p.jsx)(n,{}),(0,p.jsx)(d,{})]})]}),(0,p.jsx)(`div`,{className:`flex-1 [&>div]:h-full`,children:(0,p.jsx)(m,{})})]})}export{m as component};
|
||||
@@ -1,2 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_error-Dyo3GUTa.js","assets/messages-BovT1T-w.js","assets/search-provider-C8LIhlNg.js","assets/dist-DG5UMlBd.js","assets/button-DJA4fnJ8.js","assets/command-BwVY_kli.js","assets/dist-BKfJQFVD.js","assets/dist-BEDXr2LC.js","assets/dist-15n4mVGL.js","assets/dropdown-menu-CUea1X0A.js","assets/dist-D21KDGR3.js","assets/dist-Cp1lAGZy.js","assets/createLucideIcon-D28ivbfF.js","assets/check-gDgbfVXu.js","assets/dist-DlZiaY1y.js","assets/dist-CGm-FpWw.js","assets/separator-CRLYw2cW.js","assets/wallet--XSRr4dT.js","assets/cookies-BNZcTwGc.js","assets/auth-store-ramu4Ja7.js","assets/dist-DvAgZMq72.js","assets/with-selector-D_dmjfol.js","assets/useRouter-D03zSgJO.js","assets/useNavigate-Dg8CkCoa.js","assets/useStore-1-QVtiLb.js","assets/circle-check-Dh8WOZF0.js","assets/input-DiRPHDd8.js","assets/font-provider-DvtNHF7l.js","assets/theme-provider-CRKya7Cx.js","assets/theme-switch-BjXQNOij.js","assets/header-59tkUdc-.js","assets/link-CA4H4hTz.js","assets/ClientOnly-CtYi2y5F.js","assets/forbidden-BEz-zjy_.js","assets/general-error-DKtbS-qh.js","assets/maintenance-error-PO6kK4Oj.js","assets/not-found-error-toRsO1Fi.js","assets/unauthorized-error-CxmfHb-a.js"])))=>i.map(i=>d[i]);
|
||||
import{ou as e,ru as t}from"./messages-BovT1T-w.js";import{r as n}from"./useRouter-D03zSgJO.js";import{d as r}from"./useStore-1-QVtiLb.js";import{n as i}from"./route-BxpeArPd.js";function a(e){return new o(e,{silent:!0}).createRoute}var o=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=i(e);return t.isRoot=!1,t},this.silent=t?.silent}},s=e(t(),1);function c(e,t){let i,a,o,c,l=()=>(i||=e().then(e=>{i=void 0,a=e[t??`default`]}).catch(e=>{if(o=e,r(o)&&o instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),c=!0)}}),i),u=function(e){if(c)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(n)n(l());else throw l();return s.createElement(a,e)};return u.preload=l,u}var l=`modulepreload`,u=function(e){return`/`+e},d={},f=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=u(t,n),t in d)return;d[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:l,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},p=a(`/_authenticated/errors/$error`)({component:c(()=>f(()=>import(`./_error-Dyo3GUTa.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37])),`component`)});export{a as i,f as n,c as r,p as t};
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_error-BWhHDyU0.js","assets/messages-BovT1T-w.js","assets/search-provider-Ddt37OW6.js","assets/dist-DG5UMlBd.js","assets/button-DJA4fnJ8.js","assets/command-BwVY_kli.js","assets/dist-BKfJQFVD.js","assets/dist-BEDXr2LC.js","assets/dist-15n4mVGL.js","assets/dropdown-menu-CUea1X0A.js","assets/dist-D21KDGR3.js","assets/dist-Cp1lAGZy.js","assets/createLucideIcon-D28ivbfF.js","assets/check-gDgbfVXu.js","assets/dist-DlZiaY1y.js","assets/dist-CGm-FpWw.js","assets/separator-CRLYw2cW.js","assets/wallet--XSRr4dT.js","assets/cookies-BNZcTwGc.js","assets/auth-store-ramu4Ja7.js","assets/dist-DvAgZMq72.js","assets/with-selector-D_dmjfol.js","assets/useRouter-D03zSgJO.js","assets/useNavigate-Dg8CkCoa.js","assets/useStore-1-QVtiLb.js","assets/circle-check-Dh8WOZF0.js","assets/input-DiRPHDd8.js","assets/font-provider-DvtNHF7l.js","assets/theme-provider-CRKya7Cx.js","assets/theme-switch-BjXQNOij.js","assets/header-D89HFI50.js","assets/link-CA4H4hTz.js","assets/ClientOnly-CtYi2y5F.js","assets/forbidden-BEz-zjy_.js","assets/general-error-DKtbS-qh.js","assets/maintenance-error-PO6kK4Oj.js","assets/not-found-error-toRsO1Fi.js","assets/unauthorized-error-CxmfHb-a.js"])))=>i.map(i=>d[i]);
|
||||
import{ou as e,ru as t}from"./messages-BovT1T-w.js";import{r as n}from"./useRouter-D03zSgJO.js";import{d as r}from"./useStore-1-QVtiLb.js";import{n as i}from"./route-BxpeArPd.js";function a(e){return new o(e,{silent:!0}).createRoute}var o=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=i(e);return t.isRoot=!1,t},this.silent=t?.silent}},s=e(t(),1);function c(e,t){let i,a,o,c,l=()=>(i||=e().then(e=>{i=void 0,a=e[t??`default`]}).catch(e=>{if(o=e,r(o)&&o instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),c=!0)}}),i),u=function(e){if(c)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(n)n(l());else throw l();return s.createElement(a,e)};return u.preload=l,u}var l=`modulepreload`,u=function(e){return`/`+e},d={},f=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=u(t,n),t in d)return;d[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:l,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},p=a(`/_authenticated/errors/$error`)({component:c(()=>f(()=>import(`./_error-BWhHDyU0.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37])),`component`)});export{a as i,f as n,c as r,p as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Ds as e,Jl as t,Os as n,Ps as r,Ql as i,Yl as a,n as o,nu as s,ou as c,ru as l}from"./messages-BovT1T-w.js";import{i as u}from"./auth-store-ramu4Ja7.js";import{t as d}from"./link-CA4H4hTz.js";import{B as f,H as p,L as m,M as h,V as g,d as _,f as v,g as y,l as b,n as x,o as S,p as C,u as w}from"./search-provider-C8LIhlNg.js";import{i as T,t as E}from"./button-DJA4fnJ8.js";import{a as D,i as O,l as k,o as A,r as j,s as M,t as N}from"./dropdown-menu-CUea1X0A.js";import{g as P}from"./command-BwVY_kli.js";import{t as F}from"./separator-CRLYw2cW.js";var I=c(l(),1),L=s();function R(){let[i,s]=b(),[c,l]=(0,I.useState)(!1),{user:h}=u(),x=h?.username?.trim()||o(),T=x.charAt(0).toUpperCase()||`U`,P=h?.last_login_at?n({time:S(h.last_login_at)}):e();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(m,{onOpenChange:l,open:c,children:(0,L.jsx)(y,{})}),(0,L.jsxs)(N,{modal:!1,children:[(0,L.jsx)(k,{asChild:!0,children:(0,L.jsx)(E,{className:`relative h-8 w-8 rounded-full`,variant:`ghost`,children:(0,L.jsxs)(w,{className:`h-8 w-8`,children:[(0,L.jsx)(v,{alt:x,src:`/avatars/01.png`}),(0,L.jsx)(_,{children:T})]})})}),(0,L.jsxs)(j,{align:`end`,className:`w-56`,forceMount:!0,children:[(0,L.jsx)(A,{className:`p-0 font-normal`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-start text-sm`,children:[(0,L.jsxs)(w,{className:`h-8 w-8 rounded-lg`,children:[(0,L.jsx)(v,{alt:x,src:`/avatars/01.png`}),(0,L.jsx)(_,{className:`rounded-lg`,children:T})]}),(0,L.jsxs)(`div`,{className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,L.jsx)(`span`,{className:`truncate font-semibold`,children:x}),(0,L.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:P})]})]})}),(0,L.jsx)(M,{}),(0,L.jsxs)(O,{children:[(0,L.jsx)(D,{asChild:!0,children:(0,L.jsxs)(d,{to:`/account/password`,children:[(0,L.jsx)(p,{className:`mr-2 size-4`}),a()]})}),(0,L.jsxs)(D,{onClick:()=>l(!0),onSelect:e=>e.preventDefault(),children:[(0,L.jsx)(f,{className:`mr-2 size-4`}),r()]})]}),(0,L.jsx)(M,{}),(0,L.jsxs)(D,{onClick:()=>s(!0),variant:`destructive`,children:[(0,L.jsx)(g,{className:`mr-2 size-4`}),t()]})]})]}),(0,L.jsx)(C,{onOpenChange:s,open:!!i})]})}function z({className:e=``,placeholder:t}){let{setOpen:n}=x();return(0,L.jsxs)(E,{className:T(`group relative h-8 w-full flex-1 justify-start rounded-md bg-muted/25 font-normal text-muted-foreground text-sm shadow-none hover:bg-accent sm:w-40 sm:pe-12 md:flex-none lg:w-52 xl:w-64`,e),onClick:()=>n(!0),variant:`outline`,children:[(0,L.jsx)(P,{"aria-hidden":`true`,className:`absolute inset-s-1.5 top-1/2 -translate-y-1/2`,size:16}),(0,L.jsx)(`span`,{className:`ms-4`,children:t??i()}),(0,L.jsxs)(`kbd`,{className:`pointer-events-none absolute inset-e-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-medium font-mono text-[10px] opacity-100 group-hover:bg-accent sm:flex`,children:[(0,L.jsx)(`span`,{className:`text-xs`,children:`⌘`}),`K`]})]})}function B({className:e,fixed:t,children:n,...r}){let[i,a]=(0,I.useState)(0);return(0,I.useEffect)(()=>{let e=()=>{a(document.body.scrollTop||document.documentElement.scrollTop)};return document.addEventListener(`scroll`,e,{passive:!0}),()=>document.removeEventListener(`scroll`,e)},[]),(0,L.jsx)(`header`,{className:T(`z-50 h-16`,t&&`header-fixed peer/header sticky top-0 w-[inherit]`,i>10&&t?`shadow`:`shadow-none`,e),...r,children:(0,L.jsxs)(`div`,{className:T(`relative flex h-full items-center gap-3 p-4 sm:gap-4`,i>10&&t&&`after:absolute after:inset-0 after:-z-10 after:bg-background/20 after:backdrop-blur-lg`),children:[(0,L.jsx)(h,{className:`max-md:scale-125`,variant:`outline`}),(0,L.jsx)(F,{className:`h-6`,orientation:`vertical`}),n]})})}export{z as n,R as r,B as t};
|
||||
import{Ds as e,Jl as t,Os as n,Ps as r,Ql as i,Yl as a,n as o,nu as s,ou as c,ru as l}from"./messages-BovT1T-w.js";import{i as u}from"./auth-store-ramu4Ja7.js";import{t as d}from"./link-CA4H4hTz.js";import{B as f,H as p,L as m,M as h,V as g,d as _,f as v,g as y,l as b,n as x,o as S,p as C,u as w}from"./search-provider-Ddt37OW6.js";import{i as T,t as E}from"./button-DJA4fnJ8.js";import{a as D,i as O,l as k,o as A,r as j,s as M,t as N}from"./dropdown-menu-CUea1X0A.js";import{g as P}from"./command-BwVY_kli.js";import{t as F}from"./separator-CRLYw2cW.js";var I=c(l(),1),L=s();function R(){let[i,s]=b(),[c,l]=(0,I.useState)(!1),{user:h}=u(),x=h?.username?.trim()||o(),T=x.charAt(0).toUpperCase()||`U`,P=h?.last_login_at?n({time:S(h.last_login_at)}):e();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(m,{onOpenChange:l,open:c,children:(0,L.jsx)(y,{})}),(0,L.jsxs)(N,{modal:!1,children:[(0,L.jsx)(k,{asChild:!0,children:(0,L.jsx)(E,{className:`relative h-8 w-8 rounded-full`,variant:`ghost`,children:(0,L.jsxs)(w,{className:`h-8 w-8`,children:[(0,L.jsx)(v,{alt:x,src:`/avatars/01.png`}),(0,L.jsx)(_,{children:T})]})})}),(0,L.jsxs)(j,{align:`end`,className:`w-56`,forceMount:!0,children:[(0,L.jsx)(A,{className:`p-0 font-normal`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-start text-sm`,children:[(0,L.jsxs)(w,{className:`h-8 w-8 rounded-lg`,children:[(0,L.jsx)(v,{alt:x,src:`/avatars/01.png`}),(0,L.jsx)(_,{className:`rounded-lg`,children:T})]}),(0,L.jsxs)(`div`,{className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,L.jsx)(`span`,{className:`truncate font-semibold`,children:x}),(0,L.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:P})]})]})}),(0,L.jsx)(M,{}),(0,L.jsxs)(O,{children:[(0,L.jsx)(D,{asChild:!0,children:(0,L.jsxs)(d,{to:`/account/password`,children:[(0,L.jsx)(p,{className:`mr-2 size-4`}),a()]})}),(0,L.jsxs)(D,{onClick:()=>l(!0),onSelect:e=>e.preventDefault(),children:[(0,L.jsx)(f,{className:`mr-2 size-4`}),r()]})]}),(0,L.jsx)(M,{}),(0,L.jsxs)(D,{onClick:()=>s(!0),variant:`destructive`,children:[(0,L.jsx)(g,{className:`mr-2 size-4`}),t()]})]})]}),(0,L.jsx)(C,{onOpenChange:s,open:!!i})]})}function z({className:e=``,placeholder:t}){let{setOpen:n}=x();return(0,L.jsxs)(E,{className:T(`group relative h-8 w-full flex-1 justify-start rounded-md bg-muted/25 font-normal text-muted-foreground text-sm shadow-none hover:bg-accent sm:w-40 sm:pe-12 md:flex-none lg:w-52 xl:w-64`,e),onClick:()=>n(!0),variant:`outline`,children:[(0,L.jsx)(P,{"aria-hidden":`true`,className:`absolute inset-s-1.5 top-1/2 -translate-y-1/2`,size:16}),(0,L.jsx)(`span`,{className:`ms-4`,children:t??i()}),(0,L.jsxs)(`kbd`,{className:`pointer-events-none absolute inset-e-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-medium font-mono text-[10px] opacity-100 group-hover:bg-accent sm:flex`,children:[(0,L.jsx)(`span`,{className:`text-xs`,children:`⌘`}),`K`]})]})}function B({className:e,fixed:t,children:n,...r}){let[i,a]=(0,I.useState)(0);return(0,I.useEffect)(()=>{let e=()=>{a(document.body.scrollTop||document.documentElement.scrollTop)};return document.addEventListener(`scroll`,e,{passive:!0}),()=>document.removeEventListener(`scroll`,e)},[]),(0,L.jsx)(`header`,{className:T(`z-50 h-16`,t&&`header-fixed peer/header sticky top-0 w-[inherit]`,i>10&&t?`shadow`:`shadow-none`,e),...r,children:(0,L.jsxs)(`div`,{className:T(`relative flex h-full items-center gap-3 p-4 sm:gap-4`,i>10&&t&&`after:absolute after:inset-0 after:-z-10 after:bg-background/20 after:backdrop-blur-lg`),children:[(0,L.jsx)(h,{className:`max-md:scale-125`,variant:`outline`}),(0,L.jsx)(F,{className:`h-6`,orientation:`vertical`}),n]})})}export{z as n,R as r,B as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{ca as e,da as t,fa as n,la as r,nu as i,ou as a,pa as o,ru as s,sa as c,ua as l}from"./messages-BovT1T-w.js";import{a as u}from"./auth-store-ramu4Ja7.js";import{r as d}from"./route-BxpeArPd.js";import{i as f}from"./button-DJA4fnJ8.js";import{o as p,s as m}from"./select-KXe0_6v0.js";import{_ as h,d as g,f as _,g as v,h as y,n as b,p as x,r as S,t as C,v as w,y as T}from"./data-table-iTrs6rGi.js";import{t as E}from"./page-header-BBJ9dE3-.js";import{t as D}from"./badge-BAmRBT3U.js";import{t as O}from"./use-table-url-state-C7-IMA3_.js";var k=a(s(),1),A=i();function j(){return[{accessorKey:`network`,header:({column:t})=>(0,A.jsx)(g,{column:t,title:e()}),cell:({row:e})=>e.original.network??`-`,meta:{label:e(),skeleton:`short`}},{id:`tokens`,accessorFn:e=>e.tokens?.join(`, `)??``,header:({column:e})=>(0,A.jsx)(g,{column:e,title:c()}),cell:({row:e})=>{let t=e.original.tokens??[];return t.length===0?`-`:(0,A.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:t.map(e=>(0,A.jsx)(D,{className:`bg-emerald-500/10 text-emerald-600`,children:e},e))})},meta:{className:f(`text-center`),label:c(),skeleton:`short`}}]}var M=d(`/_authenticated/payment-assets/`);function N({data:e,isLoading:n,onRefresh:i}){let[a,o]=(0,k.useState)([]),{globalFilter:s,onGlobalFilterChange:c,columnFilters:u,onColumnFiltersChange:d,pagination:f,onPaginationChange:p,ensurePageInRange:m}=O({search:M.useSearch(),navigate:M.useNavigate(),pagination:{defaultPage:1,defaultPageSize:10},globalFilter:{enabled:!0,key:`keyword`},columnFilters:[{columnId:`network`,searchKey:`chain`,type:`array`}]}),g=_({data:e,columns:(0,k.useMemo)(()=>j(),[]),state:{sorting:a,columnFilters:u,globalFilter:s,pagination:f},onSortingChange:o,onColumnFiltersChange:d,onGlobalFilterChange:c,onPaginationChange:p,globalFilterFn:(e,t,n)=>{let r=String(n).toLowerCase();return(e.original.network??``).toLowerCase().includes(r)||(e.original.tokens??[]).some(e=>e.toLowerCase().includes(r))},getCoreRowModel:x(),getFilteredRowModel:h(),getPaginationRowModel:w(),getSortedRowModel:T(),getFacetedRowModel:y(),getFacetedUniqueValues:v()});(0,k.useEffect)(()=>{m(g.getPageCount())},[g,m]);let E=[...new Set(e.map(e=>e.network).filter(Boolean))].map(e=>({label:e,value:e}));return(0,A.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4`,children:[(0,A.jsx)(C,{filters:[{columnId:`network`,title:t(),options:E}],onRefresh:i,searchPlaceholder:l(),table:g}),(0,A.jsx)(S,{className:`min-w-[700px]`,emptyText:r(),loading:n,table:g}),(0,A.jsx)(b,{className:`mt-auto`,table:g})]})}function P(){let e=u.useQuery(`get`,`/admin/api/v1/supported-assets`);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m,{fixed:!0}),(0,A.jsxs)(p,{className:`flex flex-1 flex-col gap-4 sm:gap-6`,children:[(0,A.jsx)(E,{description:o(),title:n()}),(0,A.jsx)(N,{data:e.data?.data?.supports??[],isLoading:e.isLoading,onRefresh:()=>e.refetch()})]})]})}var F=P;export{F as component};
|
||||
import{ca as e,da as t,fa as n,la as r,nu as i,ou as a,pa as o,ru as s,sa as c,ua as l}from"./messages-BovT1T-w.js";import{a as u}from"./auth-store-ramu4Ja7.js";import{r as d}from"./route-BxpeArPd.js";import{i as f}from"./button-DJA4fnJ8.js";import{o as p,s as m}from"./select-u60_CGVx.js";import{_ as h,d as g,f as _,g as v,h as y,n as b,p as x,r as S,t as C,v as w,y as T}from"./data-table-CpxorDbP.js";import{t as E}from"./page-header-BBJ9dE3-.js";import{t as D}from"./badge-BAmRBT3U.js";import{t as O}from"./use-table-url-state-C7-IMA3_.js";var k=a(s(),1),A=i();function j(){return[{accessorKey:`network`,header:({column:t})=>(0,A.jsx)(g,{column:t,title:e()}),cell:({row:e})=>e.original.network??`-`,meta:{label:e(),skeleton:`short`}},{id:`tokens`,accessorFn:e=>e.tokens?.join(`, `)??``,header:({column:e})=>(0,A.jsx)(g,{column:e,title:c()}),cell:({row:e})=>{let t=e.original.tokens??[];return t.length===0?`-`:(0,A.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:t.map(e=>(0,A.jsx)(D,{className:`bg-emerald-500/10 text-emerald-600`,children:e},e))})},meta:{className:f(`text-center`),label:c(),skeleton:`short`}}]}var M=d(`/_authenticated/payment-assets/`);function N({data:e,isLoading:n,onRefresh:i}){let[a,o]=(0,k.useState)([]),{globalFilter:s,onGlobalFilterChange:c,columnFilters:u,onColumnFiltersChange:d,pagination:f,onPaginationChange:p,ensurePageInRange:m}=O({search:M.useSearch(),navigate:M.useNavigate(),pagination:{defaultPage:1,defaultPageSize:10},globalFilter:{enabled:!0,key:`keyword`},columnFilters:[{columnId:`network`,searchKey:`chain`,type:`array`}]}),g=_({data:e,columns:(0,k.useMemo)(()=>j(),[]),state:{sorting:a,columnFilters:u,globalFilter:s,pagination:f},onSortingChange:o,onColumnFiltersChange:d,onGlobalFilterChange:c,onPaginationChange:p,globalFilterFn:(e,t,n)=>{let r=String(n).toLowerCase();return(e.original.network??``).toLowerCase().includes(r)||(e.original.tokens??[]).some(e=>e.toLowerCase().includes(r))},getCoreRowModel:x(),getFilteredRowModel:h(),getPaginationRowModel:w(),getSortedRowModel:T(),getFacetedRowModel:y(),getFacetedUniqueValues:v()});(0,k.useEffect)(()=>{m(g.getPageCount())},[g,m]);let E=[...new Set(e.map(e=>e.network).filter(Boolean))].map(e=>({label:e,value:e}));return(0,A.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4`,children:[(0,A.jsx)(C,{filters:[{columnId:`network`,title:t(),options:E}],onRefresh:i,searchPlaceholder:l(),table:g}),(0,A.jsx)(S,{className:`min-w-[700px]`,emptyText:r(),loading:n,table:g}),(0,A.jsx)(b,{className:`mt-auto`,table:g})]})}function P(){let e=u.useQuery(`get`,`/admin/api/v1/supported-assets`);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m,{fixed:!0}),(0,A.jsxs)(p,{className:`flex flex-1 flex-col gap-4 sm:gap-6`,children:[(0,A.jsx)(E,{description:o(),title:n()}),(0,A.jsx)(N,{data:e.data?.data?.supports??[],isLoading:e.isLoading,onRefresh:()=>e.refetch()})]})]})}var F=P;export{F as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Fc as e,Ft as t,Ic as n,Lc as r,Pc as i,Pt as a,nu as o}from"./messages-BovT1T-w.js";import{n as s}from"./Match-B8-zI9ZJ.js";import{B as c,W as l}from"./search-provider-C8LIhlNg.js";import{o as u,s as d}from"./select-KXe0_6v0.js";import{t as f}from"./separator-CRLYw2cW.js";import{t as p}from"./createLucideIcon-D28ivbfF.js";import{t as m}from"./page-header-BBJ9dE3-.js";import{t as h}from"./sidebar-nav-BS8UfIV-.js";var g=p(`bell-ring`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]),_=p(`globe-lock`,[[`path`,{d:`M15.686 15A14.5 14.5 0 0 1 12 22a14.5 14.5 0 0 1 0-20 10 10 0 1 0 9.542 13`,key:`qkt0x6`}],[`path`,{d:`M2 12h8.5`,key:`ovaggd`}],[`path`,{d:`M20 6V4a2 2 0 1 0-4 0v2`,key:`1of5e8`}],[`rect`,{width:`8`,height:`5`,x:`14`,y:`6`,rx:`1`,key:`1fmf51`}]]),v=o(),y=[{title:r(),href:`/settings`,icon:(0,v.jsx)(c,{size:18})},{title:n(),href:`/settings/telegram`,icon:(0,v.jsx)(g,{size:18})},{title:e(),href:`/settings/rate`,icon:(0,v.jsx)(_,{size:18})},{title:i(),href:`/settings/epay`,icon:(0,v.jsx)(l,{size:18})}];function b(){return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(d,{}),(0,v.jsxs)(u,{fixed:!0,children:[(0,v.jsx)(m,{description:a(),title:t()}),(0,v.jsx)(f,{className:`my-4 lg:my-6`}),(0,v.jsxs)(`div`,{className:`flex flex-1 flex-col space-y-2 overflow-hidden lg:flex-row lg:space-x-12 lg:space-y-0`,children:[(0,v.jsx)(`aside`,{className:`top-0 lg:sticky lg:w-1/5`,children:(0,v.jsx)(h,{items:y})}),(0,v.jsx)(`div`,{className:`flex w-full overflow-y-hidden p-1`,children:(0,v.jsx)(s,{})})]})]})]})}var x=b;export{x as component};
|
||||
import{Fc as e,Ft as t,Ic as n,Lc as r,Pc as i,Pt as a,nu as o}from"./messages-BovT1T-w.js";import{n as s}from"./Match-B8-zI9ZJ.js";import{B as c,W as l}from"./search-provider-Ddt37OW6.js";import{o as u,s as d}from"./select-u60_CGVx.js";import{t as f}from"./separator-CRLYw2cW.js";import{t as p}from"./createLucideIcon-D28ivbfF.js";import{t as m}from"./page-header-BBJ9dE3-.js";import{t as h}from"./sidebar-nav-BQbYL8Jr.js";var g=p(`bell-ring`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]),_=p(`globe-lock`,[[`path`,{d:`M15.686 15A14.5 14.5 0 0 1 12 22a14.5 14.5 0 0 1 0-20 10 10 0 1 0 9.542 13`,key:`qkt0x6`}],[`path`,{d:`M2 12h8.5`,key:`ovaggd`}],[`path`,{d:`M20 6V4a2 2 0 1 0-4 0v2`,key:`1of5e8`}],[`rect`,{width:`8`,height:`5`,x:`14`,y:`6`,rx:`1`,key:`1fmf51`}]]),v=o(),y=[{title:r(),href:`/settings`,icon:(0,v.jsx)(c,{size:18})},{title:n(),href:`/settings/telegram`,icon:(0,v.jsx)(g,{size:18})},{title:e(),href:`/settings/rate`,icon:(0,v.jsx)(_,{size:18})},{title:i(),href:`/settings/epay`,icon:(0,v.jsx)(l,{size:18})}];function b(){return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(d,{}),(0,v.jsxs)(u,{fixed:!0,children:[(0,v.jsx)(m,{description:a(),title:t()}),(0,v.jsx)(f,{className:`my-4 lg:my-6`}),(0,v.jsxs)(`div`,{className:`flex flex-1 flex-col space-y-2 overflow-hidden lg:flex-row lg:space-x-12 lg:space-y-0`,children:[(0,v.jsx)(`aside`,{className:`top-0 lg:sticky lg:w-1/5`,children:(0,v.jsx)(h,{items:y})}),(0,v.jsx)(`div`,{className:`flex w-full overflow-y-hidden p-1`,children:(0,v.jsx)(s,{})})]})]})]})}var x=b;export{x as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Bc as e,Hc as t,Vc as n,nu as r}from"./messages-BovT1T-w.js";import{n as i}from"./Match-B8-zI9ZJ.js";import{H as a}from"./search-provider-C8LIhlNg.js";import{o,s}from"./select-KXe0_6v0.js";import{t as c}from"./separator-CRLYw2cW.js";import{t as l}from"./page-header-BBJ9dE3-.js";import{t as u}from"./sidebar-nav-BS8UfIV-.js";var d=r();function f(){let r=[{title:e(),href:`/account/password`,icon:(0,d.jsx)(a,{size:18})}];return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s,{}),(0,d.jsxs)(o,{fixed:!0,children:[(0,d.jsx)(l,{description:n(),title:t()}),(0,d.jsx)(c,{className:`my-4 lg:my-6`}),(0,d.jsxs)(`div`,{className:`flex flex-1 flex-col space-y-2 overflow-hidden lg:flex-row lg:space-x-12 lg:space-y-0`,children:[(0,d.jsx)(`aside`,{className:`top-0 lg:sticky lg:w-1/5`,children:(0,d.jsx)(u,{items:r})}),(0,d.jsx)(`div`,{className:`flex w-full overflow-y-hidden p-1`,children:(0,d.jsx)(i,{})})]})]})]})}var p=f;export{p as component};
|
||||
import{Bc as e,Hc as t,Vc as n,nu as r}from"./messages-BovT1T-w.js";import{n as i}from"./Match-B8-zI9ZJ.js";import{H as a}from"./search-provider-Ddt37OW6.js";import{o,s}from"./select-u60_CGVx.js";import{t as c}from"./separator-CRLYw2cW.js";import{t as l}from"./page-header-BBJ9dE3-.js";import{t as u}from"./sidebar-nav-BQbYL8Jr.js";var d=r();function f(){let r=[{title:e(),href:`/account/password`,icon:(0,d.jsx)(a,{size:18})}];return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s,{}),(0,d.jsxs)(o,{fixed:!0,children:[(0,d.jsx)(l,{description:n(),title:t()}),(0,d.jsx)(c,{className:`my-4 lg:my-6`}),(0,d.jsxs)(`div`,{className:`flex flex-1 flex-col space-y-2 overflow-hidden lg:flex-row lg:space-x-12 lg:space-y-0`,children:[(0,d.jsx)(`aside`,{className:`top-0 lg:sticky lg:w-1/5`,children:(0,d.jsx)(u,{items:r})}),(0,d.jsx)(`div`,{className:`flex w-full overflow-y-hidden p-1`,children:(0,d.jsx)(i,{})})]})]})]})}var p=f;export{p as component};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{nu as e,p as t}from"./messages-BovT1T-w.js";import{t as n}from"./link-CA4H4hTz.js";import{t as r}from"./useNavigate-Dg8CkCoa.js";import{t as i}from"./useRouterState-DV1cSG1v.js";import{r as a}from"./search-provider-C8LIhlNg.js";import{i as o,n as s}from"./button-DJA4fnJ8.js";import{a as c,i as l,n as u,r as d,t as f}from"./select-KXe0_6v0.js";var p=e();function m({className:e,items:m,...h}){let g=r(),{location:_}=i(),v=m.find(e=>_.pathname===e.href)?.href??m[0]?.href??``;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`div`,{className:`p-1 md:hidden`,children:(0,p.jsxs)(f,{onValueChange:e=>{g({to:e})},value:v,children:[(0,p.jsx)(l,{className:`h-12 sm:w-48`,children:(0,p.jsx)(c,{placeholder:t()})}),(0,p.jsx)(u,{children:m.map(e=>(0,p.jsx)(d,{value:e.href,children:(0,p.jsxs)(`div`,{className:`flex gap-x-4 px-2 py-1`,children:[(0,p.jsx)(`span`,{className:`scale-125`,children:e.icon}),(0,p.jsx)(`span`,{className:`text-md`,children:e.title})]})},e.href))})]})}),(0,p.jsx)(a,{className:`hidden w-full min-w-40 bg-background px-1 py-2 md:block`,type:`always`,children:(0,p.jsx)(`nav`,{className:o(`flex space-x-2 py-1 lg:flex-col lg:space-x-0 lg:space-y-1`,e),...h,children:m.map(e=>(0,p.jsxs)(n,{activeOptions:{exact:!0},activeProps:{className:o(s({variant:`ghost`}),`justify-start bg-muted hover:bg-accent`)},className:o(s({variant:`ghost`}),`justify-start hover:bg-accent hover:underline`),to:e.href,children:[(0,p.jsx)(`span`,{className:`me-2`,children:e.icon}),e.title]},e.href))})})]})}export{m as t};
|
||||
import{nu as e,p as t}from"./messages-BovT1T-w.js";import{t as n}from"./link-CA4H4hTz.js";import{t as r}from"./useNavigate-Dg8CkCoa.js";import{t as i}from"./useRouterState-DV1cSG1v.js";import{r as a}from"./search-provider-Ddt37OW6.js";import{i as o,n as s}from"./button-DJA4fnJ8.js";import{a as c,i as l,n as u,r as d,t as f}from"./select-u60_CGVx.js";var p=e();function m({className:e,items:m,...h}){let g=r(),{location:_}=i(),v=m.find(e=>_.pathname===e.href)?.href??m[0]?.href??``;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`div`,{className:`p-1 md:hidden`,children:(0,p.jsxs)(f,{onValueChange:e=>{g({to:e})},value:v,children:[(0,p.jsx)(l,{className:`h-12 sm:w-48`,children:(0,p.jsx)(c,{placeholder:t()})}),(0,p.jsx)(u,{children:m.map(e=>(0,p.jsx)(d,{value:e.href,children:(0,p.jsxs)(`div`,{className:`flex gap-x-4 px-2 py-1`,children:[(0,p.jsx)(`span`,{className:`scale-125`,children:e.icon}),(0,p.jsx)(`span`,{className:`text-md`,children:e.title})]})},e.href))})]})}),(0,p.jsx)(a,{className:`hidden w-full min-w-40 bg-background px-1 py-2 md:block`,type:`always`,children:(0,p.jsx)(`nav`,{className:o(`flex space-x-2 py-1 lg:flex-col lg:space-x-0 lg:space-y-1`,e),...h,children:m.map(e=>(0,p.jsxs)(n,{activeOptions:{exact:!0},activeProps:{className:o(s({variant:`ghost`}),`justify-start bg-muted hover:bg-accent`)},className:o(s({variant:`ghost`}),`justify-start hover:bg-accent hover:underline`),to:e.href,children:[(0,p.jsx)(`span`,{className:`me-2`,children:e.icon}),e.title]},e.href))})})]})}export{m as t};
|
||||
Reference in New Issue
Block a user