PageSourceSearch

https://hotelzify.com/static/js/3674.4bcbb615.chunk.js

js hotelzify.com collected 2026-10-01 15:35:32 UTC 16,469 bytes, 3 lines download raw bytes

1/*! For license information please see 3674.4bcbb615.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunklanding_page=self.webpackChunklanding_page||[]).push([[3674],{3674:(e,i,l)=>{l.r(i),l.d(i,{default:()=>j,filterValidReviewImages:()=>y});var o=l(9379),t=l(5043),n=l(1577),s=l(446),r=l.n(s),d=l(8092),a=l.n(d),v=l(9449),u=(l(9555),l(4117)),c=l(5346),m=l(7368),g=l(579);const h="https://ik.imagekit.io/hotelzifyprod/assets/images/popupprevArrow.svg",p="https://ik.imagekit.io/hotelzifyprod/assets/images/popupnextArrow.svg",x=["#4F46E5","#0284C7","#059669","#D97706","#7C3AED","#DB2777","#2563EB","#0D9488"],w=e=>{if(!e)return x[0];let i=0;for(let l=0;l<e.length;l++)i=e.charCodeAt(l)+((i<<5)-i);return x[Math.abs(i)%x.length]},f=e=>{if(!e)return"A";const i=e.trim();if(!i)return"A";const l=i.split(/\s+/);return l.length>=2?(l[0][0]+l[1][0]).toUpperCase():l[0][0].toUpperCase()},y=e=>Array.isArray(e)?e.filter(e=>(null===e||void 0===e?void 0:e.image_url)&&!e.image_url.includes("geougc-cs")):[],_=e=>{let{author:i,size:l=40,className:o=""}=e;const[n,s]=(0,t.useState)(!1),r=null===i||void 0===i?void 0:i.image;return!r||r.includes("geougc-cs")||r.includes("googleusercontent.com/geougc-cs")||n?(0,g.jsx)("div",{className:"authorAvatarFallback ".concat(o),style:{width:"".concat(l,"px"),height:"".concat(l,"px"),minWidth:"".concat(l,"px"),minHeight:"".concat(l,"px"),borderRadius:"50%",backgroundColor:w(null===i||void 0===i?void 0:i.name),color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"600",fontSize:l>40?"16px":"14px",userSelect:"none",flexShrink:0},"aria-label":(null===i||void 0===i?void 0:i.name)||"Author",children:f(null===i||void 0===i?void 0:i.name)}):(0,g.jsx)("img",{src:r,loading:"lazy",referrerPolicy:"no-referrer",alt:(null===i||void 0===i?void 0:i.name)||"img",className:o,style:{width:"".concat(l,"px"),height:"".concat(l,"px"),borderRadius:"50%",objectFit:"cover",flexShrink:0},onError:()=>s(!0)})},j=e=>{var i,l,s,d,x,w,f,j,N,b,k,A,C;let{rview:S,newReviews:I,index:T,timeStamp:D}=e;r().extend(a());const[E,z]=(0,t.useState)(!1),[B,R]=(0,t.useState)(0),{t:G}=((0,t.useRef)(null),(0,u.Bd)()),[P,L]=(0,t.useState)(""),[M,F]=(0,t.useState)(!1),[O,H]=(0,t.useState)(0),V=(0,t.useRef)(null),X=()=>{var e,i,l;const o=!M;(0,c.fireGtmEvent)(o?"review_image_gallery_opened":"review_image_gallery_closed",{author_name:(null===S||void 0===S||null===(e=S.author)||void 0===e?void 0:e.name)||"Anonymous",source:null===S||void 0===S||null===(i=S.source)||void 0===i?void 0:i.title,image_count:(null===S||void 0===S||null===(l=S.images)||void 0===l?void 0:l.length)||0}),F(o)},q=()=>{var e;const i=O===S.images.length-1?0:O+1;(0,c.fireGtmEvent)("review_image_navigation",{direction:"next",from_index:O,to_index:i,total_images:(null===S||void 0===S||null===(e=S.images)||void 0===e?void 0:e.length)||0}),H(i),V.current.moveTo(i)},U=()=>{var e;const i=0===O?S.images.length-1:O-1;(0,c.fireGtmEvent)("review_image_navigation",{direction:"prev",from_index:O,to_index:i,total_images:(null===S||void 0===S||null===(e=S.images)||void 0===e?void 0:e.length)||0}),H(i),V.current.moveTo(i)},W=(e,i)=>{let l,o,t,n;return 10===i?(l=e/2,o=Math.floor(l),t=l%1>=.5?1:0,n=Math.max(5-(o+t),0)||0):(o=Math.floor(e),t=e%1>=.5?1:0,n=Math.max(5-(o+t),0)||0),(0,g.jsxs)("div",{className:"star-rating",style:{display:"flex",alignItems:"center",gap:"2px"},children:[[...Array(o)].map((e,i)=>(0,g.jsx)(v.A,{size:19,fill:"#B8860B",color:"#B8860B"},i)),1===t&&(0,g.jsxs)("div",{style:{position:"relative",width:"19px",height:"19px"},children:[(0,g.jsx)(v.A,{size:19,color:"#B8860B",fill:"none",style:{position:"absolute",top:0,left:0}}),(0,g.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"50%",height:"100%",overflow:"hidden"},children:(0,g.jsx)(v.A,{size:19,fill:"#B8860B",color:"#B8860B"})})]}),[...Array(n)].map((e,i)=>(0,g.jsx)(v.A,{size:19,color:"#B8860B",fill:"none"},i+o+1))]})},J=e=>{const i=y(e);return i&&0!==i.length?(0,g.jsxs)("div",{className:"imagesContainerInPopupDiv",children:[(0,g.jsx)("b",{children:(0,g.jsxs)("p",{children:["Photos Shared ","(".concat(i.length,")")]})}),(0,g.jsx)("div",{className:1===i.length?"imagesDivwithOneImage":"imagesDiv",children:i.map((e,l)=>{const o=null===e||void 0===e?void 0:e.image_url,t=null!==o&&void 0!==o&&o.match(/w\d+-h\d+/)?o.replace(/w\d+-h\d+/,"w500-h500"):o;return(0,g.jsx)("img",{id:1===i.length?"toSetSingleImageinPopupDiv":"",style:{objectFit:"cover"},src:t||o,alt:"Img",onError:e=>{e.target.style.display="none";const i=e.target.closest(".imagesContainerInPopupDiv"),l=null===i||void 0===i?void 0:i.querySelectorAll("img"),o=Array.from(l||[]).every(e=>"none"===e.style.display);o&&i&&(i.style.display="none")}},"image-".concat(l))})})]}):null},K=e=>"Google"===(null===e||void 0===e?void 0:e.title)?"https://ik.imagekit.io/ArjunHotelzify/Google%20Logo.png?updatedAt=1734425867729":"Tripadvisor"===(null===e||void 0===e?void 0:e.title)?"https://ik.imagekit.io/ArjunHotelzify/Tripadvisor.png?updatedAt=1734426637871":"Trip.com"===(null===e||void 0===e?void 0:e.title)?"https://ik.imagekit.io/ArjunHotelzify/Trip.c
2om?updatedAt=1734426520344":null===e||void 0===e?void 0:e.image;(0,t.useEffect)(()=>(E||M?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[E,M]);const{width:Q}=(0,m.A)(),[Y,Z]=(0,t.useState)(null),[$,ee]=(0,t.useState)(null),[ie,le]=(0,t.useState)(!1);return(0,g.jsxs)("div",{className:"review",id:"review",children:[(0,g.jsxs)("div",{className:"reviewBody",onClick:()=>{var e;if((null===S||void 0===S||null===(e=S.review_text)||void 0===e?void 0:e.length)>122){var i,l,o,t;const e=null===I||void 0===I?void 0:I.findIndex(e=>e===S);(0,c.fireGtmEvent)("review_expanded",{author_name:(null===S||void 0===S||null===(i=S.author)||void 0===i?void 0:i.name)||"Anonymous",source:null===S||void 0===S||null===(l=S.source)||void 0===l?void 0:l.title,rating:null===S||void 0===S||null===(o=S.rating)||void 0===o?void 0:o.value,review_index:e,review_text_length:null===S||void 0===S||null===(t=S.review_text)||void 0===t?void 0:t.length}),R(e),z(!0)}},children:[(0,g.jsxs)("div",{className:"smallViewRatingAndImage",children:[(0,g.jsxs)("div",{className:"leftDivinsidebottomdiv",children:[(0,g.jsx)(_,{author:null===S||void 0===S?void 0:S.author,size:40}),(0,g.jsx)("p",{children:(0,g.jsx)("b",{children:(null===S||void 0===S||null===(i=S.author)||void 0===i?void 0:i.name)||"Anonymous"})})]}),(0,g.jsx)("img",{style:"Google"===(null===S||void 0===S||null===(l=S.source)||void 0===l?void 0:l.title)?{width:"34px",height:"34px"}:"Tripadvisor"===(null===S||void 0===S||null===(s=S.source)||void 0===s?void 0:s.title)?{width:"45px",height:"45px"}:"Trip.com"===(null===S||void 0===S||null===(d=S.source)||void 0===d?void 0:d.title)?{width:"34px",height:"34px"}:{},loading:"lazy",src:K(null===S||void 0===S?void 0:S.source),alt:null===S||void 0===S||null===(x=S.source)||void 0===x?void 0:x.title,onError:e=>{e.target.style.display="none"}})]}),E||(null===S||void 0===S||null===(w=S.review_text)||void 0===w?void 0:w.length)<122?(0,g.jsxs)("div",{className:"textOnSmallReviewDiv",children:[(0,g.jsxs)("p",{children:[null===S||void 0===S||null===(f=S.review_text)||void 0===f?void 0:f.slice(0,122),"..."]}),(E||(null===S||void 0===S||null===(j=S.review_text)||void 0===j?void 0:j.length)>122)&&(0,g.jsx)("p",{style:{color:"#0078d4",cursor:"pointer",width:"fit-content",marginTop:"5px"},onClick:()=>z(!0)})]}):(0,g.jsx)("div",{className:"textOnSmallReviewDiv",children:null!==(null===S||void 0===S?void 0:S.review_text)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("p",{children:[null===S||void 0===S||null===(N=S.review_text)||void 0===N?void 0:N.slice(0,122),"..."]}),(0,g.jsx)("p",{style:{color:"#0078d4",cursor:"pointer",width:"fit-content",marginTop:"5px"},onClick:()=>{var e;if((null===S||void 0===S||null===(e=S.review_text)||void 0===e?void 0:e.length)>122){var i,l,o;const e=null===I||void 0===I?void 0:I.findIndex(e=>e===S);(0,c.fireGtmEvent)("review_read_more_clicked",{author_name:(null===S||void 0===S||null===(i=S.author)||void 0===i?void 0:i.name)||"Anonymous",source:null===S||void 0===S||null===(l=S.source)||void 0===l?void 0:l.title,rating:null===S||void 0===S||null===(o=S.rating)||void 0===o?void 0:o.value,review_index:e}),R(e),z(!0)}},children:G("Read More")})]})}),(0,g.jsxs)("div",{className:"bottomDiv",children:[(0,g.jsxs)("div",{style:{marginTop:"15px"},children:[void 0!==(null===S||void 0===S||null===(b=S.rating)||void 0===b?void 0:b.value)&&W(null===S||void 0===S||null===(k=S.rating)||void 0===k?void 0:k.value,null===S||void 0===S||null===(A=S.rating)||void 0===A?void 0:A.rating_max),(0,g.jsxs)("p",{id:"reviewTimeStampOuter",children:[D," ",G("on ".concat(null===S||void 0===S||null===(C=S.source)||void 0===C?void 0:C.title))]})]}),(()=>{const e=y(null===S||void 0===S?void 0:S.images);return e&&0!==e.length?(0,g.jsxs)("div",{className:"imageCountDiv",children:[(0,g.jsx)("div",{className:"imageContainer",children:e.slice(0,2).map((i,l)=>{var o;return(0,g.jsx)("img",{onClick:e=>{e.stopPropagation(),X()},style:{cursor:"pointer"},src:null===i||void 0===i?void 0:i.image_url,alt:"Review image ".concat(l+1," from ").concat((null===S||void 0===S||null===(o=S.author)||void 0===o?void 0:o.name)||"guest"),className:"image ".concat(1===l&&e.length>
21?"secondImage":""),onError:e=>{e.target.style.display="none";const i=e.target.closest(".imageCountDiv"),l=null===i||void 0===i?void 0:i.querySelectorAll("img"),o=Array.from(l||[]).every(e=>"none"===e.style.display);o&&i&&(i.style.display="none")}},l)})}),e.length>2&&(0,g.jsx)("div",{onClick:e=>{e.stopPropagation(),X()},style:{cursor:"pointer",marginLeft:e.length<=19?"-25px":"-30px"},className:"imageCount",children:"+".concat(e.length-2)})]}):null})()]})]}),M&&(oe=y(null===S||void 0===S?void 0:S.images),(0,g.jsxs)("div",{className:"containerForImagesCarousal",children:[(0,g.jsx)("img",{className:"goPrevforImageCarousal",onClick:U,src:h,alt:"Previous image"}),(0,g.jsx)(n.FN,{ref:V,showArrows:!1,showIndicators:!1,showStatus:!1,showThumbs:!1,selectedItem:O,onChange:e=>H(e),transitionTime:10,className:"ImagesCarousal",children:(null===oe||void 0===oe?void 0:oe.length)>0&&oe.map(e=>{var i;const l=null===e||void 0===e?void 0:e.image_url,o=null!==l&&void 0!==l&&l.match(/w\d+-h\d+/)?l.replace(/w\d+-h\d+/,"w600-h600"):l;return(0,g.jsxs)("div",{className:"Imagesclickedonbottomdivwhenpopupisnotopen",children:[(0,g.jsx)("button",{type:"button",className:"closeSign","aria-label":G("close"),style:{color:"white"},onClick:X,children:"\xd7"}),(0,g.jsx)("img",{src:o||l,alt:"Review image from ".concat((null===S||void 0===S||null===(i=S.author)||void 0===i?void 0:i.name)||"guest"),onError:e=>{e.target.style.display="none";const i=e.target.closest(".Imagesclickedonbottomdivwhenpopupisnotopen");i&&(i.style.display="none")}}),";"]})})}),(0,g.jsx)("img",{className:"goNextforImageCarousal",onClick:q,src:p,alt:"Next image"})]})),E&&(0,g.jsxs)("div",{style:{width:"100%",height:"100%",zIndex:9e3,backgroundColor:"rgba(0, 0, 0, 0.5)",position:"fixed",top:"0",left:"0"},className:"topDiv",children:[(0,g.jsx)("button",{type:"button",className:"closeSignforpopupsiv","aria-label":G("close"),style:{color:"white",cursor:"pointer"},onClick:()=>{(0,c.fireGtmEvent)("review_popup_closed",{current_review_index:B,total_reviews:(null===I||void 0===I?void 0:I.length)||0}),z(!1)},children:"\xd7"})," ",(0,g.jsxs)("div",{className:"slideContainer",children:[(0,g.jsx)("div",{className:"slider",style:{transform:"translateX(-".concat(100*B,"%)"),transition:ie?"none":Q<600?"transform 0.3s ease-in-out":Q>=600?"transform 0.0s ease-in-out":"none"},onTouchStart:e=>{Q>600||(Z(e.touches[0].clientX),le(!0))},onTouchMove:e=>{!ie||Q>600||ee(e.touches[0].clientX)},onTouchEnd:()=>{if(!Y||!$||Q>600)return void le(!1);const e=Y-$;e>50&&B<I.length-1?((0,c.fireGtmEvent)("review_swipe_navigation",{direction:"left",from_index:B,to_index:B+1,total_reviews:(null===I||void 0===I?void 0:I.length)||0}),R(B+1)):e<-50&&B>0&&((0,c.fireGtmEvent)("review_swipe_navigation",{direction:"right",from_index:B,to_index:B-1,total_reviews:(null===I||void 0===I?void 0:I.length)||0}),R(B-1)),le(!1),Z(null),ee(null)},children:null===I||void 0===I?void 0:I.map((e,i)=>{var l,t,n,s,d,a,v,u,c,m,h,p,x,w,f,y;const j=new Date(2024,0,1),N=new Date(j.getTime()+198e5).toISOString(),b=new Date(e.timestamp)<j?r()(N).fromNow():r()(e.timestamp).fromNow();return(0,g.jsxs)("div",{className:"dummyImagesSlide",children:[(0,g.jsxs)("div",{className:"headerLeft",children:[(0,g.jsx)(_,{author:null===e||void 0===e?void 0:e.author,size:47}),(0,g.jsx)("p",{children:(0,g.jsx)("b",{children:(null===e||void 0===e||null===(l=e.author)||void 0===l?void 0:l.name)||"Anonymous"})})]}),(0,g.jsxs)("div",{className:"RatingDiv",children:[(0,g.jsxs)("div",{className:"leftdivInsideRatingDiv",children:[void 0!==(null===e||void 0===e||null===(t=e.rating)||void 0===t?void 0:t.value)&&W(null===e||void 0===e||null===(n=e.rating)||void 0===n?void 0:n.value,null===e||void 0===e||null===(s=e.rating)||void 0===s?void 0:s.rating_max),(0,g.jsxs)("p",{id:"reviewTimeStampInner",children:[b," ",G("on ".concat(null===e||void 0===e||null===(d=e.source)||void 0===d?void 0:d.title))]})]}),(0,g.jsxs)("div",{className:"RightdivInsideRatingDiv",children:[(0,g.jsx)("img",{style:(0,o.A)({backgroundColor:"white"},"Google"===(null===e||void 0===e||null===(a=e.source)||void 0===a?void 0:a.title)?{width:"31px",height:"32px"}:"Tripadvisor"===(null===e||void 0===e||null===(v=e.source)||void 0===v?void 0:v.title)?{width:"40px",height:"40px"}:"Trip.com"===(null===e||void 0===e||null===(u=e.source)||void 0===u?void 0:u.title)?{width:"34px",height:"34px"}:{}),src:K(null===e||void 0===e?void 0:e.source),alt:(null===e||void 0===e||null===(c=e.source)||void 0===c?void 0:c.title)||"review source",onError:e=>{e.target.style.display="none"}}),(0,g.jsx)("p",{className:"sourceTitleinPopupdiv",style:(0,o.A)({backgroundColor:"white"},"Google"===(null===e||void 0===e||null===(m=e.source)||void 0===m?void 0:m.title)||"Tripadvisor"===(null===e||void 0===e||null===(h=e.source)||void 0===h?void 0:h.title)||"Trip.com"===(null===e||void 0===e||null===(p=e.source)||void 0===p?void 0:p.title)?{fontSize:Q<=600?"15px":"19px"}:"BedroomVillas.co.uk"===(null===e||void 0===e||null===(x=e.source)||void 0===x?void 0:x.title)?{fontSize:Q<=600?"12px":"17px"}:{fontSize:Q<=600?"14px":"17px"}),children:null===e||void 0===e||null===(w=e.source)||void 0===w?void 0:w.title})]})]}),(0,g.jsxs)("div",{className:"textandImagesdivinpopupdiv",children:[(null===e||void 0===e||null===(f=e.review_text)||void 0===f?void 0:f.length)>0?(0,g.jsx)("p",{children:null===e||void 0===e?void 0:e.review_text}):null,(0,g.jsx)("div",{className:"imagesInPopupDiv",children:(null===e||void 0===e||null===(y=e.images)||void 0===y?void 0:y.length)>0?J(null===e||void 0===e?void 0:e.images):null})]})]},i)})}),(0,g.jsx)("button",{className:"prev reviewcompbuttons",onClick:()=>{const e=0===B?I.length-1:B-1;(0,c.fireGtmEvent)("review_carousel_navigation",{direction:"prev",from_index:B,to_index:e,total_reviews:(null===I||void 0===I?void 0:I.length)||0}),R(e)},children:(0,g.jsx)("img",{src:h,alt:"Prev"})}),(0,g.jsx)("button",{className:"next reviewcompbuttons",onClick:()=>{const e=B===I.length-1?0:B+1;(0,c.fireGtmEvent)("review_carousel_navigation",{direction:"next",from_index:B,to_index:e,total_reviews:(null===I||void 0===I?void 0:I.length)||0}),R(e)},children:(0,g.jsx)("img",{src:p,alt:"Next"})})]}),(0,g.jsx)("div",{className:"dotsContainer",style:{display:"flex",justifyContent:"center",gap:"1vw"},children:I.map((e,i)=>(0,g.jsx)("span",{className:"dot ".concat(i===B?"active-dot":""),style:{width:"10px",height:"10px",borderRadius:"50%"},onClick:()=>{(0,c.fireGtmEvent)("review_dot_navigation",{from_index:B,to_index:i,total_reviews:(null===I||void 0===I?void 0:I.length)||0}),R(i)}},T))})]})]});var oe}},9449:(e,i,l)=>{l.d(i,{A:()=>o});const o=(0,l(1114).A)("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])}}]);
3//# sourceMappingURL=3674.4bcbb615.chunk.js.map

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.