1import{r as d,S as Y,j as e,H as Z,a as ee}from"./app-BH2aA9za.js";import{I as se}from"./index.es-Tex1s0Wy.js";import{S as te}from"./StaticLayout-Cpl-GV7U.js";import{p as ae}from"./index-CSDRwT7b.js";import{P as re}from"./PackageEnquiry-D_ahd0gR.js";import{P as q}from"./PackageNoResultsForm-BFgCiKPw.js";import{C as ie}from"./CurrencyFormate-C_1N3KOT.js";import"./index-CQs01UJ0.js";import"./index-1korm-XT.js";/* empty css */import"./moment-Bn-IWkFf.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./CustomSelectTag-1Y3n8jJf.js";import"./js.cookie-C2b7Ongr.js";function Ce({auth:s,data:o,keywords:y,finaldetails:x,title:w}){const n=typeof window<"u"?window.location.origin+"/":"/",{setSearch:k}=d.useContext(Y),[v,p]=d.useState(!1),{csrftoken:a}=x,g=1,l=o?.filterNight??[],u=o?.filterPrice??[],m=o?.filterCat??[],P=o?.filterDest??[],Q={holidaysFull:o.rows},[f,S]=d.useState({holidays:o.rows.slice(0,g)}),[j,T]=d.useState([]),[N,F]=d.useState([]),[b,B]=d.useState([]),[C,D]=d.useState([]),[I,$]=d.useState(""),[i,A]=d.useState({}),[W,E]=d.useState(!0),[L,H]=d.useState(!1),R=()=>A({}),O=()=>{T([]),F([]),B([]),D([]),$(""),S({holidays:Q.holidaysFull,filters:new Set})},M=t=>{$(t.target.value)},V=t=>{const{value:r,checked:c}=t.target;T(c?[...j,r]:j.filter(h=>h!==r))},_=t=>{const{value:r,checked:c}=t.target;B(c?[...b,r]:b.filter(h=>h!==r))},U=t=>{const{value:r,checked:c}=t.target;F(c?[...N,r]:N.filter(h=>h!==r))},G=t=>{const{value:r,checked:c}=t.target;D(c?[...C,r]:C.filter(h=>h!==r))},X=()=>
1{let t=o.rows;j.length&&(t=t.filter(r=>j.includes(r.Duration.toString()))),b.length&&(t=t.filter(r=>b.includes(r.PriceRange))),N.length&&(t=t.filter(r=>r.PackageTypeArr.some(c=>N.includes(c)))),C.length&&(t=t.filter(r=>r.reqdestion.split(",").map(h=>h.trim()).some(h=>C.includes(h)))),I&&(t=t.filter(r=>r.packageNamess&&r.packageNamess.toLowerCase().includes(I.toLowerCase()))),S({holidays:t.slice(0,g),filters:new Set})};d.useEffect(()=>(X(),()=>{document.body.classList.contains("modal-open")&&document.body.classList.remove("modal-open")}),[j,N,b,C,I]);const z=t=>(t=t.split(" "),t.map(c=>c.substring(0,1).toUpperCase()+c.substring(1).toLowerCase()).join(" ")),J=()=>{ee.get("/"),k("Holidays")},K=()=>{const t=f.holidays.length+g;t>=o.rows.length&&E(!1),S(r=>({holidays:o.rows.slice(0,t)}))};return e.jsx(e.Fragment,{children:e.jsxs(te,{user:s.user,children:[e.jsx(Z,{title:w??"Holiday Packages"}),o.rows&&o.rows.length>0?e.jsxs("section",{className:"holiday-packages-results general-page",children:[e.jsx("div",{className:"holiday-about-section",children:e.jsx("div",{className:"image-overlay",children:e.jsx("img",{src:`${n}${x.bannerImage}`,alt:"Destination",className:"w-100",style:{aspectRatio:"192/50"},onError:({currentTarget:t})=>{t.onerror=null,t.src=`${n}images/destination_banner.jpg`}})})}),e.jsx("div",{className:"container py-5",children:e.jsx("div",{children:e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col-lg-3",children:[e.jsxs("div",{className:`holiday-package-filter p-3 bg-white rounded stickyFilter ${v?"":"d-below-lg-block"}`,children:[e.jsxs("div",{className:"font-weight-600 mb-3",children:[f.holidays.length," out of ",o.rows.length," Packages Found"]}),e.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-1",children:[e.jsx("small",{className:"font-weight-bold",children:"Filter By"}),e.jsx("button",{className:"bg-white border-0",onClick:O,children:e.jsxs("small",{className:"font-weight-bold",children:[e.jsx("i",{className:"fa fa-refresh"})," Reset"]})})]}),e.jsx("div",{className:"search pb-2 mb-2 border-bottom",children:e.jsx("input",{type:"text",placeholder:"Search by Name",value:I,onChange:M,className:"border rounded py-1 px-2 w-100"})}),e.jsxs("div",{className:"row",children:[l&&l.length>0&&e.jsx("div",{className:"col-lg-12 col-md-6 col-12",children:e.jsxs("div",{className:"block mb-2 pb-2 border-bottom",children:[e.jsx("div",{className:"font-weight-bold mb-1",children:"Number of Nights"}),e.jsx("div",{className:"block-list",children:l.map((t,r)=>e.jsxs("label",{htmlFor:"night"+r,className:"d-flex align-items-center mb-0",children:[e.jsx("input",{type:"checkbox",defaultValue:t,onChange:V,id:"night"+r,checked:j.includes(t.toString())}),e.jsxs("span",{className:"font-weight-normal",children:["Â Â ",t," Nights"]})]},r))})]})}),m&&m.length>0&&e.jsx("div",{className:"col-lg-12 col-md-6 col-12",children:e.jsxs("div",{className:"block pb-2 mb-2 border-bottom",children:[e.jsx("div",{className:"font-weight-bold mb-1",children:"Category"}),e.jsx("div",{className:"block-list",children:m.map((t,r)=>e.jsxs("label",{htmlFor:"category"+r,className:"d-flex align-items-center mb-0",children:[e.jsx("input",{type:"checkbox",onChange:U,defaultValue:t,id:"category"+r,checked:N.includes(t)}),e.jsxs("span",{className:"font-weight-normal",children:["Â Â ",t]})]},r))})]})}),P&&P.length>0&&e.jsx("div",{className:"col-lg-12 col-md-6 col-12",children:e.jsxs("div",{className:"block pb-2 mb-2 border-bottom",children:[e.jsx("div",{className:"font-weight-bold mb-1",children:"Destinations"}),e.jsx("div",{className:"block-list",children:P.map((t,r)=>e.jsxs("label",{htmlFor:"dest"+r,className:"d-flex align-items-center mb-0",children:[e.jsx("input",{type:"checkbox",id:"dest"+r,onChange:G,defaultValue:t,checked:C.includes(t)}),e.jsxs("span",{className:"font-weight-normal",children:["Â Â ",t]})]},r))})]})}),u&&u.length>0&&e.jsx("div",{className:"col-lg-12 col-md-6 col-12",children:e.jsxs("div",{className:"block pb-2",children:[e.jsx("div",{className:"font-weight-bold mb-1",children:"Price"}),e.jsx("div",{className:"block-list",children:u.map((t,r)=>e.jsxs("label",{htmlFor:"price"+r,className:"d-flex align-items-center mb-0",children:[e.jsx("input",{type:"checkbox",onChange:_,defaultValue:t,id:"price"+r,checked:b.includes(t)}),e.jsxs("span",{className:"font-weight-normal",children:["Â Â ",t]})]},r))})]})})]}),e.jsxs("div",{className:"filter-buttons justify-content-end align-items-center mt-3",children:[e.jsx("div",{className:"px-3 py-1 font-weight-bold border rounded",onClick:()=>p(!1),children:"Cancel"}),e.jsx("div",{className:"ml-3 px-3 py-1 font-weight-bold text-white themeBackgroun
1d rounded",children:"Apply"})]})]}),e.jsx("div",{className:`justify-content-end mb-3 ${v?"":"d-below-lg-flex"}`,children:e.jsxs("div",{className:"py-1 px-3 border font-weight-bold rounded",onClick:()=>p(!0),children:[e.jsx("small",{children:e.jsx("i",{className:"fa fa-filter"})})," Filter"]})})]}),e.jsxs("div",{className:"col-lg-9",children:[x.description_top.length>0&&x.description_top[0]&&e.jsxs("div",{className:"content mb-3",children:[e.jsxs("h3",{className:"font-weight-bold",children:["About ",z(y)]}),e.jsx("div",{className:`text mb-2 ${L?"":"limit-three-line"}`,children:ae(x.description_top[0])}),e.jsx("div",{className:"cursorPointer font-weight-bold",children:L?e.jsxs("div",{onClick:()=>H(!1),children:["Read Less  ",e.jsx("i",{className:"fa fa-angle-up"})]}):e.jsxs("div",{onClick:()=>H(!0),children:["Read More  ",e.jsx("i",{className:"fa fa-angle-down"})]})})]}),f.holidays&&f.holidays.length>0?e.jsx("div",{className:"holiday-package-list d-grid mb-4",style:{gap:"30px"},children:e.jsx(se,{dataLength:f.holidays.length,next:K,hasMore:W,loader:e.jsx("p",{children:"Loading..."}),children:f.holidays.map((t,r)=>e.jsx(ne,{holiday:t,handleSetActivePackage:c=>A(c)},r))})}):e.jsxs("div",{className:"no-results",children:[e.jsx("div",{className:"top-grid text-center",children:e.jsx("div",{className:"text h4 mb-3",children:"No Results Found..."})}),e.jsx(q,{csrfToken:a})]})]})]})})})]}):e.jsx("div",{className:"py-5 bg-white no-results",children:e.jsxs("div",{className:"container",children:[e.jsxs("div",{className:"top-grid d-grid align-items-center",children:[e.jsx("div",{className:"image",children:e.jsx("img",{src:`${n}images/no-result.png`,alt:"No Results",className:"w-100"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text h4 mb-3",children:"Sorry, we couldn't find any results for your destination."}),e.jsxs("div",{className:"text h5 mb-3",children:[e.jsx("span",{className:"cursorPointer themeFontColor",onClick:J,children:"Click here"})," to explore alternative destinations."]}),e.jsx("div",{className:"text h5 mb-4",children:"Or send us your query."})]})]}),e.jsx(q,{csrfToken:a})]})}),i?.gtxId?e.jsx("div",{className:"modal checkrate-modal",id:"myModa1packageRateEnquiry",tabIndex:-1,role:"dialog","aria-labelledby":"exampleModalLabel","aria-hidden":"true",onClick:t=>{t.target.classList.contains("modal")&&R()},children:e.jsx("div",{className:"modal-dialog",role:"document",children:e.jsx("div",{className:"modal-content",children:e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col-lg-6 pr-lg-0 holiday-modal-image",children:e.jsx("img",{id:"IsPkgImagesChange",alt:"popup",className:"popup-form-img w-100 h-100",src:`${n}public/images/offer1.jpg`})}),e.jsx("div",{className:"col-lg-6 pl-lg-0",children:e.jsxs("div",{className:"form-info",children:[e.jsx("div",{className:"px-2 d-flex justify-content-end",children:e.jsx("button",{type:"button",className:"close float-none","data-dismiss":"modal","aria-label":"Close",onClick:R,children:e.jsx("span",{"aria-hidden":"true",children:"Ã"})})}),e.jsx("div",{className:"modal-body",children:e.jsx(re,{isListingPopUp:!0,departureCity:{id:i?.departureCityId,name:i?.departureCityName},priceList:{quadPrice:i?.CostQuad,quintPrice:i?.CostQuint,hexaPrice:i?.CostHexa,child5to11NoBedPrice:i?.CWOB,child5to11WithBedPrice:i?.CEB,child2to4NoBedPrice:i?.CWOB2T4,child2to4WithBedPrice:i?.CWB2T4,infantPrice:i?.CostInfant},CSRFToken:a,packageName:i?.packageName,packageID:i?.pkgSysId,categoryDateArray:i?.categoryDateArray,isFixedInventory:i?.isFixedInventory,isCf:i?.isCf,isSharingPrice:i?.isSharingPrice,packagePrice:{currency:i?.currency},gtxId:i?.gtxId,tpId:i?.tpId,packageTypeId:i?.packageTypeId,packageTourTypeID:i?.packageTourTypeID,hotelCategoryId:i?.hotelCategoryId,mealPlanID:i?.mealPlanID,destination:i?.destination,destinationId:i?.destinationId,isQuadPrice:i?.isQuadPrice,totalHotels:i?.totalHotels})})]})})]})})})}):""]})})}const ne=({holiday:s,handleSetActivePackage:o})=>{const y=typeof window<"u"?window.location.origin+"/":"/",x={Budget:1,Standard:2,Deluxe:3,Luxury:4,Premium:5},w={category:s?.defaultStandard,departureCityId:s?.fixedInventory[0]?.CityId??0,departureCityName:s?.fixedInventory[0]?.CityName??"",price:"",currency:"",CostQuad:s?.CostQuad,CostQuint:s?.CostQuint,CostHexa:s?.CostHexa,CWOB:s?.CWOB,CEB:s?.CEB,CWOB2T4:s?.CWOB2T4,CWB2T4:s?.CWB2T4,CostInfant:s?.CostInfent,packageName:s?.packageNamess,pkgSysId:s?.PkgSysId,categoryDateArray:s?.CategoryDateArray,isFixedInventory:s?.IsfixedInventory,isCf:s?.IsCF,isSharingPrice:s?.IsSharingPrice,gtxId:s?.GTXPkgId,tpId:s?.TPId,packageTypeId:s?.PackageType,packageTourTypeID:s?.defaultTourType,hotelCategoryId:x[s?.defaultStandard]??1,mealPlanID:s?.mp,destination:s?.reqdestion,destinationId:s?.reqdestionid,isQuadPrice:s?.QuadPrice,totalHotels:s?.TotalHotels}
1,[n,k]=d.useState(w);d.useEffect(()=>{const a=s.PriceArray.reduce((l,u)=>u.Price<l.Price?u:l,s.PriceArray[0]),g=s?.fixedInventory.findIndex(l=>l.CityId==a?.CityId);k(l=>({...l,category:a?.Category??"",departureCityId:a?.CityId??"",departureCityName:s?.fixedInventory[g]?.CityName??"",currency:a?.CurrencySymbol??"",price:a?.Price??"",hotelCategoryId:x[a?.Category]??1}))},[]);const v=(a,g)=>{let l={},u=0;s?.fixedInventory&&s?.fixedInventory.length>0?(l=s?.PriceArray.find(m=>m.Category==a&&m.CityId==g),u=s?.fixedInventory.findIndex(m=>m.CityId==g)):l=s?.PriceArray.find(m=>m.Category==a),k(m=>({...m,category:a??"",departureCityId:g??"",departureCityName:s?.fixedInventory[u]?.CityName??"",currency:l?.CurrencySymbol??"",price:l?.Price??"",hotelCategoryId:x[a]??1}))},p=a=>(a=a.replace(/\s\s+/g," ").toLowerCase(),a=a.replace(/#|(|)|,|\/|_| +/g,""),a=a.split(", ").join("-"),a=a.split(",").join("-"),a=a.split(" ").join("-"),a.replace("--","-"));return e.jsxs("div",{className:"holiday-package-card p-3 bg-white rounded mx-1 mb-2",children:[e.jsx("div",{className:"image",children:e.jsx("img",{src:s.ImgThumbnail,alt:s.packageNamess,className:"w-100 rounded",style:{aspectRatio:"4/3"},onError:({currentTarget:a})=>{a.onerror=null,a.src=`${y}images/notfound.jpg`}})}),e.jsxs("div",{className:"details",children:[e.jsxs("div",{className:"top-block d-flex flex-sm-row flex-column gap-20px mb-3 justify-content-between",children:[e.jsxs("div",{className:"flex-fill small",children:[e.jsx("a",{href:`/detail/${p(s.reqdestion)}/${p(s.package.Name)}-${s.PkgSysId}-${s.defaultCategoryId}-${s.GTXPkgId}-${s.defaultTourType}-${s.mp}.html`,className:"text-dark h5 font-weight-bold d-block mb-2",children:s.packageNamess}),e.jsxs("div",{className:"font-weight-600 mb-1",children:[parseInt(s.Duration)," Nights, ",s.Duration+1," Days"]}),s.reqdestion&&e.jsxs("div",{className:"mb-1",children:[e.jsx("strong",{children:"Destinations -"})," ",s.reqdestion]}),s.inclusionsArr.length>0&&e.jsxs("div",{className:"mb-1",children:[e.jsx("strong",{children:"Included - "}),s.inclusionsArr.map((a,g)=>e.jsxs(e.Fragment,{children:[e.jsx("img",{title:a,src:`${y}images/inclusion/${p(a)}.png`,alt:p(a),width:"17",height:"17"},g),"Â Â "]}))]}),s.PackageTypeArr[0]!=""&&s.PackageTypeArr.length>0&&e.jsxs("div",{children:[e.jsx("strong",{children:"Themes -"})," ",s.PackageTypeArr.join(", ")]})]}),e.jsxs("div",{children:[s.fixedInventory&&s.fixedInventory.length>0&&e.jsxs("div",{className:"category mb-2 d-flex border p-1 rounded",children:[e.jsx("div",{className:"small font-weight-600 pr-1 border-right",children:"Departure"}),e.jsx("select",{className:"p-0 border-0 small flex-fill text-muted",name:"departureCityId",value:n.departureCityId,onChange:a=>v(n.category,a.target.value),children:s.fixedInventory.map(a=>e.jsx("option",{value:a.CityId,children:a.CityName},a.CityId))})]}),e.jsxs("div",{className:"category mb-2 d-flex border p-1 rounded",children:[e.jsx("div",{className:"small font-weight-600 pr-1 border-right",children:"Category"}),e.jsx("select",{className:"p-0 border-0 small flex-fill text-muted",name:"category",value:n.category,onChange:a=>v(a.target.value,n.departureCityId),children:s.hotelTypeArr.map(a=>e.jsx("option",{value:a.type,children:a.title},a.type))})]}),e.jsx("h6",{className:"text-md-right font-weight-bold",children:"Starting From"}),n.currency&&n.price&&e.jsx("h4",{className:"text-md-right font-weight-bold fs-22px themeFontColor",children:e.jsx(ie,{currency:n.currency,price:n.price})}),!n.price&&e.jsx("div",{children:e.jsx("h4",{className:"text-md-right font-weight-bold fs-22px themeFontColor",children:"Price On Request"})}),e.jsxs("div",{className:"text-md-right text-muted",children:[s.Sharing.persharing==="CostHexa"&&"Hexa Sharing",s.Sharing.persharing==="CostQuint"&&" Quint Sharing",s.Sharing.persharing==="CostQuad"&&"Quad Sharing",s.Sharing.persharing==="PricePerPerson"&&"Per Person"]})]})]}),e.jsxs("div",{className:"d-flex justify-content-end align-items-center btnBlock gap-20px",children:[e.jsx("a",{className:"border-theme rounded py-2 px-3 view-detail-btn",href:`/detail/${p(s.reqdestion)}/${p(s.package.Name)}
1-${s.PkgSysId}-${s.defaultCategoryId}-${s.GTXPkgId}-${s.defaultTourType}-${s.mp}.html`,children:e.jsx("small",{className:"font-weight-bold",children:"View Details"})}),e.jsx("div",{className:"themeBackground border-theme rounded py-2 px-3 cursorPointer","data-target":"#myModa1packageRateEnquiry","data-toggle":"modal",onClick:()=>o(n),children:e.jsx("small",{className:"font-weight-bold text-white",children:s.BtnText?s.BtnText:"Book Now"})})]})]})]})};export{Ce as default};
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.