PageSourceSearch

https://www.fleischwirtschaft.de/assets/83d10756bc887d639a7c0c6bce90abe5.js

js fleischwirtschaft.de collected 2026-10-02 08:04:15 UTC 667,881 bytes, 8,054 lines download raw bytes

vendor: 39,680 bytes, lines 1-6
1/*!
2 * Bootstrap v3.4.1 (https://getbootstrap.com/)
3 * Copyright 2011-2019 Twitter, Inc.
4 * Licensed under the MIT license
5 */
6if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',a=function(t){s(t).on("click",e,this.close)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.closest(".alert")),o.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),s.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(s){"use strict";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new n(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",null==n.resetText&&i.data("resetText",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=s(t.target).closest(".btn");i.call(e,"toggle"),s(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),e.is("input,button")?e.trigger("focus"):e.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){s(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(p){"use strict";var c=function(t,e){this.$element=p(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",p.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",p.proxy(this.pause,this)).on("mouseleave.bs.carousel",p.proxy(this.cycle,this))};function r(n){return this.each(function(){var t=p(this),e=t.data("bs.carousel"),i=p.extend({},c.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new c(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}c.VERSION="3.4.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},c.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(p.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},c.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},c.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",this.$items.eq(t))},c.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&p.support.transition&&(this.$element.trigger(p.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||this.getItemForDirection(t,i),n=this.interval,s="next"==t?"left":"right",a=this;if(o.hasClass("active"))return this.sliding=!1;var r=o[0],l=p.Event("slide.bs.carousel",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=p(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var d=p.Event("slid.bs.carousel",{relatedTarget:r,direction:s});return p.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=p.fn.carousel;p.fn.carousel=r,p.fn.carousel.Constructor=c,p.fn.carousel.noConflict=function(){return p.fn.carousel=t,this};var e=function(t){var e=p(this),i=e.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=e.attr("data-target")||i,n=p(document).find(o);if(n.hasClass("carousel")){var s=p.extend({},n.data(),e.data()),a=e.attr("data-slide-to");a&&(s.interval=!1),r.call(n,s),a&&n.data("bs.carousel").to(a),t.preventDefault()}};p(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),p(window).on("load",function(){p('[data-ride="carousel"]').each(function(){var t=p(this);r.call(t,t.data())})})}(jQuery),function(a){"use strict";var r=function(t,e){this.$element=a(t),this.options=a.extend({},r.DEFAULTS,e),this.$trigger=a('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return a(document).find(i)}function l(o){return this.each(function(){var t=a(this),e=t.data("bs.collapse"),i=a.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data("bs.collapse",e=new r(this,i)),"string"==typeof o&&e[o]()})}r.VERSION="3.4.1",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(t=e.data("bs.collapse"))&&t.transitioning)){var i=a.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(l.call(e,"hide"),t||e.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return n.call(this);var s=a.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",a.proxy(n,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][s])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=a.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[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 i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!a.support.transition)return i.call(this);this.$element[e](0).one("bsTransitionEnd",a.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=a.fn.collapse;a.fn.collapse=l,a.fn.collapse.Constructor=r,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=a(this);e.attr("data-target")||t.preventDefault();var i=n(e),o=i.data("bs.collapse")?"toggle":e.data();l.call(i,o)})}(jQuery),function(a){"use strict";var r='[data-toggle="dropdown"]',o=function(t){a(t).on("click.bs.dropdown",this.toggle)};function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==e?a(document).find(e):null;return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(".dropdown-backdrop").remove(),a(r).each(function(){var t=a(this),e=l(t),i={relatedTarget:this};e.hasClass("open")&&(o&&"click"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event("hide.bs.dropdown",i)),o.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",i)))))}))}o.VERSION="3.4.1",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(s(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",s);var n={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",n)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(a.Event("shown.bs.dropdown",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(r).trigger("focus"),e.trigger("click");var n=i.find(".dropdown-menu li:not(.disabled):visible a");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger("focus")}}}};var t=a.fn.dropdown;a.fn.dropdown=function e(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(a){"use strict";var s=function(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function r(o,n){return this.each(function(){var t=a(this),e=t.data("bs.modal"),i=a.extend({},s.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new s(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})}s.VERSION="3.4.1",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(i){var o=this,t=a.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(t){a(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:i});t?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):o.$element.trigger("focus").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=a.support.transition&&i;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),a(this.fixedContent).each(function(t,e){var i=e.style.paddingRight,o=a(e).css("padding-right");a(e).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),a(this.fixedContent).each(function(t,e){var i=a(e).data("padding-right");a(e).removeData("padding-right"),e.style.paddingRight=i||""})},s.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=r,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),i=e.attr("href"),o=e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),n=a(document).find(o),s=n.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is("a")&&t.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),r.call(n,s,this)})}(jQuery),function(g){"use strict";var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(t,e){var i=t.nodeName.toLowerCase();if(-1!==g.inArray(i,e))return-1===g.inArray(i,a)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var o=g(e).filter(function(t,e){return e instanceof RegExp}),n=0,s=o.length;n<s;n++)if(i.match(o[n]))return!0;return!1}function n(t,e,i){if(0===t.length)return t;if(i&&"function"==typeof i)return i(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=t;for(var n=g.map(e,function(t,e){return e}),s=g(o.body).find("*"),a=0,r=s.length;a<r;a++){var l=s[a],h=l.nodeName.toLowerCase();if(-1!==g.inArray(h,n))for(var d=g.map(l.attributes,function(t){return t}),p=[].concat(e["*"]||[],e[h]||[]),c=0,f=d.length;c<f;c++)u(d[c],p)||l.removeAttribute(d[c].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};m.VERSION="3.4.1",m.TRANSITION_DURATION=150,m.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.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 o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-d<c.top?"bottom":"right"==s&&l.right+h>c.width?"left":"left"==s&&l.left-h<c.left?"right":s,o.removeClass(p).addClass(s)}var f=this.getCalculatedOffset(s,l,h,d);this.applyPlacement(f,s);var u=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};g.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",u).emulateTransitionEnd(m.TRANSITION_DURATION):u()}},m.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,g.offset.setOffset(i[0],g.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=n&&(t.top=t.top+n-l);var h=this.getViewportAdjustedDelta(e,t,r,l);h.left?t.left+=h.left:t.top+=h.top;var d=/top|bottom/.test(e),p=d?2*h.left-o+r:2*h.top-n+l,c=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][c],d)},m.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},m.prototype.hide=function(t){var e=this,i=g(this.$tip),o=g.Event("hide.bs."+this.type);function n(){"in"!=e.hoverState&&i.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),g.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(m.TRANSITION_DURATION):n(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=g.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&e instanceof window.SVGElement,s=i?{top:0,left:0}:n?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},r=i?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},o,a,r,s)},m.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(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},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load.bs.scrollspy.data-api",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";var a=function(t){this.element=r(t)};function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof i&&e[i]()})}a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a"),n=r.Event("hide.bs.tab",{relatedTarget:t[0]}),s=r.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(document).find(i);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){var o=e.find("> .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&t-o<=l+(r?a:e)&&"bottom"},h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},h.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},h.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());"object"!=typeof e&&(o=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var a="affix"+(s?"-"+s:""),r=l.Event(a+".bs.affix");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=h,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery);
vendor: 4,481 bytes, lines 6-8
6
7/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
8!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s
vendor: 18,080 bytes, line 8
8=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")}
vendor: 16,844 bytes, lines 8-10
8)||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
9
10return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{}
vendor: 1,726 bytes, line 10
10,e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>
vendor: 54,827 bytes, lines 10-11
10=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){
11return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
vendor: 2,049 bytes, lines 12-19
12//# 
13/*
14 Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net
15*/
16(function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k));
17if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("<div />"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q,
18u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),e<F&&(m=!1,c=q,null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),
19h.detach()),b={position:"",width:"",top:""},a.css(b).removeClass(t).trigger("sticky_kit:unstick")),B&&(b=f.height(),u+q>b&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>
19C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}),
20a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize",
21y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n<K;n++)d=this[n],J(b(d));return this}}).call(this);
22
23/**
24 * Swiper 3.4.2
25 * Most modern mobile touch slider and framework with hardware accelerated transitions
26 * 
27 * http://www.idangero.us/swiper/
28 * 
29 * Copyright 2017, Vladimir Kharlampidi
30 * The iDangero.us
31 * http://www.idangero.us/
32 * 
33 * Licensed under MIT
34 * 
35 * Released on: March 10, 2017
36 */
37!function(){"use strict";var e,a=function(t,s){function r(e){return Math.floor(e)}function i(){var e=x.params.autoplay,a=x.slides.eq(x.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||x.params.autoplay),x.autoplayTimeoutId=setTimeout(function(){x.params.loop?(x.fixLoop(),x._slideNext(),x.emit("onAutoplay",x)):x.isEnd?s.autoplayStopOnLast?x.stopAutoplay():(x._slideTo(0),x.emit("onAutoplay",x)):(x._slideNext(),x.emit("onAutoplay",x))},e)}function n(a,t){var s=e(a.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var r;return s.parents().each(function(e,a){a===t&&(r=t)}),r?t:void 0}if(0!==s.length)return s[0]}function o(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,s=new t(function(e){e.forEach(function(e){x.onResize(!0),x.emit("onObserverUpdate",x,e)})});s.observe(e,{attributes:void 0===a.attributes||a.attributes,childList:void 0===a.childList||a.childList,characterData:void 0===a.characterData||a.characterData}),x.observers.push(s)}function l(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;
37if(!x.params.allowSwipeToNext&&(x.isHorizontal()&&39===a||!x.isHorizontal()&&40===a))return!1;if(!x.params.allowSwipeToPrev&&(x.isHorizontal()&&37===a||!x.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(x.container.parents("."+x.params.slideClass).length>0&&0===x.container.parents("."+x.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},r=window.innerWidth,i=window.innerHeight,n=x.container.offset();x.rtl&&(n.left=n.left-x.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+x.width,n.top],[n.left,n.top+x.height],[n.left+x.width,n.top+x.height]],l=0;l<o.length;l++){var p=o[l];p[0]>=s.left&&p[0]<=s.left+r&&p[1]>=s.top&&p[1]<=s.top+i&&(t=!0)}if(!t)return}x.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!x.rtl||37===a&&x.rtl)&&x.slideNext(),(37===a&&!x.rtl||39===a&&x.rtl)&&x.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&x.slideNext(),38===a&&x.slidePrev()),x.emit("onKeyPress",x,a)}}function p(e){var a=0,t=0,s=0,r=0;return"detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(a=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(a=t,t=0),s=10*a,r=10*t,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||r)&&e.deltaMode&&(1===e.deltaMode?(s*=40,r*=40):(s*=800,r*=800)),s&&!a&&(a=s<1?-1:1),r&&!t&&(t=r<1?-1:1),{spinX:a,spinY:t,pixelX:s,pixelY:r}}function d(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=x.rtl?-1:1,s=p(e);if(x.params.mousewheelForceToAxis)if(x.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(x.params.mousewheelInvert&&(a=-a),x.params.freeMode){var r=x.getWrapperTranslate()+a*x.params.mousewheelSensitivity,i=x.isBeginning,n=x.isEnd;if(r>=x.minTranslate()&&(r=x.minTranslate()),r<=x.maxTranslate()&&(r=x.maxTranslate()),x.setWrapperTransition(0),x.setWrapperTranslate(r),x.updateProgress(),x.updateActiveIndex(),(!i&&x.isBeginning||!n&&x.isEnd)&&x.updateClasses(),x.params.freeModeSticky?(clearTimeout(x.mousewheel.timeout),x.mousewheel.timeout=setTimeout(function(){x.slideReset()},300)):x.params.lazyLoading&&x.lazy&&x.lazy.load(),x.emit("onScroll",x,e),x.params.autoplay&&x.params.autoplayDisableOnInteraction&&x.stopAutoplay(),0===r||r
37===x.maxTranslate())return}else{if((new window.Date).getTime()-x.mousewheel.lastScrollTime>60)if(a<0)if(x.isEnd&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slideNext(),x.emit("onScroll",x,e);else if(x.isBeginning&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slidePrev(),x.emit("onScroll",x,e);x.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function m(a,t){a=e(a);var s,r,i,n=x.rtl?-1:1;s=a.attr("data-swiper-parallax")||"0",r=a.attr("data-swiper-parallax-x"),i=a.attr("data-swiper-parallax-y"),r||i?(r=r||"0",i=i||"0"):x.isHorizontal()?(r=s,i="0"):(i=s,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*n+"%":r*t*n+"px",i=i.indexOf("%")>=0?parseInt(i,10)*t+"%":i*t+"px",a.transform("translate3d("+r+", "+i+",0px)")}function u(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof a))return new a(t,s);var c={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},g=s&&s.virtualTranslate;s=s||{};var h={};for(var v in s)if("object"!=typeof s[v]||null===s[v]||(s[v].nodeType||s[v]===window||s[v]===document||"undefined"!=typeof Dom7&&s[v]instanceof Dom7||"undefined"!=typeof jQuery&&s[v]instanceof jQuery))h[v]=s[v];else{h[v]={};for(var f in s[v])h[v][f]=s[v][f]}for(var w in c)if(void 0===s[w])s[w]=c[w];else if("object"==typeof s[w])for(var y in c[w])void 0===s[w][y]&&(s[w][y]=c[w][y]);var x=this;if(x.params=s,x.originalParams=h,x.classNames=[],void 0!==e&&"undefined"!=typeof Dom7&&(e=Dom7),(void 0!==e||(e="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7))&&(x.$=e,x.currentBreakpoint=void 0,x.getActiveBreakpoint=function(){if(!x.params.breakpoints)return!1;var e,a=!1,t=[];for(e in x.params.breakpoints)x.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s<t.length;s++)(e=t[s])>=window.innerWidth&&!a&&(a=e);return a||"max"},x.setBreakpoint=function(){var e=x.getActiveBreakpoint();if(e&&x.currentBreakpoint!==e){var a=e in x.params.breakpoints?x.params.breakpoints[e]:x.originalParams,t=x.params.loop&&a.slidesPerView!==x.params.slidesPerView;for(var s in a)x.params[s]=a[s];x.currentBreakpoint=e,t&&x.destroyLoop&&x.reLoop(!0)}},x.params.breakpoints&&x.setBreakpoint(),x.container=e(t),0!==x.container.length)){if(x.container.length>1){var T=[];return x.container.each(function(){T.push(new a(this,s))}),T}
37x.container[0].swiper=x,x.container.data("swiper",x),x.classNames.push(x.params.containerModifierClass+x.params.direction),x.params.freeMode&&x.classNames.push(x.params.containerModifierClass+"free-mode"),x.support.flexbox||(x.classNames.push(x.params.containerModifierClass+"no-flexbox"),x.params.slidesPerColumn=1),x.params.autoHeight&&x.classNames.push(x.params.containerModifierClass+"autoheight"),(x.params.parallax||x.params.watchSlidesVisibility)&&(x.params.watchSlidesProgress=!0),x.params.touchReleaseOnEdges&&(x.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(x.params.effect)>=0&&(x.support.transforms3d?(x.params.watchSlidesProgress=!0,x.classNames.push(x.params.containerModifierClass+"3d")):x.params.effect="slide"),"slide"!==x.params.effect&&x.classNames.push(x.params.containerModifierClass+x.params.effect),"cube"===x.params.effect&&(x.params.resistanceRatio=0,x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.centeredSlides=!1,x.params.spaceBetween=0,x.params.virtualTranslate=!0),"fade"!==x.params.effect&&"flip"!==x.params.effect||(x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.watchSlidesProgress=!0,x.params.spaceBetween=0,void 0===g&&(x.params.virtualTranslate=!0)),x.params.grabCursor&&x.support.touch&&(x.params.grabCursor=!1),x.wrapper=x.container.children("."+x.params.wrapperClass),x.params.pagination&&(x.paginationContainer=e(x.params.pagination),x.params.uniqueNavElements&&"string"==typeof x.params.pagination&&x.paginationContainer.length>1&&1===x.container.find(x.params.pagination).length&&(x.paginationContainer=x.container.find(x.params.pagination)),"bullets"===x.params.paginationType&&x.params.paginationClickable?x.paginationContainer.addClass(x.params.paginationModifierClass+"clickable"):x.params.paginationClickable=!1,x.paginationContainer.addClass(x.params.paginationModifierClass+x.params.paginationType)),(x.params.nextButton||x.params.prevButton)&&(x.params.nextButton&&(x.nextButton=e(x.params.nextButton),x.params.uniqueNavElements&&"string"==typeof x.params.nextButton&&x.nextButton.length>1&&1===x.container.find(x.params.nextButton).length&&(x.nextButton=x.container.find(x.params.nextButton))),x.params.prevButton&&(x.prevButton=e(x.params.prevButton),x.params.uniqueNavElements&&"string"==typeof x.params.prevButton&&x.prevButton.length>1&&1===x.container.find(x.params.prevButton).length&&(x.prevButton=x.container.find(x.params.prevButton)))),x.isHorizontal=function(){return"horizontal"===x.params.direction},x.rtl=x.isHorizontal()&&("rtl"===x.container[0].dir.toLowerCase()||"rtl"===x.c
37ontainer.css("direction")),x.rtl&&x.classNames.push(x.params.containerModifierClass+"rtl"),x.rtl&&(x.wrongRTL="-webkit-box"===x.wrapper.css("display")),x.params.slidesPerColumn>1&&x.classNames.push(x.params.containerModifierClass+"multirow"),x.device.android&&x.classNames.push(x.params.containerModifierClass+"android"),x.container.addClass(x.classNames.join(" ")),x.translate=0,x.progress=0,x.velocity=0,x.lockSwipeToNext=function(){x.params.allowSwipeToNext=!1,x.params.allowSwipeToPrev===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipeToPrev=function(){x.params.allowSwipeToPrev=!1,x.params.allowSwipeToNext===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!1,x.params.grabCursor&&x.unsetGrabCursor()},x.unlockSwipeToNext=function(){x.params.allowSwipeToNext=!0,x.params.allowSwipeToPrev===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipeToPrev=function(){x.params.allowSwipeToPrev=!0,x.params.allowSwipeToNext===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!0,x.params.grabCursor&&x.setGrabCursor()},x.setGrabCursor=function(e){x.container[0].style.cursor="move",x.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",x.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",x.container[0].style.cursor=e?"grabbing":"grab"},x.unsetGrabCursor=function(){x.container[0].style.cursor=""},x.params.grabCursor&&x.setGrabCursor(),x.imagesToLoad=[],x.imagesLoaded=0,x.loadImage=function(e,a,t,s,r,i){function n(){i&&i()}var o;e.complete&&r?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},x.preloadImages=function(){function e(){void 0!==x&&null!==x&&x&&(void 0!==x.imagesLoaded&&x.imagesLoaded++,x.imagesLoaded===x.imagesToLoad.length&&(x.params.updateOnImagesReady&&x.update(),x.emit("onImagesReady",x)))}x.imagesToLoad=x.container.find("img");for(var a=0;a<x.imagesToLoad.length;a++)x.loadImage(x.imagesToLoad[a],x.imagesToLoad[a].currentSrc||x.imagesToLoad[a].getAttribute("src"),x.imagesToLoad[a].srcset||x.imagesToLoad[a].getAttribute("srcset"),x.imagesToLoad[a].sizes||x.imagesToLoad[a].getAttribute("sizes"),!0,e)},x.autoplayTimeoutId=void 0,x.autoplaying=!1,x.autoplayPaused=!1,x.startAutoplay=function(){return void 0===x.autoplayTimeoutId&&(!!x.params.autoplay&&(!x.autoplaying&&(x.autoplaying=!0,x.emit("onAutoplayStart",x),void i())))},x.stopAutoplay=function(e){x.autoplayTimeoutId&&(x.autoplayTimeoutId&&clearTimeout(x.autoplayTimeoutId),x.autoplaying=!1,x.autoplayTimeoutId=void 0,x.emit("onAutoplayStop",x))},x.pauseAutoplay=function(e){x.autoplayPaused||(x.autoplayTimeoutId&&clearTimeout(x.autoplayTimeoutId),x.autoplayPaused=!0,0===e?(x.autoplayPaused=!1,i()):x.wrapper.transitionEnd(function(){x&&(x.autoplayPaused=!1,x.autoplaying?i():x.stopAutoplay())}))},x.minTranslate=function(){return-x.snapGrid[0]},x.maxTranslate=function(){return-x.snapGrid[x.snapGrid.length-1]},x.updateAutoHeight=function(){var e,a=[],t=0;if("auto"!==x.params.slidesPerView&&x.params.slidesPerView>1)for(e=0;e<Math.ceil(x.params.slidesPerView);e++){var s=x.activeIndex+e;if(s>x.slides.length)break;a.push(x.slides.eq(s)[0])}else a.push(x.slides.eq(x.activeIndex)[0]);for(e=0;e<a.length;e++)if(void 0!==a[e]){var r=a[e].offsetHeight;t=r>t?r:t}t&&x.wrapper.css("height",t+"px")},x.updateContainerSize=function(){var e,a;e=void 0!==x.params.width?x.params.width:x.container[0].clientWidth,a=void 0!==x.params.height?x.params.height:x.container[0].clientHeight,0===e&&x.isHorizontal()||0===a&&!x.isHorizontal()||(e=e-parseInt(x.container.css("padding-left"),10)-parseInt(x.container.css("padding-right"),10),a=a-parseInt(x.container.css("padding-top"),10)-parseInt(x.container.css("padding-bottom"),10),x.width=e,x.height=a,x.size=x.isHorizontal()?x.width:x.height)},x.updateSlidesSize=function(){x.slides=x.wrapper.children("."+x.params.slideClass),x.snapGrid=[],x.slidesGrid=[],x.slidesSizesGrid=[];var e,a=x.params.spaceBetween,t=-x.params.slidesOffsetBefore,s=0,i=0;if(void 0!==x.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*x.size),x.virtualSize=-a,x.rtl?x.slides.css({marginLeft:"",marginTop:""}):x.slides.css({marginRight:"",marginBottom:""});var n;x.params.slidesPerColumn>1&&(n=Math.floor(x.slides.length/x.params.slidesPerColumn)===x.slides.length/x.params.slidesPerColumn?x.slides.length:Math.ceil(x.slides.length/x.params.slidesPerColumn)*x.params.slidesPerColumn,"auto"!==x.params.slidesPerView&&"row"===x.params.slidesPerColumnFill&&(n=Math.max(n,x.params.slidesPerView*x.params.slidesPerColumn)));var o,l=x.params.slidesPerColumn,p=n/l,d=p-(x.params.slidesPerColumn*p-x.slides.length);for(e=0;e<x.slides.length;e++){o=0;var m=x.slides.eq(e);
37if(x.params.slidesPerColumn>1){var u,c,g;"column"===x.params.slidesPerColumnFill?(c=Math.floor(e/l),g=e-c*l,(c>d||c===d&&g===l-1)&&++g>=l&&(g=0,c++),u=c+g*n/l,m.css({"-webkit-box-ordinal-group":u,"-moz-box-ordinal-group":u,"-ms-flex-order":u,"-webkit-order":u,order:u})):(g=Math.floor(e/p),c=e-g*p),m.css("margin-"+(x.isHorizontal()?"top":"left"),0!==g&&x.params.spaceBetween&&x.params.spaceBetween+"px").attr("data-swiper-column",c).attr("data-swiper-row",g)}"none"!==m.css("display")&&("auto"===x.params.slidesPerView?(o=x.isHorizontal()?m.outerWidth(!0):m.outerHeight(!0),x.params.roundLengths&&(o=r(o))):(o=(x.size-(x.params.slidesPerView-1)*a)/x.params.slidesPerView,x.params.roundLengths&&(o=r(o)),x.isHorizontal()?x.slides[e].style.width=o+"px":x.slides[e].style.height=o+"px"),x.slides[e].swiperSlideSize=o,x.slidesSizesGrid.push(o),x.params.centeredSlides?(t=t+o/2+s/2+a,0===s&&0!==e&&(t=t-x.size/2-a),0===e&&(t=t-x.size/2-a),Math.abs(t)<.001&&(t=0),i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t)):(i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t),t=t+o+a),x.virtualSize+=o+a,s=o,i++)}x.virtualSize=Math.max(x.virtualSize,x.size)+x.params.slidesOffsetAfter;var h;if(x.rtl&&x.wrongRTL&&("slide"===x.params.effect||"coverflow"===x.params.effect)&&x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}),x.support.flexbox&&!x.params.setWrapperSize||(x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"})),x.params.slidesPerColumn>1&&(x.virtualSize=(o+x.params.spaceBetween)*n,x.virtualSize=Math.ceil(x.virtualSize/x.params.slidesPerColumn)-x.params.spaceBetween,x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"}),x.params.centeredSlides)){for(h=[],e=0;e<x.snapGrid.length;e++)x.snapGrid[e]<x.virtualSize+x.snapGrid[0]&&h.push(x.snapGrid[e]);x.snapGrid=h}if(!x.params.centeredSlides){for(h=[],e=0;e<x.snapGrid.length;e++)x.snapGrid[e]<=x.virtualSize-x.size&&h.push(x.snapGrid[e]);x.snapGrid=h,Math.floor(x.virtualSize-x.size)-Math.floor(x.snapGrid[x.snapGrid.length-1])>1&&x.snapGrid.push(x.virtualSize-x.size)}0===x.snapGrid.length&&(x.snapGrid=[0]),0!==x.params.spaceBetween&&(x.isHorizontal()?x.rtl?x.slides.css({marginLeft:a+"px"}):x.slides.css({marginRight:a+"px"}):x.slides.css({marginBottom:a+"px"})),x.params.watchSlidesProgress&&x.updateSlidesOffset()}},x.updateSlidesOffset=function(){for(var e=0;e<x.slides.length;e++)x.slides[e].swiperSlideOffset=x.isHorizontal()?x.slides[e].offsetLeft:x.slides[e].offsetTop},x.currentSlidesPerView=function(){var e,a,t=1;if(x.params.centeredSlides){var s,r=x.slides[x.activeIndex].swiperSlideSize;for(e=x.activeIndex+1;e<x.slides.length;e++)x.slides[e]&&!s&&(r+=x.slides[e].swiperSlideSize,t++,r>x.size&&(s=!0));for(a=x.activeIndex-1;a>=0;a--)x.slides[a]&&!s&&(r+=x.slides[a].swiperSlideSize,t++,r>x.size&&(s=!0))}else for(e=x.activeIndex+1;e<x.slides.length;e++)x.slidesGrid[e]-x.slidesGrid[x.activeIndex]<x.size&&t++;return t},x.updateSlidesProgress=function(e){if(void 0===e&&(e=x.translate||0),0!==x.slides.length){void 0===x.slides[0].swiperSlideOffset&&x.updateSlidesOffset();var a=-e;x.rtl&&(a=e),x.slides.removeClass(x.params.slideVisibleClass);for(var t=0;t<x.slides.length;t++){var s=x.slides[t],r=(a+(x.params.centeredSlides?x.minTranslate():0)-s.swiperSlideOffset)/(s.swiperSlideSize+x.params.spaceBetween);if(x.params.watchSlidesVisibility){var i=-(a-s.swiperSlideOffset),n=i+x.slidesSizesGrid[t];(i>=0&&i<x.size||n>0&&n<=x.size||i<=0&&n>=x.size)&&x.slides.eq(t).addClass(x.params.slideVisibleClass)}s.progress=x.rtl?-r:r}}},x.updateProgress=function(e){void 0===e&&(e=x.translate||0);var a=x.maxTranslate()-x.minTranslate(),t=x.isBeginning,s=x.isEnd;0===a?(x.progress=0,x.isBeginning=x.isEnd=!0):(x.progress=(e-x.minTranslate())/a,x.isBeginning=x.progress<=0,x.isEnd=x.progress>=1),x.isBeginning&&!t&&x.emit("onReachBeginning",x),x.isEnd&&!s&&x.emit("onReachEnd",x),x.params.watchSlidesProgress&&x.updateSlidesProgress(e),x.emit("onProgress",x,x.progress)},x.updateActiveIndex=function(){var e,a,t,s=x.rtl?x.translate:-x.translate;
37for(a=0;a<x.slidesGrid.length;a++)void 0!==x.slidesGrid[a+1]?s>=x.slidesGrid[a]&&s<x.slidesGrid[a+1]-(x.slidesGrid[a+1]-x.slidesGrid[a])/2?e=a:s>=x.slidesGrid[a]&&s<x.slidesGrid[a+1]&&(e=a+1):s>=x.slidesGrid[a]&&(e=a);x.params.normalizeSlideIndex&&(e<0||void 0===e)&&(e=0),t=Math.floor(e/x.params.slidesPerGroup),t>=x.snapGrid.length&&(t=x.snapGrid.length-1),e!==x.activeIndex&&(x.snapIndex=t,x.previousIndex=x.activeIndex,x.activeIndex=e,x.updateClasses(),x.updateRealIndex())},x.updateRealIndex=function(){x.realIndex=parseInt(x.slides.eq(x.activeIndex).attr("data-swiper-slide-index")||x.activeIndex,10)},x.updateClasses=function(){x.slides.removeClass(x.params.slideActiveClass+" "+x.params.slideNextClass+" "+x.params.slidePrevClass+" "+x.params.slideDuplicateActiveClass+" "+x.params.slideDuplicateNextClass+" "+x.params.slideDuplicatePrevClass);var a=x.slides.eq(x.activeIndex);a.addClass(x.params.slideActiveClass),s.loop&&(a.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass));var t=a.next("."+x.params.slideClass).addClass(x.params.slideNextClass);x.params.loop&&0===t.length&&(t=x.slides.eq(0),t.addClass(x.params.slideNextClass));var r=a.prev("."+x.params.slideClass).addClass(x.params.slidePrevClass);if(x.params.loop&&0===r.length&&(r=x.slides.eq(-1),r.addClass(x.params.slidePrevClass)),s.loop&&(t.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass),r.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass)),x.paginationContainer&&x.paginationContainer.length>0){var i,n=x.params.loop?Math.ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length;if(x.params.loop?(i=Math.ceil((x.activeIndex-x.loopedSlides)/x.params.slidesPerGroup),i>x.slides.length-1-2*x.loopedSlides&&(i-=x.slides.length-2*x.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==x.params.paginationType&&(i=n+i)):i=void 0!==x.snapIndex?x.snapIndex:x.activeIndex||0,"bullets"===x.params.paginationType&&x.bullets&&x.bullets.length>0&&(x.bullets.removeClass(x.params.bulletActiveClass),x.paginationContainer.length>1?x.bullets.each(function(){e(this).index()===i&&e(this).addClass(x.params.bulletActiveClass)}):x.bullets.eq(i).addClass(x.params.bulletActiveClass)),"fraction"===x.params.paginationType&&(x.paginationContainer.find("."+x.params.paginationCurrentClass).text(i+1),x.paginationContainer.find("."+x.params.paginationTotalClass).text(n)),"progress"===x.params.paginationType){var o=(i+1)/n,l=o,p=1;x.isHorizontal()||(p=o,l=1),x.paginationContainer.find("."+x.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(x.params.speed)}"custom"===x.params.paginationType&&x.params.paginationCustomRender&&(x.paginationContainer.html(x.params.paginationCustomRender(x,i+1,n)),x.emit("onPaginationRendered",x,x.paginationContainer[0]))}x.params.loop||(x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.isBeginning?(x.prevButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.prevButton)):(x.prevButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.prevButton))),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.isEnd?(x.nextButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.nextButton)):(x.nextButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.nextButton))))},x.updatePagination=function(){if(x.params.pagination&&x.paginationContainer&&x.paginationContainer.length>0){var e="";if("bullets"===x.params.paginationType){for(var a=x.params.loop?Math.
37ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length,t=0;t<a;t++)e+=x.params.paginationBulletRender?x.params.paginationBulletRender(x,t,x.params.bulletClass):"<"+x.params.paginationElement+' class="'+x.params.bulletClass+'"></'+x.params.paginationElement+">";x.paginationContainer.html(e),x.bullets=x.paginationContainer.find("."+x.params.bulletClass),x.params.paginationClickable&&x.params.a11y&&x.a11y&&x.a11y.initPagination()}"fraction"===x.params.paginationType&&(e=x.params.paginationFractionRender?x.params.paginationFractionRender(x,x.params.paginationCurrentClass,x.params.paginationTotalClass):'<span class="'+x.params.paginationCurrentClass+'"></span> / <span class="'+x.params.paginationTotalClass+'"></span>',x.paginationContainer.html(e)),"progress"===x.params.paginationType&&(e=x.params.paginationProgressRender?x.params.paginationProgressRender(x,x.params.paginationProgressbarClass):'<span class="'+x.params.paginationProgressbarClass+'"></span>',x.paginationContainer.html(e)),"custom"!==x.params.paginationType&&x.emit("onPaginationRendered",x,x.paginationContainer[0])}},x.update=function(e){function a(){x.rtl,x.translate;t=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate()),x.setWrapperTranslate(t),x.updateActiveIndex(),x.updateClasses()}if(x){x.updateContainerSize(),x.updateSlidesSize(),x.updateProgress(),x.updatePagination(),x.updateClasses(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set();var t;if(e){x.controller&&x.controller.spline&&(x.controller.spline=void 0),x.params.freeMode?(a(),x.params.autoHeight&&x.updateAutoHeight()):(("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0))||a()}else x.params.autoHeight&&x.updateAutoHeight()}},x.onResize=function(e){x.params.onBeforeResize&&x.params.onBeforeResize(x),x.params.breakpoints&&x.setBreakpoint();var a=x.params.allowSwipeToPrev,t=x.params.allowSwipeToNext;x.params.allowSwipeToPrev=x.params.allowSwipeToNext=!0,x.updateContainerSize(),x.updateSlidesSize(),("auto"===x.params.slidesPerView||x.params.freeMode||e)&&x.updatePagination(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set(),x.controller&&x.controller.spline&&(x.controller.spline=void 0);var s=!1;if(x.params.freeMode){var r=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate());x.setWrapperTranslate(r),x.updateActiveIndex(),x.updateClasses(),x.params.autoHeight&&x.updateAutoHeight()}else x.updateClasses(),s=("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0);x.params.lazyLoading&&!s&&x.lazy&&x.lazy.load(),x.params.allowSwipeToPrev=a,x.params.allowSwipeToNext=t,x.params.onAfterResize&&x.params.onAfterResize(x)},x.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?x.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(x.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),x.touchEvents={start:x.support.touch||!x.params.simulateTouch?"touchstart":x.touchEventsDesktop.start,move:x.support.touch||!x.params.simulateTouch?"touchmove":x.touchEventsDesktop.move,end:x.support.touch||!x.params.simulateTouch?"touchend":x.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===x.params.touchEventsTarget?x.container:x.wrapper).addClass("swiper-wp8-"+x.params.direction),x.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",r="container"===x.params.touchEventsTarget?x.container[0]:x.wrapper[0],i=x.support.touch?r:document,n=!!x.params.nested;if(x.browser.ie)r[t](x.touchEvents.start,x.onTouchStart,!1),i[t](x.touchEvents.move,x.onTouchMove,n),i[t](x.touchEvents.end,x.onTouchEnd,!1);else{if(x.support.touch){var o=!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1};r[t](x.touchEvents.start,x.onTouchStart,o),r[t](x.touchEvents.move,x.onTouchMove,n),r[t](x.touchEvents.end,x.onTouchEnd,o)}(s.simulateTouch&&!x.device.ios&&!x.device.android||s.simulateTouch&&!x.support.touch&&x.device.ios)&&(r[t]("mousedown",x.onTouchStart,!1),document[t]("mousemove",x.onTouchMove,n),document[t]("mouseup",x.onTouchEnd,!1))}window[t]("resize",x.onResize),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.nextButton[a]("click",x.onClickNext),x.params.a11y&&x.a11y&&x.nextButton[a]("keydown",x.a11y.onEnterKey)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.prevButton[a]("click",x.onClickPrev),x.params.a11y&&x.a11y&&x.prevButton[a]("keydown",x.a11y.onEnterKey)),x.params.pagination&&x.params.paginationClickable&&(x.paginationContainer[a]("click","."+x.params.bulletClass,x.onClickIndex),x.params.a11y&&x.a11y&&x.paginationContainer[a]("keydown","."+x.params.bulletClass,x.a11y.onEnterKey)),(x.params.preventClicks||x.params.preventClicksPropagation)&&r[t]("click",x.preventClicks,!0)},x.attachEvents=function(){x.initEvents()},x.detachEvents=function(){x.initEvents(!0)},x.allowClick=!0,x.preventClicks=function(e){x.allowClick||(x.params.preventClicks&&e.preventDefault(),x.params.preventClicksPropagation&&x.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},x.onClickNext=function(e){e.preventDefault(),x.isEnd&&!x.params.loop||x.slideNext()},x.onClickPrev=function(e){e.preventDefault(),x.isBeginning&&!x.params.loop||x.slidePrev()},x.onClickIndex=function(a){a.preventDefault();var t=e(this).index()*x.params.slidesPerGroup
38;x.params.loop&&(t+=x.loopedSlides),x.slideTo(t)},x.updateClickedSlide=function(a){var t=n(a,"."+x.params.slideClass),s=!1;if(t)for(var r=0;r<x.slides.length;r++)x.slides[r]===t&&(s=!0);if(!t||!s)return x.clickedSlide=void 0,void(x.clickedIndex=void 0);if(x.clickedSlide=t,x.clickedIndex=e(t).index(),x.params.slideToClickedSlide&&void 0!==x.clickedIndex&&x.clickedIndex!==x.activeIndex){var i,o=x.clickedIndex,l="auto"===x.params.slidesPerView?x.currentSlidesPerView():x.params.slidesPerView;if(x.params.loop){if(x.animating)return;i=parseInt(e(x.clickedSlide).attr("data-swiper-slide-index"),10),x.params.centeredSlides?o<x.loopedSlides-l/2||o>x.slides.length-x.loopedSlides+l/2?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o):o>x.slides.length-l?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o)}else x.slideTo(o)}};var b,C,S,z,M,P,E,I,k,D,L="input, select, textarea, button, video",B=Date.now(),H=[];x.animating=!1,x.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var G,X;
38x.onTouchStart=function(a){if(a.originalEvent&&(a=a.originalEvent),(G="touchstart"===a.type)||!("which"in a)||3!==a.which){if(x.params.noSwiping&&n(a,"."+x.params.noSwipingClass))return void(x.allowClick=!0);if(!x.params.swipeHandler||n(a,x.params.swipeHandler)){var t=x.touches.currentX="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,s=x.touches.currentY="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY;if(!(x.device.ios&&x.params.iOSEdgeSwipeDetection&&t<=x.params.iOSEdgeSwipeThreshold)){if(b=!0,C=!1,S=!0,M=void 0,X=void 0,x.touches.startX=t,x.touches.startY=s,z=Date.now(),x.allowClick=!0,x.updateContainerSize(),x.swipeDirection=void 0,x.params.threshold>0&&(I=!1),"touchstart"!==a.type){var r=!0;e(a.target).is(L)&&(r=!1),document.activeElement&&e(document.activeElement).is(L)&&document.activeElement.blur(),r&&a.preventDefault()}x.emit("onTouchStart",x,a)}}}},x.onTouchMove=function(a){if(a.originalEvent&&(a=a.originalEvent),!G||"mousemove"!==a.type){if(a.preventedByNestedSwiper)return x.touches.startX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,void(x.touches.startY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY);if(x.params.onlyExternal)return x.allowClick=!1,void(b&&(x.touches.startX=x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.startY=x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,z=Date.now()));if(G&&x.params.touchReleaseOnEdges&&!x.params.loop)if(x.isHorizontal()){if(x.touches.currentX<x.touches.startX&&x.translate<=x.maxTranslate()||x.touches.currentX>x.touches.startX&&x.translate>=x.minTranslate())return}else if(x.touches.currentY<x.touches.startY&&x.translate<=x.maxTranslate()||x.touches.currentY>x.touches.startY&&x.translate>=x.minTranslate())return;if(G&&document.activeElement&&a.target===document.activeElement&&e(a.target).is(L))return C=!0,void(x.allowClick=!1);if(S&&x.emit("onTouchMove",x,a),!(a.targetTouches&&a.targetTouches.length>1)){if(x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,void 0===M){var t;x.isHorizontal()&&x.touches.currentY===x.touches.startY||!x.isHorizontal()&&x.touches.currentX===x.touches.startX?M=!1:(t=180*Math.atan2(Math.abs(x.touches.currentY-x.touches.startY),Math.abs(x.touches.currentX-x.touches.startX))/Math.PI,M=x.isHorizontal()?t>x.params.touchAngle:90-t>x.params.touchAngle)}if(M&&x.emit("onTouchMoveOpposite",x,a),void 0===X&&(x.touches.currentX===x.touches.startX&&x.touches.currentY===x.touches.startY||(X=!0)),b){if(M)return void(b=!1);if(X){x.allowClick=!1,x.emit("onSliderMove",x,a),a.preventDefault(),x.params.touchMoveStopPropagation&&!x.params.nested&&a.stopPropagation(),C||(s.loop&&x.fixLoop(),E=x.getWrapperTranslate(),x.setWrapperTransition(0),x.animating&&x.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),x.params.autoplay&&x.autoplaying&&(x.params.autoplayDisableOnInteraction?x.stopAutoplay():x.pauseAutoplay()),D=!1,!x.params.grabCursor||x.params.allowSwipeToNext!==!0&&x.params.allowSwipeToPrev!==!0||x.setGrabCursor(!0)),C=!0;var r=x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY;r*=x.params.touchRatio,x.rtl&&(r=-r),x.swipeDirection=r>0?"prev":"next",P=r+E;var i=!0;if(r>0&&P>x.minTranslate()?(i=!1,x.params.resistance&&(P=x.minTranslate()-1+Math.pow(-x.minTranslate()+E+r,x.params.resistanceRatio))):r<0&&P<x.maxTranslate()&&(i=!1,x.params.resistance&&(P=x.maxTranslate()+1-Math.pow(x.maxTranslate()-E-r,x.params.resistanceRatio))),i&&(a.preventedByNestedSwiper=!0),!x.params.allowSwipeToNext&&"next"===x.swipeDirection&&P<E&&(P=E),!x.params.allowSwipeToPrev&&"prev"===x.swipeDirection&&P>E&&(P=E),x.params.threshold>0){if(!(Math.abs(r)>x.params.threshold||I))return void(P=E);if(!I)return I=!0,x.touches.startX=x.touches.currentX,x.touches.startY=x.touches.currentY,P=E,void(x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY)}x.params.followFinger&&((x.params.freeMode||x.params.watchSlidesProgress)&&x.updateActiveIndex(),x.params.freeMode&&(0===H.length&&H.push({position:x.touches[x.isHorizontal()?"startX":"startY"],time:z}),H.push({position:x.touches[x.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),x.updateProgress(P),x.setWrapperTranslate(P))}}}}}
vendor: 10,281 bytes, line 38
38,x.onTouchEnd=function(a){if(a.originalEvent&&(a=a.originalEvent),S&&x.emit("onTouchEnd",x,a),S=!1,b){x.params.grabCursor&&C&&b&&(x.params.allowSwipeToNext===!0||x.params.allowSwipeToPrev===!0)&&x.setGrabCursor(!1);var t=Date.now(),s=t-z;if(x.allowClick&&(x.updateClickedSlide(a),x.emit("onTap",x,a),s<300&&t-B>300&&(k&&clearTimeout(k),k=setTimeout(function(){x&&(x.params.paginationHide&&x.paginationContainer.length>0&&!e(a.target).hasClass(x.params.bulletClass)&&x.paginationContainer.toggleClass(x.params.paginationHiddenClass),x.emit("onClick",x,a))},300)),s<300&&t-B<300&&(k&&clearTimeout(k),x.emit("onDoubleTap",x,a))),B=Date.now(),setTimeout(function(){x&&(x.allowClick=!0)},0),!b||!C||!x.swipeDirection||0===x.touches.diff||P===E)return void(b=C=!1);b=C=!1;var r;if(r=x.params.followFinger?x.rtl?x.translate:-x.translate:-P,x.params.freeMode){if(r<-x.minTranslate())return void x.slideTo(x.activeIndex);if(r>-x.maxTranslate())return void(x.slides.length<x.snapGrid.length?x.slideTo(x.snapGrid.length-1):x.slideTo(x.slides.length-1));if(x.params.freeModeMomentum){if(H.length>1){var i=H.pop(),n=H.pop(),o=i.position-n.position,l=i.time-n.time;x.velocity=o/l,x.velocity=x.velocity/2,Math.abs(x.velocity)<x.params.freeModeMinimumVelocity&&(x.velocity=0),(l>150||(new window.Date).getTime()-i.time>300)&&(x.velocity=0)}else x.velocity=0;x.velocity=x.velocity*x.params.freeModeMomentumVelocityRatio,H.length=0;var p=1e3*x.params.freeModeMomentumRatio,d=x.velocity*p,m=x.translate+d;x.rtl&&(m=-m);var u,c=!1,g=20*Math.abs(x.velocity)*x.params.freeModeMomentumBounceRatio;if(m<x.maxTranslate())x.params.freeModeMomentumBounce?(m+x.maxTranslate()<-g&&(m=x.maxTranslate()-g),u=x.maxTranslate(),c=!0,D=!0):m=x.maxTranslate();else if(m>x.minTranslate())x.params.freeModeMomentumBounce?(m-x.minTranslate()>g&&(m=x.minTranslate()+g),u=x.minTranslate(),c=!0,D=!0):m=x.minTranslate();else if(x.params.freeModeSticky){var h,v=0;for(v=0;v<x.snapGrid.length;v+=1)if(x.snapGrid[v]>-m){h=v;break}m=Math.abs(x.snapGrid[h]-m)<Math.abs(x.snapGrid[h-1]-m)||"next"===x.swipeDirection?x.snapGrid[h]:x.snapGrid[h-1],x.rtl||(m=-m)}if(0!==x.velocity)p=x.rtl?Math.abs((-m-x.translate)/x.velocity):Math.abs((m-x.translate)/x.velocity);else if(x.params.freeModeSticky)return void x.slideReset();x.params.freeModeMomentumBounce&&c?(x.updateProgress(u),x.setWrapperTransition(p),x.setWrapperTranslate(m),x.onTransitionStart(),x.animating=!0,x.wrapper.transitionEnd(function(){x&&D&&(x.emit("onMomentumBounce",x),x.setWrapperTransition(x.params.speed),x.setWrapperTranslate(u),x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd()}))})):x.velocity?(x.updateProgress(m),x.setWrapperTransition(p),x.setWrapperTranslate(m),x.onTransitionStart(),x.animating||(x.animating=!0,x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd()}))):x.updateProgress(m),x.updateActiveIndex()}return void((!x.params.freeModeMomentum||s>=x.params.longSwipesMs)&&(x.updateProgress(),x.updateActiveIndex()))}var f,w=0,y=x.slidesSizesGrid[0];for(f=0;f<x.slidesGrid.length;f+=x.params.slidesPerGroup)void 0!==x.slidesGrid[f+x.params.slidesPerGroup]?r>=x.slidesGrid[f]&&r<x.slidesGrid[f+x.params.slidesPerGroup]&&(w=f,y=x.slidesGrid[f+x.params.slidesPerGroup]-x.slidesGrid[f]):r>=x.slidesGrid[f]&&(w=f,y=x.slidesGrid[x.slidesGrid.length-1]-x.slidesGrid[x.slidesGrid.length-2]);var T=(r-x.slidesGrid[w])/y;if(s>x.params.longSwipesMs){if(!x.params.longSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&(T>=x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w)),"prev"===x.swipeDirection&&(T>1-x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w))}else{if(!x.params.shortSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&x.slideTo(w+x.params.slidesPerGroup),"prev"===x.swipeDirection&&x.slideTo(w)}}},x._slideTo=function(e,a){return x.slideTo(e,a,!0,!0)},x.slideTo=function(e,a,t,s){void 0===t&&(t=!0),void 0===e&&(e=0),e<0&&(e=0),x.snapIndex=Math.floor(e/x.params.slidesPerGroup),x.snapIndex>=x.snapGrid.length&&(x.snapIndex=x.snapGrid.length-1);var r=-x.snapGrid[x.snapIndex];if(x.params.autoplay&&x.autoplaying&&(s||!x.params.autoplayDisableOnInteraction?x.pauseAutoplay(a):x.stopAutoplay()),x.updateProgress(r),x.params.normalizeSlideIndex)for(var i=0;i<x.slidesGrid.length;i++)-Math.floor(100*r)>=Math.floor(100*x.slidesGrid[i])&&(e=i);return!(!x.params.allowSwipeToNext&&r<x.translate&&r<x.minTranslate())&&(!(!x.params.allowSwipeToPrev&&r>x.translate&&r>x.maxTranslate()&&(x.activeIndex||0)!==e)&&(void 0===a&&(a=x.params.speed),x.previousIndex=x.activeIndex||0,x.activeIndex=e,x.updateRealIndex(),x.rtl&&-r===x.translate||!x.rtl&&r===x.translate?(x.params.autoHeight&&x.updateAutoHeight(),x.updateClasses(),"slide"!==x.params.effect&&x.setWrapperTranslate(r),!1):(x.updateClasses(),x.onTransitionStart(t),0===a||x.browser.lteIE9?(x.setWrapperTranslate(r),x.setWrapperTransition(0),x.onTransitionEnd(t)):(x.setWrapperTranslate(r),x.setWrapperTransition(a),x.animating||(x.animating=!0,x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd(t)}))),!0)))},x.onTransitionStart=function(e){void 0===e&&(e=!0),x.params.autoHeight&&x.updateAutoHeight(),x.lazy&&x.lazy.onTransitionStart(),e&&(x.emit("onTransitionStart",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeStart",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextStart",x):x.emit("onSlidePrevStart",x)))},x.onTransitionEnd=function(e){x.animating=!1,x.setWrapperTransition(0),void 0===e&&(e=!0),x.lazy&&x.lazy.onTransitionEnd(),e&&(x.emit("onTransitionEnd",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeEnd",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextEnd",x):x.emit("onSlidePrevEnd",x))),x.params.history&&x.history&&x.history.setHistory(x.params.history,x.activeIndex),x.params.hashnav&&x.hashnav&&x.hashnav.setHash()},x.slideNext=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)}return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)},x._slideNext=function(e){return x.slideNext(!0,e,!0)},x.slidePrev=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex-1,a,e,t)}return x.slideTo(x.activeIndex-1,a,e,t)},x._slidePrev=function(e){return x.slidePrev(!0,e,!0)},x.slideReset=function(e,a,t){return x.slideTo(x.activeIndex,a,e)},x.disableTouchControl=function(){return x.params.onlyExternal=!0,!0},x.enableTouchControl=function(){return x.params.onlyExternal=!1,!0},x.setWrapperTransition=function(e,a){x.wrapper.transition(e),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTransition(e),x.params.parallax&&x.parallax&&x.parallax.setTransition(e),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTransition(e),x.params.control&&x.controller&&x.controller.setTransition(e,a),x.emit("onSetTransition",x,e)},x.setWrapperTranslate=function(e,a,t){var s=0,i=0;x.isHorizontal()?s=x.rtl?-e:e:i=e,x.params.roundLengths&&(s=r(s),i=r(i)),x.params.virtualTranslate||(x.support.transforms3d?x.wrapper.transform("translate3d("+s+"px, "+i+"px, 0px)"):x.wrapper.transform("translate("+s+"px, "+i+"px)")),x.translate=x.isHorizontal()?s:i;var n,o=x.maxTranslate()-x.minTranslate();n=0===o?0:(e-x.minTranslate())/o,n!==x.progress&&x.updateProgress(e),a&&x.updateActiveIndex(),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTranslate(x.translate),x.params.parallax&&x.parallax&&x.parallax.setTranslate(x.translate),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTranslate(x.translate),x.params.control&&x.controller&&x.controller.setTranslate(x.translate,t),x.emit("onSetTranslate",x,x.translate)},x.getTranslate=function(e,a){var t,s,r,i;return void 0===a&&(a="x"),x.params.virtualTranslate?x.rtl?-x.translate:x.translate:(r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(s=r.transform||r.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new window.WebKitCSSMatrix("none"===s?"":s)):(i=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),x.rtl&&s&&(s=-s),s||0)},x.getWrapperTranslate=function(e){return void 0===e&&(e=x.isHorizontal()?"x":"y"),x.getTranslate(x.wrapper[0],e)},x.observers=[],x.initObservers=function(){if(x.params.observeParents)for(var e=x.container.parents(),a=0;a<e.length;a++)o(e[a]);o(x.container[0],{childList:!1}),o(x.wrapper[0],{attributes:!1})},x.disconnectObservers=function(){for(var e=0;e<x.observers.length;e++)x.observers[e].disconnect();x.observers=[]},x.createLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove();var a=x.wrapper.children("."+x.params.slideClass);"auto"!==x.params.slidesPerView||x.params.loopedSlides||(x.params.loopedSlides=a.length),x.loopedSlides=parseInt(x.params.loopedSlides||x.params.slidesPerView,10),x.loopedSlides=x.loopedSlides+x.params.loopAdditionalSlides,x.loopedSlides>a.length&&(x.loopedSlides=a.length);var t,s=[],r=[];for(a.each(function(t,i){var n=e(this);t<x.loopedSlides&&r.push(i),t<a.length&&t>=a.length-x.loopedSlides&&s.push(i),n.attr("data-swiper-slide-index",t)}),t=0;t<r.length;t++)x.wrapper.append(e(r[t].cloneNode(!0)).addClass(x.params.slideDuplicateClass));for(t=s.length-1;t>=0;t--)x.wrapper.prepend(e(s[t].cloneNode(!0)).addClass(x.params.slideDuplicateClass))},x.destroyLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove(),x.slides.removeAttr("data-swiper-slide-index")},x.reLoop=function(e){var a=x.activeIndex-x.loopedSlides;x.destroyLoop(),x.createLoop(),x.updateSlidesSize(),e&&x.slideTo(a+x.loopedSlides,0,!1)},x.fixLoop=function(){var e;x.activeIndex<x.loopedSlides?(e=x.slides.length-3*x.loopedSlides+x.activeIndex,e+=x.loopedSlides,x.slideTo(e,0,!1,!0)):("auto"===x.params.slidesPerView&&x.activeIndex>=2*x.loopedSlides||x.activeIndex>
38x.slides.length-2*x.params.slidesPerView)&&(e=-x.slides.length+x.activeIndex+x.loopedSlides,e+=x.loopedSlides,x.slideTo(e,0,!1,!0))},x.appendSlide=function(e){if(x.params.loop&&x.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a<e.length;a++)e[a]&&x.wrapper.append(e[a]);else x.wrapper.append(e);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0)},x.prependSlide=function(e){x.params.loop&&x.destroyLoop();var a=x.activeIndex+1;if("object"==typeof e&&e.length){for(var t=0;t<e.length;t++)e[t]&&x.wrapper.prepend(e[t]);a=x.activeIndex+e.length}else x.wrapper.prepend(e);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0),x.slideTo(a,0,!1)},x.removeSlide=function(e){x.params.loop&&(x.destroyLoop(),x.slides=x.wrapper.children("."+x.params.slideClass));var a,t=x.activeIndex;if("object"==typeof e&&e.length){for(var s=0;s<e.length;s++)a=e[s],x.slides[a]&&x.slides.eq(a).remove(),a<t&&t--;t=Math.max(t,0)}else a=e,x.slides[a]&&x.slides.eq(a).remove(),a<t&&t--,t=Math.max(t,0);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0),x.params.loop?x.slideTo(t+x.loopedSlides,0,!1):x.slideTo(t,0,!1)},x.removeAllSlides=function(){for(var e=[],a=0;a<x.slides.length;a++)e.push(a);x.removeSlide(e)},x.effects={fade:{setTranslate:function(){for(var e=0;e<x.slides.length;e++){var a=x.slides.eq(e),t=a[0].swiperSlideOffset,s=-t;x.params.virtualTranslate||(s-=x.translate);var r=0;x.isHorizontal()||(r=s,s=0);var i=x.params.fade.crossFade?Math.max(1-Math.abs(a[0].progress),0):1+Math.min(Math.max(a[0].progress,-1),0);a.css({opacity:i}).transform("translate3d("+s+"px, "+r+"px, 0px)")}},setTransition:function(e){if(x.slides.transition(e),x.params.virtualTranslate&&0!==e){var a=!1;x.slides.transitionEnd(function(){if(!a&&x){a=!0,x.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],t=0;t<e.length;t++)x.wrapper.trigger(e[t])}})}}},flip:{setTranslate:function(){for(var a=0;a<x.slides.length;a++){var t=x.slides.eq(a),s=t[0].progress;x.params.flip.limitRotation&&(s=Math.max(Math.min(t[0].progress,1),-1));var r=t[0].swiperSlideOffset,i=-180*s,n=i,o=0,l=-r,p=0;if(x.isHorizontal()?x.rtl&&(n=-n):(p=l,l=0,o=-n,n=0),t[0].style.zIndex=-Math.abs(Math.round(s))+x.slides.length,x.params.flip.slideShadows){var d=x.isHorizontal()?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),m=x.isHorizontal()?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===d.length&&(d=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),t.append(d)),0===m.length&&(m=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),t.append(m)),d.length&&(d[0].style.opacity=Math.max(-s,0)),m.length&&(m[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(a){if(x.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a),x.params.virtualTranslate&&0!==a){var t=!1;x.slides.eq(x.activeIndex).transitionEnd(function(){if(!t&&x&&e(this).hasClass(x.params.slideActiveClass)){t=!0,x.animating=!1;for(var a=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s<a.length;s++)x.wrapper.trigger(a[s])}})}}},cube:{setTranslate:function(){var a,t=0;x.params.cube.shadow&&(x.isHorizontal()?(a=x.wrapper.find(".swiper-cube-shadow"),0===a.length&&(a=e('<div class="swiper-cube-shadow"></div>'),x.wrapper.append(a)),a.css({height:x.width+"px"})):(a=x.container.find(".swiper-cube-shadow"),0===a.length&&(a=e('<div class="swiper-cube-shadow"></div>'),x.container.append(a))));for(var s=0;s<x.slides.length;s++){var r=x.slides.eq(s),i=90*s,n=Math.floor(i/360);x.rtl&&(i=-i,n=Math.floor(-i/360));var o=Math.max(Math.min(r[0].progress,1),-1),l=0,p=0,d=0;s%4==0?(l=4*-n*x.size,d=0):(s-1)%4==0?(l=0,d=4*-n*x.size):(s-2)%4==0?(l=x.size+4*n*x.size,d=x.size):(s-3)%4==0&&(l=-x.size,d=3*x.size+4*x.size*n),x.rtl&&(l=-l),x.isHorizontal()||(p=l,l=0);var m="rotateX("+(x.isHorizontal()?0:-i)+"deg) rotateY("+(x.isHorizontal()?i:0)+"deg) translate3d("+l+"px, "+p+"px, "+d+"px)";if(o<=1&&o>
38-1&&(t=90*s+90*o,x.rtl&&(t=90*-s-90*o)),r.transform(m),x.params.cube.slideShadows){var u=x.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),c=x.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===u.length&&(u=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),r.append(u)),0===c.length&&(c=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),r.append(c)),u.length&&(u[0].style.opacity=Math.max(-o,0)),c.length&&(c[0].style.opacity=Math.max(o,0))}}if(x.wrapper.css({"-webkit-transform-origin":"50% 50% -"+x.size/2+"px","-moz-transform-origin":"50% 50% -"+x.size/2+"px","-ms-transform-origin":"50% 50% -"+x.size/2+"px","transform-origin":"50% 50% -"+x.size/2+"px"}),x.params.cube.shadow)if(x.isHorizontal())a.transform("translate3d(0px, "+(x.width/2+x.params.cube.shadowOffset)+"px, "+-x.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+x.params.cube.shadowScale+")");else{var g=Math.abs(t)-90*Math.floor(Math.abs(t)/90),h=1.5-(Math.sin(2*g*Math.PI/360)/2+Math.cos(2*g*Math.PI/360)/2),v=x.params.cube.shadowScale,f=x.params.cube.shadowScale/h,w=x.params.cube.shadowOffset;a.transform("scale3d("+v+", 1, "+f+") translate3d(0px, "+(x.height/2+w)+"px, "+-x.height/2/f+"px) rotateX(-90deg)")}var y=x.isSafari||x.isUiWebView?-x.size/2:0;x.wrapper.transform("translate3d(0px,0,"+y+"px) rotateX("+(x.isHorizontal()?0:t)+"deg) rotateY("+(x.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),x.params.cube.shadow&&!x.isHorizontal()&&x.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var a=x.translate,t=x.isHorizontal()?-a+x.width/2:-a+x.height/2,s=x.isHorizontal()?x.params.coverflow.rotate:-x.params.coverflow.rotate,r=x.params.coverflow.depth,i=0,n=x.slides.length;i<n;i++){var o=x.slides.eq(i),l=x.slidesSizesGrid[i],p=o[0].swiperSlideOffset,d=(t-p-l/2)/l*x.params.coverflow.modifier,m=x.isHorizontal()?s*d:0,u=x.isHorizontal()?0:s*d,c=-r*Math.abs(d),g=x.isHorizontal()?0:x.params.coverflow.stretch*d,h=x.isHorizontal()?x.params.coverflow.stretch*d:0;Math.abs(h)<.001&&(h=0),Math.abs(g)<.001&&(g=0),Math.abs(c)<.001&&(c=0),Math.abs(m)<.001&&(m=0),Math.abs(u)<.001&&(u=0);var v="translate3d("+h+"px,"+g+"px,"+c+"px)  rotateX("+u+"deg) rotateY("+m+"deg)";if(o.transform(v),o[0].style.zIndex=1-Math.abs(Math.round(d)),x.params.coverflow.slideShadows){var f=x.isHorizontal()?o.find(".swiper-slide-shadow-left"):o.find(".swiper-slide-shadow-top"),w=x.isHorizontal()?o.find(".swiper-slide-shadow-right"):o.find(".swiper-slide-shadow-bottom");0===f.length&&(f=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),o.append(f)),0===w.length&&(w=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),o.append(w)),f.length&&(f[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(x.browser.ie){x.wrapper[0].style.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},x.lazy={initialImageLoaded:!1,loadImageInSlide:function(a,t){if(void 0!==a&&(void 0===t&&(t=!0),0!==x.slides.length)){var s=x.slides.eq(a),r=s.find("."+x.params.lazyLoadingClass+":not(."+x.params.lazyStatusLoadedClass+"):not(."+x.params.lazyStatusLoadingClass+")");!s.hasClass(x.params.lazyLoadingClass)||s.hasClass(x.params.lazyStatusLoadedClass)||s.hasClass(x.params.lazyStatusLoadingClass)||(r=r.add(s[0])),0!==r.length&&r.each(function(){var a=e(this);a.addClass(x.params.lazyStatusLoadingClass);var r=a.attr("data-background"),i=a.attr("data-src"),n=a.attr("data-srcset"),o=a.attr("data-sizes");x.loadImage(a[0],i||r,n,o,!1,function(){if(void 0!==x&&null!==x&&x){if(r?(a.css("background-image",'url("'+r+'")'),a.removeAttr("data-background")):(n&&(a.attr("srcset",n
38),a.removeAttr("data-srcset")),o&&(a.attr("sizes",o),a.removeAttr("data-sizes")),i&&(a.attr("src",i),a.removeAttr("data-src"))),a.addClass(x.params.lazyStatusLoadedClass).removeClass(x.params.lazyStatusLoadingClass),s.find("."+x.params.lazyPreloaderClass+", ."+x.params.preloaderClass).remove(),x.params.loop&&t){var e=s.attr("data-swiper-slide-index");if(s.hasClass(x.params.slideDuplicateClass)){var l=x.wrapper.children('[data-swiper-slide-index="'+e+'"]:not(.'+x.params.slideDuplicateClass+")");x.lazy.loadImageInSlide(l.index(),!1)}else{var p=x.wrapper.children("."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');x.lazy.loadImageInSlide(p.index(),!1)}}x.emit("onLazyImageReady",x,s[0],a[0])}}),x.emit("onLazyImageLoad",x,s[0],a[0])})}},load:function(){var a,t=x.params.slidesPerView;if("auto"===t&&(t=0),x.lazy.initialImageLoaded||(x.lazy.initialImageLoaded=!0),x.params.watchSlidesVisibility)x.wrapper.children("."+x.params.slideVisibleClass).each(function(){x.lazy.loadImageInSlide(e(this).index())});else if(t>1)for(a=x.activeIndex;a<x.activeIndex+t;a++)x.slides[a]&&x.lazy.loadImageInSlide(a);else x.lazy.loadImageInSlide(x.activeIndex);if(x.params.lazyLoadingInPrevNext)if(t>1||x.params.lazyLoadingInPrevNextAmount&&x.params.lazyLoadingInPrevNextAmount>1){var s=x.params.lazyLoadingInPrevNextAmount,r=t,i=Math.min(x.activeIndex+r+Math.max(s,r),x.slides.length),n=Math.max(x.activeIndex-Math.max(r,s),0);for(a=x.activeIndex+t;a<i;a++)x.slides[a]&&x.lazy.loadImageInSlide(a);for(a=n;a<x.activeIndex;a++)x.slides[a]&&x.lazy.loadImageInSlide(a)}else{var o=x.wrapper.children("."+x.params.slideNextClass);o.length>0&&x.lazy.loadImageInSlide(o.index());var l=x.wrapper.children("."+x.params.slidePrevClass);l.length>0&&x.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){x.params.lazyLoading&&(x.params.lazyLoadingOnTransitionStart||!x.params.lazyLoadingOnTransitionStart&&!x.lazy.initialImageLoaded)&&x.lazy.load()},onTransitionEnd:function(){x.params.lazyLoading&&!x.params.lazyLoadingOnTransitionStart&&x.lazy.load()}},x.scrollbar={isTouched:!1,setDragPosition:function(e){var a=x.scrollbar,t=x.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,s=t-a.track.offset()[x.isHorizontal()?"left":"top"]-a.dragSize/2,r=-x.minTranslate()*a.moveDivider,i=-x.maxTranslate()*a.moveDivider;s<r?s=r:s>i&&(s=i),s=-s/a.moveDivider,x.updateProgress(s),x.setWrapperTranslate(s,!0)},dragStart:function(e){var a=x.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),x.params.scrollbarHide&&a.track.css("opacity",1),x.wrapper.transition(100),a.drag.transition(100),x.emit("onScrollbarDragStart",x)},dragMove:function(e){var a=x.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),x.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),x.emit("onScrollbarDragMove",x))},dragEnd:function(e){var a=x.scrollbar;a.isTouched&&(a.isTouched=!1,x.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),x.emit("onScrollbarDragEnd",x),x.params.scrollbarSnapOnRelease&&x.slideReset())},draggableEvents:function(){return x.params.simulateTouch!==!1||x.support.touch?x.touchEvents:x.touchEventsDesktop}(),enableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).on(a.draggableEvents.start,a.dragStart),e(t).on(a.draggableEvents.move,a.dragMove),e(t).on(a.draggableEvents.end,a.dragEnd)},disableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).off(a.draggableEvents.start,a.dragStart),e(t).off(a.draggableEvents.move,a.dragMove),e(t).off(a.draggableEvents.end,a.dragEnd)},set:function(){if(x.params.scrollbar){var a=x.scrollbar;a.track=e(x.params.scrollbar),x.params.uniqueNavElements&&"string"==typeof x.params.scrollbar&&a.track.length>1&&1===x.container.find(x.params.scrollbar).length&&(a.track=x.container.find(x.params.scrollbar)),a.drag=a.track.find(".swiper-scrollbar-drag"),0===a.drag.length&&(a.drag=e('<div class="swiper-scrollbar-drag"></div>'),a.track.append(a.drag)),a.drag[0].style.width="",a.drag[0].style.height="",a.trackSize=x.isHorizontal()?a.track[0].offsetWidth:a.track[0].offsetHeight,a.divider=x.size/x.virtualSize,a.moveDivider=a.divider*(a.trackSize/x.size),a.dragSize=a.trackSize*a.divider,x.isHorizontal()?a.drag[0].style.width=a.dragSize+"px":a.drag[0].style.height=a.dragSize+"px",a.divider>=1?a.track[0].style.display="none":a.track[0].style.display="",x.params.scrollbarHide&&(a.track[0].style.opacity=0)}},setTranslate:function(){if(x.params.scrollbar){var e,a=x.scrollbar,t=(x.translate,a.dragSize);e=(a.trackSize-a.dragSize)*x.progress,x.rtl&&x.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),x.isHorizontal()?(x.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(x.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),x.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){x.params.scrollbar&&x.scrollbar.drag.transition(e)}},x.controller={LinearSpline:function(e,a){var t=function(){var e,a,t;return function(s,r){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=r?a=t:e=t;return e}}();this.x=e,this.y=a,this.lastIndex=e.length-1;var s,r;this.x.length;this.interpolate=function(e){return e?(r=t(this.x,e),s=r-1,(e-this.x[s])*(this.y[r]-this.y[s])/(this.x[r]-this.x[s])+this.y[s]):0}},getInterpolateFunction:function(e){x.controller.spline||(x.controller.spline=x.params.loop?new x.controller.LinearSpline(x.slidesGrid,e.slidesGrid):new x.controller.LinearSpline(x.snapGrid,e.snapGrid))},setTranslate:function(e,t){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-x.translate:x.translate,"slide"===x.params.controlBy&&(x.controller.getInterpolateFunction(a),i=-x.controller.spline.interpolate(-e)),i&&"container"!==x.params.controlBy||(r=(a.maxTranslate()-a.minTranslate())/(x.maxTranslate()-x.minTranslate()),i=(e-x.minTranslate())*r+a.minTranslate()),x.params.controlInverse&&(i=a.maxTranslate()-i),a.updateProgress(i),a.setWrapperTranslate(i,!1,x),a.updateActiveIndex()}var r,i,n=x.params.control;if(Array.isArray(n))for(var o=0;o<n.length;o++)n[o]!==t&&n[o]instanceof a&&s(n[o]);else n instanceof a&&t!==n&&s(n)},setTransition:function(e,t){function s(a){a.setWrapperTransition(e,x),0!==e&&(a.onTransitionStart(),a.wrapper.transitionEnd(function(){i&&(a.params.loop&&"slide"===x.params.controlBy&&a.fixLoop(),a.onTransitionEnd())}))}var r,i=x.params.control;if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]!==t&&i[r]instanceof a&&s(i[r]);else i instanceof a&&t!==i&&s(i)}},x.hashnav={onHashCange:function(e,a){var t=document.location.hash.replace("#","");t!==x.slides.eq(x.activeIndex).attr("data-hash")&&x.slideTo(x.wrapper.children("."+x.params.slideClass+'[data-hash="'+t+'"]').index())},attachEvents:function(a){var t=a?"off":"on";e(window)[t]("hashchange",x.hashnav.onHashCange)},setHash:function(){
39if(x.hashnav.initialized&&x.params.hashnav)if(x.params.replaceState&&window.history&&window.history.replaceState)window.history.replaceState(null,null,"#"+x.slides.eq(x.activeIndex).attr("data-hash")||"");else{var e=x.slides.eq(x.activeIndex),a=e.attr("data-hash")||e.attr("data-history");document.location.hash=a||""}},init:function(){if(x.params.hashnav&&!x.params.history){x.hashnav.initialized=!0;var e=document.location.hash.replace("#","");if(e)for(var a=0,t=x.slides.length;a<t;a++){var s=x.slides.eq(a),r=s.attr("data-hash")||s.attr("data-history");if(r===e&&!s.hasClass(x.params.slideDuplicateClass)){var i=s.index();x.slideTo(i,0,x.params.runCallbacksOnInit,!0)}}x.params.hashnavWatchState&&x.hashnav.attachEvents()}},destroy:function(){x.params.hashnavWatchState&&x.hashnav.attachEvents(!0)}},x.history={init:function(){if(x.params.history){if(!window.history||
39!window.history.pushState)return x.params.history=!1,void(x.params.hashnav=!0);x.history.initialized=!0,this.paths=this.getPathValues(),(this.paths.key||this.paths.value)&&(this.scrollToSlide(0,this.paths.value,x.params.runCallbacksOnInit),x.params.replaceState||window.addEventListener("popstate",this.setHistoryPopState))}},setHistoryPopState:function(){x.history.paths=x.history.getPathValues(),x.history.scrollToSlide(x.params.speed,x.history.paths.value,!1)},getPathValues:function(){var e=window.location.pathname.slice(1).split("/"),a=e.length;return{key:e[a-2],value:e[a-1]}},setHistory:function(e,a){if(x.history.initialized&&x.params.history){var t=x.slides.eq(a),s=this.slugify(t.attr("data-history"));window.location.pathname.includes(e)||(s=e+"/"+s),x.params.replaceState?window.history.replaceState(null,null,s):window.history.pushState(null,null,s)}},slugify:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,a,t){if(a)for(var s=0,r=x.slides.length;s<r;s++){var i=x.slides.eq(s),n=this.slugify(i.attr("data-history"));if(n===a&&!i.hasClass(x.params.slideDuplicateClass)){var o=i.index();x.slideTo(o,e,t)}}else x.slideTo(0,e,t)}},x.disableKeyboardControl=function(){x.params.keyboardControl=!1,e(document).off("keydown",l)},x.enableKeyboardControl=function(){x.params.keyboardControl=!0,e(document).on("keydown",l)},x.mousewheel={event:!1,lastScrollTime:(new window.Date).getTime()},x.params.mousewheelControl&&(x.mousewheel.event=navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e="onwheel"in document;if(!e){var a=document.createElement("div");a.setAttribute("onwheel","return;"),e="function"==typeof a.onwheel}return!e&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0&&(e=document.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel"),x.disableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.off(x.mousewheel.event,d),x.params.mousewheelControl=!1,!0},x.enableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.on(x.mousewheel.event,d),x.params.mousewheelControl=!0,!0},x.parallax={setTranslate:function(){x.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,x.progress)}),x.slides.each(function(){var a=e(this);a.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,Math.min(Math.max(a[0].progress,-1),1))})})},setTransition:function(a){void 0===a&&(a=x.params.speed),x.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=e(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||a;0===a&&(s=0),t.transition(s)})}},x.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:x.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-a,2)+Math.pow(r-t,2))},onGestureStart:function(a){var t=x.zoom;if(!x.support.gestures){if("touchstart"!==a.type||"touchstart"===a.type&&a.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(a)}if(!(t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=e(this),0===t.gesture.slide.length&&(t.gesture.slide=x.slides.eq(x.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+x.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||x.params.zoomMax,0!==t.gesture.imageWrap.length)))return void(t.gesture.image=void 0);t.gesture.image.transition(0),t.isScaling=!0},onGestureChange:function(e){var a=x.zoom;if(!x.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(x.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scale<x.params.zoomMin&&(a.scale=x.params.zoomMin+1-Math.pow(x.params.zoomMin-a.scale+1,.5)),a.gesture.image.transform("translate3d(0,
390,0) scale("+a.scale+")"))},onGestureEnd:function(e){var a=x.zoom;!x.support.gestures&&("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2)||a.gesture.image&&0!==a.gesture.image.length&&(a.scale=Math.max(Math.min(a.scale,a.gesture.zoomMax),x.params.zoomMin),a.gesture.image.transition(x.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(a.gesture.slide=void 0))},onTouchStart:function(e,a){var t=e.zoom;t.gesture.image&&0!==t.gesture.image.length&&(t.image.isTouched||("android"===e.device.os&&a.preventDefault(),t.image.isTouched=!0,t.image.touchesStart.x="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,t.image.touchesStart.y="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY))},onTouchMove:function(e){var a=x.zoom;if(a.gesture.image&&0!==a.gesture.image.length&&(x.allowClick=!1,a.image.isTouched&&a.gesture.slide)){a.image.isMoved||(a.image.width=a.gesture.image[0].offsetWidth,a.image.height=a.gesture.image[0].offsetHeight,a.image.startX=x.getTranslate(a.gesture.imageWrap[0],"x")||0,a.image.startY=x.getTranslate(a.gesture.imageWrap[0],"
39y")||0,a.gesture.slideWidth=a.gesture.slide[0].offsetWidth,a.gesture.slideHeight=a.gesture.slide[0].offsetHeight,a.gesture.imageWrap.transition(0),x.rtl&&(a.image.startX=-a.image.startX),x.rtl&&(a.image.startY=-a.image.startY));var t=a.image.width*a.scale,s=a.image.height*a.scale;if(!(t<a.gesture.slideWidth&&s<a.gesture.slideHeight)){if(a.image.minX=Math.min(a.gesture.slideWidth/2-t/2,0),a.image.maxX=-a.image.minX,a.image.minY=Math.min(a.gesture.slideHeight/2-s/2,0),a.image.maxY=-a.image.minY,a.image.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a.image.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!a.image.isMoved&&!a.isScaling){if(x.isHorizontal()&&Math.floor(a.image.minX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x<a.image.touchesStart.x||Math.floor(a.image.maxX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x>a.image.touchesStart.x)return void(a.image.isTouched=!1);if(!x.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y<a.image.touchesStart.y||Math.floor(a.image.maxY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y>a.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentX<a.image.minX&&(a.image.currentX=a.image.minX+1-Math.pow(a.image.minX-a.image.currentX+1,.8)),a.image.currentX>a.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentY<a.image.minY&&(a.image.currentY=a.image.minY+1-Math.pow(a.image.minY-a.image.currentY+1,.8)),a.image.currentY>a.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,r=300,i=t.velocity.x*s,n=t.image.currentX+i,o=t.velocity.y*r,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(r=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,r);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,m=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-m/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(a,t){var s=a.zoom;if(s.gesture.slide||(s.gesture.slide=a.clickedSlide?e(a.clickedSlide):a.slides.eq(a.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+a.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var r,i,n,o,l,p,d,m,u,c,g,h,v,f,w,y,x,T;void 0===s.image.touchesStart.x&&t?(r="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,i="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(r=s.image.touchesStart.x,i=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,
390,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||a.params.zoomMax,t?(x=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+x/2-r,p=o+T/2-i,u=s.gesture.image[0].offsetWidth,c=s.gesture.image[0].offsetHeight,g=u*s.scale,h=c*s.scale,v=Math.min(x/2-g/2,0),f=Math.min(T/2-h/2,0),w=-v,y=-f,d=l*s.scale,m=p*s.scale,d<v&&(d=v),d>w&&(d=w),m<f&&(m=f),m>y&&(m=y)):(d=0,m=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+m+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(a){var t=a?"off":"on";if(x.params.zoom){var s=(x.slides,!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1});x.support.gestures?(x.slides[t]("gesturestart",x.zoom.onGestureStart,s),x.slides[t]("gesturechange",x.zoom.onGestureChange,s),x.slides[t]("gestureend",x.zoom.onGestureEnd,s)):"touchstart"===x.touchEvents.start&&(x.slides[t](x.touchEvents.start,x.zoom.onGestureStart,s),x.slides[t](x.touchEvents.move,x.zoom.onGestureChange,s),x.slides[t](x.touchEvents.end,x.zoom.onGestureEnd,s)),x[t]("touchStart",x.zoom.onTouchStart),x.slides.each(function(a,s){e(s).find("."+x.params.zoomContainerClass).length>0&&e(s)[t](x.touchEvents.move,x.zoom.onTouchMove)}),x[t]("touchEnd",x.zoom.onTouchEnd),x[t]("transitionEnd",x.zoom.onTransitionEnd),x.params.zoomToggle&&x.on("doubleTap",x.zoom.toggleZoom)}},init:function(){x.zoom.attachEvents()},destroy:function(){x.zoom.attachEvents(!0)}},x._plugins=[];for(var Y in x.plugins){var A=x.plugins[Y](x,x.params[Y]);A&&x._plugins.push(A)}return x.callPlugins=function(e){for(var a=0;a<x._plugins.length;a++)e in x._plugins[a]&&x._plugins[a][e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},x.emitterEventListeners={},x.emit=function(e){x.params[e]&&x.params[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);var a;if(x.emitterEventListeners[e])for(a=0;a<x.emitterEventListeners[e].length;a++)x.emitterEventListeners[e][a](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);x.callPlugins&&x.callPlugins(e,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},x.on=function(e,a){return e=u(e),x.emitterEventListeners[e]||(x.emitterEventListeners[e]=[]),x.emitterEventListeners[e].push(a),x},x.off=function(e,a){var t;if(e=u(e),void 0===a)return x.emitterEventListeners[e]=[],x;if(x.emitterEventListeners[e]&&0!==x.emitterEventListeners[e].length){for(t=0;t<x.emitterEventListeners[e].length;t++)x.emitterEventListeners[e][t]===a&&x.emitterEventListeners[e].splice(t,1);return x}},x.once=function(e,a){e=u(e);var t=function(){a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]),x.off(e,t)};return x.on(e,t),x},x.a11y={makeFocusable:function(e){return e.attr("tabIndex","0"),e},addRole:function(e,a){return e.attr("role",a),e},addLabel:function(e,a){return e.attr("aria-label",a),e},disable:function(e){return e.attr("aria-disabled",!0),e},enable:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(a){13===a.keyCode&&(e(a.target).is(x.params.nextButton)?(x.onClickNext(a),x.isEnd?x.a11y.notify(x.params.lastSlideMessage):x.a11y.notify(x.params.nextSlideMessage)):e(a.target).is(x.params.prevButton)&&(x.onClickPrev(a),x.isBeginning?x.a11y.notify(x.params.firstSlideMessage):x.a11y.notify(x.params.prevSlideMessage)),e(a.target).is("."+x.params.bulletClass)&&e(a.target)[0].click())},liveRegion:e('<span class="'+x.params.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>'),notify:function(e){var a=x.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.a11y.makeFocusable(x.nextButton),x.a11y.addRole(x.nextButton,"button"),x.a11y.addLabel(x.nextButton,x.params.nextSlideMessage)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.a11y.makeFocusable(x.prevButton),x.a11y.addRole(x.prevButton,"button"),x.a11y.addLabel(x.prevButton,x.params.prevSlideMessage)),e(x.container).append(x.a11y.liveRegion)},initPagination:function(){x.params.pagination&&x.params.paginationClickable&&x.bullets&&x.bullets.length&&x.bullets.each(function(){var a=e(this);x.a11y.makeFocusable(a),x.a11y.addRole(a,"button"),x.a11y.addLabel(a,x.params.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},destroy:function(){x.a11y.liveRegion&&x.a11y.liveRegion.length>0&&x.a11y.liveRegion.remove()}},x.init=function(){x.params.loop&&x.createLoop(),x.updateContainerSize(),x.updateSlidesSize(),x.updatePagination(),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.set(),x.params.scrollbarDraggable&&x.scrollbar.enableDraggable()),"slide"!==x.params.effect&&x.effects[x.params.effect]&&(x.params.loop||x.updateProgress(),x.effects[x.params.effect].setTranslate()),x.params.loop?x.slideTo(x.params.initialSlide+x.loopedSlides,0,x.params.runCallbacksOnInit):(x.slideTo(x.params.initialSlide,0,x.params.runCallbacksOnInit),0===x.params.initialSlide&&(x.parallax&&x.params.parallax&&x.parallax.setTranslate(),x.lazy&&x.params.lazyLoading&&(x.lazy.load(),x.lazy.initialImageLoaded=!0))),x.attachEvents(),x.params.observer&&x.support.observer&&x.initObservers(),x.params.preloadImages&&!x.params.lazyLoading&&x.preloadImages(),x.params.zoom&&x.zoom&&x.zoom.init(),x.params.autoplay&&x.startAutoplay(),x.params.keyboardControl&&x.enableKeyboardControl&&x.enableKeyboardControl(),x.params.mousewheelControl&&x.enableMousewheelControl&&x.enableMousewheelControl(),x.params.hashnavReplaceState&&(x.params.replaceState=x.params.hashnavReplaceState),x.params.history&&x.history&&x.history.init(),x.params.hashnav&&x.hashnav&&x.hashnav.init(),x.params.a11y&&x.a11y&&x.a11y.init(),x.emit("onInit",x)},x.cleanupStyles=function(){x.container.removeClass(x.classNames.join(" ")).removeAttr("style"),x.wrapper.removeAttr("style"),x.slides&&x.slides.length&&x.slides.removeClass([x.params.slideVisibleClass,x.params.slideActiveClass,x.params.slideNextClass,x.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),x.paginationContainer&&x.paginationContainer.length&&x.paginationContainer.removeClass(x.params.paginationHiddenClass),x.bullets&&x.bullets.length&&x.bullets.removeClass(x.params.bulletActiveClass),x.params.prevButton&&e(x.params.prevButton).removeClass(x.params.buttonDisabledClass),x.params.nextButton&&e(x.params.nextButton).removeClass(x.params.buttonDisabledClass),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.track&&x.scrollbar.track.length&&x.scrollbar.track.removeAttr("style"),x.scrollbar.drag&&x.scrollbar.drag.length&&x.scrollbar.drag.removeAttr("style"))},x.destroy=function(e,a){x.detachEvents(),x.stopAutoplay(),x.params.scrollbar&&x.scrollbar&&x.params.scrollbarDraggable&&x.scrollbar.disableDraggable(),x.params.loop&&x.destroyLoop(),a&&x.cleanupStyles(),x.disconnectObservers(),x.params.zoom&&x.zoom&&x.zoom.destroy(),x.params.keyboardControl&&x.disableKeyboardControl&&x.disableKeyboardControl(),x.params.mousewheelControl&&x.disableMousewheelControl&&x.disableMousewheelControl(),x.params.a11y&&x.a11y&&x.a11y.destroy(),x.params.history&&!x.params.replaceState&&window.removeEventListener("popstate",x.history.setHistoryPopState),x.params.hashnav&&x.hashnav&&x.hashnav.destroy(),x.emit("onDestroy"),e!==!1&&(x=null)},x.init(),x}};a.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}
39(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="<!--[if lte IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}()},device:function(){var e=window.navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),s=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!t&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:t||r||s,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t<a.length;t++)if(a[t]in e)return!0}(),observer:function(){return"MutationObserver"in window||"WebkitMutationObserver"in window}(),passiveListener:function(){var e=!1;try{var a=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveListener",null,a)}catch(e){}return e}(),gestures:function(){return"ongesturestart"in window}()},plugins:{}};for(var t=["jQuery","Zepto","Dom7"],s=0;s<t.length;s++)window[t[s]]&&function(e){e.fn.swiper=function(t){var s;return e(this).each(function(){var e=new a(this,t);s||(s=e)}),s}}(window[t[s]]);var r;r="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7,r&&("transitionEnd"in r.fn||(r.fn.transitionEnd=function(e){function a(i){if(i.target===this)for(e.call(this,i),t=0;t<s.length;t++)r.off(s[t],a)}var t,s=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],r=this;if(e)for(t=0;t<s.length;t++)r.on(s[t],a);return this}),"transform"in r.fn||(r.fn.transform=function(e){for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransform=t.MsTransform=t.msTransform=t.MozTransform=t.OTransform=t.transform=e}return this}),"transition"in r.fn||(r.fn.transition=function(e){"string"!=typeof e&&(e+="ms");for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e}return this}),"outerWidth"in r.fn||(r.fn.outerWidth=function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=a}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper});
40//# 
41
42/*!@license Copyright 2013, Heinrich Goebl, License: MIT, see https://github.com/hgoebl/mobile-detect.js*/
43!function(a,b){a(function(){"use strict";function a(a,b){return null!=a&&null!=b&&a.toLowerCase()===b.toLowerCase()}function c(a,b){var c,d,e=a.length;if(!e||!b)return!1;for(c=b.toLowerCase(),d=0;d<e;++d)if(c===a[d].toLowerCase())return!0;return!1}function d(a){for(var b in a)i.call(a,b)&&(a[b]=new RegExp(a[b],"i"))}function e(a){return(a||"").substr(0,500)}function f(a,b){this.ua=e(a),this._cache={},this.maxPhoneWidth=b||600}var g={};g.mobileDetectRules={phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+|\\b(BBA100|BBB100|BBD100|BBE100|BBF100|STH100)\\b-[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5
vendor: 6,250 bytes, line 43
43|Nexus 6",Dell:"Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052",Samsung:"\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F
43",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)|LM-G710",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",NokiaLumia:"Lumia [0-9]{3,4}",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLI
43M|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo (3DS|Switch)",Amoi:"Amoi",INQ:"INQ",OnePlus:"ONEPLUS",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",GoogleTablet:"Android.*Pixel C",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-T830|SM-T837V|SM-T720|SM-T510|SM-T387V",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk/[0-9.]+ like Chrome/[0-9.]+ (?!Mobile)",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20\\b|\\bA3-A30",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V4
4300|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304X|TB-X304F|TB-X304L|TB-X505F|TB-X505L|TB-X505X|TB-X605F|TB-X605L|TB-8703F|TB-8703X|TB-8703N|TB-8704N|TB-8704F|TB-8704X|TB-8704V|TB-7304F|TB-7304I|TB-7304X|Tab2A7-10F|Tab2A7-20F|TB2-X30L|YT3-X50L|YT3-X50F|YT3-X50M|YT-X705F|YT-X703F|YT-X703L|YT-X705L|YT-X705X|TB2-X30F|TB2-X30L|TB2-X30M|A2107A-F|A2107A-H|TB3-730F|TB3-730M|TB3-730X|TB-7504F|TB-7504X",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",NokiaLumiaTablet:"Lumia 2520",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*\\b(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))\\b|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-L09|CMR-AL19",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",Bronch
43oTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z930|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android.*\\bG1\\b(?!\\))
vendor: 9,224 bytes, line 43
43",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore 1027",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497|VFD 1400",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9|TECNO DP8D",JXDTablet:"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",VerizonTablet:"QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+|V10 \\b4G\\b",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712",MpmanTablet:"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MediacomTablet:"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",KocasoTablet:"\\b(TB-1207)\\b",HisenseTablet:"\\b(F5281|E2371)\\b",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Windows Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad|AppleCoreMedia",iPadOS:"CPU OS 13",
43MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+$|Coast/[0-9.]+",Skyfire:"Skyfire",Edge:"Mobile Safari/[.0-9]* Edge",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",WeChat:"\\bMicroMessenger\\b",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger",PaleMoon:"Android.*PaleMoon|Mobile.*PaleMoon"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:["Firefox/[VER]","FxiOS/[VER]"],Fennec:"Fennec/[VER]",Edge:"Edge/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]",UCBrowser:["UCWEB[VER]","UC.*Browser/[VER]"],MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",SamsungBrowser:"SamsungBrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",PaleMoon:"PaleMoon/[VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",Goanna:"Goanna/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|Google-AMPHTML|s~amp-validator|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom|contentkingapp",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|P
vendor: 7,341 bytes, lines 43-44
43LAYSTATION|Xbox)\\b",Watch:"SM-V700"}},g.detectMobileBrowsers={fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,
44tabletPattern:/android|ipad|playbook|silk/i};var h,i=Object.prototype.hasOwnProperty;return g.FALLBACK_PHONE="UnknownPhone",g.FALLBACK_TABLET="UnknownTablet",g.FALLBACK_MOBILE="UnknownMobile",h="isArray"in Array?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},function(){var a,b,c,e,f,j,k=g.mobileDetectRules;for(a in k.props)if(i.call(k.props,a)){for(b=k.props[a],h(b)||(b=[b]),f=b.length,e=0;e<f;++e)c=b[e],j=c.indexOf("[VER]"),j>=0&&(c=c.substring(0,j)+"([\\w._\\+]+)"+c.substring(j+5)),b[e]=new RegExp(c,"i");k.props[a]=b}d(k.oss),d(k.phones),d(k.tablets),d(k.uas),d(k.utils),k.oss0={WindowsPhoneOS:k.oss.WindowsPhoneOS,WindowsMobileOS:k.oss.WindowsMobileOS}}(),g.findMatch=function(a,b){for(var c in a)if(i.call(a,c)&&a[c].test(b))return c;return null},g.findMatches=function(a,b){var c=[];for(var d in a)i.call(a,d)&&a[d].test(b)&&c.push(d);return c},g.getVersionStr=function(a,b){var c,d,e,f,h=g.mobileDetectRules.props;if(i.call(h,a))for(c=h[a],e=c.length,d=0;d<e;++d)if(f=c[d].exec(b),null!==f)return f[1];return null},g.getVersion=function(a,b){var c=g.getVersionStr(a,b);return c?g.prepareVersionNo(c):NaN},g.prepareVersionNo=function(a){var b;return b=a.split(/[a-z._ \/\-]/i),1===b.length&&(a=b[0]),b.length>1&&(a=b[0]+".",b.shift(),a+=b.join("")),Number(a)},g.isMobileFallback=function(a){return g.detectMobileBrowsers.fullPattern.test(a)||g.detectMobileBrowsers.shortPattern.test(a.substr(0,4))},g.isTabletFallback=function(a){return g.detectMobileBrowsers.tabletPattern.test(a)},g.prepareDetectionCache=function(a,c,d){if(a.mobile===b){var e,h,i;return(h=g.findMatch(g.mobileDetectRules.tablets,c))?(a.mobile=a.tablet=h,void(a.phone=null)):(e=g.findMatch(g.mobileDetectRules.phones,c))?(a.mobile=a.phone=e,void(a.tablet=null)):void(g.isMobileFallback(c)?(i=f.isPhoneSized(d),i===b?(a.mobile=g.FALLBACK_MOBILE,a.tablet=a.phone=null):i?(a.mobile=a.phone=g.FALLBACK_PHONE,a.tablet=null):(a.mobile=a.tablet=g.FALLBACK_TABLET,a.phone=null)):g.isTabletFallback(c)?(a.mobile=a.tablet=g.FALLBACK_TABLET,a.phone=null):a.mobile=a.tablet=a.phone=null)}},g.mobileGrade=function(a){var b=null!==a.mobile();return a.os("iOS")&&a.version("iPad")>=4.3||a.os("iOS")&&a.version("iPhone")>=3.1||a.os("iOS")&&a.version("iPod")>=3.1||a.version("Android")>2.1&&a.is("Webkit")||a.version("Windows Phone OS")>=7||a.is("BlackBerry")&&a.version("BlackBerry")>=6||a.match("Playbook.*Tablet")||a.version("webOS")>=1.4&&a.match("Palm|Pre|Pixi")||a.match("hp.*TouchPad")||a.is("Firefox")&&a.version("Firefox")>=12||a.is("Chrome")&&a.is("AndroidOS")&&a.version("Android")>=4||a.is("Skyfire")&&a.version("Skyfire")>=4.1&&a.is("AndroidOS")&&a.version("Android")>=2.3||a.is("Opera")&&a.version("Opera Mobi")>11&&a.is("AndroidOS")||a.is("MeeGoOS")||a.is("Tizen")||a.is("Dolfin")&&a.version("Bada")>=2||(a.is("UC Browser")||a.is("Dolfin"))&&a.version("Android")>=2.3||a.match("Kindle Fire")||a.is("Kindle")&&a.version("Kindle")>=3||a.is("AndroidOS")&&a.is("NookTablet")||a.version("Chrome")>=11&&!b||a.version("Safari")>=5&&!b||a.version("Firefox")>=4&&!b||a.version("MSIE")>=7&&!b||a.version("Opera")>=10&&!b?"A":a.os("iOS")&&a.version("iPad")<4.3||a.os("iOS")&&a.version("iPhone")<3.1||a.os("iOS")&&a.version("iPod")<3.1||a.is("Blackberry")&&a.version("BlackBerry")>=5&&a.version("BlackBerry")<6||a.version("Opera Mini")>=5&&a.version("Opera Mini")<=6.5&&(a.version("Android")>=2.3||a.is("iOS"))||a.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||a.version("Opera Mobi")>=11&&a.is("SymbianOS")?"B":(a.version("BlackBerry")<5||a.match("MSIEMobile|Windows CE.*Mobile")||a.version("Windows Mobile")<=5.2,"C")},g.detectOS=function(a){return g.findMatch(g.mobileDetectRules.oss0,a)||g.findMatch(g.mobileDetectRules.oss,a)},g.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},f.prototype={constructor:f,mobile:function(){return g.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return g.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return g.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){return this._cache.userAgent===b&&(this._cache.userAgent=g.findMatch(g.mobileDetectRules.uas,this.ua)),this._cache.userAgent},userAgents:function(){return this._cache.userAgents===b&&(this._cache.userAgents=g.findMatches(g.mobileDetectRules.uas,this.ua)),this._cache.userAgents},os:function(){return this._cache.os===b&&(this._cache.os=g.detectOS(this.ua)),this._cache.os},version:function(a){return g.getVersion(a,this.ua)},versionStr:function(a){return g.getVersionStr(a,this.ua)},is:function(b){return c(this.userAgents(),b)||a(b,this.os())||a(b,this.phone())||a(b,this.tablet())||c(g.findMatches(g.mobileDetectRules.utils,this.ua),b)},match:function(a){return a instanceof RegExp||(a=new RegExp(a,"i")),a.test(this.ua)},isPhoneSized:function(a){return f.isPhoneSized(a||this.maxPhoneWidth)},mobileGrade:function(){return this._cache.grade===b&&(this._cache.grade=g.mobileGrade(this)),this._cache.grade}},"undefined"!=typeof window&&window.screen?f.isPhoneSized=function(a){return a<0?b:g.getDeviceSmallerSide()<=a}:f.isPhoneSized=function(){},f._impl=g,f.version="1.4.4 2019-09-21",f})}
44(function(a){if("undefined"!=typeof module&&module.exports)return function(a){module.exports=a()};if("function"==typeof define&&define.amd)return define;if("undefined"!=typeof window)return function(a){window.MobileDetect=a()};throw new Error("unknown environment")}());
45/*! jQuery slabtext plugin v2.2 MIT/GPL2 @freqdec */
46(function($){$.fn.slabText=function(options){var settings={fontRatio:0.78,forceNewCharCount:true,wrapAmpersand:true,headerBreakpoint:null,viewportBreakpoint:null,noResizeEvent:false,resizeThrottleTime:300,maxFontSize:999,postTweak:true,precision:3,minCharsPerLine:0};$("body").addClass("slabtexted");return this.each(function(){if(options){$.extend(settings,options);}var $this=$(this),keepSpans=$("span.slabtext",$this).length,words=keepSpans?[]:String($.trim($this.text())).replace(/\s{2,}/g," ").split(" "),origFontSize=null,idealCharPerLine=null,fontRatio=settings.fontRatio,forceNewCharCount=settings.forceNewCharCount,headerBreakpoint=settings.headerBreakpoint,viewportBreakpoint=settings.viewportBreakpoint,postTweak=settings.postTweak,precision=settings.precision,resizeThrottleTime=settings.resizeThrottleTime,minCharsPerLine=settings.minCharsPerLine,resizeThrottle=null,viewportWidth=$(window).width(),headLink=$this.find("a:first").attr("href")||$this.attr("href"),linkTitle=headLink?$this.find("a:first").attr("title"):"";if(!keepSpans&&minCharsPerLine&&words.join(" ").length<minCharsPerLine){return;}var grabPixelFontSize=function(){var dummy=jQuery('<div style="display:none;font-size:1em;margin:0;padding:0;height:auto;line-height:1;border:0;">&nbsp;</div>').appendTo($this),emH=dummy.height();dummy.remove();return emH;};var resizeSlabs=function resizeSlabs(){var parentWidth=$this.width(),fs;$this.removeClass("slabtextdone slabtextinactive");if(viewportBreakpoint&&viewportBreakpoint>viewportWidth||headerBreakpoint&&headerBreakpoint>parentWidth){$this.addClass("slabtextinactive");return;}fs=grabPixelFontSize();if(!keepSpans&&(forceNewCharCount||fs!=origFontSize)){origFontSize=fs;var newCharPerLine=Math.min(60,Math.floor(parentWidth/(origFontSize*fontRatio))),wordIndex=0,lineText=[],counter=0,preText="",postText="",finalText="",slice,preDiff,postDiff;if(newCharPerLine!=idealCharPerLine){idealCharPerLine=newCharPerLine;while(wordIndex<words.length){postText="";while(postText.length<idealCharPerLine){preText=postText;postText+=words[wordIndex]+" ";if(++wordIndex>=words.length){break;}}if(minCharsPerLine){slice=words.slice(wordIndex).join(" ");if(slice.length<minCharsPerLine){postText+=slice;preText=postText;wordIndex=words.length+2;}}preDiff=idealCharPerLine-preText.length;postDiff=postText.length-idealCharPerLine;if((preDiff<postDiff)&&(preText.length>=(minCharsPerLine||2))){finalText=preText;wordIndex--;}else{finalText=postText;}finalText=$("<div/>").text(finalText).html();if(settings.wrapAmpersand){finalText=finalText.replace(/&amp;/g,'<span class="amp">&amp;</span>');}finalText=$.trim(finalText);lineText.push('<span class="slabtext">'+finalText+"</span>");}$this.html(lineText.join(" "));if(headLink){$this.wrapInner('<a href="'+headLink+'" '+(linkTitle?'title="'+linkTitle+'" ':"")+"/>");}}}else{origFontSize=fs;}$("span.slabtext",$this).each(function(){var $span=$(this),innerText=$span.text(),wordSpacing=innerText.split(" ").length>1,diff,ratio,fontSize;if(postTweak){$span.css({"word-spacing":0,"letter-spacing":0});}ratio=parentWidth/$span.width();fontSize=parseFloat(this.style.fontSize)||origFontSize;$span.css("font-size",Math.min((fontSize*ratio).toFixed(precision),settings.maxFontSize)+"px");diff=!!postTweak?parentWidth-$span.width():false;if(diff){$span.css((wordSpacing?"word":"letter")+"-spacing",(diff/(wordSpacing?innerText.split(" ").length-1:innerText.length)).toFixed(precision)+"px");}});$this.addClass("slabtextdone");};resizeSlabs();if(!settings.noResizeEvent){$(window).resize(function(){if($(window).width()==viewportWidth){return;}viewportWidth=$(window).width();clearTimeout(resizeThrottle);resizeThrottle=setTimeout(resizeSlabs,resizeThrottleTime);});}});};})(jQuery);
47/*! jQuery Lazy 1.6.7 - MIT & GPL-2.0 license - Copyright 2012-2016 Daniel 'Eisbehr' Kern */
48!function(e,t,a,r){"use strict";function n(a,r,n,o){function i(){p=t.devicePixelRatio>1,l(n),r("delay")>=0&&setTimeout(function(){u(!0)},r("delay")),(r("delay")<0||r("combined"))&&(o.e=m(r("throttle"),function(e){"resize"===e.type&&(b=v=-1),u(e.all)}),o.a=function(e){l(e),n.push.apply(n,e)},o.g=function(){return n=e(n).filter(function(){return!e(this).data(r("loadedName"))})},u(),e(r("appendScroll")).on("scroll."+a.name+" resize."+a.name,o.e))}function l(t){if(t=e(t).filter(function(){return!e(this).data(r("handledName"))&&(e(this).attr(r("attribute"))||e(this).attr(r("loaderAttribute")))}).data("plugin_"+a.name,a),r("defaultImage")||r("placeholder"))for(var n=0;n<t.length;n++){var o=e(t[n]),i=t[n].tagName.toLowerCase(),l="background-image";"img"==i&&r("defaultImage")&&!o.attr("src")?o.attr("src",r("defaultImage")):"img"==i||!r("placeholder")||o.css(l)&&"none"!=o.css(l)||o.css(l,"url("/js/vendor/jquery-lazy/+r("placeholder")+")")}}function u(t){if(!n.length)return void(r("autoDestroy")&&a.destroy());for(var o=!1,i=r("imageBase")?r("imageBase"):"",l=0;l<n.length;
48l++)(function(a){if(c(a)||t){var n,l=e(a),u=a.tagName.toLowerCase(),f=l.attr(r("attribute"));l.data(r("handledName"))||r("visibleOnly")&&!l.is(":visible")||!(f&&("img"==u&&i+f!=l.attr("src")||"img"!=u&&i+f!=l.css("background-image"))||(n=l.attr(r("loaderAttribute"))))||(o=!0,l.data(r("handledName"),!0),d(l,u,i,n))}})(n[l]);o&&(n=e(n).filter(function(){return!e(this).data(r("handledName"))}))}function d(t,a,n,o){++h;var i=function(){A("onError",t),g()};if(A("beforeLoad",t),o)t.off("error").one("error",i),t.one("load",function(){r("removeAttribute")&&t.removeAttr(r("loaderAttribute")),t.data(r("loadedName"),!0),A("afterLoad",t),g()}),A(o,t,function(e){e?t.load():t.error()})||t.error();else{var l=e(new Image);l.one("error",i),l.one("load",function(){t.hide(),"img"==a?t.attr("src",l.attr("src")):t.css("background-image","url('"+l.attr("src")+"')"),t[r("effect")](r("effectTime")),r("removeAttribute")&&t.removeAttr(r("attribute")+" "+r("retinaAttribute")),t.data(r("loadedName"),!0),A("afterLoad",t),l.remove(),g()}),l.attr("src",n+t.attr(r(p&&t.attr(r("retinaAttribute"))?"retinaAttribute":"attribute"))),l.complete&&l.load()}}function c(e){var t=e.getBoundingClientRect(),a=r("scrollDirection"),n=r("threshold"),o=s()+n>t.top&&-n<t.bottom,i=f()+n>t.left&&-n<t.right;return"vertical"==a?o:"horizontal"==a?i:o&&i}function f(){return b>=0?b:b=e(t).width()}function s(){return v>=0?v:v=e(t).height()}function m(e,t){var n,o=0;return function(i,l){function u(){o=+new Date,t.call(a,i)}var d=+new Date-o;n&&clearTimeout(n),d>e||!r("enableThrottle")||l?u():n=setTimeout(u,e-d)}}function g(){--h,n.length||h||A("onFinishedAll")}function A(e,t,n){return(e=r(e))?(e.apply(a,[].slice.call(arguments,1)),!0):!1}var h=0,b=-1,v=-1,p=!1;!function(){"event"==r("bind")?i():e(t).on("load."+a.name,i)}()}function o(a,o){var i=this,l=e.extend({},i.configuration,o),u={};return i.config=function(e,t){return t===r?l[e]:(l[e]=t,i)},i.addItems=function(t){return u.a&&u.a("string"===e.type(t)?e(t):t),i},i.getItems=function(){return u.g?u.g():{}},i.update=function(e){return u.e&&u.e({},!e),i},i.loadAll=function(){return u.e&&u.e({all:!0},!0),i},i.destroy=function(){return e(i.config("appendScroll")).off("."+i.name,u.e),e(t).off("."+i.name),u={},r},n(i,i.config,a,u),i.config("chainable")?a:i}e.fn.Lazy=e.fn.lazy=function(e){return new o(this,e)},e.extend(o.prototype,{name:"lazy",configuration:{chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",retinaAttribute:"data-retina",loaderAttribute:"data-loader",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:null,afterLoad:null,onError:null,onFinishedAll:null}})}(jQuery,window,document);
49$(function() {
50    if ($('div.StageVoting_groupId').length) {
51        var vid    = $('div.StageVoting_groupId').data('voting');
52        var detail = $('div.StageVoting_groupId').data('detail');
53        $.ajax({
54            url: '/_votings/arena/last.voting.php',
55            type: 'GET',
56            data: {
57                location: $(location).attr('href'),
58                select: 'id',
59                id:vid,
60                detail: detail
61            },
62            dataType: 'html',
63            success: function (data) {
64                $('div.StageVoting_groupId').html(data);
65
66            }
67        })
68    }
69    if($('div.StageVoting_groupAuto').length) {
70        $.ajax({
71            url: '/_votings/arena/last.voting.php',
72            type: 'GET',
73            data: {
74                location: $(location).attr('href'),
75                select: 'last'
76            },
77            dataType: 'html',
78            success: function (data) {
79                $('div.StageVoting_groupAuto').html(data);
80
81            }
82        })
83    }
84    var request;
85    $(document).on('submit','form.StageVoting_form',function(e){
86        e.preventDefault();
87        var hash = $("input[name='i_vhash']:checked").val();
88        if( typeof hash === "undefined"){
89            $(".StageVoting_info").text("Bitte treffen Sie eine Auswahl");
90        } else {
91            var $form = $(this);
92            var $inputs = $form.find("input, select, button, textarea");
93            var serializedData = $form.serialize();
94            $inputs.prop("disabled", true);
95
96            request = $.ajax({
97                type: "POST",
98                url: "/_votings/arena/post.php",
99                data: serializedData,
100             });
101            request.done(function (response, textStatus, jqXHR){
102                // Log a message to the console
103                if($('div.StageVoting_groupAuto').length) {
104                    $('div.StageVoting_groupAuto').html(response);
105                }
106                if($('div.StageVoting_groupId').length) {
107                    $('div.StageVoting_groupId').html(response);
108                }
109
110            });
111            request.fail(function (jqXHR, textStatus, errorThrown){
112                // Log the error to the console
113                console.error(
114                    "The following error occurred: "+
115                    textStatus, errorThrown
116                );
117            });
118            request.always(function () {
119                // Reenable the inputs
120                $inputs.prop("disabled", false);
121            });
122        }
123    })
124
125});
126/* Click auf Logo nicht scrollen */
127$(".Logo").on("click", function () {
128    localStorage.setItem('click','Logo');
129});
130
131/* ---- iPad-Events --- */
132$(window).on("orientationchange resize",function(){
133  if ( $(".Ad-superbanner .ad_superbanner").length) {
134    $(document).trigger("webskin");    
135  }
136});
137
138/* --------------- Suche ---------- */
139
140$(function(){
141   var showSearch = function() {
142     
143    var l = $("a.navsearch").position().left;
144    console.log($("a.navsearch").position());
145     
146    $("#header-searchinput").show();
147        $("#header-searchinput").animate({
148           width: "250px",
149           right: "0"
150        }, 200 );
151  };
152
153  var hideSearch = function() {
154    $( "#header-searchinput" ).animate({
155            width: "0px",
156            right: "0"
157            }, 200, function() {
158            $("#header-searchinput").hide();
159          });
160  };
161  
162  var searchurl = $(location).attr('href');
163    
164  $(document).on("click touchstart",function(e) {
165
166    if($(e.target).attr('id') == "headersearch" && $("#header-searchinput").css("display") == "none") {
167      e.preventDefault();
168      showSearch();
169    }
170    else {
171      if ($(e.target).attr('id') == "header-searchfield" || $(e.target).attr('id') == "header-searchbutton") {
172          ;// Klick innerhalb des Suchfeldes
173      }
174      else {
175          hideSearch();
176      }
177    }
178  });
179  
180});
181
182/*---------- Aktionsseiten-Infobox ----------*/
183
184$(document).on("show-infobox", function(event, info_box_id, info_icon_position){
185  $("#"+info_box_id).css('top',info_icon_position.top + 30)
186    .css('left', info_icon_position.left - 160)
187    .css('display', 'block');
188});
189
190/*---------- Jobs auf News-Detailseite im Footer ----------*/
191
192$(".NewsJobs_item, .NewsJobs_header, .NewsJobs_footer").on("click", function(event){
193  if(event.currentTarget.getAttribute('data-te') !== undefined){
194     var fo_pw = {
195       'hitType': 'event',
196       'eventCategory': 'Jobs',
197       'eventAction': 'Klick',
198       'eventLabel': event.currentTarget.getAttribute('data-te'),
199       'page': window.location.pathname,
200       'location': window.location.href
201     };
202     dfv_ga_repl(fo_pw);
203  }
204});
205
206/*---------- Online-Specials Homepage ----------*/
207
208if($('.StageLeadOnlineSpecialHomepage_sponsorWrapper').find('div.Sponsor_item').length !== 0) {
209
210} else {
211  $('.StageLeadOnlineSpecialHomepage_rightCol-inner').hide();
212}
213
214
215/* Online-Specials Sponsoren */
216
217$(".Sponsor_item-image img").on("click", function () {
218    var node = $(this).closest('a');
219    var val = node.attr('href');
220    if (val !== undefined) {
221        var fo_mr = {
222            'hitType': 'event',
223            'eventCategory': 'Dossiers',
224            'eventAction': 'click',
225            'eventLabel': val,
226            'page': window.location.pathname,
227            'location': window.location.href
228        };
229        dfv_ga_repl(fo_mr);
230    } else {
231        return false;
232    }
233    return true;
234});
235
236
237var md = new MobileDetect(window.navigator.userAgent);
238var oldScrollPosition;
239
240function preventEmptySearch() {
241  $('.SiteHeader_searchform button[type="submit"]').click(function(e) {
242    e.preventDefault();
243    if ( $('.SiteHeader_searchform input[type="text"]').val() !== '' ) {
244      $('.SiteHeader_searchform form').submit();
245    }
246  });
247
248  $('.SiteHeaderSticky_formSearch button[type="submit"]').click(function(e) {
249    e.preventDefault();
250    if ( $('.SiteHeaderSticky_formSearch input[type="text"]').val() !== '' ) {
251      $('.SiteHeaderSticky_formSearch form').submit();
252    }
253  });
254
255  $('.FormSearchMobile button[type="submit"]').click(function(e) {
256    e.preventDefault();
257    if ( $('.FormSearchMobile input[type="text"]').val() !== '' ) {
258      $('.FormSearchMobile').submit();
259    }
260  });
261
262  $('.FormSearch button[type="submit"]').click(function(e) {
263    e.preventDefault();
264    if ( $('.FormSearch input[type="text"]').val() !== '' ) {
265      $('.FormSearch').submit();
266    }
267  });
268}
269
270function initAsideNav() {
271  $('.aside-menu .toggle-menu').click(function(e) {
272    e.preventDefault();
273    $(this).closest('.aside-menu').toggleClass('open');
274    $(this).closest('.aside-menu').find('.collapse-area').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
275      if (e.originalEvent.propertyName === 'max-height') {
276        $(document.body).trigger("sticky_kit:recalc");
277      }
278    });
279  });
280}
281
282function initSearchToggle() {
283  $('.ToggleSearch').click(function() {
284    var searchform = '.SiteHeader .SiteHeader_searchform';
285
286    if ( $(searchform+':visible').length === 0 ) {
287      $(searchform).slideDown(225);
288      $('.ToggleSearch').css('color', '#BA1818')
289      .parent().addClass('isActive');
290    } else if ( $(searchform+':visible').length > 0) {
291      $(searchform).slideUp(225);
292      $('.ToggleSearch').removeAttr('style')
293      .parent().removeClass('isActive');
294    }
295  });
296}
297
298function initMobileNav() {
299  $('.toggle-mobile-nav').click(function(e) {
300    $('body').toggleClass('mobile-nav-open');
301  });
302}
303
304function initNewsletterSelect() {
305  $('.newsletter-select').click(function(e) {
306    $(this).toggleClass('selected');
307  });
308}
309
310function initStickyColumn() {
311  var ButtonsSharing_margin_top = $('.PageArticle_content .PageArticle_sticky .ButtonsSharing, ' +
312    '.PageArticleAdvertorial_content .PageArticleAdvertorial_sticky .ButtonsSharing').css('margin-top');
313
314  $('.PageArticle_content .PageArticle_sticky, .PageArticleAdvertorial_content .PageArticleAdvertorial_sticky').stick_in_parent({
315    parent     : '.sticky-container',
316    offset_top: 97,
317    bottoming: true
318  }).on("sticky_kit:stick", function(e) {
319    $(this).addClass('is_sticky');
320    $('.PageArticle_content .PageArticle_sticky .ButtonsSharing,' +
321      '.PageArticleAdvertorial_content .PageArticleAdvertorial_sticky .ButtonsSharing ').css('margin-top',0);
322  })
323  .on("sticky_kit:bottom", function(e) {
324    $(this).parent().css('position', 'static');
325  })  
326  .on("sticky_kit:unstick", function(e) {
327    $(this).removeClass('is_sticky'); 
328    $('.PageArticle_content .PageArticle_sticky .ButtonsSharing,' +
329      '.PageArticleAdvertorial_content .PageArticleAdvertorial_sticky .ButtonsSharing').css('margin-top',ButtonsSharing_margin_top);
330  });
331  
332  $('a[href="#"]').click(function(e){
333    e.preventDefault();
334  });
335}
336
337var visible_ad = { v:false};
338
339function check_adverstisment(sw, ct_clicks, adid, direction, galId) {
340
341  if (typeof adid === "undefined" || adid == 0) {
342    //sw.preventDefault();
343    return ct_clicks;
344  }
345
346  /** erster Banner nach 3tem Click, danach ab jedem 5tem Click **/
347  var countDisplayBanner = 5;
348  var firstCountDisplayBanner = 3;
349
350  if (ct_clicks % countDisplayBanner === 0 || ct_clicks === firstCountDisplayBanner) {
351    if (ct_clicks === firstCountDisplayBanner) {
352     ct_clicks = countDisplayBanner;
353    }
354    sw.lockSwipes();
355    sw.disableKeyboardControl();
356    switch(direction){
357      case 'next': hash = visible_ad.sn;
358        break;
359      case 'prev': hash = visible_ad.sp;
360        break;
361      default: break;
362    }
363    var banner_div = "<div id=\"renderSlot_Rectangle-Gal\" class=\"Ad banner gallery inner\"><script type=\"text/javascript\">adition.srq.push(function(api) { api.renderSlot(\"renderSlot_Rectangle-Gal\"); })</script></div>";
364    var banner_name = "Rectangle-Gal";
365    if (md.mobile() != null) {
366      var banner_div  = "<div id=\"renderSlot_Mobil-Rectangle-Gal\" class=\"Ad banner gallery inner\"><script type=\"text/javascript\">adition.srq.push(function(api) { api.renderSlot(\"renderSlot_Mobil-Rectangle-Gal\"); })</script></div>";
367      var banner_name = "Mobil-Rectangle-Gal";
368    }
369    var content_pic = $("#" + galId + " .swiper-wrapper .swiper-slide[data-hash=\"" + hash + "\"]").html();
370
371    adition.srq.push(function(api) {
372      api.configureRenderSlot("renderSlot_" + banner_name).setContentunitId(adid);
373      api.load(["renderSlot_" + banner_name ]).completeRendering();
374    });
375
376
377    $("#" + galId + " .swiper-wrapper .swiper-slide[data-hash=\"" + hash + "\"]").append(banner_div);
378    $("#" + galId + " .swiper-wrapper .swiper-slide[data-hash=\"" + hash + "\"]").children("div[class^='Media']").css('display','none');
379    visible_ad.v = true;
380
381    $(".swiper-container.gallery-thumbs").css("display","none");
382
383    // Desktop: Content einblenden, Swipen aktivieren
384    $(".swiper-button-prev, .swiper-button-next").on('click',{ sw: sw, content_pic: content_pic, visible_ad: visible_ad}, activateSwiping);
385    // Desktop: Content einblenden, Swipen aktivieren
386    $(document).on('keydown',{ sw: sw, content_pic: content_pic, visible_ad: visible_ad}, activateSwiping);
387    // Mobile-View: Content einblenden, Swipen aktivieren
388    $(".swiper-container").on('touchmove',{ sw: sw, content_pic: content_pic, visible_ad: visible_ad}, activateSwiping);
389
390    $('.swiper-button-prev, .swiper-button-next').css('width','18%');
391    ct_clicks++;
392  }
393  return ct_clicks;
394}
395
396function initLightbox(){
397
398  $('.img-feature.zoom, .zoomable').on('click',function(e) {
399    e.preventDefault();
400    var galId = $(this).attr('id');
401    var gid   = $(this).data('gid');
402    var url   = $(this).data('url');
403    var gtitle   = $(this).data('title');
404    var close = $(this).data('close');
405    var divid = '#m'+gid;
406    // console.log(close);
407    // console.log('lenght:'+ $('#m'+gid).length);
408    var stateObj = { gallery: gid };
409    history.pushState(stateObj, "start", url);
410    $.each( $('.modal'), function( key, value ) {
411      $(this).attr('class','unmodal hidden');
412    });
413    if($('#m'+gid).length == 0) {
414      $.ajax({
415        url: '/gallery/modal.php',
416        type: 'GET',
417        async: false,
418        data: {gid:gid},
419        dataType: 'HTML',
420        success: function(data) {
421          $('body').append(data);
422        }
423      });
424    } else {
425      $('#m'+gid).attr('class','modal idle');
426    }
427    var adid = $(divid).data("adid");
428    var ct_clicks = 0;
429
430    var mySwiper = new Swiper ($(divid + ' .swiper-container'), {
431      // Optional parameters
432      direction:  'horizontal',
433      loop:       true,
434      hashnav: true,
435      runCallbacksOnInit: false,
436      pagination: '.swiper-pagination',
437      nextButton: '.swiper-button-next',
438      prevButton: '.swiper-button-prev',
439      spaceBetween: 20,
440      observer: true,
441      observeParents: true,
442      onSlideChangeEnd: function (sw) {
443        visible_ad.sp = $("#" + gid + " .modal > .modal-background .swiper-wrapper .swiper-slide-prev").data("hash");
444        visible_ad.sn = $("#" + gid + " .modal > .modal-background .swiper-wrapper .swiper-slide-next").data("hash");
445      },
446      onSlideNextStart: function (sw) {
447        if (typeof window.sp_track_virtual_page_view === 'function') {
448          window.sp_track_virtual_page_view(galId, url, gtitle);
449        }
450        window.dfv_ga_vpageview(url, gtitle);
451        ct_clicks++;
452        check_adverstisment(sw, ct_clicks, adid, 'next', gid);
453      },
454      onSlidePrevStart: function (sw) {
455        if (typeof window.sp_track_virtual_page_view === 'function') {
456          window.sp_track_virtual_page_view(galId, url, gtitle);
457        }
458        window.dfv_ga_vpageview(url, gtitle);
459        ct_clicks++;
460        check_adverstisment(sw, ct_clicks, adid, 'prev', gid);
461      }
462    });
463    //console.log(mySwiper);
464    oldScrollPosition = $(document).scrollTop();
465    //console.log($('#m'+gid));
466    $('body').toggleClass('modal-open');
467    //$('body ' + divid).toggleClass('modal-open');
468    if (md.mobile() != null) {
469      // $('.modal').css('max-height', $(window).innerHeight());
470    }
471    $('.modal .modal-close').one('click',function(e) {
472      $("#readmorem" + gid).removeClass("active");
473      $(".swiper-slide .image img").removeClass("smooth");
474      console.log('url:'+url);
475      e.preventDefault();
476      if (close) {
477        $('body').removeClass('modal-open');
478        var stateObj = { gallery: gid };
479        history.pushState(stateObj, "close", '/galleries');
480        if (md.mobile() != null) {
481          $(document).scrollTop(oldScrollPosition);
482        }
483      } else {
484        window.location.href = '/galleries';
485        $('body').removeClass('modal-open');
486        var stateObj = { gallery: gid };
487        history.pushState(stateObj, "close", '/galleries');
488      }
489
490      // Bannerlogik zurücksetzen
491      // console.log("reset advertisement");
492      ct_clicks   = 0;
493      visible_ad  = { v:false };
494
495    });
496
497    /* Gallery Info Text */
498    if($('#m' + gid + ' .infotext').length && !$("#m" + gid + ' .social-media-bar .infotext').length) {
499      var infotext = $('#m' + gid + ' .infotext').detach();
500      infotext.appendTo("#m" + gid + ' .social-media-bar');
501    }
502    $('.modal .infotext, .galleryreadmore').on('click tap', function(e) {
503      var view_width  = $( window ).width();
504      var view_height = $( window ).height();
505      var info_width  = $('#readmorem'+gid).width();
506      var info_height = $('#readmorem'+gid).height();
507
508      $('#readmorem'+gid).css("top", (view_height / 2) - (info_height / 2));
509      $('#readmorem'+gid).css("left", (view_width / 2) - (info_width / 2));
510
511      $("#readmorem" + gid).toggleClass("active");
512      $(".swiper-slide .image img").toggleClass("smooth");
513
514      if($(".galleryreadmore.active").length){
515        mySwiper.lockSwipes();
516      }
517      else{
518        mySwiper.unlockSwipes();
519      }
520
521    });
522
523    $('.modal .modal-inner > .toggle-captions').on('click tap',function(e) {
524      console.log("toggle caption")
525      e.preventDefault();
526      $(this).closest('.modal').toggleClass('show-captions');
527    });
528
529  });
530
531}
532
533var galleryTop = new Array();
534var galleryThumbs = new Array();
535var galleryTopfw = new Array();
536var galleryThumbsfw = new Array();
537
538function activateSwiping(event){
539  // Aktiviert das Blättern und setzt die Eventhandler für das Stoppen zurück
540  $(".PageGallery_content .gallery-top .swiper-slide-active, .PageGallery_content .gallery-top-fw .swiper-slide-active").html(event.data.content_pic);
541  $(this).parent().parent().find('.swiper-wrapper .swiper-slide-active').html(event.data.content_pic);
542  $(".banner.gallery.inner").remove();
543  $(".swiper-container.gallery-thumbs").css("display","block");
544
545  event.data.visible_ad.v = false;
546  event.data.sw.unlockSwipes();
547  event.data.sw.enableKeyboardControl();
548  $(".swiper-button-prev, .swiper-button-next").off('click',activateSwiping);
549  $(document).off('keydown', activateSwiping);
550  $(".swiper-container").off('touchmove', activateSwiping);
551}
552
553
554function initGallery() {
555
556  $('.MediaGallery').each(function(index){
557    var galId = $(this).attr('id');
558    var url   = $(this).data('url');
559    var gtitle   = $(this).data('title');
560
561    var close = $(this).data('close');
562    var divid = $(this).parent().attr('id');
563
564    var adid = $("#"+galId).data("adid");
565    var ct_clicks = 0;
566
567    galleryTop[index] = new Swiper ('#' + galId + ' .swiper-container.gallery-top', {
568      direction:  'horizontal',
569      loop:       false,
570      spaceBetween:        30,
571      nextButton:          '.swiper-button-next',
572      prevButton:          '.swiper-button-prev',
573      control:             galleryThumbs[index],
574      keyboardControl:     true,
575      observer: true,
576      observeParents: true,
577      hashnav: false,
578      centeredSlides:      true,
579      slideToClickedSlide: true,
580      runCallbacksOnInit: false,
581      //setTransform(slide,'translate3d('+(20)+'px,0,0)'),
582      onReachEnd: function(swiper) {
583        $('#swiper-left').css('width','15%');
584        console.log($('#swiper-left').css('width'));
585        //alert('jetzt kommt Werbung')
586      },
587      onTransitionEnd: function (sw) {
588        visible_ad.sp = $("#" + galId + " .swiper-wrapper .swiper-slide-prev").data("hash");
589        visible_ad.sn = $("#" + galId + " .swiper-wrapper .swiper-slide-next").data("hash");
590      },
591      onSlideNextStart: function (sw) {
592        window.dfv_iom_rpl();
593        if (typeof window.sp_track_virtual_page_view === 'function') {
594          window.sp_track_virtual_page_view(galId, url, gtitle);
595        }
596        window.dfv_ga_vpageview(url, gtitle);
597        ct_clicks++;
598        ct_clicks = check_adverstisment(sw, ct_clicks, adid, 'next', galId);
599        //sw.stopPropagation();
600      },
601      onSlidePrevStart: function (sw) {
602        window.dfv_iom_rpl();
603        if (typeof window.sp_track_virtual_page_view === 'function') {
604          window.sp_track_virtual_page_view(galId, url, gtitle);
605        }
606        window.dfv_ga_vpageview(url, gtitle);
607        ct_clicks++;
608        ct_clicks = check_adverstisment(sw, ct_clicks, adid, 'prev', galId);
609        //sw.stopPropagation();
610      }
611
612    });
613  });
614
615  $(".MediaGallery_slideArrowRight").css('opacity','1');
616  $(".MediaGallery_slideRight").on("click touchstart swipe", function () {
617    $(".MediaGallery_slideArrowRight").css('opacity','');
618  });
619}
620
621function initFullWidthGallery() {
622
623    $('.MediaGalleryFullWidth').each(function(index){
624        var galId = $(this).attr('id');
625        var url   = $(this).data('url');
626        var gtitle   = $(this).data('title');
627        var close = $(this).data('close');
628        var divid = $(this).parent().attr('id');
629
630        var adid = $("#"+galId).data("adid");
631        var ct_clicks = 0;
632
633        galleryTopfw[index] = new Swiper ('#' + galId + ' .swiper-container.gallery-top-fw', {
634            direction:           'horizontal',
635            loop:                true,
636            autoplay:            5000,
637            speed:               1000,
638            spaceBetween:        0,
639            nextButton:          '.swiper-button-next',
640            prevButton:          '.swiper-button-prev',
641            keyboardControl:     true,
642            observer:            true,
643            observeParents:      true,
644            hashnav:             false,
645            centeredSlides:      true,
646//            pagination:          '.swiper-pagination',
647//            paginationElement:   'span',
648//            paginationClickable: true,
649//            paginationType:      'bullets',
650            slideToClickedSlide: true,
651            runCallbacksOnInit: false,
652            autoHeight: (window.innerWidth > 768) ? false : true,
653            //setTransform(slide,'translate3d('+(20)+'px,0,0)'),
654            onReachEnd: function(swiper) {
655                $('#swiper-left').css('width','15%');
656                //alert('jetzt kommt Werbung')
657            },
658            onTransitionEnd: function (sw) {
659              visible_ad.sp = $("#" + galId + " .swiper-wrapper .swiper-slide-prev").data("hash");
660              visible_ad.sn = $("#" + galId + " .swiper-wrapper .swiper-slide-next").data("hash");
661            },
662            onSlideNextStart: function (sw) {
663                window.dfv_iom_rpl();
664                if (typeof window.sp_track_virtual_page_view === 'function') {
665                  window.sp_track_virtual_page_view(galId, url, gtitle);
666                }
667                window.dfv_ga_vpageview(url, gtitle);
668                ct_clicks++;
669                ct_clicks = check_adverstisment(sw, ct_clicks, adid, 'next', galId);
670                //sw.stopPropagation();
671            },
672            onSlidePrevStart: function (sw) {
673                window.dfv_iom_rpl();
674                if (typeof window.sp_track_virtual_page_view === 'function') {
675                  window.sp_track_virtual_page_view(galId, url, gtitle);
676                }
677                window.dfv_ga_vpageview(url, gtitle);
678                ct_clicks++;
679                ct_clicks = check_adverstisment(sw, ct_clicks, adid, 'prev', galId);
680                //sw.stopPropagation();
681            }
682
683        });
684    });
685}
686
687function initCards() {
688  $('.card-collapse').on('click',(function(e) {
689    var me = $(this);
690    $('.card-collapse.open').not(this).removeClass('open');
691    me.toggleClass('open');
692  }));
693  $('.card-collapse').on('click','a',(function(e) {
694    //e.stopImmediatePropagation();
695    console.log('offa');
696    console.log($(this));
697    $(this).trigger('click');
698  }));
699}
700
701
702
703// __________________________________________________
704//
705//
706//			!Check Idle Time Mobile
707
708var timeoutID;
709
710function goInactive() {
711    if($('body').scrollTop() > 0) {
712      $('body').addClass('idle');
713    }
714    
715    $('.modal').addClass('idle');
716}
717 
718function goActive() {
719    $('body.idle').removeClass('idle');
720    $('.modal.idle').removeClass('idle');
721    startTimer();
722}
723 
724function resetTimer(e) {
725    window.clearTimeout(timeoutID);
726    goActive();
727}
728 
729function startTimer() {
730    // wait 2 seconds before calling goInactive
731    timeoutID = window.setTimeout(goInactive, 2000);
732}
733
734
735function make_square(element) {
736//   var cw = $(element).width();
737//   $(element).css({'height':cw+'px'});
738}
739
740
741
742
743
744 
745function setupIdle() {
746    this.addEventListener("mousemove", resetTimer);
747    this.addEventListener("mousedown", resetTimer);
748    this.addEventListener("keypress", resetTimer);
749    this.addEventListener("DOMMouseScroll", resetTimer);
750    this.addEventListener('mousewheel', resetTimer, {passive: true});
751    this.addEventListener("touchmove", resetTimer);
752    this.addEventListener("touchstart", resetTimer);
753    this.addEventListener("MSPointerMove", resetTimer);
754 
755    startTimer();
756}
757
758function initNewsletterBoxTheSpin() {
759  if ( $('.NLSpinBox') ) {
760    $('.NLSpinBox').css('bottom', '0');
761    $('.NLSpinBox').css('height', '0');
762    $('.NLSpinBox').delay(4000).css('display', 'block').animate({height: "210px"}, 500);
763
764    $('.NLSpinBox_close').click(function() {
765      $(".NLSpinBox").slideToggle(600, function() {
766       // Animation beendet
767      });
768    });
769  }
770}
771
772function createYoutubeApi() {
773  var tag = document.createElement('script');
774  tag.src = "https://www.youtube.com/iframe_api";
775  var firstScriptTag = document.getElementsByTagName('script')[0];
776  firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
777}
778
779$(document).ready(function(){
780//  $("a[href=#]").click(function(e) {
781//    e.preventDefault();
782//  });
783//  if (md.mobile() != null) {
784//    $('body').addClass('is-mobile');   
785//  }; 
786//  if (md.phone() != null) {
787//     $('.stage-fashion > .row > .col-sm-4').slice(-2).remove();
788//  }
789  initSearchToggle();
790  setupIdle();
791  initStickyColumn();  
792  initAsideNav();
793  initMobileNav();
794  preventEmptySearch();
795  initLightbox();
796  initCards();
797  initNewsletterSelect();
798  initGallery();
799  initFullWidthGallery();
800  initNewsletterBoxTheSpin();
801  createYoutubeApi();
802
803  $('.ImageModal').colorbox({iframe:false, opacity: 0.8});
804
805  // mobile Navigation Flyout
806  $(".NavigationFlyout_toggleButton").on('click',function(e){
807    e.preventDefault();$('.NavigationFlyout').toggleClass('isActive');
808  });
809  
810  // mobile Navigation Flyout
811  $(".NavigationMobile_toggle").on('click',function(e){
812    e.preventDefault();$('.NavigationMobile').toggleClass('isActive');
813    $('body').toggleClass('isFixed');
814  });
815  
816  $('.paneltop').click( function() {
817    $(this).css({"background-position":"0px -21px"})
818    .siblings().animate({"height":"100px"}, 200)
819  }, function() {
820    $(this).css({"background-position":"0px 0px"})
821    .siblings().animate({"height":"0px"}, 200);
822  })
823
824   // Bilder quadratisieren
825   $( '.to-be-squared .teaser-image' ).each(function( index ) {
826      make_square($(this));
827   });
828
829  /*    Abo-Panel    */
830  var topnav_child_abo = document.getElementsByClassName('NavigationMeta_item')[2];
831  var abo_panel = document.getElementsByClassName('NavigationMeta_aboPopup')[0];
832
833  function toggle_abo_panel() {
834    abo_panel.classList.toggle('Hide');
835  }
836  function toggle_topnav_state() {
837    topnav_child_abo.classList.toggle('isActive');
838  }
839  if (topnav_child_abo && abo_panel) {
840    topnav_child_abo.onmouseover = function() { toggle_abo_panel(); toggle_topnav_state(); };
841    topnav_child_abo.onmouseout = function() { toggle_abo_panel(); toggle_topnav_state(); };
842    abo_panel.onmouseover = function() { toggle_abo_panel(); toggle_topnav_state(); };
843    abo_panel.onmouseout = function() { toggle_abo_panel(); toggle_topnav_state(); };
844  }
845
846  // Login-Popup/Logout-Popup
847  var accountBtn = $(".NavigationMeta_item-account");
848  var accountBtnLink = $(".NavigationMeta_item-account .NavigationMeta_itemLink");
849  var loginPanel = $(".NavigationMeta .FormLoginPopup");
850  var logoutPanel = $(".NavigationMeta .FormLogoutPopup");
851  var panel = accountBtn.hasClass('isSignedOut') ? loginPanel : logoutPanel;
852  var panel_input = $(".NavigationMeta .FormLoginPopup input");
853
854  function showPanel(selector, a) {
855    selector.css('visibility', 'visible');
856    a.addClass('isActive');
857  }
858  function hidePanel(selector, a) {
859    selector.removeAttr('style');
860    a.removeClass('isActive');
861  }
862
863  $(".NavigationMeta .FormLoginPopup .FormField_icon").click(function() {
864    $('.NavigationMeta .FormLoginPopup .FormField_control').trigger('click');
865  });
866
867  accountBtn.click(function(e) {
868    e.preventDefault();
869  });
870
871  accountBtn.mouseover( function() { showPanel(panel, accountBtn); } );
872  accountBtn.mouseout( function() { hidePanel(panel, accountBtn); } );
873  panel.mouseover( function() { showPanel(panel, accountBtn); } );
874  panel.mouseout( function() {
875    if ( !panel_input.is(":focus") ) {
876      hidePanel(panel, accountBtn);
877    }
878  });
879
880});
881
882// quadratische Bildergrößen beim Fenster-Verkleinern neu berechnen
883$( window ).resize(function() {
884   $( '.to-be-squared .teaser-image' ).each(function( index ) {
885      make_square($(this));
886   });
887});
888
889function manage_input_active_state(selector) {
890  $(selector).each(function() {
891    if ( $(this).val() ) {
892      $(this).addClass('FormField_control-filled');
893    }
894    $(this).change(function() {
895      if ( $(this).val() ) {
896        $(this).addClass('FormField_control-filled');
897      }
898      if ( $(this).val() === '' ) {
899        $(this).removeClass('FormField_control-filled');
900      }
901    });
902  });
903}
904
905manage_input_active_state(".FormField_control:not([type='submit'])");
906manage_input_active_state(".FormField_controlGroupField:not([type='submit'])");
907
908function manageCreditsLink(outerClassName) {
909  document.addEventListener('DOMContentLoaded', function() {
910
911    const imageList = document.getElementsByClassName(outerClassName);
912    for (let i = 0; i < imageList.length; i++) {
913
914      for (let j = 0; j < imageList[i].children.length; j++) {
915
916        if (imageList[i].children[j].classList[0] === 'MediaImage_credits') {
917          let creditsText = imageList[i].children[j];
918          let creditsTextTrimmed = creditsText.innerHTML.replace(/^\s+|\s+$/g, '');
919          if (creditsTextTrimmed === '') {
920            creditsText.remove(); //remove empty credits
921          } else {
922            //Open credits link in new tab
923            let creditsLinkContainer =
924              (creditsText.getElementsByClassName('MediaImage_credits-link')[0] !== undefined)
925                ? creditsText.getElementsByClassName('MediaImage_credits-link')[0]
926                : '';
927            let creditsLink =
928              (creditsLinkContainer !== '' && creditsLinkContainer.dataset.href !== undefined)
929                ? creditsLinkContainer.dataset.href
930                : '';
931            if (creditsLink) {
932              creditsLinkContainer.onclick = function(e) {
933                e.preventDefault();
934                let opener = window.open();
935                opener.opener = null;
936                opener.location = creditsLink;
937                opener.target = '_blank';
938              };
939            }
940          }
941        }
942
943      }
944
945    }
946
947  }, false);
948}
949manageCreditsLink('MediaImage');
950manageCreditsLink('MediaImageGallery');
951
952(()=>{var __webpack_modules__={768:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Embed});var _module__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(631),_utils_sendRequest__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(58),_utils_adBlockCheck__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(173),_tracking_module__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(558);function _await(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function _empty(){}function _invokeIgnored(e){var t=e();if(t&&t.then)return t.then(_empty)}function _async(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function _awaitIgnored(e,t){if(!t)return e&&e.then?e.then(_empty):Promise.resolve()}function _invoke(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _typeof(e){return(_typeof="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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var loadAutoplayList=_async((function(e,t,n,i){var o;return _invoke((function(){if(e.fallbackElementsPromise)return _awaitIgnored(e.fallbackElementsPromise)}),(function(){var a,r=null===(a=e.fallbackElements)||void 0===a?void 0:a.length;return _await(r?e.fallbackElements.map((function(e){return _objectSpread(_objectSpread({},e),{},{fallback_id:e.id})})):new Promise((function(n){(0,_utils_sendRequest__WEBPACK_IMPORTED_MODULE_1__.w)("https://api.embed.pinpoll.com/autoplay/nextEmbeds",{elementId:t,url:e.url,topic:e.topic},window.Pinpoll.storage).then((function(e){return e.json()})).then((function(t){var o;return n(null===(o=window.Pinpoll.embed)||void 0===o?void 0:o.sortPreferredAutoEmbeddedElements(t.elements,e,i))})).catch((function(e){console.log("Pinpoll: error during fetching autoplay polls",e),n([])}))})),(function(e){var t;return o=e,n&&(o=null===(t=o)||void 0===t?void 0:t.slice(0,n)),o}),r)}))})),Embed=function(){function Embed(e,t,n){var i=this;if(_classCallCheck(this,Embed),_defineProperty(this,"targetWindow",void 0),_defineProperty(this,"lazyLoading",void 0),_defineProperty(this,"type",void 0),_defineProperty(this,"id",void 0),_defineProperty(this,"iframe",void 0),_defineProperty(this,"element",void 0),_defineProperty(this,"mode",void 0),_defineProperty(this,"data",void 0),_defineProperty(this,"loaded",!1),_defineProperty(this,"instance",void 0),_defineProperty(this,"questionViewTriggered",!1),_defineProperty(this,"url",void 0),_defineProperty(this,"autoplay",null),_defineProperty(this,"nativeAd",null),_defineProperty(this,"pendings",{}),_defineProperty(this,"pendingPostMessages",[]),_defineProperty(this,"loadDataSet",!1),_defineProperty(this,"widgetIndex",void 0),_defineProperty(this,"stats",void 0),this.element=t,this.targetWindow=e.location,this.type=e.type,this.mode=e.mode,this.data=e,this.stats=n,this.id=generateId(e),this.widgetIndex=window.Pinpoll.embed.initedEmbeds,window.Pinpoll.embed.initedEmbeds+=1,this.lazyLoading="eager"!==e.loading&&"preload"!==e.loading,this.data.native)return this.loadNative(t,e).then((function(t){if(t){t.targetId=i.id,i.instance=t,i.instance.promises.preload?i.instance.promises.preload.then((function(){return i.stats.markLoad()})):i.stats.markLoad();var n=!1;i.instance.on("poll:initialized","global.js - statTracker",(function(){var e;n||(n=!0,i.stats.markRender(),i.stats.observeImpression((null===(e=i.instance)||void 0===e?void 0:e.container)||i.element))})),i.instance.on("poll:initialized","global.js",(function(){var n,o;t.elementId&&(e.id=+t.elementId,(0,_tracking_module__WEBPACK_IMPORTED_MODULE_2__.Z)(t.visitorStorage,{widgetIndex:"e"+(null!==(n=null===(o=window.Pinpoll.embed)||void 0===o?void 0:o.embeds.findIndex((function(e){return e===i})))&&void 0!==n?n:0),originPage:e.url,widgetLocation:buildUrl(e,t.targetId||"")}).start())}))}})).catch((function(e){console.error("Pinpoll: error during loading native embed",e)})),void this.registerEventListener();this.iframe=buildIframe(e,this.id),this.lazyLoading?(this.iframe.setAttribute("class","lazyload"),document.addEventListener("lazybeforeunveil",(function e(t){t.target===i.iframe&&((0,_module__WEBPACK_IMPORTED_MODULE_0__.oW)(i.data,i.element),i.url=buildUrl(i.data,i.id),i.iframe.setAttribute("data-src",
952i.url),i.stats.markLoad(),document.removeEventListener("lazybeforeunveil",e))})),document.addEventListener("lazyloaded",(function e(t){t.target===i.iframe&&(i.loaded=!0,i.stats.markRender(),i.stats.observeImpression(i.iframe),document.removeEventListener("lazyloaded",e))}))):(this.loaded=!0,this.stats.markLoad(),this.url=buildUrl(e,this.id),this.iframe.src=this.url),this.registerEventListener(),t.parentNode===document.getElementsByTagName("head")[0]?document.body.appendChild(this.iframe):t.parentElement?t.parentElement.insertBefore(this.iframe,t):document.body.appendChild(this.iframe),this.lazyLoading||(this.stats.markRender(),this.stats.observeImpression(this.iframe))}return _createClass(Embed,[{key:"loadNative",value:function(e,t){if(!window.Pinpoll.nativeLoader){var n=document.createElement("script");n.async=!0,n.type="module",n.innerHTML="window.Pinpoll.nativeLoader = async (embedElement, options) => {\n                const { createEmbed } = await import('".concat("https://tools.pinpoll.com/embed-v2/main.js?v=1790061720894","');\n                return createEmbed(embedElement, options);\n            }"),document.head.appendChild(n)}return new Promise((function(n){!function i(){if("function"==typeof window.Pinpoll.nativeLoader)return n(window.Pinpoll.nativeLoader(e,t));setTimeout(i,100)}()}))}},{key:"loadNextEmbed",value:function(){if(this.autoplay){var e;this.autoplay.currentIndex=this.autoplay.currentIndex||0;var t=null===(e=this.autoplay.nextAutoplayedElements)||void 0===e?void 0:e[this.autoplay.currentIndex++];t&&this.loadEmbedItem(t)}}},{key:"registerEventListener",value:function(){var e=this;window.addEventListener("message",(function(t){var n,i,o=t.data;try{if("string"==typeof o){if(!o.startsWith("{"))return!1;o=JSON.parse(o)}}catch(e){console.warn(e)}if(o&&"object"===_typeof(o)&&o.action)if("vote"===o.action||"unvote"===o.action)-1!==navigator.appName.indexOf("Internet Explorer")&&-1===navigator.appVersion.indexOf("MSIE 1")&&(o=JSON.stringify(o)),null!==(n=e.iframe)&&void 0!==n&&n.contentWindow||(e.iframe=document.getElementById(e.id)),null===(i=e.iframe.contentWindow)||void 0===i||i.postMessage(o,e.targetWindow);else if(o.target===e.id)switch(o.action){case"get:loaddata":e.setLoadData();break;case"set:height":e.data.height||e.setEmbedHeight(o.value);break;case"get:recaptcha":e.activateRecaptcha(o.top,o.sitekey);break;case"poll-view:finished":e.questionViewTriggered=!0;break;case"autoplay:check":var a;e.initAutoplay(),e.autoplay&&(null===(a=e.autoplay.loadPromise)||void 0===a||a.then((function(){var t,n,i,o;null!==(t=e.autoplay)&&void 0!==t&&null!==(n=t.nextAutoplayedElements)&&void 0!==n&&n.length&&e.autoplay.nextAutoplayedElements[e.autoplay.currentIndex||0]&&(null===(i=e.iframe)||void 0===i||null===(o=i.contentWindow)||void 0===o||o.postMessage({action:"autoplay:ready"},"*"))})));break;case"autoplay:fire":e.loadNextEmbed();break;case"update:visitor":window.Pinpoll.storage.visitor=o.visitor;break;case"native-ad:set":(0,_utils_adBlockCheck__WEBPACK_IMPORTED_MODULE_3__.I)().finally((function(){var t;if(window.Pinpoll.userHasAdblock&&1===(null===(t=o.adConfig)||void 0===t?void 0:t.type))return console.warn("Pinpoll Native Ad: AdBlock detected, no native ad will be shown");e.setNativeAd(o.adTag,o.adConfig),e.nativeAd&&e.pendings.nativeinterstitial&&(e.nativeAd.onInterstitialStart(""+e.pendings.nativeinterstitial),e.pendings.nativeinterstitial=null)}));break;case"interstitial-start":e.nativeAd?e.nativeAd.onInterstitialStart(o.ad.duration):e.pendings.nativeinterstitial=o.ad.duration}}))}}
952,{key:"setLoadData",value:function(){var e,t=this;if(null!==(e=this.iframe)&&void 0!==e&&e.contentWindow){var n,i,o={embed_url:this.url,visitor:window.Pinpoll.storage.visitor,trackingDone:null===(n=window.Pinpoll.tracking)||void 0===n?void 0:n.requestDone,cookieEnabled:navigator.cookieEnabled,originPage:this.data.url,path:window.location.pathname,fallback_id:this.data.fallback_id,autoplayedElementId:this.data.autoplayedElementId,cssClass:this.data.cssClass,parent_id:this.id,autoplayDelay:this.data.autoplayDelay};for(["consent","targetAds","customURL","ppId"].forEach((function(e){t.data[e]&&(o[e]=t.data[e])})),window.Pinpoll.appName&&(o.app=window.Pinpoll.appName),this.loadDataSet||void 0===this.widgetIndex||(o.widgetIndex="e"+this.widgetIndex),null===(i=this.iframe)||void 0===i||i.contentWindow.postMessage({action:"set:loaddata",data:o},"*"),this.loadDataSet=!0;this.pendingPostMessages.length;){var a=this.pendingPostMessages.shift();a&&this.postMessage(a)}}}},{key:"setNativeAd",value:function setNativeAd(adTag,adConfig){var _this4=this;if(adTag)if(this.nativeAd)this.nativeAd.handle("reinitialized",{adTag,adConfig})||this.nativeAd.show();else{var _ref,_this$instance2,container=document.createElement("div");container.setAttribute("style","position:relative;"),null===(_ref=this.iframe||(null===(_this$instance2=this.instance)||void 0===_this$instance2?void 0:_this$instance2.container))||void 0===_ref||_ref.after(container);var script=document.createElement("script");script.adData={config:adConfig,embed:this},script.innerText=adTag,container.append(script),this.nativeAd={script,container,handle:function handle(handlerName,params){return!!_this4.nativeAd&&!!_this4.nativeAd.script.adData.config[handlerName]&&(eval(String(_this4.nativeAd.script.adData.config[handlerName]))(params),!0)},hide:function(){_this4.nativeAd&&(_this4.nativeAd.handle("hide")||(_this4.nativeAd.container.style.visibility="hidden"),_this4.nativeAd.handle("hidden"))},show:function(){_this4.nativeAd&&(_this4.nativeAd.handle("show")||(_this4.nativeAd.container.style.visibility="visible"),_this4.nativeAd.handle("shown"))},onInterstitialStart:function(e){var t,n,i;null!==(t=_this4.nativeAd)&&void 0!==t&&t.handle("interstitialStart",{duration:e})||(null===(i=_this4.nativeAd)||void 0===i||i.hide(),setTimeout((function(){var e,t,n;(null===(e=_this4.nativeAd)||void 0===e?void 0:e.handle("interstitialStop"))||null===(t=_this4.nativeAd)||void 0===t||t.show(),null===(n=_this4.nativeAd)||void 0===n||n.handle("interstitialStopped")}),1e3*+e)),null===(n=_this4.nativeAd)||void 0===n||n.handle("interstitialStarted")}},this.nativeAd.handle("initialized",{adConfig})}}},{key:"loadEmbedItem",value:function(e){var t,n;this.iframe&&e&&(this.data.id=e.element_id,e.id&&(this.data.fallback_id=e.id),e.element_id&&(this.data.autoplayedElementId=e.element_id),e.custom_design_id&&(this.data.design=e.custom_design_id),null===(t=this.nativeAd)||void 0===t||t.hide(),this.id=generateId(this.data),this.url=buildUrl(this.data,this.id),null===(n=this.iframe)||void 0===n||n.setAttribute("id",this.id),this.iframe.src=this.url)}},{key:"setEmbedHeight",value:function(e){if(e&&parseFloat(e)){var t=document.getElementById(this.id);t&&(t.setAttribute("height",e),t.setAttribute("style","display:block;height:".concat(parseFloat(e),"px!important;")))}}},{key:"activateRecaptcha",value:function(e,t){var n=this,i=function(e){var i,o,a,r,l,s=document.createElement("div"),d=document.createElement("div");window.grecaptcha.render(d,{sitekey:t,callback:function(e){var t,i;null===(t=n.iframe)||void 0===t||null===(i=t.contentWindow)||void 0===i||i.postMessage({action:"recaptcha:success",response:e},n.targetWindow),s.style.opacity="0",s.style.transform="translateY(20px)",window.setTimeout((function(){var e;null==s||null===(e=s.parentNode)||void 0===e||e.removeChild(s)}),400)}}),s.appendChild(d),s.setAttribute("style","-webkit-transition:opacity .4s,-webkit-transform .4s;transition:opacity .4s,-webkit-transform .4s;transition:opacity .4s,transform .4s;transition:opacity .4s,transform .4s,-webkit-transform .4s;-webkit-transform:translateY(20px);transform:translateY(20px)"),s.style.position="absolute",s.style.width="".concat(null===(i=n.iframe)||void 0===i?void 0:i.offsetWidth,"px"),s.style.left="".concat(null===(o=n.iframe)||void 0===o?void 0:o.offsetLeft,"px"),s.style.top="".concat((null===(a=n.iframe)||void 0===a?void 0:a.offsetTop)||0+e,"px"),s.style["text-align"]="answer"!=n.type?"center":"left",d.style.display="inline-block",d.style.margin="answer"!=n.type?"0 0 0 12%":"0 0 0 8em",s.style.opacity="0",window.setTimeout((function(){s.style.opacity="1",s.setAttribute("style",s.getAttribute("style").replace("translateY(20px)","translateY(0)"))}),1),null===(r=n.iframe)||void 0===r||null===(l=r.parentNode)||void 0===l||l.insertBefore(s,n.iframe.nextSibling)};if(window.grecaptcha)i(e);
952else{var o="recaptcha_".concat(this.id),a=document.createElement("script");a.src="https://www.google.com/recaptcha/api.js?onload=".concat(o,"&render=explicit"),a.async=!0,a.defer=!0,window[o]=function(){i(e)},document.head.appendChild(a)}}},{key:"postMessage",value:function(e){var t,n;this.loadDataSet?null===(t=this.iframe)||void 0===t||null===(n=t.contentWindow)||void 0===n||n.postMessage(e,this.targetWindow):this.pendingPostMessages.push(e)}},{key:"initPreload",value:function(){(0,_module__WEBPACK_IMPORTED_MODULE_0__.oW)(this.data,this.element);var e=this.instance;if(e)e.dispatch("poll:initPreload",e);else{var t=_objectSpread(_objectSpread({},this.data),{},{fallbackElementsPromise:void 0});this.postMessage({action:"preload:init",data:t})}"preload"===this.data.loading&&(this.data.loading="eager")}},{key:"reload",value:function(){this.iframe&&(this.iframe.src=buildUrl(this.data,this.id))}},{key:"loadAutoplayedElements",value:function(e){var t=this;this.autoplay&&(this.autoplay.loadPromise=_async((function(){return _invokeIgnored((function(){if(t.autoplay)return _await(loadAutoplayList(t.data,t.autoplay.elementId,e||t.autoplay.limit,t.iframe),(function(e){t.autoplay.nextAutoplayedElements=e,t.data.id||t.loadNextEmbed()}))}))}))())}},{key:"initAutoplay",value:function(){this.autoplay||void 0===this.data.autoplay||(this.autoplay={nextAutoplayedElements:void 0,limit:this.data.autoplay,elementId:this.data.id},this.loadAutoplayedElements())}}]),Embed}();function generateId(e){return"pinpoll_".concat(e.type,"_").concat(e.id,"_").concat(e.mode)}function buildIframe(e,t){var n;switch(e.type){case"quiz":n=500;break;case"answer":n=50;break;default:n=0}var i=document.createElement("iframe");i.setAttribute("title","Pinpoll Widget"),i.setAttribute("frameborder","0"),i.setAttribute("scrolling","no"),i.setAttribute("width","100%"),i.setAttribute("id",t),i.setAttribute("name",window.location.toString()),i.setAttribute("style","display:block; height:"+e.height||0);var o=e.height||n;return o&&i.setAttribute("height",o.toString()),i}function buildUrl(e,t){var n,i=!1,o="";e.styles&&(o+=e.styles),e.height&&(o+="".concat(o.length>0?"&":"","height=").concat(e.height)),e.trackmode&&"preview"===e.trackmode&&(o+="".concat(o.length>0?"&":"","previewMode=1")),e.simulate&&"on"===e.simulate&&(o+="".concat(o.length>0?"&":"","simulate=1")),e.editmode&&"on"===e.editmode&&(o+="".concat(o.length>0?"&":"","editMode=1"),i=!0),e.randomQuestions&&(o+="".concat(o.length>0?"&":"","randomQuestions=1")),e.randomAnswers&&(o+="".concat(o.length>0?"&":"","randomAnswers=1")),"preload"===e.loading&&(o+="".concat(o.length>0?"&":"","preloadMode=1")),e.blockAds&&(o+="".concat(o.length>0?"&":"","blockAds=1")),e.info&&Object.keys(e.info).length&&(o+="".concat(o.length>0?"&":"","info=").concat(encodeURIComponent(JSON.stringify(e.info)))),t&&(o+="".concat(o.length>0?"&":"","parentID=").concat(encodeURIComponent(t)));var a="";if(e.version)return"".concat(e.location,"/embed/").concat(e.version,"?id=").concat(e.id).concat(o?"&".concat(o):"");switch(e.type){case"answer":n="".concat(e.location,"/embed/answer/").concat(e.id).concat(o?"?".concat(o):"");break;default:"result"===e.mode&&(a+="/result"),n="".concat(e.location||"","/").concat(i?"direct/":"","embed/").concat("aipoll"===e.mode?"inspire/":"").concat(e.id).concat(a),e.design&&(n+="/cd/"+e.design),n+=o?"?".concat(o):""}return n}},631:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g,oW:()=>v});var i=n(768);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=["served","loads","renders","impressions"],s=new Set(["url","ppid","class","consent","style","opointdata","rect_data","bis_style"]),d=["target-ads-","_","font-"],c=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500;o(this,e),r(this,"endpoint",void 0),r(this,"flushDelayMs",void 0),r(this,"url",void 0),r(this,"embedcode",void 0),r(this,"stage",-1),r(this,"sentStage",-1),r(this,"flushTimer",null),r(this,"flushing",!1),r(this,"impressionObserver",void 0),this.endpoint=this.resolveEndpoint(),this.flushDelayMs=i,this.url=n,this.embedcode=this.buildEmbedcode(t),this.registerLifecycleFlush()}var t,n;return t=e,(n=[{key:"markServed",value:function(){this.mark("served")}},{key:"markLoad",value:function(){this.mark("loads")}},{key:"markRender",value:function(){this.mark("renders")}},{key:"markImpression",value:function(){var e=this.stage;this.mark("impressions",!1),this.stage>e&&(null!==this.flushTimer&&(window.clearTimeout(this.flushTimer),this.flushTimer=null),this.flush(!1))}},{key:"observeImpression",value:function(e){var t=this;this.stage>=l.indexOf("impressions")||("IntersectionObserver"in window?(this.impressionObserver||(this.impressionObserver=new IntersectionObserver((function(e){e.forEach((function(e){var n;e.isIntersecting&&e.intersectionRatio>=.5&&(t.markImpression(),null===(n=t.impressionObserver)||void 0===n||n.disconnect())}
952))}),{threshold:[.5]})),this.impressionObserver.observe(e)):this.markImpression())}},{key:"resolveEndpoint",value:function(){var e="https://api.embed.pinpoll.com";return"".concat(e.replace(/\/+$/,""),"/v3/widget")}},{key:"buildEmbedcode",value:function(e){var t=this,n={};Array.from(e.attributes).sort((function(e,t){return e.name.localeCompare(t.name)})).forEach((function(e){var i=t.normalizeAttrName(e.name);!i||s.has(i)||d.some((function(e){return i.startsWith(e)}))||void 0!==n[i]||(n[i]=e.value)}));var i={};return Object.keys(n).sort().forEach((function(e){i[e]=n[e]})),JSON.stringify(i)}},{key:"normalizeAttrName",value:function(e){return e.startsWith("data-pinpoll-")?e.substring(13):e.startsWith("data-")?e.substring(5):e}},{key:"advance",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=l.indexOf(e);if(!(n<=this.stage)){if(n>this.stage+1)for(var i=this.stage+1;i<n;i++){var o=l[i];console.warn('Pinpoll: automatically marked skipped stage "'.concat(o,'" for embed ').concat(this.embedcode))}this.stage=n,t&&this.scheduleFlush()}}},{key:"scheduleFlush",value:function(){var e=this;this.endpoint&&(null!==this.flushTimer&&window.clearTimeout(this.flushTimer),this.flushTimer=window.setTimeout((function(){e.flushTimer=null,e.flush(!1)}),this.flushDelayMs))}},{key:"hasPending",value:function(){return this.stage>this.sentStage}},{key:"buildPayloadRow",value:function(e,t){var n=function(n){var i=l.indexOf(n);return i>e&&i<=t?1:0};return{url:this.url,embedcode:this.embedcode,served:n("served"),loads:n("loads"),renders:n("renders"),impressions:n("impressions")}}},{key:"flush",value:function(e){var t=this;if(this.endpoint&&this.hasPending()&&!this.flushing){var n=this.stage,i=this.buildPayloadRow(this.sentStage,n);if(i.served+i.loads+i.renders+i.impressions!==0){var o=i;e&&navigator.sendBeacon?navigator.sendBeacon(this.endpoint,new Blob([JSON.stringify(o)],{type:"application/json"}))&&(this.sentStage=Math.max(this.sentStage,n)):(this.flushing=!0,fetch(this.endpoint,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include",keepalive:e,body:JSON.stringify(o)}).then((function(){t.sentStage=Math.max(t.sentStage,n)})).catch((function(){})).finally((function(){t.flushing=!1,t.hasPending()&&t.scheduleFlush()})))}}}},{key:"mark",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.advance(e,t)}},{key:"registerLifecycleFlush",value:function(){var e=this;window.addEventListener("pagehide",(function(){return e.flush(!0)})),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.flush(!0)}))}}])&&a(t.prototype,n),e}();function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){l=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(l)throw a}}}}function p(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var m={1:"poll",2:"quiz",6:"personality_test"};function h(e){var t,n,i=e.getAttribute("data-pinpoll-location")||e.getAttribute("data-location")||"https://embed.pinpoll.com",o=e.getAttribute("data-design");return{type:e.getAttribute("data-pinpoll-type")||e.getAttribute("data-type")||"poll",aiPollMode:"aipoll"===e.getAttribute("data-mode"),version:e.getAttribute("data-version"),native:null!==e.getAttribute("data-native")||"v2"===e.getAttribute("data-version"),mode:e.getAttribute("data-pinpoll-mode")||e.getAttribute("data-mode")||"poll",location:i,trackmode:e.getAttribute("data-pinpoll-trackmode")||e.getAttribute("data-trackmode")||"default",editmode:e.getAttribute("data-pinpoll-editmode")||e.getAttribute("data-editmode")||"default",simulate:e.getAttribute("data-pinpoll-simulate")||e.getAttribute("data-simulate")||"default",id:parseInt(e.getAttribute("data-pinpoll-id")||e.getAttribute("data-id"),10)||0,height:parseInt(e.getAttribute("data-pinpoll-height")||e.getAttribute("data-height"),10)||0,label:e.getAttribute("data-pinpoll-label")||e.getAttribute("data-label")||"",bgcolor:e.getAttribute("data-pinpoll-bgcolor")||e.getAttribute("data-bgcolor")||"#2395a6",styles:function(){var t,n=/data(?:-pinpoll)?-style-(.+)/,i=[],o=u(e.attributes);try{for(o.s();!(t=o.n()).done;){var a=t.value,r=a.name.match(n);r&&i.push("".concat(encodeURIComponent(r[1]),"=").concat(encodeURIComponent(a.value)))}}catch(e){o.e(e)}finally{o.f()}return!!i.length&&i.join("&")}(),loading:e.getAttribute("data-loading")||!1,design:o?+o:null,randomQuestions:null!==e.getAttribute("random-questions"),randomAnswers:null!==e.getAttribute("random-answers"),forceLoad:null!==e.getAttribute("force-load"),cssClass:null===(t=e.getAttribute("data-css-class"))||void 0===t?void 0:t.trim(),customURL:null===(n=e.getAttribute("data-url"))||void 0===n?void 0:n.trim(),url:e.getAttribute("data-url")||(window.location.origin||"unknown_origin")+window.location.pathname,info:e.getAttributeNames().reduce((function(t,n){return n.startsWith("data-info-")&&(t[n.substring(10)]=e.getAttribute(n)),t}),{}),targetAds:e.getAttributeNames().reduce((function(t,n){return n.startsWith("data-target-a
952ds-")&&(t[n.substring(16)]=e.getAttribute(n)),t}),{}),autoplay:[null,"false"].includes(e.getAttribute("data-autoplay"))?void 0:+(e.getAttribute("data-autoplay")||0),autoplayDelay:[null,""].includes(e.getAttribute("data-autoplay-delay"))?void 0:+(e.getAttribute("data-autoplay-delay")||0),mqeDelay:[null,""].includes(e.getAttribute("data-mqe-delay"))?void 0:+(e.getAttribute("data-mqe-delay")||0),blockAds:![null,"false","0"].includes(e.getAttribute("data-block-ads")),topic:e.getAttribute("data-topic"),ppId:e.getAttribute("data-ppid"),consent:e.getAttribute("data-consent"),muteVoted:![null,"false","0"].includes(e.getAttribute("data-mute-voted"))}}function v(e,t){var n,i=h(t);Object.assign(e,i,{id:i.id||e.id,design:null!==(n=i.design)&&void 0!==n?n:e.design})}const g=function(){return{embeds:[],initedEmbeds:0,fallbackElementsPromise:{},isElementAlreadyEmbedded:function(e,t,n){var i=t?m[t]:null;try{var o=['[data-pinpoll-id="'.concat(e,'"]'),'script[data-location*="'.concat(n||"pinpoll.com",'"][data-id="').concat(e,'"]')],a=i?o.map((function(e){return"".concat(e,":not([data-type]), ").concat(e,'[data-type="').concat(i,'"]')})).join(", "):o.join(", ");return!!document.body.querySelector(a)||!!this.embeds.find((function(t){var n,i,o;return(null===(n=t.data)||void 0===n?void 0:n.id)===e&&("poll"===(null===(i=t.data)||void 0===i?void 0:i.type)||"aipoll"===(null===(o=t.data)||void 0===o?void 0:o.type))}))}catch(e){return!1}},isAnyElementEmbedded:function(){return!!this.embeds.find((function(e){return"aipoll"!==e.mode}))||!!document.body.querySelector('[data-pinpoll-id]:not([data-mode="aipoll"]), script[data-location*="'.concat("pinpoll.com",'"][data-id]'))},getElementVotedStatus:function(e){var t,n,i=e.questions,o=e.multiple_vote_interval,a=null===(t=window.Pinpoll)||void 0===t||null===(n=t.storage)||void 0===n?void 0:n.votes;if(i&&a){var r=a.filter((function(e){return i.includes(e.question_id)}));if(null!=r&&r.length)return!o||r.find((function(e){return e.voted_at+o>(new Date).getTime()}))?2:1}return 0},sortPreferredAutoEmbeddedElements:function(e,t,n){var i=this,o=t.location,a=t.muteVoted,r=t.height,l=[];if(e){var s,d;if(l=e.filter((function(e){return!i.isElementAlreadyEmbedded(e.element_id,e.type_id,o)})),null!==(s=window.Pinpoll)&&void 0!==s&&s.appName&&(l=l.filter((function(e){return 1===e.type_id&&2===e.max_answers}))),null!==(d=window.Pinpoll)&&void 0!==d&&d.heightFilterActive&&r){var c=n&&n.parentNode!==document.getElementsByTagName("head")[0]&&n.parentElement?n.clientWidth:document.body.clientWidth;l=l.filter((function(e){try{var t=JSON.parse(e.height),n=Math.max.apply(Math,function(e){if(Array.isArray(e))return f(e)}(i=Object.keys(t).map(Number).filter((function(e){return e<=c})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||p(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());if(t[n])return parseInt(t[n])<=r}catch(e){return!1}var i}))}a?l=l.filter((function(e){return 2!==i.getElementVotedStatus(e)})):l.length&&void 0===l[0].sort&&(l=l.sort((function(e,t){var n=i.getElementVotedStatus(e),o=i.getElementVotedStatus(t);return n===o?0:n<o?-1:1})))}return l},getFallbackElements:function(e,t){var n=t+e;if(!this.fallbackElementsPromise[n]){var i={url:e};t&&(i.topic=t),this.fallbackElementsPromise[n]=fetch("https://api.embed.pinpoll.com/aipolls/search?"+new URLSearchParams(i),{method:"GET"}).then((function(e){return e.json()})).then((function(e){return e})).catch((function(e){console.log("Pinpoll: error during fetching aipolls",e)}))}return this.fallbackElementsPromise[n]},initEmbed:function(e){var t=this;if(!this.embeds.find((function(t){return t.element===e}))){var n=h(e),o=new c(e,n.url);e.classList.add("loaded"),o.markServed(),n.id&&!n.native?this.embeds.push(new i.Z(n,e,o)):new Promise((function(t){"eager"!==n.loading&&"preload"!==n.loading?(e.classList.add("lazyload"),new Promise((function(t){document.addEventListener("lazybeforeunveil",(function(n){n.target===e&&t()}))})).finally((function(){t()}))):t()})).then((function(){v(n,e),n.native?t.embeds.push(new i.Z(n,e,o)):n.aiPollMode||n.topic?n.forceLoad||!t.isAnyElementEmbedded()?new Promise((function(e){n.aiPollMode?(o.markLoad(),fetch("https://api.embed.pinpoll.com/aipolls/first?"+new URLSearchParams({url:n.url}),{method:"GET"}).then((function(e){return e.json()})).then((function(t){n.id=t.id,e()})).catch((function(t){console.log("Pinpoll: error during fetching aipoll",t),e()}))):e()})).finally((function(){n.id?t.embeds.push(new i.Z(n,e,o)):(n.aiPollMode&&!n.topic||!n.aiPollMode&&n.topic)&&(o.markLoad(),n.fallbackElementsPromise=t.getFallbackElements(n.url,n.topic).then((function(a){var r,l=a.elements;n.fallbackElements=t.sortPreferredAutoEmbeddedElements(l,n,e);var s=null===(r=n.fallbackElements)||void 0===r?void 0:r.shift();s?(n.id=s.element_id,!n.design&&s.custom_design_id&&(n.design=s.custom_design_id),n.fallback_id=s.id,t.embeds.push(new i.Z(n,e,o))):console.log("Pinpoll: no suitable element found for",e)})))})):console.log("Pinpoll: not embedding as another element is already embedded",e):console.log("Pinpoll: no id or data specified for element",e)}))}},start:function(){var e=this;window.MutationObserver=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;var t=function(){var t,n=u(document.querySelectorAll("div[data-pinpoll-id]:not(.loaded), div.pinpoll:not(.loaded)"));try{for(n.s();!(t=n.n()).done;){var i=t.value;e.initEmbed(i)}}catch(e){n.e(e)}finally{n.f()}};t();var n=window.setInterval((function(){t()}),500);window.MutationObserver&&(window.setTimeout((function(){window.clearInterval(n)}),1e4),new window.MutationObserver((function(t){t.forEach((function(t){var n,i=u(t.addedNodes);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.matches&&o.matches("div[data-pinpoll-id]:not(.loaded), div.pinpoll:not(.loaded)")&&e.initEmbed(o)}}catch(e){i.e(e)}finally{i.f()}}))})).observe(document,{childList:!0,subtree:!0}))},broadcast:function(e){var t,n=u(this.embeds);try{for(n.s();!(t=n.n()).done;)t.value.postMessage(e)}catch(e){n.e(e)}finally{n.f()}}}}},726:()=>{function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function t(t){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};
952i%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return(i="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 o(e){var t=window.Pinpoll.storage.votes;t||(t=[]),-1===t.findIndex((function(t){return t.answer_id===e.answer_id&&t.voted_at===e.voted_at}))&&t.push(e),window.Pinpoll.storage.votes=t}window.addEventListener("message",(function(e){var n=e.data;try{if("string"==typeof n){if(!n.startsWith("{"))return!1;n=JSON.parse(n)}}catch(e){console.warn(e)}var a=function(t){e.source&&e.source.postMessage(t,e.origin)};if(n&&"object"===i(n)&&n.action)switch(n.action){case"get:visitor-votes":a({action:"return:visitor-votes",data:window.Pinpoll.storage.votes.map((function(e){return t(t({},e),{},{justVoted:!!window.Pinpoll.votelinkVotes.find((function(t){return t.answer_id===e.answer_id&&t.voted_at===e.voted_at}))})}))});break;case"add:visitor-vote":o(n.data);break;case"remove:visitor-vote":var r=window.Pinpoll.storage.votes,l=n.data,s=l.questionId,d=l.answerId;if(r){var c=r.filter((function(e){return(e.question_id||e.poll_id)!==s||e.answer_id!==d}));window.Pinpoll.storage.votes=c}break;case"remove:visitor-vote-element":var u=window.Pinpoll.storage.votes,p=n.data.questionIds;if(u){var f=u.filter((function(e){return!p.some((function(t){return t===e.question_id}))}));window.Pinpoll.storage.votes=f}break;case"add":var m=n.key;if(!m)break;var h=window.Pinpoll.storage[m];if(!h)break;if(!(h instanceof Array))break;h.push(n.value),window.Pinpoll.storage[m]=h;break;case"get":var v=n.key;if(!v)break;a({action:"return:"+v,data:{key:v,value:window.Pinpoll.storage[v]}})}return null})),function(){var e=new URL(window.location.href),t=e.searchParams.get("pinpoll_votes");if(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("Pinpoll: Failed parsing pinpoll_votes GET parameter")}n&&n instanceof Array&&n.forEach((function(e){o(e),window.Pinpoll.votelinkVotes.push(e)}));try{e.searchParams.delete("pinpoll_votes"),window.history.pushState({},document.title,e.toString())}catch(e){}}}()},558:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var i=n(38),o=n(58),a=n(173);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=function(e,t){var n=t||{},d=n.widgetIndex,c=n.originPage,u=n.widgetLocation,p={},f=(0,i.G)({BASE_DOMAIN:"pinpoll.com",CDN_ENDPOINT:"https://static.pinpoll.com",API_ENDPOINT:"https://pa.pinpoll.com/v1",cookiesEnabled:function(){if(navigator.cookieEnabled)return!0;document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}(),thirdPartyCookiesEnabled:!1,tcfApi:{},requestSent:!1,requestDone:!1,start:function(e){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",m):m(),e&&(p=e)}});function m(){window.setTimeout((function(){Promise.all([(0,a.I)(),window.location.hostname.match(f.BASE_DOMAIN)?Promise.resolve():new Promise((function(e){try{var t=document.createElement("iframe");t.style.display="none",t.title="Pinpoll Third Party Cookie Test",t.src="".concat(f.CDN_ENDPOINT,"/static/start.html"),window.addEventListener("message",(function(t){"MM:3PCunsupported"===t.data?f.thirdPartyCookiesEnabled=!1:"MM:3PCsupported"===t.data&&(f.thirdPartyCookiesEnabled=!0),e()}),!1),document.body.appendChild(t),window.setTimeout((function(){t.remove(),e()}),5e3)}catch(t){f.log("Could not check ThirdPartyCookiesEnabled",t),e()}})),window.ppTcString?(f.tcfApi.tcString=window.ppTcString,f.tcfApi.available=!!window.__tcfapi,Promise.resolve()):window.__tcfapi?(f.tcfApi.available=!0,new Promise((function(e){var t=(new Date).getTime();window.__tcfapi("addEventListener",2,(function(n,i){f.tcfApi.responseTime=(new Date).getTime()-t,i?f.tcfApi.tcString=n.tcString:f.log("tcf api responded with error",n),f.tcfApi.timeout||(f.tcfApi.timeout=!1),f.tcfApi.checkFinished=!0,e()})),window.setTimeout((function(){f.tcfApi.checkFinished||(f.tcfApi.timeout=!0,e())}),1e3)}))):(f.tcfApi.available=!1,Promise.resolve())]).then((function(){var t,n;t=u?function(){try{return new URL(u)}catch(e){return f.log("Could not parse widget location",e),document.location}}():document.location,n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
952t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({timezone:(new Date).getTimezoneOffset(),adblock:window.Pinpoll.userHasAdblock?1:0,dnt:window.navigator.doNotTrack,cookiesEnabled:f.cookiesEnabled?1:0,localStorageEnabled:v(),thirdPartyCookiesEnabled:f.thirdPartyCookiesEnabled?1:0,referrer:c||document.referrer,title:document.title,tcString:f.tcfApi.tcString,tcfApiAvailable:f.tcfApi.available,location:{hash:t.hash,hostname:t.hostname,pathname:t.pathname,protocol:t.protocol,search:t.search},screen:{width:window.screen.width,height:window.screen.height,colorDepth:window.screen.colorDepth,orientation:window.screen.orientation?window.screen.orientation.type:null},metaTags:h(),widgetIndex:d||""},p),(0,o.w)(f.API_ENDPOINT,n,e).then((function(t){var n,i,o=t.headers.get("PP-Visitor");o&&(e.visitor=o,null===(n=window.Pinpoll)||void 0===n||null===(i=n.embed)||void 0===i||i.broadcast({action:"global:trackingDone",visitor:o}))})).catch((function(e){var t,n;f.log("fetch request failed",e),null===(t=window.Pinpoll)||void 0===t||null===(n=t.embed)||void 0===n||n.broadcast({action:"global:trackingDone"})})).finally((function(){f.requestDone=!0}))}))}))}function h(){var e,t={},n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}(document.getElementsByTagName("meta"));try{for(n.s();!(e=n.n()).done;){var i=e.value,o=i.getAttribute("name")||i.getAttribute("property"),a=i.getAttribute("content");if(o&&a&&o.replace(/\s/g,"").length>0){var l=o.trim().toLowerCase(),s=t[l];s?s instanceof Array?t[l].push(a):t[l]=[s,a]:t[l]=a}}}catch(e){n.e(e)}finally{n.f()}return t}function v(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}return f}},38:(e,t,n)=>{"use strict";function i(e){var t=e;return t.logs=[],t.log=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];t.logs.push([new Date,n])},t}n.d(t,{G:()=>i})},173:(e,t,n)=>{"use strict";function i(){var e;return void 0!==(null===(e=window.Pinpoll)||void 0===e?void 0:e.userHasAdblock)?Promise.resolve(window.Pinpoll.userHasAdblock):new Promise((function(e){var t=window.setTimeout((function(){var e;null!==(e=window.Pinpoll)&&void 0!==e&&e.userHasAdblock||n(!1)}),1e3),n=function(n){clearTimeout(t),window.Pinpoll=window.Pinpoll||{},window.Pinpoll.userHasAdblock=n,e(n)},i=document.createElement("div");i.innerHTML="&nbsp;",i.style.position="absolute",i.className="native-ad-container mobile-ad js-ad_iframe";try{document.body.appendChild(i)}catch(e){console.log("Could not check Adblock",e),n(!1)}window.setTimeout((function(){n(0===i.offsetHeight),i.remove()}),100)}))}n.d(t,{I:()=>i})},58:(e,t,n)=>{"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"post",o={Accept:"application/json","Content-Type":"application/json"},a=n.visitor;return a&&(o["PP-Visitor"]=a),fetch(e,{method:i,headers:o,credentials:"include",body:JSON.stringify(t)})}n.d(t,{w:()=>i})},90:e=>{!function(t,n){var i=function(e,t,n){"use strict";var i,o;if(function(){var t,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in o=e.lazySizesConfig||e.lazysizesConfig||{},n)t in o||(o[t]=n[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:o,noSupport:!0};var a,r,l,s,d,c,u,p,f,m,h,v,g,b,w,y,_,k,P,A,E,O,S,I,C,T,x,M,N,D,j,z,L,q,R,W,B,U,G,F,V,J,H,K,$=t.documentElement,Z=e.HTMLPictureElement,Y="addEventListener",X=e.addEventListener.bind(e),Q=e.setTimeout,ee=e.requestAnimationFrame||Q,te=e.requestIdleCallback,ne=/^picture$/i,ie=["load","error","lazyincluded","_lazyloaded"],oe={},ae=Array.prototype.forEach,re=function(e,t){return oe[t]||(oe[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),oe[t].test(e.getAttribute("class")||"")&&oe[t]},le=function(e,t){re(e,t)||e.setAttribute("class",(e.getAttribute("class")||"").trim()+" "+t)},se=function(e,t){var n;(n=re(e,t))&&e.setAttribute("class",(e.getAttribute("class")||"").replace(n," "))},de=function(e,t,n){var i=n?Y:"removeEventListener";n&&de(e,t),ie.forEach((function(n){e[i](n,t)}))},ce=function(e,n,o,a,r){var l=t.createEvent("Event");return o||(o={}),o.instance=i,l.initEvent(n,!a,!r),l.detail=o,e.dispatchEvent(l),l},ue=function(t,n){var i;!Z&&(i=e.picturefill||o.pf)?(n&&n.src&&!t.getAttribute("srcset")&&t.setAttribute("srcset",n.src),i({reevaluate:!0,elements:[t]})):n&&n.src&&(t.src=n.src)},pe=function(e,t){return(getComputedStyle(e,null)||{})[t]},fe=function(e,t,n){for(n=n||e.offsetWidth;n<o.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},me=(V=[],J=F=[],(K=function(e,n){U&&!n?e.apply(this,arguments):(J.push(e),G||(G=!0,(t.hidden?Q:ee)(H)))})._lsFlush=H=function(){var e=J;for(J=F.length?V:F,U=!0,G=!1;e.length;)e.shift()();U=!1},K),he=function(e,t){return t?function(){me(e)}:function(){var t=this,n=arguments;me((function(){e.apply(t,n)}))}},ve=function(e){var t,i,o=function(){t=null,e()},a=function(){var e=n.now()-i;e<99?Q(a,99-e):(te||o)(o)};return function(){i=n.now(),t||(t=Q(a,99))}},ge=(_=/^img$/i,k=/^iframe$/i,P="onscroll"in e&&!/(gle|ing)bot/.test(navigator.userAgent),0,A=0,E=0,O=-1,S=function(e){E--,(!e||E<0||!e.target)&&(E=0)},I=function(e){return null==y&&(y="hidden"==pe(t.body,"visibility")),y||!("hidden"==pe(e.parentNode,"visibility")&&"hidden"==pe(e,"visibility"))},C=function(e,n){var i,o=e,a=I(e);for(v-=n,w+=n,g-=n,b+=n;a&&(o=o.offsetParent)&&o!=t.body&&o!=$;)(a=(pe(o,"opacity")||1)>0)&&"visible"!=pe(o,"overflow")&&(i=o.getBoundingClientRect(),a=b>i.left&&g<i.right&&w>i.top-1&&v<i.bottom+1);return a},x=function(e){var t,i=0,a=o.throttleDelay,r=o.ricTimeout,l=function(){t=!1,i=n.now(),e()},s=te&&r>49?function(){te(l,{timeout:r}),r!==o.ricTimeout&&(r=o.ricTimeout)}:he((function(){Q(l)}),!0);return function(e){var o;(e=!0===e)&&(r=33),t||(t=!0,(o=a-(n.now()-i))<0&&(o=0),e||o<9?s():Q(s,o))}}(T=function(){var e,n,a,r,l,s,u,f,_,k,S,T,x=i.elements;if((p=o.loadMode)&&E<8&&(e=x.length)){for(n=0,O++;n<e;n++)if(x[n]&&!x[n]._lazyRace)if(!P||i.prematureUnveil&&i.prematureUnveil(x[n]))q(x[n]);else if((f=x[n].getAttribute("data-expand"))&&(s=1*f)||(s=A),k||(k=!o.expand||o.expand<1?$.clientHeight>500&&$.clientWidth>500?500:370:o.expand,i._defEx=k,S=k*o.expFactor,T=o.hFac,y=null,A<S&&E<1&&O>2&&p>2&&!t.hidden?(A=S,O=0):A=p>1&&O>1&&E<6?k:0),_!==s&&(m=innerWidth+s*T,h=innerHeight+s,u=-1*s,_=s),a=x[n].getBoundingClientRect(),(w=a.bottom)>=u&&(v=a.top)<=h&&(b=a.right)>=u*T&&(g=a.left)<=m&&(w||b||g||v)&&(o.loadHidden||I(x[n]))&&(c&&E<3&&!f&&(p<3||O<4)||C(x[n],s))){if(q(x[n]),l=!0,E>9)break}else!l&&c&&!r&&E<4&&O<4&&p>
9522&&(d[0]||o.preloadAfterLoad)&&(d[0]||!f&&(w||b||g||v||"auto"!=x[n].getAttribute(o.sizesAttr)))&&(r=d[0]||x[n]);r&&!l&&q(r)}}),N=he(M=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(S(e),le(t,o.loadedClass),se(t,o.loadingClass),de(t,D),ce(t,"lazyloaded"))}),D=function(e){N({target:e.target})},j=function(e,t){var n=e.getAttribute("data-load-mode")||o.iframeLoadMode;0==n?e.contentWindow.location.replace(t):1==n&&(e.src=t)},z=function(e){var t,n=e.getAttribute(o.srcsetAttr);(t=o.customMedia[e.getAttribute("data-media")||e.getAttribute("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)},L=he((function(e,t,n,i,a){var r,l,s,d,c,p;(c=ce(e,"lazybeforeunveil",t)).defaultPrevented||(i&&(n?le(e,o.autosizesClass):e.setAttribute("sizes",i)),l=e.getAttribute(o.srcsetAttr),r=e.getAttribute(o.srcAttr),a&&(d=(s=e.parentNode)&&ne.test(s.nodeName||"")),p=t.firesLoad||"src"in e&&(l||r||d),c={target:e},le(e,o.loadingClass),p&&(clearTimeout(u),u=Q(S,2500),de(e,D,!0)),d&&ae.call(s.getElementsByTagName("source"),z),l?e.setAttribute("srcset",l):r&&!d&&(k.test(e.nodeName)?j(e,r):e.src=r),a&&(l||d)&&ue(e,{src:r})),e._lazyRace&&delete e._lazyRace,se(e,o.lazyClass),me((function(){var t=e.complete&&e.naturalWidth>1;p&&!t||(t&&le(e,o.fastLoadedClass),M(c),e._lazyCache=!0,Q((function(){"_lazyCache"in e&&delete e._lazyCache}),9)),"lazy"==e.loading&&E--}),!0)})),q=function(e){if(!e._lazyRace){var t,n=_.test(e.nodeName),i=n&&(e.getAttribute(o.sizesAttr)||e.getAttribute("sizes")),a="auto"==i;(!a&&c||!n||!e.getAttribute("src")&&!e.srcset||e.complete||re(e,o.errorClass)||!re(e,o.lazyClass))&&(t=ce(e,"lazyunveilread").detail,a&&be.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,E++,L(e,t,a,i,n))}},R=ve((function(){o.loadMode=3,x()})),B=function(){c||(n.now()-f<999?Q(B,999):(c=!0,o.loadMode=3,x(),X("scroll",W,!0)))},{_:function(){f=n.now(),i.elements=t.getElementsByClassName(o.lazyClass),d=t.getElementsByClassName(o.lazyClass+" "+o.preloadClass),X("scroll",x,!0),X("resize",x,!0),X("pageshow",(function(e){if(e.persisted){var n=t.querySelectorAll("."+o.loadingClass);n.length&&n.forEach&&ee((function(){n.forEach((function(e){e.complete&&q(e)}))}))}})),e.MutationObserver?new MutationObserver(x).observe($,{childList:!0,subtree:!0,attributes:!0}):($.addEventListener("DOMNodeInserted",x,!0),$.addEventListener("DOMAttrModified",x,!0),setInterval(x,999)),X("hashchange",x,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(e){t.addEventListener(e,x,!0)})),/d$|^c/.test(t.readyState)?B():(X("load",B),t.addEventListener("DOMContentLoaded",x),Q(B,2e4)),i.elements.length?(T(),me._lsFlush()):x()},checkElems:x,unveil:q,_aLSL:W=function(){3==o.loadMode&&(o.loadMode=2),R()}}),be=(r=he((function(e,t,n,i){var o,a,r;if(e._lazysizesWidth=i,i+="px",e.setAttribute("sizes",i),ne.test(t.nodeName||""))for(a=0,r=(o=t.getElementsByTagName("source")).length;a<r;a++)o[a].setAttribute("sizes",i);n.detail.dataAttr||ue(e,n.detail)})),l=function(e,t,n){var i,o=e.parentNode;o&&(n=fe(e,o,n),(i=ce(e,"lazybeforesizes",{width:n,dataAttr:!!t})).defaultPrevented||(n=i.detail.width)&&n!==e._lazysizesWidth&&r(e,o,i,n))},{_:function(){a=t.getElementsByClassName(o.autosizesClass),X("resize",s)},checkElems:s=ve((function(){var e,t=a.length;if(t)for(e=0;e<t;e++)l(a[e])})),updateElem:l}),we=function(){!we.i&&t.getElementsByClassName&&(we.i=!0,be._(),ge._())};return Q((function(){o.init&&we()})),i={cfg:o,autoSizer:be,loader:ge,init:we,uP:ue,aC:le,rC:se,hC:re,fire:ce,gW:fe,rAF:me}}(t,t.document,Date);t.lazySizes=i,e.exports&&(e.exports=i)}("undefined"!=typeof window?window:{})}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__={};(()=>{"use strict";const e={embed:null,tracking:null,retargeting:null,remarketing:null,storage:function(){var e={};Object.defineProperty(e,"visitor",{set:function(e){if(window.Pinpoll.embed){var t;try{t=JSON.parse(localStorage.PP_visitor).value}catch(e){t=null}t!==e&&setTimeout((function(){window.Pinpoll.embed.broadcast({action:"set:visitor",visitor:e})}))}try{localStorage.PP_visitor=e&&"null"!==e?JSON.stringify({value:e,expires:(new Date).setDate((new Date).getDate()+30)}):JSON.stringify({value:e,expires:0})}catch(e){console.warn(e)}},get:function(){try{if(!localStorage.PP_visitor)return null;var e=JSON.parse(localStorage.PP_visitor);return e.expires&&e.expires<Date.now()?(delete localStorage.PP_visitor,null):(e.expires=(new Date).setDate((new Date).getDate()+30),localStorage.PP_visitor=JSON.stringify(e),e.value)}catch(e){return console.warn(e),null}}});for(var t=function(){var t=i[n];Object.defineProperty(e,t.id,{set:function(e){try{localStorage[t.key]=JSON.stringify(e)}catch(e){console.warn(e)}},get:function(){try{var e=localStorage[t.key];return e?JSON.parse(e):t.d}catch(e){return console.warn(e),t.d}}})},n=0,i=[{id:"votes",key:"PP_votes",d:[]},{id:"leadForms",key:"PP_forms",d:[]},{id:"lastTriggered",key:"PP_marketing",d:null}];n<i.length;n++)t();try{localStorage.pinpoll_allVisitorVotes&&(localStorage.PP_votes=localStorage.pinpoll_allVisitorVotes,delete localStorage.pinpoll_allVisitorVotes)}catch(e){}return e}(),heightFilterActive:!1,nativeLoader:void 0,votelinkVotes:[],init:function(){var e=document.querySelector("script[src*='pinpoll.com/global.js'][data-app]");e&&(this.appName=e.getAttribute("data-app"))}};window.Pinpoll&&Object.keys(window.Pinpoll).length>0||(window.Pinpoll=e,e.init())})(),(()=>{"use strict";var e=__webpack_require__(558);window.Pinpoll.tracking||(window.Pinpoll.tracking=(0,e.Z)(window.Pinpoll.storage,{widgetIndex:"global"}),window.Pinpoll.tracking.start(window.Pinpoll.appName?{app:window.Pinpoll.appName}:void 0))})(),(()=>{"use strict";var e=__webpack_require__(38),t=__webpack_require__(58);function n(){var e;if(null!==(e=window.Pinpoll)&&void 0!==e&&e.appName)return!0;var t=window.navigator,n=t.userAgent.toLowerCase();return/iphone|ipod|ipad/.test(n)&&!window.MSStream?!t.standalone&&!/safari/.test(n):n.includes("wv")}var i=eval;window.Pinpoll.retargeting||(window.Pinpoll.retargeting=function(o,a){var r,l,s=(0,e.G)({RETARGETING_ENDPOINT:"https://api2.dmp.pinpoll.com",pixelsLoaded:!1,pixels:[],isMobileDevice:(l=!1,r=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(r)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
952sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(r.substr(0,4)))&&(l=!0),l),isApp:n(),googleLoaded:!1,trackEmbedEvent:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(s.pixelsLoaded)d(e,n);else{var o=window.location!==window.parent.location?document.referrer:document.location.href;p({referrer:o,questionId:t,leadFormId:i}).then((function(t){s.pixelsLoaded=!0,t&&"success"===t.status&&t.data.length>0&&(s.pixels=t.data),d(e,n)})).catch((function(e){s.log("Retargeting Endpoint not reachable:",e)}))}},triggerPixels:function(e){c(e,!1)}});function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=s.pixels.filter((function(n){if(("vote"===e||"vote_click"===e)&&n.answer_id&&(!t.length||!t.includes(n.answer_id)))return!1;if("all"!==n.device_type){if(a&&n.device_type!==a)return!1;if(s.isApp&&"app"!==n.device_type)return!1;if(s.isMobileDevice&&"desktop"===n.device_type)return!1;if(!s.isMobileDevice&&"mobile"===n.device_type)return!1}return n.event===e}));(n=n.filter((function(e,t,n){return t===n.findIndex((function(t){return t.id===e.id}))}))).length&&c(n,!0)}function c(e,n){var a;e&&e.length>0&&(e.forEach((function(e){!function(e){switch(e.type){case"javascript":!function(e,t){e.externalcode?u({src:e.externalcode,async:!0},(function(){e.staticcode&&u({text:e.staticcode}),e.loaded=!0,t()})):e.staticcode?(u({text:e.staticcode}),e.loaded=!0,t()):t()}(e,(function(){e.trigger_code&&i(e.trigger_code)}));break;case"google":!function(e,t,n){if(window.google_trackConversion)window.google_trackConversion&&window.google_trackConversion({google_conversion_id:e,google_conversion_label:t,google_custom_value:n,google_custom_params:window.google_tag_params,google_remarketing_only:!0});else{var i=document.createElement("script");i.src="https://www.googleadservices.com/pagead/conversion_async.js",i.async=!0,i.addEventListener("load",(function(){s.googleLoaded=!0,window.google_trackConversion&&window.google_trackConversion({google_conversion_id:e,google_conversion_label:t,google_custom_value:n,google_custom_params:window.google_tag_params,google_remarketing_only:!0})}),!1),document.body.appendChild(i)}}(e.conversion_id,e.conversion_label,e.custom_value);break;case"facebook":e.event&&(e.group_title=e.event),function(e,t,n){if(function(e,t,n,i,o,a,r){e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],(a=t.createElement(n)).async=!0,a.src="https://connect.facebook.net/en_US/fbevents.js",(r=t.getElementsByTagName(n)[0]).parentNode.insertBefore(a,r))}(window,document,"script"),window.fbq){window.fbq("init",e),window.fbq("track","PageView");var i="string"==typeof n&&n.length>0?{customValue:n}:{};window.fbq("trackCustom",t,i)}}(e.facebook_id,e.group_title,e.custom_value);break;case"image":t=e.source,(n=new Image).onload=function(){n.naturalHeight+n.naturalWidth!==0?document.body.appendChild(n):s.log("Error on loadImage: natural height and width === 0")},n.onerror=function(e){s.log(e)},t&&(n.src=t);break;default:s.log("Pixel execution error: no type specified!")}var t,n}(e)})),n&&(a={triggeredPixels:e.map((function(e){return{pixel_id:e.id,campaign_id:e.campaign_id}}))},(0,t.w)(s.RETARGETING_ENDPOINT+"/public/triggered",a,o).then((function(e){return e.json()})).then((function(e){"success"!==e.status&&s.log("Return type of triggered data did not success!",e.data)})).catch((function(e){s.log("Failed to send triggered data!",e)}))))}function u(e,t){var n=document.createElement("script");Object.keys(e).forEach((function(t){n[t]=e[t]})),t&&"function"==typeof t&&n.addEventListener("load",(function(e){t(null,e)}),!1),document.body.appendChild(n)}function p(e){return(0,t.w)(s.RETARGETING_ENDPOINT+"/public/tr",e,o).then((function(e){return e.json()}))}return s}(window.Pinpoll.storage),window.Pinpoll.remarketing=function(n,i){var o=(0,e.G)({RETARGETING_ENDPOINT:"https://api2.dmp.pinpoll.com",REMARKETING_MAX_TRIGGER_TIME:parseInt("MISSING_ENV_VAR".MIX_REMARKETING_MAX_TRIGGER_TIME||"",10)||36e5,start:function(){window.requestIdleCallback?window.requestIdleCallback((function(){a()}),{timeout:3e3}):window.setTimeout((function(){a()}),3e3)}});function a(){var e,a;!(a=i.lastTriggered)||Date.now()-a>o.REMARKETING_MAX_TRIGGER_TIME?(e={referrer:window.location.origin||window.location.hostname},(0,t.w)(o.RETARGETING_ENDPOINT+"/public/remarketing",e,i).then((function(e){return e.json()}))).then((function(e){i.lastTriggered=Date.now(),e.data.length&&n.triggerPixels(e.data)})).catch((function(e){o.log("Failed to send getRemarketingPixels",e)})):o.log("Checked Remarketing; last triggered happened within max trigger time, last triggered at:",i.lastTriggered)}return o.start(),o}(window.Pinpoll.retargeting,window.Pinpoll.storage))})(),(()=>{"use strict";var e=__webpack_require__(631);__webpack_require__(90),__webpack_require__(726),window.Pinpoll.embed||(window.Pinpoll.embed=(0,e.ZP)(),window.Pinpoll.embed.start())})()})();
953$(document).ready(function() {
954    /**
955     * ersetzt das Carousel
956     * durch ein swipen beim neu Laden der Seite
957     * in data-ride wird onPageLoad getsetzt
958     * die Ids des Elements muessen eindeutig sein !!!
959     */
960    $.each($("[data-ride]"), function (k, v) {
961        if ($(this).data('ride') == 'onPageLoad') {
962            var id = $(this).attr('id');
963            var store_name = 'onPageLoad' + id;
964            var stack = [];
965            var count_elm = $(this).children(".carousel-inner").children(".item").length;            
966            var random_stack_index = Math.floor(Math.random() * ((count_elm -1) + 1));                
967            
968            if (sessionStorage.getItem(store_name)) {
969                stack = JSON.parse(sessionStorage.getItem(store_name));
970            }
971            if (stack.length !== count_elm) {
972                stack = [];
973                for (var i = 0; i < count_elm; i++) {
974                    stack[i] = 0;
975                }
976                stack[random_stack_index] = 1;
977            } else {
978                stack.unshift('0');
979                if (stack.pop() == 1) {
980                    stack[0] = 1;
981                }
982            }
983            $.each($(this).children(".carousel-inner").children(".item"), function (i, x) {
984                if (stack[i] == 0) {
985                    $(this).removeClass('active');
986                } else {
987                    $(this).addClass('active');
988                }
989            })
990            sessionStorage.setItem(store_name, JSON.stringify(stack));
991        }
992    });
vendor: 4,748 bytes, lines 993-999
993});
994/*!
995	Colorbox 1.6.3
996	license: MIT
997	http://www.jacklmoore.com/colorbox
998*/
999(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!$){$=q=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=n("button","Slideshow"),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;$&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),$&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if(q=!0,U=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),U=_.get("
999createImg"),t(U).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){U.height-=U.height*e,U.width-=U.width*e},_.mw&&U.width>_.mw&&(e=(U.width-_.mw)/U.width,o()),_.mh&&U.height>_.mh&&(e=(U.height-_.mh)/U.height,o())),_.h&&(U.style.marginTop=Math.max(_.mh-U.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(U.style.cursor="pointer",t(U).bind("click."+Z,function(){J.next()})),U.style.width=U.width+"px",U.style.height=U.height+"px",h(U)},1)}),U.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,U,$,q,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left
999:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),q=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;$&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if($){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(U).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;$&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!q&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!q&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){$&&!G&&(G=!0,$=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
1000/* Javascript plotting library for jQuery, version 0.8.3.
1001
1002Copyright (c) 2007-2014 IOLA and Ole Laursen.
1003Licensed under the MIT license.
1004
1005*/
1006
1007// first an inline dependency, jquery.colorhelpers.js, we inline it here
1008// for convenience
1009
1010/* Plugin for jQuery for working with colors.
1011 *
1012 * Version 1.1.
1013 *
1014 * Inspiration from jQuery color animation plugin by John Resig.
1015 *
1016 * Released under the MIT license by Ole Laursen, October 2009.
1017 *
1018 * Examples:
1019 *
1020 *   $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
1021 *   var c = $.color.extract($("#mydiv"), 'background-color');
1022 *   console.log(c.r, c.g, c.b, c.a);
1023 *   $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
1024 *
1025 * Note that .scale() and .add() return the same modified object
1026 * instead of making a new one.
1027 *
1028 * V. 1.1: Fix error handling so e.g. parsing an empty string does
1029 * produce a color rather than just crashing.
1030 */
1031(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3}
vendor: 124,626 bytes, lines 1031-4182
1031)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
1032
1033// the actual Flot code
1034(function($) {
1035
1036	// Cache the prototype hasOwnProperty for faster access
1037
1038	var hasOwnProperty = Object.prototype.hasOwnProperty;
1039
1040    // A shim to provide 'detach' to jQuery versions prior to 1.4.  Using a DOM
1041    // operation produces the same effect as detach, i.e. removing the element
1042    // without touching its jQuery data.
1043
1044    // Do not merge this into Flot 0.9, since it requires jQuery 1.4.4+.
1045
1046    if (!$.fn.detach) {
1047        $.fn.detach = function() {
1048            return this.each(function() {
1049                if (this.parentNode) {
1050                    this.parentNode.removeChild( this );
1051                }
1052            });
1053        };
1054    }
1055
1056	///////////////////////////////////////////////////////////////////////////
1057	// The Canvas object is a wrapper around an HTML5 <canvas> tag.
1058	//
1059	// @constructor
1060	// @param {string} cls List of classes to apply to the canvas.
1061	// @param {element} container Element onto which to append the canvas.
1062	//
1063	// Requiring a container is a little iffy, but unfortunately canvas
1064	// operations don't work unless the canvas is attached to the DOM.
1065
1066	function Canvas(cls, container) {
1067
1068		var element = container.children("." + cls)[0];
1069
1070		if (element == null) {
1071
1072			element = document.createElement("canvas");
1073			element.className = cls;
1074
1075			$(element).css({ direction: "ltr", position: "absolute", left: 0, top: 0 })
1076				.appendTo(container);
1077
1078			// If HTML5 Canvas isn't available, fall back to [Ex|Flash]canvas
1079
1080			if (!element.getContext) {
1081				if (window.G_vmlCanvasManager) {
1082					element = window.G_vmlCanvasManager.initElement(element);
1083				} else {
1084					throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");
1085				}
1086			}
1087		}
1088
1089		this.element = element;
1090
1091		var context = this.context = element.getContext("2d");
1092
1093		// Determine the screen's ratio of physical to device-independent
1094		// pixels.  This is the ratio between the canvas width that the browser
1095		// advertises and the number of pixels actually present in that space.
1096
1097		// The iPhone 4, for example, has a device-independent width of 320px,
1098		// but its screen is actually 640px wide.  It therefore has a pixel
1099		// ratio of 2, while most normal devices have a ratio of 1.
1100
1101		var devicePixelRatio = window.devicePixelRatio || 1,
1102			backingStoreRatio =
1103				context.webkitBackingStorePixelRatio ||
1104				context.mozBackingStorePixelRatio ||
1105				context.msBackingStorePixelRatio ||
1106				context.oBackingStorePixelRatio ||
1107				context.backingStorePixelRatio || 1;
1108
1109		this.pixelRatio = devicePixelRatio / backingStoreRatio;
1110
1111		// Size the canvas to match the internal dimensions of its container
1112
1113		this.resize(container.width(), container.height());
1114
1115		// Collection of HTML div layers for text overlaid onto the canvas
1116
1117		this.textContainer = null;
1118		this.text = {};
1119
1120		// Cache of text fragments and metrics, so we can avoid expensively
1121		// re-calculating them when the plot is re-rendered in a loop.
1122
1123		this._textCache = {};
1124	}
1125
1126	// Resizes the canvas to the given dimensions.
1127	//
1128	// @param {number} width New width of the canvas, in pixels.
1129	// @param {number} width New height of the canvas, in pixels.
1130
1131	Canvas.prototype.resize = function(width, height) {
1132
1133		if (width <= 0 || height <= 0) {
1134			throw new Error("Invalid dimensions for plot, width = " + width + ", height = " + height);
1135		}
1136
1137		var element = this.element,
1138			context = this.context,
1139			pixelRatio = this.pixelRatio;
1140
1141		// Resize the canvas, increasing its density based on the display's
1142		// pixel ratio; basically giving it more pixels without increasing the
1143		// size of its element, to take advantage of the fact that retina
1144		// displays have that many more pixels in the same advertised space.
1145
1146		// Resizing should reset the state (excanvas seems to be buggy though)
1147
1148		if (this.width != width) {
1149			element.width = width * pixelRatio;
1150			element.style.width = width + "px";
1151			this.width = width;
1152		}
1153
1154		if (this.height != height) {
1155			element.height = height * pixelRatio;
1156			element.style.height = height + "px";
1157			this.height = height;
1158		}
1159
1160		// Save the context, so we can reset in case we get replotted.  The
1161		// restore ensure that we're really back at the initial state, and
1162		// should be safe even if we haven't saved the initial state yet.
1163
1164		context.restore();
1165		context.save();
1166
1167		// Scale the coordinate space to match the display density; so even though we
1168		// may have twice as many pixels, we still want lines and other drawing to
1169		// appear at the same size; the extra pixels will just make them crisper.
1170
1171		context.scale(pixelRatio, pixelRatio);
1172	};
1173
1174	// Clears the entire canvas area, not including any overlaid HTML text
1175
1176	Canvas.prototype.clear = function() {
1177		this.context.clearRect(0, 0, this.width, this.height);
1178	};
1179
1180	// Finishes rendering the canvas, including managing the text overlay.
1181
1182	Canvas.prototype.render = function() {
1183
1184		var cache = this._textCache;
1185
1186		// For each text layer, add elements marked as active that haven't
1187		// already been rendered, and remove those that are no longer active.
1188
1189		for (var layerKey in cache) {
1190			if (hasOwnProperty.call(cache, layerKey)) {
1191
1192				var layer = this.getTextLayer(layerKey),
1193					layerCache = cache[layerKey];
1194
1195				layer.hide();
1196
1197				for (var styleKey in layerCache) {
1198					if (hasOwnProperty.call(layerCache, styleKey)) {
1199						var styleCache = layerCache[styleKey];
1200						for (var key in styleCache) {
1201							if (hasOwnProperty.call(styleCache, key)) {
1202
1203								var positions = styleCache[key].positions;
1204
1205								for (var i = 0, position; position = positions[i]; i++) {
1206									if (position.active) {
1207										if (!position.rendered) {
1208											layer.append(position.element);
1209											position.rendered = true;
1210										}
1211									} else {
1212										positions.splice(i--, 1);
1213										if (position.rendered) {
1214											position.element.detach();
1215										}
1216									}
1217								}
1218
1219								if (positions.length == 0) {
1220									delete styleCache[key];
1221								}
1222							}
1223						}
1224					}
1225				}
1226
1227				layer.show();
1228			}
1229		}
1230	};
1231
1232	// Creates (if necessary) and returns the text overlay container.
1233	//
1234	// @param {string} classes String of space-separated CSS classes used to
1235	//     uniquely identify the text layer.
1236	// @return {object} The jQuery-wrapped text-layer div.
1237
1238	Canvas.prototype.getTextLayer = function(classes) {
1239
1240		var layer = this.text[classes];
1241
1242		// Create the text layer if it doesn't exist
1243
1244		if (layer == null) {
1245
1246			// Create the text layer container, if it doesn't exist
1247
1248			if (this.textContainer == null) {
1249				this.textContainer = $("<div class='flot-text'></div>")
1250					.css({
1251						position: "absolute",
1252						top: 0,
1253						left: 0,
1254						bottom: 0,
1255						right: 0,
1256						'font-size': "smaller",
1257						color: "#545454"
1258					})
1259					.insertAfter(this.element);
1260			}
1261
1262			layer = this.text[classes] = $("<div></div>")
1263				.addClass(classes)
1264				.css({
1265					position: "absolute",
1266					top: 0,
1267					left: 0,
1268					bottom: 0,
1269					right: 0
1270				})
1271				.appendTo(this.textContainer);
1272		}
1273
1274		return layer;
1275	};
1276
1277	// Creates (if necessary) and returns a text info object.
1278	//
1279	// The object looks like this:
1280	//
1281	// {
1282	//     width: Width of the text's wrapper div.
1283	//     height: Height of the text's wrapper div.
1284	//     element: The jQuery-wrapped HTML div containing the text.
1285	//     positions: Array of positions at which this text is drawn.
1286	// }
1287	//
1288	// The positions array contains objects that look like this:
1289	//
1290	// {
1291	//     active: Flag indicating whether the text should be visible.
1292	//     rendered: Flag indicating whether the text is currently visible.
1293	//     element: The jQuery-wrapped HTML div containing the text.
1294	//     x: X coordinate at which to draw the text.
1295	//     y: Y coordinate at which to draw the text.
1296	// }
1297	//
1298	// Each position after the first receives a clone of the original element.
1299	//
1300	// The idea is that that the width, height, and general 'identity' of the
1301	// text is constant no matter where it is placed; the placements are a
1302	// secondary property.
1303	//
1304	// Canvas maintains a cache of recently-used text info objects; getTextInfo
1305	// either returns the cached element or creates a new entry.
1306	//
1307	// @param {string} layer A string of space-separated CSS classes uniquely
1308	//     identifying the layer containing this text.
1309	// @param {string} text Text string to retrieve info for.
1310	// @param {(string|object)=} font Either a string of space-separated CSS
1311	//     classes or a font-spec object, defining the text's font and style.
1312	// @param {number=} angle Angle at which to rotate the text, in degrees.
1313	//     Angle is currently unused, it will be implemented in the future.
1314	// @param {number=} width Maximum width of the text before it wraps.
1315	// @return {object} a text info object.
1316
1317	Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
1318
1319		var textStyle, layerCache, styleCache, info;
1320
1321		// Cast the value to a string, in case we were given a number or such
1322
1323		text = "" + text;
1324
1325		// If the font is a font-spec object, generate a CSS font definition
1326
1327		if (typeof font === "object") {
1328			textStyle = font.style + " " + font.variant + " " + font.weight + " " + font.size + "px/" + font.lineHeight + "px " + font.family;
1329		} else {
1330			textStyle = font;
1331		}
1332
1333		// Retrieve (or create) the cache for the text's layer and styles
1334
1335		layerCache = this._textCache[layer];
1336
1337		if (layerCache == null) {
1338			layerCache = this._textCache[layer] = {};
1339		}
1340
1341		styleCache = layerCache[textStyle];
1342
1343		if (styleCache == null) {
1344			styleCache = layerCache[textStyle] = {};
1345		}
1346
1347		info = styleCache[text];
1348
1349		// If we can't find a matching element in our cache, create a new one
1350
1351		if (info == null) {
1352
1353			var element = $("<div></div>").html(text)
1354				.css({
1355					position: "absolute",
1356					'max-width': width,
1357					top: -9999
1358				})
1359				.appendTo(this.getTextLayer(layer));
1360
1361			if (typeof font === "object") {
1362				element.css({
1363					font: textStyle,
1364					color: font.color
1365				});
1366			} else if (typeof font === "string") {
1367				element.addClass(font);
1368			}
1369
1370			info = styleCache[text] = {
1371				width: element.outerWidth(true),
1372				height: element.outerHeight(true),
1373				element: element,
1374				positions: []
1375			};
1376
1377			element.detach();
1378		}
1379
1380		return info;
1381	};
1382
1383	// Adds a text string to the canvas text overlay.
1384	//
1385	// The text isn't drawn immediately; it is marked as rendering, which will
1386	// result in its addition to the canvas on the next render pass.
1387	//
1388	// @param {string} layer A string of space-separated CSS classes uniquely
1389	//     identifying the layer containing this text.
1390	// @param {number} x X coordinate at which to draw the text.
1391	// @param {number} y Y coordinate at which to draw the text.
1392	// @param {string} text Text string to draw.
1393	// @param {(string|object)=} font Either a string of space-separated CSS
1394	//     classes or a font-spec object, defining the text's font and style.
1395	// @param {number=} angle Angle at which to rotate the text, in degrees.
1396	//     Angle is currently unused, it will be implemented in the future.
1397	// @param {number=} width Maximum width of the text before it wraps.
1398	// @param {string=} halign Horizontal alignment of the text; either "left",
1399	//     "center" or "right".
1400	// @param {string=} valign Vertical alignment of the text; either "top",
1401	//     "middle" or "bottom".
1402
1403	Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {
1404
1405		var info = this.getTextInfo(layer, text, font, angle, width),
1406			positions = info.positions;
1407
1408		// Tweak the div's position to match the text's alignment
1409
1410		if (halign == "center") {
1411			x -= info.width / 2;
1412		} else if (halign == "right") {
1413			x -= info.width;
1414		}
1415
1416		if (valign == "middle") {
1417			y -= info.height / 2;
1418		} else if (valign == "bottom") {
1419			y -= info.height;
1420		}
1421
1422		// Determine whether this text already exists at this position.
1423		// If so, mark it for inclusion in the next render pass.
1424
1425		for (var i = 0, position; position = positions[i]; i++) {
1426			if (position.x == x && position.y == y) {
1427				position.active = true;
1428				return;
1429			}
1430		}
1431
1432		// If the text doesn't exist at this position, create a new entry
1433
1434		// For the very first position we'll re-use the original element,
1435		// while for subsequent ones we'll clone it.
1436
1437		position = {
1438			active: true,
1439			rendered: false,
1440			element: positions.length ? info.element.clone() : info.element,
1441			x: x,
1442			y: y
1443		};
1444
1445		positions.push(position);
1446
1447		// Move the element to its final position within the container
1448
1449		position.element.css({
1450			top: Math.round(y),
1451			left: Math.round(x),
1452			'text-align': halign	// In case the text wraps
1453		});
1454	};
1455
1456	// Removes one or more text strings from the canvas text overlay.
1457	//
1458	// If no parameters are given, all text within the layer is removed.
1459	//
1460	// Note that the text is not immediately removed; it is simply marked as
1461	// inactive, which will result in its removal on the next render pass.
1462	// This avoids the performance penalty for 'clear and redraw' behavior,
1463	// where we potentially get rid of all text on a layer, but will likely
1464	// add back most or all of it later, as when redrawing axes, for example.
1465	//
1466	// @param {string} layer A string of space-separated CSS classes uniquely
1467	//     identifying the layer containing this text.
1468	// @param {number=} x X coordinate of the text.
1469	// @param {number=} y Y coordinate of the text.
1470	// @param {string=} text Text string to remove.
1471	// @param {(string|object)=} font Either a string of space-separated CSS
1472	//     classes or a font-spec object, defining the text's font and style.
1473	// @param {number=} angle Angle at which the text is rotated, in degrees.
1474	//     Angle is currently unused, it will be implemented in the future.
1475
1476	Canvas.prototype.removeText = function(layer, x, y, text, font, angle) {
1477		if (text == null) {
1478			var layerCache = this._textCache[layer];
1479			if (layerCache != null) {
1480				for (var styleKey in layerCache) {
1481					if (hasOwnProperty.call(layerCache, styleKey)) {
1482						var styleCache = layerCache[styleKey];
1483						for (var key in styleCache) {
1484							if (hasOwnProperty.call(styleCache, key)) {
1485								var positions = styleCache[key].positions;
1486								for (var i = 0, position; position = positions[i]; i++) {
1487									position.active = false;
1488								}
1489							}
1490						}
1491					}
1492				}
1493			}
1494		} else {
1495			var positions = this.getTextInfo(layer, text, font, angle).positions;
1496			for (var i = 0, position; position = positions[i]; i++) {
1497				if (position.x == x && position.y == y) {
1498					position.active = false;
1499				}
1500			}
1501		}
1502	};
1503
1504	///////////////////////////////////////////////////////////////////////////
1505	// The top-level container for the entire plot.
1506
1507    function Plot(placeholder, data_, options_, plugins) {
1508        // data is on the form:
1509        //   [ series1, series2 ... ]
1510        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
1511        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
1512
1513        var series = [],
1514            options = {
1515                // the color theme used for graphs
1516                colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
1517                legend: {
1518                    show: true,
1519                    noColumns: 1, // number of colums in legend table
1520                    labelFormatter: null, // fn: string -> string
1521                    labelBoxBorderColor: "#ccc", // border color for the little label boxes
1522                    container: null, // container (as jQuery object) to put legend in, null means default on top of graph
1523                    position: "ne", // position of default legend container within plot
1524                    margin: 5, // distance from grid edge to default legend container within plot
1525                    backgroundColor: null, // null means auto-detect
1526                    backgroundOpacity: 0.85, // set to 0 to avoid background
1527                    sorted: null    // default to no legend sorting
1528                },
1529                xaxis: {
1530                    show: null, // null = auto-detect, true = always, false = never
1531                    position: "bottom", // or "top"
1532                    mode: null, // null or "time"
1533                    font: null, // null (derived from CSS in placeholder) or object like { size: 11, lineHeight: 13, style: "italic", weight: "bold", family: "sans-serif", variant: "small-caps" }
1534                    color: null, // base color, labels, ticks
1535                    tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)"
1536                    transform: null, // null or f: number -> number to transform axis
1537                    inverseTransform: null, // if transform is set, this should be the inverse function
1538                    min: null, // min. value to show, null means set automatically
1539                    max: null, // max. value to show, null means set automatically
1540                    autoscaleMargin: null, // margin in % to add if auto-setting min/max
1541                    ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks
1542                    tickFormatter: null, // fn: number -> string
1543                    labelWidth: null, // size of tick labels in pixels
1544                    labelHeight: null,
1545                    reserveSpace: null, // whether to reserve space even if axis isn't shown
1546                    tickLength: null, // size in pixels of ticks, or "full" for whole line
1547                    alignTicksWithAxis: null, // axis number or null for no sync
1548                    tickDecimals: null, // no. of decimals, null means auto
1549                    tickSize: null, // number or [number, "unit"]
1550                    minTickSize: null // number or [number, "unit"]
1551                },
1552                yaxis: {
1553                    autoscaleMargin: 0.02,
1554                    position: "left" // or "right"
1555                },
1556                xaxes: [],
1557                yaxes: [],
1558                series: {
1559                    points: {
1560                        show: false,
1561                        radius: 3,
1562                        lineWidth: 2, // in pixels
1563                        fill: true,
1564                        fillColor: "#ffffff",
1565                        symbol: "circle" // or callback
1566                    },
1567                    lines: {
1568                        // we don't put in show: false so we can see
1569                        // whether lines were actively disabled
1570                        lineWidth: 2, // in pixels
1571                        fill: false,
1572                        fillColor: null,
1573                        steps: false
1574                        // Omit 'zero', so we can later default its value to
1575                        // match that of the 'fill' option.
1576                    },
1577                    bars: {
1578                        show: false,
1579                        lineWidth: 2, // in pixels
1580                        barWidth: 1, // in units of the x axis
1581                        fill: true,
1582                        fillColor: null,
1583                        align: "left", // "left", "right", or "center"
1584                        horizontal: false,
1585                        zero: true
1586                    },
1587                    shadowSize: 3,
1588                    highlightColor: null
1589                },
1590                grid: {
1591                    show: true,
1592                    aboveData: false,
1593                    color: "#545454", // primary color used for outline and labels
1594                    backgroundColor: null, // null for transparent, else color
1595                    borderColor: null, // set if different from the grid color
1596                    tickColor: null, // color for the ticks, e.g. "rgba(0,0,0,0.15)"
1597                    margin: 0, // distance from the canvas edge to the grid
1598                    labelMargin: 5, // in pixels
1599                    axisMargin: 8, // in pixels
1600                    borderWidth: 2, // in pixels
1601                    minBorderMargin: null, // in pixels, null means taken from points radius
1602                    markings: null, // array of ranges or fn: axes -> array of ranges
1603                    markingsColor: "#f4f4f4",
1604                    markingsLineWidth: 2,
1605                    // interactive stuff
1606                    clickable: false,
1607                    hoverable: false,
1608                    autoHighlight: true, // highlight in case mouse is near
1609                    mouseActiveRadius: 10 // how far the mouse can be away to activate an item
1610                },
1611                interaction: {
1612                    redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow
1613                },
1614                hooks: {}
1615            },
1616        surface = null,     // the canvas for the plot itself
1617        overlay = null,     // canvas for interactive stuff on top of plot
1618        eventHolder = null, // jQuery object that events should be bound to
1619        ctx = null, octx = null,
1620        xaxes = [], yaxes = [],
1621        plotOffset = { left: 0, right: 0, top: 0, bottom: 0},
1622        plotWidth = 0, plotHeight = 0,
1623        hooks = {
1624            processOptions: [],
1625            processRawData: [],
1626            processDatapoints: [],
1627            processOffset: [],
1628            drawBackground: [],
1629            drawSeries: [],
1630            draw: [],
1631            bindEvents: [],
1632            drawOverlay: [],
1633            shutdown: []
1634        },
1635        plot = this;
1636
1637        // public functions
1638        plot.setData = setData;
1639        plot.setupGrid = setupGrid;
1640        plot.draw = draw;
1641        plot.getPlaceholder = function() { return placeholder; };
1642        plot.getCanvas = function() { return surface.element; };
1643        plot.getPlotOffset = function() { return plotOffset; };
1644        plot.width = function () { return plotWidth; };
1645        plot.height = function () { return plotHeight; };
1646        plot.offset = function () {
1647            var o = eventHolder.offset();
1648            o.left += plotOffset.left;
1649            o.top += plotOffset.top;
1650            return o;
1651        };
1652        plot.getData = function () { return series; };
1653        plot.getAxes = function () {
1654            var res = {}, i;
1655            $.each(xaxes.concat(yaxes), function (_, axis) {
1656                if (axis)
1657                    res[axis.direction + (axis.n != 1 ? axis.n : "") + "axis"] = axis;
1658            });
1659            return res;
1660        };
1661        plot.getXAxes = function () { return xaxes; };
1662        plot.getYAxes = function () { return yaxes; };
1663        plot.c2p = canvasToAxisCoords;
1664        plot.p2c = axisToCanvasCoords;
1665        plot.getOptions = function () { return options; };
1666        plot.highlight = highlight;
1667        plot.unhighlight = unhighlight;
1668        plot.triggerRedrawOverlay = triggerRedrawOverlay;
1669        plot.pointOffset = function(point) {
1670            return {
1671                left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left, 10),
1672                top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top, 10)
1673            };
1674        };
1675        plot.shutdown = shutdown;
1676        plot.destroy = function () {
1677            shutdown();
1678            placeholder.removeData("plot").empty();
1679
1680            series = [];
1681            options = null;
1682            surface = null;
1683            overlay = null;
1684            eventHolder = null;
1685            ctx = null;
1686            octx = null;
1687            xaxes = [];
1688            yaxes = [];
1689            hooks = null;
1690            highlights = [];
1691            plot = null;
1692        };
1693        plot.resize = function () {
1694        	var width = placeholder.width(),
1695        		height = placeholder.height();
1696            surface.resize(width, height);
1697            overlay.resize(width, height);
1698        };
1699
1700        // public attributes
1701        plot.hooks = hooks;
1702
1703        // initialize
1704        initPlugins(plot);
1705        parseOptions(options_);
1706        setupCanvases();
1707        setData(data_);
1708        setupGrid();
1709        draw();
1710        bindEvents();
1711
1712
1713        function executeHooks(hook, args) {
1714            args = [plot].concat(args);
1715            for (var i = 0; i < hook.length; ++i)
1716                hook[i].apply(this, args);
1717        }
1718
1719        function initPlugins() {
1720
1721            // References to key classes, allowing plugins to modify them
1722
1723            var classes = {
1724                Canvas: Canvas
1725            };
1726
1727            for (var i = 0; i < plugins.length; ++i) {
1728                var p = plugins[i];
1729                p.init(plot, classes);
1730                if (p.options)
1731                    $.extend(true, options, p.options);
1732            }
1733        }
1734
1735        function parseOptions(opts) {
1736
1737            $.extend(true, options, opts);
1738
1739            // $.extend merges arrays, rather than replacing them.  When less
1740            // colors are provided than the size of the default palette, we
1741            // end up with those colors plus the remaining defaults, which is
1742            // not expected behavior; avoid it by replacing them here.
1743
1744            if (opts && opts.colors) {
1745            	options.colors = opts.colors;
1746            }
1747
1748            if (options.xaxis.color == null)
1749                options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
1750            if (options.yaxis.color == null)
1751                options.yaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
1752
1753            if (options.xaxis.tickColor == null) // grid.tickColor for back-compatibility
1754                options.xaxis.tickColor = options.grid.tickColor || options.xaxis.color;
1755            if (options.yaxis.tickColor == null) // grid.tickColor for back-compatibility
1756                options.yaxis.tickColor = options.grid.tickColor || options.yaxis.color;
1757
1758            if (options.grid.borderColor == null)
1759                options.grid.borderColor = options.grid.color;
1760            if (options.grid.tickColor == null)
1761                options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();
1762
1763            // Fill in defaults for axis options, including any unspecified
1764            // font-spec fields, if a font-spec was provided.
1765
1766            // If no x/y axis options were provided, create one of each anyway,
1767            // since the rest of the code assumes that they exist.
1768
1769            var i, axisOptions, axisCount,
1770                fontSize = placeholder.css("font-size"),
1771                fontSizeDefault = fontSize ? +fontSize.replace("px", "") : 13,
1772                fontDefaults = {
1773                    style: placeholder.css("font-style"),
1774                    size: Math.round(0.8 * fontSizeDefault),
1775                    variant: placeholder.css("font-variant"),
1776                    weight: placeholder.css("font-weight"),
1777                    family: placeholder.css("font-family")
1778                };
1779
1780            axisCount = options.xaxes.length || 1;
1781            for (i = 0; i < axisCount; ++i) {
1782
1783                axisOptions = options.xaxes[i];
1784                if (axisOptions && !axisOptions.tickColor) {
1785                    axisOptions.tickColor = axisOptions.color;
1786                }
1787
1788                axisOptions = $.extend(true, {}, options.xaxis, axisOptions);
1789                options.xaxes[i] = axisOptions;
1790
1791                if (axisOptions.font) {
1792                    axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
1793                    if (!axisOptions.font.color) {
1794                        axisOptions.font.color = axisOptions.color;
1795                    }
1796                    if (!axisOptions.font.lineHeight) {
1797                        axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);
1798                    }
1799                }
1800            }
1801
1802            axisCount = options.yaxes.length || 1;
1803            for (i = 0; i < axisCount; ++i) {
1804
1805                axisOptions = options.yaxes[i];
1806                if (axisOptions && !axisOptions.tickColor) {
1807                    axisOptions.tickColor = axisOptions.color;
1808                }
1809
1810                axisOptions = $.extend(true, {}, options.yaxis, axisOptions);
1811                options.yaxes[i] = axisOptions;
1812
1813                if (axisOptions.font) {
1814                    axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
1815                    if (!axisOptions.font.color) {
1816                        axisOptions.font.color = axisOptions.color;
1817                    }
1818                    if (!axisOptions.font.lineHeight) {
1819                        axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);
1820                    }
1821                }
1822            }
1823
1824            // backwards compatibility, to be removed in future
1825            if (options.xaxis.noTicks && options.xaxis.ticks == null)
1826                options.xaxis.ticks = options.xaxis.noTicks;
1827            if (options.yaxis.noTicks && options.yaxis.ticks == null)
1828                options.yaxis.ticks = options.yaxis.noTicks;
1829            if (options.x2axis) {
1830                options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);
1831                options.xaxes[1].position = "top";
1832                // Override the inherit to allow the axis to auto-scale
1833                if (options.x2axis.min == null) {
1834                    options.xaxes[1].min = null;
1835                }
1836                if (options.x2axis.max == null) {
1837                    options.xaxes[1].max = null;
1838                }
1839            }
1840            if (options.y2axis) {
1841                options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);
1842                options.yaxes[1].position = "right";
1843                // Override the inherit to allow the axis to auto-scale
1844                if (options.y2axis.min == null) {
1845                    options.yaxes[1].min = null;
1846                }
1847                if (options.y2axis.max == null) {
1848                    options.yaxes[1].max = null;
1849                }
1850            }
1851            if (options.grid.coloredAreas)
1852                options.grid.markings = options.grid.coloredAreas;
1853            if (options.grid.coloredAreasColor)
1854                options.grid.markingsColor = options.grid.coloredAreasColor;
1855            if (options.lines)
1856                $.extend(true, options.series.lines, options.lines);
1857            if (options.points)
1858                $.extend(true, options.series.points, options.points);
1859            if (options.bars)
1860                $.extend(true, options.series.bars, options.bars);
1861            if (options.shadowSize != null)
1862                options.series.shadowSize = options.shadowSize;
1863            if (options.highlightColor != null)
1864                options.series.highlightColor = options.highlightColor;
1865
1866            // save options on axes for future reference
1867            for (i = 0; i < options.xaxes.length; ++i)
1868                getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];
1869            for (i = 0; i < options.yaxes.length; ++i)
1870                getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];
1871
1872            // add hooks from options
1873            for (var n in hooks)
1874                if (options.hooks[n] && options.hooks[n].length)
1875                    hooks[n] = hooks[n].concat(options.hooks[n]);
1876
1877            executeHooks(hooks.processOptions, [options]);
1878        }
1879
1880        function setData(d) {
1881            series = parseData(d);
1882            fillInSeriesOptions();
1883            processData();
1884        }
1885
1886        function parseData(d) {
1887            var res = [];
1888            for (var i = 0; i < d.length; ++i) {
1889                var s = $.extend(true, {}, options.series);
1890
1891                if (d[i].data != null) {
1892                    s.data = d[i].data; // move the data instead of deep-copy
1893                    delete d[i].data;
1894
1895                    $.extend(true, s, d[i]);
1896
1897                    d[i].data = s.data;
1898                }
1899                else
1900                    s.data = d[i];
1901                res.push(s);
1902            }
1903
1904            return res;
1905        }
1906
1907        function axisNumber(obj, coord) {
1908            var a = obj[coord + "axis"];
1909            if (typeof a == "object") // if we got a real axis, extract number
1910                a = a.n;
1911            if (typeof a != "number")
1912                a = 1; // default to first axis
1913            return a;
1914        }
1915
1916        function allAxes() {
1917            // return flat array without annoying null entries
1918            return $.grep(xaxes.concat(yaxes), function (a) { return a; });
1919        }
1920
1921        function canvasToAxisCoords(pos) {
1922            // return an object with x/y corresponding to all used axes
1923            var res = {}, i, axis;
1924            for (i = 0; i < xaxes.length; ++i) {
1925                axis = xaxes[i];
1926                if (axis && axis.used)
1927                    res["x" + axis.n] = axis.c2p(pos.left);
1928            }
1929
1930            for (i = 0; i < yaxes.length; ++i) {
1931                axis = yaxes[i];
1932                if (axis && axis.used)
1933                    res["y" + axis.n] = axis.c2p(pos.top);
1934            }
1935
1936            if (res.x1 !== undefined)
1937                res.x = res.x1;
1938            if (res.y1 !== undefined)
1939                res.y = res.y1;
1940
1941            return res;
1942        }
1943
1944        function axisToCanvasCoords(pos) {
1945            // get canvas coords from the first pair of x/y found in pos
1946            var res = {}, i, axis, key;
1947
1948            for (i = 0; i < xaxes.length; ++i) {
1949                axis = xaxes[i];
1950                if (axis && axis.used) {
1951                    key = "x" + axis.n;
1952                    if (pos[key] == null && axis.n == 1)
1953                        key = "x";
1954
1955                    if (pos[key] != null) {
1956                        res.left = axis.p2c(pos[key]);
1957                        break;
1958                    }
1959                }
1960            }
1961
1962            for (i = 0; i < yaxes.length; ++i) {
1963                axis = yaxes[i];
1964                if (axis && axis.used) {
1965                    key = "y" + axis.n;
1966                    if (pos[key] == null && axis.n == 1)
1967                        key = "y";
1968
1969                    if (pos[key] != null) {
1970                        res.top = axis.p2c(pos[key]);
1971                        break;
1972                    }
1973                }
1974            }
1975
1976            return res;
1977        }
1978
1979        function getOrCreateAxis(axes, number) {
1980            if (!axes[number - 1])
1981                axes[number - 1] = {
1982                    n: number, // save the number for future reference
1983                    direction: axes == xaxes ? "x" : "y",
1984                    options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)
1985                };
1986
1987            return axes[number - 1];
1988        }
1989
1990        function fillInSeriesOptions() {
1991
1992            var neededColors = series.length, maxIndex = -1, i;
1993
1994            // Subtract the number of series that already have fixed colors or
1995            // color indexes from the number that we still need to generate.
1996
1997            for (i = 0; i < series.length; ++i) {
1998                var sc = series[i].color;
1999                if (sc != null) {
2000                    neededColors--;
2001                    if (typeof sc == "number" && sc > maxIndex) {
2002                        maxIndex = sc;
2003                    }
2004                }
2005            }
2006
2007            // If any of the series have fixed color indexes, then we need to
2008            // generate at least as many colors as the highest index.
2009
2010            if (neededColors <= maxIndex) {
2011                neededColors = maxIndex + 1;
2012            }
2013
2014            // Generate all the colors, using first the option colors and then
2015            // variations on those colors once they're exhausted.
2016
2017            var c, colors = [], colorPool = options.colors,
2018                colorPoolSize = colorPool.length, variation = 0;
2019
2020            for (i = 0; i < neededColors; i++) {
2021
2022                c = $.color.parse(colorPool[i % colorPoolSize] || "#666");
2023
2024                // Each time we exhaust the colors in the pool we adjust
2025                // a scaling factor used to produce more variations on
2026                // those colors. The factor alternates negative/positive
2027                // to produce lighter/darker colors.
2028
2029                // Reset the variation after every few cycles, or else
2030                // it will end up producing only white or black colors.
2031
2032                if (i % colorPoolSize == 0 && i) {
2033                    if (variation >= 0) {
2034                        if (variation < 0.5) {
2035                            variation = -variation - 0.2;
2036                        } else variation = 0;
2037                    } else variation = -variation;
2038                }
2039
2040                colors[i] = c.scale('rgb', 1 + variation);
2041            }
2042
2043            // Finalize the series options, filling in their colors
2044
2045            var colori = 0, s;
2046            for (i = 0; i < series.length; ++i) {
2047                s = series[i];
2048
2049                // assign colors
2050                if (s.color == null) {
2051                    s.color = colors[colori].toString();
2052                    ++colori;
2053                }
2054                else if (typeof s.color == "number")
2055                    s.color = colors[s.color].toString();
2056
2057                // turn on lines automatically in case nothing is set
2058                if (s.lines.show == null) {
2059                    var v, show = true;
2060                    for (v in s)
2061                        if (s[v] && s[v].show) {
2062                            show = false;
2063                            break;
2064                        }
2065                    if (show)
2066                        s.lines.show = true;
2067                }
2068
2069                // If nothing was provided for lines.zero, default it to match
2070                // lines.fill, since areas by default should extend to zero.
2071
2072                if (s.lines.zero == null) {
2073                    s.lines.zero = !!s.lines.fill;
2074                }
2075
2076                // setup axes
2077                s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, "x"));
2078                s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, "y"));
2079            }
2080        }
2081
2082        function processData() {
2083            var topSentry = Number.POSITIVE_INFINITY,
2084                bottomSentry = Number.NEGATIVE_INFINITY,
2085                fakeInfinity = Number.MAX_VALUE,
2086                i, j, k, m, length,
2087                s, points, ps, x, y, axis, val, f, p,
2088                data, format;
2089
2090            function updateAxis(axis, min, max) {
2091                if (min < axis.datamin && min != -fakeInfinity)
2092                    axis.datamin = min;
2093                if (max > axis.datamax && max != fakeInfinity)
2094                    axis.datamax = max;
2095            }
2096
2097            $.each(allAxes(), function (_, axis) {
2098                // init axis
2099                axis.datamin = topSentry;
2100                axis.datamax = bottomSentry;
2101                axis.used = false;
2102            });
2103
2104            for (i = 0; i < series.length; ++i) {
2105                s = series[i];
2106                s.datapoints = { points: [] };
2107
2108                executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);
2109            }
2110
2111            // first pass: clean and copy data
2112            for (i = 0; i < series.length; ++i) {
2113                s = series[i];
2114
2115                data = s.data;
2116                format = s.datapoints.format;
2117
2118                if (!format) {
2119                    format = [];
2120                    // find out how to copy
2121                    format.push({ x: true, number: true, required: true });
2122                    format.push({ y: true, number: true, required: true });
2123
2124                    if (s.bars.show || (s.lines.show && s.lines.fill)) {
2125                        var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));
2126                        format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });
2127                        if (s.bars.horizontal) {
2128                            delete format[format.length - 1].y;
2129                            format[format.length - 1].x = true;
2130                        }
2131                    }
2132
2133                    s.datapoints.format = format;
2134                }
2135
2136                if (s.datapoints.pointsize != null)
2137                    continue; // already filled in
2138
2139                s.datapoints.pointsize = format.length;
2140
2141                ps = s.datapoints.pointsize;
2142                points = s.datapoints.points;
2143
2144                var insertSteps = s.lines.show && s.lines.steps;
2145                s.xaxis.used = s.yaxis.used = true;
2146
2147                for (j = k = 0; j < data.length; ++j, k += ps) {
2148                    p = data[j];
2149
2150                    var nullify = p == null;
2151                    if (!nullify) {
2152                        for (m = 0; m < ps; ++m) {
2153                            val = p[m];
2154                            f = format[m];
2155
2156                            if (f) {
2157                                if (f.number && val != null) {
2158                                    val = +val; // convert to number
2159                                    if (isNaN(val))
2160                                        val = null;
2161                                    else if (val == Infinity)
2162                                        val = fakeInfinity;
2163                                    else if (val == -Infinity)
2164                                        val = -fakeInfinity;
2165                                }
2166
2167                                if (val == null) {
2168                                    if (f.required)
2169                                        nullify = true;
2170
2171                                    if (f.defaultValue != null)
2172                                        val = f.defaultValue;
2173                                }
2174                            }
2175
2176                            points[k + m] = val;
2177                        }
2178                    }
2179
2180                    if (nullify) {
2181                        for (m = 0; m < ps; ++m) {
2182                            val = points[k + m];
2183                            if (val != null) {
2184                                f = format[m];
2185                                // extract min/max info
2186                                if (f.autoscale !== false) {
2187                                    if (f.x) {
2188                                        updateAxis(s.xaxis, val, val);
2189                                    }
2190                                    if (f.y) {
2191                                        updateAxis(s.yaxis, val, val);
2192                                    }
2193                                }
2194                            }
2195                            points[k + m] = null;
2196                        }
2197                    }
2198                    else {
2199                        // a little bit of line specific stuff that
2200                        // perhaps shouldn't be here, but lacking
2201                        // better means...
2202                        if (insertSteps && k > 0
2203                            && points[k - ps] != null
2204                            && points[k - ps] != points[k]
2205                            && points[k - ps + 1] != points[k + 1]) {
2206                            // copy the point to make room for a middle point
2207                            for (m = 0; m < ps; ++m)
2208                                points[k + ps + m] = points[k + m];
2209
2210                            // middle point has same y
2211                            points[k + 1] = points[k - ps + 1];
2212
2213                            // we've added a point, better reflect that
2214                            k += ps;
2215                        }
2216                    }
2217                }
2218            }
2219
2220            // give the hooks a chance to run
2221            for (i = 0; i < series.length; ++i) {
2222                s = series[i];
2223
2224                executeHooks(hooks.processDatapoints, [ s, s.datapoints]);
2225            }
2226
2227            // second pass: find datamax/datamin for auto-scaling
2228            for (i = 0; i < series.length; ++i) {
2229                s = series[i];
2230                points = s.datapoints.points;
2231                ps = s.datapoints.pointsize;
2232                format = s.datapoints.format;
2233
2234                var xmin = topSentry, ymin = topSentry,
2235                    xmax = bottomSentry, ymax = bottomSentry;
2236
2237                for (j = 0; j < points.length; j += ps) {
2238                    if (points[j] == null)
2239                        continue;
2240
2241                    for (m = 0; m < ps; ++m) {
2242                        val = points[j + m];
2243                        f = format[m];
2244                        if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity)
2245                            continue;
2246
2247                        if (f.x) {
2248                            if (val < xmin)
2249                                xmin = val;
2250                            if (val > xmax)
2251                                xmax = val;
2252                        }
2253                        if (f.y) {
2254                            if (val < ymin)
2255                                ymin = val;
2256                            if (val > ymax)
2257                                ymax = val;
2258                        }
2259                    }
2260                }
2261
2262                if (s.bars.show) {
2263                    // make sure we got room for the bar on the dancing floor
2264                    var delta;
2265
2266                    switch (s.bars.align) {
2267                        case "left":
2268                            delta = 0;
2269                            break;
2270                        case "right":
2271                            delta = -s.bars.barWidth;
2272                            break;
2273                        default:
2274                            delta = -s.bars.barWidth / 2;
2275                    }
2276
2277                    if (s.bars.horizontal) {
2278                        ymin += delta;
2279                        ymax += delta + s.bars.barWidth;
2280                    }
2281                    else {
2282                        xmin += delta;
2283                        xmax += delta + s.bars.barWidth;
2284                    }
2285                }
2286
2287                updateAxis(s.xaxis, xmin, xmax);
2288                updateAxis(s.yaxis, ymin, ymax);
2289            }
2290
2291            $.each(allAxes(), function (_, axis) {
2292                if (axis.datamin == topSentry)
2293                    axis.datamin = null;
2294                if (axis.datamax == bottomSentry)
2295                    axis.datamax = null;
2296            });
2297        }
2298
2299        function setupCanvases() {
2300
2301            // Make sure the placeholder is clear of everything except canvases
2302            // from a previous plot in this container that we'll try to re-use.
2303
2304            placeholder.css("padding", 0) // padding messes up the positioning
2305                .children().filter(function(){
2306                    return !$(this).hasClass("flot-overlay") && !$(this).hasClass('flot-base');
2307                }).remove();
2308
2309            if (placeholder.css("position") == 'static')
2310                placeholder.css("position", "relative"); // for positioning labels and overlay
2311
2312            surface = new Canvas("flot-base", placeholder);
2313            overlay = new Canvas("flot-overlay", placeholder); // overlay canvas for interactive features
2314
2315            ctx = surface.context;
2316            octx = overlay.context;
2317
2318            // define which element we're listening for events on
2319            eventHolder = $(overlay.element).unbind();
2320
2321            // If we're re-using a plot object, shut down the old one
2322
2323            var existing = placeholder.data("plot");
2324
2325            if (existing) {
2326                existing.shutdown();
2327                overlay.clear();
2328            }
2329
2330            // save in case we get replotted
2331            placeholder.data("plot", plot);
2332        }
2333
2334        function bindEvents() {
2335            // bind events
2336            if (options.grid.hoverable) {
2337                eventHolder.mousemove(onMouseMove);
2338
2339                // Use bind, rather than .mouseleave, because we officially
2340                // still support jQuery 1.2.6, which doesn't define a shortcut
2341                // for mouseenter or mouseleave.  This was a bug/oversight that
2342                // was fixed somewhere around 1.3.x.  We can return to using
2343                // .mouseleave when we drop support for 1.2.6.
2344
2345                eventHolder.bind("mouseleave", onMouseLeave);
2346            }
2347
2348            if (options.grid.clickable)
2349                eventHolder.click(onClick);
2350
2351            executeHooks(hooks.bindEvents, [eventHolder]);
2352        }
2353
2354        function shutdown() {
2355            if (redrawTimeout)
2356                clearTimeout(redrawTimeout);
2357
2358            eventHolder.unbind("mousemove", onMouseMove);
2359            eventHolder.unbind("mouseleave", onMouseLeave);
2360            eventHolder.unbind("click", onClick);
2361
2362            executeHooks(hooks.shutdown, [eventHolder]);
2363        }
2364
2365        function setTransformationHelpers(axis) {
2366            // set helper functions on the axis, assumes plot area
2367            // has been computed already
2368
2369            function identity(x) { return x; }
2370
2371            var s, m, t = axis.options.transform || identity,
2372                it = axis.options.inverseTransform;
2373
2374            // precompute how much the axis is scaling a point
2375            // in canvas space
2376            if (axis.direction == "x") {
2377                s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));
2378                m = Math.min(t(axis.max), t(axis.min));
2379            }
2380            else {
2381                s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));
2382                s = -s;
2383                m = Math.max(t(axis.max), t(axis.min));
2384            }
2385
2386            // data point to canvas coordinate
2387            if (t == identity) // slight optimization
2388                axis.p2c = function (p) { return (p - m) * s; };
2389            else
2390                axis.p2c = function (p) { return (t(p) - m) * s; };
2391            // canvas coordinate to data point
2392            if (!it)
2393                axis.c2p = function (c) { return m + c / s; };
2394            else
2395                axis.c2p = function (c) { return it(m + c / s); };
2396        }
2397
2398        function measureTickLabels(axis) {
2399
2400            var opts = axis.options,
2401                ticks = axis.ticks || [],
2402                labelWidth = opts.labelWidth || 0,
2403                labelHeight = opts.labelHeight || 0,
2404                maxWidth = labelWidth || (axis.direction == "x" ? Math.floor(surface.width / (ticks.length || 1)) : null),
2405                legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
2406                layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles,
2407                font = opts.font || "flot-tick-label tickLabel";
2408
2409            for (var i = 0; i < ticks.length; ++i) {
2410
2411                var t = ticks[i];
2412
2413                if (!t.label)
2414                    continue;
2415
2416                var info = surface.getTextInfo(layer, t.label, font, null, maxWidth);
2417
2418                labelWidth = Math.max(labelWidth, info.width);
2419                labelHeight = Math.max(labelHeight, info.height);
2420            }
2421
2422            axis.labelWidth = opts.labelWidth || labelWidth;
2423            axis.labelHeight = opts.labelHeight || labelHeight;
2424        }
2425
2426        function allocateAxisBoxFirstPhase(axis) {
2427            // find the bounding box of the axis by looking at label
2428            // widths/heights and ticks, make room by diminishing the
2429            // plotOffset; this first phase only looks at one
2430            // dimension per axis, the other dimension depends on the
2431            // other axes so will have to wait
2432
2433            var lw = axis.labelWidth,
2434                lh = axis.labelHeight,
2435                pos = axis.options.position,
2436                isXAxis = axis.direction === "x",
2437                tickLength = axis.options.tickLength,
2438                axisMargin = options.grid.axisMargin,
2439                padding = options.grid.labelMargin,
2440                innermost = true,
2441                outermost = true,
2442                first = true,
2443                found = false;
2444
2445            // Determine the axis's position in its direction and on its side
2446
2447            $.each(isXAxis ? xaxes : yaxes, function(i, a) {
2448                if (a && (a.show || a.reserveSpace)) {
2449                    if (a === axis) {
2450                        found = true;
2451                    } else if (a.options.position === pos) {
2452                        if (found) {
2453                            outermost = false;
2454                        } else {
2455                            innermost = false;
2456                        }
2457                    }
2458                    if (!found) {
2459                        first = false;
2460                    }
2461                }
2462            });
2463
2464            // The outermost axis on each side has no margin
2465
2466            if (outermost) {
2467                axisMargin = 0;
2468            }
2469
2470            // The ticks for the first axis in each direction stretch across
2471
2472            if (tickLength == null) {
2473                tickLength = first ? "full" : 5;
2474            }
2475
2476            if (!isNaN(+tickLength))
2477                padding += +tickLength;
2478
2479            if (isXAxis) {
2480                lh += padding;
2481
2482                if (pos == "bottom") {
2483                    plotOffset.bottom += lh + axisMargin;
2484                    axis.box = { top: surface.height - plotOffset.bottom, height: lh };
2485                }
2486                else {
2487                    axis.box = { top: plotOffset.top + axisMargin, height: lh };
2488                    plotOffset.top += lh + axisMargin;
2489                }
2490            }
2491            else {
2492                lw += padding;
2493
2494                if (pos == "left") {
2495                    axis.box = { left: plotOffset.left + axisMargin, width: lw };
2496                    plotOffset.left += lw + axisMargin;
2497                }
2498                else {
2499                    plotOffset.right += lw + axisMargin;
2500                    axis.box = { left: surface.width - plotOffset.right, width: lw };
2501                }
2502            }
2503
2504             // save for future reference
2505            axis.position = pos;
2506            axis.tickLength = tickLength;
2507            axis.box.padding = padding;
2508            axis.innermost = innermost;
2509        }
2510
2511        function allocateAxisBoxSecondPhase(axis) {
2512            // now that all axis boxes have been placed in one
2513            // dimension, we can set the remaining dimension coordinates
2514            if (axis.direction == "x") {
2515                axis.box.left = plotOffset.left - axis.labelWidth / 2;
2516                axis.box.width = surface.width - plotOffset.left - plotOffset.right + axis.labelWidth;
2517            }
2518            else {
2519                axis.box.top = plotOffset.top - axis.labelHeight / 2;
2520                axis.box.height = surface.height - plotOffset.bottom - plotOffset.top + axis.labelHeight;
2521            }
2522        }
2523
2524        function adjustLayoutForThingsStickingOut() {
2525            // possibly adjust plot offset to ensure everything stays
2526            // inside the canvas and isn't clipped off
2527
2528            var minMargin = options.grid.minBorderMargin,
2529                axis, i;
2530
2531            // check stuff from the plot (FIXME: this should just read
2532            // a value from the series, otherwise it's impossible to
2533            // customize)
2534            if (minMargin == null) {
2535                minMargin = 0;
2536                for (i = 0; i < series.length; ++i)
2537                    minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));
2538            }
2539
2540            var margins = {
2541                left: minMargin,
2542                right: minMargin,
2543                top: minMargin,
2544                bottom: minMargin
2545            };
2546
2547            // check axis labels, note we don't check the actual
2548            // labels but instead use the overall width/height to not
2549            // jump as much around with replots
2550            $.each(allAxes(), function (_, axis) {
2551                if (axis.reserveSpace && axis.ticks && axis.ticks.length) {
2552                    if (axis.direction === "x") {
2553                        margins.left = Math.max(margins.left, axis.labelWidth / 2);
2554                        margins.right = Math.max(margins.right, axis.labelWidth / 2);
2555                    } else {
2556                        margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);
2557                        margins.top = Math.max(margins.top, axis.labelHeight / 2);
2558                    }
2559                }
2560            });
2561
2562            plotOffset.left = Math.ceil(Math.max(margins.left, plotOffset.left));
2563            plotOffset.right = Math.ceil(Math.max(margins.right, plotOffset.right));
2564            plotOffset.top = Math.ceil(Math.max(margins.top, plotOffset.top));
2565            plotOffset.bottom = Math.ceil(Math.max(margins.bottom, plotOffset.bottom));
2566        }
2567
2568        function setupGrid() {
2569            var i, axes = allAxes(), showGrid = options.grid.show;
2570
2571            // Initialize the plot's offset from the edge of the canvas
2572
2573            for (var a in plotOffset) {
2574                var margin = options.grid.margin || 0;
2575                plotOffset[a] = typeof margin == "number" ? margin : margin[a] || 0;
2576            }
2577
2578            executeHooks(hooks.processOffset, [plotOffset]);
2579
2580            // If the grid is visible, add its border width to the offset
2581
2582            for (var a in plotOffset) {
2583                if(typeof(options.grid.borderWidth) == "object") {
2584                    plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;
2585                }
2586                else {
2587                    plotOffset[a] += showGrid ? options.grid.borderWidth : 0;
2588                }
2589            }
2590
2591            $.each(axes, function (_, axis) {
2592                var axisOpts = axis.options;
2593                axis.show = axisOpts.show == null ? axis.used : axisOpts.show;
2594                axis.reserveSpace = axisOpts.reserveSpace == null ? axis.show : axisOpts.reserveSpace;
2595                setRange(axis);
2596            });
2597
2598            if (showGrid) {
2599
2600                var allocatedAxes = $.grep(axes, function (axis) {
2601                    return axis.show || axis.reserveSpace;
2602                });
2603
2604                $.each(allocatedAxes, function (_, axis) {
2605                    // make the ticks
2606                    setupTickGeneration(axis);
2607                    setTicks(axis);
2608                    snapRangeToTicks(axis, axis.ticks);
2609                    // find labelWidth/Height for axis
2610                    measureTickLabels(axis);
2611                });
2612
2613                // with all dimensions calculated, we can compute the
2614                // axis bounding boxes, start from the outside
2615                // (reverse order)
2616                for (i = allocatedAxes.length - 1; i >= 0; --i)
2617                    allocateAxisBoxFirstPhase(allocatedAxes[i]);
2618
2619                // make sure we've got enough space for things that
2620                // might stick out
2621                adjustLayoutForThingsStickingOut();
2622
2623                $.each(allocatedAxes, function (_, axis) {
2624                    allocateAxisBoxSecondPhase(axis);
2625                });
2626            }
2627
2628            plotWidth = surface.width - plotOffset.left - plotOffset.right;
2629            plotHeight = surface.height - plotOffset.bottom - plotOffset.top;
2630
2631            // now we got the proper plot dimensions, we can compute the scaling
2632            $.each(axes, function (_, axis) {
2633                setTransformationHelpers(axis);
2634            });
2635
2636            if (showGrid) {
2637                drawAxisLabels();
2638            }
2639
2640            insertLegend();
2641        }
2642
2643        function setRange(axis) {
2644            var opts = axis.options,
2645                min = +(opts.min != null ? opts.min : axis.datamin),
2646                max = +(opts.max != null ? opts.max : axis.datamax),
2647                delta = max - min;
2648
2649            if (delta == 0.0) {
2650                // degenerate case
2651                var widen = max == 0 ? 1 : 0.01;
2652
2653                if (opts.min == null)
2654                    min -= widen;
2655                // always widen max if we couldn't widen min to ensure we
2656                // don't fall into min == max which doesn't work
2657                if (opts.max == null || opts.min != null)
2658                    max += widen;
2659            }
2660            else {
2661                // consider autoscaling
2662                var margin = opts.autoscaleMargin;
2663                if (margin != null) {
2664                    if (opts.min == null) {
2665                        min -= delta * margin;
2666                        // make sure we don't go below zero if all values
2667                        // are positive
2668                        if (min < 0 && axis.datamin != null && axis.datamin >= 0)
2669                            min = 0;
2670                    }
2671                    if (opts.max == null) {
2672                        max += delta * margin;
2673                        if (max > 0 && axis.datamax != null && axis.datamax <= 0)
2674                            max = 0;
2675                    }
2676                }
2677            }
2678            axis.min = min;
2679            axis.max = max;
2680        }
2681
2682        function setupTickGeneration(axis) {
2683            var opts = axis.options;
2684
2685            // estimate number of ticks
2686            var noTicks;
2687            if (typeof opts.ticks == "number" && opts.ticks > 0)
2688                noTicks = opts.ticks;
2689            else
2690                // heuristic based on the model a*sqrt(x) fitted to
2691                // some data points that seemed reasonable
2692                noTicks = 0.3 * Math.sqrt(axis.direction == "x" ? surface.width : surface.height);
2693
2694            var delta = (axis.max - axis.min) / noTicks,
2695                dec = -Math.floor(Math.log(delta) / Math.LN10),
2696                maxDec = opts.tickDecimals;
2697
2698            if (maxDec != null && dec > maxDec) {
2699                dec = maxDec;
2700            }
2701
2702            var magn = Math.pow(10, -dec),
2703                norm = delta / magn, // norm is between 1.0 and 10.0
2704                size;
2705
2706            if (norm < 1.5) {
2707                size = 1;
2708            } else if (norm < 3) {
2709                size = 2;
2710                // special case for 2.5, requires an extra decimal
2711                if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {
2712                    size = 2.5;
2713                    ++dec;
2714                }
2715            } else if (norm < 7.5) {
2716                size = 5;
2717            } else {
2718                size = 10;
2719            }
2720
2721            size *= magn;
2722
2723            if (opts.minTickSize != null && size < opts.minTickSize) {
2724                size = opts.minTickSize;
2725            }
2726
2727            axis.delta = delta;
2728            axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);
2729            axis.tickSize = opts.tickSize || size;
2730
2731            // Time mode was moved to a plug-in in 0.8, and since so many people use it
2732            // we'll add an especially friendly reminder to make sure they included it.
2733
2734            if (opts.mode == "time" && !axis.tickGenerator) {
2735                throw new Error("Time mode requires the flot.time plugin.");
2736            }
2737
2738            // Flot supports base-10 axes; any other mode else is handled by a plug-in,
2739            // like flot.time.js.
2740
2741            if (!axis.tickGenerator) {
2742
2743                axis.tickGenerator = function (axis) {
2744
2745                    var ticks = [],
2746                        start = floorInBase(axis.min, axis.tickSize),
2747                        i = 0,
2748                        v = Number.NaN,
2749                        prev;
2750
2751                    do {
2752                        prev = v;
2753                        v = start + i * axis.tickSize;
2754                        ticks.push(v);
2755                        ++i;
2756                    } while (v < axis.max && v != prev);
2757                    return ticks;
2758                };
2759
2760				axis.tickFormatter = function (value, axis) {
2761
2762					var factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1;
2763					var formatted = "" + Math.round(value * factor) / factor;
2764
2765					// If tickDecimals was specified, ensure that we have exactly that
2766					// much precision; otherwise default to the value's own precision.
2767
2768					if (axis.tickDecimals != null) {
2769						var decimal = formatted.indexOf(".");
2770						var precision = decimal == -1 ? 0 : formatted.length - decimal - 1;
2771						if (precision < axis.tickDecimals) {
2772							return (precision ? formatted : formatted + ".") + ("" + factor).substr(1, axis.tickDecimals - precision);
2773						}
2774					}
2775
2776                    return formatted;
2777                };
2778            }
2779
2780            if ($.isFunction(opts.tickFormatter))
2781                axis.tickFormatter = function (v, axis) { return "" + opts.tickFormatter(v, axis); };
2782
2783            if (opts.alignTicksWithAxis != null) {
2784                var otherAxis = (axis.direction == "x" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];
2785                if (otherAxis && otherAxis.used && otherAxis != axis) {
2786                    // consider snapping min/max to outermost nice ticks
2787                    var niceTicks = axis.tickGenerator(axis);
2788                    if (niceTicks.length > 0) {
2789                        if (opts.min == null)
2790                            axis.min = Math.min(axis.min, niceTicks[0]);
2791                        if (opts.max == null && niceTicks.length > 1)
2792                            axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);
2793                    }
2794
2795                    axis.tickGenerator = function (axis) {
2796                        // copy ticks, scaled to this axis
2797                        var ticks = [], v, i;
2798                        for (i = 0; i < otherAxis.ticks.length; ++i) {
2799                            v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min);
2800                            v = axis.min + v * (axis.max - axis.min);
2801                            ticks.push(v);
2802                        }
2803                        return ticks;
2804                    };
2805
2806                    // we might need an extra decimal since forced
2807                    // ticks don't necessarily fit naturally
2808                    if (!axis.mode && opts.tickDecimals == null) {
2809                        var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1),
2810                            ts = axis.tickGenerator(axis);
2811
2812                        // only proceed if the tick interval rounded
2813                        // with an extra decimal doesn't give us a
2814                        // zero at end
2815                        if (!(ts.length > 1 && /\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec))))
2816                            axis.tickDecimals = extraDec;
2817                    }
2818                }
2819            }
2820        }
2821
2822        function setTicks(axis) {
2823            var oticks = axis.options.ticks, ticks = [];
2824            if (oticks == null || (typeof oticks == "number" && oticks > 0))
2825                ticks = axis.tickGenerator(axis);
2826            else if (oticks) {
2827                if ($.isFunction(oticks))
2828                    // generate the ticks
2829                    ticks = oticks(axis);
2830                else
2831                    ticks = oticks;
2832            }
2833
2834            // clean up/labelify the supplied ticks, copy them over
2835            var i, v;
2836            axis.ticks = [];
2837            for (i = 0; i < ticks.length; ++i) {
2838                var label = null;
2839                var t = ticks[i];
2840                if (typeof t == "object") {
2841                    v = +t[0];
2842                    if (t.length > 1)
2843                        label = t[1];
2844                }
2845                else
2846                    v = +t;
2847                if (label == null)
2848                    label = axis.tickFormatter(v, axis);
2849                if (!isNaN(v))
2850                    axis.ticks.push({ v: v, label: label });
2851            }
2852        }
2853
2854        function snapRangeToTicks(axis, ticks) {
2855            if (axis.options.autoscaleMargin && ticks.length > 0) {
2856                // snap to ticks
2857                if (axis.options.min == null)
2858                    axis.min = Math.min(axis.min, ticks[0].v);
2859                if (axis.options.max == null && ticks.length > 1)
2860                    axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);
2861            }
2862        }
2863
2864        function draw() {
2865
2866            surface.clear();
2867
2868            executeHooks(hooks.drawBackground, [ctx]);
2869
2870            var grid = options.grid;
2871
2872            // draw background, if any
2873            if (grid.show && grid.backgroundColor)
2874                drawBackground();
2875
2876            if (grid.show && !grid.aboveData) {
2877                drawGrid();
2878            }
2879
2880            for (var i = 0; i < series.length; ++i) {
2881                executeHooks(hooks.drawSeries, [ctx, series[i]]);
2882                drawSeries(series[i]);
2883            }
2884
2885            executeHooks(hooks.draw, [ctx]);
2886
2887            if (grid.show && grid.aboveData) {
2888                drawGrid();
2889            }
2890
2891            surface.render();
2892
2893            // A draw implies that either the axes or data have changed, so we
2894            // should probably update the overlay highlights as well.
2895
2896            triggerRedrawOverlay();
2897        }
2898
2899        function extractRange(ranges, coord) {
2900            var axis, from, to, key, axes = allAxes();
2901
2902            for (var i = 0; i < axes.length; ++i) {
2903                axis = axes[i];
2904                if (axis.direction == coord) {
2905                    key = coord + axis.n + "axis";
2906                    if (!ranges[key] && axis.n == 1)
2907                        key = coord + "axis"; // support x1axis as xaxis
2908                    if (ranges[key]) {
2909                        from = ranges[key].from;
2910                        to = ranges[key].to;
2911                        break;
2912                    }
2913                }
2914            }
2915
2916            // backwards-compat stuff - to be removed in future
2917            if (!ranges[key]) {
2918                axis = coord == "x" ? xaxes[0] : yaxes[0];
2919                from = ranges[coord + "1"];
2920                to = ranges[coord + "2"];
2921            }
2922
2923            // auto-reverse as an added bonus
2924            if (from != null && to != null && from > to) {
2925                var tmp = from;
2926                from = to;
2927                to = tmp;
2928            }
2929
2930            return { from: from, to: to, axis: axis };
2931        }
2932
2933        function drawBackground() {
2934            ctx.save();
2935            ctx.translate(plotOffset.left, plotOffset.top);
2936
2937            ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, "rgba(255, 255, 255, 0)");
2938            ctx.fillRect(0, 0, plotWidth, plotHeight);
2939            ctx.restore();
2940        }
2941
2942        function drawGrid() {
2943            var i, axes, bw, bc;
2944
2945            ctx.save();
2946            ctx.translate(plotOffset.left, plotOffset.top);
2947
2948            // draw markings
2949            var markings = options.grid.markings;
2950            if (markings) {
2951                if ($.isFunction(markings)) {
2952                    axes = plot.getAxes();
2953                    // xmin etc. is backwards compatibility, to be
2954                    // removed in the future
2955                    axes.xmin = axes.xaxis.min;
2956                    axes.xmax = axes.xaxis.max;
2957                    axes.ymin = axes.yaxis.min;
2958                    axes.ymax = axes.yaxis.max;
2959
2960                    markings = markings(axes);
2961                }
2962
2963                for (i = 0; i < markings.length; ++i) {
2964                    var m = markings[i],
2965                        xrange = extractRange(m, "x"),
2966                        yrange = extractRange(m, "y");
2967
2968                    // fill in missing
2969                    if (xrange.from == null)
2970                        xrange.from = xrange.axis.min;
2971                    if (xrange.to == null)
2972                        xrange.to = xrange.axis.max;
2973                    if (yrange.from == null)
2974                        yrange.from = yrange.axis.min;
2975                    if (yrange.to == null)
2976                        yrange.to = yrange.axis.max;
2977
2978                    // clip
2979                    if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||
2980                        yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)
2981                        continue;
2982
2983                    xrange.from = Math.max(xrange.from, xrange.axis.min);
2984                    xrange.to = Math.min(xrange.to, xrange.axis.max);
2985                    yrange.from = Math.max(yrange.from, yrange.axis.min);
2986                    yrange.to = Math.min(yrange.to, yrange.axis.max);
2987
2988                    var xequal = xrange.from === xrange.to,
2989                        yequal = yrange.from === yrange.to;
2990
2991                    if (xequal && yequal) {
2992                        continue;
2993                    }
2994
2995                    // then draw
2996                    xrange.from = Math.floor(xrange.axis.p2c(xrange.from));
2997                    xrange.to = Math.floor(xrange.axis.p2c(xrange.to));
2998                    yrange.from = Math.floor(yrange.axis.p2c(yrange.from));
2999                    yrange.to = Math.floor(yrange.axis.p2c(yrange.to));
3000
3001                    if (xequal || yequal) {
3002                        var lineWidth = m.lineWidth || options.grid.markingsLineWidth,
3003                            subPixel = lineWidth % 2 ? 0.5 : 0;
3004                        ctx.beginPath();
3005                        ctx.strokeStyle = m.color || options.grid.markingsColor;
3006                        ctx.lineWidth = lineWidth;
3007                        if (xequal) {
3008                            ctx.moveTo(xrange.to + subPixel, yrange.from);
3009                            ctx.lineTo(xrange.to + subPixel, yrange.to);
3010                        } else {
3011                            ctx.moveTo(xrange.from, yrange.to + subPixel);
3012                            ctx.lineTo(xrange.to, yrange.to + subPixel);                            
3013                        }
3014                        ctx.stroke();
3015                    } else {
3016                        ctx.fillStyle = m.color || options.grid.markingsColor;
3017                        ctx.fillRect(xrange.from, yrange.to,
3018                                     xrange.to - xrange.from,
3019                                     yrange.from - yrange.to);
3020                    }
3021                }
3022            }
3023
3024            // draw the ticks
3025            axes = allAxes();
3026            bw = options.grid.borderWidth;
3027
3028            for (var j = 0; j < axes.length; ++j) {
3029                var axis = axes[j], box = axis.box,
3030                    t = axis.tickLength, x, y, xoff, yoff;
3031                if (!axis.show || axis.ticks.length == 0)
3032                    continue;
3033
3034                ctx.lineWidth = 1;
3035
3036                // find the edges
3037                if (axis.direction == "x") {
3038                    x = 0;
3039                    if (t == "full")
3040                        y = (axis.position == "top" ? 0 : plotHeight);
3041                    else
3042                        y = box.top - plotOffset.top + (axis.position == "top" ? box.height : 0);
3043                }
3044                else {
3045                    y = 0;
3046                    if (t == "full")
3047                        x = (axis.position == "left" ? 0 : plotWidth);
3048                    else
3049                        x = box.left - plotOffset.left + (axis.position == "left" ? box.width : 0);
3050                }
3051
3052                // draw tick bar
3053                if (!axis.innermost) {
3054                    ctx.strokeStyle = axis.options.color;
3055                    ctx.beginPath();
3056                    xoff = yoff = 0;
3057                    if (axis.direction == "x")
3058                        xoff = plotWidth + 1;
3059                    else
3060                        yoff = plotHeight + 1;
3061
3062                    if (ctx.lineWidth == 1) {
3063                        if (axis.direction == "x") {
3064                            y = Math.floor(y) + 0.5;
3065                        } else {
3066                            x = Math.floor(x) + 0.5;
3067                        }
3068                    }
3069
3070                    ctx.moveTo(x, y);
3071                    ctx.lineTo(x + xoff, y + yoff);
3072                    ctx.stroke();
3073                }
3074
3075                // draw ticks
3076
3077                ctx.strokeStyle = axis.options.tickColor;
3078
3079                ctx.beginPath();
3080                for (i = 0; i < axis.ticks.length; ++i) {
3081                    var v = axis.ticks[i].v;
3082
3083                    xoff = yoff = 0;
3084
3085                    if (isNaN(v) || v < axis.min || v > axis.max
3086                        // skip those lying on the axes if we got a border
3087                        || (t == "full"
3088                            && ((typeof bw == "object" && bw[axis.position] > 0) || bw > 0)
3089                            && (v == axis.min || v == axis.max)))
3090                        continue;
3091
3092                    if (axis.direction == "x") {
3093                        x = axis.p2c(v);
3094                        yoff = t == "full" ? -plotHeight : t;
3095
3096                        if (axis.position == "top")
3097                            yoff = -yoff;
3098                    }
3099                    else {
3100                        y = axis.p2c(v);
3101                        xoff = t == "full" ? -plotWidth : t;
3102
3103                        if (axis.position == "left")
3104                            xoff = -xoff;
3105                    }
3106
3107                    if (ctx.lineWidth == 1) {
3108                        if (axis.direction == "x")
3109                            x = Math.floor(x) + 0.5;
3110                        else
3111                            y = Math.floor(y) + 0.5;
3112                    }
3113
3114                    ctx.moveTo(x, y);
3115                    ctx.lineTo(x + xoff, y + yoff);
3116                }
3117
3118                ctx.stroke();
3119            }
3120
3121
3122            // draw border
3123            if (bw) {
3124                // If either borderWidth or borderColor is an object, then draw the border
3125                // line by line instead of as one rectangle
3126                bc = options.grid.borderColor;
3127                if(typeof bw == "object" || typeof bc == "object") {
3128                    if (typeof bw !== "object") {
3129                        bw = {top: bw, right: bw, bottom: bw, left: bw};
3130                    }
3131                    if (typeof bc !== "object") {
3132                        bc = {top: bc, right: bc, bottom: bc, left: bc};
3133                    }
3134
3135                    if (bw.top > 0) {
3136                        ctx.strokeStyle = bc.top;
3137                        ctx.lineWidth = bw.top;
3138                        ctx.beginPath();
3139                        ctx.moveTo(0 - bw.left, 0 - bw.top/2);
3140                        ctx.lineTo(plotWidth, 0 - bw.top/2);
3141                        ctx.stroke();
3142                    }
3143
3144                    if (bw.right > 0) {
3145                        ctx.strokeStyle = bc.right;
3146                        ctx.lineWidth = bw.right;
3147                        ctx.beginPath();
3148                        ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top);
3149                        ctx.lineTo(plotWidth + bw.right / 2, plotHeight);
3150                        ctx.stroke();
3151                    }
3152
3153                    if (bw.bottom > 0) {
3154                        ctx.strokeStyle = bc.bottom;
3155                        ctx.lineWidth = bw.bottom;
3156                        ctx.beginPath();
3157                        ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2);
3158                        ctx.lineTo(0, plotHeight + bw.bottom / 2);
3159                        ctx.stroke();
3160                    }
3161
3162                    if (bw.left > 0) {
3163                        ctx.strokeStyle = bc.left;
3164                        ctx.lineWidth = bw.left;
3165                        ctx.beginPath();
3166                        ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);
3167                        ctx.lineTo(0- bw.left/2, 0);
3168                        ctx.stroke();
3169                    }
3170                }
3171                else {
3172                    ctx.lineWidth = bw;
3173                    ctx.strokeStyle = options.grid.borderColor;
3174                    ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);
3175                }
3176            }
3177
3178            ctx.restore();
3179        }
3180
3181        function drawAxisLabels() {
3182
3183            $.each(allAxes(), function (_, axis) {
3184                var box = axis.box,
3185                    legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
3186                    layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles,
3187                    font = axis.options.font || "flot-tick-label tickLabel",
3188                    tick, x, y, halign, valign;
3189
3190                // Remove text before checking for axis.show and ticks.length;
3191                // otherwise plugins, like flot-tickrotor, that draw their own
3192                // tick labels will end up with both theirs and the defaults.
3193
3194                surface.removeText(layer);
3195
3196                if (!axis.show || axis.ticks.length == 0)
3197                    return;
3198
3199                for (var i = 0; i < axis.ticks.length; ++i) {
3200
3201                    tick = axis.ticks[i];
3202                    if (!tick.label || tick.v < axis.min || tick.v > axis.max)
3203                        continue;
3204
3205                    if (axis.direction == "x") {
3206                        halign = "center";
3207                        x = plotOffset.left + axis.p2c(tick.v);
3208                        if (axis.position == "bottom") {
3209                            y = box.top + box.padding;
3210                        } else {
3211                            y = box.top + box.height - box.padding;
3212                            valign = "bottom";
3213                        }
3214                    } else {
3215                        valign = "middle";
3216                        y = plotOffset.top + axis.p2c(tick.v);
3217                        if (axis.position == "left") {
3218                            x = box.left + box.width - box.padding;
3219                            halign = "right";
3220                        } else {
3221                            x = box.left + box.padding;
3222                        }
3223                    }
3224
3225                    surface.addText(layer, x, y, tick.label, font, null, null, halign, valign);
3226                }
3227            });
3228        }
3229
3230        function drawSeries(series) {
3231            if (series.lines.show)
3232                drawSeriesLines(series);
3233            if (series.bars.show)
3234                drawSeriesBars(series);
3235            if (series.points.show)
3236                drawSeriesPoints(series);
3237        }
3238
3239        function drawSeriesLines(series) {
3240            function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
3241                var points = datapoints.points,
3242                    ps = datapoints.pointsize,
3243                    prevx = null, prevy = null;
3244
3245                ctx.beginPath();
3246                for (var i = ps; i < points.length; i += ps) {
3247                    var x1 = points[i - ps], y1 = points[i - ps + 1],
3248                        x2 = points[i], y2 = points[i + 1];
3249
3250                    if (x1 == null || x2 == null)
3251                        continue;
3252
3253                    // clip with ymin
3254                    if (y1 <= y2 && y1 < axisy.min) {
3255                        if (y2 < axisy.min)
3256                            continue;   // line segment is outside
3257                        // compute new intersection point
3258                        x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
3259                        y1 = axisy.min;
3260                    }
3261                    else if (y2 <= y1 && y2 < axisy.min) {
3262                        if (y1 < axisy.min)
3263                            continue;
3264                        x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
3265                        y2 = axisy.min;
3266                    }
3267
3268                    // clip with ymax
3269                    if (y1 >= y2 && y1 > axisy.max) {
3270                        if (y2 > axisy.max)
3271                            continue;
3272                        x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
3273                        y1 = axisy.max;
3274                    }
3275                    else if (y2 >= y1 && y2 > axisy.max) {
3276                        if (y1 > axisy.max)
3277                            continue;
3278                        x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
3279                        y2 = axisy.max;
3280                    }
3281
3282                    // clip with xmin
3283                    if (x1 <= x2 && x1 < axisx.min) {
3284                        if (x2 < axisx.min)
3285                            continue;
3286                        y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
3287                        x1 = axisx.min;
3288                    }
3289                    else if (x2 <= x1 && x2 < axisx.min) {
3290                        if (x1 < axisx.min)
3291                            continue;
3292                        y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
3293                        x2 = axisx.min;
3294                    }
3295
3296                    // clip with xmax
3297                    if (x1 >= x2 && x1 > axisx.max) {
3298                        if (x2 > axisx.max)
3299                            continue;
3300                        y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
3301                        x1 = axisx.max;
3302                    }
3303                    else if (x2 >= x1 && x2 > axisx.max) {
3304                        if (x1 > axisx.max)
3305                            continue;
3306                        y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
3307                        x2 = axisx.max;
3308                    }
3309
3310                    if (x1 != prevx || y1 != prevy)
3311                        ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);
3312
3313                    prevx = x2;
3314                    prevy = y2;
3315                    ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);
3316                }
3317                ctx.stroke();
3318            }
3319
3320            function plotLineArea(datapoints, axisx, axisy) {
3321                var points = datapoints.points,
3322                    ps = datapoints.pointsize,
3323                    bottom = Math.min(Math.max(0, axisy.min), axisy.max),
3324                    i = 0, top, areaOpen = false,
3325                    ypos = 1, segmentStart = 0, segmentEnd = 0;
3326
3327                // we process each segment in two turns, first forward
3328                // direction to sketch out top, then once we hit the
3329                // end we go backwards to sketch the bottom
3330                while (true) {
3331                    if (ps > 0 && i > points.length + ps)
3332                        break;
3333
3334                    i += ps; // ps is negative if going backwards
3335
3336                    var x1 = points[i - ps],
3337                        y1 = points[i - ps + ypos],
3338                        x2 = points[i], y2 = points[i + ypos];
3339
3340                    if (areaOpen) {
3341                        if (ps > 0 && x1 != null && x2 == null) {
3342                            // at turning point
3343                            segmentEnd = i;
3344                            ps = -ps;
3345                            ypos = 2;
3346                            continue;
3347                        }
3348
3349                        if (ps < 0 && i == segmentStart + ps) {
3350                            // done with the reverse sweep
3351                            ctx.fill();
3352                            areaOpen = false;
3353                            ps = -ps;
3354                            ypos = 1;
3355                            i = segmentStart = segmentEnd + ps;
3356                            continue;
3357                        }
3358                    }
3359
3360                    if (x1 == null || x2 == null)
3361                        continue;
3362
3363                    // clip x values
3364
3365                    // clip with xmin
3366                    if (x1 <= x2 && x1 < axisx.min) {
3367                        if (x2 < axisx.min)
3368                            continue;
3369                        y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
3370                        x1 = axisx.min;
3371                    }
3372                    else if (x2 <= x1 && x2 < axisx.min) {
3373                        if (x1 < axisx.min)
3374                            continue;
3375                        y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
3376                        x2 = axisx.min;
3377                    }
3378
3379                    // clip with xmax
3380                    if (x1 >= x2 && x1 > axisx.max) {
3381                        if (x2 > axisx.max)
3382                            continue;
3383                        y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
3384                        x1 = axisx.max;
3385                    }
3386                    else if (x2 >= x1 && x2 > axisx.max) {
3387                        if (x1 > axisx.max)
3388                            continue;
3389                        y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
3390                        x2 = axisx.max;
3391                    }
3392
3393                    if (!areaOpen) {
3394                        // open area
3395                        ctx.beginPath();
3396                        ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));
3397                        areaOpen = true;
3398                    }
3399
3400                    // now first check the case where both is outside
3401                    if (y1 >= axisy.max && y2 >= axisy.max) {
3402                        ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));
3403                        ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));
3404                        continue;
3405                    }
3406                    else if (y1 <= axisy.min && y2 <= axisy.min) {
3407                        ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));
3408                        ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));
3409                        continue;
3410                    }
3411
3412                    // else it's a bit more complicated, there might
3413                    // be a flat maxed out rectangle first, then a
3414                    // triangular cutout or reverse; to find these
3415                    // keep track of the current x values
3416                    var x1old = x1, x2old = x2;
3417
3418                    // clip the y values, without shortcutting, we
3419                    // go through all cases in turn
3420
3421                    // clip with ymin
3422                    if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {
3423                        x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
3424                        y1 = axisy.min;
3425                    }
3426                    else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {
3427                        x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
3428                        y2 = axisy.min;
3429                    }
3430
3431                    // clip with ymax
3432                    if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {
3433                        x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
3434                        y1 = axisy.max;
3435                    }
3436                    else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {
3437                        x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
3438                        y2 = axisy.max;
3439                    }
3440
3441                    // if the x value was changed we got a rectangle
3442                    // to fill
3443                    if (x1 != x1old) {
3444                        ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));
3445                        // it goes to (x1, y1), but we fill that below
3446                    }
3447
3448                    // fill triangular section, this sometimes result
3449                    // in redundant points if (x1, y1) hasn't changed
3450                    // from previous line to, but we just ignore that
3451                    ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));
3452                    ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));
3453
3454                    // fill the other rectangle if it's there
3455                    if (x2 != x2old) {
3456                        ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));
3457                        ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2));
3458                    }
3459                }
3460            }
3461
3462            ctx.save();
3463            ctx.translate(plotOffset.left, plotOffset.top);
3464            ctx.lineJoin = "round";
3465
3466            var lw = series.lines.lineWidth,
3467                sw = series.shadowSize;
3468            // FIXME: consider another form of shadow when filling is turned on
3469            if (lw > 0 && sw > 0) {
3470                // draw shadow as a thick and thin line with transparency
3471                ctx.lineWidth = sw;
3472                ctx.strokeStyle = "rgba(0,0,0,0.1)";
3473                // position shadow at angle from the mid of line
3474                var angle = Math.PI/18;
3475                plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);
3476                ctx.lineWidth = sw/2;
3477                plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);
3478            }
3479
3480            ctx.lineWidth = lw;
3481            ctx.strokeStyle = series.color;
3482            var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);
3483            if (fillStyle) {
3484                ctx.fillStyle = fillStyle;
3485                plotLineArea(series.datapoints, series.xaxis, series.yaxis);
3486            }
3487
3488            if (lw > 0)
3489                plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis);
3490            ctx.restore();
3491        }
3492
3493        function drawSeriesPoints(series) {
3494            function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {
3495                var points = datapoints.points, ps = datapoints.pointsize;
3496
3497                for (var i = 0; i < points.length; i += ps) {
3498                    var x = points[i], y = points[i + 1];
3499                    if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
3500                        continue;
3501
3502                    ctx.beginPath();
3503                    x = axisx.p2c(x);
3504                    y = axisy.p2c(y) + offset;
3505                    if (symbol == "circle")
3506                        ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);
3507                    else
3508                        symbol(ctx, x, y, radius, shadow);
3509                    ctx.closePath();
3510
3511                    if (fillStyle) {
3512                        ctx.fillStyle = fillStyle;
3513                        ctx.fill();
3514                    }
3515                    ctx.stroke();
3516                }
3517            }
3518
3519            ctx.save();
3520            ctx.translate(plotOffset.left, plotOffset.top);
3521
3522            var lw = series.points.lineWidth,
3523                sw = series.shadowSize,
3524                radius = series.points.radius,
3525                symbol = series.points.symbol;
3526
3527            // If the user sets the line width to 0, we change it to a very 
3528            // small value. A line width of 0 seems to force the default of 1.
3529            // Doing the conditional here allows the shadow setting to still be 
3530            // optional even with a lineWidth of 0.
3531
3532            if( lw == 0 )
3533                lw = 0.0001;
3534
3535            if (lw > 0 && sw > 0) {
3536                // draw shadow in two steps
3537                var w = sw / 2;
3538                ctx.lineWidth = w;
3539                ctx.strokeStyle = "rgba(0,0,0,0.1)";
3540                plotPoints(series.datapoints, radius, null, w + w/2, true,
3541                           series.xaxis, series.yaxis, symbol);
3542
3543                ctx.strokeStyle = "rgba(0,0,0,0.2)";
3544                plotPoints(series.datapoints, radius, null, w/2, true,
3545                           series.xaxis, series.yaxis, symbol);
3546            }
3547
3548            ctx.lineWidth = lw;
3549            ctx.strokeStyle = series.color;
3550            plotPoints(series.datapoints, radius,
3551                       getFillStyle(series.points, series.color), 0, false,
3552                       series.xaxis, series.yaxis, symbol);
3553            ctx.restore();
3554        }
3555
3556        function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {
3557            var left, right, bottom, top,
3558                drawLeft, drawRight, drawTop, drawBottom,
3559                tmp;
3560
3561            // in horizontal mode, we start the bar from the left
3562            // instead of from the bottom so it appears to be
3563            // horizontal rather than vertical
3564            if (horizontal) {
3565                drawBottom = drawRight = drawTop = true;
3566                drawLeft = false;
3567                left = b;
3568                right = x;
3569                top = y + barLeft;
3570                bottom = y + barRight;
3571
3572                // account for negative bars
3573                if (right < left) {
3574                    tmp = right;
3575                    right = left;
3576                    left = tmp;
3577                    drawLeft = true;
3578                    drawRight = false;
3579                }
3580            }
3581            else {
3582                drawLeft = drawRight = drawTop = true;
3583                drawBottom = false;
3584                left = x + barLeft;
3585                right = x + barRight;
3586                bottom = b;
3587                top = y;
3588
3589                // account for negative bars
3590                if (top < bottom) {
3591                    tmp = top;
3592                    top = bottom;
3593                    bottom = tmp;
3594                    drawBottom = true;
3595                    drawTop = false;
3596                }
3597            }
3598
3599            // clip
3600            if (right < axisx.min || left > axisx.max ||
3601                top < axisy.min || bottom > axisy.max)
3602                return;
3603
3604            if (left < axisx.min) {
3605                left = axisx.min;
3606                drawLeft = false;
3607            }
3608
3609            if (right > axisx.max) {
3610                right = axisx.max;
3611                drawRight = false;
3612            }
3613
3614            if (bottom < axisy.min) {
3615                bottom = axisy.min;
3616                drawBottom = false;
3617            }
3618
3619            if (top > axisy.max) {
3620                top = axisy.max;
3621                drawTop = false;
3622            }
3623
3624            left = axisx.p2c(left);
3625            bottom = axisy.p2c(bottom);
3626            right = axisx.p2c(right);
3627            top = axisy.p2c(top);
3628
3629            // fill the bar
3630            if (fillStyleCallback) {
3631                c.fillStyle = fillStyleCallback(bottom, top);
3632                c.fillRect(left, top, right - left, bottom - top)
3633            }
3634
3635            // draw outline
3636            if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) {
3637                c.beginPath();
3638
3639                // FIXME: inline moveTo is buggy with excanvas
3640                c.moveTo(left, bottom);
3641                if (drawLeft)
3642                    c.lineTo(left, top);
3643                else
3644                    c.moveTo(left, top);
3645                if (drawTop)
3646                    c.lineTo(right, top);
3647                else
3648                    c.moveTo(right, top);
3649                if (drawRight)
3650                    c.lineTo(right, bottom);
3651                else
3652                    c.moveTo(right, bottom);
3653                if (drawBottom)
3654                    c.lineTo(left, bottom);
3655                else
3656                    c.moveTo(left, bottom);
3657                c.stroke();
3658            }
3659        }
3660
3661        function drawSeriesBars(series) {
3662            function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {
3663                var points = datapoints.points, ps = datapoints.pointsize;
3664
3665                for (var i = 0; i < points.length; i += ps) {
3666                    if (points[i] == null)
3667                        continue;
3668                    drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);
3669                }
3670            }
3671
3672            ctx.save();
3673            ctx.translate(plotOffset.left, plotOffset.top);
3674
3675            // FIXME: figure out a way to add shadows (for instance along the right edge)
3676            ctx.lineWidth = series.bars.lineWidth;
3677            ctx.strokeStyle = series.color;
3678
3679            var barLeft;
3680
3681            switch (series.bars.align) {
3682                case "left":
3683                    barLeft = 0;
3684                    break;
3685                case "right":
3686                    barLeft = -series.bars.barWidth;
3687                    break;
3688                default:
3689                    barLeft = -series.bars.barWidth / 2;
3690            }
3691
3692            var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;
3693            plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, fillStyleCallback, series.xaxis, series.yaxis);
3694            ctx.restore();
3695        }
3696
3697        function getFillStyle(filloptions, seriesColor, bottom, top) {
3698            var fill = filloptions.fill;
3699            if (!fill)
3700                return null;
3701
3702            if (filloptions.fillColor)
3703                return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);
3704
3705            var c = $.color.parse(seriesColor);
3706            c.a = typeof fill == "number" ? fill : 0.4;
3707            c.normalize();
3708            return c.toString();
3709        }
3710
3711        function insertLegend() {
3712
3713            if (options.legend.container != null) {
3714                $(options.legend.container).html("");
3715            } else {
3716                placeholder.find(".legend").remove();
3717            }
3718
3719            if (!options.legend.show) {
3720                return;
3721            }
3722
3723            var fragments = [], entries = [], rowStarted = false,
3724                lf = options.legend.labelFormatter, s, label;
3725
3726            // Build a list of legend entries, with each having a label and a color
3727
3728            for (var i = 0; i < series.length; ++i) {
3729                s = series[i];
3730                if (s.label) {
3731                    label = lf ? lf(s.label, s) : s.label;
3732                    if (label) {
3733                        entries.push({
3734                            label: label,
3735                            color: s.color
3736                        });
3737                    }
3738                }
3739            }
3740
3741            // Sort the legend using either the default or a custom comparator
3742
3743            if (options.legend.sorted) {
3744                if ($.isFunction(options.legend.sorted)) {
3745                    entries.sort(options.legend.sorted);
3746                } else if (options.legend.sorted == "reverse") {
3747                	entries.reverse();
3748                } else {
3749                    var ascending = options.legend.sorted != "descending";
3750                    entries.sort(function(a, b) {
3751                        return a.label == b.label ? 0 : (
3752                            (a.label < b.label) != ascending ? 1 : -1   // Logical XOR
3753                        );
3754                    });
3755                }
3756            }
3757
3758            // Generate markup for the list of entries, in their final order
3759
3760            for (var i = 0; i < entries.length; ++i) {
3761
3762                var entry = entries[i];
3763
3764                if (i % options.legend.noColumns == 0) {
3765                    if (rowStarted)
3766                        fragments.push('</tr>');
3767                    fragments.push('<tr>');
3768                    rowStarted = true;
3769                }
3770
3771                fragments.push(
3772                    '<td class="legendColorBox"><div style="border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px"><div style="width:4px;height:0;border:5px solid ' + entry.color + ';overflow:hidden"></div></div></td>' +
3773                    '<td class="legendLabel">' + entry.label + '</td>'
3774                );
3775            }
3776
3777            if (rowStarted)
3778                fragments.push('</tr>');
3779
3780            if (fragments.length == 0)
3781                return;
3782
3783            var table = '<table style="font-size:smaller;color:' + options.grid.color + '">' + fragments.join("") + '</table>';
3784            if (options.legend.container != null)
3785                $(options.legend.container).html(table);
3786            else {
3787                var pos = "",
3788                    p = options.legend.position,
3789                    m = options.legend.margin;
3790                if (m[0] == null)
3791                    m = [m, m];
3792                if (p.charAt(0) == "n")
3793                    pos += 'top:' + (m[1] + plotOffset.top) + 'px;';
3794                else if (p.charAt(0) == "s")
3795                    pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';
3796                if (p.charAt(1) == "e")
3797                    pos += 'right:' + (m[0] + plotOffset.right) + 'px;';
3798                else if (p.charAt(1) == "w")
3799                    pos += 'left:' + (m[0] + plotOffset.left) + 'px;';
3800                var legend = $('<div class="legend">' + table.replace('style="', 'style="position:absolute;' + pos +';') + '</div>').appendTo(placeholder);
3801                if (options.legend.backgroundOpacity != 0.0) {
3802                    // put in the transparent background
3803                    // separately to avoid blended labels and
3804                    // label boxes
3805                    var c = options.legend.backgroundColor;
3806                    if (c == null) {
3807                        c = options.grid.backgroundColor;
3808                        if (c && typeof c == "string")
3809                            c = $.color.parse(c);
3810                        else
3811                            c = $.color.extract(legend, 'background-color');
3812                        c.a = 1;
3813                        c = c.toString();
3814                    }
3815                    var div = legend.children();
3816                    $('<div style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);
3817                }
3818            }
3819        }
3820
3821
3822        // interactive features
3823
3824        var highlights = [],
3825            redrawTimeout = null;
3826
3827        // returns the data item the mouse is over, or null if none is found
3828        function findNearbyItem(mouseX, mouseY, seriesFilter) {
3829            var maxDistance = options.grid.mouseActiveRadius,
3830                smallestDistance = maxDistance * maxDistance + 1,
3831                item = null, foundPoint = false, i, j, ps;
3832
3833            for (i = series.length - 1; i >= 0; --i) {
3834                if (!seriesFilter(series[i]))
3835                    continue;
3836
3837                var s = series[i],
3838                    axisx = s.xaxis,
3839                    axisy = s.yaxis,
3840                    points = s.datapoints.points,
3841                    mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster
3842                    my = axisy.c2p(mouseY),
3843                    maxx = maxDistance / axisx.scale,
3844                    maxy = maxDistance / axisy.scale;
3845
3846                ps = s.datapoints.pointsize;
3847                // with inverse transforms, we can't use the maxx/maxy
3848                // optimization, sadly
3849                if (axisx.options.inverseTransform)
3850                    maxx = Number.MAX_VALUE;
3851                if (axisy.options.inverseTransform)
3852                    maxy = Number.MAX_VALUE;
3853
3854                if (s.lines.show || s.points.show) {
3855                    for (j = 0; j < points.length; j += ps) {
3856                        var x = points[j], y = points[j + 1];
3857                        if (x == null)
3858                            continue;
3859
3860                        // For points and lines, the cursor must be within a
3861                        // certain distance to the data point
3862                        if (x - mx > maxx || x - mx < -maxx ||
3863                            y - my > maxy || y - my < -maxy)
3864                            continue;
3865
3866                        // We have to calculate distances in pixels, not in
3867                        // data units, because the scales of the axes may be different
3868                        var dx = Math.abs(axisx.p2c(x) - mouseX),
3869                            dy = Math.abs(axisy.p2c(y) - mouseY),
3870                            dist = dx * dx + dy * dy; // we save the sqrt
3871
3872                        // use <= to ensure last point takes precedence
3873                        // (last generally means on top of)
3874                        if (dist < smallestDistance) {
3875                            smallestDistance = dist;
3876                            item = [i, j / ps];
3877                        }
3878                    }
3879                }
3880
3881                if (s.bars.show && !item) { // no other point can be nearby
3882
3883                    var barLeft, barRight;
3884
3885                    switch (s.bars.align) {
3886                        case "left":
3887                            barLeft = 0;
3888                            break;
3889                        case "right":
3890                            barLeft = -s.bars.barWidth;
3891                            break;
3892                        default:
3893                            barLeft = -s.bars.barWidth / 2;
3894                    }
3895
3896                    barRight = barLeft + s.bars.barWidth;
3897
3898                    for (j = 0; j < points.length; j += ps) {
3899                        var x = points[j], y = points[j + 1], b = points[j + 2];
3900                        if (x == null)
3901                            continue;
3902
3903                        // for a bar graph, the cursor must be inside the bar
3904                        if (series[i].bars.horizontal ?
3905                            (mx <= Math.max(b, x) && mx >= Math.min(b, x) &&
3906                             my >= y + barLeft && my <= y + barRight) :
3907                            (mx >= x + barLeft && mx <= x + barRight &&
3908                             my >= Math.min(b, y) && my <= Math.max(b, y)))
3909                                item = [i, j / ps];
3910                    }
3911                }
3912            }
3913
3914            if (item) {
3915                i = item[0];
3916                j = item[1];
3917                ps = series[i].datapoints.pointsize;
3918
3919                return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
3920                         dataIndex: j,
3921                         series: series[i],
3922                         seriesIndex: i };
3923            }
3924
3925            return null;
3926        }
3927
3928        function onMouseMove(e) {
3929            if (options.grid.hoverable)
3930                triggerClickHoverEvent("plothover", e,
3931                                       function (s) { return s["hoverable"] != false; });
3932        }
3933
3934        function onMouseLeave(e) {
3935            if (options.grid.hoverable)
3936                triggerClickHoverEvent("plothover", e,
3937                                       function (s) { return false; });
3938        }
3939
3940        function onClick(e) {
3941            triggerClickHoverEvent("plotclick", e,
3942                                   function (s) { return s["clickable"] != false; });
3943        }
3944
3945        // trigger click or hover event (they send the same parameters
3946        // so we share their code)
3947        function triggerClickHoverEvent(eventname, event, seriesFilter) {
3948            var offset = eventHolder.offset(),
3949                canvasX = event.pageX - offset.left - plotOffset.left,
3950                canvasY = event.pageY - offset.top - plotOffset.top,
3951            pos = canvasToAxisCoords({ left: canvasX, top: canvasY });
3952
3953            pos.pageX = event.pageX;
3954            pos.pageY = event.pageY;
3955
3956            var item = findNearbyItem(canvasX, canvasY, seriesFilter);
3957
3958            if (item) {
3959                // fill in mouse pos for any listeners out there
3960                item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);
3961                item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);
3962            }
3963
3964            if (options.grid.autoHighlight) {
3965                // clear auto-highlights
3966                for (var i = 0; i < highlights.length; ++i) {
3967                    var h = highlights[i];
3968                    if (h.auto == eventname &&
3969                        !(item && h.series == item.series &&
3970                          h.point[0] == item.datapoint[0] &&
3971                          h.point[1] == item.datapoint[1]))
3972                        unhighlight(h.series, h.point);
3973                }
3974
3975                if (item)
3976                    highlight(item.series, item.datapoint, eventname);
3977            }
3978
3979            placeholder.trigger(eventname, [ pos, item ]);
3980        }
3981
3982        function triggerRedrawOverlay() {
3983            var t = options.interaction.redrawOverlayInterval;
3984            if (t == -1) {      // skip event queue
3985                drawOverlay();
3986                return;
3987            }
3988
3989            if (!redrawTimeout)
3990                redrawTimeout = setTimeout(drawOverlay, t);
3991        }
3992
3993        function drawOverlay() {
3994            redrawTimeout = null;
3995
3996            // draw highlights
3997            octx.save();
3998            overlay.clear();
3999            octx.translate(plotOffset.left, plotOffset.top);
4000
4001            var i, hi;
4002            for (i = 0; i < highlights.length; ++i) {
4003                hi = highlights[i];
4004
4005                if (hi.series.bars.show)
4006                    drawBarHighlight(hi.series, hi.point);
4007                else
4008                    drawPointHighlight(hi.series, hi.point);
4009            }
4010            octx.restore();
4011
4012            executeHooks(hooks.drawOverlay, [octx]);
4013        }
4014
4015        function highlight(s, point, auto) {
4016            if (typeof s == "number")
4017                s = series[s];
4018
4019            if (typeof point == "number") {
4020                var ps = s.datapoints.pointsize;
4021                point = s.datapoints.points.slice(ps * point, ps * (point + 1));
4022            }
4023
4024            var i = indexOfHighlight(s, point);
4025            if (i == -1) {
4026                highlights.push({ series: s, point: point, auto: auto });
4027
4028                triggerRedrawOverlay();
4029            }
4030            else if (!auto)
4031                highlights[i].auto = false;
4032        }
4033
4034        function unhighlight(s, point) {
4035            if (s == null && point == null) {
4036                highlights = [];
4037                triggerRedrawOverlay();
4038                return;
4039            }
4040
4041            if (typeof s == "number")
4042                s = series[s];
4043
4044            if (typeof point == "number") {
4045                var ps = s.datapoints.pointsize;
4046                point = s.datapoints.points.slice(ps * point, ps * (point + 1));
4047            }
4048
4049            var i = indexOfHighlight(s, point);
4050            if (i != -1) {
4051                highlights.splice(i, 1);
4052
4053                triggerRedrawOverlay();
4054            }
4055        }
4056
4057        function indexOfHighlight(s, p) {
4058            for (var i = 0; i < highlights.length; ++i) {
4059                var h = highlights[i];
4060                if (h.series == s && h.point[0] == p[0]
4061                    && h.point[1] == p[1])
4062                    return i;
4063            }
4064            return -1;
4065        }
4066
4067        function drawPointHighlight(series, point) {
4068            var x = point[0], y = point[1],
4069                axisx = series.xaxis, axisy = series.yaxis,
4070                highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();
4071
4072            if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
4073                return;
4074
4075            var pointRadius = series.points.radius + series.points.lineWidth / 2;
4076            octx.lineWidth = pointRadius;
4077            octx.strokeStyle = highlightColor;
4078            var radius = 1.5 * pointRadius;
4079            x = axisx.p2c(x);
4080            y = axisy.p2c(y);
4081
4082            octx.beginPath();
4083            if (series.points.symbol == "circle")
4084                octx.arc(x, y, radius, 0, 2 * Math.PI, false);
4085            else
4086                series.points.symbol(octx, x, y, radius, false);
4087            octx.closePath();
4088            octx.stroke();
4089        }
4090
4091        function drawBarHighlight(series, point) {
4092            var highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),
4093                fillStyle = highlightColor,
4094                barLeft;
4095
4096            switch (series.bars.align) {
4097                case "left":
4098                    barLeft = 0;
4099                    break;
4100                case "right":
4101                    barLeft = -series.bars.barWidth;
4102                    break;
4103                default:
4104                    barLeft = -series.bars.barWidth / 2;
4105            }
4106
4107            octx.lineWidth = series.bars.lineWidth;
4108            octx.strokeStyle = highlightColor;
4109
4110            drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,
4111                    function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);
4112        }
4113
4114        function getColorOrGradient(spec, bottom, top, defaultColor) {
4115            if (typeof spec == "string")
4116                return spec;
4117            else {
4118                // assume this is a gradient spec; IE currently only
4119                // supports a simple vertical gradient properly, so that's
4120                // what we support too
4121                var gradient = ctx.createLinearGradient(0, top, 0, bottom);
4122
4123                for (var i = 0, l = spec.colors.length; i < l; ++i) {
4124                    var c = spec.colors[i];
4125                    if (typeof c != "string") {
4126                        var co = $.color.parse(defaultColor);
4127                        if (c.brightness != null)
4128                            co = co.scale('rgb', c.brightness);
4129                        if (c.opacity != null)
4130                            co.a *= c.opacity;
4131                        c = co.toString();
4132                    }
4133                    gradient.addColorStop(i / (l - 1), c);
4134                }
4135
4136                return gradient;
4137            }
4138        }
4139    }
4140
4141    // Add the plot function to the top level of the jQuery object
4142
4143    $.plot = function(placeholder, data, options) {
4144        //var t0 = new Date();
4145        var plot = new Plot($(placeholder), data, options, $.plot.plugins);
4146        //(window.console ? console.log : alert)("time used (msecs): " + ((new Date()).getTime() - t0.getTime()));
4147        return plot;
4148    };
4149
4150    $.plot.version = "0.8.3";
4151
4152    $.plot.plugins = [];
4153
4154    // Also add the plot function as a chainable property
4155
4156    $.fn.plot = function(data, options) {
4157        return this.each(function() {
4158            $.plot(this, data, options);
4159        });
4160    };
4161
4162    // round to nearby lower multiple of base
4163    function floorInBase(n, base) {
4164        return base * Math.floor(n / base);
4165    }
4166
4167})(jQuery);
4168
4169/* Flot plugin for plotting textual data or categories.
4170
4171Copyright (c) 2007-2014 IOLA and Ole Laursen.
4172Licensed under the MIT license.
4173
4174Consider a dataset like [["February", 34], ["March", 20], ...]. This plugin
4175allows you to plot such a dataset directly.
4176
4177To enable it, you must specify mode: "categories" on the axis with the textual
4178labels, e.g.
4179
4180	$.plot("#placeholder", data, { xaxis: { mode: "categories" } });
4181
4182By default, the labels are ordered as they are met in the data series. If you
4183need a different ordering, you can specify "categories" on the axis options
4184and list the categories there:
4185
4186	xaxis: {
4187		mode: "categories",
4188		categories: ["February", "March", "April"]
4189	}
4190
4191If you need to customize the distances between the categories, you can specify
4192"categories" as an object mapping labels to values
4193
4194	xaxis: {
4195		mode: "categories",
4196		categories: { "February": 1, "March": 3, "April": 4 }
4197	}
4198
4199If you don't specify all categories, the remaining categories will be numbered
4200from the max value plus 1 (with a spacing of 1 between each).
4201
4202Internally, the plugin works by transforming the input data through an auto-
4203generated mapping where the first category becomes 0, the second 1, etc.
4204Hence, a point like ["February", 34] becomes [0, 34] internally in Flot (this
4205is visible in hover and click events that return numbers rather than the
4206category labels). The plugin also overrides the tick generator to spit out the
4207categories as ticks instead of the values.
4208
4209If you need to map a value back to its label, the mapping is always accessible
4210as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
4211
4212*/
4213
4214(function ($) {
4215    var options = {
4216        xaxis: {
4217            categories: null
4218        },
4219        yaxis: {
4220            categories: null
4221        }
4222    };
4223    
4224    function processRawData(plot, series, data, datapoints) {
4225        // if categories are enabled, we need to disable
4226        // auto-transformation to numbers so the strings are intact
4227        // for later processing
4228
4229        var xCategories = series.xaxis.options.mode == "categories",
4230            yCategories = series.yaxis.options.mode == "categories";
4231        
4232        if (!(xCategories || yCategories))
4233            return;
4234
4235        var format = datapoints.format;
4236
4237        if (!format) {
4238            // FIXME: auto-detection should really not be defined here
4239            var s = series;
4240            format = [];
4241            format.push({ x: true, number: true, required: true });
4242            format.push({ y: true, number: true, required: true });
4243
4244            if (s.bars.show || (s.lines.show && s.lines.fill)) {
4245                var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));
4246                format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });
4247                if (s.bars.horizontal) {
4248                    delete format[format.length - 1].y;
4249                    format[format.length - 1].x = true;
4250                }
4251            }
4252            
4253            datapoints.format = format;
4254        }
4255
4256        for (var m = 0; m < format.length; ++m) {
4257            if (format[m].x && xCategories)
4258                format[m].number = false;
4259            
4260            if (format[m].y && yCategories)
4261                format[m].number = false;
4262        }
4263    }
4264
4265    function getNextIndex(categories) {
4266        var index = -1;
4267        
4268        for (var v in categories)
4269            if (categories[v] > index)
4270                index = categories[v];
4271
4272        return index + 1;
4273    }
4274
4275    function categoriesTickGenerator(axis) {
4276        var res = [];
4277        for (var label in axis.categories) {
4278            var v = axis.categories[label];
4279            if (v >= axis.min && v <= axis.max)
4280                res.push([v, label]);
4281        }
4282
4283        res.sort(function (a, b) { return a[0] - b[0]; });
4284
4285        return res;
4286    }
4287    
4288    function setupCategoriesForAxis(series, axis, datapoints) {
4289        if (series[axis].options.mode != "categories")
4290            return;
4291        
4292        if (!series[axis].categories) {
4293            // parse options
4294            var c = {}, o = series[axis].options.categories || {};
4295            if ($.isArray(o)) {
4296                for (var i = 0; i < o.length; ++i)
4297                    c[o[i]] = i;
4298            }
4299            else {
4300                for (var v in o)
4301                    c[v] = o[v];
4302            }
4303            
4304            series[axis].categories = c;
4305        }
4306
4307        // fix ticks
4308        if (!series[axis].options.ticks)
4309            series[axis].options.ticks = categoriesTickGenerator;
4310
4311        transformPointsOnAxis(datapoints, axis, series[axis].categories);
4312    }
4313    
4314    function transformPointsOnAxis(datapoints, axis, categories) {
4315        // go through the points, transforming them
4316        var points = datapoints.points,
4317            ps = datapoints.pointsize,
4318            format = datapoints.format,
4319            formatColumn = axis.charAt(0),
4320            index = getNextIndex(categories);
4321
4322        for (var i = 0; i < points.length; i += ps) {
4323            if (points[i] == null)
4324                continue;
4325            
4326            for (var m = 0; m < ps; ++m) {
4327                var val = points[i + m];
4328
4329                if (val == null || !format[m][formatColumn])
4330                    continue;
4331
4332                if (!(val in categories)) {
4333                    categories[val] = index;
4334                    ++index;
4335                }
4336                
4337                points[i + m] = categories[val];
4338            }
4339        }
4340    }
4341
4342    function processDatapoints(plot, series, datapoints) {
4343        setupCategoriesForAxis(series, "xaxis", datapoints);
4344        setupCategoriesForAxis(series, "yaxis", datapoints);
4345    }
4346
4347    function init(plot) {
4348        plot.hooks.processRawData.push(processRawData);
4349        plot.hooks.processDatapoints.push(processDatapoints);
4350    }
4351    
4352    $.plot.plugins.push({
4353        init: init,
4354        options: options,
4355        name: 'categories',
4356        version: '1.0'
4357    });
vendor: 7,382 bytes, lines 4358-4604
4358})(jQuery);
4359
4360/* Flot plugin for rendering pie charts.
4361
4362Copyright (c) 2007-2014 IOLA and Ole Laursen.
4363Licensed under the MIT license.
4364
4365The plugin assumes that each series has a single data value, and that each
4366value is a positive integer or zero.  Negative numbers don't make sense for a
4367pie chart, and have unpredictable results.  The values do NOT need to be
4368passed in as percentages; the plugin will calculate the total and per-slice
4369percentages internally.
4370
4371* Created by Brian Medendorp
4372
4373* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
4374
4375The plugin supports these options:
4376
4377	series: {
4378		pie: {
4379			show: true/false
4380			radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
4381			innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
4382			startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
4383			tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
4384			offset: {
4385				top: integer value to move the pie up or down
4386				left: integer value to move the pie left or right, or 'auto'
4387			},
4388			stroke: {
4389				color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
4390				width: integer pixel width of the stroke
4391			},
4392			label: {
4393				show: true/false, or 'auto'
4394				formatter:  a user-defined function that modifies the text/style of the label text
4395				radius: 0-1 for percentage of fullsize, or a specified pixel length
4396				background: {
4397					color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
4398					opacity: 0-1
4399				},
4400				threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
4401			},
4402			combine: {
4403				threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
4404				color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
4405				label: any text value of what the combined slice should be labeled
4406			}
4407			highlight: {
4408				opacity: 0-1
4409			}
4410		}
4411	}
4412
4413More detail and specific examples can be found in the included HTML file.
4414
4415*/
4416
4417(function($) {
4418
4419	// Maximum redraw attempts when fitting labels within the plot
4420
4421	var REDRAW_ATTEMPTS = 10;
4422
4423	// Factor by which to shrink the pie when fitting labels within the plot
4424
4425	var REDRAW_SHRINK = 0.95;
4426
4427	function init(plot) {
4428
4429		var canvas = null,
4430			target = null,
4431			options = null,
4432			maxRadius = null,
4433			centerLeft = null,
4434			centerTop = null,
4435			processed = false,
4436			ctx = null;
4437
4438		// interactive variables
4439
4440		var highlights = [];
4441
4442		// add hook to determine if pie plugin in enabled, and then perform necessary operations
4443
4444		plot.hooks.processOptions.push(function(plot, options) {
4445			if (options.series.pie.show) {
4446
4447				options.grid.show = false;
4448
4449				// set labels.show
4450
4451				if (options.series.pie.label.show == "auto") {
4452					if (options.legend.show) {
4453						options.series.pie.label.show = false;
4454					} else {
4455						options.series.pie.label.show = true;
4456					}
4457				}
4458
4459				// set radius
4460
4461				if (options.series.pie.radius == "auto") {
4462					if (options.series.pie.label.show) {
4463						options.series.pie.radius = 3/4;
4464					} else {
4465						options.series.pie.radius = 1;
4466					}
4467				}
4468
4469				// ensure sane tilt
4470
4471				if (options.series.pie.tilt > 1) {
4472					options.series.pie.tilt = 1;
4473				} else if (options.series.pie.tilt < 0) {
4474					options.series.pie.tilt = 0;
4475				}
4476			}
4477		});
4478
4479		plot.hooks.bindEvents.push(function(plot, eventHolder) {
4480			var options = plot.getOptions();
4481			if (options.series.pie.show) {
4482				if (options.grid.hoverable) {
4483					eventHolder.unbind("mousemove").mousemove(onMouseMove);
4484				}
4485				if (options.grid.clickable) {
4486					eventHolder.unbind("click").click(onClick);
4487				}
4488			}
4489		});
4490
4491		plot.hooks.processDatapoints.push(function(plot, series, data, datapoints) {
4492			var options = plot.getOptions();
4493			if (options.series.pie.show) {
4494				processDatapoints(plot, series, data, datapoints);
4495			}
4496		});
4497
4498		plot.hooks.drawOverlay.push(function(plot, octx) {
4499			var options = plot.getOptions();
4500			if (options.series.pie.show) {
4501				drawOverlay(plot, octx);
4502			}
4503		});
4504
4505		plot.hooks.draw.push(function(plot, newCtx) {
4506			var options = plot.getOptions();
4507			if (options.series.pie.show) {
4508				draw(plot, newCtx);
4509			}
4510		});
4511
4512		function processDatapoints(plot, series, datapoints) {
4513			if (!processed)	{
4514				processed = true;
4515				canvas = plot.getCanvas();
4516				target = $(canvas).parent();
4517				options = plot.getOptions();
4518				plot.setData(combine(plot.getData()));
4519			}
4520		}
4521
4522		function combine(data) {
4523
4524			var total = 0,
4525				combined = 0,
4526				numCombined = 0,
4527				color = options.series.pie.combine.color,
4528				newdata = [];
4529
4530			// Fix up the raw data from Flot, ensuring the data is numeric
4531
4532			for (var i = 0; i < data.length; ++i) {
4533
4534				var value = data[i].data;
4535
4536				// If the data is an array, we'll assume that it's a standard
4537				// Flot x-y pair, and are concerned only with the second value.
4538
4539				// Note how we use the original array, rather than creating a
4540				// new one; this is more efficient and preserves any extra data
4541				// that the user may have stored in higher indexes.
4542
4543				if ($.isArray(value) && value.length == 1) {
4544    				value = value[0];
4545				}
4546
4547				if ($.isArray(value)) {
4548					// Equivalent to $.isNumeric() but compatible with jQuery < 1.7
4549					if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) {
4550						value[1] = +value[1];
4551					} else {
4552						value[1] = 0;
4553					}
4554				} else if (!isNaN(parseFloat(value)) && isFinite(value)) {
4555					value = [1, +value];
4556				} else {
4557					value = [1, 0];
4558				}
4559
4560				data[i].data = [value];
4561			}
4562
4563			// Sum up all the slices, so we can calculate percentages for each
4564
4565			for (var i = 0; i < data.length; ++i) {
4566				total += data[i].data[0][1];
4567			}
4568
4569			// Count the number of slices with percentages below the combine
4570			// threshold; if it turns out to be just one, we won't combine.
4571
4572			for (var i = 0; i < data.length; ++i) {
4573				var value = data[i].data[0][1];
4574				if (value / total <= options.series.pie.combine.threshold) {
4575					combined += value;
4576					numCombined++;
4577					if (!color) {
4578						color = data[i].color;
4579					}
4580				}
4581			}
4582
4583			for (var i = 0; i < data.length; ++i) {
4584				var value = data[i].data[0][1];
4585				if (numCombined < 2 || value / total > options.series.pie.combine.threshold) {
4586					newdata.push(
4587						$.extend(data[i], {     /* extend to allow keeping all other original data values
4588						                           and using them e.g. in labelFormatter. */
4589							data: [[1, value]],
4590							color: data[i].color,
4591							label: data[i].label,
4592							angle: value * Math.PI * 2 / total,
4593							percent: value / (total / 100)
4594						})
4595					);
4596				}
4597			}
4598
4599			if (numCombined > 1) {
4600				newdata.push({
4601					data: [[1, combined]],
4602					color: color,
4603					label: options.series.pie.combine.label,
4604					angle: combined * Math.PI * 2 / total,
4605					percent: combined / (total / 100)
4606				});
4607			}
4608
4609			return newdata;
4610		}
4611
4612		function draw(plot, newCtx) {
4613
4614			if (!target) {
4615				return; // if no series were passed
4616			}
4617
4618			var canvasWidth = plot.getPlaceholder().width(),
4619				canvasHeight = plot.getPlaceholder().height(),
4620				legendWidth = target.children().filter(".legend").children().width() || 0;
4621
4622			ctx = newCtx;
4623
4624			// WARNING: HACK! REWRITE THIS CODE AS SOON AS POSSIBLE!
4625
4626			// When combining smaller slices into an 'other' slice, we need to
4627			// add a new series.  Since Flot gives plugins no way to modify the
4628			// list of series, the pie plugin uses a hack where the first call
4629			// to processDatapoints results in a call to setData with the new
4630			// list of series, then subsequent processDatapoints do nothing.
4631
4632			// The plugin-global 'processed' flag is used to control this hack;
4633			// it starts out false, and is set to true after the first call to
4634			// processDatapoints.
4635
4636			// Unfortunately this turns future setData calls into no-ops; they
4637			// call processDatapoints, the flag is true, and nothing happens.
4638
vendor: 14,920 bytes, lines 4639-5136
4639			// To fix this we'll set the flag back to false here in draw, when
4640			// all series have been processed, so the next sequence of calls to
4641			// processDatapoints once again starts out with a slice-combine.
4642			// This is really a hack; in 0.9 we need to give plugins a proper
4643			// way to modify series before any processing begins.
4644
4645			processed = false;
4646
4647			// calculate maximum radius and center point
4648
4649			maxRadius =  Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2;
4650			centerTop = canvasHeight / 2 + options.series.pie.offset.top;
4651			centerLeft = canvasWidth / 2;
4652
4653			if (options.series.pie.offset.left == "auto") {
4654				if (options.legend.position.match("w")) {
4655					centerLeft += legendWidth / 2;
4656				} else {
4657					centerLeft -= legendWidth / 2;
4658				}
4659				if (centerLeft < maxRadius) {
4660					centerLeft = maxRadius;
4661				} else if (centerLeft > canvasWidth - maxRadius) {
4662					centerLeft = canvasWidth - maxRadius;
4663				}
4664			} else {
4665				centerLeft += options.series.pie.offset.left;
4666			}
4667
4668			var slices = plot.getData(),
4669				attempts = 0;
4670
4671			// Keep shrinking the pie's radius until drawPie returns true,
4672			// indicating that all the labels fit, or we try too many times.
4673
4674			do {
4675				if (attempts > 0) {
4676					maxRadius *= REDRAW_SHRINK;
4677				}
4678				attempts += 1;
4679				clear();
4680				if (options.series.pie.tilt <= 0.8) {
4681					drawShadow();
4682				}
4683			} while (!drawPie() && attempts < REDRAW_ATTEMPTS)
4684
4685			if (attempts >= REDRAW_ATTEMPTS) {
4686				clear();
4687				target.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>");
4688			}
4689
4690			if (plot.setSeries && plot.insertLegend) {
4691				plot.setSeries(slices);
4692				plot.insertLegend();
4693			}
4694
4695			// we're actually done at this point, just defining internal functions at this point
4696
4697			function clear() {
4698				ctx.clearRect(0, 0, canvasWidth, canvasHeight);
4699				target.children().filter(".pieLabel, .pieLabelBackground").remove();
4700			}
4701
4702			function drawShadow() {
4703
4704				var shadowLeft = options.series.pie.shadow.left;
4705				var shadowTop = options.series.pie.shadow.top;
4706				var edge = 10;
4707				var alpha = options.series.pie.shadow.alpha;
4708				var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
4709
4710				if (radius >= canvasWidth / 2 - shadowLeft || radius * options.series.pie.tilt >= canvasHeight / 2 - shadowTop || radius <= edge) {
4711					return;	// shadow would be outside canvas, so don't draw it
4712				}
4713
4714				ctx.save();
4715				ctx.translate(shadowLeft,shadowTop);
4716				ctx.globalAlpha = alpha;
4717				ctx.fillStyle = "#000";
4718
4719				// center and rotate to starting position
4720
4721				ctx.translate(centerLeft,centerTop);
4722				ctx.scale(1, options.series.pie.tilt);
4723
4724				//radius -= edge;
4725
4726				for (var i = 1; i <= edge; i++) {
4727					ctx.beginPath();
4728					ctx.arc(0, 0, radius, 0, Math.PI * 2, false);
4729					ctx.fill();
4730					radius -= i;
4731				}
4732
4733				ctx.restore();
4734			}
4735
4736			function drawPie() {
4737
4738				var startAngle = Math.PI * options.series.pie.startAngle;
4739				var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
4740
4741				// center and rotate to starting position
4742
4743				ctx.save();
4744				ctx.translate(centerLeft,centerTop);
4745				ctx.scale(1, options.series.pie.tilt);
4746				//ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera
4747
4748				// draw slices
4749
4750				ctx.save();
4751				var currentAngle = startAngle;
4752				for (var i = 0; i < slices.length; ++i) {
4753					slices[i].startAngle = currentAngle;
4754					drawSlice(slices[i].angle, slices[i].color, true);
4755				}
4756				ctx.restore();
4757
4758				// draw slice outlines
4759
4760				if (options.series.pie.stroke.width > 0) {
4761					ctx.save();
4762					ctx.lineWidth = options.series.pie.stroke.width;
4763					currentAngle = startAngle;
4764					for (var i = 0; i < slices.length; ++i) {
4765						drawSlice(slices[i].angle, options.series.pie.stroke.color, false);
4766					}
4767					ctx.restore();
4768				}
4769
4770				// draw donut hole
4771
4772				drawDonutHole(ctx);
4773
4774				ctx.restore();
4775
4776				// Draw the labels, returning true if they fit within the plot
4777
4778				if (options.series.pie.label.show) {
4779					return drawLabels();
4780				} else return true;
4781
4782				function drawSlice(angle, color, fill) {
4783
4784					if (angle <= 0 || isNaN(angle)) {
4785						return;
4786					}
4787
4788					if (fill) {
4789						ctx.fillStyle = color;
4790					} else {
4791						ctx.strokeStyle = color;
4792						ctx.lineJoin = "round";
4793					}
4794
4795					ctx.beginPath();
4796					if (Math.abs(angle - Math.PI * 2) > 0.000000001) {
4797						ctx.moveTo(0, 0); // Center of the pie
4798					}
4799
4800					//ctx.arc(0, 0, radius, 0, angle, false); // This doesn't work properly in Opera
4801					ctx.arc(0, 0, radius,currentAngle, currentAngle + angle / 2, false);
4802					ctx.arc(0, 0, radius,currentAngle + angle / 2, currentAngle + angle, false);
4803					ctx.closePath();
4804					//ctx.rotate(angle); // This doesn't work properly in Opera
4805					currentAngle += angle;
4806
4807					if (fill) {
4808						ctx.fill();
4809					} else {
4810						ctx.stroke();
4811					}
4812				}
4813
4814				function drawLabels() {
4815
4816					var currentAngle = startAngle;
4817					var radius = options.series.pie.label.radius > 1 ? options.series.pie.label.radius : maxRadius * options.series.pie.label.radius;
4818
4819					for (var i = 0; i < slices.length; ++i) {
4820						if (slices[i].percent >= options.series.pie.label.threshold * 100) {
4821							if (!drawLabel(slices[i], currentAngle, i)) {
4822								return false;
4823							}
4824						}
4825						currentAngle += slices[i].angle;
4826					}
4827
4828					return true;
4829
4830					function drawLabel(slice, startAngle, index) {
4831
4832						if (slice.data[0][1] == 0) {
4833							return true;
4834						}
4835
4836						// format label text
4837
4838						var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter;
4839
4840						if (lf) {
4841							text = lf(slice.label, slice);
4842						} else {
4843							text = slice.label;
4844						}
4845
4846						if (plf) {
4847							text = plf(text, slice);
4848						}
4849
4850						var halfAngle = ((startAngle + slice.angle) + startAngle) / 2;
4851						var x = centerLeft + Math.round(Math.cos(halfAngle) * radius);
4852						var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt;
4853
4854						var html = "<span class='pieLabel' id='pieLabel" + index + "' style='position:absolute;top:" + y + "px;left:" + x + "px;'>" + text + "</span>";
4855						target.append(html);
4856
4857						var label = target.children("#pieLabel" + index);
4858						var labelTop = (y - label.height() / 2);
4859						var labelLeft = (x - label.width() / 2);
4860
4861						label.css("top", labelTop);
4862						label.css("left", labelLeft);
4863
4864						// check to make sure that the label is not outside the canvas
4865
4866						if (0 - labelTop > 0 || 0 - labelLeft > 0 || canvasHeight - (labelTop + label.height()) < 0 || canvasWidth - (labelLeft + label.width()) < 0) {
4867							return false;
4868						}
4869
4870						if (options.series.pie.label.background.opacity != 0) {
4871
4872							// put in the transparent background separately to avoid blended labels and label boxes
4873
4874							var c = options.series.pie.label.background.color;
4875
4876							if (c == null) {
4877								c = slice.color;
4878							}
4879
4880							var pos = "top:" + labelTop + "px;left:" + labelLeft + "px;";
4881							$("<div class='pieLabelBackground' style='position:absolute;width:" + label.width() + "px;height:" + label.height() + "px;" + pos + "background-color:" + c + ";'></div>")
4882								.css("opacity", options.series.pie.label.background.opacity)
4883								.insertBefore(label);
4884						}
4885
4886						return true;
4887					} // end individual label function
4888				} // end drawLabels function
4889			} // end drawPie function
4890		} // end draw function
4891
4892		// Placed here because it needs to be accessed from multiple locations
4893
4894		function drawDonutHole(layer) {
4895			if (options.series.pie.innerRadius > 0) {
4896
4897				// subtract the center
4898
4899				layer.save();
4900				var innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius;
4901				layer.globalCompositeOperation = "destination-out"; // this does not work with excanvas, but it will fall back to using the stroke color
4902				layer.beginPath();
4903				layer.fillStyle = options.series.pie.stroke.color;
4904				layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
4905				layer.fill();
4906				layer.closePath();
4907				layer.restore();
4908
4909				// add inner stroke
4910
4911				layer.save();
4912				layer.beginPath();
4913				layer.strokeStyle = options.series.pie.stroke.color;
4914				layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
4915				layer.stroke();
4916				layer.closePath();
4917				layer.restore();
4918
4919				// TODO: add extra shadow inside hole (with a mask) if the pie is tilted.
4920			}
4921		}
4922
4923		//-- Additional Interactive related functions --
4924
4925		function isPointInPoly(poly, pt) {
4926			for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)
4927				((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1]))
4928				&& (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0])
4929				&& (c = !c);
4930			return c;
4931		}
4932
4933		function findNearbySlice(mouseX, mouseY) {
4934
4935			var slices = plot.getData(),
4936				options = plot.getOptions(),
4937				radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius,
4938				x, y;
4939
4940			for (var i = 0; i < slices.length; ++i) {
4941
4942				var s = slices[i];
4943
4944				if (s.pie.show) {
4945
4946					ctx.save();
4947					ctx.beginPath();
4948					ctx.moveTo(0, 0); // Center of the pie
4949					//ctx.scale(1, options.series.pie.tilt);	// this actually seems to break everything when here.
4950					ctx.arc(0, 0, radius, s.startAngle, s.startAngle + s.angle / 2, false);
4951					ctx.arc(0, 0, radius, s.startAngle + s.angle / 2, s.startAngle + s.angle, false);
4952					ctx.closePath();
4953					x = mouseX - centerLeft;
4954					y = mouseY - centerTop;
4955
4956					if (ctx.isPointInPath) {
4957						if (ctx.isPointInPath(mouseX - centerLeft, mouseY - centerTop)) {
4958							ctx.restore();
4959							return {
4960								datapoint: [s.percent, s.data],
4961								dataIndex: 0,
4962								series: s,
4963								seriesIndex: i
4964							};
4965						}
4966					} else {
4967
4968						// excanvas for IE doesn;t support isPointInPath, this is a workaround.
4969
4970						var p1X = radius * Math.cos(s.startAngle),
4971							p1Y = radius * Math.sin(s.startAngle),
4972							p2X = radius * Math.cos(s.startAngle + s.angle / 4),
4973							p2Y = radius * Math.sin(s.startAngle + s.angle / 4),
4974							p3X = radius * Math.cos(s.startAngle + s.angle / 2),
4975							p3Y = radius * Math.sin(s.startAngle + s.angle / 2),
4976							p4X = radius * Math.cos(s.startAngle + s.angle / 1.5),
4977							p4Y = radius * Math.sin(s.startAngle + s.angle / 1.5),
4978							p5X = radius * Math.cos(s.startAngle + s.angle),
4979							p5Y = radius * Math.sin(s.startAngle + s.angle),
4980							arrPoly = [[0, 0], [p1X, p1Y], [p2X, p2Y], [p3X, p3Y], [p4X, p4Y], [p5X, p5Y]],
4981							arrPoint = [x, y];
4982
4983						// TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt?
4984
4985						if (isPointInPoly(arrPoly, arrPoint)) {
4986							ctx.restore();
4987							return {
4988								datapoint: [s.percent, s.data],
4989								dataIndex: 0,
4990								series: s,
4991								seriesIndex: i
4992							};
4993						}
4994					}
4995
4996					ctx.restore();
4997				}
4998			}
4999
5000			return null;
5001		}
5002
5003		function onMouseMove(e) {
5004			triggerClickHoverEvent("plothover", e);
5005		}
5006
5007		function onClick(e) {
5008			triggerClickHoverEvent("plotclick", e);
5009		}
5010
5011		// trigger click or hover event (they send the same parameters so we share their code)
5012
5013		function triggerClickHoverEvent(eventname, e) {
5014
5015			var offset = plot.offset();
5016			var canvasX = parseInt(e.pageX - offset.left);
5017			var canvasY =  parseInt(e.pageY - offset.top);
5018			var item = findNearbySlice(canvasX, canvasY);
5019
5020			if (options.grid.autoHighlight) {
5021
5022				// clear auto-highlights
5023
5024				for (var i = 0; i < highlights.length; ++i) {
5025					var h = highlights[i];
5026					if (h.auto == eventname && !(item && h.series == item.series)) {
5027						unhighlight(h.series);
5028					}
5029				}
5030			}
5031
5032			// highlight the slice
5033
5034			if (item) {
5035				highlight(item.series, eventname);
5036			}
5037
5038			// trigger any hover bind events
5039
5040			var pos = { pageX: e.pageX, pageY: e.pageY };
5041			target.trigger(eventname, [pos, item]);
5042		}
5043
5044		function highlight(s, auto) {
5045			//if (typeof s == "number") {
5046			//	s = series[s];
5047			//}
5048
5049			var i = indexOfHighlight(s);
5050
5051			if (i == -1) {
5052				highlights.push({ series: s, auto: auto });
5053				plot.triggerRedrawOverlay();
5054			} else if (!auto) {
5055				highlights[i].auto = false;
5056			}
5057		}
5058
5059		function unhighlight(s) {
5060			if (s == null) {
5061				highlights = [];
5062				plot.triggerRedrawOverlay();
5063			}
5064
5065			//if (typeof s == "number") {
5066			//	s = series[s];
5067			//}
5068
5069			var i = indexOfHighlight(s);
5070
5071			if (i != -1) {
5072				highlights.splice(i, 1);
5073				plot.triggerRedrawOverlay();
5074			}
5075		}
5076
5077		function indexOfHighlight(s) {
5078			for (var i = 0; i < highlights.length; ++i) {
5079				var h = highlights[i];
5080				if (h.series == s)
5081					return i;
5082			}
5083			return -1;
5084		}
5085
5086		function drawOverlay(plot, octx) {
5087
5088			var options = plot.getOptions();
5089
5090			var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
5091
5092			octx.save();
5093			octx.translate(centerLeft, centerTop);
5094			octx.scale(1, options.series.pie.tilt);
5095
5096			for (var i = 0; i < highlights.length; ++i) {
5097				drawHighlight(highlights[i].series);
5098			}
5099
5100			drawDonutHole(octx);
5101
5102			octx.restore();
5103
5104			function drawHighlight(series) {
5105
5106				if (series.angle <= 0 || isNaN(series.angle)) {
5107					return;
5108				}
5109
5110				//octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();
5111				octx.fillStyle = "rgba(255, 255, 255, " + options.series.pie.highlight.opacity + ")"; // this is temporary until we have access to parseColor
5112				octx.beginPath();
5113				if (Math.abs(series.angle - Math.PI * 2) > 0.000000001) {
5114					octx.moveTo(0, 0); // Center of the pie
5115				}
5116				octx.arc(0, 0, radius, series.startAngle, series.startAngle + series.angle / 2, false);
5117				octx.arc(0, 0, radius, series.startAngle + series.angle / 2, series.startAngle + series.angle, false);
5118				octx.closePath();
5119				octx.fill();
5120			}
5121		}
5122	} // end init (plugin body)
5123
5124	// define pie specific options and their default values
5125
5126	var options = {
5127		series: {
5128			pie: {
5129				show: false,
5130				radius: "auto",	// actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)
5131				innerRadius: 0, /* for donut */
5132				startAngle: 3/2,
5133				tilt: 1,
5134				shadow: {
5135					left: 5,	// shadow left offset
5136					top: 15,	// shadow top offset
5137					alpha: 0.02	// shadow alpha
5138				},
5139				offset: {
5140					top: 0,
5141					left: "auto"
5142				},
5143				stroke: {
5144					color: "#fff",
5145					width: 1
5146				},
5147				label: {
5148					show: "auto",
5149					formatter: function(label, slice) {
5150						return "<div style='font-size:x-small;text-align:center;padding:2px;color:" + slice.color + ";'>" + label + "<br/>" + Math.round(slice.percent) + "%</div>";
5151					},	// formatter function
5152					radius: 1,	// radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value)
5153					background: {
5154						color: null,
5155						opacity: 0
5156					},
5157					threshold: 0	// percentage at which to hide the label (i.e. the slice is too narrow)
5158				},
5159				combine: {
5160					threshold: -1,	// percentage at which to combine little slices into one larger slice
5161					color: null,	// color to give the new slice (auto-generated if null)
5162					label: "Other"	// label to give the new slice
5163				},
5164				highlight: {
5165					//color: "#fff",		// will add this functionality once parseColor is available
5166					opacity: 0.5
5167				}
5168			}
5169		}
5170	};
5171
5172	$.plot.plugins.push({
5173		init: init,
5174		options: options,
5175		name: "pie",
5176		version: "1.1"
5177	});
5178
5179})(jQuery);
5180
5181$(document).ready(function() {
5182
5183  $('.Form_newsletterSubscribe,' +
5184    '.PageArticle .FormRegisterNG,' +
5185    '.StageNewsletterSimple,' +
5186    '.PageRegister,' +
5187    '.StagePremiumPaywall'
5188  ).on('click', '.FormNLOptinPopup_open', function(e) {
5189    var parent = e.delegateTarget;
5190    $('.FormNLOptinPopup, .FormNLOptinPopup_overlay', parent).fadeIn();
5191
5192    $('input', parent).each(function() {
5193      if ($(this).attr('name') === 'i_email') {
5194        var user_email = $(this).val();
5195        if (user_email !== '' && user_email !== undefined) {
5196          var icon = "<i class=\"fas fa-envelope\"></i>";
5197          $('.FormNLOptinPopup_email', parent).html(icon + user_email);
5198        }
5199      }
5200    });
5201
5202    $('.FormNLOptinPopup_close-icon,' +
5203      '.FormNLOptinPopup_cancel,' +
5204      '.FormNLOptinPopup_overlay', parent).on('click', function(e) {
5205      $('.FormNLOptinPopup, .FormNLOptinPopup_overlay', parent).fadeOut();
5206    });
5207
5208  });
5209
5210});
5211
5212document.addEventListener("DOMContentLoaded", function(event) {
5213  element = document.querySelectorAll('.EventIndexTerms-icon, .EventsThemen-icon, .EventDetailItem-icon');
5214
5215  for (let i = 0; i < element.length; i++) {
5216    element[i].addEventListener("click", function(e){
5217      e.preventDefault();
5218      window.open(e.target.dataset.eventsUrl); // ,'_blank');
5219    });
5220  }
5221
5222});
5223!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:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').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("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").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('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').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.o
vendor: 3,442 bytes, line 5223
5223ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.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(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.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.
5223slick",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(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.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<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-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:
5223parseInt(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&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.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"}
5223,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}
vendor: 5,619 bytes, line 5223
5223,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.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=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={};
5223!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}
5223):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-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.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;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.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+
5223o: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","")}
5223,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<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});
5224
5225
5226/* Event-Listener Adition iframe */
5227window.addEventListener('message',function(event) {
5228  const origin = window.location.origin;
5229  if(event.origin !== origin) return;
5230
5231  let currentUrl = window.location.href;
5232
5233  let be_domainsInsertAdvTextDiv = [
5234    'iz.de',
5235    'handelextra.pl',
5236    'how-green-works.de',
5237    'foodservice24.pl',
5238    'horizont.net',
5239    'mmponline.pl',
5240    'lebensmittelzeitung.net',
5241    'tw-media.com',
5242    'pebbles.dfv-is.de',
5243    'fibers-in-process.de',
5244    'umweltwirtschaft.com',
5245    'wwt-online.de',
5246    'changement-magazin.de',
5247    'zoe-online.org'
5248  ];
5249
5250  let be_domainsAddSliderControl = ['ahgz.at', 'lebensmittelzeitung.net'];
5251
5252  let be_domainsContainerClass = {
5253    'default': 'PageFrame',
5254    'the-spin-off.com' : 'container',
5255    'horizont.net' : 'SiteHeader',
5256    'dfv-is.de' : 'SiteHeader',
5257    'fibers-in-process.de' : 'SiteHeader',
5258    'umweltwirtschaft.com' : 'SiteHeader',
5259    'wwt-online.de' : 'SiteHeader',
5260    'changement-magazin.de' : 'SiteHeader',
5261    'zoe-online.org' : 'SiteHeader'
5262  };
5263
5264  let be_domainsWideLayout = [
5265    'horizont.net',
5266    'mmponline.pl',
5267    'dfv-is.de',
5268    'fibers-in-process.de',
5269    'umweltwirtschaft.com',
5270    'wwt-online.de',
5271    'changement-magazin.de',
5272    'zoe-online.org'
5273  ];
5274
5275  function be_isDomainInUrl(domainsArray, currentUrl) {
5276    return domainsArray.some(domain => currentUrl.includes(domain));
5277  }
5278
5279  let wideLayout = false;
5280  if (be_isDomainInUrl(be_domainsWideLayout, currentUrl)) {
5281    wideLayout = true;
5282  }
5283
5284  let be_containerClass;
5285  const matchingKey = Object.keys(be_domainsContainerClass).find(key => currentUrl.includes(key));
5286
5287  if (matchingKey) {
5288    be_containerClass = be_domainsContainerClass[matchingKey];
5289  } else {
5290    be_containerClass = be_domainsContainerClass['default'];
5291  }
5292
5293  switch(event.data) {
5294    case 'text_ad': $(document).trigger('textAd');
5295      break;
5296    case 'teadsResize':
5297      $(document).trigger('teadsResize');
5298      break;
5299    case 'parallax':
5300      if (be_isDomainInUrl(be_domainsInsertAdvTextDiv, currentUrl)) {
5301        $(document).trigger('insertAdvTextDiv');
5302      }
5303      $(document).trigger('parallax');
5304      break;
5305    case 'bannerinit':
5306      $(document).trigger('sticky_initialize');
5307      $(document).trigger('resizeIframe');
5308      $(document).trigger('advertOnImage');
5309      $(document).trigger('clsAlignSuperbanner');
5310      $(document).trigger('clsAlignBillboard');
5311      $(document).trigger('BillboardHeight');
5312      $(document).trigger('alignSkyscraperLeft');
5313      if (be_isDomainInUrl(be_domainsAddSliderControl,currentUrl)) {
5314        $(document).trigger('adSliderControl');
5315      }
5316      if (be_isDomainInUrl(be_domainsInsertAdvTextDiv, currentUrl)) {
5317        $(document).trigger('insertAdvTextDiv');
5318      }
5319      break;
5320    case 'singlebanner':
5321      $(document).trigger('sticky_initialize');
5322      $(document).trigger('resizeIframe');
5323      $(document).trigger('clsAlignSuperbanner');
5324      $(document).trigger('clsAlignBillboard');
5325      break;
5326    case 'halfpage':
5327      $(document).trigger('halfpage', [be_containerClass]);
5328      break;
5329    case 'floorAd':
5330      $(document).trigger('floorAd');
5331      $(document).trigger('resizeIframe');
5332      break;
5333    case 'html5floorAd':
5334      $(document).trigger('html5floorAd');
5335      $(document).trigger('resizeIframe');
5336      break;
5337    case 'HTML5sitebar':
5338      $(document).trigger('html5sitebar');
5339      break;
5340    case 'layerAd':
5341      $(document).trigger('layerAd');
5342      $(document).trigger('resizeIframe');
5343      break;
5344    case 'bridgeAd':
5345      $(document).trigger('bridgeAd');
5346      break;
5347    case 'bridgeAdSticky':
5348      $(document).trigger('bridgeAdSticky');
5349      $(document).trigger('billboardSticky');
5350      break;
5351    case 'fullWidthBillboard':
5352      $(document).trigger('fullWidthBillboard');
5353      $(document).trigger('resizeIframe');
5354      break;
5355    case 'exitintent':
5356      $(document).trigger('exitintent');
5357      break;
5358    case 'background':
5359      $(document).trigger('changeBackgroundColor');
5360      break;
5361    case 'backgroundclick':
5362      $(document).trigger('isBackgroundClick');
5363      break;
5364    case 'counterAd':
5365      $(document).trigger('counterAd');
5366      break;
5367    case 'centerFrame': $(document).trigger('centerIframe');
5368      break;
5369    case 'blockadvertisement':
5370      $(document).trigger('blockadvertisement');
5371      break;
5372    case 'wallpapercolor':
5373      $(document).trigger('wallpapercolor');
5374      break;
5375    case 'sitebar':
5376    case 'sitebarHTML5':
5377      $(document).trigger('sitebar', [wideLayout]);
5378      break;
5379    case 'sitebar-switch':
5380      $(document).trigger('sitebar-switch', [be_domainsContainerClass, wideLayout]);
5381      $(document).trigger('resizeIframe');
5382      break;
5383    case 'sitebarLeft':
5384      $(document).trigger('sitebarLeft', [wideLayout]);
5385      break;
5386    case 'pushdown':
5387    case 'pushdown2':
5388    case 'pushdown3':
5389    case 'pushdown4':
5390    case 'pushdown5':
5391    case 'pushdown6':
5392    case 'pushdown7':
5393      const elementclass = event.data;
5394      $(document).trigger('pushdown', [elementclass]);
5395      break;
5396    case 'parallax_outstream':
5397      $(document).trigger('parallax_outstream');
5398      break;
5399    case 'dynamic_sitebar':
5400      $(document).trigger('dynamic_sitebar');
5401      break;
5402    case 'billboardSticky':
5403      $(document).trigger('billboardSticky');
5404      break;
5405    case 'dfvSolutionAd':
5406      $(document).trigger('dfvSolutionAd');
5407      break;
5408    case 'welcomeVideo':
5409      $(document).trigger('resizeIframe');
5410      $(document).trigger('welcomeAdVideo');  break;
5411    case 'welcomeVideoMobil':
5412      $(document).trigger('resizeIframe');
5413      $(document).trigger('welcomeAdVideoMobil');  break;
5414    case 'welcomeImage':
5415      $(document).trigger('resizeIframe');
5416      $(document).trigger('welcomeAdImage');  break;
5417    case 'welcomeImageMobil':
5418      $(document).trigger('resizeIframe');
5419      $(document).trigger('welcomeAdImageMobil');  break;
5420    case 'understitial':
5421      $(document).trigger('understitial');
5422      break;
5423    case 'bbreminder':
5424      $(document).trigger('resizeIframe');
5425      $(document).trigger('bbReminder');
5426      break;
5427    case 'fadeoutadvertisement':
5428      $(document).trigger('fadeoutadvertisement');
5429      break;
5430    default:
5431      return;
5432  }
5433
5434},false);
5435
5436/**
5437 *  billboardHeight
5438 *  billboard pushdown - margin bottom / overflow hidden
5439 */
5440$(document).one('billboardHeight', function() {
5441  const slots = document.querySelectorAll('#renderSlot_Billboard, #renderSlot_Mobil-Billboard');
5442
5443  slots.forEach(slot => {
5444    let banner_div = slot.querySelector('div');
5445    if (banner_div) {
5446      const checkStyleInterval = setInterval(() => {
5447        if (banner_div.getAttribute('style')) {
5448          banner_div.style.marginBottom = '20px';
5449          if (slot.offsetHeight < 290) { /* CLS */
5450            slot.style.marginBottom = '20px';
5451          }
5452          slot.style.overflow = 'hidden';
5453          clearInterval(checkStyleInterval);
5454        }
5455      }, 100);
5456    } else {
5457      const observer = new MutationObserver((mutationsList, observer) => {
5458        mutationsList.forEach(mutation => {
5459          if (mutation.type === 'childList') {
5460            banner_div = slot.querySelector('div');
5461            if (banner_div) {
5462              const checkStyleInterval = setInterval(() => {
5463                if (banner_div.getAttribute('style')) {
5464                  banner_div.style.marginBottom = '20px';
5465                  if (slot.offsetHeight < 290) { /* CLS */
5466                    slot.style.marginBottom = '20px';
5467                  }
5468                  slot.style.overflow = 'hidden';
5469                  clearInterval(checkStyleInterval);
5470                }
5471              }, 100);
5472              observer.disconnect();
5473            }
5474          }
5475        });
5476      });
5477      observer.observe(slot, { childList: true, subtree: true });
5478    }
5479  });
5480});
5481
5482/**
5483 *  billboardSticky
5484 */
5485$(document).on('billboardSticky', function(){
5486  const slot = $('#renderSlot_Billboard, #renderSlot_Mobil-Billboard');
5487  const billboardAdIframe = $('.billboardSticky');
5488  const stickyHeaderHeight = $('.SiteHeaderSticky').height();
5489
5490  const billboardPositionTop = slot.offset().top;
5491  const billboardMarginTop = parseFloat(billboardAdIframe.parent().css('margin-top'));
5492  let billboardStickyOffsetTop = stickyHeaderHeight + 5;
5493  let sTimer = 0;
5494  if (Math.sign(billboardMarginTop) === -1) {
5495    billboardStickyOffsetTop = billboardStickyOffsetTop + Math.abs(billboardMarginTop);
5496  } else {
5497    billboardStickyOffsetTop = billboardStickyOffsetTop - Math.abs(billboardMarginTop);
5498  }
5499
5500  const bId = String(billboardAdIframe.data('bannerid'));
5501  const lsKey = 'stickyBillboard_' + bId;
5502  const lsValue = localStorage.getItem(lsKey);
5503
5504  if (lsValue !== null) {
5505    const expireDate = JSON.parse(lsValue).expireAt;
5506    if (expireDate < new Date().getTime()) {
5507      localStorage.removeItem(lsKey);
5508    } else {
5509      return false;
5510    }
5511  }
5512
5513  if ($('.PageFrame').height() > 2000) {
5514    $(window).scroll(function () {
5515      if ($(window).scrollTop() > billboardPositionTop) {
5516        if (localStorage.getItem(lsKey) === null && !sTimer && !slot.hasClass('isStickyBillboard')) {
5517          slot.css({top: billboardStickyOffsetTop + 'px'});
5518          slot.addClass('isStickyBillboard');
5519
5520          sTimer = setTimeout(function () {
5521            slot.css({'zIndex': 998});
5522            slot.animate({'top': -600}, 3000, function () {
5523            });
5524            sTimer = 0;
5525            const expireAt = new Date(new Date().getTime() + (60000 * 1440)).getTime();
5526            localStorage.setItem(lsKey, JSON.stringify({expireAt: expireAt}));
5527          }, 2000);
5528        }
5529      } else {
5530        if (sTimer) {
5531          clearTimeout(sTimer);
5532          sTimer = 0;
5533        }
5534        slot.css({top: '0px'});
5535        slot.removeClass('isStickyBillboard');
5536      }
5537    });
5538  }
5539});
5540
5541/**
5542 *  parallax
5543 */
5544$(document).on("parallax", function(event){
5545  'use strict';
5546  const htmlTag = document.getElementsByTagName('html')[0];
5547  const peephole = $(".parallax").parent().parent();
5548  const parallax_div = $(".parallax").parent();
5549  const parallax_iframe = $(".parallax");
5550
5551  const peephole_width = peephole.width();
5552  const peephole_height = peephole.height();
5553
5554  const bgcolor = parallax_iframe.data("bgcolor");
5555  const parallax_ratio = parallax_iframe.data("height") / parallax_iframe.data("width");
5556
5557  htmlTag.classList.add('Ad_setZindex'); /* Workaround für Safari < v15 */
5558
5559  let viewportHeight = window.innerHeight - $(".SiteHeaderSticky").outerHeight(true);
5560  if (window.innerWidth < 768) {
5561    viewportHeight = window.innerHeight;
5562  }
5563  if (parallax_iframe.data("width") >= parallax_div.width()){
5564    parallax_iframe.height( parallax_div.width() * parallax_ratio);
5565  }
5566
5567  let ad_top = parseInt(viewportHeight - parallax_iframe.height()) / 2;
5568  const parallax_height_diff = Math.abs(viewportHeight - parallax_iframe.height()) * parallax_ratio;
5569  const parallax_width_diff = Math.floor(parallax_height_diff);
5570
5571  if ((parallax_iframe.data("height") >= viewportHeight) || (ad_top < parseInt($(".SiteHeaderSticky").outerHeight(true)))) {
5572    ad_top = $(".SiteHeaderSticky").outerHeight(true) +"px";
5573  }
5574
5575  peephole.height(viewportHeight);
5576  peephole.css("position","relative");
5577  peephole.prepend('<span class=\"Ad_parallax-borderTop\" style=\"width: ' + peephole_width + 'px;\"></span>'); /*Chrome-Render-Fix*/
5578
5579  parallax_div.css('width', peephole_width + 'px');
5580  parallax_div.css("height",viewportHeight);
5581  if (bgcolor) {
5582    parallax_div.css("background-color", bgcolor);
5583  }
5584  parallax_div.addClass('Ad_parallax-innerWrapper');
5585  parallax_div.css('margin', '0 auto');
5586  parallax_iframe.height(viewportHeight);
5587  const parallax_width = parallax_div.height() / parallax_ratio;
5588
5589  if ((peephole_height > viewportHeight) && (window.innerWidth < 768)) {
5590    parallax_iframe.width(parallax_width-parallax_width_diff);
5591  } else {
5592    parallax_iframe.width(parallax_width);
5593  }
5594
5595  if (parallax_width > peephole_width) {
5596    parallax_iframe.width(peephole_width);
5597  }
5598
5599  if (parallax_div.width() - parallax_iframe.width() > 48 ){
5600    parallax_iframe.css("margin-left", ((parallax_div.width() - parallax_iframe.width()) / 2) + "px");
5601  } else {
5602    parallax_iframe.css("margin-left", "0px");
5603  }
5604  parallax_iframe.css("position","fixed");
5605  parallax_iframe.css("bottom",ad_top);
5606  parallax_iframe.css("top",ad_top);
5607
5608});
5609
5610/**
5611 *  textAd
5612 */
5613$(document).one("textAd", function(event){
5614  /* Finde alle iframes mit der class .textAd */
5615  const $iframes = $("iframe.textAd");
5616
5617  /* Resize the iframes when the window is resized */
5618  $( window ).resize( function() {
5619    $iframes.each( function() {
5620      if ($(this).data("width") >= $(this).width()) {
5621        $(this).height( $(this).data("height") + 20 + (($(this).data("width")-$(this).width())/2));
5622      }
5623    });
5624    /* Resize to fix all iframes on page load. */
5625  }).resize();
5626});
5627
5628/**
5629 *  resizeIframe
5630 */
5631$(document).one("resizeIframe", function(event){
5632  /* Finde alle iframes mit der class .responsiveFrame */
5633  const $iframes = $("iframe.responsiveFrame");
5634
5635  /* Find and save the aspect ratio for all iframes */
5636  $iframes.each(function () {
5637    $( this ).data( "ratio", $(this).data("height") / $(this).data("width") );
5638    let slot = $(this).parent().parent();
5639    if (slot.parent().length && slot.parent().hasClass() ){
5640      if (slot.parent().attr('class').match(/slick-track/)) {
5641        /* SliderBannerArticleDetail_dots nur einblenden, wenn auch was geschaltet ist */
5642        $('.SliderBannerArticleDetail_dots').css('display','block');
5643      }
5644    }
5645  });
5646
5647  /* Resize the iframes when the window is resized */
5648  $( window ).resize( function() {
5649    $iframes.each( function() {
5650      if($(this).data("width") >= $(this).width()){
5651        $( this ).height( $(this).width() * $( this ).data( "ratio" ));
5652      }
5653    });
5654    /* Resize to fix all iframes on page load. */
5655  }).resize();
5656
5657});
5658
5659/**
5660 * adSliderControl
5661 */
5662$(document).one("adSliderControl", function(event) {
5663  /**
5664   *  Nur geschaltete Banner in Banner-Slider auf Artikelseite zeigen.
5665   *  Wenn es nur einen geschalteten Banner gibt, dann wird Auto-Slide deaktiviert
5666   *  und zum Slide mit dem Banner gesprungen. Sind beide Banner vorhanden,
5667   *  wird der Auto-Slide des Sliders wieder aktiviert.
5668   *
5669   *  Eine Umsetzung mit sowohl "unslick" als auch "slickRemove" funktionierte nicht,
5670   *  da dann alle Werbemittel nicht mehr sichtbar waren. Auch vornherein den Slider nur
5671   *  anzuwenden, wenn es mehr als einen Banner gibt, hatte nicht funktioniert, da das Banner-JS bereits
5672   *  verarbeitet war.
5673   */
5674  'use strict';
5675  const bannerSlider = '.SliderBannerArticleDetail';
5676  const bannerSliderDots = bannerSlider + '_dots';
5677  const slideSelectors = ['slick-slide00', 'slick-slide01'];
5678  const slideState = [];
5679
5680  $(bannerSliderDots).css('display', 'none');
5681  $(bannerSlider).slick('slickPause');
5682  $(bannerSlider).slick('slickGoTo', 0); /* Slider refreshen, damit Slides aufrufbar sind */
5683
5684  const waitForEl = function (slideSelectors, callback) {
5685    const startTimeInMs = Date.now();
5686
5687    for (let i = 0; i < slideSelectors.length; i++) {
5688      const selectorObj = document.getElementById(slideSelectors[i]);
5689      if (selectorObj && selectorObj.children.length && selectorObj.children[0].tagName === 'DIV') {
5690        slideState[i] = 1;
5691      } else {
5692        slideState[i] = 0;
5693      }
5694    }
5695
5696    if (slideState[0] === 1 && slideState[1] === 0) {
5697      $(bannerSlider).slick('slickGoTo', 0);
5698      callback();
5699      return;
5700    } else if (slideState[0] === 0 && slideState[1] === 1) {
5701      $(bannerSlider).slick('slickGoTo', 1);
5702      callback();
5703      return;
5704    } else if (slideState[0] === 1 && slideState[1] === 1) {
5705      $(bannerSlider).slick('slickPlay');
5706      $(bannerSliderDots + ' li').css('padding-left', '0');
5707      $(bannerSliderDots).css('display', 'block');
5708      callback();
5709      return;
5710    } else {
5711      setTimeout(function () {
5712        if (Date.now() - startTimeInMs > 10000) {
5713          /*Callback spätestens nach 10 Sekunden abbrechen */
5714          return;
5715        }
5716        waitForEl(slideSelectors, callback);
5717      }, 10);
5718    }
5719  };
5720
5721  waitForEl(slideSelectors, function() {});
5722
5723});
5724
5725/**
5726 * halfpage
5727 */
5728$(document).on("halfpage", function(event, be_containerClass){
5729
5730  /*
5731  const $iframes = $("iframe.halfpage");
5732
5733  $iframes.each(function(){
5734    const slot = $(this).parent().parent();
5735    slot.css("width","300px");
5736  });
5737  */
5738
5739  function halfpageResize() {
5740    /* Class-Name für sitebarContainer und .page-footer entsprechend einsetzen */
5741    const halfpageContainer = '.Ad-skyscraper-right';
5742
5743    const stageWidth = $("." + be_containerClass).width();
5744    let halfpageSpace = ($(this).width() - stageWidth) / 2;
5745    halfpageSpace = Math.floor(halfpageSpace) -15;
5746
5747    if ($(halfpageContainer + ' iframe.responsiveFrame').data("width") > halfpageSpace ) {
5748      $(halfpageContainer + ' iframe.responsiveFrame').width(halfpageSpace);
5749    }
5750
5751    const halfpageAd = $('.halfpage').parent().parent();
5752    const halfpage = $('.halfpage');
5753    const halfpage_width = halfpage.data('width');
5754
5755    if (halfpage_width > halfpageSpace ) {
5756      halfpage.width(halfpageSpace);
5757      halfpageAd.css("width",halfpageSpace+"px");
5758      halfpage.css("width",halfpageSpace+"px");
5759
5760      $(document).ready(function(){
5761        const halfpageDOM = halfpage.contents();
5762        halfpageDOM.find("iframe").css("width", halfpageSpace+"px");
5763        const currWinHeight = $(window).height();
5764        halfpageDOM.find("iframe").css("max-height", currWinHeight+"px");
5765      });
5766    }
5767  }
5768
5769  const halfpageAd = $('.halfpage').parent().parent();
5770  const halfpage    = $('.halfpage');
5771
5772  const halfpage_width = halfpage.data('width');
5773  halfpageAd.css("width",halfpage_width+'px');
5774  halfpageAd.css("max-width",halfpage_width+'px');
5775
5776  const halfpage_fixed = halfpage.data('fixed');
5777  if (halfpage_fixed != 'false') {
5778    halfpageAd.css("position","fixed");
5779  }
5780
5781  /* Resize halfpage when the window is resized */
5782  $( window ).resize( function() {
5783    halfpageResize();
5784    /* Resize to fix halfpage on page load. */
5785  }).resize();
5786
5787}
5787);
5788
5789
5790/**
5791 * floorAd
5792 */
5793$(document).on('floorAd', function(event) {
5794  const floorAd = $('.floorAd').parent().parent();
5795  const floorAdIframe = $('.floorAd');
5796  const floorAdIframeContent = $('.floorAd').contents();
5797  const scroll_pos = floorAdIframe.data('display-at-pixel');
5798  const set_pos = floorAdIframe.data('align');
5799  const display_on_scroll = floorAdIframe.data('display-on-scroll');
5800  const center_ad = floorAdIframe.data('center-ad');
5801  let isHidden = false;
5802
5803  floorAd.css('z-index', floorAdIframe.data('zindex'));
5804  if (display_on_scroll) {
5805    floorAd.css('display', 'none');
5806  }
5807  if (center_ad) {
5808    floorAd.css('text-align', 'center');
5809  }
5810
5811  if (set_pos) {
5812    floorAd.css('position', 'fixed');
5813    floorAd.css(floorAdIframe.data('vertical-pos'),floorAdIframe.data('vertical-px-offset'));
5814    floorAd.css(floorAdIframe.data('horizontal-pos'),floorAdIframe.data('horizontal-px-offset'));
5815  }
5816
5817  window.onscroll = function() {
5818    if( window && !isHidden) {
5819      if (document.documentElement.scrollTop > scroll_pos || self.pageYOffset > scroll_pos) {
5820        $(floorAd).fadeIn("slow");
5821      } else if (document.documentElement.scrollTop < scroll_pos || self.pageYOffset < scroll_pos) {
5822        $(floorAd).fadeOut("slow");
5823      }
5824    }
5825  };
5826
5827  floorAdIframeContent.find('.CloseAd').click(function() {
5828    $(floorAd).fadeOut('slow');
5829    isHidden = true;
5830  });
5831
5832});
5833
5834
5835/**
5836 * layerAd
5837 */
5838$(document).on('layerAd', function(event) {
5839  const layerAd = $('.layerAd').parent().parent();
5840  const layerAdWrapper = $('.layerAd').parent();
5841  const layerAdIframe = $('.layerAd');
5842  const ad_close_time = layerAdIframe.data('ad-close-time');
5843
5844  const bg_color = layerAdIframe.data('bgcolor');
5845  const bg_opacity = layerAdIframe.data('bgopacity');
5846
5847  const align_banner = layerAdIframe.data('align');
5848  const vertical_px_offset = layerAdIframe.data('vertical-px-offset');
5849  const vertical_pos = layerAdIframe.data('vertical-pos');
5850  const horizontal_px_offset = layerAdIframe.data('horizontal-px-offset');
5851  const horizontal_pos = layerAdIframe.data('horizontal-pos');
5852
5853  function convertHex(hex,opacity){
5854    hex = hex.replace('#','');
5855    r = parseInt(hex.substring(0,2), 16);
5856    g = parseInt(hex.substring(2,4), 16);
5857    b = parseInt(hex.substring(4,6), 16);
5858
5859    return 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
5860  }
5861
5862  const bgColor_rgb = convertHex(bg_color, bg_opacity);
5863
5864  layerAd.css('width', '100%');
5865  layerAd.css('height', '100%');
5866  layerAd.css('background', bgColor_rgb);
5867  layerAd.css('position', 'fixed');
5868  layerAd.css('top', '0');
5869  layerAd.css('left', '0');
5870  layerAd.css('z-index', '12000');
5871
5872  layerAd.css('display', 'flex');
5873  layerAd.css('display', '-webkit-box');
5874  layerAd.css('display', '-webkit-flex');
5875  layerAd.css('display', '-ms-flexbox');
5876
5877  layerAd.css('-webkit-box-align', 'center');
5878  layerAd.css('-webkit-align-items', 'center');
5879  layerAd.css('-ms-flex-align', 'center');
5880  layerAd.css('align-items', 'center');
5881
5882  layerAd.css('-webkit-box-pack', 'center');
5883  layerAd.css('-webkit-justify-content', 'center');
5884  layerAd.css('-ms-flex-pack', 'center');
5885  layerAd.css('justify-content', 'center');
5886
5887
5888  layerAd.css('z-index', '12000');
5889
5890  layerAdWrapper.css('position', 'absolute');
5891  layerAdWrapper.prepend("<div class='layer_close' style='z-index: 13000; position:absolute; color: #ffffff; top:0; right:0;'><i title =\"schließen\" class=\"fa fa-close fa-2x\"></i></div>");
5892
5893  layerAdWrapper.css('margin', 'auto');
5894
5895  if (align_banner == 1) {
5896    if (vertical_pos == 'bottom') {
5897      layerAdWrapper.css('margin-bottom', vertical_px_offset+'px');
5898    } else {
5899      layerAdWrapper.css('margin-top', vertical_px_offset+'px');
5900    }
5901    if (horizontal_pos == 'left') {
5902      layerAdWrapper.css('margin-left', horizontal_px_offset+'px');
5903    } else {
5904      layerAdWrapper.css('margin-right', horizontal_px_offset+'px');
5905    }
5906  }
5907
5908  function showLayerAd() {
5909    layerAd.show();
5910  }
5911
5912  function closeLayerAd() {
5913    layerAd.hide();
5914  }
5915
5916  if (ad_close_time > 0){
5917    setTimeout(function(){closeLayerAd();}, ad_close_time*1000);
5918  }
5919
5920  $( ".layer_close" ).click(function() {
5921    layerAd.hide();
5922  });
5923});
5924
5925/**
5926 * exitintent
5927 */
5928$(document).one("exitintent", function(event){
5929  $( "html" ).one( "mouseleave", function() {
5930    $("#LayerModal").addClass("show");
5931  });
5932});
5933
5934/**
5935 * changeBackgroundColor
5936 */
5937$(document).on('changeBackgroundColor',function(event){
5938  const iframe = $('.fireplace'),
5939    bg_color = iframe.data('bgcolor');
5940  $(".Body").css('background-color', bg_color);
5941});
5942
5943/**
5944 * isBackgroundClick
5945 * On Background click go to clickurl
5946 */
5947$(document).on('isBackgroundClick',function(event){
5948
5949  $("#usercentrics-root").click(function(event ) {
5950    event.stopPropagation();
5951  });
5952
5953  $(".PageFrame").click(function(event ) {
5954    event.stopPropagation();
5955  });
5956
5957  $("#uc-center-container").click(function(event ) {
5958    event.stopPropagation();
5959  });
5960
5961  $(".Body").click(function() {
5962    const iframe = $('.bgclickplace');
5963    const clickurl = iframe.data('clickurl');
5964    window.open(clickurl, '_blank');
5965  });
5966});
5967
5968/**
5969 * counterAd
5970 */
5971$(document).one('counterAd', function(event) {
5972  const counterAd = $('.counterAd').parent().parent();
5973  const counterAdIframe = $('.counterAd');
5974
5975  const pl_id = counterAdIframe.data('contentunit');
5976  const clickurl = counterAdIframe.data('clickurl');
5977  const enddatum = counterAdIframe.data('enddatum');
5978  const counterimage = counterAdIframe.data('counterimage');
5979  const layout = counterAdIframe.data('layout');
5980
5981  let countertext = '';
5982
5983  countertext = countertext + '<div id=\"'+pl_id+'\" class="noanzeige" width=\"300\" height=\"300\">\n';
5984  countertext = countertext + '	<div>\n' ;
5985  countertext = countertext + '		<a target=\"_blank\" href=\"'+clickurl+'\">\n';
5986  if(typeof layout !== 'undefined' && layout === 'image') {
5987    countertext = countertext + '			<img src=\"' + counterimage + '\" title=\"\" alt=\"\" border=\"0\" width=\"300\" height=\"150\"/>\n';
5988  }
5989  countertext = countertext + '		</a>\n';
5990  countertext = countertext + '		<div class=\"banner_counter\" border=\"0\" width=\"300\" height=\"150\" style=\"max-width: 300px !important;\"> 	\n';
5991  countertext = countertext + '			<span id=\"clockline\"></span>\n';
5992  countertext = countertext + '				<div id=\"banner_counter\"></div>\n';
5993  countertext = countertext + '			<div  id=\"name_time_block\">\n';
5994  countertext = countertext + '				<span class=\"name_time\">Tage</span>\n';
5995  countertext = countertext + '				<span class=\"name_time\">Stunden</span>\n';
5996  countertext = countertext + '				<span class=\"name_time\">Minuten</span>\n';
5997  countertext = countertext + '			</div>\n';
5998  countertext = countertext + '		</div>	  \n';
5999  countertext = countertext + '	 \n';
6000  countertext = countertext + '	</div>\n';
6001  countertext = countertext + '\n';
6002  countertext = countertext + '</div>\n';
6003  counterAd.append(countertext);
6004  if(typeof layout !== 'undefined' && layout === 'image'){
6005    counterAdIframe.css("display","none");
6006  }
6007  counterAd.css('margin-top', '10px');
6008  $('.noanzeige').not(':first').remove();
6009  if(typeof jQuery == "function"){
6010    $(function() {
6011      $(document).trigger( "counter", enddatum);
6012    });
6013  }
6014
6015  $( counterAd ).closest('div').next().find('.line').removeClass("line");
6016});
6017
6018/**
6019 * counter
6020 */
6021$(document).on("counter", function(event, endtime){
6022
6023  /* Datum mit Punkt */
6024  let iso_end_date;
6025  if (endtime.match(/\./) ) {
6026    let iso_end_dateArr = endtime.split(".");
6027
6028    /* Umwandlung in Iso-Format */
6029    if (iso_end_dateArr[2] < 100) iso_end_dateArr[2] = "20" + iso_end_dateArr[2];
6030    iso_end_date = iso_end_dateArr[2] + "-" + iso_end_dateArr[0] + "-" +iso_end_dateArr[1];
6031
6032    /* Datum im Iso-Format, z.B. 2020-11-09 */
6033  } else {
6034    iso_end_date = endtime;
6035  }
6036
6037  const end = new Date(iso_end_date);
6038
6039  const _second = 1000;
6040  const _minute = _second * 60;
6041  const _hour = _minute * 60;
6042  const _day = _hour * 24;
6043  let timer;
6044
6045  function showRemaining() {
6046    const now = new Date();
6047    now.setHours(now.getHours() +1);
6048
6049    const distance = end - now;
6050    if (distance < 0) {
6051
6052      clearInterval(timer);
6053      document.getElementById('banner_counter').innerHTML = '<span class="time">0</span> ';
6054      document.getElementById('banner_counter').innerHTML += '<span class="time">0</span> ';
6055      document.getElementById('banner_counter').innerHTML += '<span class="time">0</span> ';
6056      return;
6057    }
6058    const days = Math.floor(distance / _day);
6059    const hours = Math.floor((distance % _day) / _hour);
6060    const minutes = Math.floor((distance % _hour) / _minute);
6061
6062    document.getElementById('banner_counter').innerHTML = '<span class="time">' + days + '</span> ';
6063    document.getElementById('banner_counter').innerHTML += '<span class="time">' + hours + '</span> ';
6064    document.getElementById('banner_counter').innerHTML += '<span class="time">' + minutes + '</span> ';
6065
6066  }
6067  timer = setInterval(showRemaining, 1000);
6068
6069});
6070
6071/**
6072 * centerIframe
6073 */
6074$(document).on('centerIframe', function(event){
6075  const iframe = $('.centeredFrame'),
6076    container = iframe.parent();
6077
6078  container.css('display', 'flex');
6079  container.css('flex-flow','column');
6080  iframe.css('align-self','center');
6081});
6082
6083/**
6084 * blockadvertisement
6085 */
6086$(document).on("blockadvertisement", function(event){
6087
6088  const iframe = $('.blockadvertisement');
6089  let container = iframe.parent();
6090  container.css("display","none");
6091});
6092
6093/**
6094 * wallpapercolor
6095 * Einfärben des body für Wallpaper
6096 */
6097$(document).on("wallpapercolor", function(event){
6098
6099  const iframe = $('.wallpaper_banner');
6100  const wallpapercolor = iframe.data("wallpapercolor");
6101  $('body').css("background-color",wallpapercolor);
6102
6103});
6104
6105/**
6106 * advertOnImage
6107 */
6108$(document).one("advertOnImage", function(event){
6109  const slot = $('[id^="renderSlot_Rectangle-Online-Specials"]');
6110  if (slot.hasClass("Ad-mediumRectangleStageTeaserAdvert")) {
6111    if (slot.children('div').length > 0) {
6112      slot.parent().css('padding', '5px');
6113      slot.parent().css('background-color', '#fff');
6114    }
6115
6116  }
6117
6118});
6119
6120/**
6121 * be_sitebarResize
6122 */
6123function be_sitebarResize(wideLayout, sitebarBid) {
6124  const browser_scrollbar_width = 0;
6125  let offsetLeft = 460;
6126  let outerWidth = 980;
6127  const sitebarContainer = '.Ad-skyscraper-right';
6128  if (($('.SiteFooter').length) && (!wideLayout)) {
6129    offsetLeft = $('.SiteFooter').offset().left + browser_scrollbar_width;
6130    outerWidth = $('.SiteFooter').outerWidth();
6131  } else if (($('.PageGallery').length) && (!wideLayout)) {
6132    offsetLeft = $('.PageGallery').offset().left + browser_scrollbar_width;
6133    outerWidth = $('.PageGallery').outerWidth();
6134  }
6135  if (wideLayout === true) {
6136    let siteHeader = document.querySelector('.SiteHeader') || document.querySelector('.SiteHeaderSticky_firstLine-inner');
6137    if (siteHeader) {
6138      let rect = siteHeader.getBoundingClientRect();
6139      offsetLeft = rect.left + browser_scrollbar_width;
6140
6141      let siteHeaderStyles = window.getComputedStyle(siteHeader);
6142      outerWidth = parseFloat(siteHeaderStyles.getPropertyValue('width'));
6143    }
6144  }
6145
6146  let rightOffset = $(this).width() - (offsetLeft + outerWidth);
6147  rightOffset = Math.floor(rightOffset);
6148
6149  if ($(sitebarContainer + ' iframe.responsiveFrame').data("width") > rightOffset ) {
6150    $(sitebarContainer + ' iframe.responsiveFrame').width(rightOffset);
6151  }
6152
6153  const iframeEl = document.querySelector('iframe.sitebar');
6154  let iFrameElDocument = iframeEl.contentDocument || iframeEl.contentWindow.document;
6155  let imgSitebar = iFrameElDocument.getElementById("sitebar"+sitebarBid);
6156  let imgSky = iFrameElDocument.getElementById("sky"+sitebarBid);
6157  const offsetLowLmt = 135;
6158  const offsetUpLmt = 215;
6159
6160  if (imgSky && imgSitebar) {
6161    if ((offsetLeft >= offsetLowLmt) && (offsetLeft < offsetUpLmt)) {
6162      imgSitebar.style.display = "none";
6163      imgSky.style.display = "inline";
6164    } else if (offsetLeft >= offsetUpLmt) {
6165      imgSitebar.style.display = "inline";
6166      imgSky.style.display = "none";
6167    }
6168    else if (offsetLeft < offsetLowLmt) {
6169        imgSitebar.style.display = "none";
6170        imgSky.style.display = "none";
6171      }
6172  }
6173
6174
6175  const sitebarAd = $('.sitebar').parent().parent();
6176  const sitebar = $('.sitebar');
6177  const sitebar_width = sitebar.data('width');
6178  const hideWidth = (sitebar.data('hidewidth') !== undefined ? sitebar.data('hidewidth') : 0);
6179
6180  if (rightOffset <= hideWidth) {
6181    sitebarAd.css('display', 'none');
6182    return;
6183  } else {
6184    sitebarAd.css('display', 'block');
6185  }
6186
6187
6188  if (sitebar_width > rightOffset ) {
6189    sitebar.width(rightOffset);
6190    sitebarAd.css("width",rightOffset+"px");
6191    sitebar.css("width",rightOffset+"px");
6192
6193    $(document).ready(function(){
6194      const sitebarDOM = sitebar.contents();
6195      sitebarDOM.find("iframe").css("width", rightOffset+"px");
6196      const currWinHeight = $(window).height();
6197      sitebarDOM.find("iframe").css("max-height", currWinHeight+"px");
6198    });
6199  }
6200}
6201
6202/**
6203 * sitebar
6204 */
6205$(document).on('sitebar',function(event, wideLayout) {
6206  const sitebarAd = $('.sitebar').parent().parent();
6207  const sitebar = $('.sitebar');
6208  const sitebarBid = sitebar[0].getAttribute("data-bid");
6209  const sbAdMarginTop = sitebar[0].getAttribute("data-margintop");
6210  if (sbAdMarginTop !== "0" && sbAdMarginTop !== "NULL") {
6211    sitebarAd.css("margin-top",sbAdMarginTop+'px');
6212  }
6213
6214  if ( sitebar.data('bgcolor') ) {
6215    const bg_color = sitebar.data('bgcolor');
6216    if (bg_color.startsWith("#")) {
6217      document.getElementsByTagName('body')[0].style.backgroundColor = bg_color;
6218    }
6219  }
6220
6221  const sitebar_width = sitebar.data('width');
6222  sitebarAd.css("width",sitebar_width+'px');
6223  sitebarAd.css("max-width",sitebar_width+'px');
6224  sitebar.css("max-height",'100vh');
6225
6226  const sitebar_fixed = sitebar.data('fixed');
6227  if (sitebar_fixed != 'false') {
6228    sitebarAd.css("position","fixed");
6229  }
6230
6231  /* Resize sitebar when the window is resized */
6232  $( window ).resize( function() {
6233    be_sitebarResize(wideLayout, sitebarBid);
6234    /* Resize to fix sitebar on page load. */
6235  }).resize();
6236
6237}
6237);
6238
6239/**
6240 * be_sitebarLeftResize
6241 */
6242function be_sitebarLeftResize(wideLayout, sitebarBid) {
6243  const browser_scrollbar_width = 15;
6244  let offsetLeft = 460;
6245  let outerWidth = 980;
6246  const sitebarLeftContainer = '.Ad-skyscraper-left';
6247  if (($('.SiteFooter').length) && (!wideLayout)) {
6248    offsetLeft = $('.SiteFooter').offset().left + browser_scrollbar_width;
6249    outerWidth = $('.SiteFooter').outerWidth();
6250  } else if (($('.PageGallery').length) && (!wideLayout)) {
6251    offsetLeft = $('.PageGallery').offset().left + browser_scrollbar_width;
6252    outerWidth = $('.PageGallery').outerWidth();
6253  }
6254  if (wideLayout === true) {
6255    let siteHeader = document.querySelector('.SiteHeader') || document.querySelector('.SiteHeaderSticky_firstLine-inner');
6256    if (siteHeader) {
6257      let rect = siteHeader.getBoundingClientRect();
6258      offsetLeft = rect.left + browser_scrollbar_width;
6259
6260      let siteHeaderStyles = window.getComputedStyle(siteHeader);
6261      outerWidth = parseFloat(siteHeaderStyles.getPropertyValue('width'));
6262    }
6263  }
6264
6265  let leftOffset = offsetLeft;
6266  leftOffset = Math.round(leftOffset);
6267
6268  if ($(sitebarLeftContainer + ' iframe.responsiveFrame').data("width") > leftOffset ) {
6269    $(sitebarLeftContainer + ' iframe.responsiveFrame').width(leftOffset);
6270  }
6271
6272  const iframeElLeft = document.querySelector('iframe.sitebarLeft');
6273  let iFrameElLeftDocument = iframeElLeft.contentDocument || iframeElLeft.contentWindow.document;
6274  let imgSitebar = iFrameElLeftDocument.getElementById("sitebar"+sitebarBid);
6275  let imgSky = iFrameElLeftDocument.getElementById("sky"+sitebarBid);
6276  const offsetLowLmt = 140;
6277  const offsetUpLmt = 320;
6278
6279  if (imgSky && imgSitebar) {
6280    if ((offsetLeft >= offsetLowLmt) && (offsetLeft < offsetUpLmt)) {
6281      imgSitebar.style.display = "none";
6282      imgSky.style.display = "inline";
6283    } else if (offsetLeft >= offsetUpLmt) {
6284      imgSitebar.style.display = "inline";
6285      imgSky.style.display = "none";
6286    }
6287    else if (offsetLeft < offsetLowLmt) {
6288        imgSitebar.style.display = "none";
6289        imgSky.style.display = "none";
6290      }
6291  }
6292
6293
6294  const sitebarAd = $('.sitebarLeft').parent().parent();
6295  const sitebar = $('.sitebarLeft');
6296  const sitebar_width = sitebar.data('width');
6297  const hideWidth = (sitebar.data('hidewidth') !== undefined ? sitebar.data('hidewidth') : 0) + 15;
6298
6299  if (leftOffset <= hideWidth) {
6300    sitebarAd.css('display', 'none');
6301    return;
6302  } else {
6303    sitebarAd.css('display', 'block');
6304  }
6305
6306
6307  let sidebarLeftMargin = Math.round(leftOffset);
6308  sitebarAd.css("margin-left","0px");
6309  let currSitebar_width = sitebarAd[0].offsetWidth;
6310
6311  if (sitebar_width >= leftOffset ) {
6312    leftOffset = leftOffset-browser_scrollbar_width;
6313
6314    sitebar.width(leftOffset);
6315    sitebarAd.css("width",leftOffset+"px");
6316    sitebar.css("width",leftOffset+"px");
6317
6318    $(document).ready(function(){
6319      const sitebarDOM = sitebar.contents();
6320      sitebarDOM.find("iframe").css("width", leftOffset+"px");
6321      const currWinHeight = $(window).height();
6322      sitebarDOM.find("iframe").css("max-height", currWinHeight+"px");
6323    });
6324  } else if (sitebar_width < leftOffset) {
6325    let sbMarginLeft = leftOffset - browser_scrollbar_width - sitebar_width;
6326
6327    sitebarAd.css("width",sitebar_width+"px");
6328    sitebar.css("width",sitebar_width+"px");
6329    sitebarAd.css("margin-left",sbMarginLeft+"px");
6330  }
6331}
6332
6333/**
6334 * sitebarLeft
6335 */
6336$(document).on('sitebarLeft',function(event, wideLayout) {
6337  const sitebarLeftAd = $('.sitebarLeft').parent().parent();
6338  const sitebarLeft = $('.sitebarLeft');
6339  const sitebarLeftBid = sitebarLeft[0].getAttribute("data-bid");
6340  const leftSitebarSlot = document.getElementById("renderSlot_Skyscraper-links");
6341  leftSitebarSlot.classList.add("leftSitebarSlot");
6342
6343  const sitebarLeft_width = sitebarLeft.data('width');
6344  sitebarLeftAd.css("width",sitebarLeft_width+'px');
6345  sitebarLeftAd.css("max-width",sitebarLeft_width+'px');
6346
6347  const sitebarLeft_fixed = sitebarLeft.data('fixed');
6348  if (sitebarLeft_fixed != 'false') {
6349    sitebarLeftAd.css("position","fixed");
6350  }
6351
6352  const sbAdLeftMarginTop = sitebarLeft[0].getAttribute("data-margintop");
6353  if (sbAdLeftMarginTop !== "0" && sbAdLeftMarginTop !== "NULL") {
6354    sitebarLeftAd.css("margin-top",sbAdLeftMarginTop+'px');
6355  }
6356
6357  /* Resize sitebarLeft when the window is resized */
6358  $( window ).resize( function() {
6359    be_sitebarLeftResize(wideLayout, sitebarLeftBid);
6360    /* Resize to fix sitebar on page load. */
6361  }).resize();
6362
6363  window.addEventListener('load', function() {
6364    be_sitebarLeftResize(wideLayout, sitebarLeftBid);
6365  });
6366
6367  window.onload = function() {
6368    be_sitebarLeftResize(wideLayout, sitebarLeftBid);
6369  };
6370
6371
6372});
6373
6374/**
6375 * teadsResize
6376 * teads Videos
6377 */
6378$(document).on('teadsResize',function(event){
6379  const iframe = $('.video_ad'),
6380    aspect_ratio = 1.7,
6381    wrapper = iframe.parent();
6382
6383  iframe.height(iframe.width()/aspect_ratio);
6384
6385  wrapper.css('display', 'flex');
6386  wrapper.css('flex-flow','column');
6387  iframe.css('align-self','center');
6388});
6389
6390/**
6391 * pushdown
6392 */
6393$(document).on("pushdown", function(event, elementclass){
6394
6395  const pushdown_iframe = $("." + elementclass);
6396  const pushdown_container = pushdown_iframe.parent();
6397
6398  const ad_height = pushdown_iframe.data("height");
6399  const ad_width = pushdown_iframe.data("width");
6400  const ad_margin_bottom = parseInt(pushdown_container.css("height")) - ad_height;
6401  const pushdownheight = pushdown_iframe.data("pushdownheight") + ad_margin_bottom;
6402  const pushdowntime = pushdown_iframe.data("pushdowntime"); /* Dauer der Animation */
6403  const closingtime = pushdown_iframe.data("closingtime") * 1000;   /* Initiales Einfahren */
6404  const pushdown_center_ad = pushdown_iframe.data("center_ad");
6405  const pushdown_func = pushdown_iframe.data("pushdown-func") ? 1 : 0;
6406  const no_initialpushdown = pushdown_iframe.data("no_initialpushdown") ? 1 : 0;
6407
6408  /* Werbemittel zentrieren */
6409  if(pushdown_center_ad == 1){
6410    pushdown_container.css("text-align","center");
6411  }
6412
6413  if(pushdown_func == 0){
6414
6415    /* prevent too large iFrame-height on smaller stage */
6416    let pushdown_iframeWidth = pushdown_iframe[0].clientWidth;
6417    let pushdownRatio = ad_height / ad_width;
6418    let pushdownHeight = Math.ceil(pushdown_iframeWidth * pushdownRatio);
6419    pushdown_iframe.css("height",pushdownHeight + "px");
6420
6421    return;
6422  }
6423
6424  /* Nutzer-Handling */
6425  pushdown_iframe.on("mouseover", function(event){
6426    clearTimeout(waiting_for_closing);
6427    $(document).trigger('pushdown-animation', [pushdown_container, pushdown_iframe, '1', pushdownheight]);
6428
6429    pushdown_iframe.one("mouseout", function(event){
6430      $(document).trigger('pushdown-animation', [pushdown_container, pushdown_iframe, '1', ad_height]);
6431    });
6432  });
6433
6434  /* Initiales Ausfahren */
6435  if(no_initialpushdown != 1) {
6436    $(document).trigger('pushdown-animation', [pushdown_container, pushdown_iframe, pushdowntime, pushdownheight]);
6437  }
6438
6439  /* Einfahren nach initialem Ausfahren */
6440  let waiting_for_closing = window.setTimeout(function(){
6441    $(document).trigger('pushdown-animation', [pushdown_container, pushdown_iframe, pushdowntime, ad_height]);
6442  }, closingtime);
6443
6444});
6445
6446/**
6447 * pushdown-animation
6448 */
6449$(document).on("pushdown-animation", function(event, pushdown_container, pushdown_iframe, movingtime, newheight){
6450
6451  pushdown_container.css({
6452    height           : newheight,
6453    WebkitTransition : 'height ' + movingtime + 's ease-in-out',
6454    MozTransition    : 'height ' + movingtime + 's ease-in-out',
6455    MsTransition     : 'height ' + movingtime + 's ease-in-out',
6456    OTransition      : 'height ' + movingtime + 's ease-in-out',
6457    transition       : 'height ' + movingtime + 's ease-in-out'
6458  });
6459  pushdown_iframe.css({
6460    height           : newheight,
6461    WebkitTransition : 'height ' + movingtime + 's ease-in-out',
6462    MozTransition    : 'height ' + movingtime + 's ease-in-out',
6463    MsTransition     : 'height ' + movingtime + 's ease-in-out',
6464    OTransition      : 'height ' + movingtime + 's ease-in-out',
6465    transition       : 'height ' + movingtime + 's ease-in-out'
6466  });
6467});
6468
6469/**
6470 * parallax_outstream
6471 */
6472$(document).on("parallax_outstream", function(event){
6473  const iframe = $('.parallax_outstream');
6474  const container = iframe.parent();
6475  container.attr("id","parallax_outstream");
6476  iframe.css("height","0px");
6477  iframe.css("width","0px");
6478});
6479
6480/**
6481 * dynamic_sitebar
6482 */
6483$(document).on("dynamic_sitebar", function(event){
6484  const iframe = $('.dynamic_sitebar');
6485  const container = iframe.parent();
6486  const dynamic_space = ($('.PageFrame').outerWidth(true) - $('.PageFrame').outerWidth()) / 2;
6487  container.css("width", dynamic_space +"px");
6488  container.css("position","fixed");
6489});
6490
6491/**
6492 * insertAdvTextDiv
6493 *
6494 * "Anzeige"-Position und Border an Werbemittelgroesse positionieren/anpassen
6495 */
6496$(document).on("insertAdvTextDiv", function(event) {
6497  const $iframes = $('[id^="renderSlot_"] iframe');
6498  let el = $('<div class="Ad_text"></div>');
6499
6500  $iframes.each(function () {
6501    if ($(this).data("width") == '1') {
6502      $(this).parent('div').css('height', '0');
6503      return;
6504    }
6505
6506    const slot = $(this).parent().parent();
6507    if ($(this).parent().parent().length) {
6508      if (slot.attr('id').match(/renderSlot_(Super*|Sky*|Rectangle-Gal|Mobil-Rectangle-Gal)/)) {
6509        return;
6510      }
6511    } else {
6512      return;
6513    }
6514    if (slot.parent().length && slot.parent().hasClass() ){
6515      if(slot.parent().attr('class').match(/slick-track/)){
6516        /* SliderBannerArticleDetail_dots nur einblenden, wenn auch was geschaltet ist */
6517        $('.SliderBannerArticleDetail_dots').css('display', 'block');
6518      }
6519    }
6520
6521    const ad_text_div = $(this).parent().find($(".Ad_text"));
6522    const ad_text_parallax_div = $(this).parent().parent().find($(".Ad_text"));
6523
6524    ad_text_div.css('margin', '');
6525    if ($(this).hasClass('parallax')) {
6526
6527      if(!ad_text_parallax_div.length > 0){
6528        $(this).parent().parent('div').prepend(el);
6529      }
6530      ad_text_parallax_div.css("margin", "0 auto");
6531      ad_text_parallax_div.css("width", '100%');
6532      if ($(this).data("ad_text_bgc")) {
6533        ad_text_parallax_div.css("background-color", $(this).data("ad_text_bgc"));
6534      }
6535      if ($(this).data("ad_text_margintop")) {
6536        ad_text_parallax_div.css("margin-top", $(this).data("ad_text_margintop"));
6537      }
6538      if ($(this).data("ad_text_maxheight")) {
6539        ad_text_parallax_div.css("max-height", $(this).data("ad_text_maxheight"));
6540      }
6541      if ($(this).data("ad_text_noborder")) {
6542        ad_text_parallax_div.addClass('html5BannerBefore');
6543      }
6544      ad_text_parallax_div.css("z-index", '10');
6545    } else {
6546      if (!ad_text_div.length > 0) {
6547        $(this).parent('div').prepend(el);
6548      }
6549      if (slot.attr('id').match(/renderSlot_(Rectangle-Aufmacher)/)) {
6550        ad_text_div.css("width", '100%');
6551      } else {
6552        ad_text_div.css("width", $(this).data("width"));
6553        ad_text_div.css("margin", "0 auto");
6554      }
6555
6556    }
6557
6558    if (/[^-]?width\s?:\s?100%/.test($(this).attr('style'))) {
6559      ad_text_div.css("margin", "0 auto");
6560    }
6561    el = el.clone();
6562  });
6563});
6564
6565/**
6566 * fadeoutadvertisement
6567 * Hierüber kann eine Platzierung animiert ausgeblendet werden
6568 */
6569$(document).on("fadeoutadvertisement", function(event){
6570
6571  const iframe = $('.fadeoutadvertisement');
6572  let container = iframe.parent();
6573  container.animate({
6574    height: "0px"
6575  }, 2000, function() {
6576    container.css("display","none");
6577  });
6578
6579});
6580
6581/**
6582 * be_reduceBackgroundOpacity
6583 * @param element
6584 * @param opacity
6585 */
6586function be_reduceBackgroundOpacity(element, opacity) {
6587  let backgroundColor = element.style.backgroundColor;
6588  if (backgroundColor.substring(0, 4) === "rgba") {
6589    /* if rgba format is already used, just update the alpha value */
6590    backgroundColor = backgroundColor.replace(/[^,]+(?=\))/, opacity);
6591  } else {
6592    /* convert hexadecimal or RGB format to rgba format and add alpha value */
6593    let r = 0, g = 0, b = 0;
6594    if (backgroundColor.substring(0, 1) === "#") {
6595      /* convert hexadecimal to RGB */
6596      const hex = backgroundColor.substring(1);
6597      r = parseInt(hex.substring(0, 2), 16);
6598      g = parseInt(hex.substring(2, 4), 16);
6599      b = parseInt(hex.substring(4, 6), 16);
6600    } else if (backgroundColor.substring(0, 3) === "rgb") {
6601      /* extract RGB values from comma-separated string */
6602      const values = backgroundColor.match(/\d+/g);
6603      r = parseInt(values[0]);
6604      g = parseInt(values[1]);
6605      b = parseInt(values[2]);
6606    }
6607    /* convert RGB to rgba */
6608    backgroundColor = "rgba(" + r + ", " + g + ", " + b + ", " + opacity + ")";
6609  }
6610  element.style.backgroundColor = backgroundColor;
6611}
6612
6613/**
6614 * be_changeBGColor
6615 * @param element
6616 * @param color1
6617 * @param color2
6618 * @param mixVal
6619 */
6620function be_changeBGColor(element, color1, color2, mixVal) {
6621  const hexToRgb = function (hex) {
6622    const r = parseInt(hex.slice(1, 3), 16);
6623    const g = parseInt(hex.slice(3, 5), 16);
6624    const b = parseInt(hex.slice(5, 7), 16);
6625
6626    return [r, g, b];
6627  };
6628
6629  const rgbToHex = function (rgb) {
6630    const componentToHex = function (component) {
6631      const hex = component.toString();
6632      return hex.length == 1 ? "0" + hex : hex;
6633    };
6634
6635    const r = componentToHex(rgb[0]);
6636    const g = componentToHex(rgb[1]);
6637    const b = componentToHex(rgb[2]);
6638
6639    return "#" + r + g + b;
6640  };
6641
6642  const color1Rgb = hexToRgb(color1);
6643  const color2Rgb = hexToRgb(color2);
6644
6645  const r = Math.round((1 - mixVal) * color1Rgb[0] + mixVal * color2Rgb[0]);
6646  const g = Math.round((1 - mixVal) * color1Rgb[1] + mixVal * color2Rgb[1]);
6647  const b = Math.round((1 - mixVal) * color1Rgb[2] + mixVal * color2Rgb[2]);
6648
6649  element.style.backgroundColor = rgbToHex([r, g, b]);
6650}
6651
6652/**
6653 * be_rgbToHex
6654 * @param rgb
6655 * @returns {string}
6656 */
6657function be_rgbToHex(rgb) {
6658  /* Liefert nur die Ziffern 0-9 und a-f */
6659  function hex(x) {
6660    return ("0" + parseInt(x).toString(16)).slice(-2);
6661  }
6662
6663  /* Konvertiere den RGB-String in eine Array */
6664  const rgbArray = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
6665  /* Wandle die RGB-Werte in Hexadezimalwerte um */
6666  return "#" + hex(rgbArray[1]) + hex(rgbArray[2]) + hex(rgbArray[3]);
6667}
6668
6669/**
6670 * welcomeAdVideo
6671 * WelcomeAd mit Video-URL, wird beim Scrollen ausgeblendet, hat Close-Button
6672 */
6673$(document).on('welcomeAdVideo', function(event) {
6674
6675  let welcomeAdIframe = $('.welcomeFrame');
6676  let wcVideoSrc = welcomeAdIframe.data('videosrc');
6677  let wcVideoCodecs = welcomeAdIframe.data('videocodecs');
6678  let wcBgColor = welcomeAdIframe.data('bgcolor');
6679  let wcClickUrl = welcomeAdIframe.data('clickurl');
6680  let wcStageMarginTop = welcomeAdIframe.data('stagemargintop');
6681  let wcMuteButton = welcomeAdIframe.data('mutebutton');
6682  let bodyEl = document.getElementsByTagName("BODY")[0];
6683  let superbannerAd = document.getElementById('renderSlot_Superbanner');
6684  let defaultBgColor = window.getComputedStyle(document.body).getPropertyValue('background-color');
6685  defaultBgColor = be_rgbToHex(defaultBgColor);
6686  if(wcBgColor != 'default') {
6687    bodyEl.style.backgroundColor = wcBgColor;
6688  }
6689  let bgEl = document.createElement("div");
6690  const stageEl = document.querySelector('.PageFrame');
6691  bgEl.classList.add("wcVideo");
6692  let videoEl = document.createElement("video");
6693  videoEl.setAttribute("preload", "auto");
6694  videoEl.setAttribute("loop", "");
6695  //videoEl.setAttribute("autoplay", "");
6696  videoEl.setAttribute("muted", "");
6697  videoEl.classList.add("wcVideoTag");
6698
6699  let wcCloseButton = document.createElement("button");
6700  let closeBtnTxt = welcomeAdIframe.data('closebtntxt');
6701  let wcCloseButtonText = closeBtnTxt != 'default' ? closeBtnTxt : 'schließen';
6702  wcCloseButton.classList.add("wcCloseButton");
6703  wcCloseButton.prepend(wcCloseButtonText);
6704
6705  let playBtnTxt = welcomeAdIframe.data('playbtntxt');
6706  let pauseBtnTxt = welcomeAdIframe.data('pausebtntxt');
6707
6708  bgEl.prepend(videoEl);
6709  bodyEl.prepend(wcCloseButton);
6710
6711  if (playBtnTxt != 'default') {
6712    let wcPlayButton = document.createElement("button");
6713    let wcPlayButtonText = welcomeAdIframe.data('playbtntxt');
6714    let wcPauseButtonText = welcomeAdIframe.data('pausebtntxt');
6715    wcPlayButton.classList.add("wcPlayButton");
6716    wcPlayButton.prepend(wcPlayButtonText);
6717    bodyEl.prepend(wcPlayButton);
6718  }
6719
6720  if (wcMuteButton) {
6721    let wcMuteButtonEl = document.createElement("button");
6722    wcMuteButtonEl.classList.add("wcMuteButton");
6723    let wcMuteButtonElText = "<i class='fa fa-volume-off fa-2x'> </i>";
6724    wcMuteButtonEl.innerHTML = wcMuteButtonElText;
6725    bodyEl.prepend(wcMuteButtonEl);
6726
6727  }
6728
6729  let sourceEl = document.createElement("source");
6730  sourceEl.setAttribute("src", wcVideoSrc);
6731  sourceEl.setAttribute("type", "video/mp4");
6732  sourceEl.setAttribute("codecs", wcVideoCodecs);
6733
6734  videoEl.prepend(sourceEl);
6735  bodyEl.prepend(bgEl);
6736
6737  function playWcVideo() {
6738    videoEl.play();
6739  }
6740
6741  function pauseWcVideo() {
6742    videoEl.pause();
6743  }
6744
6745  function toggleWcVideo() {
6746    if(wcVideo.paused){
6747      wcVideo.play();
6748      if (wcPlayButton) {
6749        wcPlayButton.className = "wcPauseButton";
6750        if (playBtnTxt != 'default') {
6751          let wcPauseButtonText = welcomeAdIframe.data('pausebtntxt');
6752          wcPlayButton.innerText = wcPauseButtonText;
6753        }
6754
6755      }
6756    }else{
6757      wcVideo.pause();
6758      if (wcPlayButton) {
6759        wcPlayButton.className = "wcPlayButton";
6760        if (playBtnTxt != 'default') {
6761          let wcPlayButtonText = welcomeAdIframe.data('playbtntxt');
6762          wcPlayButton.innerText = wcPlayButtonText;
6763        }
6764      }
6765    }
6766
6767    /*
6768     if(wcVideo.muted){
6769     wcVideo.muted = false;
6770     }else{
6771     wcVideo.muted = true;
6772     }
6773     */
6774  }
6775
6776  function toggleMuteButton() {
6777    if (wcVideo.muted) {
6778      wcVideo.muted = false;
6779      wcMuteButtonEl.classList.add("wcMuteOn");
6780      wcMuteButtonEl.classList.remove("wcMuteOff");
6781      wcMuteButtonEl.innerHTML = "<i class='fa fa-volume-up fa-2x'> </i>";
6782    } else {
6783      wcVideo.muted = true;
6784      wcMuteButtonEl.classList.add("wcMuteOff");
6785      wcMuteButtonEl.classList.remove("wcMuteOn");
6786      wcMuteButtonEl.innerHTML = "<i class='fa fa-volume-off fa-2x'> </i>";
6787    }
6788  }
6789
6790  let wcVideo = document.getElementsByClassName("wcVideoTag")[0];
6791  wcVideo.addEventListener("click", toggleWcVideo);
6792  wcVideo.muted = true;
6793  wcVideo.autoplay = true;
6794
6795
6796  let wcPlayButton = document.querySelector(".wcPlayButton");
6797  wcPlayButton.innerText = pauseBtnTxt;
6798
6799  if (wcPlayButton) {
6800    wcPlayButton.addEventListener("click", toggleWcVideo);
6801  }
6802
6803  let wcPauseButton = document.querySelector(".wcPauseButton");
6804  if (wcPauseButton) {
6805    wcPauseButton.addEventListener("click", toggleWcVideo);
6806  }
6807
6808  let wcMuteButtonEl = document.querySelector(".wcMuteButton");
6809  if (wcMuteButtonEl) {
6810    wcMuteButtonEl.addEventListener("click", toggleMuteButton);
6811  }
6812
6813  /* clickable background -> */
6814  const wcMouseOverHandler = function (event) {
6815    if (event.target === document.body) {
6816      document.body.style.cursor = 'pointer';
6817    }
6818  };
6819  document.addEventListener('mouseover', wcMouseOverHandler);
6820
6821  const wcMouseOutHandler = function (event) {
6822    if (event.target === document.body) {
6823      document.body.style.cursor = 'auto';
6824    }
6825  };
6826  document.addEventListener('mouseout', wcMouseOutHandler);
6827
6828  const clickHandler = function (event) {
6829    if (event.target === document.body) {
6830      window.open(wcClickUrl, '_blank');
6831    }
6832  };
6833  document.addEventListener('click', clickHandler);
6834  /* <- clickable background */
6835
6836  function fadeOutOnScroll(element, stageEl) {
6837    if (!element || !stageEl) {
6838      return;
6839    }
6840
6841    let distanceToTop = window.pageYOffset + element.getBoundingClientRect().top;
6842    const elementHeight = element.offsetHeight;
6843    const scrollTop = document.documentElement.scrollTop;
6844
6845    let opacity = 1;
6846    distanceToTop = 0;
6847    element.style.position = 'fixed';
6848
6849    if (scrollTop > distanceToTop) {
6850      opacity = 1 - (scrollTop - distanceToTop) / elementHeight;
6851      opacity = (opacity < 0) ? 0 : opacity;
6852      opacity = (opacity > 0.95) ? 1 : opacity;
6853    }
6854
6855    if (opacity >= 0) {
6856      element.style.opacity = opacity;
6857      /* be_reduceBackgroundOpacity(superbannerAd, opacity); */
6858      if(wcBgColor != 'default') {
6859        be_changeBGColor(bodyEl, defaultBgColor, wcBgColor, opacity);
6860      }
6861    }
6862  }
6863
6864  function scrollHandler() {
6865    fadeOutOnScroll(wcVideo, bgEl);
6866  }
6867
6868  window.addEventListener('scroll', scrollHandler, {passive: true});
6869
6870  /**
6871  * Close Button
6872  */
6873  function closeWcVideo() {
6874    wcVideo.remove();
6875    bodyEl.style.backgroundColor = defaultBgColor;
6876    superbannerAd.firstElementChild.remove();
6877    wcCloseButton.remove();
6878    if (wcPlayButton) {
6879      wcPlayButton.remove();
6880    }
6881    if (wcMuteButtonEl) {
6882      wcMuteButtonEl.remove();
6883    }
6884    window.removeEventListener('scroll', scrollHandler, {passive: true});
6885    document.removeEventListener('click', clickHandler);
6886    document.removeEventListener('mouseover', wcMouseOverHandler);
6887    document.removeEventListener('mouseout', wcMouseOutHandler);
6888    stageEl.style.transition = 'margin 1s';
6889    stageEl.style.marginTop = '0px';
6890  }
6891
6892  wcCloseButton.addEventListener("click", closeWcVideo);
6893
6894  /* wait until bg-video is available */
6895  let wcInterval = setInterval(function() {
6896    document.getElementById("renderSlot_Superbanner").style.height = "0";
6897    if (videoEl) {
6898      clearInterval(wcInterval);
6899      let OriginalStageMarginTop = wcStageMarginTop;
6900      let videoElStyle = getComputedStyle(videoEl);
6901      let videoElHeight = parseInt(videoElStyle.height);
6902      let videoElOrigHeight = videoEl.naturalHeight;
6903      videoElOrigHeight = videoElOrigHeight || welcomeAdIframe.data('height');
6904      if (videoElHeight > videoElOrigHeight) {
6905
6906        videoElHeight = videoElOrigHeight;
6907      }
6908
6909      let videoElRatio = (videoElHeight / videoElOrigHeight).toFixed(2);
6910      let StageMarginTop = Math.round(OriginalStageMarginTop * videoElRatio);
6911
6912      stageEl.style.marginTop = StageMarginTop+'px';
6913    }
6914    clearInterval(wcInterval);
6915  }, 200);
6916
6917});
6918
6919/**
6920 * welcomeAdImage
6921 * WelcomeAd mit Hintergrund-Image, wird beim Scrollen ausgeblendet, hat Close-Button
6922 */
6923$(document).on('welcomeAdImage', function(event) {
6924
6925  let welcomeAd = $('.welcomeFrame').parent().parent();
6926  let welcomeAdIframe = $('.welcomeFrame');
6927  let wcBgColor = welcomeAdIframe.data('bgcolor');
6928  let wcClickUrl = welcomeAdIframe.data('clickurl');
6929  let bodyEl = document.getElementsByTagName("BODY")[0];
6930  let superbannerAd = document.getElementById('renderSlot_Superbanner');
6931  let defaultBgColor = window.getComputedStyle(document.body).getPropertyValue('background-color');
6932  defaultBgColor = be_rgbToHex(defaultBgColor);
6933
6934  if(wcBgColor != 'default') {
6935    bodyEl.style.backgroundColor = wcBgColor;
6936  }
6937  let bgEl = document.createElement("div");
6938  const stageEl = document.querySelector('.PageFrame');
6939
6940  bgEl.classList.add("wcBgImage");
6941  let imgEl = document.createElement("img");
6942  imgEl.classList.add("wcBgImageTag");
6943
6944  let wcCloseButton = document.createElement("button");
6945  let closeBtnTxt = welcomeAdIframe.data('closebtntxt');
6946  let wcCloseButtonText = closeBtnTxt != 'default' ? closeBtnTxt : 'schließen';
6947
6948  wcCloseButton.classList.add("wcCloseButton");
6949  wcCloseButton.prepend(wcCloseButtonText);
6950
6951  bgEl.prepend(imgEl);
6952  bodyEl.prepend(wcCloseButton);
6953
6954  let bgImgSource = welcomeAdIframe.data('bgimagesrc');
6955
6956  imgEl.setAttribute('src',bgImgSource);
6957  bodyEl.prepend(bgEl);
6958
6959  /* clickable background -> */
6960  const wcMouseOverHandler = function (event) {
6961    if (event.target === document.body) {
6962      document.body.style.cursor = 'pointer';
6963    }
6964  };
6965  document.addEventListener('mouseover', wcMouseOverHandler);
6966
6967  const wcMouseOutHandler = function (event) {
6968    if (event.target === document.body) {
6969      document.body.style.cursor = 'auto';
6970    }
6971  };
6972  document.addEventListener('mouseout', wcMouseOutHandler);
6973
6974  const clickHandler = function (event) {
6975    if (event.target === document.body) {
6976      window.open(wcClickUrl, '_blank');
6977    }
6978  };
6979  document.addEventListener('click', clickHandler);
6980  /* <- clickable background */
6981
6982  /* Superbanner in Hintergrund und sticky -> */
6983  superbannerAd.classList.add("wcfixedSuperbanner");
6984  const stageElStyles = window.getComputedStyle(stageEl);
6985  const stageElMarginTop = stageElStyles.getPropertyValue('margin-top');
6986  stageEl.style.marginTop = superbannerAd.offsetHeight+'px';
6987  /*
6988   * Calculation of the distance from the stage to the top of the screen
6989   * in a fixed ratio of 1080 (width of background image) to 520 (original distance from stage to top of screen)
6990   */
6991  let wcInterval2 = setInterval(function() {
6992
6993    if (imgEl) {
6994      clearInterval(wcInterval2);
6995
6996      let imgElStyle = getComputedStyle(imgEl);
6997      let imgElCurrHeight = parseInt(imgElStyle.height);
6998
6999      let imgHeight = 520;
7000      /* let imgElOrigHeight = 1080; */
7001      let imgElOrigHeight = 720;
7002      let imgElRatio = (imgHeight / imgElOrigHeight).toFixed(2);
7003      let StageMarginTop = Math.round(imgElCurrHeight * imgElRatio);
7004
7005      stageEl.style.marginTop = StageMarginTop+'px';
7006    }
7007    clearInterval(wcInterval2);
7008  }, 200);
7009
7010
7011  /* <- Superbanner in Hintergrund und sticky */
7012
7013  /* clickable superbanner -> */
7014
7015  superbannerAd.addEventListener('mouseover', function() {
7016    superbannerAd.style.cursor = 'pointer';
7017  });
7018
7019  superbannerAd.addEventListener('mouseout', function() {
7020    superbannerAd.style.cursor = 'auto';
7021  });
7022
7023  superbannerAd.addEventListener('click', function() {
7024    window.open(wcClickUrl, '_blank');
7025  });
7026  /* <- clickable superbanner */
7027
7028  function fadeOutOnScroll(element, stageEl) {
7029    if (!element || !stageEl) {
7030      return;
7031    }
7032
7033    let distanceToTop = window.pageYOffset + element.getBoundingClientRect().top;
7034    const elementHeight = element.offsetHeight;
7035    const scrollTop = document.documentElement.scrollTop;
7036
7037    let opacity = 1;
7038    distanceToTop = 0;
7039    element.style.position = 'fixed';
7040
7041    if (scrollTop > distanceToTop) {
7042      opacity = 1 - (scrollTop - distanceToTop) / elementHeight;
7043      opacity = (opacity < 0) ? 0 : opacity;
7044      opacity = (opacity > 0.95) ? 1 : opacity;
7045    }
7046
7047    if (opacity >= 0) {
7048      element.style.opacity = opacity;
7049      /* be_reduceBackgroundOpacity(superbannerAd, opacity); */
7050      if(wcBgColor != 'default') {
7051        be_changeBGColor(bodyEl, defaultBgColor, wcBgColor, opacity);
7052      }
7053    }
7054  }
7055
7056  function scrollHandler() {
7057    fadeOutOnScroll(bgEl, stageEl);
7058  }
7059
7060  window.addEventListener('scroll', scrollHandler, {passive: true});
7061
7062  /*
7063   * Close Button
7064   */
7065  function closewcBgImage() {
7066    bgEl.remove();
7067    bodyEl.style.backgroundColor = defaultBgColor;
7068    superbannerAd.firstElementChild.remove();
7069    wcCloseButton.remove();
7070    window.removeEventListener('scroll', scrollHandler, {passive: true});
7071    document.removeEventListener('click', clickHandler);
7072    document.removeEventListener('mouseover', wcMouseOverHandler);
7073    document.removeEventListener('mouseout', wcMouseOutHandler);
7074    stageEl.style.transition = "margin-top 0.5s ease";
7075    stageEl.style.marginTop = stageElMarginTop;
7076  }
7077
7078  wcCloseButton.addEventListener("click", closewcBgImage);
7079
7080});
7081
7082/**
7083 * welcomeAdVideoMobil
7084 * WelcomeAd mit Video-URL für Mobil, hat Close-Button
7085 */
7086$(document).on('welcomeAdVideoMobil', function(event) {
7087
7088  let welcomeAdIframe = document.getElementById('welcomeFrameMobil');
7089
7090  let bodyEl = document.getElementsByTagName("BODY")[0];
7091  let superbannerAd = document.getElementById('renderSlot_Mobil-Superbanner');
7092
7093  let wcCloseButton = document.createElement("button");
7094  let closeBtnTxt = welcomeAdIframe.getAttribute('data-closebtntxt');
7095  let wcCloseButtonText = closeBtnTxt != 'default' ? closeBtnTxt : 'schließen';
7096  wcCloseButton.classList.add("wcCloseButtonMobil");
7097  wcCloseButton.prepend(wcCloseButtonText);
7098
7099  bodyEl.prepend(wcCloseButton);
7100
7101  let adHeight = superbannerAd.clientHeight;
7102
7103  welcomeAdIframe.style.position = "fixed";
7104  welcomeAdIframe.style.zIndex = "-1";
7105  superbannerAd.style.height = adHeight+"px";
7106
7107  wcCloseButton.style.top = adHeight-35+"px";
7108
7109
7110  /*
7111   * Create Video Tag
7112   */
7113  let bgEl = document.createElement("div");
7114  bgEl.classList.add("wcVideo");
7115  bgEl.classList.add("wcMobil");
7116
7117  let videoEl = document.createElement("video");
7118  videoEl.setAttribute("preload", "auto");
7119  videoEl.setAttribute("loop", "");
7120  videoEl.setAttribute("muted", "");
7121  videoEl.setAttribute("id", "wcVideoTag");
7122  videoEl.classList.add("wcVideoTag");
7123
7124  let wcVideoSrc = welcomeAdIframe.getAttribute('data-videosrc');
7125  let wcVideoCodecs = welcomeAdIframe.getAttribute('data-videocodecs');
7126  let sourceEl = document.createElement("source");
7127  sourceEl.setAttribute("src", wcVideoSrc);
7128  sourceEl.setAttribute("type", "video/mp4");
7129  sourceEl.setAttribute("codecs", wcVideoCodecs);
7130
7131  videoEl.prepend(sourceEl);
7132  bgEl.prepend(videoEl);
7133  bodyEl.prepend(bgEl);
7134
7135
7136
7137  /*
7138   * Close Button
7139   */
7140  function closeWcVideo() {
7141    superbannerAd.remove();
7142    wcCloseButton.remove();
7143    wcPlayButton.remove();
7144  }
7145
7146  wcCloseButton.addEventListener("click", closeWcVideo);
7147
7148
7149  /*
7150   * Play/Stop Button
7151   */
7152  let wcPlayBtnTxt = welcomeAdIframe.getAttribute('data-playbtntxt');
7153  let wcPauseBtnTxt = welcomeAdIframe.getAttribute('data-pausebtntxt');
7154
7155  let wcPlayButton = document.createElement("button");
7156  wcPlayButton.classList.add("wcPlayButtonMobil");
7157  wcPlayButton.prepend(wcPlayBtnTxt);
7158  bodyEl.prepend(wcPlayButton);
7159
7160  wcPlayButton.style.top = adHeight-35+"px";
7161
7162  wcPlayButton.addEventListener("click", toggleWcVideo);
7163
7164  let wcVideo = document.getElementById('wcVideo');
7165  wcVideo = videoEl;
7166
7167  function toggleWcVideo() {
7168    if(wcVideo.paused){
7169      wcVideo.play();
7170      if (wcPlayButton) {
7171        wcPlayButton.className = "wcPauseButtonMobil";
7172        if (wcPlayBtnTxt != 'default') {
7173          wcPlayButton.innerText = wcPauseBtnTxt;
7174        }
7175
7176      }
7177    }else{
7178      wcVideo.pause();
7179      if (wcPlayButton) {
7180        wcPlayButton.className = "wcPlayButtonMobil";
7181        if (wcPlayBtnTxt != 'default') {
7182          wcPlayButton.innerText = wcPlayBtnTxt;
7183        }
7184      }
7185    }
7186
7187    /*
7188     if(wcVideo.muted){
7189     wcVideo.muted = false;
7190     }else{
7191     wcVideo.muted = true;
7192     }
7193     */
7194  }
7195
7196});
7197
7198/**
7199 * dfvSolutionAd
7200 * Hierüber werden Funktionalitäten der dfv solution arena angestoßen
7201 */
7202$(document).on("dfvSolutionAd", function(event){
7203
7204  const dfv_sol_arena_ad_div = document.getElementById('div_dfvSolutionAd');
7205  const dfv_sol_arena_ad_iframe = document.getElementById('frame_dfvSolutionAd');
7206
7207  const dfv_sol_arena_ad_iframe_width = dfv_sol_arena_ad_iframe.getAttribute('data-width');
7208  const dfv_sol_arena_ad_iframe_height = dfv_sol_arena_ad_iframe.getAttribute('data-height');
7209
7210  dfv_sol_arena_ad_iframe.setAttribute('height',dfv_sol_arena_ad_iframe_height);
7211  dfv_sol_arena_ad_iframe.setAttribute('width',dfv_sol_arena_ad_iframe_width);
7212
7213  dfv_sol_arena_ad_div.classList.remove('noAdHint');
7214
7215});
7216
7217/**
7218 * welcomeAdImageMobil
7219 * WelcomeAd mit Grafik für Mobil, hat Close-Button
7220 */
7221$(document).on('welcomeAdImageMobil', function(event) {
7222
7223  let welcomeAdIframe = document.getElementById('welcomeFrameMobil');
7224
7225  let bodyEl = document.getElementsByTagName("BODY")[0];
7226  let superbannerAd = document.getElementById('renderSlot_Mobil-Superbanner');
7227
7228  let wcCloseButton = document.createElement("button");
7229  let closeBtnTxt = welcomeAdIframe.getAttribute('data-closebtntxt');
7230  let wcCloseButtonText = closeBtnTxt != 'default' ? closeBtnTxt : 'schließen';
7231  wcCloseButton.classList.add("wcCloseButtonMobil");
7232  wcCloseButton.prepend(wcCloseButtonText);
7233
7234  bodyEl.prepend(wcCloseButton);
7235
7236  let adHeight = superbannerAd.clientHeight;
7237
7238  welcomeAdIframe.style.position = "fixed";
7239  welcomeAdIframe.style.zIndex = "-1";
7240  superbannerAd.style.height = adHeight+"px";
7241
7242  wcCloseButton.style.top = adHeight-50+"px";
7243
7244  /*
7245   * Close Button
7246   */
7247  function closeWcVideo() {
7248    superbannerAd.remove();
7249    wcCloseButton.remove();
7250  }
7251
7252  wcCloseButton.addEventListener("click", closeWcVideo);
7253
7254});
7255
7256/**
7257 * be_isClassSet
7258 * @param el
7259 * @param className
7260 * @returns {boolean}
7261 */
7262function be_isClassSet(el,className) {
7263  const element = document.querySelector(el);
7264  if(element.classList.contains(className)) {
7265    return true;
7266  }
7267}
7268
7269/**
7270 * be_html5sitebarResize
7271 * @param sbWidth
7272 * @param sbHeight
7273 */
7274function be_html5sitebarResize(sbWidth, sbHeight) {
7275  const browser_scrollbar_width = 15;
7276  let offsetLeft = 460;
7277  let outerWidth = 980;
7278  const sitebarContainer = '.Ad-skyscraper-right';
7279  if ($('.SiteFooter').length) {
7280    offsetLeft = $('.SiteFooter').offset().left + browser_scrollbar_width;
7281    outerWidth = $('.SiteFooter').outerWidth();
7282  } else if ($('.PageGallery').length) {
7283    offsetLeft = $('.PageGallery').offset().left + browser_scrollbar_width;
7284    outerWidth = $('.PageGallery').outerWidth();
7285  }
7286
7287  let rightOffset = $(this).width() - (offsetLeft + outerWidth);
7288  rightOffset = Math.floor(rightOffset);
7289
7290  if ($(sitebarContainer + ' iframe.responsiveFrame').data("width") > rightOffset ) {
7291    $(sitebarContainer + ' iframe.responsiveFrame').width(rightOffset);
7292
7293    const bannerFrame = document.getElementById("sitebar");
7294    const innerBannerFrame = bannerFrame.contentWindow.document.getElementsByTagName("iframe")[0];
7295
7296    const imgRatio = sbHeight / sbWidth;
7297    const imgHeight = rightOffset * imgRatio;
7298
7299    const bannerImg = innerBannerFrame.contentWindow.document.getElementsByTagName("img")[1];
7300    bannerImg.style.width = rightOffset+"px";
7301    bannerImg.style.height = imgHeight+"px";
7302
7303  }
7304
7305  const sitebarAd = $('.sitebar').parent().parent();
7306  const sitebar = $('.sitebar');
7307  const sitebar_width = sitebar.data('width');
7308
7309
7310  if (sitebar_width > rightOffset ) {
7311    sitebar.width(rightOffset);
7312    sitebarAd.css("width",rightOffset+"px");
7313    sitebar.css("width",rightOffset+"px");
7314
7315    $(document).ready(function(){
7316      const sitebarDOM = sitebar.contents();
7317      sitebarDOM.find("iframe").css("width", rightOffset+"px");
7318      const currWinHeight = $(window).height();
7319      sitebarDOM.find("iframe").css("max-height", currWinHeight+"px");
7320    });
7321  }
7322}
7323
7324$(document).on('html5sitebar',function(event) {
7325
7326  const sitebarAd = $('.sitebar').parent().parent();
7327  const sitebar = $('.sitebar');
7328
7329  if ( sitebar.data('bgcolor') ) {
7330    const bg_color = sitebar.data('bgcolor');
7331    if ( bg_color.startsWith("#") ) {
7332      document.getElementsByTagName('body')[0].style.backgroundColor = bgcolor;
7333    }
7334  }
7335
7336  const sitebar_width = sitebar.data('width');
7337  const sitebar_height = sitebar.data('height');
7338
7339  sitebarAd.css("width",sitebar_width+'px');
7340  sitebarAd.css("max-width",sitebar_width+'px');
7341
7342  const sitebar_fixed = sitebar.data('fixed');
7343  if (sitebar_fixed != 'false') {
7344    sitebarAd.css("position","fixed");
7345  }
7346
7347  setTimeout(function(){
7348    /* Resize sitebar when the window is resized */
7349    $( window ).resize( function() {
7350      be_html5sitebarResize(sitebar_width, sitebar_height);
7351      /* Resize to fix sitebar on page load. */
7352    }).resize();
7353  },1000);
7354
7355});
7356
7357function be_sitebarSwitchResize(wideLayout, sitebarBid, switchPointSky, switchPointSitebar) {
7358  const browser_scrollbar_width = 0;
7359  let offsetLeft = 460;
7360  let outerWidth = 980;
7361  const sitebarContainer = '.Ad-skyscraper-right';
7362  if (($('.SiteFooter').length) && (!wideLayout)) {
7363    offsetLeft = $('.SiteFooter').offset().left + browser_scrollbar_width;
7364    outerWidth = $('.SiteFooter').outerWidth();
7365  } else if (($('.PageGallery').length) && (!wideLayout)) {
7366    offsetLeft = $('.PageGallery').offset().left + browser_scrollbar_width;
7367    outerWidth = $('.PageGallery').outerWidth();
7368  }
7369
7370  if (wideLayout === true) {
7371    let siteHeader = document.querySelector('.SiteHeader');
7372    if (siteHeader) {
7373      let rect = siteHeader.getBoundingClientRect();
7374      offsetLeft = rect.left + browser_scrollbar_width;
7375      let siteHeaderStyles = window.getComputedStyle(siteHeader);
7376      outerWidth = parseFloat(siteHeaderStyles.getPropertyValue('width'));
7377    }
7378  }
7379
7380  let rightOffset = $(this).width() - (offsetLeft + outerWidth);
7381  rightOffset = Math.floor(rightOffset);
7382  const sbContainer = $(sitebarContainer + ' iframe.responsiveFrame');
7383  const sbContainerWidth = sbContainer[0].clientWidth;
7384
7385  if (rightOffset >= switchPointSky ) {
7386    sbContainer.width(switchPointSky);
7387  }
7388  
7389  if (rightOffset > switchPointSitebar ) {
7390    sbContainer.width(rightOffset);
7391  }
7392
7393  const sitebarAd = $('.sitebar').parent().parent();
7394  const sitebar = $('.sitebar');
7395  const sitebar_width = sitebar.data('width');
7396
7397
7398  if (sitebar_width > rightOffset ) {
7399    sitebar.width(rightOffset);
7400    sitebarAd.css("width",rightOffset+"px");
7401    sitebar.css("width",rightOffset+"px");
7402
7403    $(document).ready(function(){
7404      const sitebarDOM = sitebar.contents();
7405      sitebarDOM.find("iframe").css("width", rightOffset+"px");
7406      const currWinHeight = $(window).height();
7407      sitebarDOM.find("iframe").css("max-height", currWinHeight+"px");
7408    });
7409  }
7410}
7411
7412/**
7413 * sitebar-switch
7414 */
7415$(document).on('sitebar-switch', function(event, be_domainsContainerClass, wideLayout) {
7416  function selectSkyAd() {
7417
7418    const sitebarSwitch = document.getElementById("sitebarSwitch");
7419
7420    if (sitebarSwitch) {
7421      const viewtagSkyOrig = sitebarSwitch.getAttribute('data-viewtag_sky');
7422      const clicktagSky = sitebarSwitch.getAttribute('data-clicktag_sky');
7423      const viewtagSitebarOrig = sitebarSwitch.getAttribute('data-viewtag_sb');
7424      const clicktagSitebar = sitebarSwitch.getAttribute('data-clicktag_sb');
7425      const switchPointSky = sitebarSwitch.getAttribute('data-sp_sky');
7426      const switchPointSitebar = sitebarSwitch.getAttribute('data-sp_sb');
7427      const bid = sitebarSwitch.getAttribute('data-bid');
7428      const viewtagSky = removeWptParam(viewtagSkyOrig);
7429      const viewtagSitebar = removeWptParam(viewtagSitebarOrig);
7430
7431      function getContainerClassForHostname(hostname, domainConfig) {
7432        hostname = hostname.toLowerCase();
7433        /* exakte Übereinstimmung? */
7434        if (Object.prototype.hasOwnProperty.call(domainConfig, hostname)) {
7435          return domainConfig[hostname];
7436        }
7437        /* partielle Übereinstimmungen? */
7438        for (const domain of Object.keys(domainConfig)) {
7439          if (hostname.endsWith(domain.toLowerCase())) {
7440            return domainConfig[domain];
7441          }
7442        }
7443        /* default bei keiner Übereinstimmung */
7444        return domainConfig['default'];
7445      }
7446
7447      const currentHostname = window.location.hostname;
7448      const containerClass = getContainerClassForHostname(currentHostname, be_domainsContainerClass);
7449      /* console.log(`Container class für ${currentHostname}: ${containerClass}`); */
7450
7451      const pageFrame = document.querySelector('.' + containerClass);
7452      const skyRight = document.querySelector('.Ad-skyscraper-right');
7453
7454        if (pageFrame && skyRight) {
7455
7456          /* Abstand Bühne zu rechten Rand */
7457
7458          const rect = pageFrame.getBoundingClientRect();
7459          const distanceToRight = window.innerWidth - rect.right;
7460
7461          /* img suchen und src ersetzen */
7462          const sbSwitchDocument = sitebarSwitch.contentDocument || sitebarSwitch.contentWindow.document;
7463          const imgElement = sbSwitchDocument.getElementById('banner-'+bid);
7464
7465          if (distanceToRight >= switchPointSitebar) {
7466            if (imgElement) {
7467              imgElement.src = viewtagSitebar;
7468              console.log('viewtagSitebar in src eingefügt');
7469
7470              skyRight.style.width = 'inherit';
7471
7472              const anchorElement = imgElement.closest('a');
7473              if (anchorElement) {
7474                anchorElement.href = clicktagSitebar;
7475              }
7476            } else {
7477              console.log('Bild nicht gefunden.');
7478            }
7479
7480          } else if (distanceToRight >= switchPointSky && distanceToRight < switchPointSitebar) {
7481            if (imgElement) {
7482              imgElement.src = viewtagSky;
7483              console.log('viewtagSky in src eingefügt');
7484              const anchorElement = imgElement.closest('a');
7485              if (anchorElement) {
7486                anchorElement.href = clicktagSky;
7487              }
7488            } else {
7489              console.log('kein img-Tag gefunden!');
7490            }
7491          }
7492
7493          /* Resize sitebar when the window is resized */
7494          $( window ).resize( function() {
7495            be_sitebarSwitchResize(wideLayout, bid, switchPointSky, switchPointSitebar);
7496            /* Resize to fix sitebar on page load. */
7497          }).resize();
7498
7499        }
7500
7501    }
7502  }
7503
7504  function removeWptParam(imgTag) {
7505
7506    const srcMatch = imgTag.match(/src="([^"]+)"/);
7507
7508    if (!srcMatch) return null;
7509
7510    let src = srcMatch[1];
7511    let [base, query] = src.split('?');
7512    if (!query) return src;
7513
7514    let filteredParams = query.split('&').filter(param => param !== 'wpt=C');
7515    let newSrc = `${base}?${filteredParams.join('&')}`;
7516    return newSrc;
7517  }
7518
7519  const switchObserver = new MutationObserver((mutationsList, observer) => {
7520    if (sitebarSwitch) {
7521      selectSkyAd();
7522      switchObserver.disconnect();
7523    }
7524  });
7525  switchObserver.observe(document.body, { childList: true, subtree: true });
7526
7527});
7528
7529
7530/**
7531 * clsAlignBillboard
7532 */
7533$(document).one("clsAlignBillboard", function(event){
7534  if (be_isClassSet('body','variableSlotHeight')) {
7535    let bannerElm = document.getElementById("renderSlot_Billboard");
7536    if (!bannerElm) { return; }
7537    bannerElm.classList.add("variableSlotHeight");
7538    return;
7539  }
7540  if ($("#renderSlot_Billboard > div > iframe").length){
7541    let bannerFrame = $("#renderSlot_Billboard > div > iframe");
7542    let bannerFrameHeight = bannerFrame.height();
7543    if (bannerFrameHeight < 250) {
7544      let bannerMargin = 250 - Math.round(bannerFrameHeight);
7545      bannerFrame.css('marginTop',bannerMargin);
7546    }
7547  }
7548  if ($("#renderSlot_Mobil-Rectangle-1 > div > iframe").length){
7549    if (be_isClassSet('body','variableSlotHeight')) {
7550      let bannerElm = document.getElementById("renderSlot_Mobil-Billboard");
7551      bannerElm.classList.add("variableSlotHeight");
7552      return;
7553    }
7554    let bannerFrame = $("#renderSlot_Mobil-Rectangle-1 > div > iframe");
7555    let bannerFrameHeight = bannerFrame.height();
7556    if (bannerFrameHeight < 93) {
7557      let bannerMargin = 93 - Math.round(bannerFrameHeight);
7558      bannerFrame.css('marginTop',bannerMargin);
7559    }
7560
7561  }
7562});
7563
7564/**
7565 * ClsAlignSuperbanner
7566 */
7567$(document).one("clsAlignSuperbanner", function(event){
7568  if ($("#renderSlot_Mobil-Superbanner > div > iframe").length) {
7569    if (be_isClassSet('body','variableSlotHeight')) {
7570      let bannerElm = document.getElementById("renderSlot_Mobil-Superbanner");
7571      bannerElm.classList.add("variableSlotHeight");
7572      return;
7573    }
7574    const bannerFrame = $("#renderSlot_Mobil-Superbanner > div > iframe");
7575    const bannerFrameHeight = bannerFrame.height();
7576    if (bannerFrameHeight < 93) {
7577      const bannerMargin = 93 - Math.round(bannerFrameHeight);
7578      bannerFrame.css('marginTop',bannerMargin);
7579    }
7580  }
7581});
7582
7583/**
7584 * alignSkyscraperLeft
7585 */
7586$(document).one("alignSkyscraperLeft", function(event){
7587  if ($("#renderSlot_Skyscraper-links > div > iframe").length) {
7588
7589    let leftSkyEl = document.getElementById("renderSlot_Skyscraper-links");
7590    if (leftSkyEl.classList.contains("leftSitebarSlot")) {
7591      return;
7592    }
7593
7594    let elementSkyLeft = document.querySelector('.Ad-skyscraper-left');
7595    let style = window.getComputedStyle(elementSkyLeft);
7596    let marginLeftSkyLeft = parseFloat(style.getPropertyValue('margin-left'));
7597
7598    const bannerFrame = $("#renderSlot_Skyscraper-links > div > iframe");
7599    let bannerFrameWidth = bannerFrame.data("width");
7600    if (bannerFrameWidth) {
7601      let offset = bannerFrameWidth - Math.abs(marginLeftSkyLeft);
7602      offset = Math.abs(offset);
7603      if (offset <= 20) { /* wenn versucht wurde durch css Abstand zur Bühne herzustellen */
7604        bannerFrameWidth = bannerFrameWidth + offset;
7605      }
7606      $("#renderSlot_Skyscraper-links").css("margin-left","-" + bannerFrameWidth + "px");
7607      $("#renderSlot_Skyscraper-links").css("width", bannerFrameWidth + "px");
7608    }
7609  }
7610});
7611
7612/**
7613 * bbReminder
7614 * Billboard
7615 */
7616$(document).one("bbReminder", function(event){
7617
7618  /* Billboard-Element auswählen */
7619  const billboard = document.getElementById("renderSlot_Billboard");
7620  const billboardIFrame = document.querySelector("#renderSlot_Billboard > div > iframe");
7621  const bBInitialHeight = billboardIFrame.getAttribute('data-height');
7622  let reminderTime = billboardIFrame.getAttribute('data-remtime')*1000;
7623  let reminderImg = billboardIFrame.getAttribute('data-remurl');
7624  let isFirstScroll = true;
7625
7626  window.addEventListener("scroll", function() {
7627    if (isFirstScroll){
7628      /* Billboard-Element fixieren */
7629      billboard.style.position  = "fixed";
7630      billboard.style.top       = "0";
7631      billboard.style.marginTop = "0";
7632      billboard.style.zIndex    = "1100";
7633      billboard.style.left      = "50%";
7634      billboard.style.transform = "translateX(-50%)";
7635
7636      /* Billboard für n Sekunden sichtbar machen */
7637      setTimeout(function(){
7638
7639        const bBiframe    = billboard.querySelector("iframe");
7640        const bBiframeHeight = bBiframe.offsetHeight;
7641        const startHeight = billboard.offsetHeight;
7642        const endHeight   = 0;
7643
7644        /* Animationsschleife starten */
7645        let currentHeight       = startHeight;
7646        const animationDuration = 500; /* Dauer der Animation in Millisekunden */
7647        const frameRate         = 60; /* Bildwiederholrate in Frames pro Sekunde */
7648        const frameDuration     = 1000 / frameRate; /* Dauer eines Frames in Millisekunden */
7649
7650        const animate = () => {
7651          /* Neue Höhe berechnen */
7652          const deltaHeight = (endHeight - startHeight) / (animationDuration / frameDuration);
7653          currentHeight += deltaHeight;
7654
7655          /* Höhe des DIV-Elements und des iFrames aktualisieren */
7656          billboard.style.height = `${currentHeight}px`;
7657          bBiframe.style.height  = `${currentHeight}px`;
7658          billboard.style.top = "0";
7659          billboard.style.top = "0";
7660
7661          /* Animation fortsetzen, bis die Endhöhe erreicht ist */
7662          if(currentHeight > endHeight){
7663            requestAnimationFrame(animate);
7664          }
7665        };
7666
7667        animate();
7668
7669        /* Reminder-Element erstellen und fixieren */
7670        const reminder                 = document.createElement("div");
7671        reminder.id                    = "bBreminder";
7672        reminder.style.position        = "fixed";
7673        reminder.style.top             = "0";
7674        reminder.style.left      = "50%";
7675        reminder.style.transform = "translateX(-50%)";
7676        reminder.style.width           = bBiframe.offsetWidth+"px";
7677        reminder.innerHTML = "<img src='"+ reminderImg +"' alt='Reminder'/>";
7678        reminder.style.zIndex          = "1100";
7679        document.body.appendChild(reminder);
7680
7681        /* Close-Button erstellen */
7682        const closeButton = document.createElement("button");
7683        closeButton.innerHTML = "<i class=\"far fa-times-circle fa-lg\"></i>";
7684        reminder.appendChild(closeButton);
7685        closeButton.setAttribute("id","closeReminder");
7686        const reopen = () => {
7687          /* Neue Höhe berechnen */
7688          const deltaHeight = (endHeight - startHeight) / (animationDuration / frameDuration);
7689          currentHeight -= deltaHeight; /* Hier wird die Höhe verringert, um das Element zu öffnen */
7690
7691          /* Höhe des DIV-Elements und des iFrames aktualisieren */
7692          billboard.style.height = `${currentHeight}px`;
7693          bBiframe.style.height  = `${currentHeight}px`;
7694
7695          /* Animation fortsetzen, bis die Start-Höhe erreicht ist */
7696          if(currentHeight < startHeight){
7697            requestAnimationFrame(reopen);
7698          }
7699        };
7700
7701        let bBopen = false;
7702
7703        function reminderClickHandler() {
7704          if (bBopen) {
7705            animate();
7706            bBopen = false;
7707          } else {
7708            reopen();
7709            bBopen = true;
7710          }
7711        }
7712        /* Klick-Event für den Reminder hinzufügen */
7713        reminder.addEventListener("click", reminderClickHandler);
7714
7715        /* Klick-Event für den CoseButton hinzufügen */
7716        closeButton.addEventListener("click", function(){
7717          /* Billboard-Element zurücksetzen */
7718          reminder.removeEventListener("click", reminderClickHandler);
7719          resizeObserver.disconnect();
7720          billboard.style.height = startHeight+"px";
7721          bBiframe.style.height = bBiframeHeight+"px";
7722          billboard.style.top = "revert";
7723          billboard.style.marginTop = "revert";
7724          billboard.style.zIndex    = "revert";
7725          billboard.style.left      = "revert";
7726          billboard.style.transform = "revert";
7727          billboard.style.position = "revert";
7728          reminder.style.display = "none";
7729        });
7730
7731        /* Funktion zum Aktualisieren der Position von reminder-div */
7732        function updateReminderPosition() {
7733          /* var billboardHeight = billboard.offsetHeight; */
7734          let billboardHeight = bBiframe.offsetHeight;
7735          const billboardWidth = bBiframe.clientWidth;
7736
7737          if (billboardHeight < 12) {
7738            billboardHeight = 0;
7739          }
7740          if (billboardHeight > bBInitialHeight) {
7741            billboardHeight = bBInitialHeight;
7742          }
7743          reminder.style.top = billboardHeight + "px";
7744          reminder.style.width = billboardWidth + "px";
7745        }
7746
7747        const resizeObserver = new ResizeObserver(updateReminderPosition);
7748        resizeObserver.observe(billboard);
7749
7750      }, reminderTime);
7751
7752      isFirstScroll = false;
7753    }
7754
7755  });
7756
7757});
7758
7759/**
7760 * bridgeAd
7761 */
7762$(document).on("bridgeAd", function(event){
7763  const bA_iframe = document.querySelector('.bridgeAdFrame');
7764  const bA_renderSlot = document.querySelector('.Ad-billboard');
7765  bA_renderSlot.classList.add('bridgeAdSlot');
7766});
7767
7768/**
7769 * bridgeAdSticky
7770 */
7771$(document).on("bridgeAdSticky", function(event){
7772  const bA_iframe = document.querySelector('.bridgeAdFrame');
7773  const bA_renderSlot = document.querySelector('.Ad-billboard');
7774  bA_renderSlot.classList.add('bridgeAdSlot');
7775  bA_iframe.classList.add('billboardSticky');
7776});
7777
7778/**
7779 * fullWidthBillboard
7780 */
7781$(document).on("fullWidthBillboard", function(event){
7782  const fw_renderSlot = document.querySelector('#renderSlot_Billboard');
7783  fw_renderSlot.classList.add('fullWidthBillboard');
7784});
7785
7786
7787/**
7788 * Events auch ohne trigger aus template
7789 */
7790window.addEventListener('load', function() {
7791  const billboardHeightEvent = new CustomEvent('billboardHeight');
7792  document.dispatchEvent(billboardHeightEvent);
7793});
7794
7795
7796/**
7797 * Understitial
7798 */
7799$(document).on('understitial',function(event) {
7800
7801  $(document).ready(function() {
7802    let understitialAd = document.querySelector('.understitial').parentNode.parentNode;
7803    let understitialAdWrapper = document.querySelector('.understitial').parentNode;
7804    let understitial = document.getElementsByClassName('understitial')[0];
7805    let us_height           = understitial.getAttribute("data-height");
7806    let us_width           = understitial.getAttribute("data-width");
7807    let setAdText           = understitial.getAttribute("data-setadtext");
7808    let us_btype = 'image';
7809    if (understitial.hasAttribute("data-btype")){
7810      us_btype = understitial.getAttribute("data-btype");
7811    }
7812
7813    function positioniereDiv(firstElm, seconElm) {
7814
7815      let firstElmWidth = firstElm.offsetWidth;
7816      let secondElmWidth = seconElm.offsetWidth;
7817      let firstElmPosition = firstElm.getBoundingClientRect();
7818      let firstElmDistanceLeft = firstElmPosition.left;
7819      let positionLeft = firstElmDistanceLeft + (firstElmWidth - secondElmWidth) / 2;
7820      positionLeft = positionLeft + (secondElmWidth / 2);
7821      seconElm.style.left = positionLeft + 'px';
7822    }
7823
7824    positioniereDiv(understitialAd, understitialAdWrapper);
7825
7826    understitialAd.classList.add("understitialAd");
7827
7828    understitialAdWrapper.style.position = "fixed";
7829    understitialAdWrapper.style.top = '50%';
7830    understitialAdWrapper.style.transform = "translate(-50%, -50%)";
7831    understitialAdWrapper.style.clipPath = "polygon(0 0, 100% 0, 100% 100%, 0 100%)";
7832    understitialAdWrapper.style.overflow = "auto";
7833    understitialAdWrapper.style.textAlign = "center";
7834    if(setAdText) {
7835      understitialAdWrapper.classList.add('Ad_text');
7836    }
7837
7838
7839    if (us_btype == 'stream' || us_btype == 'html5' || us_btype == 'image' || window.innerWidth < 768) {
7840      let outerIframe = document.getElementsByClassName('understitial')[0];
7841      let innerIframe = outerIframe.contentWindow.document.getElementById("usInnerIframe");
7842
7843
7844      /* adjust inner iFrame height and width */
7845      function adjustInnerIframeHeight() {
7846
7847        let understitialAdWidth = understitialAd.offsetWidth;
7848
7849
7850        /* consider possible lateral padding */
7851        let stylesUnderstitialAd = window.getComputedStyle(understitialAd);
7852        let uaPaddingLeft = parseInt(stylesUnderstitialAd.getPropertyValue('padding-left'), 10);
7853        let uaPaddingRight = parseInt(stylesUnderstitialAd.getPropertyValue('padding-right'), 10);
7854        let usMargin = 0;
7855        if (!isNaN(uaPaddingLeft)  || !isNaN(uaPaddingRight)) {
7856          usMargin = uaPaddingLeft + uaPaddingRight;
7857        }
7858
7859        understitialAdWrapper.style.width = understitialAdWidth-usMargin + "px";
7860
7861        outerIframe = document.getElementsByClassName('understitial')[0];
7862        let innerIframe = outerIframe.contentWindow.document.getElementById("usInnerIframe");
7863        if (innerIframe !== null) {
7864          let outerIframeHeight    = outerIframe.offsetHeight;
7865          innerIframe.style.height = outerIframeHeight + "px";
7866        }
7867
7868        /* adjust Banner Image TBD */
7869        let understitialHeight    = understitial.offsetHeight;
7870        let screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
7871        let screenHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
7872
7873        if ((understitialHeight >= (screenHeight - 70)) && (window.innerWidth > 768)) {
7874          const headerEl = document.querySelector('.SiteHeaderSticky');
7875          let heightDiff = understitialHeight - screenHeight;
7876
7877          if (headerEl) {
7878            const headerElHeight = 70;
7879            let smallerheight        = understitialHeight - headerElHeight*2 - heightDiff -35;
7880            let centerImage = understitial.contentDocument.querySelector('#understitialImage');
7881            understitial.style.height = Math.round(smallerheight) + "px";
7882            centerImage.style.height = Math.round(smallerheight) + "px";
7883          }
7884        } else {
7885          let centerImage = understitial.contentDocument.querySelector('#understitialImage');
7886          if (centerImage) {
7887            understitial.style.height = centerImage.offsetHeight + "px";
7888          }
7889        }
7890
7891        /* center understitial */
7892        understitialAdWrapper.style.textAlign = "center";
7893
7894        if (us_btype == 'html5') {
7895          innerIframe = outerIframe.contentDocument.querySelector('iframe');
7896          let innerIframeHeight = innerIframe.offsetHeight;
7897          let innerIframeWidth = innerIframe.offsetWidth;
7898
7899          /* get Height of pseudoelement before */
7900          let understitialAdWrapperBeforeStyle = window.getComputedStyle(understitialAdWrapper, '::before');
7901          let understitialAdWrapperHeight = parseInt(understitialAdWrapperBeforeStyle.getPropertyValue('height'), 10);
7902
7903          /* smaller width and height for iOS */
7904          const userAgent = navigator.userAgent;
7905
7906          if (userAgent.includes("iPhone")) {
7907            let smallerWidth        = innerIframeWidth - (innerIframeWidth * 0.15);
7908            innerIframe.style.width = Math.round(smallerWidth) + "px";
7909
7910          }
7911
7912          /* set height again and center content */
7913          understitialAdWrapper.style.height = innerIframeHeight + understitialAdWrapperHeight + "px";
7914          innerIframe.style.margin = "0 auto";
7915          understitialAdWrapper.style.overflow = "hidden";
7916        }
7917
7918      }
7919      adjustInnerIframeHeight();
7920      outerIframe.addEventListener("load", adjustInnerIframeHeight);
7921    }
7922
7923  });
7924});
7925
7926/* if BTA-Homepage-Aufmacher is empty then display= none */
7927document.addEventListener('DOMContentLoaded', function() {
7928  setTimeout(() => {
7929    const btaHomepageSlot = document.getElementById('renderSlot_BTA-Homepage-Aufmacher');
7930    const btaSubstitute = document.querySelector('article.btaSubstitute');
7931
7932    if (btaHomepageSlot) {
7933      const firstChild = btaHomepageSlot.firstElementChild;
7934
7935      if (!firstChild || firstChild.tagName !== 'DIV') {
7936        const btaArticle = document.querySelector('article.BTA-Homepage-Aufmacher');
7937        if (btaArticle) {
7938          btaArticle.style.display = 'none';
7939        }
7940        if (btaSubstitute) {
7941          btaSubstitute.style.display = 'block';
7942        }
7943      }
7944    }
7945  }, 1500);
7946});
7947
7948/* if BTA-Homepage-Nachrichten is empty then display= none */
7949document.addEventListener('DOMContentLoaded', function() {
7950  setTimeout(() => {
7951    const btaHomepageNachrichtenSlot = document.getElementById('renderSlot_BTA-Homepage-Nachrichten');
7952    const btaArticle = document.querySelector('.BTA-Homepage-Nachrichten');
7953
7954    if (btaHomepageNachrichtenSlot) {
7955      const firstChild = btaHomepageNachrichtenSlot.firstElementChild;
7956
7957      if (!firstChild || firstChild.tagName !== 'DIV') {
7958        if (btaArticle) {
7959          btaArticle.style.display = 'none';
7960        }
7961
7962      } else {
7963
7964        const section = document.querySelector('section.StageNewsAutoManualMostread');
7965        if (section) {
7966          const itemsContainer = section.querySelector('.StageNewsAutoManualMostread_items');
7967          if (itemsContainer) {
7968            const items = itemsContainer.querySelectorAll('.StageNewsAutoManualMostread_item');
7969            if (items.length >= 6) {
7970              /* selektiere 6. Element */
7971              const btaSubstitute = items[5];
7972              btaSubstitute.style.display = 'none';
7973              console.log('Das 6. Element:', btaSubstitute);
7974            } else {
7975              /* console.log('weniger als 6 Elemente mit Klasse "StageNewsAutoManualMostread_item".'); */
7976            }
7977          } else {
7978            /* console.log('Element mit Klasse "StageNewsAutoManualMostread_items" nicht gefunden.'); */
7979          }
7980        } else {
7981          /* console.log('<section>-Element mit Klasse "StageNewsAutoManualMostread" nicht gefunden.'); */
7982        }
7983
7984      }
7985    }
7986  }, 1500);
7987});
7988
7989/* if both BTA-asides are empty then display= none */
7990document.addEventListener('DOMContentLoaded', function() {
7991  setTimeout(() => {
7992    const btaasideSlot1 = document.getElementById('BTA-Artikeldetail-aSide-1');
7993    const btaasideSlot2 = document.getElementById('BTA-Artikeldetail-aSide-2');
7994
7995    function isValidDiv(child) {
7996      return (
7997        child &&
7998        child.tagName === 'DIV' &&
7999        child.innerHTML.trim() !== ''
8000      );
8001    }
8002
8003    let isSlot1Valid = false;
8004    let isSlot2Valid = false;
8005
8006    if (btaasideSlot1) {
8007      const firstChild1 = btaasideSlot1.firstElementChild;
8008      isSlot1Valid = isValidDiv(firstChild1);
8009    }
8010
8011    if (btaasideSlot2) {
8012      const firstChild2 = btaasideSlot2.firstElementChild;
8013      isSlot2Valid = isValidDiv(firstChild2);
8014    }
8015
8016    if (!isSlot1Valid && !isSlot2Valid) {
8017      const asideContainer = document.querySelector('.btaAsideContainer');
8018      if (asideContainer) {
8019        asideContainer.style.display = 'none';
8020      }
8021    }
8022
8023  }, 1500);
8024});
8025
8026var adition = adition || {};
8027adition.srq = adition.srq || [];
8028
8029
8030
8031/* ----- DOCUMENT READY FUNCTION ------ */
8032
8033$(function() {
8034  
8035  if (!$("Body.BodyGallery").length ) {
8036    // Sticky Header nicht in Galerie-Detailseiten
8037
8038      $(window).on('scroll resize touchmove',function(){
8039        stickybegins = $(".SiteHeader").offset().top + $(".SiteHeader").height();
8040
8041        if($(this).scrollTop()>stickybegins && window.innerWidth>768){
8042          $('.SiteHeaderSticky').fadeIn();
8043        }else{
8044          $('.SiteHeaderSticky').fadeOut();
8045        }
8046      });
8047
8048
8049  }
8050
8051  
8052} );
8053 
8054

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.