PageSourceSearch

https://www.daintreerainforest.com/assets/afc4d900/js/algolia-search.min.js?v6

js daintreerainforest.com collected 2026-09-24 22:33:39 UTC 10,304 bytes, 1 lines download raw bytes

1var ALGOLIA_SEARCH=function(){var e,t,a,i,n,s,r=null,l='<input type="checkbox" name="{{field}}" value="{{value}}" {{checked}} />{{label}} <span>{{count}}</span>',c=function(){r&&(r=null);var e=$('<div class="col-sm-6 special-box-container pl-0"></div>').appendTo($("#search-results"));t=e.width(),a=parseInt(.8*t-20),e.remove()},o=function(e){r&&window.clearTimeout(r),r=window.setTimeout(c,100)},u=function(e,t){var a=e.name.split(":"),i=a.length>1?a[1]:a[0];return l.replace("{{value}}",e.name).replace("{{label}}",i).replace("{{checked}}",e.isRefined?"checked":"").replace("{{count}}",e.count).replace("{{field}}",t)};return{init:function(t){var r,l={};(r=$(".main-content a.btn-login")).length&&(SITE.initLoginCallback(r,(function(){document.location=r.data("url")}),!1),r.trigger("click")),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var a=Object(this),i=a.length>>>0;if(0===i)return!1;for(var n,s,r=0|t,l=Math.max(r>=0?r:i-Math.abs(r),0);l<i;){if((n=a[l])===(s=e)||"number"==typeof n&&"number"==typeof s&&isNaN(n)&&isNaN(s))return!0;l++}return!1}}),i=t.access,n=t.userId,s=t.hostedSite,$(window).on("resize",o),SITE.initDatePickers(),c(),$("#search-results").on("click",".rating-container",(function(e){e.preventDefault();var t=$(this).find("a.rate");t.hasClass("disabled")||(t.siblings(".rating").html('<i class="fa fa-spin fa-spinner"></i>'),$.post(t.data("url")).done((function(e){t.siblings(".rating").text(e.rating),e.disable&&t.addClass("disabled")})))})),body=$("body"),filterButton=$("#filter-btn"),closeButtons=$(".btn-close, .btn-show"),filterButton.on("click",(function(){event.preventDefault(),body.addClass("filter-display"),window.scrollTo(0,0)})),closeButtons.on("click",(function(){event.preventDefault(),body.removeClass("filter-display")})),$("#search-form").on("submit",(function(e){e.preventDefault(),$("html,body").animate({scrollTop:0},"slow")})).on("keyup","input",(function(e){$("#search-keyword").find("input").val(this.value)})),$("#search-keyword").on("keyup","input",(function(e){$("#autocomplete").val(this.value).get(0).dispatchEvent(new Event("input"))})),$("#search-results").on("click","a.btn-clear-search",(function(e){e.preventDefault(),document.location="?q"})),t.hostedSite||n||SITE.initLoginCallback(["#search-results",".btn-login"],(function(){document.location.reload()}),!1),SITE.linkDateRangePickers(".special-start",".special-end"),$("#search-results").on("click","a.offer-spinner",(function(e){SITE.showPleaseWaitModal()})),(e=instantsearch(t.search)).addWidget(instantsearch.widgets.searchBox({container:"#autocomplete"})),t.hostedSite&&(l.root="row",l.item="col-sm-6 mb-3"),e.addWidget(instantsearch.widgets.hits({container:"#search-results",cssClasses:l,templates:{item:$("#search-template").html(),empty:'<div class="alert alert-info no-results"><i class="fa fa-exclamation-triangle"></i> We didn\'t find any results for the search <em>"{{query}}"</em><p class="mt-10"><a href="#" class="btn btn-primary btn-xs btn-clear-search"><i class="fa fa-times"></i> Clear Search</a></p></div>'},transformData:{item:function(e){var t,r=e.price,l=[e.price];if(e.local=null,e.bookDirect=!e.instantBooking&&null===e.bookingRequest,null!==e.memberPrice&&$.inArray("Member",i)>=0&&l.push(e.memberPrice),null!==e.industryPrice&&$.inArray("Industry",i)>=0&&l.push(e.industryPrice),null!==e.localPrice){for(t in i)if("R"==i[t].substring(0,1)&&$.inArray(i[t],e.access)){l.push(e.localPrice);break}if(!n&&e.price&&(null!==e.localPrice&&e.localPrice<e.price||null!==e.memberPrice&&e.memberPrice<e.price||null!==e.industryPrice&&e.industryPrice<e.price))for(t in e.access)if(e.access[t].match(/R[0-9]+R/)){e.local="on";break}}var c=(r=Math.min.apply(null,l)).toFixed(2).split("."),o=c[0],u=c[1];if(e.fullPrice>r?e.price=r<.01?"Free":'<small>FROM</small><span class="full-price">$'+e.fullPrice.toFixed(2)+'</span><sup>$</sup><span class="from-price">'+o+"</span><sup>."+u+"</sup>":r<.01?e.price="Free":e.priceType&&10==e.priceType?e.price='<small>SAVE</small> <span class="from-price">'+r+"%</span>":e.price='<small>FROM</small> <sup>$</sup><span class="from-price">'+o+"</span><sup>."+u+"</sup>",e.page=function(e){var t,i=e;if(e.length<40)return e;if((t=$("#offer-title-sizer").text(e).width())<a)return e;i=e.substring(0,e.length-2);do{e=(i=i.substring(0,i.length-1))+"...",t=$("#offer-title-sizer").text(e).width()}while(t>a&&e.length);return e}(e.page),e.integration_id&&e.vs&&(e.url=e.pageUrl),s&&((t=e.url.split("/")).length>=6&&(t.splice(2,2),e.url=t.join("/")),e.image&&"/"==e.image.substring(0,1)&&(e.image="https://www.tourismtown.com"+e.image),e.groupLogo&&(e.logo=e.groupLogo)),e.stars="",e.starRating&&!isNaN(e.starRating)){for(t=1;t<=e.starRating;t++)e.stars+='<i class="fa fa-star"></i>';e.starRating%1>.4&&(e.stars+='<i class="fa fa-star-half"></i>')}else e.stars=null;return e}}})),e.addWidget(instantsearch.widgets.pagination({container:"#offer-pagination"})),e.addWidget(instantsearch.widgets.toggle({container:"#search-instant",autoHideContainer:!1,attributeName:"instantBooking",label:"Instant Booking",templates:{header:"Availability",item:function(e){var t=e.onFacetValue.count;return null===t&&(t=0),'<label class="ais-toggle--label"><input type="checkbox" class="ais-toggle--checkbox"'+(e.isRefined?' checked="checked"':"")+'> Instant booking <i class="fa fa-bolt"></i></label><span class="ais-toggle--count pull-right">'+t+"</span>"}}})),e.addWidget(instantsearch.widgets.toggle({container:"#search-bnpl",autoHideContainer:!1,attributeName:"bnpl",label:"Book Now Pay Later",templates:{item:function(e){var t=e.onFacetValue.count;return null===t&&(t=0),'<label class="ais-toggle--label"><input type="checkbox" class="ais-toggle--checkbox"'+(e.isRefined?' checked="checked"':"")+'> Book Now Pay Later</label><span class="ais-toggle--count pull-right">'+t+"</span>"}}})),e.addWidget(instantsearch.widgets.rangeSlider({container:"#search-price",attributeName:"price",tooltips:{format:function(e){return"$"+Math.round(e).toLocaleStr
1ing()}},templates:{header:"Price Range"}})),$("#search-locations").length&&e.addWidget({init:function(e){var t=e.helper;$("#search-locations").html('<div class="ais-header">Locations</div><div class="ais-body"></div>').on("change",'input[type="checkbox"]',(function(e){t.clearRefinements("locations"),t.clearRefinements("regions"),$(this).closest("div").find('input[name="region"]:checked').each((function(){t.addDisjunctiveFacetRefinement("regions",this.value),$(this).siblings("ul").find('input[name="location"]:checked').each((function(){t.addDisjunctiveFacetRefinement("locations",this.value)}))})),t.search()}))},render:function(e){var t,a,i=e.state.disjunctiveFacetsRefinements,n=e.results.getFacetValues("regions"),s=e.results.getFacetValues("locations"),r="<ul>";for(t in n)if(!(i&&i.regions&&i.regions.indexOf(n[t].name)<0)){if(r+="<li>"+u(n[t],"region"),n[t].isRefined){for(a in r+="<ul>",s)0==s[a].name.indexOf(n[t].name+":")&&(r+="<li>"+u(s[a],"location")+"</li>");r+="</ul>"}r+="</li>"}r+="</ul>",$("#search-locations").find(".ais-body").html(r)}}),e.addWidget(instantsearch.widgets.refinementList({container:"#search-categories",autoHideContainer:!1,attributeName:"categories",operator:"or",limit:5,showMore:{limit:20,templates:{active:function(){return'<a class="ais-show-more"><i class="fa fa-caret-up"></i> Show Less Categories</a>'},inactive:function(){return'<a class="ais-show-more"><i class="fa fa-caret-down"></i> Show More Categories</a>'}}},templates:{header:"Categories",item:function(e){return'<label><input type="checkbox" class="ais-refinement-list--checkbox" value="'+e.value+'"'+(e.isRefined?' checked="checked"':"")+" /> "+e.label+'</label><span class="ais-refinement-list--count pull-right">'+e.count+"</span>"}},collapsible:!0})),t.hostedSite||e.addWidget(instantsearch.widgets.refinementList({container:"#search-organisations",autoHideContainer:!1,attributeName:"organisation",operator:"or",limit:10,sortBy:["isRefinded","name:asc"],showMore:{templates:{active:function(){return'<a class="ais-show-more"><i class="fa fa-caret-up"></i> Show Less Sellers</a>'},inactive:function(){return'<a class="ais-show-more"><i class="fa fa-caret-down"></i> Show All Sellers</a>'}}},templates:{header:"Sellers",item:function(e){return'<label><input type="checkbox" class="ais-refinement-list--checkbox" value="'+e.value+'"'+(e.isRefined?' checked="checked"':"")+" /> "+e.label+'</label><span class="ais-refinement-list--count">'+e.count+"</span>"}},collapsible:!0})),e.addWidget(instantsearch.widgets.stats({container:"#search-stats",autoHideContainer:!1,templates:{body:function(e){return e.hasNoResults?"No offers found":e.nbHits+" offer"+(e.hasManyResults?"s":"")+" found"}}})),e.addWidget(instantsearch.widgets.stats({container:"#show-offers",autoHideContainer:!1,templates:{body:function(e){return e.hasNoResults?"No offers found":"Show "+e.nbHits+" offer"+(e.hasManyResults?"s":"")}}})),e.addWidget({init:function(e){var a,i,n,s,r,l,c=e.helper,o=$("#search-dates");t.dates.end;a=moment.unix(t.dates.start),o.find(".special-start").data("DateTimePicker").minDate(a),s=c.getNumericRefinement("dates","<="),(n=c.getNumericRefinement("dates",">="))||s||(s=c.getNumericRefinement("travelStart","<="),n=c.getNumericRefinement("travelEnd",">=")),n||s||(n=t.dates.start,s=t.dates.end,c.addNumericRefinement("travelEnd",">=",n),c.addNumericRefinement("travelStart","<=",s)),n&&(n<t.dates.start?n=t.dates.start:a=moment.unix(n),o.find(".special-start").val(a.format("DD/MM/YYYY")).trigger("change")),s&&(i=moment.unix(s),o.find(".special-end").val(i.format("DD/MM/YYYY"))),r=n,l=s,a&&o.find(".special-end").data("DateTimePicker").minDate(a),o.on("dp.change",".special-start,.special-end",(function(e){a=o.find(".special-start").data("DateTimePicker"),n=a.date()&&a.date()._d?parseInt(a.date()._d.getTime()/1e3):null,i=o.find(".special-end").data("DateTimePicker"),s=i.date()&&i.date()._d?parseInt(i.date()._d.getTime()/1e3):null,n==r&&s==l||(c.removeNumericRefinement("travelStart"),c.removeNumericRefinement("travelEnd"),c.removeNumericRefinement("dates"),s&&c.addNumericRefinement("travelStart","<=",s),n&&c.addNumericRefinement("travelEnd",">=",n),c.search())}))}}),e.start()}}}();

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.