/* IBIS Widgets v1.7.3 (http://ibishelp.kayako.com/Knowledgebase/Article/View/1083/213/) */
/* EXTERNAL LIBRARIES */
/* SLICK */
!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'Previous ',nextArrow:'Next ',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i(' ').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("
").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i(" ").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('
').appendTo(e.$slider):e.$slides.wrapAll('
').parent(),e.$list=e.$slideTrack.wrap('
').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.options.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;ir.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(ie.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;en.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&ii.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"},e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0},100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-is.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;ea.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i.998){var a=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(a,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||n)for(var o,l=1/(1-r),h=this._firstPT;h;)o=h.s+h.c,h.c*=l,h.s=o-h.c,h=h._next;return this},_.render=function(t,e,i){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var s,r,n,l,h,_,u,f,c=this._dirty?this.totalDuration():this._totalDuration,p=this._time,d=this._totalTime,m=this._cycle,g=this._duration,v=this._rawPrevTime;if(t>=c-1e-7?(this._totalTime=c,this._cycle=this._repeat,this._yoyo&&0!=(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=g,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(s=!0,r="onComplete",i=i||this._timeline.autoRemoveChildren),0===g&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(0>v||0>=t&&t>=-1e-7||v===a&&"isPause"!==this.data)&&v!==t&&(i=!0,v>a&&(r="onReverseComplete")),this._rawPrevTime=f=!e||t||v===t?t:a)):1e-7>t?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==d||0===g&&v>0)&&(r="onReverseComplete",s=this._reversed),0>t&&(this._active=!1,0===g&&(this._initted||!this.vars.lazy||i)&&(v>=0&&(i=!0),this._rawPrevTime=f=!e||t||v===t?t:a)),this._initted||(i=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(l=g+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&t>=d&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!=(1&this._cycle)&&(this._time=g-this._time),this._time>g?this._time=g:this._time<0&&(this._time=0)),this._easeType?(h=this._time/g,(1===(_=this._easeType)||3===_&&h>=.5)&&(h=1-h),3===_&&(h*=2),1===(u=this._easePower)?h*=h:2===u?h*=h*h:3===u?h*=h*h*h:4===u&&(h*=h*h*h*h),1===_?this.ratio=1-h:2===_?this.ratio=h:this._time/g<.5?this.ratio=h/2:this.ratio=1-h/2):this.ratio=this._ease.getRatio(this._time/g)),p!==this._time||i||m!==this._cycle){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=p,this._totalTime=d,this._rawPrevTime=v,this._cycle=m,o.lazyTweens.push(this),void(this._lazy=[t,e]);this._time&&!s?this.ratio=this._ease.getRatio(this._time/g):s&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==p&&t>=0&&(this._active=!0),0===d&&(2===this._initted&&t>0&&this._init(),this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===g)&&(e||this._callback("onStart"))),n=this._firstPT;n;)n.f?n.t[n.p](n.c*this.ratio+n.s):n.t[n.p]=n.c*this.ratio+n.s,n=n._next;this._onUpdate&&(0>t&&this._startAt&&this._startTime&&this._startAt.render(t,e,i),e||(this._totalTime!==d||r)&&this._callback("onUpdate")),this._cycle!==m&&(e||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),r&&(!this._gc||i)&&(0>t&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,e,i),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this._callback(r),0===g&&this._rawPrevTime===a&&f!==a&&(this._rawPrevTime=0))}else d!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},n.to=function(t,e,i){return new n(t,e,i)},n.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new n(t,e,i)},n.fromTo=function(t,e,i,s){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,new n(t,e,s)},n.staggerTo=n.allTo=function(t,e,a,o,_,f,c){o=o||0;var p,d,m,g,v=0,y=[],T=function(){a.onComplete&&a.onComplete.apply(a.onCompleteScope||this,arguments),_.apply(c||a.callbackScope||this,f||u)},x=a.cycle,w=a.startAt&&a.startAt.cycle;for(h(t)||("string"==typeof t&&(t=i.selector(t)||t),l(t)&&(t=s(t))),t=t||[],0>o&&((t=s(t)).reverse(),o*=-1),p=t.length-1,m=0;p>=m;m++){for(g in d={},a)d[g]=a[g];if(x&&(r(d,t,m),null!=d.duration&&(e=d.duration,delete d.duration)),w){for(g in w=d.startAt={},a.startAt)w[g]=a.startAt[g];r(d.startAt,t,m)}d.delay=v+(d.delay||0),m===p&&_&&(d.onComplete=T),y[m]=new n(t[m],e,d),v+=o}return y},n.staggerFrom=n.allFrom=function(t,e,i,s,r,a,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,n.staggerTo(t,e,i,s,r,a,o)},n.staggerFromTo=n.allFromTo=function(t,e,i,s,r,a,o,l){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,n.staggerTo(t,e,s,r,a,o,l)},n.delayedCall=function(t,e,i,s,r){return new n(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:s,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,useFrames:r,overwrite:0})},n.set=function(t,e){return new n(t,0,e)},n.isTweening=function(t){return i.getTweensOf(t,!0).length>0};var f=function(t,e){for(var s=[],r=0,n=t._first;n;)n instanceof i?s[r++]=n:(e&&(s[r++]=n),r=(s=s.concat(f(n,e))).length),n=n._next;return s},c=n.getAllTweens=function(e){return f(t._rootTimeline,e).concat(f(t._rootFramesTimeline,e))};n.killAll=function(t,i,s,r){null==i&&(i=!0),null==s&&(s=!0);var n,a,o,l=c(0!=r),h=l.length,_=i&&s&&r;for(o=0;h>o;o++)a=l[o],(_||a instanceof e||(n=a.target===a.vars.onComplete)&&s||i&&!n)&&(t?a.totalTime(a._reversed?0:a.totalDuration()):a._enabled(!1,!1))},n.killChildTweensOf=function(t,e){if(null!=t){var r,a,_,u,f,c=o.tweenLookup;if("string"==typeof t&&(t=i.selector(t)||t),l(t)&&(t=s(t)),h(t))for(u=t.length;--u>-1;)n.killChildTweensOf(t[u],e);else{for(_ in r=[],c)for(a=c[_].target.parentNode;a;)a===t&&(r=r.concat(c[_].tweens)),a=a.parentNode;for(f=r.length,u=0;f>u;u++)e&&r[u].totalTime(r[u].totalDuration()),r[u]._enabled(!1,!1)}}};var p=function(t,i,s,r){i=!1!==i,s=!1!==s;for(var n,a,o=c(r=!1!==r),l=i&&s&&r,h=o.length;--h>-1;)a=o[h],(l||a instanceof e||(n=a.target===a.vars.onComplete)&&s||i&&!n)&&a.paused(t)};return n.pauseAll=function(t,e,i){p(!0,t,e,i)},n.resumeAll=function(t,e,i){p(!1,t,e,i)},n.globalTimeScale=function(e){var s=t._rootTimeline,r=i.ticker.time;return arguments.length?(e=e||a,s._startTime=r-(r-s._startTime)*s._timeScale/e,s=t._rootFramesTimeline,r=i.ticker.frame,s._startTime=r-(r-s._startTime)*s._timeScale/e,s._timeScale=t._rootTimeline._timeScale=e,e):s._timeScale},_.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()},_.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()},_.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},_.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},_.totalDuration=function(t){return arguments.length?-1===this._repeat?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},_.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},_.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},_.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},n},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var s=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,s,r=this.vars;for(s in r)i=r[s],l(i)&&-1!==i.join("").indexOf("{self}")&&(r[s]=this._swapSelfInParams(i));l(r.tweens)&&this.add(r.tweens,0,r.align,r.stagger)},r=1e-10,n=i._internals,a=s._internals={},o=n.isSelector,l=n.isArray,h=n.lazyTweens,_=n.lazyRender,u=_gsScope._gsDefine.globals,f=function(t){var e,i={};for(e in t)i[e]=t[e];return i},c=function(t,e,i){var s,r,n=t.cycle;for(s in n)r=n[s],t[s]="function"==typeof r?r.call(e[i],i):r[i%r.length];delete t.cycle},p=a.pauseCallback=function(){},d=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},m=s.prototype=new e;return s.version="1.19.0",m.constructor=s,m.kill()._gc=m._forcingPlayhead=m._hasPause=!1,m.to=function(t,e,s,r){var n=s.repeat&&u.TweenMax||i;return e?this.add(new n(t,e,s),r):this.set(t,s,r)},m.from=function(t,e,s,r){return this.add((s.repeat&&u.TweenMax||i).from(t,e,s),r)},m.fromTo=function(t,e,s,r,n){var a=r.repeat&&u.TweenMax||i;return e?this.add(a.fromTo(t,e,s,r),n):this.set(t,r,n)},m.staggerTo=function(t,e,r,n,a,l,h,_){var u,p,m=new s({onComplete:l,onCompleteParams:h,callbackScope:_,smoothChildTiming:this.smoothChildTiming}),g=r.cycle;for("string"==typeof t&&(t=i.selector(t)||t),o(t=t||[])&&(t=d(t)),0>(n=n||0)&&((t=d(t)).reverse(),n*=-1),p=0;pu;u++)l(f=r[u])&&(f=new s({tweens:f})),this.add(f,h),"string"!=typeof f&&"function"!=typeof f&&("sequence"===a?h=f._startTime+f.totalDuration()/f._timeScale:"start"===a&&(f._startTime-=f.delay())),h+=o;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is not a tween, timeline, function, or string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),(this._gc||this._time===this._duration)&&!this._paused&&this._durationr._startTime;c._timeline;)p&&c._timeline.smoothChildTiming?c.totalTime(c._totalTime,!0):c._gc&&c._enabled(!0,!1),c=c._timeline;return this},m.remove=function(e){if(e instanceof t){this._remove(e,!1);var i=e._timeline=e.vars.useFrames?t._rootFramesTimeline:t._rootTimeline;return e._startTime=(e._paused?e._pauseTime:i._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&l(e)){for(var s=e.length;--s>-1;)this.remove(e[s]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},m._remove=function(t,i){e.prototype._remove.call(this,t,i);var s=this._last;return s?this._time>s._startTime+s._totalDuration/s._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},m.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},m.insert=m.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},m.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},m.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},m.addPause=function(t,e,s,r){var n=i.delayedCall(0,p,s,r||this);return n.vars.onComplete=n.vars.onReverseComplete=e,n.data="isPause",this._hasPause=!0,this.add(n,t)},m.removeLabel=function(t){return delete this._labels[t],this},m.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},m._parseTimeOrLabel=function(e,i,s,r){var n;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&l(r)))for(n=r.length;--n>-1;)r[n]instanceof t&&r[n].timeline===this&&this.remove(r[n]);if("string"==typeof i)return this._parseTimeOrLabel(i,s&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,s);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(-1===(n=e.indexOf("=")))return null==this._labels[e]?s?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(n-1)+"1",10)*Number(e.substr(n+1)),e=n>1?this._parseTimeOrLabel(e.substr(0,n-1),0,s):this.duration()}return Number(e)+i},m.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),!1!==e)},m.stop=function(){return this.paused(!0)},m.gotoAndPlay=function(t,e){return this.play(t,e)},m.gotoAndStop=function(t,e){return this.pause(t,e)},m.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,n,a,o,l,u,f,c=this._dirty?this.totalDuration():this._totalDuration,p=this._time,d=this._startTime,m=this._timeScale,g=this._paused;if(t>=c-1e-7)this._totalTime=this._time=c,this._reversed||this._hasPausedChild()||(n=!0,o="onComplete",l=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=t&&t>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===r)&&this._rawPrevTime!==t&&this._first&&(l=!0,this._rawPrevTime>r&&(o="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=c+1e-4;else if(1e-7>t)if(this._totalTime=this._time=0,(0!==p||0===this._duration&&this._rawPrevTime!==r&&(this._rawPrevTime>0||0>t&&this._rawPrevTime>=0))&&(o="onReverseComplete",n=this._reversed),0>t)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(l=n=!0,o="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(l=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,0===t&&n)for(s=this._first;s&&0===s._startTime;)s._duration||(n=!1),s=s._next;t=0,this._initted||(l=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!e){if(t>=p)for(s=this._first;s&&s._startTime<=t&&!u;)s._duration||"isPause"!==s.data||s.ratio||0===s._startTime&&0===this._rawPrevTime||(u=s),s=s._next;else for(s=this._last;s&&s._startTime>=t&&!u;)s._duration||"isPause"===s.data&&s._rawPrevTime>0&&(u=s),s=s._prev;u&&(this._time=t=u._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=t}if(this._time!==p&&this._first||i||l||u){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==p&&t>0&&(this._active=!0),0===p&&this.vars.onStart&&(0===this._time&&this._duration||e||this._callback("onStart")),(f=this._time)>=p)for(s=this._first;s&&(a=s._next,f===this._time&&(!this._paused||g));)(s._active||s._startTime<=f&&!s._paused&&!s._gc)&&(u===s&&this.pause(),s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,f===this._time&&(!this._paused||g));){if(s._active||s._startTime<=p&&!s._paused&&!s._gc){if(u===s){for(u=s._prev;u&&u.endTime()>this._time;)u.render(u._reversed?u.totalDuration()-(t-u._startTime)*u._timeScale:(t-u._startTime)*u._timeScale,e,i),u=u._prev;u=null,this.pause()}s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)}s=a}this._onUpdate&&(e||(h.length&&_(),this._callback("onUpdate"))),o&&(this._gc||(d===this._startTime||m!==this._timeScale)&&(0===this._time||c>=this.totalDuration())&&(n&&(h.length&&_(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this._callback(o)))}},m._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},m.getChildren=function(t,e,s,r){r=r||-9999999999;for(var n=[],a=this._first,o=0;a;)a._startTime-1;)(s[r].timeline===this||e&&this._contains(s[r]))&&(a[o++]=s[r]);return n&&this._enabled(!1,!0),a},m.recent=function(){return this._recent},m._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},m.shiftChildren=function(t,e,i){i=i||0;for(var s,r=this._first,n=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(s in n)n[s]>=i&&(n[s]+=t);return this._uncache(!0)},m._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,r=!1;--s>-1;)i[s]._kill(t,e)&&(r=!0);return r},m.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},m.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},m._enabled=function(t,i){if(t===this._gc)for(var s=this._first;s;)s._enabled(t,!0),s=s._next;return e.prototype._enabled.call(this,t,i)},m.totalTime=function(e,i,s){this._forcingPlayhead=!0;var r=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,r},m.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},m.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,s=0,r=this._last,n=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>n&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):n=r._startTime,r._startTime<0&&!r._paused&&(s-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),n=0),(i=r._startTime+r._totalDuration/r._timeScale)>s&&(s=i),r=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration}return t&&this.totalDuration()?this.timeScale(this._totalDuration/t):this},m.paused=function(e){if(!e)for(var i=this._first,s=this._time;i;)i._startTime===s&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},m.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},m.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},s},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,e,i){var s=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!0===this.vars.yoyo,this._dirty=!0},r=1e-10,n=e._internals,a=n.lazyTweens,o=n.lazyRender,l=_gsScope._gsDefine.globals,h=new i(null,null,1,0),_=s.prototype=new t;return _.constructor=s,_.kill()._gc=!1,s.version="1.19.0",_.invalidate=function(){return this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},_.addCallback=function(t,i,s,r){return this.add(e.delayedCall(0,t,s,r),i)},_.removeCallback=function(t,e){if(t)if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),s=i.length,r=this._parseTimeOrLabel(e);--s>-1;)i[s]._startTime===r&&i[s]._enabled(!1,!1);return this},_.removePause=function(e){return this.removeCallback(t._internals.pauseCallback,e)},_.tweenTo=function(t,i){i=i||{};var s,r,n,a={ease:h,useFrames:this.usesFrames(),immediateRender:!1},o=i.repeat&&l.TweenMax||e;for(r in i)a[r]=i[r];return a.time=this._parseTimeOrLabel(t),s=Math.abs(Number(a.time)-this._time)/this._timeScale||.001,n=new o(this,s,a),a.onStart=function(){n.target.paused(!0),n.vars.time!==n.target.time()&&s===n.duration()&&n.duration(Math.abs(n.vars.time-n.target.time())/n.target._timeScale),i.onStart&&n._callback("onStart")},n},_.tweenFromTo=function(t,e,i){i=i||{},t=this._parseTimeOrLabel(t),i.startAt={onComplete:this.seek,onCompleteParams:[t],callbackScope:this},i.immediateRender=!1!==i.immediateRender;var s=this.tweenTo(e,i);return s.duration(Math.abs(s.vars.time-t)/this._timeScale||.001)},_.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,n,l,h,_,u,f,c,p=this._dirty?this.totalDuration():this._totalDuration,d=this._duration,m=this._time,g=this._totalTime,v=this._startTime,y=this._timeScale,T=this._rawPrevTime,x=this._paused,w=this._cycle;if(t>=p-1e-7)this._locked||(this._totalTime=p,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(n=!0,h="onComplete",_=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=t&&t>=-1e-7||0>T||T===r)&&T!==t&&this._first&&(_=!0,T>r&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,this._yoyo&&0!=(1&this._cycle)?this._time=t=0:(this._time=d,t=d+1e-4);else if(1e-7>t)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==m||0===d&&T!==r&&(T>0||0>t&&T>=0)&&!this._locked)&&(h="onReverseComplete",n=this._reversed),0>t)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(_=n=!0,h="onReverseComplete"):T>=0&&this._first&&(_=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=d||!e||t||this._rawPrevTime===t?t:r,0===t&&n)for(s=this._first;s&&0===s._startTime;)s._duration||(n=!1),s=s._next;t=0,this._initted||(_=!0)}else if(0===d&&0>T&&(_=!0),this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(u=d+this._repeatDelay,this._cycle=this._totalTime/u>>0,0!==this._cycle&&this._cycle===this._totalTime/u&&t>=g&&this._cycle--,this._time=this._totalTime-this._cycle*u,this._yoyo&&0!=(1&this._cycle)&&(this._time=d-this._time),this._time>d?(this._time=d,t=d+1e-4):this._time<0?this._time=t=0:t=this._time)),this._hasPause&&!this._forcingPlayhead&&!e){if((t=this._time)>=m)for(s=this._first;s&&s._startTime<=t&&!f;)s._duration||"isPause"!==s.data||s.ratio||0===s._startTime&&0===this._rawPrevTime||(f=s),s=s._next;else for(s=this._last;s&&s._startTime>=t&&!f;)s._duration||"isPause"===s.data&&s._rawPrevTime>0&&(f=s),s=s._prev;f&&(this._time=t=f._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==w&&!this._locked){var b=this._yoyo&&0!=(1&w),P=b===(this._yoyo&&0!=(1&this._cycle)),O=this._totalTime,k=this._cycle,S=this._rawPrevTime,R=this._time;if(this._totalTime=w*d,this._cycle0&&(this._active=!0),0===g&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||e||this._callback("onStart")),(c=this._time)>=m)for(s=this._first;s&&(l=s._next,c===this._time&&(!this._paused||x));)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(f===s&&this.pause(),s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=l;else for(s=this._last;s&&(l=s._prev,c===this._time&&(!this._paused||x));){if(s._active||s._startTime<=m&&!s._paused&&!s._gc){if(f===s){for(f=s._prev;f&&f.endTime()>this._time;)f.render(f._reversed?f.totalDuration()-(t-f._startTime)*f._timeScale:(t-f._startTime)*f._timeScale,e,i),f=f._prev;f=null,this.pause()}s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)}s=l}this._onUpdate&&(e||(a.length&&o(),this._callback("onUpdate"))),h&&(this._locked||this._gc||(v===this._startTime||y!==this._timeScale)&&(0===this._time||p>=this.totalDuration())&&(n&&(a.length&&o(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[h]&&this._callback(h)))}else g!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},_.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var s,r,n=[],a=this.getChildren(t,e,i),o=0,l=a.length;for(s=0;l>s;s++)(r=a[s]).isActive()&&(n[o++]=r);return n},_.getLabelAfter=function(t){t||0!==t&&(t=this._time);var e,i=this.getLabelsArray(),s=i.length;for(e=0;s>e;e++)if(i[e].time>t)return i[e].name;return null},_.getLabelBefore=function(t){null==t&&(t=this._time);for(var e=this.getLabelsArray(),i=e.length;--i>-1;)if(e[i].timethis._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},_.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},_.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},_.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},_.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},s},!0),t=180/Math.PI,e=[],i=[],s=[],r={},n=_gsScope._gsDefine.globals,a=function(t,e,i,s){i===s&&(i=s-(s-e)/1e6),t===e&&(e=t+(i-t)/1e6),this.a=t,this.b=e,this.c=i,this.d=s,this.da=s-t,this.ca=i-t,this.ba=e-t},o=function(t,e,i,s){var r={a:t},n={},a={},o={c:s},l=(t+e)/2,h=(e+i)/2,_=(i+s)/2,u=(l+h)/2,f=(h+_)/2,c=(f-u)/8;return r.b=l+(t-l)/4,n.b=u+c,r.c=n.a=(r.b+n.b)/2,n.c=a.a=(u+f)/2,a.b=f-c,o.b=_+(s-_)/4,a.c=o.a=(a.b+o.b)/2,[r,n,a,o]},l=function(t,r,n,a,l){var h,_,u,f,c,p,d,m,g,v,y,T,x,w=t.length-1,b=0,P=t[0].a;for(h=0;w>h;h++)_=(c=t[b]).a,u=c.d,f=t[b+1].d,l?(y=e[h],x=((T=i[h])+y)*r*.25/(a?.5:s[h]||.5),m=u-((p=u-(u-_)*(a?.5*r:0!==y?x/y:0))+(((d=u+(f-u)*(a?.5*r:0!==T?x/T:0))-p)*(3*y/(y+T)+.5)/4||0))):m=u-((p=u-(u-_)*r*.5)+(d=u+(f-u)*r*.5))/2,p+=m,d+=m,c.c=g=p,c.b=0!==h?P:P=c.a+.6*(c.c-c.a),c.da=u-_,c.ca=g-_,c.ba=P-_,n?(v=o(_,P,g,u),t.splice(b,1,v[0],v[1],v[2],v[3]),b+=4):b++,P=d;(c=t[b]).b=P,c.c=P+.4*(c.d-P),c.da=c.d-c.a,c.ca=c.c-c.a,c.ba=P-c.a,n&&(v=o(c.a,P,c.c,c.d),t.splice(b,1,v[0],v[1],v[2],v[3]))},h=function(t,s,r,n){var o,l,h,_,u,f,c=[];if(n)for(l=(t=[n].concat(t)).length;--l>-1;)"string"==typeof(f=t[l][s])&&"="===f.charAt(1)&&(t[l][s]=n[s]+Number(f.charAt(0)+f.substr(2)));if(0>(o=t.length-2))return c[0]=new a(t[0][s],0,0,t[-1>o?0:1][s]),c;for(l=0;o>l;l++)h=t[l][s],_=t[l+1][s],c[l]=new a(h,0,0,_),r&&(u=t[l+2][s],e[l]=(e[l]||0)+(_-h)*(_-h),i[l]=(i[l]||0)+(u-_)*(u-_));return c[l]=new a(t[l][s],0,0,t[l+1][s]),c},_=function(t,n,a,o,_,u){var f,c,p,d,m,g,v,y,T={},x=[],w=u||t[0];for(c in _="string"==typeof _?","+_+",":",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",null==n&&(n=1),t[0])x.push(c);if(t.length>1){for(y=t[t.length-1],v=!0,f=x.length;--f>-1;)if(c=x[f],Math.abs(w[c]-y[c])>.05){v=!1;break}v&&(t=t.concat(),u&&t.unshift(u),t.push(t[1]),u=t[t.length-3])}for(e.length=i.length=s.length=0,f=x.length;--f>-1;)c=x[f],r[c]=-1!==_.indexOf(","+c+","),T[c]=h(t,c,r[c],u);for(f=e.length;--f>-1;)e[f]=Math.sqrt(e[f]),i[f]=Math.sqrt(i[f]);if(!o){for(f=x.length;--f>-1;)if(r[c])for(g=(p=T[x[f]]).length-1,d=0;g>d;d++)m=p[d+1].da/i[d]+p[d].da/e[d]||0,s[d]=(s[d]||0)+m*m;for(f=s.length;--f>-1;)s[f]=Math.sqrt(s[f])}for(f=x.length,d=a?4:1;--f>-1;)p=T[c=x[f]],l(p,n,a,o,r[c]),v&&(p.splice(0,d),p.splice(p.length-d,d));return T},u=function(t,e,i){var s,r,n,o,l,h,_,u,f,c,p,d={},m="cubic"===(e=e||"soft")?3:2,g="soft"===e,v=[];if(g&&i&&(t=[i].concat(t)),null==t||t.length-1;){for(d[f=v[h]]=l=[],c=0,u=t.length,_=0;u>_;_++)s=null==i?t[_][f]:"string"==typeof(p=t[_][f])&&"="===p.charAt(1)?i[f]+Number(p.charAt(0)+p.substr(2)):Number(p),g&&_>1&&u-1>_&&(l[c++]=(s+l[c-2])/2),l[c++]=s;for(u=c-m+1,c=0,_=0;u>_;_+=m)s=l[_],r=l[_+1],n=l[_+2],o=2===m?0:l[_+3],l[c++]=p=3===m?new a(s,r,n,o):new a(s,(2*r+s)/3,(2*r+n)/3,n);l.length=c}return d},f=function(t,e,i){for(var s,r,n,a,o,l,h,_,u,f,c,p=1/i,d=t.length;--d>-1;)for(n=(f=t[d]).a,a=f.d-n,o=f.c-n,l=f.b-n,s=r=0,_=1;i>=_;_++)s=r-(r=((h=p*_)*h*a+3*(u=1-h)*(h*o+u*l))*h),e[c=d*i+_-1]=(e[c]||0)+s*s},c=function(t,e){var i,s,r,n,a=[],o=[],l=0,h=0,_=(e=e>>0||6)-1,u=[],c=[];for(i in t)f(t[i],a,e);for(r=a.length,s=0;r>s;s++)l+=Math.sqrt(a[s]),c[n=s%e]=l,n===_&&(h+=l,u[n=s/e>>0]=c,o[n]=h,l=0,c=[]);return{length:h,lengths:o,segments:u}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.7",API:2,global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._mod={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var s,r,n,a,o,l=e.values||[],h={},f=l[0],p=e.autoRotate||i.vars.orientToBezier;for(s in this._autoRotate=p?p instanceof Array?p:[["x","y","rotation",!0===p?0:Number(p)||0]]:null,f)this._props.push(s);for(n=this._props.length;--n>-1;)s=this._props[n],this._overwriteProps.push(s),r=this._func[s]="function"==typeof t[s],h[s]=r?t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)]():parseFloat(t[s]),o||h[s]!==l[0][s]&&(o=h);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?_(l,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,o):u(l,e.type,h),this._segCount=this._beziers[s].length,this._timeRes){var d=c(this._beziers,this._timeRes);this._length=d.length,this._lengths=d.lengths,this._segments=d.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(p=this._autoRotate)for(this._initialRotations=[],p[0]instanceof Array||(this._autoRotate=p=[p]),n=p.length;--n>-1;){for(a=0;3>a;a++)s=p[n][a],this._func[s]="function"==typeof t[s]&&t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)];s=p[n][2],this._initialRotations[n]=(this._func[s]?this._func[s].call(this._target):this._target[s])||0,this._overwriteProps.push(s)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var i,s,r,n,a,o,l,h,_,u,f=this._segCount,c=this._func,p=this._target,d=e!==this._startRatio;if(this._timeRes){if(_=this._lengths,u=this._curSeg,e*=this._length,r=this._li,e>this._l2&&f-1>r){for(h=f-1;h>r&&(this._l2=_[++r])<=e;);this._l1=_[r-1],this._li=r,this._curSeg=u=this._segments[r],this._s2=u[this._s1=this._si=0]}else if(e0){for(;r>0&&(this._l1=_[--r])>=e;);0===r&ðis._s2&&rr&&(this._s2=u[++r])<=e;);this._s1=u[r-1],this._si=r}else if(e0){for(;r>0&&(this._s1=u[--r])>=e;);0===r&&ee?0:e>=1?f-1:f*e>>0)*(1/f))*f;for(s=1-o,r=this._props.length;--r>-1;)n=this._props[r],l=(o*o*(a=this._beziers[n][i]).da+3*s*(o*a.ca+s*a.ba))*o+a.a,this._mod[n]&&(l=this._mod[n](l,p)),c[n]?p[n](l):p[n]=l;if(this._autoRotate){var m,g,v,y,T,x,w,b=this._autoRotate;for(r=b.length;--r>-1;)n=b[r][2],x=b[r][3]||0,w=!0===b[r][4]?1:t,a=this._beziers[b[r][0]],m=this._beziers[b[r][1]],a&&m&&(a=a[i],m=m[i],g=a.a+(a.b-a.a)*o,g+=((y=a.b+(a.c-a.b)*o)-g)*o,y+=(a.c+(a.d-a.c)*o-y)*o,v=m.a+(m.b-m.a)*o,v+=((T=m.b+(m.c-m.b)*o)-v)*o,T+=(m.c+(m.d-m.c)*o-T)*o,l=d?Math.atan2(T-v,y-g)*w+x:this._initialRotations[r],this._mod[n]&&(l=this._mod[n](l,p)),c[n]?p[n](l):p[n]=l)}}}),d=p.prototype,p.bezierThrough=_,p.cubicToQuadratic=o,p._autoCSS=!0,p.quadraticToCubic=function(t,e,i){return new a(t,(2*e+t)/3,(2*e+i)/3,i)},p._cssRegister=function(){var t=n.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,s=e._setPluginRatio,r=e.CSSPropTween;e._registerComplexSpecialProp("bezier",{parser:function(t,e,n,a,o,l){e instanceof Array&&(e={values:e}),l=new p;var h,_,u,f=e.values,c=f.length-1,d=[],m={};if(0>c)return o;for(h=0;c>=h;h++)u=i(t,f[h],a,o,l,c!==h),d[h]=u.end;for(_ in e)m[_]=e[_];return m.values=d,(o=new r(t,"bezier",0,0,u.pt,2)).data=u,o.plugin=l,o.setRatio=s,0===m.autoRotate&&(m.autoRotate=!0),!m.autoRotate||m.autoRotate instanceof Array||(h=!0===m.autoRotate?0:Number(m.autoRotate),m.autoRotate=null!=u.end.left?[["left","top","rotation",h,!1]]:null!=u.end.x&&[["x","y","rotation",h,!1]]),m.autoRotate&&(a._transform||a._enableTransforms(!1),u.autoRotate=a._target._gsTransform,u.proxy.rotation=u.autoRotate.rotation||0,a._overwriteProps.push("rotation")),l._onInitTween(u.proxy,m,a._tween),o}})}},d._mod=function(t){for(var e,i=this._overwriteProps,s=i.length;--s>-1;)(e=t[i[s]])&&"function"==typeof e&&(this._mod[i[s]]=e)},d._kill=function(t){var e,i,s=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=s.length;--i>-1;)s[i]===e&&s.splice(i,1);if(s=this._autoRotate)for(i=s.length;--i>-1;)t[s[i][2]]&&s.splice(i,1);return this._super._kill.call(this,t)},_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){var i,s,r,n,a=function(){t.call(this,"css"),this._overwriteProps.length=0,this.setRatio=a.prototype.setRatio},o=_gsScope._gsDefine.globals,l={},h=a.prototype=new t("css");h.constructor=a,a.version="1.19.0",a.API=2,a.defaultTransformPerspective=0,a.defaultSkewType="compensated",a.defaultSmoothOrigin=!0,h="px",a.suffixMap={top:h,right:h,bottom:h,left:h,width:h,height:h,fontSize:h,padding:h,margin:h,perspective:h,lineHeight:""};var _,u,f,c,p,d,m,g,v=/(?:\-|\.|\b)(\d|\.|e\-)+/g,y=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,T=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,x=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,b=/opacity *= *([^)]*)/i,P=/opacity:([^;]*)/i,O=/alpha\(opacity *=.+?\)/i,k=/^(rgb|hsl)/,S=/([A-Z])/g,R=/-([a-z])/gi,A=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,C=function(t,e){return e.toUpperCase()},D=/(?:Left|Right|Width)/i,M=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,F=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,z=/,(?=[^\)]*(?:\(|$))/gi,X=/[\s,\(]/i,I=Math.PI/180,N=180/Math.PI,L={},E=document,Y=function(t){return E.createElementNS?E.createElementNS("http://www.w3.org/1999/xhtml",t):E.createElement(t)},B=Y("div"),j=Y("img"),U=a._internals={_specialProps:l},V=navigator.userAgent,q=function(){var t=V.indexOf("Android"),e=Y("a");return f=-1!==V.indexOf("Safari")&&-1===V.indexOf("Chrome")&&(-1===t||Number(V.substr(t+8,1))>3),p=f&&Number(V.substr(V.indexOf("Version/")+8,1))<6,c=-1!==V.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(V)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(V))&&(d=parseFloat(RegExp.$1)),!!e&&(e.style.cssText="top:1px;opacity:.55;",/^0.55/.test(e.style.opacity))}(),W=function(t){return b.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Z=function(t){window.console&&console.log(t)},G="",$="",Q=function(t,e){var i,s,r=(e=e||B).style;if(void 0!==r[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],s=5;--s>-1&&void 0===r[i[s]+t];);return s>=0?(G="-"+($=3===s?"ms":i[s]).toLowerCase()+"-",$+t):null},H=E.defaultView?E.defaultView.getComputedStyle:function(){},K=a.getStyle=function(t,e,i,s,r){var n;return q||"opacity"!==e?(!s&&t.style[e]?n=t.style[e]:(i=i||H(t))?n=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(S,"-$1").toLowerCase()):t.currentStyle&&(n=t.currentStyle[e]),null==r||n&&"none"!==n&&"auto"!==n&&"auto auto"!==n?n:r):W(t)},J=U.convertToPixels=function(t,i,s,r,n){if("px"===r||!r)return s;if("auto"===r||!s)return 0;var o,l,h,_=D.test(i),u=t,f=B.style,c=0>s,p=1===s;if(c&&(s=-s),p&&(s*=100),"%"===r&&-1!==i.indexOf("border"))o=s/100*(_?t.clientWidth:t.clientHeight);else{if(f.cssText="border:0 solid red;position:"+K(t,"position")+";line-height:0;","%"!==r&&u.appendChild&&"v"!==r.charAt(0)&&"rem"!==r)f[_?"borderLeftWidth":"borderTopWidth"]=s+r;else{if(l=(u=t.parentNode||E.body)._gsCache,h=e.ticker.frame,l&&_&&l.time===h)return l.width*s/100;f[_?"width":"height"]=s+r}u.appendChild(B),o=parseFloat(B[_?"offsetWidth":"offsetHeight"]),u.removeChild(B),_&&"%"===r&&!1!==a.cacheWidths&&((l=u._gsCache=u._gsCache||{}).time=h,l.width=o/s*100),0!==o||n||(o=J(t,i,s,r,!0))}return p&&(o/=100),c?-o:o},tt=U.calculateOffset=function(t,e,i){if("absolute"!==K(t,"position",i))return 0;var s="left"===e?"Left":"Top",r=K(t,"margin"+s,i);return t["offset"+s]-(J(t,e,parseFloat(r),r.replace(w,""))||0)},et=function(t,e){var i,s,r,n={};if(e=e||H(t,null))if(i=e.length)for(;--i>-1;)(-1===(r=e[i]).indexOf("-transform")||Rt===r)&&(n[r.replace(R,C)]=e.getPropertyValue(r));else for(i in e)(-1===i.indexOf("Transform")||St===i)&&(n[i]=e[i]);else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===n[i]&&(n[i.replace(R,C)]=e[i]);return q||(n.opacity=W(t)),s=Yt(t,e,!1),n.rotation=s.rotation,n.skewX=s.skewX,n.scaleX=s.scaleX,n.scaleY=s.scaleY,n.x=s.x,n.y=s.y,Ct&&(n.z=s.z,n.rotationX=s.rotationX,n.rotationY=s.rotationY,n.scaleZ=s.scaleZ),n.filters&&delete n.filters,n},it=function(t,e,i,s,r){var n,a,o,l={},h=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(n=i[a])||r&&r[a])&&-1===a.indexOf("Origin")&&("number"==typeof n||"string"==typeof n)&&(l[a]="auto"!==n||"left"!==a&&"top"!==a?""!==n&&"auto"!==n&&"none"!==n||"string"!=typeof e[a]||""===e[a].replace(x,"")?n:0:tt(t,a),void 0!==h[a]&&(o=new gt(h,a,h[a],o)));if(s)for(a in s)"className"!==a&&(l[a]=s[a]);return{difs:l,firstMPT:o}},st={width:["Left","Right"],height:["Top","Bottom"]},rt=["marginLeft","marginRight","marginTop","marginBottom"],nt=function(t,e,i){if("svg"===(t.nodeName+"").toLowerCase())return(i||H(t))[e]||0;if(t.getBBox&&Nt(t))return t.getBBox()[e]||0;var s=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),r=st[e],n=r.length;for(i=i||H(t,null);--n>-1;)s-=parseFloat(K(t,"padding"+r[n],i,!0))||0,s-=parseFloat(K(t,"border"+r[n]+"Width",i,!0))||0;return s},at=function(t,e){if("contain"===t||"auto"===t||"auto auto"===t)return t+" ";(null==t||""===t)&&(t="0 0");var i,s=t.split(" "),r=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":s[0],n=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":s[1];if(s.length>3&&!e){for(s=t.split(", ").join(",").split(","),t=[],i=0;i2?" "+s[2]:""),e&&(e.oxp=-1!==r.indexOf("%"),e.oyp=-1!==n.indexOf("%"),e.oxr="="===r.charAt(1),e.oyr="="===n.charAt(1),e.ox=parseFloat(r.replace(x,"")),e.oy=parseFloat(n.replace(x,"")),e.v=t),e||t},ot=function(t,e){return"function"==typeof t&&(t=t(g,m)),"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)||0},lt=function(t,e){return"function"==typeof t&&(t=t(g,m)),null==t?e:"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2))+e:parseFloat(t)||0},ht=function(t,e,i,s){var r,n,a,o,l;return"function"==typeof t&&(t=t(g,m)),null==t?o=e:"number"==typeof t?o=t:(r=360,n=t.split("_"),a=((l="="===t.charAt(1))?parseInt(t.charAt(0)+"1",10)*parseFloat(n[0].substr(2)):parseFloat(n[0]))*(-1===t.indexOf("rad")?1:N)-(l?0:e),n.length&&(s&&(s[i]=e+a),-1!==t.indexOf("short")&&((a%=r)!==a%180&&(a=0>a?a+r:a-r)),-1!==t.indexOf("_cw")&&0>a?a=(a+9999999999*r)%r-(a/r|0)*r:-1!==t.indexOf("ccw")&&a>0&&(a=(a-9999999999*r)%r-(a/r|0)*r)),o=e+a),1e-6>o&&o>-1e-6&&(o=0),o},_t={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ut=function(t,e,i){return 255*(1>6*(t=0>t?t+1:t>1?t-1:t)?e+(i-e)*t*6:.5>t?i:2>3*t?e+(i-e)*(2/3-t)*6:e)+.5|0},ft=a.parseColor=function(t,e){var i,s,r,n,a,o,l,h,_,u,f;if(t)if("number"==typeof t)i=[t>>16,t>>8&255,255&t];else{if(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),_t[t])i=_t[t];else if("#"===t.charAt(0))4===t.length&&(s=t.charAt(1),r=t.charAt(2),n=t.charAt(3),t="#"+s+s+r+r+n+n),i=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t];else if("hsl"===t.substr(0,3))if(i=f=t.match(v),e){if(-1!==t.indexOf("="))return t.match(y)}else a=Number(i[0])%360/360,o=Number(i[1])/100,s=2*(l=Number(i[2])/100)-(r=.5>=l?l*(o+1):l+o-l*o),i.length>3&&(i[3]=Number(t[3])),i[0]=ut(a+1/3,s,r),i[1]=ut(a,s,r),i[2]=ut(a-1/3,s,r);else i=t.match(v)||_t.transparent;i[0]=Number(i[0]),i[1]=Number(i[1]),i[2]=Number(i[2]),i.length>3&&(i[3]=Number(i[3]))}else i=_t.black;return e&&!f&&(s=i[0]/255,r=i[1]/255,n=i[2]/255,l=((h=Math.max(s,r,n))+(_=Math.min(s,r,n)))/2,h===_?a=o=0:(u=h-_,o=l>.5?u/(2-h-_):u/(h+_),a=h===s?(r-n)/u+(n>r?6:0):h===r?(n-s)/u+2:(s-r)/u+4,a*=60),i[0]=a+.5|0,i[1]=100*o+.5|0,i[2]=100*l+.5|0),i},ct=function(t,e){var i,s,r,n=t.match(pt)||[],a=0,o=n.length?"":t;for(i=0;i0?a[0].replace(v,""):"";return _?r=e?function(t){var e,f,c,p;if("number"==typeof t)t+=u;else if(s&&z.test(t)){for(p=t.replace(z,"|").split("|"),c=0;cc--)for(;++c<_;)f[c]=i?f[(c-1)/2|0]:a[c];return o+f.join(h)+h+e+l+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,n,f;if("number"==typeof t)t+=u;else if(s&&z.test(t)){for(n=t.replace(z,"|").split("|"),f=0;ff--)for(;++f<_;)e[f]=i?e[(f-1)/2|0]:a[f];return o+e.join(h)+l}:function(t){return t}},mt=function(t){return t=t.split(","),function(e,i,s,r,n,a,o){var l,h=(i+"").split(" ");for(o={},l=0;4>l;l++)o[t[l]]=h[l]=h[l]||h[(l-1)/2>>0];return r.parse(e,o,n,a)}},gt=(U._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,s,r,n,a=this.data,o=a.proxy,l=a.firstMPT;l;)e=o[l.v],l.r?e=Math.round(e):1e-6>e&&e>-1e-6&&(e=0),l.t[l.p]=e,l=l._next;if(a.autoRotate&&(a.autoRotate.rotation=a.mod?a.mod(o.rotation,this.t):o.rotation),1===t||0===t)for(l=a.firstMPT,n=1===t?"e":"b";l;){if((i=l.t).type){if(1===i.type){for(r=i.xs0+i.s+i.xs1,s=1;s0;)l="xn"+a,c[o=s.p+"_"+l]=s.data[l],f[o]=s[l],n||(h=new gt(s,l,o,h,s.rxp[l]));s=s._next}return{proxy:f,end:c,firstMPT:h,pt:_}},U.CSSPropTween=function(t,e,s,r,a,o,l,h,_,u,f){this.t=t,this.p=e,this.s=s,this.c=r,this.n=l||e,t instanceof vt||n.push(this.n),this.r=h,this.type=o||0,_&&(this.pr=_,i=!0),this.b=void 0===u?s:u,this.e=void 0===f?s+r:f,a&&(this._next=a,a._prev=this)}),yt=function(t,e,i,s,r,n){var a=new vt(t,e,i,s-i,r,-1,n);return a.b=i,a.e=a.xs0=s,a},Tt=a.parseComplex=function(t,e,i,s,r,n,o,l,h,u){i=i||n||"","function"==typeof s&&(s=s(g,m)),o=new vt(t,e,0,0,o,u?2:1,null,!1,l,i,s),s+="",r&&pt.test(s+i)&&(s=[i,s],a.colorStringFilter(s),i=s[0],s=s[1]);var f,c,p,d,T,x,w,b,P,O,k,S,R,A=i.split(", ").join(",").split(" "),C=s.split(", ").join(",").split(" "),D=A.length,M=!1!==_;for((-1!==s.indexOf(",")||-1!==i.indexOf(","))&&(A=A.join(" ").replace(z,", ").split(" "),C=C.join(" ").replace(z,", ").split(" "),D=A.length),D!==C.length&&(D=(A=(n||"").split(" ")).length),o.plugin=h,o.setRatio=u,pt.lastIndex=0,f=0;D>f;f++)if(d=A[f],T=C[f],(b=parseFloat(d))||0===b)o.appendXtra("",b,ot(T,b),T.replace(y,""),M&&-1!==T.indexOf("px"),!0);else if(r&&pt.test(d))S=")"+((S=T.indexOf(")")+1)?T.substr(S):""),R=-1!==T.indexOf("hsl")&&q,d=ft(d,R),T=ft(T,R),(P=d.length+T.length>6)&&!q&&0===T[3]?(o["xs"+o.l]+=o.l?" transparent":"transparent",o.e=o.e.split(C[f]).join("transparent")):(q||(P=!1),R?o.appendXtra(P?"hsla(":"hsl(",d[0],ot(T[0],d[0]),",",!1,!0).appendXtra("",d[1],ot(T[1],d[1]),"%,",!1).appendXtra("",d[2],ot(T[2],d[2]),P?"%,":"%"+S,!1):o.appendXtra(P?"rgba(":"rgb(",d[0],T[0]-d[0],",",!0,!0).appendXtra("",d[1],T[1]-d[1],",",!0).appendXtra("",d[2],T[2]-d[2],P?",":S,!0),P&&(d=d.length<4?1:d[3],o.appendXtra("",d,(T.length<4?1:T[3])-d,S,!1))),pt.lastIndex=0;else if(x=d.match(v)){if(!(w=T.match(y))||w.length!==x.length)return o;for(p=0,c=0;c0;)h["xn"+xt]=0,h["xs"+xt]="";h.xs0="",h._next=h._prev=h.xfirst=h.data=h.plugin=h.setRatio=h.rxp=null,h.appendXtra=function(t,e,i,s,r,n){var a=this,o=a.l;return a["xs"+o]+=n&&(o||a["xs"+o])?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=s||"",o>0?(a.data["xn"+o]=e+i,a.rxp["xn"+o]=r,a["xn"+o]=e,a.plugin||(a.xfirst=new vt(a,"xn"+o,e,i,a.xfirst||a,0,a.n,r,a.pr),a.xfirst.xs0=0),a):(a.data={s:e+i},a.rxp={},a.s=e,a.c=i,a.r=r,a)):(a["xs"+o]+=e+(s||""),a)};var wt=function(t,e){e=e||{},this.p=e.prefix&&Q(t)||t,l[t]=l[this.p]=this,this.format=e.formatter||dt(e.defaultValue,e.color,e.collapsible,e.multi),e.parser&&(this.parse=e.parser),this.clrs=e.color,this.multi=e.multi,this.keyword=e.keyword,this.dflt=e.defaultValue,this.pr=e.priority||0},bt=U._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var s,r=t.split(","),n=e.defaultValue;for(i=i||[n],s=0;so.length?l.length:o.length,a=0;h>a;a++)e=o[a]=o[a]||this.dflt,i=l[a]=l[a]||this.dflt,f&&((_=e.indexOf(f))!==(u=i.indexOf(f))&&(-1===u?o[a]=o[a].split(f).join(""):-1===_&&(o[a]+=" "+f)));e=o.join(", "),i=l.join(", ")}return Tt(t,this.p,e,i,this.clrs,this.dflt,s,this.pr,r,n)},h.parse=function(t,e,i,s,n,a,o){return this.parseComplex(t.style,this.format(K(t,this.p,r,!1,this.dflt)),this.format(e),n,a)},a.registerSpecialProp=function(t,e,i){bt(t,{parser:function(t,s,r,n,a,o,l){var h=new vt(t,r,0,0,a,2,r,!1,i);return h.plugin=o,h.setRatio=e(t,s,n._tween,r),h},priority:i})},a.useSVGTransformAttr=f||c;var Ot,kt="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),St=Q("transform"),Rt=G+"transform",At=Q("transformOrigin"),Ct=null!==Q("perspective"),Dt=U.Transform=function(){this.perspective=parseFloat(a.defaultTransformPerspective)||0,this.force3D=!(!1===a.defaultForce3D||!Ct)&&(a.defaultForce3D||"auto")},Mt=window.SVGElement,Ft=function(t,e,i){var s,r=E.createElementNS("http://www.w3.org/2000/svg",t),n=/([a-z])([A-Z])/g;for(s in i)r.setAttributeNS(null,s.replace(n,"$1-$2").toLowerCase(),i[s]);return e.appendChild(r),r},zt=E.documentElement,Xt=function(){var t,e,i,s=d||/Android/i.test(V)&&!window.chrome;return E.createElementNS&&!s&&(t=Ft("svg",zt),i=(e=Ft("rect",t,{width:100,height:50,x:100})).getBoundingClientRect().width,e.style[At]="50% 50%",e.style[St]="scaleX(0.5)",s=i===e.getBoundingClientRect().width&&!(c&&Ct),zt.removeChild(t)),s}(),It=function(t,e,i,s,r,n){var o,l,h,_,u,f,c,p,d,m,g,v,y,T,x=t._gsTransform,w=Et(t,!0);x&&(y=x.xOrigin,T=x.yOrigin),(!s||(o=s.split(" ")).length<2)&&(c=t.getBBox(),o=[(-1!==(e=at(e).split(" "))[0].indexOf("%")?parseFloat(e[0])/100*c.width:parseFloat(e[0]))+c.x,(-1!==e[1].indexOf("%")?parseFloat(e[1])/100*c.height:parseFloat(e[1]))+c.y]),i.xOrigin=_=parseFloat(o[0]),i.yOrigin=u=parseFloat(o[1]),s&&w!==Lt&&(f=w[0],c=w[1],p=w[2],d=w[3],m=w[4],l=_*(d/(v=f*d-c*p))+u*(-p/v)+(p*(g=w[5])-d*m)/v,h=_*(-c/v)+u*(f/v)-(f*g-c*m)/v,_=i.xOrigin=o[0]=l,u=i.yOrigin=o[1]=h),x&&(n&&(i.xOffset=x.xOffset,i.yOffset=x.yOffset,x=i),r||!1!==r&&!1!==a.defaultSmoothOrigin?(l=_-y,h=u-T,x.xOffset+=l*w[0]+h*w[2]-l,x.yOffset+=l*w[1]+h*w[3]-h):x.xOffset=x.yOffset=0),n||t.setAttribute("data-svg-origin",o.join(" "))},Nt=function(t){return!!(Mt&&t.getBBox&&t.getCTM&&function(t){try{return t.getBBox()}catch(t){}}(t)&&(!t.parentNode||t.parentNode.getBBox&&t.parentNode.getCTM))},Lt=[1,0,0,1,0,0],Et=function(t,e){var i,s,r,n,a,o,l=t._gsTransform||new Dt,h=t.style;if(St?s=K(t,Rt,null,!0):t.currentStyle&&(s=(s=t.currentStyle.filter.match(M))&&4===s.length?[s[0].substr(4),Number(s[2].substr(4)),Number(s[1].substr(4)),s[3].substr(4),l.x||0,l.y||0].join(","):""),(i=!s||"none"===s||"matrix(1, 0, 0, 1, 0, 0)"===s)&&St&&((o="none"===H(t).display)||!t.parentNode)&&(o&&(n=h.display,h.display="block"),t.parentNode||(a=1,zt.appendChild(t)),i=!(s=K(t,Rt,null,!0))||"none"===s||"matrix(1, 0, 0, 1, 0, 0)"===s,n?h.display=n:o&&Vt(h,"display"),a&&zt.removeChild(t)),(l.svg||t.getBBox&&Nt(t))&&(i&&-1!==(h[St]+"").indexOf("matrix")&&(s=h[St],i=0),r=t.getAttribute("transform"),i&&r&&(-1!==r.indexOf("matrix")?(s=r,i=0):-1!==r.indexOf("translate")&&(s="matrix(1,0,0,1,"+r.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",i=0))),i)return Lt;for(r=(s||"").match(v)||[],xt=r.length;--xt>-1;)n=Number(r[xt]),r[xt]=(a=n-(n|=0))?(1e5*a+(0>a?-.5:.5)|0)/1e5+n:n;return e&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r},Yt=U.getTransform=function(t,i,s,r){if(t._gsTransform&&s&&!r)return t._gsTransform;var n,o,l,h,_,u,f=s&&t._gsTransform||new Dt,c=f.scaleX<0,p=1e5,d=Ct&&(parseFloat(K(t,At,i,!1,"0 0 0").split(" ")[2])||f.zOrigin)||0,m=parseFloat(a.defaultTransformPerspective)||0;if(f.svg=!(!t.getBBox||!Nt(t)),f.svg&&(It(t,K(t,At,i,!1,"50% 50%")+"",f,t.getAttribute("data-svg-origin")),Ot=a.useSVGTransformAttr||Xt),(n=Et(t))!==Lt){if(16===n.length){var g,v,y,T,x,w=n[0],b=n[1],P=n[2],O=n[3],k=n[4],S=n[5],R=n[6],A=n[7],C=n[8],D=n[9],M=n[10],F=n[12],z=n[13],X=n[14],I=n[11],L=Math.atan2(R,M);f.zOrigin&&(F=C*(X=-f.zOrigin)-n[12],z=D*X-n[13],X=M*X+f.zOrigin-n[14]),f.rotationX=L*N,L&&(g=k*(T=Math.cos(-L))+C*(x=Math.sin(-L)),v=S*T+D*x,y=R*T+M*x,C=k*-x+C*T,D=S*-x+D*T,M=R*-x+M*T,I=A*-x+I*T,k=g,S=v,R=y),L=Math.atan2(-P,M),f.rotationY=L*N,L&&(v=b*(T=Math.cos(-L))-D*(x=Math.sin(-L)),y=P*T-M*x,D=b*x+D*T,M=P*x+M*T,I=O*x+I*T,w=g=w*T-C*x,b=v,P=y),L=Math.atan2(b,w),f.rotation=L*N,L&&(w=w*(T=Math.cos(-L))+k*(x=Math.sin(-L)),v=b*T+S*x,S=b*-x+S*T,R=P*-x+R*T,b=v),f.rotationX&&Math.abs(f.rotationX)+Math.abs(f.rotation)>359.9&&(f.rotationX=f.rotation=0,f.rotationY=180-f.rotationY),f.scaleX=(Math.sqrt(w*w+b*b)*p+.5|0)/p,f.scaleY=(Math.sqrt(S*S+D*D)*p+.5|0)/p,f.scaleZ=(Math.sqrt(R*R+M*M)*p+.5|0)/p,f.rotationX||f.rotationY?f.skewX=0:(f.skewX=k||S?Math.atan2(k,S)*N+f.rotation:f.skewX||0,Math.abs(f.skewX)>90&&Math.abs(f.skewX)<270&&(c?(f.scaleX*=-1,f.skewX+=f.rotation<=0?180:-180,f.rotation+=f.rotation<=0?180:-180):(f.scaleY*=-1,f.skewX+=f.skewX<=0?180:-180))),f.perspective=I?1/(0>I?-I:I):0,f.x=F,f.y=z,f.z=X,f.svg&&(f.x-=f.xOrigin-(f.xOrigin*w-f.yOrigin*k),f.y-=f.yOrigin-(f.yOrigin*b-f.xOrigin*S))}else if(!Ct||r||!n.length||f.x!==n[4]||f.y!==n[5]||!f.rotationX&&!f.rotationY){var E=n.length>=6,Y=E?n[0]:1,B=n[1]||0,j=n[2]||0,U=E?n[3]:1;f.x=n[4]||0,f.y=n[5]||0,l=Math.sqrt(Y*Y+B*B),h=Math.sqrt(U*U+j*j),_=Y||B?Math.atan2(B,Y)*N:f.rotation||0,u=j||U?Math.atan2(j,U)*N+_:f.skewX||0,Math.abs(u)>90&&Math.abs(u)<270&&(c?(l*=-1,u+=0>=_?180:-180,_+=0>=_?180:-180):(h*=-1,u+=0>=u?180:-180)),f.scaleX=l,f.scaleY=h,f.rotation=_,f.skewX=u,Ct&&(f.rotationX=f.rotationY=f.z=0,f.perspective=m,f.scaleZ=1),f.svg&&(f.x-=f.xOrigin-(f.xOrigin*Y+f.yOrigin*j),f.y-=f.yOrigin-(f.xOrigin*B+f.yOrigin*U))}for(o in f.zOrigin=d,f)f[o]<2e-5&&f[o]>-2e-5&&(f[o]=0)}return s&&(t._gsTransform=f,f.svg&&(Ot&&t.style[St]?e.delayedCall(.001,function(){Vt(t.style,St)}):!Ot&&t.getAttribute("transform")&&e.delayedCall(.001,function(){t.removeAttribute("transform")}))),f},Bt=function(t){var e,i,s=this.data,r=-s.rotation*I,n=r+s.skewX*I,a=1e5,o=(Math.cos(r)*s.scaleX*a|0)/a,l=(Math.sin(r)*s.scaleX*a|0)/a,h=(Math.sin(n)*-s.scaleY*a|0)/a,_=(Math.cos(n)*s.scaleY*a|0)/a,u=this.t.style,f=this.t.currentStyle;if(f){i=l,l=-h,h=-i,e=f.filter,u.filter="";var c,p,m=this.t.offsetWidth,g=this.t.offsetHeight,v="absolute"!==f.position,y="progid:DXImageTransform.Microsoft.Matrix(M11="+o+", M12="+l+", M21="+h+", M22="+_,T=s.x+m*s.xPercent/100,x=s.y+g*s.yPercent/100;if(null!=s.ox&&(T+=(c=(s.oxp?m*s.ox*.01:s.ox)-m/2)-(c*o+(p=(s.oyp?g*s.oy*.01:s.oy)-g/2)*l),x+=p-(c*h+p*_)),v?y+=", Dx="+((c=m/2)-(c*o+(p=g/2)*l)+T)+", Dy="+(p-(c*h+p*_)+x)+")":y+=", sizingMethod='auto expand')",-1!==e.indexOf("DXImageTransform.Microsoft.Matrix(")?u.filter=e.replace(F,y):u.filter=y+" "+e,(0===t||1===t)&&1===o&&0===l&&0===h&&1===_&&(v&&-1===y.indexOf("Dx=0, Dy=0")||b.test(e)&&100!==parseFloat(RegExp.$1)||-1===e.indexOf(e.indexOf("Alpha"))&&u.removeAttribute("filter")),!v){var P,O,k,S=8>d?1:-1;for(c=s.ieOffsetX||0,p=s.ieOffsetY||0,s.ieOffsetX=Math.round((m-((0>o?-o:o)*m+(0>l?-l:l)*g))/2+T),s.ieOffsetY=Math.round((g-((0>_?-_:_)*g+(0>h?-h:h)*m))/2+x),xt=0;4>xt;xt++)k=(i=-1!==(P=f[O=rt[xt]]).indexOf("px")?parseFloat(P):J(this.t,O,parseFloat(P),P.replace(w,""))||0)!==s[O]?2>xt?-s.ieOffsetX:-s.ieOffsetY:2>xt?c-s.ieOffsetX:p-s.ieOffsetY,u[O]=(s[O]=Math.round(i-k*(0===xt||2===xt?1:S)))+"px"}}},jt=U.set3DTransformRatio=U.setTransformRatio=function(t){var e,i,s,r,n,a,o,l,h,_,u,f,p,d,m,g,v,y,T,x,w,b,P,O=this.data,k=this.t.style,S=O.rotation,R=O.rotationX,A=O.rotationY,C=O.scaleX,D=O.scaleY,M=O.scaleZ,F=O.x,z=O.y,X=O.z,N=O.svg,L=O.perspective,E=O.force3D;if(!((1!==t&&0!==t||"auto"!==E||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&E||X||L||A||R||1!==M)||Ot&&N||!Ct)S||O.skewX||N?(S*=I,b=O.skewX*I,P=1e5,e=Math.cos(S)*C,r=Math.sin(S)*C,i=Math.sin(S-b)*-D,n=Math.cos(S-b)*D,b&&"simple"===O.skewType&&(v=Math.tan(b-O.skewY*I),i*=v=Math.sqrt(1+v*v),n*=v,O.skewY&&(v=Math.tan(O.skewY*I),e*=v=Math.sqrt(1+v*v),r*=v)),N&&(F+=O.xOrigin-(O.xOrigin*e+O.yOrigin*i)+O.xOffset,z+=O.yOrigin-(O.xOrigin*r+O.yOrigin*n)+O.yOffset,Ot&&(O.xPercent||O.yPercent)&&(d=this.t.getBBox(),F+=.01*O.xPercent*d.width,z+=.01*O.yPercent*d.height),(d=1e-6)>F&&F>-d&&(F=0),d>z&&z>-d&&(z=0)),T=(e*P|0)/P+","+(r*P|0)/P+","+(i*P|0)/P+","+(n*P|0)/P+","+F+","+z+")",N&&Ot?this.t.setAttribute("transform","matrix("+T):k[St]=(O.xPercent||O.yPercent?"translate("+O.xPercent+"%,"+O.yPercent+"%) matrix(":"matrix(")+T):k[St]=(O.xPercent||O.yPercent?"translate("+O.xPercent+"%,"+O.yPercent+"%) matrix(":"matrix(")+C+",0,0,"+D+","+F+","+z+")";else{if(c&&((d=1e-4)>C&&C>-d&&(C=M=2e-5),d>D&&D>-d&&(D=M=2e-5),!L||O.z||O.rotationX||O.rotationY||(L=0)),S||O.skewX)S*=I,m=e=Math.cos(S),g=r=Math.sin(S),O.skewX&&(S-=O.skewX*I,m=Math.cos(S),g=Math.sin(S),"simple"===O.skewType&&(v=Math.tan((O.skewX-O.skewY)*I),m*=v=Math.sqrt(1+v*v),g*=v,O.skewY&&(v=Math.tan(O.skewY*I),e*=v=Math.sqrt(1+v*v),r*=v))),i=-g,n=m;else{if(!(A||R||1!==M||L||N))return void(k[St]=(O.xPercent||O.yPercent?"translate("+O.xPercent+"%,"+O.yPercent+"%) translate3d(":"translate3d(")+F+"px,"+z+"px,"+X+"px)"+(1!==C||1!==D?" scale("+C+","+D+")":""));e=n=1,i=r=0}h=1,s=a=o=l=_=u=0,f=L?-1/L:0,p=O.zOrigin,d=1e-6,x=",",w="0",(S=A*I)&&(m=Math.cos(S),o=-(g=Math.sin(S)),_=f*-g,s=e*g,a=r*g,h=m,f*=m,e*=m,r*=m),(S=R*I)&&(v=i*(m=Math.cos(S))+s*(g=Math.sin(S)),y=n*m+a*g,l=h*g,u=f*g,s=i*-g+s*m,a=n*-g+a*m,h*=m,f*=m,i=v,n=y),1!==M&&(s*=M,a*=M,h*=M,f*=M),1!==D&&(i*=D,n*=D,l*=D,u*=D),1!==C&&(e*=C,r*=C,o*=C,_*=C),(p||N)&&(p&&(F+=s*-p,z+=a*-p,X+=h*-p+p),N&&(F+=O.xOrigin-(O.xOrigin*e+O.yOrigin*i)+O.xOffset,z+=O.yOrigin-(O.xOrigin*r+O.yOrigin*n)+O.yOffset),d>F&&F>-d&&(F=w),d>z&&z>-d&&(z=w),d>X&&X>-d&&(X=0)),T=O.xPercent||O.yPercent?"translate("+O.xPercent+"%,"+O.yPercent+"%) matrix3d(":"matrix3d(",T+=(d>e&&e>-d?w:e)+x+(d>r&&r>-d?w:r)+x+(d>o&&o>-d?w:o),T+=x+(d>_&&_>-d?w:_)+x+(d>i&&i>-d?w:i)+x+(d>n&&n>-d?w:n),R||A||1!==M?(T+=x+(d>l&&l>-d?w:l)+x+(d>u&&u>-d?w:u)+x+(d>s&&s>-d?w:s),T+=x+(d>a&&a>-d?w:a)+x+(d>h&&h>-d?w:h)+x+(d>f&&f>-d?w:f)+x):T+=",0,0,0,0,1,0,",T+=F+x+z+x+X+x+(L?1+-X/L:1)+")",k[St]=T}};(h=Dt.prototype).x=h.y=h.z=h.skewX=h.skewY=h.rotation=h.rotationX=h.rotationY=h.zOrigin=h.xPercent=h.yPercent=h.xOffset=h.yOffset=0,h.scaleX=h.scaleY=h.scaleZ=1,bt("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(t,e,i,s,n,o,l){if(s._lastParsedTransform===l)return n;var h;s._lastParsedTransform=l,"function"==typeof l[i]&&(h=l[i],l[i]=e);var _,u,f,c,p,d,v,y,T,x=t._gsTransform,w=t.style,b=kt.length,P=l,O={},k="transformOrigin",S=Yt(t,r,!0,P.parseTransform),R=P.transform&&("function"==typeof P.transform?P.transform(g,m):P.transform);if(s._transform=S,R&&"string"==typeof R&&St)(u=B.style)[St]=R,u.display="block",u.position="absolute",E.body.appendChild(B),_=Yt(B,null,!1),S.svg&&(d=S.xOrigin,v=S.yOrigin,_.x-=S.xOffset,_.y-=S.yOffset,(P.transformOrigin||P.svgOrigin)&&(R={},It(t,at(P.transformOrigin),R,P.svgOrigin,P.smoothOrigin,!0),d=R.xOrigin,v=R.yOrigin,_.x-=R.xOffset-S.xOffset,_.y-=R.yOffset-S.yOffset),(d||v)&&(y=Et(B,!0),_.x-=d-(d*y[0]+v*y[2]),_.y-=v-(d*y[1]+v*y[3]))),E.body.removeChild(B),_.perspective||(_.perspective=S.perspective),null!=P.xPercent&&(_.xPercent=lt(P.xPercent,S.xPercent)),null!=P.yPercent&&(_.yPercent=lt(P.yPercent,S.yPercent));else if("object"==typeof P){if(_={scaleX:lt(null!=P.scaleX?P.scaleX:P.scale,S.scaleX),scaleY:lt(null!=P.scaleY?P.scaleY:P.scale,S.scaleY),scaleZ:lt(P.scaleZ,S.scaleZ),x:lt(P.x,S.x),y:lt(P.y,S.y),z:lt(P.z,S.z),xPercent:lt(P.xPercent,S.xPercent),yPercent:lt(P.yPercent,S.yPercent),perspective:lt(P.transformPerspective,S.perspective)},null!=(p=P.directionalRotation))if("object"==typeof p)for(u in p)P[u]=p[u];else P.rotation=p;"string"==typeof P.x&&-1!==P.x.indexOf("%")&&(_.x=0,_.xPercent=lt(P.x,S.xPercent)),"string"==typeof P.y&&-1!==P.y.indexOf("%")&&(_.y=0,_.yPercent=lt(P.y,S.yPercent)),_.rotation=ht("rotation"in P?P.rotation:"shortRotation"in P?P.shortRotation+"_short":"rotationZ"in P?P.rotationZ:S.rotation-S.skewY,S.rotation-S.skewY,"rotation",O),Ct&&(_.rotationX=ht("rotationX"in P?P.rotationX:"shortRotationX"in P?P.shortRotationX+"_short":S.rotationX||0,S.rotationX,"rotationX",O),_.rotationY=ht("rotationY"in P?P.rotationY:"shortRotationY"in P?P.shortRotationY+"_short":S.rotationY||0,S.rotationY,"rotationY",O)),_.skewX=ht(P.skewX,S.skewX-S.skewY),(_.skewY=ht(P.skewY,S.skewY))&&(_.skewX+=_.skewY,_.rotation+=_.skewY)}for(Ct&&null!=P.force3D&&(S.force3D=P.force3D,c=!0),S.skewType=P.skewType||S.skewType||a.defaultSkewType,(f=S.force3D||S.z||S.rotationX||S.rotationY||_.z||_.rotationX||_.rotationY||_.perspective)||null==P.scale||(_.scaleZ=1);--b>-1;)((R=_[T=kt[b]]-S[T])>1e-6||-1e-6>R||null!=P[T]||null!=L[T])&&(c=!0,n=new vt(S,T,S[T],R,n),T in O&&(n.e=O[T]),n.xs0=0,n.plugin=o,s._overwriteProps.push(n.n));return R=P.transformOrigin,S.svg&&(R||P.svgOrigin)&&(d=S.xOffset,v=S.yOffset,It(t,at(R),_,P.svgOrigin,P.smoothOrigin),n=yt(S,"xOrigin",(x?S:_).xOrigin,_.xOrigin,n,k),n=yt(S,"yOrigin",(x?S:_).yOrigin,_.yOrigin,n,k),(d!==S.xOffset||v!==S.yOffset)&&(n=yt(S,"xOffset",x?d:S.xOffset,S.xOffset,n,k),n=yt(S,"yOffset",x?v:S.yOffset,S.yOffset,n,k)),R=Ot?null:"0px 0px"),(R||Ct&&f&&S.zOrigin)&&(St?(c=!0,T=At,R=(R||K(t,T,r,!1,"50% 50%"))+"",(n=new vt(w,T,0,0,n,-1,k)).b=w[T],n.plugin=o,Ct?(u=S.zOrigin,R=R.split(" "),S.zOrigin=(R.length>2&&(0===u||"0px"!==R[2])?parseFloat(R[2]):u)||0,n.xs0=n.e=R[0]+" "+(R[1]||"50%")+" 0px",(n=new vt(S,"zOrigin",0,0,n,-1,n.n)).b=u,n.xs0=n.e=S.zOrigin):n.xs0=n.e=R):at(R+"",S)),c&&(s._transformType=S.svg&&Ot||!f&&3!==this._transformType?2:3),h&&(l[i]=h),n},prefix:!0}),bt("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),bt("borderRadius",{defaultValue:"0px",parser:function(t,e,i,n,a,o){e=this.format(e);var l,h,_,u,f,c,p,d,m,g,v,y,T,x,w,b,P=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],O=t.style;for(m=parseFloat(t.offsetWidth),g=parseFloat(t.offsetHeight),l=e.split(" "),h=0;hd?1:0))||""):(d=parseFloat(c),v=c.substr((d+"").length)),""===v&&(v=s[i]||y),v!==y&&(x=J(t,"borderLeft",p,y),w=J(t,"borderTop",p,y),"%"===v?(f=x/m*100+"%",u=w/g*100+"%"):"em"===v?(f=x/(b=J(t,"borderLeft",1,"em"))+"em",u=w/b+"em"):(f=x+"px",u=w+"px"),T&&(c=parseFloat(f)+d+v,_=parseFloat(u)+d+v)),a=Tt(O,P[h],f+" "+u,c+" "+_,!1,"0px",a);return a},prefix:!0,formatter:dt("0px 0px 0px 0px",!1,!0)}),bt("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(t,e,i,s,n,a){return Tt(t.style,i,this.format(K(t,i,r,!1,"0px 0px")),this.format(e),!1,"0px",n)},prefix:!0,formatter:dt("0px 0px",!1,!0)}),bt("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,s,n,a){var o,l,h,_,u,f,c="background-position",p=r||H(t,null),m=this.format((p?d?p.getPropertyValue(c+"-x")+" "+p.getPropertyValue(c+"-y"):p.getPropertyValue(c):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),g=this.format(e);if(-1!==m.indexOf("%")!=(-1!==g.indexOf("%"))&&g.split(",").length<2&&((f=K(t,"backgroundImage").replace(A,""))&&"none"!==f)){for(o=m.split(" "),l=g.split(" "),j.setAttribute("src",f),h=2;--h>-1;)(_=-1!==(m=o[h]).indexOf("%"))!==(-1!==l[h].indexOf("%"))&&(u=0===h?t.offsetWidth-j.width:t.offsetHeight-j.height,o[h]=_?parseFloat(m)/100*u+"px":parseFloat(m)/u*100+"%");m=o.join(" ")}return this.parseComplex(t.style,m,g,n,a)},formatter:at}),bt("backgroundSize",{defaultValue:"0 0",formatter:function(t){return at(-1===(t+="").indexOf(" ")?t+" "+t:t)}}),bt("perspective",{defaultValue:"0px",prefix:!0}),bt("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),bt("transformStyle",{prefix:!0}),bt("backfaceVisibility",{prefix:!0}),bt("userSelect",{prefix:!0}),bt("margin",{parser:mt("marginTop,marginRight,marginBottom,marginLeft")}),bt("padding",{parser:mt("paddingTop,paddingRight,paddingBottom,paddingLeft")}),bt("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,s,n,a){var o,l,h;return 9>d?(l=t.currentStyle,h=8>d?" ":",",o="rect("+l.clipTop+h+l.clipRight+h+l.clipBottom+h+l.clipLeft+")",e=this.format(e).split(",").join(h)):(o=this.format(K(t,this.p,r,!1,this.dflt)),e=this.format(e)),this.parseComplex(t.style,o,e,n,a)}}),bt("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),bt("autoRound,strictUnits",{parser:function(t,e,i,s,r){return r}}),bt("border",{defaultValue:"0px solid #000",parser:function(t,e,i,s,n,a){var o=K(t,"borderTopWidth",r,!1,"0px"),l=this.format(e).split(" "),h=l[0].replace(w,"");return"px"!==h&&(o=parseFloat(o)/J(t,"borderTopWidth",1,h)+h),this.parseComplex(t.style,this.format(o+" "+K(t,"borderTopStyle",r,!1,"solid")+" "+K(t,"borderTopColor",r,!1,"#000")),l.join(" "),n,a)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(pt)||["#000"])[0]}}),bt("borderWidth",{parser:mt("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),bt("float,cssFloat,styleFloat",{parser:function(t,e,i,s,r,n){var a=t.style,o="cssFloat"in a?"cssFloat":"styleFloat";return new vt(a,o,0,0,r,-1,i,!1,0,a[o],e)}});var Ut=function(t){var e,i=this.t,s=i.filter||K(this.data,"filter")||"",r=this.s+this.c*t|0;100===r&&(-1===s.indexOf("atrix(")&&-1===s.indexOf("radient(")&&-1===s.indexOf("oader(")?(i.removeAttribute("filter"),e=!K(this.data,"filter")):(i.filter=s.replace(O,""),e=!0)),e||(this.xn1&&(i.filter=s=s||"alpha(opacity="+r+")"),-1===s.indexOf("pacity")?0===r&&this.xn1||(i.filter=s+" alpha(opacity="+r+")"):i.filter=s.replace(b,"opacity="+r))};bt("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,s,n,a){var o=parseFloat(K(t,"opacity",r,!1,"1")),l=t.style,h="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+o),h&&1===o&&"hidden"===K(t,"visibility",r)&&0!==e&&(o=0),q?n=new vt(l,"opacity",o,e-o,n):((n=new vt(l,"opacity",100*o,100*(e-o),n)).xn1=h?1:0,l.zoom=1,n.type=2,n.b="alpha(opacity="+n.s+")",n.e="alpha(opacity="+(n.s+n.c)+")",n.data=t,n.plugin=a,n.setRatio=Ut),h&&((n=new vt(l,"visibility",0,0,n,-1,null,!1,0,0!==o?"inherit":"hidden",0===e?"hidden":"inherit")).xs0="inherit",s._overwriteProps.push(n.n),s._overwriteProps.push(i)),n}});var Vt=function(t,e){e&&(t.removeProperty?(("ms"===e.substr(0,2)||"webkit"===e.substr(0,6))&&(e="-"+e),t.removeProperty(e.replace(S,"-$1").toLowerCase())):t.removeAttribute(e))},qt=function(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:Vt(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};bt("className",{parser:function(t,e,s,n,a,o,l){var h,_,u,f,c,p=t.getAttribute("class")||"",d=t.style.cssText;if((a=n._classNamePT=new vt(t,s,0,0,a,2)).setRatio=qt,a.pr=-11,i=!0,a.b=p,_=et(t,r),u=t._gsClassPT){for(f={},c=u.data;c;)f[c.p]=1,c=c._next;u.setRatio(1)}return t._gsClassPT=a,a.e="="!==e.charAt(1)?e:p.replace(new RegExp("(?:\\s|^)"+e.substr(2)+"(?![\\w-])"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),t.setAttribute("class",a.e),h=it(t,_,et(t),l,f),t.setAttribute("class",p),a.data=h.firstMPT,t.style.cssText=d,a.xfirst=n.parse(t,h.difs,a,o)}});var Wt=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,s,r,n,a=this.t.style,o=l.transform.parse;if("all"===this.e)a.cssText="",r=!0;else for(s=(e=this.e.split(" ").join("").split(",")).length;--s>-1;)i=e[s],l[i]&&(l[i].parse===o?r=!0:i="transformOrigin"===i?At:l[i].p),Vt(a,i);r&&(Vt(a,St),(n=this.t._gsTransform)&&(n.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(bt("clearProps",{parser:function(t,e,s,r,n){return(n=new vt(t,s,0,0,n,2)).setRatio=Wt,n.e=e,n.pr=-10,n.data=r._tween,i=!0,n}}),h="bezier,throwProps,physicsProps,physics2D".split(","),xt=h.length;xt--;)Pt(h[xt]);(h=a.prototype)._firstPT=h._lastParsedTransform=h._transform=null,h._onInitTween=function(t,e,o,h){if(!t.nodeType)return!1;this._target=m=t,this._tween=o,this._vars=e,g=h,_=e.autoRound,i=!1,s=e.suffixMap||a.suffixMap,r=H(t,""),n=this._overwriteProps;var c,d,v,y,T,x,w,b,O,k=t.style;if(u&&""===k.zIndex&&(("auto"===(c=K(t,"zIndex",r))||""===c)&&this._addLazySet(k,"zIndex",0)),"string"==typeof e&&(y=k.cssText,c=et(t,r),k.cssText=y+";"+e,c=it(t,c,et(t)).difs,!q&&P.test(e)&&(c.opacity=parseFloat(RegExp.$1)),e=c,k.cssText=y),e.className?this._firstPT=d=l.className.parse(t,e.className,"className",this,null,null,e):this._firstPT=d=this.parse(t,e,null),this._transformType){for(O=3===this._transformType,St?f&&(u=!0,""===k.zIndex&&(("auto"===(w=K(t,"zIndex",r))||""===w)&&this._addLazySet(k,"zIndex",0)),p&&this._addLazySet(k,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(O?"visible":"hidden"))):k.zoom=1,v=d;v&&v._next;)v=v._next;b=new vt(t,"transform",0,0,null,2),this._linkCSSP(b,null,v),b.setRatio=St?jt:Bt,b.data=this._transform||Yt(t,r,!0),b.tween=o,b.pr=-1,n.pop()}if(i){for(;d;){for(x=d._next,v=y;v&&v.pr>d.pr;)v=v._next;(d._prev=v?v._prev:T)?d._prev._next=d:y=d,(d._next=v)?v._prev=d:T=d,d=x}this._firstPT=y}return!0},h.parse=function(t,e,i,n){var a,o,h,u,f,c,p,d,v,y,T=t.style;for(a in e)"function"==typeof(c=e[a])&&(c=c(g,m)),(o=l[a])?i=o.parse(t,c,a,this,i,n,e):(f=K(t,a,r)+"",v="string"==typeof c,"color"===a||"fill"===a||"stroke"===a||-1!==a.indexOf("Color")||v&&k.test(c)?(v||(c=((c=ft(c)).length>3?"rgba(":"rgb(")+c.join(",")+")"),i=Tt(T,a,f,c,!0,"transparent",i,0,n)):v&&X.test(c)?i=Tt(T,a,f,c,!0,null,i,0,n):(p=(h=parseFloat(f))||0===h?f.substr((h+"").length):"",(""===f||"auto"===f)&&("width"===a||"height"===a?(h=nt(t,a,r),p="px"):"left"===a||"top"===a?(h=tt(t,a,r),p="px"):(h="opacity"!==a?0:1,p="")),(y=v&&"="===c.charAt(1))?(u=parseInt(c.charAt(0)+"1",10),c=c.substr(2),u*=parseFloat(c),d=c.replace(w,"")):(u=parseFloat(c),d=v?c.replace(w,""):""),""===d&&(d=a in s?s[a]:p),c=u||0===u?(y?u+h:u)+d:e[a],p!==d&&""!==d&&(u||0===u)&&h&&(h=J(t,a,h,p),"%"===d?(h/=J(t,a,100,"%")/100,!0!==e.strictUnits&&(f=h+"%")):"em"===d||"rem"===d||"vw"===d||"vh"===d?h/=J(t,a,1,d):"px"!==d&&(u=J(t,a,u,d),d="px"),y&&(u||0===u)&&(c=u+h+d)),y&&(u+=h),!h&&0!==h||!u&&0!==u?void 0!==T[a]&&(c||c+""!="NaN"&&null!=c)?(i=new vt(T,a,u||h||0,0,i,-1,a,!1,0,f,c)).xs0="none"!==c||"display"!==a&&-1===a.indexOf("Style")?c:f:Z("invalid "+a+" tween value: "+e[a]):(i=new vt(T,a,h,u-h,i,0,a,!1!==_&&("px"===d||"zIndex"===a),0,f,c)).xs0=d)),n&&i&&!i.plugin&&(i.plugin=n);return i},h.setRatio=function(t){var e,i,s,r=this._firstPT;if(1!==t||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(t||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;r;){if(e=r.c*t+r.s,r.r?e=Math.round(e):1e-6>e&&e>-1e-6&&(e=0),r.type)if(1===r.type)if(2===(s=r.l))r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2;else if(3===s)r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2+r.xn2+r.xs3;else if(4===s)r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2+r.xn2+r.xs3+r.xn3+r.xs4;else if(5===s)r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2+r.xn2+r.xs3+r.xn3+r.xs4+r.xn4+r.xs5;else{for(i=r.xs0+e+r.xs1,s=1;s-1;)Gt(t[r],e,i);else for(r=(s=t.childNodes).length;--r>-1;)a=(n=s[r]).type,n.style&&(e.push(et(n)),i&&i.push(n)),1!==a&&9!==a&&11!==a||!n.childNodes.length||Gt(n,e,i)};return a.cascadeTo=function(t,i,s){var r,n,a,o,l=e.to(t,i,s),h=[l],_=[],u=[],f=[],c=e._internals.reservedProps;for(t=l._targets||l.target,Gt(t,_,f),l.render(i,!0,!0),Gt(t,u),l.render(0,!0,!0),l._enabled(!0),r=f.length;--r>-1;)if((n=it(f[r],_[r],u[r])).firstMPT){for(a in n=n.difs,s)c[a]&&(n[a]=s[a]);for(a in o={},n)o[a]=_[r][a];h.push(e.fromTo(f[r],i,o,n))}return h},t.activate([a]),a},!0),function(){var t=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}),e=function(t){for(;t;)t.f||t.blob||(t.m=Math.round),t=t._next},i=t.prototype;i._onInitAllProps=function(){for(var t,i,s,r=this._tween,n=r.vars.roundProps.join?r.vars.roundProps:r.vars.roundProps.split(","),a=n.length,o={},l=r._propLookup.roundProps;--a>-1;)o[n[a]]=Math.round;for(a=n.length;--a>-1;)for(t=n[a],i=r._firstPT;i;)s=i._next,i.pg?i.t._mod(o):i.n===t&&(2===i.f&&i.t?e(i.t._firstPT):(this._add(i.t,t,i.s,i.c),s&&(s._prev=i._prev),i._prev?i._prev._next=s:r._firstPT===i&&(r._firstPT=s),i._next=i._prev=null,r._propLookup[t]=l)),i=s;return!1},i._add=function(t,e,i,s){this._addTween(t,e,i,i+s,e,Math.round),this._overwriteProps.push(e)}}(),_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.0",init:function(t,e,i,s){var r,n;if("function"!=typeof t.setAttribute)return!1;for(r in e)"function"==typeof(n=e[r])&&(n=n(s,t)),this._addTween(t,"setAttribute",t.getAttribute(r)+"",n+"",r,!1,r),this._overwriteProps.push(r);return!0}}),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.0",API:2,init:function(t,e,i,s){"object"!=typeof e&&(e={rotation:e}),this.finals={};var r,n,a,o,l,h,_=!0===e.useRadians?2*Math.PI:360;for(r in e)"useRadians"!==r&&("function"==typeof(o=e[r])&&(o=o(s,t)),n=(h=(o+"").split("_"))[0],a=parseFloat("function"!=typeof t[r]?t[r]:t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]()),l=(o=this.finals[r]="string"==typeof n&&"="===n.charAt(1)?a+parseInt(n.charAt(0)+"1",10)*Number(n.substr(2)):Number(n)||0)-a,h.length&&(-1!==(n=h.join("_")).indexOf("short")&&((l%=_)!==l%(_/2)&&(l=0>l?l+_:l-_)),-1!==n.indexOf("_cw")&&0>l?l=(l+9999999999*_)%_-(l/_|0)*_:-1!==n.indexOf("ccw")&&l>0&&(l=(l-9999999999*_)%_-(l/_|0)*_)),(l>1e-6||-1e-6>l)&&(this._addTween(t,r,a,a+l,r),this._overwriteProps.push(r)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,s,r=_gsScope.GreenSockGlobals||_gsScope,n=r.com.greensock,a=2*Math.PI,o=Math.PI/2,l=n._class,h=function(e,i){var s=l("easing."+e,function(){},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,s},_=t.register||function(){},u=function(t,e,i,s,r){var n=l("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0);return _(n,t),n},f=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},c=function(e,i){var s=l("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,r.config=function(t){return new s(t)},s},p=u("Back",c("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),c("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),c("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),d=l("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=!0===i},!0),m=d.prototype=new t;return m.constructor=d,m.getRatio=function(t){var e=t+(.5-t)*this._p;return tthis._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},d.ease=new d(.7,.7),m.config=d.config=function(t,e,i){return new d(t,e,i)},(m=(e=l("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0)).prototype=new t).constructor=e,m.getRatio=function(t){return 0>t?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},m.config=e.config=function(t){return new e(t)},i=l("easing.RoughEase",function(e){for(var i,s,r,n,a,o,l=(e=e||{}).taper||"none",h=[],_=0,u=0|(e.points||20),c=u,p=!1!==e.randomize,d=!0===e.clamp,m=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--c>-1;)i=p?Math.random():1/u*c,s=m?m.getRatio(i):i,"none"===l?r=g:"out"===l?r=(n=1-i)*n*g:"in"===l?r=i*i*g:.5>i?r=(n=2*i)*n*.5*g:r=(n=2*(1-i))*n*.5*g,p?s+=Math.random()*r-.5*r:c%2?s+=.5*r:s-=.5*r,d&&(s>1?s=1:0>s&&(s=0)),h[_++]={x:i,y:s};for(h.sort(function(t,e){return t.x-e.x}),o=new f(1,1,null),c=u;--c>-1;)a=h[c],o=new f(a.x,a.y,o);this._prev=new f(0,0,0!==o.t?o:o.next)},!0),(m=i.prototype=new t).constructor=i,m.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&t<=e.t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},m.config=function(t){return new i(t)},i.ease=new i,u("Bounce",h("BounceOut",function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),h("BounceIn",function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:2/2.75>t?1-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),h("BounceInOut",function(t){var e=.5>t;return t=1/2.75>(t=e?1-2*t:2*t-1)?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),u("Circ",h("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),h("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),h("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),u("Elastic",(s=function(e,i,s){var r=l("easing."+e,function(t,e){this._p1=t>=1?t:1,this._p2=(e||s)/(1>t?t:1),this._p3=this._p2/a*(Math.asin(1/this._p1)||0),this._p2=a/this._p2},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t,e){return new r(t,e)},r})("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),s("ElasticIn",function(t){return-this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)},.3),s("ElasticInOut",function(t){return(t*=2)<1?this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*this._p2)*.5+1},.45)),u("Expo",h("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),h("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),h("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),u("Sine",h("SineOut",function(t){return Math.sin(t*o)}),h("SineIn",function(t){return 1-Math.cos(t*o)}),h("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),l("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),_(r.SlowMo,"SlowMo","ease,"),_(i,"RoughEase","ease,"),_(e,"SteppedEase","ease,"),p},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t,e){"use strict";var i={},s=t.GreenSockGlobals=t.GreenSockGlobals||t;if(!s.TweenLite){var r,n,a,o,l,h=function(t){var e,i=t.split("."),r=s;for(e=0;e-1;)(u=d[n[v]]||new m(n[v],[])).gsClass?(l[v]=u.gsClass,y--):_&&u.sc.push(this);if(0===y&&a){if(c=(f=("com.greensock."+r).split(".")).pop(),p=h(f.join("."))[c]=this.gsClass=a.apply(a,l),o)if(s[c]=i[c]=p,!(g="undefined"!=typeof module&&module.exports)&&"function"==typeof define&&define.amd)define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+r.split(".").pop(),[],function(){return p});else if(g)if(r===e)for(v in module.exports=i[e]=p,i)p[v]=i[v];else i[e]&&(i[e][c]=p);for(v=0;v-1;)for(n=l[h],r=s?v("easing."+n,null,!0):_.easing[n]||{},a=u.length;--a>-1;)o=u[a],x[n+"."+o]=x[o+n]=r[o]=t.getRatio?t:t[o]||new t};for((a=T.prototype)._calcEnd=!1,a.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,s=1===e?1-t:2===e?t:.5>t?2*t:2*(1-t);return 1===i?s*=s:2===i?s*=s*s:3===i?s*=s*s*s:4===i&&(s*=s*s*s*s),1===e?1-s:2===e?s:.5>t?s/2:1-s/2},n=(r=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;--n>-1;)a=r[n]+",Power"+n,w(new T(null,null,1,n),a,"easeOut",!0),w(new T(null,null,2,n),a,"easeIn"+(0===n?",easeNone":"")),w(new T(null,null,3,n),a,"easeInOut");x.linear=_.easing.Linear.easeIn,x.swing=_.easing.Quad.easeInOut;var b=v("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(a=b.prototype).addEventListener=function(t,e,i,s,r){r=r||0;var n,a,h=this._listeners[t],_=0;for(this!==o||l||o.wake(),null==h&&(this._listeners[t]=h=[]),a=h.length;--a>-1;)(n=h[a]).c===e&&n.s===i?h.splice(a,1):0===_&&n.pr-1;)if(s[i].c===e)return void s.splice(i,1)},a.dispatchEvent=function(t){var e,i,s,r=this._listeners[t];if(r)for((e=r.length)>1&&(r=r.slice(0)),i=this._eventTarget;--e>-1;)(s=r[e])&&(s.up?s.c.call(s.s||i,{type:t,target:i}):s.c.call(s.s||i))};var P=t.requestAnimationFrame,O=t.cancelAnimationFrame,k=Date.now||function(){return(new Date).getTime()},S=k();for(n=(r=["ms","moz","webkit","o"]).length;--n>-1&&!P;)P=t[r[n]+"RequestAnimationFrame"],O=t[r[n]+"CancelAnimationFrame"]||t[r[n]+"CancelRequestAnimationFrame"];v("Ticker",function(t,e){var i,s,r,n,a,h=this,_=k(),f=!(!1===e||!P)&&"auto",p=500,d=33,m=function(t){var e,o,l=k()-S;l>p&&(_+=l-d),S+=l,h.time=(S-_)/1e3,e=h.time-a,(!i||e>0||!0===t)&&(h.frame++,a+=e+(e>=n?.004:n-e),o=!0),!0!==t&&(r=s(m)),o&&h.dispatchEvent("tick")};b.call(h),h.time=h.frame=0,h.tick=function(){m(!0)},h.lagSmoothing=function(t,e){p=t||1/u,d=Math.min(e,p,0)},h.sleep=function(){null!=r&&(f&&O?O(r):clearTimeout(r),s=c,r=null,h===o&&(l=!1))},h.wake=function(t){null!==r?h.sleep():t?_+=-S+(S=k()):h.frame>10&&(S=k()-p+5),s=0===i?c:f&&P?P:function(t){return setTimeout(t,1e3*(a-h.time)+1|0)},h===o&&(l=!0),m(2)},h.fps=function(t){return arguments.length?(n=1/((i=t)||60),a=this.time+n,void h.wake()):i},h.useRAF=function(t){return arguments.length?(h.sleep(),f=t,void h.fps(i)):f},h.fps(t),setTimeout(function(){"auto"===f&&h.frame<5&&"hidden"!==document.visibilityState&&h.useRAF(!1)},1500)}),(a=_.Ticker.prototype=new _.events.EventDispatcher).constructor=_.Ticker;var R=v("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=!0===e.immediateRender,this.data=e.data,this._reversed=!0===e.reversed,W){l||o.wake();var i=this.vars.useFrames?q:W;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});o=R.ticker=new _.Ticker,(a=R.prototype)._dirty=a._gc=a._initted=a._paused=!1,a._totalTime=a._time=0,a._rawPrevTime=-1,a._next=a._last=a._onUpdate=a._timeline=a.timeline=null,a._paused=!1;var A=function(){l&&k()-S>2e3&&o.wake(),setTimeout(A,2e3)};A(),a.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},a.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},a.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},a.seek=function(t,e){return this.totalTime(Number(t),!1!==e)},a.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,!1!==e,!0)},a.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},a.render=function(t,e,i){},a.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},a.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime())>=i&&t-1;)"{self}"===t[e]&&(i[e]=this);return i},a._callback=function(t){var e=this.vars,i=e[t],s=e[t+"Params"],r=e[t+"Scope"]||e.callbackScope||this;switch(s?s.length:0){case 0:i.call(r);break;case 1:i.call(r,s[0]);break;case 2:i.call(r,s[0],s[1]);break;default:i.apply(r,s)}},a.eventCallback=function(t,e,i,s){if("on"===(t||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[t];null==e?delete r[t]:(r[t]=e,r[t+"Params"]=p(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,r[t+"Scope"]=s),"onUpdate"===t&&(this._onUpdate=e)}return this},a.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},a.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:t,e)):this._time},a.totalTime=function(t,e,i){if(l||o.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>t&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var s=this._totalDuration,r=this._timeline;if(t>s&&!i&&(t=s),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?s-t:t)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==t||0===this._duration)&&(F.length&&G(),this.render(t,e,!1),F.length&&G())}return this},a.progress=a.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},a.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},a.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},a.timeScale=function(t){if(!arguments.length)return this._timeScale;if(t=t||u,this._timeline&&this._timeline.smoothChildTiming){var e=this._pauseTime,i=e||0===e?e:this._timeline.totalTime();this._startTime=i-(i-this._startTime)*this._timeScale/t}return this._timeScale=t,this._uncache(!1)},a.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},a.paused=function(t){if(!arguments.length)return this._paused;var e,i,s=this._timeline;return t!=this._paused&&s&&(l||t||o.wake(),i=(e=s.rawTime())-this._pauseTime,!t&&s.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!==i&&this._initted&&this.duration()&&(e=s.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,this.render(e,e===this._totalTime,!0))),this._gc&&!t&&this._enabled(!0,!1),this};var C=v("core.SimpleTimeline",function(t){R.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(a=C.prototype=new R).constructor=C,a.kill()._gc=!1,a._first=a._last=a._recent=null,a._sortChildren=!1,a.add=a.insert=function(t,e,i,s){var r,n;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),r=this._last,this._sortChildren)for(n=t._startTime;r&&r._startTime>n;)r=r._prev;return r?(t._next=r._next,r._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=r,this._recent=t,this._timeline&&this._uncache(!0),this},a._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},a.render=function(t,e,i){var s,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;r;)s=r._next,(r._active||t>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=s},a.rawTime=function(){return l||o.wake(),this._totalTime};var D=v("TweenLite",function(e,i,s){if(R.call(this,i,s),this.render=D.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:D.selector(e)||e;var r,n,a,o=e.jquery||e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?V[D.defaultOverwrite]:"number"==typeof l?l>>0:V[l],(o||e instanceof Array||e.push&&p(e))&&"number"!=typeof e[0])for(this._targets=a=f(e),this._propLookup=[],this._siblings=[],r=0;r1&&H(n,this,null,1,this._siblings[r])):"string"==typeof(n=a[r--]=D.selector(n))&&a.splice(r+1,1):a.splice(r--,1);else this._propLookup={},this._siblings=$(e,this,!1),1===l&&this._siblings.length>1&&H(e,this,null,1,this._siblings);(this.vars.immediateRender||0===i&&0===this._delay&&!1!==this.vars.immediateRender)&&(this._time=-u,this.render(Math.min(0,-this._delay)))},!0),M=function(e){return e&&e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType)};(a=D.prototype=new R).constructor=D,a.kill()._gc=!1,a.ratio=0,a._firstPT=a._targets=a._overwrittenProps=a._startAt=null,a._notifyPluginsOfEnabled=a._lazy=!1,D.version="1.19.0",D.defaultEase=a._ease=new T(null,null,1,1),D.defaultOverwrite="auto",D.ticker=o,D.autoSleep=120,D.lagSmoothing=function(t,e){o.lagSmoothing(t,e)},D.selector=t.$||t.jQuery||function(e){var i=t.$||t.jQuery;return i?(D.selector=i,i(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)};var F=[],z={},X=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,I=function(t){for(var e,i=this._firstPT;i;)e=i.blob?t?this.join(""):this.start:i.c*t+i.s,i.m?e=i.m(e,this._target||i.t):1e-6>e&&e>-1e-6&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},N=function(t,e,i,s){var r,n,a,o,l,h,_,u=[t,e],f=0,c="",p=0;for(u.start=t,i&&(i(u),t=u[0],e=u[1]),u.length=0,r=t.match(X)||[],n=e.match(X)||[],s&&(s._next=null,s.blob=1,u._firstPT=u._applyPT=s),l=n.length,o=0;l>o;o++)_=n[o],c+=(h=e.substr(f,e.indexOf(_,f)-f))||!o?h:",",f+=h.length,p?p=(p+1)%5:"rgba("===h.substr(-5)&&(p=1),_===r[o]||r.length<=o?c+=_:(c&&(u.push(c),c=""),a=parseFloat(r[o]),u.push(a),u._firstPT={_next:u._firstPT,t:u,p:u.length-1,s:a,c:("="===_.charAt(1)?parseInt(_.charAt(0)+"1",10)*parseFloat(_.substr(2)):parseFloat(_)-a)||0,f:0,m:p&&4>p?Math.round:0}),f+=_.length;return(c+=e.substr(f))&&u.push(c),u.setRatio=I,u},L=function(t,e,i,s,r,n,a,o,l){"function"==typeof s&&(s=s(l||0,t));var h,_="get"===i?t[e]:i,u=typeof t[e],f="string"==typeof s&&"="===s.charAt(1),c={t:t,p:e,s:_,f:"function"===u,pg:0,n:r||e,m:n?"function"==typeof n?n:Math.round:0,pr:0,c:f?parseInt(s.charAt(0)+"1",10)*parseFloat(s.substr(2)):parseFloat(s)-_||0};return"number"!==u&&("function"===u&&"get"===i&&(h=e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3),c.s=_=a?t[h](a):t[h]()),"string"==typeof _&&(a||isNaN(_))?(c.fp=a,c={t:N(_,s,o||D.defaultStringFilter,c),p:"setRatio",s:0,c:1,f:2,pg:0,n:r||e,pr:0,m:0}):f||(c.s=parseFloat(_),c.c=parseFloat(s)-c.s||0)),c.c?((c._next=this._firstPT)&&(c._next._prev=c),this._firstPT=c,c):void 0},E=D._internals={isArray:p,isSelector:M,lazyTweens:F,blobDif:N},Y=D._plugins={},B=E.tweenLookup={},j=0,U=E.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},V={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},q=R._rootFramesTimeline=new C,W=R._rootTimeline=new C,Z=30,G=E.lazyRender=function(){var t,e=F.length;for(z={};--e>-1;)(t=F[e])&&!1!==t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);F.length=0};W._startTime=o.time,q._startTime=o.frame,W._active=q._active=!0,setTimeout(G,1),R._updateRoot=D.render=function(){var t,e,i;if(F.length&&G(),W.render((o.time-W._startTime)*W._timeScale,!1,!1),q.render((o.frame-q._startTime)*q._timeScale,!1,!1),F.length&&G(),o.frame>=Z){for(i in Z=o.frame+(parseInt(D.autoSleep,10)||120),B){for(t=(e=B[i].tweens).length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete B[i]}if((!(i=W._first)||i._paused)&&D.autoSleep&&!q._first&&1===o._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||o.sleep()}}},o.addEventListener("tick",R._updateRoot);var $=function(t,e,i){var s,r,n=t._gsTweenID;if(B[n||(t._gsTweenID=n="t"+j++)]||(B[n]={target:t,tweens:[]}),e&&((s=B[n].tweens)[r=s.length]=e,i))for(;--r>-1;)s[r]===e&&s.splice(r,1);return B[n].tweens},Q=function(t,e,i,s){var r,n,a=t.vars.onOverwrite;return a&&(r=a(t,e,i,s)),(a=D.onOverwrite)&&(n=a(t,e,i,s)),!1!==r&&!1!==n},H=function(t,e,i,s,r){var n,a,o,l;if(1===s||s>=4){for(l=r.length,n=0;l>n;n++)if((o=r[n])!==e)o._gc||o._kill(null,t,e)&&(a=!0);else if(5===s)break;return a}var h,_=e._startTime+u,f=[],c=0,p=0===e._duration;for(n=r.length;--n>-1;)(o=r[n])===e||o._gc||o._paused||(o._timeline!==e._timeline?(h=h||K(e,0,p),0===K(o,h,p)&&(f[c++]=o)):o._startTime<=_&&o._startTime+o.totalDuration()/o._timeScale>_&&((p||!o._initted)&&_-o._startTime<=2e-10||(f[c++]=o)));for(n=c;--n>-1;)if(o=f[n],2===s&&o._kill(i,t,e)&&(a=!0),2!==s||!o._firstPT&&o._initted){if(2!==s&&!Q(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},K=function(t,e,i){for(var s=t._timeline,r=s._timeScale,n=t._startTime;s._timeline;){if(n+=s._startTime,r*=s._timeScale,s._paused)return-100;s=s._timeline}return(n/=r)>e?n-e:i&&n===e||!t._initted&&2*u>n-e?u:(n+=t.totalDuration()/t._timeScale/r)>e+u?0:n-e-u};a._init=function(){var t,e,i,s,r,n,a=this.vars,o=this._overwrittenProps,l=this._duration,h=!!a.immediateRender,_=a.ease;if(a.startAt){for(s in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),r={},a.startAt)r[s]=a.startAt[s];if(r.overwrite=!1,r.immediateRender=!0,r.lazy=h&&!1!==a.lazy,r.startAt=r.delay=null,this._startAt=D.to(this.target,0,r),h)if(this._time>0)this._startAt=null;else if(0!==l)return}else if(a.runBackwards&&0!==l)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{for(s in 0!==this._time&&(h=!1),i={},a)U[s]&&"autoCSS"!==s||(i[s]=a[s]);if(i.overwrite=0,i.data="isFromStart",i.lazy=h&&!1!==a.lazy,i.immediateRender=h,this._startAt=D.to(this.target,0,i),h){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=_=_?_ instanceof T?_:"function"==typeof _?new T(_,a.easeParams):x[_]||D.defaultEase:D.defaultEase,a.easeParams instanceof Array&&_.config&&(this._ease=_.config.apply(_,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(n=this._targets.length,t=0;n>t;t++)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],o?o[t]:null,t)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,o,0);if(e&&D._onPluginEvent("_onInitAllProps",this),o&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),a.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=a.onUpdate,this._initted=!0},a._initProps=function(e,i,s,r,n){var a,o,l,h,_,u;if(null==e)return!1;for(a in z[e._gsTweenID]&&G(),this.vars.css||e.style&&e!==t&&e.nodeType&&Y.css&&!1!==this.vars.autoCSS&&function(t,e){var i,s={};for(i in t)U[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!Y[i]||Y[i]&&Y[i]._autoCSS)||(s[i]=t[i],delete t[i]);t.css=s}(this.vars,e),this.vars)if(u=this.vars[a],U[a])u&&(u instanceof Array||u.push&&p(u))&&-1!==u.join("").indexOf("{self}")&&(this.vars[a]=u=this._swapSelfInParams(u,this));else if(Y[a]&&(h=new Y[a])._onInitTween(e,this.vars[a],this,n)){for(this._firstPT=_={_next:this._firstPT,t:h,p:"setRatio",s:0,c:1,f:1,n:a,pg:1,pr:h._priority,m:0},o=h._overwriteProps.length;--o>-1;)i[h._overwriteProps[o]]=this._firstPT;(h._priority||h._onInitAllProps)&&(l=!0),(h._onDisable||h._onEnable)&&(this._notifyPluginsOfEnabled=!0),_._next&&(_._next._prev=_)}else i[a]=L.call(this,e,a,"get",u,a,0,null,this.vars.stringFilter,n);return r&&this._kill(r,e)?this._initProps(e,i,s,r,n):this._overwrite>1&&this._firstPT&&s.length>1&&H(e,this,i,this._overwrite,s)?(this._kill(i,e),this._initProps(e,i,s,r,n)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(z[e._gsTweenID]=!0),l)},a.render=function(t,e,i){var s,r,n,a,o=this._time,l=this._duration,h=this._rawPrevTime;if(t>=l-1e-7)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(s=!0,r="onComplete",i=i||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(0>h||0>=t&&t>=-1e-7||h===u&&"isPause"!==this.data)&&h!==t&&(i=!0,h>u&&(r="onReverseComplete")),this._rawPrevTime=a=!e||t||h===t?t:u);else if(1e-7>t)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&h>0)&&(r="onReverseComplete",s=this._reversed),0>t&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||i)&&(h>=0&&(h!==u||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=a=!e||t||h===t?t:u)),this._initted||(i=!0);else if(this._totalTime=this._time=t,this._easeType){var _=t/l,f=this._easeType,c=this._easePower;(1===f||3===f&&_>=.5)&&(_=1-_),3===f&&(_*=2),1===c?_*=_:2===c?_*=_*_:3===c?_*=_*_*_:4===c&&(_*=_*_*_*_),this.ratio=1===f?1-_:2===f?_:.5>t/l?_/2:1-_/2}else this.ratio=this._ease.getRatio(t/l);if(this._time!==o||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=h,F.push(this),void(this._lazy=[t,e]);this._time&&!s?this.ratio=this._ease.getRatio(this._time/l):s&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&t>=0&&(this._active=!0),0===o&&(this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0!==this._time||0===l)&&(e||this._callback("onStart"))),n=this._firstPT;n;)n.f?n.t[n.p](n.c*this.ratio+n.s):n.t[n.p]=n.c*this.ratio+n.s,n=n._next;this._onUpdate&&(0>t&&this._startAt&&-1e-4!==t&&this._startAt.render(t,e,i),e||(this._time!==o||s||i)&&this._callback("onUpdate")),r&&(!this._gc||i)&&(0>t&&this._startAt&&!this._onUpdate&&-1e-4!==t&&this._startAt.render(t,e,i),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this._callback(r),0===l&&this._rawPrevTime===u&&a!==u&&(this._rawPrevTime=0))}},a._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:D.selector(e)||e;var s,r,n,a,o,l,h,_,u,f=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((p(e)||M(e))&&"number"!=typeof e[0])for(s=e.length;--s>-1;)this._kill(t,e[s],i)&&(l=!0);else{if(this._targets){for(s=this._targets.length;--s>-1;)if(e===this._targets[s]){o=this._propLookup[s]||{},this._overwrittenProps=this._overwrittenProps||[],r=this._overwrittenProps[s]=t?this._overwrittenProps[s]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,r=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(h=t||o,_=t!==r&&"all"!==r&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(D.onOverwrite||this.vars.onOverwrite)){for(n in h)o[n]&&(u||(u=[]),u.push(n));if((u||!t)&&!Q(this,i,e,u))return!1}for(n in h)(a=o[n])&&(f&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,l=!0),a.pg&&a.t._kill(h)&&(l=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete o[n]),_&&(r[n]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},a.invalidate=function(){return this._notifyPluginsOfEnabled&&D._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],R.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-u,this.render(Math.min(0,-this._delay))),this},a._enabled=function(t,e){if(l||o.wake(),t&&this._gc){var i,s=this._targets;if(s)for(i=s.length;--i>-1;)this._siblings[i]=$(s[i],this,!0);else this._siblings=$(this.target,this,!0)}return R.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&D._onPluginEvent(t?"_onEnable":"_onDisable",this)},D.to=function(t,e,i){return new D(t,e,i)},D.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new D(t,e,i)},D.fromTo=function(t,e,i,s){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,new D(t,e,s)},D.delayedCall=function(t,e,i,s,r){return new D(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:s,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:r,overwrite:0})},D.set=function(t,e){return new D(t,0,e)},D.getTweensOf=function(t,e){if(null==t)return[];var i,s,r,n;if(t="string"!=typeof t?t:D.selector(t)||t,(p(t)||M(t))&&"number"!=typeof t[0]){for(i=t.length,s=[];--i>-1;)s=s.concat(D.getTweensOf(t[i],e));for(i=s.length;--i>-1;)for(n=s[i],r=i;--r>-1;)n===s[r]&&s.splice(i,1)}else for(i=(s=$(t).concat()).length;--i>-1;)(s[i]._gc||e&&!s[i].isActive())&&s.splice(i,1);return s},D.killTweensOf=D.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var s=D.getTweensOf(t,e),r=s.length;--r>-1;)s[r]._kill(i,t)};var J=v("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=J.prototype},!0);if(a=J.prototype,J.version="1.19.0",J.API=2,a._firstPT=null,a._addTween=L,a.setRatio=I,a._kill=function(t){var e,i=this._overwriteProps,s=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1);for(;s;)null!=t[s.n]&&(s._next&&(s._next._prev=s._prev),s._prev?(s._prev._next=s._next,s._prev=null):this._firstPT===s&&(this._firstPT=s._next)),s=s._next;return!1},a._mod=a._roundProps=function(t){for(var e,i=this._firstPT;i;)(e=t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&"function"==typeof e&&(2===i.f?i.t._applyPT.m=e:i.m=e),i=i._next},D._onPluginEvent=function(t,e){var i,s,r,n,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,s=r;s&&s.pr>o.pr;)s=s._next;(o._prev=s?s._prev:n)?o._prev._next=o:r=o,(o._next=s)?s._prev=o:n=o,o=a}o=e._firstPT=r}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},J.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===J.API&&(Y[(new t[e])._propName]=t[e]);return!0},g.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,s=t.priority||0,r=t.overwriteProps,n={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=v("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){J.call(this,i,s),this._overwriteProps=r||[]},!0===t.global),o=a.prototype=new J(i);for(e in o.constructor=a,a.API=t.API,n)"function"==typeof t[e]&&(o[n[e]]=t[e]);return a.version=t.version,J.activate([a]),a},r=t._gsQueue){for(n=0;n -1) {
$('.ibis-iframe').hide();
$('
').insertAfter('.ibis-iframe');
ibisCSS3Spinner('.ibis-loading-spinner');
$('.ibis-iframe').one('load', function () {
$('.ibis-iframe').attr('src', window.location.href.substr(window.location.href.indexOf('ibisifrmdest=') + 13, window.location.href.length));
$('.ibis-iframe').one('load', function () {
$('.ibis-loading-spinner').hide();
$('.ibis-iframe').show();
})
})
}
})
})(jQuery);
/* IBIS CSS3 Spinner : v1.0 - 3 Sep 2018 */
/* Based on SpinKit : https://tobiasahlin.com/spinkit/ */
function ibisCSS3Spinner(target) {
(function ($) {
$(target).html('')
})(jQuery);
}
/* IBIS Get URL Variables : v1.0 - 30 Apr 2019 */
function ibisGetVariables() {
var $vars = [], $hash;
var $hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < $hashes.length; i++) {
$hash = $hashes[i].split('=');
$vars.push($hash[0]);
$vars[$hash[0]] = $hash[1];
}
return $vars;
}
/* IBIS Iframe ScrollToIframe : v.1.0 - 21 Aug 2018 */
function ibisScrollToElement(o) {
/* USAGE EXAMPLE
$('.ibis-iframe').load(function () {
iFrameResize({
checkOrigin: false,
onResized: ibisScrollToElement({
target: '#primary', // element to scroll back to
offset: -120, // negative Y direction offset from #primary element
animation: true // smooth scroll set
})
})
})
*/
(function ($) {
var t = 0;
void 0 !== o.offset && (t = o.offset);
var i = 'auto';
1 == o.animation && (i = 'smooth');
var a = $(o.target).position().top + t;
window.scrollTo({
top: a,
behavior: i
})
})(jQuery);
}
/* IBIS Window Width Custom Class : v1.0 - 20 Aug 2019 */
function ibisWindowResizeClass(e, f, g) {
(function ($) {
$(function () {
doResize(e, f, g);
})
$(window).resize(function () {
doResize(e, f, g);
})
function doResize() {
if (window.innerWidth <= e) {
$(f).addClass(g);
} else {
$(f).removeClass(g);
}
}
})(jQuery);
}
/* IBIS Get Datetime in NZ Standard Time : v1.1 - 22 Feb 2021 */
function ibisNZTime(date) {
typeof date == typeof undefined && (date = new Date());
if (/MSIE 11/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /MSIE 8/i.test(navigator.userAgent)) {
$('body').addClass('is-ie');
IbisCustom.showIEMessage();
return new Date(date);
} else {
var nzTime = new Date(date).toLocaleString('en-US', { timeZone: 'Pacific/Auckland' }),
nzTime = new Date(nzTime);
return nzTime;
}
}
/* IBIS Add Months : v1.0 - 4 May 2021 */
function ibisAddMonths(date, months) {
var result = new Date(date);
result.setMonth(result.getMonth() + months);
return result;
}
/* IBIS Add Days : v1.1 - 23 Oct 2019 */
function ibisAddDays(date, days) {
var result = ibisNZTime(date);
result.setDate(result.getDate() + days);
return result;
}
/* IBIS Get ISO Format Date : v1.0 - 22 Aug 2019 */
function ibisISOFormatDate(date) {
var dateDay = (date.getDate() < 10 ? '0' : '') + date.getDate(),
dateMonth = ((date.getMonth() + 1) < 10 ? '0' : '') + (date.getMonth() + 1),
dateFull = date.getFullYear() + "-" + dateMonth + "-" + dateDay;
return dateFull;
}
/* IBIS Get Day Name : v1.0 - 4 May 2021 */
function ibisGetDayName(date) {
var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
dayName = days[date.getDay()];
return dayName;
}
/* IBIS Get Month Name : v1.0 - 4 May 2021 */
function ibisGetMonthName(date) {
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
monthName = months[date.getMonth()];
return monthName;
}
/* IBIS Compare Dates : v1.0 - 4 Nov 2019 */
function ibisCompareTimes(time1, time2) {
var result = false,
timeParse1 = time1 + ':00',
timeParse2 = time2 + ':00';
if (timeParse1 >= timeParse2) {
result = true;
}
return result;
}
/* IBIS Format Currency : v1.0 - 4 May 2021 */
function ibisFormatCurrency(money) {
return (money).toLocaleString('en-NZ', {
style: 'currency',
currency: 'NZD',
});
}
/* IBIS Detect Click Drag : v1.0 - 28 Sep 2021 */
function ibisDetectClickDrag(element) {
var initiated = false;
var drag = false;
$(element).off("mousemove touchmove").on("mousemove touchmove", function () {
drag = true;
})
$(element).off("mouseup touchend").on("mouseup touchend", function () {
if (drag == false) {
return "drag";
} else {
return "click";
}
})
}
/* IBIS Email Input Validation : v1.0 - 22 Oct 2021 */
function ibisEmailValidation(email) {
var result = false;
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)) {
result = true;
}
return result;
}
/* IBIS Widget Set-up Error Check : v1.0 - 2 June 2021 */
function ibisSetupErrorCheck(element) {
(function ($) {
if ($(element).length > 1) {
console.error('IBIS Widget error: ' + $(element).length + ' elements with ' + element + ' class detected. Please check your set-up and make sure that there is only one ' + element + ' element on the page.');
ibisWidgetError = true;
return;
}
if ($(element).length == 0) {
console.error('IBIS Widget error: No ' + element + ' element detected. Please make sure that there is one element with ' + element + ' class on the page.');
ibisWidgetError = true;
return;
}
ibisWidgetError = false;
})(jQuery);
}
/* IBIS Widget Option Error Check : v1.0 - 2 June 2021 */
function ibisOptionErrorCheck(appURL, cartDir, mode) {
appURL == undefined && (console.error('IBIS Widget error: appURL option is compulsory.'));
if (mode == 'iframe' && cartDir == undefined) {
console.error('IBIS Widget error: cartDir option is compulsory for iframe mode.');
ibisWidgetError = true;
return;
}
ibisWidgetError = false;
}
/* IBIS Console Log : v1.0 - 20 Oct 2021 */
function ibisConsoleLog(log, mode) {
if (ibisGetVariables()["mode"] == "debug") {
if (mode != undefined) {
switch (mode) {
case "error":
console.error(log);
break;
case "info":
console.info(log);
break;
case "table":
console.table(log);
break;
default:
console.log(log);
}
} else {
console.log(log);
}
}
}
/* IBIS Cart Widget : v1.4 - 14 Sep 2019 */
function ibisCallbackCart(a, i, t, s, b, then) {
(function ($) {
$('.ibis-widget-cart').each(function () {
$ga = ibisGetVariables()['_ga'],
$ibisCart = $(this),
$ibisCart.html(''),
$.each(a.CartSummary,
function (a, r) {
$ibisCart.append('' + r.TotalUnits + '
'),
r.TotalUnits > 0 && ($('.fit5-cart-widget').addClass('has-item'), $('.fit5-cart-widget').on('click', function () {
if (!$(this).hasClass('has-item')) {return false;}
if ('sa' == t) var a = i + '/Cart';
else a = '//' + window.location.hostname + s;
if ($ga != undefined) a = a + '?_ga=' + $ga;
$('.fit5-cart-widget').click(location.href = a);
}
))
})
if (then != null) {
setTimeout(function () {
then();
}, 1000);
}
})
})(jQuery);
}
function ibisRefreshCart(a) {
(function ($) {
if (void 0 !== a.mode) {
var i = a.cartDir,
t = a.appURL,
s = 'if'
} else {
var t = a.appURL,
s = 'sa',
b = 'lite';
}
if (a.theme == 'dark') {
b = 'dark'
};
then = a.then;
$.ajax({
url: t + '/Cart/jsonP_Summary',
dataType: 'jsonp',
jsonpCallback: 'ibisCallbackCart',
success: function (a) {
ibisCallbackCart(a, t, s, i, b, then)
}
})
})(jQuery);
}
/* IBIS Departures Widget : v1.5.1.1 - 2 Jun 2021 */
function ibisCallbackDepartures(i, containerElement, theme, mode, cartDir, appURL, showIn24H, showAvail, showBookLink, bookLinkText, bookLinkTextMobile, linkOpenNewWindow, callingFrom) {
(function ($) {
$ga = ibisGetVariables()['_ga'];
var b = 0;
$ibisDepartures = $(containerElement),
$ibisDepartures.html(''),
$.each(i.products, function (i, e) {
$.each(e.departures, function (i, n) {
if (null != n.bookurl) {
var p = n.time.substring(0, 2),
c = n.time.substring(3, 5),
h = 11 < p ? 'pm' : 'am';
if (showIn24H == true) {
var v = p + ':' + c;
} else {
12 < p ? p -= 12 : 0 == p ? p = 12 : p < 10 && (p = p.substring(1, 2)),
v = p + ':' + c + ' ' + h;
}
var m = '' + n.space + '
';
showAvail == false && (m = "");
var f = appURL + n.bookurl;
mode == 'iframe' && (f = cartDir + '?ibisifrmdest=' + appURL + n.bookurl);
if ($ga != undefined) {
if (f.indexOf('?') > 0) {
f = f + '&_ga=' + $ga;
} else {
f = f + '?_ga=' + $ga;
}
}
var dept = e.name + ' (' + n.space + ')';
bookLinkTextMobile != null ? (dept = (showAvail == false) ? bookLinkTextMobile : bookLinkTextMobile + ' (' + n.space + ')') : (dept = (showAvail == false) ? e.name : e.name + ' (' + n.space + ')');
var y = '';
y = '',
linkOpenNewWindow == true && (y = ''),
mode == 'iframe' && (y = ''),
showBookLink == false && (y = ''),
$ibisDepartures.append('' + v + '
' + e.name + ' ' + dept + '
' + m + y + '
'),
b++
}
})
});
$ibisDepartures.wrap('
').removeClass('lite dark').addClass(theme);
if (b == 0) {
var noDepartElement = '';
if (i.callingFrom == 'calendar') {
if (containerElement != undefined) {
noDepartElement = containerElement + ' .ibis-widget-departures .ibis-departures-container';
} else {
noDepartElement = containerElement + ' .ibis-departures-container';
}
} else {
noDepartElement = containerElement + '.ibis-departures-container';
}
$('body').find(containerElement).html('No departure available
');
} else {
var b = Math.max.apply(null, $(containerElement + ' .ibis-dept').map(function () {
return $(this).outerWidth(!0)
}).get());
$(containerElement + ' .ibis-dept').css('width', b),
b = Math.max.apply(null, $(containerElement + ' .ibis-prod').map(function () {
return $(this).outerWidth(!0)
}).get()),
$(containerElement + ' .ibis-prod').css('width', b),
b = Math.max.apply(null, $(containerElement + ' .ibis-avail').map(function () {
return $(this).outerWidth(!0)
}).get()),
$(containerElement + ' .ibis-avail').css('width', b),
$(containerElement + ' .ibis-prod').click(function () {
$(containerElement + ' .ibis-show-mobile').is(':visible') && (location.href = $(this).data('target'))
})
};
})(jQuery);
}
function ibisWidgetDepartures(i) {
(function ($) {
var containerElement = '.ibis-widget-departures:eq(0)';
/* Error handling - check set-up errors and throw error in the console */
if (i.container != null) {
containerElement = i.container + ':eq(0)';
ibisSetupErrorCheck(i.container);
} else {
ibisSetupErrorCheck('.ibis-widget-departures');
}
ibisOptionErrorCheck(i.appURL, i.cartDir, i.mode);
if (containerElement.length) {
$(containerElement).addClass('ibis-widget-departures-wrapper');
if (0 != i.mobileViewThreshold) {
ibisWindowResizeClass(i.mobileViewThreshold, containerElement, 'ibis-widtet-mobile-mode');
}
var defaultDate = ibisNZTime(new Date());
if (i.rollover != null) {
var currentTime = defaultDate.getHours() + ':' + defaultDate.getMinutes();
if (ibisCompareTimes(currentTime, i.rollover) == true) {
defaultDate = ibisAddDays(defaultDate, 1);
}
}
null != i.defaultDate && (defaultDate = ibisNZTime(i.defaultDate));
var defaultDateFull = ibisISOFormatDate(defaultDate),
prodCode = '',
theme = 'lite';
null != i.theme && (theme = i.theme),
null != i.prodCode && (prodCode = i.prodCode);
var bookLinkText = 'Book Now';
null != i.bookLinkText && (bookLinkText = i.bookLinkText),
$.ajax({
url: i.appURL + '/Departures/ByProduct_Json?workingdate=' + defaultDateFull + '&productcode=' + prodCode,
dataType: 'jsonp',
jsonpCallback: 'ibisCallbackDepartures',
success: function (e) {
ibisCallbackDepartures(e, containerElement, theme, i.mode, i.cartDir, i.appURL, i.showIn24H, i.showAvail, i.showBookLink, bookLinkText, i.bookLinkTextMobile, i.linkOpenNewWindow, i.callingFrom)
setTimeout(function () {
$('.ibis-widget-calendar').removeClass('loading');
}, 200);
},
error: function (i, e) {
console.log(i), console.log('**[ibisWidgetDepartures()]** errorThrown:' + e)
}
})
if (i.then != null) {
setTimeout(function () {
i.then();
}, 1000);
}
}
})(jQuery);
}
/* IBIS Calendar : v1.7 - 21 Oct 2021 : Dependancies : IBIS Departures Widget */
/* Requires FIT6 2021 Dev 1 */
/* Based on PIGNOSE Calendar : https://www.pigno.se/barn/PIGNOSE-Calendar/ */
//================================================================================
// [pg-calendar]
// version: 1.4.31
// update: 2019.07.11
//================================================================================
!function (e, t) { if (void 0 === e && void 0 !== window && (e = window), "function" == typeof define && define.amd) define(["jquery"], function (e) { return t(e) }); else if ("object" == typeof module && module.exports) { var n = t(require("jquery")); module.exports = n } else t(e.jquery) }(this, function (e) { var t, Zn, n, f, r, i, m, g, p, y, _, v, s, a, k, o, l; function w(e, t) { return s.call(e, t) } function u(e, t) { var n, s, a, r, i, o, l, u, d, c, h, f = t && t.split("/"), m = _.map, g = m && m["*"] || {}; if (e) { for (i = (e = e.split("/")).length - 1, _.nodeIdCompat && k.test(e[i]) && (e[i] = e[i].replace(k, "")), "." === e[0].charAt(0) && f && (e = f.slice(0, f.length - 1).concat(e)), d = 0; d < e.length; d++) if ("." === (h = e[d])) e.splice(d, 1), d -= 1; else if (".." === h) { if (0 === d || 1 === d && ".." === e[2] || ".." === e[d - 1]) continue; 0 < d && (e.splice(d - 1, 2), d -= 2) } e = e.join("/") } if ((f || g) && m) { for (d = (n = e.split("/")).length; 0 < d; d -= 1) { if (s = n.slice(0, d).join("/"), f) for (c = f.length; 0 < c; c -= 1) if (a = (a = m[f.slice(0, c).join("/")]) && a[s]) { r = a, o = d; break } if (r) break; !l && g && g[s] && (l = g[s], u = d) } !r && l && (r = l, o = u), r && (n.splice(0, o, r), e = n.join("/")) } return e } function M(t, n) { return function () { var e = a.call(arguments, 0); return "string" != typeof e[0] && 1 === e.length && e.push(null), i.apply(f, e.concat([t, n])) } } function D(t) { return function (e) { p[t] = e } } function b(e) { if (w(y, e)) { var t = y[e]; delete y[e], v[e] = !0, r.apply(f, t) } if (!w(p, e) && !w(v, e)) throw new Error("No " + e); return p[e] } function d(e) { var t, n = e ? e.indexOf("!") : -1; return -1 < n && (t = e.substring(0, n), e = e.substring(n + 1, e.length)), [t, e] } function S(e) { return e ? d(e) : [] } function U(e) { return (U = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e })(e) } function U(e) { return (U = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e })(e) } p = {}, y = {}, _ = {}, v = {}, s = Object.prototype.hasOwnProperty, a = [].slice, k = /\.js$/, m = function (e, t) { var n, s = d(e), a = s[0], r = t[1]; return e = s[1], a && (n = b(a = u(a, r))), a ? e = n && n.normalize ? n.normalize(e, function (t) { return function (e) { return u(e, t) } }(r)) : u(e, r) : (a = (s = d(e = u(e, r)))[0], e = s[1], a && (n = b(a))), { f: a ? a + "!" + e : e, n: e, pr: a, p: n } }, g = { require: function (e) { return M(e) }, exports: function (e) { var t = p[e]; return void 0 !== t ? t : p[e] = {} }, module: function (e) { return { id: e, uri: "", exports: p[e], config: function (e) { return function () { return _ && _.config && _.config[e] || {} } }(e) } } }, r = function (e, t, n, s) { var a, r, i, o, l, u, d, c = [], h = typeof n; if (u = S(s = s || e), "undefined" == h || "function" == h) { for (t = !t.length && n.length ? ["require", "exports", "module"] : t, l = 0; l < t.length; l += 1) if ("require" === (r = (o = m(t[l], u)).f)) c[l] = g.require(e); else if ("exports" === r) c[l] = g.exports(e), d = !0; else if ("module" === r) a = c[l] = g.module(e); else if (w(p, r) || w(y, r) || w(v, r)) c[l] = b(r); else { if (!o.p) throw new Error(e + " missing " + r); o.p.load(o.n, M(s, !0), D(r), {}), c[l] = p[r] } i = n ? n.apply(p[e], c) : void 0, e && (a && a.exports !== f && a.exports !== p[e] ? p[e] = a.exports : i === f && d || (p[e] = i)) } else e && (p[e] = n) }, t = Zn = i = function (e, t, n, s, a) { if ("string" == typeof e) return g[e] ? g[e](t) : b(m(e, S(t)).f); if (!e.splice) { if ((_ = e).deps && i(_.deps, _.callback), !t) return; t.splice ? (e = t, t = n, n = null) : e = f } return t = t || function () { }, "function" == typeof n && (n = s, s = a), s ? r(f, e, t, n) : setTimeout(function () { r(f, e, t, n) }, 4), i }, i.config = function (e) { return i(e) }, t._defined = p, (n = function (e, t, n) { if ("string" != typeof e) throw new Error("See almond README: incorrect module build, no module name"); t.splice || (n = t, t = []), w(p, e) || w(y, e) || (y[e] = [e, t, n]) }).amd = { jQuery: !0 }, n("almond", function () { }), n("component/models", [], function () { return { name: "pignoseCalendar", version: "1.4.31", preference: { supports: { themes: ["light", "dark", "blue"] } } } }), n("component/helper", ["./models"], function (u) { function n() { } var i = {}, d = {}, s = {}, c = /[A-Z]/; return n.format = function (e) { if (e) { var t = Array.prototype.slice.call(arguments, 1), n = e + t.join("."); if (i[n]) return i[n]; for (var s = t.length, a = 0; a < s; a++) { var r = t[a]; e = e.replace(new RegExp("((?!\\\\)?\\{" + a + "(?!\\\\)?\\})", "g"), r) } return e = e.replace(new RegExp("\\\\{([0-9]+)\\\\}", "g"), "{$1}"), i[n] = e } return "" }, n.getClass = function (e) { var t = [u.name, e].join("."); if (d[t]) return d[t]; for (var n = e.split(""), s = [], a = n.length, r = 0, i = 0; r < a; r++) { var o = n[r]; !0 === c.test(o) && (s[i++] = "-", o = o.toString().toLowerCase()), s[i++] = o } var l = s.join(""); return d[t] = l }, n.getSubClass = function (e) { if (e && e.length) { var t = e.split(""); t[0] = t[0].toUpperCase(), e = t.join("") } return s[e] || (s[e] = n.getClass(n.format("{0}{1}", u.name, e))), s[e] }, n }), o = this, l = function () { "use strict"; var e, a; function _() { return e.apply(null, arguments) } function o(e) { return e instanceof Array || "[object Array]" === Object.prototype.toString.call(e) } function l(e) { return null != e && "[object Object]" === Object.prototype.toString.call(e) } function u(e) { return void 0 === e } function d(e) { return "number" == typeof e || "[object Number]" === Object.prototype.toString.call(e) } function c(e) { return e instanceof Date || "[object Date]" === Object.prototype.toString.call(e) } function h(e, t) { var n, s = []; for (n = 0; n < e.length; ++n) s.push(t(e[n], n)); return s } function v(e, t) { return Object.prototype.hasOwnProperty.call(e, t) } function f(e, t) { for (var n in t) v(t, n) && (e[n] = t[n]); return v(t, "toString") && (e.toString = t.toString), v(t, "valueOf") && (e.valueOf = t.valueOf), e } function m(e, t, n, s) { return St(e, t, n, s, !0).utc() } function k(e) { return null == e._pf && (e._pf = { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidMonth: null, invalidFormat: !1, userInvalidated: !1, iso: !1, parsedDateParts: [], meridiem: null, rfc2822: !1, weekdayMismatch: !1 }), e._pf } function g(e) { if (null == e._isValid) { var t = k(e), n = a.call(t.parsedDateParts, function (e) { return null != e }), s = !isNaN(e._d.getTime()) && t.overflow < 0 && !t.empty && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && n); if (e._strict && (s = s && 0 === t.charsLeftOver && 0 === t.unusedTokens.length && void 0 === t.bigHour), null != Object.isFrozen && Object.isFrozen(e)) return s; e._isValid = s } return e._isValid } function p(e) { var t = m(NaN); return null != e ? f(k(t), e) : k(t).userInvalidated = !0, t } a = Array.prototype.some ? Array.prototype.some : function (e) { for (var t = Object(this), n = t.length >>> 0, s = 0; s < n; s++) if (s in t && e.call(this, t[s], s, t)) return !0; return !1 }; var r = _.momentProperties = []; function y(e, t) { var n, s, a; if (u(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), u(t._i) || (e._i = t._i), u(t._f) || (e._f = t._f), u(t._l) || (e._l = t._l), u(t._strict) || (e._strict = t._strict), u(t._tzm) || (e._tzm = t._tzm), u(t._isUTC) || (e._isUTC = t._isUTC), u(t._offset) || (e._offset = t._offset), u(t._pf) || (e._pf = k(t)), u(t._locale) || (e._locale = t._locale), 0 < r.length) for (n = 0; n < r.length; n++) u(a = t[s = r[n]]) || (e[s] = a); return e } var t = !1; function w(e) { y(this, e), this._d = new Date(null != e._d ? e._d.getTime() : NaN), this.isValid() || (this._d = new Date(NaN)), !1 === t && (t = !0, _.updateOffset(this), t = !1) } function M(e) { return e instanceof w || null != e && null != e._isAMomentObject } function D(e) { return e < 0 ? Math.ceil(e) || 0 : Math.floor(e) } function b(e) { var t = +e, n = 0; return 0 != t && isFinite(t) && (n = D(t)), n } function i(e, t, n) { var s, a = Math.min(e.length, t.length), r = Math.abs(e.length - t.length), i = 0; for (s = 0; s < a; s++) (n && e[s] !== t[s] || !n && b(e[s]) !== b(t[s])) && i++; return i + r } function S(e) { !1 === _.suppressDeprecationWarnings && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + e) } function n(a, r) { var i = !0; return f(function () { if (null != _.deprecationHandler && _.deprecationHandler(null, a), i) { for (var e, t = [], n = 0; n < arguments.length; n++) { if (e = "", "object" == typeof arguments[n]) { for (var s in e += "\n[" + n + "] ", arguments[0]) e += s + ": " + arguments[0][s] + ", "; e = e.slice(0, -2) } else e = arguments[n]; t.push(e) } S(a + "\nArguments: " + Array.prototype.slice.call(t).join("") + "\n" + (new Error).stack), i = !1 } return r.apply(this, arguments) }, r) } var s, Y = {}; function C(e, t) { null != _.deprecationHandler && _.deprecationHandler(e, t), Y[e] || (S(t), Y[e] = !0) } function O(e) { return e instanceof Function || "[object Function]" === Object.prototype.toString.call(e) } function T(e, t) { var n, s = f({}, e); for (n in t) v(t, n) && (l(e[n]) && l(t[n]) ? (s[n] = {}, f(s[n], e[n]), f(s[n], t[n])) : null != t[n] ? s[n] = t[n] : delete s[n]); for (n in e) v(e, n) && !v(t, n) && l(e[n]) && (s[n] = f({}, s[n])); return s } function x(e) { null != e && this.set(e) } _.suppressDeprecationWarnings = !1, _.deprecationHandler = null, s = Object.keys ? Object.keys : function (e) { var t, n = []; for (t in e) v(e, t) && n.push(t); return n }; var W = {}; function P(e, t) { var n = e.toLowerCase(); W[n] = W[n + "s"] = W[t] = e } function L(e) { return "string" == typeof e ? W[e] || W[e.toLowerCase()] : void 0 } function A(e) { var t, n, s = {}; for (n in e) v(e, n) && (t = L(n)) && (s[t] = e[n]); return s } var H = {}; function F(e, t) { H[e] = t } function R(e, t, n) { var s = "" + Math.abs(e), a = t - s.length; return (0 <= e ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, a)).toString().substr(1) + s } var j = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, N = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, U = {}, G = {}; function V(e, t, n, s) { var a = s; "string" == typeof s && (a = function () { return this[s]() }), e && (G[e] = a), t && (G[t[0]] = function () { return R(a.apply(this, arguments), t[1], t[2]) }), n && (G[n] = function () { return this.localeData().ordinal(a.apply(this, arguments), e) }) } function E(e, t) { return e.isValid() ? (t = I(t, e.localeData()), U[t] = U[t] || function (s) { var e, a, t, r = s.match(j); for (e = 0, a = r.length; e < a; e++) G[r[e]] ? r[e] = G[r[e]] : r[e] = (t = r[e]).match(/\[[\s\S]/) ? t.replace(/^\[|\]$/g, "") : t.replace(/\\/g, ""); return function (e) { var t, n = ""; for (t = 0; t < a; t++) n += O(r[t]) ? r[t].call(e, s) : r[t]; return n } }(t), U[t](e)) : e.localeData().invalidDate() } function I(e, t) { var n = 5; function s(e) { return t.longDateFormat(e) || e } for (N.lastIndex = 0; 0 <= n && N.test(e);) e = e.replace(N, s), N.lastIndex = 0, n -= 1; return e } var z = /\d/, J = /\d\d/, Z = /\d{3}/, q = /\d{4}/, $ = /[+-]?\d{6}/, B = /\d\d?/, Q = /\d\d\d\d?/, K = /\d\d\d\d\d\d?/, X = /\d{1,3}/, ee = /\d{1,4}/, te = /[+-]?\d{1,6}/, ne = /\d+/, se = /[+-]?\d+/, ae = /Z|[+-]\d\d:?\d\d/gi, re = /Z|[+-]\d\d(?::?\d\d)?/gi, ie = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, oe = {}; function le(e, n, s) { oe[e] = O(n) ? n : function (e, t) { return e && s ? s : n } } function ue(e) { return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") } var de = {}; function ce(e, n) { var t, s = n; for ("string" == typeof e && (e = [e]), d(n) && (s = function (e, t) { t[n] = b(e) }), t = 0; t < e.length; t++) de[e[t]] = s } function he(e, a) { ce(e, function (e, t, n, s) { n._w = n._w || {}, a(e, n._w, n, s) }) } var fe = 0, me = 1, ge = 2, pe = 3, ye = 4, _e = 5, ve = 6, ke = 7, we = 8; function Me(e) { return De(e) ? 366 : 365 } function De(e) { return e % 4 == 0 && e % 100 != 0 || e % 400 == 0 } V("Y", 0, 0, function () { var e = this.year(); return e <= 9999 ? "" + e : "+" + e }), V(0, ["YY", 2], 0, function () { return this.year() % 100 }), V(0, ["YYYY", 4], 0, "year"), V(0, ["YYYYY", 5], 0, "year"), V(0, ["YYYYYY", 6, !0], 0, "year"), P("year", "y"), F("year", 1), le("Y", se), le("YY", B, J), le("YYYY", ee, q), le("YYYYY", te, $), le("YYYYYY", te, $), ce(["YYYYY", "YYYYYY"], fe), ce("YYYY", function (e, t) { t[fe] = 2 === e.length ? _.parseTwoDigitYear(e) : b(e) }), ce("YY", function (e, t) { t[fe] = _.parseTwoDigitYear(e) }), ce("Y", function (e, t) { t[fe] = parseInt(e, 10) }), _.parseTwoDigitYear = function (e) { return b(e) + (68 < b(e) ? 1900 : 2e3) }; var be, Se = Ye("FullYear", !0); function Ye(t, n) { return function (e) { return null != e ? (Oe(this, t, e), _.updateOffset(this, n), this) : Ce(this, t) } } function Ce(e, t) { return e.isValid() ? e._d["get" + (e._isUTC ? "UTC" : "") + t]() : NaN } function Oe(e, t, n) { e.isValid() && !isNaN(n) && ("FullYear" === t && De(e.year()) && 1 === e.month() && 29 === e.date() ? e._d["set" + (e._isUTC ? "UTC" : "") + t](n, e.month(), Te(n, e.month())) : e._d["set" + (e._isUTC ? "UTC" : "") + t](n)) } function Te(e, t) { if (isNaN(e) || isNaN(t)) return NaN; var n = (t % 12 + 12) % 12; return e += (t - n) / 12, 1 == n ? De(e) ? 29 : 28 : 31 - n % 7 % 2 } be = Array.prototype.indexOf ? Array.prototype.indexOf : function (e) { var t; for (t = 0; t < this.length; ++t) if (this[t] === e) return t; return -1 }, V("M", ["MM", 2], "Mo", function () { return this.month() + 1 }), V("MMM", 0, 0, function (e) { return this.localeData().monthsShort(this, e) }), V("MMMM", 0, 0, function (e) { return this.localeData().months(this, e) }), P("month", "M"), F("month", 8), le("M", B), le("MM", B, J), le("MMM", function (e, t) { return t.monthsShortRegex(e) }), le("MMMM", function (e, t) { return t.monthsRegex(e) }), ce(["M", "MM"], function (e, t) { t[me] = b(e) - 1 }), ce(["MMM", "MMMM"], function (e, t, n, s) { var a = n._locale.monthsParse(e, s, n._strict); null != a ? t[me] = a : k(n).invalidMonth = e }); var xe = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, We = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), Pe = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"); function Le(e, t) { var n; if (!e.isValid()) return e; if ("string" == typeof t) if (/^\d+$/.test(t)) t = b(t); else if (!d(t = e.localeData().monthsParse(t))) return e; return n = Math.min(e.date(), Te(e.year(), t)), e._d["set" + (e._isUTC ? "UTC" : "") + "Month"](t, n), e } function Ae(e) { return null != e ? (Le(this, e), _.updateOffset(this, !0), this) : Ce(this, "Month") } var He = ie, Fe = ie; function Re() { function e(e, t) { return t.length - e.length } var t, n, s = [], a = [], r = []; for (t = 0; t < 12; t++) n = m([2e3, t]), s.push(this.monthsShort(n, "")), a.push(this.months(n, "")), r.push(this.months(n, "")), r.push(this.monthsShort(n, "")); for (s.sort(e), a.sort(e), r.sort(e), t = 0; t < 12; t++) s[t] = ue(s[t]), a[t] = ue(a[t]); for (t = 0; t < 24; t++) r[t] = ue(r[t]); this._monthsRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + a.join("|") + ")", "i"), this._monthsShortStrictRegex = new RegExp("^(" + s.join("|") + ")", "i") } function je(e) { var t; if (e < 100 && 0 <= e) { var n = Array.prototype.slice.call(arguments); n[0] = e + 400, t = new Date(Date.UTC.apply(null, n)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e) } else t = new Date(Date.UTC.apply(null, arguments)); return t } function Ne(e, t, n) { var s = 7 + t - n; return -(7 + je(e, 0, s).getUTCDay() - t) % 7 + s - 1 } function Ue(e, t, n, s, a) { var r, i, o = 1 + 7 * (t - 1) + (7 + n - s) % 7 + Ne(e, s, a); return i = o <= 0 ? Me(r = e - 1) + o : o > Me(e) ? (r = e + 1, o - Me(e)) : (r = e, o), { year: r, dayOfYear: i } } function Ge(e, t, n) { var s, a, r = Ne(e.year(), t, n), i = Math.floor((e.dayOfYear() - r - 1) / 7) + 1; return i < 1 ? s = i + Ve(a = e.year() - 1, t, n) : i > Ve(e.year(), t, n) ? (s = i - Ve(e.year(), t, n), a = e.year() + 1) : (a = e.year(), s = i), { week: s, year: a } } function Ve(e, t, n) { var s = Ne(e, t, n), a = Ne(e + 1, t, n); return (Me(e) - s + a) / 7 } function Ee(e, t) { return e.slice(t, 7).concat(e.slice(0, t)) } V("w", ["ww", 2], "wo", "week"), V("W", ["WW", 2], "Wo", "isoWeek"), P("week", "w"), P("isoWeek", "W"), F("week", 5), F("isoWeek", 5), le("w", B), le("ww", B, J), le("W", B), le("WW", B, J), he(["w", "ww", "W", "WW"], function (e, t, n, s) { t[s.substr(0, 1)] = b(e) }), V("d", 0, "do", "day"), V("dd", 0, 0, function (e) { return this.localeData().weekdaysMin(this, e) }), V("ddd", 0, 0, function (e) { return this.localeData().weekdaysShort(this, e) }), V("dddd", 0, 0, function (e) { return this.localeData().weekdays(this, e) }), V("e", 0, 0, "weekday"), V("E", 0, 0, "isoWeekday"), P("day", "d"), P("weekday", "e"), P("isoWeekday", "E"), F("day", 11), F("weekday", 11), F("isoWeekday", 11), le("d", B), le("e", B), le("E", B), le("dd", function (e, t) { return t.weekdaysMinRegex(e) }), le("ddd", function (e, t) { return t.weekdaysShortRegex(e) }), le("dddd", function (e, t) { return t.weekdaysRegex(e) }), he(["dd", "ddd", "dddd"], function (e, t, n, s) { var a = n._locale.weekdaysParse(e, s, n._strict); null != a ? t.d = a : k(n).invalidWeekday = e }), he(["d", "e", "E"], function (e, t, n, s) { t[s] = b(e) }); var Ie = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), ze = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), Je = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), Ze = ie, qe = ie, $e = ie; function Be() { function e(e, t) { return t.length - e.length } var t, n, s, a, r, i = [], o = [], l = [], u = []; for (t = 0; t < 7; t++) n = m([2e3, 1]).day(t), s = this.weekdaysMin(n, ""), a = this.weekdaysShort(n, ""), r = this.weekdays(n, ""), i.push(s), o.push(a), l.push(r), u.push(s), u.push(a), u.push(r); for (i.sort(e), o.sort(e), l.sort(e), u.sort(e), t = 0; t < 7; t++) o[t] = ue(o[t]), l[t] = ue(l[t]), u[t] = ue(u[t]); this._weekdaysRegex = new RegExp("^(" + u.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp("^(" + l.join("|") + ")", "i"), this._weekdaysShortStrictRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._weekdaysMinStrictRegex = new RegExp("^(" + i.join("|") + ")", "i") } function Qe() { return this.hours() % 12 || 12 } function Ke(e, t) { V(e, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), t) }) } function Xe(e, t) { return t._meridiemParse } V("H", ["HH", 2], 0, "hour"), V("h", ["hh", 2], 0, Qe), V("k", ["kk", 2], 0, function () { return this.hours() || 24 }), V("hmm", 0, 0, function () { return "" + Qe.apply(this) + R(this.minutes(), 2) }), V("hmmss", 0, 0, function () { return "" + Qe.apply(this) + R(this.minutes(), 2) + R(this.seconds(), 2) }), V("Hmm", 0, 0, function () { return "" + this.hours() + R(this.minutes(), 2) }), V("Hmmss", 0, 0, function () { return "" + this.hours() + R(this.minutes(), 2) + R(this.seconds(), 2) }), Ke("a", !0), Ke("A", !1), P("hour", "h"), F("hour", 13), le("a", Xe), le("A", Xe), le("H", B), le("h", B), le("k", B), le("HH", B, J), le("hh", B, J), le("kk", B, J), le("hmm", Q), le("hmmss", K), le("Hmm", Q), le("Hmmss", K), ce(["H", "HH"], pe), ce(["k", "kk"], function (e, t, n) { var s = b(e); t[pe] = 24 === s ? 0 : s }), ce(["a", "A"], function (e, t, n) { n._isPm = n._locale.isPM(e), n._meridiem = e }), ce(["h", "hh"], function (e, t, n) { t[pe] = b(e), k(n).bigHour = !0 }), ce("hmm", function (e, t, n) { var s = e.length - 2; t[pe] = b(e.substr(0, s)), t[ye] = b(e.substr(s)), k(n).bigHour = !0 }), ce("hmmss", function (e, t, n) { var s = e.length - 4, a = e.length - 2; t[pe] = b(e.substr(0, s)), t[ye] = b(e.substr(s, 2)), t[_e] = b(e.substr(a)), k(n).bigHour = !0 }), ce("Hmm", function (e, t, n) { var s = e.length - 2; t[pe] = b(e.substr(0, s)), t[ye] = b(e.substr(s)) }), ce("Hmmss", function (e, t, n) { var s = e.length - 4, a = e.length - 2; t[pe] = b(e.substr(0, s)), t[ye] = b(e.substr(s, 2)), t[_e] = b(e.substr(a)) }); var et, tt = Ye("Hours", !0), nt = { calendar: { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }, longDateFormat: { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, invalidDate: "Invalid date", ordinal: "%d", dayOfMonthOrdinalParse: /\d{1,2}/, relativeTime: { future: "in %s", past: "%s ago", s: "a few seconds", ss: "%d seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }, months: We, monthsShort: Pe, week: { dow: 0, doy: 6 }, weekdays: Ie, weekdaysMin: Je, weekdaysShort: ze, meridiemParse: /[ap]\.?m?\.?/i }, st = {}, at = {}; function rt(e) { return e ? e.toLowerCase().replace("_", "-") : e } function it(e) { var t = null; if (!st[e] && "undefined" != typeof module && module && module.exports) try { t = et._abbr, Zn("./locale/" + e), ot(t) } catch (e) { } return st[e] } function ot(e, t) { var n; return e && ((n = u(t) ? ut(e) : lt(e, t)) ? et = n : "undefined" != typeof console && console.warn && console.warn("Locale " + e + " not found. Did you forget to load it?")), et._abbr } function lt(e, t) { if (null === t) return delete st[e], null; var n, s = nt; if (t.abbr = e, null != st[e]) C("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), s = st[e]._config; else if (null != t.parentLocale) if (null != st[t.parentLocale]) s = st[t.parentLocale]._config; else { if (null == (n = it(t.parentLocale))) return at[t.parentLocale] || (at[t.parentLocale] = []), at[t.parentLocale].push({ name: e, config: t }), null; s = n._config } return st[e] = new x(T(s, t)), at[e] && at[e].forEach(function (e) { lt(e.name, e.config) }), ot(e), st[e] } function ut(e) { var t; if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e) return et; if (!o(e)) { if (t = it(e)) return t; e = [e] } return function (e) { for (var t, n, s, a, r = 0; r < e.length;) { for (t = (a = rt(e[r]).split("-")).length, n = (n = rt(e[r + 1])) ? n.split("-") : null; 0 < t;) { if (s = it(a.slice(0, t).join("-"))) return s; if (n && n.length >= t && i(a, n, !0) >= t - 1) break; t-- } r++ } return et }(e) } function dt(e) { var t, n = e._a; return n && -2 === k(e).overflow && (t = n[me] < 0 || 11 < n[me] ? me : n[ge] < 1 || n[ge] > Te(n[fe], n[me]) ? ge : n[pe] < 0 || 24 < n[pe] || 24 === n[pe] && (0 !== n[ye] || 0 !== n[_e] || 0 !== n[ve]) ? pe : n[ye] < 0 || 59 < n[ye] ? ye : n[_e] < 0 || 59 < n[_e] ? _e : n[ve] < 0 || 999 < n[ve] ? ve : -1, k(e)._overflowDayOfYear && (t < fe || ge < t) && (t = ge), k(e)._overflowWeeks && -1 === t && (t = ke), k(e)._overflowWeekday && -1 === t && (t = we), k(e).overflow = t), e } function ct(e, t, n) { return null != e ? e : null != t ? t : n } function ht(e) { var t, n, s, a, r, i = []; if (!e._d) { var o, l; for (o = e, l = new Date(_.now()), s = o._useUTC ? [l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()] : [l.getFullYear(), l.getMonth(), l.getDate()], e._w && null == e._a[ge] && null == e._a[me] && function (e) { var t, n, s, a, r, i, o, l; if (null != (t = e._w).GG || null != t.W || null != t.E) r = 1, i = 4, n = ct(t.GG, e._a[fe], Ge(Yt(), 1, 4).year), s = ct(t.W, 1), ((a = ct(t.E, 1)) < 1 || 7 < a) && (l = !0); else { r = e._locale._week.dow, i = e._locale._week.doy; var u = Ge(Yt(), r, i); n = ct(t.gg, e._a[fe], u.year), s = ct(t.w, u.week), null != t.d ? ((a = t.d) < 0 || 6 < a) && (l = !0) : null != t.e ? (a = t.e + r, (t.e < 0 || 6 < t.e) && (l = !0)) : a = r } s < 1 || s > Ve(n, r, i) ? k(e)._overflowWeeks = !0 : null != l ? k(e)._overflowWeekday = !0 : (o = Ue(n, s, a, r, i), e._a[fe] = o.year, e._dayOfYear = o.dayOfYear) }(e), null != e._dayOfYear && (r = ct(e._a[fe], s[fe]), (e._dayOfYear > Me(r) || 0 === e._dayOfYear) && (k(e)._overflowDayOfYear = !0), n = je(r, 0, e._dayOfYear), e._a[me] = n.getUTCMonth(), e._a[ge] = n.getUTCDate()), t = 0; t < 3 && null == e._a[t]; ++t) e._a[t] = i[t] = s[t]; for (; t < 7; t++) e._a[t] = i[t] = null == e._a[t] ? 2 === t ? 1 : 0 : e._a[t]; 24 === e._a[pe] && 0 === e._a[ye] && 0 === e._a[_e] && 0 === e._a[ve] && (e._nextDay = !0, e._a[pe] = 0), e._d = (e._useUTC ? je : function (e, t, n, s, a, r, i) { var o; return e < 100 && 0 <= e ? (o = new Date(e + 400, t, n, s, a, r, i), isFinite(o.getFullYear()) && o.setFullYear(e)) : o = new Date(e, t, n, s, a, r, i), o }).apply(null, i), a = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), null != e._tzm && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[pe] = 24), e._w && void 0 !== e._w.d && e._w.d !== a && (k(e).weekdayMismatch = !0) } } var ft = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/, mt = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/, gt = /Z|[+-]\d\d(?::?\d\d)?/, pt = [["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/]], yt = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], _t = /^\/?Date\((\-?\d+)/i; function vt(e) { var t, n, s, a, r, i, o = e._i, l = ft.exec(o) || mt.exec(o); if (l) { for (k(e).iso = !0, t = 0, n = pt.length; t < n; t++) if (pt[t][1].exec(l[1])) { a = pt[t][0], s = !1 !== pt[t][2]; break } if (null == a) return void (e._isValid = !1); if (l[3]) { for (t = 0, n = yt.length; t < n; t++) if (yt[t][1].exec(l[3])) { r = (l[2] || " ") + yt[t][0]; break } if (null == r) return void (e._isValid = !1) } if (!s && null != r) return void (e._isValid = !1); if (l[4]) { if (!gt.exec(l[4])) return void (e._isValid = !1); i = "Z" } e._f = a + (r || "") + (i || ""), Dt(e) } else e._isValid = !1 } var kt = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; var wt = { UT: 0, GMT: 0, EDT: -240, EST: -300, CDT: -300, CST: -360, MDT: -360, MST: -420, PDT: -420, PST: -480 }; function Mt(e) { var t, n, s, a = kt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "")); if (a) { var r = function (e, t, n, s, a, r) { var i, o = [(i = parseInt(e, 10), i <= 49 ? 2e3 + i : i <= 999 ? 1900 + i : i), Pe.indexOf(t), parseInt(n, 10), parseInt(s, 10), parseInt(a, 10)]; return r && o.push(parseInt(r, 10)), o }(a[4], a[3], a[2], a[5], a[6], a[7]); if (n = r, s = e, (t = a[1]) && ze.indexOf(t) !== new Date(n[0], n[1], n[2]).getDay() && (k(s).weekdayMismatch = !0, !(s._isValid = !1))) return; e._a = r, e._tzm = function (e, t, n) { if (e) return wt[e]; if (t) return 0; var s = parseInt(n, 10), a = s % 100; return (s - a) / 100 * 60 + a }(a[8], a[9], a[10]), e._d = je.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), k(e).rfc2822 = !0 } else e._isValid = !1 } function Dt(e) { if (e._f !== _.ISO_8601) if (e._f !== _.RFC_2822) { e._a = [], k(e).empty = !0; var t, n, s, a, r, i, o, l, u = "" + e._i, d = u.length, c = 0; for (s = I(e._f, e._locale).match(j) || [], t = 0; t < s.length; t++) a = s[t], (n = (u.match((y = e, v(oe, p = a) ? oe[p](y._strict, y._locale) : new RegExp(ue(p.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (e, t, n, s, a) { return t || n || s || a }))))) || [])[0]) && (0 < (r = u.substr(0, u.indexOf(n))).length && k(e).unusedInput.push(r), u = u.slice(u.indexOf(n) + n.length), c += n.length), G[a] ? (n ? k(e).empty = !1 : k(e).unusedTokens.push(a), i = a, l = e, null != (o = n) && v(de, i) && de[i](o, l._a, l, i)) : e._strict && !n && k(e).unusedTokens.push(a); k(e).charsLeftOver = d - c, 0 < u.length && k(e).unusedInput.push(u), e._a[pe] <= 12 && !0 === k(e).bigHour && 0 < e._a[pe] && (k(e).bigHour = void 0), k(e).parsedDateParts = e._a.slice(0), k(e).meridiem = e._meridiem, e._a[pe] = (h = e._locale, f = e._a[pe], null == (m = e._meridiem) ? f : null != h.meridiemHour ? h.meridiemHour(f, m) : (null != h.isPM && ((g = h.isPM(m)) && f < 12 && (f += 12), g || 12 !== f || (f = 0)), f)), ht(e), dt(e) } else Mt(e); else vt(e); var h, f, m, g, p, y } function bt(e) { var t, n, s, a, r = e._i, i = e._f; return e._locale = e._locale || ut(e._l), null === r || void 0 === i && "" === r ? p({ nullInput: !0 }) : ("string" == typeof r && (e._i = r = e._locale.preparse(r)), M(r) ? new w(dt(r)) : (c(r) ? e._d = r : o(i) ? function (e) { var t, n, s, a, r; if (0 === e._f.length) return k(e).invalidFormat = !0, e._d = new Date(NaN); for (a = 0; a < e._f.length; a++) r = 0, t = y({}, e), null != e._useUTC && (t._useUTC = e._useUTC), t._f = e._f[a], Dt(t), g(t) && (r += k(t).charsLeftOver, r += 10 * k(t).unusedTokens.length, k(t).score = r, (null == s || r < s) && (s = r, n = t)); f(e, n || t) }(e) : i ? Dt(e) : u(n = (t = e)._i) ? t._d = new Date(_.now()) : c(n) ? t._d = new Date(n.valueOf()) : "string" == typeof n ? (s = t, null === (a = _t.exec(s._i)) ? (vt(s), !1 === s._isValid && (delete s._isValid, Mt(s), !1 === s._isValid && (delete s._isValid, _.createFromInputFallback(s)))) : s._d = new Date(+a[1])) : o(n) ? (t._a = h(n.slice(0), function (e) { return parseInt(e, 10) }), ht(t)) : l(n) ? function (e) { if (!e._d) { var t = A(e._i); e._a = h([t.year, t.month, t.day || t.date, t.hour, t.minute, t.second, t.millisecond], function (e) { return e && parseInt(e, 10) }), ht(e) } }(t) : d(n) ? t._d = new Date(n) : _.createFromInputFallback(t), g(e) || (e._d = null), e)) } function St(e, t, n, s, a) { var r, i = {}; return !0 !== n && !1 !== n || (s = n, n = void 0), (l(e) && function (e) { if (Object.getOwnPropertyNames) return 0 === Object.getOwnPropertyNames(e).length; var t; for (t in e) if (e.hasOwnProperty(t)) return !1; return !0 }(e) || o(e) && 0 === e.length) && (e = void 0), i._isAMomentObject = !0, i._useUTC = i._isUTC = a, i._l = n, i._i = e, i._f = t, i._strict = s, (r = new w(dt(bt(i))))._nextDay && (r.add(1, "d"), r._nextDay = void 0), r } function Yt(e, t, n, s) { return St(e, t, n, s, !1) } _.createFromInputFallback = n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function (e) { e._d = new Date(e._i + (e._useUTC ? " UTC" : "")) }), _.ISO_8601 = function () { }, _.RFC_2822 = function () { }; var Ct = n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function () { var e = Yt.apply(null, arguments); return this.isValid() && e.isValid() ? e < this ? this : e : p() }), Ot = n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function () { var e = Yt.apply(null, arguments); return this.isValid() && e.isValid() ? this < e ? this : e : p() }); function Tt(e, t) { var n, s; if (1 === t.length && o(t[0]) && (t = t[0]), !t.length) return Yt(); for (n = t[0], s = 1; s < t.length; ++s) t[s].isValid() && !t[s][e](n) || (n = t[s]); return n } var xt = ["year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond"]; function Wt(e) { var t = A(e), n = t.year || 0, s = t.quarter || 0, a = t.month || 0, r = t.week || t.isoWeek || 0, i = t.day || 0, o = t.hour || 0, l = t.minute || 0, u = t.second || 0, d = t.millisecond || 0; this._isValid = function (e) { for (var t in e) if (-1 === be.call(xt, t) || null != e[t] && isNaN(e[t])) return !1; for (var n = !1, s = 0; s < xt.length; ++s) if (e[xt[s]]) { if (n) return !1; parseFloat(e[xt[s]]) !== b(e[xt[s]]) && (n = !0) } return !0 }(t), this._milliseconds = +d + 1e3 * u + 6e4 * l + 1e3 * o * 60 * 60, this._days = +i + 7 * r, this._months = +a + 3 * s + 12 * n, this._data = {}, this._locale = ut(), this._bubble() } function Pt(e) { return e instanceof Wt } function Lt(e) { return e < 0 ? -1 * Math.round(-1 * e) : Math.round(e) } function At(e, n) { V(e, 0, 0, function () { var e = this.utcOffset(), t = "+"; return e < 0 && (e = -e, t = "-"), t + R(~~(e / 60), 2) + n + R(~~e % 60, 2) }) } At("Z", ":"), At("ZZ", ""), le("Z", re), le("ZZ", re), ce(["Z", "ZZ"], function (e, t, n) { n._useUTC = !0, n._tzm = Ft(re, e) }); var Ht = /([\+\-]|\d\d)/gi; function Ft(e, t) { var n = (t || "").match(e); if (null === n) return null; var s = ((n[n.length - 1] || []) + "").match(Ht) || ["-", 0, 0], a = 60 * s[1] + b(s[2]); return 0 === a ? 0 : "+" === s[0] ? a : -a } function Rt(e, t) { var n, s; return t._isUTC ? (n = t.clone(), s = (M(e) || c(e) ? e.valueOf() : Yt(e).valueOf()) - n.valueOf(), n._d.setTime(n._d.valueOf() + s), _.updateOffset(n, !1), n) : Yt(e).local() } function jt(e) { return 15 * -Math.round(e._d.getTimezoneOffset() / 15) } function Nt() { return !!this.isValid() && this._isUTC && 0 === this._offset } _.updateOffset = function () { }; var Ut = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/, Gt = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function Vt(e, t) { var n, s, a, r, i, o, l = e, u = null; return Pt(e) ? l = { ms: e._milliseconds, d: e._days, M: e._months } : d(e) ? (l = {}, t ? l[t] = e : l.milliseconds = e) : (u = Ut.exec(e)) ? (n = "-" === u[1] ? -1 : 1, l = { y: 0, d: b(u[ge]) * n, h: b(u[pe]) * n, m: b(u[ye]) * n, s: b(u[_e]) * n, ms: b(Lt(1e3 * u[ve])) * n }) : (u = Gt.exec(e)) ? (n = "-" === u[1] ? -1 : 1, l = { y: Et(u[2], n), M: Et(u[3], n), w: Et(u[4], n), d: Et(u[5], n), h: Et(u[6], n), m: Et(u[7], n), s: Et(u[8], n) }) : null == l ? l = {} : "object" == typeof l && ("from" in l || "to" in l) && (r = Yt(l.from), i = Yt(l.to), a = r.isValid() && i.isValid() ? (i = Rt(i, r), r.isBefore(i) ? o = It(r, i) : ((o = It(i, r)).milliseconds = -o.milliseconds, o.months = -o.months), o) : { milliseconds: 0, months: 0 }, (l = {}).ms = a.milliseconds, l.M = a.months), s = new Wt(l), Pt(e) && v(e, "_locale") && (s._locale = e._locale), s } function Et(e, t) { var n = e && parseFloat(e.replace(",", ".")); return (isNaN(n) ? 0 : n) * t } function It(e, t) { var n = {}; return n.months = t.month() - e.month() + 12 * (t.year() - e.year()), e.clone().add(n.months, "M").isAfter(t) && --n.months, n.milliseconds = +t - +e.clone().add(n.months, "M"), n } function zt(s, a) { return function (e, t) { var n; return null === t || isNaN(+t) || (C(a, "moment()." + a + "(period, number) is deprecated. Please use moment()." + a + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), n = e, e = t, t = n), Jt(this, Vt(e = "string" == typeof e ? +e : e, t), s), this } } function Jt(e, t, n, s) { var a = t._milliseconds, r = Lt(t._days), i = Lt(t._months); e.isValid() && (s = null == s || s, i && Le(e, Ce(e, "Month") + i * n), r && Oe(e, "Date", Ce(e, "Date") + r * n), a && e._d.setTime(e._d.valueOf() + a * n), s && _.updateOffset(e, r || i)) } Vt.fn = Wt.prototype, Vt.invalid = function () { return Vt(NaN) }; var Zt = zt(1, "add"), qt = zt(-1, "subtract"); function $t(e, t) { var n = 12 * (t.year() - e.year()) + (t.month() - e.month()), s = e.clone().add(n, "months"); return -(n + (t - s < 0 ? (t - s) / (s - e.clone().add(n - 1, "months")) : (t - s) / (e.clone().add(1 + n, "months") - s))) || 0 } function Bt(e) { var t; return void 0 === e ? this._locale._abbr : (null != (t = ut(e)) && (this._locale = t), this) } _.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ", _.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]"; var Qt = n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function (e) { return void 0 === e ? this.localeData() : this.locale(e) }); function Kt() { return this._locale } var Xt = 126227808e5; function en(e, t) { return (e % t + t) % t } function tn(e, t, n) { return e < 100 && 0 <= e ? new Date(e + 400, t, n) - Xt : new Date(e, t, n).valueOf() } function nn(e, t, n) { return e < 100 && 0 <= e ? Date.UTC(e + 400, t, n) - Xt : Date.UTC(e, t, n) } function sn(e, t) { V(0, [e, e.length], 0, t) } function an(e, t, n, s, a) { var r; return null == e ? Ge(this, s, a).year : ((r = Ve(e, s, a)) < t && (t = r), function (e, t, n, s, a) { var r = Ue(e, t, n, s, a), i = je(r.year, 0, r.dayOfYear); return this.year(i.getUTCFullYear()), this.month(i.getUTCMonth()), this.date(i.getUTCDate()), this }.call(this, e, t, n, s, a)) } V(0, ["gg", 2], 0, function () { return this.weekYear() % 100 }), V(0, ["GG", 2], 0, function () { return this.isoWeekYear() % 100 }), sn("gggg", "weekYear"), sn("ggggg", "weekYear"), sn("GGGG", "isoWeekYear"), sn("GGGGG", "isoWeekYear"), P("weekYear", "gg"), P("isoWeekYear", "GG"), F("weekYear", 1), F("isoWeekYear", 1), le("G", se), le("g", se), le("GG", B, J), le("gg", B, J), le("GGGG", ee, q), le("gggg", ee, q), le("GGGGG", te, $), le("ggggg", te, $), he(["gggg", "ggggg", "GGGG", "GGGGG"], function (e, t, n, s) { t[s.substr(0, 2)] = b(e) }), he(["gg", "GG"], function (e, t, n, s) { t[s] = _.parseTwoDigitYear(e) }), V("Q", 0, "Qo", "quarter"), P("quarter", "Q"), F("quarter", 7), le("Q", z), ce("Q", function (e, t) { t[me] = 3 * (b(e) - 1) }), V("D", ["DD", 2], "Do", "date"), P("date", "D"), F("date", 9), le("D", B), le("DD", B, J), le("Do", function (e, t) { return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient }), ce(["D", "DD"], ge), ce("Do", function (e, t) { t[ge] = b(e.match(B)[0]) }); var rn = Ye("Date", !0); V("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), P("dayOfYear", "DDD"), F("dayOfYear", 4), le("DDD", X), le("DDDD", Z), ce(["DDD", "DDDD"], function (e, t, n) { n._dayOfYear = b(e) }), V("m", ["mm", 2], 0, "minute"), P("minute", "m"), F("minute", 14), le("m", B), le("mm", B, J), ce(["m", "mm"], ye); var on = Ye("Minutes", !1); V("s", ["ss", 2], 0, "second"), P("second", "s"), F("second", 15), le("s", B), le("ss", B, J), ce(["s", "ss"], _e); var ln, un = Ye("Seconds", !1); for (V("S", 0, 0, function () { return ~~(this.millisecond() / 100) }), V(0, ["SS", 2], 0, function () { return ~~(this.millisecond() / 10) }), V(0, ["SSS", 3], 0, "millisecond"), V(0, ["SSSS", 4], 0, function () { return 10 * this.millisecond() }), V(0, ["SSSSS", 5], 0, function () { return 100 * this.millisecond() }), V(0, ["SSSSSS", 6], 0, function () { return 1e3 * this.millisecond() }), V(0, ["SSSSSSS", 7], 0, function () { return 1e4 * this.millisecond() }), V(0, ["SSSSSSSS", 8], 0, function () { return 1e5 * this.millisecond() }), V(0, ["SSSSSSSSS", 9], 0, function () { return 1e6 * this.millisecond() }), P("millisecond", "ms"), F("millisecond", 16), le("S", X, z), le("SS", X, J), le("SSS", X, Z), ln = "SSSS"; ln.length <= 9; ln += "S") le(ln, ne); function dn(e, t) { t[ve] = b(1e3 * ("0." + e)) } for (ln = "S"; ln.length <= 9; ln += "S") ce(ln, dn); var cn = Ye("Milliseconds", !1); V("z", 0, 0, "zoneAbbr"), V("zz", 0, 0, "zoneName"); var hn = w.prototype; function fn(e) { return e } hn.add = Zt, hn.calendar = function (e, t) { var n = e || Yt(), s = Rt(n, this).startOf("day"), a = _.calendarFormat(this, s) || "sameElse", r = t && (O(t[a]) ? t[a].call(this, n) : t[a]); return this.format(r || this.localeData().calendar(a, this, Yt(n))) }, hn.clone = function () { return new w(this) }, hn.diff = function (e, t, n) { var s, a, r; if (!this.isValid()) return NaN; if (!(s = Rt(e, this)).isValid()) return NaN; switch (a = 6e4 * (s.utcOffset() - this.utcOffset()), t = L(t)) { case "year": r = $t(this, s) / 12; break; case "month": r = $t(this, s); break; case "quarter": r = $t(this, s) / 3; break; case "second": r = (this - s) / 1e3; break; case "minute": r = (this - s) / 6e4; break; case "hour": r = (this - s) / 36e5; break; case "day": r = (this - s - a) / 864e5; break; case "week": r = (this - s - a) / 6048e5; break; default: r = this - s } return n ? r : D(r) }, hn.endOf = function (e) { var t; if (void 0 === (e = L(e)) || "millisecond" === e || !this.isValid()) return this; var n = this._isUTC ? nn : tn; switch (e) { case "year": t = n(this.year() + 1, 0, 1) - 1; break; case "quarter": t = n(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; break; case "month": t = n(this.year(), this.month() + 1, 1) - 1; break; case "week": t = n(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; break; case "isoWeek": t = n(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; break; case "day": case "date": t = n(this.year(), this.month(), this.date() + 1) - 1; break; case "hour": t = this._d.valueOf(), t += 36e5 - en(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5) - 1; break; case "minute": t = this._d.valueOf(), t += 6e4 - en(t, 6e4) - 1; break; case "second": t = this._d.valueOf(), t += 1e3 - en(t, 1e3) - 1 } return this._d.setTime(t), _.updateOffset(this, !0), this }, hn.format = function (e) { e = e || (this.isUtc() ? _.defaultFormatUtc : _.defaultFormat); var t = E(this, e); return this.localeData().postformat(t) }, hn.from = function (e, t) { return this.isValid() && (M(e) && e.isValid() || Yt(e).isValid()) ? Vt({ to: this, from: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() }, hn.fromNow = function (e) { return this.from(Yt(), e) }, hn.to = function (e, t) { return this.isValid() && (M(e) && e.isValid() || Yt(e).isValid()) ? Vt({ from: this, to: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() }, hn.toNow = function (e) { return this.to(Yt(), e) }, hn.get = function (e) { return O(this[e = L(e)]) ? this[e]() : this }, hn.invalidAt = function () { return k(this).overflow }, hn.isAfter = function (e, t) { var n = M(e) ? e : Yt(e); return !(!this.isValid() || !n.isValid()) && ("millisecond" === (t = L(t) || "millisecond") ? this.valueOf() > n.valueOf() : n.valueOf() < this.clone().startOf(t).valueOf()) }, hn.isBefore = function (e, t) { var n = M(e) ? e : Yt(e); return !(!this.isValid() || !n.isValid()) && ("millisecond" === (t = L(t) || "millisecond") ? this.valueOf() < n.valueOf() : this.clone().endOf(t).valueOf() < n.valueOf()) }, hn.isBetween = function (e, t, n, s) { var a = M(e) ? e : Yt(e), r = M(t) ? t : Yt(t); return !!(this.isValid() && a.isValid() && r.isValid()) && ("(" === (s = s || "()")[0] ? this.isAfter(a, n) : !this.isBefore(a, n)) && (")" === s[1] ? this.isBefore(r, n) : !this.isAfter(r, n)) }, hn.isSame = function (e, t) { var n, s = M(e) ? e : Yt(e); return !(!this.isValid() || !s.isValid()) && ("millisecond" === (t = L(t) || "millisecond") ? this.valueOf() === s.valueOf() : (n = s.valueOf(), this.clone().startOf(t).valueOf() <= n && n <= this.clone().endOf(t).valueOf())) }, hn.isSameOrAfter = function (e, t) { return this.isSame(e, t) || this.isAfter(e, t) }, hn.isSameOrBefore = function (e, t) { return this.isSame(e, t) || this.isBefore(e, t) }, hn.isValid = function () { return g(this) }, hn.lang = Qt, hn.locale = Bt, hn.localeData = Kt, hn.max = Ot, hn.min = Ct, hn.parsingFlags = function () { return f({}, k(this)) }, hn.set = function (e, t) { if ("object" == typeof e) for (var n = function (e) { var t = []; for (var n in e) t.push({ unit: n, priority: H[n] }); return t.sort(function (e, t) { return e.priority - t.priority }), t }(e = A(e)), s = 0; s < n.length; s++) this[n[s].unit](e[n[s].unit]); else if (O(this[e = L(e)])) return this[e](t); return this }, hn.startOf = function (e) { var t; if (void 0 === (e = L(e)) || "millisecond" === e || !this.isValid()) return this; var n = this._isUTC ? nn : tn; switch (e) { case "year": t = n(this.year(), 0, 1); break; case "quarter": t = n(this.year(), this.month() - this.month() % 3, 1); break; case "month": t = n(this.year(), this.month(), 1); break; case "week": t = n(this.year(), this.month(), this.date() - this.weekday()); break; case "isoWeek": t = n(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); break; case "day": case "date": t = n(this.year(), this.month(), this.date()); break; case "hour": t = this._d.valueOf(), t -= en(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5); break; case "minute": t = this._d.valueOf(), t -= en(t, 6e4); break; case "second": t = this._d.valueOf(), t -= en(t, 1e3) } return this._d.setTime(t), _.updateOffset(this, !0), this }, hn.subtract = qt, hn.toArray = function () { var e = this; return [e.year(), e.month(), e.date(), e.hour(), e.minute(), e.second(), e.millisecond()] }, hn.toObject = function () { var e = this; return { years: e.year(), months: e.month(), date: e.date(), hours: e.hours(), minutes: e.minutes(), seconds: e.seconds(), milliseconds: e.milliseconds() } }, hn.toDate = function () { return new Date(this.valueOf()) }, hn.toISOString = function (e) { if (!this.isValid()) return null; var t = !0 !== e, n = t ? this.clone().utc() : this; return n.year() < 0 || 9999 < n.year() ? E(n, t ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ") : O(Date.prototype.toISOString) ? t ? this.toDate().toISOString() : new Date(this.valueOf() + 60 * this.utcOffset() * 1e3).toISOString().replace("Z", E(n, "Z")) : E(n, t ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ") }, hn.inspect = function () { if (!this.isValid()) return "moment.invalid(/* " + this._i + " */)"; var e = "moment", t = ""; this.isLocal() || (e = 0 === this.utcOffset() ? "moment.utc" : "moment.parseZone", t = "Z"); var n = "[" + e + '("]', s = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", a = t + '[")]'; return this.format(n + s + "-MM-DD[T]HH:mm:ss.SSS" + a) }, hn.toJSON = function () { return this.isValid() ? this.toISOString() : null }, hn.toString = function () { return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ") }, hn.unix = function () { return Math.floor(this.valueOf() / 1e3) }, hn.valueOf = function () { return this._d.valueOf() - 6e4 * (this._offset || 0) }, hn.creationData = function () { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict } }, hn.year = Se, hn.isLeapYear = function () { return De(this.year()) }, hn.weekYear = function (e) { return an.call(this, e, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy) }, hn.isoWeekYear = function (e) { return an.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4) }, hn.quarter = hn.quarters = function (e) { return null == e ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (e - 1) + this.month() % 3) }, hn.month = Ae, hn.daysInMonth = function () { return Te(this.year(), this.month()) }, hn.week = hn.weeks = function (e) { var t = this.localeData().week(this); return null == e ? t : this.add(7 * (e - t), "d") }, hn.isoWeek = hn.isoWeeks = function (e) { var t = Ge(this, 1, 4).week; return null == e ? t : this.add(7 * (e - t), "d") }, hn.weeksInYear = function () { var e = this.localeData()._week; return Ve(this.year(), e.dow, e.doy) }, hn.isoWeeksInYear = function () { return Ve(this.year(), 1, 4) }, hn.date = rn, hn.day = hn.days = function (e) { if (!this.isValid()) return null != e ? this : NaN; var t, n, s = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); return null != e ? (t = e, n = this.localeData(), e = "string" != typeof t ? t : isNaN(t) ? "number" == typeof (t = n.weekdaysParse(t)) ? t : null : parseInt(t, 10), this.add(e - s, "d")) : s }, hn.weekday = function (e) { if (!this.isValid()) return null != e ? this : NaN; var t = (this.day() + 7 - this.localeData()._week.dow) % 7; return null == e ? t : this.add(e - t, "d") }, hn.isoWeekday = function (e) { if (!this.isValid()) return null != e ? this : NaN; if (null == e) return this.day() || 7; var t, n, s = (t = e, n = this.localeData(), "string" == typeof t ? n.weekdaysParse(t) % 7 || 7 : isNaN(t) ? null : t); return this.day(this.day() % 7 ? s : s - 7) }, hn.dayOfYear = function (e) { var t = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1; return null == e ? t : this.add(e - t, "d") }, hn.hour = hn.hours = tt, hn.minute = hn.minutes = on, hn.second = hn.seconds = un, hn.millisecond = hn.milliseconds = cn, hn.utcOffset = function (e, t, n) { var s, a = this._offset || 0; if (!this.isValid()) return null != e ? this : NaN; if (null == e) return this._isUTC ? a : jt(this); if ("string" == typeof e) { if (null === (e = Ft(re, e))) return this } else Math.abs(e) < 16 && !n && (e *= 60); return !this._isUTC && t && (s = jt(this)), this._offset = e, this._isUTC = !0, null != s && this.add(s, "m"), a !== e && (!t || this._changeInProgress ? Jt(this, Vt(e - a, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, _.updateOffset(this, !0), this._changeInProgress = null)), this }, hn.utc = function (e) { return this.utcOffset(0, e) }, hn.local = function (e) { return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(jt(this), "m")), this }, hn.parseZone = function () { if (null != this._tzm) this.utcOffset(this._tzm, !1, !0); else if ("string" == typeof this._i) { var e = Ft(ae, this._i); null != e ? this.utcOffset(e) : this.utcOffset(0, !0) } return this }, hn.hasAlignedHourOffset = function (e) { return !!this.isValid() && (e = e ? Yt(e).utcOffset() : 0, (this.utcOffset() - e) % 60 == 0) }, hn.isDST = function () { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() }, hn.isLocal = function () { return !!this.isValid() && !this._isUTC }, hn.isUtcOffset = function () { return !!this.isValid() && this._isUTC }, hn.isUtc = Nt, hn.isUTC = Nt, hn.zoneAbbr = function () { return this._isUTC ? "UTC" : "" }, hn.zoneName = function () { return this._isUTC ? "Coordinated Universal Time" : "" }, hn.dates = n("dates accessor is deprecated. Use date instead.", rn), hn.months = n("months accessor is deprecated. Use month instead", Ae), hn.years = n("years accessor is deprecated. Use year instead", Se), hn.zone = n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", function (e, t) { return null != e ? ("string" != typeof e && (e = -e), this.utcOffset(e, t), this) : -this.utcOffset() }), hn.isDSTShifted = n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", function () { if (!u(this._isDSTShifted)) return this._isDSTShifted; var e = {}; if (y(e, this), (e = bt(e))._a) { var t = e._isUTC ? m(e._a) : Yt(e._a); this._isDSTShifted = this.isValid() && 0 < i(e._a, t.toArray()) } else this._isDSTShifted = !1; return this._isDSTShifted }); var mn = x.prototype; function gn(e, t, n, s) { var a = ut(), r = m().set(s, t); return a[n](r, e) } function pn(e, t, n) { if (d(e) && (t = e, e = void 0), e = e || "", null != t) return gn(e, t, n, "month"); var s, a = []; for (s = 0; s < 12; s++) a[s] = gn(e, s, n, "month"); return a } function yn(e, t, n, s) { "boolean" == typeof e ? d(t) && (n = t, t = void 0) : (t = e, e = !1, d(n = t) && (n = t, t = void 0)), t = t || ""; var a, r = ut(), i = e ? r._week.dow : 0; if (null != n) return gn(t, (n + i) % 7, s, "day"); var o = []; for (a = 0; a < 7; a++) o[a] = gn(t, (a + i) % 7, s, "day"); return o } mn.calendar = function (e, t, n) { var s = this._calendar[e] || this._calendar.sameElse; return O(s) ? s.call(t, n) : s }, mn.longDateFormat = function (e) { var t = this._longDateFormat[e], n = this._longDateFormat[e.toUpperCase()]; return t || !n ? t : (this._longDateFormat[e] = n.replace(/MMMM|MM|DD|dddd/g, function (e) { return e.slice(1) }), this._longDateFormat[e]) }, mn.invalidDate = function () { return this._invalidDate }, mn.ordinal = function (e) { return this._ordinal.replace("%d", e) }, mn.preparse = fn, mn.postformat = fn, mn.relativeTime = function (e, t, n, s) { var a = this._relativeTime[n]; return O(a) ? a(e, t, n, s) : a.replace(/%d/i, e) }, mn.pastFuture = function (e, t) { var n = this._relativeTime[0 < e ? "future" : "past"]; return O(n) ? n(t) : n.replace(/%s/i, t) }, mn.set = function (e) { var t, n; for (n in e) O(t = e[n]) ? this[n] = t : this["_" + n] = t; this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source) }, mn.months = function (e, t) { return e ? o(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || xe).test(t) ? "format" : "standalone"][e.month()] : o(this._months) ? this._months : this._months.standalone }, mn.monthsShort = function (e, t) { return e ? o(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[xe.test(t) ? "format" : "standalone"][e.month()] : o(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone }, mn.monthsParse = function (e, t, n) { var s, a, r; if (this._monthsParseExact) return function (e, t, n) { var s, a, r, i = e.toLocaleLowerCase(); if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], s = 0; s < 12; ++s) r = m([2e3, s]), this._shortMonthsParse[s] = this.monthsShort(r, "").toLocaleLowerCase(), this._longMonthsParse[s] = this.months(r, "").toLocaleLowerCase(); return n ? "MMM" === t ? -1 !== (a = be.call(this._shortMonthsParse, i)) ? a : null : -1 !== (a = be.call(this._longMonthsParse, i)) ? a : null : "MMM" === t ? -1 !== (a = be.call(this._shortMonthsParse, i)) ? a : -1 !== (a = be.call(this._longMonthsParse, i)) ? a : null : -1 !== (a = be.call(this._longMonthsParse, i)) ? a : -1 !== (a = be.call(this._shortMonthsParse, i)) ? a : null }.call(this, e, t, n); for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), s = 0; s < 12; s++) { if (a = m([2e3, s]), n && !this._longMonthsParse[s] && (this._longMonthsParse[s] = new RegExp("^" + this.months(a, "").replace(".", "") + "$", "i"), this._shortMonthsParse[s] = new RegExp("^" + this.monthsShort(a, "").replace(".", "") + "$", "i")), n || this._monthsParse[s] || (r = "^" + this.months(a, "") + "|^" + this.monthsShort(a, ""), this._monthsParse[s] = new RegExp(r.replace(".", ""), "i")), n && "MMMM" === t && this._longMonthsParse[s].test(e)) return s; if (n && "MMM" === t && this._shortMonthsParse[s].test(e)) return s; if (!n && this._monthsParse[s].test(e)) return s } }, mn.monthsRegex = function (e) { return this._monthsParseExact ? (v(this, "_monthsRegex") || Re.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (v(this, "_monthsRegex") || (this._monthsRegex = Fe), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex) }, mn.monthsShortRegex = function (e) { return this._monthsParseExact ? (v(this, "_monthsRegex") || Re.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (v(this, "_monthsShortRegex") || (this._monthsShortRegex = He), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex) }, mn.week = function (e) { return Ge(e, this._week.dow, this._week.doy).week }, mn.firstDayOfYear = function () { return this._week.doy }, mn.firstDayOfWeek = function () { return this._week.dow }, mn.weekdays = function (e, t) { var n = o(this._weekdays) ? this._weekdays : this._weekdays[e && !0 !== e && this._weekdays.isFormat.test(t) ? "format" : "standalone"]; return !0 === e ? Ee(n, this._week.dow) : e ? n[e.day()] : n }, mn.weekdaysMin = function (e) { return !0 === e ? Ee(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin }, mn.weekdaysShort = function (e) { return !0 === e ? Ee(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort }, mn.weekdaysParse = function (e, t, n) { var s, a, r; if (this._weekdaysParseExact) return function (e, t, n) { var s, a, r, i = e.toLocaleLowerCase(); if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], s = 0; s < 7; ++s) r = m([2e3, 1]).day(s), this._minWeekdaysParse[s] = this.weekdaysMin(r, "").toLocaleLowerCase(), this._shortWeekdaysParse[s] = this.weekdaysShort(r, "").toLocaleLowerCase(), this._weekdaysParse[s] = this.weekdays(r, "").toLocaleLowerCase(); return n ? "dddd" === t ? -1 !== (a = be.call(this._weekdaysParse, i)) ? a : null : "ddd" === t ? -1 !== (a = be.call(this._shortWeekdaysParse, i)) ? a : null : -1 !== (a = be.call(this._minWeekdaysParse, i)) ? a : null : "dddd" === t ? -1 !== (a = be.call(this._weekdaysParse, i)) ? a : -1 !== (a = be.call(this._shortWeekdaysParse, i)) ? a : -1 !== (a = be.call(this._minWeekdaysParse, i)) ? a : null : "ddd" === t ? -1 !== (a = be.call(this._shortWeekdaysParse, i)) ? a : -1 !== (a = be.call(this._weekdaysParse, i)) ? a : -1 !== (a = be.call(this._minWeekdaysParse, i)) ? a : null : -1 !== (a = be.call(this._minWeekdaysParse, i)) ? a : -1 !== (a = be.call(this._weekdaysParse, i)) ? a : -1 !== (a = be.call(this._shortWeekdaysParse, i)) ? a : null }.call(this, e, t, n); for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), s = 0; s < 7; s++) { if (a = m([2e3, 1]).day(s), n && !this._fullWeekdaysParse[s] && (this._fullWeekdaysParse[s] = new RegExp("^" + this.weekdays(a, "").replace(".", "\\.?") + "$", "i"), this._shortWeekdaysParse[s] = new RegExp("^" + this.weekdaysShort(a, "").replace(".", "\\.?") + "$", "i"), this._minWeekdaysParse[s] = new RegExp("^" + this.weekdaysMin(a, "").replace(".", "\\.?") + "$", "i")), this._weekdaysParse[s] || (r = "^" + this.weekdays(a, "") + "|^" + this.weekdaysShort(a, "") + "|^" + this.weekdaysMin(a, ""), this._weekdaysParse[s] = new RegExp(r.replace(".", ""), "i")), n && "dddd" === t && this._fullWeekdaysParse[s].test(e)) return s; if (n && "ddd" === t && this._shortWeekdaysParse[s].test(e)) return s; if (n && "dd" === t && this._minWeekdaysParse[s].test(e)) return s; if (!n && this._weekdaysParse[s].test(e)) return s } }, mn.weekdaysRegex = function (e) { return this._weekdaysParseExact ? (v(this, "_weekdaysRegex") || Be.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (v(this, "_weekdaysRegex") || (this._weekdaysRegex = Ze), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex) }, mn.weekdaysShortRegex = function (e) { return this._weekdaysParseExact ? (v(this, "_weekdaysRegex") || Be.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (v(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = qe), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) }, mn.weekdaysMinRegex = function (e) { return this._weekdaysParseExact ? (v(this, "_weekdaysRegex") || Be.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (v(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = $e), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) }, mn.isPM = function (e) { return "p" === (e + "").toLowerCase().charAt(0) }, mn.meridiem = function (e, t, n) { return 11 < e ? n ? "pm" : "PM" : n ? "am" : "AM" }, ot("en", { dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function (e) { var t = e % 10; return e + (1 === b(e % 100 / 10) ? "th" : 1 == t ? "st" : 2 == t ? "nd" : 3 == t ? "rd" : "th") } }), _.lang = n("moment.lang is deprecated. Use moment.locale instead.", ot), _.langData = n("moment.langData is deprecated. Use moment.localeData instead.", ut); var _n = Math.abs; function vn(e, t, n, s) { var a = Vt(t, n); return e._milliseconds += s * a._milliseconds, e._days += s * a._days, e._months += s * a._months, e._bubble() } function kn(e) { return e < 0 ? Math.floor(e) : Math.ceil(e) } function wn(e) { return 4800 * e / 146097 } function Mn(e) { return 146097 * e / 4800 } function Dn(e) { return function () { return this.as(e) } } var bn = Dn("ms"), Sn = Dn("s"), Yn = Dn("m"), Cn = Dn("h"), On = Dn("d"), Tn = Dn("w"), xn = Dn("M"), Wn = Dn("Q"), Pn = Dn("y"); function Ln(e) { return function () { return this.isValid() ? this._data[e] : NaN } } var An = Ln("milliseconds"), Hn = Ln("seconds"), Fn = Ln("minutes"), Rn = Ln("hours"), jn = Ln("days"), Nn = Ln("months"), Un = Ln("years"), Gn = Math.round, Vn = { ss: 44, s: 45, m: 45, h: 22, d: 26, M: 11 }, En = Math.abs; function In(e) { return (0 < e) - (e < 0) || +e } function zn() { if (!this.isValid()) return this.localeData().invalidDate(); var e, t, n = En(this._milliseconds) / 1e3, s = En(this._days), a = En(this._months); t = D((e = D(n / 60)) / 60), n %= 60, e %= 60; var r = D(a / 12), i = a %= 12, o = s, l = t, u = e, d = n ? n.toFixed(3).replace(/\.?0+$/, "") : "", c = this.asSeconds(); if (!c) return "P0D"; var h = c < 0 ? "-" : "", f = In(this._months) !== In(c) ? "-" : "", m = In(this._days) !== In(c) ? "-" : "", g = In(this._milliseconds) !== In(c) ? "-" : ""; return h + "P" + (r ? f + r + "Y" : "") + (i ? f + i + "M" : "") + (o ? m + o + "D" : "") + (l || u || d ? "T" : "") + (l ? g + l + "H" : "") + (u ? g + u + "M" : "") + (d ? g + d + "S" : "") } var Jn = Wt.prototype; return Jn.isValid = function () { return this._isValid }, Jn.abs = function () { var e = this._data; return this._milliseconds = _n(this._milliseconds), this._days = _n(this._days), this._months = _n(this._months), e.milliseconds = _n(e.milliseconds), e.seconds = _n(e.seconds), e.minutes = _n(e.minutes), e.hours = _n(e.hours), e.months = _n(e.months), e.years = _n(e.years), this }, Jn.add = function (e, t) { return vn(this, e, t, 1) }, Jn.subtract = function (e, t) { return vn(this, e, t, -1) }, Jn.as = function (e) { if (!this.isValid()) return NaN; var t, n, s = this._milliseconds; if ("month" === (e = L(e)) || "quarter" === e || "year" === e) switch (t = this._days + s / 864e5, n = this._months + wn(t), e) { case "month": return n; case "quarter": return n / 3; case "year": return n / 12 } else switch (t = this._days + Math.round(Mn(this._months)), e) { case "week": return t / 7 + s / 6048e5; case "day": return t + s / 864e5; case "hour": return 24 * t + s / 36e5; case "minute": return 1440 * t + s / 6e4; case "second": return 86400 * t + s / 1e3; case "millisecond": return Math.floor(864e5 * t) + s; default: throw new Error("Unknown unit " + e) } }, Jn.asMilliseconds = bn, Jn.asSeconds = Sn, Jn.asMinutes = Yn, Jn.asHours = Cn, Jn.asDays = On, Jn.asWeeks = Tn, Jn.asMonths = xn, Jn.asQuarters = Wn, Jn.asYears = Pn, Jn.valueOf = function () { return this.isValid() ? this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * b(this._months / 12) : NaN }, Jn._bubble = function () { var e, t, n, s, a, r = this._milliseconds, i = this._days, o = this._months, l = this._data; return 0 <= r && 0 <= i && 0 <= o || r <= 0 && i <= 0 && o <= 0 || (r += 864e5 * kn(Mn(o) + i), o = i = 0), l.milliseconds = r % 1e3, e = D(r / 1e3), l.seconds = e % 60, t = D(e / 60), l.minutes = t % 60, n = D(t / 60), l.hours = n % 24, o += a = D(wn(i += D(n / 24))), i -= kn(Mn(a)), s = D(o / 12), o %= 12, l.days = i, l.months = o, l.years = s, this }, Jn.clone = function () { return Vt(this) }, Jn.get = function (e) { return e = L(e), this.isValid() ? this[e + "s"]() : NaN }, Jn.milliseconds = An, Jn.seconds = Hn, Jn.minutes = Fn, Jn.hours = Rn, Jn.days = jn, Jn.weeks = function () { return D(this.days() / 7) }, Jn.months = Nn, Jn.years = Un, Jn.humanize = function (e) { if (!this.isValid()) return this.localeData().invalidDate(); var t, n, s, a, r, i, o, l, u, d, c = this.localeData(), h = (t = !e, n = c, s = Vt(this).abs(), a = Gn(s.as("s")), r = Gn(s.as("m")), i = Gn(s.as("h")), o = Gn(s.as("d")), l = Gn(s.as("M")), u = Gn(s.as("y")), (d = a <= Vn.ss && ["s", a] || a < Vn.s && ["ss", a] || r <= 1 && ["m"] || r < Vn.m && ["mm", r] || i <= 1 && ["h"] || i < Vn.h && ["hh", i] || o <= 1 && ["d"] || o < Vn.d && ["dd", o] || l <= 1 && ["M"] || l < Vn.M && ["MM", l] || u <= 1 && ["y"] || ["yy", u])[2] = t, d[3] = 0 < +this, d[4] = n, function (e, t, n, s, a) { return a.relativeTime(t || 1, !!n, e, s) }.apply(null, d)); return e && (h = c.pastFuture(+this, h)), c.postformat(h) }, Jn.toISOString = zn, Jn.toString = zn, Jn.toJSON = zn, Jn.locale = Bt, Jn.localeData = Kt, Jn.toIsoString = n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", zn), Jn.lang = Qt, V("X", 0, 0, "unix"), V("x", 0, 0, "valueOf"), le("x", se), le("X", /[+-]?\d+(\.\d{1,3})?/), ce("X", function (e, t, n) { n._d = new Date(1e3 * parseFloat(e, 10)) }), ce("x", function (e, t, n) { n._d = new Date(b(e)) }), _.version = "2.24.0", e = Yt, _.fn = hn, _.min = function () { return Tt("isBefore", [].slice.call(arguments, 0)) }, _.max = function () { return Tt("isAfter", [].slice.call(arguments, 0)) }, _.now = function () { return Date.now ? Date.now() : +new Date }, _.utc = m, _.unix = function (e) { return Yt(1e3 * e) }, _.months = function (e, t) { return pn(e, t, "months") }, _.isDate = c, _.locale = ot, _.invalid = p, _.duration = Vt, _.isMoment = M, _.weekdays = function (e, t, n) { return yn(e, t, n, "weekdays") }, _.parseZone = function () { return Yt.apply(null, arguments).parseZone() }, _.localeData = ut, _.isDuration = Pt, _.monthsShort = function (e, t) { return pn(e, t, "monthsShort") }, _.weekdaysMin = function (e, t, n) { return yn(e, t, n, "weekdaysMin") }, _.defineLocale = lt, _.updateLocale = function (e, t) { if (null != t) { var n, s, a = nt; null != (s = it(e)) && (a = s._config), (n = new x(t = T(a, t))).parentLocale = st[e], st[e] = n, ot(e) } else null != st[e] && (null != st[e].parentLocale ? st[e] = st[e].parentLocale : null != st[e] && delete st[e]); return st[e] }, _.locales = function () { return s(st) }, _.weekdaysShort = function (e, t, n) { return yn(e, t, n, "weekdaysShort") }, _.normalizeUnits = L, _.relativeTimeRounding = function (e) { return void 0 === e ? Gn : "function" == typeof e && (Gn = e, !0) }, _.relativeTimeThreshold = function (e, t) { return void 0 !== Vn[e] && (void 0 === t ? Vn[e] : (Vn[e] = t, "s" === e && (Vn.ss = t - 1), !0)) }, _.calendarFormat = function (e, t) { var n = e.diff(t, "days", !0); return n < -6 ? "sameElse" : n < -1 ? "lastWeek" : n < 0 ? "lastDay" : n < 1 ? "sameDay" : n < 2 ? "nextDay" : n < 7 ? "nextWeek" : "sameElse" }, _.prototype = hn, _.HTML5_FMT = { DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", DATE: "YYYY-MM-DD", TIME: "HH:mm", TIME_SECONDS: "HH:mm:ss", TIME_MS: "HH:mm:ss.SSS", WEEK: "GGGG-[W]WW", MONTH: "YYYY-MM" }, _ }, "object" == typeof exports && "undefined" != typeof module ? module.exports = l() : "function" == typeof n && n.amd ? n("moment", l) : o.moment = l(), n("manager/index", ["../component/helper", "moment"], function (a, r) { function e(e) { if (!e) throw new Error("first parameter `date` must be gave"); if (e instanceof r == !1) { if ("string" != typeof e && "number" != typeof e) throw new Error("`date` option is invalid type. (date: " + e + ")."); e = r(e) } this.year = parseInt(e.format("YYYY"), 10), this.month = parseInt(e.format("MM"), 10), this.prevMonth = parseInt(e.clone().add(-1, "months").format("MM"), 10), this.nextMonth = parseInt(e.clone().add(1, "months").format("MM"), 10), this.day = parseInt(e.format("DD"), 10), this.firstDay = 1, this.lastDay = parseInt(e.clone().endOf("month").format("DD"), 10), this.weekDay = e.weekday(), this.date = e } var i = {}; return e.prototype.toString = function () { return this.date.format("YYYY-MM-DD") }, e.Convert = function (e, t, n) { var s = a.format("{0}-{1}-{2}", e, t, n); return i[s] || (i[s] = r(s, "YYYY-MM-DD")), i[s] }, e }), n("component/classNames", ["../component/helper"], function (e) { return { top: e.getSubClass("top"), header: e.getSubClass("header"), body: e.getSubClass("body"), button: e.getSubClass("button") } }), n("configures/i18n", [], function () { return { defaultLanguage: "en", supports: ["ar", "en", "ko", "fr", "ch", "de", "nl", "jp", "pt", "da", "pl", "es", "cs", "uk", "ru", "ka", "ca"], weeks: { ar: ["أحد", "إثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"], en: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], ko: ["일", "월", "화", "수", "목", "금", "토"], fa: ["شنبه", "آدینه", "پنج", "چهار", "سه", "دو", "یک"], fr: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"], ch: ["日", "一", "二", "三", "四", "五", "六"], de: ["SO", "MO", "DI", "MI", "DO", "FR", "SA"], nl: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za"], jp: ["日", "月", "火", "水", "木", "金", "土"], pt: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"], da: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"], pl: ["Nie", "Pon", "Wto", "Śro", "Czw", "Pią", "Sob"], es: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], it: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], cs: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"], uk: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], ru: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], ka: ["კვ", "ორ", "სმ", "ოთ", "ხთ", "პრ", "შბ"], ca: ["Dg", "Dl", "Dm", "Dc", "Dj", "Dv", "Ds"] }, monthsLong: { ar: ["يناير", "فبراير", "مارس", "إبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], en: ["January", "February", "March", "April", "May", "Jun", "July", "August", "September", "October", "November", "December"], ko: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], fa: ["آذر", "آبان", "مهر", "شهریور", "مرداد", "تیر", "خرداد", "اردیبهشت", "فروردین", "اسفند", "بهمن", "دی"], fr: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], ch: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], de: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], nl: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"], jp: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], pt: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], da: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], pl: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], es: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], it: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], cs: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Cervenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], uk: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], ru: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], ka: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომბერი", "ნოემბერი", "დეკემბერი"], ca: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"] }, months: { ar: ["يناير", "فبراير", "مارس", "إبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], en: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], ko: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], fa: ["آذر", "آبان", "مهر", "شهریور", "مرداد", "تیر", "خرداد", "اردیبهشت", "فروردین", "اسفند", "بهمن", "دی"], fr: ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin", "Juil", "Aoû", "Sep", "Oct", "Nov", "Déc"], ch: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], de: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], nl: ["Jan", "Feb", "Mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], jp: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], pt: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], da: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], pl: ["Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"], es: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dec"], it: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], cs: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čvn", "Čvc", "Srp", "Zář", "Říj", "Lis", "Pro"], uk: ["Січ", "Лют", "Бер", "Квіт", "Трав", "Черв", "Лип", "Серп", "Вер", "Жовт", "Лист", "Груд"], ru: ["Янв", "Февр", "Март", "Апр", "Май", "Июнь", "Июль", "Авг", "Сент", "Окт", "Нояб", "Дек"], ka: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"], ca: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"] }, controls: { ar: { ok: "حسناً", cancel: "إلغاء" }, en: { ok: "OK", cancel: "Cancel" }, ko: { ok: "확인", cancel: "취소" }, fa: { ok: "چک کنید", cancel: "لغو" }, fr: { ok: "Vérifier", cancel: "Annuler" }, ch: { ok: "确认", cancel: "取消" }, de: { ok: "Okay", cancel: "Abbrechen" }, nl: { ok: "Oké", cancel: "Annuleren" }, jp: { ok: "確認", cancel: "キャンセル" }, pt: { ok: "Verifique", cancel: "Cancelar" }, da: { ok: "Bekræftelse", cancel: "aflyst" }, pl: { ok: "Sprawdź", cancel: "Anuluj" }, es: { ok: "Cheque", cancel: "Cancelar" }, it: { ok: "conferma", cancel: "annullato" }, cs: { ok: "Zkontrolujte", cancel: "Zrušit" }, uk: { ok: "Вибрати", cancel: "Скасувати" }, ru: { ok: "Выбрать", cancel: "Отмена" }, ka: { ok: "არჩევა", cancel: "გაუქმება" }, ca: { ok: "Confirmar", cancel: "Cancel·lar" } } } }), n("component/global", ["../configures/i18n"], function (e) { return { language: e.defaultLanguage, languages: e, week: 0, format: "YYYY-MM-DD" } }), n("component/options", ["moment", "./global"], function (e, t) { return { lang: null, languages: t.languages, theme: "light", date: e(), format: t.format, enabledDates: [], disabledDates: [], disabledWeekdays: [], disabledRanges: [], schedules: [], scheduleOptions: { colors: {} }, week: t.week, weeks: t.languages.weeks.en, monthsLong: t.languages.monthsLong.en, months: t.languages.months.en, controls: t.languages.controls.en, pickWeeks: !1, initialize: !0, multiple: !1, toggle: !1, reverse: !1, buttons: !1, modal: !1, selectOver: !1, minDate: null, maxDate: null, init: null, select: null, apply: null, click: null, page: null, prev: null, next: null } }), n("shim/utils", [], function () { return { register: function (e, t, n) { if (!n) { var s = "PIGNOSE Calendar needs ".concat(e, " library.\nIf you want to use built-in plugin, Import dist/pignose.calendar.full.js.\nType below code in your command line to install the library."); console && "function" == typeof console.error && (console.warn(s), console.warn("$ ".concat(t))) } return n } } }), n("jquery", ["./shim/utils"], function (e) { var t; try { t = jQuery || Y } catch (e) { } return e.register("jquery", "npm install jquery --save", t) }), n("methods/configure", ["../component/global", "../component/models", "../component/options", "../configures/i18n", "jquery"], function (n, s, a, r, i) { return function (e) { var t = this; t.settings = i.extend(!0, {}, a, e), t.settings.lang || (t.settings.lang = n.language), t.settings.lang !== r.defaultLanguage && -1 !== i.inArray(t.settings.lang, n.languages.supports) && (t.settings.weeks = n.languages.weeks[t.settings.lang] || n.languages.weeks[r.defaultLanguage], t.settings.monthsLong = n.languages.monthsLong[t.settings.lang] || n.languages.monthsLong[r.defaultLanguage], t.settings.months = n.languages.months[t.settings.lang] || n.languages.months[r.defaultLanguage], t.settings.controls = n.languages.controls[t.settings.lang] || n.languages.controls[r.defaultLanguage]), "light" !== t.settings.theme && -1 === i.inArray(t.settings.theme, s.preference.supports.themes) && (t.settings.theme = "light"), !0 === t.settings.pickWeeks && (!1 === t.settings.multiple ? console.error("You must give true at settings.multiple options on PIGNOSE-Calendar for using in pickWeeks option.") : !0 === t.settings.toggle && console.error("You must give false at settings.toggle options on PIGNOSE-Calendar for using in pickWeeks option.")), t.settings.week %= t.settings.weeks.length } }), n("methods/init", ["../manager/index", "../component/classNames", "../component/helper", "../component/models", "../component/global", "./configure", "jquery", "moment"], function (L, A, H, F, R, t, j, N) { var r = j(window); j(document); return function (e) { var b = this; b.settings = {}, t.call(b, e), b.global = { calendarHtml: H.format('', H.getClass(F.name), A.top, A.header, A.body, b.settings.theme), calendarButtonsHtml: H.format('', A.button, b.settings.controls.cancel, b.settings.controls.ok), calendarScheduleContainerHtml: H.format('
', A.button), calendarSchedulePinHtml: H.format(' ', A.button) }; var S = H.getSubClass("unitRange"), Y = H.getSubClass("unitRangeFirst"), C = H.getSubClass("unitRangeLast"), O = H.getSubClass("unitActive"), T = [H.getSubClass("unitFirstActive"), H.getSubClass("unitSecondActive")], x = H.getSubClass("unitToggleActive"), W = H.getSubClass("unitToggleInactive"), P = null; return b.each(function () { var v = j(this), k = { initialize: null, element: v, calendar: j(b.global.calendarHtml), input: v.is("input"), renderer: null, current: [null, null], date: { all: [], enabled: [], disabled: [] }, storage: { activeDates: [], schedules: [] }, dateManager: new L(b.settings.date), calendarWrapperHtml: H.format('
', H.getSubClass("wrapper")), calendarWrapperOverlayHtml: H.format('
', H.getSubClass("wrapperOverlay")), context: b }, w = v; !0 === b.settings.initialize && (k.initialize = k.current[0] = k.dateManager.date.clone()), this.local = k, !0 === b.settings.reverse ? k.calendar.addClass(H.getSubClass("reverse")) : k.calendar.addClass(H.getSubClass("default")); for (var e = b.settings.week; e < b.settings.weeks.length + b.settings.week; e++) { e < 0 && (e = R.languages.weeks.en.length - e); var t = b.settings.weeks[e % b.settings.weeks.length]; if ("string" == typeof t) t = t.toUpperCase(), j(H.format('{1}
', H.getSubClass("week"), t, R.languages.weeks.en[e % R.languages.weeks.en.length].toLowerCase())).appendTo(k.calendar.find("." + A.header)) } if (!0 === b.settings.buttons && (P = j(b.global.calendarButtonsHtml)).appendTo(k.calendar), !0 === k.input || !0 === b.settings.modal) { var n, s = H.getSubClass("wrapperActive"), a = H.getSubClass("wrapperOverlayActive"); (w = j(k.calendarWrapperHtml)).bind("click", function (e) { e.stopPropagation() }), v.bind("click", function (e) { e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), (n = j("." + H.getSubClass("wrapperOverlay"))).length < 1 && (n = j(k.calendarWrapperOverlayHtml)).appendTo("body"), n.unbind("click." + H.getClass(F.name)).bind("click." + H.getClass(F.name), function (e) { e.stopPropagation(), w.trigger("cancel." + H.getClass(F.name)) }), !1 === w.parent().is("body") && w.appendTo("body"), w.show(), n.show(), r.unbind("resize." + H.getClass(F.name)).bind("resize." + H.getClass(F.name), function () { w.css({ marginLeft: -w.outerWidth() / 2, marginTop: -w.outerHeight() / 2 }) }).triggerHandler("resize." + H.getClass(F.name)), v[F.name]("set", v.val()), setTimeout(function () { n.addClass(a), w.addClass(s) }, 25) }).bind("focus", function (e) { j(this).blur() }), w.unbind("cancel." + H.getClass(F.name) + " apply." + H.getClass(F.name)).bind("cancel." + H.getClass(F.name) + " apply." + H.getClass(F.name), function () { n.removeClass(a).hide(), w.removeClass(s).hide() }) } function M() { if (!k.current[0] || !k.current[1]) return !1; var e = k.current[0].format("YYYY-MM-DD"), t = k.current[1].format("YYYY-MM-DD"), n = N(Math.max(k.current[0].valueOf(), k.dateManager.date.clone().startOf("month").valueOf())), s = N(Math.min(k.current[1].valueOf(), k.dateManager.date.clone().endOf("month").valueOf())), a = n.format("YYYY-MM-DD") !== e, r = s.format("YYYY-MM-DD") !== t; !1 == a && n.add(1, "days"), !1 == r && s.add(-1, "days"); for (var i = n.format("YYYY-MM-DD"), o = s.format("YYYY-MM-DD"); n.format("YYYY-MM-DD") <= s.format("YYYY-MM-DD"); n.add(1, "days")) { var l = n.format("YYYY-MM-DD"), u = k.calendar.find(H.format('.{0}[data-date="{1}"]', H.getSubClass("unit"), l)).addClass(S); l === i && u.addClass(Y), l === o && u.addClass(C) } } function D(e, t, n) { return !!n && (e.diff(n) < 0 && 0 < t.diff(n)) } k.renderer = function () { if (k.calendar.appendTo(w.empty()), k.calendar.find("." + A.top + "-year").text(k.dateManager.year), k.calendar.find("." + A.top + "-month").text(b.settings.monthsLong[k.dateManager.month - 1]), k.calendar.find(H.format(".{0}-prev .{0}-value", A.top)).text(b.settings.months[k.dateManager.prevMonth - 1].toUpperCase()), k.calendar.find(H.format(".{0}-next .{0}-value", A.top)).text(b.settings.months[k.dateManager.nextMonth - 1].toUpperCase()), !0 === b.settings.buttons && P) { var a = v; P.find("." + A.button).bind("click", function (e) { e.preventDefault(), e.stopPropagation(); var t = j(this); if (t.hasClass(A.button + "-apply")) { t.trigger("apply." + F.name, k); var n = ""; if (!0 === b.settings.toggle) n = k.storage.activeDates.join(", "); else if (!0 === b.settings.multiple) { var s = []; null !== k.current[0] && s.push(k.current[0].format(b.settings.format)), null !== k.current[1] && s.push(k.current[1].format(b.settings.format)), n = s.join(" ~ ") } else n = null === k.current[0] ? "" : N(k.current[0]).format(b.settings.format); !0 === k.input && a.val(n).triggerHandler("change"), "function" == typeof b.settings.apply && b.settings.apply.call(k.calendar, k.current, k), w.triggerHandler("apply." + H.getClass(F.name)) } else w.triggerHandler("cancel." + H.getClass(F.name)) }) } var e = k.calendar.find("." + A.body).empty(), t = L.Convert(k.dateManager.year, k.dateManager.month, k.dateManager.firstDay), n = L.Convert(k.dateManager.year, k.dateManager.month, k.dateManager.lastDay), s = t.weekday() - b.settings.week, r = n.weekday() - b.settings.week; s < 0 && (s += b.settings.weeks.length); for (var d = [], c = [null === k.current[0] ? null : k.current[0].format("YYYY-MM-DD"), null === k.current[1] ? null : k.current[1].format("YYYY-MM-DD")], h = null === b.settings.minDate ? null : N(b.settings.minDate), f = null === b.settings.maxDate ? null : N(b.settings.maxDate), i = 0; i < s; i++) { var o = j(H.format('
', H.getSubClass("unit"), R.languages.weeks.en[i].toLowerCase())); d.push(o) } function l(e) { var t = L.Convert(k.dateManager.year, k.dateManager.month, e), n = t.format("YYYY-MM-DD"), s = j(H.format('', H.getSubClass("unit"), t.format("YYYY-MM-DD"), e, R.languages.weeks.en[t.weekday()].toLowerCase())); if (0 < b.settings.enabledDates.length) -1 === j.inArray(n, b.settings.enabledDates) && s.addClass(H.getSubClass("unitDisabled")); else if (0 < b.settings.disabledWeekdays.length && -1 !== j.inArray(t.weekday(), b.settings.disabledWeekdays)) s.addClass(H.getSubClass("unitDisabled")).addClass(H.getSubClass("unitDisabledWeekdays")); else if (null !== h && 0 < h.diff(t) || null !== f && f.diff(t) < 0) s.addClass(H.getSubClass("unitDisabled")).addClass(H.getSubClass("unitDisabledRange")); else if (-1 !== j.inArray(n, b.settings.disabledDates)) s.addClass(H.getSubClass("unitDisabled")); else if (0 < b.settings.disabledRanges.length) for (var a = b.settings.disabledRanges.length, r = 0; r < a; r++) { var i = b.settings.disabledRanges[r]; i.length; if (0 <= t.diff(N(i[0])) && t.diff(N(i[1])) <= 0) { s.addClass(H.getSubClass("unitDisabled")).addClass(H.getSubClass("unitDisabledRange")).addClass(H.getSubClass("unitDisabledMultipleRange")); break } } if (0 < b.settings.schedules.length && "object" === U(b.settings.scheduleOptions) && "object" === U(b.settings.scheduleOptions.colors)) { var o = b.settings.schedules.filter(function (e) { return e.date === n }), l = j.unique(o.map(function (e, t) { return e.name }).sort()); if (0 < l.length) { var u = j(b.global.calendarScheduleContainerHtml); u.appendTo(s), l.map(function (e, t) { if (b.settings.scheduleOptions.colors[e]) { var n = b.settings.scheduleOptions.colors[e]; j(H.format(b.global.calendarSchedulePinHtml, e, n)).appendTo(u) } }) } } !0 === b.settings.toggle ? -1 !== j.inArray(n, k.storage.activeDates) && 0 < k.storage.activeDates.length ? s.addClass(x) : s.addClass(W) : !1 === s.hasClass(H.getSubClass("unitDisabled")) && (!0 === b.settings.multiple ? (c[0] && n === c[0] && s.addClass(O).addClass(T[0]), c[1] && n === c[1] && s.addClass(O).addClass(T[1])) : c[0] && n === c[0] && -1 === j.inArray(c[0], b.settings.disabledDates) && (b.settings.enabledDates.length < 1 || -1 !== j.inArray(c[0], b.settings.enabledDates)) && s.addClass(O).addClass(T[0])), d.push(s); var g = v; s.bind("click", function (e) { e.preventDefault(), e.stopPropagation(); var t = j(this), n = t.data("date"), s = 0, a = !1; if (t.hasClass(H.getSubClass("unitDisabled"))) a = !0; else if (!0 === k.input && !1 === b.settings.multiple && !1 === b.settings.buttons) g.val(N(n).format(b.settings.format)), w.triggerHandler("apply." + H.getClass(F.name)); else if (null !== k.initialize && k.initialize.format("YYYY-MM-DD") === n && !1 === b.settings.toggle); else { if (!0 === b.settings.toggle) { var r = k.storage.activeDates.filter(function (e, t) { return e === n }); if (k.current[s] = N(n), r.length < 1) k.storage.activeDates.push(n), t.addClass(x).removeClass(W); else { for (var i = 0, o = 0; o < k.storage.activeDates.length; o++) { var l = k.storage.activeDates[o]; if (n === l) { i = o; break } } k.storage.activeDates.splice(i, 1), t.removeClass(x).addClass(W) } } else if (!0 === t.hasClass(O) && !1 === b.settings.pickWeeks) !0 === b.settings.multiple && (t.hasClass(T[0]) ? s = 0 : T[1] && (s = 1)), t.removeClass(O).removeClass(T[s]), k.current[s] = null; else { if (!0 === b.settings.pickWeeks) if (!0 === t.hasClass(O) || !0 === t.hasClass(S)) { for (var u = 0; u < 2; u++) k.calendar.find("." + O + "." + T[u]).removeClass(O).removeClass(T[u]); k.current[0] = null, k.current[1] = null } else { k.current[0] = N(n).startOf("week").add(b.settings.week, "days"), k.current[1] = N(n).endOf("week").add(b.settings.week, "days"); for (var d = 0; d < 2; d++) k.calendar.find("." + O + "." + T[d]).removeClass(O).removeClass(T[d]), k.calendar.find(H.format('.{0}[data-date="{1}"]', H.getSubClass("unit"), k.current[d].format("YYYY-MM-DD"))).addClass(O).addClass(T[d]) } else !0 === b.settings.multiple && (null === k.current[0] ? s = 0 : null === k.current[1] ? s = 1 : (s = 0, k.current[1] = null, k.calendar.find("." + O + "." + T[1]).removeClass(O).removeClass(T[1]))), k.calendar.find("." + O + "." + T[s]).removeClass(O).removeClass(T[s]), t.addClass(O).addClass(T[s]), k.current[s] = N(n); if (k.current[0] && k.current[1]) { if (0 < k.current[0].diff(k.current[1])) { var c = k.current[0]; k.current[0] = k.current[1], k.current[1] = c, c = null, k.calendar.find("." + O).each(function () { var e = j(this); for (var t in T) { var n = T[t]; e.toggleClass(n) } }) } if (!1 === function (e, t) { var n; for (var s in b.settings.disabledDates) if (n = N(b.settings.disabledDates[s]), D(e, t, n)) return !1; if (D(e, t, b.settings.maxDate)) return !1; if (D(e, t, b.settings.minDate)) return !1; for (var a in b.settings.disabledRanges) { var r = b.settings.disabledRanges[a], i = N(r[0]), o = N(r[1]); if (D(e, t, i) || D(e, t, o)) return !1 } var l, u = e.weekday(), d = t.weekday(); d < u && (l = u, u = d, d = l); for (var c = 0, h = 0; c < b.settings.disabledWeekdays.length && h < 7; c++) { h++; var f = b.settings.disabledWeekdays[c]; if (u <= f && f <= d) return !1 } return !0 }(k.current[0], k.current[1]) && !1 === b.settings.selectOver && (k.current[0] = null, k.current[1] = null, k.calendar.find("." + O).removeClass(O).removeClass(T[0]).removeClass(T[1])), !0 === k.input && !1 === b.settings.buttons) { var h = []; null !== k.current[0] && h.push(k.current[0].format(b.settings.format)), null !== k.current[1] && h.push(k.current[1].format(b.settings.format)), t.val(h.join(", ")), w.trigger("apply." + H.getClass(F.name)) } } } !0 === b.settings.multiple && (k.calendar.find("." + S).removeClass(S).removeClass(Y).removeClass(C), M.call()), 0 < b.settings.schedules.length && (k.storage.schedules = b.settings.schedules.filter(function (e) { return e.date === n })) } function f(e) { k.date.all.push(e), !function (e) { if (-1 !== b.settings.disabledDates.indexOf(e)) return !1; if (0 <= e.diff(b.settings.maxDate)) return !1; if (e.diff(b.settings.minDate) <= 0) return !1; for (var t in b.settings.disabledRanges) { var n = b.settings.disabledRanges[t], s = N(n[0]), a = N(n[1]); if (D(s, a, e)) return !1 } var r = e.weekday(); return -1 === b.settings.disabledWeekdays.indexOf(r) }(N(e)) ? k.date.disabled.push(e) : k.date.enabled.push(e) } if (k.current[0]) if (k.current[1]) for (var m = k.current[0].clone(); m.format("YYYY-MM-DD") <= k.current[1].format("YYYY-MM-DD"); m.add("1", "days")) f(m.clone()); else f(k.current[0].clone()); !1 === a && (k.initialize = null, "function" == typeof b.settings.select && b.settings.select.call(t, k.current, k)), "function" == typeof b.settings.click && b.settings.click.call(t, e, k) }) } for (var u = k.dateManager.firstDay; u <= k.dateManager.lastDay; u++) l(u); for (var m = 1 + r; d.length < 5 * b.settings.weeks.length; m++) { m < 0 && (m = R.languages.weeks.en.length - m); var g = j(H.format('
', H.getSubClass("unit"), R.languages.weeks.en[m % R.languages.weeks.en.length].toLowerCase())); d.push(g) } for (var p = null, y = 0; y < d.length; y++) { var _ = d[y]; (y % b.settings.weeks.length == 0 || y + 1 >= d.length) && (null !== p && p.appendTo(e), y + 1 < d.length && (p = j(H.format('
', H.getSubClass("row"))))), p.append(_) } k.calendar.find("." + A.top + "-nav").bind("click", function (e) { e.preventDefault(), e.stopPropagation(); var t = j(this), n = "unkown"; t.hasClass(A.top + "-prev") ? (n = "prev", k.dateManager = new L(k.dateManager.date.clone().add(-1, "months"))) : t.hasClass(A.top + "-next") && (n = "next", k.dateManager = new L(k.dateManager.date.clone().add(1, "months"))), "function" == typeof b.settings.page && b.settings.page.call(t, { type: n, year: k.dateManager.year, month: k.dateManager.month, day: k.dateManager.day }, k), "function" == typeof b.settings[n] && b.settings[n].call(t, { type: n, year: k.dateManager.year, month: k.dateManager.month, day: k.dateManager.day }, k), k.renderer.call() }), !0 === b.settings.multiple && (k.calendar.find("." + S).removeClass(S).removeClass(Y).removeClass(C), M.call()) }, k.renderer.call(), v[0][F.name] = k, "function" == typeof b.settings.init && b.settings.init.call(v, k) }) } }), n("methods/setting", ["../component/global", "../configures/i18n", "jquery"], function (a, e, r) { return function (e) { var s = r.extend({ language: a.language, languages: {}, week: null, format: null }, e); if (a.language = s.language, 0 < Object.keys(s.languages).length) { function t(t) { var n = s.languages[t]; if ("string" != typeof t && console.error("global configuration is failed.\nMessage: language key is not a string type.", t), !n.weeks) return console.warn("Warning: `weeks` option of `" + t + "` language is missing."), "break"; if (!n.monthsLong) return console.warn("Warning: `monthsLong` option of `" + t + "` language is missing."), "break"; if (!n.months) return console.warn("Warning: `months` option of `" + t + "` language is missing."), "break"; if (!n.controls) return console.warn("Warning: `controls` option of `" + t + "` language is missing."), "break"; if (n.weeks) { if (n.weeks.length < 7) return console.error("`weeks` must have least 7 items."), "break"; 7 !== n.weeks.length && console.warn("`weeks` option over 7 items. We recommend to give 7 items.") } if (n.monthsLong) { if (n.monthsLong.length < 12) return console.error("`monthsLong` must have least 12 items."), "break"; 12 !== n.monthsLong.length && console.warn("`monthsLong` option over 12 items. We recommend to give 12 items.") } if (n.months) { if (n.months.length < 12) return console.error("`months` must have least 12 items."), "break"; 12 !== n.months.length && console.warn("`months` option over 12 items. We recommend to give 12 items.") } if (n.controls) { if (!n.controls.ok) return console.error("`controls.ok` value is missing in your language setting"), "break"; if (!n.controls.cancel) return console.error("`controls.cancel` value is missing in your language setting"), "break" } -1 === a.languages.supports.indexOf(t) && a.languages.supports.push(t), ["weeks", "monthsLong", "months", "controls"].map(function (e) { a.languages[e][t] && console.warn("`" + t + "` language is already given however it will be overwriten."), a.languages[e][t] = n[e] || a.languages[e][t.defaultLanguage] }) } for (var n in s.languages) { if ("break" === t(n)) break } } s.week && ("number" == typeof s.week ? a.week = s.week : console.error("global configuration is failed.\nMessage: You must give `week` option as number type.")), s.format && ("string" == typeof s.format ? a.format = s.format : console.error("global configuration is failed.\nMessage: You must give `format` option as string type.")) } }), n("methods/select", ["../component/helper", "jquery"], function (s, a) { return function (n) { this.each(function () { var e = this.local.dateManager, t = s.format("{0}-{1}-{2}", e.year, e.month, n); a(this).find(s.format('.{0}[data-date="{1}"]', s.getSubClass("unit"), t)).triggerHandler("click") }) } }), n("methods/set", ["jquery", "moment", "../manager/index", "../component/models"], function (r, i, o, l) { return function (e) { if (e) { var a = e.split("~").map(function (e) { var t = r.trim(e); return t || null }); this.each(function () { var e = r(this)[0][l.name], t = e.context, n = [a[0] ? i(a[0], t.settings.format) : null, a[1] ? i(a[1], t.settings.format) : null]; if (e.dateManager = new o(n[0]), !0 === t.settings.pickWeeks && n[0]) { var s = n[0]; n[0] = s.clone().startOf("week"), n[1] = s.clone().endOf("week") } !0 === t.settings.toggle ? e.storage.activeDates = a : e.current = n, e.renderer.call() }) } } }), n("methods/index", ["./init", "./configure", "./setting", "./select", "./set"], function (e, t, n, s, a) { return { init: e, configure: t, setting: n, select: s, set: a } }), n("component/polyfills", [], function () { Array.prototype.filter || (Array.prototype.filter = function (e) { "use strict"; if (null === this) throw new TypeError; var t = Object(this), n = t.length >>> 0; if ("function" != typeof e) return []; for (var s = [], a = arguments[1], r = 0; r < n; r++) if (r in t) { var i = t[r]; e.call(a, i, r, t) && s.push(i) } return s }) }), n("core", ["./methods/index", "./component/models", "./component/polyfills"], function (e, t) { "use strict"; return window[t.name] = { version: t.version }, e }), n("main", ["core", "component/models"], function (n, e) { "use strict"; function t(e, t) { return void 0 !== n[t] ? n[t].apply(e, Array.prototype.slice.call(arguments, 2)) : "object" !== U(t) && t ? void console.error("Argument error are occured.") : n.init.apply(e, Array.prototype.slice.call(arguments, 1)) } for (var s in t.component = {}, e) t.component[s] = e[s]; return t }); var c = Zn("main"), h = Zn("component/models"), Y = Zn("jquery"), C = window || {}; for (var O in C.moment = Zn("moment"), Y.fn[h.name] = function (e) { return c.apply(c, [this, e].concat(Array.prototype.splice.call(arguments, 1))) }, h) Y.fn[h.name][O] = h[O]; n("plugins/jquery.js", function () { }) });
function ibisCalendarWidget(e) {
var containerElement = '.ibis-widget-calendar:eq(0)';
if (e.dualCalendar == true) {
containerElement = '.ibis-widget-dual-calendar:eq(0) .ibis-widget-month-calendar';
}
/* Error handling - check set-up errors and throw error in the console */
if (e.container != null) {
containerElement = e.container + ':eq(0)';
ibisSetupErrorCheck(e.container);
} else {
if (e.dualCalendar == true) {
ibisSetupErrorCheck('.ibis-widget-dual-calendar:eq(0) .ibis-widget-month-calendar');
} else {
ibisSetupErrorCheck('.ibis-widget-calendar');
}
}
ibisOptionErrorCheck(e.appURL, e.cartDir, e.mode);
(function ($) {
if ($(containerElement).length) {
$(containerElement).addClass('ibis-widgets');
var absolutePos = 0,
currentPos = 0,
maxMonth = 12;
if (e.maxMonth != null && e.maxMonth < 12) {
maxMonth = e.maxMonth;
}
function ibisGetNewCalendar(defaultDate, direction, prodCode, arrDepartures) {
var query = 'prodCodes=' + prodCode;
if (prodCode.toLowerCase().indexOf('prodgroup-') > -1) {
query = 'prodGroup=' + prodCode.replace('prodgroup-', '');
}
var apiURL = e.appURL + '/Departures/Json_ProductDaysAvailable?' + query,
pignoseActive = true,
maxDate = ibisISOFormatDate(ibisAddMonths(defaultDate, 12));
ibisConsoleLog(apiURL);
$.ajax({
url: apiURL,
dataType: 'jsonp',
jsonpCallback: 'productDaysAvailable',
success: function (response) {
var departures = response.dates;
departures.length == 0 && (departures = ibisISOFormatDate(ibisAddDays(new Date(), -1)));
var r = '';
null != e.cartDir && (r = e.cartDir);
var o = '';
null != e.mode && (o = e.mode);
var l = 'lite';
null != e.theme && (l = e.theme);
var t = ibisNZTime(new Date());
null != e.defaultDate && (t = e.defaultDate);
var d = null;
null != e.showIn24H && (d = e.showIn24H);
var s = null;
null != e.showAvail && (s = e.showAvail);
var u = null;
null != e.showBookLink && (u = e.showBookLink);
var p = 'Book Now';
null != e.bookLinkText && (p = e.bookLinkText);
var q = null;
null != e.bookLinkTextMobile && (q = e.bookLinkTextMobile);
var b = null;
null != e.mobileViewThreshold && (b = e.mobileViewThreshold);
var w = null;
null != e.linkOpenNewWindow && (w = e.linkOpenNewWindow);
var loadOnInit = true;
e.loadOnInit == false && (loadOnInit = false);
e.dualCalendar == true && (loadOnInit = false);
currentPos = 0;
$(containerElement).pignoseCalendar({
date: defaultDate,
theme: l,
enabledDates: departures,
week: 1,
minDate: defaultDate,
maxDate: maxDate,
init: function () {
if (loadOnInit == true) {
setTimeout(function () {
$(containerElement + ' .pignose-calendar-unit-active').trigger('click');
}, 500);
};
},
select: function (k) {
if (e.dualCalendar == true) {
var settings = {
appURL: e.appURL,
container: containerElement,
defaultDate: $(this).data('date'),
theme: l,
mode: o,
cartDir: r,
prodCode: prodCode,
showIn24H: d,
showAvail: s,
showBookLink: u,
bookLinkText: p,
bookLinkTextMobile: q,
mobileViewThreshold: b,
linkOpenNewWindow: w,
callingFrom: 'calendar'
};
if (ibisDualCalendar.step2Init == false) {
ibisDualCalendar.step2Init = true;
ibisDualCalendar.launchScreen2(settings);
}
} else {
if ($(this).hasClass('pignose-calendar-unit-active') && pignoseActive == true && !$('.ibis-widget-calendar').hasClass('loading')) {
$(containerElement).addClass('loading');
$(containerElement + ' .ibis-departures-container').remove(),
$(containerElement + ' .ibis-widget-departures').remove(),
$(containerElement).append('
'),
ibisCSS3Spinner(containerElement + ' .ibis-widget-departures'),
ibisWidgetDepartures({
appURL: e.appURL,
container: containerElement + ' .ibis-widget-departures',
defaultDate: $(this).data('date'),
theme: l,
mode: o,
cartDir: r,
prodCode: prodCode,
showIn24H: d,
showAvail: s,
showBookLink: u,
bookLinkText: p,
bookLinkTextMobile: q,
mobileViewThreshold: b,
linkOpenNewWindow: w,
callingFrom: 'calendar'
})
pignoseActive = false;
setTimeout(function () {
pignoseActive = true;
}, 500);
} else {
$(this).removeClass('pignose-calendar-unit-active');
}
}
},
next: function () {
absolutePos++;
currentPos++;
},
prev: function () {
absolutePos--;
currentPos--;
}
})
if (absolutePos != 0) {
$('.pignose-calendar-unit-first-active').removeClass('pignose-calendar-unit-first-active');
}
if (e.then != null) {
setTimeout(function () {
e.then();
}, 1000);
}
},
error: function (e, a) {
console.log(e), console.log('**[ibisGetNewCalendar() 1]** errorThrown:' + a);
$('.pignose-calendar').after('Error: An error occured. Please refresh the browser.
')
}
});
}
var prodCode = '';
null != e.prodCode && (prodCode = e.prodCode);
workingDate = ibisNZTime(new Date());
if (e.rollover != null) {
var currentTime = workingDate.getHours() + ':' + workingDate.getMinutes();
if (ibisCompareTimes(currentTime, e.rollover) == true) {
workingDate = ibisAddDays(workingDate, 1);
}
}
null != e.defaultDate && (workingDate = ibisNZTime(e.defaultDate));
var workingDateFull = ibisISOFormatDate(workingDate);
ibisGetNewCalendar(workingDateFull, 'next', prodCode);
}
})(jQuery);
}
/* IBIS Multiday Calendar Widget : v1.5.1.1 - 2 Jun 2021 */
/* Based on Pikaday : https://github.com/Pikaday/Pikaday */
//================================================================================
//Pikaday 1.8.2 - 2020-10-22
//Authors David Bushell https://dbushell.com @dbushell, Ramiro Rikkert GitHub @RamRik
//Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
//================================================================================
!function(e,t){"use strict";var n;if("object"==typeof exports){try{n=require("moment")}catch(e){}module.exports=t(n)}else"function"==typeof define&&define.amd?define(function(e){try{n=e("moment")}catch(e){}return t(n)}):e.Pikaday=t(e.moment)}(this,function(e){"use strict";var t="function"==typeof e,n=!!window.addEventListener,a=window.document,i=window.setTimeout,s=function(e,t,a,i){n?e.addEventListener(t,a,!!i):e.attachEvent("on"+t,a)},o=function(e,t,a,i){n?e.removeEventListener(t,a,!!i):e.detachEvent("on"+t,a)},r=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},l=function(e,t){r(e,t)||(e.className=""===e.className?t:e.className+" "+t)},h=function(e,t){var n;e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,"")},d=function(e){return/Array/.test(Object.prototype.toString.call(e))},u=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},c=function(e){var t=e.getDay();return 0===t||6===t},f=function(e){return e%4==0&&e%100!=0||e%400==0},g=function(e,t){return[31,f(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},m=function(e){u(e)&&e.setHours(0,0,0,0)},p=function(e,t){return e.getTime()===t.getTime()},y=function(e,t,n){var a,i;for(a in t)(i=void 0!==e[a])&&"object"==typeof t[a]&&null!==t[a]&&void 0===t[a].nodeName?u(t[a])?n&&(e[a]=new Date(t[a].getTime())):d(t[a])?n&&(e[a]=t[a].slice(0)):e[a]=y({},t[a],n):!n&&i||(e[a]=t[a]);return e},D=function(e,t,n){var i;a.createEvent?((i=a.createEvent("HTMLEvents")).initEvent(t,!0,!1),i=y(i,n),e.dispatchEvent(i)):a.createEventObject&&(i=a.createEventObject(),i=y(i,n),e.fireEvent("on"+t,i))},b=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},v={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},_=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},w=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return' ';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),''+e.day+" "},k=function(n,a,i,s){var o=new Date(i,a,n);return''+(t?e(o).isoWeek():function(e,t){e.setHours(0,0,0,0);var n=e.getDate(),a=e.getDay(),i=t,s=i-1,o=function(e){return(e+7-1)%7};e.setDate(n+s-o(a));var r=new Date(e.getFullYear(),0,i),l=(e.getTime()-r.getTime())/864e5;return 1+Math.round((l-s+o(r.getDay()))/7)}(o,s))+" "},M=function(e,t,n,a){return''+(t?e.reverse():e).join("")+" "},x=function(e,t,n,a,i,s){var o,r,l,h,u,c=e._o,f=n===c.minYear,g=n===c.maxYear,m='',p=!0,y=!0;for(l=[],o=0;o<12;o++)l.push('
c.maxMonth?' disabled="disabled"':"")+">"+c.i18n.months[o]+" ");for(h='
'+c.i18n.months[a]+''+l.join("")+"
",d(c.yearRange)?(o=c.yearRange[0],r=c.yearRange[1]+1):(o=n-c.yearRange,r=1+n+c.yearRange),l=[];o
=c.minYear&&l.push('"+o+" ");return u=''+n+c.yearSuffix+''+l.join("")+"
",c.showMonthAfterYear?m+=u+h:m+=h+u,f&&(0===a||c.minMonth>=a)&&(p=!1),g&&(11===a||c.maxMonth<=a)&&(y=!1),0===t&&(m+=''+c.i18n.previousMonth+" "),t===e._o.numberOfMonths-1&&(m+=''+c.i18n.nextMonth+" "),m+" "},R=function(e,t,n){return''+function(e){var t,n=[];for(e.showWeekNumber&&n.push(" "),t=0;t<7;t++)n.push(''+_(e,t,!0)+" ");return""+(e.isRTL?n.reverse():n).join("")+" "}(e)+(""+t.join("")+" ")+"
"},N=function(o){var l=this,h=l.config(o);l._onMouseDown=function(e){if(l._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(r(t,"is-disabled")||(!r(t,"pika-button")||r(t,"is-empty")||r(t.parentNode,"is-disabled")?r(t,"pika-prev")?l.prevMonth():r(t,"pika-next")&&l.nextMonth():(l.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),h.bound&&i(function(){l.hide(),h.blurFieldOnSelect&&h.field&&h.field.blur()},100))),r(t,"pika-select"))l._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},l._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(r(t,"pika-select-month")?l.gotoMonth(t.value):r(t,"pika-select-year")&&l.gotoYear(t.value))},l._onKeyChange=function(e){if(e=e||window.event,l.isVisible())switch(e.keyCode){case 13:case 27:h.field&&h.field.blur();break;case 37:l.adjustDate("subtract",1);break;case 38:l.adjustDate("subtract",7);break;case 39:l.adjustDate("add",1);break;case 40:l.adjustDate("add",7);break;case 8:case 46:l.setDate(null)}},l._parseFieldValue=function(){if(h.parse)return h.parse(h.field.value,h.format);if(t){var n=e(h.field.value,h.format,h.formatStrict);return n&&n.isValid()?n.toDate():null}return new Date(Date.parse(h.field.value))},l._onInputChange=function(e){var t;e.firedBy!==l&&(t=l._parseFieldValue(),u(t)&&l.setDate(t),l._v||l.show())},l._onInputFocus=function(){l.show()},l._onInputClick=function(){l.show()},l._onInputBlur=function(){var e=a.activeElement;do{if(r(e,"pika-single"))return}while(e=e.parentNode);l._c||(l._b=i(function(){l.hide()},50)),l._c=!1},l._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,a=t;if(t){!n&&r(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),s(t,"change",l._onChange)));do{if(r(a,"pika-single")||a===h.trigger)return}while(a=a.parentNode);l._v&&t!==h.trigger&&a!==h.trigger&&l.hide()}},l.el=a.createElement("div"),l.el.className="pika-single"+(h.isRTL?" is-rtl":"")+(h.theme?" "+h.theme:""),s(l.el,"mousedown",l._onMouseDown,!0),s(l.el,"touchend",l._onMouseDown,!0),s(l.el,"change",l._onChange),h.keyboardInput&&s(a,"keydown",l._onKeyChange),h.field&&(h.container?h.container.appendChild(l.el):h.bound?a.body.appendChild(l.el):h.field.parentNode.insertBefore(l.el,h.field.nextSibling),s(h.field,"change",l._onInputChange),h.defaultDate||(h.defaultDate=l._parseFieldValue(),h.setDefaultDate=!0));var d=h.defaultDate;u(d)?h.setDefaultDate?l.setDate(d,!0):l.gotoDate(d):l.gotoDate(new Date),h.bound?(this.hide(),l.el.className+=" is-bound",s(h.trigger,"click",l._onInputClick),s(h.trigger,"focus",l._onInputFocus),s(h.trigger,"blur",l._onInputBlur)):this.show()};return N.prototype={config:function(e){this._o||(this._o=y({},v,!0));var t=y(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,u(t.minDate)||(t.minDate=!1),u(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate100&&(t.yearRange=100);return t},toString:function(n){return n=n||this._o.format,u(this._d)?this._o.toString?this._o.toString(this._d,n):t?e(this._d).format(n):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,a){t&&e.isMoment(n)&&this.setDate(n.toDate(),a)},getDate:function(){return u(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",D(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),u(e)){var n=this._o.minDate,a=this._o.maxDate;u(n)&&ea&&(e=a),this._d=new Date(e.getTime()),m(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),D(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(e){var t=!0;if(u(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),a=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();a.setMonth(a.getMonth()+1),a.setDate(a.getDate()-1),t=i=s&&(this._y=s,!isNaN(r)&&this._m>r&&(this._m=r));for(var h=0;h'+x(this,h,this.calendars[h].year,this.calendars[h].month,this.calendars[0].year,t)+this.render(this.calendars[h].year,this.calendars[h].month,t)+"";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&i(function(){n.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)}},adjustPosition:function(){var e,t,n,i,s,o,r,d,u,c,f,g;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,i=this.el.offsetHeight,s=window.innerWidth||a.documentElement.clientWidth,o=window.innerHeight||a.documentElement.clientHeight,r=window.pageYOffset||a.body.scrollTop||a.documentElement.scrollTop,f=!0,g=!0,"function"==typeof e.getBoundingClientRect)d=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(d=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)d+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&d+n>s||this._o.position.indexOf("right")>-1&&d-n+e.offsetWidth>0)&&(d=d-n+e.offsetWidth,f=!1),(this._o.reposition&&u+i>o+r||this._o.position.indexOf("top")>-1&&u-i-e.offsetHeight>0)&&(u=u-i-e.offsetHeight,g=!1),d<0&&(d=0),u<0&&(u=0),this.el.style.left=d+"px",this.el.style.top=u+"px",l(this.el,f?"left-aligned":"right-aligned"),l(this.el,g?"bottom-aligned":"top-aligned"),h(this.el,f?"right-aligned":"left-aligned"),h(this.el,g?"top-aligned":"bottom-aligned")}},render:function(e,t,n){var a=this._o,i=new Date,s=g(e,t),o=new Date(e,t,1).getDay(),r=[],l=[];m(i),a.firstDay>0&&(o-=a.firstDay)<0&&(o+=7);for(var h=0===t?11:t-1,d=11===t?0:t+1,f=0===t?e-1:e,y=11===t?e+1:e,D=g(f,h),b=s+o,v=b;v>7;)v-=7;b+=7-v;for(var _=!1,x=0,N=0;x=s+o,E=x-o+1,O=t,j=e,W=a.startRange&&p(a.startRange,S),F=a.endRange&&p(a.endRange,S),A=a.startRange&&a.endRange&&a.startRangea.maxDate||a.disableWeekends&&c(S)||a.disableDayFn&&a.disableDayFn(S),isEmpty:Y,isStartRange:W,isEndRange:F,isInRange:A,showDaysInNextAndPreviousMonths:a.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:a.enableSelectionDaysInNextAndPreviousMonths};a.pickWholeWeek&&C&&(_=!0),l.push(w(L)),7==++N&&(a.showWeekNumber&&l.unshift(k(x-o,t,e,a.firstWeekOfYearMinDays)),r.push(M(l,a.isRTL,a.pickWholeWeek,_)),l=[],N=0,_=!1)}return R(a,r,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),h(this.el,"is-hidden"),this._o.bound&&(s(a,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&o(a,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),l(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){var e=this._o;this.hide(),o(this.el,"mousedown",this._onMouseDown,!0),o(this.el,"touchend",this._onMouseDown,!0),o(this.el,"change",this._onChange),e.keyboardInput&&o(a,"keydown",this._onKeyChange),e.field&&(o(e.field,"change",this._onInputChange),e.bound&&(o(e.trigger,"click",this._onInputClick),o(e.trigger,"focus",this._onInputFocus),o(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},N});
function ibisMultidayCalendar(e, date) {
var $ga = ibisGetVariables()['_ga'],
containerElement = '.ibis-widget-multiday-calendar:eq(0)',
initialRollOver = false,
picker = '';
/* Error handling - check set-up errors and throw error in the console */
if (e.container != null) {
containerElement = e.container + ':eq(0)';
ibisSetupErrorCheck(i.container);
} else {
ibisSetupErrorCheck('.ibis-widget-multiday-calendar');
}
ibisOptionErrorCheck(e.appURL, e.cartDir, e.mode);
(function ($) {
if ($(containerElement).length) {
var maxMonth = 12,
calendarInitialLoadDays = 14,
daysToIncrement = 31,
loopedOnce = false,
defaultDate = ibisNZTime(new Date()),
enabledDates = '',
prodCode = '',
pikadayFirstLoad = true,
cursorIndex = 1,
cursorIndexStepBy = 7,
firstVisibleClassSuffix = 1,
pikadayPos = 0,
pikadayAbsolutePos = 0,
pikadayMovementDirection = '',
widgetInitialDone = false;
ibisCSS3Spinner(containerElement);
$('body').on('mouseover', '.ibis-multiday-calendar-results tbody tr td.avail', function () {
$(this).addClass('hover');
})
$('body').on('mouseout', '.ibis-multiday-calendar-results tbody tr td.avail', function () {
$(this).removeClass('hover');
})
$('body').on('click', '.ibis-multiday-calendar-results tbody tr td.avail', function () {
if ($(this).find('a').attr('target') == '_blank') {
window.open($(this).find('a').attr('href'), '_blank');
} else {
location.href = $(this).find('a').attr('href');
}
})
$('body').on('click', '.ibis-multiday-calendar-results tbody tr td.avail a', function (e) {
e.preventDefault();
})
$(window).resize(function () {
adjustTableDisplay();
adjustControlArrows();
})
e.defaultDate != null && (defaultDate = e.defaultDate);
e.prodCode != null && (prodCode = e.prodCode);
defaultDate = ibisISOFormatDate(defaultDate);
getAvailDatesForCalendar(defaultDate, prodCode);
function getAvailDatesForCalendar(defaultDate, prodCode) {
var dataURL = e.appURL + '/Departures/Json_ProductDaysAvailable?filter=' + prodCode;
$.ajax({
url: dataURL,
dataType: 'jsonp',
jsonpCallback: 'productDaysAvailable',
success: function (response) {
var dates = response.dates;
generateAvailabilityTable(defaultDate);
pikadayInitial(dates, defaultDate, ibisISOFormatDate(ibisNZTime(defaultDate)));
},
error: function (i, response) {
console.log(i), console.log('**[getAvailDatesForCalendar()]** errorThrown: ' + response);
}
})
}
function adjustControlArrows() {
if ($('.ibis-multiday-calendar-col1').data('date') == ibisISOFormatDate(ibisNZTime(new Date())) && $('.ibis-multiday-calendar-col1').is(':visible')) {
$('.ibis-icons-arrow-back').removeClass('active');
} else {
$('.ibis-icons-arrow-back').addClass('active');
}
}
function adjustResultDisplay(mode) {
var colWidth = (($('body').find(containerElement).innerWidth() - 88 - 48) / cursorIndexStepBy);
$('.ibis-multiday-calendar-tr').attr('data-rows-shown', cursorIndexStepBy);
$('.ibis-multiday-calendar-tr .ibis-multiday-calendar-cols').css('width', colWidth);
$('table.ibis-multiday-calendar-results .ibis-multiday-calendar-cols').hide();
if (mode == 'arrowBack' || (calendarInitialLoadDays - cursorIndexStepBy + 1) < firstVisibleClassSuffix) {
firstVisibleClassSuffix = (calendarInitialLoadDays - cursorIndexStepBy + 1);
cursorIndex = firstVisibleClassSuffix;
}
for (i = 0; i < cursorIndexStepBy; i++) {
$('table.ibis-multiday-calendar-results .ibis-multiday-calendar-col' + (firstVisibleClassSuffix + i)).show();
}
}
function adjustTableDisplay(mode) {
if ($('body').find(containerElement).innerWidth() < 340) {
cursorIndexStepBy = 1;
} else if ($('body').find(containerElement).innerWidth() < 410) {
cursorIndexStepBy = 2;
} else if ($('body').find(containerElement).innerWidth() < 594) {
cursorIndexStepBy = 3;
} else if ($('body').find(containerElement).innerWidth() < 704) {
cursorIndexStepBy = 4;
} else if ($('body').find(containerElement).innerWidth() < 814) {
cursorIndexStepBy = 5;
} else if ($('body').find(containerElement).innerWidth() < 924) {
cursorIndexStepBy = 6;
} else {
cursorIndexStepBy = 7;
}
adjustResultDisplay(mode);
}
function changePikadayDate(nextDate) {
var newDate = new Date(nextDate);
newDate = newDate.getDate() + ' ' + ibisGetMonthName(newDate).substr(0, 3) + ' ' + newDate.getFullYear();
$('#ibis-datepicker-pickaday').val(newDate);
}
function generateAvailabilityTable(date, callMode, additionalMode) {
cursorIndex = 1;
var prodTitle = '',
prodImageAlt = '';
e.prodTitle != null && (prodTitle = '' + e.prodTitle + ' ', prodImageAlt = e.prodTitle);
var prodImage = '',
prodDescriptionClass = ' ibis-no-image';
e.prodImage != null && (prodImage = ' ', prodDescriptionClass = '');
var prodDescription = '';
e.prodDescription != null && (prodDescription = e.prodDescription);
var space = 0;
e.space != null && (space = e.space);
var bookLinkText = 'Book Now';
e.bookLinkText != null && (bookLinkText = e.bookLinkText);
var mode = '';
e.mode != null && (mode = e.mode);
var cartDir = '/cart';
var theme = 'lite';
e.theme == 'dark' && (theme = e.theme);
e.cartDir != null && (cartDir = e.cartDir);
var appURL = null;
e.appURL != null && (appURL = e.appURL);
var linkOpenNewWindow = false;
e.linkOpenNewWindow == true && (linkOpenNewWindow = true);
var showSpace = true;
e.showSpace == false && (showSpace = false);
var showProdName = true;
e.showProdName == false && (showProdName = false);
var showPrice = false;
/*Show price option unavailable at the moment*/
//var showPrice = true;
//e.showPrice == false && (showPrice = false);
/*Show price option unavailable at the moment*/
var showIn24H = false;
e.showIn24H == true && (showIn24H = true);
var prodCodeQuery = '';
e.prodCode != null && (prodCodeQuery = '&prodfilter=' + e.prodCode)
var promoCode = '';
e.promoCode != null && (prodCode = '&promotion=' + e.promoCode);
var noAvailText = 'No departure found for the selected product and date.';
e.noAvailText != null && (noAvailText = e.noAvailText);
noAvailText = ' ' + noAvailText + '
';
if (date != undefined) {
defaultDate = ibisISOFormatDate(ibisNZTime(date));
if (callMode == 'directDatePick') {
cursorIndex = 1;
firstVisibleClassSuffix = 1;
}
}
var dataURL = appURL + '/Departures/MultiDayAvail_Json?StartDate=' + defaultDate + '&Days=' + calendarInitialLoadDays + prodCodeQuery + promoCode;
//Begin Body
body = '';
if (widgetInitialDone == false) {
$(containerElement).addClass(theme);
$(containerElement).html('' + prodImage + '
' + prodTitle + '
' + prodDescription + '
')
}
widgetInitialDone = true;
ibisCSS3Spinner('.ibis-multiday-calendar-results');
$.ajax({
url: dataURL,
dataType: 'jsonp',
jsonpCallback: 'ibisCallbackMultiday',
success: function (response) {
//Begin Header
if (response.departures[0].enabled.Rows[0]) {
appDate = moment(ibisNZTime(response.departures[0].enabled.StartDate));
header = ' ';
for (i = 1; i <= response.departures[0].enabled.Rows[0].Departures.length; i++) {
header = header + '' + appDate.format('ddd') + ' ' + appDate.date() + ' ' + appDate.format('MMM') + '
';
appDate = appDate.add(1, 'days');
}
header = header + ' ';
$('body').find('.ibis-multiday-calendar-results').append(header);
//End Header
$.each(response.departures[0].enabled.Rows, function (f) {
showProdName == true ? prodName = '' + response.departures[0].enabled.Rows[f].ProductName + ' ' : prodName = '';
prodTime = response.departures[0].enabled.Rows[f].Time.substring(0, 5);
if (showIn24H == false) {
prodTimeH = prodTime.substring(0, 2);
prodTimeM = prodTime.substring(3, 5);
prodTimeSuffix = 'am';
if (prodTimeH.substring(0, 1) == 0) {
prodTimeH = prodTimeH.substring(1, 2);
} else if (prodTimeH.substring(0, 2) == 12) {
prodTimeSuffix = 'pm';
} else if (prodTimeH.substring(0, 2) > 12) {
prodTimeH = prodTimeH - 12;
prodTimeSuffix = 'pm';
}
prodTime = prodTimeH + ':' + prodTimeM + ' ' + prodTimeSuffix;
}
body = body + prodName + '' + prodTime + ' ';
$.each(response.departures[0].enabled.Rows[f].Departures, function (g, b) {
var c = g + 1,
space = response.departures[0].enabled.Rows[f].Departures[g].BookMsg;
space != null && (space = response.departures[0].enabled.Rows[f].Departures[g].BookMsg.toLowerCase());
prodPrice = response.departures[0].enabled.Rows[f].Departures[g].Pricing;
if (space == 'closed') {
availClass = 'closed';
bookText = 'Closed';
e.closedText != undefined && (bookText = e.closedText);
} else if (space == 'departed') {
availClass = 'departed';
bookText = 'Departed';
e.departedText != undefined && (bookText = e.departedText);
} else if (space == null) {
availClass = 'sold';
bookText = 'Not Available';
} else if (space.substring(0, 1) == 0 || space.substring(0, 1) == '0') {
availClass = 'sold';
bookText = 'Sold Out';
} else {
availClass = 'avail';
bookText = bookLinkText;
}
var url = appURL + '/Booking/New?' + 'DepartureCode=' + b.DepartureKey;
mode == 'iframe' && (url = cartDir + "?ibisifrmdest=" + appURL + '/Booking/New?' + 'DepartureCode=' + b.DepartureKey);
if ($ga != undefined) {
if (url.indexOf('?') > 0) {
url = url + '&_ga=' + $ga;
} else {
url = url + '?_ga=' + $ga;
}
}
var linkTarget = '';
linkOpenNewWindow == true && (linkTarget = ' target="_blank"');
var bookButtonText = space;
space == '1 spaces' && (bookButtonText = '1 space');
showSpace == false && (bookButtonText = bookLinkText);
var bookOutput = '',
prodpriceOutput = '';
(availClass == 'sold' || availClass == 'closed' || availClass == 'departed') && (bookOutput = '' + bookText + '
');
if (showPrice == true) {
prodpriceOutput = '' + prodPrice + '
'
}
var bookButton = prodpriceOutput + bookOutput;
space == 0 && (bookButton = '' + space + "
")
body = body + '' + bookButton + ' ';
})
body = body + ' ';
})
body = body + ' ';
//End Body
} else {
body = noAvailText;
}
$('body').find('.ibis-multiday-calendar-results .ibis-spinner').remove();
$('body').find('.ibis-multiday-calendar-results').append(body);
adjustTableDisplay(additionalMode);
adjustControlArrows();
//Trigger next day if rollover is valid nad defaultDate is null
if (e.rollover != null && e.defaultDate == null) {
var today = ibisNZTime(new Date()),
currentTime = today.getHours() + ':' + today.getMinutes();
if (ibisCompareTimes(currentTime, e.rollover) == true && initialRollOver == false) {
$('.ibis-icons-arrow-forward.active').trigger('click');
initialRollOver = true;
}
}
},
error: function (i, response) {
console.log(i), console.log('**[generateAvailabilityTable()]** errorThrown: ' + response);
}
})
if (e.then != null) {
setTimeout(function () {
e.then();
}, 1000);
}
}
function pikadayInitial(arrDepartures, defaultDatePassed, nextDefaultDate) {
arrDepartures != undefined && (enabledDates = arrDepartures),
defaultDatePassed != undefined && (calendarDefaultDate = ibisISOFormatDate(ibisAddDays(defaultDatePassed, (daysToIncrement * -1) - 1))),
calendarDefaultDate = ibisAddDays(moment(nextDefaultDate).toDate(), -62);
var picker = new Pikaday({
field: document.getElementById('ibis-datepicker-pickaday'),
format: 'D MMM YYYY',
defaultDate: calendarDefaultDate,
setDefaultDate: true,
minDate: moment().toDate(),
maxDate: moment().add(maxMonth, 'month').toDate(),
disableDayFn: function (date) {
if ($.inArray(moment(date).format('YYYY-MM-DD'), enabledDates) === -1) {
return date;
}
},
onSelect: function () {
generateAvailabilityTable(picker.getDate(), 'directDatePick');
}
})
}
$('body').on('click', '.ibis-icons-arrow-forward.active', function () {
if ((cursorIndex + cursorIndexStepBy) > calendarInitialLoadDays) {
nextDate = ibisISOFormatDate(ibisAddDays($('.ibis-multiday-calendar-col14').data('date'), 1));
generateAvailabilityTable(nextDate, 'directDatePick');
//changePikadayDate(nextDate);
cursorIndex = 0;
firstVisibleClassSuffix = 0;
}
$('table.ibis-multiday-calendar-results .ibis-multiday-calendar-col' + (cursorIndex + cursorIndexStepBy)).show();
$('table.ibis-multiday-calendar-results .ibis-multiday-calendar-col' + (cursorIndex)).hide();
cursorIndex++;
firstVisibleClassSuffix++;
adjustControlArrows();
})
$('body').on('click', '.ibis-icons-arrow-back.active', function () {
if ($('.ibis-multiday-calendar-col1').is(':visible')) {
nextDate = ibisISOFormatDate(ibisAddDays($('.ibis-multiday-calendar-col1').data('date'), (calendarInitialLoadDays * -1)));
generateAvailabilityTable(nextDate, 'directDatePick', 'arrowBack');
} else {
$('table.ibis-multiday-calendar-results .ibis-multiday-calendar-col' + (cursorIndex - 1)).show();
$('table.ibis-multiday-calendar-results .ibis-multiday-calendar-col' + (cursorIndex + cursorIndexStepBy - 1)).hide();
}
cursorIndex--;
firstVisibleClassSuffix--;
adjustControlArrows();
})
}
})(jQuery);
}
/* IBIS Membership Widget : v1.2 - 15 April 2022 */
function ibisMembership(e) {
(function ($) {
var containerElement = "",
defaultSettings = [],
formMode = "login",
formSubmitButton = ".ibis-form-button",
isLoggedIn = false,
loginAccount = "",
loginAccountList = [];
checkFormReady = function () {
var $ready = true;
if (ibisMembership.formMode == "login") {
$(".ibis-form-element input").each(function () {
if ($(this).val().length == 0) {
$ready = false;
}
})
} else {
if (!$(ibisMembership.formSubmitButton).hasClass("password-reset-lock")) {
$(".ibis-membership-username").val().length > 0 && ($ready = true);
} else {
$ready = false;
}
}
if ($ready == true) {
$(ibisMembership.formSubmitButton).prop("disabled", false);
} else {
$(ibisMembership.formSubmitButton).prop("disabled", true);
}
}
ibisMembership.checkFormReady = checkFormReady;
checkLoginStatus = function () {
var dataURL = ibisMembership.defaultSettings.appURL + "/Membership/Json_LoginName";
$.ajax({
url: dataURL,
dataType: 'jsonp',
jsonpCallback: 'membershipLogin',
success: function (response) {
$('.ibis-form-error').remove();
if (response.Login[0].name != undefined && response.Login[0].name != "") {
ibisMembership.isLoggedIn = true;
ibisMembership.loginAccount = response.Login[0].name;
ibisMembership.setAccountWidget(ibisMembership.loginAccount);
} else {
ibisMembership.isLoggedIn = false;
$('.membership-login-button').addClass('active');
}
},
error: function (response) {
console.log(i), console.log('**[checkLoginStatus()]** errorThrown: ' + response);
}
})
}
ibisMembership.checkLoginStatus = checkLoginStatus;
checkWidgetSetup = function (settings) {
containerElement = '.ibis-widget-membership:eq(0)';
/* Error handling - check set-up errors and throw error in the console */
if (settings.container != null) {
containerElement = settings.container + ':eq(0)';
ibisSetupErrorCheck(settings.container);
} else {
ibisSetupErrorCheck('.ibis-widget-membership');
}
ibisOptionErrorCheck(settings.appURL, settings.cartDir, settings.mode);
}
ibisMembership.checkWidgetSetup = checkWidgetSetup;
launchMembershipWidget = function (settings) {
ibisMembership.defaultSettings = settings;
ibisMembership.checkWidgetSetup(settings);
ibisMembership.setModalForm(settings);
ibisMembership.setLoginButton(settings);
ibisMembership.mobileViewHandling(settings);
ibisMembership.checkLoginStatus();
ibisMembership.setEvents(1);
}
ibisMembership.launchMembershipWidget = launchMembershipWidget;
logoutWidget = function (settings) {
var dataURL = ibisMembership.defaultSettings.appURL + "/Membership/logout";
$.ajax({
url: dataURL,
dataType: 'jsonp',
success: function (response) {
console.log('logged out');
},
error: function (response) {
console.log(response);
}
})
$(containerElement).removeClass("loggedin");
ibisMembership.setModalForm(settings);
ibisMembership.setLoginButton(settings);
ibisMembership.setEvents(1);
$('.membership-login-button').addClass('active');
}
ibisMembership.logoutWidget = logoutWidget;
hideOverlay = function () {
$(".ibis-overlay").addClass("invisible");
setTimeout(function () {
$(".ibis-overlay").removeClass("visible invisible");
if (!$('.multiple-accounts').hasClass('multiple-accounts')) {
$(".ibis-overlay input").val("");
$(".ibis-overlay input[data-type-orig='password']").attr("type", "password");
$(".ibis-overlay .ibis-input-visible").removeClass("active");
$(".ibis-form-element.invalid label").text("Email address");
$(".ibis-form-element").removeClass("focus invalid");
$(".ibis-form-button").prop("disabled", true);
$('.ibis-form-error, .ibis-form-message').remove();
ibisMembership.resetForm();
}
}, 280);
}
ibisMembership.hideOverlay = hideOverlay;
mobileViewHandling = function (settings) {
var doResize = function () {
if (window.innerWidth <= settings.mobileViewThreshold) {
$('.ibis-account-wrapper .ibis-widget-account').addClass('small');
} else {
$('.ibis-account-wrapper .ibis-widget-account').removeClass('small');
}
}
doResize();
if (settings.mobileViewThreshold != undefined) {
$(window).on('resize', function () {
doResize();
})
}
}
ibisMembership.mobileViewHandling = mobileViewHandling;
resetForm = function () {
$(".ibis-form-membership").removeClass("form-membership-reset-password").addClass("form-membership-login").attr("action", ibisMembership.defaultSettings.appURL + "/Membership/Login_JSON");
$(".ibis-form-header").text("Membership Login");
$(".ibis-membership-password").closest(".ibis-form-element").slideDown(50).prop("disabled", false);
$(".ibis-forgotten-password").text("Forgotten password?").removeClass("back-to-login");
$(".ibis-form-button").text("Login");
ibisMembership.formMode = "login";
ibisMembership.setEvents = setEvents(1);
}
ibisMembership.resetForm = resetForm;
showAccountMenu = function () {
var menuShow = function () {
$(".ibis-widget-account-menu").slideDown(120);
$(".ibis-widget-account").addClass("active");
}
var menuHide = function () {
$(".ibis-widget-account-menu").slideUp(30);
setTimeout(function () {
$(".ibis-widget-account").removeClass("active");
}, 120);
}
$(".ibis-widget-account").hasClass("active") ? menuHide() : menuShow();
}
ibisMembership.showAccountMenu = showAccountMenu;
setAccountWidget = function (accountName) {
var displayName = accountName,
linkMembership = ibisMembership.defaultSettings.appURL + "/Membership/List",
linkDetails = ibisMembership.defaultSettings.appURL + "/Membership/MyDetails",
$ga = ibisGetVariables()['_ga'];
if (ibisMembership.defaultSettings.mode == "iframe" && ibisMembership.defaultSettings.cartDir != undefined) {
linkMembership = ibisMembership.defaultSettings.cartDir + "?ibisifrmdest=" + ibisMembership.defaultSettings.appURL + "/Membership/List";
linkDetails = ibisMembership.defaultSettings.cartDir + "?ibisifrmdest=" + ibisMembership.defaultSettings.appURL + "/Membership/MyDetails";
if ($ga != undefined) {
linkMembership += "&_ga=" + $ga;
linkDetails += "&_ga=" + $ga;
}
}
var linkTarget = "_self";
ibisMembership.defaultSettings.linkOpenNewWindow == true && (linkTarget = "_blank");
ibisMembership.defaultSettings.greeting != undefined && (displayName = ibisMembership.defaultSettings.greeting + ' ' + accountName);
$('.ibis-membership-login').addClass('multiple-accounts');
ibisMembership.hideOverlay();
$('.ibis-widget-membership').addClass('loggedin').html('');
ibisMembership.setEvents(2);
}
ibisMembership.setAccountWidget = setAccountWidget;
setEvents = function (stage) {
switch (stage) {
case 1:
$(".ibis-widget-membership").off("click").on("click", function () {
if (!$(this).hasClass("loggedin")) {
ibisMembership.showOverlay();
}
})
$(".ibis-form-close").off("click").on("click", function () {
ibisMembership.hideOverlay();
})
$(".ibis-form-element label").off("click").on("click", function () {
$(this).closest(".ibis-form-element").find("input").focus();
})
$(".ibis-form-element input").off("focus").on("focus", function () {
$(this).closest(".ibis-form-element").addClass("focus");
})
$(".ibis-form-element input").off("blur").on("blur", function () {
if ($(this).val().length == 0) {
$(this).closest(".ibis-form-element").removeClass("focus");
}
})
$(".ibis-form-element input").off("keyup touchend").on("keyup touchend", function () {
ibisMembership.checkFormReady();
})
$(".ibis-input-visible").off("click").on("click", function () {
if ($(this).hasClass("active")) {
$(this).removeClass("active");
$(this).closest(".ibis-form-element").find("input").attr("type", "password");
} else {
$(this).addClass("active");
$(this).closest(".ibis-form-element").find("input[type='password']").attr("type", "text").attr("data-type-orig", "password");
}
})
$(".ibis-forgotten-password").off("click").on("click", function () {
$('.ibis-form-error, .ibis-form-message').remove();
if ($(this).hasClass("back-to-login")) {
ibisMembership.resetForm();
} else {
ibisMembership.setForgottenPasswordForm();
}
})
$(ibisMembership.formSubmitButton).off("click").on("click", function (e) {
ibisMembership.validateEmail(".ibis-membership-username");
e.preventDefault();
})
break;
case 2:
ibisMembership.mobileViewHandling(ibisMembership.defaultSettings);
$(".ibis-account-wrapper").off("click touchend").on("click touchend", function () {
ibisMembership.showAccountMenu();
})
$(".my-logout").off("click").on("click", function () {
setTimeout(function () {
ibisMembership.logoutWidget(ibisMembership.defaultSettings);
}, 100);
})
break;
case 3:
$(".multi-account-list li a").off("click").on("click", function (e) {
e.preventDefault();
var $this = $(this);
var dataURL = ibisMembership.defaultSettings.appURL + "/Membership/SetLogin?loginHash=" + $this.data("hash");
jQuery.ajax({
url: dataURL,
dataType: 'jsonp',
jsonpCallback: '',
success: function (response) {
ibisMembership.setAccountWidget($this.data("name"));
if (ibisMembership.defaultSettings.then != null) {
setTimeout(function () {
ibisMembership.defaultSettings.then();
}, 1000);
}
},
error: function (response) {
ibisMembership.setAccountWidget($this.data("name"));
if (ibisMembership.defaultSettings.then != null) {
setTimeout(function () {
ibisMembership.defaultSettings.then();
}, 1000);
}
}
})
})
break;
}
}
ibisMembership.setEvents = setEvents;
setForgottenPasswordForm = function () {
$(".ibis-form-membership").removeClass("form-membership-login").addClass("form-membership-reset-password");
$(".ibis-form-membership").attr("action", ibisMembership.defaultSettings.appURL + "/Membership/PasswordRequestChange");
$(".ibis-form-header").text("Forgotten Password");
$(".ibis-membership-password").closest(".ibis-form-element").slideUp(50).prop("disabled", true);
$(".ibis-forgotten-password").text("Back to login form").addClass("back-to-login");
$(".ibis-form-button").text("Send");
ibisMembership.formMode = "password";
}
ibisMembership.setForgottenPasswordForm = setForgottenPasswordForm;
setMultipleAccountSelection = function () {
$('.ibis-membership-login').addClass('multiple-accounts');
$('.ibis-form-element').hide();
$('.ibis-form-header').text('Select Your Account');
var $message = 'Multiple accounts found under this email address. Please select who you wish to login as.
';
$('.ibis-form-text').addClass('text-left').html($message);
ibisMembership.setEvents(3);
}
ibisMembership.setMultipleAccountSelection = setMultipleAccountSelection;
setLoginButton = function (settings) {
var theme = "lite";
ibisMembership.defaultSettings.theme == "dark" && (theme = "dark");
$(containerElement).addClass('ibis-widgets ' + theme);
if (settings.type != undefined && settings.type == 'icon') {
$(containerElement).addClass('login-icon').html('
');
} else {
var buttonText = 'Membership Login',
showIconClass = '';
settings.widgetButtonText != undefined && (buttonText = settings.widgetButtonText);
settings.showIcon == true && (showIconClass = ' show-icon');
showIconClass += ' active';
$(containerElement).html('' + buttonText + '
');
}
settings.theme == 'lite' && (containerElement.addClass('lite'));
}
ibisMembership.setLoginButton = setLoginButton;
setModalForm = function (settings) {
$(".ibis-overlay").remove();
var header = 'Membership Login',
text = '',
forgottenPasswordText = 'Forgotten password?',
loginButtonText = 'Login',
passwordResetURL = '/Membership/PasswordRequestChange';
settings.formHeader != undefined && (header = settings.formHeader);
settings.formText != undefined && (text = settings.formText);
settings.forgottenPasswordText != undefined && (forgottenPasswordText = settings.forgottenPasswordText);
settings.loginButtonText != undefined && (loginButtonText = settings.loginButtonText);
$("body").prepend('');
}
ibisMembership.setModalForm = setModalForm;
showOverlay = function () {
$(".ibis-overlay").addClass("visible");
setTimeout(function () {
$(".ibis-overlay input:eq(0)").focus();
}, 280);
}
ibisMembership.showOverlay = showOverlay;
submitForm = function () {
failedLogin = function () {
$('.ibis-form-error').remove();
$('.ibis-form-header').after('Invalid email address and/or password
');
}
passwordReset = function () {
var $email = $('.ibis-membership-username').val();
$('.ibis-form-message').remove();
$('.ibis-membership-username').val("");
$('.ibis-form-header').after('Password reset email has been sent to ' + $email + '. Please check your inbox
');
$(ibisMembership.formSubmitButton).addClass("password-reset-lock").prop("disabled", true);
setTimeout(function () {
$(ibisMembership.formSubmitButton).removeClass("password-reset-lock").prop("disabled", false);
}, 30000)
}
if ($('.ibis-form-membership').hasClass('form-membership-login')) {
$(ibisMembership.formSubmitButton).addClass("loading");
var $form = $('.form-membership-login'),
$u = $('.ibis-membership-username').val(),
$p = $('.ibis-membership-password').val(),
dataURL = $form.attr('action') + '?emailAddress=' + $u + '&password=' + $p;
$.ajax({
url: dataURL,
dataType: 'jsonp',
jsonpCallback: 'membershipLogin',
success: function (response) {
$('.ibis-form-error').remove();
if (response.login[0].loggedin == "true") {
if (response.login.length > 1) {
ibisMembership.loginAccountList = response.login;
ibisMembership.setMultipleAccountSelection();
} else {
ibisMembership.setAccountWidget(response.login[0].name);
}
} else {
failedLogin();
}
$(ibisMembership.formSubmitButton).removeClass("loading");
},
error: function (response) {
failedLogin();
$(ibisMembership.formSubmitButton).removeClass("loading");
}
})
} else {
$(ibisMembership.formSubmitButton).addClass("loading");
var $form = $('.form-membership-reset-password'),
$u = $('.ibis-membership-username').val(),
dataURL = $form.attr('action') + '?email=' + $u;
$.ajax({
data: $form.serialize(),
type: $form.attr('method'),
url: dataURL,
success: function (response) {
passwordReset();
$(ibisMembership.formSubmitButton).removeClass("loading");
},
error: function (response) {
passwordReset();
$(ibisMembership.formSubmitButton).removeClass("loading");
}
})
}
}
ibisMembership.submitForm = submitForm;
validateEmail = function (element) {
var $email = $(element).val();
validEmail = function (element) {
$(element).closest(".ibis-form-element").removeClass("invalid");
$(element).closest(".ibis-form-element").find("label").text("Email address");
$(ibisMembership.formSubmitButton).prop("disabled", false);
$(ibisMembership.formSubmitButton).closest("form").addClass("validated");
}
invalidEmail = function (element) {
$(element).closest(".ibis-form-element").addClass("invalid");
$(element).closest(".ibis-form-element").find("label").text("Invalid email address");
$(ibisMembership.formSubmitButton).prop("disabled", true);
$(ibisMembership.formSubmitButton).closest("form").removeClass("validated");
}
if (ibisEmailValidation($email) == false) {
invalidEmail(element);
$(element).off("keyup touchend").on("keyup touchend", function () {
$email = $(this).val();
if (ibisEmailValidation($email) == false) {
invalidEmail(element);
} else {
validEmail(element);
}
})
} else {
validEmail(element);
switch (ibisMembership.formMode) {
case "login":
ibisMembership.submitForm();
break;
case "password":
ibisMembership.submitForm();
break;
default:
ibisMembership.hideOverlay();
}
}
}
ibisMembership.validateEmail = validateEmail;
ibisMembership.defaultSettings = defaultSettings;
ibisMembership.formMode = formMode;
ibisMembership.isLoggedIn = isLoggedIn;
ibisMembership.formSubmitButton = formSubmitButton;
ibisMembership.loginAccount = loginAccount;
ibisMembership.loginAccountList = loginAccountList;
ibisMembership.launchMembershipWidget(e);
})(jQuery);
}
/* IBIS Dual Calendar Widget : v1.2 - 20 October 2022 : Dependancies : IBIS Departures Widget, IBIS Calendar Widget */
/* Requires FIT6 2021 Dev 1 */
function ibisDualCalendar(e) {
var containerElement = '.ibis-widget-dual-calendar:eq(0)';
currentDateId = 0,
currentSlide = 0,
dateWeekWidth = "",
departureCode = "",
departureDate = ibisISOFormatDate(new Date()),
defaultSettings = [],
fadeSliderTimeout = 0,
monthLabelAnimationInterval = "",
monthLabelAnimationTimeout = "",
newSt = "",
prodCode = "",
step2Init = false,
stripCalendarMoveCount = "",
stripCalendarSlideDirc = "",
timeColW = "",
timeCopyHalfWidth = "";
e.prodCode != undefined && (prodCode = e.prodCode);
function backToMonthView() {
ibisDualCalendar.step2Init = false;
$(".ibis-widget-dual-calendar .step2").slideUp(150, function () {
$(".ibis-widget-dual-calendar .step2").remove();
$(".ibis-widget-dual-calendar .step1").fadeIn(80);
});
}
ibisDualCalendar.backToMonthView = backToMonthView;
function callNewDepartures() {
$(ibisDualCalendar.containerElement + ' .ibis-widget-month-calendar').pignoseCalendar('set', ibisDualCalendar.defaultSettings.defaultDate);
ibisCSS3Spinner(ibisDualCalendar.containerElement + " .ibis-widget-departures-dual");
ibisDualCalendar.populateDepartures(ibisDualCalendar.containerElement + " .ibis-widget-departures-dual", "datechange");
}
ibisDualCalendar.callNewDepartures = callNewDepartures;
function checkWidgetSetup(settings) {
/* Error handling - check set-up errors and throw error in the console */
settings.container != null && (ibisDualCalendar.containerElement = settings.container + ':eq(0)');
ibisSetupErrorCheck(ibisDualCalendar.containerElement);
ibisOptionErrorCheck(settings.appURL, settings.cartDir, settings.mode);
}
ibisDualCalendar.checkWidgetSetup = checkWidgetSetup;
function dateAnimation(mode) {
/* CLEAR THE CURRENT SLIDER IF IT EXISTS */
try {
$(".week-calendar-container .date-weeks").slick('unslick');
} catch (e) {
}
var isDraggable = true;
/* CREATE A NEW SLIDER */
$(".week-calendar-container .date-weeks").slick({
dots: false,
speed: 500,
initialSlide: currentSlide,
touchThreshold: 10,
autoplay: false,
draggable: isDraggable,
infinite: false,
prevArrow: $(".ibis-widget-week-calendar .left-arrow"),
nextArrow: $(".ibis-widget-week-calendar .right-arrow")
});
$(".week-calendar-container .date-weeks").on('beforeChange', function (event, slick, currentSlide, nextSlide) {
if (nextSlide == 0) {
$(".week-calendar-container .left-arrow").addClass("disabled");
} else {
$(".week-calendar-container .left-arrow").removeClass("disabled");
}
clearTimeout(monthLabelAnimationTimeout);
clearInterval(monthLabelAnimationInterval);
if (Math.abs(nextSlide - currentSlide) == 1) {
stripCalendarSlideDirc = (nextSlide - currentSlide > 0) ? "right" : "left";
}
else {
stripCalendarSlideDirc = (nextSlide - currentSlide > 0) ? "left" : "right";
}
stripCalendarSlideDirc == "left" ? stripCalendarMoveCount-- : stripCalendarMoveCount++;
mode != undefined ? setTimeout(function () { ibisDualCalendar.setMoveControl() }, 300) : ibisDualCalendar.setMoveControl();
/* TRACK THE MONTH LABEL AT 30 FPS */
monthLabelAnimationInterval = setInterval(monthLabelAnimation, 33);
/* STOP THE MONTH LABEL ANIMATION INTERVAL AFTER 2 SECONDS */
monthLabelAnimationTimeout = setTimeout(function () {
clearInterval(monthLabelAnimationInterval);
}, 2000);
});
$(".week-calendar-container .date-weeks").on('afterChange', function (event, slick, currentSlide) {
currentSlide = currentSlide;
/* STOP THE MONTH LABEL ANIMATION INTERVAL */
clearTimeout(monthLabelAnimationTimeout);
clearInterval(monthLabelAnimationInterval);
ibisDualCalendar.monthLabelAnimation();
});
/* FADE THE SLIDER IN ON CREATION - INSTEAD OF JUST GLITCHING IN */
clearTimeout(fadeSliderTimeout);
fadeSliderTimeout = setTimeout(function () {
$(".week-calendar-container .date-weeks").addClass("transition-in");
}, 200);
}
ibisDualCalendar.dateAnimation = dateAnimation;
function destroyWidget() {
$(ibisDualCalendar.containerElement).empty();
}
ibisDualCalendar.destroyWidget = destroyWidget;
function getProductCodes(prodCode) {
var jsonURL = e.appURL + "/Departures/Json_AddOns?date=" + ibisISOFormatDate(ibisNZTime(ibisDualCalendar.departureDate)) + "&prodGroup=" + prodCode;
ibisConsoleLog(jsonURL);
}
ibisDualCalendar.getProductCodes = getProductCodes;
function monthLabelAnimation() {
var timeCopyContainer = $(".week-calendar-container");
/* TRACKS 2 REFERENCE POINTS FOR EACH MONTH LABEL TO WORK OUT WHERE TO POSITION IT */
var firstSlideDateMonth = new Date($(".slick-slide .row .col").first().data("date")).getMonth();
var todayDateMonth = ibisNZTime().getMonth();
var thisYear = $(".month-labels .month-label").first().attr("data-year");
var i = 0;
$(".month-labels .month-label").each(function () {
/* LOOP THROUGH EACH MONTH LABEL */
if (i != 0 && i != ($(".month-labels .month-label").length - 1)) {
var month = $(this).attr("data-id");
var monthNameToNum = (("janfebmaraprmayjunjulaugsepoctnovdec").indexOf(month) / 3);
var monthNum = (monthNameToNum + 1).toString();
monthNum < 10 && (monthNum = "0" + monthNum);
var year = $(this).attr("data-year");
var testX = 0;
var maxX = 0;
var newX = 0;
var fullday = ibisNZTime(new Date(year, monthNameToNum, 1));
var nextMonth = ibisAddMonths(fullday, 1);
if ($(".date-weeks .row .col[data-date='" + year + "-" + monthNum + "-01']").offset() != undefined) {
testX = $(".date-weeks .row .col[data-date='" + year + "-" + monthNum + "-01']").offset().left;
}
var lastMonth = new Date(nextMonth.getFullYear(), (nextMonth.getMonth()), 0);
var lastMonthLastDate = lastMonth.getDate().toString();
lastMonthLastDate < 10 && (lastMonthLastDate = "0" + lastMonthLastDate);
var lastMonthMonthNum = (lastMonth.getMonth() + 1).toString();
lastMonthMonthNum < 10 && (lastMonthMonthNum = "0" + lastMonthMonthNum);
var lastMonthYear = lastMonth.getFullYear();
if ($(".date-weeks .row .col[data-date='" + lastMonthYear + "-" + lastMonthMonthNum + "-" + lastMonthLastDate + "']").offset() != undefined) {
maxX = $(".date-weeks .row .col[data-date='" + lastMonthYear + "-" + lastMonthMonthNum + "-" + lastMonthLastDate + "']").offset().left;
}
var widthAdjustment = 80;
window.innerWidth < 501 && (widthAdjustment = 40);
newX = Math.floor(Math.max(testX + (timeColW / 2) - timeCopyContainer.offset().left, timeCopyHalfWidth)) - widthAdjustment;
if (newX <= Math.floor(timeCopyHalfWidth)) {
newX = Math.min(maxX + (timeColW / 2) - timeCopyContainer.offset().left, timeCopyHalfWidth) - widthAdjustment;
}
/* TWEEN TO NEW POSITION */
TweenMax.to($(this), 0.2, { x: newX, overwrite: true, ease: Expo.easeOut });
};
i++;
});
/* FIRST MONTH START + END SET UP - FIRST MONTH NOT NECESSARILY STARTS ON 1ST OF THE MONTH */
var $thisMonth = $(".month-labels .month-label:eq(0)");
var thisMonthNum = new Date(Date.parse("1 " + $thisMonth.data("id") + " " + $thisMonth.data("year"))).getMonth();
var lastDayOfThisMonth = new Date($thisMonth.data("year"), thisMonthNum + 1, 0);
testX = $(".date-weeks .row .col:eq(0)").offset().left;
if ($(".date-weeks .row .col[data-date='" + ibisISOFormatDate(lastDayOfThisMonth) + "']").length === 0) {
maxX = testX;
} else {
maxX = $(".date-weeks .row .col[data-date='" + ibisISOFormatDate(lastDayOfThisMonth) + "']").offset().left;
}
newX = Math.floor(Math.max(testX + (timeColW / 2) - timeCopyContainer.offset().left, timeCopyHalfWidth)) - 80;
if (newX <= Math.floor(timeCopyHalfWidth)) {
newX = Math.min(maxX + (timeColW / 2) - timeCopyContainer.offset().left, timeCopyHalfWidth) - 80;
}
/* TWEEN TO NEW POSITION */
TweenMax.to($thisMonth, 0.2, { x: newX, overwrite: true, ease: Expo.easeOut });
/* LAST MONTH START + END SET UP - FIRST MONTH NOT NECESSARILY STARTS ON 1ST OF THE MONTH */
var $thisMonth = $(".month-labels .month-label:last");
var thisMonthNum = new Date(Date.parse("1 " + $thisMonth.data("id") + " " + $thisMonth.data("year"))).getMonth();
var firstDayOfThisMonth = new Date($thisMonth.data("year"), thisMonthNum, 1);
testX = $(".date-weeks .row .col[data-date='" + ibisISOFormatDate(firstDayOfThisMonth) + "']").offset().left;
maxX = $(".date-weeks .row .col:last").offset().left;
newX = Math.floor(Math.max(testX + (timeColW / 2) - timeCopyContainer.offset().left, timeCopyHalfWidth)) - 80;
if (newX <= Math.floor(timeCopyHalfWidth)) {
newX = Math.min(maxX + (timeColW / 2) - timeCopyContainer.offset().left, timeCopyHalfWidth) - 80;
}
/* TWEEN TO NEW POSITION */
TweenMax.to($thisMonth, 0.2, { x: newX, overwrite: true, ease: Expo.easeOut });
}
ibisDualCalendar.monthLabelAnimation = monthLabelAnimation;
function launchDualCalendar(settings) {
ibisDualCalendar.destroyWidget();
if (prodCode.toLowerCase().indexOf("prodgroup-") > -1) {
ibisDualCalendar.getProductCodes(prodCode);
ibisDualCalendar.launchDualCalendarNextStep(settings);
} else {
ibisDualCalendar.launchDualCalendarNextStep(settings);
}
}
ibisDualCalendar.launchDualCalendar = launchDualCalendar;
function launchDualCalendarNextStep(settings) {
ibisDualCalendar.defaultSettings = settings;
ibisDualCalendar.checkWidgetSetup(settings);
ibisDualCalendar.setContainer();
ibisCSS3Spinner(ibisDualCalendar.containerElement + ' .ibis-widget-month-calendar');
ibisDualCalendar.pureMilfordCustom(ibisDualCalendar.containerElement, 1);
e.dualCalendar = true;
ibisCalendarWidget(e);
}
ibisDualCalendar.launchDualCalendarNextStep = launchDualCalendarNextStep;
function launchScreen2(settings) {
ibisDualCalendar.departureDate = settings.defaultDate;
ibisDualCalendar.setElements(settings);
ibisDualCalendar.setMonthLabels();
ibisDualCalendar.populateCalendar();
ibisDualCalendar.dateAnimation("init");
ibisDualCalendar.resizeCalendar();
ibisDualCalendar.monthLabelAnimation();
stripCalendarMoveCount = 1;
ibisDualCalendar.processCalendar();
ibisDualCalendar.selectDate(ibisDualCalendar.departureDate);
ibisDualCalendar.setEvents();
ibisDualCalendar.defaultSettings = settings;
}
ibisDualCalendar.launchScreen2 = launchScreen2;
function populateCalendar() {
$(".ibis-widget-dual-calendar .ibis-widget-month-calendar.step1").fadeOut(150);
var fistDayOfMonth = ibisNZTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)),
today = ibisNZTime(),
thisDate = today,
/* CONVERTING thisDate TO NEAREST MONDAY FOR THE SLIDING CALENDAR */
thisDate = ibisAddDays(today, 1 - today.getDay()),
thisMonth = thisDate.getMonth(),
thisDay = thisDate.getDate(),
yearLater = ibisAddMonths(today, 12),
dateDiff = Math.floor((yearLater - today) / (1000 * 60 * 60 * 24)),
numWeeks = Math.floor(dateDiff / 7) + 1,
dataID = "",
dataDate = "",
oldDateClass = "",
calendarContent = "",
calendarMonthLabels = "",
calendarLightboxMonths = "",
cutOffToday = ibisNZTime(),
currentYear = (new Date().getFullYear()),
yearClass = "";
for (i = 0; i < 12; i++) {
var monthName = "",
monthYear = "";
if (ibisAddMonths(new Date(), i + 1).getFullYear() != currentYear) {
yearClass = " last-month";
currentYear = currentYear + 1;
}
monthName = ibisGetMonthName(ibisAddMonths(new Date(), i)).substring(0, 3);
monthNameShort = monthName.substr(0, 3);
monthYear = ibisAddMonths(new Date(), i).getFullYear();
calendarMonthLabels += '' + monthNameShort + ' ' + monthYear + '
';
calendarLightboxMonths += '' + monthName + ' ' + monthYear + '
';
yearClass = "";
}
$(".week-calendar-wrapper .week-calendar-container .box .month-labels").html(calendarMonthLabels);
$("#months-lightbox .month-items").html(calendarLightboxMonths);
for (i = 1, j = 1; i < dateDiff; i++, j++) {
thisMonth = thisDate.getMonth();
thisDay = thisDate.getDate();
monthName = ibisGetMonthName(thisDate);
monthName = monthName.substring(0, 3);
dayName = ibisGetDayName(thisDate);
dayNameShort = dayName.substring(0, 3);
dataID = monthName.toLowerCase() + "-" + thisDay;
dataDate = ibisISOFormatDate(thisDate);
dataTitle = dayNameShort.toLowerCase() + ', ' + thisDay + ' ' + monthName.toLowerCase() + ' ' + thisDate.getFullYear();
oldDateClass = (thisDate >= cutOffToday) ? "" : " old disabled";
if (j == 1) {
calendarContent += ""
}
calendarContent += "
" + monthName + "
" + thisDay + "
";
if (j == 7 || i == (dateDiff - 1)) {
calendarContent += "
";
j = 0;
}
thisDate = ibisAddDays(thisDate, 1);
}
$(".week-calendar-wrapper .week-calendar-container .box .date-weeks").html(calendarContent);
}
ibisDualCalendar.populateCalendar = populateCalendar;
function populateDepartures(element, mode) {
ibisDualCalendar.pureMilfordCustom(element + " .ibis-widget-departures-dual", 2);
setTimeout(function () {
$(element + " .ibis-widget-departures-dual").empty();
ibisCSS3Spinner(element + " .ibis-widget-departures-dual");
var jsonURL = e.appURL + "/Departures/Json_TimeDepartures?date=" + ibisDualCalendar.defaultSettings.defaultDate + "&prodCodes=" + prodCode;
ibisConsoleLog(jsonURL);
$.ajax({
type: "GET",
url: jsonURL,
dataType: "jsonp",
jsonpCallback: "listDepartures",
cache: false,
success: function (response) {
var $header = "",
$output = "",
$target = "",
$departTime = "",
$departTimePeriod = "",
$departTimeDisplay = "",
$discountPriceDisplay = "",
$discountClass = "",
$discountPriceCount = 0;
for (i = 0; i < response.departures.availability.length; i++) {
if (response.departures.availability[i].status == "closed") {
$output += '' + response.departures.availability[i].avail + '
';
} else {
$departTime = parseInt(response.departures.availability[i].depart.substr(0, 2), 10) > 12 ? parseInt(response.departures.availability[i].depart.substr(0, 2), 10) - 12 : parseInt(response.departures.availability[i].depart.substr(0, 2), 10);
$departTimeDisplay = $departTime + response.departures.availability[i].depart.substr(2, 3);
$departTimePeriod = response.departures.availability[i].depart.substr(0, 2) > 11 ? "pm" : "am";
$returnTime = "";
$returnTimeDisplay = "";
$returnTimePeriod = "";
if (response.departures.availability[i].return != "") {
$returnTime = parseInt(response.departures.availability[i].return.substr(0, 2), 10) > 12 ? parseInt(response.departures.availability[i].return.substr(0, 2), 10) - 12 : parseInt(response.departures.availability[i].return.substr(0, 2), 10);
$returnTimeDisplay = $returnTime + response.departures.availability[i].return.substr(2, 3);
$returnTimePeriod = response.departures.availability[i].return.substr(0, 2) > 11 ? "pm" : "am";
}
$output += '' + $departTimeDisplay + '' + $departTimePeriod + '
' + $returnTimeDisplay + '' + $returnTimePeriod + '
' + response.departures.availability[i].avail + '
$' + parseInt(response.departures.availability[i].promoPrice, 10).toFixed(0) + '
';
}
}
$header = '';
$output += 'Book your trip
';
mode != undefined ? $target = element : $target = element + " .ibis-widget-departures-dual";
$($target).html($header + $output);
$(".ibis-widget-departures-dual .departures-dual-items").off("click").on("click", function () {
if (!$(this).hasClass("disabled")) {
$(".ibis-widget-departures-dual .departures-dual-items").removeClass("active");
$(this).addClass("active");
$(this).closest(".ibis-widget-departures-dual").find(".departures-dual-book-now").prop("disabled", false);
}
})
/* AUTO SELECT DEPARTURE IF THERE'S ONLY ONE */
i == 1 && ($(".ibis-widget-departures-dual .departures-dual-items").eq(0).trigger("click"));
$(".departures-dual-book-now").off("click").on("click", function () {
var $departureCode = $(".ibis-widget-departures-dual .departures-dual-items.active").data("departure-code");
location.href = e.appURL + "/PureMilford?departureCode=" + $departureCode;
})
},
error: function (jXHR, textStatus, errorThrown) {
console.error("JSON load error: Time Slots");
console.log(jXHR);
}
});
}, 10)
}
ibisDualCalendar.populateDepartures = populateDepartures;
function processCalendar(movement) {
var mode = "init",
calStart = ibisAddDays(ibisNZTime(ibisDualCalendar.departureDate), (-13 - ibisNZTime(ibisDualCalendar.departureDate).getDay()));
/* NEED TO GET THE DATA FROM TWO WEEKS AGO MONDAY - JUST TO COVER SOME LITTLE BACKS AND FORWARDS */
if (typeof movement == typeof undefined) {
calStart = ibisAddDays(ibisNZTime(ibisDualCalendar.departureDate), (-13 - ibisNZTime(ibisDualCalendar.departureDate).getDay()));
} else {
calStart = ibisAddDays(calStart, movement);
mode = "slide";
}
calStart = ibisISOFormatDate(calStart);
/* RESET CALENDAR IF INIT */
if (mode == "init") {
$(".ibis-widget-week-calendar .date-weeks .col").addClass("disabled");
$(".ibis-widget-week-calendar .date-weeks .col .price").html("");
}
var $variable = "prodCodes=" + prodCode;
prodCode.toLowerCase().indexOf("prodgroup-") > -1 && ($variable = "prodGroup=" + prodCode.replace("prodgroup-", ""));
var contents = [],
contentsTemp = "",
contentsDisplay = "",
oldDateClass = "",
jsonURL = ibisDualCalendar.defaultSettings.appURL + "/Departures/Json_TimeCalendar?date=" + calStart + "&" + $variable;
ibisConsoleLog(jsonURL);
setTimeout(function () {
$.ajax({
type: "GET",
url: jsonURL,
dataType: "jsonp",
jsonpCallback: "listAvailableDates",
cache: false,
success: function (response) {
for (i = 0; i < response.dates.calendar.length; i++) {
if (parseInt(response.dates.calendar[i].price) > 0) {
$(".ibis-widget-week-calendar .date-weeks .col[data-date='" + response.dates.calendar[i].date + "']").addClass("processed").removeClass("disabled");
$(".ibis-widget-week-calendar .date-weeks .col[data-date='" + response.dates.calendar[i].date + "'] .price").text("$" + response.dates.calendar[i].price);
} else {
$(".ibis-widget-week-calendar .date-week .col[data-date=" + response.dates.calendar[i].date + "]").addClass("no-depart");
$(".ibis-widget-week-calendar .date-week .col[data-date=" + response.dates.calendar[i].date + "] .price").text("");
}
}
if (mode == "init") {
$(".ibis-widget-week-calendar .date-weeks").removeClass("transition-in");
}
$(".ibis-widget-week-calendar .date-weeks").removeClass("transition-in");
ibisDualCalendar.monthLabelAnimation();
},
error: function (jXHR, textStatus, errorThrown) {
console.error("JSON load error: Week Calendar");
console.log(jXHR);
},
});
}, 500)
}
ibisDualCalendar.processCalendar = processCalendar;
function resizeCalendar() {
dateWeekWidth = $(".ibis-widget-month-calendar .date-weeks").width();
timeColW = Math.floor(($(".ibis-widget-week-calendar .week-calendar-container").width() - 80) * 0.1428);
timeCopyHalfWidth = $(".ibis-widget-week-calendar .week-calendar-container").width() / 2;
}
ibisDualCalendar.resizeCalendar = resizeCalendar;
function selectDate(selectedDate) {
/* INSTANTLY CHANGE SLIDER TO THE LATEST SELECTED DATE */
$(".week-calendar-container .date-weeks").slick("slickSetOption", "speed", "0");
/* PRESELECT CALENDAR WIDGET */
$(".ibis-widget-month-calendar .pignose-calendar-row .pignose-calendar-unit").each(function () {
$(this).removeClass("pignose-calendar-unit-active");
if ($(this).attr("data-date") == selectedDate) {
$(this).addClass("pignose-calendar-unit-active");
}
});
var slideNum = 0;
/* PRESELECT DEPARTURE TIME ARROWS SECTION */
$(".ibis-widget-week-calendar .date-weeks .col").each(function () {
$(this).removeClass("selected");
if ($(this).attr("data-date") == selectedDate) {
slideNum = $(this).parent().parent().attr("data-index");
$(this).addClass("selected");
}
});
/* GO TO THE NEW SLIDE */
$(".week-calendar-container .date-weeks").slick('slickGoTo', slideNum);
currentSlide = slideNum;
currentDateId = selectedDate;
/* CHANGE SLIDE SPEED BACK TO NORMAL */
$(".week-calendar-container .date-weeks").slick('slickSetOption', 'speed', '200');
if ($(".ibis-widget-week-calendar .col.selected").is(":visible")) {
/* THIS SETS THE SCROLL POSITION TO GO TO WHEN THE TIME-DATE URL IS OPENED */
newSt = $(".ibis-widget-week-calendar .col.selected").parent().parent().offset().top - 130;
}
}
ibisDualCalendar.selectDate = selectDate;
function setContainer() {
$(ibisDualCalendar.containerElement).append("
");
}
ibisDualCalendar.setContainer = setContainer;
function setElements(event) {
var containerElement = ".ibis-widget-dual-calendar:eq(0)";
/* Error handling - check set-up errors and throw error in the console */
if (typeof event.container != typeof undefined) {
ibisSetupErrorCheck(event.container);
} else {
ibisSetupErrorCheck(".ibis-widget-dual-calendar");
}
ibisOptionErrorCheck(event.appURL, event.cartDir, event.mode);
$(containerElement + ' .ibis-widget-month-calendar').after('');
if (!$(containerElement).find(".ibis-widget-departures-dual").length) {
var target = containerElement + " .ibis-widget-week-calendar";
$(target).after("
");
}
ibisDualCalendar.populateDepartures(containerElement);
}
ibisDualCalendar.setElements = setElements;
function setEvents() {
$(".ibis-widget-week-calendar .date-week .col:not()").off("mousedown tuochstart").on("mousedown tuochstart", function () {
!$(this).hasClass("disabled") && (ibisDualCalendar.weeklyCalendarDraggable($(this)));
})
$(".widget-dual-back-to-month-view").off("click").on("click", function () {
ibisDualCalendar.backToMonthView();
})
$(window).on("resize", function () {
ibisDualCalendar.resizeCalendar();
ibisDualCalendar.monthLabelAnimation();
})
}
ibisDualCalendar.setEvents = setEvents;
function setMonthLabels() {
var monthDisplay = "",
firstDate = $(".date-weeks .date-week:eq(0) .row .col:eq(0)").attr("data-date"),
lastDate = $(".date-weeks .date-week:last .row .col:last").attr("data-date"),
yearDiff = ibisNZTime(lastDate).getFullYear() - ibisNZTime(firstDate).getFullYear(),
monthDiff = ibisNZTime(lastDate).getMonth() - ibisNZTime(firstDate).getMonth(),
actualMonthDiff = (yearDiff * 13) + monthDiff;
var monthLabelStart = new Date(ibisNZTime(firstDate).getFullYear(), ibisNZTime(firstDate).getMonth(), "01");
for (i = 0; i < actualMonthDiff; i++) {
thisMonth = ibisAddMonths(monthLabelStart, i).getMonth(),
thisYear = ibisAddMonths(monthLabelStart, i).getFullYear(),
monthNameFull = ibisGetMonthName(ibisAddMonths(monthLabelStart, i)),
monthName = monthNameFull.substring(0, 3),
monthDisplay += '' + monthNameFull + ' ' + thisYear + '
';
}
$(".month-labels").html(monthDisplay);
}
ibisDualCalendar.setMonthLabels = setMonthLabels;
function setMoveControl(mode) {
var movement = 0;
if (stripCalendarSlideDirc == "left") {
if (stripCalendarMoveCount == -2 || (!$(".slick-slide.slick-active .col:eq(0)").hasClass("processed") || !$(".slick-slide.slick-active .col:eq(6)").hasClass("processed")) || (stripCalendarMoveCount < 2 && parseInt($(".slick-slide.slick-active .col:eq(0)").attr("data-date").slice(-2)) >= 18 && parseInt($(".slick-slide.slick-active .col:eq(0)").attr("data-date").slice(-2)) <= 25)) {
if ((!$(".slick-slide.slick-active .col:eq(0)").hasClass("processed") || !$(".slick-slide.slick-active .col:eq(6)").hasClass("processed"))) {
movement = 14;
} else {
movement = (stripCalendarMoveCount - 2) * 7;
stripCalendarMoveCount < -2 && (movement = (stripCalendarMoveCount - 3) * 7);
}
ibisDualCalendar.processCalendar(movement);
}
} else {
if (stripCalendarMoveCount == 2 || (!$(".slick-slide.slick-active .col:eq(0)").hasClass("processed") || !$(".slick-slide.slick-active .col:eq(6)").hasClass("processed")) || (stripCalendarMoveCount > 2 && parseInt($(".slick-slide.slick-active .col:eq(0)").attr("data-date").slice(-2)) >= 18 && parseInt($(".slick-slide.slick-active .col:eq(0)").attr("data-date").slice(-2)) <= 25)) {
movement = (stripCalendarMoveCount + 2) * 7;
stripCalendarMoveCount > 2 && (movement = (stripCalendarMoveCount + 3) * 7);
if (mode != undefined && mode == "init") {
setTimeout(function () {
ibisDualCalendar.processCalendar(movement);
}, 500)
} else {
ibisDualCalendar.processCalendar(movement);
}
}
}
}
ibisDualCalendar.setMoveControl = setMoveControl;
function weeklyCalendarDraggable(element) {
var initiated = false;
var drag = false;
$(element).off("mousemove touchmove").on("mousemove touchmove", function () {
drag = true;
})
$(element).off("mouseup touchend").on("mouseup touchend", function () {
if (drag == false) {
if (!$(this).hasClass("old") && !$(this).hasClass("selected")) {
$(".ibis-widget-week-calendar .date-week .col.selected").removeClass("selected");
$(this).addClass("selected");
ibisDualCalendar.defaultSettings.defaultDate = $(element).data("date");
if (initiated == false) {
initiated = true;
}
ibisDualCalendar.callNewDepartures();
}
}
})
}
ibisDualCalendar.weeklyCalendarDraggable = weeklyCalendarDraggable;
function pureMilfordCustom(element, step) {
if (ibisDualCalendar.defaultSettings.customBranding != undefined) {
if (ibisDualCalendar.defaultSettings.customBranding.toLowerCase() == "puremilford") {
if (step == 1) {
if ($(".widget-dual-header").length == 0) {
$(element).before("