/*! * Bootstrap v3.3.5 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under the MIT license */ if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); var scrollPosition; $(document).ready(function(){ var UserAgent = navigator.userAgent.toLowerCase(); //iphone|ipod|ipad|pad| if(UserAgent.search(/(opera mini|fennec|palm|blackberry|android|symbian|series60|tablet)/)>0){ var mobile = 1; }else{ var mobile = 0; } $(".nav.navbar-nav .dropdown > a").click(function(){ if(mobile == 1){ if(!$(this).parent().hasClass("open")){ $(".nav.navbar-nav .dropdown").removeClass("open"); $(this).parent().addClass("open"); return false; } } }); $(".navbar-header .navbar-toggle").click(function () { $(".navbar-nav .dropdown").removeClass("open"); if($("body").hasClass("menu-active")){ //unlockPos(); $("body").removeClass("menu-active"); }else{ //lockPos(); window.scrollTo(0,0); $("body").addClass("menu-active"); } }); $("#body-overlay").on("click",function (e) { //unlockPos(); $("body").removeClass("menu-active"); }); }); function lockPos(){ scrollPosition = [ self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, self.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop ]; var html = $('body'); // it would make more sense to apply this to body, but IE7 won't have that html.data('scroll-position', scrollPosition); html.data('previous-overflow', html.css('overflow')); html.css('overflow', 'hidden'); window.scrollTo(scrollPosition[0], scrollPosition[1]); } function unlockPos(){ var html = $('body'); var scrollPosition = html.data('scroll-position'); html.css('overflow', html.data('previous-overflow')); window.scrollTo(scrollPosition[0], scrollPosition[1]); } /*jslint browser: true, evil: true */ // define correct path for files inclusion var scripts = document.getElementsByTagName('script'), path = scripts[scripts.length - 1].src.split('?')[0], tarteaucitronForceCDN = (tarteaucitronForceCDN === undefined) ? '' : tarteaucitronForceCDN, cdn = (tarteaucitronForceCDN === '') ? path.split('/').slice(0, -1).join('/') + '/' : tarteaucitronForceCDN, alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch, tarteaucitronForceLanguage = (tarteaucitronForceLanguage === undefined) ? '' : tarteaucitronForceLanguage, tarteaucitronForceExpire = (tarteaucitronForceExpire === undefined) ? '' : tarteaucitronForceExpire, tarteaucitronCustomText = (tarteaucitronCustomText === undefined) ? '' : tarteaucitronCustomText, // tarteaucitronExpireInDay: true for day(s) value - false for hour(s) value tarteaucitronExpireInDay = (tarteaucitronExpireInDay === undefined || typeof tarteaucitronExpireInDay !== "boolean") ? true : tarteaucitronExpireInDay, timeExpire = 31536000000, tarteaucitronProLoadServices, tarteaucitronNoAdBlocker = false; var tarteaucitron = { "version": 20181120, "cdn": cdn, "user": {}, "lang": {}, "services": {}, "added": [], "idprocessed": [], "state": [], "launch": [], "parameters": {}, "isAjax": false, "reloadThePage": false, "events": { "init": function () {}, "load": function () {}, }, "init": function (params) { "use strict"; var origOpen; tarteaucitron.parameters = params; if (alreadyLaunch === 0) { alreadyLaunch = 1; if (window.addEventListener) { window.addEventListener("load", function () { tarteaucitron.load(); tarteaucitron.fallback(['tarteaucitronOpenPanel'], function (elem) { elem.addEventListener("click", function (event) { tarteaucitron.userInterface.openPanel(); event.preventDefault(); }, false); }, true); }, false); window.addEventListener("scroll", function () { var scrollPos = window.pageYOffset || document.documentElement.scrollTop, heightPosition; if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) { if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') { heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px'; if (scrollPos > (screen.height * 2)) { tarteaucitron.userInterface.respondAll(true); } else if (scrollPos > (screen.height / 2)) { document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '' + tarteaucitron.lang.alertBigScroll + ' ' + tarteaucitron.lang.alertBig; } if (tarteaucitron.orientation === 'top') { document.getElementById('tarteaucitronPercentage').style.top = heightPosition; } else { document.getElementById('tarteaucitronPercentage').style.bottom = heightPosition; } document.getElementById('tarteaucitronPercentage').style.width = ((100 / (screen.height * 2)) * scrollPos) + '%'; } } }, false); window.addEventListener("keydown", function (evt) { if (evt.keyCode === 27) { tarteaucitron.userInterface.closePanel(); } }, false); window.addEventListener("hashchange", function () { if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') { tarteaucitron.userInterface.openPanel(); } }, false); window.addEventListener("resize", function () { if (document.getElementById('tarteaucitron') !== null) { if (document.getElementById('tarteaucitron').style.display === 'block') { tarteaucitron.userInterface.jsSizing('main'); } } if (document.getElementById('tarteaucitronCookiesListContainer') !== null) { if (document.getElementById('tarteaucitronCookiesListContainer').style.display === 'block') { tarteaucitron.userInterface.jsSizing('cookie'); } } }, false); } else { window.attachEvent("onload", function () { tarteaucitron.load(); tarteaucitron.fallback(['tarteaucitronOpenPanel'], function (elem) { elem.attachEvent("onclick", function (event) { tarteaucitron.userInterface.openPanel(); event.preventDefault(); }); }, true); }); window.attachEvent("onscroll", function () { var scrollPos = window.pageYOffset || document.documentElement.scrollTop, heightPosition; if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) { if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') { heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px'; if (scrollPos > (screen.height * 2)) { tarteaucitron.userInterface.respondAll(true); } else if (scrollPos > (screen.height / 2)) { document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '' + tarteaucitron.lang.alertBigScroll + ' ' + tarteaucitron.lang.alertBig; } if (tarteaucitron.orientation === 'top') { document.getElementById('tarteaucitronPercentage').style.top = heightPosition; } else { document.getElementById('tarteaucitronPercentage').style.bottom = heightPosition; } document.getElementById('tarteaucitronPercentage').style.width = ((100 / (screen.height * 2)) * scrollPos) + '%'; } } }); window.attachEvent("onkeydown", function (evt) { if (evt.keyCode === 27) { tarteaucitron.userInterface.closePanel(); } if ( evt.keyCode === 9 && focusableEls.indexOf(evt.target) >= 0) { if ( evt.shiftKey ) /* shift + tab */ { if (document.activeElement === firstFocusableEl) { lastFocusableEl.focus(); evt.preventDefault(); } } else /* tab */ { if (document.activeElement === lastFocusableEl) { firstFocusableEl.focus(); evt.preventDefault(); } } } }); window.attachEvent("onhashchange", function () { if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') { tarteaucitron.userInterface.openPanel(); } }); window.attachEvent("onresize", function () { if (document.getElementById('tarteaucitron') !== null) { if (document.getElementById('tarteaucitron').style.display === 'block') { tarteaucitron.userInterface.jsSizing('main'); } } if (document.getElementById('tarteaucitronCookiesListContainer') !== null) { if (document.getElementById('tarteaucitronCookiesListContainer').style.display === 'block') { tarteaucitron.userInterface.jsSizing('cookie'); } } }); } if (typeof XMLHttpRequest !== 'undefined') { origOpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function () { if (window.addEventListener) { this.addEventListener("load", function () { if (typeof tarteaucitronProLoadServices === 'function') { tarteaucitronProLoadServices(); } }, false); } else if (typeof this.attachEvent !== 'undefined') { this.attachEvent("onload", function () { if (typeof tarteaucitronProLoadServices === 'function') { tarteaucitronProLoadServices(); } }); } else { if (typeof tarteaucitronProLoadServices === 'function') { setTimeout(tarteaucitronProLoadServices, 1000); } } try { origOpen.apply(this, arguments); } catch (err) {} }; } } if(tarteaucitron.events.init) { tarteaucitron.events.init(); } }, "load": function () { "use strict"; var cdn = tarteaucitron.cdn, language = tarteaucitron.getLanguage(), pathToLang = cdn + 'lang/tarteaucitron.' + language + '.js?v=' + tarteaucitron.version, pathToServices = cdn + 'tarteaucitron.services.js?v=' + tarteaucitron.version, linkElement = document.createElement('link'), defaults = { "adblocker": false, "hashtag": '#tarteaucitron', "cookieName": 'tarteaucitron', "highPrivacy": false, "orientation": "top", "removeCredit": false, "showAlertSmall": true, "cookieslist": true, "handleBrowserDNTRequest": false, "AcceptAllCta" : false, "moreInfoLink": true, "privacyUrl": "", "useExternalCss": false }, params = tarteaucitron.parameters; // Step 0: get params if (params !== undefined) { for (var k in defaults) { if(!tarteaucitron.parameters.hasOwnProperty(k)) { tarteaucitron.parameters[k] = defaults[k]; } } } // global tarteaucitron.orientation = tarteaucitron.parameters.orientation; tarteaucitron.hashtag = tarteaucitron.parameters.hashtag; tarteaucitron.highPrivacy = tarteaucitron.parameters.highPrivacy; tarteaucitron.handleBrowserDNTRequest = tarteaucitron.parameters.handleBrowserDNTRequest; // Step 1: load css if ( !tarteaucitron.parameters.useExternalCss ) { linkElement.rel = 'stylesheet'; linkElement.type = 'text/css'; linkElement.href = cdn + 'css/tarteaucitron.css?v=' + tarteaucitron.version; document.getElementsByTagName('head')[0].appendChild(linkElement); } // Step 2: load language and services tarteaucitron.addScript(pathToLang, '', function () { if(tarteaucitronCustomText !== ''){ tarteaucitron.lang = tarteaucitron.AddOrUpdate(tarteaucitron.lang, tarteaucitronCustomText); } tarteaucitron.addScript(pathToServices, '', function () { var body = document.body, div = document.createElement('div'), html = '', index, orientation = 'Top', cat = ['ads', 'analytic', 'api', 'comment', 'social', 'support', 'video', 'other'], i; cat = cat.sort(function (a, b) { if (tarteaucitron.lang[a].title > tarteaucitron.lang[b].title) { return 1; } if (tarteaucitron.lang[a].title < tarteaucitron.lang[b].title) { return -1; } return 0; }); // Step 3: prepare the html html += '
'; html += ''; html += ''; if (tarteaucitron.parameters.orientation === 'bottom') { orientation = 'Bottom'; } if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) { html += '
'; html += '
'; html += ' '; html += ' ' + tarteaucitron.lang.alertBigPrivacy; html += ' '; html += ' '; html += ' '; if (tarteaucitron.parameters.privacyUrl !== "") { html += ' '; } html += ' '; html += '
'; html += '
'; } else { html += '
'; html += '
'; html += ' '; if (tarteaucitron.parameters.highPrivacy) { html += ' ' + tarteaucitron.lang.alertBigPrivacy; } else { html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig; } html += ' '; html += ' '; html += ' '; html += ' '; if (tarteaucitron.parameters.privacyUrl !== "") { html += ' '; } html += ' '; html += '
'; html += '
'; html += '
'; } if (tarteaucitron.parameters.showAlertSmall === true) { html += '
'; html += ' '; html += '
'; html += ' '; html += '
'; html += ' 0 cookie'; html += '
'; html += '
'; html += '
'; } else { html += '
'; } html += ''; } tarteaucitron.addScript(tarteaucitron.cdn + 'advertising.js?v=' + tarteaucitron.version, '', function () { if (tarteaucitronNoAdBlocker === true || tarteaucitron.parameters.adblocker === false) { // create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened /*var wrapper = document.createElement('div'); wrapper.id = "contentWrapper"; while (document.body.firstChild) { wrapper.appendChild(document.body.firstChild); } // Append the wrapper to the body document.body.appendChild(wrapper);*/ div.id = 'tarteaucitronRoot'; body.appendChild(div, body); div.innerHTML = html; //ie compatibility var tacRootAvailableEvent; if(typeof(Event) === 'function') { tacRootAvailableEvent = new Event("tac.root_available"); }else{ tacRootAvailableEvent = document.createEvent('Event'); tacRootAvailableEvent.initEvent("tac.root_available", true, true); } //end ie compatibility window.dispatchEvent(tacRootAvailableEvent); if (tarteaucitron.job !== undefined) { tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job); for (index = 0; index < tarteaucitron.job.length; index += 1) { tarteaucitron.addService(tarteaucitron.job[index]); } } else { tarteaucitron.job = [] } tarteaucitron.isAjax = true; tarteaucitron.job.push = function (id) { // ie <9 hack if (typeof tarteaucitron.job.indexOf === 'undefined') { tarteaucitron.job.indexOf = function (obj, start) { var i, j = this.length; for (i = (start || 0); i < j; i += 1) { if (this[i] === obj) { return i; } } return -1; }; } if (tarteaucitron.job.indexOf(id) === -1) { Array.prototype.push.call(this, id); } tarteaucitron.launch[id] = false; tarteaucitron.addService(id); }; if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') { tarteaucitron.userInterface.openPanel(); } tarteaucitron.cookie.number(); setInterval(tarteaucitron.cookie.number, 60000); } }, tarteaucitron.parameters.adblocker); if (tarteaucitron.parameters.adblocker === true) { setTimeout(function () { if (tarteaucitronNoAdBlocker === false) { html = ''; html += '
'; // create wrapper container /*var wrapper = document.createElement('div'); wrapper.id = "contentWrapper"; while (document.body.firstChild) { wrapper.appendChild(document.body.firstChild); } // Append the wrapper to the body document.body.appendChild(wrapper);*/ div.id = 'tarteaucitronRoot'; body.appendChild(div, body); div.innerHTML = html; } }, 1500); } }); }); if(tarteaucitron.events.load) { tarteaucitron.events.load(); } }, "addService": function (serviceId) { "use strict"; var html = '', s = tarteaucitron.services, service = s[serviceId], cookie = tarteaucitron.cookie.read(), hostname = document.location.hostname, hostRef = document.referrer.split('/')[2], isNavigating = (hostRef === hostname && window.location.href !== tarteaucitron.parameters.privacyUrl) ? true : false, isAutostart = (!service.needConsent) ? true : false, isWaiting = (cookie.indexOf(service.key + '=wait') >= 0) ? true : false, isDenied = (cookie.indexOf(service.key + '=false') >= 0) ? true : false, isAllowed = (cookie.indexOf(service.key + '=true') >= 0) ? true : false, isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0) ? true : false, isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1") ? true : false; if (tarteaucitron.added[service.key] !== true) { tarteaucitron.added[service.key] = true; html += '
  • '; html += '
    '; html += ' ' + service.name + ''; html += '
    '; if (tarteaucitron.parameters.moreInfoLink == true) { var link = 'https://opt-out.ferank.eu/service/' + service.key + '/'; if (service.readmoreLink !== undefined && service.readmoreLink !== '') { link = service.readmoreLink; } if (tarteaucitron.parameters.readmoreLink !== undefined && tarteaucitron.parameters.readmoreLink !== '') { link = tarteaucitron.parameters.readmoreLink; } html += ' '; html += ' ' + tarteaucitron.lang.more; html += ' '; html += ' - '; html += ' '; html += ' ' + tarteaucitron.lang.source; html += ' '; } html += '
    '; html += '
    '; html += ' '; html += ' '; html += '
    '; html += '
  • '; tarteaucitron.userInterface.css('tarteaucitronServicesTitle_' + service.type, 'display', 'block'); if (document.getElementById('tarteaucitronServices_' + service.type) !== null) { document.getElementById('tarteaucitronServices_' + service.type).innerHTML += html; } tarteaucitron.userInterface.order(service.type); } tarteaucitron.pro('!' + service.key + '=' + isAllowed); // allow by default for non EU if (isResponded === false && tarteaucitron.user.bypass === true) { isAllowed = true; tarteaucitron.cookie.create(service.key, true); } if ((!isResponded && (isAutostart || (isNavigating && isWaiting)) && !tarteaucitron.highPrivacy) || isAllowed) { if (!isAllowed) { tarteaucitron.cookie.create(service.key, true); } if (tarteaucitron.launch[service.key] !== true) { tarteaucitron.launch[service.key] = true; service.js(); } tarteaucitron.state[service.key] = true; tarteaucitron.userInterface.color(service.key, true); } else if (isDenied) { if (typeof service.fallback === 'function') { service.fallback(); } tarteaucitron.state[service.key] = false; tarteaucitron.userInterface.color(service.key, false); } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) { tarteaucitron.cookie.create(service.key, 'false'); if (typeof service.fallback === 'function') { service.fallback(); } tarteaucitron.state[service.key] = false; tarteaucitron.userInterface.color(service.key, false); } else if (!isResponded) { tarteaucitron.cookie.create(service.key, 'wait'); if (typeof service.fallback === 'function') { service.fallback(); } tarteaucitron.userInterface.color(service.key, 'wait'); tarteaucitron.userInterface.openAlert(); } tarteaucitron.cookie.checkCount(service.key); }, "cleanArray": function cleanArray(arr) { "use strict"; var i, len = arr.length, out = [], obj = {}, s = tarteaucitron.services; for (i = 0; i < len; i += 1) { if (!obj[arr[i]]) { obj[arr[i]] = {}; if (tarteaucitron.services[arr[i]] !== undefined) { out.push(arr[i]); } } } out = out.sort(function (a, b) { if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; } if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; } return 0; }); return out; }, "userInterface": { "css": function (id, property, value) { "use strict"; if (document.getElementById(id) !== null) { document.getElementById(id).style[property] = value; } }, "addClass": function (id, className) { "use strict"; if (document.getElementById(id) !== null) { document.getElementById(id).classList.add(className); } }, "removeClass": function (id, className) { "use strict"; if (document.getElementById(id) !== null) { document.getElementById(id).classList.remove(className); } }, "respondAll": function (status) { "use strict"; var s = tarteaucitron.services, service, key, index = 0; for (index = 0; index < tarteaucitron.job.length; index += 1) { service = s[tarteaucitron.job[index]]; key = service.key; if (tarteaucitron.state[key] !== status) { if (status === false && tarteaucitron.launch[key] === true) { tarteaucitron.reloadThePage = true; } if (tarteaucitron.launch[key] !== true && status === true) { tarteaucitron.pro('!' + key + '=engage'); tarteaucitron.launch[key] = true; tarteaucitron.services[key].js(); } tarteaucitron.state[key] = status; tarteaucitron.cookie.create(key, status); tarteaucitron.userInterface.color(key, status); } } }, "respond": function (el, status) { "use strict"; var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), ''); // return if same state if (tarteaucitron.state[key] === status) { return; } if (status === false && tarteaucitron.launch[key] === true) { tarteaucitron.reloadThePage = true; } // if not already launched... launch the service if (status === true) { if (tarteaucitron.launch[key] !== true) { tarteaucitron.pro('!' + key + '=engage'); tarteaucitron.launch[key] = true; tarteaucitron.services[key].js(); } } tarteaucitron.state[key] = status; tarteaucitron.cookie.create(key, status); tarteaucitron.userInterface.color(key, status); }, "color": function (key, status) { "use strict"; var c = 'tarteaucitron', nbDenied = 0, nbPending = 0, nbAllowed = 0, sum = tarteaucitron.job.length, index; if (status === true) { document.getElementById(key + 'Line').classList.add('tarteaucitronIsAllowed'); document.getElementById(key + 'Line').classList.remove('tarteaucitronIsDenied'); } else if (status === false) { document.getElementById(key + 'Line').classList.remove('tarteaucitronIsAllowed'); document.getElementById(key + 'Line').classList.add('tarteaucitronIsDenied'); } // check if all services are allowed for (index = 0; index < sum; index += 1) { if (tarteaucitron.state[tarteaucitron.job[index]] === false) { nbDenied += 1; } else if (tarteaucitron.state[tarteaucitron.job[index]] === undefined) { nbPending += 1; } else if (tarteaucitron.state[tarteaucitron.job[index]] === true) { nbAllowed += 1; } } tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%'); tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%'); tarteaucitron.userInterface.css(c + 'DotRed', 'width', ((100 / sum) * nbDenied) + '%'); if (nbDenied === 0 && nbPending === 0) { tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected'); tarteaucitron.userInterface.addClass(c + 'AllAllowed', c + 'IsSelected'); tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsAllowed'); tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied'); } else if (nbAllowed === 0 && nbPending === 0) { tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected'); tarteaucitron.userInterface.addClass(c + 'AllDenied', c + 'IsSelected'); tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed'); tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsDenied'); } else { tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected'); tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected'); tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed'); tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied'); } // close the alert if all service have been reviewed if (nbPending === 0) { tarteaucitron.userInterface.closeAlert(); } if (tarteaucitron.services[key].cookies.length > 0 && status === false) { tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies); } if (status === true) { if (document.getElementById('tacCL' + key) !== null) { document.getElementById('tacCL' + key).innerHTML = '...'; } setTimeout(function () { tarteaucitron.cookie.checkCount(key); }, 2500); } else { tarteaucitron.cookie.checkCount(key); } }, "openPanel": function () { "use strict"; tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block'); tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block'); tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none'); document.getElementById('tarteaucitronClosePanel').focus(); //document.getElementById('contentWrapper').setAttribute("aria-hidden", "true"); document.getElementsByTagName('body')[0].classList.add('modal-open'); tarteaucitron.userInterface.focusTrap(); tarteaucitron.userInterface.jsSizing('main'); //ie compatibility var tacOpenPanelEvent; if(typeof(Event) === 'function') { tacOpenPanelEvent = new Event("tac.open_panel"); }else{ tacOpenPanelEvent = document.createEvent('Event'); tacOpenPanelEvent.initEvent("tac.open_panel", true, true); } //end ie compatibility window.dispatchEvent(tacOpenPanelEvent); }, "closePanel": function () { "use strict"; if (document.location.hash === tarteaucitron.hashtag) { if (window.history) { window.history.replaceState('', document.title, window.location.pathname + window.location.search); } else { document.location.hash = ''; } } tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none'); tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none'); tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) { elem.style.display = 'none'; }, true); if (tarteaucitron.reloadThePage === true) { window.location.reload(); } else { tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none'); } if (document.getElementById('tarteaucitronCloseAlert') !== null) { document.getElementById('tarteaucitronCloseAlert').focus(); } //document.getElementById('contentWrapper').setAttribute("aria-hidden", "false"); document.getElementsByTagName('body')[0].classList.remove('modal-open'); //ie compatibility var tacClosePanelEvent; if(typeof(Event) === 'function') { tacClosePanelEvent = new Event("tac.close_panel"); }else{ tacClosePanelEvent = document.createEvent('Event'); tacClosePanelEvent.initEvent("tac.close_panel", true, true); } //end ie compatibility window.dispatchEvent(tacClosePanelEvent); }, "focusTrap": function() { "use strict"; var focusableEls, firstFocusableEl, lastFocusableEl, filtered; focusableEls = document.getElementById('tarteaucitron').querySelectorAll('a[href], button'); filtered = []; // get only visible items for (var i = 0, max = focusableEls.length; i < max; i++) { if (focusableEls[i].offsetHeight > 0) { filtered.push(focusableEls[i]); } } firstFocusableEl = filtered[0]; lastFocusableEl = filtered[filtered.length - 1]; //loop focus inside tarteaucitron document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) { if ( evt.key === 'Tab' || evt.keyCode === 9 ) { if ( evt.shiftKey ) /* shift + tab */ { if (document.activeElement === firstFocusableEl) { lastFocusableEl.focus(); evt.preventDefault(); } } else /* tab */ { if (document.activeElement === lastFocusableEl) { firstFocusableEl.focus(); evt.preventDefault(); } } } }) }, "openAlert": function () { "use strict"; var c = 'tarteaucitron'; tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block'); tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none'); tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'block'); //ie compatibility var tacOpenAlertEvent; if(typeof(Event) === 'function') { tacOpenAlertEvent = new Event("tac.open_alert"); }else{ tacOpenAlertEvent = document.createEvent('Event'); tacOpenAlertEvent.initEvent("tac.open_alert", true, true); } //end ie compatibility window.dispatchEvent(tacOpenAlertEvent); }, "closeAlert": function () { "use strict"; var c = 'tarteaucitron'; tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none'); tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block'); tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'none'); tarteaucitron.userInterface.jsSizing('box'); //ie compatibility var tacCloseAlertEvent; if(typeof(Event) === 'function') { tacCloseAlertEvent = new Event("tac.close_alert"); }else{ tacCloseAlertEvent = document.createEvent('Event'); tacCloseAlertEvent.initEvent("tac.close_alert", true, true); } //end ie compatibility window.dispatchEvent(tacCloseAlertEvent); }, "toggleCookiesList": function () { "use strict"; var div = document.getElementById('tarteaucitronCookiesListContainer'); if (div === null) { return; } if (div.style.display !== 'block') { tarteaucitron.cookie.number(); div.style.display = 'block'; tarteaucitron.userInterface.jsSizing('cookie'); tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none'); tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block'); tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) { elem.style.display = 'none'; }, true); } else { div.style.display = 'none'; tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none'); tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none'); } }, "toggle": function (id, closeClass) { "use strict"; var div = document.getElementById(id); if (div === null) { return; } if (closeClass !== undefined) { tarteaucitron.fallback([closeClass], function (elem) { if (elem.id !== id) { elem.style.display = 'none'; } }, true); } if (div.style.display !== 'block') { div.style.display = 'block'; } else { div.style.display = 'none'; } }, "order": function (id) { "use strict"; var main = document.getElementById('tarteaucitronServices_' + id), allDivs, store = [], i; if (main === null) { return; } allDivs = main.childNodes; if (typeof Array.prototype.map === 'function' && typeof Enumerable === 'undefined') { Array.prototype.map.call(main.children, Object).sort(function (a, b) { //var mainChildren = Array.from(main.children); //mainChildren.sort(function (a, b) { if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; } if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; } return 0; }).forEach(function (element) { main.appendChild(element); }); } }, "jsSizing": function (type) { "use strict"; var scrollbarMarginRight = 10, scrollbarWidthParent, scrollbarWidthChild, servicesHeight, e = window, a = 'inner', windowInnerHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, mainTop, mainHeight, closeButtonHeight, headerHeight, cookiesListHeight, cookiesCloseHeight, cookiesTitleHeight, paddingBox, alertSmallHeight, cookiesNumberHeight; if (type === 'box') { if (document.getElementById('tarteaucitronAlertSmall') !== null && document.getElementById('tarteaucitronCookiesNumber') !== null) { // reset tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', '0px 10px'); // calculate alertSmallHeight = document.getElementById('tarteaucitronAlertSmall').offsetHeight; cookiesNumberHeight = document.getElementById('tarteaucitronCookiesNumber').offsetHeight; paddingBox = (alertSmallHeight - cookiesNumberHeight) / 2; // apply tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', paddingBox + 'px 10px'); } } else if (type === 'main') { // get the real window width for media query if (window.innerWidth === undefined) { a = 'client'; e = document.documentElement || document.body; } // height of the services list container if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) { // reset tarteaucitron.userInterface.css('tarteaucitronServices', 'height', 'auto'); // calculate mainHeight = document.getElementById('tarteaucitron').offsetHeight; closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight; // apply servicesHeight = (mainHeight - closeButtonHeight + 2); tarteaucitron.userInterface.css('tarteaucitronServices', 'height', servicesHeight + 'px'); tarteaucitron.userInterface.css('tarteaucitronServices', 'overflow-x', 'auto'); } // align the main allow/deny button depending on scrollbar width if (document.getElementById('tarteaucitronServices') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) { // media query if (e[a + 'Width'] <= 479) { tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px'); } else if (e[a + 'Width'] <= 767) { scrollbarMarginRight = 12; } scrollbarWidthParent = document.getElementById('tarteaucitronServices').offsetWidth; scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth; tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px'); } // center the main panel if (document.getElementById('tarteaucitron') !== null) { // media query if (e[a + 'Width'] <= 767) { mainTop = 0; } else { mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21; } if (document.getElementById('tarteaucitronMainLineOffset') !== null) { if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) { mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight; } } // correct if (mainTop < 0) { mainTop = 0; } // apply tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px'); } } else if (type === 'cookie') { // put cookies list at bottom if (document.getElementById('tarteaucitronAlertSmall') !== null) { tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight) + 'px'); } // height of cookies list if (document.getElementById('tarteaucitronCookiesListContainer') !== null) { // reset tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', 'auto'); // calculate cookiesListHeight = document.getElementById('tarteaucitronCookiesListContainer').offsetHeight; cookiesCloseHeight = document.getElementById('tarteaucitronClosePanelCookie').offsetHeight; cookiesTitleHeight = document.getElementById('tarteaucitronCookiesTitle').offsetHeight; // apply tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', (cookiesListHeight - cookiesCloseHeight - cookiesTitleHeight - 2) + 'px'); } } } }, "cookie": { "owner": {}, "create": function (key, status) { "use strict"; if (tarteaucitronForceExpire !== '') { // The number of day(s)/hour(s) can't be higher than 1 year if ((tarteaucitronExpireInDay && tarteaucitronForceExpire < 365) || (!tarteaucitronExpireInDay && tarteaucitronForceExpire < 8760)) { if (tarteaucitronExpireInDay) { // Multiplication to tranform the number of days to milliseconds timeExpire = tarteaucitronForceExpire * 86400000; } else { // Multiplication to tranform the number of hours to milliseconds timeExpire = tarteaucitronForceExpire * 3600000; } } } var d = new Date(), time = d.getTime(), expireTime = time + timeExpire, // 365 days regex = new RegExp("!" + key + "=(wait|true|false)", "g"), cookie = tarteaucitron.cookie.read().replace(regex, ""), value = tarteaucitron.parameters.cookieName + '=' + cookie + '!' + key + '=' + status, domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? 'domain=' + tarteaucitron.parameters.cookieDomain + ';' : ''; d.setTime(expireTime); document.cookie = value + '; expires=' + d.toGMTString() + '; path=/;' + domain; }, "read": function () { "use strict"; var nameEQ = tarteaucitron.parameters.cookieName + "=", ca = document.cookie.split(';'), i, c; for (i = 0; i < ca.length; i += 1) { c = ca[i]; while (c.charAt(0) === ' ') { c = c.substring(1, c.length); } if (c.indexOf(nameEQ) === 0) { return c.substring(nameEQ.length, c.length); } } return ''; }, "purge": function (arr) { "use strict"; var i; for (i = 0; i < arr.length; i += 1) { document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;'; document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';'; document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';'; } }, "checkCount": function (key) { "use strict"; var arr = tarteaucitron.services[key].cookies, nb = arr.length, nbCurrent = 0, html = '', i, status = document.cookie.indexOf(key + '=true'); if (status >= 0 && nb === 0) { html += tarteaucitron.lang.useNoCookie; } else if (status >= 0) { for (i = 0; i < nb; i += 1) { if (document.cookie.indexOf(arr[i] + '=') !== -1) { nbCurrent += 1; if (tarteaucitron.cookie.owner[arr[i]] === undefined) { tarteaucitron.cookie.owner[arr[i]] = []; } if (tarteaucitron.cookie.crossIndexOf(tarteaucitron.cookie.owner[arr[i]], tarteaucitron.services[key].name) === false) { tarteaucitron.cookie.owner[arr[i]].push(tarteaucitron.services[key].name); } } } if (nbCurrent > 0) { html += tarteaucitron.lang.useCookieCurrent + ' ' + nbCurrent + ' Cookie'; if (nbCurrent > 1) { html += 's'; } // html += '.'; } else { html += tarteaucitron.lang.useNoCookie; } } else if (nb === 0) { html = tarteaucitron.lang.noCookie; } else { html += tarteaucitron.lang.useCookie + ' ' + nb + ' Cookie'; if (nb > 1) { html += 's'; } // html += '.'; } if (document.getElementById('tacCL' + key) !== null) { document.getElementById('tacCL' + key).innerHTML = html; } }, "crossIndexOf": function (arr, match) { "use strict"; var i; for (i = 0; i < arr.length; i += 1) { if (arr[i] === match) { return true; } } return false; }, "number": function () { "use strict"; var cookies = document.cookie.split(';'), nb = (document.cookie !== '') ? cookies.length : 0, html = '', i, name, namea, nameb, c, d, s = (nb > 1) ? 's' : '', savedname, regex = /^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i, regexedDomain = (tarteaucitron.cdn.match(regex) !== null) ? tarteaucitron.cdn.match(regex)[1] : tarteaucitron.cdn, host = (tarteaucitron.domain !== undefined) ? tarteaucitron.domain : regexedDomain; cookies = cookies.sort(function (a, b) { namea = a.split('=', 1).toString().replace(/ /g, ''); nameb = b.split('=', 1).toString().replace(/ /g, ''); c = (tarteaucitron.cookie.owner[namea] !== undefined) ? tarteaucitron.cookie.owner[namea] : '0'; d = (tarteaucitron.cookie.owner[nameb] !== undefined) ? tarteaucitron.cookie.owner[nameb] : '0'; if (c + a > d + b) { return 1; } if (c + a < d + b) { return -1; } return 0; }); if (document.cookie !== '') { for (i = 0; i < nb; i += 1) { name = cookies[i].split('=', 1).toString().replace(/ /g, ''); if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) { savedname = tarteaucitron.cookie.owner[name].join(' // '); html += '
    '; html += ' '; html += ' ' + tarteaucitron.cookie.owner[name].join(' // '); html += ' '; html += '