PageSourceSearch

https://monopro.ai/assets/Insights-DNclab1i.js

js monopro.ai collected 2026-10-05 12:20:56 UTC 5,784 bytes, 1 lines download raw bytes

1import{r as c,b as v,j as e,P as B,A as w,h as M}from"./index-DGfu4eos.js";import{a as N,B as k}from"./blog-CAWQbsm2.js";import{S as p}from"./search-BkUJu4-H.js";import"./arrow-up-right-C0XWoBfZ.js";const x={success:"You’re on the list.",successBody:"The Monopro Brief will arrive about once a month.",existing:"You’re already subscribed. We kept your place on the list.",error:"Enter a valid work email and try again.",consent:"By subscribing, you agree to receive the Monopro Brief. You can unsubscribe at any time."},S={en:x,ko:{success:"구독이 완료되었습니다.",successBody:"한 달에 한 번 정도 모노프로 브리프를 보내드립니다.",existing:"이미 구독 중입니다. 기존 구독 상태를 유지했습니다.",error:"유효한 업무용 이메일을 입력해 주세요.",consent:"구독하면 모노프로 브리프 수신에 동의하게 됩니다. 언제든 구독을 취소할 수 있습니다."},ja:{success:"購読を受け付けました。",successBody:"月に一度程度、Monopro Briefをお送りします。",existing:"すでに購読されています。登録状態を維持しました。",error:"有効な法人メールをご入力ください。",consent:"購読するとMonopro Briefの受信に同意したことになります。いつでも解除できます。"},"zh-TW":{success:"訂閱完成。",successBody:"Monopro Brief 約每月寄送一次。",existing:"此信箱已訂閱,我們已保留您的訂閱狀態。",error:"請輸入有效的工作信箱。",consent:"訂閱即表示同意接收 Monopro Brief,您可隨時取消。"},de:{success:"Sie sind eingetragen.",successBody:"Der Monopro Brief erscheint ungefähr einmal im Monat.",existing:"Sie sind bereits angemeldet.",error:"Geben Sie eine gültige geschäftliche E-Mail ein.",consent:"Mit der Anmeldung stimmen Sie dem Monopro Brief zu. Eine Abmeldung ist jederzeit möglich."},th:{success:"สมัครรับข่าวสารแล้ว",successBody:"เราจะส่ง Monopro Brief ประมาณเดือนละครั้ง",existing:"อีเมลนี้สมัครอยู่แล้ว",error:"กรอกอีเมลงานที่ถูกต้อง",consent:"การสมัครหมายถึงยินยอมรับ Monopro Brief และยกเลิกได้ทุกเมื่อ"},vi:{success:"Bạn đã đăng ký.",successBody:"Monopro Brief sẽ được gửi khoảng một lần mỗi tháng.",existing:"Email này đã đăng ký. Chúng tôi giữ nguyên trạng thái của bạn.",error:"Hãy nhập email công việc hợp lệ.",consent:"Khi đăng ký, bạn đồng ý nhận Monopro Brief và có thể hủy bất cứ lúc nào."}};function C(n="en"){const d=n.startsWith("zh")?"zh-TW":n.split("-")[0];return S[d]??x}function L(){const[n,d]=c.useState(""),[r,y]=c.useState("all"),[g,j]=c.useState(""),[t,a]=c.useState("idle"),{t:i,i18n:l}=v(),u=c.useMemo(()=>N(l.resolvedLanguage).filter(s=>(r==="all"||r==="cases")&&`${s.title} ${s.category} ${s.excerpt}`.toLowerCase().includes(n.toLowerCase())),[r,n,l.resolvedLanguage]),o=C(l.resolvedLanguage),b=async s=>{var h;s.preventDefault(),a("sending");try{const m=await fetch("/api/newsletter/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:g,locale:l.resolvedLanguage,market:(h=M())==null?void 0:h.code})}),f=await m.json();if(!m.ok)throw new Error("subscribe_failed");a(f.existing?"existing":"success")}catch{a("error")}};return e.jsxs(e.Fragment,{children:[e.jsx(B,{title:i("insights.metaTitle"),description:i("insights.body")}),e.jsx("section",{className:"insights-hero",children:e.jsxs("div",{className:"container insights-hero__inner",children:[e.jsxs("div",{children:[e.jsx("div",{className:"eyebrow eyebrow--small eyebrow--light",children:i("insights.kicker")}),e.jsx("h1",{children:i("insights.title")}),e.jsx("p",{children:i("insights.body")})]}),e.jsxs("div",{className:"insights-hero__mark",children:[e.jsx("span",{children:"AI"}),e.jsx("i",{children:i("insights.fieldNotes")})]})]})}),e.jsx("section",{className:"insights-page",children:e.jsxs("div",{className:"container",children:[e.jsxs("div",{className:"insights-toolbar",children:[e.jsx("div",{children:[["all",i("insights.all")],["cases",i("insights.cases")]].map(([s,h])=>e.jsx("button",{className:r===s?"active":"","aria-pressed":r===s,type:"button",onClick:()=>y(s),children:h},s))}),e.jsxs("label",{children:[e.jsx(p,{size:18}),e.jsx("input",{value:n,onChange:s=>d(s.target.value),placeholder:i("insights.search")})]})]}),u.length>0?e.jsx("div",{className:"blog-grid blog-grid--insights",children:u.map(s=>e.jsx(k,{post:s},s.slug))}):e.jsxs("div",{className:"empty-state",children:[e.jsx(p,{}),e.jsx("h2",{children:i("insights.emptyTitle")}),e.jsx("p",{children:i("insights.emptyBody")})]}),e.jsxs("div",{className:"newsletter",children:[e.jsxs("div",{children:[e.jsx("span",{children:i("insights.brief")}),e.jsx("h2",{children:i("insights.newsletter")}),e.jsx("p",{children:i("insights.newsletterBody")})]}),e.jsxs("form",{onSubmit:s=>void b(s),children:[e.jsxs("div",{children:[e.jsx("input",{required:!0,type:"email",value:g,onChange:s=>{j(s.target.value),a("idle")},placeholder:i("insights.email"),"aria-label":i("insights.email")}),e.jsx("small",{children:o.consent})]}),e.jsxs("button",{className:"button button--primary",type:"submit",disabled:t==="sending",children:[t==="sending"?"…":i("insights.subscribe")," ",e.jsx(w,{size:17})]}),t!=="idle"&&t!=="sending"&&e.jsx("p",{className:`newsletter__status newsletter__status--${t}`,role:"status",children:t==="success"?`${o.success} ${o.successBody}`:t==="existing"?o.existing:o.error})]})]})]})})]})}export{L as Insights};

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.