PageSourceSearch

https://lidomatrip.com/_next/static/chunks/pages/change-residences-status-76242f899f7fcf7f.js

js lidomatrip.com collected 2026-09-25 07:11:52 UTC 42,007 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6415],{93518:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/change-residences-status",function(){return n(28226)}])},97474:function(e,t,n){"use strict";n.d(t,{u:function(){return d}});var r,i=n(47568),s=n(26042),o=n(70655),l=n(57149);function a(e){return e.toISOString().slice(0,10)}var d=(r=(0,i.Z)(function(e){var t,n,r,i,d,u,c,v,m,p,h,f,y,g,x,b,_,j,w,k,N,S,C,I,R,q,E,Z,D,M,O,F,T,P,Y,U,A,L,K,V,W,z,B,H,G,X,J,Q,$;return(0,o.__generator)(this,function(o){switch(o.label){case 0:if(t=e.residenceId,e.residenceType,r=void 0===(n=e.scope)?"public":n,i=e.roomId,"all"===t)return[2,{status:"error",err_msg:"این حالت پشتیبانی نمی‌شود"}];return v=new Date,(m=new Date).setDate(m.getDate()+365),p=a(v),h=a(m),[4,l.Z.setUrl("host"===r?"/api/host/residences/".concat(t,"/calendar"):"/api/residences/".concat(t,"/calendar")).setCallMethod("GET").setParams((0,s.Z)({from:p,to:h},i?{roomId:i}:{})).call()];case 1:if((null==(f=o.sent())?void 0:f.status)!=="success")return[2,{status:"error",err_msg:"خطا در دریافت اطلاعات تقویم"}];y=(null==f?void 0:null===(d=f.data)||void 0===d?void 0:d.residence)||{},g=(null==f?void 0:null===(u=f.data)||void 0===u?void 0:u.days)||[],x=(null==f?void 0:null===(c=f.data)||void 0===c?void 0:c.reservations)||[],b=[],_=[],j=[],w=new Map,k=!0,N=!1,S=void 0;try{for(C=g[Symbol.iterator]();!(k=(I=C.next()).done);k=!0)R=I.value,q=String(R.date).slice(0,10),R.isBlocked&&b.push(q),null!==R.isFast&&void 0!==R.isFast&&w.set(q,!!R.isFast),null!=R.specialPrice&&_.push([q,R.specialPrice]),null!=R.discountAmount&&j.push({amount:R.discountAmount,date:q,discount_id:R.id,type:"PERCENTAGE"===R.discountType?"percentage":"fixed_price"})}catch(e){N=!0,S=e}finally{try{k||null==C.return||C.return()}finally{if(N)throw S}}for(E=[],Z=!!y.isFast,D=new Date(v);D<=m;D.setDate(D.getDate()+1))M=a(D),(null!==(O=w.get(M))&&void 0!==O?O:Z)&&E.push(M);F=[],T=!0,P=!1,Y=void 0;try{for(U=x[Symbol.iterator]();!(T=(A=U.next()).done);T=!0)for(L=A.value,K=new Date(L.from),V=new Date(L.to);K<V;)F.push(a(K)),K.setDate(K.getDate()+1)}catch(e){P=!0,Y=e}finally{try{T||null==U.return||U.return()}finally{if(P)throw Y}}return[2,{status:"success",params:{capacity:null!==(W=y.capacity)&&void 0!==W?W:0,discounted_days:j,fast_days:E,filled_dates:b,is_temp:!1,max_capacity:null!==(z=y.maxCapacity)&&void 0!==z?z:0,peak_dates:[],prices:{extra_guests_price:null!==(B=y.extraGuestsPrice)&&void 0!==B?B:0,extra_guests_peak_price:null!==(H=y.extraGuestsPeakPrice)&&void 0!==H?H:0,monthly_discount:null!==(G=y.monthlyDiscount)&&void 0!==G?G:0,peak_price:null!==(X=y.peakPrice)&&void 0!==X?X:0,week_price:null!==(J=y.weekPrice)&&void 0!==J?J:0,weekend_price:null!==(Q=y.weekendPrice)&&void 0!==Q?Q:0,weekly_discount:null!==($=y.weeklyDiscount)&&void 0!==$?$:0},reserved_dates:F,special_dates:_}}]}})}),function(e){return r.apply(this,arguments)})},63871:function(e,t,n){"use strict";n.d(t,{O:function(){return o}});var r=n(85893),i=n(77461),s=n.n(i),o=function(){return(0,r.jsx)("div",{className:"my-32 flex w-full justify-center ",children:(0,r.jsx)("div",{className:"".concat(s()["dot-flashing"])})})}},44824:function(e,t,n){"use strict";n.d(t,{r:function(){return s}});var r=n(85893),i=n(67294),s=function(e){var t,n,s,o=e.checked,l=e.onChange,a=e.disabled,d=e.label,u=e.labelClassnames,c=e.inputClassnames,v=e.name,m=e.wrapperClassnames,p=e.formik,h=(0,i.useRef)(null);return(0,r.jsxs)("div",{className:"\n        flex items-center gap-x-8\n        ".concat(a?"cursor-not-allowed":"cursor-pointer","\n        ").concat(m||"","\n      "),children:[d&&(0,r.jsx)("div",{className:"text-14 leading-24 text-black font-r ".concat(u||""),children:d}),(0,r.jsxs)("div",{className:"relative w-40 h-24 rounded-50 transition-all ".concat(p&&(null===(t=p.values)||void 0===t?void 0:t[v])||o?c||"bg-primary-main":"bg-gradient-to-b from-[rgba(25,59,103,0.05)] to-[rgba(25,59,103,0.05)] bg-white"),onClick:function(e){if(!a){var t,n;null===(t=null==h?void 0:h.current)||void 0===t||null===(n=t.click)||void 0===n||n.call(t)}},children:[(0,r.jsx)("input",{name:v,type:"checkbox",id:"toggleB",checked:p?!!(null==p?void 0:null===(n=p.values)||void 0===n?void 0:n[v]):o,onChange:function(e){p?p.setFieldValue(v,e.target.checked):l&&l(e)},hidden:!0,ref:h}),(0,r.jsx)("div",{className:"\n            absolute w-20 h-20 bg-white shadow-[0px_0px_4px_rgba(0,0,0,0.16)] rounded-full top-2\n            ".concat(p&&(null===(s=p.values)||void 0===s?void 0:s[v])||o?"right-2":"left-2","\n          ")})]})]})}},60243:function(e,t,n){"use strict";var r,i,s,o;n.d(t,{h:function(){return r}}),(s=r||(r={})).PRODUCT="product",s.ROOM="room",(o=i||(i={})).BOOMGARDI="boomgardi",o.SUIT="suit",o.HOTEL="hotel"},28226:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return ej},default:function(){return ew}});var r,i,s,o,l=n(85893),a=n(47568),d=n(26042),u=n(69396),c=n(10253),v=n(36305),m=n(70655),p=n(67294),h=n(5152),f=n.n(h),y=n(47300),g=n(28855),x=n(68289),b=n.n(x),_=n(2700),j=n(85945),w=n(36492),k=n(48228),N=n(49340),S=n(44824),C=n(72012),I=n(83968),R=n(25675),q=n.n(R),E=n(16895),Z=n(30832),D=n(57149),M=(r=(0,a.Z)(function(e){var t,n,r,i,s,o,l,a;return(0,m.__generator)(this,function(d){return t=e.keyword,n=e.search_type,r=e.res_type,i=e.page,s=e.page_size,o=e.start_date,l=e.end_date,a={ke
1yword:t,search_type:n,res_type:r,page:i,page_size:s},o&&(a.start_date=o),l&&(a.end_date=l),[2,D.Z.setUrl("/api/internal/search_residences").setCallMethod("POST").setJsonRpcMethod("call").setParams(a).call()]})}),function(e){return r.apply(this,arguments)}),O={res_code:"کد اقامتگاه",res_name:"نام اقامتگاه",host_name:"نام میزبان",host_phone:"شماره میزبان",city_name:"نام شهر"},F=n(11163),T=n(45551),P=n(68398),Y=n(63871),U=[{name:"همه اقامتگاه ها",value:"all",id:0},{name:"ویلا سوئیت ها",value:"suit",id:1},{name:"بوم گردی ها",value:"boomgardi",id:2}],A=n(82175),L=n(74231),K=(i=(0,a.Z)(function(e){var t,n,r,i,s,o,l,a,d,u;return(0,m.__generator)(this,function(c){return t=e.residences,n=e.rooms,r=e.dates,i=e.discount_amount,s=e.special_price,o=e.enable,l=e.fast,a=e.keyword,d=e.res_type,u=e.search_type,[2,D.Z.setUrl("/api/internal/update_calendar").setCallMethod("POST").setJsonRpcMethod("call").setParams({residences:t,rooms:n,dates:r,discount_amount:i,special_price:s,enable:o,fast:l,keyword:a,res_type:d,search_type:u}).call()]})}),function(e){return i.apply(this,arguments)}),V=n(50534),W=function(e){var t=e.UpdateCalendar_formik;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"mb-12",children:(0,l.jsx)(g.n,{name:"selected-days-price_UpdateCalendar",inputmode:"numeric",formik:t,wordifyNumbers:!1,placeholder:"قیمت روزهای انتخاب شده",label:"قیمت روزهای انتخاب شده"})}),(0,l.jsx)("div",{className:"",children:(0,l.jsx)(g.n,{name:"selected-days-discount_UpdateCalendar",type:"number",formik:t,wordifyNumbers:!1,placeholder:"تخفیف روزهای انتخاب شده (درصد)",label:"تخفیف روزهای انتخاب شده (درصد)"})})]})},z=n(40186),B=n(45107),H=n(68002),G=n(59223),X=n.n(G),J=n(13346),Q=(s=(0,a.Z)(function(e){var t;return(0,m.__generator)(this,function(n){return t=e.product_id,[2,D.Z.setUrl("/api/residence/get_images").setCallMethod("POST").setJsonRpcMethod("call").setParams({product_id:t}).call()]})}),function(e){return s.apply(this,arguments)}),$=n(45425),ee=function(e,t){var n=e.pathname,r=e.query,i=(0,$.E)(r),s=new URLSearchParams(i);t.forEach(function(e){var t,n=e[0],r=null===(t=e[1])||void 0===t?void 0:t.toString();s.append(n,r)}),e.push({pathname:n,query:s.toString()},void 0,{shallow:!0})},et=n(23654);function en(e){var t,n,r,i,s,o=e.resOrRoomId,l=e.parameterKey,a=e.router;return null!=a&&null!==(t=a.query)&&void 0!==t&&!!t[l]&&(Array.isArray(null==a?void 0:null===(n=a.query)||void 0===n?void 0:n[l])?null==a?void 0:null===(r=a.query)||void 0===r?void 0:null===(i=r[l])||void 0===i?void 0:i.includes(o.toString()):(null==a?void 0:null===(s=a.query)||void 0===s?void 0:s[l])===o.toString())}var er=n(52642),ei=n(49276),es=n(77087),eo=n(41664),el=n.n(eo),ea=f()(function(){return Promise.all([n.e(5080),n.e(5905)]).then(n.bind(n,24235))},{loadableGenerated:{webpack:function(){return[24235]}},ssr:!0}),ed=function(e){var t,n,r,i,s,o,a=e.setCheckedAllResidences,d=e.display_type,u=e.image_url,m=e.resId,h=e.resName,f=e.hostName,y=e.hostPhone,g=e.resAddress,x=e.rooms,_=e.lastUpdateBy,j=e.lastUpdateAt,k=(0,c.Z)((0,p.useState)(!1),2),N=k[0],S=k[1],C=(0,c.Z)((0,p.useState)(),2),I=C[0],R=C[1],E=(0,F.useRouter)(),D=(0,c.Z)((0,p.useState)(),2),M=D[0],O=D[1],T=(0,c.Z)((0,p.useState)({x:0,y:0}),2),P=T[0],Y=T[1],U=function(e){Y({x:e.clientX,y:e.clientY})},A=(0,w.a)(["changeResidencesStatusGetObserveResidence",I],function(){return Q({product_id:I})},{enabled:!!I,onSuccess:function(){}}),L=A.data;A.isLoading;var K=(0,es.$)({residenceId:m});return(0,l.jsxs)("div",{className:"cursor-pointer border border-gray-E8E8E8 rounded-12 p-12 flex flex-col justify-center gap-12 mb-4 ".concat(N?"bg-gray-F3F8FE":""),children:[(0,l.jsxs)("div",{className:"flex items-center gap-x-8 justify-between\n        }",children:[(0,l.jsx)(Z.X,{checked:"boomgardi"===d?Array.isArray(null==E?void 0:null===(t=E.query)||void 0===t?void 0:t.roomId)&&x.every(function(e){var t,n;return null==E?void 0:null===(t=E.query)||void 0===t?void 0:null===(n=t.roomId)||void 0===n?void 0:n.includes(e.id.toString())})||"string"==typeof(null==E?void 0:null===(n=E.query)||void 0===n?void 0:n.roomId)&&1===x.length&&(null==E?void 0:null===(r=E.query)||void 0===r?void 0:r.roomId)===(null===(i=x[0])||void 0===i?void 0:i.id.toString()):en({resOrRoomId:m,parameterKey:"residenceId",router:E}),onChange:function(){if(a(!1),"boomgardi"===d){var e,t,n,r;Array.isArray(null==E?void 0:null===(e=E.query)||void 0===e?void 0:e.roomId)&&x.every(function(e){var t,n;return null==E?void 0:null===(t=E.query)||void 0===t?void 0:null===(n=t.roomId)||void 0===n?void 0:n.includes(e.id.toString())})||"string"==typeof(null==E?void 0:null===(t=E.query)||void 0===t?void 0:t.roomId)&&1===x.length&&(null==E?void 0:null===(n=E.query)||void 0===n?void 0:n.roomId)===(null===(r=x[0])||void 0===r?void 0:r.id.toString())?(0,et.H)(E,(0,v.Z)(x.map(function(e){return{paramKey:"roomId",paramValue:e.id.toString()}}))):ee(E,(0,v.Z)(x.filter(function(e){return!en({parameterKey:"roomId",resOrRoomId:e.id,router:E})}).map(function(e){return["roomId",e.id]})))}else en({resOrRoomId:m,parameterKey:"residenceId",router:E})?(0,et.H)(E,[{paramKey:"residenceId",paramValue:m.toString()}]):ee(E,[["residenceId",m]])},inputClassnames:"checked:after:!bg-blue-dark"}),u&&(0,l.jsx)("div",{onClick:function(){R(m),O(!0)},className:"bg-gray-F5F9FF w-44 h-44 flex shrink-0 items-center justify-center relative rounded-[50%] cursor-pointer",children:(0,l.jsx)(q(),{src:u,alt:h,className:"rounded-[50%]",fill:!0,sizes:"100vw",style:{objectFit:"cover"}})}),(0,l.jsxs)("div",{className:"flex justify-center flex-col gap-4",children:[(0,l.jsx)("p",{title:h,className:"text-16 leading-24 text-gray-263341 font-r ".concat(X()["line-clamp-1"]),children:h}),(0,l.jsx)("p",{title:g,className:"text-14 leading-20 text-gray-616E7C font-r ".concat(X()["line-clamp-1"]),children:g})]}),"boomgardi"===d&&(0,l.jsx)("div",{onClick:function(){return S(!N)},className:"bg-gray-F4F5F6 rounded-10 flex items-center justify-center p-8 mr-52",children:N?(0,l.jsx)("i",{className:"icon-FlashUp text-24 text-black"}):(0,l.jsx)("i",{className:"icon-FlashDown text-24 text-black"})}),"suit"===d&&!!x.length&&(0,l.jsxs)("span",{className:"bg-gray-F4F5F6 py-3 px-4 roun
1ded-4 flex items-center gap-x-4 mb-20",children:[x.length,(0,l.jsx)("i",{className:"icon-Rooms"})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(el(),{href:K,prefetch:!1,passHref:!0,className:"border-l border-gray-E8E8E8 pl-8 ml-8",children:(0,l.jsx)("span",{className:"text-14 leading-20 text-blue-main font-r",children:m})}),(0,l.jsx)("span",{className:"text-14 leading-20 text-gray-616E7C font-r",children:f})]}),(0,l.jsxs)("div",{className:"flex items-center text-14 leading-20 text-gray-263341 font-r gap-x-4",children:[(0,l.jsx)("span",{children:y}),y&&(0,l.jsx)(q(),{onClick:function(e){(0,J.v)(y),U(e)},src:"/assets/non-icomoon-icons/copy2.svg",width:24,height:24,alt:"copy"})]})]}),j&&_&&(0,l.jsxs)("div",{className:"flex items-center pt-8 border-t border-gray-C4CAD3",children:[(0,l.jsxs)("div",{className:"text-gray-616E7C text-11 leading-14 font-r pl-12 border-l border-gray-CACFD3 flex items-center gap-8",children:[(0,l.jsx)("span",{children:"آخرین بروزرسانی:"}),(0,l.jsx)("span",{children:(0,ei.IS)(b()(j))})]}),(0,l.jsx)("span",{className:"text-gray-616E7C text-11 leading-14 font-r pr-12",children:_})]}),"boomgardi"===d&&N&&(0,l.jsx)("div",{className:"flex flex-col gap-y-8",children:null==x?void 0:x.map(function(e,t){return(0,l.jsxs)("div",{className:"border border-blue-main rounded-8 p-12 flex items-center gap-x-8 bg-gray-F4F5F6",children:[(0,l.jsx)(Z.X,{checked:en({resOrRoomId:e.id,parameterKey:"roomId",router:E}),onChange:function(){a(!1);var t,n,r,i,s=Array.isArray(null==E?void 0:null===(t=E.query)||void 0===t?void 0:t.roomId)&&x.every(function(e){var t,n;return null==E?void 0:null===(t=E.query)||void 0===t?void 0:null===(n=t.roomId)||void 0===n?void 0:n.includes(e.id.toString())})||"string"==typeof(null==E?void 0:null===(n=E.query)||void 0===n?void 0:n.roomId)&&1===x.length&&(null==E?void 0:null===(r=E.query)||void 0===r?void 0:r.roomId)===(null===(i=x[0])||void 0===i?void 0:i.id.toString()),o=en({resOrRoomId:e.id,parameterKey:"roomId",router:E});s&&o?(0,et.H)(E,[{paramKey:"roomId",paramValue:e.id.toString()}]):!s&&o?(0,et.H)(E,[{paramKey:"roomId",paramValue:e.id.toString()}]):((null==x?void 0:x.filter(function(e){return!!en({parameterKey:"roomId",resOrRoomId:e.id,router:E})})).length,x.length,ee(E,[["roomId",e.id]]))},inputClassnames:"checked:after:!bg-blue-dark"}),(0,l.jsx)("div",{className:"bg-white p-6 rounded-[50%] w-36 h-36 flex items-center justify-center",children:(0,l.jsx)("i",{className:"icon-Rooms text-24"})}),(0,l.jsx)("span",{className:"text-14 text-black leading-20 font-r",children:e.name})]},t)})}),!!M&&(0,l.jsx)(ea,{isOpen:M,onClose:function(){return O(!1)},images:null==L?void 0:null===(s=L.params)||void 0===s?void 0:null===(o=s.images)||void 0===o?void 0:o.map(function(e){return{url:e,name:name}})}),0!==P.x&&0!==P.y&&(0,l.jsx)(er.Z,{icon:"icon-Success",text:"کپی شد",x:P.x-16,y:P.y-60})]})},eu=n(7078),ec=n(97474),ev=n(60243),em=n(33089);function ep(e){var t=e.residencesList,n=e.router,r=[];t.forEach(function(e){"suit"===e.display_type?r.push(["residenceId",e.id.toString()]):e.rooms.forEach(function(e){r.push(["roomId",e.id.toString()])})}),ee(n,r)}var eh=n(1581),ef=n(47067),ey=(o=(0,a.Z)(function(e){var t,n,r,i,s,o,l;return(0,m.__generator)(this,function(a){return t=e.reset,n=e.residences,r=e.rooms,i=e.dates,s=e.keyword,o=e.res_type,l=e.search_type,[2,D.Z.setUrl("/api/internal/update_calendar").setCallMethod("POST").setJsonRpcMethod("call").setParams({reset:t,residences:n,rooms:r,dates:i,keyword:s,res_type:o,search_type:l}).call()]})}),function(e){return o.apply(this,arguments)}),eg=f()(function(){return n.e(8950).then(n.bind(n,18950))},{loadableGenerated:{webpack:function(){return[18950]}},ssr:!0}),ex={"selected-days-price_UpdateCalendar":L.Rx().nullable(),"selected-days-discount_UpdateCalendar":L.Z_().test("valid-discount","میزان تخفیف را به درصد وارد کنید. (حداکثر 99 درصد)",function(e){if("nochange"===e||!e)return!0;var t=parseFloat(e);return t>=0&&t<=99}).nullable()}
1,eb={"selected-days-price_UpdateCalendar":null,"selected-days-discount_UpdateCalendar":"nochange"},e_=function(){var e,t,n,r,i,s,o,h,f,x,R,D,G,X,J,Q,$,ee,en,er,es,eo,el,ea,e_,ej,ew,ek,eN,eS=function(e){var t,n,r,i,s,o,l=e.router;return"string"!=typeof(null==l?void 0:null===(t=l.query)||void 0===t?void 0:t.roomId)||(null==l?void 0:null===(n=l.query)||void 0===n?void 0:n.residenceId)?(null==l?void 0:null===(r=l.query)||void 0===r?void 0:r.roomId)||"string"!=typeof(null==l?void 0:null===(i=l.query)||void 0===i?void 0:i.residenceId)?0:Number(null==l?void 0:null===(o=l.query)||void 0===o?void 0:o.residenceId):Number(null==l?void 0:null===(s=l.query)||void 0===s?void 0:s.roomId)},eC=function(){eX([]),eB([])},eI=function(){e$([])},eR=(0,j.NL)(),eq=(0,F.useRouter)(),eE=(0,c.Z)((0,p.useState)(eb),2),eZ=eE[0];eE[1];var eD=(0,c.Z)((0,p.useState)(b()(new Date)),2),eM=eD[0],eO=eD[1],eF=(0,c.Z)((0,p.useState)(b()(new Date)),2),eT=eF[0],eP=eF[1],eY=(0,c.Z)((0,p.useState)(!1),2),eU=eY[0],eA=eY[1],eL=(0,c.Z)((0,p.useState)(!1),2),eK=eL[0],eV=eL[1],eW=(0,c.Z)((0,p.useState)([]),2),ez=eW[0],eB=eW[1],eH=(0,c.Z)((0,p.useState)([]),2),eG=eH[0],eX=eH[1],eJ=(0,c.Z)((0,p.useState)([]),2),eQ=eJ[0],e$=eJ[1],e0=(0,c.Z)((0,p.useState)(!1),2),e1=e0[0],e2=e0[1],e4=(0,c.Z)((0,p.useState)(!1),2),e8=e4[0],e5=e4[1],e6=(0,c.Z)((0,p.useState)("all"),2),e3=e6[0],e7=e6[1],e9=(0,c.Z)((0,p.useState)(),2),te=e9[0],tt=e9[1],tn=(0,c.Z)((0,p.useState)(""),2),tr=tn[0],ti=tn[1],ts=(0,c.Z)((0,p.useState)(""),2),to=ts[0],tl=ts[1],ta=(0,c.Z)((0,p.useState)(!1),2),td=ta[0],tu=ta[1],tc=(0,c.Z)((0,p.useState)("nochange"),2),tv=tc[0],tm=tc[1],tp=(0,c.Z)((0,p.useState)("nochange"),2),th=tp[0],tf=tp[1],ty=(0,c.Z)((0,p.useState)(!1),2);ty[0],ty[1];var tg=(0,c.Z)((0,p.useState)([]),2),tx=tg[0],tb=tg[1],t_=(0,c.Z)((0,p.useState)(!0),2),tj=t_[0],tw=t_[1],tk=(0,c.Z)((0,p.useState)(),2),tN=tk[0],tS=tk[1],tC=(0,c.Z)((0,p.useState)(new Date),2),tI=tC[0],tR=tC[1],tq=(0,c.Z)((0,p.useState)(!1),2),tE=tq[0],tZ=tq[1],tD=(0,c.Z)((0,p.useState)(!0),2),tM=tD[0],tO=tD[1],tF=(0,p.useRef)(null),tT=(0,p.useRef)(null),tP=(0,c.Z)((0,p.useState)(!1),2),tY=tP[0],tU=tP[1],tA=(0,c.Z)((0,p.useState)(""),2),tL=tA[0],tK=tA[1],tV=(0,w.a)(["getCalendarData",null==eq?void 0:null===(t=eq.query)||void 0===t?void 0:t.roomId,null==eq?void 0:null===(n=eq.query)||void 0===n?void 0:n.residenceId],function(){var e,t,n;return(0,ec.u)({residenceId:Number(null==eq?void 0:null===(e=eq.query)||void 0===e?void 0:e.roomId)||Number(null==eq?void 0:null===(t=eq.query)||void 0===t?void 0:t.residenceId),residenceType:(null==eq?void 0:null===(n=eq.query)||void 0===n?void 0:n.residenceId)?ev.h.PRODUCT:ev.h.ROOM,scope:"host"})},{enabled:!!eS({router:eq})}),tW=(tV.isSuccess,tV.isLoading,tV.isFetching,tV.refetch),tz=tV.data;(0,p.useEffect)(function(){tz&&((null==tz?void 0:tz.status)==="error"?T.Z.message([{type:P.L.ERROR,title:(null==tz?void 0:tz.err_msg)||P.i}]):(tS(null==tz?void 0:tz.params),tR(new Date)))},[tz]);var tB=(0,k.D)(function(e){return K({residences:e.residences,rooms:e.rooms,dates:e.dates,discount_amount:e.discount_amount,special_price:e.special_price,enable:e.enable,fast:e.fast,keyword:e.keyword,res_type:e.res_type,search_type:e.search_type})},{onSuccess:function(e){if((null==e?void 0:e.status)==="success"){var t,n,r,i,s,o;T.Z.message([{type:P.L.SUCCESS,title:"بروزرسانی با موفقیت انجام شد."}]),((null==e?void 0:null===(t=e.params)||void 0===t?void 0:null===(n=t.room_errors)||void 0===n?void 0:n.length)||(null==e?void 0:null===(r=e.params)||void 0===r?void 0:null===(i=r.res_errors)||void 0===i?void 0:i.length))&&T.Z.message([{type:P.L.ERROR,title:"اقامتگاه های ".concat(null==e?void 0:null===(s=e.params)||void 0===s?void 0:s.res_errors.join(" و "),",").concat(null==e?void 0:null===(o=e.params)||void 0===o?void 0:o.room_errors.join(" و ")," آپدیت نشدند")}]),eS({router:eq})?tW():eR.removeQueries({queryKey:["getCalendarData"],exact:!1})}else T.Z.message([{type:P.L.ERROR,title:(null==e?void 0:e.err_msg)||P.i}])}}),tH=(0,k.D)(function(e){return ey({reset:e.reset,residences:e.residences,rooms:e.rooms,dates:e.dates,keyword:e.keyword,res_type:e.res_type,search_type:e.search_type})},{onSuccess:function(e){if((null==e?void 0:e.status)==="success"){var t,n,r,i,s,o;T.Z.message([{type:P.L.SUCCESS,title:"با موفقیت بازگردانی شد."}]),((null==e?void 0:null===(t=e.params)||void 0===t?void 0:null===(n=t.room_errors)||void 0===n?void 0:n.length)||(null==e?void 0:null===(r=e.params)||void 0===r?void 0:null===(i=r.res_errors)||void 0===i?void 0:i.length))&&T.Z.message([{type:P.L.ERROR,title:"اقامتگاه های ".concat(null==e?void 0:null===(s=e.params)||void 0===s?void 0:s.res_errors.join(" و "),",").concat(null==e?void 0:null===(o=e.params)||void 0===o?void 0:o.room_errors.join(" و ")," بازگردانی نشدند")}]),eS({router:eq})?tW():eR.removeQueries({queryKey:["getCalendarData"],exact:!1})}else T.Z.message([{type:P.L.ERROR,title:(null==e?void 0:e.err_msg)||P.i}])}}),tG=(0,A.TA)({initialValues:eZ,validationSchema:L.Ry(ex),onSubmit:(e=(0,a.Z)(function(e){var t,n,r,i,s,o,l,a;return(0,m.__generator)(this,function(u){try{tB.mutate((0,d.Z)({residences:"string"==typeof(null==eq?void 0:null===(t=eq.query)||void 0===t?void 0:t.residenceId)?[Number(null==eq?void 0:null===(n=eq.query)||void 0===n?void 0:n.residenceId)]:(null==eq?void 0:null===(r=eq.query)||void 0===r?void 0:null===(i=r.residenceId)||void 0===i?void 0:i.map(function(e){return Number(e)}))||[],rooms:"string"==typeof(null==eq?void 0:null===(s=eq.query)||void 0===s?void 0:s.roomId)?[Number(null==eq?void 0:null===(o=eq.query)||void 0===o?void 0:o.roomId)]:(null==eq?void 0:null===(l=eq.query)||void 0===l?void 0:null===(a=l.roomId)||void 0===a?void 0:a.map(function(e){return Number(e)}))||[],dates:(0,V.M)(eG,ez),enable:tv,special_price:e["selected-days-price_Update
1Calendar"]||0,discount_amount:e["selected-days-discount_UpdateCalendar"]||"nochange",fast:th},tE&&{keyword:to,res_type:e3,search_type:te,residences:[],rooms:[]})),eC(),tG.resetForm(),tf("nochange"),tm("nochange")}catch(e){T.Z.message([{type:P.L.ERROR,title:(null==e?void 0:e.err_msg)||P.i}])}return[2]})}),function(t){return e.apply(this,arguments)})}),tX=function(){var e,t,n,r,i,s,o,l;tH.mutate((0,d.Z)({reset:!0,residences:"string"==typeof(null==eq?void 0:null===(e=eq.query)||void 0===e?void 0:e.residenceId)?[Number(null==eq?void 0:null===(t=eq.query)||void 0===t?void 0:t.residenceId)]:(null==eq?void 0:null===(n=eq.query)||void 0===n?void 0:null===(r=n.residenceId)||void 0===r?void 0:r.map(function(e){return Number(e)}))||[],rooms:"string"==typeof(null==eq?void 0:null===(i=eq.query)||void 0===i?void 0:i.roomId)?[Number(null==eq?void 0:null===(s=eq.query)||void 0===s?void 0:s.roomId)]:(null==eq?void 0:null===(o=eq.query)||void 0===o?void 0:null===(l=o.roomId)||void 0===l?void 0:l.map(function(e){return Number(e)}))||[],dates:(0,V.M)(eG,ez)},tE&&{keyword:to,res_type:e3,search_type:te,residences:[],rooms:[]})),eC(),tG.resetForm(),tf("nochange"),tm("nochange")},tJ=(0,w.a)(["changeResidencesStatusCheckUserPermission"],function(){return(0,N.B)()},{enabled:!!(0,H.Nh)()}),tQ=tJ.data;tJ.isLoading,tJ.isFetching,tJ.refetch;var t$=(0,w.a)(["getSearchKeywordResidences",e3,te,to,(null==eq?void 0:null===(r=eq.query)||void 0===r?void 0:r.page)||1,null==eQ?void 0:null===(i=eQ[0])||void 0===i?void 0:i[1]],function(){var e,t;return M({keyword:to,res_type:e3,search_type:te,page:(null==eq?void 0:null===(e=eq.query)||void 0===e?void 0:e.page)?Number(null==eq?void 0:null===(t=eq.query)||void 0===t?void 0:t.page):1,page_size:6,start_date:eQ.length?(0,ei._q)(eQ[0][0]):"",end_date:eQ.length&&eQ[0][1]?(0,ei._q)(eQ[0][1]):""})},{staleTime:0,enabled:!!e3&&!!te&&!!to,keepPreviousData:!0,onSuccess:function(){}}),t0=t$.data,t1=t$.isLoading,t2=t$.isFetching;return t$.refetch,(0,p.useEffect)(function(){if(t0&&(null==t0?void 0:t0.status)==="success"&&(tb(function(e){var t;return(0,v.Z)(e).concat((0,v.Z)(null==t0?void 0:null===(t=t0.params)||void 0===t?void 0:t.residences))}),tE)){var e;ep({residencesList:null==t0?void 0:null===(e=t0.params)||void 0===e?void 0:e.residences,router:eq})}},[t0]),(0,p.useEffect)(function(){if(tQ){if((null==tQ?void 0:tQ.status)==="success"){var e;eA(null==tQ?void 0:null===(e=tQ.params)||void 0===e?void 0:e.has_permission),tO(!1)}else tO(!1)}},[tQ]),(0,p.useEffect)(function(){var e,t,n,r,i,s,o,l,a;(null==eq?void 0:null===(e=eq.query)||void 0===e?void 0:e.code)&&(null==eq?void 0:null===(t=eq.query)||void 0===t?void 0:t.searchType)&&(null==eq?void 0:null===(n=eq.query)||void 0===n?void 0:n.resType)&&(ti(null==eq?void 0:null===(i=eq.query)||void 0===i?void 0:i.code),tl(null==eq?void 0:null===(s=eq.query)||void 0===s?void 0:s.code),tt(null==eq?void 0:null===(o=eq.query)||void 0===o?void 0:o.searchType),e7(null==eq?void 0:null===(l=eq.query)||void 0===l?void 0:l.resType),tU(!0)),(null==eq?void 0:null===(r=eq.query)||void 0===r?void 0:r.residenceId)&&tK(null==eq?void 0:null===(a=eq.query)||void 0===a?void 0:a.residenceId)},[null==eq?void 0:null===(s=eq.query)||void 0===s?void 0:s.city,null==eq?void 0:null===(o=eq.query)||void 0===o?void 0:o.searchType,null==eq?void 0:null===(h=eq.query)||void 0===h?void 0:h.resType]),(0,p.useEffect)(function(){!1==tY&&(tL?((0,et.H)(eq,[{paramKey:"page"},{paramKey:"roomId"}]),tK("")):(0,et.H)(eq,[{paramKey:"page"},{paramKey:"residenceId"},{paramKey:"roomId"},{paramKey:"code"},{paramKey:"searchType"},{paramKey:"resType"}])),!0===tY&&tU(!1),tm("nochange"),tf("nochange"),eB([]),eX([])},[e3,to,tY]),(0,p.useEffect)(function(){eS({router:eq})?tw(!1):tw(!0)},[null==eq?void 0:null===(f=eq.query)||void 0===f?void 0:f.residenceId,null==eq?void 0:null===(x=eq.query)||void 0===x?void 0:x.roomId]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ef.Z,{isShowing:tM}),eU&&!tM&&(0,l.jsxs)("div",{className:"CustomContainer pt-[85px] !max-w-[1450px]",children:[(0,l.jsxs)("div",{className:"flex items-center gap-x-12",children:[(0,l.jsx)(I.Z,{wrapperClassname:"!h-[44px]",dropDownItemsWrapperClassName:"z-2",currntValue:e3,onChange:function(e,t,n){e3!==(null==n?void 0:n.value)&&(e7(null==n?void 0:n.value),tb([]))},children:U.map(function(e,t){return(0,l.jsx)(E.Z,{value:null==e?void 0:e.value,title:null==e?void 0:e.name,subText:"",type:null==e?void 0:e.value,wrapperClassname:"
1cursor-pointer",imageWrapperClassname:"!hidden",textWrapperClassname:"flex items-center gap-x-40"},t)})}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(g.n,{onClick:function(){return e5(!0)},name:"searchText",placeholder:"متن مورد نظر را وارد کنید",customValue:tr,customOnChange:function(e){ti(e)},rightIcon:(0,l.jsx)("i",{className:"icon-Search text-24 text-blue-main"}),wrapperClassname:"py-16 !rounded-12 !w-[480px] !h-[44px]",isFullWidth:!1,ref:tF}),tr&&e8&&(0,l.jsx)(C.Z,{handleClick:function(){e5(!1)},exceptionElementsRef:[tF],children:(0,l.jsx)("div",{className:"absolute z-3 mt-4 bg-white w-[480px] rounded-16 border border-gray-E8E8E8 shadow-[0_6px_16px_0px_rgba(8,19,56,0.12)]",children:Object.entries(O).map(function(e){var t=(0,c.Z)(e,2),n=t[0],r=t[1];return(0,l.jsx)("div",{className:"py-10 px-16 cursor-pointer",onClick:function(){(n!==te||to!==tr)&&(tb([]),tt(n),tl(tr)),e5(!1)},children:(0,l.jsx)("span",{children:'جستجوی "'.concat(tr,'" در ').concat(r)})},n)})})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(g.n,{customValue:eQ.length?"".concat((0,ei._q)(eQ[0][0])," > ").concat(eQ[0][1]?(0,ei._q)(eQ[0][1]):""):"",readonly:!0,wrapperClassname:"py-16 !rounded-12 !w-[480px] !h-[44px]",isFullWidth:!1,rightIcon:(0,l.jsx)("i",{className:"icon-Calendar text-24 text-black"}),name:"filteredDates",ref:tT,onClick:function(){return e2(!0)},placeholder:"جستجوی تاریخ"}),(0,l.jsx)(C.Z,{handleClick:function(){return e2(!1)},exceptionElementsRef:[tT],children:e1&&(0,l.jsxs)("div",{className:"bg-white w-[300px] border border-gray-#E8E8E8 p-16 rounded-20 shadow-lg z-3 absolute top-70 right-7",children:[(0,l.jsx)(_.default,{canOnlySelectOneRange:!0,showToday:!0,wrapperClassname:"bg-white",color:"blue",rounded:!0,hasBorderDashed:!1,makeBgConsistentInSelectedRanges:!0,aspectRatio1by1:!0,setDateToWorkWith:eP,dateToWorkWith:eT,onMonthInc:function(){eP(eT.clone().add(1,"jMonth"))},onMonthDec:function(){eP(eT.clone().subtract(1,"jMonth"))},isRangeEnabled:!0,filledDays:[],alreadyReservedDays:[],peakDays:[],fastReserveDays:[],discounted_days:[],special_dates:[],offDays:[],prices:{extra_guests_price:0,monthly_discount:0,peak_price:0,week_price:0,weekend_price:0,weekly_discount:0},showNavigateToPrevMonthBtn:!0,showNavigateToNextMonthBtn:!0,onlyShowCalendarDateNumber:!0,noCoOperation:!1,selectedRanges:eQ,setSelectedRanges:e$,checkForAlreadyReservedDatesOrFilledDatesValidity:!0,canSelectMonth:!0,canSelectDay:!!to}),(0,l.jsx)("div",{className:"flex items-center justify-between mt-16",children:(0,l.jsxs)("div",{className:"flex items-center gap-x-8",children:[(0,l.jsx)(y.z,{color:"grey",onClick:function(){return eI()},rounded:!0,className:"!px-10",children:"پاک کردن فیلتر تاریخ"}),(0,l.jsx)(y.z,{onClick:function(){return e2(!1)},color:"dark-blue",rounded:!0,children:"تایید تاریخ"})]})})]})})]})]}),(0,l.jsxs)("div",{className:"pt-14 grid grid-cols-14 gap-x-24",children:[(0,l.jsx)("div",{className:"col-span-4 h-[540px] overflow-y-scroll overflow-x-hidden ".concat(te?"":"border border-gray-E8E8E8} rounded-20"),children:te?(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsxs)("div",{className:"rounded-12 bg-gray-616E7C p-8 flex items-center justify-between w-full mb-8 sticky top-0 z-1",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(Z.X,{checked:tE,onChange:function(e){tZ(!tE),e.target.checked?ep({residencesList:tx,router:eq}):(0,et.H)(eq,[{paramKey:"residenceId"},{paramKey:"roomId"}])},inputClassnames:"checked:after:!bg-blue-dark"}),(0,l.jsx)("p",{className:"text-white text-16 font-r leading-24",children:"لیست اقامتگاه ها"})]}),(0,l.jsx)("div",{className:"bg-gray-263341 rounded-6 p-4",children:(0,l.jsxs)("span",{className:"text-white text-14 font-r leading-20",children:[(0,l.jsx)("span",{className:"mx-2",children:tE?null==t0?void 0:null===(R=t0.params)||void 0===R?void 0:R.count:((null==eq?void 0:null===(D=eq.query)||void 0===D?void 0:D.residenceId)?Array.isArray(null==eq?void 0:null===(G=eq.query)||void 0===G?void 0:G.residenceId)?null==eq?void 0:null===(X=eq.query)||void 0===X?void 0:null===(J=X.residenceId)||void 0===J?void 0:J.length:1:0)+((null==eq?void 0:null===(Q=eq.query)||void 0===Q?void 0:Q.roomId)?Array.isArray(null==eq?void 0:null===($=eq.query)||void 0===$?void 0:$.roomId)?null==eq?void 0:null===(ee=eq.query)||void 0===ee?void 0:null===(en=ee.roomId)||void 0===en?void 0:en.length:1:0)}),"اقامتگاه"]})})]}),t1?(0,l.jsx)(Y.O,{}):(0,l.jsx)("div",{children:null==tx?void 0:tx.map(function(e,t){return(0,l.jsx)(ed,{setCheckedAllResidences:tZ,display_type:e.dis
1play_type,hostName:e.host.name,hostPhone:e.host.phone,image_url:e.image_url,resAddress:e.address,resId:e.id,resName:e.name,rooms:e.rooms||[],lastUpdateAt:e.last_update_at,lastUpdateBy:e.last_update_by},"".concat(e.id,"-").concat(t))})}),!!(0,eu.f)(Number(null==eq?void 0:null===(er=eq.query)||void 0===er?void 0:er.page)||1,6,null==t0?void 0:null===(es=t0.params)||void 0===es?void 0:es.count)&&(0,l.jsx)("div",{className:"mt-8 mb-20",children:(0,l.jsx)(y.z,{onClick:function(){var e,t;(0,B.F)(eq,["page"],[["page",(null==eq?void 0:null===(e=eq.query)||void 0===e?void 0:e.page)?Number(null==eq?void 0:null===(t=eq.query)||void 0===t?void 0:t.page)+1:2]],void 0,!1)},variant:"outlined",color:"dark-blue",isFullWidth:!0,rounded:!0,isLoading:t2,loadingText:"در حال لود...",loadingTextClassName:"ml-6",children:"مشاهده بیشتر"})})]}):(0,l.jsxs)("div",{className:"w-full h-full flex items-center justify-center flex-col",children:[(0,l.jsx)(q(),{src:"/assets/havent-searched-anything-yet.svg",width:240,height:240,alt:""}),(0,l.jsx)("p",{className:"text-gray-263341 leading-28 text-20 font-r mt-40",children:"هنوز چیزی سرچ نکردی جون دل...!"})]})}),(0,l.jsxs)("div",{className:"col-span-6 p-20 border border-gray-E8E8E8 rounded-20 h-[540px]",children:[(0,l.jsx)(_.default,{wrapperClassname:"bg-white",color:"blue",hasBorderDashed:!0,setDateToWorkWith:eO,dateToWorkWith:eM,onMonthInc:function(){eO(eM.clone().add(1,"jMonth"))},onMonthDec:function(){eO(eM.clone().subtract(1,"jMonth"))},isRangeEnabled:eK,filledDays:tN&&eS({router:eq})?tN.filled_dates.map(function(e){return b()(e,"YYYY-M-D")}):[],alreadyReservedDays:tN&&eS({router:eq})?tN.reserved_dates.map(function(e){return b()(e,"YYYY-M-D")}):[],peakDays:tN&&eS({router:eq})?(0,em.o)(null==tN?void 0:tN.peak_dates):[],fastReserveDays:tN&&eS({router:eq})?tN.fast_days.map(function(e){return b()(e,"YYYY-M-D")}):[],discounted_days:tN&&eS({router:eq})?tN.discounted_days.map(function(e){return(0,u.Z)((0,d.Z)({},e),{date:b()(e.date,"YYYY-M-D")})}):[],special_dates:tN&&eS({router:eq})?tN.special_dates.map(function(e){return[b()(e[0],"YYYY-M-D"),e[1]]}):[],offDays:[],prices:tN&&eS({router:eq})?null==tN?void 0:tN.prices:{extra_guests_price:0,monthly_discount:0,peak_price:0,week_price:0,weekend_price:0,weekly_discount:0},showNavigateToPrevMonthBtn:!0,showNavigateToNextMonthBtn:!0,onlyShowCalendarDateNumber:!eS({router:eq}),noCoOperation:!1,selectedRanges:ez,setSelectedRanges:eB,selectedIndividualDays:eG,setSelectedIndividualDays:eX,canSelectDay:!!to,canSelectMonth:!0}),(0,l.jsxs)("div",{className:"mt-44 flex items-center justify-between",children:[(0,l.jsx)(S.r,{name:"range-select",label:"انتخاب بازه ای",checked:eK,onChange:function(e){eV(e.target.checked)},inputClassnames:"!bg-blue-main"}),(!!eG.length||!!ez.length)&&(0,l.jsx)(y.z,{variant:"contained",color:"grey",rounded:!0,onClick:function(){return eC()},children:"پاک کردن"})]})]},tI.getTime()),(0,l.jsxs)("div",{className:"col-span-4 p-20 border border-gray-E8E8E8 rounded-20 relative h-[540px]",children:[(0,l.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-17 text-black leading-24 font-r mb-14",children:"وضعیت تقویم"}),(0,l.jsxs)("div",{className:"w-full mb-24 flex items-center gap-x-20",children:[(0,l.jsx)(z.Y,{label:"بدون تغییر",name:"calendar_status_nochange",value:"nochange",look:"selected",onChange:function(e){tm(e.target.value)},checked:"nochange"===tv,color:"blue"}),(0,l.jsx)(z.Y,{label:"پر است",name:"full",value:"full",look:"selected",onChange:function(e){tm(e.target.value)},checked:"full"===tv,color:"blue"}),(0,l.jsx)(z.Y,{label:"خالی است",name:"empty",value:"empty",look:"selected",onChange:function(e){tm(e.target.value)},checked:"empty"===tv,color:"blue"})]}),(0,l.jsx)("div",{className:"mt-12",children:(0,l.jsx)(W,{UpdateCalendar_formik:tG})}),(0,l.jsx)("p",{className:"text-17 text-black leading-24 font-r mt-20 mb-14",children:"وضعیت رزرو آنی"}),(0,l.jsxs)("div",{className:"w-full flex items-center gap-x-20",children:[(0,l.jsx)(z.Y,{label:"بدون تغییر",name:"fast_reservation_status_nochange",value:"nochange",look:"selected",onChange:function(e){tf(e.target.value)},checked:"nochange"===th,color:"blue"}),(0,l.jsx)(z.Y,{label:"آنی شود",name:"fast",value:"fast",look:"selected",onChange:function(e){tf(e.target.value)},checked:"fast"===th,color:"blue"}),(0,l.jsx)(z.Y,{label:"غیرآنی شود",name:"slow",value:"slow",look:"selected",onChange:function(e){tf(e.target.value)},checked:"slow"===th,color:"blue"})]}),(0,l.jsx)("div",{className:"flex justify-end mt-24",children:(0,l.jsx)(y.z,{variant:"contained",color:"grey",rounded:!0,isFullWidth:!0,onClick:function(){return tu(!0)},className:"text-15 font-m text-blue-main leading-20 cursor-pointer border-none mb-12 justify-between pr-24",leftIcon:(0,l.jsx)("i",{className:"icon-FlashLeft text-20"}),disabled:tj,children:"تغییر نرخ کلی"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-x-8",children:[(0,l.jsx)(y.z,{disabled:!((0,V.M)(eG,ez).length&&((null==eq?void 0:null===(eo=eq.query)||void 0===eo?void 0:null===(el=eo.roomId)||void 0===el?void 0:el.length)||(null==eq?void 0:null===(ea=eq.query)||void 0===ea?void 0:null===(e_=ea.residenceId)||void 0===e_?void 0:e_.length))),onClick:function(){return tG.handleSubmit()},variant:"contained",color:"dark-blue",rounded:!0,className:"!w-[60%]",children:"ذخیره کردن تغییرات"}),(0,l.jsx)(y.z,{disabled:!((0,V.M)(eG,ez).length&&((null==eq?void 0:null===(ej=eq.query)||void 0===ej?void 0:null===(ew=ej.roomId)||void 0===ew?void 0:e
1w.length)||(null==eq?void 0:null===(ek=eq.query)||void 0===ek?void 0:null===(eN=ek.residenceId)||void 0===eN?void 0:eN.length))),onClick:function(){return tX()},variant:"contained",color:"warning",rounded:!0,className:"!w-[40%]",children:"بازگردانی به قبل"})]})]}),td&&(0,l.jsx)(eg,{showResidenceGeneralPricingModal:td,setShowResidenceGeneralPricingModal:tu})]})]})]}),!eU&&!tM&&(0,l.jsx)(eh.Z,{})]})},ej=!0,ew=function(){return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(e_,{})})}},7078:function(e,t,n){"use strict";function r(e,t,n){return n>e*t}n.d(t,{f:function(){return r}})},45425:function(e,t,n){"use strict";n.d(t,{E:function(){return i}});var r=n(10253);function i(e){return Object.entries(e||{}).map(function(e){var t,n=(0,r.Z)(e,2),i=n[0],s=n[1];return null===(t="string"==typeof s?[s]:s)||void 0===t?void 0:t.map(function(e){return[i,e]})}).flat()}},23654:function(e,t,n){"use strict";n.d(t,{H:function(){return i}});var r=n(45425),i=function(e,t){var n=e.pathname,i=e.query,s=(0,r.E)(i),o=new URLSearchParams(s);t.forEach(function(e){var t=e.paramKey,n=e.paramValue;n?o.delete(t,n):o.delete(t)}),e.push({pathname:n,query:o.toString()},void 0,{shallow:!0})}},45107:function(e,t,n){"use strict";n.d(t,{F:function(){return i}});var r=n(45425);function i(e,t,n,i){var s=!(arguments.length>4)||void 0===arguments[4]||arguments[4],o=e.pathname,l=e.query,a=(0,r.E)(l),d=new URLSearchParams(a);t.forEach(function(e){d.delete(e)}),n.forEach(function(e){d.append(e[0],e[1].toString())}),s?e.push({pathname:i||o,query:d.toString()},void 0,{shallow:!0,scroll:!1}):e.replace({pathname:i||o,query:d.toString()},void 0,{shallow:!0,scroll:!1})}},33089:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});var r=n(68289),i=n.n(r);function s(e){var t=[],n=!0,r=!1,s=void 0;try{for(var o,l=e[Symbol.iterator]();!(n=(o=l.next()).done);n=!0)for(var a=o.value,d=i()(a[0],"YYYY-M-D"),u=i()(a[1],"YYYY-M-D"),c=d.clone();c.isSameOrBefore(u);)t.push(c.clone()),c.add(1,"day")}catch(e){r=!0,s=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw s}}return t}},77087:function(e,t,n){"use strict";function r(e){var t=e.residenceId,n=e.startDate,r=e.endDate,i=e.guestsCount;return"/rentals/".concat(t).concat(n&&r?"?start=".concat(n,"&end=").concat(r):"").concat(i&&n&&r?"&guests_count=".concat(i):i?"?guests_count=".concat(i):"")}n.d(t,{$:function(){return r}})},59223:function(e){e.exports={"line-clamp-1":"line-clamps_line-clamp-1__rWnQV","line-clamp-4":"line-clamps_line-clamp-4__rN6sH","line-clamp-5":"line-clamps_line-clamp-5__0EfXF"}},48228:function(e,t,n){"use strict";n.d(t,{D:function(){return v}});var r=n(67294),i=n(464),s=n(32161),o=n(89886),l=n(30081),a=n(33989);class d extends a.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,o.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(()=>
1{if(this.mutateOptions&&this.hasListeners()){var t,n,r,i,s,o,l,a;e.onSuccess?(null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(i=this.mutateOptions).onSettled)||r.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(s=(o=this.mutateOptions).onError)||s.call(o,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(l=(a=this.mutateOptions).onSettled)||l.call(a,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}e.listeners&&this.listeners.forEach(e=>{e(this.currentResult)})})}}var u=n(85945),c=n(24798);function v(e,t,n){let o=(0,s.lV)(e,t,n),a=(0,u.NL)({context:o.context}),[v]=r.useState(()=>new d(a,o));r.useEffect(()=>{v.setOptions(o)},[v,o]);let p=(0,i.$)(r.useCallback(e=>v.subscribe(l.V.batchCalls(e)),[v]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),h=r.useCallback((e,t)=>{v.mutate(e,t).catch(m)},[v]);if(p.error&&(0,c.L)(v.options.useErrorBoundary,[p.error]))throw p.error;return{...p,mutate:h,mutateAsync:p.mutate}}function m(){}}},function(e){e.O(0,[4885,8289,2175,4231,8855,2700,9573,9774,2888,179],function(){return e(e.s=93518)}),_N_E=e.O()}]);

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.