PageSourceSearch

https://clickongreece.com/wp-content/themes/my-listing/assets/dist/basic-search-form.js?ver=2.11.9

js clickongreece.com collected 2026-10-05 01:53:58 UTC 21,772 bytes, 1 lines download raw bytes

1!function(t){"function"==typeof define&&define.amd?define("basicForm",t):t()}(function(){"use strict";Vue.component("wp-search-filter",{props:{listingType:String,filterKey:String,location:String,label:String},mounted:function(){var t=this;this.$nextTick(function(){t.$root.$on("reset-filters:"+t.listingType,function(){t.filters[t.filterKey]=""})})},methods:{updateInput:function(){this.filters[this.filterKey]=this.$refs.input.value,this.$emit("input",this.$refs.input.value,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location})}},computed:{filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("text-filter",{props:{listingType:String,filterKey:String,location:String,label:String},mounted:function(){var t=this;this.$nextTick(function(){t.$root.$on("reset-filters:"+t.listingType,function(){t.filters[t.filterKey]=""})})},methods:{updateInput:function(){this.filters[this.filterKey]=this.$refs.input.value,this.$emit("input",this.$refs.input.value,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location})}},computed:{filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("location-filter",{props:{listingType:String,filterKey:String,location:String,label:String},data:function(){return{latitudeKey:"lat",longitudeKey:"lng"}}
1,created:function(){this.$root.$on("request-location:"+this.listingType,this.requestALocation)},mounted:function(){var t=this;this.$nextTick(function(){MyListing.Maps&&MyListing.Maps.loaded?new MyListing.Maps.Autocomplete(t.$refs.input):jQuery(document).on("maps:loaded",function(){new MyListing.Maps.Autocomplete(t.$refs.input)}),jQuery(t.$root.$el).find(".finder-search").on("scroll",MyListing.Helpers.debounce(function(t){jQuery(".pac-container").css("display","none"),jQuery(".cts-autocomplete-dropdown").removeClass("active")},100,{leading:!0,trailing:!1})),t.$root.$on("reset-filters:"+t.listingType,function(){t.filters[t.filterKey]="",t.filters[t.latitudeKey]=!1,t.filters[t.longitudeKey]=!1})})},methods:{handleAutocomplete:function(e){var i=this,t=e.detail.place;e.target.value.length?t.address&&t.latitude&&t.longitude?this.updateInput(t):MyListing.Geocoder.geocode(e.target.value,function(t){t&&(t.address=e.target.value,i.updateInput(t))}):this.updateInput({address:"",latitude:!1,longitude:!1})},updateInput:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]&&arguments[2];this.filters[this.filterKey]=t.address,this.filters[this.latitudeKey]=t.latitude,this.filters[this.longitudeKey]=t.longitude,this.$emit("input",this.filters[this.filterKey],{filterType:this.$options.name,filterKey:this.filterKey,location:this.location,shouldDebounce:e,forceGet:i})},updateWithUserLocation:MyListing.Helpers.debounce(function(){var e=this;MyListing.Geocoder.getUserLocation({receivedAddress:function(t){return e.updateInput(t)},geolocationFailed:function(){new MyListing.Dialog({message:CASE27.l10n.geolocation_failed})}})},1e3,{leading:!0,trailing:!1}),requestALocation:function(){var e,i,s=this,t=this.currentLocation;if(t.address&&t.latitude&&t.longitude)return this.updateInput(t,!1,!0);!t.address||t.latitude||t.longitude?(i=new MyListing.Dialog({message:CASE27.l10n.nearby_listings_retrieving_location,timeout:!1,dismissable:!1,spinner:!0}),MyListing.Geocoder.getUserLocation({receivedAddress:function(t){s.updateInput(t,!0,!0),i.refresh({message:CASE27.l10n.nearby_listings_searching,timeout:2e3,spinner:!0,dismissable:!1})},geolocationFailed:function(){i.refresh({message:CASE27.l10n.nearby_listings_location_required,timeout:4e3,dismissable:!0,spinner:!1}),s.updateInput(s.currentLocation,!0,!0),jQuery(s.$refs.input).focus().one("input",function(){return i.hide()})}})):void 0!==(e=CASE27_Explore_Settings.Cache).defaultLocation?this.updateInput(e.defaultLocation,!0,!0):MyListing.Geocoder.geocode(t.address,function(t){e.defaultLocation={address:t?t.address:"",latitude:!!t&&t.latitude,longitude:!!t&&t.longitude},s.updateInput(e.defaultLocation,!0,!0)})}},computed:{currentLocation:function(){return{address:this.filters[this.filterKey]||"",latitude:this.filters[this.latitudeKey],longitude:this.filters[this.longitudeKey]}},filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("proximity-filter",{props:{listingType:String,filterKey:String,location:String,label:String,units:String,min:Number,max:Number,step:Number,default:Number},data:function(){return{locked:!1}},mounted:function(){var t=this;this.$nextTick(function(){jQuery(t.$refs.slider).slider({range:"min",min:t.min||0,max:t.max,step:t.step,slide:t.updateInput,value:t.filters[t.filterKey]?parseFloat(t.filters[t.filterKey]):t.default}),t.$root.$on("reset-filters:"+t.listingType,function(){t.filters[t.filterKey]=t.default,t.updateUI()})})},methods:{updateInput:function(t,e){this.locked||(this.filters[this.filterKey]=e.value,this.$emit("input",e.value,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location}))},updateUI:function(){this.locked=!0;var t=this.filters[this.filterKey]?parseFloat(this.filters[this.filterKey]):this.default;jQuery(this.$refs.slider).slider("value",t),this.locked=!1}},computed:{displayValue:function(){var t=isNaN(parseFloat(this.filters[this.filterKey]))?this.filters[this.filterKey]:parseFloat(this.filters[this.filterKey]).toLocaleString();return"".concat(this.label," ").concat(t).concat(this.units)},filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("date-filter",{props:{listingType:String,filterKey:String,location:String,label:String,type:String,l10n:Object},data:function(){return{startDate:"",endDate:"",dateFormat:"YYYY-MM-DD",locked:!1,startPicker:null,endPicker:null}},created:function(){var t=this.filters[this.filterKey].split(".."),e=moment(t[0]||""),t=moment(t[1]||"");this.startDate=e.isValid()?e.clone().locale("en").format(this.dateFormat):"",this.endDate=t.isValid()?t.clone().locale("en").format(this.dateFormat):""},mounted:function(){var e=this;this.$nextTick(function(){e.startPicker=new MyListing.Datepicker(e.$refs.startpicker),e.endPicker=new MyListing.Datepicker(e.$refs.endpicker),jQuery(e.$root.$el).find(".finder-search").on("scroll",MyListing.Helpers.debounce(function(t){e.startPicker.drp.hide(),e.endPicker.drp&&e.endPicker.drp.hide()},100,{leading:!0,trailing:!1})),e.$root.$on("reset-filters:"+e.listingType,function(){e.locked=!0,e.startDate=e.endDate="",e.startPicker.setValue(moment("")),e.endPicker.setValue(moment("")),e.locked=!1})})},methods:{updateInput:function(){var t;t="exact"===this.type?this.startDate:this.startDate||this.endDate?"".concat(this.startDate,"..").concat(this.endDate):"",this.filters[this.filterKey]=t,this.locked||this.$emit("input",t,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location,shouldDebounce:!1})}},computed:{filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("date-year-filter",{props:{listingType:String,filterKey:String,location:String,choices:Array,label:String,type:String,l10n:Object},data:function(){return{startDate:"",endDate:"",dateFormat:"YYYY",locked:!1}},created:function(){var t=this.filters[this.filterKey].split(".."),e=moment(t[0]||""),t=moment(t[1]||"");this.startDate=e.isValid()?e.clone().locale("en").format(this.dateFormat):"",this.endDate=t.isValid()?t.clone().locale("en").format(this.dateFormat):""},mounted:function(){var t=this;this.$nextTick(function(){new MyListing.CustomSelect(t.$refs.startpicker),new MyListing.CustomSelect(t.$refs.endpicker),t.$root.$on("reset-filters:"+t.listingType,function(){t.locked=!0,t.startDate=t.endD
1ate="",jQuery(t.$refs.startpicker).val("").trigger("change").trigger("select2:close"),jQuery(t.$refs.endpicker).val("").trigger("change").trigger("select2:close"),t.locked=!1})})},methods:{updateInput:function(){var t;t="exact"===this.type?this.startDate:this.startDate||this.endDate?"".concat(this.startDate,"..").concat(this.endDate):"",this.filters[this.filterKey]=t,this.locked||this.$emit("input",t,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location,shouldDebounce:!1})}},computed:{filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("recurring-date-filter",{props:{listingType:String,filterKey:String,location:String,label:String,presets:Array,enableDatepicker:Boolean,enableTimepicker:Boolean,l10n:Object},data:function(){return{selected:"@custom",startDate:"",endDate:"",dateFormat:this.enableTimepicker?"YYYY-MM-DD HH:mm":"YYYY-MM-DD",locked:!1,startPicker:null,endPicker:null}},created:function(){var t,e,i=this.filters[this.filterKey];this.enableDatepicker&&-1!==i.indexOf("..")?(e=moment(i.split("..")[0]),t=moment(i.split("..")[1]),this.selected="@custom",this.startDate=e.isValid()?e.clone().locale("en").format(this.dateFormat):"",this.endDate=t.isValid()?t.clone().locale("en").format(this.dateFormat):""):(e=this.presets.find(function(t){return t.key===i}),this.selected=e?e.key:this.presets.length?this.presets[0].key:"@custom")},mounted:function(){var e=this;this.$nextTick(function(){var t=e.enableTimepicker;e.startPicker=new MyListing.Datepicker(e.$refs.start,{timepicker:t}),e.endPicker=new MyListing.Datepicker(e.$refs.end,{timepicker:t}),e.endPicker.do(function(t){return t.drp.minDate=moment(e.startDate)}),jQuery(e.$root.$el).find(".finder-search").on("scroll",MyListing.Helpers.debounce(function(t){e.startPicker.drp.hide(),e.endPicker.drp.hide()},100,{leading:!0,trailing:!1})),new MyListing.CustomSelect(e.$refs.select),e.$root.$on("reset-filters:"+e.listingType,function(){e.locked=!0,e.selected=e.presets.length?e.presets[0].key:"@custom",e.startPicker.setValue(moment("")),e.endPicker.setValue(moment("")),e.locked=!1})})},methods:{setPreset:function(t){this.selected!==t&&(this.selected=t,this.updateInput())},updateInput:function(){var t,e=this;"@custom"===this.selected&&this.enableDatepicker?(this.endPicker.do(function(t){return t.drp.minDate=moment(e.startDate)}),this.startDate||(this.endDate="",this.endPicker.do(function(t){t.value=moment(""),t.updateInputValues()})),t=this.startDate?"".concat(this.startDate,"..").concat(this.endDate):""):"@custom"!==this.selected&&(t=this.presets.length&&this.presets[0].key===this.selected?"":this.selected),this.filters[this.filterKey]=t,this.locked||this.$emit("input",t,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location,shouldDebounce:!1})}},computed:{filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("range-filter",{props:{listingType:String,filterKey:String,location:String,label:String,value:String,type:String,prefix:String,suffix:String,behavior:String,min:Number,max:Number,step:Number,formatValue:Boolean},data:function(){return{defaultValue:"range"===this.type?"".concat(this.min,"..").concat(this.max):"upper"===this.behavior?this.min:this.max,locked:!1,debounceUIUpdate:MyListing.Helpers.debounce(this.updateUI,200)}},mounted:function(){var i=this;this.$nextTick(function(){var t,e={range:"single"!==i.type||"min",min:i.min,max:i.max,step:i.step,slide:i.updateInput};"single"===i.type&&(e.value=i.value?parseFloat(i.value):"upper"===i.behavior?i.min:i.max,"upper"===i.behavior)&&(e.classes={"ui-slider":"reverse-dir"}),"range"===i.type&&(t=i.value.split(".."),e.values=[t[0]?parseFloat(t[0]):i.min,t[1]?parseFloat(t[1]):i.max]),jQuery(i.$refs.slider).slider(e),i.$root.$on("reset-filters:"+i.listingType,function(){i.filters[i.filterKey]="",i.updateUI()})})},methods:{updateInput:function(t,e){this.locked||("single"===this.type?this.step+e.value>this.max&&(this.filters[this.filterKey]=e.value=this.max,this.updateUI()):this.step+e.values[1]>this.max&&(e.values[1]=this.max,this.filters[this.filterKey]="".concat(e.values[0],"..").concat(e.values[1]),this.updateUI()),e=(e="single"===this.type?e.value:"".concat(e.values[0],"..").concat(e.values[1]))!==this.defaultValue?e:"",this.$set(this.filters,this.filterKey,e),this.$emit("input",e,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location}))},updateUI:function(){this.locked=!0;var t=this.filters[this.filterKey]||this.defaultValue;"single"===this.type?jQuery(this.$refs.slider).slider("value",t):jQuery(this.$refs.slider).slider("values",t.split("..")),this.locked=!1}},computed:{displayValue:function(){var t,e=this.filters[this.filterKey]||this.defaultValue;return("single"===this.type?(e=!isNaN(parseFloat(e))&&this.formatValue?parseFloat(e).toLocaleStr
1ing():e,"".concat(this.prefix).concat(e)):(e=e.split(".."),t=!isNaN(parseFloat(e[0]))&&this.formatValue?parseFloat(e[0]).toLocaleString():e[0],e=!isNaN(parseFloat(e[1]))&&this.formatValue?parseFloat(e[1]).toLocaleString():e[1],jQuery("body").hasClass("rtl")?"".concat(this.prefix).concat(e).concat(this.suffix," — ").concat(this.prefix).concat(t):"".concat(this.prefix).concat(t).concat(this.suffix," — ").concat(this.prefix).concat(e))).concat(this.suffix)},targetFilter:function(){return this.filters[this.filterKey]},filters:function(){return this.$root.types[this.listingType].filters}},watch:{targetFilter:function(){this.debounceUIUpdate()}}}),Vue.component("dropdown-filter",{props:{listingType:String,filterKey:String,location:String,label:String,multiple:Boolean,choices:Array},data:function(){return{selected:this.multiple?[]:""}},created:function(){this.selected=this.multiple?this.filters[this.filterKey].split(","):this.filters[this.filterKey]},mounted:function(){var t=this;this.$nextTick(function(){new MyListing.CustomSelect(t.$refs.select),t.$root.$on("reset-filters:"+t.listingType,function(){t.selected=t.multiple?[]:"",t.filters[t.filterKey]="",jQuery(t.$refs.select).val(t.selected).trigger("change").trigger("select2:close")})})},methods:{handleChange:function(t){this.selected=this.multiple?Array.isArray(t.detail.value)?t.detail.value:[]:"string"==typeof t.detail.value?t.detail.value:"",this.updateInput()},updateInput:function(){var t=this.multiple?this.selected.filter(Boolean).join(","):this.selected;this.filters[this.filterKey]=t,this.$emit("input",t,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location})},isSelected:function(t){return this.multiple?this.selected.includes(t):t===this.selected}},computed:{filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("dropdown-terms-filter",{props:{listingType:String,filterKey:String,location:String,ajaxParams:String,label:String,preSelected:Array},data:function(){return{selected:[]}},created:function(){this.selected=this.filters[this.filterKey].split(",")},mounted:function(){var t=this;this.$nextTick(function(){new MyListing.CustomSelect(t.$refs.select),t.$root.$on("reset-filters:"+t.listingType,function(){t.selected=t.filters[t.filterKey]=[],jQuery(t.$refs.select).val([]).trigger("change").trigger("select2:close")})})},methods:{handleChange:function(t){this.selected=Array.isArray(t.detail.value)?t.detail.value:[],this.updateInput()},updateInput:function(){var t=this.selected.join(",");this.filters[this.filterKey]=t,this.$emit("input",t,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location})}},computed:{filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("dropdown-hierarchy-filter",{props:{listingType:String,filterKey:String,location:String,label:String,ajaxParams:String,preSelected:String},data:function(){return{selected:""}},created:function(){this.selected=this.filters[this.filterKey]},mounted:function(){var t=this;this.$nextTick(function(){new MyListing.TermHierarchy(t.$refs.input),t.$root.$on("reset-filters:"+t.listingType,function(){t.selected=t.filters[t.filterKey]="",jQuery(t.$el).find(".term-select-0 select").val("").trigger("change").trigger("select2:close")})})},methods:{handleChange:function(t){this.selected="string"==typeof t.detail.value?t.detail.value:"",this.updateInput()},updateInput:function(){this.filters[this.filterKey]=this.selected,this.$emit("input",this.selected,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location})}},computed:{filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("checkboxes-filter",{props:{listingType:String,filterKey:String,location:String,label:String,multiple:Boolean,choices:Array},data:function(){return{selected:this.multiple?[]:""}},created:function(){this.selected=this.multiple?this.filters[this.filterKey].split(","):this.filters[this.filterKey]},mounted:function(){var t=this;this.$nextTick(function(){t.$refs.select&&new MyListing.CustomSelect(t.$refs.select),t.$root.$on("reset-filters:"+t.listingType,function(){t.selected=t.multiple?[]:"",t.filters[t.filterKey]=""})})},methods:{updateInput:function(){var t=this.multiple?this.selected.filter(
1Boolean).join(","):this.selected;this.filters[this.filterKey]=t,this.$emit("input",t,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location,shouldDebounce:!this.$refs.workHourRanges})}},computed:{filters:function(){return this.$root.types[this.listingType].filters},filterId:function(){return"fid:".concat(this.listingType,"-").concat(this.filterKey,"-").concat(this._uid)}}}),Vue.component("related-listing-filter",{props:{listingType:String,filterKey:String,location:String,ajaxParams:String,label:String,preSelected:Array,multiple:Boolean},data:function(){return{selected:this.multiple?[]:""}},created:function(){this.selected=this.multiple?this.filters[this.filterKey].split(","):this.filters[this.filterKey]},mounted:function(){var t=this;this.$nextTick(function(){t.$refs.select.dataset.mylistingAjax=!0,t.$refs.select.dataset.mylistingAjaxUrl="mylisting_list_posts",t.$refs.select.dataset.mylistingAjaxParams=t.ajaxParams,new MyListing.CustomSelect(t.$refs.select),t.$root.$on("reset-filters:"+t.listingType,function(){t.selected=t.filters[t.filterKey]=t.multiple?[]:"",jQuery(t.$refs.select).val(t.selected).trigger("change").trigger("select2:close")})})},methods:{handleChange:function(t){this.selected=this.multiple?Array.isArray(t.detail.value)?t.detail.value:[]:"string"==typeof t.detail.value?t.detail.value:"",this.updateInput()},updateInput:function(){var t=this.multiple?this.selected.join(","):this.selected;this.filters[this.filterKey]=t,this.$emit("input",t,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location})}},computed:{filters:function(){return this.$root.types[this.listingType].filters}}}),Vue.component("order-filter",{props:{listingType:String,filterKey:String,choices:Array,location:String,label:String},data:function(){return{locked:!1}},mounted:function(){var i=this;this.$nextTick(function(){new MyListing.CustomSelect(i.$refs.select);var e=i.filters[i.filterKey];e&&i.choices.find(function(t){return t.key===e})||!i.choices.length||(i.filters[i.filterKey]=i.choices[0].key,i.updateUI()),i.$root.$on("reset-filters:"+i.listingType,function(){var t=i.choices.length?i.choices[0].key:null;i.filters[i.filterKey]=t,i.updateUI()})})},methods:{updateInput:function(){this.locked||(this.filters[this.filterKey]=this.$refs.select.value,this.hasNote(this.filters[this.filterKey],"has-proximity-clause")?this.$root.$emit("request-location:"+this.listingType):this.$emit("input",this.$refs.select.value,{filterType:this.$options.name,filterKey:this.filterKey,location:this.location,shouldDebounce:!1}))},updateUI:function(){this.locked=!0,jQuery(this.$refs.select).val(this.filters[this.filterKey]).trigger("change").trigger("select2:close"),this.locked=!1},hasNote:function(e,t){return!(!(e=this.choices.find(function(t){return t.key===e}))||!e.notes)&&-1!==e.notes.indexOf(t)}},computed:{wrapperClasses:function(){var t=this.currentChoice;return t&&t.notes?t.notes:[]},currentChoice:function(){var e=this;return this.choices.find(function(t){return t.key===e.filters.sort})},locationDetails:function(){return this.$root.hasValidLocation(this.listingType)?this.filters.search_location:CASE27.l10n.nearby_listings_location_required},filters:function(){return this.$root.types[this.listingType].filters}},watch:{"filters.sort":function(t){this.updateUI()}}});function t(){jQuery(".mylisting-basic-form").each(function(t,e){var i,s;e.dataset.inited||(e.dataset.inited=!0,i=JSON.parse(e.dataset.listingTypes),s=JSON.parse(e.dataset.config),new Vue({el:e,data:{activeType:!1,types:i,targetURL:s.target_url,tabMode:s.tabs_mode,typesDisplay:s.types_display,boxShadow:s.box_shadow,formId:s.form_id},mounted:function(){var t=this;this.$nextTick(function(){jQuery(t.$refs["types-dropdown-".concat(t.activeType.id)]).select2(),t.updateSelect2Titles()})},created:function(){var t=Object.keys(this.types);t.length&&(this.activeType=this.types[t[0]])},methods:{typeDropdownChanged:function(t){this.activeType!==this.types[t]&&(this.activeType=this.types[t],jQuery(this.$refs["types-dropdown-".concat(this.activeType.id)]).val(t).trigger("change").trigger("select2:close"),this.updateSelect2Titles())},updateSelect2Titles:function(){var s=this;jQuery(".select2-selection__rendered").each(function(t,e){var i=s.types[jQuery(e).closest("select").val()];i&&jQuery(e).attr("title",i.name)})},filterChanged:function(t,e){},hasValidLocation:function(t){},submit:function(){var i=this.activeType.filters,s={type:this.activeType.slug,tab:"search-form"}
1,t=(Object.keys(i).forEach(function(t){var e=i[t];("proximity"!==t||i.lat&&i.lng)&&(e&&void 0!==e.length&&e.length||"number"==typeof e&&e)&&(s[t]=e)}),this.activeType.submit_to||this.targetURL),e=jQuery.param(s).replace(/%2C/g,",");window.location.href="".concat(t,"?").concat(e)}}}))})}t(),document.addEventListener("DOMContentLoaded",t),document.addEventListener("mylisting:refresh-basic-forms",t)});

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.