PageSourceSearch

https://lidomatrip.com/_next/static/chunks/3776-ee87e9126c38a3b1.js

js lidomatrip.com collected 2026-10-02 20:28:52 UTC 22,328 bytes, 7 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3776],{70530:function(e,t,n){n.d(t,{Pi:function(){return m},_U:function(){return l},bB:function(){return d},bE:function(){return o},cc:function(){return i},k9:function(){return u},tf:function(){return h},uv:function(){return s},v3:function(){return c}});var r=n(57149);let a=e=>null==e?void 0:e.data;async function s(e){let t=await r.Z.setUrl("/api/conversations").setCallMethod("GET").setParams({...e.type?{type:e.type}:{},...e.cursor?{cursor:e.cursor}:{},...e.take?{take:e.take}:{}}).call();return a(t)??{items:[],next_cursor:null}}async function i(e){let t=await r.Z.setUrl(`/api/conversations/${e}`).setCallMethod("GET").call();return a(t)??null}async function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=await r.Z.setUrl(`/api/conversations/${e}/messages`).setCallMethod("GET").setParams(t).call();return a(n)??{items:[],has_more:!1,next_before:null}}async function o(e,t){let n=await r.Z.setUrl(`/api/conversations/${e}/messages`).setCallMethod("POST").setBody(t).call();if((null==n?void 0:n.status)!=="success")throw Error((null==n?void 0:n.message)||"ارسال پیام انجام نشد");return a(n)??null}async function c(e,t){return r.Z.setUrl(`/api/conversations/${e}/read`).setCallMethod("POST").setBody(t?{last_message_id:t}:{}).call()}async function d(e){return r.Z.setUrl(`/api/conversations/${e}/typing`).setCallMethod("POST").setBody({}).call()}async function u(){var e;let t=await r.Z.setUrl("/api/conversations/unread-count").setCallMethod("GET").call();return(null===(e=a(t))||void 0===e?void 0:e.count)??0}async function m(){var e;let t=await r.Z.setUrl("/api/conversations/support").setCallMethod("POST").setBody({}).call();return(null===(e=a(t))||void 0===e?void 0:e.id)??null}function h(){let e="undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`;return e.replace(/-/g,"").slice(0,32)}},34051:function(e,t,n){n.d(t,{Z:function(){return N}});var r=n(85893),a=n(79121),s=n(25675),i=n.n(s),l=n(41664),o=n.n(l),c=n(67294),d=n(85945),u=n(36492),m=n(48228),h=n(70530),x=n(63871),f=n(45551),p=n(68398),g=function(e){let{disabled:t,isDesktop:n,placeholder:a,onSend:s,onTyping:i}=e,[l,o]=(0,c.useState)(""),d=(0,c.useRef)(null),u=(0,c.useRef)(0);(0,c.useEffect)(()=>{let e=d.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,140)}px`)},[l]);let m=()=>{let e=l.trim();e&&!t&&(o(""),s(e))},h=e=>{if(o(e),!i)return;let t=Date.now();t-u.current<3e3||(u.current=t,i())};return(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),m()},className:"flex items-end gap-x-10 border-t-1 border-solid border-gray-F0F0F0 bg-white px-14 py-12 pb-[max(12px,env(safe-area-inset-bottom))]",children:[(0,r.jsx)("label",{htmlFor:"chat-composer",className:"sr-only",children:"نوشتن پیام"}),(0,r.jsx)("textarea",{id:"chat-composer",ref:d,rows:1,value:l,disabled:t,placeholder:a??"پیام خود را بنویسید…",onChange:e=>h(e.target.value),onKeyDown:e=>{"Enter"===e.key&&n&&!e.shiftKey&&(e.preventDefault(),m())},className:"max-h-[140px] flex-1 resize-none rounded-20 border-1 border-solid border-transparent bg-gray-F8F8F8 px-16 py-11 text-14 leading-24 font-r text-black outline-none transition-colors placeholder:text-gray-A9B1BC focus:border-primary-main focus:bg-white disabled:opacity-60"}),(0,r.jsx)("button",{type:"submit",disabled:t||!l.trim(),"aria-label":"ارسال پیام",className:"flex h-[44px] w-[44px] shrink-0 items-center justify-center rounded-full bg-primary-main text-white shadow-lg transition-all hover:opacity-90 active:scale-95 disabled:cursor-not-allowed disabled:opacity-30 disabled:shadow-none",children:(0,r.jsx)("i",{"aria-hidden":"true",className:"icon-SendMessage text-19"})})]})},b=n(56050),y=function(e){let{message:t,isMine:n,peerReadUpTo:a,grouped:s,onRetry:i}=e,l="ADMIN"===t.sender_role,o=n&&null!==a&&t.id<=a&&!t.pending;return t.deleted?(0,r.jsx)("div",{className:`flex ${n?"justify-start":"justify-end"} ${s?"mt-4":"mt-14"}`,children:(0,r.jsx)("div",{className:"rounded-16 border-1 border-dashed border-gray-CACFD3 px-14 py-8 text-12 leading-20 font-r text-gray-A9B1BC",children:"این پیام حذف شد"})}):(0,r.jsx)("div",{className:`flex ${n?"justify-start":"justify-end"} ${s?"mt-4":"mt-14"}`,children:(0,r.jsxs)("div",{className:"flex max-w-[85%] flex-col md:max-w-[68%]",children:[l&&!n&&!s&&(0,r.jsxs)("span",{className:"mb-5 flex items-center gap-x-4 px-2 text-11 leading-16 font-m text-primary-dark",children:[(0,r.jsx)("i",{"aria-hidden":"true",className:"icon-Information text-14"}),"پشتیبانی لیدوماتریپ"]}),(0,r.jsxs)("div",{className:["rounded-20 px-14 py-9 text-14 leading-24 font-r",n?"rounded-bl-6 bg-primary-main text-black shadow-[0_2px_10px_rgba(3,214,187,0.25)]":l?"rounded-br-6 border-1 border-solid border-primary-main border-opacity-25 bg-primary-light bg-opacity-40 text-black":"rounded-br-6 border-1 border-solid border-gray-F0F0F0 bg-white text-black shadow-[0_1px_2px_rgba(24,39,58,0.04)]",t.pending?"opacity-55":"",t.failed?"border-1 border-solid border-error-light":""].join(" "),children:[t.attachment_url&&(0,r.jsx)("a",{href:t.attachment_url,target:"_blank",rel:"noreferrer",className:"mb-8 block overflow-hidden rounded-14",children:(0,r.jsx)("img",{src:t.attachment_url,alt:t.attachment_name||"پیوست",loading:"lazy",decoding:"async",className:"max-h-[260px] w-full object-cover"})}),t.body&&(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:t.body}),(0,r.jsxs)("div",{className:`mt-5 flex items-center justify-end gap-x-4 text-10 leading-14 ${n?"text-black text-opacity-50":"text-gray-A9B1BC"}`,children:[(0,r.jsx)("span",{children:(0,b.Bz)(t.created_at)}),n&&!t.failed&&(0,r.jsx)("i",{"aria-hidden":"true",className:`${t.pending?"icon-Timer":o?"icon-DoubleTick":"icon-Tick"} text-12`}),n&&(0,r.jsx)("span",{className:"sr-only",children:t.failed?"ارسال نشد":t.pen
1ding?"در حال ارسال":o?"خوانده شد":"ارسال شد"})]})]}),t.failed&&(0,r.jsx)("button",{type:"button",onClick:()=>null==i?void 0:i(t),className:"mt-6 self-start px-2 text-11 leading-16 font-m text-error-light hover:underline",children:"ارسال نشد — دوباره تلاش کنید"})]})})};let v={BOOKING_CREATED:{bg:"bg-gray-F8F8F8",icon:"icon-Calendar",iconColor:"text-primary-dark",title:"درخواست رزرو ثبت شد"},BOOKING_APPROVED:{bg:"bg-[#F1FAF4]",icon:"icon-Confirmed",iconColor:"text-[#1B8A4B]",title:"رزرو تأیید شد"},BOOKING_COMPLETED:{bg:"bg-[#F1FAF4]",icon:"icon-Confirmed",iconColor:"text-[#1B8A4B]",title:"رزرو تکمیل شد"},BOOKING_CANCELLED:{bg:"bg-[#FDF3F3]",icon:"icon-Close",iconColor:"text-[#C0392B]",title:"رزرو لغو شد"},BOOKING_EXPIRED:{bg:"bg-[#FDF8EE]",icon:"icon-Timer",iconColor:"text-[#B07D1A]",title:"مهلت رزرو تمام شد"},ADMIN_JOINED:{bg:"bg-gray-F8F8F8",icon:"icon-Information",iconColor:"text-gray-6C6A7D",title:"پشتیبانی وارد چت شد"}};var j=function(e){let{message:t}=e,n=t.meta??{},a="string"==typeof n.kind?n.kind:"",s=v[a];return s?(0,r.jsx)("div",{className:"my-14 flex justify-center",children:(0,r.jsxs)("div",{className:`flex items-center gap-x-8 rounded-full px-16 py-8 ${s.bg}`,children:[(0,r.jsx)("span",{className:`flex h-24 w-24 shrink-0 items-center justify-center rounded-full bg-white ${s.iconColor}`,children:(0,r.jsx)("i",{"aria-hidden":"true",className:`${s.icon} text-13`})}),(0,r.jsx)("p",{className:"text-12 leading-20 font-m text-gray-6C6A7D",children:s.title}),(0,r.jsxs)("span",{className:"shrink-0 text-10 leading-16 font-r text-gray-A9B1BC",children:[(0,b.cj)(t.created_at)," \xb7 ",(0,b.Bz)(t.created_at)]})]})}):(0,r.jsxs)("div",{className:"mx-auto my-14 flex max-w-[420px] flex-col items-center gap-y-2 rounded-14 bg-gray-F8F8F8 px-16 py-10 text-center",children:[(0,r.jsx)("p",{className:"text-12 leading-20 font-r text-gray-6C6A7D",children:t.body}),(0,r.jsxs)("span",{className:"text-10 leading-16 font-r text-gray-A9B1BC",children:[(0,b.cj)(t.created_at)," \xb7 ",(0,b.Bz)(t.created_at)]})]})},N=function(e){let{conversationId:t,meId:n,isDesktop:s,typingFrom:l,onBack:v}=e,N=(0,d.NL)(),_=(0,c.useRef)(null),w=(0,c.useRef)(!0),[C,F]=(0,c.useState)(!1),{data:D}=(0,u.a)({queryKey:["conversation",t],queryFn:()=>(0,h.cc)(t),enabled:!!t}),{data:k,isLoading:E}=(0,u.a)({queryKey:["messages",t],queryFn:()=>(0,h._U)(t,{take:50}),enabled:!!t}),R=(null==k?void 0:k.items)??[],O=R.length?R[R.length-1].id:void 0;(0,c.useEffect)(()=>{t&&O&&(0,h.v3)(t,O).then(()=>{N.setQueryData(["chat-unread"],e=>{var n,r,a;let s=(null===(n=null===(r=N.getQueryData(["conversations","all"]))||void 0===r?void 0:null===(a=r.items)||void 0===a?void 0:a.find(e=>e.id===t))||void 0===n?void 0:n.unread_count)??0;return Math.max(0,(e??0)-s)}),N.invalidateQueries({queryKey:["conversations"]})})},[t,O,N]),(0,c.useLayoutEffect)(()=>{let e=_.current;e&&(w.current?(e.scrollTop=e.scrollHeight,F(!1)):R.length&&F(!0))},[R.length]);let M=()=>{let e=_.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight;w.current=t<120,w.current&&F(!1)},B=()=>{let e=_.current;e&&(e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),w.current=!0,F(!1))},T=(0,m.D)({mutationFn:e=>(0,h.bE)(t,{body:e.body,client_nonce:e.nonce}),onMutate:async e=>{w.current=!0;let r={id:-Date.now(),type:"TEXT",body:e.body,meta:null,deleted:!1,sender_id:n,sender_role:null,sender_name:null,sender_avatar:null,attachment_url:null,attachment_name:null,attachment_size:null,client_nonce:e.nonce,created_at:new Date().toISOString(),pending:!0};N.setQueryData(["messages",t],e=>({items:[...(null==e?void 0:e.items)??[],r],has_more:(null==e?void 0:e.has_more)??!1,next_before:(null==e?void 0:e.next_before)??null}))},onSuccess:(e,n)=>{e&&(N.setQueryData(["messages",t],t=>({items:((null==t?void 0:t.items)??[]).map(t=>t.client_nonce===n.nonce?e:t),has_more:(null==t?void 0:t.has_more)??!1,next_before:(null==t?void 0:t.next_before)??null})),N.invalidateQueries({queryKey:["conversations"]}))},onError:(e,n)=>{N.setQueryData(["messages",t],e=>({items:((null==e?void 0:e.items)??[]).map(e=>e.client_nonce===n.nonce?{...e,pending:!1,failed:!0}:e),has_more:(null==e?void 0:e.has_more)??!1,next_before:(null==e?void 0:e.next_before)??null})),f.Z.message([{type:p.L.ERROR,title:e instanceof Error?e.message:"ارسال پیام انجام نشد"}])}}),A=e=>{N.setQueryData(["messages",t],t=>({items:((null==t?void 0:t.items)??[]).filter(t=>t.client_nonce!==e.client_nonce),has_more:(null==t?void 0:t.has_more)??!1,next_before:(null==t?void 0:t.next_before)??null})),T.mutate({body:e.body,nonce:e.client_nonce||(0,h.tf)()})},S=(null==D?void 0:D.peer)??null,I=(null==D?void 0:D.type)==="SUPPORT",$=I?"پشتیبانی لیدوماتریپ":(null==S?void 0:S.name)||"کاربر لیدوماتریپ",U=null==D?void 0:D.booking,P=!!U&&("CANCEL"===U.state||"EXPIRED"===U.state||new Date(U.end_date).getTime()<Date.now()),L=(null==U?void 0:U.state)==="CANCEL",Z=(null==U?void 0:U.state)==="EXPIRED",K=(0,a.A)(),G=I?null:(0,a.d)(K,null==S?void 0:S.id),Q=(null==D?void 0:D.status)==="CLOSED"||P;return(0,r.jsxs)("section",{"aria-label":"چت",className:"flex h-full min-h-0 flex-col bg-gray-F8F8F8",children:[(0,r.jsxs)("header",{className:"flex shrink-0 items-center gap-x-12 border-b-1 border-solid border-gray-F0F0F0 bg-white px-14 py-10 md:px-16 md:py-12",children:[!s&&(0,r.jsx)("button",{type:"button",onClick:v,"aria-label":"بازگشت به فهرست چت‌ها",className:"-mr-4 flex h-36 w-36 shrink-0 items-center justify-center rounded-full text-gray-6C6A7D transition-[background-color,transform] duration-150 hover:bg-gray-F8F8F8 active:scale-90",children:(0,r.jsx)("i",{"aria-hidden":"true",className:"icon-FlashRight text-20"})}),(0,r.jsx)("div",{className:"flex h-42 w-42 shrink-0 items-center justify-center overflow-hidden rounded-full bg-gray-F8F8F8 r
1ing-1 ring-white",children:(null==S?void 0:S.avatar)||G?(0,r.jsx)(i(),{src:(null==S?void 0:S.avatar)||(null==G?void 0:G.url),alt:"",width:42,height:42,className:"h-full w-full object-cover"}):(0,r.jsx)("i",{"aria-hidden":"true",className:`${I?"icon-OnlineContact":"icon-Profile"} text-20 text-gray-A9B1BC`})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"truncate text-15 leading-24 font-b text-black",children:$}),(null==D?void 0:D.residence)?(0,r.jsx)(o(),{href:`/rentals/${D.residence.id}`,prefetch:!1,className:"block truncate text-12 leading-18 font-r text-gray-77828F hover:text-primary-dark",children:D.residence.name}):(null==D?void 0:D.subject)&&(0,r.jsx)("p",{className:"truncate text-12 leading-18 font-r text-gray-77828F",children:D.subject})]}),(null==D?void 0:D.booking)&&(0,r.jsx)("span",{className:"shrink-0 rounded-full bg-gray-F8F8F8 px-10 py-4 text-11 leading-18 font-r text-gray-6C6A7D",children:D.booking.reference})]}),(0,r.jsxs)("div",{ref:_,onScroll:M,className:"relative min-h-0 flex-1 overflow-y-auto overscroll-contain px-14 py-16 md:px-20",children:[E?(0,r.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,r.jsx)(x.O,{})}):0===R.length?(0,r.jsx)("p",{className:"mt-40 text-center text-13 leading-22 font-r text-gray-A9B1BC",children:"هنوز پیامی رد و بدل نشده. اولین پیام را شما بنویسید."}):(0,r.jsx)("div",{"aria-live":"polite","aria-relevant":"additions",children:(0,b.ZN)(R).map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"my-14 flex justify-center",children:(0,r.jsx)("span",{className:"rounded-full bg-white px-14 py-5 text-11 leading-18 font-m text-gray-77828F shadow-[0_1px_2px_rgba(24,39,58,0.05)]",children:e.label})}),e.messages.map((t,a)=>{if("SYSTEM"===t.type)return(0,r.jsx)(j,{message:t},t.id);let s=e.messages[a-1],i=!!s&&"SYSTEM"!==s.type&&s.sender_id===t.sender_id&&new Date(t.created_at).getTime()-new Date(s.created_at).getTime()<12e4;return(0,r.jsx)(y,{message:t,isMine:t.sender_id===n,peerReadUpTo:(null==D?void 0:D.peer_last_read_message_id)??null,grouped:i,onRetry:A},t.id)})]},e.label))}),null!==l&&l!==n&&(0,r.jsx)("div",{className:"mt-10 flex justify-end",children:(0,r.jsxs)("span",{className:"flex items-center gap-x-4 rounded-20 rounded-br-6 border-1 border-solid border-gray-F0F0F0 bg-white px-14 py-9 shadow-[0_1px_2px_rgba(24,39,58,0.04)]",children:[(0,r.jsx)("span",{className:"sr-only",children:"در حال نوشتن"}),[0,1,2].map(e=>(0,r.jsx)("span",{"aria-hidden":"true",className:"h-6 w-6 animate-bounce rounded-full bg-gray-A9B1BC",style:{animationDelay:`${120*e}ms`}},e))]})})]}),C&&(0,r.jsxs)("button",{type:"button",onClick:B,className:"mx-auto -mt-44 mb-10 flex items-center gap-x-6 rounded-full bg-black px-16 py-8 text-12 leading-20 font-m text-white shadow-lg transition-transform active:scale-95",children:["پیام جدید",(0,r.jsx)("i",{"aria-hidden":"true",className:"icon-FlashDown text-14"})]}),(0,r.jsx)(g,{isDesktop:s,disabled:Q,placeholder:L?"این رزرو لغو شده — گفتگو پایان یافته":Z?"مهلت این رزرو تمام شده — گفتگو پایان یافته":P?"اقامت این رزرو تمام شده — گفتگو پایان یافته":Q?"این چت بسته شده است":"پیام خود را بنویسید…",onSend:e=>T.mutate({body:e,nonce:(0,h.tf)()}),onTyping:()=>{(0,h.bB)(t)}})]})}},56050:function(e,t,n){n.d(t,{Bz:function(){return i},ZN:function(){return d},cj:function(){return o},vs:function(){return c}});let r=new Intl.DateTimeFormat("fa-IR",{hour:"2-digit",minute:"2-digit"}),a=new Intl.DateTimeFormat("fa-IR",{day:"numeric",month:"long"}),s=new Intl.DateTimeFormat("fa-IR",{day:"numeric",month:"long",year:"numeric"});function i(e){let t=new Date(e);return Number.isNaN(t.getTime())?"":r.format(t)}function l(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function o(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let n=Math.round((l(new Date)-l(t))/864e5);return 0===n?"امروز":1===n?"دیروز":n>330?s.format(t):a.format(t)}function c(e){let t=new Date(e);return Number.isNaN(t.getTime())?"":l(t)===l(new Date)?r.format(t):o(e)}function d(e){let t=[];for(let n of e){let e=o(n.created_at),r=t[t.length-1];r&&r.label===e?r.messages.push(n):t.push({label:e,messages:[n]})}return t}},63871:function(e,t,n){n.d(t,{O:function(){return i}});var r=n(85893),a=n(77461),s=n.n(a);let i=()=>(0,r.jsx)("div",{className:"my-32 flex w-full justify-center ",children:(0,r.jsx)("div",{className:`${s()["dot-flashing"]}`})})},47416:function(e,t,n){var r=n(85893);n(67294),t.Z=function(e){let{icon:t,title:n,containerClassname:a,element:s,asH1:i}=e;return(0,r.jsxs)("div",{className:`flex items-center justify-between ${a||""}`,children:[(0,r.jsxs)("div",{className:"flex items-center",children:[!!t&&(0,r.jsx)("div",{className:"flex items-center ml-12",children:t}),i?(0,r.jsx)("h1",{className:"text-[#000000] text-16 leading-28 font-m",children:n}):(0,r.jsx)("h2",{className:"text-[#000000] text-16 leading-28 font-m",children:n})]}),s]})}},83888:function(e,t,n){var r=n(85893);function a(e){return(0,r.jsx)("div",{className:`
2        flex flex-row md:flex-col items-center justify-center cursor-pointer pt-4 pb-4 px-4 md:px-0 md:pt-10 md:pb-0
3        ${e.scroll?"grow-0 shrink-0 basis-auto whitespace-nowrap":"grow md:grow-0 shrink md:shrink-0 basis-0 md:basis-auto"}
4        ${e.currentActiveIndex===e.tabIndex?"bg-white rounded-6 md:after:content-[''] md:after:w-full md:after:mt-10 md:after:block md:after:h-4 md:after:bg-primary-main md:after:rounded-tr-100 md:after:rounded-tl-100":"md:pb-6"}
5        drop-shadow-[0px_1px_6px_rgba(0,0,0,0.1)] md:drop-shadow-none
6        text-12 md:text-16 leading-21 md:leading-24 font-r text-black
7      `,onClick:()=>{e.onChange(e.tabIndex)},children:e.label})}t.Z=function(e){let{activeIndex:t,onChange:n,data:s,scroll:i}=e;return(0,r.jsx)("div",{className:`flex items-center rounded-9 bg-gray-EFEFF0 md:bg-transparent px-4 py-4 md:px-16 md:py-0 gap-x-5 md:gap-x-32 md:border-b-1 md:border-b-gray-CACFD3 md:border-solid md:rounded-0 ${i?"w-max min-w-full":""}`,children:s.map((e,s)=>(0,r.jsx)(a,{label:e.tabLabel,tabIndex:e.tabIndex||s,currentActiveIndex:t,onChange:n,scroll:i},s))})}},89987:function(e,t,n){n.d(t,{Q:function(){return s}});var r=n(67294);let a=["message","read","typing","message-deleted","reservation","notification"];function s(e,t,n){let s=(0,r.useRef)(t);s.current=t;let i=(0,r.useRef)(n);i.current=n,(0,r.useEffect)(()=>
7{if(!e||"undefined"==typeof EventSource){var t;null===(t=i.current)||void 0===t||t.call(i,!0);return}let n=null,r=0,l=!1;return(n=new EventSource("/api/conversations/stream",{withCredentials:!0})).onopen=()=>{var e;r=0,null===(e=i.current)||void 0===e||e.call(i,!1)},a.forEach(e=>{null==n||n.addEventListener(e,t=>{try{s.current({type:e,data:JSON.parse(t.data)})}catch{}})}),n.onerror=()=>{if((r+=1)>=2){var e;null===(e=i.current)||void 0===e||e.call(i,!0)}},()=>{null==n||n.close()}},[e])}},79121:function(e,t,n){n.d(t,{d:function(){return l},A:function(){return i}});var r=n(36492),a=n(57149);async function s(){let e=await a.Z.setUrl("/api/fallback-avatars").setCallMethod("GET").call();return(null==e?void 0:e.data)??[]}function i(){let{data:e}=(0,r.a)(["fallback-avatars"],s,{staleTime:36e5,cacheTime:36e5,refetchOnWindowFocus:!1,retry:!1});return e||[]}function l(e,t){if(!e.length||null==t)return null;let n=String(t),r=0;for(let e=0;e<n.length;e++)r=31*r+n.charCodeAt(e)|0;return e[Math.abs(r)%e.length]}},48228:function(e,t,n){n.d(t,{D:function(){return m}});var r=n(67294),a=n(464),s=n(32161),i=n(89886),l=n(30081),o=n(33989);class c extends o.l{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let n=this.options;this.options=this.client.defaultMutationOptions(e),(0,s.VS)(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){if(!this.listeners.length){var e;null==(e=this.currentMutation)||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:(0,i.R)(),t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){l.V.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var t,n,r,a,s,i,l,o;e.onSuccess?(null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(a=this.mutateOptions).onSettled)||r.call(a,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(s=(i=this.mutateOptions).onError)||s.call(i,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(l=(o=this.mutateOptions).onSettled)||l.call(o,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}e.listeners&&this.listeners.forEach(e=>{e(this.currentResult)})})}}var d=n(85945),u=n(24798);function m(e,t,n){let i=(0,s.lV)(e,t,n),o=(0,d.NL)({context:i.context}),[m]=r.useState(()=>new c(o,i));r.useEffect(()=>{m.setOptions(i)},[m,i]);let x=(0,a.$)(r.useCallback(e=>m.subscribe(l.V.batchCalls(e)),[m]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),f=r.useCallback((e,t)=>{m.mutate(e,t).catch(h)},[m]);if(x.error&&(0,u.L)(m.options.useErrorBoundary,[x.error]))throw x.error;return{...x,mutate:f,mutateAsync:x.mutate}}function h(){}}}]);

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.