PageSourceSearch

https://www.guide-du-perigord.com/scripts/v-filters/v-filters.min.js?v=1789110923

js guide-du-perigord.com collected 2026-09-24 22:57:45 UTC 8,337 bytes, 1 lines download raw bytes

1var vFiltersItem={template:'<div class="v-filters-item" :class="filterClass"><i class="icon-new" v-if="isNew" :title="labels.new"></i><a class="v-filters-item-remove" v-if="clearable && !empty" :class="\'icon-cross\'" @click="clearApply" :title="labels.clear"></a><a class="v-filters-item-toggle" :class="[ icon ]" @click="toggle">{{ toggleLabel }}</a><input v-if="hasInput" :name="name" type="hidden" :value="val"/><div class="v-filters-dropdown v-filters-item-dropdown" :class="dropdownClass" v-show="dropped"><div class="v-filters-dropdown-content v-filters-item-dropdown-content" v-if="dropped"><a class="v-filters-dropdown-close" v-if="screenSize==\'small\'" @click="close">×</a><span class="v-filters-dropdown-title" v-if="screenSize==\'small\'">{{ filterLabel }}</span><div class="v-filters-item-calendar" v-if="filterType==\'date\'"><v-date-picker ref="dateCalendar" :mode="\'simple\'" :is-expanded="screenSize==\'small\'" :columns="calendarColumns" v-model="selectedDate" is-inline></v-date-picker></div><div class="v-filters-item-calendar" v-if="filterType==\'dateRange\'"><div class="v-filters-item-calendar-col"><v-date-picker ref="dateStartCalendar" :max-date="selectedDateEnd" :mode="\'simple\'" :is-expanded="screenSize==\'small\'" v-model="selectedDateStart" is-inline></v-date-picker></div><div class="v-filters-item-calendar-col" :class="{ \'disabled\': !selectedDateStart }"><v-date-picker ref="dateEndCalendar" :min-date="selectedDateStart" :mode="\'simple\'" :is-expanded="screenSize==\'small\'" v-model="selectedDateEnd" is-inline></v-date-picker></div></div><div class="v-filters-item-select" v-if="filterType==\'select\'"><input v-if="hasSelectFilter" class="v-filters-item-select-filter" type="text" v-model="selectFilter" ref="input" :disabled="!filterOptions.length" @keydown.enter.prevent @keydown.arrow-down.prevent="selectFirstOptionFocus" @keydown.down.prevent="selectFirstOptionFocus"/><ul class="v-filters-item-select-list"><li class="v-filters-item-select-item" v-for="option, optKey in filterOptionsFiltred" :key="optKey" :class="[{ \'selected\': option.s }, option.c]"><span class="bt":is="option.d ? \'span\' : \'a\'" :tabindex="option.d ? -1 : 0"  :ref="option === firstOptionSelectable ? \'firstOption\' : null"  @keydown.prevent="selectOptionNavigation"  @click="selectOption(option, false)" @keydown.enter="selectOption(option, true)"><span class="lib" :class="[ option.ic ]">{{ option.l }}<span v-if="option.n"> ({{ option.n }})</span></span></span></li></ul></div><div class="v-filters-item-input" v-if="filterType==\'input\'"><input type="text" v-model="val" ref="input" @keydown.enter.prevent="apply"/></div></div><div class="v-filters-dropdown-footer" v-if="dropped"><div class="v-filters-dropdown-footer-content"><a class="v-filters-clear bouton flat" :class="{\'disabled\': empty}" @click="clear">{{ labels.clear }}</a><a class="v-filters-appy bouton" v-if="!simpleClick" @click="apply">{{ labels.apply }}</a></div></div></div></div>',props:{name:[String],type:[String],value:[String,Number,Object,Boolean],icon:[String],filterLabel:[String],filterOptions:[Array],filterType:[String],hasSelectFilter:[Boolean],clearable:{type:Boolean,default:!0},simpleClick:[Boolean],isNew:[Boolean]},data:function(){return{val:this.value,selectFilter:null,dropped:!1,selectedDate:null,selectedDateStart:null,selectedDateEnd:null,screenSize:"small",locale:"fr-FR",i18n:{fr:{apply:"Appliquer",clear:"Effacer",new:"Nouveau"},en:{apply:"Apply",clear:"Clear",new:"New"},es:{apply:"Aplicar",clear:"Borrar",new:"Nuevo"},eu:{apply:"Aplikatu",clear:"Ezabatzeko",new:"Berria"},de:{apply:"Anwenden",clear:"Entfernen",new:"Neu"}}}},computed:{labels:function(){var e=LGG&&this.i18n[LGG]?LGG:"fr";return this.i18n[e]},filterClass:function(){return{dropped:this.dropped,empty:this.empty}},toggleLabel:function(){if("toggle"===this.filterType)return this.filterLabel;if(!this.val)return this.filterLabel+"...";switch(this.filterType){case"dateRange":if(!this.selectedRange||!this.selectedRange.start)return this.val;var e=this.dateFormat(this.selectedRange.start,!0);if(this.selectedRange.end){var t=this.dateFormat(this.selectedRange.end,!0),i=e;return e!=t&&(i+=" > ",i+=t),i}return i=" > "+e;case"select":return this.val&&this.val.l?this.val.l:this.val;default:return this.val}},dropdownClass:function(){return[this.filterType]},selectedRange:function(){if(!this.selectedDateStart)return null;var e={start:this.selectedDateStart};return this.selectedDateEnd&&(e.end=this.selectedDateEnd),e},calendarColumns:function(){return"large"==this.screenSize?2:1}
1,hasInput:function(){return"select"!==this.filterType},filterOptionsFiltred:function(){var t;if(this.hasSelectFilter&&this.selectFilter){var e=this.selectFilter.toLowerCase(),i=[["a","[àáâãäå]"],["u","[ùúûü]"],["e","[èéêë]"],["c","[ç]"],["o","[ðòóôõö]"],["i","[ìíîï]"],["y","[ýÿ]"]];for(l in i)e=e.replace(RegExp(i[l][1],"g"),i[l][0]);for(var s=[],l=0;l<this.filterOptions.length;l++){var n=Object.assign({},this.filterOptions[l]),a=n.l;if(!(null===a||["string","number","boolean","object"].indexOf(typeof a)<0)&&("object"!=typeof a||"[object "!==a.toString().substr(0,8))){var r=a.toString().toLowerCase();for(j in i)r=r.replace(RegExp(i[j][1],"g"),i[j][0]);-1<r.indexOf(e)&&s.push(n)}}}else s=this.filterOptions.map(function(e){return Object.assign({},e)});return!this.val||(t=(this.val.i||this.val).toString())&&(s=s.map(function(e){return e.s=e.i.toString()===t,e})),s},firstOptionSelectable:function(){if(!this.filterOptionsFiltred||!this.filterOptionsFiltred.length)return!1;var e=this.filterOptionsFiltred.filter(function(e){return!e.d});return e.length?e[0]:null},empty:function(){return!this.val}},methods:{toggle:function(){"toggle"===this.filterType?this.val||(this.val=!0):this.dropped=!this.dropped},close:function(){this.dropped=!1},apply:function(){var e=this.val;this.$emit("apply",e,this.name),this.close()},clear:function(){if(!this.empty)switch(this.filterType){case"dateRange":this.selectedDateStart=null,this.selectedDateEnd=null;break;case"date":this.selectedDate=null;default:this.val=""}},clearApply:function(){this.clear(),this.$nextTick(function(){this.apply()})},checkWinSize:function(){this.screenSize=768<window.innerWidth?"large":"small"},dateFormat:function(e,t){if(e){var i=(i="0"+e.getDate()).substring(i.length-2),s=(s="0"+(e.getMonth()+1)).substring(s.length-2),e=e.getFullYear();return t?i+"/"+s+"/"+e:e+"-"+s+"-"+i}},rangeCalendarDragChange:function(e){e&&e.start&&e.start!=this.selectedDate&&(this.selectedDate=e.start)},clickOut:function(e){var t;e?(t=e.target,(e=this.$el)===t||e.contains(t)||(this.dropped=!1)):this.dropped=!1},selectOption:function(e,t){e.d||e.s||(this.val=e,t&&this.apply())},selectFirstOptionFocus:function(e){this.$refs.firstOption.length&&this.$refs.firstOption[0].focus()},selectOptionNavigation:function(e){var t=e.target;switch(e.key){case"Up":case"ArrowUp":for(var i=t.parentElement.previousSibling;i&&"A"!==i.childNodes[0].nodeName;)i=i.previousSibling;(i?i.childNodes[0]:this.$refs.input).focus();break;case"Down":case"ArrowDown":for(i=t.parentElement.nextSibling;i&&"A"!==i.childNodes[0].nodeName;)i=i.nextSibling;i&&i.childNodes[0].focus()}}},watch:{dropped:function(e){e?(this.$emit("open",this.name),this.$nextTick(function(){this.$refs.input&&this.$refs.input.focus()}.bind(this))):this.$emit("close",this.name)},selectedDate:function(e){var t="";e&&(t=this.dateFormat(e)),this.val=t},selectedDateStart:function(e){e||(this.selectedDateEnd=null)},selectedRange:function(e){var t="";e&&(e.start&&(t+=this.dateFormat(e.start)),e.end&&(t+=":"+this.dateFormat(e.end))),this.val=t},val:function(e){this.$emit("change",e,this.name),this.$emit("input",e,this.name),this.simpleClick&&this.apply()}},mounted:function(){var e;this.locale=LGG+"-"+LGG.toUpperCase(),this.value&&"dateRange"==this.filterType&&(e=this.value.split(":"),this.selectedDateStart=new Date(e[0]),e[1]&&(this.selectedDateEnd=new Date(e[1])));var t=this;$(window).on("resize",function(){t.checkWinSize()}),this.checkWinSize(),document.addEventListener("click",this.clickOut)},destroyed:function(){document.removeEventListener("click",this.clickOut)}};Vue.component("v-filters-item",vFiltersItem);var vFilters={template:'<div class="v-filters"><slot></slot></div>'};Vue.component("v-filters",vFilters);

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.