PageSourceSearch

https://www.cestee.com/vue3-assets/TourFilters-BcCDKUw8.js

js cestee.com collected 2026-10-02 21:01:58 UTC 16,541 bytes, 1 lines download raw bytes

1import se from"./SvgSprite-Bir-19eu.js";import Q from"./Checkbox-BmH2j0Zc.js";import{u as O}from"./useTranslations-B1evJrSW.js";import{u as E}from"./useLocaleFormatters-DvmRmaNo.js";import{u as F,S as J,a as X,H as he,B as P,b as _e,c as ve,D as te}from"./main-CAI2CH26.js";import{g as x,S as K,r as re,T as V,v as Z,n as d,G as w,F as b,t as _,U as t,H as R,I as U,p as C,w as $,s as I,q as f,W as L,P as y,X as N,o as ae,Y as ge,j as be,x as le}from"./vendor-BK_1A8BV.js";import{_ as H}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as ie}from"./SearchDatesValue-DOQawOXB.js";import we from"./BtnDropDown-Df_06BbR.js";import{_ as Se}from"./SearchDropDown.vue_vue_type_script_setup_true_lang-D8XJxJkL.js";import De from"./Btn-q7wmHMxI.js";import{u as ee}from"./airports-BnZxoKGl.js";import{S as oe}from"./constants-D0RvOtOb.js";import{u as Ve}from"./destinations-CyhHiLfX.js";import{u as $e,a as ye}from"./useTourSearchWatchers-BLivUDUy.js";import{_ as Me}from"./DropDown.vue_vue_type_style_index_0_lang-iCNjuwzB.js";import"./WhereToDates-D-jfCmu9.js";import"./LengthOfStay-BetSivqc.js";import"./DateRange-BHV3YD-p.js";import"./useScreenSize-gJ28JunP.js";import"./WhereToDeparture-4u2KdMco.js";import"./Flag-BpYRc1k-.js";import"./Multiselect-CZNEZ_9k.js";import"./Chip-ZUDrgJCy.js";import"./WhereToFilter-Xx8ntUj0.js";import"./CountrySelector-D5tCDiMG.js";import"./WhereToFilterSkeleton-DX9ucuCS.js";import"./SearchBar-JUnphLDs.js";import"./api-service-C7h3PDuT.js";import"./api-constants-Dh-j2Bvn.js";import"./useNaja-HQsABdAj.js";const Ce={class:"c-filter-publisher flex-column w-100"},Be={class:"c-filter-publisher__title"},Fe={key:0,class:"c-filter-publisher__count"},Ae={key:0,class:"c-filter-publisher__count"},ke=x({__name:"FilterOptionsPublisher",props:{modelValue:{default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(s){const e=K(s,"modelValue"),{t:i}=O(),{formatCount:S}=E(),n=F(),a=re(!1),p=V(()=>a.value?i("filters.hideMore"):i("filters.showMore")),r=V(()=>n.availablePublishers.map(u=>({...u,count:n.aggregations.publisher?.[String(u.id)]}))),m=V(()=>n.availablePublishers.filter(u=>u.type==="main").map(u=>({...u,count:n.aggregations.publisher?.[String(u.id)]}))),v=V(()=>n.availablePublishers.filter(u=>u.type==="other").map(u=>({...u,count:n.aggregations.publisher?.[String(u.id)]}))),g=V(()=>r.value.some(u=>!!u.count));return Z(()=>e.value,()=>{v.value.some(h=>e.value.includes(h.id))&&(a.value=!0)}),(u,h)=>{const j=Q,W=se;return d(),w("div",Ce,[b("div",Be,_(t(i)("filters.publisher")),1),(d(!0),w(R,null,U(m.value,D=>(d(),C(j,{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=T=>e.value=T),value:D.id,class:"w-100",disabled:g.value&&!D.count},{default:$(()=>[I(_(D.label)+" ",1),f(L),D.count?(d(),w("div",Fe,_(t(S)(D.count,!0)),1)):y("",!0)]),_:2},1032,["modelValue","value","disabled"]))),256)),v.value.length?(d(),w("button",{key:0,type:"button",class:N({"c-filter-publisher__more-button":!0,"c-filter-publisher__more-button--open":a.value}),onClick:h[1]||(h[1]=D=>a.value=!a.value)},[b("span",null,_(p.value),1),f(W,{"icon-name":"chevron-down"})],2)):y("",!0),b("div",{class:N({"c-filter-publisher__more-options":!0,"c-filter-publisher__more-options--open":a.value})},[(d(!0),w(R,null,U(v.value,D=>(d(),C(j,{modelValue:e.value,"onUpdate:modelValue":h[2]||(h[2]=T=>e.value=T),value:D.id,class:"w-100",disabled:g.value&&!D.count},{default:$(()=>[I(_(D.label)+" ",1),f(L),D.count?(d(),w("div",Ae,_(t(S)(D.count,!0)),1)):y("",!0)]),_:2},1032,["modelValue","value","disabled"]))),256))],2)])}}}),ne=H(ke,[["__scopeId","data-v-4bd152a2"]]),Pe={class:"c-filter-price flex-column w-100"},Oe={class:"c-filter-price__title"},xe={class:"w-100 overflow-hidden"},Te={class:"c-filter-price__labels d-flex flex-row justify-space-between"},q=50,Re=x({__name:"FilterOptionsPrice",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(s){const e=F(),{t:i}=O(),{formatPrice:S}=E(),n=V(()=>J*e.activeCurrencyRate),a=V(()=>X*e.activeCurrencyRate),p=V(()=>q*e.activeCurrencyRate),r=K(s,"modelValue");return ae(()=>{const m=r.value?.[0]===J?n.value:r.value?.[0],v=r.value?.[1]===X?a.value:r.value?.[1];(r.value[0]!==m||r.value[1]!==v)&&(r.value=[m,v])}),Z(r,m=>{let[v,g]=m;v===g&&(g<X?g+=q:v-=q,r.value=[v,g])}),(m,v)=>(d(),w("div",Pe,[b("div",Oe,_(t(i)("filters.price")),1),b("div",xe,[f(ge,{class:"flex-0-0",modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=g=>r.value=g),step:p.value,min:n.value,max:a.value},null,8,["modelValue","step","min","max"])]),b("div",Te,[b("div",null,_(`${t(S)(r.value[0])}`),1),b("div",null,_(`${t(S)(r.value[1])}`),1)])]))}}),ue=H(Re,[["__scopeId","data-v-9c36a7a9"]]),Ue={class:"c-filter-hotel-stars flex-column w-100"},Ie={class:"c-filter-hotel-stars__title"},Le={key:0,class:"c-filter-hotel-stars__count"},Ne=x({__name:"FilterOptionsHotelStars",props:{modelValue:{default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(s){const e=K(s,"modelValue"),{t:i}=O(),{formatCount:S}=E(),n=F(),a=V(()=>Object.values(he).filter(r=>typeof r=="number").map(r=>({value:r,label:r,count:n.aggregations.stars?.[String(r)]}))),p=V(()=>a.value.some(r=>!!r.count));return(r,m)=>{const v=se,g=Q;return d(),w("div",Ue,[b("div",Ie,_(t(i)("filters.hotelStars")),1),(d(!0),w(R,null,U(a.value,u=>(d(),C(g,{modelValue:e.value,"onUpdate:modelValue":m[0]||(m[0]=h=>e.value=h),value:u.value,class:"w-100",disabled:p.value&&!u.count},{default:$(()=>
1[(d(!0),w(R,null,U(u.value,h=>(d(),C(v,{"icon-name":"star",size:1.5}))),256)),f(L),u.count?(d(),w("div",Le,_(t(S)(u.count,!0)),1)):y("",!0)]),_:2},1032,["modelValue","value","disabled"]))),256))])}}}),de=H(Ne,[["__scopeId","data-v-b1671348"]]),Ee={class:"c-filter-board-basis flex-column w-100"},He={class:"c-filter-board-basis__title"},je={key:0,class:"c-filter-board-basis__count"},ze=x({__name:"FilterOptionsBoardBasis",props:{modelValue:{default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(s){const e=K(s,"modelValue"),{t:i}=O(),{formatCount:S}=E(),n=F(),a=V(()=>[P.roomOnly,P.breakfast,P.halfBoard,P.fullBoard,P.allInclusive].map(m=>({value:m,label:i(`filters.boardBasisOptions.${m}`),count:n.aggregations.food?.[String(m)]}))),p=V(()=>a.value.some(r=>!!r.count));return(r,m)=>{const v=Q;return d(),w("div",Ee,[b("div",He,_(t(i)("filters.boardBasis")),1),(d(!0),w(R,null,U(a.value,g=>(d(),C(v,{modelValue:e.value,"onUpdate:modelValue":m[0]||(m[0]=u=>e.value=u),value:g.value,class:"w-100",disabled:p.value&&!g.count},{default:$(()=>[I(_(g.label)+" ",1),f(L),g.count?(d(),w("div",je,_(t(S)(g.count,!0)),1)):y("",!0)]),_:2},1032,["modelValue","value","disabled"]))),256))])}}}),ce=H(ze,[["__scopeId","data-v-9e0a3a31"]]),Ge={class:"c-filter-all flex-column w-100"},Ye={key:0,class:"c-filter-all__section"},Xe={class:"c-filter-all__title"},Ke={key:1,class:"c-filter-all__section"},We={class:"c-filter-all__title"},qe={class:"c-filter-all__bottom-bar d-flex flex-row flex-0-0"},Je=x({__name:"FilterOptionsAll",props:{withDates:{type:Boolean},withDeparture:{type:Boolean},withHotelStars:{type:Boolean,default:!0}},setup(s){const{t:e}=O(),i=F(),S=ee();return(n,a)=>{const p=ie,r=ce,m=de,v=ue,g=ne,u=De;return d(),w("div",Ge,[n.withDates?(d(),w("div",Ye,[b("div",Xe,_(t(e)("tourSearch.datesTitle")),1),f(p)])):y("",!0),n.withDeparture?(d(),w("div",Ke,[b("div",We,_(t(e)("tourSearch.departureTitle")),1),b("div",{class:N({"c-filter-all__placeholder":!t(i).searchModel.departure.transport})},_(t(i).getDepartureAsText(t(S),t(e))),3)])):y("",!0),f(r,{modelValue:t(i).searchModel.filters.boardBasis,"onUpdate:modelValue":a[0]||(a[0]=h=>t(i).searchModel.filters.boardBasis=h),class:"c-filter-all__section"},null,8,["modelValue"]),n.withHotelStars?(d(),C(m,{key:2,modelValue:t(i).searchModel.filters.stars,"onUpdate:modelValue":a[1]||(a[1]=h=>t(i).searchModel.filters.stars=h),class:"c-filter-all__section"},null,8,["modelValue"])):y("",!0),f(v,{modelValue:t(i).searchModel.filters.price,"onUpdate:modelValue":a[2]||(a[2]=h=>t(i).searchModel.filters.price=h),class:"c-filter-all__section"},null,8,["modelValue"]),f(g,{modelValue:t(i).searchModel.filters.publisher,"onUpdate:modelValue":a[3]||(a[3]=h=>t(i).searchModel.filters.publisher=h)},null,8,["modelValue"]),b("div",qe,[f(u,{variant:"text",color:"cBlack2",onClick:a[4]||(a[4]=h=>t(i).resetAllFilters())},{default:$(()=>[I(_(t(e)("ctas.clearAll")),1)]),_:1}),f(L),f(u,{variant:"text",onClick:a[5]||(a[5]=h=>t(i).openAllFilters=!1)},{default:$(()=>[I(_(t(e)("ctas.confirm")),1)]),_:1})])])}}}),Qe=H(Je,[["__scopeId","data-v-d2e0cacc"]]);function Ze(){const s=F(),e=Ve(),i=ee();function S(p){p.key==="Escape"&&s.searchDropDown.isVisible&&s.hideDropdown()}function n(){if(s?.tourSearchDefaults?.destinations?.length&&s.tourSearchDefaults.destinations.forEach(r=>{e.addDestinationToCache(r),s.searchModel.whereToDestinations.push(r.type+r.id)}),s?.tourSearchDefaults?.lengthRange?.length==2){const p=s?.tourSearchDefaults?.lengthRange;p[0]<=p[1]&&p[0]>=_e&&p[1]<=ve&&(s.searchModel.lengthOfStay=[...p])}s?.tourSearchDefaults?.from&&s?.tourSearchDefaults?.to&&(s.searchModel.dates={from:s.tourSearchDefaults.from,to:s.tourSearchDefaults.to}),s?.tourSearchDefaults?.orderBy&&(s.searchModel.orderBy=s.tourSearchDefaults.orderBy),s?.tourSearchDefaults?.sortDirection&&(s.searchModel.sortDirection=s.tourSearchDefaults.sortDirection),s?.tourSearchDefaults?.itView&&(s.searchModel.itView=s.tourSearchDefaults.itView),s?.tourSearchDefaults?.transport&&s.searchModel.departure.airports.push(...s.tourSearchDefaults.departure.map(p=>Object.values(i.airportsCache).find(r=>
1r.IATA===p)).filter(Boolean).map(p=>p.id)),s?.tourSearchDefaults?.transport&&(s.searchModel.departure.transport=s.tourSearchDefaults.transport)}async function a(){window.addEventListener("keydown",S),await e.loadAllCountries(),await i.loadDepartureAirports(),n(),s.isInitializing=!1}return be(()=>{window.removeEventListener("keydown",S)}),{initSearchDropDown:a}}const et={class:"c-tour-filters w-100"},tt={key:0,class:"c-tour-filters__desktop"},lt={class:"c-tour-filters__desktop-header border-bottom-light"},ot={class:"w-100 overflow-auto flex flex-row nowrap pb-4 pt-4"},Tt=x({__name:"TourFilters",props:{withDates:{type:Boolean},withDeparture:{type:Boolean},withHotelStars:{type:Boolean,default:!0},vertical:{type:Boolean}},setup(s){const e=F();e.initializeDefaultPrice();const i=s,S=re(null),{t:n}=O(),{initSearchDropDown:a}=Ze(),{formatPrice:p}=E(),r=ee(),m=V(()=>{let o=0;return i.withDates&&!e.isDefaultSearchDatesAndLength()&&(o+=1),i.withDeparture&&!e.isDefaultDeparture()&&(o+=1),e.activeFilterCount+o}),v=V(()=>{let o=[...e.searchModel.filters.boardBasis];if(!o.length)return n("filters.boardBasis");o=o.sort();let l=n(`filters.boardBasisOptions.${o[o.length-1]}`);return o.length>1&&(o[o.length-1]===P.roomOnly&&(l=n(`filters.boardBasisOptions.${o[o.length-2]}`)),l=`${l} +${o.length-1}`),l}),g=V(()=>{let o=[...e.searchModel.filters.stars];return o.length?`${o.sort().join("*, ")}*`:n("filters.hotelStars")}),u=V(()=>{let o=[...e.searchModel.filters.price];return e.activeCurrencyRate,e.isDefaultPriceRange(e.searchModel.filters.price)?n("filters.price"):`${p(o[0])} - ${p(o[1])}`}),h=V(()=>{let o=[...e.searchModel.filters.publisher];if(!o.length)return n("filters.publisher");let l;return e.availablePublishers.some(B=>{if(o.includes(B.id))return l=B.label,!0}),o.length>1&&(l=`${l} +${o.length-1}`),l}),j=function(){const o=new URLSearchParams(window.location.search),l=o.get("food"),B=o.get("hStars"),G=o.get("minPrice"),M=o.get("maxPrice"),Y=o.get("publisher");if(typeof l=="string"&&(e.searchModel.filters.boardBasis=l.split(",").map(Number)),typeof B=="string"&&(e.searchModel.filters.stars=B.split(",").map(Number)),typeof G=="string"&&typeof M=="string"){const A=parseInt(G,10),k=parseInt(M,10);!isNaN(A)&&!isNaN(k)&&A<k&&A>=J*e.activeCurrencyRate&&k<=X*e.activeCurrencyRate&&(e.searchModel.filters.price=[A,k])}typeof Y=="string"&&(e.searchModel.filters.publisher=Y.split(",").map(Number))},{debouncedSearch:W,handleSearchClick:D}=$e();ye(W,D),Z(()=>e.currencyCode,o=>{e.initializeDefaultPrice()}),ae(async()=>{j(),naja.addEventListener("success",o=>{typeof o.detail.payload.aggregations<"u"&&(e.aggregations=o.detail.payload.aggregations)}),await a()});async function T(){e.resetDatesAndLength(),await le(),D()}async function pe(){e.resetDeparture(),await le(),D()}function z(){(i.withDates||i.withDeparture)&&e.setSelectedSearchField(null),e.openAllFilters=!1}return(o,l)=>{const B=Qe,G=Se,M=we,Y=ie,A=ce,k=de,fe=ue,me=ne;return d(),w("div",et,[o.vertical?(d(),w("div",tt,[b("div",lt,[b("b",null,_(t(n)("filters.toFilter")),1),b("button",{onClick:l[0]||(l[0]=c=>t(e).resetAllFilters()),class:"button button--link fs-meta-14"},_(t(n)("filters.resetFilter")),1)]),f(B,{"with-dates":o.withDates,"with-departure":o.withDeparture,"with-hotel-stars":o.withHotelStars},null,8,["with-dates","with-departure","with-hotel-stars"])])):y("",!0),b("div",{ref_key:"tourFiltersRef",ref:S,class:N({"c-tour-filters__mobile":o.vertical,"w-100":!0,"position-relative":!0})},[o.withDates||o.withDeparture?(d(),C(G,{key:0,"parent-ref":S.value,onCloseDropdown:l[1]||(l[1]=c=>t(D)())},null,8,["parent-ref"])):y("",!0),f(Me,{"parent-ref":S.value,title:`${t(n)("filters.allFilters")} ${m.value>0?`(${m.value})`:""}`,"is-wide":!1,modelValue:t(e).openAllFilters,"onUpdate:modelValue":l[2]||(l[2]=c=>t(e).openAllFilters=c),onClickOutside:l[3]||(l[3]=c=>t(e).openAllFilters=!1),onClose:l[4]||(l[4]=c=>t(e).openAllFilters=!1)},{default:$(()=>[f(B,{"with-dates":o.withDates,"with-departure":o.withDeparture,"with-hotel-stars":o.withHotelStars},null,8,["with-dates","with-departure","with-hotel-stars"])]),_:1},8,["parent-ref","title","modelValue"]),b("div",ot,[f(M,{label:`${t(n)("filters.allFilters")} ${m.value>0?`(${m.value})`:""}`,"icon-name":"sliders",color:"cBlue1","hide-chevron":"",outlined:"","hide-menu":"",onActivatorClick:l[5]||(l[5]=c=>{t(e).openAllFilters=!t(e).openAllFilters,t(e).setSelectedSearchField(null)})},null,8,["label"]),o.withDates?(d(),C(M,{key:0,highlighted:!t(e).isDefaultSearchDatesAndLength(),"icon-name":"calendar",outlined:"","hide-menu":"",onClear:l[6]||(l[6]=c=>T()),onActivatorClick:l[7]||(l[7]=c=>{t(e).setSelectedSearchField(c?t(oe).dates:null),t(e).openAllFilters=!1})},{label:$(()=>[f(Y)]),_:1},8,["highlighted"])):y("",!0),o.withDeparture?(d(),C(M,{key:1,highlighted:!t(e).isDefaultDeparture(),"icon-name":"trans-plane",outlined:"","hide-menu":"",onClear:l[8]||(l[8]=c=>pe()),onActivatorClick:l[9]||(l[9]=c=>{t(e).setSelectedSearchField(c?t(oe).departure:null),t(e).openAllFilters=!1})},{label:$(()=>[b("span",{class:N({"c-tour-filters__placeholder":!t(e).searchModel.departure.transport})},_(t(e).getDepartureAsText(t(r),t(n))),3)]),_:1},8,["highlighted"])):y("",!0),f(M,{label:v.value,"icon-name":"restaurant",highlighted:t(e).searchModel.filters.boardBasis.length>0,onClear:l[11]||(l[11]=c=>t(e).searchModel.filters.boardBasis=[]),onActivatorClick:l[12]||(l[12]=c=>z()),outlined:""},{default:$(()=>[f(A,{modelValue:t(e).searchModel.filters.boardBasis,"onUpdate:modelValue":l[10]||(l[10]=c=>t(e).searchModel.filters.boardBasis=c)},null,8,["modelValue"])]),_:1},8,["label","highlighted"]),o.withHotelStars?(d(),C(M,{key:2,label:g.value,"icon-name":"hotel-class",highlighted:t(e).searchModel.filters.stars.length>0,onClear:l[14]||(l[14]=c=>t(e).searchModel.filters.stars=[]),onActivatorClick:l[15]||(l[15]=c=>z()),outlined:""},{default:$(()=>[f(k,{modelValue:t(e).searchModel.filters.stars,"onUpdate:modelValue":l[13]||(l[13]=c=>t(e).searchModel.filters.stars=c)},null,8,["modelValue"])]),_:1},8,["label","highlighted"])):y("",!0),f(M,{label:u.value,"icon-name":"savings",highlighted:!t(e).isDefaultPriceRange(t(e).searchModel.filters.price),onClear:l[17]||(l[17]=c=>t(e).searchModel.filters.price=[t(te)[0]*t(e).activeCurrencyRate,t(te)[1]*t(e).activeCurrencyRate]),onActivatorClick:l[18]||(l[18]=c=>z()),outlined:""},{default:$(()=>[f(fe,{modelValue:t(e).searchModel.filters.price,"onUpdate:modelValue":l[16
1]||(l[16]=c=>t(e).searchModel.filters.price=c)},null,8,["modelValue"])]),_:1},8,["label","highlighted"]),f(M,{label:h.value,"icon-name":"stand",highlighted:t(e).searchModel.filters.publisher.length>0,onClear:l[20]||(l[20]=c=>t(e).searchModel.filters.publisher=[]),onActivatorClick:l[21]||(l[21]=c=>z()),outlined:""},{default:$(()=>[f(me,{modelValue:t(e).searchModel.filters.publisher,"onUpdate:modelValue":l[19]||(l[19]=c=>t(e).searchModel.filters.publisher=c)},null,8,["modelValue"])]),_:1},8,["label","highlighted"])])],2)])}}});export{Tt 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.