PageSourceSearch

https://opencollective.com/_next/static/chunks/7357-058f62240c6c44af.js

js opencollective.com collected 2026-09-24 08:36:29 UTC 28,556 bytes, 972 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 n=arguments[t];if(null!=n)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}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]="faa9fd0f-2dd6-4d8c-b456-fed3765eecbe",e._sentryDebugIdIdentifier="sentry-dbid-faa9fd0f-2dd6-4d8c-b456-fed3765eecbe")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7357],{21092:(e,t,n)=>{n.d(t,{Vo:()=>T,yE:()=>j,Ay:()=>w,F$:()=>O});var a=n(37876),s=n(14232),i=n(88490),r=n(10611),o=n(64487),c=n(6199),l=n(77820),d=n(99411),u=n(47221),g=n(16676),m=n(81380),p=n(36944),y=n(43859),f=n(79847),A=n(62449),h=n(33123),C=n(55817),v=n(60257);let x=async({hostSlug:e,accountSlug:t,type:n,description:a,items:s,isHostExpense:i,includeHostOnly:r})=>{let o=new URLSearchParams;o.append("host_slug",e),o.append("collective_slug",t),o.append("type",n),o.append("description",a),o.append("items",s),void 0!==i&&o.append("is_host_expense",String(i)),void 0!==r&&o.append("include_host_only",String(r));let c=await fetch(`https://ml.opencollective.com/models/expense-category?${o}`);return(await c.json()).predictions};var E=n(20322),I=n(88808),N=n(6435),S=n(1509),F=n(47144),b=n(12112);let T=(0,i.J1)`
2  fragment AccountingCategorySelectFields on AccountingCategory {
3    id
4    kind
5    code
6    hostOnly
7    instructions
8    name
9    friendlyName
10    expensesTypes
11    createdAt
12    appliesTo
13  }
14`,M=(0,A.YK)({submitter:{id:"accountingCategory.submitter",defaultMessage:"the expense submitter"},accountAdmin:{id:"accountingCategory.accountAdmin",defaultMessage:"the collective admin"},hostAdmin:{id:"accountingCategory.hostAdmin",defaultMessage:"the host admin"}}),O=(e,t,n,i=null)=>{let r;if((0,c.A)(t))return null;null===t?r=e.formatMessage({defaultMessage:"I don't know",id:"AkIyKO"}):t&&(r=t.friendlyName||t.name||e.formatMessage({id:"accountingCategory.doNotKnow",defaultMessage:"Unknown category"}));let l=((e,t,n=null)=>{let s=["submitter","accountAdmin","hostAdmin"],i=s.map(e=>(0,o.A)(n,`${e}.accountingCategory`));if(!t||!i.some(Boolean))return null;let r=i.map(e=>e===t||e?.id===t?.id||e?.code===t?.code);if(!r.some(Boolean))return null;{let t=s.filter((e,t)=>r[t]);return(0,a.jsx)("span",{className:"text-xs font-normal text-muted-foreground italic",children:(0,a.jsx)(A.sA,{id:"accountingCategory.selectedBy",defaultMessage:"Selected by {nbRoles, select, 1 {{role1}} 2 {{role1} and {role2}} other {{role1}, {role2} and {role3}}}.",values:{nbRoles:t.length,role1:e.formatMessage(M[t[0]]),role2:t[1]&&e.formatMessage(M[t[1]]),role3:t[2]&&e.formatMessage(M[t[2]])}})})}})(e,t,i);return(0,a.jsxs)(s.Fragment,{children:[(0,a.jsxs)("div",{className:"space-x-1.5",children:[n&&t&&(0,a.jsx)("span",{className:"text-muted-foreground",children:t.code}),(0,a.jsx)("span",{children:r})]}),l]})},R="opensource,metagov,raft,ofico,ofitech".split(",").map(e=>e.trim()).filter(Boolean),_=({host:e,account:t,kind:n,expenseType:i,selectedCategory:T,valuesByRole:M,predictionStyle:_,onChange:w,onBlur:j,id:P,error:k,allowNone:U=!1,alwaysSearchable:H=!1,suggestedCategoryIds:B,showCode:D,expenseValues:L,buttonClassName:V="",children:X=null,selectFirstOptionIfSingle:z,disabled:W})=>{let $=(0,A.tz)(),[q,G]=s.useState(!1),{LoggedInUser:J}=(0,v.A)(),K=!!J?.isAdminOfCollective(e),Y=(0,N.Mn)(e,t),{predictions:Z}=((e,t,n,a,i,r)=>{let c,{call:l,data:d,loading:g}=(0,C.c)(x),m=s.useMemo(()=>(0,u.A)(l,500),[]),[p,y]=s.useState(!0),f=(c=e=>e?e.trim().toLocaleLowerCase():"",{type:(0,o.A)(a,"type"),description:c((0,o.A)(a,"description","")),items:(0,o.A)(a,"items",[]).map(e=>c(e.description)).filter(Boolean).join(" | ")}),A=!!(n&&e&&f.type&&(f.description.length>3||f.items.length>3));s.useEffect(()=>{if(A&&t?.slug){let e=setTimeout(()=>y(!1),1e3);m({hostSlug:t.slug,accountSlug:n.slug,...f,isHostExpense:i,includeHostOnly:r}).then(()=>{clearTimeout(e),p&&y(!0)})}}
14,[t?.slug,n?.slug,A,i,r,...Object.values(f)]);let h=s.useMemo(()=>{if(!A||!d?.length)return null;let e=d.filter(e=>e.confidence>=.1),n=(0,o.A)(t,"accountingCategories.nodes")||(0,o.A)(t,"expenseAccountingCategories.nodes")||[];return e.map(e=>{let t;return t=e.code,n.find(e=>e.code===t)}).filter(Boolean)},[t,A,d]),v=s.useRef(h);return s.useEffect(()=>{h&&(v.current=h)},[h]),{loading:g,predictions:h||p&&v.current||[]}})(((e,t,n,a,s)=>!!R.includes(e?.slug)&&"EXPENSE"===t&&("full"===n||("inline-preload"===n?(0,c.A)(s)||a:"inline"===n?a:void 0)))(e,n,_,q,T),e,t,L,Y,K),Q=!!Z?.length,ee=e=>{(T?.id!==e?.id||(0,g.A)(e)&&!(0,g.A)(T))&&w(e)},et=s.useMemo(()=>{let a,s,c,u,g,m;return a=["CONTRIBUTION","ADDED_FUNDS"],s=["BALANCE_ACCOUNT","CLEARING_ACCOUNT"],c=I.oz,u=(0,l.A)([...c.map(t=>(0,o.A)(e,`${t}.nodes`,[])).flat()]),g=[],n===h.sOX.EXPENSE?(0,d.A)(u,e=>!(e?.kind===h.sOX.EXPENSE&&(K||!e?.expensesTypes||e.expensesTypes.includes(i)))):a.includes(n)?(0,d.A)(u,e=>!a.includes(e.kind)):s.includes(n)&&(0,d.A)(u,e=>!s.includes(e.kind)),m=(0,N.Mn)(e,t)?h.zXq.HOST:h.zXq.HOSTED_COLLECTIVES,s.includes(n)||(0,d.A)(u,e=>e.appliesTo&&e.appliesTo!==m),u.forEach(e=>{g.push({key:e.id,value:e,label:O($,e,D,M),searchText:Object.values((0,r.A)(e,["name","friendlyName","code"])).join(" ").toLocaleLowerCase()})}),(U||0===g.length)&&g.push({key:null,value:null,label:O($,null,!1,M),searchText:$.formatMessage({defaultMessage:"I don't know",id:"AkIyKO"}).toLocaleLowerCase()}),g},[$,e,n,i,U,D,M,K,t]);s.useEffect(()=>{z&&void 0===T&&1===et.length&&void 0!==et[0].value&&w(et[0].value)},[et,z,T,w]);let en=s.useMemo(()=>B?.length?et.filter(e=>B.includes(e.value?.id)):Z.length?et.filter(e=>Z.some(t=>t.code===e.value?.code)):[],[et,Z,B]),ea=!!(en.length&&("inline-preload"===_||B?.length));return(0,a.jsxs)("div",{children:[(0,a.jsxs)(b.AM,{open:q,onOpenChange:G,children:[(0,a.jsx)(b.Wv,{asChild:!0,onBlur:j,disabled:W,onClick:e=>{e.stopPropagation()},children:X||(0,a.jsxs)(S.$n,{id:P,variant:"outline",className:(0,E.cn)("w-full max-w-[300px] font-normal",{"ring-2 ring-destructive ring-offset-2":k},V),disabled:W,children:[(0,a.jsx)("span",{className:(0,E.cn)("mr-3 grow truncate text-start text-sm",{"text-muted-foreground":(0,c.A)(T)}),children:(0,c.A)(T)?$.formatMessage({defaultMessage:"Select category",id:"RUJYth"}):O($,T,!1,M)}),(0,a.jsx)(p.A,{size:"1em"})]})}),(0,a.jsx)(b.hl,{onClick:e=>e.stopPropagation(),className:"min-w-[280px] p-0",style:{width:"var(--radix-popover-trigger-width)"},children:(0,a.jsxs)(F.uB,{children:[(H||(0,m.A)(et)>6)&&(0,a.jsx)(F.G7,{placeholder:"Filter by name"}),(0,a.jsxs)(F.oI,{children:[(0,a.jsx)(F.xL,{children:(0,a.jsx)(A.sA,{defaultMessage:"No category found",id:"bn5V11"})}),ea&&(0,a.jsx)(F.L$,{heading:$.formatMessage({defaultMessage:"Suggested categories",id:"ydZSPT"}),children:en.map(({key:e,label:t,value:n,searchText:s})=>(0,a.jsx)(F.h_,{value:e,keywords:[s],onSelect:()=>{ee(n),G(!1)},children:(0,a.jsxs)("div",{className:"flex flex-1 items-center justify-between",children:[(0,a.jsx)("span",{children:t}),(0,a.jsx)("span",{className:"text-right text-xs text-muted-foreground",title:$.formatMessage({defaultMessage:"Suggested",id:"a0lFbM"}),children:(0,a.jsx)(y.A,{size:16,className:"mr-1 inline-block text-yellow-500",strokeWidth:1.5})})]})},e))}),(0,a.jsx)(F.L$,{heading:ea?$.formatMessage({defaultMessage:"All Categories",id:"1X6HtI"}):void 0,children:et.map(({label:e,key:t,value:n,searchText:s})=>{let i=(0,g.A)(T)&&(0,g.A)(n)||T&&n&&T?.id===n?.id,r=en.some(e=>e.key===t);return(0,a.jsx)(F.h_,{value:t||"none",keywords:[s],onSelect:()=>{ee(n),G(!1)},children:(0,a.jsxs)("div",{className:"flex flex-1 items-center justify-between",children:[(0,a.jsx)("span",{className:i||r||!Q||"inline-preload"===_?"text-foreground":"text-muted-foreground",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 pt-0.5",children:[i&&(0,a.jsx)(f.A,{size:16,className:"ml-2 inline-block"}),r&&(0,a.jsx)("span",{className:"text-right text-xs text-gray-500",title:$.formatMessage({defaultMessage:"Suggested",id:"a0lFbM"}),children:(0,a.jsx)(y.A,{size:16,className:"mr-1 inline-block text-yellow-500",strokeWidth:1.5})})]})]})},t||"none")})})]})]})})]}),"full"===_&&(0,a.jsx)("div",{className:"mt-2 min-h-[33px] text-xs text-gray-700",children:!!en.length&&(0,a.jsxs)("div",{children:[(0,a.jsx)(y.A,{size:16,className:"mr-1 inline-block text-yellow-500",strokeWidth:1.5}),(0,a.jsx)(A.sA,{defaultMessage:"Suggested: {suggestions}",id:"XItXfz",values:{suggestions:en.slice(0,3).map((e,t)=>(0,a.jsxs)(s.Fragment,{children:[(0,a.jsx)("span",{tabIndex:0,role:"button",onKeyDown:t=>"Enter"===t.key&&ee(e.value),onClick:()=>ee(e.value),className:"cursor-pointer text-(--primary-color-600) underline hover:opacity-80","aria-label":$.formatMessage({defaultMessage:"Select {name}",id:"G65XME"},{name:e.value.name}),children:e.value.friendlyName||e.value.name}),t<Math.min(en.length,3)-1?", ":"."]},e.key))}})]})})]})},w=_,j=s.memo(_)},29971:(e,t,n)=>{n.d(t,{CU:()=>d,pE:()=>u,z6:()=>l});var a=n(37876),s=n(14232),i=n(87452),r=n(66646),o=n(20322),c=n(16255);let l=s.forwardRef(({className:e,...t},n)=>(0,a.jsx)(i.bL,{className:(0,o.cn)("grid gap-2",e),...t,ref:n}));l.displayName=i.bL.displayName;let d=s.forwardRef(({className:e,...t},n)=>(0,a.jsx)(i.q7,{ref:n,className:(0,o.cn)("aspect-square h-4 w-4 roun
14ded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),id:t.id||t.value,...t,children:(0,a.jsx)(i.C1,{className:"flex items-center justify-center",children:(0,a.jsx)(r.A,{className:"h-2.5 w-2.5 fill-current text-current"})})}));d.displayName=i.q7.displayName;let u=s.forwardRef(({className:e,children:t,showSubcontent:n,subContent:s,checked:l,...d},u)=>{let g=void 0!==l;return(0,a.jsxs)("div",{className:(0,o.cn)('relative rounded-lg bg-card text-sm text-card-foreground shadow-xs ring-1 ring-border has-data-[state=checked]:ring-2 has-data-[state=checked]:ring-ring [&:has([role="radio"]:focus-visible)]:bg-primary/5',e),children:[(0,a.jsx)(i.q7,{ref:u,className:(0,o.cn)("group w-full p-4 text-left outline-hidden disabled:cursor-not-allowed disabled:text-muted-foreground disabled:[&_.border]:border-muted-foreground/50"),asChild:!1,...d,...g&&{"data-state":l?"checked":"unchecked","aria-checked":l},children:(0,a.jsxs)("div",{className:(0,o.cn)("flex w-full items-center gap-4",d.contentClassName),children:[(0,a.jsx)("div",{className:(0,o.cn)("flex aspect-square h-4 w-4 shrink-0 items-center justify-center rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d.indicatorClassName),children:g?l&&(0,a.jsx)(r.A,{className:"h-2.5 w-2.5 fill-current text-current"}):(0,a.jsx)(i.C1,{children:(0,a.jsx)(r.A,{className:"h-2.5 w-2.5 fill-current text-current"})})}),t]})}),s&&(0,a.jsx)(c.Nt,{open:n,children:(0,a.jsx)(c.Ke,{className:"p-4 pt-0",children:s})})]})});u.displayName="RadioGroupCards.Item"},55817:(e,t,n)=>{n.d(t,{c:()=>o});var a=n(14232),s=n(62449),i=n(80207),r=n(2948);let o=(e,{useErrorToast:t=!1,defaultData:n=null}={})=>{let[o,c]=a.useState(!1),[l,d]=a.useState(n),[u,g]=a.useState(),{toast:m}=(0,i.d)(),p=(0,s.tz)(),y=(...n)=>async()=>{c(!0),g(void 0),d(void 0);try{let t=await e(...n);d(t)}catch(e){g(e),console.error(e),t&&m({variant:"error",message:(0,r.NR)(p,(0,r.P1)(e))})}finally{c(!1)}};return{loading:o,call:(...e)=>y(...e)(),callWith:y,data:l,error:u}}},61205:(e,t,n)=>{n.d(t,{P:()=>s});var a=n(11046);let s=(0,a.J1)`
15  fragment NavbarFields on CollectiveFeatures {
16    id
17    ABOUT
18    CONNECTED_ACCOUNTS
19    RECEIVE_FINANCIAL_CONTRIBUTIONS
20    RECURRING_CONTRIBUTIONS
21    EVENTS
22    PROJECTS
23    USE_EXPENSES
24    RECEIVE_EXPENSES
25    FUNDS_GRANTS_MANAGEMENT
26    COLLECTIVE_GOALS
27    TOP_FINANCIAL_CONTRIBUTORS
28    CONVERSATIONS
29    UPDATES
30    TEAM
31    CONTACT_FORM
32    RECEIVE_HOST_APPLICATIONS
33    HOST_DASHBOARD
34    TRANSACTIONS
35    REQUEST_VIRTUAL_CARDS
36    PUBLIC_PROFILE
37  }
38`},84611:(e,t,n)=>{n.d(t,{Sq:()=>l,dm:()=>d,hg:()=>g,nN:()=>u,oW:()=>o,wJ:()=>c,yD:()=>m});var a=n(11046),s=n(21092),i=n(15192),r=n(61205);let o=(0,a.J1)`
39  fragment LoggedInAccountExpensePayoutFields on Individual {
40    id
41    slug
42    imageUrl
43    type
44    name
45    legalName
46    hasTwoFactorAuth
47    location {
48      id
49      address
50      country
51      structured
52    }
53    payoutMethods {
54      id
55      type
56      name
57      data
58      isSaved
59      canBeEdited
60      canBeDeleted
61      createdAt
62      updatedAt
63      isVerified
64    }
65    adminMemberships: memberOf(role: ADMIN, includeIncognito: false, accountType: [ORGANIZATION, COLLECTIVE, FUND]) {
66      nodes {
67        id
68        account {
69          id
70          legacyId
71          slug
72          imageUrl
73          type
74          name
75          legalName
76          isActive
77          isHost
78          policies {
79            id
80            REQUIRE_2FA_FOR_ADMINS
81          }
82          ... on AccountWithParent {
83            parent {
84              id
85              legacyId
86              slug
87              policies {
88                id
89                REQUIRE_2FA_FOR_ADMINS
90              }
91            }
92          }
93          ... on AccountWithHost {
94            host {
95              id
96              payoutMethods {
97                id
98                type
99                name
100                data
101                isSaved
102              }
103            }
104          }
105          ... on Organization {
106            host {
107              id
108              payoutMethods {
109                id
110                type
111                name
112                data
113                isSaved
114              }
115            }
116          }
117          location {
118            id
119            address
120            country
121            structured
122          }
123          payoutMethods {
124            id
125            type
126            name
127            data
128            isSaved
129          }
130          childrenAccounts {
131            nodes {
132              id
133              slug
134              imageUrl
135              type
136              name
137              isActive
138            }
139          }
140        }
141      }
142    }
143  }
144`,c=(0,a.J1)`
145  fragment ExpenseHostFields on Host {
146    id
147    legacyId
148    name
149    legalName
150    slug
151    type
152    currency
153    isHost
154    expensePolicy
155    website
156    settings
157    features {
158      id
159      MULTI_CURRENCY_EXPENSES
160      PAYPAL_PAYOUTS
161      CHART_OF_ACCOUNTS
162      TRANSFERWISE
163    }
164    location {
165      id
166      address
167      country
168    }
169    transferwise {
170      id
171      availableCurrencies
172    }
173    supportedPayoutMethods
174    isTrustedHost
175    plan {
176      id
177    }
178    expenseAccountingCategories: accountingCategories(kind: EXPENSE) {
179      nodes {
180        id
181        ...AccountingCategorySelectFields
182      }
183    }
184    policies {
185      id
186      EXPENSE_CATEGORIZATION {
187        requiredForExpenseSubmitters
188        requiredForCollectiveAdmins
189      }
190    }
191    ... on AccountWithPlatformSubscription {
192      platformSubscription {
193        plan {
194          title
195        }
196      }
197    }
198  }
199  ${s.Vo}
200`,l=(0,a.J1)`
201  fragment ExpenseValuesByRoleFragment on ExpenseValuesByRole {
202    id
203    submitter {
204      accountingCategory {
205        ...AccountingCategorySelectFields
206      }
207    }
208    accountAdmin {
209      accountingCategory {
210        ...AccountingCategorySelectFields
211      }
212    }
213    hostAdmin {
214      accountingCategory {
215        ...AccountingCategorySelectFields
216      }
217    }
218  }
219  ${s.Vo}
220`,d=(0,a.J1)`
221  fragment ExpensePayeeFields on Account {
222    id
223    slug
224    name
225    legalName
226    imageUrl
227    type
228    isAdmin
229    isActive
230    description
231    ...AccountHoverCardFields
232    location {
233      id
234      address
235      country
236    }
237    payoutMethods {
238      id
239      type
240      name
241      data
242      isSaved
243    }
244
245    # For Collectives, Funds, Events and Projects
246    ... on AccountWithHost {
247      isApproved
248      host {
249        id
250        slug
251        # For Expenses across hosts
252        payoutMethods {
253          id
254          type
255          name
256          data
257          isSaved
258        }
259      }
260    }
261
262    # For Fiscal Hosts
263    ... on Organization {
264      host {
265        id
266        slug
267      }
268    }
269  }
270`,u=(0,a.J1)`
271  fragment ExpensePageExpenseFields on Expense {
272    id
273    legacyId
274    publicId
275    description
276    longDescription
277    currency
278    type
279    status
280    onHold
281    privateMessage
282    reference
283    tags
284    amount
285    accountingCategory {
286      id
287      ...AccountingCategorySelectFields
288    }
289    balanceAccountingCategory {
290      id
291      code
292      name
293      friendlyName
294    }
295    valuesByRole {
296      id
297      ...ExpenseValuesByRoleFragment
298    }
299    amountInAccountCurrency: amountV2(currencySource: ACCOUNT) {
300      valueInCents
301      currency
302      exchangeRate {
303        date
304        value
305        source
306        isApproximate
307        fromCurrency
308        toCurrency
309      }
310    }
311    amountInHostCurrency: amountV2(currencySource: HOST) {
312      valueInCents
313      currency
314      exchangeRate {
315        date
316        value
317        source
318        isApproximate
319        fromCurrency
320        toCurrency
321      }
322    }
323    createdAt
324    invoiceInfo
325    merchantId
326    requiredLegalDocuments
327    receivedTaxForms: legalDocuments(type: US_TAX_FORM, status: RECEIVED) {
328      nodes {
329        id
330        type
331        documentLink
332        year
333      }
334    }
335    feesPayer
336    draft
337    items {
338      id
339      incurredAt
340      description
341      amount
342      amountV2 {
343        valueInCents
344        currency
345        exchangeRate {
346          date
347          value
348          source
349          fromCurrency
350          toCurrency
351        }
352      }
353      referenceExchangeRate {
354        value
355        fromCurrency
356        toCurrency
357      }
358      url
359      file {
360        id
361        type
362        ... on ImageFileInfo {
363          width
364        }
365      }
366    }
367    taxes {
368      id
369      type
370      rate
371      idNumber
372    }
373    invoiceFile {
374      id
375      url
376      name
377      type
378      size
379      ... on ImageFileInfo {
380        width
381      }
382    }
383    attachedFiles {
384      id
385      url
386      name
387      info {
388        id
389        type
390        name
391        size
392        ... on ImageFileInfo {
393          width
394        }
395      }
396    }
397    payee {
398      id
399      ...ExpensePayeeFields
400    }
401    payeeLocation {
402      id
403      address
404      country
405      structured
406    }
407    createdByAccount {
408      id
409      slug
410      name
411      type
412      imageUrl
413      legacyId
414      ...AccountHoverCardFields
415    }
416    host {
417      id
418      ...ExpenseHostFields
419    }
420    requestedByAccount {
421      id
422      slug
423      name
424      type
425      imageUrl
426      ...AccountHoverCardFields
427    }
428    approvedBy {
429      id
430      type
431      slug
432      name
433      imageUrl
434      ...AccountHoverCardFields
435    }
436    account {
437      id
438      legacyId
439      slug
440      name
441      type
442      imageUrl
443      backgroundImageUrl
444      isActive
445      description
446      settings
447      twitterHandle
448      currency
449      expensePolicy
450      supportedExpenseTypes
451      features {
452        id
453        ...NavbarFields
454        MULTI_CURRENCY_EXPENSES
455        TAX_FORMS
456      }
457      location {
458        id
459        address
460        country
461      }
462
463      stats {
464        id
465        balance {
466          valueInCents
467          currency
468        }
469        balanceWithBlockedFunds: balance(withBlockedFunds: true) {
470          valueInCents
471          currency
472        }
473      }
474
475      ... on AccountWithParent {
476        parent {
477          id
478          slug
479          imageUrl
480          backgroundImageUrl
481          twitterHandle
482        }
483      }
484
485      ... on AccountWithHost {
486        isApproved
487        hostAgreements {
488          totalCount
489        }
490        host {
491          id
492          slug
493          legacyId
494          ...ExpenseHostFields
495          transferwise {
496            id
497            availableCurrencies
498          }
499        }
500      }
501
502      # For Hosts with Budget capabilities
503
504      ... on Organization {
505        isHost
506        isActive
507        host {
508          id
509          ...ExpenseHostFields
510          transferwise {
511            id
512            availableCurrencies
513          }
514        }
515      }
516
517      ... on Event {
518        parent {
519          id
520          slug
521          name
522          type
523          imageUrl
524        }
525      }
526      ... on Project {
527        parent {
528          id
529          slug
530          name
531          type
532          imageUrl
533        }
534      }
535      ...AccountHoverCardFields
536    }
537    payoutMethod {
538      id
539      type
540      name
541      data
542      isSaved
543      canBeEdited
544      canBeDeleted
545      isVerified
546    }
547    virtualCard {
548      id
549      name
550      last4
551    }
552    permissions {
553      id
554      canEdit
555      canEditTags
556      canEditAccountingCategory
557      editAccountingCategory {
558        allowed
559        reason
560      }
561      canEditType
562      canEditTitle
563      canEditItems
564      canEditPaidBy
565      canEditPayee
566      canEditPayoutMethod
567      canAttachReceipts
568      canDelete
569      canSeeInvoiceInfo
570      canApprove
571      canUnapprove
572      canReject
573      canMarkAsSpam
574      canPay
575      canMarkAsPaid
576      canMarkAsUnpaid
577      canMarkAsIncomplete
578      canComment
579      canUnschedulePayment
580      canVerifyDraftExpense
581      canUsePrivateNote
582      canHold
583      canRelease
584      canDownloadTaxForm
585      canSeePayoutMethodPrivateDetails
586      approve {
587        allowed
588        reason
589        reasonDetails
590      }
591    }
592    lockedFields
593    activities {
594      id
595      type
596      createdAt
597      data
598      account {
599        id
600        slug
601        ... on AccountWithHost {
602          host {
603            id
604            slug
605          }
606        }
607      }
608      individual {
609        id
610        type
611        slug
612        name
613        imageUrl
614        ...AccountHoverCardFields
615      }
616      transaction {
617        id
618        kind
619        type
620        amount {
621          valueInCents
622          currency
623        }
624        platformFee {
625          valueInCents
626          currency
627        }
628        hostFee {
629          valueInCents
630          currency
631        }
632        paymentProcessorFee {
633          valueInCents
634          currency
635        }
636        netAmount {
637          valueInCents
638          currency
639        }
640        taxAmount(fetchTax: true) {
641          valueInCents
642          currency
643        }
644        taxInfo {
645          id
646          rate
647          type
648          percentage
649        }
650        fromAccount {
651          id
652          slug
653          name
654          ... on AccountWithHost {
655            hostFeePercent
656          }
657        }
658        toAccount {
659          id
660          slug
661          name
662          ... on AccountWithHost {
663            hostFeePercent
664          }
665        }
666        expense {
667          id
668          currency
669          amount
670          feesPayer
671        }
672        relatedTransactions(kind: [PAYMENT_PROCESSOR_FEE, EXPENSE]) {
673          id
674          type
675          kind
676          amount {
677            valueInCents
678            currency
679          }
680          netAmountInPayeeCurrency {
681            valueInCents
682            currency
683          }
684          netAmount {
685            valueInCents
686            currency
687          }
688        }
689      }
690    }
691    recurringExpense {
692      id
693      interval
694      endsAt
695    }
696    securityChecks {
697      level
698      message
699      scope
700      details
701    }
702    kycStatus {
703      payee {
704        status
705      }
706    }
707  }
708
709  ${c}
710  ${r.P}
711  ${s.Vo}
712  ${i.B}
713  ${l}
714  ${d}
715`,g=(0,a.J1)`
716  fragment ExpensesListFieldsFragment on Expense {
717    id
718    legacyId
719    publicId
720    description
721    reference
722    status
723    createdAt
724    tags
725    amount
726    comments {
727      totalCount
728    }
729    accountingCategory {
730      id
731      ...AccountingCategorySelectFields
732    }
733    valuesByRole {
734      id
735      ...ExpenseValuesByRoleFragment
736    }
737    amountInAccountCurrency: amountV2(currencySource: ACCOUNT) {
738      valueInCents
739      currency
740      exchangeRate {
741        date
742        value
743        source
744        isApproximate
745        fromCurrency
746        toCurrency
747      }
748    }
749    amountInHostCurrency: amountV2(currencySource: HOST) {
750      valueInCents
751      currency
752      exchangeRate {
753        date
754        value
755        source
756        isApproximate
757        fromCurrency
758        toCurrency
759      }
760    }
761    currency
762    type
763    requiredLegalDocuments
764    feesPayer
765    account {
766      id
767      name
768      slug
769      createdAt
770      currency
771      type
772      imageUrl
773      stats {
774        id
775        balanceWithBlockedFunds {
776          valueInCents
777          currency
778        }
779      }
780      ... on AccountWithHost {
781        host {
782          id
783          slug
784        }
785      }
786      ... on AccountWithParent {
787        parent {
788          id
789          slug
790        }
791      }
792      ...AccountHoverCardFields
793    }
794    permissions {
795      id
796      canDelete
797      canApprove
798      canUnapprove
799      canReject
800      canMarkAsSpam
801      canPay
802      canMarkAsPaid
803      canMarkAsUnpaid
804      canMarkAsIncomplete
805      canSeeInvoiceInfo
806      canEditTags
807      canEditAccountingCategory
808      editAccountingCategory {
809        allowed
810        reason
811      }
812      canUnschedulePayment
813      canHold
814      canRelease
815      approve {
816        allowed
817        reason
818        reasonDetails
819      }
820    }
821    payoutMethod {
822      id
823      type
824      name
825      data
826      isSaved
827      isVerified
828    }
829    payee {
830      id
831      type
832      slug
833      name
834      imageUrl
835      isAdmin
836      # For Collectives, Funds, Events and Projects
837      ... on AccountWithHost {
838        isApproved
839        host {
840          id
841        }
842      }
843
844      # For Fiscal Hosts
845      ... on Organization {
846        host {
847          id
848        }
849      }
850      ...AccountHoverCardFields
851    }
852    createdByAccount {
853      id
854      type
855      slug
856      name
857      legacyId
858      ...AccountHoverCardFields
859    }
860  }
861  ${s.Vo}
862  ${l}
863  ${i.B}
864`,m=(0,a.J1)`
865  fragment ExpensesListAdminFieldsFragment on Expense {
866    id
867    onHold
868    balanceAccountingCategory {
869      id
870      code
871      name
872    }
873    account {
874      id
875    }
876    createdByAccount {
877      id
878      ... on Individual {
879        emails
880      }
881    }
882    approvedBy {
883      id
884      type
885      slug
886      name
887      imageUrl
888      ...AccountHoverCardFields
889    }
890    payee {
891      id
892      ... on Individual {
893        emails
894      }
895    }
896    payoutMethod {
897      id
898      type
899      name
900      data
901      isVerified
902    }
903    items {
904      id
905      description
906      incurredAt
907      url
908      amount
909      file {
910        id
911        type
912        ... on ImageFileInfo {
913          width
914        }
915      }
916    }
917    taxes {
918      id
919      type
920      rate
921    }
922    invoiceFile {
923      id
924      url
925      name
926      type
927      size
928      ... on ImageFileInfo {
929        width
930      }
931    }
932    attachedFiles {
933      id
934      url
935      name
936      info {
937        id
938        type
939        ... on ImageFileInfo {
940          width
941        }
942      }
943    }
944    securityChecks {
945      level
946      message
947      scope
948      details
949    }
950    lastComment: comments(limit: 1, orderBy: { field: CREATED_AT, direction: DESC }) {
951      totalCount
952      nodes {
953        id
954        createdAt
955        fromAccount {
956          id
957          type
958          slug
959          name
960          imageUrl
961        }
962      }
963    }
964
965    kycStatus {
966      payee {
967        status
968      }
969    }
970  }
971`},88808:(e,t,n)=>{n.d(t,{hK:()=>c,i_:()=>o,nK:()=>d,oz:()=>l});var a=n(64487),s=n(13487),i=n(58649);let r=(e,t=e?.host)=>(0,s.Z)(t||e,"EXPENSE_CATEGORIZATION"),o=(e,t,n=t?.host)=>{if(!(0,i.G7)(n,"CHART_OF_ACCOUNTS"))return!1;let a=r(t,n);if(a){if(a.requiredForExpenseSubmitters)return!0;else if(a.requiredForCollectiveAdmins)return e?.isAdminOfCollectiveOrHost(t)}return!1},c=(e,t=e?.host)=>{if(!(0,i.G7)(t,"CHART_OF_ACCOUNTS"))return!1;let n=t?.expenseAccountingCategories?.nodes?.length>0,a=r(e,t);return!!(a?.requiredForCollectiveAdmins&&n)},l=["orderAccountingCategories","expenseAccountingCategories","accountingCategories"],d=(e,t,n,s)=>!!t?.accountingCategory||!!(e&&l.some(e=>(0,a.A)(s,`${e}.nodes`)?.length>0))&&(0,i.G7)(s,"CHART_OF_ACCOUNTS")&&(e.isAdminOfCollective(s)||o(e,n,s))}}]);
972//# sourceMappingURL=7357-058f62240c6c44af.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.