1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="a46c1b1c-3eef-45b1-b7b3-7e7d89993a59",e._sentryDebugIdIdentifier="sentry-dbid-a46c1b1c-3eef-45b1-b7b3-7e7d89993a59")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5535],{43302:(e,s,t)=>{t.d(s,{T:()=>i});var l=t(99710),n=t(14232),r=t(37876),i=n.forwardRef(({className:e,...s},t)=>(0,r.jsx)("textarea",{ref:t,"data-slot":"textarea",className:(0,l.cn)("border-input placeholder:text-muted-foreground placeholder:text-sm lg:placeholder:text-base focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm lg:text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 break-word",e),...s}));i.displayName="Textarea"},43805:(e,s,t)=>{t.d(s,{A:()=>d});var l=t(37876),n=t(60383),r=t(89429),i=t(62268),a=t(25534);let d=e=>{let{members:s,onClick:t}=e,{tAsString:d}=(0,r.A)(),o=(0,i.j0)(s);return 0===o.length?null:(0,l.jsxs)("button",{type:"button",onClick:t,"aria-label":d("wishlists.membersAria"),className:"flex h-9 cursor-pointer items-center gap-1.5 rounded-full border border-deep-purple-100 bg-background py-0.5 pl-1.5 pr-1.5 outline-none transition-colors hover:bg-deep-purple-50 focus-visible:ring-2 focus-visible:ring-foreground",children:[(0,l.jsx)(a.A,{members:o.map(e=>({name:e.name,photoUrl:e.photoUrl})),avatarClassName:"size-7"}),(0,l.jsx)(n.A,{className:"mx-0.5 size-3 text-foreground",strokeWidth:4,"aria-hidden":"true"})]})}},51080:(e,s,t)=>{t.d(s,{A:()=>x});var l=t(37876),n=t(14232),r=t(9552);let i=(0,t(17963).A)("link-2-off",[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);var a=t(83094),d=t(79336),o=t(89429),c=t(73382),u=t(62268),m=t(25534);let x=e=>{let{open:s,onOpenChange:t,title:x,view:h,onInviteOthers:f,onDeactivateInvite:b,onRemoveMember:p,onLeave:g}=e,{tAsString:j}=(0,o.A)(),v=(0,c.EI)(),[w,N]=(0,n.useState)("members"),[y,k]=(0,n.useState)(null),C=(0,u.j0)(h.members);return(0,n.useEffect)(()=>{s&&(N("members"),v({event:"WishlistMembersView",data:{collabId:h.collabId,memberCount:C.length}}))},[s]),(0,l.jsxs)(a.lG,{open:s,onOpenChange:t,children:[(0,l.jsx)(a.ZJ,{children:(0,l.jsx)(a.LC,{className:"z-[2000] bg-foreground
1/50"})}),(0,l.jsxs)(a.Cf,{className:"z-[2001] max-w-md! gap-0 rounded-3xl border-0 bg-background p-6 shadow-xl",children:["members"===w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.L3,{className:"pb-4 text-center text-lg font-semibold text-foreground",children:x}),(0,l.jsx)("ul",{className:"flex flex-col",children:C.map(e=>(0,l.jsxs)("li",{className:"flex items-center gap-3 py-2.5",children:[(0,l.jsx)(m.l,{name:e.name,photoUrl:e.photoUrl,className:"size-10"}),(0,l.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,l.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:e.memberId===h.selfMemberId?j("wishlists.you"):e.name}),"owner"===e.role?(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:j("wishlists.owner")}):null]}),!h.isOwner&&g&&e.memberId===h.selfMemberId?(0,l.jsx)(d.$,{variant:"ghost",onClick:()=>N("leave"),className:"h-8 rounded-full! px-3 text-sm font-semibold underline",children:j("wishlists.leave")}):null,h.isOwner&&p&&"owner"!==e.role?(0,l.jsx)(d.$,{variant:"ghost",onClick:()=>{k({memberId:e.memberId,name:e.name}),N("remove")},className:"h-8 rounded-full! px-3 text-sm font-semibold underline",children:j("wishlists.remove")}):null]},e.memberId))}),(0,l.jsxs)("div",{className:"mt-5 flex flex-col gap-1",children:[f?(0,l.jsx)(d.$,{onClick:f,className:"h-12 rounded-full!",children:j("wishlists.inviteOthers")}):null,h.isOwner&&b?(0,l.jsx)(d.$,{variant:"ghost",onClick:()=>N("more"),className:"h-11 rounded-full!",children:j("wishlists.menu")}):null]})]}),"more"===w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"relative pb-4",children:[(0,l.jsx)(d.$,{variant:"ghost",size:"icon","aria-label":j("wishlists.back"),onClick:()=>N("members"),className:"absolute left-0 top-0 -ml-2 -mt-1 rounded-full!",children:(0,l.jsx)(r.A,{className:"size-5","aria-hidden":"true"})}),(0,l.jsx)(a.L3,{className:"text-center text-lg font-semibold text-foreground",children:j("wishlists.menu")})]}),h.inviteActive?(0,l.jsxs)("button",{type:"button",onClick:()=>N("deactivate"),className:"flex cursor-pointer items-start gap-3 rounded-2xl p-3 text-left transition-colors hover:bg-muted",children:[(0,l.jsx)(i,{className:"mt-0.5 size-5 shrink-0 text-foreground","aria-hidden":"true"}),(0,l.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,l.jsx)("span",{className:"text-sm font-medium text-foreground",children:j("wishlists.deactivateLink")}),(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:j("wishlists.deactivateHint")})]})]}):(0,l.jsxs)("div",{className:"flex items-start gap-3 rounded-2xl p-3",children:[(0,l.jsx)(i,{className:"mt-0.5 size-5 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,l.jsx)("span",{className:"text-sm text-muted-foreground",children:j("wishlists.deactivatedNote")})]})]}),"deactivate"===w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.L3,{className:"pb-2 text-center text-lg font-semibold text-foreground",children:j("wishlists.deactivateConfirmTitle")}),(0,l.jsx)(a.rr,{className:"text-center text-sm text-muted-foreground",children:j("wishlists.deactivateConfirmBody")}),(0,l.jsxs)("div",{className:"mt-6 flex items-center justify-between gap-3",children:[(0,l.jsx)(d.$,{variant:"ghost",className:"rounded-full!",onClick:()=>N("more"),children:j("wishlists.cancel")}),(0,l.jsx)(d.$,{className:"min-w-[100px] rounded-full!",onClick:()=>{null==b||b(),t(!1)},children:j("wishlists.deactivateContinue")})]})]}),"remove"===w&&y&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.L3,{className:"pb-2 text-center text-lg font-semibold text-foreground",children:j("wishlists.removeTitle",{name:y.name})}),(0,l.jsx)(a.rr,{className:"text-center text-sm text-muted-foreground",children:j("wishlists.removeBody")}),(0,l.jsxs)("div",{className:"mt-6 flex items-center justify-between gap-3",children:[(0,l.jsx)(d.$,{variant:"ghost",className:"rounded-full!",onClick:()=>{k(null),N("members")},children:j("wishlists.cancel")}),(0,l.jsx)(d.$,{variant:"destructive",className:"min-w-[100px] rounded-full!",onClick:()=>{null==p||p(y.memberId),k(null),N("members")},children:j("wishlists.remove")})]})]}),"leave"===w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.L3,{className:"pb-2 text-center text-lg font-semibold text-foreground",children:j("wishlists.leaveTitle")}),(0,l.jsx)(a.rr,{className:"text-center text-sm text-muted-foreground",children:j("wishlists.leaveBody",{name:x})}),(0,l.jsxs)("div",{className:"mt-6 flex items-center justify-between gap-3",children:[(0,l.jsx)(d.$,{variant:"ghost",className:"rounded-full!",onClick:()=>N("members"),children:j("wishlists.cancel")}),(0,l.jsx)(d.$,{variant:"destructive",className:"min-w-[100px] rounded-full!",onClick:g,children:j("wishlists.leave")})]})]})]})]})}},62268:(e,s,t)=>{t.d(s,{Ey:()=>a,dR:()=>i,e1:()=>l,ed:()=>r,j0:()=>n,k8:()=>d});let l=250,n=e=>Object.entries(e).map(e=>{let[s,t]=e;return{memberId:s,...t}}).sort((e,s)=>e.role===s.role?e.joinedAt-s.joinedAt:"owner"===e.role?-1:1),r=(e,s)=>{var t;return Object.entries(null!=(t=e.notes[s])?t:{}).filter(s=>{let[t]=s;return e.members[t]}).map(s=>{let[t,l]=s;return{...l,memberId:t,member:e.members[t],isSelf:t===e.selfMemberId}}).sort((e,s)=>e.createdAt-s.createdAt)},i=(e,s)=>{var t,l;return null!=(l=null==(t=e.notes[s])?void 0:t[e.selfMemberId])?l:null},a=(e,s)=>{var t,l,n;let r=null!=(l=e.votes[s])?l:{},i=0,a=0;for(let[s,t]of Object.entries(r))e.members[s]&&("up"===t.verdict?i+=1:a+=1);return{up:i,down:a,self:null!=(n=null==(t=r[e.selfMemberId])?void 0:t.verdict)?n:null}},d=(e,s)=>{var t;return Object.entries(null!=(t=e.votes[s])?t:{}).filter(t=>{var l;let[n]=t;return e.members[n]&&!(null==(l=e.notes[s])?void 0:l[n])}).map(s=>{let[t,l]=s;return{text:"",createdAt:l.updatedAt,updatedAt:l.updatedAt,memberId:t,member:e.members[t],isSelf:t===e.selfMemberId}})}},69860:(e,s,t)=>{t.d(s,{A:()=>j});
1var l=t(37876),n=t(14232),r=t(89099),i=t(38008),a=t(93536),d=t(99710),o=t(89429),c=t(62268),u=t(25534),m=t(83094),x=t(43302),h=t(79336);let f=e=>{let{open:s,onOpenChange:t,initialText:r,onSave:i,onDelete:a}=e,{tAsString:d}=(0,o.A)(),[u,f]=(0,n.useState)(r),b=!!r,p=u.trim(),g=p!==r&&(p.length>0||b);return(0,l.jsxs)(m.lG,{open:s,onOpenChange:t,children:[(0,l.jsx)(m.ZJ,{children:(0,l.jsx)(m.LC,{className:"z-[2000] bg-foreground/50"})}),(0,l.jsxs)(m.Cf,{className:"z-[2001] max-w-md! gap-0 rounded-3xl border-0 bg-background p-6 shadow-xl",children:[(0,l.jsx)(m.L3,{className:"pb-4 text-center text-lg font-semibold text-foreground",children:d(b?"wishlists.editNote":"wishlists.addNote")}),(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),g&&(!p&&b?a():i(p),t(!1))},className:"flex flex-col gap-2",children:[(0,l.jsx)(x.T,{autoFocus:!0,value:u,maxLength:c.e1,rows:4,placeholder:d("wishlists.notePlaceholder"),"aria-label":d(b?"wishlists.editNote":"wishlists.addNote"),onChange:e=>f(e.target.value),className:"min-h-28 resize-none rounded-xl"}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:d("wishlists.charCount",{count:u.length,max:c.e1})}),(0,l.jsxs)("div",{className:"mt-4 flex items-center justify-between gap-3",children:[b?(0,l.jsx)(h.$,{type:"button",variant:"ghost",className:"rounded-full! font-semibold underline",onClick:()=>{a(),t(!1)},children:d("wishlists.delete")}):(0,l.jsx)(h.$,{type:"button",variant:"ghost",className:"rounded-full!",onClick:()=>t(!1),children:d("wishlists.cancel")}),(0,l.jsx)(h.$,{type:"submit",disabled:!g,className:"min-w-[100px] rounded-full!",children:d("wishlists.save")})]})]})]})]})},b="flex h-8 min-w-9 cursor-pointer items-center justify-center gap-1 rounded-full border px-2 text-sm outline-none transition-colors focus-visible:ring-2 focus-visible:ring-foreground",p="border-transparent hover:bg-deep-purple-50",g="border-secondary bg-secondary/10",j=e=>{var s;let{hotelId:t,view:m,onSaveNote:x,onDeleteNote:h,onVote:j,onRemoveHotel:v}=e,{tAsString:w}=(0,o.A)(),{locale:N}=(0,r.useRouter)(),[y,k]=(0,n.useState)(!1),C=m?(0,c.ed)(m,t):[],A=m?(0,c.Ey)(m,t):{up:0,down:0,self:null},I=m?(0,c.dR)(m,t):null,z=[...C,...m?(0,c.k8)(m,t):[]],D=e=>e>0?i.c9.fromMillis(e).setLocale(N||"en").toRelative({style:"narrow"}):null,$=e=>j(t,A.self===e?null:e);return(0,l.jsxs)("div",{className:"mt-3 rounded-2xl bg-background p-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsx)("button",{type:"button",onClick:()=>k(!0),className:"cursor-pointer rounded text-sm font-semibold text-foreground underline outline-none focus-visible:ring-2 focus-visible:ring-foreground",children:I?w("wishlists.noteCount",{count:C.length}):w("wishlists.addNote")}),(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsxs)("button",{type:"button","aria-pressed":"up"===A.self,"aria-label":w("wishlists.voteUp"),onClick:()=>$("up"),className:(0,d.cn)(b,"up"===A.self?g:p),children:[(0,l.jsx)("span",{"aria-hidden":"true",children:"\uD83D\uDC4D"}),A.up>0?(0,l.jsx)("span",{className:"text-xs font-semibold text-foreground",children:A.up}):null]}),(0,l.jsx)("span",{className:"h-4 w-px bg-deep-purple-100","aria-hidden":"true"}),(0,l.jsxs)("button",{type:"button","aria-pressed":"down"===A.self,"aria-label":w("wishlists.voteDown"),onClick:()=>$("down"),className:(0,d.cn)(b,"down"===A.self?g:p),children:[(0,l.jsx)("span",{"aria-hidden":"true",children:"\uD83D\uDC4E"}),A.down>0?(0,l.jsx)("span",{className:"text-xs font-semibold text-foreground",children:A.down}):null]}),v?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"h-4 w-px bg-deep-purple-100","aria-hidden":"true"}),(0,l.jsx)("button",{type:"button","aria-label":w("wishlists.removeHotel"),onClick:()=>v(t),className:(0,d.cn)(b,p,"text-muted-foreground hover:text-foreground"),children:(0,l.jsx)(a.A,{className:"size-4","aria-hidden":"true"})})]}):null]})]}),z.length>0?(0,l.jsx)("ul",{className:"mt-3 flex flex-col gap-2.5",children:z.map(e=>{var s,n,r;let i=null!=(r=null==m||null==(n=m.votes[t])||null==(s=n[e.memberId])?void 0:s.verdict)?r:null;return(0,l.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,l.jsxs)("span",{className:"relative shrink-0",children:[(0,l.jsx)(u.l,{name:e.member.name,photoUrl:e.member.photoUrl,className:"size-7"}),i?(0,l.jsx)("span",{"aria-hidden":"true",className:"absolute -bottom-1 -right-1 flex size-4 items-center justify-center rounded-full bg-background text-[9px] leading-none shadow-sm",children:"up"===i?"\uD83D\uDC4D":"\uD83D\uDC4E"}):null]}),(0,l.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,l.jsxs)("span",{className:"text-xs text-muted-foreground",children:[(0,l.jsx)("span",{className:"font-semibold text-foreground",children:e.isSelf?w("wishlists.you"):e.member.name}),D(e.updatedAt)?(0,l.jsxs)(l.Fragment,{children:[" \xb7 ",D(e.updatedAt)]}):null]}),e.text?(0,l.jsxs)("span",{className:"break-words text-sm text-foreground",children:[e.text,e.isSelf?(0,l.jsx)("button",{type:"button",onClick:()=>k(!0),className:"ml-1.5 cursor-pointer rounded text-xs font-semibold underline outline-none focus-visible:ring-2 focus-visible:ring-foreground",children:w("wishlists.editNoteShort")}):null]}):(0,l.jsx)("span",{className:"text-sm text-muted-foreground",children:w("wishlists.voted")})]})]},e.memberId)})}):null,y&&(0,l.jsx)(f,{open:!0,onOpenChange:k,initialText:null!=(s=null==I?void 0:I.text)?s:"",onSave:e=>x(t,e),onDelete:()=>h(t)})]})}}}]);
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.