1import{f as E,r as i,a9 as k,j as e,o as j,bK as h,k as F,h as $,Y,L as f}from"./index-DUpygkxg.js";import{P as A,a as P}from"./PublicFooter-DwTwHaFk.js";import{f as l}from"./formatters-QZX43yAa.js";import{H as R}from"./firebase-eOymXQZD.js";import{u as S}from"./useEmbedMode-92wb7Dgi.js";import{T as B}from"./trending-down-7nfBUd_6.js";import{A as L}from"./activity-BquJOpHu.js";import{R as y,T as N,C as D,X as K,Y as I}from"./CartesianChart-DvcN2kyc.js";import{P as M,a as O}from"./PieChart-CZ6WabHj.js";import{C as H}from"./tooltipContext-Bz8gGe_N.js";import{B as z,a as v}from"./BarChart-DHwxt_0D.js";import{L as G}from"./Legend-Cq_Zep5W.js";import{H as U}from"./heart-Ci4mEWdb.js";import"./map-pin-ymTilxsA.js";async function X(r){return(await R(E,"getPublicTransparency")({fiscalYear:r})).data}const d=["#059669","#0EA5E9","#8B5CF6","#F59E0B","#EF4444","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"];function w(){const r=new Date;return r.getMonth()<3?r.getFullYear()-1:r.getFullYear()}function ie(){const r=S(),[n,b]=i.useState(w()),[t,T]=i.useState(null),[c,u]=i.useState(!0),[g,p]=i.useState(null);i.useEffect(()=>{window.scrollTo(0,0),document.title=`財åå
¬é | ${k.nameShort}`},[]),i.useEffect(()=>{let s=!1;return u(!0),p(null),X(n).then(a=>{s||T(a)}).catch(a=>{s||p(a instanceof Error?a.message:"ãã¼ã¿ã®åå¾ã«å¤±æãã¾ãã")}).finally(()=>{s||u(!1)}),()=>{s=!0}},[n]);const C=t?.availableYears?.length?t.availableYears:[w()],o=i.useMemo(()=>t?t.revenues.map(s=>({name:s.account,value:s.amount})):[],[t]),m=i.useMemo(()=>{if(!t)return[];const s={};return t.projectExpenses.forEach(a=>{s[a.account]=s[a.account]||{project:0,admin:0},s[a.account].project+=a.amount}),t.adminExpenses.forEach(a=>{s[a.account]=s[a.account]||{project:0,admin:0},s[a.account].admin+=a.amount}),Object.entries(s).map(([a,x])=>({account:a,äºæ¥è²»:x.project,管çè²»:x.admin})).sort((a,x)=>x.äºæ¥è²»+x.管çè²»-(a.äºæ¥è²»+a.管çè²»))},[t]);return e.jsxs("div",{className:r?"bg-transparent":"min-h-screen bg-white",children:[!r&&e.jsx(A,{}),!r&&e.jsxs("section",{className:"relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-50 via-white to-sky-50"}),e.jsxs("div",{className:"relative max-w-5xl mx-auto px-4 py-14 md:py-20 animate-page-enter",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/70 border border-emerald-100 text-xs text-emerald-700 font-medium mb-5 shadow-sm",children:[e.jsx(j,{className:"w-3.5 h-3.5"}),"TRANSPARENCY"]}),e.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-gray-900 mb-4 leading-tight",children:"éææ§ã¸ã®åãçµã¿"}),e.jsx("p",{className:"text-base md:text-lg text-gray-600 max-w-3xl leading-relaxed",children:"ããã ããå¯ä»ã»ä¼è²»ã»å©æéããã©ã®ããã«ä½¿ããã¦ããããå
¬éãã¦ãã¾ãã çãã¾ã®ãæ¯æ´ãä¿¡é ¼ã«å¿ããå½¢ã§æ´»ç¨ããããã年度ãã¨ã®åæ¯ãè¦ããåãã¦ãã¾ãã"})]})]}),e.jsx("section",{className:"py-6 bg-white border-b border-gray-100 sticky top-16 z-30",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"ä¼è¨å¹´åº¦"}),e.jsx("div",{className:"text-xl font-bold text-gray-900",children:h(n)}),e.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[n,"å¹´4æ ~ ",n+1,"å¹´3æ"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm text-gray-600",children:"表示年度:"}),e.jsx("select",{value:n,onChange:s=>b(Number(s.target.value)),className:"border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500 outline-none",children:C.map(s=>e.jsx("option",{value:s,children:h(s)},s))})]})]})}),c&&e.jsx("div",{className:"max-w-5xl mx-auto px-4 py-20 text-center",children:e.jsxs("div",{className:"inline-flex items-center gap-3 text-gray-500",children:[e.jsx("div",{className:"w-5 h-5 border-2 border-emerald-200 border-t-emerald-600 rounded-full animate-spin"}),"財åãã¼ã¿ãèªã¿è¾¼ã¿ä¸..."]})}),g&&!c&&e.jsx("div",{className:"max-w-5xl mx-auto px-4 py-20",children:e.jsxs("div",{className:"p-6 bg-red-50 border border-red-200 rounded-2xl flex items-start gap-3",children:[e.jsx(F,{className:"w-5 h-5 text-red-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-red-800 mb
1-1",children:"ãã¼ã¿ã®åå¾ã«å¤±æãã¾ãã"}),e.jsx("p",{className:"text-sm text-red-700",children:g})]})]})}),t&&!c&&e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"py-10 bg-white",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4",children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[{label:"ç·åå
¥",value:l(t.revenueTotal),icon:$,color:"text-emerald-700",bg:"bg-emerald-50"},{label:"ç·æ¯åº",value:l(t.expenseTotal),icon:B,color:"text-rose-700",bg:"bg-rose-50"},{label:"æ¯æ´è
æ°",value:`${t.supporterCount}å`,sub:`ä¼å¡${t.memberCount} / å¯ä»è
${t.donorCount}`,icon:Y,color:"text-sky-700",bg:"bg-sky-50"},{label:"æ´»å宿½æ°",value:`${t.activityCount}ä»¶`,icon:L,color:"text-violet-700",bg:"bg-violet-50"}].map((s,a)=>{const x=s.icon;return e.jsxs("div",{className:`p-5 rounded-2xl ${s.bg} border border-gray-100 animate-card-up`,style:{"--delay":`${a*80}ms`},children:[e.jsx(x,{className:`w-5 h-5 ${s.color} mb-2`}),e.jsx("div",{className:"text-xs text-gray-600 mb-1",children:s.label}),e.jsx("div",{className:`text-2xl font-bold ${s.color} leading-none`,children:s.value}),s.sub&&e.jsx("div",{className:"text-xs text-gray-500 mt-2",children:s.sub})]},s.label)})}),e.jsxs("div",{className:"mt-6 p-5 rounded-2xl bg-gradient-to-br from-gray-50 to-emerald-50 border border-gray-100 flex flex-col md:flex-row md:items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"彿æ£å³è²¡ç£å¢æ¸é¡"}),e.jsxs("div",{className:`text-3xl font-bold ${t.netResult>=0?"text-emerald-700":"text-rose-700"}`,children:[t.netResult>=0?"+":"",l(t.netResult)]})]}),e.jsxs("div",{className:"text-xs text-gray-500 max-w-sm md:text-right",children:["åå
¥ããæ¯åºãå·®ãå¼ããé¡ã§ãã",e.jsx("br",{}),"ãã©ã¹ã¯äºæ¥ãéãã¦è²¯èãã§ããããã¤ãã¹ã¯è²¯èãåãå´©ãã年度ãæå³ãã¾ãã"]})]})]})}),t.revenueTotal===0&&t.expenseTotal===0?e.jsx("section",{className:"py-10 bg-gray-50",children:e.jsx("div",{className:"max-w-5xl mx-auto px-4",children:e.jsxs("div",{className:"p-8 bg-white rounded-2xl border border-gray-100 text-center text-gray-500",children:[h(n)," ã®è²¡åãã¼ã¿ã¯ã¾ã å
¬éããã¦ãã¾ããã"]})})}):e.jsx(e.Fragment,{children:e.jsx("section",{className:"py-10 bg-gray-50",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-6 border border-gray-100 animate-card-up",children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-1",children:"åå
¥ã®å
訳"}),e.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"åå®ç§ç®å¥"}),o.length===0?e.jsx("div",{className:"h-64 flex items-center justify-center text-sm text-gray-400",children:"åå
¥ãã¼ã¿ã¯ããã¾ãã"}):e.jsx(y,{width:"100%",height:280,children:e.jsxs(M,{children:[e.jsx(O,{data:o,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:90,label:({name:s,percent:a})=>`${s} ${(a*100).toFixed(0)}%`,children:o.map((s,a)=>e.jsx(H,{fill:d[a%d.length]},a))}),e.jsx(N,{formatter:s=>l(Number(s)||0)})]})}),e.jsxs("div",{className:"mt-4 space-y-1",children:[t.revenues.map((s,a)=>e.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded",style:{backgroundColor:d[a%d.length]}}),e.jsx("span",{className:"text-gray-700",children:s.account})]}),e.jsx("span",{className:"text-gray-900 font-medium",children:l(s.amount)})]},s.account)),e.jsxs("div",{className:"pt-2 mt-2 border-t border-gray-100 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-semibold text-gray-700",children:"åè¨"}),e.jsx("span",{className:"text-sm font-bold text-emerald-700",children:l(t.revenueTotal)})]})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-6 border border-gray-100 animate-card-up",style:{"--delay":"100ms"},children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-1",children:"æ¯åºã®å
訳"}),e.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"äºæ¥è²»ã¨ç®¡çè²»"}),e.jsxs("div",{className:"space-y-4 mb-4",children:[e.jsxs("div",{className:"p-4 rounded-xl bg-emerald-50 border border-emerald-100",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-xs font-medium text-emerald-900",children:"äºæ¥è²»"}),e.jsx("span",{className:"text-xs text-emerald-700",children:t.expenseTotal>0?`${(t.projectExpenseTotal/t.expenseTotal*100).toFixed(0)}%`:"-"})]}),e.jsx("div",{className:"text-2xl font-bold text-emerald-800",children:l(t.projectExpenseTotal)}),e.jsx("div",{className:"text-xs text-emerald-700 mt-1",children:"äºæ¥ã®ç´æ¥çãªæ´»åã«ããã£ãè²»ç¨"})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-sky-50 border border-sky-100",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-xs font-medium text-sky-900",children:"管çè²»"}),e.jsx("span",{className:"text-xs text-sky-700",children:t.expenseTotal>0?`${(t.adminExpenseTotal/t.expenseTotal*100).toFixed(0)}%`:"-"})]}),e.jsx("div",{className:"text-2xl font-bold text-sky-800",children:l(t.adminExpenseTotal)}),e.jsx("div",{className:"text-xs text-sky-700 mt-1",children:"å£ä½éå¶ã®ããã®ç®¡ççãªè²»ç¨"})]})]})]})]}),m.length>0&&e.jsxs("div",{className:"mt-6 bg-white rounded-2xl p-6 border border-gray-100 animate-card-up",children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-1",children:"åå®ç§ç®å¥ã®æ¯åº"}),e.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"éé¡ã®å¤§ããé "}),e.jsx(y,{width:"100%",height:Math.max(280,m.length*40),children:e.jsxs(z,{data:m,layout:"vertical",margin:{left:40},children:[e.jsx(D,{strokeDasharray:"3 3"}),e.jsx(K,{type:"number",tickFormatter:s=>`${(s/1e3).toFixed(0)}k`}),e.jsx(I,{dataKey:"account",type:"category",width:100,tick:{fontSize:12}}),e.jsx(N,{formatter:s=>l(Number(s)||0)}),e.jsx(G,{}),e.jsx(v,{dataKey:"äºæ¥è²»",stackId:"a",fill:"#059669"}),e.jsx(v,{dataKey:"管çè²»",stackId:"a",fill:"#0EA5E9"})]})})]})]})})})]}),e.jsx("section",{className:"py-12 bg-white",children:e.jsx("div",{className:"max-w-3xl mx-auto px-4",children:e.jsxs("div",{className:"p-6 rounded-2xl bg-gray-50 border border-gray-100 flex items-start gap-3",children:[e.jsx(j,{className:"w-5 h-5 text-gray-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-sm text-gray-600 leading-relaxed",children:[e.jsx("p",{className:"font-semibold text-gray-700 mb-1",children:"ãã©ã¤ãã·ã¼ã«ã¤ãã¦"}),"ãã®ãã¼ã¸ã§ã¯åå®ç§ç®ãã¨ã®éè¨éé¡ã®ã¿ãå
¬éãã¦ãã¾ãã åå¥ã®åå¼æç´°ã»æ¯æ´è
åã»åçè
æ
å ±ã¯å«ã¾ãã¾ããã æ£ç¢ºãªè²¡å諸表ã»äºæ¥å ±åæ¸ã¯æ¯å¹´ã®ç·ä¼è³æã¨ãã¦å¥éçºè¡ãã¦ãã¾ãã"]})]})})}),e.jsx("section",{className:"py-12 bg-gradient-to-b from-white to-emerald-50",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4 text-center",children:[e.jsx(U,{className:"w-10 h-10 text-emerald-600 mx-auto mb-3"}),e.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-gray-900 mb-3",children:"æ´»åãå¿æ´ãã"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"éæãªéå¶ãç¶ããããã«ãçã
1ã¾ã®ãæ¯æ´ãåã«ãªãã¾ãã"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(f,{to:"/donate",className:"inline-flex items-center justify-center gap-2 px-6 py-3 rounded-xl bg-emerald-600 hover:bg-emerald-500 text-white font-semibold shadow-sm transition-colors",children:"å¯ä»ãã"}),e.jsx(f,{to:"/membership/apply",className:"inline-flex items-center justify-center gap-2 px-6 py-3 rounded-xl bg-white hover:bg-gray-50 text-emerald-700 font-semibold shadow-sm border border-emerald-200 transition-colors",children:"ä¼å¡ã«ãªã"})]})]})}),!r&&e.jsx(P,{})]})}export{ie as default};
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.