From ea462c0462d6523a4d74b916e41bb6e0be9e9760 Mon Sep 17 00:00:00 2001 From: Sherri Alexander Date: Tue, 11 Nov 2014 10:26:09 -0500 Subject: [PATCH] Disabling infinite loop on the footer sliders, to disallow swiping if there aren't more items to swipe to (Github issue #29) --- _site/ui/js/scripts-concat.min.js | 4 ++-- _source/ui/js/scripts-concat.js | 3 ++- _source/ui/js/scripts-concat.min.js | 4 ++-- _source/ui/js/scripts.js | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/_site/ui/js/scripts-concat.min.js b/_site/ui/js/scripts-concat.min.js index ee99b4a..6e5f71a 100644 --- a/_site/ui/js/scripts-concat.min.js +++ b/_site/ui/js/scripts-concat.min.js @@ -1,5 +1,5 @@ /*! - * mitartx | version: 0.1.0 | updated: 2014-10-02 @ 1:36:20 PM + * mitartx | version: 0.1.0 | updated: 2014-11-11 @ 10:21:07 AM * Copyright (c) 2014 MIT Hyperstudio */ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.apply(b,arguments)}}var d;if(b=b||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=b.touchBoundary||10,this.layer=a,this.tapDelay=b.tapDelay||200,!FastClick.notNeeded(a)){for(var e=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],f=this,g=0,h=e.length;h>g;g++)f[e[g]]=c(f[e[g]],f);deviceIsAndroid&&(a.addEventListener("mouseover",this.onMouse,!0),a.addEventListener("mousedown",this.onMouse,!0),a.addEventListener("mouseup",this.onMouse,!0)),a.addEventListener("click",this.onClick,!0),a.addEventListener("touchstart",this.onTouchStart,!1),a.addEventListener("touchmove",this.onTouchMove,!1),a.addEventListener("touchend",this.onTouchEnd,!1),a.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(a.removeEventListener=function(b,c,d){var e=Node.prototype.removeEventListener;"click"===b?e.call(a,b,c.hijacked||c,d):e.call(a,b,c,d)},a.addEventListener=function(b,c,d){var e=Node.prototype.addEventListener;"click"===b?e.call(a,b,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(a,b,c,d)}),"function"==typeof a.onclick&&(d=a.onclick,a.addEventListener("click",function(a){d(a)},!1),a.onclick=null)}}function handleAppCache(){return void 0!==applicationCache?applicationCache.status==applicationCache.UPDATEREADY?(applicationCache.swapCache(),void location.reload()):void applicationCache.addEventListener("updateready",handleAppCache,!1):void 0}!function(a,b,c,d){function e(b,c){if(this.element=b,this.options=a.extend(!0,{},h,c),this.options.events.length&&(this.options.events=this.options.multiDayEvents?this.addMultiDayMomentObjectsToEvents(this.options.events):this.addMomentObjectToEvents(this.options.events)),this.month=this.options.startWithMonth?moment(this.options.startWithMonth).startOf("month"):moment().startOf("month"),this.options.constraints){if(this.options.constraints.startDate){var d=moment(this.options.constraints.startDate);this.month.isBefore(d,"month")&&(this.month.set("month",d.month()),this.month.set("year",d.year()))}if(this.options.constraints.endDate){var e=moment(this.options.constraints.endDate);this.month.isAfter(e,"month")&&this.month.set("month",e.month()).set("year",e.year())}}this._defaults=h,this._name=g,this.init()}var f="
previous
<%= month %> <%= year %>
next
<% for(var i = 0; i < daysOfTheWeek.length; i++) { %><% } %><% for(var i = 0; i < numberOfRows; i++){ %><% for(var j = 0; j < 7; j++){ %><% var d = j + i * 7; %><% } %><% } %>
<%= daysOfTheWeek[i] %>
<%= days[d].day %>
",g="clndr",h={template:f,weekOffset:0,startWithMonth:null,clickEvents:{click:null,nextMonth:null,previousMonth:null,nextYear:null,previousYear:null,today:null,onMonthChange:null,onYearChange:null},targets:{nextButton:"clndr-next-button",previousButton:"clndr-previous-button",nextYearButton:"clndr-next-year-button",previousYearButton:"clndr-previous-year-button",todayButton:"clndr-today-button",day:"day",empty:"empty"},events:[],extras:null,dateParameter:"date",multiDayEvents:null,doneRendering:null,render:null,daysOfTheWeek:null,showAdjacentMonths:!0,adjacentDaysChangeMonth:!1,ready:null,constraints:null,forceSixRows:null};e.prototype.init=function(){if(this.daysOfTheWeek=this.options.daysOfTheWeek||[],!this.options.daysOfTheWeek){this.daysOfTheWeek=[];for(var b=0;7>b;b++)this.daysOfTheWeek.push(moment().weekday(b).format("dd").charAt(0))}if(this.options.weekOffset&&(this.daysOfTheWeek=this.shiftWeekdayLabels(this.options.weekOffset)),!a.isFunction(this.options.render)){if(this.options.render=null,"undefined"==typeof _)throw new Error("Underscore was not found. Please include underscore.js OR provide a custom render function.");this.compiledClndrTemplate=_.template(this.options.template)}a(this.element).html("
"),this.calendarContainer=a(".clndr",this.element),this.bindEvents(),this.render(),this.options.ready&&this.options.ready.apply(this,[])},e.prototype.shiftWeekdayLabels=function(a){for(var b=this.daysOfTheWeek,c=0;a>c;c++)b.push(b.shift());return b},e.prototype.createDaysObject=function(b){daysArray=[];var c=b.startOf("month");if(this.eventsLastMonth=[],this.eventsThisMonth=[],this.eventsNextMonth=[],this.options.events.length)if(this.options.multiDayEvents){if(this.eventsThisMonth=a(this.options.events).filter(function(){return this._clndrStartDateObject.format("YYYY-MM")===b.format("YYYY-MM")||this._clndrEndDateObject.format("YYYY-MM")===b.format("YYYY-MM")?!0:this._clndrStartDateObject.format("YYYY-MM")<=b.format("YYYY-MM")&&this._clndrEndDateObject.format("YYYY-MM")>=b.format("YYYY-MM")?!0:!1}).toArray(),this.options.showAdjacentMonths){var d=b.clone().subtract("months",1),e=b.clone().add("months",1);this.eventsLastMonth=a(this.options.events).filter(function(){return this._clndrStartDateObject.format("YYYY-MM")===d.format("YYYY-MM")||this._clndrEndDateObject.format("YYYY-MM")===d.format("YYYY-MM")?!0:this._clndrStartDateObject.format("YYYY-MM")<=d.format("YYYY-MM")&&this._clndrEndDateObject.format("YYYY-MM")>=d.format("YYYY-MM")?!0:!1}).toArray(),this.eventsNextMonth=a(this.options.events).filter(function(){return this._clndrStartDateObject.format("YYYY-MM")===e.format("YYYY-MM")||this._clndrEndDateObject.format("YYYY-MM")===e.format("YYYY-MM")?!0:this._clndrStartDateObject.format("YYYY-MM")<=e.format("YYYY-MM")&&this._clndrEndDateObject.format("YYYY-MM")>=e.format("YYYY-MM")?!0:!1}).toArray()}}else if(this.eventsThisMonth=a(this.options.events).filter(function(){return this._clndrDateObject.format("YYYY-MM")==b.format("YYYY-MM")}).toArray(),this.options.showAdjacentMonths){var d=b.clone().subtract("months",1),e=b.clone().add("months",1);this.eventsLastMonth=a(this.options.events).filter(function(){return this._clndrDateObject.format("YYYY-MM")==d.format("YYYY-MM")}).toArray(),this.eventsNextMonth=a(this.options.events).filter(function(){return this._clndrDateObject.format("YYYY-MM")==e.format("YYYY-MM")}).toArray()}var f=c.weekday()-this.options.weekOffset;if(0>f&&(f+=7),this.options.showAdjacentMonths)for(var g=0;f>g;g++){var h=moment([b.year(),b.month(),g-f+1]);daysArray.push(this.createDayObject(h,this.eventsLastMonth))}else for(var g=0;f>g;g++)daysArray.push(this.calendarDay({classes:this.options.targets.empty+" last-month"}));for(var i=c.daysInMonth(),g=1;i>=g;g++){var h=moment([b.year(),b.month(),g]);daysArray.push(this.createDayObject(h,this.eventsThisMonth))}for(var g=1;daysArray.length%7!==0;){if(this.options.showAdjacentMonths){var h=moment([b.year(),b.month(),i+g]);daysArray.push(this.createDayObject(h,this.eventsNextMonth))}else daysArray.push(this.calendarDay({classes:this.options.targets.empty+" next-month"}));g++}if(this.options.forceSixRows&&42!==daysArray.length)for(var j=moment(daysArray[daysArray.length-1].date).add("days",1);daysArray.length<42;)this.options.showAdjacentMonths?(daysArray.push(this.createDayObject(moment(j),this.eventsNextMonth)),j.add("days",1)):daysArray.push(this.calendarDay({classes:this.options.targets.empty+" next-month"}));return daysArray},e.prototype.createDayObject=function(a,b){var c=[],e=moment(),f=this,g=0,h=b.length;for(g;h>g;g++)if(f.options.multiDayEvents){var i=b[g]._clndrStartDateObject,j=b[g]._clndrEndDateObject;(a.isSame(i,"day")||a.isAfter(i,"day"))&&(a.isSame(j,"day")||a.isBefore(j,"day"))&&c.push(b[g])}else b[g]._clndrDateObject.date()==a.date()&&c.push(b[g]);var k="";return e.format("YYYY-MM-DD")==a.format("YYYY-MM-DD")&&(k+=" today"),a.isBefore(e,"day")&&(k+=" past"),c.length&&(k+=" event"),this.month.month()>a.month()?(k+=" adjacent-month",k+=this.month.year()===a.year()?" last-month":" next-month"):this.month.month()c;c++)a[c]._clndrDateObject=moment(a[c][b.options.dateParameter]);return a},e.prototype.addMultiDayMomentObjectsToEvents=function(a){var b=this,c=0,d=a.length;for(c;d>c;c++)a[c]._clndrStartDateObject=moment(a[c][b.options.multiDayEvents.startDate]),a[c]._clndrEndDateObject=moment(a[c][b.options.multiDayEvents.endDate]);return a},e.prototype.calendarDay=function(b){var c={day:"",classes:this.options.targets.empty,events:[],date:null};return a.extend({},c,b)},a.fn.clndr=function(a){if(1===this.length){if(!this.data("plugin_clndr")){var b=new e(this,a);return this.data("plugin_clndr",b),b}}else if(this.length>1)throw new Error("CLNDR does not support multiple elements yet. Make sure your clndr selector returns only one element.")}}(jQuery,window,document),window.log=function(){if(log.history=log.history||[],log.history.push(arguments),this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);"object"==typeof console.log?log.apply.call(console.log,console,a):console.log.apply(console,a)}},function(a){function b(){}for(var c,d="assert,clear,count,debug,dir,dirxml,error,exception,firebug,group,groupCollapsed,groupEnd,info,log,memoryProfile,memoryProfileEnd,profile,profileEnd,table,time,timeEnd,timeStamp,trace,warn".split(",");c=d.pop();)a[c]=a[c]||b}(function(){try{return console.log(),window.console}catch(a){return window.console={}}}());var deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),deviceIsIOS4=deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),deviceIsIOSWithBadTarget=deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent);FastClick.prototype.needsClick=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(deviceIsIOS&&"file"===a.type||a.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(a.className)},FastClick.prototype.needsFocus=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!deviceIsAndroid;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},FastClick.prototype.sendClick=function(a,b){"use strict";var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},FastClick.prototype.determineEventType=function(a){"use strict";return deviceIsAndroid&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},FastClick.prototype.focus=function(a){"use strict";var b;deviceIsIOS&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},FastClick.prototype.updateScrollParent=function(a){"use strict";var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(a){"use strict";return a.nodeType===Node.TEXT_NODE?a.parentNode:a},FastClick.prototype.onTouchStart=function(a){"use strict";var b,c,d;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],deviceIsIOS){if(d=window.getSelection(),d.rangeCount&&!d.isCollapsed)return!0;if(!deviceIsIOS4){if(c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},FastClick.prototype.onTouchMove=function(a){"use strict";return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},FastClick.prototype.findControl=function(a){"use strict";return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(a){"use strict";var b,c,d,e,f,g=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTime100||deviceIsIOS&&window.top!==window&&"input"===d?(this.targetElement=null,!1):(this.focus(g),this.sendClick(g,a),deviceIsIOS&&"select"===d||(this.targetElement=null,a.preventDefault()),!1);return deviceIsIOS&&!deviceIsIOS4&&(e=g.fastClickScrollParent,e&&e.fastClickLastScrollTop!==e.scrollTop)?!0:(this.needsClick(g)||(a.preventDefault(),this.sendClick(g,a)),!1)},FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(a){"use strict";return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},FastClick.prototype.onClick=function(a){"use strict";var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},FastClick.prototype.destroy=function(){"use strict";var a=this.layer;deviceIsAndroid&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(a){"use strict";var b,c;if("undefined"==typeof window.ontouchstart)return!0;if(c=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!deviceIsAndroid)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(c>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}return"none"===a.style.msTouchAction?!0:!1},FastClick.attach=function(a,b){"use strict";return new FastClick(a,b)},"undefined"!=typeof define&&define.amd?define(function(){"use strict";return FastClick}):"undefined"!=typeof module&&module.exports?(module.exports=FastClick.attach,module.exports.FastClick=FastClick):window.FastClick=FastClick,function(a){var b={},c={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){},onSliderResize:function(){}};a.fn.bxSlider=function(d){if(0==this.length)return this;if(this.length>1)return this.each(function(){a(this).bxSlider(d)}),this;var e={},f=this;b.el=this;var g=a(window).width(),h=a(window).height(),j=function(){e.settings=a.extend({},c,d),e.settings.slideWidth=parseInt(e.settings.slideWidth),e.children=f.children(e.settings.slideSelector),e.children.length1||e.settings.maxSlides>1,e.carousel&&(e.settings.preloadImages="all"),e.minThreshold=e.settings.minSlides*e.settings.slideWidth+(e.settings.minSlides-1)*e.settings.slideMargin,e.maxThreshold=e.settings.maxSlides*e.settings.slideWidth+(e.settings.maxSlides-1)*e.settings.slideMargin,e.working=!1,e.controls={},e.interval=null,e.animProp="vertical"==e.settings.mode?"top":"left",e.usingCSS=e.settings.useCSS&&"fade"!=e.settings.mode&&function(){var a=document.createElement("div"),b=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var c in b)if(void 0!==a.style[b[c]])return e.cssPrefix=b[c].replace("Perspective","").toLowerCase(),e.animProp="-"+e.cssPrefix+"-transform",!0;return!1}(),"vertical"==e.settings.mode&&(e.settings.maxSlides=e.settings.minSlides),f.data("origStyle",f.attr("style")),f.children(e.settings.slideSelector).each(function(){a(this).data("origStyle",a(this).attr("style"))}),k()},k=function(){f.wrap('
'),e.viewport=f.parent(),e.loader=a('
'),e.viewport.prepend(e.loader),f.css({width:"horizontal"==e.settings.mode?100*e.children.length+215+"%":"auto",position:"relative"}),e.usingCSS&&e.settings.easing?f.css("-"+e.cssPrefix+"-transition-timing-function",e.settings.easing):e.settings.easing||(e.settings.easing="swing");q();e.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),e.viewport.parent().css({maxWidth:o()}),e.settings.pager||e.viewport.parent().css({margin:"0 auto 0px"}),e.children.css({"float":"horizontal"==e.settings.mode?"left":"none",listStyle:"none",position:"relative"}),e.children.css("width",p()),"horizontal"==e.settings.mode&&e.settings.slideMargin>0&&e.children.css("marginRight",e.settings.slideMargin),"vertical"==e.settings.mode&&e.settings.slideMargin>0&&e.children.css("marginBottom",e.settings.slideMargin),"fade"==e.settings.mode&&(e.children.css({position:"absolute",zIndex:0,display:"none"}),e.children.eq(e.settings.startSlide).css({zIndex:e.settings.slideZIndex,display:"block"})),e.controls.el=a('
'),e.settings.captions&&z(),e.active.last=e.settings.startSlide==r()-1,e.settings.video&&f.fitVids();var b=e.children.eq(e.settings.startSlide);"all"==e.settings.preloadImages&&(b=e.children),e.settings.ticker?e.settings.pager=!1:(e.settings.pager&&w(),e.settings.controls&&x(),e.settings.auto&&e.settings.autoControls&&y(),(e.settings.controls||e.settings.autoControls||e.settings.pager)&&e.viewport.after(e.controls.el)),l(b,m)},l=function(b,c){var d=b.find("img, iframe").length;if(0==d)return void c();var e=0;b.find("img, iframe").each(function(){a(this).one("load",function(){++e==d&&c()}).each(function(){this.complete&&a(this).load()})})},m=function(){if(e.settings.infiniteLoop&&"fade"!=e.settings.mode&&!e.settings.ticker){var b="vertical"==e.settings.mode?e.settings.minSlides:e.settings.maxSlides,c=e.children.slice(0,b).clone().addClass("bx-clone"),d=e.children.slice(-b).clone().addClass("bx-clone");f.append(c).prepend(d)}e.loader.remove(),t(),"vertical"==e.settings.mode&&(e.settings.adaptiveHeight=!0),e.viewport.height(n()),f.redrawSlider(),e.settings.onSliderLoad(e.active.index),e.initialized=!0,e.settings.responsive&&a(window).bind("resize",Q),e.settings.auto&&e.settings.autoStart&&(r()>1||e.settings.autoSlideForOnePage)&&J(),e.settings.ticker&&K(),e.settings.pager&&F(e.settings.startSlide),e.settings.controls&&I(),e.settings.touchEnabled&&!e.settings.ticker&&M()},n=function(){var b=0,c=a();if("vertical"==e.settings.mode||e.settings.adaptiveHeight)if(e.carousel){var d=1==e.settings.moveSlides?e.active.index:e.active.index*s();for(c=e.children.eq(d),i=1;i<=e.settings.maxSlides-1;i++)c=c.add(d+i>=e.children.length?e.children.eq(i-1):e.children.eq(d+i))}else c=e.children.eq(e.active.index);else c=e.children;return"vertical"==e.settings.mode?(c.each(function(){b+=a(this).outerHeight()}),e.settings.slideMargin>0&&(b+=e.settings.slideMargin*(e.settings.minSlides-1))):b=Math.max.apply(Math,c.map(function(){return a(this).outerHeight(!1)}).get()),"border-box"==e.viewport.css("box-sizing")?b+=parseFloat(e.viewport.css("padding-top"))+parseFloat(e.viewport.css("padding-bottom"))+parseFloat(e.viewport.css("border-top-width"))+parseFloat(e.viewport.css("border-bottom-width")):"padding-box"==e.viewport.css("box-sizing")&&(b+=parseFloat(e.viewport.css("padding-top"))+parseFloat(e.viewport.css("padding-bottom"))),b},o=function(){var a="100%";return e.settings.slideWidth>0&&(a="horizontal"==e.settings.mode?e.settings.maxSlides*e.settings.slideWidth+(e.settings.maxSlides-1)*e.settings.slideMargin:e.settings.slideWidth),a},p=function(){var a=e.settings.slideWidth,b=e.viewport.width();return 0==e.settings.slideWidth||e.settings.slideWidth>b&&!e.carousel||"vertical"==e.settings.mode?a=b:e.settings.maxSlides>1&&"horizontal"==e.settings.mode&&(b>e.maxThreshold||b0)if(e.viewport.width()e.maxThreshold)a=e.settings.maxSlides;else{var b=e.children.first().width()+e.settings.slideMargin;a=Math.floor((e.viewport.width()+e.settings.slideMargin)/b)}else"vertical"==e.settings.mode&&(a=e.settings.minSlides);return a},r=function(){var a=0;if(e.settings.moveSlides>0)if(e.settings.infiniteLoop)a=Math.ceil(e.children.length/s()); @@ -11,5 +11,5 @@ var b=" leaflet-zoom-hide";this.options.markerZoomAnimation||(f.DomUtil.addClass return b&&c>.5&&.5>d?(a.style.visibility="hidden",void this._stopLoadingImages(a)):(b.style.visibility="hidden",b.style[f.DomUtil.TRANSFORM]="",this._tileContainer=b,b=this._bgBuffer=a,this._stopLoadingImages(b),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(a){var b,c,d=a.getElementsByTagName("img"),e=0;for(b=0,c=d.length;c>b;b++)d[b].complete&&e++;return e/c},_stopLoadingImages:function(a){var b,c,d,e=Array.prototype.slice.call(a.getElementsByTagName("img"));for(b=0,c=e.length;c>b;b++)d=e[b],d.complete||(d.onload=f.Util.falseFn,d.onerror=f.Util.falseFn,d.src=f.Util.emptyImageUrl,d.parentNode.removeChild(d))}}),f.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(a){if(a=this._locateOptions=f.extend(this._defaultLocateOptions,a),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var b=f.bind(this._handleGeolocationResponse,this),c=f.bind(this._handleGeolocationError,this);return a.watch?this._locationWatchId=navigator.geolocation.watchPosition(b,c,a):navigator.geolocation.getCurrentPosition(b,c,a),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(a){var b=a.code,c=a.message||(1===b?"permission denied":2===b?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:b,message:"Geolocation error: "+c+"."})},_handleGeolocationResponse:function(a){var b=a.coords.latitude,c=a.coords.longitude,d=new f.LatLng(b,c),e=180*a.coords.accuracy/40075017,g=e/Math.cos(f.LatLng.DEG_TO_RAD*b),h=f.latLngBounds([b-e,c-g],[b+e,c+g]),i=this._locateOptions;if(i.setView){var j=Math.min(this.getBoundsZoom(h),i.maxZoom);this.setView(d,j)}var k={latlng:d,bounds:h,timestamp:a.timestamp};for(var l in a.coords)"number"==typeof a.coords[l]&&(k[l]=a.coords[l]);this.fire("locationfound",k)}})}(window,document)},{}],3:[function(a,b,c){!function(a,b){if("object"==typeof c&&c)b(c);else{var d={};b(d),"function"==typeof define&&define.amd?define(d):a.Mustache=d}}(this,function(a){function b(a,b){return u.call(a,b)}function c(a){return!b(q,a)}function d(a){return"function"==typeof a}function e(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function f(a){return String(a).replace(/[&<>"'\/]/g,function(a){return x[a]})}function g(a){this.string=a,this.tail=a,this.pos=0}function h(a,b){this.view=null==a?{}:a,this.parent=b,this._cache={".":this.view}}function i(){this.clearCache()}function j(b,c,e,f){function g(a){return c.render(a,e)}for(var h,i,k,l="",m=0,n=b.length;n>m;++m)switch(h=b[m],i=h[1],h[0]){case"#":if(k=e.lookup(i),"object"==typeof k||"string"==typeof k)if(w(k))for(var o=0,p=k.length;p>o;++o)l+=j(h[4],c,e.push(k[o]),f);else k&&(l+=j(h[4],c,e.push(k),f));else if(d(k)){var q=null==f?null:f.slice(h[3],h[5]);k=k.call(e.view,q,g),null!=k&&(l+=k)}else k&&(l+=j(h[4],c,e,f));break;case"^":k=e.lookup(i),(!k||w(k)&&0===k.length)&&(l+=j(h[4],c,e,f));break;case">":k=c.getPartial(i),d(k)&&(l+=k(e));break;case"&":k=e.lookup(i),null!=k&&(l+=k);break;case"name":k=e.lookup(i),null!=k&&(l+=a.escape(k));break;case"text":l+=i}return l}function k(a){for(var b,c=[],d=c,e=[],f=0,g=a.length;g>f;++f)switch(b=a[f],b[0]){case"#":case"^":e.push(b),d.push(b),d=b[4]=[];break;case"/":var h=e.pop();h[5]=b[2],d=e.length>0?e[e.length-1][4]:c;break;default:d.push(b)}return c}function l(a){for(var b,c,d=[],e=0,f=a.length;f>e;++e)b=a[e],b&&("text"===b[0]&&c&&"text"===c[0]?(c[1]+=b[1],c[3]=b[3]):(c=b,d.push(b)));return d}function m(a){return[new RegExp(e(a[0])+"\\s*"),new RegExp("\\s*"+e(a[1]))]}function n(b,d){function f(){if(A&&!B)for(;z.length;)delete y[z.pop()];else z=[];A=!1,B=!1}if(b=b||"",d=d||a.tags,"string"==typeof d&&(d=d.split(p)),2!==d.length)throw new Error("Invalid tags: "+d.join(", "));for(var h,i,j,n,q,u,v=m(d),w=new g(b),x=[],y=[],z=[],A=!1,B=!1;!w.eos();){if(h=w.pos,j=w.scanUntil(v[0]))for(var C=0,D=j.length;D>C;++C)n=j.charAt(C),c(n)?z.push(y.length):B=!0,y.push(["text",n,h,h+1]),h+=1,"\n"==n&&f();if(!w.scan(v[0]))break;if(A=!0,i=w.scan(t)||"name",w.scan(o),"="===i?(j=w.scanUntil(r),w.scan(r),w.scanUntil(v[1])):"{"===i?(j=w.scanUntil(new RegExp("\\s*"+e("}"+d[1]))),w.scan(s),w.scanUntil(v[1]),i="&"):j=w.scanUntil(v[1]),!w.scan(v[1]))throw new Error("Unclosed tag at "+w.pos);if(q=[i,j,h,w.pos],y.push(q),"#"===i||"^"===i)x.push(q);else if("/"===i){if(u=x.pop(),!u)throw new Error('Unopened section "'+j+'" at '+h);if(u[1]!==j)throw new Error('Unclosed section "'+u[1]+'" at '+h)}else if("name"===i||"{"===i||"&"===i)B=!0;else if("="===i){if(d=j.split(p),2!==d.length)throw new Error("Invalid tags at "+h+": "+d.join(", "));v=m(d)}}if(u=x.pop())throw new Error('Unclosed section "'+u[1]+'" at '+w.pos);return k(l(y))}var o=/\s*/,p=/\s+/,q=/\S/,r=/\s*=/,s=/\s*\}/,t=/#|\^|\/|>|\{|&|=|!/,u=RegExp.prototype.test,v=Object.prototype.toString,w=Array.isArray||function(a){return"[object Array]"===v.call(a)},x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};g.prototype.eos=function(){return""===this.tail},g.prototype.scan=function(a){var b=this.tail.match(a);if(b&&0===b.index){var c=b[0];return this.tail=this.tail.substring(c.length),this.pos+=c.length,c}return""},g.prototype.scanUntil=function(a){var b,c=this.tail.search(a);switch(c){case-1:b=this.tail,this.tail="";break;case 0:b="";break;default:b=this.tail.substring(0,c),this.tail=this.tail.substring(c)}return this.pos+=b.length,b},h.make=function(a){return a instanceof h?a:new h(a)},h.prototype.push=function(a){return new h(a,this)},h.prototype.lookup=function(a){var b;if(a in this._cache)b=this._cache[a];else{for(var c=this;c;){if(a.indexOf(".")>0){b=c.view;for(var e=a.split("."),f=0;null!=b&&f0?g.toString():null,d(h,p),null,c(k));return j&&("string"==typeof j?l.setRawQuery(j.replace(/[^?&=0-9A-Za-z_\-~.%]/g,e)):l.setAllParameters(j)),l}function c(a){return"string"==typeof a?encodeURIComponent(a):null}function d(a,b){return"string"==typeof a?encodeURI(a).replace(b,e):null}function e(a){var b=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(15&b)}function f(a){return a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/")}function g(a){if(null===a)return null;for(var b,c=f(a),d=l;(b=c.replace(d,"$1"))!=c;c=b);return c}function h(a,b){var c=a.clone(),d=b.hasScheme();d?c.setRawScheme(b.getRawScheme()):d=b.hasCredentials(),d?c.setRawCredentials(b.getRawCredentials()):d=b.hasDomain(),d?c.setRawDomain(b.getRawDomain()):d=b.hasPort();var e=b.getRawPath(),f=g(e);if(d)c.setPort(b.getPort()),f=f&&f.replace(m,"");else if(d=!!e){if(47!==f.charCodeAt(0)){var h=g(c.getRawPath()||"").replace(m,""),i=h.lastIndexOf("/")+1;f=g((i?h.substring(0,i):"")+g(e)).replace(m,"")}}else f=f&&f.replace(m,""),f!==e&&c.setRawPath(f);return d?c.setRawPath(f):d=b.hasQuery(),d?c.setRawQuery(b.getRawQuery()):d=b.hasFragment(),d&&c.setRawFragment(b.getRawFragment()),c}function i(a,b,c,d,e,f,g){this.scheme_=a,this.credentials_=b,this.domain_=c,this.port_=d,this.path_=e,this.query_=f,this.fragment_=g,this.paramCache_=null}function j(a){return"string"==typeof a&&a.length>0?a:null}var k=new RegExp("(/|^)(?:[^./][^/]*|\\.{2,}(?:[^./][^/]*)|\\.{3,}[^/]*)/\\.\\.(?:/|$)"),l=new RegExp(k),m=/^(?:\.\.\/)*(?:\.\.$)?/;i.prototype.toString=function(){var a=[];return null!==this.scheme_&&a.push(this.scheme_,":"),null!==this.domain_&&(a.push("//"),null!==this.credentials_&&a.push(this.credentials_,"@"),a.push(this.domain_),null!==this.port_&&a.push(":",this.port_.toString())),null!==this.path_&&a.push(this.path_),null!==this.query_&&a.push("?",this.query_),null!==this.fragment_&&a.push("#",this.fragment_),a.join("")},i.prototype.clone=function(){return new i(this.scheme_,this.credentials_,this.domain_,this.port_,this.path_,this.query_,this.fragment_)},i.prototype.getScheme=function(){return this.scheme_&&decodeURIComponent(this.scheme_).toLowerCase()},i.prototype.getRawScheme=function(){return this.scheme_},i.prototype.setScheme=function(a){return this.scheme_=d(a,o),this},i.prototype.setRawScheme=function(a){return this.scheme_=a?a:null,this},i.prototype.hasScheme=function(){return null!==this.scheme_},i.prototype.getCredentials=function(){return this.credentials_&&decodeURIComponent(this.credentials_)},i.prototype.getRawCredentials=function(){return this.credentials_},i.prototype.setCredentials=function(a){return this.credentials_=d(a,o),this},i.prototype.setRawCredentials=function(a){return this.credentials_=a?a:null,this},i.prototype.hasCredentials=function(){return null!==this.credentials_},i.prototype.getDomain=function(){return this.domain_&&decodeURIComponent(this.domain_)},i.prototype.getRawDomain=function(){return this.domain_},i.prototype.setDomain=function(a){return this.setRawDomain(a&&encodeURIComponent(a))},i.prototype.setRawDomain=function(a){return this.domain_=a?a:null,this.setRawPath(this.path_)},i.prototype.hasDomain=function(){return null!==this.domain_},i.prototype.getPort=function(){return this.port_&&decodeURIComponent(this.port_)},i.prototype.setPort=function(a){if(a){if(a=Number(a),a!==(65535&a))throw new Error("Bad port number "+a);this.port_=""+a}else this.port_=null;return this},i.prototype.hasPort=function(){return null!==this.port_},i.prototype.getPath=function(){return this.path_&&decodeURIComponent(this.path_)},i.prototype.getRawPath=function(){return this.path_},i.prototype.setPath=function(a){return this.setRawPath(d(a,p))},i.prototype.setRawPath=function(a){return a?(a=String(a),this.path_=!this.domain_||/^\//.test(a)?a:"/"+a):this.path_=null,this},i.prototype.hasPath=function(){return null!==this.path_},i.prototype.getQuery=function(){return this.query_&&decodeURIComponent(this.query_).replace(/\+/g," ")},i.prototype.getRawQuery=function(){return this.query_},i.prototype.setQuery=function(a){return this.paramCache_=null,this.query_=c(a),this},i.prototype.setRawQuery=function(a){return this.paramCache_=null,this.query_=a?a:null,this},i.prototype.hasQuery=function(){return null!==this.query_},i.prototype.setAllParameters=function(a){if("object"==typeof a&&!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1;for(var d in a){var e=a[d];"string"==typeof e&&(b[++c]=d,b[++c]=e)}a=b}this.paramCache_=null;for(var f=[],g="",h=0;hj;){var m=c[j++],q=c[j];switch(m){case"&":M.test(q)?(b.pcdata&&b.pcdata("&"+q,f,V,k(b,c,j,e,f)),j++):b.pcdata&&b.pcdata("&",f,V,k(b,c,j,e,f));break;case""===c[j+1]?(j+=2,i=g[1].toLowerCase(),b.endTag&&b.endTag(i,f,V,k(b,c,j,e,f))):j=n(c,j,b,f,V,e):b.pcdata&&b.pcdata("</",f,V,k(b,c,j,e,f));break;case"<":if(g=/^([-\w:]+)\s*\/?/.exec(q))if(g[0].length===q.length&&">"===c[j+1]){j+=2,i=g[1].toLowerCase(),b.startTag&&b.startTag(i,[],f,V,k(b,c,j,e,f));var r=a.ELEMENTS[i];if(r&U){var s={name:i,next:j,eflags:r};j=p(c,s,b,f,V,e)}}else j=o(c,j,b,f,V,e);else b.pcdata&&b.pcdata("<",f,V,k(b,c,j,e,f));break;case"