1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0d059-0dc8-0000-0784-6ee3765120be";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="0893e7b4-8045-541b-8754-ed273c68a925")}catch(e){}}();import{j as s,r as xe}from"./1_rjLJJT.js";import{c as T,ee as ya,dT as Ds,T as j,O as qt,j as Jt,t as I,i as tt,B as Y,dA as Sa,u as ms,be as Is,ae as us,af as fs,aI as Ts,aJ as Ms,dE as ka,bI as Na,ef as Es,eg as zs,L as Bt,ar as Rs,H as pt,C as Us,F as Ls,bO as Fs,a as Qt,ag as Aa,bh as Hs,d5 as Ca,a0 as wa,cS as Ns,o as Pa,bd as Oa,D as _a,ap as Da,dF as Ia,h as As}from"./BzLaZ4LI.js";import{u as $s,a as Gs,C as Js,g as Ta}from"./DlbDnXan.js";import{m as Bs,n as Ma,o as Ea,q as Qs,i as za,e as Vs,r as Ra,h as Ws,t as qs,b as Ua,c as La,S as Fa,u as Ha,H as $a,v as Ga,w as Ja,x as Ba,y as Qa,p as Va,A as Wa}from"./CmgG3lqI.js";import{u as Ys}from"./9PyCASxV.js";import{b as Yt,a as hs,c as Zt,e as gs,D as Xt,d as Kt}from"./CqYXRKlk.js";import{D as Zs,i as Xs,a as Ks,f as ea,g as ta,c as sa,e as aa,j as Gt}from"./B8Gh17e6.js";import{b as Et,T as ia,a as na}from"./Da5HTlwd.js";import{L as Vt,b as la,u as oa,a as ra,c as ca,H as da}from"./CJi0kXOi.js";import{D as xs,aS as pa,R as bs,au as ma}from"./CF1GVhvA.js";import{a as ua,b as qa,A as fa,g as Ya}from"./DsKN6oxK.js";import{S as Za,a as Xa,F as Ka,P as ei,I as ti}from"./CdnE4ofX.js";import{S as si}from"./CGkMmlqZ.js";import{R as Cs,D as ai}from"./C9skeD_f.js";import"./BiUYuhao.js";import"./BnWyCVyG.js";import"./DAS7QGzG.js";import"./ChfyjsBN.js";import"./Bi3Aq1hw.js";import"./HtmD5WYw.js";import"./Vcq4gwWv.js";import"./TbZLusC8.js";import"./Bx6t9EPM.js";import"./DTiI9Hoq.js";import"./eOhqpjg0.js";import"./D2C1DYnc.js";import"./GCROyQFE.js";function ws(e){if(!e||!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;const[t,i,a]=e.split("-").map(Number);return new Date(t,i-1,a).toLocaleDateString("en",{weekday:"short",month:"short",day:"numeric"})}function Wt(e,t,i){if(!e||!t||!/^\d{4}-\d{2}-\d{2}$/.test(t))return null;const[a,o,l]=t.split("-").map(Number),n=e[Bs[new Date(a,o-1,l).getDay()].key];return!n||n.closed?null:Ma(i==="open"?n.open:n.close)||null}function ha(e){const t=T.c(16),{startsOn:i,endsOn:a,dates:o,startTime:l,endTime:n,dayRateTerms:d,currency:u,isPaymentSplitEnabled:f}=e,h=o===void 0?null:o,c=l===void 0?null:l,x=n===void 0?null:n,g=d===void 0?null:d,b=f===void 0?!1:f;let m;t[0]!==h?(m=ya(h)?Ds(h):null,t[0]=h,t[1]=m):m=t[1];const v=m;let y;t[2]!==h?.length||t[3]!==x||t[4]!==a||t[5]!==v||t[6]!==c||t[7]!==i?(y=v?s.jsxs("div",{className:"flex flex-col items-start gap-1.5",children:[s.jsx(j,{variant:"label",size:"sm",className:"pb-1",children:h?.length===1?"Date":`Dates · ${h?.length} days`}),s.jsx(j,{variant:"heading",size:"base",children:v})]}):s.jsxs("div",{className:"flex items-stretch",children:[s.jsxs("div",{className:"flex flex-1 flex-col items-start gap-1.5",children:[s.jsx(j,{variant:"label",size:"sm",className:"pb-1",children:"Starts"}),s.jsx(j,{variant:"heading",size:"base",children:ws(i)??"Flexible"}),c?s.jsx(j,{variant:"body",size:"sm",children:c}):null]}),s.jsx("div",{className:"w-px self-stretch bg-ink-black/10 dark:bg-ink-white/10"}),s.jsxs("div",{className:"flex flex-1 flex-col items-end gap-1.5 text-right",children:[s.jsx(j,{variant:"label",size:"sm",className:"pb-1",children:"Ends"}),s.jsx(j,{variant:"heading",size:"base",children:ws(a)??"Flexible"}),x?s.jsx(j,{variant:"body",size:"sm",children:x}):null]})]}),t[2]=h?.length,t[3]=x,t[4]=a,t[5]=v,t[6]=c,t[7]=i,t[8]=y):y=t[8];let S;t[9]!==u||t[10]!==g||t[11]!==b?(S=g!=null&&u!=null?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-px w-full bg-ink-black/10 dark:bg-ink-white/10"}),s.jsxs("div",{className:"flex items-start justify-between py-1",children:[s.jsx(j,{variant:"heading",size:"base",children:"Rate"}),s.jsxs("div",{className:"flex items-baseline gap-1",children:[s.jsx(j,{variant:"heading",size:"base",children:s.jsx(Ea,{paymentSplitArtistReceivesPercent:g.paymentSplitArtistReceivesPercent,paymentSplitCapCents:g.paymentSplitCapCents,currency:u})}
1),s.jsx(j,{variant:"body",size:"sm",inactive:!0,children:"per day"})]})]}),s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx(j,{variant:"heading",size:"base",children:"Payment"}),s.jsx(j,{variant:"heading",size:"base",className:"text-right",children:Qs(b)})]})]}):null,t[9]=u,t[10]=g,t[11]=b,t[12]=S):S=t[12];let A;return t[13]!==y||t[14]!==S?(A=s.jsxs("div",{className:"flex flex-col gap-4 rounded-3xl bg-ink-black/5 p-5 dark:bg-ink-white/5",children:[y,S]}),t[13]=y,t[14]=S,t[15]=A):A=t[15],A}function ds(e){const t=T.c(7),{label:i,value:a}=e;let o;t[0]!==i?(o=s.jsx(j,{variant:"label",size:"sm",className:"text-ink-black-500",children:i}),t[0]=i,t[1]=o):o=t[1];let l;t[2]!==a?(l=s.jsx(j,{variant:"heading",size:"sm",children:a}),t[2]=a,t[3]=l):l=t[3];let n;return t[4]!==o||t[5]!==l?(n=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,l]}),t[4]=o,t[5]=l,t[6]=n):n=t[6],n}function Ps(e){const t=T.c(18),{agreement:i,currency:a}=e;let o;t[0]!==i.proposedDates||t[1]!==i.proposedEndsOn||t[2]!==i.proposedStartsOn?(o=Sa(i.proposedDates,i.proposedStartsOn,i.proposedEndsOn,"long"),t[0]=i.proposedDates,t[1]=i.proposedEndsOn,t[2]=i.proposedStartsOn,t[3]=o):o=t[3];let l;t[4]!==o?(l=s.jsx(ds,{label:"Guesting",value:o}),t[4]=o,t[5]=l):l=t[5];let n;t[6]!==i.paymentSplitArtistReceivesPercent||t[7]!==i.paymentSplitCapCents||t[8]!==a?(n=s.jsx(ds,{label:"Day rate",value:s.jsx(za,{paymentSplitArtistReceivesPercent:i.paymentSplitArtistReceivesPercent,paymentSplitCapCents:i.paymentSplitCapCents,currency:a})}),t[6]=i.paymentSplitArtistReceivesPercent,t[7]=i.paymentSplitCapCents,t[8]=a,t[9]=n):n=t[9];let d;t[10]!==i.isPaymentSplitEnabled?(d=Qs(i.isPaymentSplitEnabled),t[10]=i.isPaymentSplitEnabled,t[11]=d):d=t[11];let u;t[12]!==d?(u=s.jsx(ds,{label:"Payment",value:d}),t[12]=d,t[13]=u):u=t[13];let f;return t[14]!==l||t[15]!==n||t[16]!==u?(f=s.jsxs("div",{className:"flex flex-col gap-2.5 rounded-xl bg-ink-black-50 dark:bg-ink-black-800 p-3",children:[l,n,u]}),t[14]=l,t[15]=n,t[16]=u,t[17]=f):f=t[17],f}function ii(e){const t=T.c(2),{children:i}=e;let a;return t[0]!==i?(a=s.jsx("div",{className:"flex flex-col gap-4 roun
1ded-2xl border border-ink-black-100 p-4 bg-ink-paper dark:bg-ink-black-900",children:i}),t[0]=i,t[1]=a):a=t[1],a}function ni(e){const t=T.c(2),{children:i}=e;let a;return t[0]!==i?(a=s.jsx(j,{variant:"label",size:"sm",className:"text-ink-black-500 mt-2",children:i}),t[0]=i,t[1]=a):a=t[1],a}function li(e){const t=T.c(21),{agreementId:i,studioLabel:a,open:o,onOpenChange:l}=e,n=I.useUtils();let d;t[0]!==l||t[1]!==n?(d={onSuccess:()=>{tt({title:"Guest spot accepted",description:"Your guest book is ready â open it when you're set.",variant:"success"}),n.getMyGuestSpotApplication.invalidate(),n.getGuestSpots.invalidate(),n.getPersonSettings.invalidate(),l(!1)},onError:oi},t[0]=l,t[1]=n,t[2]=d):d=t[2];const{mutate:u,isPending:f}=I.acceptStudioJobAgreement.useMutation(d);let h;t[3]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Yt,{children:"Accept this guest spot?"}),t[3]=h):h=t[3];let c;t[4]!==a?(c=s.jsxs(hs,{children:[h,s.jsxs(Zt,{className:"leading-snug",children:["This creates your guest book for ",a,", set to the proposed dates. It starts closed â open it when you are ready to take bookings."]})]}),t[4]=a,t[5]=c):c=t[5];let x;t[6]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(xs,{asChild:!0,children:s.jsx(Y,{variant:"secondary",children:"Not yet"})}),t[6]=x):x=t[6];let g;t[7]!==u||t[8]!==i?(g=()=>u({agreementId:i}),t[7]=u,t[8]=i,t[9]=g):g=t[9];const b=f?"Acceptingâ¦":"Yes, accept";let m;t[10]!==f||t[11]!==g||t[12]!==b?(m=s.jsxs(gs,{children:[x,s.jsx(Y,{disabled:f,onClick:g,children:b})]}),t[10]=f,t[11]=g,t[12]=b,t[13]=m):m=t[13];let v;t[14]!==c||t[15]!==m?(v=s.jsxs(Xt,{showClose:!1,children:[c,m]}),t[14]=c,t[15]=m,t[16]=v):v=t[16];let y;return t[17]!==l||t[18]!==o||t[19]!==v?(y=s.jsx(Kt,{open:o,onOpenChange:l,children:v}),t[17]=l,t[18]=o,t[19]=v,t[20]=y):y=t[20],y}function oi(e){tt({title:"Unable to accept this guest spot. Try again.",description:e.message,variant:"error"})}function ri(e){const t=T.c(5),{agreement:i,studioLabel:a}=e,[o,l]=xe.useState(!1);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Y,{fullWidth:!0,className:"h-11",onClick:()=>l(!0),children:"Accept guest spot"}),t[0]=n):n=t[0];let d;return t[1]!==i.id||t[2]!==o||t[3]!==a?(d=s.jsxs(s.Fragment,{children:[n,s.jsx(li,{agreementId:i.id,studioLabel:a,open:o,onOpenChange:l})]}),t[1]=i.id,t[2]=o,t[3]=a,t[4]=d):d=t[4],d}function ci(e){const t=T.c(9),{agreement:i,personId:a,handle:o}=e,l=qt();if(!i.bookId)return null;let n;t[0]!==i.bookId||t[1]!==l||t[2]!==o||t[3]!==a?(n=l("bookSettings",{bookId:i.bookId,personId:a,handle:o}),t[0]=i.bookId,t[1]=l,t[2]=o,t[3]=a,t[4]=n):n=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=Jt({variant:"primary",fullWidth:!0}),t[5]=d):d=t[5];const u=`${d} h-11 no-underline`;let f;return t[6]!==n||t[7]!==u?(f=s.jsx(Vt,{to:n,viewTransition:!0,className:u,children:"Manage your book"}),t[6]=n,t[7]=u,t[8]=f):f=t[8],f}function di(e){const t=T.c(4),{agreement:i,simplified:a,currency:o}=e;let l;return t[0]!==i||t[1]!==o||t[2]!==a?(l=a?s.jsx(Ps,{agreement:i,currency:o}):s.jsx(ii,{children:s.jsx(Ps,{agreement:i,currency:o})}),t[0]=i,t[1]=o,t[2]=a,t[3]=l):l=t[3],l}const Os=e=>!!e&&(e.proposedStartsOn!==null||e.proposedEndsOn!==null||(e.proposedDates?.length??0)>0);function ga(e,t){return Os(e)?{dates:e?.proposedDates??null,endsOn:e?.proposedEndsOn??null,startsOn:e?.proposedStartsOn??null}:Os(t)?{dates:t.proposedDates??null,endsOn:t.proposedEndsOn,startsOn:t.proposedStartsOn}:{dates:null,endsOn:t.postingAdvertisedEndsOn,startsOn:t.postingAdvertisedStartsOn}}function xa(e){const t=T.c(29),{imageUrls:i,hero:a}=e;let o;t[0]!==i?(o=s.jsx(ei,{imageSrcs:i}),t[0]=i,t[1]=o):o=t[1];let l;t[2]!==a.avatarUrl?(l=s.jsx("div",{className:"relative z-10 -mt-10 flex justify-end px-8",children:s.jsx(Aa,{pictureUrl:a.avatarUrl,className:"!size-20 border-8 border-ink-white dark:border-ink-black-900",ring:!1})}),t[2]=a.avatarUrl,t[3]=l):l=t[3];let n;t[4]!==a.statusLabel||t[5]!==a.statuses?(n=s.jsx(fa,{statuses:a.statuses,label:a.statusLabel}),t[4]=a.statusLabel,t[5]=a.statuses,t[6]=n):n=t[6];let d;t[7]!==a.studioName?(d=s.jsx(pt,{size:"2xl",children:a.studioName}),t[7]=a.studioName,t[8]=d):d=t[8];let u;t[9]!==a.dayRateLabel||t[10]!==a.locationLabel?(u=(a.dayRateLabel||a.locationLabel)&&s.jsx(j,{variant:"body",
1size:"base",children:[a.dayRateLabel,a.locationLabel].filter(Boolean).join(" · ")}),t[9]=a.dayRateLabel,t[10]=a.locationLabel,t[11]=u):u=t[11];let f;t[12]!==d||t[13]!==u?(f=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,u]}),t[12]=d,t[13]=u,t[14]=f):f=t[14];let h;t[15]!==n||t[16]!==f?(h=s.jsxs("div",{className:"-mt-7 flex flex-col gap-3 px-5",children:[n,f]}),t[15]=n,t[16]=f,t[17]=h):h=t[17];let c;t[18]!==a.dates||t[19]!==a.endTime||t[20]!==a.endsOn||t[21]!==a.startTime||t[22]!==a.startsOn?(c=(a.startsOn||a.endsOn||a.dates?.length)&&s.jsx("div",{className:"mt-6 px-5",children:s.jsx(ha,{startsOn:a.startsOn,endsOn:a.endsOn,dates:a.dates,startTime:a.startTime,endTime:a.endTime})}),t[18]=a.dates,t[19]=a.endTime,t[20]=a.endsOn,t[21]=a.startTime,t[22]=a.startsOn,t[23]=c):c=t[23];let x;return t[24]!==o||t[25]!==l||t[26]!==h||t[27]!==c?(x=s.jsxs("div",{className:"flex flex-col",children:[o,l,h,c]}),t[24]=o,t[25]=l,t[26]=h,t[27]=c,t[28]=x):x=t[28],x}function pi(e){const t=T.c(15),{agreements:i,currency:a}=e;let o,l,n,d;if(t[0]!==i||t[1]!==a){d=Symbol.for("react.early_return_sentinel");e:{const f=i.filter(mi),h=i.length===1;if(f.length===0){d=null;break e}o="mt-6 flex flex-col gap-4 px-5",t[6]!==h?(l=!h&&s.jsx(ni,{children:"Closed"}),t[6]=h,t[7]=l):l=t[7];let c;t[8]!==a||t[9]!==h?(c=x=>s.jsx(di,{agreement:x,simplified:h,currency:a},x.id),t[8]=a,t[9]=h,t[10]=c):c=t[10],n=f.map(c)}t[0]=i,t[1]=a,t[2]=o,t[3]=l,t[4]=n,t[5]=d}else o=t[2],l=t[3],n=t[4],d=t[5];if(d!==Symbol.for("react.early_return_sentinel"))return d;let u;return t[11]!==o||t[12]!==l||t[13]!==n?(u=s.jsxs("div",{className:o,children:[l,n]}),t[11]=o,t[12]=l,t[13]=n,t[14]=u):u=t[14],u}function mi(e){return e.isArchived}function ui(e){const t=T.c(22),{hero:i,portfolioUrls:a,notes:o,agreements:l,currency:n,applicationId:d,studioManagerId:u}=e,f=qt();let h;t[0]!==l?(h=l.find(fi)??null,t[0]=l,t[1]=h):h=t[1];const c=h;let x;t[2]!==i||t[3]!==a?(x=s.jsx(xa,{imageUrls:a,hero:i}),t[2]=i,t[3]=a,t[4]=x):x=t[4];let g;t[5]!==c?(g=c&&s.jsx("div",{className:"mt-6 px-5",children:s.jsx(Fa,{isPaymentSplitEnabled:c.isPaymentSplitEnabled})}),t[5]=c,t[6]=g):g=t[6];let b;t[7]!==l||t[8]!==n?(b=l.length>0&&s.jsx(pi,{agreements:l,currency:n}),t[7]=l,t[8]=n,t[9]=b):b=t[9];let m;t[10]!==o?(m=o&&s.jsxs("div",{className:"mt-12 flex flex-col gap-4 px-5",children:[s.jsx(j,{variant:"label",size:"sm",className:"px-1",children:"Note to studio"}),s.jsx("div",{className:"rounded-3xl bg-ink-paper py-5 dark:bg-ink-black-800",children:s.jsx(j,{variant:"heading",size:"xl",className:"px-6 leading-snug [text-indent:-0.45em]",children:`â${o}â`})})]}),t[10]=o,t[11]=m):m=t[11];let v;t[12]!==d||t[13]!==f||t[14]!==u?(v=u&&s.jsx("div",{className:"mt-12 px-5",children:s.jsxs(Fs,{className:"flex flex-col gap-2",children:[s.jsx("div",{className:"text-sm font-medium select-none",children:"Venue staff"}),s.jsx(Vt,{to:f("guestSpotApplication",{personId:u,applicationId:d}),className:Qt(Jt({variant:"secondary"}),"w-full"),viewTransition:!0,children:"View this application as studio"})]})}),t[12]=d,t[13]=f,t[14]=u,t[15]=v):v=t[15];let y;return t[16]!==x||t[17]!==g||t[18]!==b||t[19]!==m||t[20]!==v?(y=s.jsxs("div",{className:"pb-12",children:[x,g,b,m,v]}),t[16]=x,t[17]=g,t[18]=b,t[19]=m,t[20]=v,t[21]=y):y=t[21],y}function fi(e){return!e.isArchived}function hi(e){const t=T.c(65),{hero:i,studioProfile:a}=e;if(!a){let U;return t[0]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx("div",{className:"flex w-full items-center justify-center px-5 py-16",children:s.jsx(j,{variant:"body",size:"sm",className:"text-ink-black/60",children:"Loading studioâ¦"})}),t[0]=U):U=t[0],U}let o,l,n,d,u,f,h,c,x,g,b,m,v;if(t[1]!==i||t[2]!==a.amenities||t[3]!==a.artists||t[4]!==a.description||t[5]!==a.galleryImageUrls||t[6]!==a.highlights||t[7]!==a.hoursMode||t[8]!==a.location||t[9]!==a.studioHoursMinutesOfDay){const U=Ha(a.studioHoursMinutesOfDay),L=a.location?.latitude!=null?Number(a.location.latitude):null,p=a.location?.longitude!=null?Number(a.location.longitude):null;d="pb-12",t[23]!==i||t[24]!==a.galleryImageUrls?(u=s.jsx(xa,{imageUrls:a.galleryImageUrls,hero:i}),t[23]=i,t[24]=a.galleryImageUrls,t[25]=u):u=t[25],g="mt-12 flex flex-col gap-12",t[26]!==a.highlights?(b=s.jsx($a,{highlights:a.highlights}),t[26]=a.highlights,t[27]=b):b=t[27],t[28]!==a.description?(m=a.description&&s.jsxs("div",{className:"flex flex-col gap-6 px-5",children:[s.jsx(pt,{size:"xl",children:"About the Space"}
1),s.jsx(j,{variant:"body",size:"lg",className:"whitespace-pre-line leading-[1.4]",children:a.description})]}),t[28]=a.description,t[29]=m):m=t[29],t[30]!==a.artists?(v=s.jsx(Za,{artists:a.artists}),t[30]=a.artists,t[31]=v):v=t[31],t[32]!==a.amenities?(l=s.jsx(Ga,{amenities:a.amenities}),t[32]=a.amenities,t[33]=l):l=t[33],t[34]!==i||t[35]!==L||t[36]!==p||t[37]!==a.location?.address||t[38]!==a.location?.isPrivate||t[39]!==a.location?.mapTileUrl?(n=L!==null&&p!==null&&s.jsxs("div",{className:"flex flex-col gap-6 px-5",children:[s.jsx(pt,{size:"xl",children:"Location"}),s.jsx(Xa,{latitude:L,longitude:p,isApproximate:a.location?.isPrivate??!1,cachedTileUrl:a.location?.mapTileUrl,studioName:i.studioName,locationLabel:i.locationLabel,address:a.location?.address??null})]}),t[34]=i,t[35]=L,t[36]=p,t[37]=a.location?.address,t[38]=a.location?.isPrivate,t[39]=a.location?.mapTileUrl,t[40]=n):n=t[40],h="flex flex-col gap-6 px-5",t[41]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(pt,{size:"xl",children:"Studio hours"}),t[41]=c):c=t[41],t[42]!==i||t[43]!==a.hoursMode?(x=a.hoursMode==="flexible"&&s.jsx(Ka,{studioName:i.studioName}),t[42]=i,t[43]=a.hoursMode,t[44]=x):x=t[44],o="flex flex-col gap-5",f=Bs.map((w,r)=>{const Ne=U[w.key];return s.jsxs("div",{className:"flex flex-col gap-5",children:[r>0&&s.jsx("div",{className:"h-px w-full bg-ink-black/10"}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(j,{variant:"heading",size:"base",children:w.label}),s.jsx(j,{variant:"heading",size:"base",children:Ne?Ja(Ne):"Any time"})]})]},w.key)}),t[1]=i,t[2]=a.amenities,t[3]=a.artists,t[4]=a.description,t[5]=a.galleryImageUrls,t[6]=a.highlights,t[7]=a.hoursMode,t[8]=a.location,t[9]=a.studioHoursMinutesOfDay,t[10]=o,t[11]=l,t[12]=n,t[13]=d,t[14]=u,t[15]=f,t[16]=h,t[17]=c,t[18]=x,t[19]=g,t[20]=b,t[21]=m,t[22]=v}else o=t[10],l=t[11],n=t[12],d=t[13],u=t[14],f=t[15],h=t[16],c=t[17],x=t[18],g=t[19],b=t[20],m=t[21],v=t[22];let y;t[45]!==o||t[46]!==f?(y=s.jsx("div",{className:o,children:f}),t[45]=o,t[46]=f,t[47]=y):y=t[47];let S;t[48]!==y||t[49]!==h||t[50]!==c||t[51]!==x?(S=s.jsxs("div",{className:h,children:[c,x,y]}),t[48]=y,t[49]=h,t[50]=c,t[51]=x,t[52]=S):S=t[52];let A;t[53]!==l||t[54]!==n||t[55]!==S||t[56]!==g||t[57]!==b||t[58]!==m||t[59]!==v?(A=s.jsxs("div",{className:g,children:[b,m,v,l,n,S]}),t[53]=l,t[54]=n,t[55]=S,t[56]=g,t[57]=b,t[58]=m,t[59]=v,t[60]=A):A=t[60];let Z;return t[61]!==d||t[62]!==u||t[63]!==A?(Z=s.jsxs("div",{className:d,children:[u,A]}),t[61]=d,t[62]=u,t[63]=A,t[64]=Z):Z=t[64],Z}function gi(){const e=T.c(165),{applicationId:t}=la(),{handle:i,personId:a}=ms(),o=oa(),l=I.useUtils(),n=ra(),d=qt();let u;e[0]!==d||e[1]!==i||e[2]!==n.state?.fromApp||e[3]!==o||e[4]!==a?(u=()=>{if(n.state?.fromApp){o(-1);return}o(d("guestSpotApplications",{handle:i,personId:a}),{viewTransition:!0})},e[0]=d,e[1]=i,e[2]=n.state?.fromApp,e[3]=o,e[4]=a,e[5]=u):u=e[5];const f=u,[h]=ca(),[c,x]=xe.useState(h.get("tab")==="chat"?"chat":"application"),[g,b]=xe.useState(!1);let m;e[6]!==l?(m=()=>{l.getMyGuestSpotApplication.invalidate(),l.getGuestSpots.invalidate(),l.getPersonSettings.invalidate(),b(!1)},e[6]=l,e[7]=m):m=e[7];let v;e[8]===Symbol.for("react.memo_cache_sentinel")?(v=O=>{tt({title:"Unable to cancel the guest spot. Try again.",description:O.message,variant:"error"}),b(!1)},e[8]=v):v=e[8];let y;e[9]!==m?(y={onSuccess:m,onError:v},e[9]=m,e[10]=y):y=e[10];const{mutate:S,isPending:A}=I.cancelGuestSpot.useMutation(y);let Z;e[11]!==t?(Z={applicationId:t},e[11]=t,e[12]=Z):Z=e[12];const U=!!t;let L;e[13]!==U?(L={enabled:U},e[13]=U,e[14]=L):L=e[14];const{data:p,isLoading:w,isError:r,error:Ne}=I.getMyGuestSpotApplication.useQuery(Z,L),M=p?.studioManagerId;let Be;e[15]!==M?(Be={studioOrManagerPersonId:M},e[15]=M,e[16]=Be):Be=e[16];const k=!!M;let C;e[17]!==k?(C={enabled:k},e[17]=k,e[18]=C):C=e[18];const{data:P}=I.getStudioProfile.useQuery(Be,C),_=p?.conversationId??null,re=c==="chat";let F;e[19]!==t||e[20]!==l?(F=()=>{l.getMyGuestSpotApplication.invalidate({applicationId:t})},e[19]=t,e[20]=l,e[21]=F):F=e[21];let ze;e[22]!==_||e[23]!==a||e[24]!==re||e[25]!==F?(ze={conversationId:_,personId:a,enabled:re,onMarkedAsRead:F},e[22]=_,e[23]=a,e[24]=re,e[25]=F,e[26]=ze):ze=e[26];const{groups:ce,isLoading:st,hasNextPage:de,isFetchingNextPage:Re,handleLoadMoreAbove:pe,editingMessage:Ae,setEditingMessage:be,handleEditMessage:ee,pendingDeleteId:te,setPendingDeleteId:V,isDeleting:se,deleteMessage:H,handleOptimisticAdd:X,handleOptimisticConfirm:ve,handleOptimisticFail:je,scrollToBottom:Ue}=$s(ze),z=c==="chat",$=Ys(100);if(r){if(Ne.data?.httpStatus===Is.NOT_FOUND){let Je;return e[27]===Symbol.for("react.memo_cache_sentinel")?(Je=s.jsx(us,{code:fs.getMyGuestSpotApplication}),e[27]=Je):Je=e[27],Je}let O;return e[28]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ts,{code:Ms.getMyGuestSpotApplication}),e[28]=O):O=e[28],O}if(w||!p){let O;return e[29]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Bt,{}),e[29]=O):O=e[29],O}let me;e[30]!==p?(me=ua(p),e[30]=p,e[31]=me):me=e[31];const ye=me;let N,W,ue;e[32]!==p.agreements||e[33]!==p.isArchived||e[34]!==ye?(N=p.agreements.find(yi),W=!p.isArchived&&!!N?.bookId,ue=N&&ka(N.proposedEndsOn,Na(new Date))?"Completed":ye,e[32]=p.agreements,e[33]=p.isArchived,e[34]=ye,e[35]=N,e[36]=W,e[37]=ue):(N=e[35],W=e[36],ue=e[37]);const fe=ue,Se=p.agreements.length>1;let ke;e[38]!==p.agreements||e[39]!==Se||e[40]!==fe?(ke=Se?p.agreements.map(qa):[fe],e[38]=p.agreements,e[39]=Se,e[40]=fe,e[41]=ke):ke=e[41];const ae=ke,ie=Se?"Multiple agreements":fe;let K;e[42]!==p.agreements?(K=p.agreements.find(ji)??null,e[42]=p.agreements,e[43]=K):K=e[43];const G=K;let ne,le,J,B,q,he,mt;if(e[44]!==p||e[45]!==P){const O=p.agreements.find(vi)??null;
1B=ga(O,p),he=B.startsOn,le=B.endsOn;const Je=P?Vs(P.studioHoursMinutesOfDay,P.hoursMode):null;q=Wt(Je,he,"open"),ne=Wt(Je,le,"close");const dt=P?.location;let Ee;e[53]!==dt?(Ee=Ra(dt),e[53]=dt,e[54]=Ee):Ee=e[54],J=Ee;const Ke=O?{paymentSplitArtistReceivesPercent:O.paymentSplitArtistReceivesPercent,paymentSplitCapCents:O.paymentSplitCapCents}:{paymentSplitArtistReceivesPercent:p.postingAdvertisedPaymentSplitArtistReceivesPercent,paymentSplitCapCents:p.postingAdvertisedPaymentSplitCapCents};mt=Ws(Ke)?`${qs(Ke,p.paymentSplitCurrency)} per day`:null,e[44]=p,e[45]=P,e[46]=ne,e[47]=le,e[48]=J,e[49]=B,e[50]=q,e[51]=he,e[52]=mt}else ne=e[46],le=e[47],J=e[48],B=e[49],q=e[50],he=e[51],mt=e[52];const at=mt,it=p.studioHandle?`@${p.studioHandle}`:P?.name||p.studioName||null,Mt=P?.name||p.studioName||"the studio";let Qe;e[55]!==p.applicantProfileImageUrl||e[56]!==at||e[57]!==ne||e[58]!==le||e[59]!==J||e[60]!==B.dates||e[61]!==q||e[62]!==he||e[63]!==ie||e[64]!==ae||e[65]!==Mt?(Qe={avatarUrl:p.applicantProfileImageUrl,statuses:ae,statusLabel:ie,studioName:Mt,locationLabel:J,dayRateLabel:at,startsOn:he,endsOn:le,dates:B.dates,startTime:q,endTime:ne},e[55]=p.applicantProfileImageUrl,e[56]=at,e[57]=ne,e[58]=le,e[59]=J,e[60]=B.dates,e[61]=q,e[62]=he,e[63]=ie,e[64]=ae,e[65]=Mt,e[66]=Qe):Qe=e[66];const Ce=Qe;let Ve;e[67]!==p.formQuestions?(Ve=p.formQuestions.find(bi)?.s3Urls??[],e[67]=p.formQuestions,e[68]=Ve):Ve=e[68];const nt=Ve;let ut;e[69]!==p.formQuestions?(ut=p.formQuestions.find(xi)?.answer??"",e[69]=p.formQuestions,e[70]=ut):ut=e[70];const ft=ut;let we;e[71]===Symbol.for("react.memo_cache_sentinel")?(we=O=>x(O),e[71]=we):we=e[71];const lt=p.studioHandle?`@${p.studioHandle} guest `:"Guest ";let Pe;e[72]!==lt?(Pe=s.jsx(da,{children:s.jsxs("title",{children:[lt,"spot application"]})}),e[72]=lt,e[73]=Pe):Pe=e[73];let Le;e[74]!==$?(Le=s.jsx("div",{className:"pointer-events-none absolute inset-x-0 -bottom-12 top-0 backdrop-blur-md",style:{maskImage:"linear-gradient(to bottom, black 50%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 50%, transparent 100%)",opacity:$,willChange:"backdrop-filter, opacity",transform:"translate3d(0, 0, 0)"}}),e[74]=$,e[75]=Le):Le=e[75];let We;e[76]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsx(Rs,{size:20}),e[76]=We):We=e[76];let E;e[77]!==f?(E=s.jsx("button",{type:"button","aria-label":"Back",onClick:f,className:"flex size-8 items-center justify-center rounded-full bg-ink-paper text-ink-black dark:bg-ink-black-800 dark:text-ink-white",children:We}),e[77]=f,e[78]=E):E=e[78];let D;e[79]!==it?(D=it&&s.jsx("div",{className:"pointer-events-none absolute left-1/2 top-1/2 max-w-[50%] -translate-x-1/2 -translate-y-1/2",children:s.jsx(pt,{size:"lg",className:"truncate text-center",children:it})}),e[79]=it,e[80]=D):D=e[80];let Oe;e[81]!==W?(Oe=W&&s.jsxs(Zs,{children:[s.jsx(Xs,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"More options",className:"flex size-8 items-center justify-center rounded-full bg-ink-paper text-ink-black dark:bg-ink-black-800 dark:text-ink-white",children:s.jsx(pa,{className:"size-5"})})}),s.jsxs(Ks,{showClose:!1,children:[s.jsx(ea,{children:s.jsxs(bs,{children:[s.jsx(ta,{children:"Guest spot options"}),s.jsx(sa,{children:"Cancel your guest spot."})]})}),s.jsx(aa,{children:s.jsx(Gt,{asChild:!0,children:s.jsx(Y,{variant:"destructive",fullWidth:!0,onClick:()=>b(!0),children:"Cancel guest spot"})})})]})]}),e[81]=W,e[82]=Oe):Oe=e[82];let oe;e[83]!==E||e[84]!==D||e[85]!==Oe?(oe=s.jsxs("div",{className:"relative flex items-center justify-between px-5 pb-3 pt-5",children:[E,D,Oe]}),e[83]=E,e[84]=D,e[85]=Oe,e[86]=oe):oe=e[86];let _e;e[87]!==$?(_e=Es($),e[87]=$,e[88]=_e):_e=e[88];let Q;e[89]!==_e?(Q={boxShadow:_e,display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))"},e[89]=_e,e[90]=Q):Q=e[90];let De;e[91]===Symbol.for("react.memo_cache_sentinel")?(De=s.jsx(Et,{value:"application",className:"h-full rounded-full",children:"Application"}),e[91]=De):De=e[91];let qe;e[92]!==p.conversationHasUnread||e[93]!==z?(qe=p.conversationHasUnread&&!z&&s.jsx("span",{className:"size-1.5 rounded-full bg-red-500"}),e[92]=p.conversationHasUnread,e[93]=z,e[94]=qe):qe=e[94];let ot;e[95]!==qe?(ot=s.jsx(Et,{value:"chat",className:"h-full rounded-full",children:s.jsxs("span",{className:"flex items-center justify-center gap-1.5",children:["Chat",qe]})}),e[95]=qe,e[96]=ot):ot=e[96];let ht;e[97]===Symbol.for("react.memo_cache_sentinel")?(ht=s.jsx(Et,{value:"studio",className:"h-full rounded-full",children:"Studio"}),e[97]=ht):ht=e[97];let Fe;e[98]!==Q||e[99]!==ot?(Fe=s.jsx("div",{className:"px-5 pb-3",children:s.jsxs(ia,{className:"relative h-10 w-full gap-1 rounded-full p-1",style:Q,children:[De,ot,ht]})}),e[98]=Q,e[99]=ot,e[100]=Fe):Fe=e[100];let Ie;e[101]!==oe||e[102]!==Fe?(Ie=s.jsxs("div",{className:"relative mx-auto w-full max-w-screen-xs",children:[oe,Fe]}
1),e[101]=oe,e[102]=Fe,e[103]=Ie):Ie=e[103];let Ye;e[104]!==Le||e[105]!==Ie?(Ye=s.jsxs("div",{className:"relative",children:[Le,Ie]}),e[104]=Le,e[105]=Ie,e[106]=Ye):Ye=e[106];let He;e[107]!==N||e[108]!==c||e[109]!==_||e[110]!==Ae||e[111]!==i||e[112]!==X||e[113]!==ve||e[114]!==je||e[115]!==Ce||e[116]!==z||e[117]!==G||e[118]!==a||e[119]!==Ue||e[120]!==be?(He=z&&_?s.jsx(Gs,{conversationId:_,personId:a,providerHandle:i,onEnsureConversation:async()=>_,editingMessage:Ae,onCancelEdit:()=>be(null),onMessageSent:Ue,onPendingMessageAdded:X,onPendingMessageConfirmed:ve,onPendingMessageFailed:je}):c==="application"&&(G||N?.bookId)?s.jsx(zs,{children:G?s.jsx(ri,{agreement:G,studioLabel:Ce.studioName}):N?s.jsx(ci,{agreement:N,personId:a,handle:i}):null}):void 0,e[107]=N,e[108]=c,e[109]=_,e[110]=Ae,e[111]=i,e[112]=X,e[113]=ve,e[114]=je,e[115]=Ce,e[116]=z,e[117]=G,e[118]=a,e[119]=Ue,e[120]=be,e[121]=He):He=e[121];let Te;e[122]!==c||e[123]!==p.agreements||e[124]!==p.id||e[125]!==p.paymentSplitCurrency||e[126]!==p.studioManagerId||e[127]!==_||e[128]!==H||e[129]!==ce||e[130]!==ee||e[131]!==pe||e[132]!==de||e[133]!==Ce||e[134]!==z||e[135]!==se||e[136]!==Re||e[137]!==st||e[138]!==ft||e[139]!==te||e[140]!==nt||e[141]!==V||e[142]!==P?(Te=z?_?s.jsx(Js,{conversationId:_,groups:ce,hasMoreAbove:de&&!Re,onLoadMoreAbove:pe,isFetchingNextPage:Re,isInitialLoading:st,onEditMessage:ee,onDeleteMessage:V,emptyDescription:"Say hello!",pendingDeleteId:te,setPendingDeleteId:V,isDeleting:se,deleteMessage:H}):s.jsx("div",{className:"mx-auto flex w-full max-w-screen-xs items-center justify-center px-5 py-16",children:s.jsx(j,{variant:"body",size:"sm",className:"text-ink-black/60",children:"No messages yet."})}):s.jsx("div",{className:"mx-auto w-full max-w-screen-xs",children:c==="application"?s.jsx(ui,{hero:Ce,portfolioUrls:nt,notes:ft,agreements:p.agreements,currency:p.paymentSplitCurrency,applicationId:p.id,studioManagerId:p.studioManagerId??null}):s.jsx(hi,{hero:Ce,studioProfile:P})}),e[122]=c,e[123]=p.agreements,e[124]=p.id,e[125]=p.paymentSplitCurrency,e[126]=p.studioManagerId,e[127]=_,e[128]=H,e[129]=ce,e[130]=ee,e[131]=pe,e[132]=de,e[133]=Ce,e[134]=z,e[135]=se,e[136]=Re,e[137]=st,e[138]=ft,e[139]=te,e[140]=nt,e[141]=V,e[142]=P,e[143]=Te):Te=e[143];let $e;e[144]!==Ye||e[145]!==He||e[146]!==Te?($e=s.jsx(Us,{className:"px-0",children:s.jsx(Ls,{headerSlot:Ye,footerSlot:He,children:Te})}),e[144]=Ye,e[145]=He,e[146]=Te,e[147]=$e):$e=e[147];let Ze;e[148]===Symbol.for("react.memo_cache_sentinel")?(Ze=s.jsxs(hs,{children:[s.jsx(Yt,{children:"Cancel guest spot?"}),s.jsx(Zt,{className:"leading-snug",children:"This archives your guest book and its unbooked requests, and ends the guesting agreement. Booked appointments stay for your reference. This cannot be undone."})]}),e[148]=Ze):Ze=e[148];let Xe;e[149]===Symbol.for("react.memo_cache_sentinel")?(Xe=s.jsx(xs,{asChild:!0,children:s.jsx(Y,{variant:"secondary",children:"No, never mind"})}),e[149]=Xe):Xe=e[149];let ge;e[150]!==N||e[151]!==S?(ge=()=>N?.bookId&&S({bookId:N.bookId}),e[150]=N,e[151]=S,e[152]=ge):ge=e[152];const rt=A?"Cancellingâ¦":"Yes, cancel guest spot";let Me;e[153]!==A||e[154]!==ge||e[155]!==rt?(Me=s.jsxs(Xt,{showClose:!1,children:[Ze,s.jsxs(gs,{children:[Xe,s.jsx(Y,{variant:"destructive",disabled:A,onClick:ge,children:rt})]})]}),e[153]=A,e[154]=ge,e[155]=rt,e[156]=Me):Me=e[156];let Ge;e[157]!==g||e[158]!==Me?(Ge=s.jsx(Kt,{open:g,onOpenChange:b,children:Me}),e[157]=g,e[158]=Me,e[159]=Ge):Ge=e[159];let ct;return e[160]!==c||e[161]!==Pe||e[162]!==$e||e[163]!==Ge?(ct=s.jsxs(na,{value:c,onValueChange:we,children:[Pe,$e,Ge]}),e[160]=c,e[161]=Pe,e[162]=$e,e[163]=Ge,e[164]=ct):ct=e[164],ct}function xi(e){return e.questionRef===La}function bi(e){return e.questionRef===Ua}function vi(e){return!e.isArchived}function ji(e){return!e.isAccepted&&!e.isArchived}function yi(e){return e.isAccepted&&!e.isArchived}function Si(e){if(!e)return null;const t=e.trim().replace(/^(?:https?:\/\/)?(?:www\.)?instagram\.com\//i,"").replace(/^@/,"").split(/[/?#]/,1)[0].trim();return/^[A-Za-z0-9._]{1,30}$/.test(t)?t:null}function ki({defaultDates:e,defaultStartsOn:t,defaultEndsOn:i}){return e?.length?e:t&&i?Ba(t,i):[]}function _s(e){const t=T.c(7),{src:i,className:a}=e;let o;t[0]!==a?(o=Qt("size-14 shrink-0 overflow-hidden rounded-full ring-4 ring-ink-white dark:ring-ink-black-900",a),t[0]=a,t[1]=o):o=t[1];const l=i??Hs;let n;t[2]!==l?(n=s.jsx("img",{src:l,alt:"",className:"size-full bg-ink-black-100 object-cover dark:bg-ink-black-800"}),t[2]=l,t[3]=n):n=t[3];let d;return t[4]!==o||t[5]!==n?(d=s.jsx("div",{className:o,children:n}),t[4]=o,t[5]=n,t[6]=d):d=t[6],d}function Ni(e){const t=T.c(83),{open:i,onOpenChange:a,applicantHandle:o,applicantImageUrl:l,studioImageUrl:n,defaultStartsOn:d,defaultEndsOn:u,defaultDates:f,windowStart:h,windowEnd:c,dayRateTerms:x,currency:g,isPaymentSplitEnabled:b,isPending:m,datesOnly:v,onConfirm:y}=e,S=v===void 0?!1:v,[A,Z]=xe.useState(!1),[U,L]=xe.useState(!1);let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p=[],t[0]=p):p=t[0];const[w,r]=xe.useState(p);let Ne;t[1]===Symbol.for("react.memo_cache_sentinel")?(Ne={paymentSplitArtistReceivesPercent:0,paymentSplitCapCents:0},t[1]=Ne):Ne=t[1];const[M,Be]=xe.useState(Ne),[k,C]=xe.useState(i);i!==k&&(C(i),i&&(r(ki({defaultDates:f,defaultEndsOn:u,defaultStartsOn:d})),Be(x??{paymentSplitArtistReceivesPercent:0,paymentSplitCapCents:0})));let P;t[2]!==w?(P=Ds(w,"arrow",{maxShown:6})??"Choose dates",t[2]=w,t[3]=P):P=t[3];const _=P;let re;t[4]!==M?(re=Ws(M),t[4]=M,t[5]=re):re=t[5];const F=re,ze=S?w.length>0:F;let ce;t[6]===Symbol.for("react.memo_cache_sentinel")?(ce=()=>setTimeout(()=>Z(!1),0),t[6]=ce):ce=t[6];const st=ce;let de;t[7]===Symbol.for("react.memo_cache_sentinel")?(de=()=>setTimeout(()=>L(!1),0),t[7]=de):de=t[7];const Re=de;let pe;t[8]!==y||t[9]!==w||t[10]!==M?(pe=()=>{y({...Va(w),...M})},t[8]=y,t[9]=w,t[10]=M,t[11]=pe):pe=t[11];const Ae=pe,be=S?"Change dates":"Make offer";let ee;t[12]!==be?(ee=s.jsx(Yt,{children:be}),t[12]=be,t[13]=ee):ee=t[13];const te=S?"Move the days this guest spot runs.":"Finalize the guest spot offer details before sending.";let V;t[14]!==te?(V=s.jsx(Zt,{children:te}),t[14]=te,t[15]=V):V=t[15];let se;t[16]!==ee||t[17]!==V?(se=s.jsxs(bs,{children:[ee,V]}
1),t[16]=ee,t[17]=V,t[18]=se):se=t[18];let H;t[19]!==l?(H=s.jsx(_s,{src:l,className:"z-[2] -mr-2"}),t[19]=l,t[20]=H):H=t[20];let X;t[21]!==n?(X=s.jsx(_s,{src:n,className:"z-[1]"}),t[21]=n,t[22]=X):X=t[22];let ve;t[23]!==H||t[24]!==X?(ve=s.jsxs("div",{className:"isolate flex items-center justify-center",children:[H,X]}),t[23]=H,t[24]=X,t[25]=ve):ve=t[25];let je;t[26]!==o?(je=o?s.jsxs(pt,{size:"2xl",children:["@",o]}):null,t[26]=o,t[27]=je):je=t[27];const Ue=S?"The guest artist keeps their spot on the days you pick here":"Weâll finalize the guest spot offer with the following details";let z;t[28]!==Ue?(z=s.jsx(j,{variant:"body",size:"base",className:"text-ink-black-600",children:Ue}),t[28]=Ue,t[29]=z):z=t[29];let $;t[30]!==je||t[31]!==z?($=s.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[je,z]}),t[30]=je,t[31]=z,t[32]=$):$=t[32];let me;t[33]===Symbol.for("react.memo_cache_sentinel")?(me=()=>Z(!0),t[33]=me):me=t[33];let ye;t[34]!==_?(ye=s.jsx(Cs,{label:"Dates",value:_,onClick:me}),t[34]=_,t[35]=ye):ye=t[35];let N;t[36]!==g||t[37]!==S||t[38]!==F||t[39]!==b||t[40]!==M?(N=!S&&s.jsxs(s.Fragment,{children:[s.jsx(Cs,{label:"Rate",value:F?qs(M,g):"Set a rate",subValue:F?"per day":void 0,onClick:()=>L(!0)}),s.jsx("div",{className:"h-px w-full bg-ink-black/10 dark:bg-ink-white/10"}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(j,{variant:"heading",size:"base",children:"Auto-collect"}),s.jsx(Qa,{})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(j,{variant:"heading",size:"base",children:"Notify me"}),s.jsx(si,{checked:b,disabled:!0})]})]})]}),t[36]=g,t[37]=S,t[38]=F,t[39]=b,t[40]=M,t[41]=N):N=t[41];let W;t[42]!==ye||t[43]!==N?(W=s.jsxs("div",{className:"flex w-full flex-col gap-5 rounded-3xl bg-ink-paper p-5",children:[ye,N]}),t[42]=ye,t[43]=N,t[44]=W):W=t[44];let ue;t[45]!==a?(ue=()=>a(!1),t[45]=a,t[46]=ue):ue=t[46];let fe;t[47]!==m||t[48]!==ue?(fe=s.jsx(Y,{variant:"secondary",className:"shrink-0",onClick:ue,disabled:m,children:"Cancel"}),t[47]=m,t[48]=ue,t[49]=fe):fe=t[49];const Se=m||!ze,ke=m?S?"Savingâ¦":"Sendingâ¦":S?"Save dates":"Confirm";let ae;t[50]!==Ae||t[51]!==Se||t[52]!==ke?(ae=s.jsx(Y,{className:"flex-1",disabled:Se,onClick:Ae,children:ke}),t[50]=Ae,t[51]=Se,t[52]=ke,t[53]=ae):ae=t[53];let ie;t[54]!==fe||t[55]!==ae?(ie=s.jsxs("div",{className:"flex w-full gap-2",children:[fe,ae]}),t[54]=fe,t[55]=ae,t[56]=ie):ie=t[56];let K;t[57]!==ve||t[58]!==$||t[59]!==W||t[60]!==ie?(K=s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[ve,$,W,ie]}),t[57]=ve,t[58]=$,t[59]=W,t[60]=ie,t[61]=K):K=t[61];let G;t[62]!==se||t[63]!==K?(G=s.jsxs(Xt,{showClose:!1,className:"max-w-[362px] gap-4 rounded-3xl border border-ink-black/10 px-6 pb-6 pt-8 dark:border-ink-white/10",onOpenAutoFocus:Ai,children:[se,K]}),t[62]=se,t[63]=K,t[64]=G):G=t[64];let ne;t[65]!==a||t[66]!==i||t[67]!==G?(ne=s.jsx(Kt,{open:i,onOpenChange:a,children:G}),t[65]=a,t[66]=i,t[67]=G,t[68]=ne):ne=t[68];let le;t[69]===Symbol.for("react.memo_cache_sentinel")?(le=he=>{r(he),st()},t[69]=le):le=t[69];let J;t[70]!==A||t[71]!==w||t[72]!==c||t[73]!==h?(J=s.jsx(Wa,{open:A,onOpenChange:st,initialDates:w,windowStart:h,windowEnd:c,onApply:le}),t[70]=A,t[71]=w,t[72]=c,t[73]=h,t[74]=J):J=t[74];let B;t[75]!==g||t[76]!==U||t[77]!==M?(B=s.jsx(ai,{open:U,onOpenChange:Re,terms:M,currency:g,onConfirm:Be}),t[75]=g,t[76]=U,t[77]=M,t[78]=B):B=t[78];let q;return t[79]!==ne||t[80]!==J||t[81]!==B?(q=s.jsxs(s.Fragment,{children:[ne,J,B]}),t[79]=ne,t[80]=J,t[81]=B,t[82]=q):q=t[82],q}function Ai(e){return e.preventDefault()}function ps(e){const t=T.c(5),{status:i}=e;let a;t[0]!==i?(a=[i],t[0]=i,t[1]=a):a=t[1];let o;return t[2]!==i||t[3]!==a?(o=s.jsx("div",{className:"rounded-full ring-[3px] ring-ink-white dark:ring-ink-black-900",children:s.jsx(fa,{statuses:a,label:i})}),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function Ci(e){const t=T.c(8),{from:i,to:a,onDone:o}=e;let l;t[0]!==i?(l=s.jsx("div",{className:"col-start-1 row-start-1 justify-self-center [backface-visibility:hidden]",children:s.jsx(ps,{status:i})}),t[0]=i,t[1]=l):l=t[1];let n;t[2]!==a?(n=s.jsx("div",{className:"col-start-1 row-start-1 justify-self-center [backface-visibility:hidden] [transform:rotateX(180deg)]",children:s.jsx(ps,{status:a})}),t[2]=a,t[3]=n):n=t[3];let d;return t[4]!==o||t[5]!==l||t[6]!==n?(d=s.jsx("div",{className:"[perspective:400px]",children:s.jsxs("div",{onAnimationEnd:o,className:"grid [transform-style:preserve-3d] animate-[status-reveal_650ms_ease-in-out_600ms_both]",children:[l,n]})}),t[4]=o,t[5]=l,t[6]=n,t[7]=d):d=t[7],d}function wi(){const e=T.c(184),{applicationId:t}=la(),{handle:i,personId:a}=ms(),o=qt(),l=oa(),n=I.useUtils(),d=ra();let u;e[0]!==o||e[1]!==i||e[2]!==d.state?.fromApp||e[3]!==l||e[4]!==a?(u=()=>{if(d.state?.fromApp){l(-1);return}l(o("guestSpotApplications",{handle:i,personId:a}),{viewTransition:!0})},e[0]=o,e[1]=i,e[2]=d.state?.fromApp,e[3]=l,e[4]=a,e[5]=u):u=e[5];const f=u,[h]=ca(),[c,x]=xe.useState(h.get("tab")==="chat"?"chat":"application"),g=Ys(100),[b,m]=xe.useState(!1),[v,y]=xe.useState(!1),[S,A]=xe.useState(null),[Z,U]=xe.useState(null);let L;e[6]!==t?(L={applicationId:t},e[6]=t,e[7]=L):L=e[7];const p=!!t;let w;e[8]!==p?(w={enabled:p},e[8]=p,e[9]=w):w=e[9];const{data:r,isLoading:Ne,isError:M,error:Be}=I.getStudioJobApplication.useQuery(L,w),k=r?.conversationId??null,C=r?.isManagerParticipant??!1;let P;e[10]!==a?(P={studioOrManagerPersonId:a},e[10]=a,e[11]=P):P=e[11];const _=!!a;let re;e[12]!==_?(re={enabled:_},e[12]=_,e[13]=re):re=e[13];const{data:F}=I.getStudioProfile.useQuery(P,re),ze=!!r?.applicantPersonId;let ce;e[14]!==ze?(ce={enabled:ze},e[14]=ze,e[15]=ce):ce=e[15];const{data:st}=I.getPersonalHomepage.useQuery(r?.applicantPersonId??"",ce);let de;e[16]!==t||e[17]!==a?(de={applicationId:t,personId:a},e[16]=t,e[17]=a,e[18]=de):de=e[18];const Re=!!t&&!!a&&c==="chat"&&!C;let pe;e[19]!==Re?(pe={enabled:Re},e[19]=Re,e[20]=pe):pe=e[20];const{data:Ae}=I.conversations.getConversationForStudioApplication.useQuery(de,pe);let be;e[21]!==k||e[22]!==a?(be={conversationId:k,personId:a},e[21]=k,e[22]=a,e[23]=be):be=e[23];const ee=!!k&&!!a&&c==="chat"&&!C;let te;e[24]!==t||e[25]!==n?(te=()=>{n.conversations.getConversationForStudioApplication.invalidate({applicationId:t})},e[24]=t,e[25]=n,e[26]=te):te=e[26];let V;e[27]!==ee||e[28]!==te?(V={enabled:ee,onData:te},e[27]=ee,e[28]=te,e[29]=V):V=e[29],I.conversations.onConversationMessagePosted.useSubscription(be,V);const se=C&&c==="chat";let H;e[30]!==t||e[31]!==n?(H=()=>{n.getStudioJobApplication.invalidate({applicationId:t})},e[30]=t,e[31]=n,e[32]=H):H=e[32];let X;e[33]!==k||e[34]!==a||e[35]!==se||e[36]!==H?(X={conversationId:k,personId:a,enabled:se,onMarkedAsRead:H},e[33]=k,e[34]=a,e[35]=se,e[36]=H,e[37]=X):X=e[37];const{groups:ve,hasNextPage:je,isFetchingNextPage:Ue,handleLoadMoreAbove:z,editingMessage:$,setEditingMessage:me,handleEditMessage:ye,pendingDeleteId:N,setPendingDeleteId:W,isDeleting:ue,deleteMessage:fe,handleOptimisticAdd:Se,handleOptimisticConfirm:ke,handleOptimisticFail:ae,scrollToBottom:ie}=$s(X),{mutateAsync:K}=I.conversations.joinConversationAsStudioManager.useMutation();let G;e[38]!==a||e[39]!==Ae?.messages?(G=Ta((Ae?.messages??[]).slice().reverse(),a),e[38]=a,e[39]=Ae?.messages,e[40]=G):G=e[40];const le=C?ve:G,{mutate:J,isPending:B}=I.reviewStudioJobApplication.useMutation({onSuccess:()=>{n.getPageOfStudioJobApplications.invalidate(),n.getStudioJobApplicationCounts.invalidate(),n.getStudioJobApplication.invalidate({applicationId:t}),m(!1),U(He),ma.custom(Hi,{position:"bottom-center",className:"sm:left-1/2"})},onError:Fi});let q;e[41]!==t||e[42]!==n?(q={onSuccess:()=>{n.getStudioJobApplication.invalidate({applicationId:t}),m(!1)},onError:Li},e[41]=t,e[42]=n,e[43]=q):q=e[43];const{mutate:he,isPending:mt}=I.updateStudioJobAgreement.useMutation(q);let at;e[44]!==t||e[45]!==n?(at={onSuccess:()=>{n.getStudioJobApplication.invalidate({applicationId:t}),m(!1)},onError:Ui},e[44]=t,e[45]=n,e[46]=at):at=e[46];const{mutate:it,isPending:Mt}=I.changeGuestSpotDates.useMutation(at);let Qe;e[47]!==o||e[48]!==i||e[49]!==l||e[50]!==a||e[51]!==n?(Qe={onSuccess:()=>{n.getPageOfStudioJobApplications.invalidate(),n.getStudioJobApplicationCounts.invalidate(),l(o("guestSpotApplications",{handle:i,personId:a}),{viewTransition:!0})},onError:Ri},e[47]=o,e[48]=i,e[49]=l,e[50]=a,e[51]=n,e[52]=Qe):Qe=e[52];const{mutate:Ce,isPending:Ve}=I.archiveStudioJobApplication.useMutation(Qe);let nt;e[53]!==t||e[54]!==n?(nt={onSuccess:()=>{n.getPageOfStudioJobApplications.invalidate(),n.getStudioJobApplicationCounts.invalidate(),n.getStudioJobApplication.invalidate({applicationId:t})},onError:zi},e[53]=t,e[54]=n,e[55]=nt):nt=e[55];const{mutate:ut,isPending:ft}=I.unarchiveStudioJobApplication.useMutation(nt);let we;e[56]!==t||e[57]!==n?(we=()=>{n.getPageOfStudioJobApplications.invalidate(),n.getStudioJobApplicationCounts.invalidate(),n.getStudioJobApplication.invalidate({applicationId:t}),y(!1)},e[56]=t,e[57]=n,e[58]=we):we=e[58];let lt;e[59]===Symbol.for("react.memo_cache_sentinel")?(lt=R=>{tt({title:"Unable to cancel the guest spot. Try again.",description:R.message,variant:"error"}),y(!1)},e[59]=lt):lt=e[59];let Pe;e[60]!==we?(Pe={onSuccess:we,onError:lt},e[60]=we,e[61]=Pe):Pe=e[61];const{mutate:Le,isPending:We}=I.cancelGuestSpot.useMutation(Pe);
1if(M){if(Be.data?.httpStatus===Is.NOT_FOUND){let et;return e[62]===Symbol.for("react.memo_cache_sentinel")?(et=s.jsx(us,{code:fs.getStudioJobApplication}),e[62]=et):et=e[62],et}let R;return e[63]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ts,{code:Ms.getStudioJobApplication}),e[63]=R):R=e[63],R}if(Ne||!r){let R;return e[64]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Bt,{}),e[64]=R):R=e[64],R}const E=r.agreements,D=E.find(Ei)??null;let Oe;e[65]!==E?(Oe=E.find(Mi)??null,e[65]=E,e[66]=Oe):Oe=e[66];const oe=Oe;let _e;e[67]!==E?(_e=E.find(Ti)??null,e[67]=E,e[68]=_e):_e=e[68];const Q=_e,De=!!oe,qe=!!D,ot=!qe,ht=qe&&!De,Fe=E.length>0;let Ie;e[69]!==E||e[70]!==r.isArchived||e[71]!==De||e[72]!==Fe?(Ie=ua({isArchived:r.isArchived,hasAnyAgreement:Fe,hasAcceptedAgreement:E.some(Ii),hasPendingAgreement:De}),e[69]=E,e[70]=r.isArchived,e[71]=De,e[72]=Fe,e[73]=Ie):Ie=e[73];const Ye=Ie,He=Ye==="In review"?"New":Ye;let Te;e[74]!==r.postingAdvertisedEndsOn||e[75]!==r.postingAdvertisedStartsOn||e[76]!==r.postingPaymentSplitArtistReceivesPercent||e[77]!==r.postingPaymentSplitCapCents?(Te={proposedStartsOn:r.postingAdvertisedStartsOn,proposedEndsOn:r.postingAdvertisedEndsOn,paymentSplitCapCents:r.postingPaymentSplitCapCents,paymentSplitArtistReceivesPercent:r.postingPaymentSplitArtistReceivesPercent},e[74]=r.postingAdvertisedEndsOn,e[75]=r.postingAdvertisedStartsOn,e[76]=r.postingPaymentSplitArtistReceivesPercent,e[77]=r.postingPaymentSplitCapCents,e[78]=Te):Te=e[78];const $e=Te,Ze=!r.isArchived&&(ot||De),Xe=!r.isArchived&&De,ge=Q?.book&&!Q.book.isArchived?Q.book:null,rt=!r.isArchived&&!!ge,Me=!r.isArchived&&!!Q&&!!ge,Ge=Ze||Xe||rt||Me,ct=!r.isArchived&&E.length===0,O=F?Vs(F.studioHoursMinutesOfDay,F.hoursMode):null,Je=Si(st?.instagramUrl),dt=ga(D,r),Ee=dt.startsOn,Ke=dt.endsOn,zt=dt.dates,ba=Wt(O,Ee,"open"),va=Wt(O,Ke,"close"),es=r.formQuestions.flatMap(Di);let Rt;e[79]!==r.formQuestions?(Rt=r.formQuestions.find(_i)?.answer??null,e[79]=r.formQuestions,e[80]=Rt):Rt=e[80];const vs=Rt;let Ut;e[81]!==r.applicantName?(Ut=r.applicantName?.split(" ")[0]??"them",e[81]=r.applicantName,e[82]=Ut):Ut=e[82];const js=Ut;let gt;e[83]===Symbol.for("react.memo_cache_sentinel")?(gt=s.jsx(da,{children:s.jsx("title",{children:"Guest spot application"})}),e[83]=gt):gt=e[83];const ts=Us,ja="px-0",ss=Ls;let xt;e[84]!==g?(xt=s.jsx("div",{className:"pointer-events-none absolute inset-x-0 -bottom-12 top-0 backdrop-blur-md",style:{maskImage:"linear-gradient(to bottom, black 50%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 50%, transparent 100%)",opacity:g,willChange:"backdrop-filter, opacity",transform:"translate3d(0, 0, 0)"}}),e[84]=g,e[85]=xt):xt=e[85];let Lt;e[86]===Symbol.for("react.memo_cache_sentinel")?(Lt=s.jsx(Rs,{size:20}),e[86]=Lt):Lt=e[86];let bt;e[87]!==f?(bt=s.jsx("button",{type:"button","aria-label":"Back",onClick:f,className:"flex size-8 items-center justify-center rounded-full bg-ink-paper text-ink-black dark:bg-ink-black-800 dark:text-ink-white",children:Lt}),e[87]=f,e[88]=bt):bt=e[88];let vt;e[89]!==c||e[90]!==r.applicantHandle||e[91]!==k?(vt=c==="chat"&&k&&r.applicantHandle&&s.jsx("div",{className:"pointer-events-none absolute left-1/2 top-1/2 max-w-[50%] -translate-x-1/2 -translate-y-1/2",children:s.jsxs(pt,{size:"lg",className:"truncate text-center",children:["@",r.applicantHandle]})}),e[89]=c,e[90]=r.applicantHandle,e[91]=k,e[92]=vt):vt=e[92];let jt;e[93]!==r.id||e[94]!==Ce||e[95]!==Ge||e[96]!==Ve||e[97]!==Ze||e[98]!==rt||e[99]!==Me||e[100]!==Xe?(jt=Ge&&s.jsxs(Zs,{children:[s.jsx(Xs,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"More options",className:"flex size-8 items-center justify-center rounded-full bg-ink-paper text-ink-black dark:bg-ink-black-800 dark:text-ink-white",children:s.jsx(pa,{className:"size-5"})})}),s.jsxs(Ks,{showClose:!1,children:[s.jsx(ea,{children:s.jsxs(bs,{children:[s.jsx(ta,{children:"Application options"}),s.jsx(sa,{children:"Edit the offer, change the guest spot dates, cancel the guest spot, or archive this application."})]})}),s.jsxs(aa,{children:[Xe&&s.jsx(Gt,{asChild:!0,children:s.jsx(Y,{variant:"secondary",fullWidth:!0,onClick:()=>m(!0),children:"Edit offer"})}),Me&&s.jsx(Gt,{asChild:!0,children:s.jsx(Y,{variant:"secondary",fullWidth:!0,onClick:()=>m(!0),children:"Change dates"})}),rt&&s.jsx(Gt,{asChild:!0,children:s.jsx(Y,{variant:"destructive",fullWidth:!0,onClick:()=>y(!0),children:"Cancel guest spot"})}),Ze&&s.jsx(Y,{variant:"destructive",fullWidth:!0,disabled:Ve,onClick:()=>Ce({applicationId:r.id}
1),children:Ve?"Archivingâ¦":"Archive application"})]})]})]}),e[93]=r.id,e[94]=Ce,e[95]=Ge,e[96]=Ve,e[97]=Ze,e[98]=rt,e[99]=Me,e[100]=Xe,e[101]=jt):jt=e[101];let yt;e[102]!==bt||e[103]!==vt||e[104]!==jt?(yt=s.jsxs("div",{className:"relative flex items-center justify-between px-5 pb-4 pt-5",children:[bt,vt,jt]}),e[102]=bt,e[103]=vt,e[104]=jt,e[105]=yt):yt=e[105];let St;e[106]!==c||e[107]!==r.conversationHasUnread||e[108]!==k||e[109]!==g?(St=k&&s.jsx("div",{className:"px-5 pb-4",children:s.jsx(na,{value:c,onValueChange:R=>x(R),children:s.jsxs(ia,{className:"relative h-10 w-full gap-1 rounded-full p-1",style:{boxShadow:Es(g),display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},children:[s.jsx(Et,{value:"application",className:"h-full rounded-full",children:"Application"}),s.jsx(Et,{value:"chat",className:"h-full rounded-full",children:s.jsxs("span",{className:"flex items-center justify-center gap-1.5",children:["Chat",r.conversationHasUnread&&c!=="chat"&&s.jsx("span",{className:"size-1.5 rounded-full bg-ink-destructive"})]})})]})})}),e[106]=c,e[107]=r.conversationHasUnread,e[108]=k,e[109]=g,e[110]=St):St=e[110];let kt;e[111]!==yt||e[112]!==St?(kt=s.jsxs("div",{className:"relative mx-auto w-full max-w-screen-xs",children:[yt,St]}),e[111]=yt,e[112]=St,e[113]=kt):kt=e[113];let Nt;e[114]!==xt||e[115]!==kt?(Nt=s.jsxs("div",{className:"relative",children:[xt,kt]}),e[114]=xt,e[115]=kt,e[116]=Nt):Nt=e[116];let At;e[117]!==c||e[118]!==t||e[119]!==k||e[120]!==$||e[121]!==i||e[122]!==Se||e[123]!==ke||e[124]!==ae||e[125]!==C||e[126]!==K||e[127]!==a||e[128]!==ie||e[129]!==me||e[130]!==ct||e[131]!==n?(At=c==="chat"&&k?s.jsx(Gs,{conversationId:C?k:null,personId:a,providerHandle:i,onEnsureConversation:async()=>(await K({conversationId:k,personId:a}),n.getStudioJobApplication.invalidate({applicationId:t}),k),editingMessage:C?$:null,onCancelEdit:()=>me(null),onMessageSent:C?ie:void 0,onPendingMessageAdded:C?Se:void 0,onPendingMessageConfirmed:C?ke:void 0,onPendingMessageFailed:C?ae:void 0}):ct?s.jsx(zs,{children:s.jsx(Y,{fullWidth:!0,className:"h-11",onClick:()=>m(!0),children:"Accept guest spot"})}):void 0,e[117]=c,e[118]=t,e[119]=k,e[120]=$,e[121]=i,e[122]=Se,e[123]=ke,e[124]=ae,e[125]=C,e[126]=K,e[127]=a,e[128]=ie,e[129]=me,e[130]=ct,e[131]=n,e[132]=At):At=e[132];const as=c==="chat"&&k?s.jsx(Js,{conversationId:k,groups:le,hasMoreAbove:C&&je&&!Ue,onLoadMoreAbove:z,isFetchingNextPage:Ue,onEditMessage:C?ye:Oi,onDeleteMessage:C?W:Pi,pendingDeleteId:N,setPendingDeleteId:W,isDeleting:ue,deleteMessage:fe}):s.jsxs("div",{className:"mx-auto max-w-screen-xs w-full px-5 py-6 flex flex-col gap-10",children:[r.isArchived&&s.jsxs("div",{className:"rounded-2xl bg-ink-black-50 dark:bg-ink-black-800 px-4 py-3 flex items-center justify-between gap-3",children:[s.jsx(j,{variant:"body",size:"sm",className:"text-ink-black-600",children:"This application has been archived."}),s.jsx(Y,{variant:"secondary",size:"sm",disabled:ft,onClick:()=>ut({applicationId:r.id}),children:ft?"Unarchivingâ¦":"Unarchive"})]}),s.jsxs("div",{className:"flex flex-col items-center gap-6",children:[s.jsxs("div",{className:"relative size-24 shrink-0",children:[s.jsx("div",{className:"size-full overflow-hidden rounded-full",children:s.jsx("img",{src:r.applicantProfileImageUrl??Hs,alt:"",className:"size-full bg-ink-black-100 object-cover dark:bg-ink-black-800"})}),s.jsx("div",{className:"absolute left-1/2 top-full w-max -translate-x-1/2 -translate-y-1/2",children:Z!==null?s.jsx(Ci,{from:Z,to:He,onDone:()=>U(null)}):s.jsx(ps,{status:He})})]}),s.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[r.applicantHandle?s.jsxs(j,{variant:"heading",size:"2xl",children:["@",r.applicantHandle]}):null,r.applicantName?s.jsx(j,{variant:"body",size:"base",children:r.applicantName}):null]}),s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[Je?s.jsxs("a",{href:wa.instagramUrl(Je),target:"_blank",rel:"noreferrer",className:"flex h-8 items-center gap-1.5 rounded-full bg-ink-black/5 px-3 dark:bg-ink-white/5",children:[s.jsx(Ca,{size:12}),s.jsx(j,{variant:"label",size:"sm",className:"uppercase",children:"Instagram"})]}
1):null,s.jsxs("button",{type:"button",onClick:()=>x("chat"),className:"flex h-8 items-center gap-1.5 rounded-full bg-ink-black px-3 dark:bg-ink-white",children:[s.jsx(Ns,{size:16,className:"text-ink-white dark:text-ink-black"}),s.jsx(j,{variant:"label",size:"sm",className:"uppercase text-ink-white dark:text-ink-black",children:"Message"})]})]})]}),s.jsxs("div",{className:"mt-2 flex flex-col gap-3",children:[(Ee||Ke||D)&&s.jsx(ha,{startsOn:Ee,endsOn:Ke,dates:zt,startTime:ba,endTime:va,dayRateTerms:D?{paymentSplitArtistReceivesPercent:D.paymentSplitArtistReceivesPercent,paymentSplitCapCents:D.paymentSplitCapCents}:null,currency:r.paymentSplitCurrency,isPaymentSplitEnabled:D?.isPaymentSplitEnabled}),s.jsx(j,{variant:"body",size:"sm",className:"text-center",children:Ya(r.createdAt,Pa(),"Applied")})]}),es.length>0&&s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(j,{variant:"label",size:"sm",className:"px-1",children:"Portfolio"}),s.jsx("div",{className:"invisible-scrollbar -mx-5 flex gap-2.5 overflow-x-auto px-5",children:es.map((R,et)=>s.jsx("button",{type:"button","aria-label":"View portfolio image",onClick:()=>A(et),className:"aspect-square w-[calc((100%-2.5rem)/3)] shrink-0 overflow-hidden rounded-3xl",children:s.jsx("img",{src:R,alt:"",className:"size-full object-cover"})},R))})]}),S!==null&&s.jsx(ti,{imageUrls:es,initialIndex:S,onHidden:()=>A(null),closeLabel:"Close portfolio"}),vs?s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs(j,{variant:"label",size:"sm",className:"px-1",children:["Notes from ",js]}),s.jsxs("div",{className:"flex flex-col gap-5 rounded-3xl bg-ink-paper py-5 dark:bg-ink-black-800",children:[s.jsx(j,{variant:"heading",size:"xl",className:"px-6 leading-snug [text-indent:-0.45em]",children:`â${vs}â`}),s.jsx("div",{className:"border-t border-ink-black/10 px-6 pt-5 dark:border-ink-white/10",children:s.jsxs("button",{type:"button",onClick:()=>x("chat"),className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-full bg-ink-black px-3 dark:bg-ink-white",children:[s.jsx(Ns,{size:16,className:"text-ink-white dark:text-ink-black"}),s.jsxs(j,{variant:"label",size:"sm",className:"text-ink-white dark:text-ink-black",children:["Reply to ",js]})]})})]})]}):null,s.jsxs(Fs,{className:"flex flex-col gap-2",children:[s.jsx("div",{className:"text-sm font-medium select-none",children:"Venue staff"}),s.jsx(Vt,{to:o("guestSpotApplication",{personId:r.applicantPersonId,applicationId:r.id}),className:Qt(Jt({variant:"secondary"}),"w-full"),viewTransition:!0,children:"View this application as guest artist"}),s.jsx(Vt,{to:o("guestSpotApplications",{personId:r.applicantPersonId}),className:Qt(Jt({variant:"secondary"}),"w-full"),viewTransition:!0,children:"View guest artist's guest spots"})]}),ht&&s.jsx("div",{className:"rounded-2xl bg-ink-black-50 dark:bg-ink-black-800 px-4 py-3",children:s.jsx(j,{variant:"body",size:"sm",className:"text-ink-black-600",children:"This application has been accepted."})})]});let Ct;e[133]!==ss||e[134]!==Nt||e[135]!==At||e[136]!==as?(Ct=s.jsx(ss,{headerSlot:Nt,footerSlot:At,children:as}),e[133]=ss,e[134]=Nt,e[135]=At,e[136]=as,e[137]=Ct):Ct=e[137];let wt;e[138]!==ts||e[139]!==Ct?(wt=s.jsx(ts,{className:ja,children:Ct}),e[138]=ts,e[139]=Ct,e[140]=wt):wt=e[140];const is=F?.logoUrl??null;let Pt;e[141]!==r.postingPaymentSplitArtistReceivesPercent||e[142]!==r.postingPaymentSplitCapCents||e[143]!==D?(Pt=D?{paymentSplitArtistReceivesPercent:D.paymentSplitArtistReceivesPercent,paymentSplitCapCents:D.paymentSplitCapCents}:{paymentSplitArtistReceivesPercent:r.postingPaymentSplitArtistReceivesPercent,paymentSplitCapCents:r.postingPaymentSplitCapCents},e[141]=r.postingPaymentSplitArtistReceivesPercent,e[142]=r.postingPaymentSplitCapCents,e[143]=D,e[144]=Pt):Pt=e[144];const ns=D?.isPaymentSplitEnabled??r.postingIsPaymentSplitEnabled,ls=!oe&&!!Q,os=oe?mt:Q?Mt:B;let Ot;e[145]!==Q||e[146]!==r.id||e[147]!==it||e[148]!==oe||e[149]!==$e||e[150]!==J||e[151]!==he?(Ot=R=>{const{proposedStartsOn:et,proposedEndsOn:ys,proposedDates:cs,paymentSplitCapCents:Ss,paymentSplitArtistReceivesPercent:ks}=R;oe?he({agreementId:oe.id,proposedStartsOn:et,proposedEndsOn:ys,proposedDates:cs,paymentSplitCapCents:Ss,paymentSplitArtistReceivesPercent:ks}):Q?it({agreementId:Q.id,proposedDates:cs??[]}):J({applicationId:r.id,...$e,proposedStartsOn:et,proposedEndsOn:ys,proposedDates:cs,paymentSplitCapCents:Ss,paymentSplitArtistReceivesPercent:ks})},e[145]=Q,e[146]=r.id,e[147]=it,e[148]=oe,e[149]=$e,e[150]=J,e[151]=he,e[152]=Ot):Ot=e[152];let _t;e[153]!==r.applicantHandle||e[154]!==r.applicantProfileImageUrl||e[155]!==r.paymentSplitCurrency||e[156]!==b||e[157]!==Ke||e[158]!==zt||e[159]!==Ee||e[160]!==is||e[161]!==Pt||e[162]!==ns||e[163]!==ls||e[164]!==os||e[165]!==Ot?(_t=s.jsx(Ni,{open:b,onOpenChange:m,applicantHandle:r.applicantHandle,applicantImageUrl:r.applicantProfileImageUrl,studioImageUrl:is,defaultStartsOn:Ee,defaultEndsOn:Ke,defaultDates:zt,windowStart:null,windowEnd:null,dayRateTerms:Pt,currency:r.paymentSplitCurrency,isPaymentSplitEnabled:ns,datesOnly:ls,isPending:os,onConfirm:Ot}),e[153]=r.applicantHandle,e[154]=r.applicantProfileImageUrl,e[155]=r.paymentSplitCurrency,e[156]=b,e[157]=Ke,e[158]=zt,e[159]=Ee,e[160]=is,e[161]=Pt,e[162]=ns,e[163]=ls,e[164]=os,e[165]=Ot,e[166]=_t):_t=e[166];let Ft;e[167]===Symbol.for("react.memo_cache_sentinel")?(Ft=s.jsxs(hs,{children:[s.jsx(Yt,{children:"Cancel guest spot?"}),s.jsx(Zt,{className:"leading-snug",children:"This archives the guest book and its unbooked requests, and ends the guesting agreement. Booked appointments stay for your reference. This cannot be undone."})]}),e[167]=Ft):Ft=e[167];let Ht;e[168]===Symbol.for("react.memo_cache_sentinel")?(Ht=s.jsx(xs,{asChild:!0,children:s.jsx(Y,{variant:"secondary",children:"No, never mind"})}),e[168]=Ht):Ht=e[168];let Dt;e[169]!==ge||e[170]!==Le?(Dt=()=>ge&&Le({bookId:ge.id}),e[169]=ge,e[170]=Le,e[171]=Dt):Dt=e[171];const rs=We?"Cancellingâ¦":"Yes, cancel guest spot";let It;e[172]!==We||e[173]!==Dt||e[174]!==rs?(It=s.jsxs(Xt,{showClose:!1,children:[Ft,s.jsxs(gs,{children:[Ht,s.jsx(Y,{variant:"destructive",disabled:We,onClick:Dt,children:rs})]})]}),e[172]=We,e[173]=Dt,e[174]=rs,e[175]=It):It=e[175];let Tt;e[176]!==v||e[177]!==It?(Tt=s.jsx(Kt,{open:v,onOpenChange:y,children:It}),e[176]=v,e[177]=It,e[178]=Tt):Tt=e[178];let $t;return e[179]!==gt||e[180]!==wt||e[181]!==_t||e[182]!==Tt?($t=s.jsxs(s.Fragment,{children:[gt,wt,_t,Tt]}),e[179]=gt,e[180]=wt,e[181]=_t,e[182]=Tt,e[183]=$t):$t=e[183],$t}function Pi(){}function Oi(){}function _i(e){return e.answer}function Di(e){return e.s3Urls}function Ii(e){return e.isAccepted&&!e.isArchived}function Ti(e){return e.isAccepted&&!e.isArchived}function Mi(e){return!e.isAccepted&&!e.isArchived}function Ei(e){return!e.isArchived}function zi(e){tt({title:"Unable to unarchive the application. Try again.",description:e.message,variant:"error"})}function Ri(e){tt({title:"Unable to archive the application. Try again.",description:e.message,variant:"error"})}function Ui(e){tt({title:"Unable to change the dates. Try again.",description:e.message,variant:"error"})}function Li(e){tt({title:"Unable to update the offer. Try again.",description:e.message,variant:"error"})}function Fi(e){const t=Oa(e)?e.message:"Please try again";tt({title:"Unable to make offer",description:t,variant:"error"})}function Hi(e){return s.jsxs("div",{className:"mx-auto flex w-max max-w-screen-xs flex-row items-center justify-between gap-3 rounded-2xl bg-ink-black py-3 pl-6 pr-4 text-ink-black-100 sm:-translate-x-1/2",children:[s.jsx(j,{size:"base",children:"Guest offer sent!"}),s.jsx("button",{"aria-label":"Dismiss notification",onClick:t=>{t.stopPropagation(),ma.dismiss(e)},type:"button",children:s.jsx(_a,{size:24,className:"text-ink-black-400"})})]})}function gn(){const e=T.c(9),{personId:t,isLoading:i}=ms(),a=!!t;let o;e[0]!==a?(o={enabled:a},e[0]=a,e[1]=o):o=e[1];const{data:l,isLoading:n}=I.getPersonSettings.useQuery(t??"",o),d=!!l?.isStudioManager,{isEnabled:u,isLoading:f}=Da("guest-marketplace-preview",t),h=!n&&d&&!f&&!u;let c;e[2]!==h?(c={enabled:h},e[2]=h,e[3]=c):c=e[3];const{hasActivity:x,isLoading:g}=Ia(t,c);if(i||n){let m;return e[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Bt,{code:As.featureFlagEnabled_isLoading}),e[4]=m):m=e[4],m}if(!d){let m;return e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(gi,{}),e[5]=m):m=e[5],m}if(f||g){let m;return e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Bt,{code:As.featureFlagEnabled_isLoading}),e[6]=m):m=e[6],m}if(!u&&!x){let m;return e[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(us,{code:fs.featureFlagNotEnabled}),e[7]=m):m=e[7],m}let b;return e[8]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(wi,{}),e[8]=b):b=e[8],b}export{gn as default}; 2 3//# chunkId=0893e7b4-8045-541b-8754-ed273c68a925
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.