1import{r as b,j as e,p as R,L as P}from"./react-vendor-BDHNqS4B.js";import{b as g}from"./Header-BkbupWq-.js";import{F as N,M as _}from"./Footer-CtylQEAH.js";import{C as c,b as m,c as x,d as v,a as h}from"./card-U4xgiZnN.js";import{c as T,Y as z,$ as D,b as K,u as U,B as p,A as k,a2 as V}from"./main-m_sUF2N4.js";import{B as C}from"./badge-BYBBu8xB.js";import{a as B}from"./useNGOs-CzWKW3M_.js";import{u as F}from"./useSEO-CoArDrdl.js";import{P as q}from"./phone-B2rvvDkK.js";import{G as W}from"./type-CVgQCqWZ.js";import{C as X}from"./circle-check-DgLC__8_.js";import{H as $}from"./heart-DRwCktcb.js";import{U as Y}from"./users-DCdt65nH.js";import{C as J}from"./calendar-KPQ2FJpt.js";import{C as Q}from"./clock-CRHi7pcr.js";import"./amplify-DYDcjoow.js";import"./chevron-right-CpkQxGj-.js";import"./check-DS0-tR9o.js";import"./tag-D40gy_Nl.js";import"./query-7-WHkg5t.js";import"./textarea-D7qsgB_p.js";import"./reportService-tEzofQZ6.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Z=T("MapPinned",[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]]);var y="Progress",w=100,[ee,Ee]=z(y),[se,ae]=ee(y),L=b.forwardRef((r,a)=>{const{__scopeProgress:n,value:s=null,max:l,getValueLabel:j=re,...d}=r;(l||l===0)&&!A(l)&&console.error(te(`${l}`,"Progress"));const i=A(l)?l:w;s!==null&&!E(s,i)&&console.error(ne(`${s}`,"Progress"));const o=E(s,i)?s:null,t=u(o)?j(o,i):void 0;return e.jsx(se,{scope:n,value:o,max:i,children:e.jsx(D.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":u(o)?o:void 0,"aria-valuetext":t,role:"progressbar","data-state":I(o,i),"data-value":o??void 0,"data-max":i,...d,ref:a})})});L.displayName=y;var M="ProgressIndicator",S=b.forwardRef((r,a)=>{const{__scopeProgress:n,...s}=r,l=ae(M,n);return e.jsx(D.div,{"data-state":I(l.value,l.max),"data-value":l.value??void 0,"data-max":l.max,...s,ref:a})});S.displayName=M;function re(r,a){return`${Math.round(r/a*100)}%`}function I(r,a){return r==null?"indeterminate":r===a?"complete":"loading"}function u(r){return typeof r=="number"}function A(r){return u(r)&&!isNaN(r)&&r>0}function E(r,a){return u(r)&&!isNaN(r)&&r<=a&&r>=0}function te(r,a){return`Invalid prop \`max\` of value \`${r}\` supplied to \`${a}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${w}\`.`}function ne(r,a){return`Invalid prop \`value\` of value \`${r}\` supplied to \`${a}\`. The \`value\` prop must be: 7 - a positive number 8 - less than the value passed to \`max\` (or ${w} if no \`max\` prop is set) 9 - \`null\` or \`undefined\` if the progress is indeterminate. 10 11Defaulting to \`null\`.`}var H=L,le=S;const G=b.forwardRef(({className:r,value:a,...n},s)=>e.jsx(H,{ref:s,className:K("relative h-4 w-full overflow-hidden rounded-full bg-secondary",r),...n,children:e.jsx(le,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(a||0)}%)`}})}));G.displayName=H.displayName;const De=()=>{const{ngoId:r}=R(),{t:a,i18n:n}=U(),{ngo:s,isLoading:l,error:j}=B(r),d=s?n.language==="en"?s.nameEn:s.name:"",i=s?n.language==="en"?s.descriptionEn:s.description:"馿¸¯åç©ç¦å©åé«ãé é¤å義工è³è¨ã";if(F({title:d?`${d} | 馿¸¯åç©åé« | PetWell HK`:"馿¸¯åç©åé« | PetWell HK",description:i,keywords:d?`${d},馿¸¯åç©åé«,寵ç©é é¤,義工,NGO`:"馿¸¯åç©åé«,寵ç©é é¤,義工",canonicalUrl:r?`https://petwellhk.com/ngos/${r}`:"https://petwellhk.com/ngos",noindex:!l&&!s,structuredData:s?{"@context":"https://schema.org","@type":"NGO",name:d,description:i,url:`https://petwellhk.com/ngos/${s.id}`,address:s.address,telephone:s.phone,email:s.email,sameAs:s.website?[s.website]:void 0}:void 0}),l)return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(g,{}),e.jsx("main",{className:"flex-1 py-12 md:py-16",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsx("p",{className:"text-center",children:a("common.loading")})})}),e.jsx(N,{})]});if(j||!s)return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(g,{}),e.jsx("main",{className:"flex-1 py-12 md:py-16",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsx("p",{className:"text-center text-destructive",children:a("ngos.notFound")}),e.jsx("div",{className:"text-center mt-4",children:e.jsx(P,{to:"/ngos",children:e.jsxs(p,{variant:"outline",children:[e.jsx(k,{className:"w-4 h-4 mr-2"}),a("ngos.backToList")]})})})]})}),e.jsx(N,{})]});const o=t=>Math.round(t.currentAmount/t.goalAmount*100);return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(g,{}),e.jsx("main",{className:"flex-1 pt-6 pb-16 bg-gradient-hero",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsx("div",{className:"mb-6",children:e.jsx(P,{to:"/ngos",children:e.jsxs(p,{variant:"ghost",className:"gap-2",children:[e.jsx(k,{className:"w-4 h-4"}),a("ngos.backToList")]})})}),e.jsxs(c,{className:"mb-8",children:[e.jsx(m,{children:e.jsx("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:e.jsxs("div",{className:"flex-1",children:[e.jsx(x,{className:"text-3xl mb-2",children:n.language==="en"?s.nameEn:s.name}),s.established&&e.jsxs(C,{variant:"secondary",className:"mb-3",children:[a("ngos.established"),": ",s.established]}),e.jsx(v,{className:"text-base",children:n.language==="en"?s.descriptionEn:s.description})]})})}),e.jsx(h,{className:"space-y-4",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(_,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm",children:a("ngos.address")}),e.jsx("p",{className:"text-muted-foreground text-sm",children:s.address})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(q,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm",children:a("ngos.phone")}),e.jsx("a",{href:`tel:${s.phone}`,className:"text-muted-foreground text-sm hover:text-primary",children:s.phone})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(V,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm",children:a("ngos.email")}),e.jsx("a",{href:`mailto:${s.email}`,className:"text-muted-foreground text-sm hover:text-primary break-all",children:s.email})]})]}),s.website&&e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(W,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm",children:a("ngos.website")}),e.jsx("a",{href:s.website,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground text-sm hover:text-primary break-all",children:s.website})]})]})]})})]}),e.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[e.jsxs(c,{children:[e.jsx(m,{children:e.jsx(x,{children:a("ngos.mission")})}),e.jsx(h,{children:e.jsx("p",{className:"text-muted-foreground",children:n.language==="en"?s.missionEn:s.mission})})]}),e.jsxs(c,{children:[e.jsx(m,{children:e.jsx(x,{children:a("ngos.services")})}),e.jsx(h,{children:e.jsx("ul",{className:"grid md:grid-cols-2 gap-3",children:(n.language==="en"?s.servicesEn:s.services).map((t,f)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(X,{className:"w-4 h-4 text-primary mt-1 flex-shrink-0"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:t})]},f))})})]}),e.jsxs(c,{children:[e.jsxs(m,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{className:"w-5 h-5 text-primary"}),e.jsx(x,{children:a("ngos.donationCampaigns")})]}),e.jsx(v,{children:a("ngos.donationDescription")})]}),e.jsx(h,{className:"space-y-6",children:s.donationCampaigns.map(t=>e.jsxs("div",{className:"space-y-3 p-4 border rounded-lg",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"font-semibold mb-1",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:t.description})]})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:a("ngos.progress")}),e.jsxs("span",{className:"font-semibold",children:[o(t),"%"]})]}),e.jsx(G,{value:o(t),className:"h-2"}),e.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[e.jsxs("span",{children:["HK$",t.currentAmount.toLocaleStr
11ing()," / HK$",t.goalAmount.toLocaleString()]}),e.jsxs("span",{children:[t.donorsCount," ",a("ngos.donors")]})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:[a("ngos.endDate"),": ",new Date(t.endDate).toLocaleDateString(n.language==="en"?"en-US":"zh-HK")]}),e.jsxs(p,{size:"sm",className:"gap-2",children:[e.jsx($,{className:"w-4 h-4"}),a("ngos.donate")]})]})]},t.id))})]})]}),e.jsx("div",{className:"space-y-6",children:e.jsxs(c,{children:[e.jsxs(m,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Y,{className:"w-5 h-5 text-primary"}),e.jsx(x,{children:a("ngos.volunteerEvents")})]}),e.jsx(v,{children:a("ngos.volunteerDescription")})]}),e.jsx(h,{className:"space-y-4",children:s.volunteerEvents.map(t=>e.jsxs("div",{className:"space-y-3 p-4 border rounded-lg hover:shadow-md transition-shadow",children:[e.jsx("h3",{className:"font-semibold text-sm",children:t.title}),e.jsxs("div",{className:"space-y-2 text-xs",children:[e.jsxs("div",{className:"flex items-start gap-2 text-muted-foreground",children:[e.jsx(J,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:new Date(t.date).toLocaleDateString(n.language==="en"?"en-US":"zh-HK")})]}),e.jsxs("div",{className:"flex items-start gap-2 text-muted-foreground",children:[e.jsx(Q,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:t.duration})]}),e.jsxs("div",{className:"flex items-start gap-2 text-muted-foreground",children:[e.jsx(Z,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:t.location})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.description}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-xs",children:[e.jsxs("span",{className:"font-medium",children:[a("ngos.requirements"),":"]}),e.jsx("ul",{className:"mt-1 ml-4 list-disc text-muted-foreground space-y-1",children:t.requirements.map((f,O)=>e.jsx("li",{children:f},O))})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsx(C,{variant:t.spotsAvailable>0?"default":"secondary",children:t.spotsAvailable>0?`${t.spotsAvailable} ${a("ngos.spotsLeft")}`:a("ngos.fullBooked")}),e.jsx(p,{size:"sm",variant:"outline",disabled:t.spotsAvailable===0,className:"text-xs",children:a("ngos.enroll")})]})]})]},t.id))})]})})]})]})}),e.jsx(N,{})]})};export{De 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.