PageSourceSearch

https://dashboard.zenobank.io/assets/index-DYyJwtsQ.js

js zenobank.io collected 2026-09-24 19:04:15 UTC 11,421 bytes, 1 lines download raw bytes

1import{j as e,u as p,B as u,r as m,T as y,L as v,t as f,a as L,U as k}from"./index-CS44h_xq.js";import{u as C,c as A,g as h,n as N,P as b,a as D}from"./payment-link-form-fields-Tg2sXq28.js";import{H as w,S as P,F as S,T as F,M}from"./theme-switch-VuvrpBS4.js";import{L as I}from"./language-switch-MlpDhLUq.js";import{C as E}from"./checkouts-table-ByD56AIf.js";import{A as T,b as Z,a as B}from"./alert-BQiE0IS0.js";import{u as H,a as _,F as z}from"./form-DvAS8IOx.js";import{D as R,a as V,b as G,c as K,d as q,e as U}from"./dialog-CI0ybl9q.js";import{L as $}from"./loader-circle-D9Z0gYlp.js";import{f as O}from"./numbers-BF6p29tZ.js";import{D as x}from"./data-table-pagination-CChDJs-m.js";import{E as X}from"./external-link-BjMPVI5V.js";import{c as J}from"./createReactComponent-CMfxUvJZ.js";import"./index-_QWCS6zX.js";import"./use-active-store-C4h4Yn_N.js";import"./currency-combobox-BYrnMMh0.js";import"./sidebar-B-1Zlijc.js";import"./index-Dbs_NXET.js";import"./index-C0XvKAs1.js";import"./index-DVeb0Ydk.js";import"./index-Cd8MYVhv.js";import"./skeleton-BHy8n-Ku.js";import"./index-FDOWgD97.js";import"./index-DTKQccHH.js";import"./index-B7CzHLeL.js";import"./popover-fbzqMK5F.js";import"./chevrons-up-down-CA8WTAoj.js";import"./check-D8fa_ynl.js";import"./input-B1lvbCvb.js";import"./switch-BUVPANcH.js";import"./index-DoEybC_E.js";import"./separator-BBZonFpg.js";import"./dropdown-menu-ROt1CW1u.js";import"./badge-CLuNl2dt.js";import"./select-Bq_JhlRY.js";import"./chevron-down-L8uHSk8O.js";const Q={EMAIL:"EMAIL",LEGAL_NAME:"LEGAL_NAME",BILLING_ADDRESS:"BILLING_ADDRESS",TAX_ID:"TAX_ID"};const W=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],Y=J("outline","plus","Plus",W);function e1({className:a}){return e.jsx("svg",{viewBox:"0 0 24 24",className:a,fill:"#FF4F00","aria-hidden":"true",children:e.jsx("path",{d:"M4.157 0A4.151 4.151 0 0 0 0 4.161v15.678A4.151 4.151 0 0 0 4.157 24h15.682A4.152 4.152 0 0 0 24 19.839V4.161A4.152 4.152 0 0 0 19.839 0H4.157Zm10.61 8.761h.03a.577.577 0 0 1 .23.038.585.585 0 0 1 .201.124.63.63 0 0 1 .162.431.612.612 0 0 1-.162.435.58.58 0 0 1-.201.128.58.58 0 0 1-.23.042.529.529 0 0 1-.235-.042.585.585 0 0 1-.332-.328.559.559 0 0 1-.038-.235.613.613 0 0 1 .17-.431.59.59 0 0 1 .405-.162Zm2.853 1.572c.03.004.061.004.095.004.325-.011.646.064.937.219.238.144.431.355.552.609.128.279.189.582.185.888v.193a2 2 0 0 1 0 .219h-2.498c.003.227.075.45.204.642a.78.78 0 0 0 .646.265.714.714 0 0 0 .484-.136.642.642 0 0 0 .23-.318l.915.257a1.398 1.398 0 0 1-.28.537c-.14.159-.321.284-.521.355a2.234 2.234 0 0 1-.836.136 1.923 1.923 0 0 1-1.001-.245 1.618 1.618 0 0 1-.665-.703 2.221 2.221 0 0 1-.227-1.036 1.95 1.95 0 0 1 .48-1.398 1.9 1.9 0 0 1 1.3-.488Zm-9.607.023c.162.004.325.026.48.079.207.065.4.174.563.314.26.302.393.692.366 1.088v2.276H8.53l-.109-.711h-.065c-.064.163-.155.31-.272.439a1.122 1.122 0 0 1-.374.264 1.023 1.023 0 0 1-.453.083 1.334 1.334 0 0 1-.866-.264.965.965 0 0 1-.329-.801.993.993 0 0 1 .076-.431 1.02 1.02 0 0 1 .242-.363 1.478 1.478 0 0 1 1.043-.303h.952v-.181a.696.696 0 0 0-.136-.454.553.553 0 0 0-.438-.154.695.695 0 0 0-.378.086.48.48 0 0 0-.193.254l-.99-.144a1.26 1.26 0 0 1 .257-.563c.14-.174.321-.302.533-.378.261-.091.54-.136.82-.129.053-.003.106-.007.163-.007Zm4.384.007c.174 0 .347.038.506.114.182.083.34.211.458.374.257.423.377.911.351 1.406a2.53 2.53 0 0 1-.355 1.448 1.148 1.148 0 0 1-1.009.517c-.204 0-.401-.045-.582-.136a1.052 1.052 0 0 1-.48-.457 1.298 1.298 0 0 1-.114-.234h-.045l.004 1.784h-1.059v-4.713h.904l.117.805h.057c.068-.208.177-.401.328-.56a1.129 1.129 0 0 1 .843-.344h.076v-.004Zm7.559.084h.903l.113.805h.053a1.37 1.37 0 0 1 .235-.484.813.813 0 0 1 .313-.242.82.82 0 0 1 .39-.076h.234v1.051h-.401a.662.662 0 0 0-.313.008.623.623 0 0 0-.272.155.663.663 0 0 0-.174.26.683.683 0 0 0-.027.314v1.875h-1.054v-3.666Zm-17.515.003h3.262v.896L3.73 13.104l.034.113h1.973l.042.9H2.4v-.9l1.931-1.754-.045-.117H2.441v-.896Zm11.815 0h1.055v3.659h-1.055V10.45Zm3.443.684.019.016a.69.69 0 0 0-.351.045.756.756 0 0 0-.287.204c-.11.155-.174.336-.189.522h1.545c-.034-.526-.257-.787-.74-.787h.003Zm-5.718.163c-.026 0-.057 0-.083.004a.78.78 0 0 0-.31.053.746.746 0 0 0-.257.189 1.016 1.016 0 0 0-.204.695v.064c-.015.257.057.507.204.711a.634.634 0 0 0 .253.196.638.638 0 0 0 .314.061.644.644 0 0 0 .578-.265c.14-.223.204-.48.189-.74a1.216 1.216 0 0 0-.181-.711.677.677 0 0 0-.503-.257Zm-4.509 1.266a.464.464 0 0 0-.268.102.373.373 0 0 0-.114.276c0 .053.008.106.027.155a.375.375 0 0 0 .087.132.576.576 0 0 0 .397.11v.004a.863.863 0 0 0 .563-.182.573.573 0 0 0 .211-.457v-.14h-.903Z"})})}function a1({className:a}){return e.jsx("svg",{viewBox:"0 0 24 24",className:a,fill:"#EA4B71","aria-hidden":"true",children:e.jsx("path",{d:"M21.4737 5.6842c-1.1772 0-2.1663.8051-2.4468 1.8947h-2.8955c-1.235 0-2.289.893-2.492 2.111l-.1038.623a1.263 1.263 0 0 1-1.246 1.0555H11.289c-.2805-1.0896-1.2696-1.8947-2.4468-1.8947s-2.1663.8051-2.4467 1.8947H4.973c-.2805-1.0896-1.2696-1.8947-2.4468-1.8947C1.1311 9.4737 0 10.6047 0 12s1.
1131 2.5263 2.5263 2.5263c1.1772 0 2.1663-.8051 2.4468-1.8947h1.4223c.2804 1.0896 1.2696 1.8947 2.4467 1.8947 1.1772 0 2.1663-.8051 2.4468-1.8947h1.0008a1.263 1.263 0 0 1 1.2459 1.0555l.1038.623c.203 1.218 1.257 2.111 2.492 2.111h.3692c.2804 1.0895 1.2696 1.8947 2.4468 1.8947 1.3952 0 2.5263-1.131 2.5263-2.5263s-1.131-2.5263-2.5263-2.5263c-1.1772 0-2.1664.805-2.4468 1.8947h-.3692a1.263 1.263 0 0 1-1.246-1.0555l-.1037-.623A2.52 2.52 0 0 0 13.9607 12a2.52 2.52 0 0 0 .821-1.4794l.1038-.623a1.263 1.263 0 0 1 1.2459-1.0555h2.8955c.2805 1.0896 1.2696 1.8947 2.4468 1.8947 1.3952 0 2.5263-1.131 2.5263-2.5263s-1.131-2.5263-2.5263-2.5263m0 1.2632a1.263 1.263 0 0 1 1.2631 1.2631 1.263 1.263 0 0 1-1.2631 1.2632 1.263 1.263 0 0 1-1.2632-1.2632 1.263 1.263 0 0 1 1.2632-1.2631M2.5263 10.7368A1.263 1.263 0 0 1 3.7895 12a1.263 1.263 0 0 1-1.2632 1.2632A1.263 1.263 0 0 1 1.2632 12a1.263 1.263 0 0 1 1.2631-1.2632m6.3158 0A1.263 1.263 0 0 1 10.1053 12a1.263 1.263 0 0 1-1.2632 1.2632A1.263 1.263 0 0 1 7.579 12a1.263 1.263 0 0 1 1.2632-1.2632m10.1053 3.7895a1.263 1.263 0 0 1 1.2631 1.2632 1.263 1.263 0 0 1-1.2631 1.2631 1.263 1.263 0 0 1-1.2632-1.2631 1.263 1.263 0 0 1 1.2632-1.2632"})})}function s1({className:a}){return e.jsx("svg",{viewBox:"0 0 24 24",className:a,fill:"#6D00CC","aria-hidden":"true",children:e.jsx("path",{d:"M13.38 3.498c-.27 0-.511.19-.566.465L9.85 18.986a.578.578 0 0 0 .453.678l4.095.826a.58.58 0 0 0 .682-.455l2.963-15.021a.578.578 0 0 0-.453-.678l-4.096-.826a.589.589 0 0 0-.113-.012zm-5.876.098a.576.5
176 0 0 0-.516.318L.062 17.697a.575.575 0 0 0 .256.774l3.733 1.877a.578.578 0 0 0 .775-.258l6.926-13.781a.577.577 0 0 0-.256-.776L7.762 3.658a.571.571 0 0 0-.258-.062zm11.74.115a.576.576 0 0 0-.576.576v15.426c0 .318.258.578.576.578h4.178a.58.58 0 0 0 .578-.578V4.287a.578.578 0 0 0-.578-.576Z"})})}function t1(){const{t:a}=p("payment-links");return e.jsxs(T,{className:"mb-4 flex flex-col gap-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[e.jsxs("span",{className:"flex items-center gap-2.5",children:[e.jsx(e1,{className:"size-5"}),e.jsx(a1,{className:"size-5"}),e.jsx(s1,{className:"size-5"})]}),e.jsx(Z,{children:a("automation.title")})]}),e.jsx(B,{children:e.jsx("p",{children:a("automation.description")})}),e.jsx(u,{asChild:!0,size:"sm",variant:"secondary",className:"self-start",children:e.jsx("a",{href:"https://zenobank.io/support",target:"_blank",rel:"noopener noreferrer",children:a("automation.contactSupport")})})]})}function r1({open:a,onOpenChange:t}){const{t:s}=p(["payment-links","common"]),{createPaymentLink:r,isPending:o}=C(),c=m.useMemo(()=>A(s),[s]),i=H({resolver:_(c),defaultValues:h()}),l=async n=>{try{await r({name:n.name,priceAmount:n.priceAmount,priceCurrency:n.priceCurrency,requiredCustomerFields:n.requireEmail?[Q.EMAIL]:[]}),f.success(s("createDialog.created")),t(!1),i.reset(h())}catch{f.error(s("createDialog.createFailed"))}};return e.jsx(R,{open:a,onOpenChange:n=>{o||(t(n),n||i.reset(h()))},children:e.jsxs(V,{className:"sm:max-w-[480px]",children:[e.jsxs(G,{children:[e.jsx(K,{children:s("createDialog.title")}),e.jsx(q,{children:e.jsx(y,{t:s,i18nKey:"createDialog.description",components:{checkout:e.jsx(v,{to:"/",className:"hover:text-foreground underline underline-offset-2"})}})})]}),e.jsx(z,{...i,children:e.jsxs("form",{onSubmit:i.handleSubmit(l),className:"space-y-4",...N,children:[e.jsx(b,{form:i,disabled:o}),e.jsxs(U,{children:[e.jsx(u,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:o,children:s("common:actions.cancel")}),e.jsx(u,{type:"submit",disabled:o,children:o?e.jsx($,{className:"h-4 w-4 animate-spin"}):s("createDialog.submit")})]})]})})]})})}function n1(){const{t:a}=p(["payment-links","common"]);return m.useMemo(()=>[{accessorKey:"id",header:({column:t})=>e.jsx(x,{column:t,title:"ID"}),cell:({row:t})=>{const s=t.getValue("id");return e.jsx("button",{type:"button",onClick:r=>{r.stopPropagation(),navigator.clipboard.writeText(s),f.success(a("columns.idCopied"))},className:"flex cursor-pointer items-center gap-1 font-mono text-sm",children:`${s.slice(0,6)}...${s.slice(-4)}`})},enableSorting:!1},{accessorKey:"name",header:({column:t})=>e.jsx(x,{column:t,title:a("common:fields.name")}),cell:({row:t})=>{const s=t.original.paymentLinkUrl;return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:t.original.name}),e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer","aria-label":a("columns.openInNewTab"),title:s,onClick:r=>r.stopPropagation(),className:"text-muted-foreground hover:text-foreground inline-flex h-6 w-6 shrink-0 items-center justify-center rounded transition-colors",children:e.jsx(X,{className:"size-3.5"})})]})}},{accessorKey:"priceAmount",header:({column:t})=>e.jsx(x,{column:t,title:a("common:fields.amount")}),cell:({row:t})=>{const{priceAmount:s,priceCurrency:r}=t.original;return s===null?e.jsx("span",{className:"text-muted-foreground",children:a("columns.customerChooses")}):e.jsxs("div",{className:"font-medium",children:[O(Number(s))," ",r??""]})}}],[a])}function o1(){const{t:a}=p("payment-links"),t=L(),s=n1(),[r,o]=m.useState(!1),[c,i]=m.useState(""),{paymentLinks:l,isLoading:n}=D(),g=m.useMemo(()=>{if(!c)return l;const d=c.toLowerCase();return l.filter(j=>j.name.toLowerCase().includes(d)||j.id.toLowerCase().includes(d))},[c,l]);return e.jsxs(e.Fragment,{children:[e.jsxs(w,{fixed:!0,children:[e.jsx(P,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(S,{}),e.jsx(I,{}),e.jsx(F,{}),e.jsx(k,{})]})]}),e.jsxs(M,{children:[e.jsx("div",{className:"mb-2 flex flex-wrap items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:a("page.title")}),e.jsx("p",{className:"text-muted-foreground",children:a("page.subtitle")})]})}),e.jsx(t1,{}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-y-0 lg:space-x-12",children:e.jsx(E,{data:g,columns:s,isLoading:n,search:c,onSearchChange:i,searchPlaceholder:a("page.searchPlaceholder"),onRowClick:d=>t({to:"/payment-links/$id",params:{id:d.id}}),toolbarActions:e.jsxs(u,{onClick:()=>o(!0),className:"gap-1",children:[e.jsx(Y,{size:18}),e.jsx("span",{children:a("page.create")})]})})})]}),e.jsx(r1,{open:r,onOpenChange:o})]})}function G1(){return e.jsx(o1,{})}export{G1 as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.