PageSourceSearch

https://wonder.app/assets/resources.blogs-Bot5Jb3O.js

js wonder.app collected 2026-09-25 14:11:23 UTC 7,021 bytes, 1 lines download raw bytes

1import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,t as n}from"./jsx-runtime-KLUqzItW.js";import{t as r}from"./link-Bsdect7p.js";import{t as i}from"./useNavigate-BbSWcAeS.js";import{t as a}from"./useSuspenseQuery-C54xeJXF.js";import{a as o,i as s,o as c}from"./lang-DxD9vp0C.js";import{t as l}from"./createLucideIcon-B5XD4t4C.js";import{t as u}from"./arrow-up-right-zVbPoqX2.js";import{t as d}from"./book-open-CJhYhHJu.js";import{t as f}from"./chevron-right-DKVR-sc7.js";import{t as p}from"./search-D1fA9NbM.js";import{Nn as m,li as h}from"./index-BmqPxN-i.js";import{n as g,t as _}from"./site-shell-ib4QKvTJ.js";var v=l(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),y=e(t()),b=n(),x=12,S={en:{title:`Ideas for merchants who move money`,sub:`Guides, product updates and industry insights on payments, cash flow and business finance across Hong Kong and Asia Pacific.`,search:`Search articles`,empty:`No articles match your search.`,read:`Read article`,all:`All`,page:`Page`,of:`of`,prev:`Previous`,next:`Next`},ja:{title:`お金を動かす事業者のためのヒント`,sub:`香港およびアジア太平洋地域の決済・資金繰り・企業財務に関するガイド、プロダクト情報、業界インサイト。`,search:`記事を検索`,empty:`該当する記事はありません。`,read:`記事を読む`,all:`すべて`,page:`ページ`,of:`/`,prev:`前へ`,next:`次へ`},zh:{title:`為營商者而寫的支付洞察`,sub:`涵蓋香港及亞太區支付、現金流與企業財務的實用指南、產品消息與行業洞察。`,search:`搜尋文章`,empty:`沒有符合搜尋的文章。`,read:`閱讀文章`,all:`全部`,page:`頁`,of:`/`,prev:`上一頁`,next:`下一頁`}};function C(){let{data:e}=a(h(`blog`)),t=c(),n=s(),{lang:l}=o(),C=S[l]??S.en,w=l===`ja`?`ja-JP`:l===`zh`?`zh-HK`:`en-GB`,{page:T,q:E,category:D}=m.useSearch(),O=i({from:`/resources/blogs`}),k=(0,y.useMemo)(()=>{let t=new Map;for(let r of e)t.set(r.category.en,n(r.category));return Array.from(t,([e,t])=>({key:e,label:t}))},[n,e]),A=(0,y.useMemo)(()=>{let t=E.trim().toLowerCase();return e.filter(e=>D?e.category.en===D:!0).filter(e=>t?`${n(e.title)} ${n(e.summary)} ${e.title.en}`.toLowerCase().includes(t):!0)},[E,D,n,e]),j=Math.max(1,Math.ceil(A.length/x)),M=Math.min(Math.max(1,T),j),N=A.slice((M-1)*x,M*x),P=e=>{O({search:t=>({...t,page:1,...e})})},F=e=>new Date(e).toLocaleDateString(w,{day:`numeric`,month:`long`,year:`numeric`});return(0,b.jsxs)(g,{children:[(0,b.jsx)(_,{eyebrow:t(`res_blog`),title:(0,b.jsx)(b.Fragment,{children:C.title}),subtitle:C.sub}),(0,b.jsx)(`section`,{className:`pb-24`,children:(0,b.jsxs)(`div`,{className:`max-w-6xl mx-auto px-6`,children:[(0,b.jsxs)(`div`,{className:`flex flex-col md:flex-row md:items-center gap-4`,children:[(0,b.jsxs)(`div`,{className:`relative flex-1`,children:[(0,b.jsx)(p,{className:`absolute left-4 top-1/2 -translate-y-1/2 size-4 text-muted-foreground`}),(0,b.jsx)(`input`,{value:E,onChange:e=>P({q:e.target.value}),placeholder:C.search,"aria-label":C.search,className:`w-full rounded-full border border-border bg-white pl-11 pr-4 py-3 text-sm outline-none focus:border-brand-blue/50 focus:ring-2 focus:ring-brand-blue/15`})]}),(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,b.jsx)(`button`,{onClick:()=>P({category:``}),className:`rounded-full px-4 py-2 text-sm font-semibold transition-colors ${D===``?`bg-brand-blue text-white`:`bg-secondary text-muted-foreground hover:text-foreground`}`,children:C.all}),k.map(e=>(0,b.jsx)(`button`,{onClick:()=>P({category:e.key}),className:`rounded-full px-4 py-2 text-sm font-semibold transition-colors ${D===e.key?`bg-brand-blue text-white`:`bg-secondary text-muted-foreground hover:text-foreground`}`,children:e.label},e.key))]})]}),A.length===0?(0,b.jsx)(`p`,{className:`mt-16 text-center text-muted-foreground`,children:C.empty}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`mt-10 grid gap-6 md:grid-cols-2 lg:grid-cols-3`,children:N.map(e=>(0,b.jsxs)(`div`,{className:`group rounded-3xl bg-white border border-border shadow-soft overflow-hidden flex flex-col hover:shadow-card hover:-translate-y-1 hover:border-brand-blue/30 transition-all`,children:[(0,b.jsx)(r,{to:`/blog-posts/$slug`,params:{slug:e.slug},"aria-label":n(e.title),className:`block aspect-[16/9] bg-secondary overflow-hidden focu
1s-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-blue`,children:(0,b.jsx)(`img`,{src:e.cover,alt:n(e.title),loading:`lazy`,draggable:!1,className:`size-full object-cover group-hover:scale-105 transition-transform duration-500`})}),(0,b.jsxs)(`div`,{className:`p-6 flex flex-col flex-1`,children:[(0,b.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-semibold`,children:[(0,b.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-brand-blue/10 px-3 py-1 text-brand-blue`,children:[(0,b.jsx)(d,{className:`size-3.5`}),n(e.category)]}),(0,b.jsx)(`span`,{className:`text-muted-foreground font-medium`,children:F(e.date)})]}),(0,b.jsx)(`h2`,{className:`mt-3 text-base font-semibold leading-snug`,children:(0,b.jsx)(r,{to:`/blog-posts/$slug`,params:{slug:e.slug},className:`hover:text-brand-blue transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-blue rounded`,children:n(e.title)})}),(0,b.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground line-clamp-3 select-text flex-1`,children:n(e.summary)}),(0,b.jsxs)(r,{to:`/blog-posts/$slug`,params:{slug:e.slug},"aria-label":`${C.read} — ${n(e.title)}`,className:`mt-5 w-full min-h-[44px] inline-flex items-center justify-center gap-1.5 rounded-full border border-brand-blue/30 bg-brand-blue/5 px-4 py-2.5 text-sm font-semibold text-brand-blue transition-all hover:bg-brand-blue hover:text-white hover:border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-blue focus-visible:ring-offset-2`,children:[C.read,` `,(0,b.jsx)(u,{className:`size-4`})]})]})]},e.slug))}),j>1&&(0,b.jsxs)(`nav`,{"aria-label":`Pagination`,className:`mt-14 flex items-center justify-center gap-2`,children:[(0,b.jsx)(`button`,{onClick:()=>P({page:M-1}),disabled:M<=1,"aria-label":C.prev,className:`inline-flex items-center justify-center rounded-full border border-border bg-white size-10 min-h-[44px] text-foreground hover:bg-secondary disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:(0,b.jsx)(v,{className:`size-5`})}),(0,b.jsxs)(`span`,{className:`px-4 text-sm font-medium text-muted-foreground`,children:[C.page,` `,(0,b.jsx)(`span`,{className:`text-foreground font-semibold`,children:M}),` `,C.of,` `,j]}),(0,b.jsx)(`button`,{onClick:()=>P({page:M+1}),disabled:M>=j,"aria-label":C.next,className:`inline-flex items-center justify-center rounded-full border border-border bg-white size-10 min-h-[44px] text-foreground hover:bg-secondary disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:(0,b.jsx)(f,{className:`size-5`})})]})]})]})})]})}export{C 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.