PageSourceSearch

https://donor-portal.pennyappeal.org.au/_next/static/chunks/pages/recurring-donation-2f3169ed5a5200f9.js

js pennyappeal.org.au collected 2026-10-08 03:29:19 UTC 30,098 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[948],{913:(t,e,n)=>{"use strict";n.d(e,{E:()=>r});let r=t=>{let e=t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return"".concat(e," AUD")}},3212:(t,e,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/recurring-donation",function(){return n(6869)}])},3483:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,s){var i=a.prototype;s.utc=function(t){var e={date:t,utc:!0,args:arguments};return new a(e)},i.utc=function(e){var n=s(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},i.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=i.parse;i.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var l=i.init;i.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else l.call(this)};var c=i.utcOffset;i.utcOffset=function(r,a){var s=this.$utils().u;if(s(r))return this.$u?0:s(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&null===(r=function(t){void 0===t&&(t="");var r=t.match(e);if(!r)return null;var a=(""+r[0]).match(n)||["-",0,0],s=a[0],i=60*a[1]+ +a[2];return 0===i?0:"+"===s?i:-i}(r)))return this;var i=16>=Math.abs(r)?60*r:r;if(0===i)return this.utc(a);var o=this.clone();if(a)return o.$offset=i,o.$u=!1,o;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(o=this.local().add(i+l,t)).$offset=i,o.$x.$localOffset=l,o};var u=i.format;i.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,e)},i.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(t){return"s"===t&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=i.diff;i.diff=function(t,e,n){if(t&&this.$u===t.$u)return f.call(this,t,e,n);var r=this.local(),a=s(t).local();return f.call(r,a,e,n)}}}()},4312:function(t){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",a="week",s="month",i="quarter",o="year",l="date",c="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},h="en",m={};m[h]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}};var p="$isDayjsObject",g=function(t){return t instanceof b||!(!t||!t[p])},x=function t(e,n,r){var a;if(!e)return h;if("string"==typeof e){var s=e.toLowerCase();m[s]&&(a=s),n&&(m[s]=n,a=s);var i=e.split("-");if(!a&&i.length>1)return t(i[0])}else{var o=e.name;m[o]=e,a=o}return!r&&a&&(h=a),a||!r&&h},v=function(t,e){if(g(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new b(n)},y={s:f,z:function(t){var e=-t.utcOffset(),n=Math.abs(e);return(e<=0?"+":"-")+f(Math.floor(n/60),2,"0")+":"+f(n%60,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),a=e.clone().add(r,s),i=n-a<0,o=e.clone().add(r+(i?-1:1),s);return+(-(r+(n-a)/(i?a-o:o-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return({M:s,y:o,w:a,d:"day",D:l,h:r,m:n,s:e,ms:t,Q:i})[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}};y.l=x,y.i=g,y.w=function(t,e){return v(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function f(t){this.$L=x(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var h=f.prototype;return h.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(y.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(u);if(r){var a=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},h.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},h.$utils=function(){return y},h.isValid=function(){return this.$d.toString()!==c},h.isSame=function(t,e){var n=v(t);return this.startOf(e)<=n&&n<=this.endOf(e)},h.isAfter=function(t,e){return v(t)<this.startOf(e)},h.isBefore=function(t,e){return this.endOf(e)<v(t)},h.$g=function(t,e,n){return y.u(t)?this[e]:this.set(n,t)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(t,i){var c=this,u=!!y.u(i)||i,d=y.p(t),f=function(t,e){var n=y.w(c.$u?Date.UTC(c.$y,e,t):new Date(c.$y,e,t),c);return u?n:n.endOf("day")},h=function(t,e){return y.w(c.toDate()[t].apply(c.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(e)),c)},m=this.$W,p=this.$M,g=this.$D,x="set"+(this.$u?"UTC":"");switch(d){case o:return u?f(1,0):f(31,11);case s:return u?f(1,p):f(0,p+1);case a:var v=this.$locale().weekStart||0,b=(m<v?m+7:m)-v;return f(u?g-b:g+(6-b),p);case"day":case l:return h(x+"Hours",0);case r:return h(x+"Minutes",1);case n:return h(x+"Seconds",2);case e:return h(x+"Milliseconds",3);default:return this.clone()}},h.endOf=function(t){return this.startOf(t,!1)},h.$set=function(a,i){var c,u=y.p(a),d="set"+(this.$u?"UTC":""),f=((c={}).day=d+"Date",c[l]=d+"Date",c[s]=d+"Month",c[o]=d+"FullYear",c[r]=d+"Hours",c[n]=d+"Minutes",c[e]=d+"Seconds",c[t]=d+"Milliseconds",c)[u],h="day"===u?this.$D+(i-this.$W):i;if(u===s||u===o){var m=this.clone().set(l,1);
1m.$d[f](h),m.init(),this.$d=m.set(l,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](h);return this.init(),this},h.set=function(t,e){return this.clone().$set(t,e)},h.get=function(t){return this[y.p(t)]()},h.add=function(t,i){var l,c=this;t=Number(t);var u=y.p(i),d=function(e){var n=v(c);return y.w(n.date(n.date()+Math.round(e*t)),c)};if(u===s)return this.set(s,this.$M+t);if(u===o)return this.set(o,this.$y+t);if("day"===u)return d(1);if(u===a)return d(7);var f=((l={})[n]=6e4,l[r]=36e5,l[e]=1e3,l)[u]||1,h=this.$d.getTime()+t*f;return y.w(h,this)},h.subtract=function(t,e){return this.add(-1*t,e)},h.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||c;var r=t||"YYYY-MM-DDTHH:mm:ssZ",a=y.z(this),s=this.$H,i=this.$m,o=this.$M,l=n.weekdays,u=n.months,f=n.meridiem,h=function(t,n,a,s){return t&&(t[n]||t(e,r))||a[n].slice(0,s)},m=function(t){return y.s(s%12||12,t,"0")},p=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(d,function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return y.s(e.$y,4,"0");case"M":return o+1;case"MM":return y.s(o+1,2,"0");case"MMM":return h(n.monthsShort,o,u,3);case"MMMM":return h(u,o);case"D":return e.$D;case"DD":return y.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,l,2);case"ddd":return h(n.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(s);case"HH":return y.s(s,2,"0");case"h":return m(1);case"hh":return m(2);case"a":return p(s,i,!0);case"A":return p(s,i,!1);case"m":return String(i);case"mm":return y.s(i,2,"0");case"s":return String(e.$s);case"ss":return y.s(e.$s,2,"0");case"SSS":return y.s(e.$ms,3,"0");case"Z":return a}return null}(t)||a.replace(":","")})},h.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},h.diff=function(t,l,c){var u,d=this,f=y.p(l),h=v(t),m=(h.utcOffset()-this.utcOffset())*6e4,p=this-h,g=function(){return y.m(d,h)};switch(f){case o:u=g()/12;break;case s:u=g();break;case i:u=g()/3;break;case a:u=(p-m)/6048e5;break;case"day":u=(p-m)/864e5;break;case r:u=p/36e5;break;case n:u=p/6e4;break;case e:u=p/1e3;break;default:u=p}return c?u:y.a(u)},h.daysInMonth=function(){return this.endOf(s).$D},h.$locale=function(){return m[this.$L]},h.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=x(t,e,!0);return r&&(n.$L=r),n},h.clone=function(){return y.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},f}(),$=b.prototype;return v.prototype=$,[["$ms",t],["$s",e],["$m",n],["$H",r],["$W","day"],["$M",s],["$y",o],["$D",l]].forEach(function(t){$[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),v.extend=function(t,e){return t.$i||(t(e,b,v),t.$i=!0),v},v.locale=x,v.isDayjs=g,v.unix=function(t){return v(1e3*t)},v.en=m[h],v.Ls=m,v.p={},v}()},6869:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>T});var r=n(6029),a=n(5729),s=n(9573),i=n(6409),o=n(1660),l=n(6002),c=n(913);let u=()=>{let{totals:t,isLoading:e,error:n}=(()=>{let[t,e]=(0,a.useState)(null),[n,r]=(0,a.useState)(!0),[s,i]=(0,a.useState)(null),c=(0,a.useCallback)(async()=>{r(!0),i(null);try{let t=await (0,o._Z)();e(t)}catch(t){i((0,l.PE)(t)),e(null)}finally{r(!1)}},[]),u=(0,a.useCallback)(()=>{c()},[c]);return(0,a.useEffect)(()=>{c()},[c]),{totals:t,isLoading:n,error:s,refetch:u}})(),s=t=>(0,c.E)(t),u=t=>{let e=t>=0?"+":"";return"".concat(e).concat(t.toFixed(1),"%")};if(e)return(0,r.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[1,2,3,4].map(t=>(0,r.jsx)("div",{className:"h-24 bg-gray-200 animate-pulse rounded-lg"},t))});let d=t||{monthTotal:0,percentageChange:0,activeDonationTotal:0,activeDonationPercentageChange:0,yearTotal:0,yearTotalPercentageChange:0,startDate:""};return(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:(0,r.jsx)("p",{className:"text-red-600 text-sm font-medium",children:n})}),(0,r.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,r.jsx)(i.A,{icon:"totalDonation",title:"Monthly Total",amount:s(d.monthTotal),comparisonText:"vs last month",changeValue:u(d.percentageChange),changeType:d.percentageChange>=0?"positive":"negative"}),(0,r.jsx)(i.A,{icon:"recurringDonationIcon",title:"Active Donations",amount:d.activeDonationTotal.toString(),comparisonText:"vs last month",changeValue:u(d.activeDonationPercentageChange),changeType:d.activeDonationPercentageChange>=0?"positive":"negative",iconColor:"#F5791F"}),(0,r.jsx)(i.A,{icon:"donationHistoryIcon",title:"Year Total",amount:s(d.yearTotal),comparisonText:"vs last year",changeValue:u(d.yearTotalPercentageChange),changeType:d.yearTotalPercentageChange>=0?"positive":"negative",iconColor:"#17B26A"}),(0,r.jsx)(i.A,{icon:"calendarIcon",title:"Start Date",amount:d.startDate?new Date(d.startDate).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"N/A",comparisonText:"",changeValue:"",changeType:"neutral",iconColor:"#DA3E33"})]})]})},d=t=>{let{selectedFilter:e,onFilterChange:n}=t,[s,i]=(0,a.useState)("All"),o=void 0!==e?e:s;return(0,r.jsxs)("div",{className:"flex flex-col items-start md:flex-row md:items-center md:justify-between gap-4 mb-6 w-full box-border overflow-x-hidden",children:[(0,r.jsx)("h2",{className:"text-[18px] font-semibold leading-[24px] text-[#000A14] shrink-0",children:"My Recurring Donations"}),(0,r.jsx)("div",{className:"flex items-center gap-[15px] flex-wrap md:justify-end w-full md:w-auto min-w-0",children:["All","Active","Paused","Cancelled"].map(t=>(0,r.jsx)("button",{onClick:()=>(t=>{void 0===e&&i(t),null==n||n(t)})(t),className:"py-[11px] px-[20px] rounded-[10px] text-[14px] font-medium leading-[18px] transition-colors whitespace-nowrap shrink-0 ".concat(o===t?"bg-[var(--primary)] text-white":"bg-white text-[var(--text-dark)] border border-[var(--light-gray)] hover:bg-gray-50"),children:t},t))})]})};var f=n(7968);let h={inProgress:{badgeColor:"text-white",badgeBg:"var(--success-green)"},paused:{badgeColor:"text-white",badgeBg:"var(--status-warning)"},cancelled:{badgeColor:"text-white",badgeBg:"var(--error-red)"}},m=(0,a.memo)(t=>{let{status:e,className:n}=t,a=h[e]||{badgeColor:"text-white",badgeBg:"var(--success-green)"},s=String(e);return(0,r.jsx)("span",{className:"sm:h-[32px] h-[28px] rounded-full align-middle font-medium text-[14px] leading-[18px] font-[var(--font-inter)] px-[15px] flex items-center justify-center min-w-[max-content] ".concat(a.badgeColor," ").concat(n||""),style:{backgroundColor:a.badgeBg},role:"status","aria-label":"Status: ".concat(s),children:(0,f.Q)(s)})});m.displayName="StatusBadge";let p=(0,a.memo)(t=>{let{label:e,value:n,testId:a,className:s,labelClassName:i,valueClassName:o}=t;return(0,r.jsxs)("div",{className:"flex flex-col ".concat(s||""),"data-testid":a,children:[(0,r.jsxs)("span",{className:"font-normal sm:font-medium text-[14px] sm:text-[16
1px] leading-[18px] sm:leading-[26px] tracking-[0px] font-[var(--font-inter)] text-[var(--text-light)] ".concat(i||""),children:[e,":"]}),(0,r.jsx)("span",{className:"font-semibold sm:text-[18px] text-[16px] sm:leading-[24px] leading-[26px] font-[var(--font-inter)] text-[var(--text-dark)] ".concat(o||""),children:n})]})});p.displayName="DetailRow";let g=(0,a.memo)(t=>{let{donation:e}=t;return(0,r.jsxs)("header",{className:"flex justify-between items-start py-[15px] px-[20px] rounded-t-[10px]",style:{backgroundColor:"#F3F3F3"},children:[(0,r.jsx)("h3",{id:"donation-title-".concat(e.id),className:"font-semibold text-[16px] sm:text-[20px] leading-[26px] tracking-[0px] font-[var(--font-inter)]",style:{color:"var(--text-dark)"},children:e.title}),(0,r.jsx)(m,{status:e.status})]})});g.displayName="CardHeader";let x=(0,a.memo)(t=>{let{donation:e}=t;return(0,r.jsxs)("section",{className:"px-[20px]","aria-label":"Donation details",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-2 sm:gap-[25px] gap-[10px] sm:mt-[20px] mt-[10px]",children:[(0,r.jsx)(p,{label:"Contributed",value:"".concat(e.amountRaised," AUD"),testId:"donation-amount"}),e.frequency&&(0,r.jsx)(p,{label:"Frequency",value:e.frequency,testId:"donation-frequency"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-2 sm:gap-[25px] gap-[10px] sm:mt-[20px] mt-[10px]",children:[(0,r.jsx)(p,{label:"Payment Method",value:"".concat(e.cardType," ").concat(e.cardNumber),testId:"donation-payment-method"}),(0,r.jsx)(p,{label:"Next Payment",value:e.nextPayment,testId:"donation-next-payment"})]})]})});x.displayName="CardDetails";let v=(0,a.memo)(t=>{let{onClick:e,icon:n,children:a,variant:s,disabled:i=!1,testId:o,className:l,size:c="md"}=t;return(0,r.jsxs)("button",{onClick:e,className:"".concat((()=>{switch(c){case"sm":return"px-2 py-1 text-[12px]";case"lg":return"px-4 py-3 text-[16px]";default:return"px-[10px] sm:px-3 py-[12px] sm:py-2 text-[14px]"}})()," rounded-[10px] flex items-center justify-center gap-[4px] font-medium text-[14px] leading-[18px] tracking-[0px] font-[var(--font-inter)] whitespace-nowrap align-middle ").concat(l||"").trim(),style:(()=>{switch(s){case"edit":return{backgroundColor:"var(--primary)",color:"white",border:"none",cursor:i?"not-allowed":"pointer"};case"pause":case"resume":return{color:"var(--secondary-dark)",borderColor:"var(--secondary-dark)",border:"1px solid",backgroundColor:"transparent",cursor:i?"not-allowed":"pointer"};case"cancel":return{color:"#DC2626",borderColor:"#DC2626",border:"1px solid",backgroundColor:"transparent",cursor:i?"not-allowed":"pointer"};case"club":return{color:"var(--primary-blue)",borderColor:"var(--primary-blue)",border:"1px solid",backgroundColor:"transparent",cursor:i?"not-allowed":"pointer"};default:return{}}})(),disabled:i,"data-testid":o,"aria-label":"string"==typeof a?a:void 0,children:[(0,r.jsx)("span",{className:"flex-shrink-0 flex items-center justify-center align-middle",children:n}),(0,r.jsx)("span",{className:"truncate flex items-center",children:a})]})});v.displayName="ActionButton";var y=n(3929);let b={inProgress:{actionText:"Pause",actionIcon:"/assets/icons/PauseIcon.svg"},paused:{actionText:"Resume",actionIcon:"/assets/icons/PlayIcon.svg"},cancelled:{actionText:"Resume",actionIcon:"/assets/icons/PlayIcon.svg"}},$=(0,a.memo)(t=>{let{donation:e,loadingAction:n,onEdit:s,onPause:i,onResume:o,onCancel:l}=t,c=(0,a.useCallback)(()=>{"inProgress"===e.status?i(e.id):("paused"===e.status||"cancelled"===e.status)&&o(e.id)},[e.status,e.id,i,o]),u=(0,a.useCallback)(()=>s(e.id),[s,e.id]),d=(0,a.useCallback)(()=>l(e.id),[l,e.id]),f=b[e.status]||b.inProgress;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v,{onClick:u,icon:(0,r.jsx)("span",{className:"hidden sm:inline-block",children:(0,r.jsx)(y.A,{src:"/assets/icons/edit.svg",alt:"Edit",width:18,height:18})}),variant:"edit",disabled:"cancelled"===e.status||"edit"===n,testId:"edit-button",className:"w-full",children:"edit"===n?"...":"Edit"}),(0,r.jsx)(v,{onClick:c,icon:(0,r.jsx)("span",{className:"hidden sm:inline-block",children:(0,r.jsx)(y.A,{src:f.actionIcon,alt:f.actionText,width:18,height:18})}),variant:"inProgress"===e.status?"pause":"resume",disabled:"cancelled"===e.status||"pause"===n||"resume"===n,testId:"pause-resume-button",className:"hover:bg-orange-100 transition-colors w-full",children:"pause"===n||"resume"===n?"...":f.actionText}),(0,r.jsx)(v,{onClick:d,icon:(0,r.jsx)("span",{className:"hidden sm:inline-block",children:(0,r.jsx)(y.A,{src:"/assets/icons/cancel.
1svg",alt:"Cancel",width:12,height:12})}),variant:"cancel",disabled:"cancelled"===e.status||"cancel"===n,testId:"cancel-button",className:"hover:bg-red-50 transition-colors w-full",children:"cancel"===n?"...":"cancelled"===e.status?"Cancelled":"Cancel"})]})});$.displayName="CardActionButtons";let w=(0,a.memo)(t=>{let{donation:e,onEdit:n,onPause:a,onResume:s,onCancel:i,loadingAction:o}=t;return(0,r.jsx)("footer",{className:"py-[20px]","aria-label":"Donation actions",children:(0,r.jsx)("div",{className:"grid grid-cols-2 min-[430px]:grid-cols-3 gap-2 px-[10px]",children:(0,r.jsx)($,{donation:e,loadingAction:o,onEdit:n,onPause:a,onResume:s,onCancel:i})})})});w.displayName="CardActions";let D=(0,a.memo)(t=>(0,r.jsxs)("article",{className:"bg-white border rounded-[10px] shadow-sm hover:shadow-md transition-shadow w-full gap-[30px]",style:{borderColor:"var(--light-gray)"},role:"article","aria-labelledby":"donation-title-".concat(t.donation.id),children:[(0,r.jsx)(g,{donation:t.donation}),(0,r.jsx)(x,{donation:t.donation}),(0,r.jsx)("hr",{className:"border-t border-gray-300 mx-[20px] sm:mt-[30px] mt-[15px]","aria-hidden":"true"}),(0,r.jsx)(w,{...t})]}));D.displayName="RecurringDonationCard";var C=n(238),M=n(9099),S=n(9663);let j=t=>{var e,n;return{id:String(t.id),title:t.clubName,status:t.status,amount:(0,c.E)(t.amount),amountRaised:null!=(n=t.amountRaised)?n:0,currency:t.currency||"AUD",frequency:null==(e=t.frequency)?void 0:e.name,cardNumber:t.cardNumber,cardType:t.cardType,paymentMethodId:t.paymentMethodId,nextPayment:t.nextPayment&&t.timeZone?(0,S.JC)(t.nextPayment,t.timeZone,"MMM DD, YYYY HH:mm"):"N/A"}},N=t=>{let{filter:e="All"}=t,{recurringDonations:n,isLoading:s,error:i,loadingActions:c,pauseDonation:u,resumeDonation:d,cancelDonation:f,refetch:h,fetchMore:m,isFetchingMore:p,pagination:g}=(t=>{let[e,n]=(0,a.useState)([]),[r,s]=(0,a.useState)(!0),[i,c]=(0,a.useState)(!1),[u,d]=(0,a.useState)(null),[f,h]=(0,a.useState)(new Map),[m,p]=(0,a.useState)(),[g,x]=(0,a.useState)(t||{}),v=(0,a.useRef)(!1),y=(0,a.useRef)(null==t?void 0:t.status),b=(0,a.useCallback)(async function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={...g,...t};e&&m?r.page=(m.page||1)+1:e||(r.page=1),x(r),e?c(!0):s(!0),d(null);try{let t=await (0,o.PI)(r);if(t.error){d((0,l.PE)(t.error)),e||(n([]),p(void 0));return}let a=(t.scheduledDonations||[]).filter(t=>null!==t.amount&&null!==t.frequency);e?n(t=>[...t,...a]):n(a),p(t.pagination),d(null)}catch(t){d((0,l.PE)(t)),e||(n([]),p(void 0))}finally{s(!1),c(!1)}},[g,m]),$=(0,a.useCallback)(t=>{b(t,!1)},[b]),w=(0,a.useCallback)(()=>{m&&m.page<m.pages&&!r&&b({},!0)},[b,m,r]),D=(0,a.useCallback)(()=>{d(null),b({})},[b]),C=(0,a.useCallback)((t,e)=>{h(n=>{let r=new Map(n);return e?r.set(t,e):r.delete(t),r})},[]),M=(0,a.useCallback)((t,e)=>{let r=String(t);n(t=>t.map(t=>String(t.id)===r?{...t,...e}:t))},[]),S=(0,a.useCallback)(async t=>{try{if(!t||"string"!=typeof t&&"number"!=typeof t)throw Error("Invalid donation ID provided");let e=String(t);return C(e,"pause"),await (0,o.OX)(e),M(e,{status:"paused"}),!0}catch(t){return d((0,l.PE)(t)),!1}finally{C(String(t),null)}},[C,M]),j=(0,a.useCallback)(async t=>{try{if(!t||"string"!=typeof t&&"number"!=typeof t)throw Error("Invalid donation ID provided");let e=String(t);return C(e,"resume"),await (0,o.Vc)(e),M(e,{status:"inProgress"}),!0}catch(t){return d((0,l.PE)(t)),!1}finally{C(String(t),null)}},[C,M]),N=(0,a.useCallback)(async t=>{try{if(!t||"string"!=typeof t&&"number"!=typeof t)throw Error("Invalid donation ID provided");let e=String(t);return C(e,"cancel"),await (0,o.m2)(e),M(e,{status:"cancelled"}),!0}catch(t){return d((0,l.PE)(t)),!1}finally{C(String(t),null)}},[C,M]),Y=(0,a.useCallback)(()=>d(null),[]);return(0,a.useEffect)(()=>{v.current||(v.current=!0,y.current=null==t?void 0:t.status,b(t))},[]),(0,a.useEffect)(()=>{v.current&&(null==t?void 0:t.status)!==y.current&&(y.current=null==t?void 0:t.status,b(t))},[null==t?void 0:t.status,b]),{recurringDonations:e,isLoading:r,isFetchingMore:i,error:u,loadingActions:f,pagination:m,refetch:$,fetchMore:w,retry:D,pauseDonation:S,resumeDonation:j,cancelDonation:N,clearError:Y}})({status:e}),{handleEdit:x,handlePause:v,handleResume:y,handleCancel:b}=(t=>{let{pauseDonation:e,resumeDonation:n,cancelDonation:r}=t,s=(0,M.useRouter)(),[i,o]=(0,a.useState)(!1),[l,c]=(0,a.useState)(null),u=(0,a.useCallback)(t=>{s.push({pathname:"/edit-recurring-donation",query:{id:t}})},[s]),d=(0,a.useCallback)(async t=>{await e(t)},[e]),f=(0,a.useCallback)(async t=>{await n(t)},[n]),h=(0,a.useCallback)(async t=>{await r(t)},[r]),m=(0,a.useCallback)(t=>{},[]),p=(0,a.useCallback)(t=>{c(t),o(!0)},[]);return{handleEdit:u,handlePause:d,handleResume:f,handleCancel:h,handleClubBadge:m,handleRefundClick:p,handleRefundConfirm:(0,a.useCallback)((t,e)=>{o(!1),c(null)},[l]),handleRefundModalClose:(0,a.useCallback)(()=>{o(!1),c(null)},[]),isRefundModalOpen:i,selectedDonation:l}})({pauseDonation:u,resumeDonation:d,cancelDonation:f}),$=(0,a.useMemo)(()=>n.map(j),[n]);return s?(0,r.jsx)(C.A,{message:"Loading recurring donations...",className:"w-full py-8",minHeightClassName:"min-h-[400px]"}):i?(0,r.jsx)("div",{className:"text-center py-8",children:(0,r.jsx)("p",{className:"text-red-600 mb-4",children:i})}):0===$.length?(0,r.jsx)("div",{className:"text-center py-8 text-[var(--text-muted)] min-h-[400px] w-full",children:"No recurring donations foun
1d for this filter."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mt-6 pb-6 min-h-[100%] w-full animate-in fade-in duration-500",children:$.map(t=>(0,r.jsx)(D,{donation:t,onEdit:x,onPause:v,onResume:y,onCancel:b,loadingAction:c.get(t.id)},t.id))}),g&&g.page<g.pages&&(0,r.jsx)("div",{className:"flex justify-center mt-6 mb-8",children:(0,r.jsx)("button",{onClick:()=>m(),disabled:p,className:"px-6 py-2.5 bg-white border border-[var(--primary)] text-[var(--primary)] font-medium rounded-lg hover:bg-[var(--primary)] hover:text-white transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-sm flex items-center gap-2",children:p?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"animate-spin h-4 w-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,r.jsx)("span",{children:"Loading..."})]}):"Load More"})})]})};var Y=n(7027);function k(){let[t,e]=(0,a.useState)("All");return(0,r.jsxs)("div",{className:"w-full p-4 lg:p-6 xl:p-8 min-h-full overflow-x-hidden box-border",children:[(0,r.jsx)(Y.A,{className:"xl:hidden"}),(0,r.jsx)(u,{}),(0,r.jsx)(d,{selectedFilter:t,onFilterChange:e}),(0,r.jsx)(N,{filter:t})]})}function T(){return(0,r.jsx)(s.OV,{children:(0,r.jsx)(k,{})})}},7027:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(6029);n(5729);var a=n(9099),s=n(6930),i=n(2280);let o=t=>{let{className:e=""}=t,n=(0,a.useRouter)(),{user:o}=(0,s.A)(),l=(0,i.wS)(n.pathname,(null==o?void 0:o.firstName)||void 0),c=(0,i.Wt)(n.pathname);return l||c?(0,r.jsxs)("div",{className:"mb-[20px] ".concat(e),children:[l&&(0,r.jsx)("h1",{className:"text-[20px] leading-[26px] font-bold text-[var(--text-dark)] mb-2",children:l}),c&&(0,r.jsx)("p",{className:"text-[16px] leading-[26px] font-medium text-[var(--text-secondary)] tracking-[0px]",children:c})]}):null}},7968:(t,e,n)=>{"use strict";n.d(e,{N:()=>a,Q:()=>r});let r=t=>t&&"string"==typeof t?t.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase()):"",a=t=>t&&"string"==typeof t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():t||""},9573:(t,e,n)=>{"use strict";n.d(e,{OV:()=>o});var r=n(5729),a=n(9099),s=n(6930),i=n(2275);let o=t=>{let{children:e,redirectTo:n="/login"}=t,{isAuthenticated:o,isRehydrated:l}=(0,s.A)(),c=(0,a.useRouter)(),[u,d]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{if(l){if(!o){let t=encodeURIComponent(c.asPath);c.push("".concat(n,"?returnTo=").concat(t));return}d(!1)}},[o,l,c,n]),!l||u)?r.createElement(i.Gu,{message:"Loading...",minHeightClassName:"min-h-screen"}):o?r.createElement(r.Fragment,null,e):null}},9663:(t,e,n)=>{"use strict";n.d(e,{Dw:()=>h,JC:()=>c,NA:()=>f,co:()=>d,pP:()=>u});var r=n(4312),a=n.n(r),s=n(3483),i=n.n(s),o=n(9856),l=n.n(o);a().extend(i()),a().extend(l());let c=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"MMM DD, YYYY HH:mm";if(!t)return"";try{return a().utc(t).tz(e||"UTC").format(n)}catch(e){return a()(t).format(n)}},u=()=>{let t=[];for(let e=0;e<24;e++){let n="".concat(e.toString().padStart(2,"0"),":00");t.push(n)}return t},d=t=>{let e=a()().format("YYYY-MM-DD"),n=[...t].sort();return n.find(t=>t>=e)||n[0]},f=(t,e)=>t?"Friday Giving"===e?(()=>{let t=[],e=a()();for(let n=0;n<12;n++){let r=e.add(7*n,"day").day(5);(r.isAfter(e)||r.isSame(e,"day"))&&t.push(r.format("dddd, MMMM D, YYYY"))}return t})():"Daily Giving"===e&&t.toLowerCase().includes("except")&&t.toLowerCase().includes("friday")?(()=>{let t=[],e=a()();for(let n=1;n<=30;n++){let r=e.add(n,"day");5!==r.day()&&t.push(r.format("dddd, MMMM D, YYYY"))}return t})():(()=>{let t=[],e=a()();for(let n=1;n<=90;n++){let r=e.add(n,"day");t.push(r.format("dddd, MMMM D, YYYY"))}return t})():[],h=(t,e,n)=>{if("Daily Giving"===n&&(null==e?void 0:e.toLowerCase().includes("except"))&&(null==e?void 0:e.toLowerCase().includes("friday")))return(()=>{let t=[],e=a()();for(let n=1;n<=90;n++){let r=e.add(n,"day");5!==r.day()&&t.push(r.format("YYYY-MM-DD"))}return t})();if("Friday Giving"===n)return t.map(t=>(t=>a()(t,"dddd, MMMM D, YYYY",!0).isValid()?a()(t,"dddd, MMMM D, YYYY").format("YYYY-MM-DD"):a()(t).isValid()?a()(t).format("YYYY-MM-DD"):"")(t)).filter(t=>!!t);let r=[],s=a()();for(let t=1;t<=90;t++){let e=s.add(t,"day");r.push(e.format("YYYY-MM-DD"))}return r}},9856:function(t){t.exports=function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,r,a){var s,i=function(t,n,r){void 0===r&&(r={});var a,s,i,o,l=new Date(t);return(void 0===(a=r)&&(a={}
1),(o=e[i=n+"|"+(s=a.timeZoneName||"short")])||(o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:s}),e[i]=o),o).formatToParts(l)},o=function(e,n){for(var r=i(e,n),s=[],o=0;o<r.length;o+=1){var l=r[o],c=l.type,u=l.value,d=t[c];d>=0&&(s[d]=parseInt(u,10))}var f=s[3],h=s[0]+"-"+s[1]+"-"+s[2]+" "+(24===f?0:f)+":"+s[4]+":"+s[5]+":000",m=+e;return(a.utc(h).valueOf()-(m-=m%1e3))/6e4},l=r.prototype;l.tz=function(t,e){void 0===t&&(t=s);var n,r=this.utcOffset(),i=this.toDate(),o=i.toLocaleString("en-US",{timeZone:t}),l=Math.round((i-new Date(o))/1e3/60),c=-(15*Math.round(i.getTimezoneOffset()/15))-l;if(Number(c)){if(n=a(o,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),e){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,e);return n.$x.$timezone=t,n},l.offsetName=function(t){var e=this.$x.$timezone||a.tz.guess(),n=i(this.valueOf(),e,{timeZoneName:t}).find(function(t){return"timezonename"===t.type.toLowerCase()});return n&&n.value};var c=l.startOf;l.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return c.call(this,t,e);var n=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,t,e).tz(this.$x.$timezone,!0)},a.tz=function(t,e,n){var r=n&&e,i=n||e||s,l=o(+a(),i);if("string"!=typeof t)return a(t).tz(i);var c=function(t,e,n){var r=t-60*e*1e3,a=o(r,n);if(e===a)return[r,e];var s=o(r-=60*(a-e)*1e3,n);return a===s?[r,a]:[t-60*Math.min(a,s)*1e3,Math.max(a,s)]}(a.utc(t,r).valueOf(),l,i),u=c[0],d=c[1],f=a(u).utcOffset(d);return f.$x.$timezone=i,f},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(t){s=t}}}()}},t=>{t.O(0,[636,593,792],()=>t(t.s=3212)),_N_E=t.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.