PageSourceSearch

https://churchapps.org/_next/static/chunks/app/%5BsdSlug%5D/mobile/donate/print/page-d3a65b6c81330685.js

js churchapps.org collected 2026-10-01 13:04:41 UTC 10,532 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7664],{31536:(e,t,r)=>{Promise.resolve().then(r.bind(r,92219))},92219:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var i=r(95155),n=r(12115),s=r(82034),d=r(62044),a=r(37586),l=r(106),o=r(82222),c=r(69205);async function p(e){if(!e)return{};c.y.init();let t=c.y.Common.MembershipApi?.replace(/\/+$/,"");if(!t)return{};try{let r,i=await fetch(`${t}/churches/lookup/?subDomain=${encodeURIComponent(e)}`,{next:{revalidate:3600}});if(!i.ok)return{};let n=await i.json();if(!n?.id)return{churchName:n?.name};let s=await fetch(`${t}/settings/public/${n.id}`,{next:{revalidate:60}});if(!s.ok)return{churchId:n.id,churchName:n.name};let d=await s.json();try{if(d?.appTheme){let e="string"==typeof d.appTheme?JSON.parse(d.appTheme):d.appTheme;r=e?.light?.primary}}catch{}return{churchId:n.id,churchName:n.name,primaryColor:r||d?.primaryColor,favicon:d?.favicon_400x400||d?.favicon_16x16,pwaShortName:d?.pwaShortName,region:d?.region}}catch{return{}}}function h({params:e}){let t,r,c,x,u,g,f=(0,o.useRouter)(),[m,y]=(0,n.useState)(""),[b,j]=(0,n.useState)("#1565C0"),v=new Date().getFullYear();"1"===(0,o.useSearchParams)().get("prev")&&(v-=1);let w=(0,n.useContext)(s.A);(0,n.useEffect)(()=>{e.then(({sdSlug:e})=>y(e))},[e]),(0,n.useEffect)(()=>{m&&p(m).then(e=>{e?.primaryColor&&j(e.primaryColor)})},[m]);
1let[C,A]=(0,n.useState)([]),[T,D]=(0,n.useState)([]),[S,R]=(0,n.useState)([]),[I,L]=(0,n.useState)("usd"),[B,E]=(0,n.useState)({}),[O,N]=(0,n.useState)({}),k=async()=>{let e=[a.tH.get("/funds","GivingApi").then(e=>{A(e)}),a.tH.get("/fundDonations/my","GivingApi").then(e=>{D(e)}),a.tH.get("/gateways","GivingApi").then(e=>{Array.isArray(e)&&e[0]?.currency&&L(e[0].currency)}),a.tH.get("/donations/exchange-rates","GivingApi").then(e=>{N(e?.rates||{})}).catch(()=>{}),a.tH.get("/donations/my","GivingApi").then(e=>{let t=[];e.forEach(e=>{l.rV.toDate(e.donationDate).getFullYear()===v&&t.push(e)}),R(t)})];await Promise.allSettled(e),setTimeout(()=>{window.print(),window.history.length>1?f.back():window.close()},300)},G=(e,t)=>l.iT.convertAmount(e,t?.currency||I,I,O),W=()=>{let e=0;return T.forEach(t=>{let r=l.s2.getOne(S,"id",t.donationId);r&&(e+=G(t.amount||0,r))}),l.iT.formatCurrencyWithLocale(e,I)},$=w?.userChurch?.church?.id;return(0,n.useEffect)(()=>{$&&a.tH.get("/settings/public/"+$,"MembershipApi").then(e=>{E(e||{})})},[$]),(0,n.useEffect)(()=>{w?.user&&k()},[w?.user]),(0,i.jsx)(d.AuthGuard,{sdSlug:m,children:(0,i.jsxs)("div",{style:{margin:"0px",padding:"0px",height:"100%",width:"100%",backgroundColor:"white",fontFamily:"Roboto, sans-serif","--print-accent":b},children:[(0,i.jsx)("div",{style:{margin:"0px",padding:"0px",borderTop:"24px solid var(--print-accent)",width:"100%"}}),(0,i.jsxs)("div",{style:{margin:"0px",padding:"0px",width:"100%"},children:[(0,i.jsxs)("h1",{children:[v," Annual Giving Statement"]}),(0,i.jsxs)("p",{children:["Period: Jan 1 - Dec 31, ",v]}),(0,i.jsxs)("p",{children:["Issued: ",(t=l.rV.prettyDate(new Date),r=l.rV.prettyTime(new Date),`${t} ${r}`)]})]}),(0,i.jsx)("div",{style:{margin:"0px",padding:"0px",borderTop:"2px solid var(--print-accent)",width:"80%"}}),(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsxs)("div",{style:{width:"50%"},children:[(0,i.jsx)("h1",{children:w?.person?.name?.display}),(0,i.jsx)("p",{children:w?.person?.contactInfo?.address1}),(0,i.jsx)("p",{children:w?.person?.contactInfo?.address2}),(0,i.jsx)("p",{children:w?.person?.contactInfo?.mobilePhone}),(0,i.jsx)("p",{children:w?.person?.contactInfo?.email})]}),(0,i.jsxs)("div",{style:{width:"50%"},children:[(0,i.jsx)("h1",{children:w?.userChurch?.church?.name}),(0,i.jsx)("p",{children:w?.userChurch?.church?.address1}),(0,i.jsx)("p",{children:w?.userChurch?.church?.address2}),(0,i.jsxs)("p",{children:[w?.userChurch?.church?.city,", ",w?.userChurch?.church?.country,", ",w?.userChurch?.church?.zip]})]})]}),(0,i.jsx)("div",{style:{margin:"0px",padding:"0px",borderTop:"2px solid var(--print-accent)",width:"80%"}}),(()=>{let e=B.statementFormat;if(!e)return null;let t=0,r=0;T.forEach(e=>{let i=l.s2.getOne(S,"id",e.donationId);if(!i)return;let n=l.s2.getOne(C,"id",e.fundId),s=G(e.amount||0,i);n?.taxDeductible===!1?r+=s:t+=s});let n=w?.userChurch?.church,s=B.statementOrgAddress||[n?.address1,n?.address2,n?.city,n?.country,n?.zip].filter(Boolean).join(", "),d=w?.person?.contactInfo,a=[d?.address1,d?.address2,d?.city,d?.state,d?.zip].filter(Boolean).join(", ");return(0,i.jsxs)("div",{"data-testid":"statement-legal-block",style:{border:"2px solid var(--print-accent)",padding:"16px",margin:"16px 0"},children:[(0,i.jsx)("h2",{style:{marginTop:0},children:"canada"===e?"Official Receipt for Income Tax Purposes":"australia"===e?"Receipt for Donation":"Donation Receipt"}),(0,i.jsxs)("p",{children:["Receipt number: ",v,"-",w?.person?.id]}),(0,i.jsxs)("p",{children:["australia"===e?"ABN":"Charity registration number",": ",B.statementRegistrationNumber]}),(0,i.jsxs)("p",{children:["Date issued: ",l.rV.prettyDate(new Date).toString()]}),"canada"===e&&(0,i.jsxs)("p",{children:["Place of issue: ",B.statementCityOfIssue]}),(0,i.jsxs)("p",{children:[n?.name,s?", "+s:""]}),(0,i.jsxs)("p",{children:[w?.person?.name?.display,a?", "+a:""]}),"australia"===e&&(0,i.jsxs)("p",{children:[n?.name," is endorsed as a Deductible Gift Recipient. Donations of $2 or more are tax deductible."]}),"newZealand"===e&&(0,i.jsx)("p",{children:"Donation"}),(0,i.jsxs)("p",{style:{fontWeight:"bold"},children:["Eligible amount of gift for income tax purposes: ",l.iT.formatCurrencyWithLocale(t,I)]}),r>0&&(0,i.jsxs)("p",{children:["Gifts not eligible for a tax receipt: ",l.iT.formatCurrencyWithLocale(r,I)]}),"australia"!==e&&(0,i.jsxs)("p",{style:{borderTop:"1px solid #333",width:"260px",paddingTop:"4px"},children:[B.statementSignatory," — Authorized signature"]}),"canada"===e&&(0,i.jsx)("p",{children:"Canada Revenue Agency: canada.ca/charities-giving"})]})})(),(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{children:"Statement Summary:"}),(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsxs)("div",{style:{width:"50%"},children:[(0,i.jsx)("h2",{children:"Total Contributions:"}),(0,i.jsx)("div",{style:{height:"80px",lineHeight:"80px",width:"80%",textAlign:"center",border:"4px solid var(--print-accent)",fontSize:"40px"},children:W()})]}),(0,i.jsxs)("div",{style:{width:"50%"},children:[(0,i.jsx)("h2",{children:"Funds:"}),(0,i.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,i.jsx)("thead",{style:{height:"24px"},children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{style:{borderBottom:"2px s
1olid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"70%",paddingLeft:"5px"},children:"Fund"}),(0,i.jsx)("th",{style:{borderBottom:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"right",width:"30%",paddingRight:"5px"},children:"Amount"})]})}),(0,i.jsx)("tbody",{children:(c=[],T.forEach(e=>{let t=l.s2.getOne(C,"id",e.fundId),r=l.s2.getOne(S,"id",e.donationId);r&&c.push({fund:t?.name||"",amount:G(e.amount||0,r)})}),x=[],c.forEach(e=>{let t=l.s2.getOne(x,"fund",e.fund);t?t.total+=e.amount:x.push({fund:e.fund,total:e.amount})}),u=[],x.forEach(e=>{u.push((0,i.jsxs)("tr",{style:{height:"24px"},children:[(0,i.jsx)("td",{style:{borderBottom:"2px solid var(--print-accent)",borderRight:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"70%",paddingLeft:"5px"},children:e.fund}),(0,i.jsx)("td",{style:{borderBottom:"2px solid var(--print-accent)",borderLeft:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"right",width:"30%",paddingRight:"5px"},children:l.iT.formatCurrencyWithLocale(e.total,I)})]},e.fund))}),u)})]})]})]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{children:"Contribution Details:"}),(0,i.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,i.jsx)("thead",{style:{height:"28px"},children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{style:{borderBottom:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"15%",paddingLeft:"5px"},children:"Date"}),(0,i.jsx)("th",{style:{borderBottom:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"15%",paddingLeft:"5px"},children:"Method"}),(0,i.jsx)("th",{style:{borderBottom:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"50%",paddingLeft:"5px"},children:"Fund"}),(0,i.jsx)("th",{style:{borderBottom:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"right",width:"20%",paddingRight:"5px"},children:"Amount"})]})}),(0,i.jsxs)("tbody",{children:[(g=[],T.forEach(e=>{let t=l.s2.getOne(S,"id",e.donationId),r=l.s2.getOne(C,"id",e.fundId);t&&g.push((0,i.jsxs)("tr",{style:{height:"28px"},children:[(0,i.jsx)("td",{style:{borderBottom:"2px solid var(--print-accent)",borderRight:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"20%",paddingLeft:"5px"},children:l.rV.prettyDate(t?.donationDate).toString()}),(0,i.jsx)("td",{style:{borderBottom:"2px solid var(--print-accent)",borderRight:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"15%",paddingLeft:"5px"},children:t?.method}),(0,i.jsx)("td",{style:{borderBottom:"2px solid var(--print-accent)",borderRight:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"45%",paddingLeft:"5px"},children:r?.name}),(0,i.jsx)("td",{style:{borderBottom:"2px solid var(--print-accent)",borderLeft:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"right",width:"20%",paddingRight:"5px"},children:l.iT.formatCurrencyWithLocale(e.amount||0,t?.currency||I)})]},e.id||e.donationId))}),g),(0,i.jsxs)("tr",{style:{height:"28px"},children:[(0,i.jsx)("td",{style:{borderTop:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"15%",paddingLeft:"5px"}}),(0,i.jsx)("td",{style:{borderTop:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"left",width:"15%",paddingLeft:"5px"}}),(0,i.jsx)("td",{style:{borderTop:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"right",width:"50%",paddingRight:"5px",fontWeight:"bold"},children:"Total Contributions:"}),(0,i.jsx)("td",{style:{borderTop:"2px solid var(--print-accent)",borderCollapse:"collapse",textAlign:"right",width:"20%",paddingRight:"5px",fontWeight:"bold"},children:W()})]})]})]})]})]})})}}},e=>{e.O(0,[8754,4121,2076,7358],()=>e(e.s=31536)),_N_E=e.O()}]);

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.