PageSourceSearch

https://opencollective.com/_next/static/chunks/1101-c3273c8433cb4b44.js

js opencollective.com collected 2026-09-24 08:36:33 UTC 65,878 bytes, 707 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:opencollective-frontend":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="24267546-1780-497e-8f79-8f6046fa5f39",e._sentryDebugIdIdentifier="sentry-dbid-24267546-1780-497e-8f79-8f6046fa5f39")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1101],{35:(e,t,i)=>{"use strict";i.d(t,{T:()=>a});var r=i(37876);i(14232);var n=i(20322),s=i(1509);function a({options:e,selected:t,onChange:i,error:o,className:l,getKey:c=e=>e.toString()}){return(0,r.jsx)("div",{className:(0,n.cn)("mt-2 flex flex-wrap items-center gap-2",l),children:e.map(e=>(0,r.jsx)(s.$n,{type:"button",variant:t===e.value?"default":"outline",onClick:()=>t!==e.value&&i(e.value),className:(0,n.cn)({"border-red-500":o}),children:e.label},c(e.value)))})}},4281:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var r=i(37876);i(14232);var n=i(45884),s=i(61184),a=i(8545),o=i(47537),l=i(69020);let c=({children:e,data:t={},description:i,image:l,loadingLoggedInUser:c,LoggedInUser:d,title:u,metaTitle:m,noRobots:h,twitterHandle:x,showSearch:p=!0,canonicalURL:g,collective:v,showMenuItems:f=!0,withTopBar:b=!0,showFooter:y=!0,showProfileAndChangelogMenu:j=!0,loading:C,updatesRss:A})=>t.error?(0,r.jsx)(a.A,{data:t,LoggedInUser:d}):(0,r.jsxs)("div",{className:"flex min-h-screen flex-col",children:[(0,r.jsx)(o.A,{showSearch:p,title:u,noRobots:h,twitterHandle:x,description:i,image:l,metaTitle:m,canonicalURL:g,collective:v,showMenuItems:f,LoggedInUser:d,showProfileAndChangelogMenu:j,loading:C,withTopBar:b,updatesRss:A}),(0,r.jsx)(s.A,{className:"flex-1",children:"function"==typeof e?e({LoggedInUser:d,loadingLoggedInUser:c}):e}),y&&(0,r.jsx)(n.A,{})]});c.displayName="Page";let d=(0,l.Cb)(c)},9706:(e,t,i)=>{"use strict";i.d(t,{z:()=>p});var r=i(37876),n=i(14232),s=i(46525),a=i(90281),o=i(62449),l=i(2948),c=i(16907),d=i(20322),u=i(65221),m=i(99271),h=i(28561),x=i(32337);function p({label:e,showError:t=!0,name:i,hint:g,placeholder:v,children:f,error:b,isPrivate:y,privateMessage:j,validate:C,className:A,labelClassName:w,hintClassName:N,errorClassName:k,isFastField:T=!1,...S}){let E=(0,o.tz)(),I=S.htmlFor||`input-${i}`,{schema:R}=(0,n.useContext)(x.Ft),M=T?s.B0:s.D0;return(0,r.jsx)(M,{name:i,validate:C,children:({field:s,form:p,meta:C})=>{let T=!!(C.error&&(C.touched||p.submitCount))||!!b,M=b||C.error,L={...R?(0,x.gS)(R,i):null,...(0,a.A)({...s,name:i||I,id:I,type:S.inputType||S.type,disabled:S.disabled,min:S.min,max:S.max,required:S.required,error:T,placeholder:v,autoFocus:S.autoFocus,autoComplete:S.autoComplete,ref:S.ref,onFocus:S.onFocus,onChange:S.onChange||s.onChange},e=>void 0!==e)};return"required"in L&&!L.required&&C.error&&C.error===E.formatMessage(c.dv.requiredValue)&&(L.required=!0),(0,r.jsxs)("div",{className:(0,d.cn)("flex w-full flex-col gap-1",A),children:[e&&(0,r.jsxs)(h.J,{className:(0,d.cn)("leading-normal",w),htmlFor:I,children:[e," ","required"in L&&!L.required&&(0,r.jsxs)("span",{className:"font-normal text-muted-foreground",children:["(",(0,r.jsx)(o.sA,{defaultMessage:"optional",id:"FormField.optional"}),")"]}),y&&(0,r.jsxs)(n.Fragment,{children:["\xa0",(0,r.jsx)(u.A,{children:j})]})]}),f?f({form:p,meta:C,field:L}):(0,r.jsx)(m.pd,{...L}),g&&(0,r.jsx)("p",{className:(0,d.cn)("text-sm text-muted-foreground",N),children:g}),T&&t&&(0,r.jsx)("p",{className:(0,d.cn)("text-sm text-red-600",k),children:(0,l.nm)(M)?(0,c.p6)(E,M):"string"==typeof M?M:JSON.stringify(M)||"Error"})]})}})}},17460:(e,t,i)=>{"use strict";i.d(t,{G:()=>w,_:()=>A});var r=i(37876);i(14232);var n=i(33448),s=i(18636),a=i(22528),o=i(83182),l=i(68282),c=i(45822),d=i(31267),u=i(38582),m=i(56953),h=i(23865),x=i(58997),p=i(82607),g=i(77149),v=i(61497),f=i(45541
1),b=i(50730),y=i(91280),j=i(33123);let C={[j._xK.BLUESKY]:e=>(0,r.jsx)("svg",{width:e.size,height:e.size,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",stroke:"none",fill:"currentcolor",children:(0,r.jsx)("path",{d:"M123.6 34.5c66.4 50.1 137.9 151.5 164.2 206C314 186 385.5 84.5 452 34.5c48-36.1 125.6-64.1 125.6 24.9c0 17.8-10.1 149.2-16.1 170.5c-20.7 74.2-96.1 93.1-163.1 81.6c117.2 20 147 86.3 82.6 152.6C358.7 590 305.2 432.5 291.5 392.1c-2.5-7.5-3.7-10.9-3.7-7.9c0-3.1-1.2 .4-3.7 7.9C270.4 432.5 216.9 590 94.6 464.1C30.2 397.8 60 331.5 177.2 311.5C110.2 322.9 34.8 304 14.1 229.8C8.1 208.5-2 77.1-2 59.3c0-88.9 77.7-61 125.6-24.9z"})}),[j._xK.DISCORD]:n.b,[j._xK.DISCOURSE]:s.Y,[j._xK.FACEBOOK]:d.f,[j._xK.GHOST]:h.q,[j._xK.GIT]:y.A,[j._xK.GITHUB]:u.C,[j._xK.GITLAB]:m.m,[j._xK.INSTAGRAM]:x.p,[j._xK.LINKEDIN]:p.v,[j._xK.MASTODON]:a.i,[j._xK.MATTERMOST]:h.q,[j._xK.MEETUP]:o.n,[j._xK.PEERTUBE]:h.q,[j._xK.PIXELFED]:b.m,[j._xK.SLACK]:g.v,[j._xK.THREADS]:e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:e.size,height:e.size,stroke:"none",fill:"currentcolor",children:(0,r.jsx)("path",{d:"M331.5 235.7c2.2 .9 4.2 1.9 6.3 2.8c29.2 14.1 50.6 35.2 61.8 61.4c15.7 36.5 17.2 95.8-30.3 143.2c-36.2 36.2-80.3 52.5-142.6 53h-.3c-70.2-.5-124.1-24.1-160.4-70.2c-32.3-41-48.9-98.1-49.5-169.6V256v-.2C17 184.3 33.6 127.2 65.9 86.2C102.2 40.1 156.2 16.5 226.4 16h.3c70.3 .5 124.9 24 162.3 69.9c18.4 22.7 32 50 40.6 81.7l-40.4 10.8c-7.1-25.8-17.8-47.8-32.2-65.4c-29.2-35.8-73-54.2-130.5-54.6c-57 .5-100.1 18.8-128.2 54.4C72.1 146.1 58.5 194.3 58 256c.5 61.7 14.1 109.9 40.3 143.3c28 35.6 71.2 53.9 128.2 54.4c51.4-.4 85.4-12.6 113.7-40.9c32.3-32.2 31.7-71.8 21.4-95.9c-6.1-14.2-17.1-26-31.9-34.9c-3.7 26.9-11.8 48.3-24.7 64.8c-17.1 21.8-41.4 33.6-72.7 35.3c-23.6 1.3-46.3-4.4-63.9-16c-20.8-13.8-33-34.8-34.3-59.3c-2.5-48.3 35.7-83 95.2-86.4c21.1-1.2 40.9-.3 59.2 2.8c-2.4-14.8-7.3-26.6-14.6-35.2c-10-11.7-25.6-17.7-46.2-17.8H227c-16.6 0-39 4.6-53.3 26.3l-34.4-23.6c19.2-29.1 50.3-45.1 87.8-45.1h.8c62.6 .4 99.9 39.5 103.7 107.7l-.2 .2zm-156 68.8c1.3 25.1 28.4 36.8 54.6 35.3c25.6-1.4 54.6-11.4 59.5-73.2c-13.2-2.9-27.8-4.4-43.4-4.4c-4.8 0-9.6 .1-14.4 .4c-42.9 2.4-57.2 23.2-56.2 41.8l-.1 .1z"})}),[j._xK.TIKTOK]:l.T,[j._xK.TUMBLR]:c.p,[j._xK.TWITCH]:v.Y,[j._xK.TWITTER]:e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:e.size,height:e.size,stroke:"none",fill:"currentcolor",children:(0,r.jsx)("path",{d:"M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"})}),[j._xK.WEBSITE]:h.q,[j._xK.YOUTUBE]:f.k},A={[j._xK.BLUESKY]:"Bluesky",[j._xK.DISCORD]:"Discord",[j._xK.DISCOURSE]:"Discourse",[j._xK.FACEBOOK]:"Facebook",[j._xK.GHOST]:"Ghost",[j._xK.GIT]:"Git Repository",[j._xK.GITHUB]:"GitHub",[j._xK.GITLAB]:"GitLab",[j._xK.INSTAGRAM]:"Instagram",[j._xK.LINKEDIN]:"LinkedIn",[j._xK.MASTODON]:"Mastodon",[j._xK.MATTERMOST]:"Mattermost",[j._xK.MEETUP]:"Meetup",[j._xK.PEERTUBE]:"PeerTube",[j._xK.PIXELFED]:"Pixelfed",[j._xK.SLACK]:"Slack",[j._xK.THREADS]:"Threads",[j._xK.TIKTOK]:"TikTok",[j._xK.TUMBLR]:"Tumblr",[j._xK.TWITCH]:"Twitch",[j._xK.TWITTER]:"X",[j._xK.WEBSITE]:"Website",[j._xK.YOUTUBE]:"YouTube"};function w(e){return C[e]||h.q}},22688:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var r=i(37876),n=i(14232),s=i(12815),a=i(72976),o=i(62449),l=i(84951),c=i(7585);let d=({count:e,selected:t})=>{var i;return(0,a.A)(e)?null:(0,r.jsx)("span",{className:(0,s.$)("inline-block rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",t?"bg-primary/10 text-primary":"bg-muted text-foreground"),children:(i=e)>=1e9?`${(i/1e9).toFixed(1)}B`:i>=1e6?`${(i/1e6).toFixed(1)}M`:i>=1e3?`${(i/1e3).toFixed(1)}K`:i})},u=n.memo(({tabs:e,selectedId:t,onChange:i,...n})=>{let{viewport:u}=(0,l.G4)(),m=(0,o.tz)();return u===l.y8.XSMALL?(0,r.jsxs)(c.l6,{onValueChange:e=>i(e),value:t??"",children:[(0,r.jsx)(c.bq,{"data-cy":`view-${t}`,className:t&&"font-medium text-primary",children:(0,r.jsx)(c.yv,{className:"font-bold",placeholder:m.formatMessage({defaultMessage:"Select a view",id:"n8TgCC"})})}),(0,r.jsx)(c.gC,{children:e.map(e=>(0,r.jsxs)(c.eb,{value:e.id,className:"",children:[(0,r.jsx)("span",{children:e.label})," ",(0,r.jsx)(d,{count:e.count})]},e.id))})]}):"vertical"===n.variant?(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>{let n=e.id===t;return(0,r.jsxs)("button",{onClick:()=>i?.(e.id),className:(0,s.$)("ring-ringtransition-colors flex items-center justify-between gap-2 rounded-md px-2 py-1 
1whitespace-nowrap ring-inset focus:outline-hidden focus-visible:ring-2",n?"bg-primary/10":"hover:border-border hover:text-foreground/80"),children:[(0,r.jsx)("div",{className:"font-bold",children:e.label}),!(0,a.A)(e.count)&&!isNaN(e.count)&&(0,r.jsxs)("div",{className:"text-xs text-slate-600",children:["(",e.count,")"]})]},e.id)})}):(0,r.jsx)("div",{className:"border-b",...n,children:(0,r.jsx)("div",{className:"-mb-px flex space-x-6 overflow-x-auto",children:e.map(e=>{let n=e.id===t;return(0,r.jsxs)("button",{type:"button",onClick:()=>i?.(e.id),className:(0,s.$)("flex gap-3 border-b-2 px-1 pt-2 pb-4 text-sm font-medium whitespace-nowrap ring-ring transition-colors ring-inset focus:outline-hidden focus-visible:ring-2",n?"border-primary text-primary":"border-transparent text-muted-foreground hover:border-border hover:text-foreground/80"),children:[e.label," ",(0,r.jsx)(d,{count:e.count,selected:n})]},e.id)})})})})},22696:(e,t,i)=>{"use strict";i.d(t,{X:()=>r});let r=(0,i(5646).AH)(["@media (pointer:fine){&::-webkit-scrollbar{height:8px;margin:0 16px;}&::-webkit-scrollbar-thumb{background:#d1d1d3;border-radius:16px;&:hover{background:#aaa;}}&::-webkit-scrollbar-track{background:#f2f3f4;border-radius:20px;}&::-webkit-scrollbar-button{color:white;}}"])},28221:(e,t,i)=>{"use strict";i.d(t,{F:()=>o});var r=i(37876),n=i(67314),s=i.n(n);i(14232);var a=i(64656);function o({color:e}){if(!e)return null;let t=(0,a.iC)(e);return(0,r.jsx)(s(),{id:"3ecfee3d37026b87",dynamic:[t.hue,100*t.saturation,100*t.lightness,t.hue,100*t.saturation/2,98],children:`:root{--primary:hsl(${t.hue}, ${100*t.saturation}%, ${100*t.lightness}%);--primary-foreground:hsl(${t.hue}, ${100*t.saturation/2}%, 98%)}`})}},28561:(e,t,i)=>{"use strict";i.d(t,{J:()=>c});var r=i(37876),n=i(14232),s=i(24299),a=i(65971),o=i(20322);let l=(0,a.F)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=n.forwardRef(({className:e,...t},i)=>(0,r.jsx)(s.b,{ref:i,className:(0,o.cn)(l(),e),...t}));c.displayName=s.b.displayName},34149:(e,t,i)=>{"use strict";i.d(t,{X:()=>l,j:()=>o});var r=i(37876);i(14232);var n=i(48230),s=i.n(n),a=i(20322);let o=({className:e="",centered:t=!0,...i})=>(0,r.jsx)("div",{className:(0,a.cn)("flex h-full gap-8",t&&"justify-center",e),...i}),l=({className:e="",children:t,href:i,active:n,count:o,...l})=>(0,r.jsxs)(s(),{href:i,className:(0,a.cn)("relative flex h-full items-center gap-1.5 border-b-[3px] px-1 text-sm antialiased hover:text-primary","border-transparent font-medium transition-colors",n&&"border-black",e),...l,children:[t," ",o>0&&(0,r.jsx)("div",{className:"relative -top-1 align-top text-xs text-primary",children:o})]})},34706:e=>{function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=34706,e.exports=t},59979:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(37876);i(14232);var n=i(17460),s=i(20322),a=i(69756);function o({socialLinks:e,className:t}){return(0,r.jsx)("div",{className:"flex justify-center gap-1",children:e.map((e,i)=>{let o=(0,n.G)(e.type);return(0,r.jsx)(a.A,{"data-cy":`social-link-${i}`,href:e.url,className:(0,s.cn)("flex size-8 items-center justify-center rounded-full hover:bg-primary/10",t),children:(0,r.jsx)(o,{size:16})},e.type+e.url)})})}},63055:(e,t,i)=>{"use strict";i.d(t,{J$:()=>a,Pq:()=>n,Rd:()=>l,z:()=>s,zY:()=>o});var r=i(88490);let n=(0,r.J1)`
2  query Updates($slug: String!) {
3    account(slug: $slug) {
4      updates(onlyPublishedUpdates: true) {
5        totalCount
6        nodes {
7          id
8          title
9          html
10          slug
11          summary
12          reactions
13          userReactions
14          userCanSeeUpdate
15          publishedAt
16          fromAccount {
17            id
18            name
19            slug
20            imageUrl
21            type
22          }
23          comments {
24            totalCount
25          }
26        }
27      }
28    }
29  }
30`,s=(0,r.J1)`
31  query ProfilePage($slug: String!) {
32    account(slug: $slug) {
33      id
34      name
35      slug
36      imageUrl
37      description
38      longDescription
39      backgroundImageUrl
40      settings
41      type
42      currency
43      isActive
44      socialLinks {
45        type
46        url
47      }
48
49      updates(onlyPublishedUpdates: true) {
50        totalCount
51        nodes {
52          id
53          title
54          html
55          slug
56          summary
57          reactions
58          userReactions
59          userCanSeeUpdate
60          publishedAt
61          fromAccount {
62            id
63            name
64            slug
65            imageUrl
66            type
67          }
68          comments {
69            totalCount
70          }
71        }
72      }
73      expenses(limit: 20, direction: RECEIVED, status: PAID) {
74        totalCount
75        nodes {
76          id
77          description
78          type
79          status
80          createdAt
81          payee {
82            id
83            name
84            type
85            imageUrl
86            slug
87          }
88          account {
89            id
90            name
91            type
92            imageUrl
93            slug
94          }
95          amountV2 {
96            valueInCents
97            currency
98          }
99        }
100      }
101
102      contributionTransactions: transactions(
103        limit: 20
104        kind: [CONTRIBUTION, ADDED_FUNDS]
105        isRefund: false
106        type: CREDIT
107      ) {
108        totalCount
109        nodes {
110          id
111          description
112          createdAt
113          type
114          kind
115          fromAccount {
116            id
117            name
118            type
119            slug
120            imageUrl
121          }
122          toAccount {
123            id
124            name
125            type
126            slug
127            imageUrl
128          }
129          amount {
130            valueInCents
131            currency
132          }
133        }
134      }
135      ... on AccountWithParent {
136        parent {
137          id
138          slug
139          name
140          settings
141          imageUrl
142        }
143      }
144      ... on AccountWithHost {
145        host {
146          id
147          slug
148          name
149          imageUrl
150        }
151      }
152
153      ... on AccountWithContributions {
154        tiers {
155          totalCount
156          nodes {
157            id
158            name
159            slug
160            type
161            description
162            button
163            amount {
164              valueInCents
165              currency
166            }
167            currency
168            minimumAmount {
169              valueInCents
170              currency
171            }
172            endsAt
173            amountType
174            frequency
175            availableQuantity
176          }
177        }
178
179        financialContributors: contributors(roles: [BACKER], limit: 150) {
180          totalCount
181          nodes {
182            id
183            name
184            roles
185            isAdmin
186            isCore
187            isBacker
188            since
189            image
190            description
191            collectiveSlug
192            totalAmountDonated
193            type
194            publicMessage
195            isIncognito
196          }
197        }
198      }
199      childrenAccounts {
200        nodes {
201          id
202          name
203          description
204          type
205          slug
206          settings
207          currency
208          stats {
209            totalAmountReceived {
210              valueInCents
211              currency
212            }
213            yearlyBudget {
214              valueInCents
215              currency
216            }
217            contributorsCount
218          }
219        }
220      }
221
222      stats {
223        totalAmountReceived {
224          valueInCents
225          currency
226        }
227        yearlyBudget {
228          valueInCents
229          currency
230        }
231        contributorsCount
232      }
233    }
234  }
235`,a=(0,r.J1)`
236  query ProfileLayout($collectiveSlug: String!, $accountSlug: String, $includeAccount: Boolean!) {
237    account: account(slug: $accountSlug) @include(if: $includeAccount) {
238      id
239      name
240      slug
241      settings
242      type
243      description
244      longDescription
245      backgroundImageUrl
246      currency
247      stats {
248        yearlyBudget {
249          valueInCents
250          currency
251        }
252        totalAmountReceived(net: true) {
253          valueInCents
254          currency
255        }
256        totalAmountReceivedThisMonth: totalAmountReceived(
257          net: true
258          dateFrom: "2024-02-01T00:00:00.000Z"
259          dateTo: "2024-03-01T00:00:00.000Z"
260        ) {
261          valueInCents
262          currency
263        }
264        totalAmountReceivedThisYear: totalAmountReceived(
265          net: true
266          dateFrom: "2024-01-01T00:00:00.000Z"
267          dateTo: "2025-01-01T00:00:00.000Z"
268        ) {
269          valueInCents
270          currency
271        }
272      }
273      ... on AccountWithParent {
274        parent {
275          id
276          slug
277        }
278      }
279      # TODO: mutualize the account stuff as a fragment
280      ... on AccountWithContributions {
281        financialContributors: contributors(roles: [BACKER], limit: 5) {
282          totalCount
283          nodes {
284            id
285            name
286            roles
287            isAdmin
288            isCore
289            isBacker
290            since
291            image
292            description
293            collectiveSlug
294            totalAmountDonated
295            type
296            publicMessage
297            isIncognito
298          }
299        }
300      }
301    }
302    collective: account(slug: $collectiveSlug) {
303      id
304      name
305      slug
306      imageUrl
307      description
308      longDescription
309      backgroundImageUrl
310      settings
311      type
312      currency
313      isActive
314      socialLinks {
315        type
316        url
317      }
318      stats {
319        yearlyBudget {
320          valueInCents
321          currency
322        }
323        totalAmountReceived(net: true) {
324          valueInCents
325          currency
326        }
327        totalAmountReceivedThisMonth: totalAmountReceived(
328          net: true
329          dateFrom: "2024-02-01T00:00:00.000Z"
330          dateTo: "2024-03-01T00:00:00.000Z"
331        ) {
332          valueInCents
333          currency
334        }
335        totalAmountReceivedThisYear: totalAmountReceived(
336          net: true
337          dateFrom: "2024-01-01T00:00:00.000Z"
338          dateTo: "2025-01-01T00:00:00.000Z"
339        ) {
340          valueInCents
341          currency
342        }
343      }
344      ... on AccountWithContributions {
345        tiers {
346          totalCount
347          nodes {
348            id
349            name
350            slug
351            type
352            description
353            button
354            amount {
355              valueInCents
356              currency
357            }
358            currency
359            minimumAmount {
360              valueInCents
361              currency
362            }
363            endsAt
364            amountType
365            frequency
366            availableQuantity
367          }
368        }
369        financialContributors: contributors(roles: [BACKER], limit: 5) {
370          totalCount
371          nodes {
372            id
373            name
374            roles
375            isAdmin
376            isCore
377            isBacker
378            since
379            image
380            description
381            collectiveSlug
382            totalAmountDonated
383            type
384            publicMessage
385            isIncognito
386          }
387        }
388      }
389
390      updates(onlyPublishedUpdates: true) {
391        totalCount
392      }
393      expenses(limit: 0, direction: RECEIVED, status: PAID, includeChildrenExpenses: true) {
394        totalCount
395      }
396
397      ... on AccountWithParent {
398        parent {
399          id
400          slug
401          name
402          settings
403          imageUrl
404        }
405      }
406      ... on AccountWithHost {
407        host {
408          id
409          slug
410          name
411          imageUrl
412        }
413      }
414      childrenAccounts {
415        nodes {
416          id
417          name
418          description
419          type
420          slug
421          settings
422          currency
423          stats {
424            totalAmountReceived {
425              valueInCents
426              currency
427            }
428            yearlyBudget {
429              valueInCents
430              currency
431            }
432            contributorsCount
433          }
434        }
435      }
436    }
437  }
438`,o=(0,r.J1)`
439  query ContributePage($slug: String!) {
440    account(slug: $slug) {
441      id
442      name
443      slug
444      imageUrl
445      longDescription
446      backgroundImageUrl
447      settings
448      type
449      currency
450      isActive
451
452      stats {
453        totalAmountReceived {
454          valueInCents
455          currency
456        }
457        yearlyBudget {
458          valueInCents
459          currency
460        }
461        contributorsCount
462      }
463      ... on AccountWithContributions {
464        tiers {
465          totalCount
466          nodes {
467            id
468            name
469            slug
470            type
471            description
472            button
473            amount {
474              valueInCents
475              currency
476            }
477            currency
478            minimumAmount {
479              valueInCents
480              currency
481            }
482            endsAt
483            amountType
484            frequency
485            availableQuantity
486          }
487        }
488
489        financialContributors: contributors(roles: [BACKER], limit: 5) {
490          totalCount
491          nodes {
492            id
493            name
494            roles
495            isAdmin
496            isCore
497            isBacker
498            since
499            image
500            description
501            collectiveSlug
502            totalAmountDonated
503            type
504            publicMessage
505            isIncognito
506          }
507        }
508      }
509
510      ... on AccountWithParent {
511        parent {
512          id
513          slug
514          name
515          settings
516          imageUrl
517        }
518      }
519    }
520    projects: accounts(
521      parent: { slug: $slug }
522      type: [PROJECT]
523      isActive: true
524      orderBy: { field: BALANCE, direction: DESC }
525    ) {
526      totalCount
527      nodes {
528        id
529        name
530        description
531        type
532        slug
533        settings
534        currency
535        stats {
536          totalAmountReceived {
537            valueInCents
538            currency
539          }
540          yearlyBudget {
541            valueInCents
542            currency
543          }
544          contributorsCount
545        }
546      }
547    }
548    events: accounts(
549      parent: { slug: $slug }
550      type: [EVENT]
551      isActive: true
552      orderBy: { field: BALANCE, direction: DESC }
553    ) {
554      totalCount
555      nodes {
556        id
557        name
558        description
559        type
560        slug
561        settings
562        currency
563        stats {
564          totalAmountReceived {
565            valueInCents
566            currency
567          }
568          yearlyBudget {
569            valueInCents
570            currency
571          }
572          contributorsCount
573        }
574      }
575    }
576  }
577`,l=(0,r.J1)`
578  query GoalProgress($slug: String!, $oneYearAgo: DateTime, $thisMonthStart: DateTime, $thisYearStart: DateTime) {
579    account(slug: $slug) {
580      id
581      slug
582      type
583      currency
584      ... on AccountWithContributions {
585        activeContributors(limit: 5) {
586          totalCount
587          limit
588          nodes {
589            id
590            name
591            slug
592            type
593            imageUrl
594          }
595        }
596        activeContributorsForBudgetGoal: activeContributors(
597          includeActiveRecurringContributions: true
598          dateFrom: $oneYearAgo
599          limit: 5
600        ) {
601          totalCount
602          limit
603          nodes {
604            id
605            name
606            slug
607            type
608            imageUrl
609          }
610        }
611        activeContributorsForYearlyBudget: activeContributors(
612          includeActiveRecurringContributions: true
613          dateFrom: $oneYearAgo
614          limit: 5
615        ) {
616          totalCount
617          limit
618          nodes {
619            id
620            name
621            slug
622            type
623            imageUrl
624          }
625        }
626        activeContributorsForCalendarYear: activeContributors(dateFrom: $thisYearStart, limit: 5) {
627          totalCount
628          limit
629          nodes {
630            id
631            name
632            slug
633            type
634            imageUrl
635          }
636        }
637        activeContributorsForCalendarMonth: activeContributors(dateFrom: $thisMonthStart, limit: 5) {
638          totalCount
639          limit
640          nodes {
641            id
642            name
643            slug
644            type
645            imageUrl
646          }
647        }
648      }
649
650      stat
650s {
651        yearlyBudget {
652          valueInCents
653          currency
654        }
655        totalAmountReceived(net: true) {
656          valueInCents
657          currency
658        }
659        totalAmountReceivedThisMonth: totalAmountReceived(net: true, dateFrom: $thisMonthStart) {
660          valueInCents
661          currency
662        }
663        totalAmountReceivedThisYear: totalAmountReceived(net: true, dateFrom: $thisYearStart) {
664          valueInCents
665          currency
666        }
667      }
668      members(role: [BACKER], limit: 5) {
669        totalCount
670        limit
671        nodes {
672          id
673          account {
674            id
675            name
676            slug
677            type
678            imageUrl
679          }
680        }
681      }
682    }
683  }
684`},67246:(e,t,i)=>{"use strict";i.d(t,{A:()=>eu});var r=i(37876),n=i(14232),s=i(670),a=i(37505),o=i(89099),l=i(4281),c=i(51391),d=i(62449),u=i(60257),m=i(87058),h=i(33341),x=i(69756),p=i(1509),g=i(64177),v=i(46525),f=i(2948),b=i(20322),y=i(27479),j=i(9706),C=i(32337),A=i(22688),w=i(63037),N=i(7585),k=i(51778),T=i(80207),S=i(88114),E=i(88490),I=i(12815),R=i(97268),M=i(35),L=i(16255),$=i(99271),F=i(28561),z=i(12112),U=i(35205),D=i(68341);function Y({title:e,description:t,children:i}){return(0,r.jsxs)("div",{className:"grid grid-cols-12 gap-4",children:[(0,r.jsxs)("div",{className:"col-span-full md:col-span-4",children:[(0,r.jsx)("div",{className:"text-lg font-medium",children:e}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:t})]}),(0,r.jsx)("div",{className:"col-span-full md:col-span-8 md:col-start-6",children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:i})})]})}function _({value:e,onChange:t}){return(0,r.jsx)("div",{children:(0,r.jsxs)(z.AM,{children:[(0,r.jsx)(z.Wv,{asChild:!0,children:(0,r.jsxs)(p.$n,{variant:"outline",className:"gap-2",children:[(0,r.jsx)("div",{className:"size-4 rounded bg-primary",style:{backgroundColor:e}}),e]})}),(0,r.jsx)(z.hl,{align:"start",className:"w-auto",children:(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:["#f97316","#f59e0b","#16a34a","#14b8a6","#0284c7","#1d4ed8","#4f46e5","#c026d3","#db2777","#475569","#020617"].map(e=>(0,r.jsx)("button",{onClick:()=>t(e),className:"size-6 rounded-md",style:{backgroundColor:e}},e))}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"color",value:e,onChange:({target:e})=>t(e.value),className:(0,I.$)("size-10 cursor-pointer appearance-none overflow-hidden rounded-md border bg-transparent p-2.5","[&::-moz-color-swatch]:rounded [&::-moz-color-swatch]:border-none [&::-moz-focus-inner]:p-0","[&::-webkit-color-swatch]:rounded [&::-webkit-color-swatch]:border-none [&::-webkit-color-swatch-wrapper]:p-0")}),(0,r.jsx)($.MG,{prepend:"#",value:e?.replace("#",""),onChange:e=>t(`#${e.target.value}`)})]})]})})]})})}let B=(0,E.J1)`
685  mutation EditCrowdfundingRedesignSettings($account: AccountReferenceInput!, $value: JSON!) {
686    editAccountSetting(account: $account, key: "crowdfundingRedesign", value: $value) {
687      id
688      settings
689    }
690  }
691`,O=({initialValues:e,schema:t,onSubmit:i})=>(0,r.jsx)(C.k1,{schema:t,initialValues:e,onSubmit:e=>i(t.parse(e)),children:e=>(0,r.jsx)(v.lV,{children:(0,r.jsxs)("div",{className:"flex flex-col items-start gap-4",children:[(0,r.jsx)(j.z,{name:"name",label:"Title"}),(0,r.jsx)(j.z,{name:"description",label:"Subtitle",hint:"Large, bold text that appears at the top of your page."}),(0,r.jsx)(j.z,{name:"primaryColor",label:"Theme color",children:({field:t})=>(0,r.jsx)(_,{...t,onChange:t=>e.setFieldValue("primaryColor",t)})}),(0,r.jsx)(p.$n,{type:"submit",loading:e.isSubmitting,children:(0,r.jsx)(d.sA,{defaultMessage:"Save",id:"save"})})]})})}),K=({initialValues:e,schema:t,onSubmit:i,account:s})=>{let[a,o]=n.useState(!1);return(0,r.jsx)(C.k1,{schema:t,initialValues:{goal:{amount:0,recurrence:null,continuous:!1,...e.goal}},onSubmit:async e=>{await i(t.parse(e)),o(!1)},children:n=>{if(!a)return e.goal?(0,r.jsx)("div",{className:"space-y-3 rounded-lg border p-4",children:(0,r.jsx)(D.r,{accountSlug:s.slug,goal:e.goal,editButton:(0,r.jsx)(p.$n,{size:"sm",onClick:()=>o(!0),className:"",variant:"outline",children:"Edit"})})}):(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(p.$n,{onClick:()=>o(!0),className:"",variant:"outline",children:"Set a goal"})," ",(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:"You can set 1 goal at a time. If you reach your goal, you'll be able to set a new one."})]});let l=n.values.goal?.type||e.goal?.type;return(0,r.jsx)(v.lV,{children:(0,r.jsxs)("div",{className:"flex flex-col items-start gap-4 roun
691ded-lg border",children:[(0,r.jsxs)("div",{className:"space-y-6 px-6 pt-6 pb-2",children:[(0,r.jsx)(j.z,{name:"goal.amount",label:"Amount you're aiming for",children:({field:e})=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)($.MG,{...e,onChange:t=>{n.setFieldValue(e.name,Number(t.target.value))},prepend:"$"}),(0,r.jsx)("span",{className:"text-muted-foreground",children:"MONTHLY"===l?"/month":"YEARLY"===l?"/year":null})]})}),(0,r.jsx)(j.z,{name:"goal.recurrence",label:"Is it recurring?",children:({field:e})=>(0,r.jsx)(M.T,{getKey:e=>e?e.toString():"null",options:[{value:null,label:"No"},{value:"MONTHLY",label:"Monthly"},{value:"YEARLY",label:"Yearly"}],selected:e.value,onChange:t=>{n.setFieldValue(e.name,t)}})}),(0,r.jsx)(L.Nt,{open:!!n.values.goal?.recurrence,children:(0,r.jsx)(L.Ke,{children:(0,r.jsx)(j.z,{name:"goal.continuous",children:({field:e})=>(0,r.jsxs)("div",{className:"mt-4 flex flex-row items-center justify-between gap-4 rounded-lg border p-4",children:[(0,r.jsxs)("div",{className:"space-y-0.5",children:[(0,r.jsx)(F.J,{className:"text-base",children:"Continuous calculation"}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Default goal progress calculation for recurring goals is based on calendar periods. For recurring monthly goals, goal progress is based on contributions made in a given calendar month (eg: May). For recurring yearly goals, goal progress is based on contributions made in the given year (eg: 2024)."}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Continuous calculation is an alternative calculation algorithm that is based on time relative to the present moment. For recurring monthly goals, goal progress is based on contribution made during the last 30 days. For recurring yearly goals, goal progress is based on contributions made during the last 365 days."})]})]}),(0,r.jsx)(U.d,{checked:e.value,onCheckedChange:e=>{n.setFieldValue("goal.continuous",e)}})]})})})})]}),(0,r.jsx)(k.w,{}),(0,r.jsxs)("div",{className:"w-full space-y-4 px-6 py-2",children:[(0,r.jsxs)("span",{className:"text-sm text-muted-foreground",children:[(0,r.jsx)("span",{className:"font-semibold",children:"Goal progress preview"})," (based on existing contributions)"]}),(0,r.jsx)(D.r,{accountSlug:s.slug,goal:n.values.goal})]}),(0,r.jsx)(k.w,{}),(0,r.jsxs)("div",{className:"flex w-full items-center justify-between gap-4 px-6 pt-2 pb-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(p.$n,{type:"submit",loading:n.isSubmitting,children:(0,r.jsx)(d.sA,{defaultMessage:"Save",id:"save"})}),(0,r.jsx)(p.$n,{variant:"outline",onClick:()=>o(!1),children:(0,r.jsx)(d.sA,{defaultMessage:"Cancel",id:"actions.cancel"})})]}),(0,r.jsx)(p.$n,{variant:"ghost",className:"text-red-700",onClick:async()=>{await i(t.parse({...e,goal:void 0})),o(!1)},children:"Remove goal"})]})]})})}})},V=({initialValues:e,schema:t,onSubmit:i})=>(0,r.jsx)(C.k1,{schema:t,initialValues:e,onSubmit:e=>i(t.parse(e)),children:e=>(0,r.jsx)(v.lV,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-lg font-medium",children:(0,r.jsx)(d.sA,{defaultMessage:"About",id:"collective.about.title"})}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:(0,r.jsx)(d.sA,{defaultMessage:"Tell your story and explain your purpose.",id:"SectionAbout.Why"})})]}),(0,r.jsx)(p.$n,{type:"submit",loading:e.isSubmitting,children:(0,r.jsx)(d.sA,{defaultMessage:"Save",id:"save"})})]}),(0,r.jsx)(j.z,{name:"longDescription",children:({field:t})=>(0,r.jsx)(R.default,{kind:"ACCOUNT_LONG_DESCRIPTION",...t,withStickyToolbar:!0,toolbarOffsetY:0,toolbarTop:[0,-80],defaultValue:t.value,onChange:t=>e.setFieldValue("longDescription",t.target.value),placeholder:"Tell your story...",toolbarBackgroundColor:"#F7F8FA",videoEmbedEnabled:!0,withBorders:!0})})]})})}),H=({schema:e,initialValues:t,onSubmit:i})=>{let s=n.useMemo(()=>[{id:"IMAGE",label:"Upload photo"},{id:"VIDEO",label:"Embed video"}],[]);return(0,r.jsx)(Y,{title:"Cover photo",description:"Add a cover photo to your fundraiser.",children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsx)(C.k1,{schema:e,initialValues:t,onSubmit:t=>i(e.parse(t)),children:e=>(0,r.jsx)(v.lV,{children:(0,r.jsxs)("div",{className:"flex flex-col items-start gap-4",children:[(0,r.jsx)("div",{className:"w-fit",children:(0,r.jsx)(A.A,{selectedId:e.values.cover.type,onCh
691ange:t=>e.setFieldValue("cover.type",t),tabs:s})}),"IMAGE"===e.values.cover.type?(0,r.jsx)(j.z,{name:"cover.url",children:({field:t})=>{let i=t.value&&(0,b.AY)(t.value);return(0,r.jsx)(y.Ay,{name:t.name,kind:"ACCOUNT_BANNER",accept:y.Uw,minSize:1e3,maxSize:1e7,isMulti:!1,showActions:!0,className:"size-48",onSuccess:i=>{i?e.setFieldValue(t.name,i.url):e.setFieldValue("cover",null)},value:i&&t.value})}}):(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)(j.z,{name:"cover.platform",label:"Video platform",children:({field:t})=>(0,r.jsxs)(N.l6,{...t,onValueChange:t=>e.setFieldValue("cover.platform",t),defaultValue:"youtube",children:[(0,r.jsx)(N.bq,{children:(0,r.jsx)(N.yv,{})}),(0,r.jsx)(N.gC,{children:[{label:"Youtube",value:"youtube"}].map(e=>(0,r.jsx)(N.eb,{value:e.value,children:e.label},e.value))})]})}),(0,r.jsx)(j.z,{name:"cover.videoUrl",label:"Video URL"})]}),(0,r.jsx)(p.$n,{type:"submit",loading:e.isSubmitting,onClick:()=>{"IMAGE"===e.values.cover.type?(e.setFieldValue("cover.platform",void 0),e.setFieldValue("cover.videoUrl",void 0)):"VIDEO"===e.values.cover.type&&(e.setFieldValue("cover.url",void 0),e.setFieldValue("cover.width",void 0),e.setFieldValue("cover.height",void 0))},children:(0,r.jsx)(d.sA,{defaultMessage:"Save",id:"save"})})]})})})})})};function P({account:e}){let[t]=(0,g.n)(B),i=(0,d.tz)(),n=(0,S.Jl)(e),s=async r=>{try{await t({variables:{account:{id:e.id},value:{...e.settings.crowdfundingRedesign,fundraiser:{...n,...r}}}}),(0,T.o)({variant:"success",message:"Fundraiser prototype updated"})}catch(e){(0,T.o)({variant:"error",title:"Failed to edit",message:(0,f.Rp)(i,e)})}};return(0,r.jsxs)(w.lG,{children:[(0,r.jsx)(w.zM,{asChild:!0,children:(0,r.jsx)(p.$n,{children:"Edit prototype"})}),(0,r.jsxs)(w.Cf,{className:"gap-6 sm:max-w-(--breakpoint-lg)",children:[(0,r.jsxs)(w.c7,{children:[(0,r.jsx)(w.L3,{className:"text-xl",children:"Edit fundraiser prototype"}),(0,r.jsx)(w.rr,{children:"This will only affect the prototype and not your actual profile."})]}),(0,r.jsx)(k.w,{}),(0,r.jsx)(Y,{title:"Main details",description:"Choose a title and theme color for your fundraiser.",children:(0,r.jsx)(O,{schema:S.tv.pick({name:!0,description:!0,primaryColor:!0}),initialValues:n,onSubmit:s})}),(0,r.jsx)(k.w,{}),(0,r.jsx)(H,{schema:S.tv.pick({cover:!0}),initialValues:n,onSubmit:s}),(0,r.jsx)(k.w,{}),(0,r.jsx)(Y,{title:"Goal",description:"Set a goal to share with your community.",children:(0,r.jsx)(K,{schema:S.tv.pick({goal:!0}),initialValues:n,onSubmit:s,account:e})}),(0,r.jsx)(k.w,{}),(0,r.jsx)(V,{schema:S.tv.pick({longDescription:!0}),initialValues:n,onSubmit:s})]})]})}let q=({schema:e,initialValues:t,onSubmit:i})=>(0,r.jsx)(Y,{title:"Cover photo",description:"Add a cover photo to your profile.",children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsx)(C.k1,{schema:e,initialValues:t,onSubmit:t=>i(e.parse(t)),children:e=>(0,r.jsx)(v.lV,{children:(0,r.jsxs)("div",{className:"flex flex-col items-start gap-4",children:[(0,r.jsx)(j.z,{name:"cover.url",children:({field:t})=>{let i=t.value&&(0,b.AY)(t.value);return(0,r.jsx)(y.Ay,{name:t.name,kind:"ACCOUNT_BANNER",accept:y.Uw,minSize:1e3,maxSize:1e7,isMulti:!1,showActions:!0,className:"size-48",onSuccess:i=>{i?e.setFieldValue(t.name,i.url):e.setFieldValue("cover",null)},value:i&&t.value})}}),(0,r.jsx)(p.$n,{type:"submit",loading:e.isSubmitting,children:(0,r.jsx)(d.sA,{defaultMessage:"Save",id:"save"})})]})})})})});function G({account:e}){let[t]=(0,g.n)(B),i=(0,d.tz)(),n=(0,S.vQ)(e),s=async r=>{try{await t({variables:{account:{id:e.id},value:{...e.settings.crowdfundingRedesign,profile:{...n,...r}}}}),(0,T.o)({variant:"success",message:"Profile prototype updated"})}catch(e){(0,T.o)({variant:"error",title:"Failed to edit",message:(0,f.Rp)(i,e)})}};return(0,r.jsxs)(w.lG,{children:[(0,r.jsx)(w.zM,{asChild:!0,children:(0,r.jsx)(p.$n,{children:"Edit prototype"})}),(0,r.jsxs)(w.Cf,{className:"gap-6 sm:max-w-(--breakpoint-lg)",children:[(0,r.jsxs)(w.c7,{children:[(0,r.jsx)(w.L3,{className:"text-xl",children:"Edit profile prototype"}),(0,r.jsx)(w.rr,{children:"This will only affect the prototype and n
691ot your actual profile."})]}),(0,r.jsx)(k.w,{}),(0,r.jsx)(Y,{title:"Main details",description:"Choose a title and theme color for your profile.",children:(0,r.jsx)(O,{schema:S.Fk.pick({name:!0,description:!0,primaryColor:!0}),initialValues:n,onSubmit:s})}),(0,r.jsx)(k.w,{}),(0,r.jsx)(q,{schema:S.Fk.pick({cover:!0}),initialValues:n,onSubmit:s}),(0,r.jsx)(k.w,{}),(0,r.jsx)(Y,{title:"Goal",description:"Set a goal to share with your community.",children:(0,r.jsx)(K,{schema:S.Fk.pick({goal:!0}),initialValues:n,onSubmit:s,account:e})}),(0,r.jsx)(k.w,{}),(0,r.jsx)(V,{schema:S.Fk.pick({longDescription:!0}),initialValues:n,onSubmit:s})]})]})}function W({account:e,isFundraiser:t}){let{LoggedInUser:i}=(0,u.A)();return(0,r.jsx)("div",{className:"h-14 w-full bg-yellow-100",children:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-4 px-4 py-2 text-sm text-gray-700 dark:bg-gray-800 dark:text-gray-300",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(c.A,{className:"h-4 w-4"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"font-semibold",children:(0,r.jsx)(d.sA,{defaultMessage:"PREVIEW",id:"Isedjj"})}),(0,r.jsx)("svg",{viewBox:"0 0 2 2",className:"mx-2 inline h-0.5 w-0.5 fill-current","aria-hidden":"true",children:(0,r.jsx)("circle",{cx:1,cy:1,r:1})}),(0,r.jsx)(d.sA,{defaultMessage:"This is a prototype part of the <Link>crowdfunding redesign effort.</Link>",id:"mLNv+R",values:{Link:(0,h.lv)({openInNewTab:!0,href:"https://blog.opencollective.com/open-collective-crowdfunding-redesign/"})}})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)(p.$n,{variant:"secondary",className:"bg-yellow-200 hover:bg-yellow-300",asChild:!0,children:(0,r.jsx)(x.A,{href:(0,m.bl)(e),children:(0,r.jsx)(d.sA,{defaultMessage:"Go to current profile",id:"VboEiK"})})}),i?.isAdminOfCollective(e)&&(t?(0,r.jsx)(P,{account:e}):(0,r.jsx)(G,{account:e}))]})]})})}var J=i(30619);let X=({account:e})=>{let t=e?.parent??e;return(0,r.jsx)("footer",{className:"border-t px-6 py-12",children:(0,r.jsxs)("div",{className:"mx-auto max-w-(--breakpoint-xl) space-y-8",children:[(0,r.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,r.jsxs)(x.A,{href:`/preview/${t?.slug}`,className:"flex items-center gap-2",children:[(0,r.jsx)(J.Ay,{className:"border-2 border-white bg-white shadow-xs",radius:28,collective:t})," ",(0,r.jsx)("span",{className:"",children:t?.name})]}),e?.host&&e.host.slug!==t?.slug&&(0,r.jsxs)("div",{className:"flex flex-col items-end gap-1 text-right text-sm",children:[(0,r.jsxs)("span",{className:"text-muted-foreground",children:[t?.name," is fiscally hosted by"]}),(0,r.jsxs)("div",{className:"inline-flex items-center gap-2 align-middle",children:[(0,r.jsx)(J.Ay,{className:"border-2 border-white bg-white shadow-xs",radius:28,collective:e?.host})," ",(0,r.jsx)("span",{children:e?.host.name})]})]})]}),(0,r.jsx)(k.w,{}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsxs)(x.A,{href:"/",className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"text-xs font-semibold",children:"Powered by"}),(0,r.jsx)("img",{className:"h-5",src:"/static/images/logotype.svg",alt:"Open Collective"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4 text-sm text-slate-600",children:[(0,r.jsx)(x.A,{className:"hover:text-foreground",href:"/help",children:"Help & Support"}),(0,r.jsx)(x.A,{className:"hover:text-foreground",href:"/privacypolicy",children:"Privacy"}),(0,r.jsx)(x.A,{className:"hover:text-foreground",href:"/tos",children:"Terms"})]})]})]})})};var Z=i(27547),Q=i(80727),ee=i(13337),et=i(48639);function ei({breadcrumbs:e}){return(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[(0,r.jsx)(et.A,{size:20,strokeWidth:1}),e?.map(({href:e,label:t},i,s)=>i===s.length-1?(0,r.jsx)("span",{className:"p-1 text-foreground",children:t},e):(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)(x.A,{href:e,className:"rounded p-1 hover:bg-muted hover:text-foreground",children:(0,r.jsx)("span",{className:"text-muted-foreground",children:t})}),(0,r.jsx)(et.A,{size:20,strokeWidth:1})]},e))]})}var er=i(81249),en=i(21419);function es(){return(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(p.$n,{onClick:S.ap,children:(0,r.jsx)(d.sA,{defaultMessage:"Contribute",id:"Contribute"})}),(0,r.jsx)(p.$n,{onClick:S.ap,variant:"secondary",size:"icon",className:"bg-primary/10 hover:bg-primary/20",children:(0,r.jsx)(er.A,{size:16})}),(0,r.jsx)(p.$n,{onClick:S.ap,variant:"secondary",size:"icon",className:"bg-primary/10 hover:bg-primary/20",children:(0,r.jsx)(en.A,{size:16})})]})}var ea=i(59979),eo=i(34149);function el({collective:e,profile:t,collapsed:i=!1,activeTab:s,breadcrumbs:a}){let o=e?.socialLinks&&e.socialLinks.length>0,{scrollY:l}
691=(0,Z.L)(),[c,d]=(0,n.useState)(!1);return(0,Q.L)(l,"change",e=>{e>400?d(!0):d(!1)}),(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)("div",{className:(0,I.$)("relative w-full bg-primary/20 transition-transform",i?"h-0":"h-80"),children:t?.cover?.url&&(0,r.jsx)("img",{src:t?.cover.url,alt:"",className:"h-full w-full object-cover"})}),!i&&(0,r.jsxs)("div",{className:"relative bg-background pb-6",children:[(0,r.jsxs)("div",{className:"mx-auto flex max-w-(--breakpoint-xl) flex-col items-center justify-center gap-2",children:[(0,r.jsx)("div",{className:"z-10 -mt-16 mb-2",children:(0,r.jsx)(J.Ay,{className:"border-8 border-white bg-white shadow-xs",collective:e,radius:128})}),(0,r.jsxs)("div",{className:"space-y-3 text-center",children:[(0,r.jsx)("h1",{className:"text-3xl font-semibold text-balance",children:t?.name}),(0,r.jsx)("p",{className:"max-w-prose text-sm leading-normal text-balance",children:t?.description}),o&&(0,r.jsx)(ea.A,{socialLinks:e.socialLinks})]})]}),(0,r.jsx)("div",{className:"absolute top-4 right-4",children:(0,r.jsx)(es,{})})]}),(0,r.jsx)("header",{className:"sticky top-0 z-1000 flex h-16 border-b bg-white backdrop-blur-md",children:(0,r.jsxs)("div",{className:(0,I.$)("w-full items-center gap-4 px-6",i?"flex justify-center":"grid grid-cols-[minmax(auto,1fr)_1fr_minmax(auto,1fr)]"),children:[(0,r.jsx)(ee.P.div,{variants:{visible:{y:0,opacity:1},hidden:{opacity:0,y:"-300%"}},animate:c||i?"visible":"hidden",transition:{duration:.1,ease:"easeInOut"},className:"",children:(0,r.jsx)(x.A,{href:`/preview/${e?.slug}`,children:(0,r.jsx)(J.Ay,{collective:e,radius:32,className:"border-2 border-white bg-white shadow-xs"})})}),i?(0,r.jsx)("div",{className:"flex flex-1 justify-start",children:(0,r.jsx)(ei,{breadcrumbs:a})}):(0,r.jsx)("div",{className:"mx-auto flex max-w-3xl flex-1 shrink-0 flex-col items-center justify-end",children:(0,r.jsx)("nav",{className:"sticky top-0 flex space-x-4 text-sm font-medium text-muted-foreground",children:(0,r.jsx)("div",{className:"",children:(0,r.jsx)("div",{className:"relative mx-auto -mb-px h-16 max-w-(--breakpoint-xl) px-6",children:(0,r.jsxs)(eo.j,{centered:!0,children:[(0,r.jsx)(eo.X,{href:`/preview/${e?.slug}`,active:"home"===s,children:"Fundraising"}),(0,r.jsx)(eo.X,{href:`/preview/${e?.slug}/finances`,active:"finances"===s,children:"Finances"}),(0,r.jsx)(eo.X,{href:`/preview/${e?.slug}/updates`,count:e?.updates?.totalCount,active:"updates"===s,children:"Updates"})]})})})})}),(0,r.jsx)(ee.P.div,{variants:{visible:{y:0,opacity:1},hidden:{opacity:0,y:"-300%"}},animate:c?"visible":"hidden",transition:{duration:.1,ease:"easeInOut"},className:"flex justify-end",children:(0,r.jsx)(es,{})})]})})]})}var ec=i(63055),ed=i(28221);function eu({activeTab:e="home",children:t,collapsed:i=!1,getBreadcrumbs:n}){let c=(0,o.useRouter)(),{data:d}=(0,s.IT)(ec.J$,{variables:{collectiveSlug:c.query.collectiveSlug,accountSlug:c.query.accountSlug,includeAccount:!!c.query.accountSlug}}),u=n?n({account:d?.account,collective:d?.collective}):void 0,m=d?.collective,h=d?.account,x=(0,S.vQ)(m);return(0,r.jsxs)(l.A,{withTopBar:!1,showFooter:!1,title:`[PREVIEW] ${m?.name} | Open Collective`,children:[(0,r.jsx)(W,{account:h||m,isFundraiser:h?.type==="EVENT"||h?.type==="PROJECT"}),(0,r.jsx)(a.N,{mode:"wait",initial:!1,children:(0,r.jsxs)("div",{className:"flex min-h-screen flex-col justify-between bg-primary-foreground/75 antialiased",children:[(0,r.jsx)(el,{collective:m,activeTab:e,profile:x,collapsed:i,breadcrumbs:u}),(0,r.jsxs)("div",{className:"z-0 flex flex-1 flex-col",children:[(0,r.jsx)("main",{className:"flex-1",children:t}),(0,r.jsx)(ed.F,{color:x?.primaryColor}),(0,r.jsx)(X,{account:m})]})]})})]})}},68341:(e,t,i)=>{"use strict";i.d(t,{r:()=>g});var r=i(37876),n=i(14232),s=i(670),a=i(82296),o=i(20322),l=i(30619),c=i(2996),d=i(81706);let u=n.forwardRef(({className:e,value:t,...i},n)=>(0,r.jsx)(d.bL,{ref:n,className:(0,o.cn)("relative h-4 w-full overflow-hidden rounded-full bg-primary/20",e),...i,children:(0,r.jsx)(d.C1,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));u.displayName=d.bL.displayName;var m=i(63055);function h({goal:e}
691){return(0,r.jsx)(u,{className:"h-2",value:Math.min(e.progress,100)})}function x({goal:e,className:t}){let i;if(!e)return null;if(e.recurrence)if(e.continuous)switch(e.recurrence){case"YEARLY":i="yearly budget goal";break;case"MONTHLY":i="monthly budget goal"}else switch(e.recurrence){case"YEARLY":i=`goal for ${(0,a.A)().format("YYYY")}`;break;case"MONTHLY":i=`goal for ${(0,a.A)().format("MMMM")} ${(0,a.A)().format("YYYY")}`}else i="goal";return(0,r.jsxs)("div",{className:(0,o.cn)("text-sm font-semibold",t),children:[e.progress,"% towards"," ",(0,r.jsx)(c.A,{amount:e.amount.valueInCents,currency:e.amount.currency,precision:0,showCurrencyCode:!1})," ",i]})}function p({goal:e}){if(!e?.contributors?.totalCount)return null;let t=e.contributors.totalCount-e.contributors.nodes.length;return(0,r.jsx)("div",{className:"relative",children:(0,r.jsxs)("div",{className:"flex items-center text-sm text-muted-foreground",children:[e.contributors.nodes.map((e,t)=>(0,r.jsx)(l.Ay,{style:{zIndex:1e3-t},collective:e,radius:20,className:"relative -ml-2 ring-2 ring-white first:ml-0"},e.id))," ",(0,r.jsxs)("span",{className:"ml-3",children:[e.contributors.nodes[0].name," ",t>0&&`and ${t} others `,"contribute to this goal"]})]})})}function g({accountSlug:e,goal:t,editButton:i,className:l}){let c=(0,n.useMemo)(()=>(0,a.A)().utc(),[]),{data:d}=(0,s.IT)(m.Rd,{variables:{slug:e,oneYearAgo:c.subtract(1,"year").toISOString(),thisMonthStart:c.startOf("month").toISOString(),thisYearStart:c.startOf("year").toISOString(),now:c.toISOString()}});if(!t?.amount)return null;let u={amount:{valueInCents:100*Number(t.amount),currency:d?.account.currency},recurrence:t.recurrence,continuous:t.continuous,progress:0,contributors:void 0};return u={...u,progress:((e,t)=>{let i;if(!t||!e)return null;if(t.recurrence)if(t.continuous)switch(t.recurrence){case"YEARLY":i=e.yearlyBudget.valueInCents;break;case"MONTHLY":i=e.yearlyBudget.valueInCents/12}else switch(t.recurrence){case"YEARLY":i=e.totalAmountReceivedThisYear.valueInCents;break;case"MONTHLY":i=e.totalAmountReceivedThisMonth.valueInCents}else i=e.totalAmountReceived.valueInCents;return Math.floor(i/t.amount.valueInCents*100)})(d?.account.stats,u),contributors:("MONTHLY"===t.recurrence||"YEARLY"===t.recurrence)&&t.continuous?d?.account.activeContributorsForBudgetGoal:"MONTHLY"===t.recurrence?d?.account.activeContributorsForCalendarMonth:"YEARLY"===t.recurrence?d?.account.activeContributorsForCalendarYear:d?.account.activeContributors},(0,r.jsxs)("div",{className:(0,o.cn)("space-y-3",l),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsx)(x,{goal:u,className:"text-base"}),i]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(h,{goal:u}),(0,r.jsx)(p,{goal:u})]})]})}},88114:(e,t,i)=>{"use strict";i.d(t,{CV:()=>x,Fk:()=>u,Jl:()=>m,ap:()=>p,tv:()=>d,vQ:()=>h});var r=i(64487),n=i(89718),s=i(80207);let a=n.Ik({type:n.eu("IMAGE").default("IMAGE"),url:n.Yj(),width:n.ai().optional(),height:n.ai().optional()}),o=n.Ik({recurrence:n.k5(["MONTHLY","YEARLY"]).nullable().default(null),continuous:n.zM().default(!1),amount:n.au.number().min(0).default(0)}),l=n.Ik({type:n.eu("VIDEO").default("VIDEO"),platform:n.k5(["youtube"]).default("youtube"),videoUrl:n.Yj()}),c=n.Yj().length(7).regex(/^#(?:[0-9a-fA-F]{3}){1,2}$/i),d=n.Ik({name:n.Yj().min(1).max(255),description:n.Yj().max(255).optional(),primaryColor:c.optional(),cover:n.KC([a,l]).optional(),longDescription:n.Yj().max(3e4).optional(),goal:o.optional()}),u=n.Ik({name:n.Yj().min(1).max(255),description:n.Yj().max(255).optional(),primaryColor:c.optional(),cover:a.optional().nullable(),longDescription:n.Yj().max(3e4).optional(),goal:o.optional()});function m(e){if(!e)return null;let t=e.settings.crowdfundingRedesign?.fundraiser||{},i=(0,r.A)(e,"settings.collectivePage.primaryColor")||(0,r.A)(e,"parent.settings.collectivePage.primaryColor");return{name:t?.name??(["COLLECTIVE","ORGANIZATION"].includes(e.type)?`Support ${e.name}`:e.name),description:t?.description??e.description,primaryColor:t?.primaryColor??i,cover:t?.cover??{type:"IMAGE",url:e.backgroundImageUrl,width:e.settings.collectivePage?.background?.mediaSize?.width,height:e.settings.collectivePage?.background?.mediaSize?.height},longDescription:t?.longDescription??e.longDescription,goal:t?.goal}}function h(e){if(!e)return null;let t=e.settings?.crowdfundingRedesign?.profile||{},i=(0,r.A)(e,"settings.collectivePage.primaryColor")||(0,r.A)(e,"parent.settings.collectivePage.primaryColor");return{name:t?.name??e.name,description:t?.description??e.description,primaryColor:t?.primaryColor??i,cover:t?.cover??{type:"IMAGE",url:e.backgroundImageUrl,width:e.settings.collectivePage?.background?.mediaSize?.width,height:e.settings.collectivePage?.background?.mediaSize?.height},longDescription:t?.longDescription??e.longDescription,goal:t?.goal}}function x(e){let t=e.match(/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/);return t?t[1]:null}function p(){(0,s.o)({message:"Feature not implemented in prototype"})}},97268:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>y});
691var r=i(37876),n=i(14232),s=i(54770),a=i(64487),o=i(5646),l=i(78220),c=i(71321),d=i(17471),u=i(22696),m=i(56593),h=i(64986),x=i(41955),p=i(98263),g=i(74143);let v=o.I4.div.withConfig({componentId:"sc-d3e1b777-0"})([""," trix-editor{border:none;padding:0;margin-top:1px;padding-top:8px;padding-right:4px;outline-offset:0.5em;"," &::-webkit-scrollbar{width:8px;}"," "," &:empty:not(:focus)::before{color:",";}figcaption{display:none;}","}trix-toolbar{min-height:40px;background:",";z-index:2;margin-bottom:8px;"," .trix-button-group{border-radius:6px;border-color:#c4c7cc;margin-bottom:0;background:white;&:not(:first-child){margin-left:min(1.5vw,10px);}}.trix-button{border-bottom:none;display:inline-block;height:auto;&:hover{background:",";}&.trix-active{background:",";}&::before,&.trix-active::before{margin:4px;}}"," @media (max-width:500px){.trix-button--icon-strike,.trix-button--icon-number-list,.trix-button--icon-decrease-nesting-level,.trix-button--icon-increase-nesting-level{display:none;}}"," .trix-button--icon-attach::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E\");}.trix-button--video-attach::before{top:8%;bottom:4%;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-video'%3E%3Cpolygon points='23 7 16 12 23 17 23 7'%3E%3C/polygon%3E%3Crect x='1' y='5' width='15' height='14' rx='2' ry='2'%3E%3C/rect%3E%3C/svg%3E\");}}",""],e=>e.withBorders&&(0,s.AH)({border:"1px solid",borderColor:e.error?"red.300":"oklch(92.9% 0.013 255.508)",borderRadius:10,padding:3}),u.X,e=>!!e.editorMaxHeight&&(0,s.AH)({overflowY:"scroll"}),e=>!e.withBorders&&(0,s.AH)({outline:e.error?`1px dashed ${e.theme.colors.red[300]}`:"none","&:focus":{outline:`1px dashed ${e.theme.colors.black[200]}`}}),e=>e.theme.colors.black[400],e=>(0,s.AH)({minHeight:e.editorMinHeight,maxHeight:e.editorMaxHeight}),e=>e.toolbarBackgroundColor,e=>e.withBorders?(0,s.AH)`
692            min-height: 0px;
693            margin-bottom: 0;
694            padding: 0 !important;
695          `:(0,s.AH)`
696            box-shadow: 0px 5px 3px -3px rgba(0, 0, 0, 0.1);
697          `,e=>e.theme.colors.blue[100],e=>e.theme.colors.blue[200],e=>"simplified"===e.version&&(0,s.AH)({...!e.imageUploadEnabled&&{".trix-button-group--file-tools":{display:"none"}},".trix-button-group--block-tools .trix-button:not(.trix-button--icon-number-list):not(.trix-button--icon-bullet-list)":{display:"none"},".trix-button--icon-bullet-list":{borderLeft:"none"}}),e=>e.withStickyToolbar&&(0,s.AH)({position:"sticky",top:e.toolbarTop||0,marginTop:e.toolbarOffsetY,p:"10px"}),e=>e.isDisabled&&(0,s.AH)({pointerEvents:"none",cursor:"not-allowed",background:"#f3f3f3","trix-toolbar,.trix-button-group":{background:"#f3f3f3 !important"}})),f="https://www.youtube-nocookie.com/embed/",b="https://anchor.fm/";class y extends n.Component{static{this.defaultProps={withStickyToolbar:!1,toolbarTop:0,toolbarOffsetY:-62,inputName:"content",toolbarBackgroundColor:"white",version:"default","data-cy":"RichTextEditor",videoEmbedEnabled:!1}}constructor(e){super(e),this.editorRef=null,this.mainContainerRef=null,this.isReady=!1,this.initialize=async()=>{this.Trix&&this.editorRef.current&&(this.editorRef.current.addEventListener("trix-change",this.handleChange,!1),this.editorRef.current.addEventListener("trix-attachment-add",this.handleAttachmentAdd),this.editorRef.current.addEventListener("trix-file-accept",this.handleFileAccept),this.editorRef.current.addEventListener("trix-action-invoke",this.trixActionInvoke),this.editorRef.current.addEventListener("trix-initialize",this.trixInitialize),this.isReady=!0,this.setState({text:this.editorRef.current.innerText}))},this.trixBeforeInitialize=()=>{this.Trix.config.blockAttributes.heading1={tagName:"h3"},this.Trix.config.attachments.preview.caption={name:!1,size:!1},this.Trix.config.dompurify.ADD_TAGS=["iframe"],this.Trix.config.dompurify.ADD_ATTR=["allow","allowfullscreen","frameborder","referrerpolicy","src","width","height"];let e=this.Trix.HTMLSanitizer.setHTML,t=this.Trix.config.dompurify,i=this.Trix.HTMLSanitizer,r=["dir","language","data-trix-content-type","data-trix-attachment","alt","title","href","name","target","src","allowfullscreen","frameborder","referrerpolicy","autoplay","width","height"];this.Trix.HTMLSanitizer.setHTML=function(n,s,a){(a=a||{}).forbiddenElements=["script","form","noscript"],a.allowedAttributes=r,a.purifyOptions=t,e.apply(i,[n,s,a])}},this.trixInitialize=e=>{if(this.props.videoEmbedEnabled&&this.injectTrixEmbedButton(e),this.mainContainerRef.current){let e=this.mainContainerRef.current.querySelector("[data-trix-input][name='href']");e?.addEventListener("keydown",e=>{"Enter"===e.key&&this.handleLink()});let t=this.mainContainerRef.current.querySelector("[data-trix-method='setAttribute']");t?.addEventListener("click",this.handleLink)}},this.injectTrixEmbedButton=e=>{let t=`
698      <div class="trix-dialog" data-trix-dialog="video-url" data-trix-dialog-attribute="video">
699        <div class="trix-dialog__link-fields">
700          <input type="url" name="video-url" class="trix-input trix-input--dialog trix-input--dialog-embed" placeholder="Enter Video URL…" aria-label="Video URL" data-trix-input="">
701          <div class="trix-button-group">
702            <input data-cy="add-video-submit" type="button" class="trix-button trix-button--dialog" value="Add Video" data-trix-action="x-add-embed">
703          </div>
704        </div>
705        <strong>Note: Only YouTube links are supported.</strong>
706      </div>`,{toolbarElement:i}=e.target;i.querySelector("[data-trix-action=attachFiles]").insertAdjacentHTML("afterend",'<button type="button" tabindex="-1" data-trix-action="x-video-dialog-open" title="Attach Video" class="trix-button trix-button--icon trix-button--video-attach">Attach Video</button>'),i.querySelector(".trix-dialog--link").insertAdjacentHTML("afterend",t)},this.trixActionInvoke=e=>{let{toolbarElement:t}=e.target;if("x-video-dialog-open"===e.actionName){let e=t.querySelector("[data-trix-dialog=video-url]"),i=t.querySelector(".trix-input--dialog-embed");""===e.getAttribute("data-trix-active")?e.removeAttribute("data-trix-active"):(e.setAttribute("data-trix-active",""),i.removeAttribute("disabled"))}else if("x-add-embed"===e.actionName){let e=t.querySelector(".trix-input--dialog-embed").value?.trim();if(e){this.embedIframe(e);let i=t.querySelector("[data-trix-dialog=video-url]");
706i.querySelector(".trix-input--dialog-embed").value="",""===i.getAttribute("data-trix-active")&&i.removeAttribute("data-trix-active")}}},this.constructVideoEmbedURL=(e,t)=>"youtube"===e?`${f}${t}`:"anchorFm"===e?`${b}${t}`:null,this.parseServiceLink=e=>{let t={youtube:RegExp("(?:https?://)?(?:www\\.)?youtu(?:\\.be/|be\\.com/\\S*(?:watch|embed|shorts)(?:(?:(?=/[^&\\s?]+(?!\\S))/)|(?:\\S*v=|v/)))([^&\\s?]+)","i"),anchorFm:/^(http|https)?:\/\/(www\.)?anchor\.fm\/([^/]+)(\/embed)?(\/episodes\/)?([^/]+)?\/?$/};for(let i in t){let r=t[i].exec(e);if(r)if("anchorFm"!==i)return{service:i,id:r[r.length-1]};else{let e=r[3],t=r[6],n=`${e}/embed`;return{service:i,id:t?`${n}/episodes/${t}`:n}}}return{}},this.embedIframe=e=>{let{id:t,service:i}=this.parseServiceLink(e),r=this.constructVideoEmbedURL(i,t),n=this.Trix;if(r){let e,t=r.replace(/["\\]/g,"");e=["youtube","vimeo"].includes(i)?{contentType:"--embed-iframe-video",content:`<iframe src="${t}?showinfo=0" width="100%" height="394" frameborder="0" allowfullscreen referrerpolicy="strict-origin-when-cross-origin"/>`}:{contentType:`--embed-iframe-${i}`,content:`<iframe src="${t}" width="100%" frameborder="0"/>`},this.getEditor().insertAttachment(new n.Attachment(e))}},this.handleChange=e=>{this.autolink(),this.props.onChange&&this.props.onChange(e),this.state.error&&this.setState({error:null}),this.props.showCount&&this.setState({text:e.target.innerText})},this.handleFileAccept=e=>{/^image\//.test(e.file.type)?e.file.size>4e6&&(alert("This file is too big (max: 4mb)."),e.preventDefault()):(alert("You can only upload images."),e.preventDefault())},this.handleAttachmentAdd=e=>{let{attachment:t}=e,i=(0,a.A)(t,"attachment.attributes.values.content");if(i?.includes(`<iframe src="${f}`)||i?.includes(`<iframe src="${b}`))return;if(t.file){if("simplified"===this.props.version&&!this.props.imageUploadEnabled)return void t.remove()}else{let e=(0,a.A)(t,"attachment.attributes.values.url");/https:\/\/opencollective-(production|staging)\.s3[.-]us-west-1\.amazonaws\.com/.test(e)||t.remove();return}this.props.setUploading?.(!0);let r=e=>{this.props.setUploading?.(!1),t.setAttributes({url:e,href:e})},n=()=>{this.props.setUploading?.(!1),this.setState({error:"File upload failed"}),t.remove()};return(0,d.Lh)(t.file,this.props.kind,{onProgress:e=>t.setUploadProgress(e),onSuccess:r,onFailure:n}),e},this.handleLink=()=>{let e=this.mainContainerRef.current?.querySelector("[data-trix-input][name='href']"),t=e?.value?.trim();t&&(0,c.isURL)(t,{require_protocol:!1})&&!(0,c.isURL)(t,{require_protocol:!0})&&(e.value=`https://${t}`)},this.autolinkDelimiter=e=>{let t=e.length;for(;t>0;){let i,r=t-1,n=e[r];if(")"===n?i="(":"]"===n?i="[":"}"===n?i="{":'"'===n?i='"':"'"===n&&(i="'"),"?!.,:;*_~".includes(e[r]))t--;else if(i){let r=0,s=0;for(let a=0;a<t;a++)e[a]===i?r++:e[a]===n&&s++;if(r>=s)break;t--}else break}return t},this.editorRef=n.createRef(),this.mainContainerRef=n.createRef(),this.state={id:e.id,error:null,value:this.prepareHTML(e.defaultValue),text:""},this.isReady=!1,this.Trix=i(77653).A,document.addEventListener("trix-before-initialize",this.trixBeforeInitialize)}componentDidMount(){this.state.id?this.isReady||this.initialize():this.setState({id:(0,l.A)()})}componentDidUpdate(e){this.isReady?e.reset!==this.props.reset&&this.getEditor().loadHTML(""):this.initialize()}componentWillUnmount(){document.removeEventListener("trix-before-initialize",this.trixBeforeInitialize),this.isReady&&(this.editorRef.current.removeEventListener("trix-change",this.handleChange),this.editorRef.current.removeEventListener("trix-attachment-add",this.handleAttachmentAdd),this.editorRef.current.removeEventListener("trix-attachment-add",this.handleFileAccept),this.editorRef.current.removeEventListener("trix-action-invoke",this.trixActionInvoke),this.editorRef.current.removeEventListener("trix-initialize",this.trixInitialize),this.isReady=!1)}prepareHTML(e){if(!e)return"";let t=new DOMParser().parseFromString(e,"text/html");return t.querySelectorAll('figure[data-trix-content-type="--embed-iframe-video"]').forEach(e=>{let t=e.querySelector("iframe");
706if(t){let i={content:t.outerHTML,contentType:"--embed-iframe-video"};e.setAttribute("data-trix-attachment",JSON.stringify(i))}}),t.querySelector("body").innerHTML}getEditor(){return this.editorRef.current.editor}autolink(){let e,t=RegExp("(https?://\\S+\\.\\S+)\\s","ig"),i=this.getEditor(),r=i.getDocument().toString();for(;e=t.exec(r);){let t=e[1];if((0,c.isURL)(t)){let r=e.index,n=this.autolinkDelimiter(t),s=[r,r+n],a=i.getDocument().getCommonAttributesAtRange(s).href,o=t.slice(0,n);a!==o&&this.updateInRange(i,s,0,()=>{i.canActivateAttribute("href")&&i.activateAttribute("href",o)})}}}updateInRange(e,t,i=0,r){let n=e.getSelectedRange();e.setSelectedRange(t),r(),e.setSelectedRange([n[0]+i,n[1]+i])}render(){let{withStickyToolbar:e,toolbarTop:t,toolbarOffsetY:i,toolbarBackgroundColor:s,autoFocus:a,placeholder:o,editorMinHeight:l,withBorders:c,inputName:d,disabled:u,error:f,fontSize:b,version:y,showCount:j,maxLength:C,editorMaxHeight:A,imageUploadEnabled:w}=this.props;return this.state.id?(0,r.jsxs)(v,{withStickyToolbar:e,toolbarTop:t,toolbarOffsetY:i,toolbarBackgroundColor:s,editorMinHeight:l,editorMaxHeight:A,withBorders:c,version:y,imageUploadEnabled:w,isDisabled:u,error:f,"data-cy":this.props["data-cy"],ref:this.mainContainerRef,className:"focus-within:border-ring",children:[this.state.error&&(0,r.jsx)(p.A,{type:"error",mb:"36px",withIcon:!0,children:this.state.error.toString()}),(0,r.jsx)("input",{id:this.state.id,value:this.state.value,type:"hidden",name:d,disabled:u}),(0,r.jsx)(h.Ay,{fontSize:b,children:(0,r.jsxs)("div",{className:"relative [&>_trix-editor]:focus-visible:outline-hidden",children:[n.createElement("trix-editor",{ref:this.editorRef,input:this.state.id,autofocus:!u&&!!a||void 0,placeholder:o,disabled:u,"aria-label":this.props["aria-label"]}),(0,r.jsx)(m.A,{position:"absolute",bottom:"1em",right:"1em",children:j&&!u&&(0,r.jsxs)(g.A,{textTransform:"uppercase",children:[(0,r.jsx)("span",{children:this.state.text.length}),C&&(0,r.jsxs)("span",{children:[" / ",C]})]})})]})})]}):(0,r.jsx)(x.A,{maxHeight:A&&"number"==typeof A?A+56:void 0,height:l&&"number"==typeof l?l+56:200})}}}}]);
707//# sourceMappingURL=1101-c3273c8433cb4b44.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.