PageSourceSearch

https://lidomatrip.com/_next/static/chunks/2509.0bc3877cd1961afa.js

js lidomatrip.com collected 2026-10-02 20:24:03 UTC 16,049 bytes, 7 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2509,2012],{49378:function(e,t,n){n.d(t,{TH:function(){return l},aK:function(){return i},aZ:function(){return o},pd:function(){return c},tn:function(){return s}});var r=n(57149);let a=e=>null==e?void 0:e.data;async function l(e){let t=await r.Z.setUrl("/api/notifications").setCallMethod("GET").setParams({...e.archived?{archived:"true"}:{},...e.cursor?{cursor:e.cursor}:{},...e.take?{take:e.take}:{}}).call();return a(t)??{items:[],next_cursor:null}}async function s(){var e;let t=await r.Z.setUrl("/api/notifications/unread-count").setCallMethod("GET").call();return(null===(e=a(t))||void 0===e?void 0:e.count)??0}async function i(e){var t;let n=await r.Z.setUrl("/api/notifications/read").setCallMethod("POST").setBody((null==e?void 0:e.length)?{ids:e}:{}).call();return(null===(t=a(n))||void 0===t?void 0:t.updated)??0}async function o(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return r.Z.setUrl(`/api/notifications/${e}/archive`).setCallMethod("POST").setBody({archived:t}).call()}async function c(){var e;let t=await r.Z.setUrl("/api/notifications/archive-all").setCallMethod("POST").setBody({}).call();return(null===(e=a(t))||void 0===e?void 0:e.updated)??0}},70530:function(e,t,n){n.d(t,{Pi:function(){return h},_U:function(){return i},bB:function(){return u},bE:function(){return o},cc:function(){return s},k9:function(){return d},tf:function(){return p},uv:function(){return l},v3:function(){return c}});var r=n(57149);let a=e=>null==e?void 0:e.data;async function l(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 s(e){let t=await r.Z.setUrl(`/api/conversations/${e}`).setCallMethod("GET").call();return a(t)??null}async function i(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 u(e){return r.Z.setUrl(`/api/conversations/${e}/typing`).setCallMethod("POST").setBody({}).call()}async function d(){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 h(){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 p(){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)}},59873:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(85893),a=n(25675),l=n.n(a);function s(e){let{src:t,size:n,alt:a,className:s="",loading:i}=e,o=t||"/assets/default-profile.svg",c=/\.svg(\?|#|$)/i.test(o);return(0,r.jsx)(l(),{src:o,alt:a,width:n,height:n,unoptimized:c,loading:i,className:`rounded-full ${s}`,style:{width:n,height:n,objectFit:"cover"}})}},12509:function(e,t,n){n.r(t),n.d(t,{default:function(){return Z}});var r=n(85893),a=n(25675),l=n.n(a),s=n(73935),i=n(59873),o=n(41664),c=n.n(o),u=n(67294),d=n(85945),h=n(36492),p=n(70530),v=n(89987),f=function(e){let{isLight:t}=e,n=(0,d.NL)(),{data:a=0}=(0,h.a)({queryKey:["chat-unread"],queryFn:p.k9,refetchInterval:6e4,refetchOnWindowFocus:!0}),l=(0,u.useCallback)(e=>{("message"===e.type||"read"===e.type)&&n.invalidateQueries({queryKey:["chat-unread"]})},[n]);return(0,v.Q)(!0,l),(0,r.jsxs)(c(),{prefetch:!1,href:"/chats","aria-label":a>0?`چت، ${a} پیام خوانده‌نشده`:"چت",className:"relative hidden items-center md:flex",children:[(0,r.jsx)("i",{"aria-hidden":"true",className:`icon-message cursor-pointer text-24 hover:text-primary-main ${t?"text-white":"text-black"}`}),a>0&&(0,r.jsx)("span",{className:"absolute -left-6 -top-4 flex h-16 min-w-[16px] items-center justify-center rounded-full bg-primary-main px-4 text-10 leading-14 font-m text-white",children:a>
199?"۹۹+":a.toLocaleString("fa-IR")})]})},m=n(49378),x=function(e){let{isLight:t,isOpen:n,onToggle:a,buttonRef:l}=e,{data:s=0}=(0,h.a)({queryKey:["notificationsUnread"],queryFn:m.tn,refetchInterval:6e4,refetchOnWindowFocus:!0});return(0,r.jsxs)("button",{type:"button",ref:l,onClick:a,"aria-expanded":n,"aria-haspopup":"dialog","aria-label":s>0?`اعلان‌ها، ${s.toLocaleString("fa-IR")} خوانده‌نشده`:"اعلان‌ها",className:"relative flex items-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-main rounded-8",children:[(0,r.jsx)("i",{"aria-hidden":"true",className:`icon-Bell cursor-pointer text-24 hover:text-primary-main ${t?"text-white":"text-black"}`}),s>0&&(0,r.jsx)("span",{className:"absolute -left-6 -top-4 flex h-16 min-w-[16px] items-center justify-center rounded-full bg-primary-main px-4 text-10 leading-14 font-m text-white",children:s>99?"۹۹+":s.toLocaleString("fa-IR")})]})},w=n(91879),y=n(11163),g=n(47300),b=n(72012),j=n(31138),C=n(5152),L=n.n(C),S=n(91694);let N=["/rentals/[id]"],k=["/search/[id]","/alternatives/order"];var P=n(31331);let E=L()(()=>n.e(3070).then(n.bind(n,23070)),{loadableGenerated:{webpack:()=>[23070]},ssr:!0}),M=L()(()=>n.e(7327).then(n.bind(n,97327)),{loadableGenerated:{webpack:()=>[97327]},ssr:!0}),U=L()(()=>Promise.all([n.e(4885),n.e(8289),n.e(2732)]).then(n.bind(n,32732)),{loadableGenerated:{webpack:()=>[32732]},ssr:!0}),_=L()(()=>n.e(1891).then(n.bind(n,26911)),{loadableGenerated:{webpack:()=>[26911]},ssr:!0}),B=L()(()=>n.e(1023).then(n.bind(n,51687)),{loadableGenerated:{webpack:()=>[51687]},ssr:!0});var Z=function(e){let{setIsSideNavbarOpen:t}=e,n=(0,w.Gr)(),a=(0,P.X)(),o=(0,y.useRouter)(),[d,h]=(0,u.useState)(!1),p=(0,u.useRef)(),v=(0,j.a)("(min-width: 1024px)"),[m,C]=(0,u.useState)(!1);(0,u.useEffect)(()=>C(!0),[]);let[L,Z]=(0,u.useState)(!1),$=(0,u.useRef)(),[T,R]=(0,u.useState)(!1),[I,q]=(0,u.useState)(!1),[F,G]=(0,u.useState)(!1),O=(0,u.useRef)(),H=(0,u.useRef)(),Y=(0,u.useRef)(),W=(0,u.useRef)();function z(){var e,t,n,r,a,l,s,i,o,c,u;let d=document.querySelector("#MainHeader"),h=document.querySelector("#whereYouWannaGoWrapper-SearchPage"),p=document.querySelector("#whereYouWannaGoWrapper-HomePage");window.scrollY>=40?(null==d||null===(e=d.classList)||void 0===e||e.remove("md:bg-transparent"),null==d||null===(t=d.classList)||void 0===t||t.add("md:bg-white"),null==d||null===(n=d.classList)||void 0===n||n.add("blur-header"),G(!0)):(null==d||d.classList.remove("md:bg-white"),null==d||d.classList.add("md:bg-transparent"),null==d||null===(r=d.classList)||void 0===r||r.remove("blur-header"),G(!1)),window.scrollY>=230?null==p||p.classList.add("!block"):null==p||null===(a=p.classList)||void 0===a||a.remove("!block"),O.current=window.scrollY,(null==O?void 0:O.current)>(null==H?void 0:H.current)?Y.current=2:Y.current=1,(null==Y?void 0:Y.current)!==(null==W?void 0:W.current)&&((null==Y?void 0:Y.current)===2?(null==d||null===(l=d.classList)||void 0===l||l.add("!-top-[56px]"),null==p||p.classList.add("!top-0"),null==h||null===(s=h.classList)||void 0===s||s.remove("top-[66px]"),null==h||null===(i=h.classList)||void 0===i||i.add("top-0")):1===Y.current&&(null==d||null===(o=d.classList)||void 0===o||o.remove("!-top-[56px]"),null==p||p.classList.remove("!top-0"),null==h||null===(c=h.classList)||void 0===c||c.add("top-[66px]"),null==h||null===(u=h.classList)||void 0===u||u.remove("top-0"))),W.current=Y.current,H.current=O.current}function V(){window.removeEventListener("scroll",z)}(0,u.useEffect)(()=>{"/"===o.pathname&&(O.current=window.scrollY,H.current=window.scrollY,Y.current=0,W.current=0,o.events.on("routeChangeStart",V),window.addEventListener("scroll",z))},[o.pathname,o.events]);let A=()=>{var e,t;let n=document.querySelector("#MainHeader"),r=document.querySelector("#FiltersSectionWrapper"),a=document.querySelector("#SearchPageContent"),l=window.scrollY,s=H.current??0;if(6>Math.abs(l-s))return;H.current=l;let i=l<=80?1:l>s?2:1;i!==W.current&&(W.current=i,2===i?(null==n||null===(e=n.classList)||void 0===e||e.add("!-top-[56px]"),null==r||r.classList.add("!top-0"),null==a||a.classList.add("!pt-[246px]")):(null==n||null===(t=n.classList)||void 0===t||t.remove("!-top-[56px]"),null==r||r.classList.remove("!top-0"),null==a||a.classList.remove("!pt-[246px]")))};function Q(){let e;let t=document.querySelector("#MainSearchBox");if(t){var n,r,a;r=(n=t.getBoundingClientRect()).top,a=n.bottom,e=r>=0&&a<=window.innerHeight}e?q(!1):q(!0)}function D(){q(!1),window.removeEventListener("scroll",Q)}return(0,u.useEffect)(()=>{var e,t,n,r;return H.current=window.scrollY,W.current=1,null===(e=document.querySelector("#MainHeader"))||void 0===e||null===(t=e.classList)||void 0===t||t.remove("!-top-[56px]"),null===(n=document.querySelector("#FiltersSectionWrapper"))||void 0===n||null===(r=n.classList)||void 0===r||r.remove("!top-0"),window.addEventListener("scroll",A,{passive:!0}),()=>{window.removeEventListener("scroll",A)}},[o.pathname]),(0,u.useEffect)(()=>("/"===o.pathname&&(o.events.on("routeChangeStart",D),window.addEventListener("scroll",Q)),()=>{o.events.off("routeChangeStart",D),window.removeEventListener("scroll",Q)}),[o.pathname]),(0,r.jsxs)(b.Z,{handleClick:()=>R(!1),children:[(0,r.jsx)("div",{className:`${k.includes(o.pathname)?"CustomContainer2":"CustomContainer"} relative z-[2]`,children:(0,r.jsxs)("div",{className:`
2          relative
3          flex items-center justify-between flex-row-reverse
4          py-8 md:py-24
5        `,children:[(0,r.jsxs)("div",{className:"flex items-center md:gap-x-24 gap-x-12 flex-row-reverse",children:[(0,r.jsx)("div",{ref:$,onClick:()=>
5{v?null!==n.user_type&&n.user_type!==w.P.PUBLIC&&Z(e=>!e):t(!0)},className:"relative gap-x-12 cursor-pointer flex items-center row md:flex-row-reverse border-none p-4 md:p-0 rounded-50",children:(null===n.user_type||n.user_type===w.P.PUBLIC)&&v?(0,r.jsx)(g.z,{rounded:!0,onClick:()=>{n.authModalsUtils.setShowEnterPhoneNumberModal(!0)},color:F?"grey":"white",variant:"contained",className:"!py-5 !pl-8",leftIcon:(0,r.jsx)("span",{className:"bg-white rounded-full",children:(0,r.jsx)(i.Z,{size:24,alt:"آواتار",loading:"eager"})}),children:"ورود / ثبت نام"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"w-32 h-32 rounded-full relative",children:(0,r.jsx)(i.Z,{src:n.has_avatar?n.avatar_url:null,size:32,alt:"آواتار",loading:"eager"})}),(0,r.jsx)("div",{className:`flex items-center ${!v&&"!text-black"} ${F||"/"!==o.pathname?"text-black":"text-white"}`,children:(0,r.jsx)("i",{className:"icon-Menu text-32"})})]})}),(0,r.jsxs)("div",{className:"flex items-center row md:flex-row-reverse gap-x-24",children:[!n.is_host&&(0,r.jsxs)("div",{className:`hidden md:flex items-center gap-x-8 cursor-pointer ${F||"/"!==o.pathname?"text-black":"text-white"} hover:text-primary-main`,onClick:()=>{null===n.user_type||n.user_type===w.P.PUBLIC?n.authModalsUtils.setShowEnterPhoneNumberModal(!0):o.push("/residences/submit")},children:[(0,r.jsx)("i",{className:"icon-AddHome text-24"}),(0,r.jsx)("span",{className:"text-16 leading-24 font-r",children:"میزبان شوید"})]}),n.user_type===w.P.AUTH&&(0,r.jsx)(f,{isLight:!F&&"/"===o.pathname}),n.user_type===w.P.AUTH&&(0,r.jsxs)("div",{className:"relative flex items-center",children:[(0,r.jsx)(x,{isLight:!F&&"/"===o.pathname,isOpen:d,onToggle:()=>h(e=>!e),buttonRef:p}),!!d&&v&&(0,r.jsx)(b.Z,{handleClick:()=>h(!1),exceptionElementsRef:[p],children:(0,r.jsx)("div",{className:"w-[352px] absolute -bottom-10 left-0 translate-y-full shadow-[0px_8px_32px_rgba(24,39,58,0.15)] p-16 rounded-16 bg-white",children:(0,r.jsx)(E,{setShowNotificationsPaper:h})})}),!v&&m&&(0,s.createPortal)((0,r.jsx)(B,{open:d,handleClose:()=>h(!1),headerTitle:"اعلانات",body:e=>{let{handleSmoothClose:t}=e;return(0,r.jsx)(E,{setShowNotificationsPaper:h,hideTitle:!0,onNavigateAway:t})}}),document.body)]}),!!a.headerCallIconVisible&&(0,r.jsx)(c(),{prefetch:!1,href:"tel:02191070021",className:`${!v&&"!text-black"} ${F||"/"!==o.pathname?"text-black":"text-white"} border-none cursor-pointer w-40 md:w-auto rounded-full h-40 md:h-auto flex items-center justify-center`,children:(0,r.jsx)("i",{className:"text-28 md:text-24 icon-Phone"})})]})]}),"/reservations/[id]"===o.pathname&&!v&&n.is_host?(0,r.jsx)(g.Q,{color:"grey",rightIcon:(0,r.jsx)("i",{className:"icon-FlashRight text-24 text-black"}),className:"!pl-16 !pr-8 !py-4",href:"/reservations",children:"رزرو ها"}):"/my-trips/[id]"!==o.pathname||v?(0,r.jsx)("div",{className:"w-136 h-full relative",children:(0,r.jsx)(c(),{prefetch:!1,passHref:!0,href:"/",children:v&&(F||"/"!==o.pathname)?(0,r.jsx)(l(),{src:"/assets/logos/Lidoma-logo2.svg",width:101,height:32,alt:"لوگو"}):v?(0,r.jsx)(l(),{src:"/assets/logos/Lidoma-logo3-white.svg",width:101,height:32,alt:"لوگو"}):(0,r.jsx)(l(),{src:"/assets/logos/Lidoma-logo.svg",width:90,height:28,alt:"لوگو"})})}):(0,r.jsx)(g.Q,{color:"grey",rightIcon:(0,r.jsx)("i",{className:"icon-FlashRight text-24 text-black"}),className:"!pl-16 !pr-8 !py-4",href:"/my-trips",children:"سفرهای من"}),(!!N.includes(o.pathname)&&!!v||!!S.B.includes(o.pathname)&&!!v||I)&&(0,r.jsx)(M,{showMainSearchBox:T,setShowMainSearchBox:R}),!!L&&(0,r.jsx)("div",{className:"absolute -bottom-8 left-0 translate-y-full z-1",children:(0,r.jsx)(_,{setShowNavbarPaper:Z,navbarPaperOpenerRef:$})})]})}),(0,r.jsx)("div",{className:`
6        relative z-[1000]
7        ${T?"h-[94px] opacity-100":"h-0 opacity-0 overflow-hidden"} transition-all duration-300 ease-in-out`,children:(0,r.jsx)("div",{className:"pb-16",children:!!T&&(0,r.jsx)(U,{containerClassname:"!shadow-none border-1 border-solid border-gray-CACFD3",fillInputsFromUrl:!0,setShowMainSearchBox:R,noCoOperation:!1})})})]})}},72012:function(e,t,n){var r=n(85893),a=n(67294);t.Z=function(e){let{children:t,handleClick:n,exceptionElementsRef:l=[]}=e,s=(0,a.useRef)(null);return(0,a.useEffect)(()=>{function e(e){let t=e.target;(!t||document.contains(t))&&(l.some(e=>{var n;return null==e?void 0:null===(n=e.current)||void 0===n?void 0:n.contains(t)})||!s.current||s.current.contains(t)||n())}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[s]),(0,r.jsx)("div",{ref:s,children:t})}},31331:function(e,t,n){n.d(t,{X:function(){return s}});var r=n(36492),a=n(29061);let l={footerPhoneVisible:!0,footerContactLinkVisible:!0,headerCallIconVisible:!0,residenceHeaderCallButtonVisible:!0,residenceHeaderCallButtonPhone:"02191070021",searchFloating
7CallButtonVisible:!0,searchFloatingCallButtonPhone:"02191070021"};function s(){let{data:e}=(0,r.a)(["site-settings","contact"],async()=>(await a.Z.get("/api/site-settings/contact")).data.data,{staleTime:3e5});return e??l}},89987:function(e,t,n){n.d(t,{Q:function(){return l}});var r=n(67294);let a=["message","read","typing","message-deleted","reservation","notification"];function l(e,t,n){let l=(0,r.useRef)(t);l.current=t;let s=(0,r.useRef)(n);s.current=n,(0,r.useEffect)(()=>{if(!e||"undefined"==typeof EventSource){var t;null===(t=s.current)||void 0===t||t.call(s,!0);return}let n=null,r=0,i=!1;return(n=new EventSource("/api/conversations/stream",{withCredentials:!0})).onopen=()=>{var e;r=0,null===(e=s.current)||void 0===e||e.call(s,!1)},a.forEach(e=>{null==n||n.addEventListener(e,t=>{try{l.current({type:e,data:JSON.parse(t.data)})}catch{}})}),n.onerror=()=>{if((r+=1)>=2){var e;null===(e=s.current)||void 0===e||e.call(s,!0)}},()=>{null==n||n.close()}},[e])}}}]);

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.