PageSourceSearch

https://www.charitywater.org/vite/assets/CampaignTemplateLeaderboard-BFVxFq3a.js

js charitywater.org collected 2026-10-01 07:19:22 UTC 5,711 bytes, 2 lines download raw bytes

1import{aP as e,aq as m}from"./store-hHMBOSZG.js";import{c as i}from"./index-DKrd6d1c.js";import{L as p}from"./loading-CeufUnn4.js";import{p as g}from"./person-Cl4h7IM3.js";import{o as h,u as v,a as x}from"./application-BzAvrEXI.js";const j="data:image/svg+xml,%3csvg%20fill='none'%20height='26'%20viewBox='0%200%2026%2026'%20width='26'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cclipPath%20id='a'%3e%3cpath%20d='m.535034.46875h25v25h-25z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23a)'%20stroke='%231a1a1a'%20stroke-linecap='round'%3e%3cpath%20d='m13.0292%2024.7358c6.502%200%2011.7729-5.2709%2011.7729-11.7729%200-6.50197-5.2709-11.77288-11.7729-11.77288s-11.77291%205.27091-11.77291%2011.77288c0%206.502%205.27091%2011.7729%2011.77291%2011.7729z'%20fill='%23ffc907'%20stroke-miterlimit='10'%20stroke-width='1.25'/%3e%3cpath%20d='m15.2861%2017.8024.3606%201.4658-1.7915.4421-.3606-1.4658c-1.745.2675-3.141-.0349-4.28111-.698l.94231-2.443c.9656.5816%202.315.9306%203.7925.5584.9539-.2327%201.4308-.7911%201.3029-1.303-.1513-.6165-.9074-.6747-2.1056-.6398-1.8614.0931-4.45561.2559-5.09544-2.2918-.40717-1.62863.4886-3.37363%202.69894-4.19959l-.3839-1.51233%201.7915-.44207.3839%201.5356c1.3262-.16287%202.5942.05816%203.6994.60493l-1.0237%202.36156c-1.0819-.51186-2.3616-.59329-3.3039-.36063-.9423.23267-1.1866.68633-1.0586%201.15173.1396.5584.8492.5933%202.094.5235%201.8613-.0698%204.4439-.1629%205.0488%202.2685.477%201.9311-.4537%203.5947-2.7105%204.4439z'%20fill='%23fff'%20stroke-linejoin='round'%20stroke-width='.8'/%3e%3c/g%3e%3c/svg%3e",f="data:image/svg+xml,%3csvg%20fill='none'%20height='15'%20viewBox='0%200%2025%2015'%20width='25'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m1.00024%206.62305c-.55228%200-.99999576.44771-.99999586%201-.0000001.55228.44771486%201%20.99999586%201zm23.64716%201.70711c.3905-.39053.3905-1.02369%200-1.41422l-6.364-6.363958c-.3905-.390524-1.0237-.390524-1.4142%200s-.3905%201.023688%200%201.414218l5.6568%205.65685-5.6568%205.65685c-.3905.3905-.3905%201.0237%200%201.4142s1.0237.3905%201.4142%200zm-23.64716.29289h22.93996v-2h-22.93996z'%20fill='%23222520'/%3e%3c/svg%3e",u="data:image/svg+xml,%3csvg%20fill='none'%20height='15'%20viewBox='0%200%2025%2015'%20width='25'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m23.9998%208.62305c.5522%200%201-.44772%201-1%200-.55229-.4478-1-1-1zm-23.647152-1.70711c-.3905242.39053-.3905241%201.02369%200%201.41422l6.363962%206.36394c.39052.3905%201.02369.3905%201.41421%200%20.39053-.3905.39053-1.0237%200-1.4142l-5.65685-5.65685%205.65685-5.65686c.39053-.39052.39053-1.023685%200-1.41421-.39052-.390524-1.02369-.390524-1.41421.000001zm23.647152-.29289h-22.94004v2h22.94004z'%20fill='%23222520'/%3e%3c/svg%3e",S=h(({slug:t})=>{const a=v(()=>({campaigns:[],loading:!1,page:1,topCampaign:null,totalPages:null}));x.useEffect(()=>l(),[]);const r=()=>{a.page-=1,l()},d=()=>{a.page+=1,l()},o=()=>a.totalPages>1,c=()=>a.page===1,n=()=>a.page===a.totalPages,l=()=>{a.loading=!0,$.get(`/api/v1/campaign_templates/leaderboard?slug=${t}&page=${a.page}`,s=>{s&&(a.campaigns=s.data,a.topCampaign===null&&(a.topCampaign=s.topCampaign),a.totalPages===null&&(a.totalPages=s.totalPages)),a.loading=!1})};return e.jsxs("div",{className:"campaign-template-leaderboard",children:[a.loading&&e.jsx("div",{className:"loading",children:e.jsx("img",{src:p})}),a.topCampaign&&e.jsxs("div",{className:"top-campaign",children:[e.jsx("div",{className:"top-bar",children:e.jsxs("div",{className:"user-info",children:[e.jsx("div",{className:"avatar",dangerouslySetInnerHTML:{__html:a.topCampaign.avatar}}),e.jsxs("div",{className:"badge-and-title",children:[e.jsx("img",{src:j}),e.jsx("div",{className:"title",children:"Top Fundraiser"})]}),e.jsx("a",{href:a.topCampaign.profilePath,children:a.topCampaign.fullName})]})}),e.jsxs("div",{className:"stats",children:[e.jsxs("div",{className:"amount-raised",children:[e.jsx("div",{className:"title",children:"Amount Raised"}),a.topCampaign.amountRaised]}),e.jsxs("div",{className:"people-served",children:[e.jsx("div",{className:"title",children:"Est. People Served"}),a.topCampaign.peopleServed]})]})]}),e.jsxs("div",{className:"leaderboard-column-headers title",children:[e.jsx("div",{children:"Donor"}),e.jsx("div",{className:"amount-raised-header",children:"Amount Raised"}),e.jsx("div",{className:"people-served-header",children:"Est. People Served"})]}),e.jsx("div",{className:"leaderboard-items",children:a.campaigns.map((s,N)=>e.jsxs("div",{className:"leaderboard-item",children:[e.jsxs("div",{className:"user-info",children:[e.jsx("div",{className:`rank rank-${s.rank}`,children:s.rank}),e.jsx("div",{className:"avatar",dangerouslySetInnerHTML:{__html:s.avatar}}),e.jsxs("div",{children:[e.jsx("a",{href:s.profilePath,children:s.fullName}),e.jsxs("div",{className:"stats",children:[e.jsx("div",{className:"amount-raised",children:s.amountRaised}),e.jsx("div",{className:"people-served",children:s.peopleServed>0&&e.jsxs(e.Fragment,{children:[e.jsx("img",{src:g}),s.peopleServed]})})]})]})]}),e.jsx("div",{className:"amount-raised",children:s.amountRaised}),e.jsx("div",{className:"people-served",children:s.peopleServed>0&&e.jsx(e.Fragment,{children:s.peopleServed})})]},s.id))}),o&&e.jsxs("div",{className:"leaderboard-footer",children:[e.jsx("a",{className:i("prev-page",{disabled:c()||a.loading}),onClick:r,children:e.jsx("img",{src:u})}),m.range(1,a.totalPages+1).map(s=>e.jsx("span",{className:i("pagination-circle",{active:s===a.page})},s)),e.jsx("a",{className:i("next-page",{disabled:n()||a.loading}),onClick:d,children:e.jsx("img",{src:f})})]})]})});export{S as default};
2//# sourceMappingURL=CampaignTemplateLeaderboard-BFVxFq3a.js.map

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.