1 2/** 3 * Summary: To init the Cookiemessage 4 * 5 * Description: To init the Cookiemessage 6 * 7 * DATE: 20.09.17 8 * 9 * @author 10 * oaltmann <[email protected]> 11 * 12 * @copyright 13 * © by TANDEM Kommunikation GmbH: This Software is the property of 14 * TANDEM Kommuniktion GmbH and is protected by copyright law â it is NOT Freeware. 15 * 16 */ 17;(function ($) { 18 19 "use strict"; 20 21 /** 22 * Summary: Main Object 23 * 24 * Description: All functions and Settings 25 * 26 */ 27 $.fn.cookiemessage = function (options) { 28 /** 29 * Summary: Settings 30 * 31 * Description: Plugin settings 32 * 33 */ 34 options = $.extend({}, $.fn.cookiemessage.defaults, options); 35 36 var publicFunctions = { 37 /** 38 * Summary: Init Function 39 * 40 * Description: To controll the functions 41 * 42 */ 43 init: function () { 44 /** 45 * Summary: Init functions 46 */ 47 this.addCookie(); 48 }, 49 50 51 addCookie: function (){ 52 var obj = this; 53 /* 54 * Check the Cookie Name to exist 55 */ 56 var myCookie = obj.getCookie(options.cookieName); 57 58 59 if (myCookie === null) { 60 /* 61 * The Cookie is not set: Show the container 62 */ 63 $(options.container).animate({ 64 top: 0, 65 opacity: 1 66 }, 1000, "linear"); 67 68 /* 69 * Init the Click Event 70 */ 71 $(options.button).bind('click', function (evt) { 72 73 evt.preventDefault && evt.preventDefault(); 74 evt.returnValue = false; 75 76 /* 77 * Check whether a cookie is set or not 78 * If is not set, create the Cookie 79 **/ 80 obj.setCookie(options.cookieName, 'yes', options.expireDays, options.domain, options.path); 81 82 /* 83 * By Click hide the container 84 */ 85 $(options.container).animate({ 86 top: -300, 87 opacity: 0 88 }, 1000, "linear").delay(1000); 89 90 /* 91 * Remove the container after hide 92 */ 93 setTimeout(function() { 94 95 $(options.container).remove(); 96 97 }, 1000); 98 99 }); 100 } else { 101 /* 102 * The Cookie is set: remove the container 103 */ 104 $(options.container).remove(); 105 } 106 }, 107 // Trigger function 108 setCookie: function (name, value, expiryDays, domain, path) { 109 110 expiryDays = expiryDays || 365; 111 112 var exdate = new Date(); 113 exdate.setDate(exdate.getDate() + expiryDays); 114 115 var cookie = [ 116 name + '=' + value, 117 'expires=' + exdate.toUTCString(), 118 'path=' + path || '/' 119 ]; 120 121 if (domain) { 122 cookie.push( 123 'domain=' + domain 124 ); 125 } 126 127 document.cookie = cookie.join(';'); 128 }, 129 130 // Trigger function 131 getCookie: function (cookieName) { 132 133 var dc = document.cookie; 134 var prefix = cookieName + "="; 135 var begin = dc.indexOf("; " + prefix); 136 137 if (begin === -1) { 138 begin = dc.indexOf(prefix); 139 if (begin !== 0) return null; 140 } 141 else { 142 begin += 2; 143 var end = document.cookie.indexOf(";", begin); 144 if (end === -1) { 145 end = dc.length; 146 } 147 } 148 return unescape(dc.substring(begin + prefix.length, end)); 149 } 150 }; 151 152 //Our output is ready, if we want our plugin to execute a 153 //function whenever it called we do it now 154 publicFunctions.init(); 155 156 //And the final critical step, return our object output to 157 //the plugin 158 return publicFunctions; 159 }; 160 161 /** 162 * Summary:Public variable for the Plugin 163 * 164 * Description: All public variable 165 * 166 */ 167 $.fn.cookiemessage.defaults = { 168 // Container classes 169 container : '.cookiehint', 170 cookieName: 'tandemCookiehint', 171 172 // Trigger classes 173 button : '.set-cookie', 174 175 // options 176 expireDays: 365, 177 domain : null, //default to current domain 178 path : '/' 179 }; 180})(jQuery); 181 182; 183(function($) { 184 $.fn.tanResTables = function(options) { 185 var defaults = { 186 breakpoint : 768 187 }, $selElement = this, tanResTables = { 188 opt : '', 189 dataContent : '', 190 globalWidth : 0, 191 init : function() { 192 this.opt = $.extend(defaults, options); 193 tanResTables.targetTable(); 194 }, 195 targetTable : function() { 196 var that = this; 197 $selElement.find('tr').each(function() { 198 $(this).find('td').each(function(i, v) { 199 that.checkForTableHead($(this), i); 200 $(this).addClass('tdno' + i); 201 }); 202 }); 203 }, 204 checkForTableHead : function(element, index) { 205 if ($selElement.find('th').length) { 206 this.dataContent = $selElement.find('th')[index].textContent; 207 } else { 208 this.dataContent = $selElement.find('tr:first td')[index].textContent; 209 } 210 211 var breakPointSwitch = this.opt.breakpoint; 212 var cellsDataContent = this.dataContent; 213 var windowWidth = $(window).width(); 214 215 if (breakPointSwitch > windowWidth) { 216 217 if (!element.parent().is("div.phantom-row")) { 218 219 element.wrap('<div class="phantom-row clearfix"></div>').before('<td class="phantom-cell ptdno' + index + '">' + cellsDataContent + '</td>'); 220 221 } 222 223 } 224 225 $(window).resize(function() { 226 227 if ($(window).width() != windowWidth) { 228 229 windowWidth = $(window).width(); 230 231 if (breakPointSwitch > windowWidth) { 232 233 if (!element.parent().is("div.phantom-row")) { 234 235 element.wrap('<div class="phantom-row clearfix"></div>').before('<td class="phantom-cell ptdno' + index + '">' + cellsDataContent + '</td>'); 236 237 } 238 239 } else { 240 241 if (element.parent().is("div.phantom-row")) { 242 243 element.unwrap('<div class="phantom-row clearfix"></div>').prev('td.phantom-cell').remove(); 244 245 } 246 247 } 248 249 } 250 251 }); 252 253 } 254 }; 255 256 $(function() { 257 tanResTables.init(); 258 }); 259 260 return this; 261 }; 262 263}(jQuery)); 264/*! Backstretch - v2.0.4 - 2013-06-19 265* http://srobbin.com/jquery-plugins/backstretch/ 266* Copyright (c) 2013 Scott Robbin; Licensed MIT */
267(function(a,d,p){a.fn.backstretch=function(c,b){(c===p||0===c.length)&&a.error("No images were supplied for Backstretch");0===a(d).scrollTop()&&d.scrollTo(0,0);return this.each(function(){var d=a(this),g=d.data("backstretch");if(g){if("string"==typeof c&&"function"==typeof g[c]){g[c](b);return}b=a.extend(g.options,b);g.destroy(!0)}g=new q(this,c,b);d.data("backstretch",g)})};a.backstretch=function(c,b){return a("body").backstretch(c,b).data("backstretch")};a.expr[":"].backstretch=function(c){return a(c).data("backstretch")!==p};a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5E3,fade:0};var r={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},q=function(c,b,e){this.options=a.extend({},a.fn.backstretch.defaults,e||{});this.images=a.isArray(b)?b:[b];a.each(this.images,function(){a("<img />")[0].src=this});this.isBody=c===document.body;this.$container=a(c);this.$root=this.isBody?l?a(d):a(document):this.$container;c=this.$container.children(".backstretch").first();this.$wrap=c.length?c:a('<div class="backstretch"></div>').css(r).appendTo(this.$container);this.isBody||(c=this.$container.css("position"),b=this.$container.css("zIndex"),this.$container.css({position:"static"===c?"relative":c,zIndex:"auto"===b?0:b,background:"none"}),this.$wrap.css({zIndex:-999998}));this.$wrap.css({position:this.isBody&&l?"fixed":"absolute"});this.index=0;this.show(this.index);a(d).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===d.pageYOffset&&(d.scrollTo(0,1),this.resize())},this))};q.prototype={resize:function(){try{var a={left:0,top:0},b=this.isBody?this.$root.width():this.$root.innerWidth(),e=b,g=this.isBody?d.innerHeight?d.innerHeight:this.$root.height():this.$root.innerHeight(),j=e/this.$img.data("ratio"),f;j>=g?(f=(j-g)/2,this.options.centeredY&&(a.top="-"+f+"px")):(j=g,e=j*this.$img.data("ratio"),f=(e-b)/2,this.options.centeredX&&(a.left="-"+f+"px"));this.$wrap.css({width:b,height:g}).find("img:not(.deleteable)").css({width:e,height:j}).css(a)}catch(h){}return this},show:function(c){if(!(Math.abs(c)>this.images.length-1)){var b=this,e=b.$wrap.find("img").addClass("deleteable"),d={relatedTarget:b.$container[0]};b.$container.trigger(a.Event("backstretch.before",d),[b,c]);this.index=c;clearInterval(b.interval);b.$img=a("<img />").css(s).bind("load",function(f){var h=this.width||a(f.target).width();f=this.height||a(f.target).height();a(this).data("ratio",h/f);a(this).fadeIn(b.options.speed||b.options.fade,function(){e.remove();b.paused||b.cycle();a(["after","show"]).each(function(){b.$container.trigger(a.Event("backstretch."+this,d),[b,c])})});b.resize()}).appendTo(b.$wrap);b.$img.attr("src",b.images[c]);return b}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){this.paused=!0;return this},resume:function(){this.paused=!1;this.next();return this},cycle:function(){1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration));return this},destroy:function(c){a(d).off("resize.backstretch orientationchange.backstretch");clearInterval(this.interval);c||this.$wrap.remove();this.$container.removeData("backstretch")}};var l,f=navigator.userAgent,m=navigator.platform,e=f.match(/AppleWebKit\/([0-9]+)/),e=!!e&&e[1],h=f.match(/Fennec\/([0-9]+)/),h=!!h&&h[1],n=f.match(/Opera Mobi\/([0-9]+)/),t=!!n&&n[1],k=f.match(/MSIE ([0-9]+)/),k=!!k&&k[1];l=!((-1<m.indexOf("iPhone")||-1<m.indexOf("iPad")||-1<m.indexOf("iPod"))&&e&&534>e||d.operamini&&"[object OperaMini]"==={}.toString.call(d.operamini)||n&&7458>t||-1<f.indexOf("Android")&&e&&533>e||h&&6>h||"palmGetResource"in d&&e&&534>e||-1<f.indexOf("MeeGo")&&-1<f.indexOf("NokiaBrowser/8.5.0")||k&&6>=k)})(jQuery,window); 268/* 269 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 270 * 271 * Uses the built in easing capabilities added In jQuery 1.1 272 * to offer multiple easing options 273 *
274 * TERMS OF USE - EASING EQUATIONS 275 * 276 * Open source under the BSD License. 277 * 278 * Copyright ̩̉ 2001 Robert Penner 279 * All rights reserved. 280 * 281 * TERMS OF USE - jQuery Easing 282 * 283 * Open source under the BSD License. 284 * 285 * Copyright ̩̉ 2008 George McGinley Smith 286 * All rights reserved. 287 * 288 * Redistribution and use in source and binary forms, with or without modification, 289 * are permitted provided that the following conditions are met: 290 * 291 * Redistributions of source code must retain the above copyright notice, this list of 292 * conditions and the following disclaimer. 293 * Redistributions in binary form must reproduce the above copyright notice, this list 294 * of conditions and the following disclaimer in the documentation and/or other materials 295 * provided with the distribution. 296 * 297 * Neither the name of the author nor the names of contributors may be used to endorse 298 * or promote products derived from this software without specific prior written permission. 299 * 300 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 301 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 302 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 303 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 304 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 305 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 306 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 307 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 308 * OF THE POSSIBILITY OF SUCH DAMAGE. 309 * 310*/ 311jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}}); 312/*! 313 * Simple jQuery Equal Heights 314 * 315 * Copyright (c) 2013 Matt Banks 316 * Dual licensed under the MIT and GPL licenses. 317 * Uses the same license as jQuery, see: 318 * http://docs.jquery.com/License 319 * 320 * @version 1.5.1 321 */ 322(function ($) { 323 $.fn.equalHeights = function () { 324 var maxHeight = 0, 325 $this = $(this); 326 327 $this.each(function () { 328 var height = $(this).innerHeight(); 329 330 if (height > maxHeight) { 331 maxHeight = height; 332 } 333 }); 334 335 return $this.css('height', maxHeight); 336 }; 337 338 // auto-initialize plugin 339 $('[data-equal]').each(function () { 340 var $this = $(this), 341 target = $this.data('equal'); 342 $this.find(target).equalHeights(); 343 }); 344})(jQuery); 345 346jQuery(document).ready(function () { 347 jQuery('.equal-height').css("height", "auto"); 348 jQuery('.equal-height').each(function(index, el){ 349 jQuery(el).parents('.row').find('.equal-height').equalHeights(); 350 }); 351}); 352jQuery(window).resize(function(){ 353 jQuery('.equal-height').css("height", "auto"); 354 jQuery('.equal-height').each(function(index, el){ 355 jQuery(el).parents('.row').find('.equal-height').equalHeights(); 356 }); 357}) 358/*! Lazy Load 1.9.3 - MIT license - Copyright 2010-2013 Mika Tuupola */ 359!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;
359return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document); 360(function($) { 361 $.fn.changeElType = function(newType) { 362 var attrs = {}; 363 if (!(this[0] && this[0].attributes)) 364 return; 365 366 $.each(this[0].attributes, function(idx, attr) { 367 attrs[attr.nodeName] = attr.value; 368 }); 369 this.replaceWith(function() { 370 return $("<" + newType + "/>", attrs).append($(this).contents()); 371 }); 372 } 373})(jQuery); 374/*! 375* jQuery Cycle2; version: 2.1.6 build: 20141007 376* http://jquery.malsup.com/cycle2/ 377* Copyright (c) 2014 M. Alsup; Dual licensed: MIT/GPL 378*/ 379!function(a){"use strict";function b(a){return(a||"").toLowerCase()}var c="2.1.6";a.fn.cycle=function(c){var d;return 0!==this.length||a.isReady?this.each(function(){var d,e,f,g,h=a(this),i=a.fn.cycle.log;if(!h.data("cycle.opts")){(h.data("cycle-log")===!1||c&&c.log===!1||e&&e.log===!1)&&(i=a.noop),i("--c2 init--"),d=h.data();for(var j in d)d.hasOwnProperty(j)&&/^cycle[A-Z]+/.test(j)&&(g=d[j],f=j.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,b),i(f+":",g,"("+typeof g+")"),d[f]=g);e=a.extend({},a.fn.cycle.defaults,d,c||{}),e.timeoutId=0,e.paused=e.paused||!1,e.container=h,e._maxZ=e.maxZ,e.API=a.extend({_container:h},a.fn.cycle.API),e.API.log=i,e.API.trigger=function(a,b){return e.container.trigger(a,b),e.API},h.data("cycle.opts",e),h.data("cycle.API",e.API),e.API.trigger("cycle-bootstrap",[e,e.API]),e.API.addInitialSlides(),e.API.preInitSlideshow(),e.slides.length&&e.API.initSlideshow()}}):(d={s:this.selector,c:this.context},a.fn.cycle.log("requeuing slideshow (dom not ready)"),a(function(){a(d.s,d.c).cycle(c)}),this)},a.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var b=this.opts(),c=b.slides;b.slideCount=0,b.slides=a(),c=c.jquery?c:b.container.find(c),b.random&&c.sort(function(){return Math.random()-.5}),b.API.add(c)},preInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-pre-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.preInit)&&c.preInit(b),b._preInitialized=!0},postInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-post-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.postInit)&&c.postInit(b)},initSlideshow:function(){var b,c=this.opts(),d=c.container;c.API.calcFirstSlide(),"static"==c.container.css("position")&&c.container.css("position","relative"),a(c.slides[c.currSlide]).css({opacity:1,display:"block",visibility:"visible"}),c.API.stackSlides(c.slides[c.currSlide],c.slides[c.nextSlide],!c.reverse),c.pauseOnHover&&(c.pauseOnHover!==!0&&(d=a(c.pauseOnHover)),d.hover(function(){c.API.pause(!0)},function(){c.API.resume(!0)})),c.timeout&&(b=c.API.getSlideOpts(c.currSlide),c.API.queueTransition(b,b.timeout+c.delay)),c._initialized=!0,c.API.updateView(!0),c.API.trigger("cycle-initialized",[c]),c.API.postInitSlideshow()}
vendor: 17,336 bytes, lines 379-386
379,pause:function(b){var c=this.opts(),d=c.API.getSlideOpts(),e=c.hoverPaused||c.paused;b?c.hoverPaused=!0:c.paused=!0,e||(c.container.addClass("cycle-paused"),c.API.trigger("cycle-paused",[c]).log("cycle-paused"),d.timeout&&(clearTimeout(c.timeoutId),c.timeoutId=0,c._remainingTimeout-=a.now()-c._lastQueue,(c._remainingTimeout<0||isNaN(c._remainingTimeout))&&(c._remainingTimeout=void 0)))},resume:function(a){var b=this.opts(),c=!b.hoverPaused&&!b.paused;a?b.hoverPaused=!1:b.paused=!1,c||(b.container.removeClass("cycle-paused"),0===b.slides.filter(":animated").length&&b.API.queueTransition(b.API.getSlideOpts(),b._remainingTimeout),b.API.trigger("cycle-resumed",[b,b._remainingTimeout]).log("cycle-resumed"))},add:function(b,c){var d,e=this.opts(),f=e.slideCount,g=!1;"string"==a.type(b)&&(b=a.trim(b)),a(b).each(function(){var b,d=a(this);c?e.container.prepend(d):e.container.append(d),e.slideCount++,b=e.API.buildSlideOpts(d),e.slides=c?a(d).add(e.slides):e.slides.add(d),e.API.initSlide(b,d,--e._maxZ),d.data("cycle.opts",b),e.API.trigger("cycle-slide-added",[e,b,d])}),e.API.updateView(!0),g=e._preInitialized&&2>f&&e.slideCount>=1,g&&(e._initialized?e.timeout&&(d=e.slides.length,e.nextSlide=e.reverse?d-1:1,e.timeoutId||e.API.queueTransition(e)):e.API.initSlideshow())},calcFirstSlide:function(){var a,b=this.opts();a=parseInt(b.startingSlide||0,10),(a>=b.slides.length||0>a)&&(a=0),b.currSlide=a,b.reverse?(b.nextSlide=a-1,b.nextSlide<0&&(b.nextSlide=b.slides.length-1)):(b.nextSlide=a+1,b.nextSlide==b.slides.length&&(b.nextSlide=0))},calcNextSlide:function(){var a,b=this.opts();b.reverse?(a=b.nextSlide-1<0,b.nextSlide=a?b.slideCount-1:b.nextSlide-1,b.currSlide=a?0:b.nextSlide+1):(a=b.nextSlide+1==b.slides.length,b.nextSlide=a?0:b.nextSlide+1,b.currSlide=a?b.slides.length-1:b.nextSlide-1)},calcTx:function(b,c){var d,e=b;return e._tempFx?d=a.fn.cycle.transitions[e._tempFx]:c&&e.manualFx&&(d=a.fn.cycle.transitions[e.manualFx]),d||(d=a.fn.cycle.transitions[e.fx]),e._tempFx=null,this.opts()._tempFx=null,d||(d=a.fn.cycle.transitions.fade,e.API.log('Transition "'+e.fx+'" not found. Using fade.')),d},prepareTx:function(a,b){var c,d,e,f,g,h=this.opts();return h.slideCount<2?void(h.timeoutId=0):(!a||h.busy&&!h.manualTrump||(h.API.stopTransition(),h.busy=!1,clearTimeout(h.timeoutId),h.timeoutId=0),void(h.busy||(0!==h.timeoutId||a)&&(d=h.slides[h.currSlide],e=h.slides[h.nextSlide],f=h.API.getSlideOpts(h.nextSlide),g=h.API.calcTx(f,a),h._tx=g,a&&void 0!==f.manualSpeed&&(f.speed=f.manualSpeed),h.nextSlide!=h.currSlide&&(a||!h.paused&&!h.hoverPaused&&h.timeout)?(h.API.trigger("cycle-before",[f,d,e,b]),g.before&&g.before(f,d,e,b),c=function(){h.busy=!1,h.container.data("cycle.opts")&&(g.after&&g.after(f,d,e,b),h.API.trigger("cycle-after",[f,d,e,b]),h.API.queueTransition(f),h.API.updateView(!0))},h.busy=!0,g.transition?g.transition(f,d,e,b,c):h.API.doTransition(f,d,e,b,c),h.API.calcNextSlide(),h.API.updateView()):h.API.queueTransition(f))))},doTransition:function(b,c,d,e,f){var g=b,h=a(c),i=a(d),j=function(){i.animate(g.animIn||{opacity:1},g.speed,g.easeIn||g.easing,f)};i.css(g.cssBefore||{}),h.animate(g.animOut||{},g.speed,g.easeOut||g.easing,function(){h.css(g.cssAfter||{}),g.sync||j()}),g.sync&&j()},queueTransition:function(b,c){var d=this.opts(),e=void 0!==c?c:b.timeout;return 0===d.nextSlide&&0===--d.loop?(d.API.log("terminating; loop=0"),d.timeout=0,e?setTimeout(function(){d.API.trigger("cycle-finished",[d])},e):d.API.trigger("cycle-finished",[d]),void(d.nextSlide=d.currSlide)):void 0!==d.continueAuto&&(d.continueAuto===!1||a.isFunction(d.continueAuto)&&d.continueAuto()===!1)?(d.API.log("terminating automatic transitions"),d.timeout=0,void(d.timeoutId&&clearTimeout(d.timeoutId))):void(e&&(d._lastQueue=a.now(),void 0===c&&(d._remainingTimeout=b.timeout),d.paused||d.hoverPaused||(d.timeoutId=setTimeout(function(){d.API.prepareTx(!1,!d.reverse)},e))))},stopTransition:function(){var a=this.opts();a.slides.filter(":animated").length&&(a.slides.stop(!1,!0),a.API.trigger("cycle-transition-stopped",[a])),a._tx&&a._tx.stopTransition&&a._tx.stopTransition(a)},advanceSlide:function(a){var b=this.opts();return clearTimeout(b.timeoutId),b.timeoutId=0,b.nextSlide=b.currSlide+a,b.nextSlide<0?b.nextSlide=b.slides.length-1:b.nextSlide>=b.slides.length&&(b.nextSlide=0),b.API.prepareTx(!0,a>=0),!1},buildSlideOpts:function(c){var d,e,f=this.opts(),g=c.data()||{};for(var h in g)g.hasOwnProperty(h)&&/^cycle[A-Z]+/.test(h)&&(d=g[h],e=h.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,b),f.API.log("["+(f.slideCount-1)+"]",e+":",d,"("+typeof d+")"),g[e]=d);g=a.extend({},a.fn.cycle.defaults,f,g),g.slideNum=f.slideCount;try{delete g.API,delete g.slideCount,delete g.currSlide,delete g.nextSlide,delete g.slides}catch(i){}return g},getSlideOpts:function(b){var c=this.opts();void 0===b&&(b=c.currSlide);var d=c.slides[b],e=a(d).data("cycle.opts");return a.extend({},c,e)},initSlide:function(b,c,d){var e=this.opts();c.css(b.slideCss||{}),d>0&&c.css("zIndex",d),isNaN(b.speed)&&(b.speed=a.fx.speeds[b.speed]||a.fx.speeds._default),b.sync||(b.speed=b.speed/2),c.addClass(e.slideClass)},updateView:function(a,b){var c=this.opts();if(c._initialized){var d=c.API.getSlideOpts(),e=c.slides[c.currSlide];!a&&b!==!0&&(c.API.trigger("cycle-update-view-before",[c,d,e]),c.updateView<0)||(c.slideActiveClass&&c.slides.removeClass(c.slideActiveClass).eq(c.currSlide).addClass(c.slideActiveClass),a&&c.hideNonActive&&c.slides.filter(":not(."+c.slideActiveClass+")").css("visibility","hidden"),0===c.updateView&&setTimeout(function(){c.API.trigger("cycle-update-view",[c,d,e,a])},d.speed/(c.sync?2:1)),0!==c.updateView&&c.API.trigger("cycle-update-view",[c,d,e,a]),a&&c.API.trigger("cycle-update-view-after",[c,d,e]))}},getComponent:function(b){var c=this.opts(),d=c[b];return"string"==typeof d?/^\s*[\>|\+|~]/.test(d)?c.container.find(d):a(d):d.jquery?d:a(d)},stackSlides:function(b,c,d){var e=this.opts();b||(b=e.slides[e.currSlide],c=e.slides[e.nextSlide],d=!e.reverse),a(b).css("zIndex",e.maxZ);var f,g=e.maxZ-2,h=e.slideCount;if(d){for(f=e.currSlide+1;h>f;f++)a(e.slides[f]).css("zIndex",g--);for(f=0;f<e.currSlide;f++)a(e.slides[f]).css("zIndex",g--)}else{for(f=e.currSlide-1;f>=0;f--)a(e.slides[f]).css("zIndex",g--);for(f=h-1;f>e.currSlide;f--)a(e.slides[f]).css("zIndex",g--)}a(c).css("zIndex",e.maxZ-1)},getSlideIndex:function(a){return this.opts().slides.index(a)}},a.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},a.fn.cycle.version=function(){return"Cycle2: "+c},a.fn.cycle.transitions={custom:{},none:{before:function(a,b,c,d){a.API.stackSlides(c,b,d),a.cssBefore={opacity:1,visibility:"visible",display:"block"}}},fade:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:0,visibility:"visible",display:"block"}),b.animIn={opacity:1},b.animOut={opacity:0}}},fadeout:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:1,visibility:"visible",display:"block"}),b.animOut={opacity:0}}},scrollHorz:{before:function(a,b,c,d){a.API.stackSlides(b,c,d);var e=a.container.css("overflow","hidden").width();a.cssBefore={left:d?e:-e,top:0,opacity:1,visibility:"visible",display:"block"},a.cssAfter={zIndex:a._maxZ-2,left:0},a.animIn={left:0},a.animOut={left:d?-e:e}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})}(jQuery),/*! Cycle2 autoheight plugin; Copyright (c) M.Alsup, 2012; version: 20130913 */ 380function(a){"use strict";function b(b,d){var e,f,g,h=d.autoHeight;if("container"==h)f=a(d.slides[d.currSlide]).outerHeight(),d.container.height(f);else if(d._autoHeightRatio)d.container.height(d.container.width()/d._autoHeightRatio);else if("calc"===h||"number"==a.type(h)&&h>=0){if(g="calc"===h?c(b,d):h>=d.slides.length?0:h,g==d._sentinelIndex)return;d._sentinelIndex=g,d._sentinel&&d._sentinel.remove(),e=a(d.slides[g].cloneNode(!0)),e.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),e.css({position:"static",visibility:"hidden",display:"block"}).prependTo(d.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),e.find("*").css("visibility","hidden"),d._sentinel=e}}function c(b,c){var d=0,e=-1;return c.slides.each(function(b){var c=a(this).height();c>e&&(e=c,d=b)}),d}function d(b,c,d,e){var f=a(e).outerHeight();c.container.animate({height:f},c.autoHeightSpeed,c.autoHeightEasing)}function e(c,f){f._autoHeightOnResize&&(a(window).off("resize orientationchange",f._autoHeightOnResize),f._autoHeightOnResize=null),f.container.off("cycle-slide-added cycle-slide-removed",b),f.container.off("cycle-destroyed",e),f.container.off("cycle-before",d),f._sentinel&&(f._sentinel.remove(),f._sentinel=null)}a.extend(a.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),a(document).on("cycle-initialized",function(c,f){function g(){b(c,f)}var h,i=f.autoHeight,j=a.type(i),k=null;("string"===j||"number"===j)&&(f.container.on("cycle-slide-added cycle-slide-removed",b),f.container.on("cycle-destroyed",e),"container"==i?f.container.on("cycle-before",d):"string"===j&&/\d+\:\d+/.test(i)&&(h=i.match(/(\d+)\:(\d+)/),h=h[1]/h[2],f._autoHeightRatio=h),"number"!==j&&(f._autoHeightOnResize=function(){clearTimeout(k),k=setTimeout(g,50)},a(window).on("resize orientationchange",f._autoHeightOnResize)),setTimeout(g,30))})}(jQuery),/*! caption plugin for Cycle2; version: 20130306 */ 381function(a){"use strict";a.extend(a.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>",captionModule:"caption"}),a(document).on("cycle-update-view",function(b,c,d,e){if("caption"===c.captionModule){a.each(["caption","overlay"],function(){var a=this,b=d[a+"Template"],f=c.API.getComponent(a);f.length&&b?(f.html(c.API.tmpl(b,d,c,e)),f.show()):f.hide()})}}),a(document).on("cycle-destroyed",function(b,c){var d;a.each(["caption","overlay"],function(){var a=this,b=c[a+"Template"];c[a]&&b&&(d=c.API.getComponent("caption"),d.empty())})})}(jQuery),/*! command plugin for Cycle2; version: 20140415 */ 382function(a){"use strict";var b=a.fn.cycle;a.fn.cycle=function(c){var d,e,f,g=a.makeArray(arguments);return"number"==a.type(c)?this.cycle("goto",c):"string"==a.type(c)?this.each(function(){var h;return d=c,f=a(this).data("cycle.opts"),void 0===f?void b.log('slideshow must be initialized before sending commands; "'+d+'" ignored'):(d="goto"==d?"jump":d,e=f.API[d],a.isFunction(e)?(h=a.makeArray(g),h.shift(),e.apply(f.API,h)):void b.log("unknown command: ",d))}):b.apply(this,arguments)},a.extend(a.fn.cycle,b),a.extend(b.API,{next:function(){var a=this.opts();if(!a.busy||a.manualTrump){var b=a.reverse?-1:1;a.allowWrap===!1&&a.currSlide+b>=a.slideCount||(a.API.advanceSlide(b),a.API.trigger("cycle-next",[a]).log("cycle-next"))}},prev:function(){var a=this.opts();if(!a.busy||a.manualTrump){var b=a.reverse?1:-1;a.allowWrap===!1&&a.currSlide+b<0||(a.API.advanceSlide(b),a.API.trigger("cycle-prev",[a]).log("cycle-prev"))}},destroy:function(){this.stop();var b=this.opts(),c=a.isFunction(a._data)?a._data:a.noop;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stop(),b.API.trigger("cycle-destroyed",[b]).log("cycle-destroyed"),b.container.removeData(),c(b.container[0],"parsedAttrs",!1),b.retainStylesOnDestroy||(b.container.removeAttr("style"),b.slides.removeAttr("style"),b.slides.removeClass(b.slideActiveClass)),b.slides.each(function(){var d=a(this);d.removeData(),d.removeClass(b.slideClass),c(this,"parsedAttrs",!1)})},jump:function(a,b){var c,d=this.opts();if(!d.busy||d.manualTrump){var e=parseInt(a,10);if(isNaN(e)||0>e||e>=d.slides.length)return void d.API.log("goto: invalid slide index: "+e);if(e==d.currSlide)return void d.API.log("goto: skipping, already on slide",e);d.nextSlide=e,clearTimeout(d.timeoutId),d.timeoutId=0,d.API.log("goto: ",e," (zero-index)"),c=d.currSlide<d.nextSlide,d._tempFx=b,d.API.prepareTx(!0,c)}},stop:function(){var b=this.opts(),c=b.container;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stopTransition(),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.off("mouseenter mouseleave")),b.API.trigger("cycle-stopped",[b]).log("cycle-stopped")},reinit:function(){var a=this.opts();a.API.destroy(),a.container.cycle()},remove:function(b){for(var c,d,e=this.opts(),f=[],g=1,h=0;h<e.slides.length;h++)c=e.slides[h],h==b?d=c:(f.push(c),a(c).data("cycle.opts").slideNum=g,g++);d&&(e.slides=a(f),e.slideCount--,a(d).remove(),b==e.currSlide?e.API.advanceSlide(1):b<e.currSlide?e.currSlide--:e.currSlide++,e.API.trigger("cycle-slide-removed",[e,b,d]).log("cycle-slide-removed"),e.API.updateView())}}),a(document).on("click.cycle","[data-cycle-cmd]",function(b){b.preventDefault();var c=a(this),d=c.data("cycle-cmd"),e=c.data("cycle-context")||".cycle-slideshow";a(e).cycle(d,c.data("cycle-arg"))})}(jQuery),/*! hash plugin for Cycle2; version: 20130905 */ 383function(a){"use strict";function b(b,c){var d;return b._hashFence?void(b._hashFence=!1):(d=window.location.hash.substring(1),void b.slides.each(function(e){if(a(this).data("cycle-hash")==d){if(c===!0)b.startingSlide=e;else{var f=b.currSlide<e;b.nextSlide=e,b.API.prepareTx(!0,f)}return!1}}))}a(document).on("cycle-pre-initialize",function(c,d){b(d,!0),d._onHashChange=function(){b(d,!1)},a(window).on("hashchange",d._onHashChange)}),a(document).on("cycle-update-view",function(a,b,c){c.hash&&"#"+c.hash!=window.location.hash&&(b._hashFence=!0,window.location.hash=c.hash)}),a(document).on("cycle-destroyed",function(b,c){c._onHashChange&&a(window).off("hashchange",c._onHashChange)})}(jQuery),/*! loader plugin for Cycle2; version: 20131121 */ 384function(a){"use strict";a.extend(a.fn.cycle.defaults,{loader:!1}),a(document).on("cycle-bootstrap",function(b,c){function d(b,d){function f(b){var f;"wait"==c.loader?(h.push(b),0===j&&(h.sort(g),e.apply(c.API,[h,d]),c.container.removeClass("cycle-loading"))):(f=a(c.slides[c.currSlide]),e.apply(c.API,[b,d]),f.show(),c.container.removeClass("cycle-loading"))}function g(a,b){return a.data("index")-b.data("index")}var h=[];if("string"==a.type(b))b=a.trim(b);else if("array"===a.type(b))for(var i=0;i<b.length;i++)b[i]=a(b[i])[0];b=a(b);var j=b.length;j&&(b.css("visibility","hidden").appendTo("body").each(function(b){function g(){0===--i&&(--j,f(k))}var i=0,k=a(this),l=k.is("img")?k:k.find("img");return k.data("index",b),l=l.filter(":not(.cycle-loader-ignore)").filter(':not([src=""])'),l.length?(i=l.length,void l.each(function(){this.complete?g():a(this).load(function(){g()}).on("error",function(){0===--i&&(c.API.log("slide skipped; img not loaded:",this.src),0===--j&&"wait"==c.loader&&e.apply(c.API,[h,d]))})})):(--j,void h.push(k))}),j&&c.container.addClass("cycle-loading"))}var e;c.loader&&(e=c.API.add,c.API.add=d)})}(jQuery),/*! pager plugin for Cycle2; version: 20140415 */ 385function(a){"use strict";function b(b,c,d){var e,f=b.API.getComponent("pager");f.each(function(){var f=a(this);if(c.pagerTemplate){var g=b.API.tmpl(c.pagerTemplate,c,b,d[0]);e=a(g).appendTo(f)}else e=f.children().eq(b.slideCount-1);e.on(b.pagerEvent,function(a){b.pagerEventBubble||a.preventDefault(),b.API.page(f,a.currentTarget)})})}function c(a,b){var c=this.opts();if(!c.busy||c.manualTrump){var d=a.children().index(b),e=d,f=c.currSlide<e;c.currSlide!=e&&(c.nextSlide=e,c._tempFx=c.pagerFx,c.API.prepareTx(!0,f),c.API.trigger("cycle-pager-activated",[c,a,b]))}}a.extend(a.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerEventBubble:void 0,pagerTemplate:"<span>•</span>"}),a(document).on("cycle-bootstrap",function(a,c,d){d.buildPagerLink=b}),a(document).on("cycle-slide-added",function(a,b,d,e){b.pager&&(b.API.buildPagerLink(b,d,e),b.API.page=c)}),a(document).on("cycle-slide-removed",function(b,c,d){if(c.pager){var e=c.API.getComponent("pager");e.each(function(){var b=a(this);a(b.children()[d]).remove()})}}),a(document).on("cycle-update-view",function(b,c){var d;c.pager&&(d=c.API.getComponent("pager"),d.each(function(){a(this).children().removeClass(c.pagerActiveClass).eq(c.currSlide).addClass(c.pagerActiveClass)}))}),a(document).on("cycle-destroyed",function(a,b){var c=b.API.getComponent("pager");c&&(c.children().off(b.pagerEvent),b.pagerTemplate&&c.empty())})}(jQuery),/*! prevnext plugin for Cycle2; version: 20140408 */ 386function(a){"use strict";a.extend(a.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),a(document).on("cycle-initialized",function(a,b){if(b.API.getComponent("next").on(b.nextEvent,function(a){a.preventDefault(),b.API.next()}),b.API.getComponent("prev").on(b.prevEvent,function(a){a.preventDefault(),b.API.prev()}
386),b.swipe){var c=b.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",d=b.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";b.container.on(c,function(){b._tempFx=b.swipeFx,b.API.next()}),b.container.on(d,function(){b._tempFx=b.swipeFx,b.API.prev()})}}),a(document).on("cycle-update-view",function(a,b){if(!b.allowWrap){var c=b.disabledClass,d=b.API.getComponent("next"),e=b.API.getComponent("prev"),f=b._prevBoundry||0,g=void 0!==b._nextBoundry?b._nextBoundry:b.slideCount-1;b.currSlide==g?d.addClass(c).prop("disabled",!0):d.removeClass(c).prop("disabled",!1),b.currSlide===f?e.addClass(c).prop("disabled",!0):e.removeClass(c).prop("disabled",!1)}}),a(document).on("cycle-destroyed",function(a,b){b.API.getComponent("prev").off(b.nextEvent),b.API.getComponent("next").off(b.prevEvent),b.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),/*! progressive loader plugin for Cycle2; version: 20130315 */ 387function(a){"use strict";a.extend(a.fn.cycle.defaults,{progressive:!1}),a(document).on("cycle-pre-initialize",function(b,c){if(c.progressive){var d,e,f=c.API,g=f.next,h=f.prev,i=f.prepareTx,j=a.type(c.progressive);if("array"==j)d=c.progressive;else if(a.isFunction(c.progressive))d=c.progressive(c);else if("string"==j){if(e=a(c.progressive),d=a.trim(e.html()),!d)return;if(/^(\[)/.test(d))try{d=a.parseJSON(d)}catch(k){return void f.log("error parsing progressive slides",k)}else d=d.split(new RegExp(e.data("cycle-split")||"\n")),d[d.length-1]||d.pop()}i&&(f.prepareTx=function(a,b){var e,f;return a||0===d.length?void i.apply(c.API,[a,b]):void(b&&c.currSlide==c.slideCount-1?(f=d[0],d=d.slice(1),c.container.one("cycle-slide-added",function(a,b){setTimeout(function(){b.API.advanceSlide(1)},50)}),c.API.add(f)):b||0!==c.currSlide?i.apply(c.API,[a,b]):(e=d.length-1,f=d[e],d=d.slice(0,e),c.container.one("cycle-slide-added",function(a,b){setTimeout(function(){b.currSlide=1,b.API.advanceSlide(-1)},50)}),c.API.add(f,!0)))}),g&&(f.next=function(){var a=this.opts();if(d.length&&a.currSlide==a.slideCount-1){var b=d[0];d=d.slice(1),a.container.one("cycle-slide-added",function(a,b){g.apply(b.API),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(b)}else g.apply(a.API)}),h&&(f.prev=function(){var a=this.opts();if(d.length&&0===a.currSlide){var b=d.length-1,c=d[b];d=d.slice(0,b),a.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(c,!0)}else h.apply(a.API)})}})}(jQuery),/*! tmpl plugin for Cycle2; version: 20121227 */ 388function(a){"use strict";a.extend(a.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),a.extend(a.fn.cycle.API,{tmpl:function(b,c){var d=new RegExp(c.tmplRegex||a.fn.cycle.defaults.tmplRegex,"g"),e=a.makeArray(arguments);return e.shift(),b.replace(d,function(b,c){var d,f,g,h,i=c.split(".");for(d=0;d<e.length;d++)if(g=e[d]){if(i.length>1)for(h=g,f=0;f<i.length;f++)g=h,h=h[i[f]]||c;else h=g[c];if(a.isFunction(h))return h.apply(g,e);if(void 0!==h&&null!==h&&h!=c)return h}return c})}})}(jQuery); 389 390/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20141007 */ 391!function(a){"use strict";a.event.special.swipe=a.event.special.swipe||{scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var b=a(this);b.bind("touchstart",function(c){function d(b){if(g){var c=b.originalEvent.touches?b.originalEvent.touches[0]:b;e={time:(new Date).getTime(),coords:[c.pageX,c.pageY]},Math.abs(g.coords[0]-e.coords[0])>a.event.special.swipe.scrollSupressionThreshold&&b.preventDefault()}}var e,f=c.originalEvent.touches?c.originalEvent.touches[0]:c,g={time:(new Date).getTime(),coords:[f.pageX,f.pageY],origin:a(c.target)};b.bind("touchmove",d).one("touchend",function(){b.unbind("touchmove",d),g&&e&&e.time-g.time<a.event.special.swipe.durationThreshold&&Math.abs(g.coords[0]-e.coords[0])>a.event.special.swipe.horizontalDistanceThreshold&&Math.abs(g.coords[1]-e.coords[1])<a.event.special.swipe.verticalDistanceThreshold&&g.origin.trigger("swipe").trigger(g.coords[0]>
391e.coords[0]?"swipeleft":"swiperight"),g=e=void 0})})}},a.event.special.swipeleft=a.event.special.swipeleft||{setup:function(){a(this).bind("swipe",a.noop)}},a.event.special.swiperight=a.event.special.swiperight||a.event.special.swipeleft}(jQuery); 392/*! 393 * jQuery Cookie Plugin v1.4.1 394 * https://github.com/carhartl/jquery-cookie 395 * 396 * Copyright 2006, 2014 Klaus Hartl 397 * Released under the MIT license 398 */ 399(function (factory) { 400 if (typeof define === 'function' && define.amd) { 401 // AMD (Register as an anonymous module) 402 define(['jquery'], factory); 403 } else if (typeof exports === 'object') { 404 // Node/CommonJS 405 module.exports = factory(require('jquery')); 406 } else { 407 // Browser globals 408 factory(jQuery); 409 } 410}(function ($) { 411 412 var pluses = /\+/g; 413 414 function encode(s) { 415 return config.raw ? s : encodeURIComponent(s); 416 } 417 418 function decode(s) { 419 return config.raw ? s : decodeURIComponent(s); 420 } 421 422 function stringifyCookieValue(value) { 423 return encode(config.json ? JSON.stringify(value) : String(value)); 424 } 425 426 function parseCookieValue(s) { 427 if (s.indexOf('"') === 0) { 428 // This is a quoted cookie as according to RFC2068, unescape... 429 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 430 } 431 432 try { 433 // Replace server-side written pluses with spaces. 434 // If we can't decode the cookie, ignore it, it's unusable. 435 // If we can't parse the cookie, ignore it, it's unusable. 436 s = decodeURIComponent(s.replace(pluses, ' ')); 437 return config.json ? JSON.parse(s) : s; 438 } catch(e) {} 439 } 440 441 function read(s, converter) { 442 var value = config.raw ? s : parseCookieValue(s); 443 return $.isFunction(converter) ? converter(value) : value; 444 } 445 446 var config = $.cookie = function (key, value, options) { 447 448 // Write 449 450 if (arguments.length > 1 && !$.isFunction(value)) { 451 options = $.extend({}, config.defaults, options); 452 453 if (typeof options.expires === 'number') { 454 var days = options.expires, t = options.expires = new Date(); 455 t.setMilliseconds(t.getMilliseconds() + days * 864e+5); 456 } 457 458 return (document.cookie = [ 459 encode(key), '=', stringifyCookieValue(value), 460 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 461 options.path ? '; path=' + options.path : '', 462 options.domain ? '; domain=' + options.domain : '', 463 options.secure ? '; secure' : '' 464 ].join('')); 465 } 466 467 // Read 468 469 var result = key ? undefined : {}, 470 // To prevent the for loop in the first place assign an empty array 471 // in case there are no cookies at all. Also prevents odd result when 472 // calling $.cookie(). 473 cookies = document.cookie ? document.cookie.split('; ') : [], 474 i = 0, 475 l = cookies.length; 476 477 for (; i < l; i++) { 478 var parts = cookies[i].split('='), 479 name = decode(parts.shift()), 480 cookie = parts.join('='); 481 482 if (key === name) { 483 // If second argument (value) is a function it's a converter... 484 result = read(cookie, value); 485 break; 486 } 487 488 // Prevent storing a cookie that we couldn't decode. 489 if (!key && (cookie = read(cookie)) !== undefined) { 490 result[name] = cookie; 491 } 492 } 493 494 return result; 495 }; 496 497 config.defaults = {}; 498 499 $.removeCookie = function (key, options) { 500 // Must not alter options, thus extending a fresh object... 501 $.cookie(key, '', $.extend({}, options, { expires: -1 })); 502 return !$.cookie(key); 503 }; 504 505})); 506 507/*! 508 * scrollup v2.4.1 509 * Url: http://markgoodyear.com/labs/scrollup/ 510 * Copyright (c) Mark Goodyear â @markgdyr â http://markgoodyear.com 511 * License: MIT 512 */ 513!function(l,o,e){"use strict";l.fn.scrollUp=function(o){l.data(e.body,"scrollUp")||(l.data(e.body,"scrollUp",!0),l.fn.scrollUp.init(o))},l.fn.scrollUp.init=function(r){var s,t,c,i,n,a,d,p=l.fn.scrollUp.settings=l.extend({},l.fn.scrollUp.defaults,r),f=!1;switch(d=p.scrollTrigger?l(p.scrollTrigger):l("<a/>",{id:p.scrollName,href:"#top"}),p.scrollTitle&&d.attr("title",p.scrollTitle),d.appendTo("body"),p.scrollImg||p.scrollTrigger||d.html(p.scrollText),d.css({display:"none",position:"fixed",zIndex:p.zIndex}),p.activeOverlay&&l("<div/>",{id:p.scrollName+"-active"}).css({position:"absolute",top:p.scrollDistance+"px",width:"100%",borderTop:"1px dotted"+p.activeOverlay,zIndex:p.zIndex}).appendTo("body"),p.animation){case"fade":s="fadeIn",t="fadeOut",c=p.animationSpeed;break;
513case"slide":s="slideDown",t="slideUp",c=p.animationSpeed;break;default:s="show",t="hide",c=0}i="top"===p.scrollFrom?p.scrollDistance:l(e).height()-l(o).height()-p.scrollDistance,n=l(o).scroll(function(){l(o).scrollTop()>i?f||(d[s](c),f=!0):f&&(d[t](c),f=!1)}),p.scrollTarget?"number"==typeof p.scrollTarget?a=p.scrollTarget:"string"==typeof p.scrollTarget&&(a=Math.floor(l(p.scrollTarget).offset().top)):a=0,d.click(function(o){o.preventDefault(),l("html, body").animate({scrollTop:a},p.scrollSpeed,p.easingType)})},l.fn.scrollUp.defaults={scrollName:"scrollUp",scrollDistance:300,scrollFrom:"top",scrollSpeed:300,easingType:"linear",animation:"fade",animationSpeed:200,scrollTrigger:!1,scrollTarget:!1,scrollText:"Scroll to top",scrollTitle:!1,scrollImg:!1,activeOverlay:!1,zIndex:2147483647},l.fn.scrollUp.destroy=function(r){l.removeData(e.body,"scrollUp"),l("#"+l.fn.scrollUp.settings.scrollName).remove(),l("#"+l.fn.scrollUp.settings.scrollName+"-active").remove(),l.fn.jquery.split(".")[1]>=7?l(o).off("scroll",r):l(o).unbind("scroll",r)},l.scrollUp=l.fn.scrollUp}(jQuery,window,document); 514/** 515 * jQuery Ripples plugin v0.6.2 / https://github.com/sirxemic/jquery.ripples 516 * MIT License 517 * @author sirxemic / https://sirxemic.com/ 518 */ 519 520!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(e.$)}(this,function(e){"use strict";function t(e){return"%"==e[e.length-1]}function r(e){var t=e.split(" ");if(1!==t.length)return t.map(function(t){switch(e){case"center":return"50%";case"top":case"left":return"0";case"right":case"bottom":return"100%";default:return t}});switch(e){case"center":return["50%","50%"];case"top":return["50%","0"];case"bottom":return["50%","100%"];case"left":return["0","50%"];case"right":return["100%","50%"];default:return[e,"50%"]}}function i(e,t,r){function i(e,t){var r=s.createShader(e);if(s.shaderSource(r,t),s.compileShader(r),!s.getShaderParameter(r,s.COMPILE_STATUS))throw new Error("compile error: "+s.getShaderInfoLog(r));return r}var o={};if(o.id=s.createProgram(),s.attachShader(o.id,i(s.VERTEX_SHADER,e)),s.attachShader(o.id,i(s.FRAGMENT_SHADER,t)),s.linkProgram(o.id),!s.getProgramParameter(o.id,s.LINK_STATUS))throw new Error("link error: "+s.getProgramInfoLog(o.id));o.uniforms={},o.locations={},s.useProgram(o.id),s.enableVertexAttribArray(0);for(var n,a,u=/uniform (\w+) (\w+)/g,h=e+t;null!=(n=u.exec(h));)a=n[2],o.locations[a]=s.getUniformLocation(o.id,a);return o}function o(e,t){s.activeTexture(s.TEXTURE0+(t||0)),s.bindTexture(s.TEXTURE_2D,e)}function n(e){var t=/url\(["']?([^"']*)["']?\)/.exec(e);return null==t?null:t[1]}function a(e){return e.match(/^data:/)}var s,u=(e=e&&"default"in e?e.default:e)(window),h=function(){function e(e,t,i){var o="OES_texture_"+e,n=o+"_linear",a=n in r,s=[o];return a&&s.push(n),{type:t,arrayType:i,linearSupport:a,extensions:s}}var t=document.createElement("canvas");if(!(s=t.getContext("webgl")||t.getContext("experimental-webgl")))return null;var r={};if(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].forEach(function(e){var t=s.getExtension(e);t&&(r[e]=t)}),!r.OES_texture_float)return null;var i=[];i.push(e("float",s.FLOAT,Float32Array)),r.OES_texture_half_float&&i.push(e("half_float",r.OES_texture_half_float.HALF_FLOAT_OES,null));var o=s.createTexture(),n=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,n),s.bindTexture(s.TEXTURE_2D,o),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE);for(var a=null,u=0;u<i.length;u++)if(s.texImage2D(s.TEXTURE_2D,0,s.RGBA,32,32,0,s.RGBA,i[u].type,null),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,o,0),s.checkFramebufferStatus(s.FRAMEBUFFER)===s.FRAMEBUFFER_COMPLETE){a=i[u];break}return a}(),c=function(e,t){try{return new ImageData(e,t)}catch(r){return document.createElement("canvas").getContext("2d").createImageData(e,t)}}(32,32);e("head").prepend("<style>.jquery-ripples { position: relative; z-index: 0; }</style>");var d=function(t,r){function i(){o.destroyed||(o.step(),requestAnimationFrame(i))}var o=this;this.$el=e(t),this.interactive=r.interactive,this.resolution=r.resolution,this.textureDelta=new Float32Array([1/this.resolution,1/this.resolution]),this.perturbance=r.perturbance,this.dropRadius=r.dropRadius,this.crossOrigin=r.crossOrigin,this.imageUrl=r.imageUrl;var n=document.createElement("canvas");
vendor: 11,447 bytes, lines 520-529
520n.width=this.$el.innerWidth(),n.height=this.$el.innerHeight(),this.canvas=n,this.$canvas=e(n),this.$canvas.css({position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1}),this.$el.addClass("jquery-ripples").append(n),this.context=s=n.getContext("webgl")||n.getContext("experimental-webgl"),h.extensions.forEach(function(e){s.getExtension(e)}),e(window).on("resize",function(){o.updateSize()}),this.textures=[],this.framebuffers=[],this.bufferWriteIndex=0,this.bufferReadIndex=1;for(var a=h.arrayType,u=a?new a(this.resolution*this.resolution*4):null,c=0;c<2;c++){var d=s.createTexture(),f=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,f),s.bindTexture(s.TEXTURE_2D,d),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,this.resolution,this.resolution,0,s.RGBA,h.type,u),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,d,0),this.textures.push(d),this.framebuffers.push(f)}this.quad=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,this.quad),s.bufferData(s.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),s.STATIC_DRAW),this.initShaders(),this.initTexture(),this.setTransparentTexture(),this.loadImage(),s.clearColor(0,0,0,0),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),this.visible=!0,this.running=!0,this.inited=!0,this.destroyed=!1,this.setupPointerEvents(),requestAnimationFrame(i)};d.DEFAULTS={imageUrl:null,resolution:256,dropRadius:20,perturbance:.03,interactive:!0,crossOrigin:""},d.prototype={setupPointerEvents:function(){function e(){return r.visible&&r.running&&r.interactive}function t(t,i){e()&&r.dropAtPointer(t,r.dropRadius*(i?1.5:1),i?.14:.01)}var r=this;this.$el.on("mousemove.ripples",function(e){t(e)}).on("touchmove.ripples, touchstart.ripples",function(e){for(var r=e.originalEvent.changedTouches,i=0;i<r.length;i++)t(r[i])}).on("mousedown.ripples",function(e){t(e,!0)})},loadImage:function(){var e=this;s=this.context;var t=this.imageUrl||n(this.originalCssBackgroundImage)||n(this.$el.css("backgroundImage"));if(t!=this.imageSource)if(this.imageSource=t,this.imageSource){var r=new Image;r.onload=function(){function t(e){return 0==(e&e-1)}s=e.context;var i=t(r.width)&&t(r.height)?s.REPEAT:s.CLAMP_TO_EDGE;s.bindTexture(s.TEXTURE_2D,e.backgroundTexture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,i),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,i),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,r),e.backgroundWidth=r.width,e.backgroundHeight=r.height,e.hideCssBackground()},r.onerror=function(){s=e.context,e.setTransparentTexture()},r.crossOrigin=a(this.imageSource)?null:this.crossOrigin,r.src=this.imageSource}else this.setTransparentTexture()},step:function(){s=this.context,this.visible&&(this.computeTextureBoundaries(),this.running&&this.update(),this.render())},drawQuad:function(){s.bindBuffer(s.ARRAY_BUFFER,this.quad),s.vertexAttribPointer(0,2,s.FLOAT,!1,0,0),s.drawArrays(s.TRIANGLE_FAN,0,4)},render:function(){s.bindFramebuffer(s.FRAMEBUFFER,null),s.viewport(0,0,this.canvas.width,this.canvas.height),s.enable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.useProgram(this.renderProgram.id),o(this.backgroundTexture,0),o(this.textures[0],1),s.uniform1f(this.renderProgram.locations.perturbance,this.perturbance),s.uniform2fv(this.renderProgram.locations.topLeft,this.renderProgram.uniforms.topLeft),s.uniform2fv(this.renderProgram.locations.bottomRight,this.renderProgram.uniforms.bottomRight),s.uniform2fv(this.renderProgram.locations.containerRatio,this.renderProgram.uniforms.containerRatio),s.uniform1i(this.renderProgram.locations.samplerBackground,0),s.uniform1i(this.renderProgram.locations.samplerRipples,1),this.drawQuad(),s.disable(s.BLEND)},update:function(){s.viewport(0,0,this.resolution,this.resolution),s.bindFramebuffer(s.FRAMEBUFFER,this.framebuffers[this.bufferWriteIndex]),o(this.textures[this.bufferReadIndex]),s.useProgram(this.updateProgram.id),this.drawQuad(),this.swapBufferIndices()},swapBufferIndices:function(){this.bufferWriteIndex=1-this.bufferWriteIndex,this.bufferReadIndex=1-this.bufferReadIndex},computeTextureBoundaries:function(){var e,i=this.$el.css("background-size"),o=this.$el.css("background-attachment"),n=r(this.$el.css("background-position"));if("fixed"==o?((e={left:window.pageXOffset,top:window.pageYOffset}).width=u.width(),e.height=u.height()):((e=this.$el.offset()).width=this.$el.innerWidth(),e.height=this.$el.innerHeight()),"cover"==i)var a=Math.max(e.width/this.backgroundWidth,e.height/this.backgroundHeight),s=this.backgroundWidth*a,h=this.backgroundHeight*a;else if("contain"==i)var a=Math.min(e.width/this.backgroundWidth,e.height/this.backgroundHeight),s=this.backgroundWidth*a,h=this.backgroundHeight*a;else{var s=(i=i.split(" "))[0]||"",h=i[1]||s;t(s)?s=e.width*parseFloat(s)/100:"auto"!=s&&(s=parseFloat(s)),t(h)?h=e.height*parseFloat(h)/100:"auto"!=h&&(h=parseFloat(h)),"auto"==s&&"auto"==h?(s=this.backgroundWidth,h=this.backgroundHeight):("auto"==s&&(s=this.backgroundWidth*(h/this.backgroundHeight)),"auto"==h&&(h=this.backgroundHeight*(s/this.backgroundWidth)))}var c=n[0],d=n[1];c=t(c)?e.left+(e.width-s)*parseFloat(c)/100:e.left+parseFloat(c),d=t(d)?e.top+(e.height-h)*parseFloat(d)/100:e.top+parseFloat(d);var f=this.$el.offset();this.renderProgram.uniforms.topLeft=new Float32Array([(f.left-c)/s,(f.top-d)/h]),this.renderProgram.uniforms.bottomRight=new Float32Array([this.renderProgram.uniforms.topLeft[0]+this.$el.innerWidth()/s,this.renderProgram.uniforms.topLeft[1]+this.$el.innerHeight()/h]);var l=Math.max(this.canvas.width,this.canvas.height);this.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/l,this.canvas.height/l])},initShaders:function(){var e=["attribute vec2 vertex;","varying vec2 coord;","void main() {","coord = vertex * 0.5 + 0.5;","gl_Position = vec4(vertex, 0.0, 1.0);","}"].join("\n");this.dropProgram=i(e,["precision highp float;","const float PI = 3.141592653589793;","uniform sampler2D texture;","uniform vec2 center;","uniform float radius;","uniform float strength;","varying vec2 coord;","void main() {","vec4 info = texture2D(texture, coord);","float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);","drop = 0.5 - cos(drop * PI) * 0.5;","info.r += drop * strength;","gl_FragColor = info;","}"].join("\n")),this.updateProgram=i(e,["precision highp float;","uniform sampler2D texture;","uniform vec2 delta;","varying vec2 coord;","void main() {","vec4 info = texture2D(texture, coord);","vec2 dx = vec2(delta.x, 0.0);","vec2 dy = vec2(0.0, delta.y);","float average = (","texture2D(texture, coord - dx).r +","texture2D(texture, coord - dy).r +","texture2D(texture, coord + dx).r +","texture2D(texture, coord + dy).r",") * 0.25;","info.g += (average - info.r) * 2.0;","info.g *= 0.995;","info.r += info.g;","gl_FragColor = info;","}"].join("\n")),s.uniform2fv(this.updateProgram.locations.delta,this.textureDelta),this.renderProgram=i(["precision highp float;","attribute vec2 vertex;","uniform vec2 topLeft;","uniform vec2 bottomRight;","uniform vec2 containerRatio;","varying vec2 ripplesCoord;","varying vec2 backgroundCoord;","void main() {","backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);","backgroundCoord.y = 1.0 - backgroundCoord.y;","ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;","gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);","}"].join("\n"),["precision highp float;","uniform sampler2D samplerBackground;","uniform sampler2D samplerRipples;","uniform vec2 delta;","uniform float perturbance;","varying vec2 ripplesCoord;","varying vec2 backgroundCoord;","void main() {","float height = texture2D(samplerRipples, ripplesCoord).r;","float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;","float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;","vec3 dx = vec3(delta.x, heightX - height, 0.0);","vec3 dy = vec3(0.0, heightY - height, delta.y);","vec2 offset = -normalize(cross(dy, dx)).xz;","float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);","gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;","}"].join("\n")),s.uniform2fv(this.renderProgram.locations.delta,this.textureDelta)},initTexture:function(){this.backgroundTexture=s.createTexture(),s.bindTexture(s.TEXTURE_2D,this.backgroundTexture),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,1),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR)},setTransparentTexture:function(){s.bindTexture(s.TEXTURE_2D,this.backgroundTexture),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,c)},hideCssBackground:function(){var e=this.$el[0].style.backgroundImage;"none"!=e&&(this.originalInlineCss=e,this.originalCssBackgroundImage=this.$el.css("backgroundImage"),this.$el.css("backgroundImage","none"))},restoreCssBackground:function(){this.$el.css("backgroundImage",this.originalInlineCss||"")},dropAtPointer:function(e,t,r){var i=parseInt(this.$el.css("border-left-width"))||0,o=parseInt(this.$el.css("border-top-width"))||0;this.drop(e.pageX-this.$el.offset().left-i,e.pageY-this.$el.offset().top-o,t,r)},drop:function(e,t,r,i){s=this.context;var n=this.$el.innerWidth(),a=this.$el.innerHeight(),u=Math.max(n,a);r/=u;var h=new Float32Array([(2*e-n)/u,(a-2*t)/u]);s.viewport(0,0,this.resolution,this.resolution),s.bindFramebuffer(s.FRAMEBUFFER,this.framebuffers[this.bufferWriteIndex]),o(this.textures[this.bufferReadIndex]),s.useProgram(this.dropProgram.id),s.uniform2fv(this.dropProgram.locations.center,h),s.uniform1f(this.dropProgram.locations.radius,r),s.uniform1f(this.dropProgram.locations.strength,i),this.drawQuad(),this.swapBufferIndices()},updateSize:function(){var e=this.$el.innerWidth(),t=this.$el.innerHeight();e==this.canvas.width&&t==this.canvas.height||(this.canvas.width=e,this.canvas.height=t)},destroy:function(){this.$el.off(".ripples").removeClass("jquery-ripples").removeData("ripples"),this.$canvas.remove(),this.restoreCssBackground(),this.destroyed=!0},show:function(){this.visible=!0,this.$canvas.show(),this.hideCssBackground()},hide:function(){this.visible=!1,this.$canvas.hide(),this.restoreCssBackground()},pause:function(){this.running=!1},play:function(){this.running=!0},set:function(e,t){switch(e){case"dropRadius":case"perturbance":case"interactive":case"crossOrigin":this[e]=t;break;case"imageUrl":this.imageUrl=t,this.loadImage()}}};var f=e.fn.ripples;e.fn.ripples=function(t){if(!h)throw new Error("Your browser does not support WebGL, the OES_texture_float extension or rendering to floating point textures.");var r=arguments.length>1?Array.prototype.slice.call(arguments,1):void 0;return this.each(function(){var i=e(this),o=i.data("ripples"),n=e.extend({},d.DEFAULTS,i.data(),"object"==typeof t&&t);(o||"string"!=typeof t)&&(o?"string"==typeof t&&d.prototype[t].apply(o,r):i.data("ripples",o=new d(this,n)))})},e.fn.ripples.Constructor=d,e.fn.ripples.noConflict=function(){return e.fn.ripples=f,this}}); 521 522/*! 523 * Select2 4.0.13 524 * https://select2.github.io 525 * 526 * Released under the MIT license 527 * https://github.com/select2/select2/blob/master/LICENSE.md 528 */ 529;
vendor: 18,996 bytes, lines 529-1098
529(function (factory) { 530 if (typeof define === 'function' && define.amd) { 531 // AMD. Register as an anonymous module. 532 define(['jquery'], factory); 533 } else if (typeof module === 'object' && module.exports) { 534 // Node/CommonJS 535 module.exports = function (root, jQuery) { 536 if (jQuery === undefined) { 537 // require('jQuery') returns a factory that requires window to 538 // build a jQuery instance, we normalize how we use modules 539 // that require this pattern but the window provided is a noop 540 // if it's defined (how jquery works) 541 if (typeof window !== 'undefined') { 542 jQuery = require('jquery'); 543 } 544 else { 545 jQuery = require('jquery')(root); 546 } 547 } 548 factory(jQuery); 549 return jQuery; 550 }; 551 } else { 552 // Browser globals 553 factory(jQuery); 554 } 555} (function (jQuery) { 556 // This is needed so we can catch the AMD loader configuration and use it 557 // The inner file should be wrapped (by `banner.start.js`) in a function that 558 // returns the AMD loader references. 559 var S2 =(function () { 560 // Restore the Select2 AMD loader so it can be used 561 // Needed mostly in the language files, where the loader is not inserted 562 if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) { 563 var S2 = jQuery.fn.select2.amd; 564 } 565var S2;(function () { if (!S2 || !S2.requirejs) { 566if (!S2) { S2 = {}; } else { require = S2; } 567/** 568 * @license almond 0.3.3 Copyright jQuery Foundation and other contributors. 569 * Released under MIT license, http://github.com/requirejs/almond/LICENSE 570 */ 571//Going sloppy to avoid 'use strict' string cost, but strict practices should 572//be followed. 573/*global setTimeout: false */ 574 575var requirejs, require, define; 576(function (undef) { 577 var main, req, makeMap, handlers, 578 defined = {}, 579 waiting = {}, 580 config = {}, 581 defining = {}, 582 hasOwn = Object.prototype.hasOwnProperty, 583 aps = [].slice, 584 jsSuffixRegExp = /\.js$/; 585 586 function hasProp(obj, prop) { 587 return hasOwn.call(obj, prop); 588 } 589 590 /** 591 * Given a relative module name, like ./something, normalize it to 592 * a real name that can be mapped to a path. 593 * @param {String} name the relative name 594 * @param {String} baseName a real name that the name arg is relative 595 * to. 596 * @returns {String} normalized name 597 */ 598 function normalize(name, baseName) { 599 var nameParts, nameSegment, mapValue, foundMap, lastIndex, 600 foundI, foundStarMap, starI, i, j, part, normalizedBaseParts, 601 baseParts = baseName && baseName.split("/"), 602 map = config.map, 603 starMap = (map && map['*']) || {}; 604 605 //Adjust any relative paths. 606 if (name) { 607 name = name.split('/'); 608 lastIndex = name.length - 1; 609 610 // If wanting node ID compatibility, strip .js from end 611 // of IDs. Have to do this here, and not in nameToUrl 612 // because node allows either .js or non .js to map 613 // to same file. 614 if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { 615 name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); 616 } 617 618 // Starts with a '.' so need the baseName 619 if (name[0].charAt(0) === '.' && baseParts) { 620 //Convert baseName to array, and lop off the last part, 621 //so that . matches that 'directory' and not name of the baseName's 622 //module. For instance, baseName of 'one/two/three', maps to 623 //'one/two/three.js', but we want the directory, 'one/two' for 624 //this normalization. 625 normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); 626 name = normalizedBaseParts.concat(name); 627 } 628 629 //start trimDots 630 for (i = 0; i < name.length; i++) { 631 part = name[i]; 632 if (part === '.') { 633 name.splice(i, 1); 634 i -= 1; 635 } else if (part === '..') { 636 // If at the start, or previous value is still .., 637 // keep them so that when converted to a path it may 638 // still work when converted to a path, even though 639 // as an ID it is less than ideal. In larger point 640 // releases, may be better to just kick out an error. 641 if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') { 642 continue; 643 } else if (i > 0) { 644 name.splice(i - 1, 2); 645 i -= 2; 646 } 647 } 648 } 649 //end trimDots 650 651 name = name.join('/'); 652 } 653 654 //Apply map config if available. 655 if ((baseParts || starMap) && map) { 656 nameParts = name.split('/'); 657 658 for (i = nameParts.length; i > 0; i -= 1) { 659 nameSegment = nameParts.slice(0, i).join("/"); 660 661 if (baseParts) { 662 //Find the longest baseName segment match in the config. 663 //So, do joins on the biggest to smallest lengths of baseParts. 664 for (j = baseParts.length; j > 0; j -= 1) { 665 mapValue = map[baseParts.slice(0, j).join('/')]; 666 667 //baseName segment has config, find if it has one for 668 //this name. 669 if (mapValue) { 670 mapValue = mapValue[nameSegment]; 671 if (mapValue) { 672 //Match, update name to the new value. 673 foundMap = mapValue; 674 foundI = i; 675 break; 676 } 677 } 678 } 679 } 680 681 if (foundMap) { 682 break; 683 } 684 685 //Check for a star map match, but just hold on to it, 686 //if there is a shorter segment match later in a matching 687 //config, then favor over this star map. 688 if (!foundStarMap && starMap && starMap[nameSegment]) { 689 foundStarMap = starMap[nameSegment]; 690 starI = i; 691 } 692 } 693 694 if (!foundMap && foundStarMap) { 695 foundMap = foundStarMap; 696 foundI = starI; 697 } 698 699 if (foundMap) { 700 nameParts.splice(0, foundI, foundMap); 701 name = nameParts.join('/'); 702 } 703 } 704 705 return name; 706 } 707 708 function makeRequire(relName, forceSync) { 709 return function () { 710 //A version of a require function that passes a moduleName 711 //value for items that may need to 712 //look up paths relative to the moduleName 713 var args = aps.call(arguments, 0); 714 715 //If first arg is not require('string'), and there is only 716 //one arg, it is the array form without a callback. Insert 717 //a null so that the following concat is correct. 718 if (typeof args[0] !== 'string' && args.length === 1) { 719 args.push(null); 720 } 721 return req.apply(undef, args.concat([relName, forceSync])); 722 }; 723 } 724 725 function makeNormalize(relName) { 726 return function (name) { 727 return normalize(name, relName); 728 }; 729 } 730 731 function makeLoad(depName) { 732 return function (value) { 733 defined[depName] = value; 734 }; 735 } 736 737 function callDep(name) { 738 if (hasProp(waiting, name)) { 739 var args = waiting[name]; 740 delete waiting[name]; 741 defining[name] = true; 742 main.apply(undef, args); 743 } 744 745 if (!hasProp(defined, name) && !hasProp(defining, name)) { 746 throw new Error('No ' + name); 747 } 748 return defined[name]; 749 } 750 751 //Turns a plugin!resource to [plugin, resource] 752 //with the plugin being undefined if the name 753 //did not have a plugin prefix. 754 function splitPrefix(name) { 755 var prefix, 756 index = name ? name.indexOf('!') : -1; 757 if (index > -1) { 758 prefix = name.substring(0, index); 759 name = name.substring(index + 1, name.length); 760 } 761 return [prefix, name]; 762 } 763 764 //Creates a parts array for a relName where first part is plugin ID, 765 //second part is resource ID. Assumes relName has already been normalized. 766 function makeRelParts(relName) { 767 return relName ? splitPrefix(relName) : []; 768 } 769 770 /** 771 * Makes a name map, normalizing the name, and using a plugin 772 * for normalization if necessary. Grabs a ref to plugin 773 * too, as an optimization. 774 */ 775 makeMap = function (name, relParts) { 776 var plugin, 777 parts = splitPrefix(name), 778 prefix = parts[0], 779 relResourceName = relParts[1]; 780 781 name = parts[1]; 782 783 if (prefix) { 784 prefix = normalize(prefix, relResourceName); 785 plugin = callDep(prefix); 786 } 787 788 //Normalize according 789 if (prefix) { 790 if (plugin && plugin.normalize) { 791 name = plugin.normalize(name, makeNormalize(relResourceName)); 792 } else { 793 name = normalize(name, relResourceName); 794 } 795 } else { 796 name = normalize(name, relResourceName); 797 parts = splitPrefix(name); 798 prefix = parts[0]; 799 name = parts[1]; 800 if (prefix) { 801 plugin = callDep(prefix); 802 } 803 } 804 805 //Using ridiculous property names for space reasons 806 return { 807 f: prefix ? prefix + '!' + name : name, //fullName 808 n: name, 809 pr: prefix, 810 p: plugin 811 }; 812 }; 813 814 function makeConfig(name) { 815 return function () { 816 return (config && config.config && config.config[name]) || {}; 817 }; 818 } 819 820 handlers = { 821 require: function (name) { 822 return makeRequire(name); 823 }, 824 exports: function (name) { 825 var e = defined[name]; 826 if (typeof e !== 'undefined') { 827 return e; 828 } else { 829 return (defined[name] = {}); 830 } 831 }, 832 module: function (name) { 833 return { 834 id: name, 835 uri: '', 836 exports: defined[name], 837 config: makeConfig(name) 838 }; 839 } 840 }; 841 842 main = function (name, deps, callback, relName) { 843 var cjsModule, depName, ret, map, i, relParts, 844 args = [], 845 callbackType = typeof callback, 846 usingExports; 847 848 //Use name if no relName 849 relName = relName || name; 850 relParts = makeRelParts(relName); 851 852 //Call the callback to define the module, if necessary. 853 if (callbackType === 'undefined' || callbackType === 'function') { 854 //Pull out the defined dependencies and pass the ordered 855 //values to the callback. 856 //Default to [require, exports, module] if no deps 857 deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps; 858 for (i = 0; i < deps.length; i += 1) { 859 map = makeMap(deps[i], relParts); 860 depName = map.f; 861 862 //Fast path CommonJS standard dependencies. 863 if (depName === "require") { 864 args[i] = handlers.require(name); 865 } else if (depName === "exports") { 866 //CommonJS module spec 1.1 867 args[i] = handlers.exports(name); 868 usingExports = true; 869 } else if (depName === "module") { 870 //CommonJS module spec 1.1 871 cjsModule = args[i] = handlers.module(name); 872 } else if (hasProp(defined, depName) || 873 hasProp(waiting, depName) || 874 hasProp(defining, depName)) { 875 args[i] = callDep(depName); 876 } else if (map.p) { 877 map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {}); 878 args[i] = defined[depName]; 879 } else { 880 throw new Error(name + ' missing ' + depName); 881 } 882 } 883 884 ret = callback ? callback.apply(defined[name], args) : undefined; 885 886 if (name) { 887 //If setting exports via "module" is in play, 888 //favor that over return value and exports. After that, 889 //favor a non-undefined return value over exports use. 890 if (cjsModule && cjsModule.exports !== undef && 891 cjsModule.exports !== defined[name]) { 892 defined[name] = cjsModule.exports; 893 } else if (ret !== undef || !usingExports) { 894 //Use the return value from the function. 895 defined[name] = ret; 896 } 897 } 898 } else if (name) { 899 //May just be an object definition for the module. Only 900 //worry about defining if have a module name. 901 defined[name] = callback; 902 } 903 }; 904 905 requirejs = require = req = function (deps, callback, relName, forceSync, alt) { 906 if (typeof deps === "string") { 907 if (handlers[deps]) { 908 //callback in this case is really relName 909 return handlers[deps](callback); 910 } 911 //Just return the module wanted. In this scenario, the 912 //deps arg is the module name, and second arg (if passed) 913 //is just the relName. 914 //Normalize module name, if it contains . or .. 915 return callDep(makeMap(deps, makeRelParts(callback)).f); 916 } else if (!deps.splice) { 917 //deps is a config object, not an array. 918 config = deps; 919 if (config.deps) { 920 req(config.deps, config.callback); 921 } 922 if (!callback) { 923 return; 924 } 925 926 if (callback.splice) { 927 //callback is an array, which means it is a dependency list. 928 //Adjust args if there are dependencies 929 deps = callback; 930 callback = relName; 931 relName = null; 932 } else { 933 deps = undef; 934 } 935 } 936 937 //Support require(['a']) 938 callback = callback || function () {}; 939 940 //If relName is a function, it is an errback handler, 941 //so remove it. 942 if (typeof relName === 'function') { 943 relName = forceSync; 944 forceSync = alt; 945 } 946 947 //Simulate async callback; 948 if (forceSync) { 949 main(undef, deps, callback, relName); 950 } else { 951 //Using a non-zero value because of concern for what old browsers 952 //do, and latest browsers "upgrade" to 4 if lower value is used: 953 //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout: 954 //If want a value immediately, use require('id') instead -- something 955 //that works in almond on the global level, but not guaranteed and 956 //unlikely to work in other AMD implementations. 957 setTimeout(function () { 958 main(undef, deps, callback, relName); 959 }, 4); 960 } 961 962 return req; 963 }; 964 965 /** 966 * Just drops the config on the floor, but returns req in case 967 * the config return value is used. 968 */ 969 req.config = function (cfg) { 970 return req(cfg); 971 }; 972 973 /** 974 * Expose module registry for debugging and tooling 975 */ 976 requirejs._defined = defined; 977 978 define = function (name, deps, callback) { 979 if (typeof name !== 'string') { 980 throw new Error('See almond README: incorrect module build, no module name'); 981 } 982 983 //This module may not have dependencies 984 if (!deps.splice) { 985 //deps is not an array, so probably means 986 //an object literal or factory function for 987 //the value. Adjust args. 988 callback = deps; 989 deps = []; 990 } 991 992 if (!hasProp(defined, name) && !hasProp(waiting, name)) { 993 waiting[name] = [name, deps, callback]; 994 } 995 }; 996 997 define.amd = { 998 jQuery: true 999 }; 1000}()); 1001 1002S2.requirejs = requirejs;S2.require = require;S2.define = define; 1003} 1004}()); 1005S2.define("almond", function(){}); 1006 1007/* global jQuery:false, $:false */ 1008S2.define('jquery',[],function () { 1009 var _$ = jQuery || $; 1010 1011 if (_$ == null && console && console.error) { 1012 console.error( 1013 'Select2: An instance of jQuery or a jQuery-compatible library was not ' + 1014 'found. Make sure that you are including jQuery before Select2 on your ' + 1015 'web page.' 1016 ); 1017 } 1018 1019 return _$; 1020}); 1021 1022S2.define('select2/utils',[ 1023 'jquery' 1024], function ($) { 1025 var Utils = {}; 1026 1027 Utils.Extend = function (ChildClass, SuperClass) { 1028 var __hasProp = {}.hasOwnProperty; 1029 1030 function BaseConstructor () { 1031 this.constructor = ChildClass; 1032 } 1033 1034 for (var key in SuperClass) { 1035 if (__hasProp.call(SuperClass, key)) { 1036 ChildClass[key] = SuperClass[key]; 1037 } 1038 } 1039 1040 BaseConstructor.prototype = SuperClass.prototype; 1041 ChildClass.prototype = new BaseConstructor(); 1042 ChildClass.__super__ = SuperClass.prototype; 1043 1044 return ChildClass; 1045 }; 1046 1047 function getMethods (theClass) { 1048 var proto = theClass.prototype; 1049 1050 var methods = []; 1051 1052 for (var methodName in proto) { 1053 var m = proto[methodName]; 1054 1055 if (typeof m !== 'function') { 1056 continue; 1057 } 1058 1059 if (methodName === 'constructor') { 1060 continue; 1061 } 1062 1063 methods.push(methodName); 1064 } 1065 1066 return methods; 1067 } 1068 1069 Utils.Decorate = function (SuperClass, DecoratorClass) { 1070 var decoratedMethods = getMethods(DecoratorClass); 1071 var superMethods = getMethods(SuperClass); 1072 1073 function DecoratedClass () { 1074 var unshift = Array.prototype.unshift; 1075 1076 var argCount = DecoratorClass.prototype.constructor.length; 1077 1078 var calledConstructor = SuperClass.prototype.constructor; 1079 1080 if (argCount > 0) { 1081 unshift.call(arguments, SuperClass.prototype.constructor); 1082 1083 calledConstructor = DecoratorClass.prototype.constructor; 1084 } 1085 1086 calledConstructor.apply(this, arguments); 1087 } 1088 1089 DecoratorClass.displayName = SuperClass.displayName; 1090 1091 function ctr () { 1092 this.constructor = DecoratedClass; 1093 } 1094 1095 DecoratedClass.prototype = new ctr(); 1096 1097 for (var m = 0; m < superMethods.length; m++) { 1098
vendor: 3,385 bytes, lines 1098-1235
1098var superMethod = superMethods[m]; 1099 1100 DecoratedClass.prototype[superMethod] = 1101 SuperClass.prototype[superMethod]; 1102 } 1103 1104 var calledMethod = function (methodName) { 1105 // Stub out the original method if it's not decorating an actual method 1106 var originalMethod = function () {}; 1107 1108 if (methodName in DecoratedClass.prototype) { 1109 originalMethod = DecoratedClass.prototype[methodName]; 1110 } 1111 1112 var decoratedMethod = DecoratorClass.prototype[methodName]; 1113 1114 return function () { 1115 var unshift = Array.prototype.unshift; 1116 1117 unshift.call(arguments, originalMethod); 1118 1119 return decoratedMethod.apply(this, arguments); 1120 }; 1121 }; 1122 1123 for (var d = 0; d < decoratedMethods.length; d++) { 1124 var decoratedMethod = decoratedMethods[d]; 1125 1126 DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod); 1127 } 1128 1129 return DecoratedClass; 1130 }; 1131 1132 var Observable = function () { 1133 this.listeners = {}; 1134 }; 1135 1136 Observable.prototype.on = function (event, callback) { 1137 this.listeners = this.listeners || {}; 1138 1139 if (event in this.listeners) { 1140 this.listeners[event].push(callback); 1141 } else { 1142 this.listeners[event] = [callback]; 1143 } 1144 }; 1145 1146 Observable.prototype.trigger = function (event) { 1147 var slice = Array.prototype.slice; 1148 var params = slice.call(arguments, 1); 1149 1150 this.listeners = this.listeners || {}; 1151 1152 // Params should always come in as an array 1153 if (params == null) { 1154 params = []; 1155 } 1156 1157 // If there are no arguments to the event, use a temporary object 1158 if (params.length === 0) { 1159 params.push({}); 1160 } 1161 1162 // Set the `_type` of the first object to the event 1163 params[0]._type = event; 1164 1165 if (event in this.listeners) { 1166 this.invoke(this.listeners[event], slice.call(arguments, 1)); 1167 } 1168 1169 if ('*' in this.listeners) { 1170 this.invoke(this.listeners['*'], arguments); 1171 } 1172 }; 1173 1174 Observable.prototype.invoke = function (listeners, params) { 1175 for (var i = 0, len = listeners.length; i < len; i++) { 1176 listeners[i].apply(this, params); 1177 } 1178 }; 1179 1180 Utils.Observable = Observable; 1181 1182 Utils.generateChars = function (length) { 1183 var chars = ''; 1184 1185 for (var i = 0; i < length; i++) { 1186 var randomChar = Math.floor(Math.random() * 36); 1187 chars += randomChar.toString(36); 1188 } 1189 1190 return chars; 1191 }; 1192 1193 Utils.bind = function (func, context) { 1194 return function () { 1195 func.apply(context, arguments); 1196 }; 1197 }; 1198 1199 Utils._convertData = function (data) { 1200 for (var originalKey in data) { 1201 var keys = originalKey.split('-'); 1202 1203 var dataLevel = data; 1204 1205 if (keys.length === 1) { 1206 continue; 1207 } 1208 1209 for (var k = 0; k < keys.length; k++) { 1210 var key = keys[k]; 1211 1212 // Lowercase the first letter 1213 // By default, dash-separated becomes camelCase 1214 key = key.substring(0, 1).toLowerCase() + key.substring(1); 1215 1216 if (!(key in dataLevel)) { 1217 dataLevel[key] = {}; 1218 } 1219 1220 if (k == keys.length - 1) { 1221 dataLevel[key] = data[originalKey]; 1222 } 1223 1224 dataLevel = dataLevel[key]; 1225 } 1226 1227 delete data[originalKey]; 1228 } 1229 1230 return data; 1231 }; 1232 1233 Utils.hasScroll = function (index, el) { 1234 // Adapted from the function created by @ShadowScripter 1235 // and adapted by @BillBarry on the Stack Exchange Code Review website.
1236 // The original code can be found at 1237 // http://codereview.stackexchange.com/q/13338 1238 // and was designed to be used with the Sizzle selector engine. 1239 1240 var $el = $(el); 1241 var overflowX = el.style.overflowX; 1242 var overflowY = el.style.overflowY; 1243 1244 //Check both x and y declarations 1245 if (overflowX === overflowY && 1246 (overflowY === 'hidden' || overflowY === 'visible')) { 1247 return false; 1248 } 1249 1250 if (overflowX === 'scroll' || overflowY === 'scroll') { 1251 return true; 1252 } 1253 1254 return ($el.innerHeight() < el.scrollHeight || 1255 $el.innerWidth() < el.scrollWidth); 1256 }; 1257 1258 Utils.escapeMarkup = function (markup) { 1259 var replaceMap = { 1260 '\\': '\', 1261 '&': '&', 1262 '<': '<', 1263 '>': '>', 1264 '"': '"', 1265 '\'': ''', 1266 '/': '/' 1267 }; 1268 1269 // Do not try to escape the markup if it's not a string 1270 if (typeof markup !== 'string') { 1271 return markup; 1272 } 1273 1274 return String(markup).replace(/[&<>"'\/\\]/g, function (match) { 1275 return replaceMap[match]; 1276 }); 1277 }; 1278 1279 // Append an array of jQuery nodes to a given element. 1280 Utils.appendMany = function ($element, $nodes) { 1281 // jQuery 1.7.x does not support $.fn.append() with an array 1282 // Fall back to a jQuery object collection using $.fn.add() 1283 if ($.fn.jquery.substr(0, 3) === '1.7') { 1284 var $jqNodes = $(); 1285 1286 $.map($nodes, function (node) { 1287 $jqNodes = $jqNodes.add(node); 1288 }); 1289 1290 $nodes = $jqNodes; 1291 } 1292 1293 $element.append($nodes); 1294 }; 1295 1296 // Cache objects in Utils.__cache instead of $.data (see #4346) 1297 Utils.__cache = {}; 1298 1299 var id = 0; 1300 Utils.GetUniqueElementId = function (element) { 1301 // Get a unique element Id. If element has no id, 1302 // creates a new unique number, stores it in the id 1303 // attribute and returns the new id. 1304 // If an id already exists, it simply returns it. 1305 1306 var select2Id = element.getAttribute('data-select2-id'); 1307 if (select2Id == null) { 1308 // If element has id, use it. 1309 if (element.id) { 1310 select2Id = element.id; 1311 element.setAttribute('data-select2-id', select2Id); 1312 } else { 1313 element.setAttribute('data-select2-id', ++id); 1314 select2Id = id.toString(); 1315 } 1316 } 1317 return select2Id; 1318 }; 1319 1320 Utils.StoreData = function (element, name, value) { 1321 // Stores an item in the cache for a specified element. 1322 // name is the cache key. 1323 var id = Utils.GetUniqueElementId(element); 1324 if (!Utils.__cache[id]) { 1325 Utils.__cache[id] = {}; 1326 } 1327 1328 Utils.__cache[id][name] = value; 1329 }; 1330 1331 Utils.GetData = function (element, name) { 1332 // Retrieves a value from the cache by its key (name) 1333 // name is optional. If no name specified, return 1334 // all cache items for the specified element. 1335 // and for a specified element. 1336 var id = Utils.GetUniqueElementId(element); 1337 if (name) { 1338 if (Utils.__cache[id]) { 1339 if (Utils.__cache[id][name] != null) { 1340 return Utils.__cache[id][name]; 1341 } 1342 return $(element).data(name); // Fallback to HTML5 data attribs. 1343 } 1344 return $(element).data(name); // Fallback to HTML5 data attribs. 1345 } else { 1346 return Utils.__cache[id]; 1347 } 1348 }; 1349 1350 Utils.RemoveData = function (element) { 1351 // Removes all cached items for a specified element. 1352 var id = Utils.GetUniqueElementId(element); 1353 if (Utils.__cache[id] != null) { 1354 delete Utils.__cache[id]; 1355 } 1356 1357 element.removeAttribute('data-select2-id'); 1358 }; 1359 1360 return Utils; 1361}); 1362 1363S2.define('select2/results',[ 1364 'jquery', 1365 './utils' 1366], function ($, Utils) { 1367 function Results ($element, options, dataAdapter) { 1368 this.$element = $element; 1369 this.data = dataAdapter; 1370 this.options = options; 1371 1372 Results.__super__.constructor.call(this); 1373 } 1374 1375 Utils.Extend(Results, Utils.Observable); 1376 1377 Results.prototype.render = function () { 1378 var $results = $( 1379 '<ul class="select2-results__options" role="listbox"></ul>' 1380 ); 1381 1382 if (this.options.get('multiple')) { 1383 $results.attr('aria-multiselectable', 'true'); 1384 } 1385 1386 this.$results = $results; 1387 1388 return $results; 1389 }; 1390 1391 Results.prototype.clear = function () { 1392 this.$results.empty(); 1393 }; 1394 1395 Results.prototype.displayMessage = function (params) { 1396 var escapeMarkup = this.options.get('escapeMarkup'); 1397 1398 this.clear(); 1399 this.hideLoading(); 1400 1401 var $message = $( 1402 '<li role="alert" aria-live="assertive"' + 1403 ' class="select2-results__option"></li>' 1404 ); 1405 1406 var message = this.options.get('translations').get(params.message); 1407 1408 $message.append( 1409 escapeMarkup( 1410 message(params.args) 1411 ) 1412 ); 1413 1414 $message[0].className += ' select2-results__message';
vendor: 9,101 bytes, lines 1415-1777
1415 1416 this.$results.append($message); 1417 }; 1418 1419 Results.prototype.hideMessages = function () { 1420 this.$results.find('.select2-results__message').remove(); 1421 }; 1422 1423 Results.prototype.append = function (data) { 1424 this.hideLoading(); 1425 1426 var $options = []; 1427 1428 if (data.results == null || data.results.length === 0) { 1429 if (this.$results.children().length === 0) { 1430 this.trigger('results:message', { 1431 message: 'noResults' 1432 }); 1433 } 1434 1435 return; 1436 } 1437 1438 data.results = this.sort(data.results); 1439 1440 for (var d = 0; d < data.results.length; d++) { 1441 var item = data.results[d]; 1442 1443 var $option = this.option(item); 1444 1445 $options.push($option); 1446 } 1447 1448 this.$results.append($options); 1449 }; 1450 1451 Results.prototype.position = function ($results, $dropdown) { 1452 var $resultsContainer = $dropdown.find('.select2-results'); 1453 $resultsContainer.append($results); 1454 }; 1455 1456 Results.prototype.sort = function (data) { 1457 var sorter = this.options.get('sorter'); 1458 1459 return sorter(data); 1460 }; 1461 1462 Results.prototype.highlightFirstItem = function () { 1463 var $options = this.$results 1464 .find('.select2-results__option[aria-selected]'); 1465 1466 var $selected = $options.filter('[aria-selected=true]'); 1467 1468 // Check if there are any selected options 1469 if ($selected.length > 0) { 1470 // If there are selected options, highlight the first 1471 $selected.first().trigger('mouseenter'); 1472 } else { 1473 // If there are no selected options, highlight the first option 1474 // in the dropdown 1475 $options.first().trigger('mouseenter'); 1476 } 1477 1478 this.ensureHighlightVisible(); 1479 }; 1480 1481 Results.prototype.setClasses = function () { 1482 var self = this; 1483 1484 this.data.current(function (selected) { 1485 var selectedIds = $.map(selected, function (s) { 1486 return s.id.toString(); 1487 }); 1488 1489 var $options = self.$results 1490 .find('.select2-results__option[aria-selected]'); 1491 1492 $options.each(function () { 1493 var $option = $(this); 1494 1495 var item = Utils.GetData(this, 'data'); 1496 1497 // id needs to be converted to a string when comparing 1498 var id = '' + item.id; 1499 1500 if ((item.element != null && item.element.selected) || 1501 (item.element == null && $.inArray(id, selectedIds) > -1)) { 1502 $option.attr('aria-selected', 'true'); 1503 } else { 1504 $option.attr('aria-selected', 'false'); 1505 } 1506 }); 1507 1508 }); 1509 }; 1510 1511 Results.prototype.showLoading = function (params) { 1512 this.hideLoading(); 1513 1514 var loadingMore = this.options.get('translations').get('searching'); 1515 1516 var loading = { 1517 disabled: true, 1518 loading: true, 1519 text: loadingMore(params) 1520 }; 1521 var $loading = this.option(loading); 1522 $loading.className += ' loading-results'; 1523 1524 this.$results.prepend($loading); 1525 }; 1526 1527 Results.prototype.hideLoading = function () { 1528 this.$results.find('.loading-results').remove(); 1529 }; 1530 1531 Results.prototype.option = function (data) { 1532 var option = document.createElement('li'); 1533 option.className = 'select2-results__option'; 1534 1535 var attrs = { 1536 'role': 'option', 1537 'aria-selected': 'false' 1538 }; 1539 1540 var matches = window.Element.prototype.matches || 1541 window.Element.prototype.msMatchesSelector || 1542 window.Element.prototype.webkitMatchesSelector; 1543 1544 if ((data.element != null && matches.call(data.element, ':disabled')) || 1545 (data.element == null && data.disabled)) { 1546 delete attrs['aria-selected']; 1547 attrs['aria-disabled'] = 'true'; 1548 } 1549 1550 if (data.id == null) { 1551 delete attrs['aria-selected']; 1552 } 1553 1554 if (data._resultId != null) { 1555 option.id = data._resultId; 1556 } 1557 1558 if (data.title) { 1559 option.title = data.title; 1560 } 1561 1562 if (data.children) { 1563 attrs.role = 'group'; 1564 attrs['aria-label'] = data.text; 1565 delete attrs['aria-selected']; 1566 } 1567 1568 for (var attr in attrs) { 1569 var val = attrs[attr]; 1570 1571 option.setAttribute(attr, val); 1572 } 1573 1574 if (data.children) { 1575 var $option = $(option); 1576 1577 var label = document.createElement('strong'); 1578 label.className = 'select2-results__group'; 1579 1580 var $label = $(label); 1581 this.template(data, label); 1582 1583 var $children = []; 1584 1585 for (var c = 0; c < data.children.length; c++) { 1586 var child = data.children[c]; 1587 1588 var $child = this.option(child); 1589 1590 $children.push($child); 1591 } 1592 1593 var $childrenContainer = $('<ul></ul>', { 1594 'class': 'select2-results__options select2-results__options--nested' 1595 }); 1596 1597 $childrenContainer.append($children); 1598 1599 $option.append(label); 1600 $option.append($childrenContainer); 1601 } else { 1602 this.template(data, option); 1603 } 1604 1605 Utils.StoreData(option, 'data', data); 1606 1607 return option; 1608 }; 1609 1610 Results.prototype.bind = function (container, $container) { 1611 var self = this; 1612 1613 var id = container.id + '-results'; 1614 1615 this.$results.attr('id', id); 1616 1617 container.on('results:all', function (params) { 1618 self.clear(); 1619 self.append(params.data); 1620 1621 if (container.isOpen()) { 1622 self.setClasses(); 1623 self.highlightFirstItem(); 1624 } 1625 }); 1626 1627 container.on('results:append', function (params) { 1628 self.append(params.data); 1629 1630 if (container.isOpen()) { 1631 self.setClasses(); 1632 } 1633 }); 1634 1635 container.on('query', function (params) { 1636 self.hideMessages(); 1637 self.showLoading(params); 1638 }); 1639 1640 container.on('select', function () { 1641 if (!container.isOpen()) { 1642 return; 1643 } 1644 1645 self.setClasses(); 1646 1647 if (self.options.get('scrollAfterSelect')) { 1648 self.highlightFirstItem(); 1649 } 1650 }); 1651 1652 container.on('unselect', function () { 1653 if (!container.isOpen()) { 1654 return; 1655 } 1656 1657 self.setClasses(); 1658 1659 if (self.options.get('scrollAfterSelect')) { 1660 self.highlightFirstItem(); 1661 } 1662 }); 1663 1664 container.on('open', function () { 1665 // When the dropdown is open, aria-expended="true" 1666 self.$results.attr('aria-expanded', 'true'); 1667 self.$results.attr('aria-hidden', 'false'); 1668 1669 self.setClasses(); 1670 self.ensureHighlightVisible(); 1671 }); 1672 1673 container.on('close', function () { 1674 // When the dropdown is closed, aria-expended="false" 1675 self.$results.attr('aria-expanded', 'false'); 1676 self.$results.attr('aria-hidden', 'true'); 1677 self.$results.removeAttr('aria-activedescendant'); 1678 }); 1679 1680 container.on('results:toggle', function () { 1681 var $highlighted = self.getHighlightedResults(); 1682 1683 if ($highlighted.length === 0) { 1684 return; 1685 } 1686 1687 $highlighted.trigger('mouseup'); 1688 }); 1689 1690 container.on('results:select', function () { 1691 var $highlighted = self.getHighlightedResults(); 1692 1693 if ($highlighted.length === 0) { 1694 return; 1695 } 1696 1697 var data = Utils.GetData($highlighted[0], 'data'); 1698 1699 if ($highlighted.attr('aria-selected') == 'true') { 1700 self.trigger('close', {}); 1701 } else { 1702 self.trigger('select', { 1703 data: data 1704 }); 1705 } 1706 }); 1707 1708 container.on('results:previous', function () { 1709 var $highlighted = self.getHighlightedResults(); 1710 1711 var $options = self.$results.find('[aria-selected]'); 1712 1713 var currentIndex = $options.index($highlighted); 1714 1715 // If we are already at the top, don't move further 1716 // If no options, currentIndex will be -1 1717 if (currentIndex <= 0) { 1718 return; 1719 } 1720 1721 var nextIndex = currentIndex - 1; 1722 1723 // If none are highlighted, highlight the first 1724 if ($highlighted.length === 0) { 1725 nextIndex = 0; 1726 } 1727 1728 var $next = $options.eq(nextIndex); 1729 1730 $next.trigger('mouseenter'); 1731 1732 var currentOffset = self.$results.offset().top; 1733 var nextTop = $next.offset().top; 1734 var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset); 1735 1736 if (nextIndex === 0) { 1737 self.$results.scrollTop(0); 1738 } else if (nextTop - currentOffset < 0) { 1739 self.$results.scrollTop(nextOffset); 1740 } 1741 }); 1742 1743 container.on('results:next', function () { 1744 var $highlighted = self.getHighlightedResults(); 1745 1746 var $options = self.$results.find('[aria-selected]'); 1747 1748 var currentIndex = $options.index($highlighted); 1749 1750 var nextIndex = currentIndex + 1; 1751 1752 // If we are at the last option, stay there 1753 if (nextIndex >= $options.length) { 1754 return; 1755 } 1756 1757 var $next = $options.eq(nextIndex); 1758 1759 $next.trigger('mouseenter'); 1760 1761 var currentOffset = self.$results.offset().top + 1762 self.$results.outerHeight(false); 1763 var nextBottom = $next.offset().top + $next.outerHeight(false); 1764 var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset; 1765 1766 if (nextIndex === 0) { 1767 self.$results.scrollTop(0); 1768 } else if (nextBottom > currentOffset) { 1769 self.$results.scrollTop(nextOffset); 1770 } 1771 }); 1772 1773 container.on('results:focus', function (params) { 1774 params.element.addClass('select2-results__option--highlighted'); 1775 }); 1776 1777 container.on('results:message', function (params) {
vendor: 24,175 bytes, lines 1778-2699
1778 self.displayMessage(params); 1779 }); 1780 1781 if ($.fn.mousewheel) { 1782 this.$results.on('mousewheel', function (e) { 1783 var top = self.$results.scrollTop(); 1784 1785 var bottom = self.$results.get(0).scrollHeight - top + e.deltaY; 1786 1787 var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0; 1788 var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height(); 1789 1790 if (isAtTop) { 1791 self.$results.scrollTop(0); 1792 1793 e.preventDefault(); 1794 e.stopPropagation(); 1795 } else if (isAtBottom) { 1796 self.$results.scrollTop( 1797 self.$results.get(0).scrollHeight - self.$results.height() 1798 ); 1799 1800 e.preventDefault(); 1801 e.stopPropagation(); 1802 } 1803 }); 1804 } 1805 1806 this.$results.on('mouseup', '.select2-results__option[aria-selected]', 1807 function (evt) { 1808 var $this = $(this); 1809 1810 var data = Utils.GetData(this, 'data'); 1811 1812 if ($this.attr('aria-selected') === 'true') { 1813 if (self.options.get('multiple')) { 1814 self.trigger('unselect', { 1815 originalEvent: evt, 1816 data: data 1817 }); 1818 } else { 1819 self.trigger('close', {}); 1820 } 1821 1822 return; 1823 } 1824 1825 self.trigger('select', { 1826 originalEvent: evt, 1827 data: data 1828 }); 1829 }); 1830 1831 this.$results.on('mouseenter', '.select2-results__option[aria-selected]', 1832 function (evt) { 1833 var data = Utils.GetData(this, 'data'); 1834 1835 self.getHighlightedResults() 1836 .removeClass('select2-results__option--highlighted'); 1837 1838 self.trigger('results:focus', { 1839 data: data, 1840 element: $(this) 1841 }); 1842 }); 1843 }; 1844 1845 Results.prototype.getHighlightedResults = function () { 1846 var $highlighted = this.$results 1847 .find('.select2-results__option--highlighted'); 1848 1849 return $highlighted; 1850 }; 1851 1852 Results.prototype.destroy = function () { 1853 this.$results.remove(); 1854 }; 1855 1856 Results.prototype.ensureHighlightVisible = function () { 1857 var $highlighted = this.getHighlightedResults(); 1858 1859 if ($highlighted.length === 0) { 1860 return; 1861 } 1862 1863 var $options = this.$results.find('[aria-selected]'); 1864 1865 var currentIndex = $options.index($highlighted); 1866 1867 var currentOffset = this.$results.offset().top; 1868 var nextTop = $highlighted.offset().top; 1869 var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset); 1870 1871 var offsetDelta = nextTop - currentOffset; 1872 nextOffset -= $highlighted.outerHeight(false) * 2; 1873 1874 if (currentIndex <= 2) { 1875 this.$results.scrollTop(0); 1876 } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) { 1877 this.$results.scrollTop(nextOffset); 1878 } 1879 }; 1880 1881 Results.prototype.template = function (result, container) { 1882 var template = this.options.get('templateResult'); 1883 var escapeMarkup = this.options.get('escapeMarkup'); 1884 1885 var content = template(result, container); 1886 1887 if (content == null) { 1888 container.style.display = 'none'; 1889 } else if (typeof content === 'string') { 1890 container.innerHTML = escapeMarkup(content); 1891 } else { 1892 $(container).append(content); 1893 } 1894 }; 1895 1896 return Results; 1897}); 1898 1899S2.define('select2/keys',[ 1900 1901], function () { 1902 var KEYS = { 1903 BACKSPACE: 8, 1904 TAB: 9, 1905 ENTER: 13, 1906 SHIFT: 16, 1907 CTRL: 17, 1908 ALT: 18, 1909 ESC: 27, 1910 SPACE: 32, 1911 PAGE_UP: 33, 1912 PAGE_DOWN: 34, 1913 END: 35, 1914 HOME: 36, 1915 LEFT: 37, 1916 UP: 38, 1917 RIGHT: 39, 1918 DOWN: 40, 1919 DELETE: 46 1920 }; 1921 1922 return KEYS; 1923}); 1924 1925S2.define('select2/selection/base',[ 1926 'jquery', 1927 '../utils', 1928 '../keys' 1929], function ($, Utils, KEYS) { 1930 function BaseSelection ($element, options) { 1931 this.$element = $element; 1932 this.options = options; 1933 1934 BaseSelection.__super__.constructor.call(this); 1935 } 1936 1937 Utils.Extend(BaseSelection, Utils.Observable); 1938 1939 BaseSelection.prototype.render = function () { 1940 var $selection = $( 1941 '<span class="select2-selection" role="combobox" ' + 1942 ' aria-haspopup="true" aria-expanded="false">' + 1943 '</span>' 1944 ); 1945 1946 this._tabindex = 0; 1947 1948 if (Utils.GetData(this.$element[0], 'old-tabindex') != null) { 1949 this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex'); 1950 } else if (this.$element.attr('tabindex') != null) { 1951 this._tabindex = this.$element.attr('tabindex'); 1952 } 1953 1954 $selection.attr('title', this.$element.attr('title')); 1955 $selection.attr('tabindex', this._tabindex); 1956 $selection.attr('aria-disabled', 'false'); 1957 1958 this.$selection = $selection; 1959 1960 return $selection; 1961 }; 1962 1963 BaseSelection.prototype.bind = function (container, $container) { 1964 var self = this; 1965 1966 var resultsId = container.id + '-results'; 1967 1968 this.container = container; 1969 1970 this.$selection.on('focus', function (evt) { 1971 self.trigger('focus', evt); 1972 }); 1973 1974 this.$selection.on('blur', function (evt) { 1975 self._handleBlur(evt); 1976 }); 1977 1978 this.$selection.on('keydown', function (evt) { 1979 self.trigger('keypress', evt); 1980 1981 if (evt.which === KEYS.SPACE) { 1982 evt.preventDefault(); 1983 } 1984 }); 1985 1986 container.on('results:focus', function (params) { 1987 self.$selection.attr('aria-activedescendant', params.data._resultId); 1988 }); 1989 1990 container.on('selection:update', function (params) { 1991 self.update(params.data); 1992 }); 1993 1994 container.on('open', function () { 1995 // When the dropdown is open, aria-expanded="true" 1996 self.$selection.attr('aria-expanded', 'true'); 1997 self.$selection.attr('aria-owns', resultsId); 1998 1999 self._attachCloseHandler(container); 2000 }); 2001 2002 container.on('close', function () { 2003 // When the dropdown is closed, aria-expanded="false" 2004 self.$selection.attr('aria-expanded', 'false'); 2005 self.$selection.removeAttr('aria-activedescendant'); 2006 self.$selection.removeAttr('aria-owns'); 2007 2008 self.$selection.trigger('focus'); 2009 2010 self._detachCloseHandler(container); 2011 }); 2012 2013 container.on('enable', function () { 2014 self.$selection.attr('tabindex', self._tabindex); 2015 self.$selection.attr('aria-disabled', 'false'); 2016 }); 2017 2018 container.on('disable', function () { 2019 self.$selection.attr('tabindex', '-1'); 2020 self.$selection.attr('aria-disabled', 'true'); 2021 }); 2022 }; 2023 2024 BaseSelection.prototype._handleBlur = function (evt) { 2025 var self = this; 2026 2027 // This needs to be delayed as the active element is the body when the tab 2028 // key is pressed, possibly along with others. 2029 window.setTimeout(function () { 2030 // Don't trigger `blur` if the focus is still in the selection 2031 if ( 2032 (document.activeElement == self.$selection[0]) || 2033 ($.contains(self.$selection[0], document.activeElement)) 2034 ) { 2035 return; 2036 } 2037 2038 self.trigger('blur', evt); 2039 }, 1); 2040 }; 2041 2042 BaseSelection.prototype._attachCloseHandler = function (container) { 2043 2044 $(document.body).on('mousedown.select2.' + container.id, function (e) { 2045 var $target = $(e.target); 2046 2047 var $select = $target.closest('.select2'); 2048 2049 var $all = $('.select2.select2-container--open'); 2050 2051 $all.each(function () { 2052 if (this == $select[0]) { 2053 return; 2054 } 2055 2056 var $element = Utils.GetData(this, 'element'); 2057 2058 $element.select2('close'); 2059 }); 2060 }); 2061 }; 2062 2063 BaseSelection.prototype._detachCloseHandler = function (container) { 2064 $(document.body).off('mousedown.select2.' + container.id); 2065 }; 2066 2067 BaseSelection.prototype.position = function ($selection, $container) { 2068 var $selectionContainer = $container.find('.selection'); 2069 $selectionContainer.append($selection); 2070 }; 2071 2072 BaseSelection.prototype.destroy = function () { 2073 this._detachCloseHandler(this.container); 2074 }; 2075 2076 BaseSelection.prototype.update = function (data) { 2077 throw new Error('The `update` method must be defined in child classes.'); 2078 }; 2079 2080 /** 2081 * Helper method to abstract the "enabled" (not "disabled") state of this 2082 * object. 2083 * 2084 * @return {true} if the instance is not disabled. 2085 * @return {false} if the instance is disabled. 2086 */ 2087 BaseSelection.prototype.isEnabled = function () { 2088 return !this.isDisabled(); 2089 }; 2090 2091 /** 2092 * Helper method to abstract the "disabled" state of this object. 2093 * 2094 * @return {true} if the disabled option is true. 2095 * @return {false} if the disabled option is false. 2096 */ 2097 BaseSelection.prototype.isDisabled = function () { 2098 return this.options.get('disabled'); 2099 }; 2100 2101 return BaseSelection; 2102}); 2103 2104S2.define('select2/selection/single',[ 2105 'jquery', 2106 './base', 2107 '../utils', 2108 '../keys' 2109], function ($, BaseSelection, Utils, KEYS) { 2110 function SingleSelection () { 2111 SingleSelection.__super__.constructor.apply(this, arguments); 2112 } 2113 2114 Utils.Extend(SingleSelection, BaseSelection); 2115 2116 SingleSelection.prototype.render = function () { 2117 var $selection = SingleSelection.__super__.render.call(this); 2118 2119 $selection.addClass('select2-selection--single'); 2120 2121 $selection.html( 2122 '<span class="select2-selection__rendered"></span>' + 2123 '<span class="select2-selection__arrow" role="presentation">' + 2124 '<b role="presentation"></b>' + 2125 '</span>' 2126 ); 2127 2128 return $selection; 2129 }; 2130 2131 SingleSelection.prototype.bind = function (container, $container) { 2132 var self = this; 2133 2134 SingleSelection.__super__.bind.apply(this, arguments); 2135 2136 var id = container.id + '-container'; 2137 2138 this.$selection.find('.select2-selection__rendered') 2139 .attr('id', id) 2140 .attr('role', 'textbox') 2141 .attr('aria-readonly', 'true'); 2142 this.$selection.attr('aria-labelledby', id); 2143 2144 this.$selection.on('mousedown', function (evt) { 2145 // Only respond to left clicks 2146 if (evt.which !== 1) { 2147 return; 2148 } 2149 2150 self.trigger('toggle', { 2151 originalEvent: evt 2152 }); 2153 }); 2154 2155 this.$selection.on('focus', function (evt) { 2156 // User focuses on the container 2157 }); 2158 2159 this.$selection.on('blur', function (evt) { 2160 // User exits the container 2161 }); 2162 2163 container.on('focus', function (evt) { 2164 if (!container.isOpen()) { 2165 self.$selection.trigger('focus'); 2166 } 2167 }); 2168 }; 2169 2170 SingleSelection.prototype.clear = function () { 2171 var $rendered = this.$selection.find('.select2-selection__rendered'); 2172 $rendered.empty(); 2173 $rendered.removeAttr('title'); // clear tooltip on empty 2174 }; 2175 2176 SingleSelection.prototype.display = function (data, container) { 2177 var template = this.options.get('templateSelection'); 2178 var escapeMarkup = this.options.get('escapeMarkup'); 2179 2180 return escapeMarkup(template(data, container)); 2181 }; 2182 2183 SingleSelection.prototype.selectionContainer = function () { 2184 return $('<span></span>'); 2185 }; 2186 2187 SingleSelection.prototype.update = function (data) { 2188 if (data.length === 0) { 2189 this.clear(); 2190 return; 2191 } 2192 2193 var selection = data[0]; 2194 2195 var $rendered = this.$selection.find('.select2-selection__rendered'); 2196 var formatted = this.display(selection, $rendered); 2197 2198 $rendered.empty().append(formatted); 2199 2200 var title = selection.title || selection.text; 2201 2202 if (title) { 2203 $rendered.attr('title', title); 2204 } else { 2205 $rendered.removeAttr('title'); 2206 } 2207 }; 2208 2209 return SingleSelection; 2210}); 2211 2212S2.define('select2/selection/multiple',[ 2213 'jquery', 2214 './base', 2215 '../utils' 2216], function ($, BaseSelection, Utils) { 2217 function MultipleSelection ($element, options) { 2218 MultipleSelection.__super__.constructor.apply(this, arguments); 2219 } 2220 2221 Utils.Extend(MultipleSelection, BaseSelection); 2222 2223 MultipleSelection.prototype.render = function () { 2224 var $selection = MultipleSelection.__super__.render.call(this); 2225 2226 $selection.addClass('select2-selection--multiple'); 2227 2228 $selection.html( 2229 '<ul class="select2-selection__rendered"></ul>' 2230 ); 2231 2232 return $selection; 2233 }; 2234 2235 MultipleSelection.prototype.bind = function (container, $container) { 2236 var self = this; 2237 2238 MultipleSelection.__super__.bind.apply(this, arguments); 2239 2240 this.$selection.on('click', function (evt) { 2241 self.trigger('toggle', { 2242 originalEvent: evt 2243 }); 2244 }); 2245 2246 this.$selection.on( 2247 'click', 2248 '.select2-selection__choice__remove', 2249 function (evt) { 2250 // Ignore the event if it is disabled 2251 if (self.isDisabled()) { 2252 return; 2253 } 2254 2255 var $remove = $(this); 2256 var $selection = $remove.parent(); 2257 2258 var data = Utils.GetData($selection[0], 'data'); 2259 2260 self.trigger('unselect', { 2261 originalEvent: evt, 2262 data: data 2263 }); 2264 } 2265 ); 2266 }; 2267 2268 MultipleSelection.prototype.clear = function () { 2269 var $rendered = this.$selection.find('.select2-selection__rendered'); 2270 $rendered.empty(); 2271 $rendered.removeAttr('title'); 2272 }; 2273 2274 MultipleSelection.prototype.display = function (data, container) { 2275 var template = this.options.get('templateSelection'); 2276 var escapeMarkup = this.options.get('escapeMarkup'); 2277 2278 return escapeMarkup(template(data, container)); 2279 }; 2280 2281 MultipleSelection.prototype.selectionContainer = function () { 2282 var $container = $( 2283 '<li class="select2-selection__choice">' + 2284 '<span class="select2-selection__choice__remove" role="presentation">' + 2285 '×' + 2286 '</span>' + 2287 '</li>' 2288 ); 2289 2290 return $container; 2291 }; 2292 2293 MultipleSelection.prototype.update = function (data) { 2294 this.clear(); 2295 2296 if (data.length === 0) { 2297 return; 2298 } 2299 2300 var $selections = []; 2301 2302 for (var d = 0; d < data.length; d++) { 2303 var selection = data[d]; 2304 2305 var $selection = this.selectionContainer(); 2306 var formatted = this.display(selection, $selection); 2307 2308 $selection.append(formatted); 2309 2310 var title = selection.title || selection.text; 2311 2312 if (title) { 2313 $selection.attr('title', title); 2314 } 2315 2316 Utils.StoreData($selection[0], 'data', selection); 2317 2318 $selections.push($selection); 2319 } 2320 2321 var $rendered = this.$selection.find('.select2-selection__rendered'); 2322 2323 Utils.appendMany($rendered, $selections); 2324 }; 2325 2326 return MultipleSelection; 2327}); 2328 2329S2.define('select2/selection/placeholder',[ 2330 '../utils' 2331], function (Utils) { 2332 function Placeholder (decorated, $element, options) { 2333 this.placeholder = this.normalizePlaceholder(options.get('placeholder')); 2334 2335 decorated.call(this, $element, options); 2336 } 2337 2338 Placeholder.prototype.normalizePlaceholder = function (_, placeholder) { 2339 if (typeof placeholder === 'string') { 2340 placeholder = { 2341 id: '', 2342 text: placeholder 2343 }; 2344 } 2345 2346 return placeholder; 2347 }; 2348 2349 Placeholder.prototype.createPlaceholder = function (decorated, placeholder) { 2350 var $placeholder = this.selectionContainer(); 2351 2352 $placeholder.html(this.display(placeholder)); 2353 $placeholder.addClass('select2-selection__placeholder') 2354 .removeClass('select2-selection__choice'); 2355 2356 return $placeholder; 2357 }; 2358 2359 Placeholder.prototype.update = function (decorated, data) { 2360 var singlePlaceholder = ( 2361 data.length == 1 && data[0].id != this.placeholder.id 2362 ); 2363 var multipleSelections = data.length > 1; 2364 2365 if (multipleSelections || singlePlaceholder) { 2366 return decorated.call(this, data); 2367 } 2368 2369 this.clear(); 2370 2371 var $placeholder = this.createPlaceholder(this.placeholder); 2372 2373 this.$selection.find('.select2-selection__rendered').append($placeholder); 2374 }; 2375 2376 return Placeholder; 2377}); 2378 2379S2.define('select2/selection/allowClear',[ 2380 'jquery', 2381 '../keys', 2382 '../utils' 2383], function ($, KEYS, Utils) { 2384 function AllowClear () { } 2385 2386 AllowClear.prototype.bind = function (decorated, container, $container) { 2387 var self = this; 2388 2389 decorated.call(this, container, $container); 2390 2391 if (this.placeholder == null) { 2392 if (this.options.get('debug') && window.console && console.error) { 2393 console.error( 2394 'Select2: The `allowClear` option should be used in combination ' + 2395 'with the `placeholder` option.' 2396 ); 2397 } 2398 } 2399 2400 this.$selection.on('mousedown', '.select2-selection__clear', 2401 function (evt) { 2402 self._handleClear(evt); 2403 }); 2404 2405 container.on('keypress', function (evt) { 2406 self._handleKeyboardClear(evt, container); 2407 }); 2408 }; 2409 2410 AllowClear.prototype._handleClear = function (_, evt) { 2411 // Ignore the event if it is disabled 2412 if (this.isDisabled()) { 2413 return; 2414 } 2415 2416 var $clear = this.$selection.find('.select2-selection__clear'); 2417 2418 // Ignore the event if nothing has been selected 2419 if ($clear.length === 0) { 2420 return; 2421 } 2422 2423 evt.stopPropagation(); 2424 2425 var data = Utils.GetData($clear[0], 'data'); 2426 2427 var previousVal = this.$element.val(); 2428 this.$element.val(this.placeholder.id); 2429 2430 var unselectData = { 2431 data: data 2432 }; 2433 this.trigger('clear', unselectData); 2434 if (unselectData.prevented) { 2435 this.$element.val(previousVal); 2436 return; 2437 } 2438 2439 for (var d = 0; d < data.length; d++) { 2440 unselectData = { 2441 data: data[d] 2442 }; 2443 2444 // Trigger the `unselect` event, so people can prevent it from being 2445 // cleared. 2446 this.trigger('unselect', unselectData); 2447 2448 // If the event was prevented, don't clear it out. 2449 if (unselectData.prevented) { 2450 this.$element.val(previousVal); 2451 return; 2452 } 2453 } 2454 2455 this.$element.trigger('input').trigger('change'); 2456 2457 this.trigger('toggle', {}); 2458 }; 2459 2460 AllowClear.prototype._handleKeyboardClear = function (_, evt, container) { 2461 if (container.isOpen()) { 2462 return; 2463 } 2464 2465 if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) { 2466 this._handleClear(evt); 2467 } 2468 }; 2469 2470 AllowClear.prototype.update = function (decorated, data) { 2471 decorated.call(this, data); 2472 2473 if (this.$selection.find('.select2-selection__placeholder').length > 0 || 2474 data.length === 0) { 2475 return; 2476 } 2477 2478 var removeAll = this.options.get('translations').get('removeAllItems'); 2479 2480 var $remove = $( 2481 '<span class="select2-selection__clear" title="' + removeAll() +'">' + 2482 '×' + 2483 '</span>' 2484 ); 2485 Utils.StoreData($remove[0], 'data', data); 2486 2487 this.$selection.find('.select2-selection__rendered').prepend($remove); 2488 }; 2489 2490 return AllowClear; 2491}); 2492 2493S2.define('select2/selection/search',[ 2494 'jquery', 2495 '../utils', 2496 '../keys' 2497], function ($, Utils, KEYS) { 2498 function Search (decorated, $element, options) { 2499 decorated.call(this, $element, options); 2500 } 2501 2502 Search.prototype.render = function (decorated) { 2503 var $search = $( 2504 '<li class="select2-search select2-search--inline">' + 2505 '<input class="select2-search__field" type="search" tabindex="-1"' + 2506 ' autocomplete="off" autocorrect="off" autocapitalize="none"' + 2507 ' spellcheck="false" role="searchbox" aria-autocomplete="list" />' + 2508 '</li>' 2509 ); 2510 2511 this.$searchContainer = $search; 2512 this.$search = $search.find('input'); 2513 2514 var $rendered = decorated.call(this); 2515 2516 this._transferTabIndex(); 2517 2518 return $rendered; 2519 }; 2520 2521 Search.prototype.bind = function (decorated, container, $container) { 2522 var self = this; 2523 2524 var resultsId = container.id + '-results'; 2525 2526 decorated.call(this, container, $container); 2527 2528 container.on('open', function () { 2529 self.$search.attr('aria-controls', resultsId); 2530 self.$search.trigger('focus'); 2531 }); 2532 2533 container.on('close', function () { 2534 self.$search.val(''); 2535 self.$search.removeAttr('aria-controls'); 2536 self.$search.removeAttr('aria-activedescendant'); 2537 self.$search.trigger('focus'); 2538 }); 2539 2540 container.on('enable', function () { 2541 self.$search.prop('disabled', false); 2542 2543 self._transferTabIndex(); 2544 }); 2545 2546 container.on('disable', function () { 2547 self.$search.prop('disabled', true); 2548 }); 2549 2550 container.on('focus', function (evt) { 2551 self.$search.trigger('focus'); 2552 }); 2553 2554 container.on('results:focus', function (params) { 2555 if (params.data._resultId) { 2556 self.$search.attr('aria-activedescendant', params.data._resultId); 2557 } else { 2558 self.$search.removeAttr('aria-activedescendant'); 2559 } 2560 }); 2561 2562 this.$selection.on('focusin', '.select2-search--inline', function (evt) { 2563 self.trigger('focus', evt); 2564 }); 2565 2566 this.$selection.on('focusout', '.select2-search--inline', function (evt) { 2567 self._handleBlur(evt); 2568 }); 2569 2570 this.$selection.on('keydown', '.select2-search--inline', function (evt) { 2571 evt.stopPropagation(); 2572 2573 self.trigger('keypress', evt); 2574 2575 self._keyUpPrevented = evt.isDefaultPrevented(); 2576 2577 var key = evt.which; 2578 2579 if (key === KEYS.BACKSPACE && self.$search.val() === '') { 2580 var $previousChoice = self.$searchContainer 2581 .prev('.select2-selection__choice'); 2582 2583 if ($previousChoice.length > 0) { 2584 var item = Utils.GetData($previousChoice[0], 'data'); 2585 2586 self.searchRemoveChoice(item); 2587 2588 evt.preventDefault(); 2589 } 2590 } 2591 }); 2592 2593 this.$selection.on('click', '.select2-search--inline', function (evt) { 2594 if (self.$search.val()) { 2595 evt.stopPropagation(); 2596 } 2597 }); 2598 2599 // Try to detect the IE version should the `documentMode` property that 2600 // is stored on the document. This is only implemented in IE and is 2601 // slightly cleaner than doing a user agent check. 2602 // This property is not available in Edge, but Edge also doesn't have 2603 // this bug. 2604 var msie = document.documentMode; 2605 var disableInputEvents = msie && msie <= 11; 2606 2607 // Workaround for browsers which do not support the `input` event 2608 // This will prevent double-triggering of events for browsers which support 2609 // both the `keyup` and `input` events. 2610 this.$selection.on( 2611 'input.searchcheck', 2612 '.select2-search--inline', 2613 function (evt) { 2614 // IE will trigger the `input` event when a placeholder is used on a 2615 // search box. To get around this issue, we are forced to ignore all 2616 // `input` events in IE and keep using `keyup`. 2617 if (disableInputEvents) { 2618 self.$selection.off('input.search input.searchcheck'); 2619 return; 2620 } 2621 2622 // Unbind the duplicated `keyup` event 2623 self.$selection.off('keyup.search'); 2624 } 2625 ); 2626 2627 this.$selection.on( 2628 'keyup.search input.search', 2629 '.select2-search--inline', 2630 function (evt) { 2631 // IE will trigger the `input` event when a placeholder is used on a 2632 // search box. To get around this issue, we are forced to ignore all 2633 // `input` events in IE and keep using `keyup`. 2634 if (disableInputEvents && evt.type === 'input') { 2635 self.$selection.off('input.search input.searchcheck'); 2636 return; 2637 } 2638 2639 var key = evt.which; 2640 2641 // We can freely ignore events from modifier keys 2642 if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) { 2643 return; 2644 } 2645 2646 // Tabbing will be handled during the `keydown` phase 2647 if (key == KEYS.TAB) { 2648 return; 2649 } 2650 2651 self.handleSearch(evt); 2652 } 2653 ); 2654 }; 2655 2656 /** 2657 * This method will transfer the tabindex attribute from the rendered 2658 * selection to the search box. This allows for the search box to be used as 2659 * the primary focus instead of the selection container. 2660 * 2661 * @private 2662 */ 2663 Search.prototype._transferTabIndex = function (decorated) { 2664 this.$search.attr('tabindex', this.$selection.attr('tabindex')); 2665 this.$selection.attr('tabindex', '-1'); 2666 }; 2667 2668 Search.prototype.createPlaceholder = function (decorated, placeholder) { 2669 this.$search.attr('placeholder', placeholder.text); 2670 }; 2671 2672 Search.prototype.update = function (decorated, data) { 2673 var searchHadFocus = this.$search[0] == document.activeElement; 2674 2675 this.$search.attr('placeholder', ''); 2676 2677 decorated.call(this, data); 2678 2679 this.$selection.find('.select2-selection__rendered') 2680 .append(this.$searchContainer); 2681 2682 this.resizeSearch(); 2683 if (searchHadFocus) { 2684 this.$search.trigger('focus'); 2685 } 2686 }; 2687 2688 Search.prototype.handleSearch = function () { 2689 this.resizeSearch(); 2690 2691 if (!this._keyUpPrevented) { 2692 var input = this.$search.val(); 2693 2694 this.trigger('query', { 2695 term: input 2696 }); 2697 } 2698 2699 this._keyUpPrevented = false;
vendor: 43,019 bytes, lines 2700-4700
2700 }; 2701 2702 Search.prototype.searchRemoveChoice = function (decorated, item) { 2703 this.trigger('unselect', { 2704 data: item 2705 }); 2706 2707 this.$search.val(item.text); 2708 this.handleSearch(); 2709 }; 2710 2711 Search.prototype.resizeSearch = function () { 2712 this.$search.css('width', '25px'); 2713 2714 var width = ''; 2715 2716 if (this.$search.attr('placeholder') !== '') { 2717 width = this.$selection.find('.select2-selection__rendered').width(); 2718 } else { 2719 var minimumWidth = this.$search.val().length + 1; 2720 2721 width = (minimumWidth * 0.75) + 'em'; 2722 } 2723 2724 this.$search.css('width', width); 2725 }; 2726 2727 return Search; 2728}); 2729 2730S2.define('select2/selection/eventRelay',[ 2731 'jquery' 2732], function ($) { 2733 function EventRelay () { } 2734 2735 EventRelay.prototype.bind = function (decorated, container, $container) { 2736 var self = this; 2737 var relayEvents = [ 2738 'open', 'opening', 2739 'close', 'closing', 2740 'select', 'selecting', 2741 'unselect', 'unselecting', 2742 'clear', 'clearing' 2743 ]; 2744 2745 var preventableEvents = [ 2746 'opening', 'closing', 'selecting', 'unselecting', 'clearing' 2747 ]; 2748 2749 decorated.call(this, container, $container); 2750 2751 container.on('*', function (name, params) { 2752 // Ignore events that should not be relayed 2753 if ($.inArray(name, relayEvents) === -1) { 2754 return; 2755 } 2756 2757 // The parameters should always be an object 2758 params = params || {}; 2759 2760 // Generate the jQuery event for the Select2 event 2761 var evt = $.Event('select2:' + name, { 2762 params: params 2763 }); 2764 2765 self.$element.trigger(evt); 2766 2767 // Only handle preventable events if it was one 2768 if ($.inArray(name, preventableEvents) === -1) { 2769 return; 2770 } 2771 2772 params.prevented = evt.isDefaultPrevented(); 2773 }); 2774 }; 2775 2776 return EventRelay; 2777}); 2778 2779S2.define('select2/translation',[ 2780 'jquery', 2781 'require' 2782], function ($, require) { 2783 function Translation (dict) { 2784 this.dict = dict || {}; 2785 } 2786 2787 Translation.prototype.all = function () { 2788 return this.dict; 2789 }; 2790 2791 Translation.prototype.get = function (key) { 2792 return this.dict[key]; 2793 }; 2794 2795 Translation.prototype.extend = function (translation) { 2796 this.dict = $.extend({}, translation.all(), this.dict); 2797 }; 2798 2799 // Static functions 2800 2801 Translation._cache = {}; 2802 2803 Translation.loadPath = function (path) { 2804 if (!(path in Translation._cache)) { 2805 var translations = require(path); 2806 2807 Translation._cache[path] = translations; 2808 } 2809 2810 return new Translation(Translation._cache[path]); 2811 }; 2812 2813 return Translation; 2814}); 2815 2816S2.define('select2/diacritics',[ 2817 2818], function () { 2819 var diacritics = { 2820 '\u24B6': 'A', 2821 '\uFF21': 'A', 2822 '\u00C0': 'A', 2823 '\u00C1': 'A', 2824 '\u00C2': 'A', 2825 '\u1EA6': 'A', 2826 '\u1EA4': 'A', 2827 '\u1EAA': 'A', 2828 '\u1EA8': 'A', 2829 '\u00C3': 'A', 2830 '\u0100': 'A', 2831 '\u0102': 'A', 2832 '\u1EB0': 'A', 2833 '\u1EAE': 'A', 2834 '\u1EB4': 'A', 2835 '\u1EB2': 'A', 2836 '\u0226': 'A', 2837 '\u01E0': 'A', 2838 '\u00C4': 'A', 2839 '\u01DE': 'A', 2840 '\u1EA2': 'A', 2841 '\u00C5': 'A', 2842 '\u01FA': 'A', 2843 '\u01CD': 'A', 2844 '\u0200': 'A', 2845 '\u0202': 'A', 2846 '\u1EA0': 'A', 2847 '\u1EAC': 'A', 2848 '\u1EB6': 'A', 2849 '\u1E00': 'A', 2850 '\u0104': 'A', 2851 '\u023A': 'A', 2852 '\u2C6F': 'A', 2853 '\uA732': 'AA', 2854 '\u00C6': 'AE', 2855 '\u01FC': 'AE', 2856 '\u01E2': 'AE', 2857 '\uA734': 'AO', 2858 '\uA736': 'AU', 2859 '\uA738': 'AV', 2860 '\uA73A': 'AV', 2861 '\uA73C': 'AY', 2862 '\u24B7': 'B', 2863 '\uFF22': 'B', 2864 '\u1E02': 'B', 2865 '\u1E04': 'B', 2866 '\u1E06': 'B', 2867 '\u0243': 'B', 2868 '\u0182': 'B', 2869 '\u0181': 'B', 2870 '\u24B8': 'C', 2871 '\uFF23': 'C', 2872 '\u0106': 'C', 2873 '\u0108': 'C', 2874 '\u010A': 'C', 2875 '\u010C': 'C', 2876 '\u00C7': 'C', 2877 '\u1E08': 'C', 2878 '\u0187': 'C', 2879 '\u023B': 'C', 2880 '\uA73E': 'C', 2881 '\u24B9': 'D', 2882 '\uFF24': 'D', 2883 '\u1E0A': 'D', 2884 '\u010E': 'D', 2885 '\u1E0C': 'D', 2886 '\u1E10': 'D', 2887 '\u1E12': 'D', 2888 '\u1E0E': 'D', 2889 '\u0110': 'D', 2890 '\u018B': 'D', 2891 '\u018A': 'D', 2892 '\u0189': 'D', 2893 '\uA779': 'D', 2894 '\u01F1': 'DZ', 2895 '\u01C4': 'DZ', 2896 '\u01F2': 'Dz', 2897 '\u01C5': 'Dz', 2898 '\u24BA': 'E', 2899 '\uFF25': 'E', 2900 '\u00C8': 'E', 2901 '\u00C9': 'E', 2902 '\u00CA': 'E', 2903 '\u1EC0': 'E', 2904 '\u1EBE': 'E', 2905 '\u1EC4': 'E', 2906 '\u1EC2': 'E', 2907 '\u1EBC': 'E', 2908 '\u0112': 'E', 2909 '\u1E14': 'E', 2910 '\u1E16': 'E', 2911 '\u0114': 'E', 2912 '\u0116': 'E', 2913 '\u00CB': 'E', 2914 '\u1EBA': 'E', 2915 '\u011A': 'E', 2916 '\u0204': 'E', 2917 '\u0206': 'E', 2918 '\u1EB8': 'E', 2919 '\u1EC6': 'E', 2920 '\u0228': 'E', 2921 '\u1E1C': 'E', 2922 '\u0118': 'E', 2923 '\u1E18': 'E', 2924 '\u1E1A': 'E', 2925 '\u0190': 'E', 2926 '\u018E': 'E', 2927 '\u24BB': 'F', 2928 '\uFF26': 'F', 2929 '\u1E1E': 'F', 2930 '\u0191': 'F', 2931 '\uA77B': 'F', 2932 '\u24BC': 'G', 2933 '\uFF27': 'G', 2934 '\u01F4': 'G', 2935 '\u011C': 'G', 2936 '\u1E20': 'G', 2937 '\u011E': 'G', 2938 '\u0120': 'G', 2939 '\u01E6': 'G', 2940 '\u0122': 'G', 2941 '\u01E4': 'G', 2942 '\u0193': 'G', 2943 '\uA7A0': 'G', 2944 '\uA77D': 'G', 2945 '\uA77E': 'G', 2946 '\u24BD': 'H', 2947 '\uFF28': 'H', 2948 '\u0124': 'H', 2949 '\u1E22': 'H', 2950 '\u1E26': 'H', 2951 '\u021E': 'H', 2952 '\u1E24': 'H', 2953 '\u1E28': 'H', 2954 '\u1E2A': 'H', 2955 '\u0126': 'H', 2956 '\u2C67': 'H', 2957 '\u2C75': 'H', 2958 '\uA78D': 'H', 2959 '\u24BE': 'I', 2960 '\uFF29': 'I', 2961 '\u00CC': 'I', 2962 '\u00CD': 'I', 2963 '\u00CE': 'I', 2964 '\u0128': 'I', 2965 '\u012A': 'I', 2966 '\u012C': 'I', 2967 '\u0130': 'I', 2968 '\u00CF': 'I', 2969 '\u1E2E': 'I', 2970 '\u1EC8': 'I', 2971 '\u01CF': 'I', 2972 '\u0208': 'I', 2973 '\u020A': 'I', 2974 '\u1ECA': 'I', 2975 '\u012E': 'I', 2976 '\u1E2C': 'I', 2977 '\u0197': 'I', 2978 '\u24BF': 'J', 2979 '\uFF2A': 'J', 2980 '\u0134': 'J', 2981 '\u0248': 'J', 2982 '\u24C0': 'K', 2983 '\uFF2B': 'K', 2984 '\u1E30': 'K', 2985 '\u01E8': 'K', 2986 '\u1E32': 'K', 2987 '\u0136': 'K', 2988 '\u1E34': 'K', 2989 '\u0198': 'K', 2990 '\u2C69': 'K', 2991 '\uA740': 'K', 2992 '\uA742': 'K', 2993 '\uA744': 'K', 2994 '\uA7A2': 'K', 2995 '\u24C1': 'L', 2996 '\uFF2C': 'L', 2997 '\u013F': 'L', 2998 '\u0139': 'L', 2999 '\u013D': 'L', 3000 '\u1E36': 'L', 3001 '\u1E38': 'L', 3002 '\u013B': 'L', 3003 '\u1E3C': 'L', 3004 '\u1E3A': 'L', 3005 '\u0141': 'L', 3006 '\u023D': 'L', 3007 '\u2C62': 'L', 3008 '\u2C60': 'L', 3009 '\uA748': 'L', 3010 '\uA746': 'L', 3011 '\uA780': 'L', 3012 '\u01C7': 'LJ', 3013 '\u01C8': 'Lj', 3014 '\u24C2': 'M', 3015 '\uFF2D': 'M', 3016 '\u1E3E': 'M', 3017 '\u1E40': 'M', 3018 '\u1E42': 'M', 3019 '\u2C6E': 'M', 3020 '\u019C': 'M', 3021 '\u24C3': 'N', 3022 '\uFF2E': 'N', 3023 '\u01F8': 'N', 3024 '\u0143': 'N', 3025 '\u00D1': 'N', 3026 '\u1E44': 'N', 3027 '\u0147': 'N', 3028 '\u1E46': 'N', 3029 '\u0145': 'N', 3030 '\u1E4A': 'N', 3031 '\u1E48': 'N', 3032 '\u0220': 'N', 3033 '\u019D': 'N', 3034 '\uA790': 'N', 3035 '\uA7A4': 'N', 3036 '\u01CA': 'NJ', 3037 '\u01CB': 'Nj', 3038 '\u24C4': 'O', 3039 '\uFF2F': 'O', 3040 '\u00D2': 'O', 3041 '\u00D3': 'O', 3042 '\u00D4': 'O', 3043 '\u1ED2': 'O', 3044 '\u1ED0': 'O', 3045 '\u1ED6': 'O', 3046 '\u1ED4': 'O', 3047 '\u00D5': 'O', 3048 '\u1E4C': 'O', 3049 '\u022C': 'O', 3050 '\u1E4E': 'O', 3051 '\u014C': 'O', 3052 '\u1E50': 'O', 3053 '\u1E52': 'O', 3054 '\u014E': 'O', 3055 '\u022E': 'O', 3056 '\u0230': 'O', 3057 '\u00D6': 'O', 3058 '\u022A': 'O', 3059 '\u1ECE': 'O', 3060 '\u0150': 'O', 3061 '\u01D1': 'O', 3062 '\u020C': 'O', 3063 '\u020E': 'O', 3064 '\u01A0': 'O', 3065 '\u1EDC': 'O', 3066 '\u1EDA': 'O', 3067 '\u1EE0': 'O', 3068 '\u1EDE': 'O', 3069 '\u1EE2': 'O', 3070 '\u1ECC': 'O', 3071 '\u1ED8': 'O', 3072 '\u01EA': 'O', 3073 '\u01EC': 'O', 3074 '\u00D8': 'O', 3075 '\u01FE': 'O', 3076 '\u0186': 'O', 3077 '\u019F': 'O', 3078 '\uA74A': 'O', 3079 '\uA74C': 'O', 3080 '\u0152': 'OE', 3081 '\u01A2': 'OI', 3082 '\uA74E': 'OO', 3083 '\u0222': 'OU', 3084 '\u24C5': 'P', 3085 '\uFF30': 'P', 3086 '\u1E54': 'P', 3087 '\u1E56': 'P', 3088 '\u01A4': 'P', 3089 '\u2C63': 'P', 3090 '\uA750': 'P', 3091 '\uA752': 'P', 3092 '\uA754': 'P', 3093 '\u24C6': 'Q', 3094 '\uFF31': 'Q', 3095 '\uA756': 'Q', 3096 '\uA758': 'Q', 3097 '\u024A': 'Q', 3098 '\u24C7': 'R', 3099 '\uFF32': 'R', 3100 '\u0154': 'R', 3101 '\u1E58': 'R', 3102 '\u0158': 'R', 3103 '\u0210': 'R', 3104 '\u0212': 'R', 3105 '\u1E5A': 'R', 3106 '\u1E5C': 'R', 3107 '\u0156': 'R', 3108 '\u1E5E': 'R', 3109 '\u024C': 'R', 3110 '\u2C64': 'R', 3111 '\uA75A': 'R', 3112 '\uA7A6': 'R', 3113 '\uA782': 'R', 3114 '\u24C8': 'S', 3115 '\uFF33': 'S', 3116 '\u1E9E': 'S', 3117 '\u015A': 'S', 3118 '\u1E64': 'S', 3119 '\u015C': 'S', 3120 '\u1E60': 'S', 3121 '\u0160': 'S', 3122 '\u1E66': 'S', 3123 '\u1E62': 'S', 3124 '\u1E68': 'S', 3125 '\u0218': 'S', 3126 '\u015E': 'S', 3127 '\u2C7E': 'S', 3128 '\uA7A8': 'S', 3129 '\uA784': 'S', 3130 '\u24C9': 'T', 3131 '\uFF34': 'T', 3132 '\u1E6A': 'T', 3133 '\u0164': 'T', 3134 '\u1E6C': 'T', 3135 '\u021A': 'T', 3136 '\u0162': 'T', 3137 '\u1E70': 'T', 3138 '\u1E6E': 'T', 3139 '\u0166': 'T', 3140 '\u01AC': 'T', 3141 '\u01AE': 'T', 3142 '\u023E': 'T', 3143 '\uA786': 'T', 3144 '\uA728': 'TZ', 3145 '\u24CA': 'U', 3146 '\uFF35': 'U', 3147 '\u00D9': 'U', 3148 '\u00DA': 'U', 3149 '\u00DB': 'U', 3150 '\u0168': 'U', 3151 '\u1E78': 'U', 3152 '\u016A': 'U', 3153 '\u1E7A': 'U', 3154 '\u016C': 'U', 3155 '\u00DC': 'U', 3156 '\u01DB': 'U', 3157 '\u01D7': 'U', 3158 '\u01D5': 'U', 3159 '\u01D9': 'U', 3160 '\u1EE6': 'U', 3161 '\u016E': 'U', 3162 '\u0170': 'U', 3163 '\u01D3': 'U', 3164 '\u0214': 'U', 3165 '\u0216': 'U', 3166 '\u01AF': 'U', 3167 '\u1EEA': 'U', 3168 '\u1EE8': 'U', 3169 '\u1EEE': 'U', 3170 '\u1EEC': 'U', 3171 '\u1EF0': 'U', 3172 '\u1EE4': 'U', 3173 '\u1E72': 'U', 3174 '\u0172': 'U', 3175 '\u1E76': 'U', 3176 '\u1E74': 'U', 3177 '\u0244': 'U', 3178 '\u24CB': 'V', 3179 '\uFF36': 'V', 3180 '\u1E7C': 'V', 3181 '\u1E7E': 'V', 3182 '\u01B2': 'V', 3183 '\uA75E': 'V', 3184 '\u0245': 'V', 3185 '\uA760': 'VY', 3186 '\u24CC': 'W', 3187 '\uFF37': 'W', 3188 '\u1E80': 'W', 3189 '\u1E82': 'W', 3190 '\u0174': 'W', 3191 '\u1E86': 'W', 3192 '\u1E84': 'W', 3193 '\u1E88': 'W', 3194 '\u2C72': 'W', 3195 '\u24CD': 'X', 3196 '\uFF38': 'X', 3197 '\u1E8A': 'X', 3198 '\u1E8C': 'X', 3199 '\u24CE': 'Y', 3200 '\uFF39': 'Y', 3201 '\u1EF2': 'Y', 3202 '\u00DD': 'Y', 3203 '\u0176': 'Y', 3204 '\u1EF8': 'Y', 3205 '\u0232': 'Y', 3206 '\u1E8E': 'Y', 3207 '\u0178': 'Y', 3208 '\u1EF6': 'Y', 3209 '\u1EF4': 'Y', 3210 '\u01B3': 'Y', 3211 '\u024E': 'Y', 3212 '\u1EFE': 'Y', 3213 '\u24CF': 'Z', 3214 '\uFF3A': 'Z', 3215 '\u0179': 'Z', 3216 '\u1E90': 'Z', 3217 '\u017B': 'Z', 3218 '\u017D': 'Z', 3219 '\u1E92': 'Z', 3220 '\u1E94': 'Z', 3221 '\u01B5': 'Z', 3222 '\u0224': 'Z', 3223 '\u2C7F': 'Z', 3224 '\u2C6B': 'Z', 3225 '\uA762': 'Z', 3226 '\u24D0': 'a', 3227 '\uFF41': 'a', 3228 '\u1E9A': 'a', 3229 '\u00E0': 'a', 3230 '\u00E1': 'a', 3231 '\u00E2': 'a', 3232 '\u1EA7': 'a', 3233 '\u1EA5': 'a', 3234 '\u1EAB': 'a', 3235 '\u1EA9': 'a', 3236 '\u00E3': 'a', 3237 '\u0101': 'a', 3238 '\u0103': 'a', 3239 '\u1EB1': 'a', 3240 '\u1EAF': 'a', 3241 '\u1EB5': 'a', 3242 '\u1EB3': 'a', 3243 '\u0227': 'a', 3244 '\u01E1': 'a', 3245 '\u00E4': 'a', 3246 '\u01DF': 'a', 3247 '\u1EA3': 'a', 3248 '\u00E5': 'a', 3249 '\u01FB': 'a', 3250 '\u01CE': 'a', 3251 '\u0201': 'a', 3252 '\u0203': 'a', 3253 '\u1EA1': 'a', 3254 '\u1EAD': 'a', 3255 '\u1EB7': 'a', 3256 '\u1E01': 'a', 3257 '\u0105': 'a', 3258 '\u2C65': 'a', 3259 '\u0250': 'a', 3260 '\uA733': 'aa', 3261 '\u00E6': 'ae', 3262 '\u01FD': 'ae', 3263 '\u01E3': 'ae', 3264 '\uA735': 'ao', 3265 '\uA737': 'au', 3266 '\uA739': 'av', 3267 '\uA73B': 'av', 3268 '\uA73D': 'ay', 3269 '\u24D1': 'b', 3270 '\uFF42': 'b', 3271 '\u1E03': 'b', 3272 '\u1E05': 'b', 3273 '\u1E07': 'b', 3274 '\u0180': 'b', 3275 '\u0183': 'b', 3276 '\u0253': 'b', 3277 '\u24D2': 'c', 3278 '\uFF43': 'c', 3279 '\u0107': 'c', 3280 '\u0109': 'c', 3281 '\u010B': 'c', 3282 '\u010D': 'c', 3283 '\u00E7': 'c', 3284 '\u1E09': 'c', 3285 '\u0188': 'c', 3286 '\u023C': 'c', 3287 '\uA73F': 'c', 3288 '\u2184': 'c', 3289 '\u24D3': 'd', 3290 '\uFF44': 'd', 3291 '\u1E0B': 'd', 3292 '\u010F': 'd', 3293 '\u1E0D': 'd', 3294 '\u1E11': 'd', 3295 '\u1E13': 'd', 3296 '\u1E0F': 'd', 3297 '\u0111': 'd', 3298 '\u018C': 'd', 3299 '\u0256': 'd', 3300 '\u0257': 'd', 3301 '\uA77A': 'd', 3302 '\u01F3': 'dz', 3303 '\u01C6': 'dz', 3304 '\u24D4': 'e', 3305 '\uFF45': 'e', 3306 '\u00E8': 'e', 3307 '\u00E9': 'e', 3308 '\u00EA': 'e', 3309 '\u1EC1': 'e', 3310 '\u1EBF': 'e', 3311 '\u1EC5': 'e', 3312 '\u1EC3': 'e', 3313 '\u1EBD': 'e', 3314 '\u0113': 'e', 3315 '\u1E15': 'e', 3316 '\u1E17': 'e', 3317 '\u0115': 'e', 3318 '\u0117': 'e', 3319 '\u00EB': 'e', 3320 '\u1EBB': 'e', 3321 '\u011B': 'e', 3322 '\u0205': 'e', 3323 '\u0207': 'e', 3324 '\u1EB9': 'e', 3325 '\u1EC7': 'e', 3326 '\u0229': 'e', 3327 '\u1E1D': 'e', 3328 '\u0119': 'e', 3329 '\u1E19': 'e', 3330 '\u1E1B': 'e', 3331 '\u0247': 'e', 3332 '\u025B': 'e', 3333 '\u01DD': 'e', 3334 '\u24D5': 'f', 3335 '\uFF46': 'f', 3336 '\u1E1F': 'f', 3337 '\u0192': 'f', 3338 '\uA77C': 'f', 3339 '\u24D6': 'g', 3340 '\uFF47': 'g', 3341 '\u01F5': 'g', 3342 '\u011D': 'g', 3343 '\u1E21': 'g', 3344 '\u011F': 'g', 3345 '\u0121': 'g', 3346 '\u01E7': 'g', 3347 '\u0123': 'g', 3348 '\u01E5': 'g', 3349 '\u0260': 'g', 3350 '\uA7A1': 'g', 3351 '\u1D79': 'g', 3352 '\uA77F': 'g', 3353 '\u24D7': 'h', 3354 '\uFF48': 'h', 3355 '\u0125': 'h', 3356 '\u1E23': 'h', 3357 '\u1E27': 'h', 3358 '\u021F': 'h', 3359 '\u1E25': 'h', 3360 '\u1E29': 'h', 3361 '\u1E2B': 'h', 3362 '\u1E96': 'h', 3363 '\u0127': 'h', 3364 '\u2C68': 'h', 3365 '\u2C76': 'h', 3366 '\u0265': 'h', 3367 '\u0195': 'hv', 3368 '\u24D8': 'i', 3369 '\uFF49': 'i', 3370 '\u00EC': 'i', 3371 '\u00ED': 'i', 3372 '\u00EE': 'i', 3373 '\u0129': 'i', 3374 '\u012B': 'i', 3375 '\u012D': 'i', 3376 '\u00EF': 'i', 3377 '\u1E2F': 'i', 3378 '\u1EC9': 'i', 3379 '\u01D0': 'i', 3380 '\u0209': 'i', 3381 '\u020B': 'i', 3382 '\u1ECB': 'i', 3383 '\u012F': 'i', 3384 '\u1E2D': 'i', 3385 '\u0268': 'i', 3386 '\u0131': 'i', 3387 '\u24D9': 'j', 3388 '\uFF4A': 'j', 3389 '\u0135': 'j', 3390 '\u01F0': 'j', 3391 '\u0249': 'j', 3392 '\u24DA': 'k', 3393 '\uFF4B': 'k', 3394 '\u1E31': 'k', 3395 '\u01E9': 'k', 3396 '\u1E33': 'k', 3397 '\u0137': 'k', 3398 '\u1E35': 'k', 3399 '\u0199': 'k', 3400 '\u2C6A': 'k', 3401 '\uA741': 'k', 3402 '\uA743': 'k', 3403 '\uA745': 'k', 3404 '\uA7A3': 'k', 3405 '\u24DB': 'l', 3406 '\uFF4C': 'l', 3407 '\u0140': 'l', 3408 '\u013A': 'l', 3409 '\u013E': 'l', 3410 '\u1E37': 'l', 3411 '\u1E39': 'l', 3412 '\u013C': 'l', 3413 '\u1E3D': 'l', 3414 '\u1E3B': 'l', 3415 '\u017F': 'l', 3416 '\u0142': 'l', 3417 '\u019A': 'l', 3418 '\u026B': 'l', 3419 '\u2C61': 'l', 3420 '\uA749': 'l', 3421 '\uA781': 'l', 3422 '\uA747': 'l', 3423 '\u01C9': 'lj', 3424 '\u24DC': 'm', 3425 '\uFF4D': 'm', 3426 '\u1E3F': 'm', 3427 '\u1E41': 'm', 3428 '\u1E43': 'm', 3429 '\u0271': 'm', 3430 '\u026F': 'm', 3431 '\u24DD': 'n', 3432 '\uFF4E': 'n', 3433 '\u01F9': 'n', 3434 '\u0144': 'n', 3435 '\u00F1': 'n', 3436 '\u1E45': 'n', 3437 '\u0148': 'n', 3438 '\u1E47': 'n', 3439 '\u0146': 'n', 3440 '\u1E4B': 'n', 3441 '\u1E49': 'n', 3442 '\u019E': 'n', 3443 '\u0272': 'n', 3444 '\u0149': 'n', 3445 '\uA791': 'n', 3446 '\uA7A5': 'n', 3447 '\u01CC': 'nj', 3448 '\u24DE': 'o', 3449 '\uFF4F': 'o', 3450 '\u00F2': 'o', 3451 '\u00F3': 'o', 3452 '\u00F4': 'o', 3453 '\u1ED3': 'o', 3454 '\u1ED1': 'o', 3455 '\u1ED7': 'o', 3456 '\u1ED5': 'o', 3457 '\u00F5': 'o', 3458 '\u1E4D': 'o', 3459 '\u022D': 'o', 3460 '\u1E4F': 'o', 3461 '\u014D': 'o', 3462 '\u1E51': 'o', 3463 '\u1E53': 'o', 3464 '\u014F': 'o', 3465 '\u022F': 'o', 3466 '\u0231': 'o', 3467 '\u00F6': 'o', 3468 '\u022B': 'o', 3469 '\u1ECF': 'o', 3470 '\u0151': 'o', 3471 '\u01D2': 'o', 3472 '\u020D': 'o', 3473 '\u020F': 'o', 3474 '\u01A1': 'o', 3475 '\u1EDD': 'o', 3476 '\u1EDB': 'o', 3477 '\u1EE1': 'o', 3478 '\u1EDF': 'o', 3479 '\u1EE3': 'o', 3480 '\u1ECD': 'o', 3481 '\u1ED9': 'o', 3482 '\u01EB': 'o', 3483 '\u01ED': 'o', 3484 '\u00F8': 'o', 3485 '\u01FF': 'o', 3486 '\u0254': 'o', 3487 '\uA74B': 'o', 3488 '\uA74D': 'o', 3489 '\u0275': 'o', 3490 '\u0153': 'oe', 3491 '\u01A3': 'oi', 3492 '\u0223': 'ou', 3493 '\uA74F': 'oo', 3494 '\u24DF': 'p', 3495 '\uFF50': 'p', 3496 '\u1E55': 'p', 3497 '\u1E57': 'p', 3498 '\u01A5': 'p', 3499 '\u1D7D': 'p', 3500 '\uA751': 'p', 3501 '\uA753': 'p', 3502 '\uA755': 'p', 3503 '\u24E0': 'q', 3504 '\uFF51': 'q', 3505 '\u024B': 'q', 3506 '\uA757': 'q', 3507 '\uA759': 'q', 3508 '\u24E1': 'r', 3509 '\uFF52': 'r', 3510 '\u0155': 'r', 3511 '\u1E59': 'r', 3512 '\u0159': 'r', 3513 '\u0211': 'r', 3514 '\u0213': 'r', 3515 '\u1E5B': 'r', 3516 '\u1E5D': 'r', 3517 '\u0157': 'r', 3518 '\u1E5F': 'r', 3519 '\u024D': 'r', 3520 '\u027D': 'r', 3521 '\uA75B': 'r', 3522 '\uA7A7': 'r', 3523 '\uA783': 'r', 3524 '\u24E2': 's', 3525 '\uFF53': 's', 3526 '\u00DF': 's', 3527 '\u015B': 's', 3528 '\u1E65': 's', 3529 '\u015D': 's', 3530 '\u1E61': 's', 3531 '\u0161': 's', 3532 '\u1E67': 's', 3533 '\u1E63': 's', 3534 '\u1E69': 's', 3535 '\u0219': 's', 3536 '\u015F': 's', 3537 '\u023F': 's', 3538 '\uA7A9': 's', 3539 '\uA785': 's', 3540 '\u1E9B': 's', 3541 '\u24E3': 't', 3542 '\uFF54': 't', 3543 '\u1E6B': 't', 3544 '\u1E97': 't', 3545 '\u0165': 't', 3546 '\u1E6D': 't', 3547 '\u021B': 't', 3548 '\u0163': 't', 3549 '\u1E71': 't', 3550 '\u1E6F': 't', 3551 '\u0167': 't', 3552 '\u01AD': 't', 3553 '\u0288': 't', 3554 '\u2C66': 't', 3555 '\uA787': 't', 3556 '\uA729': 'tz', 3557 '\u24E4': 'u', 3558 '\uFF55': 'u', 3559 '\u00F9': 'u', 3560 '\u00FA': 'u', 3561 '\u00FB': 'u', 3562 '\u0169': 'u', 3563 '\u1E79': 'u', 3564 '\u016B': 'u', 3565 '\u1E7B': 'u', 3566 '\u016D': 'u', 3567 '\u00FC': 'u', 3568 '\u01DC': 'u', 3569 '\u01D8': 'u', 3570 '\u01D6': 'u', 3571 '\u01DA': 'u', 3572 '\u1EE7': 'u', 3573 '\u016F': 'u', 3574 '\u0171': 'u', 3575 '\u01D4': 'u', 3576 '\u0215': 'u', 3577 '\u0217': 'u', 3578 '\u01B0': 'u', 3579 '\u1EEB': 'u', 3580 '\u1EE9': 'u', 3581 '\u1EEF': 'u', 3582 '\u1EED': 'u', 3583 '\u1EF1': 'u', 3584 '\u1EE5': 'u', 3585 '\u1E73': 'u', 3586 '\u0173': 'u', 3587 '\u1E77': 'u', 3588 '\u1E75': 'u', 3589 '\u0289': 'u', 3590 '\u24E5': 'v', 3591 '\uFF56': 'v', 3592 '\u1E7D': 'v', 3593 '\u1E7F': 'v', 3594 '\u028B': 'v', 3595 '\uA75F': 'v', 3596 '\u028C': 'v', 3597 '\uA761': 'vy', 3598 '\u24E6': 'w', 3599 '\uFF57': 'w', 3600 '\u1E81': 'w', 3601 '\u1E83': 'w', 3602 '\u0175': 'w', 3603 '\u1E87': 'w', 3604 '\u1E85': 'w', 3605 '\u1E98': 'w', 3606 '\u1E89': 'w', 3607 '\u2C73': 'w', 3608 '\u24E7': 'x', 3609 '\uFF58': 'x', 3610 '\u1E8B': 'x', 3611 '\u1E8D': 'x', 3612 '\u24E8': 'y', 3613 '\uFF59': 'y', 3614 '\u1EF3': 'y', 3615 '\u00FD': 'y', 3616 '\u0177': 'y', 3617 '\u1EF9': 'y', 3618 '\u0233': 'y', 3619 '\u1E8F': 'y', 3620 '\u00FF': 'y', 3621 '\u1EF7': 'y', 3622 '\u1E99': 'y', 3623 '\u1EF5': 'y', 3624 '\u01B4': 'y', 3625 '\u024F': 'y', 3626 '\u1EFF': 'y', 3627 '\u24E9': 'z', 3628 '\uFF5A': 'z', 3629 '\u017A': 'z', 3630 '\u1E91': 'z', 3631 '\u017C': 'z', 3632 '\u017E': 'z', 3633 '\u1E93': 'z', 3634 '\u1E95': 'z', 3635 '\u01B6': 'z', 3636 '\u0225': 'z', 3637 '\u0240': 'z', 3638 '\u2C6C': 'z', 3639 '\uA763': 'z', 3640 '\u0386': '\u0391', 3641 '\u0388': '\u0395', 3642 '\u0389': '\u0397', 3643 '\u038A': '\u0399', 3644 '\u03AA': '\u0399', 3645 '\u038C': '\u039F', 3646 '\u038E': '\u03A5', 3647 '\u03AB': '\u03A5', 3648 '\u038F': '\u03A9', 3649 '\u03AC': '\u03B1', 3650 '\u03AD': '\u03B5', 3651 '\u03AE': '\u03B7', 3652 '\u03AF': '\u03B9', 3653 '\u03CA': '\u03B9', 3654 '\u0390': '\u03B9', 3655 '\u03CC': '\u03BF', 3656 '\u03CD': '\u03C5', 3657 '\u03CB': '\u03C5', 3658 '\u03B0': '\u03C5', 3659 '\u03CE': '\u03C9', 3660 '\u03C2': '\u03C3', 3661 '\u2019': '\'' 3662 }; 3663 3664 return diacritics; 3665}); 3666 3667S2.define('select2/data/base',[ 3668 '../utils' 3669], function (Utils) { 3670 function BaseAdapter ($element, options) { 3671 BaseAdapter.__super__.constructor.call(this); 3672 } 3673 3674 Utils.Extend(BaseAdapter, Utils.Observable); 3675 3676 BaseAdapter.prototype.current = function (callback) { 3677 throw new Error('The `current` method must be defined in child classes.'); 3678 }; 3679 3680 BaseAdapter.prototype.query = function (params, callback) { 3681 throw new Error('The `query` method must be defined in child classes.'); 3682 }; 3683 3684 BaseAdapter.prototype.bind = function (container, $container) { 3685 // Can be implemented in subclasses 3686 }; 3687 3688 BaseAdapter.prototype.destroy = function () { 3689 // Can be implemented in subclasses 3690 }; 3691 3692 BaseAdapter.prototype.generateResultId = function (container, data) { 3693 var id = container.id + '-result-'; 3694 3695 id += Utils.generateChars(4); 3696 3697 if (data.id != null) { 3698 id += '-' + data.id.toString(); 3699 } else { 3700 id += '-' + Utils.generateChars(4); 3701 } 3702 return id; 3703 }; 3704 3705 return BaseAdapter; 3706}); 3707 3708S2.define('select2/data/select',[ 3709 './base', 3710 '../utils', 3711 'jquery' 3712], function (BaseAdapter, Utils, $) { 3713 function SelectAdapter ($element, options) { 3714 this.$element = $element; 3715 this.options = options; 3716 3717 SelectAdapter.__super__.constructor.call(this); 3718 } 3719 3720 Utils.Extend(SelectAdapter, BaseAdapter); 3721 3722 SelectAdapter.prototype.current = function (callback) { 3723 var data = []; 3724 var self = this; 3725 3726 this.$element.find(':selected').each(function () { 3727 var $option = $(this); 3728 3729 var option = self.item($option); 3730 3731 data.push(option); 3732 }); 3733 3734 callback(data); 3735 }; 3736 3737 SelectAdapter.prototype.select = function (data) { 3738 var self = this; 3739 3740 data.selected = true; 3741 3742 // If data.element is a DOM node, use it instead 3743 if ($(data.element).is('option')) { 3744 data.element.selected = true; 3745 3746 this.$element.trigger('input').trigger('change'); 3747 3748 return; 3749 } 3750 3751 if (this.$element.prop('multiple')) { 3752 this.current(function (currentData) { 3753 var val = []; 3754 3755 data = [data]; 3756 data.push.apply(data, currentData); 3757 3758 for (var d = 0; d < data.length; d++) { 3759 var id = data[d].id; 3760 3761 if ($.inArray(id, val) === -1) { 3762 val.push(id); 3763 } 3764 } 3765 3766 self.$element.val(val); 3767 self.$element.trigger('input').trigger('change'); 3768 }); 3769 } else { 3770 var val = data.id; 3771 3772 this.$element.val(val); 3773 this.$element.trigger('input').trigger('change'); 3774 } 3775 }; 3776 3777 SelectAdapter.prototype.unselect = function (data) { 3778 var self = this; 3779 3780 if (!this.$element.prop('multiple')) { 3781 return; 3782 } 3783 3784 data.selected = false; 3785 3786 if ($(data.element).is('option')) { 3787 data.element.selected = false; 3788 3789 this.$element.trigger('input').trigger('change'); 3790 3791 return; 3792 } 3793 3794 this.current(function (currentData) { 3795 var val = []; 3796 3797 for (var d = 0; d < currentData.length; d++) { 3798 var id = currentData[d].id; 3799 3800 if (id !== data.id && $.inArray(id, val) === -1) { 3801 val.push(id); 3802 } 3803 } 3804 3805 self.$element.val(val); 3806 3807 self.$element.trigger('input').trigger('change'); 3808 }); 3809 }; 3810 3811 SelectAdapter.prototype.bind = function (container, $container) { 3812 var self = this; 3813 3814 this.container = container; 3815 3816 container.on('select', function (params) { 3817 self.select(params.data); 3818 }); 3819 3820 container.on('unselect', function (params) { 3821 self.unselect(params.data); 3822 }); 3823 }; 3824 3825 SelectAdapter.prototype.destroy = function () { 3826 // Remove anything added to child elements 3827 this.$element.find('*').each(function () { 3828 // Remove any custom data set by Select2 3829 Utils.RemoveData(this); 3830 }); 3831 }; 3832 3833 SelectAdapter.prototype.query = function (params, callback) { 3834 var data = []; 3835 var self = this; 3836 3837 var $options = this.$element.children(); 3838 3839 $options.each(function () { 3840 var $option = $(this); 3841 3842 if (!$option.is('option') && !$option.is('optgroup')) { 3843 return; 3844 } 3845 3846 var option = self.item($option); 3847 3848 var matches = self.matches(params, option); 3849 3850 if (matches !== null) { 3851 data.push(matches); 3852 } 3853 }); 3854 3855 callback({ 3856 results: data 3857 }); 3858 }; 3859 3860 SelectAdapter.prototype.addOptions = function ($options) { 3861 Utils.appendMany(this.$element, $options); 3862 }; 3863 3864 SelectAdapter.prototype.option = function (data) { 3865 var option; 3866 3867 if (data.children) { 3868 option = document.createElement('optgroup'); 3869 option.label = data.text; 3870 } else { 3871 option = document.createElement('option'); 3872 3873 if (option.textContent !== undefined) { 3874 option.textContent = data.text; 3875 } else { 3876 option.innerText = data.text; 3877 } 3878 } 3879 3880 if (data.id !== undefined) { 3881 option.value = data.id; 3882 } 3883 3884 if (data.disabled) { 3885 option.disabled = true; 3886 } 3887 3888 if (data.selected) { 3889 option.selected = true; 3890 } 3891 3892 if (data.title) { 3893 option.title = data.title; 3894 } 3895 3896 var $option = $(option); 3897 3898 var normalizedData = this._normalizeItem(data); 3899 normalizedData.element = option; 3900 3901 // Override the option's data with the combined data 3902 Utils.StoreData(option, 'data', normalizedData); 3903 3904 return $option; 3905 }; 3906 3907 SelectAdapter.prototype.item = function ($option) { 3908 var data = {}; 3909 3910 data = Utils.GetData($option[0], 'data'); 3911 3912 if (data != null) { 3913 return data; 3914 } 3915 3916 if ($option.is('option')) { 3917 data = { 3918 id: $option.val(), 3919 text: $option.text(), 3920 disabled: $option.prop('disabled'), 3921 selected: $option.prop('selected'), 3922 title: $option.prop('title') 3923 }; 3924 } else if ($option.is('optgroup')) { 3925 data = { 3926 text: $option.prop('label'), 3927 children: [], 3928 title: $option.prop('title') 3929 }; 3930 3931 var $children = $option.children('option'); 3932 var children = []; 3933 3934 for (var c = 0; c < $children.length; c++) { 3935 var $child = $($children[c]); 3936 3937 var child = this.item($child); 3938 3939 children.push(child); 3940 } 3941 3942 data.children = children; 3943 } 3944 3945 data = this._normalizeItem(data); 3946 data.element = $option[0]; 3947 3948 Utils.StoreData($option[0], 'data', data); 3949 3950 return data; 3951 }; 3952 3953 SelectAdapter.prototype._normalizeItem = function (item) { 3954 if (item !== Object(item)) { 3955 item = { 3956 id: item, 3957 text: item 3958 }; 3959 } 3960 3961 item = $.extend({}, { 3962 text: '' 3963 }, item); 3964 3965 var defaults = { 3966 selected: false, 3967 disabled: false 3968 }; 3969 3970 if (item.id != null) { 3971 item.id = item.id.toString(); 3972 } 3973 3974 if (item.text != null) { 3975 item.text = item.text.toString(); 3976 } 3977 3978 if (item._resultId == null && item.id && this.container != null) { 3979 item._resultId = this.generateResultId(this.container, item); 3980 } 3981 3982 return $.extend({}, defaults, item); 3983 }; 3984 3985 SelectAdapter.prototype.matches = function (params, data) { 3986 var matcher = this.options.get('matcher'); 3987 3988 return matcher(params, data); 3989 }; 3990 3991 return SelectAdapter; 3992}); 3993 3994S2.define('select2/data/array',[ 3995 './select', 3996 '../utils', 3997 'jquery' 3998], function (SelectAdapter, Utils, $) { 3999 function ArrayAdapter ($element, options) { 4000 this._dataToConvert = options.get('data') || []; 4001 4002 ArrayAdapter.__super__.constructor.call(this, $element, options); 4003 } 4004 4005 Utils.Extend(ArrayAdapter, SelectAdapter); 4006 4007 ArrayAdapter.prototype.bind = function (container, $container) { 4008 ArrayAdapter.__super__.bind.call(this, container, $container); 4009 4010 this.addOptions(this.convertToOptions(this._dataToConvert)); 4011 }; 4012 4013 ArrayAdapter.prototype.select = function (data) { 4014 var $option = this.$element.find('option').filter(function (i, elm) { 4015 return elm.value == data.id.toString(); 4016 }); 4017 4018 if ($option.length === 0) { 4019 $option = this.option(data); 4020 4021 this.addOptions($option); 4022 } 4023 4024 ArrayAdapter.__super__.select.call(this, data); 4025 }; 4026 4027 ArrayAdapter.prototype.convertToOptions = function (data) { 4028 var self = this; 4029 4030 var $existing = this.$element.find('option'); 4031 var existingIds = $existing.map(function () { 4032 return self.item($(this)).id; 4033 }).get(); 4034 4035 var $options = []; 4036 4037 // Filter out all items except for the one passed in the argument 4038 function onlyItem (item) { 4039 return function () { 4040 return $(this).val() == item.id; 4041 }; 4042 } 4043 4044 for (var d = 0; d < data.length; d++) { 4045 var item = this._normalizeItem(data[d]); 4046 4047 // Skip items which were pre-loaded, only merge the data 4048 if ($.inArray(item.id, existingIds) >= 0) { 4049 var $existingOption = $existing.filter(onlyItem(item)); 4050 4051 var existingData = this.item($existingOption); 4052 var newData = $.extend(true, {}, item, existingData); 4053 4054 var $newOption = this.option(newData); 4055 4056 $existingOption.replaceWith($newOption); 4057 4058 continue; 4059 } 4060 4061 var $option = this.option(item); 4062 4063 if (item.children) { 4064 var $children = this.convertToOptions(item.children); 4065 4066 Utils.appendMany($option, $children); 4067 } 4068 4069 $options.push($option); 4070 } 4071 4072 return $options; 4073 }; 4074 4075 return ArrayAdapter; 4076}); 4077 4078S2.define('select2/data/ajax',[ 4079 './array', 4080 '../utils', 4081 'jquery' 4082], function (ArrayAdapter, Utils, $) { 4083 function AjaxAdapter ($element, options) { 4084 this.ajaxOptions = this._applyDefaults(options.get('ajax')); 4085 4086 if (this.ajaxOptions.processResults != null) { 4087 this.processResults = this.ajaxOptions.processResults; 4088 } 4089 4090 AjaxAdapter.__super__.constructor.call(this, $element, options); 4091 } 4092 4093 Utils.Extend(AjaxAdapter, ArrayAdapter); 4094 4095 AjaxAdapter.prototype._applyDefaults = function (options) { 4096 var defaults = { 4097 data: function (params) { 4098 return $.extend({}, params, { 4099 q: params.term 4100 }); 4101 }, 4102 transport: function (params, success, failure) { 4103 var $request = $.ajax(params); 4104 4105 $request.then(success); 4106 $request.fail(failure); 4107 4108 return $request; 4109 } 4110 }; 4111 4112 return $.extend({}, defaults, options, true); 4113 }; 4114 4115 AjaxAdapter.prototype.processResults = function (results) { 4116 return results; 4117 }; 4118 4119 AjaxAdapter.prototype.query = function (params, callback) { 4120 var matches = []; 4121 var self = this; 4122 4123 if (this._request != null) { 4124 // JSONP requests cannot always be aborted 4125 if ($.isFunction(this._request.abort)) { 4126 this._request.abort(); 4127 } 4128 4129 this._request = null; 4130 } 4131 4132 var options = $.extend({ 4133 type: 'GET' 4134 }, this.ajaxOptions); 4135 4136 if (typeof options.url === 'function') { 4137 options.url = options.url.call(this.$element, params); 4138 } 4139 4140 if (typeof options.data === 'function') { 4141 options.data = options.data.call(this.$element, params); 4142 } 4143 4144 function request () { 4145 var $request = options.transport(options, function (data) { 4146 var results = self.processResults(data, params); 4147 4148 if (self.options.get('debug') && window.console && console.error) { 4149 // Check to make sure that the response included a `results` key. 4150 if (!results || !results.results || !$.isArray(results.results)) { 4151 console.error( 4152 'Select2: The AJAX results did not return an array in the ' + 4153 '`results` key of the response.' 4154 ); 4155 } 4156 } 4157 4158 callback(results); 4159 }, function () { 4160 // Attempt to detect if a request was aborted 4161 // Only works if the transport exposes a status property 4162 if ('status' in $request && 4163 ($request.status === 0 || $request.status === '0')) { 4164 return; 4165 } 4166 4167 self.trigger('results:message', { 4168 message: 'errorLoading' 4169 }); 4170 }); 4171 4172 self._request = $request; 4173 } 4174 4175 if (this.ajaxOptions.delay && params.term != null) { 4176 if (this._queryTimeout) { 4177 window.clearTimeout(this._queryTimeout); 4178 } 4179 4180 this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay); 4181 } else { 4182 request(); 4183 } 4184 }; 4185 4186 return AjaxAdapter; 4187}); 4188 4189S2.define('select2/data/tags',[ 4190 'jquery' 4191], function ($) { 4192 function Tags (decorated, $element, options) { 4193 var tags = options.get('tags'); 4194 4195 var createTag = options.get('createTag'); 4196 4197 if (createTag !== undefined) { 4198 this.createTag = createTag; 4199 } 4200 4201 var insertTag = options.get('insertTag'); 4202 4203 if (insertTag !== undefined) { 4204 this.insertTag = insertTag; 4205 } 4206 4207 decorated.call(this, $element, options); 4208 4209 if ($.isArray(tags)) { 4210 for (var t = 0; t < tags.length; t++) { 4211 var tag = tags[t]; 4212 var item = this._normalizeItem(tag); 4213 4214 var $option = this.option(item); 4215 4216 this.$element.append($option); 4217 } 4218 } 4219 } 4220 4221 Tags.prototype.query = function (decorated, params, callback) { 4222 var self = this; 4223 4224 this._removeOldTags(); 4225 4226 if (params.term == null || params.page != null) { 4227 decorated.call(this, params, callback); 4228 return; 4229 } 4230 4231 function wrapper (obj, child) { 4232 var data = obj.results; 4233 4234 for (var i = 0; i < data.length; i++) { 4235 var option = data[i]; 4236 4237 var checkChildren = ( 4238 option.children != null && 4239 !wrapper({ 4240 results: option.children 4241 }, true) 4242 ); 4243 4244 var optionText = (option.text || '').toUpperCase(); 4245 var paramsTerm = (params.term || '').toUpperCase(); 4246 4247 var checkText = optionText === paramsTerm; 4248 4249 if (checkText || checkChildren) { 4250 if (child) { 4251 return false; 4252 } 4253 4254 obj.data = data; 4255 callback(obj); 4256 4257 return; 4258 } 4259 } 4260 4261 if (child) { 4262 return true; 4263 } 4264 4265 var tag = self.createTag(params); 4266 4267 if (tag != null) { 4268 var $option = self.option(tag); 4269 $option.attr('data-select2-tag', true); 4270 4271 self.addOptions([$option]); 4272 4273 self.insertTag(data, tag); 4274 } 4275 4276 obj.results = data; 4277 4278 callback(obj); 4279 } 4280 4281 decorated.call(this, params, wrapper); 4282 }; 4283 4284 Tags.prototype.createTag = function (decorated, params) { 4285 var term = $.trim(params.term); 4286 4287 if (term === '') { 4288 return null; 4289 } 4290 4291 return { 4292 id: term, 4293 text: term 4294 }; 4295 }; 4296 4297 Tags.prototype.insertTag = function (_, data, tag) { 4298 data.unshift(tag); 4299 }; 4300 4301 Tags.prototype._removeOldTags = function (_) { 4302 var $options = this.$element.find('option[data-select2-tag]'); 4303 4304 $options.each(function () { 4305 if (this.selected) { 4306 return; 4307 } 4308 4309 $(this).remove(); 4310 }); 4311 }; 4312 4313 return Tags; 4314}); 4315 4316S2.define('select2/data/tokenizer',[ 4317 'jquery' 4318], function ($) { 4319 function Tokenizer (decorated, $element, options) { 4320 var tokenizer = options.get('tokenizer'); 4321 4322 if (tokenizer !== undefined) { 4323 this.tokenizer = tokenizer; 4324 } 4325 4326 decorated.call(this, $element, options); 4327 } 4328 4329 Tokenizer.prototype.bind = function (decorated, container, $container) { 4330 decorated.call(this, container, $container); 4331 4332 this.$search = container.dropdown.$search || container.selection.$search || 4333 $container.find('.select2-search__field'); 4334 }; 4335 4336 Tokenizer.prototype.query = function (decorated, params, callback) { 4337 var self = this; 4338 4339 function createAndSelect (data) { 4340 // Normalize the data object so we can use it for checks 4341 var item = self._normalizeItem(data); 4342 4343 // Check if the data object already exists as a tag 4344 // Select it if it doesn't 4345 var $existingOptions = self.$element.find('option').filter(function () { 4346 return $(this).val() === item.id; 4347 }); 4348 4349 // If an existing option wasn't found for it, create the option 4350 if (!$existingOptions.length) { 4351 var $option = self.option(item); 4352 $option.attr('data-select2-tag', true); 4353 4354 self._removeOldTags(); 4355 self.addOptions([$option]); 4356 } 4357 4358 // Select the item, now that we know there is an option for it 4359 select(item); 4360 } 4361 4362 function select (data) { 4363 self.trigger('select', { 4364 data: data 4365 }); 4366 } 4367 4368 params.term = params.term || ''; 4369 4370 var tokenData = this.tokenizer(params, this.options, createAndSelect); 4371 4372 if (tokenData.term !== params.term) { 4373 // Replace the search term if we have the search box 4374 if (this.$search.length) { 4375 this.$search.val(tokenData.term); 4376 this.$search.trigger('focus'); 4377 } 4378 4379 params.term = tokenData.term; 4380 } 4381 4382 decorated.call(this, params, callback); 4383 }; 4384 4385 Tokenizer.prototype.tokenizer = function (_, params, options, callback) { 4386 var separators = options.get('tokenSeparators') || []; 4387 var term = params.term; 4388 var i = 0; 4389 4390 var createTag = this.createTag || function (params) { 4391 return { 4392 id: params.term, 4393 text: params.term 4394 }; 4395 }; 4396 4397 while (i < term.length) { 4398 var termChar = term[i]; 4399 4400 if ($.inArray(termChar, separators) === -1) { 4401 i++; 4402 4403 continue; 4404 } 4405 4406 var part = term.substr(0, i); 4407 var partParams = $.extend({}, params, { 4408 term: part 4409 }); 4410 4411 var data = createTag(partParams); 4412 4413 if (data == null) { 4414 i++; 4415 continue; 4416 } 4417 4418 callback(data); 4419 4420 // Reset the term to not include the tokenized portion 4421 term = term.substr(i + 1) || ''; 4422 i = 0; 4423 } 4424 4425 return { 4426 term: term 4427 }; 4428 }; 4429 4430 return Tokenizer; 4431}); 4432 4433S2.define('select2/data/minimumInputLength',[ 4434 4435], function () { 4436 function MinimumInputLength (decorated, $e, options) { 4437 this.minimumInputLength = options.get('minimumInputLength'); 4438 4439 decorated.call(this, $e, options); 4440 } 4441 4442 MinimumInputLength.prototype.query = function (decorated, params, callback) { 4443 params.term = params.term || ''; 4444 4445 if (params.term.length < this.minimumInputLength) { 4446 this.trigger('results:message', { 4447 message: 'inputTooShort', 4448 args: { 4449 minimum: this.minimumInputLength, 4450 input: params.term, 4451 params: params 4452 } 4453 }); 4454 4455 return; 4456 } 4457 4458 decorated.call(this, params, callback); 4459 }; 4460 4461 return MinimumInputLength; 4462}); 4463 4464S2.define('select2/data/maximumInputLength',[ 4465 4466], function () { 4467 function MaximumInputLength (decorated, $e, options) { 4468 this.maximumInputLength = options.get('maximumInputLength'); 4469 4470 decorated.call(this, $e, options); 4471 } 4472 4473 MaximumInputLength.prototype.query = function (decorated, params, callback) { 4474 params.term = params.term || ''; 4475 4476 if (this.maximumInputLength > 0 && 4477 params.term.length > this.maximumInputLength) { 4478 this.trigger('results:message', { 4479 message: 'inputTooLong', 4480 args: { 4481 maximum: this.maximumInputLength, 4482 input: params.term, 4483 params: params 4484 } 4485 }); 4486 4487 return; 4488 } 4489 4490 decorated.call(this, params, callback); 4491 }; 4492 4493 return MaximumInputLength; 4494}); 4495 4496S2.define('select2/data/maximumSelectionLength',[ 4497 4498], function (){ 4499 function MaximumSelectionLength (decorated, $e, options) { 4500 this.maximumSelectionLength = options.get('maximumSelectionLength'); 4501 4502 decorated.call(this, $e, options); 4503 } 4504 4505 MaximumSelectionLength.prototype.bind = 4506 function (decorated, container, $container) { 4507 var self = this; 4508 4509 decorated.call(this, container, $container); 4510 4511 container.on('select', function () { 4512 self._checkIfMaximumSelected(); 4513 }); 4514 }; 4515 4516 MaximumSelectionLength.prototype.query = 4517 function (decorated, params, callback) { 4518 var self = this; 4519 4520 this._checkIfMaximumSelected(function () { 4521 decorated.call(self, params, callback); 4522 }); 4523 }; 4524 4525 MaximumSelectionLength.prototype._checkIfMaximumSelected = 4526 function (_, successCallback) { 4527 var self = this; 4528 4529 this.current(function (currentData) { 4530 var count = currentData != null ? currentData.length : 0; 4531 if (self.maximumSelectionLength > 0 && 4532 count >= self.maximumSelectionLength) { 4533 self.trigger('results:message', { 4534 message: 'maximumSelected', 4535 args: { 4536 maximum: self.maximumSelectionLength 4537 } 4538 }); 4539 return; 4540 } 4541 4542 if (successCallback) { 4543 successCallback(); 4544 } 4545 }); 4546 }; 4547 4548 return MaximumSelectionLength; 4549}); 4550 4551S2.define('select2/dropdown',[ 4552 'jquery', 4553 './utils' 4554], function ($, Utils) { 4555 function Dropdown ($element, options) { 4556 this.$element = $element; 4557 this.options = options; 4558 4559 Dropdown.__super__.constructor.call(this); 4560 } 4561 4562 Utils.Extend(Dropdown, Utils.Observable); 4563 4564 Dropdown.prototype.render = function () { 4565 var $dropdown = $( 4566 '<span class="select2-dropdown">' + 4567 '<span class="select2-results"></span>' + 4568 '</span>' 4569 ); 4570 4571 $dropdown.attr('dir', this.options.get('dir')); 4572 4573 this.$dropdown = $dropdown; 4574 4575 return $dropdown; 4576 }; 4577 4578 Dropdown.prototype.bind = function () { 4579 // Should be implemented in subclasses 4580 }; 4581 4582 Dropdown.prototype.position = function ($dropdown, $container) { 4583 // Should be implemented in subclasses 4584 }; 4585 4586 Dropdown.prototype.destroy = function () { 4587 // Remove the dropdown from the DOM 4588 this.$dropdown.remove(); 4589 }; 4590 4591 return Dropdown; 4592}); 4593 4594S2.define('select2/dropdown/search',[ 4595 'jquery', 4596 '../utils' 4597], function ($, Utils) { 4598 function Search () { } 4599 4600 Search.prototype.render = function (decorated) { 4601 var $rendered = decorated.call(this); 4602 4603 var $search = $( 4604 '<span class="select2-search select2-search--dropdown">' + 4605 '<input class="select2-search__field" type="search" tabindex="-1"' + 4606 ' autocomplete="off" autocorrect="off" autocapitalize="none"' + 4607 ' spellcheck="false" role="searchbox" aria-autocomplete="list" />' + 4608 '</span>' 4609 ); 4610 4611 this.$searchContainer = $search; 4612 this.$search = $search.find('input'); 4613 4614 $rendered.prepend($search); 4615 4616 return $rendered; 4617 }; 4618 4619 Search.prototype.bind = function (decorated, container, $container) { 4620 var self = this; 4621 4622 var resultsId = container.id + '-results'; 4623 4624 decorated.call(this, container, $container); 4625 4626 this.$search.on('keydown', function (evt) { 4627 self.trigger('keypress', evt); 4628 4629 self._keyUpPrevented = evt.isDefaultPrevented(); 4630 }); 4631 4632 // Workaround for browsers which do not support the `input` event 4633 // This will prevent double-triggering of events for browsers which support 4634 // both the `keyup` and `input` events. 4635 this.$search.on('input', function (evt) { 4636 // Unbind the duplicated `keyup` event 4637 $(this).off('keyup'); 4638 }); 4639 4640 this.$search.on('keyup input', function (evt) { 4641 self.handleSearch(evt); 4642 }); 4643 4644 container.on('open', function () { 4645 self.$search.attr('tabindex', 0); 4646 self.$search.attr('aria-controls', resultsId); 4647 4648 self.$search.trigger('focus'); 4649 4650 window.setTimeout(function () { 4651 self.$search.trigger('focus'); 4652 }, 0); 4653 }); 4654 4655 container.on('close', function () { 4656 self.$search.attr('tabindex', -1); 4657 self.$search.removeAttr('aria-controls'); 4658 self.$search.removeAttr('aria-activedescendant'); 4659 4660 self.$search.val(''); 4661 self.$search.trigger('blur'); 4662 }); 4663 4664 container.on('focus', function () { 4665 if (!container.isOpen()) { 4666 self.$search.trigger('focus'); 4667 } 4668 }); 4669 4670 container.on('results:all', function (params) { 4671 if (params.query.term == null || params.query.term === '') { 4672 var showSearch = self.showSearch(params); 4673 4674 if (showSearch) { 4675 self.$searchContainer.removeClass('select2-search--hide'); 4676 } else { 4677 self.$searchContainer.addClass('select2-search--hide'); 4678 } 4679 } 4680 }); 4681 4682 container.on('results:focus', function (params) { 4683 if (params.data._resultId) { 4684 self.$search.attr('aria-activedescendant', params.data._resultId); 4685 } else { 4686 self.$search.removeAttr('aria-activedescendant'); 4687 } 4688 }); 4689 }; 4690 4691 Search.prototype.handleSearch = function (evt) { 4692 if (!this._keyUpPrevented) { 4693 var input = this.$search.val(); 4694 4695 this.trigger('query', { 4696 term: input 4697 }); 4698 } 4699 4700 this._keyUpPrevented = false;
vendor: 18,179 bytes, lines 4701-5426
4701 }; 4702 4703 Search.prototype.showSearch = function (_, params) { 4704 return true; 4705 }; 4706 4707 return Search; 4708}); 4709 4710S2.define('select2/dropdown/hidePlaceholder',[ 4711 4712], function () { 4713 function HidePlaceholder (decorated, $element, options, dataAdapter) { 4714 this.placeholder = this.normalizePlaceholder(options.get('placeholder')); 4715 4716 decorated.call(this, $element, options, dataAdapter); 4717 } 4718 4719 HidePlaceholder.prototype.append = function (decorated, data) { 4720 data.results = this.removePlaceholder(data.results); 4721 4722 decorated.call(this, data); 4723 }; 4724 4725 HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) { 4726 if (typeof placeholder === 'string') { 4727 placeholder = { 4728 id: '', 4729 text: placeholder 4730 }; 4731 } 4732 4733 return placeholder; 4734 }; 4735 4736 HidePlaceholder.prototype.removePlaceholder = function (_, data) { 4737 var modifiedData = data.slice(0); 4738 4739 for (var d = data.length - 1; d >= 0; d--) { 4740 var item = data[d]; 4741 4742 if (this.placeholder.id === item.id) { 4743 modifiedData.splice(d, 1); 4744 } 4745 } 4746 4747 return modifiedData; 4748 }; 4749 4750 return HidePlaceholder; 4751}); 4752 4753S2.define('select2/dropdown/infiniteScroll',[ 4754 'jquery' 4755], function ($) { 4756 function InfiniteScroll (decorated, $element, options, dataAdapter) { 4757 this.lastParams = {}; 4758 4759 decorated.call(this, $element, options, dataAdapter); 4760 4761 this.$loadingMore = this.createLoadingMore(); 4762 this.loading = false; 4763 } 4764 4765 InfiniteScroll.prototype.append = function (decorated, data) { 4766 this.$loadingMore.remove(); 4767 this.loading = false; 4768 4769 decorated.call(this, data); 4770 4771 if (this.showLoadingMore(data)) { 4772 this.$results.append(this.$loadingMore); 4773 this.loadMoreIfNeeded(); 4774 } 4775 }; 4776 4777 InfiniteScroll.prototype.bind = function (decorated, container, $container) { 4778 var self = this; 4779 4780 decorated.call(this, container, $container); 4781 4782 container.on('query', function (params) { 4783 self.lastParams = params; 4784 self.loading = true; 4785 }); 4786 4787 container.on('query:append', function (params) { 4788 self.lastParams = params; 4789 self.loading = true; 4790 }); 4791 4792 this.$results.on('scroll', this.loadMoreIfNeeded.bind(this)); 4793 }; 4794 4795 InfiniteScroll.prototype.loadMoreIfNeeded = function () { 4796 var isLoadMoreVisible = $.contains( 4797 document.documentElement, 4798 this.$loadingMore[0] 4799 ); 4800 4801 if (this.loading || !isLoadMoreVisible) { 4802 return; 4803 } 4804 4805 var currentOffset = this.$results.offset().top + 4806 this.$results.outerHeight(false); 4807 var loadingMoreOffset = this.$loadingMore.offset().top + 4808 this.$loadingMore.outerHeight(false); 4809 4810 if (currentOffset + 50 >= loadingMoreOffset) { 4811 this.loadMore(); 4812 } 4813 }; 4814 4815 InfiniteScroll.prototype.loadMore = function () { 4816 this.loading = true; 4817 4818 var params = $.extend({}, {page: 1}, this.lastParams); 4819 4820 params.page++; 4821 4822 this.trigger('query:append', params); 4823 }; 4824 4825 InfiniteScroll.prototype.showLoadingMore = function (_, data) { 4826 return data.pagination && data.pagination.more; 4827 }; 4828 4829 InfiniteScroll.prototype.createLoadingMore = function () { 4830 var $option = $( 4831 '<li ' + 4832 'class="select2-results__option select2-results__option--load-more"' + 4833 'role="option" aria-disabled="true"></li>' 4834 ); 4835 4836 var message = this.options.get('translations').get('loadingMore'); 4837 4838 $option.html(message(this.lastParams)); 4839 4840 return $option; 4841 }; 4842 4843 return InfiniteScroll; 4844}); 4845 4846S2.define('select2/dropdown/attachBody',[ 4847 'jquery', 4848 '../utils' 4849], function ($, Utils) { 4850 function AttachBody (decorated, $element, options) { 4851 this.$dropdownParent = $(options.get('dropdownParent') || document.body); 4852 4853 decorated.call(this, $element, options); 4854 } 4855 4856 AttachBody.prototype.bind = function (decorated, container, $container) { 4857 var self = this; 4858 4859 decorated.call(this, container, $container); 4860 4861 container.on('open', function () { 4862 self._showDropdown(); 4863 self._attachPositioningHandler(container); 4864 4865 // Must bind after the results handlers to ensure correct sizing 4866 self._bindContainerResultHandlers(container); 4867 }); 4868 4869 container.on('close', function () { 4870 self._hideDropdown(); 4871 self._detachPositioningHandler(container); 4872 }); 4873 4874 this.$dropdownContainer.on('mousedown', function (evt) { 4875 evt.stopPropagation(); 4876 }); 4877 }; 4878 4879 AttachBody.prototype.destroy = function (decorated) { 4880 decorated.call(this); 4881 4882 this.$dropdownContainer.remove(); 4883 }; 4884 4885 AttachBody.prototype.position = function (decorated, $dropdown, $container) { 4886 // Clone all of the container classes 4887 $dropdown.attr('class', $container.attr('class')); 4888 4889 $dropdown.removeClass('select2'); 4890 $dropdown.addClass('select2-container--open'); 4891 4892 $dropdown.css({ 4893 position: 'absolute', 4894 top: -999999 4895 }); 4896 4897 this.$container = $container; 4898 }; 4899 4900 AttachBody.prototype.render = function (decorated) { 4901 var $container = $('<span></span>'); 4902 4903 var $dropdown = decorated.call(this); 4904 $container.append($dropdown); 4905 4906 this.$dropdownContainer = $container; 4907 4908 return $container; 4909 }; 4910 4911 AttachBody.prototype._hideDropdown = function (decorated) { 4912 this.$dropdownContainer.detach(); 4913 }; 4914 4915 AttachBody.prototype._bindContainerResultHandlers = 4916 function (decorated, container) { 4917 4918 // These should only be bound once 4919 if (this._containerResultsHandlersBound) { 4920 return; 4921 } 4922 4923 var self = this; 4924 4925 container.on('results:all', function () { 4926 self._positionDropdown(); 4927 self._resizeDropdown(); 4928 }); 4929 4930 container.on('results:append', function () { 4931 self._positionDropdown(); 4932 self._resizeDropdown(); 4933 }); 4934 4935 container.on('results:message', function () { 4936 self._positionDropdown(); 4937 self._resizeDropdown(); 4938 }); 4939 4940 container.on('select', function () { 4941 self._positionDropdown(); 4942 self._resizeDropdown(); 4943 }); 4944 4945 container.on('unselect', function () { 4946 self._positionDropdown(); 4947 self._resizeDropdown(); 4948 }); 4949 4950 this._containerResultsHandlersBound = true; 4951 }; 4952 4953 AttachBody.prototype._attachPositioningHandler = 4954 function (decorated, container) { 4955 var self = this; 4956 4957 var scrollEvent = 'scroll.select2.' + container.id; 4958 var resizeEvent = 'resize.select2.' + container.id; 4959 var orientationEvent = 'orientationchange.select2.' + container.id; 4960 4961 var $watchers = this.$container.parents().filter(Utils.hasScroll); 4962 $watchers.each(function () { 4963 Utils.StoreData(this, 'select2-scroll-position', { 4964 x: $(this).scrollLeft(), 4965 y: $(this).scrollTop() 4966 }); 4967 }); 4968 4969 $watchers.on(scrollEvent, function (ev) { 4970 var position = Utils.GetData(this, 'select2-scroll-position'); 4971 $(this).scrollTop(position.y); 4972 }); 4973 4974 $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent, 4975 function (e) { 4976 self._positionDropdown(); 4977 self._resizeDropdown(); 4978 }); 4979 }; 4980 4981 AttachBody.prototype._detachPositioningHandler = 4982 function (decorated, container) { 4983 var scrollEvent = 'scroll.select2.' + container.id; 4984 var resizeEvent = 'resize.select2.' + container.id; 4985 var orientationEvent = 'orientationchange.select2.' + container.id; 4986 4987 var $watchers = this.$container.parents().filter(Utils.hasScroll); 4988 $watchers.off(scrollEvent); 4989 4990 $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent); 4991 }; 4992 4993 AttachBody.prototype._positionDropdown = function () { 4994 var $window = $(window); 4995 4996 var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above'); 4997 var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below'); 4998 4999 var newDirection = null; 5000 5001 var offset = this.$container.offset(); 5002 5003 offset.bottom = offset.top + this.$container.outerHeight(false); 5004 5005 var container = { 5006 height: this.$container.outerHeight(false) 5007 }; 5008 5009 container.top = offset.top; 5010 container.bottom = offset.top + container.height; 5011 5012 var dropdown = { 5013 height: this.$dropdown.outerHeight(false) 5014 }; 5015 5016 var viewport = { 5017 top: $window.scrollTop(), 5018 bottom: $window.scrollTop() + $window.height() 5019 }; 5020 5021 var enoughRoomAbove = viewport.top < (offset.top - dropdown.height); 5022 var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height); 5023 5024 var css = { 5025 left: offset.left, 5026 top: container.bottom 5027 }; 5028 5029 // Determine what the parent element is to use for calculating the offset 5030 var $offsetParent = this.$dropdownParent; 5031 5032 // For statically positioned elements, we need to get the element 5033 // that is determining the offset 5034 if ($offsetParent.css('position') === 'static') { 5035 $offsetParent = $offsetParent.offsetParent(); 5036 } 5037 5038 var parentOffset = { 5039 top: 0, 5040 left: 0 5041 }; 5042 5043 if ( 5044 $.contains(document.body, $offsetParent[0]) || 5045 $offsetParent[0].isConnected 5046 ) { 5047 parentOffset = $offsetParent.offset(); 5048 } 5049 5050 css.top -= parentOffset.top; 5051 css.left -= parentOffset.left; 5052 5053 if (!isCurrentlyAbove && !isCurrentlyBelow) { 5054 newDirection = 'below'; 5055 } 5056 5057 if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) { 5058 newDirection = 'above'; 5059 } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) { 5060 newDirection = 'below'; 5061 } 5062 5063 if (newDirection == 'above' || 5064 (isCurrentlyAbove && newDirection !== 'below')) { 5065 css.top = container.top - parentOffset.top - dropdown.height; 5066 } 5067 5068 if (newDirection != null) { 5069 this.$dropdown 5070 .removeClass('select2-dropdown--below select2-dropdown--above') 5071 .addClass('select2-dropdown--' + newDirection); 5072 this.$container 5073 .removeClass('select2-container--below select2-container--above') 5074 .addClass('select2-container--' + newDirection); 5075 } 5076 5077 this.$dropdownContainer.css(css); 5078 }; 5079 5080 AttachBody.prototype._resizeDropdown = function () { 5081 var css = { 5082 width: this.$container.outerWidth(false) + 'px' 5083 }; 5084 5085 if (this.options.get('dropdownAutoWidth')) { 5086 css.minWidth = css.width; 5087 css.position = 'relative'; 5088 css.width = 'auto'; 5089 } 5090 5091 this.$dropdown.css(css); 5092 }; 5093 5094 AttachBody.prototype._showDropdown = function (decorated) { 5095 this.$dropdownContainer.appendTo(this.$dropdownParent); 5096 5097 this._positionDropdown(); 5098 this._resizeDropdown(); 5099 }; 5100 5101 return AttachBody; 5102}); 5103 5104S2.define('select2/dropdown/minimumResultsForSearch',[ 5105 5106], function () { 5107 function countResults (data) { 5108 var count = 0; 5109 5110 for (var d = 0; d < data.length; d++) { 5111 var item = data[d]; 5112 5113 if (item.children) { 5114 count += countResults(item.children); 5115 } else { 5116 count++; 5117 } 5118 } 5119 5120 return count; 5121 } 5122 5123 function MinimumResultsForSearch (decorated, $element, options, dataAdapter) { 5124 this.minimumResultsForSearch = options.get('minimumResultsForSearch'); 5125 5126 if (this.minimumResultsForSearch < 0) { 5127 this.minimumResultsForSearch = Infinity; 5128 } 5129 5130 decorated.call(this, $element, options, dataAdapter); 5131 } 5132 5133 MinimumResultsForSearch.prototype.showSearch = function (decorated, params) { 5134 if (countResults(params.data.results) < this.minimumResultsForSearch) { 5135 return false; 5136 } 5137 5138 return decorated.call(this, params); 5139 }; 5140 5141 return MinimumResultsForSearch; 5142}); 5143 5144S2.define('select2/dropdown/selectOnClose',[ 5145 '../utils' 5146], function (Utils) { 5147 function SelectOnClose () { } 5148 5149 SelectOnClose.prototype.bind = function (decorated, container, $container) { 5150 var self = this; 5151 5152 decorated.call(this, container, $container); 5153 5154 container.on('close', function (params) { 5155 self._handleSelectOnClose(params); 5156 }); 5157 }; 5158 5159 SelectOnClose.prototype._handleSelectOnClose = function (_, params) { 5160 if (params && params.originalSelect2Event != null) { 5161 var event = params.originalSelect2Event; 5162 5163 // Don't select an item if the close event was triggered from a select or 5164 // unselect event 5165 if (event._type === 'select' || event._type === 'unselect') { 5166 return; 5167 } 5168 } 5169 5170 var $highlightedResults = this.getHighlightedResults(); 5171 5172 // Only select highlighted results 5173 if ($highlightedResults.length < 1) { 5174 return; 5175 } 5176 5177 var data = Utils.GetData($highlightedResults[0], 'data'); 5178 5179 // Don't re-select already selected resulte 5180 if ( 5181 (data.element != null && data.element.selected) || 5182 (data.element == null && data.selected) 5183 ) { 5184 return; 5185 } 5186 5187 this.trigger('select', { 5188 data: data 5189 }); 5190 }; 5191 5192 return SelectOnClose; 5193}); 5194 5195S2.define('select2/dropdown/closeOnSelect',[ 5196 5197], function () { 5198 function CloseOnSelect () { } 5199 5200 CloseOnSelect.prototype.bind = function (decorated, container, $container) { 5201 var self = this; 5202 5203 decorated.call(this, container, $container); 5204 5205 container.on('select', function (evt) { 5206 self._selectTriggered(evt); 5207 }); 5208 5209 container.on('unselect', function (evt) { 5210 self._selectTriggered(evt); 5211 }); 5212 }; 5213 5214 CloseOnSelect.prototype._selectTriggered = function (_, evt) { 5215 var originalEvent = evt.originalEvent; 5216 5217 // Don't close if the control key is being held 5218 if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) { 5219 return; 5220 } 5221 5222 this.trigger('close', { 5223 originalEvent: originalEvent, 5224 originalSelect2Event: evt 5225 }); 5226 }; 5227 5228 return CloseOnSelect; 5229}); 5230 5231S2.define('select2/i18n/en',[],function () { 5232 // English 5233 return { 5234 errorLoading: function () { 5235 return 'The results could not be loaded.'; 5236 }, 5237 inputTooLong: function (args) { 5238 var overChars = args.input.length - args.maximum; 5239 5240 var message = 'Please delete ' + overChars + ' character'; 5241 5242 if (overChars != 1) { 5243 message += 's'; 5244 } 5245 5246 return message; 5247 }, 5248 inputTooShort: function (args) { 5249 var remainingChars = args.minimum - args.input.length; 5250 5251 var message = 'Please enter ' + remainingChars + ' or more characters'; 5252 5253 return message; 5254 }, 5255 loadingMore: function () { 5256 return 'Loading more resultsâ¦'; 5257 }, 5258 maximumSelected: function (args) { 5259 var message = 'You can only select ' + args.maximum + ' item'; 5260 5261 if (args.maximum != 1) { 5262 message += 's'; 5263 } 5264 5265 return message; 5266 }, 5267 noResults: function () { 5268 return 'No results found'; 5269 }, 5270 searching: function () { 5271 return 'Searchingâ¦'; 5272 }, 5273 removeAllItems: function () { 5274 return 'Remove all items'; 5275 } 5276 }; 5277}); 5278 5279S2.define('select2/defaults',[ 5280 'jquery', 5281 'require', 5282 5283 './results', 5284 5285 './selection/single', 5286 './selection/multiple', 5287 './selection/placeholder', 5288 './selection/allowClear', 5289 './selection/search', 5290 './selection/eventRelay', 5291 5292 './utils', 5293 './translation', 5294 './diacritics', 5295 5296 './data/select', 5297 './data/array', 5298 './data/ajax', 5299 './data/tags', 5300 './data/tokenizer', 5301 './data/minimumInputLength', 5302 './data/maximumInputLength', 5303 './data/maximumSelectionLength', 5304 5305 './dropdown', 5306 './dropdown/search', 5307 './dropdown/hidePlaceholder', 5308 './dropdown/infiniteScroll', 5309 './dropdown/attachBody', 5310 './dropdown/minimumResultsForSearch', 5311 './dropdown/selectOnClose', 5312 './dropdown/closeOnSelect', 5313 5314 './i18n/en' 5315], function ($, require, 5316 5317 ResultsList, 5318 5319 SingleSelection, MultipleSelection, Placeholder, AllowClear, 5320 SelectionSearch, EventRelay, 5321 5322 Utils, Translation, DIACRITICS, 5323 5324 SelectData, ArrayData, AjaxData, Tags, Tokenizer, 5325 MinimumInputLength, MaximumInputLength, MaximumSelectionLength, 5326 5327 Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll, 5328 AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect, 5329 5330 EnglishTranslation) { 5331 function Defaults () { 5332 this.reset(); 5333 } 5334 5335 Defaults.prototype.apply = function (options) { 5336 options = $.extend(true, {}, this.defaults, options); 5337 5338 if (options.dataAdapter == null) { 5339 if (options.ajax != null) { 5340 options.dataAdapter = AjaxData; 5341 } else if (options.data != null) { 5342 options.dataAdapter = ArrayData; 5343 } else { 5344 options.dataAdapter = SelectData; 5345 } 5346 5347 if (options.minimumInputLength > 0) { 5348 options.dataAdapter = Utils.Decorate( 5349 options.dataAdapter, 5350 MinimumInputLength 5351 ); 5352 } 5353 5354 if (options.maximumInputLength > 0) { 5355 options.dataAdapter = Utils.Decorate( 5356 options.dataAdapter, 5357 MaximumInputLength 5358 ); 5359 } 5360 5361 if (options.maximumSelectionLength > 0) { 5362 options.dataAdapter = Utils.Decorate( 5363 options.dataAdapter, 5364 MaximumSelectionLength 5365 ); 5366 } 5367 5368 if (options.tags) { 5369 options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags); 5370 } 5371 5372 if (options.tokenSeparators != null || options.tokenizer != null) { 5373 options.dataAdapter = Utils.Decorate( 5374 options.dataAdapter, 5375 Tokenizer 5376 ); 5377 } 5378 5379 if (options.query != null) { 5380 var Query = require(options.amdBase + 'compat/query'); 5381 5382 options.dataAdapter = Utils.Decorate( 5383 options.dataAdapter, 5384 Query 5385 ); 5386 } 5387 5388 if (options.initSelection != null) { 5389 var InitSelection = require(options.amdBase + 'compat/initSelection'); 5390 5391 options.dataAdapter = Utils.Decorate( 5392 options.dataAdapter, 5393 InitSelection 5394 ); 5395 } 5396 } 5397 5398 if (options.resultsAdapter == null) { 5399 options.resultsAdapter = ResultsList; 5400 5401 if (options.ajax != null) { 5402 options.resultsAdapter = Utils.Decorate( 5403 options.resultsAdapter, 5404 InfiniteScroll 5405 ); 5406 } 5407 5408 if (options.placeholder != null) { 5409 options.resultsAdapter = Utils.Decorate( 5410 options.resultsAdapter, 5411 HidePlaceholder 5412 ); 5413 } 5414 5415 if (options.selectOnClose) { 5416 options.resultsAdapter = Utils.Decorate( 5417 options.resultsAdapter, 5418 SelectOnClose 5419 ); 5420 } 5421 } 5422 5423 if (options.dropdownAdapter == null) { 5424 if (options.multiple) { 5425 options.dropdownAdapter = Dropdown; 5426 } else {
5427 var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch); 5428 5429 options.dropdownAdapter = SearchableDropdown; 5430 } 5431 5432 if (options.minimumResultsForSearch !== 0) { 5433 options.dropdownAdapter = Utils.Decorate( 5434 options.dropdownAdapter, 5435 MinimumResultsForSearch 5436 ); 5437 } 5438 5439 if (options.closeOnSelect) { 5440 options.dropdownAdapter = Utils.Decorate( 5441 options.dropdownAdapter, 5442 CloseOnSelect 5443 ); 5444 } 5445 5446 if ( 5447 options.dropdownCssClass != null || 5448 options.dropdownCss != null || 5449 options.adaptDropdownCssClass != null 5450 ) { 5451 var DropdownCSS = require(options.amdBase + 'compat/dropdownCss'); 5452 5453 options.dropdownAdapter = Utils.Decorate( 5454 options.dropdownAdapter, 5455 DropdownCSS 5456 ); 5457 } 5458 5459 options.dropdownAdapter = Utils.Decorate( 5460 options.dropdownAdapter, 5461 AttachBody 5462 ); 5463 } 5464 5465 if (options.selectionAdapter == null) { 5466 if (options.multiple) { 5467 options.selectionAdapter = MultipleSelection; 5468 } else { 5469 options.selectionAdapter = SingleSelection; 5470 } 5471 5472 // Add the placeholder mixin if a placeholder was specified 5473 if (options.placeholder != null) { 5474 options.selectionAdapter = Utils.Decorate( 5475 options.selectionAdapter, 5476 Placeholder 5477 ); 5478 } 5479 5480 if (options.allowClear) { 5481 options.selectionAdapter = Utils.Decorate( 5482 options.selectionAdapter, 5483 AllowClear 5484 ); 5485 } 5486 5487 if (options.multiple) { 5488 options.selectionAdapter = Utils.Decorate( 5489 options.selectionAdapter, 5490 SelectionSearch 5491 ); 5492 } 5493 5494 if ( 5495 options.containerCssClass != null || 5496 options.containerCss != null || 5497 options.adaptContainerCssClass != null 5498 ) { 5499 var ContainerCSS = require(options.amdBase + 'compat/containerCss'); 5500 5501 options.selectionAdapter = Utils.Decorate( 5502 options.selectionAdapter, 5503 ContainerCSS 5504 ); 5505 } 5506 5507 options.selectionAdapter = Utils.Decorate( 5508 options.selectionAdapter, 5509 EventRelay 5510 ); 5511 } 5512 5513 // If the defaults were not previously applied from an element, it is 5514 // possible for the language option to have not been resolved 5515 options.language = this._resolveLanguage(options.language); 5516 5517 // Always fall back to English since it will always be complete 5518 options.language.push('en'); 5519 5520 var uniqueLanguages = []; 5521 5522 for (var l = 0; l < options.language.length; l++) { 5523 var language = options.language[l]; 5524 5525 if (uniqueLanguages.indexOf(language) === -1) { 5526 uniqueLanguages.push(language); 5527 } 5528 } 5529 5530 options.language = uniqueLanguages; 5531 5532 options.translations = this._processTranslations( 5533 options.language, 5534 options.debug 5535 ); 5536 5537 return options; 5538 }; 5539 5540 Defaults.prototype.reset = function () { 5541 function stripDiacritics (text) { 5542 // Used 'uni range + named function' from http://jsperf.com/diacritics/18 5543 function match(a) { 5544 return DIACRITICS[a] || a; 5545 } 5546
vendor: 16,384 bytes, lines 5547-6149
5547 return text.replace(/[^\u0000-\u007E]/g, match); 5548 } 5549 5550 function matcher (params, data) { 5551 // Always return the object if there is nothing to compare 5552 if ($.trim(params.term) === '') { 5553 return data; 5554 } 5555 5556 // Do a recursive check for options with children 5557 if (data.children && data.children.length > 0) { 5558 // Clone the data object if there are children 5559 // This is required as we modify the object to remove any non-matches 5560 var match = $.extend(true, {}, data); 5561 5562 // Check each child of the option 5563 for (var c = data.children.length - 1; c >= 0; c--) { 5564 var child = data.children[c]; 5565 5566 var matches = matcher(params, child); 5567 5568 // If there wasn't a match, remove the object in the array 5569 if (matches == null) { 5570 match.children.splice(c, 1); 5571 } 5572 } 5573 5574 // If any children matched, return the new object 5575 if (match.children.length > 0) { 5576 return match; 5577 } 5578 5579 // If there were no matching children, check just the plain object 5580 return matcher(params, match); 5581 } 5582 5583 var original = stripDiacritics(data.text).toUpperCase(); 5584 var term = stripDiacritics(params.term).toUpperCase(); 5585 5586 // Check if the text contains the term 5587 if (original.indexOf(term) > -1) { 5588 return data; 5589 } 5590 5591 // If it doesn't contain the term, don't return anything 5592 return null; 5593 } 5594 5595 this.defaults = { 5596 amdBase: './', 5597 amdLanguageBase: './i18n/', 5598 closeOnSelect: true, 5599 debug: false, 5600 dropdownAutoWidth: false, 5601 escapeMarkup: Utils.escapeMarkup, 5602 language: {}, 5603 matcher: matcher, 5604 minimumInputLength: 0, 5605 maximumInputLength: 0, 5606 maximumSelectionLength: 0, 5607 minimumResultsForSearch: 0, 5608 selectOnClose: false, 5609 scrollAfterSelect: false, 5610 sorter: function (data) { 5611 return data; 5612 }, 5613 templateResult: function (result) { 5614 return result.text; 5615 }, 5616 templateSelection: function (selection) { 5617 return selection.text; 5618 }, 5619 theme: 'default', 5620 width: 'resolve' 5621 }; 5622 }; 5623 5624 Defaults.prototype.applyFromElement = function (options, $element) { 5625 var optionLanguage = options.language; 5626 var defaultLanguage = this.defaults.language; 5627 var elementLanguage = $element.prop('lang'); 5628 var parentLanguage = $element.closest('[lang]').prop('lang'); 5629 5630 var languages = Array.prototype.concat.call( 5631 this._resolveLanguage(elementLanguage), 5632 this._resolveLanguage(optionLanguage), 5633 this._resolveLanguage(defaultLanguage), 5634 this._resolveLanguage(parentLanguage) 5635 ); 5636 5637 options.language = languages; 5638 5639 return options; 5640 }; 5641 5642 Defaults.prototype._resolveLanguage = function (language) { 5643 if (!language) { 5644 return []; 5645 } 5646 5647 if ($.isEmptyObject(language)) { 5648 return []; 5649 } 5650 5651 if ($.isPlainObject(language)) { 5652 return [language]; 5653 } 5654 5655 var languages; 5656 5657 if (!$.isArray(language)) { 5658 languages = [language]; 5659 } else { 5660 languages = language; 5661 } 5662 5663 var resolvedLanguages = []; 5664 5665 for (var l = 0; l < languages.length; l++) { 5666 resolvedLanguages.push(languages[l]); 5667 5668 if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) { 5669 // Extract the region information if it is included 5670 var languageParts = languages[l].split('-'); 5671 var baseLanguage = languageParts[0]; 5672 5673 resolvedLanguages.push(baseLanguage); 5674 } 5675 } 5676 5677 return resolvedLanguages; 5678 }; 5679 5680 Defaults.prototype._processTranslations = function (languages, debug) { 5681 var translations = new Translation(); 5682 5683 for (var l = 0; l < languages.length; l++) { 5684 var languageData = new Translation(); 5685 5686 var language = languages[l]; 5687 5688 if (typeof language === 'string') { 5689 try { 5690 // Try to load it with the original name 5691 languageData = Translation.loadPath(language); 5692 } catch (e) { 5693 try { 5694 // If we couldn't load it, check if it wasn't the full path 5695 language = this.defaults.amdLanguageBase + language; 5696 languageData = Translation.loadPath(language); 5697 } catch (ex) { 5698 // The translation could not be loaded at all. Sometimes this is 5699 // because of a configuration problem, other times this can be 5700 // because of how Select2 helps load all possible translation files 5701 if (debug && window.console && console.warn) { 5702 console.warn( 5703 'Select2: The language file for "' + language + '" could ' + 5704 'not be automatically loaded. A fallback will be used instead.' 5705 ); 5706 } 5707 } 5708 } 5709 } else if ($.isPlainObject(language)) { 5710 languageData = new Translation(language); 5711 } else { 5712 languageData = language; 5713 } 5714 5715 translations.extend(languageData); 5716 } 5717 5718 return translations; 5719 }; 5720 5721 Defaults.prototype.set = function (key, value) { 5722 var camelKey = $.camelCase(key); 5723 5724 var data = {}; 5725 data[camelKey] = value; 5726 5727 var convertedData = Utils._convertData(data); 5728 5729 $.extend(true, this.defaults, convertedData); 5730 }; 5731 5732 var defaults = new Defaults(); 5733 5734 return defaults; 5735}); 5736 5737S2.define('select2/options',[ 5738 'require', 5739 'jquery', 5740 './defaults', 5741 './utils' 5742], function (require, $, Defaults, Utils) { 5743 function Options (options, $element) { 5744 this.options = options; 5745 5746 if ($element != null) { 5747 this.fromElement($element); 5748 } 5749 5750 if ($element != null) { 5751 this.options = Defaults.applyFromElement(this.options, $element); 5752 } 5753 5754 this.options = Defaults.apply(this.options); 5755 5756 if ($element && $element.is('input')) { 5757 var InputCompat = require(this.get('amdBase') + 'compat/inputData'); 5758 5759 this.options.dataAdapter = Utils.Decorate( 5760 this.options.dataAdapter, 5761 InputCompat 5762 ); 5763 } 5764 } 5765 5766 Options.prototype.fromElement = function ($e) { 5767 var excludedData = ['select2']; 5768 5769 if (this.options.multiple == null) { 5770 this.options.multiple = $e.prop('multiple'); 5771 } 5772 5773 if (this.options.disabled == null) { 5774 this.options.disabled = $e.prop('disabled'); 5775 } 5776 5777 if (this.options.dir == null) { 5778 if ($e.prop('dir')) { 5779 this.options.dir = $e.prop('dir'); 5780 } else if ($e.closest('[dir]').prop('dir')) { 5781 this.options.dir = $e.closest('[dir]').prop('dir'); 5782 } else { 5783 this.options.dir = 'ltr'; 5784 } 5785 } 5786 5787 $e.prop('disabled', this.options.disabled); 5788 $e.prop('multiple', this.options.multiple); 5789 5790 if (Utils.GetData($e[0], 'select2Tags')) { 5791 if (this.options.debug && window.console && console.warn) { 5792 console.warn( 5793 'Select2: The `data-select2-tags` attribute has been changed to ' + 5794 'use the `data-data` and `data-tags="true"` attributes and will be ' + 5795 'removed in future versions of Select2.' 5796 ); 5797 } 5798 5799 Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags')); 5800 Utils.StoreData($e[0], 'tags', true); 5801 } 5802 5803 if (Utils.GetData($e[0], 'ajaxUrl')) { 5804 if (this.options.debug && window.console && console.warn) { 5805 console.warn( 5806 'Select2: The `data-ajax-url` attribute has been changed to ' + 5807 '`data-ajax--url` and support for the old attribute will be removed' + 5808 ' in future versions of Select2.' 5809 ); 5810 } 5811 5812 $e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl')); 5813 Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl')); 5814 } 5815 5816 var dataset = {}; 5817 5818 function upperCaseLetter(_, letter) { 5819 return letter.toUpperCase(); 5820 } 5821 5822 // Pre-load all of the attributes which are prefixed with `data-` 5823 for (var attr = 0; attr < $e[0].attributes.length; attr++) { 5824 var attributeName = $e[0].attributes[attr].name; 5825 var prefix = 'data-'; 5826 5827 if (attributeName.substr(0, prefix.length) == prefix) { 5828 // Get the contents of the attribute after `data-` 5829 var dataName = attributeName.substring(prefix.length); 5830 5831 // Get the data contents from the consistent source 5832 // This is more than likely the jQuery data helper 5833 var dataValue = Utils.GetData($e[0], dataName); 5834 5835 // camelCase the attribute name to match the spec 5836 var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter); 5837 5838 // Store the data attribute contents into the dataset since 5839 dataset[camelDataName] = dataValue; 5840 } 5841 } 5842 5843 // Prefer the element's `dataset` attribute if it exists 5844 // jQuery 1.x does not correctly handle data attributes with multiple dashes 5845 if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) { 5846 dataset = $.extend(true, {}, $e[0].dataset, dataset); 5847 } 5848 5849 // Prefer our internal data cache if it exists 5850 var data = $.extend(true, {}, Utils.GetData($e[0]), dataset); 5851 5852 data = Utils._convertData(data); 5853 5854 for (var key in data) { 5855 if ($.inArray(key, excludedData) > -1) { 5856 continue; 5857 } 5858 5859 if ($.isPlainObject(this.options[key])) { 5860 $.extend(this.options[key], data[key]); 5861 } else { 5862 this.options[key] = data[key]; 5863 } 5864 } 5865 5866 return this; 5867 }; 5868 5869 Options.prototype.get = function (key) { 5870 return this.options[key]; 5871 }; 5872 5873 Options.prototype.set = function (key, val) { 5874 this.options[key] = val; 5875 }; 5876 5877 return Options; 5878}); 5879 5880S2.define('select2/core',[ 5881 'jquery', 5882 './options', 5883 './utils', 5884 './keys' 5885], function ($, Options, Utils, KEYS) { 5886 var Select2 = function ($element, options) { 5887 if (Utils.GetData($element[0], 'select2') != null) { 5888 Utils.GetData($element[0], 'select2').destroy(); 5889 } 5890 5891 this.$element = $element; 5892 5893 this.id = this._generateId($element); 5894 5895 options = options || {}; 5896 5897 this.options = new Options(options, $element); 5898 5899 Select2.__super__.constructor.call(this); 5900 5901 // Set up the tabindex 5902 5903 var tabindex = $element.attr('tabindex') || 0; 5904 Utils.StoreData($element[0], 'old-tabindex', tabindex); 5905 $element.attr('tabindex', '-1'); 5906 5907 // Set up containers and adapters 5908 5909 var DataAdapter = this.options.get('dataAdapter'); 5910 this.dataAdapter = new DataAdapter($element, this.options); 5911 5912 var $container = this.render(); 5913 5914 this._placeContainer($container); 5915 5916 var SelectionAdapter = this.options.get('selectionAdapter'); 5917 this.selection = new SelectionAdapter($element, this.options); 5918 this.$selection = this.selection.render(); 5919 5920 this.selection.position(this.$selection, $container); 5921 5922 var DropdownAdapter = this.options.get('dropdownAdapter'); 5923 this.dropdown = new DropdownAdapter($element, this.options); 5924 this.$dropdown = this.dropdown.render(); 5925 5926 this.dropdown.position(this.$dropdown, $container); 5927 5928 var ResultsAdapter = this.options.get('resultsAdapter'); 5929 this.results = new ResultsAdapter($element, this.options, this.dataAdapter); 5930 this.$results = this.results.render(); 5931 5932 this.results.position(this.$results, this.$dropdown); 5933 5934 // Bind events 5935 5936 var self = this; 5937 5938 // Bind the container to all of the adapters 5939 this._bindAdapters(); 5940 5941 // Register any DOM event handlers 5942 this._registerDomEvents(); 5943 5944 // Register any internal event handlers 5945 this._registerDataEvents(); 5946 this._registerSelectionEvents(); 5947 this._registerDropdownEvents(); 5948 this._registerResultsEvents(); 5949 this._registerEvents(); 5950 5951 // Set the initial state 5952 this.dataAdapter.current(function (initialData) { 5953 self.trigger('selection:update', { 5954 data: initialData 5955 }); 5956 }); 5957 5958 // Hide the original select 5959 $element.addClass('select2-hidden-accessible'); 5960 $element.attr('aria-hidden', 'true'); 5961 5962 // Synchronize any monitored attributes 5963 this._syncAttributes(); 5964 5965 Utils.StoreData($element[0], 'select2', this); 5966 5967 // Ensure backwards compatibility with $element.data('select2'). 5968 $element.data('select2', this); 5969 }; 5970 5971 Utils.Extend(Select2, Utils.Observable); 5972 5973 Select2.prototype._generateId = function ($element) { 5974 var id = ''; 5975 5976 if ($element.attr('id') != null) { 5977 id = $element.attr('id'); 5978 } else if ($element.attr('name') != null) { 5979 id = $element.attr('name') + '-' + Utils.generateChars(2); 5980 } else { 5981 id = Utils.generateChars(4); 5982 } 5983 5984 id = id.replace(/(:|\.|\[|\]|,)/g, ''); 5985 id = 'select2-' + id; 5986 5987 return id; 5988 }; 5989 5990 Select2.prototype._placeContainer = function ($container) { 5991 $container.insertAfter(this.$element); 5992 5993 var width = this._resolveWidth(this.$element, this.options.get('width')); 5994 5995 if (width != null) { 5996 $container.css('width', width); 5997 } 5998 }; 5999 6000 Select2.prototype._resolveWidth = function ($element, method) { 6001 var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; 6002 6003 if (method == 'resolve') { 6004 var styleWidth = this._resolveWidth($element, 'style'); 6005 6006 if (styleWidth != null) { 6007 return styleWidth; 6008 } 6009 6010 return this._resolveWidth($element, 'element'); 6011 } 6012 6013 if (method == 'element') { 6014 var elementWidth = $element.outerWidth(false); 6015 6016 if (elementWidth <= 0) { 6017 return 'auto'; 6018 } 6019 6020 return elementWidth + 'px'; 6021 } 6022 6023 if (method == 'style') { 6024 var style = $element.attr('style'); 6025 6026 if (typeof(style) !== 'string') { 6027 return null; 6028 } 6029 6030 var attrs = style.split(';'); 6031 6032 for (var i = 0, l = attrs.length; i < l; i = i + 1) { 6033 var attr = attrs[i].replace(/\s/g, ''); 6034 var matches = attr.match(WIDTH); 6035 6036 if (matches !== null && matches.length >= 1) { 6037 return matches[1]; 6038 } 6039 } 6040 6041 return null; 6042 } 6043 6044 if (method == 'computedstyle') { 6045 var computedStyle = window.getComputedStyle($element[0]); 6046 6047 return computedStyle.width; 6048 } 6049 6050 return method; 6051 }; 6052 6053 Select2.prototype._bindAdapters = function () { 6054 this.dataAdapter.bind(this, this.$container); 6055 this.selection.bind(this, this.$container); 6056 6057 this.dropdown.bind(this, this.$container); 6058 this.results.bind(this, this.$container); 6059 }; 6060 6061 Select2.prototype._registerDomEvents = function () { 6062 var self = this; 6063 6064 this.$element.on('change.select2', function () { 6065 self.dataAdapter.current(function (data) { 6066 self.trigger('selection:update', { 6067 data: data 6068 }); 6069 }); 6070 }); 6071 6072 this.$element.on('focus.select2', function (evt) { 6073 self.trigger('focus', evt); 6074 }); 6075 6076 this._syncA = Utils.bind(this._syncAttributes, this); 6077 this._syncS = Utils.bind(this._syncSubtree, this); 6078 6079 if (this.$element[0].attachEvent) { 6080 this.$element[0].attachEvent('onpropertychange', this._syncA); 6081 } 6082 6083 var observer = window.MutationObserver || 6084 window.WebKitMutationObserver || 6085 window.MozMutationObserver 6086 ; 6087 6088 if (observer != null) { 6089 this._observer = new observer(function (mutations) { 6090 self._syncA(); 6091 self._syncS(null, mutations); 6092 }); 6093 this._observer.observe(this.$element[0], { 6094 attributes: true, 6095 childList: true, 6096 subtree: false 6097 }); 6098 } else if (this.$element[0].addEventListener) { 6099 this.$element[0].addEventListener( 6100 'DOMAttrModified', 6101 self._syncA, 6102 false 6103 ); 6104 this.$element[0].addEventListener( 6105 'DOMNodeInserted', 6106 self._syncS, 6107 false 6108 ); 6109 this.$element[0].addEventListener( 6110 'DOMNodeRemoved', 6111 self._syncS, 6112 false 6113 ); 6114 } 6115 }; 6116 6117 Select2.prototype._registerDataEvents = function () { 6118 var self = this; 6119 6120 this.dataAdapter.on('*', function (name, params) { 6121 self.trigger(name, params); 6122 }); 6123 }; 6124 6125 Select2.prototype._registerSelectionEvents = function () { 6126 var self = this; 6127 var nonRelayEvents = ['toggle', 'focus']; 6128 6129 this.selection.on('toggle', function () { 6130 self.toggleDropdown(); 6131 }); 6132 6133 this.selection.on('focus', function (params) { 6134 self.focus(params); 6135 }); 6136 6137 this.selection.on('*', function (name, params) { 6138 if ($.inArray(name, nonRelayEvents) !== -1) { 6139 return; 6140 } 6141 6142 self.trigger(name, params); 6143 }); 6144 }; 6145 6146 Select2.prototype._registerDropdownEvents = function () { 6147 var self = this; 6148 6149 this.dropdown.on('*', fu
6149nction (name, params) { 6150 self.trigger(name, params); 6151 }); 6152 }; 6153 6154 Select2.prototype._registerResultsEvents = function () { 6155 var self = this; 6156 6157 this.results.on('*', function (name, params) { 6158 self.trigger(name, params); 6159 }); 6160 }; 6161 6162 Select2.prototype._registerEvents = function () { 6163 var self = this; 6164 6165 this.on('open', function () { 6166 self.$container.addClass('select2-container--open'); 6167 }); 6168 6169 this.on('close', function () { 6170 self.$container.removeClass('select2-container--open'); 6171 }); 6172 6173 this.on('enable', function () { 6174 self.$container.removeClass('select2-container--disabled'); 6175 }); 6176 6177 this.on('disable', function () { 6178 self.$container.addClass('select2-container--disabled'); 6179 }); 6180 6181 this.on('blur', function () { 6182 self.$container.removeClass('select2-container--focus'); 6183 }); 6184 6185 this.on('query', function (params) { 6186 if (!self.isOpen()) { 6187 self.trigger('open', {}); 6188 } 6189 6190 this.dataAdapter.query(params, function (data) { 6191 self.trigger('results:all', { 6192 data: data, 6193 query: params 6194 }); 6195 }); 6196 }); 6197 6198 this.on('query:append', function (params) { 6199 this.dataAdapter.query(params, function (data) { 6200 self.trigger('results:append', { 6201 data: data, 6202 query: params 6203 }); 6204 }); 6205 }); 6206 6207 this.on('keypress', function (evt) { 6208 var key = evt.which; 6209 6210 if (self.isOpen()) { 6211 if (key === KEYS.ESC || key === KEYS.TAB || 6212 (key === KEYS.UP && evt.altKey)) { 6213 self.close(evt); 6214 6215 evt.preventDefault(); 6216 } else if (key === KEYS.ENTER) { 6217 self.trigger('results:select', {}); 6218 6219 evt.preventDefault(); 6220 } else if ((key === KEYS.SPACE && evt.ctrlKey)) { 6221 self.trigger('results:toggle', {}); 6222 6223 evt.preventDefault(); 6224 } else if (key === KEYS.UP) { 6225 self.trigger('results:previous', {}); 6226 6227 evt.preventDefault(); 6228 } else if (key === KEYS.DOWN) { 6229 self.trigger('results:next', {}); 6230 6231 evt.preventDefault(); 6232 } 6233 } else { 6234 if (key === KEYS.ENTER || key === KEYS.SPACE || 6235 (key === KEYS.DOWN && evt.altKey)) { 6236 self.open(); 6237 6238 evt.preventDefault(); 6239 } 6240 } 6241 }); 6242 }; 6243 6244 Select2.prototype._syncAttributes = function () { 6245 this.options.set('disabled', this.$element.prop('disabled')); 6246 6247 if (this.isDisabled()) { 6248 if (this.isOpen()) { 6249 this.close(); 6250 } 6251 6252 this.trigger('disable', {}); 6253 } else { 6254 this.trigger('enable', {}); 6255 } 6256 }; 6257 6258 Select2.prototype._isChangeMutation = function (evt, mutations) { 6259 var changed = false; 6260 var self = this; 6261 6262 // Ignore any mutation events raised for elements that aren't options or 6263 // optgroups. This handles the case when the select element is destroyed 6264 if ( 6265 evt && evt.target && ( 6266 evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP' 6267 ) 6268 ) { 6269 return; 6270 } 6271 6272 if (!mutations) { 6273 // If mutation events aren't supported, then we can only assume that the 6274 // change affected the selections 6275 changed = true; 6276 } else if (mutations.addedNodes && mutations.addedNodes.length > 0) { 6277 for (var n = 0; n < mutations.addedNodes.length; n++) { 6278 var node = mutations.addedNodes[n]; 6279 6280 if (node.selected) { 6281 changed = true; 6282 } 6283 } 6284 } else if (mutations.removedNodes && mutations.removedNodes.length > 0) { 6285 changed = true; 6286 } else if ($.isArray(mutations)) { 6287 $.each(mutations, function(evt, mutation) { 6288 if (self._isChangeMutation(evt, mutation)) { 6289 // We've found a change mutation. 6290 // Let's escape from the loop and continue 6291 changed = true; 6292 return false; 6293 } 6294 }); 6295 } 6296 return changed; 6297 }; 6298 6299 Select2.prototype._syncSubtree = function (evt, mutations) { 6300 var changed = this._isChangeMutation(evt, mutations); 6301 var self = this; 6302 6303 // Only re-pull the data if we think there is a change 6304 if (changed) { 6305 this.dataAdapter.current(function (currentData) { 6306 self.trigger('selection:update', { 6307 data: currentData 6308 }); 6309 }); 6310 } 6311 }; 6312 6313 /** 6314 * Override the trigger method to automatically trigger pre-events when 6315 * there are events that can be prevented. 6316 */ 6317 Select2.prototype.trigger = function (name, args) { 6318 var actualTrigger = Select2.__super__.trigger; 6319 var preTriggerMap = { 6320 'open': 'opening', 6321 'close': 'closing', 6322 'select': 'selecting', 6323 'unselect': 'unselecting', 6324 'clear': 'clearing' 6325 }; 6326 6327 if (args === undefined) { 6328 args = {}; 6329 } 6330 6331 if (name in preTriggerMap) { 6332 var preTriggerName = preTriggerMap[name]; 6333 var preTriggerArgs = { 6334 prevented: false, 6335 name: name, 6336 args: args 6337 }; 6338 6339 actualTrigger.call(this, preTriggerName, preTriggerArgs); 6340 6341 if (preTriggerArgs.prevented) { 6342 args.prevented = true; 6343 6344 return; 6345 } 6346 } 6347 6348 actualTrigger.call(this, name, args); 6349 }; 6350 6351 Select2.prototype.toggleDropdown = function () { 6352 if (this.isDisabled()) { 6353 return; 6354 } 6355 6356 if (this.isOpen()) { 6357 this.close(); 6358 } else { 6359 this.open(); 6360 } 6361 }; 6362 6363 Select2.prototype.open = function () { 6364 if (this.isOpen()) { 6365 return; 6366 } 6367 6368 if (this.isDisabled()) { 6369 return; 6370 } 6371 6372 this.trigger('query', {}); 6373 }; 6374 6375 Select2.prototype.close = function (evt) { 6376 if (!this.isOpen()) { 6377 return; 6378 } 6379 6380 this.trigger('close', { originalEvent : evt }); 6381 }; 6382 6383 /** 6384 * Helper method to abstract the "enabled" (not "disabled") state of this 6385 * object. 6386 * 6387 * @return {true} if the instance is not disabled. 6388 * @return {false} if the instance is disabled. 6389 */ 6390 Select2.prototype.isEnabled = function () { 6391 return !this.isDisabled(); 6392 }; 6393 6394 /** 6395 * Helper method to abstract the "disabled" state of this object. 6396 * 6397 * @return {true} if the disabled option is true. 6398 * @return {false} if the disabled option is false. 6399 */ 6400 Select2.prototype.isDisabled = function () { 6401 return this.options.get('disabled'); 6402 }; 6403 6404 Select2.prototype.isOpen = function () { 6405 return this.$container.hasClass('select2-container--open'); 6406 }; 6407 6408 Select2.prototype.hasFocus = function () { 6409 return this.$container.hasClass('select2-container--focus'); 6410 }; 6411
6412 Select2.prototype.focus = function (data) { 6413 // No need to re-trigger focus events if we are already focused 6414 if (this.hasFocus()) { 6415 return; 6416 } 6417 6418 this.$container.addClass('select2-container--focus'); 6419 this.trigger('focus', {}); 6420 }; 6421 6422 Select2.prototype.enable = function (args) { 6423 if (this.options.get('debug') && window.console && console.warn) { 6424 console.warn( 6425 'Select2: The `select2("enable")` method has been deprecated and will' + 6426 ' be removed in later Select2 versions. Use $element.prop("disabled")' + 6427 ' instead.' 6428 ); 6429 } 6430 6431 if (args == null || args.length === 0) { 6432 args = [true]; 6433 } 6434 6435 var disabled = !args[0]; 6436 6437 this.$element.prop('disabled', disabled); 6438 }; 6439 6440 Select2.prototype.data = function () { 6441 if (this.options.get('debug') && 6442 arguments.length > 0 && window.console && console.warn) { 6443 console.warn( 6444 'Select2: Data can no longer be set using `select2("data")`. You ' + 6445 'should consider setting the value instead using `$element.val()`.' 6446 ); 6447 } 6448 6449 var data = []; 6450 6451 this.dataAdapter.current(function (currentData) { 6452 data = currentData; 6453 }); 6454 6455 return data; 6456 }; 6457 6458 Select2.prototype.val = function (args) { 6459 if (this.options.get('debug') && window.console && console.warn) { 6460 console.warn( 6461 'Select2: The `select2("val")` method has been deprecated and will be' + 6462 ' removed in later Select2 versions. Use $element.val() instead.' 6463 ); 6464 } 6465 6466 if (args == null || args.length === 0) { 6467 return this.$element.val(); 6468 } 6469 6470 var newVal = args[0]; 6471 6472 if ($.isArray(newVal)) { 6473 newVal = $.map(newVal, function (obj) { 6474 return obj.toString(); 6475 }); 6476 } 6477 6478 this.$element.val(newVal).trigger('input').trigger('change'); 6479 }; 6480 6481 Select2.prototype.destroy = function () { 6482 this.$container.remove(); 6483 6484 if (this.$element[0].detachEvent) { 6485 this.$element[0].detachEvent('onpropertychange', this._syncA); 6486 } 6487 6488 if (this._observer != null) { 6489 this._observer.disconnect(); 6490 this._observer = null; 6491 } else if (this.$element[0].removeEventListener) { 6492 this.$element[0] 6493 .removeEventListener('DOMAttrModified', this._syncA, false); 6494 this.$element[0] 6495 .removeEventListener('DOMNodeInserted', this._syncS, false); 6496 this.$element[0] 6497 .removeEventListener('DOMNodeRemoved', this._syncS, false); 6498 } 6499 6500 this._syncA = null; 6501 this._syncS = null; 6502 6503 this.$element.off('.select2'); 6504 this.$element.attr('tabindex', 6505 Utils.GetData(this.$element[0], 'old-tabindex')); 6506 6507 this.$element.removeClass('select2-hidden-accessible'); 6508 this.$element.attr('aria-hidden', 'false'); 6509 Utils.RemoveData(this.$element[0]); 6510 this.$element.removeData('select2'); 6511 6512 this.dataAdapter.destroy(); 6513 this.selection.destroy(); 6514 this.dropdown.destroy(); 6515 this.results.destroy(); 6516 6517 this.dataAdapter = null; 6518 this.selection = null; 6519 this.dropdown = null; 6520 this.results = null; 6521 }; 6522 6523 Select2.prototype.render = function () { 6524 var $container = $( 6525 '<span class="select2 select2-container">' + 6526 '<span class="selection"></span>' + 6527 '<span class="dropdown-wrapper" aria-hidden="true"></span>' + 6528 '</span>' 6529 ); 6530 6531 $container.attr('dir', this.options.get('dir')); 6532 6533 this.$container = $container; 6534 6535 this.$container.addClass('select2-container--' + this.options.get('theme')); 6536 6537 Utils.StoreData($container[0], 'element', this.$element); 6538 6539 return $container; 6540 }; 6541 6542 return Select2; 6543}); 6544 6545S2.define('jquery-mousewheel',[ 6546 'jquery' 6547], function ($) { 6548 // Used to shim jQuery.mousewheel for non-full builds. 6549 return $; 6550}); 6551 6552S2.define('jquery.select2',[ 6553 'jquery', 6554 'jquery-mousewheel', 6555 6556 './select2/core', 6557 './select2/defaults', 6558 './select2/utils' 6559], function ($, _, Select2, Defaults, Utils) { 6560 if ($.fn.select2 == null) { 6561 // All methods that should return the element 6562 var thisMethods = ['open', 'close', 'destroy']; 6563 6564 $.fn.select2 = function (options) { 6565 options = options || {}; 6566 6567 if (typeof options === 'object') { 6568 this.each(function () { 6569 var instanceOptions = $.extend(true, {}, options); 6570 6571 var instance = new Select2($(this), instanceOptions); 6572 }); 6573 6574 return this; 6575 } else if (typeof options === 'string') { 6576 var ret; 6577 var args = Array.prototype.slice.call(arguments, 1); 6578 6579 this.each(function () { 6580 var instance = Utils.GetData(this, 'select2'); 6581 6582 if (instance == null && window.console && console.error) { 6583 console.error( 6584 'The select2(\'' + options + '\') method was called on an ' + 6585 'element that is not using Select2.' 6586 ); 6587 } 6588 6589 ret = instance[options].apply(instance, args); 6590 }); 6591 6592 // Check if we should be returning `this` 6593 if ($.inArray(options, thisMethods) > -1) { 6594 return this; 6595 } 6596 6597 return ret; 6598 } else { 6599 throw new Error('Invalid arguments for Select2: ' + options); 6600 } 6601 }; 6602 } 6603 6604 if ($.fn.select2.defaults == null) { 6605 $.fn.select2.defaults = Defaults; 6606 } 6607 6608 return Select2; 6609}); 6610 6611 // Return the AMD loader configuration so it can be used outside of this file 6612 return { 6613 define: S2.define, 6614 require: S2.require 6615 }; 6616}()); 6617 6618 // Autoload the jQuery bindings 6619 // We know that all of the modules exist above this, so we're safe 6620 var select2 = S2.require('jquery.select2'); 6621 6622 // Hold the AMD module references on the jQuery function that was just loaded 6623 // This allows Select2 to use the internal loader outside of this file, such 6624 // as in the language files. 6625 jQuery.fn.select2.amd = S2; 6626 6627 // Return the Select2 instance for anyone who is importing it. 6628 return select2; 6629})); 6630 6631/* 6632 * jQuery mmenu v5.4.0 6633 * @requires jQuery 1.7.0 or later 6634 * 6635 * mmenu.frebsite.nl 6636 * 6637 * Copyright (c) Fred Heusschen 6638 * www.frebsite.nl 6639 * 6640 * Licensed under the MIT license: 6641 * http://en.wikipedia.org/wiki/MIT_License 6642 */ 6643!function(e){function t(){e[n].glbl||(l={$wndw:e(window),$html:e("html"),$body:e("body")},a={},i={},r={},e.each([a,i,r],function(e,t){t.add=function(e){e=e.split(" ");for(var n=0,s=e.length;s>n;n++)t[e[n]]=t.mm(e[n])}}),a.mm=function(e){return"mm-"+e},a.add("wrapper menu panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen"),a.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},i.mm=function(e){return"mm-"+e},i.add("parent sub"),r.mm=function(e){return e+".mm"},r.add("transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend click keydown"),e[n]._c=a,e[n]._d=i,e[n]._e=r,e[n].glbl=l)}var n="mmenu",s="5.4.0";if(!e[n]){e[n]=function(e,t,n){this.$menu=e,this._api=["bind","init","update","setSelected","getInstance","openPanel","closePanel","closeAllPanels"],this.opts=t,this.conf=n,this.vars={},this.cbck={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var s=this.$menu.children(this.conf.panelNodetype);return this._initAddons(),this.init(s),"function"==typeof this.___debug&&this.___debug(),this},e[n].version=s,e[n].addons={},e[n].uniqueId=0,e[n].defaults={extensions:[],navbar:{add:!0,title:"Menu",titleLink:"panel"},onClick:{setSelected:!0},slidingSubmenus:!0},e[n].configuration={classNames:{divider:"Divider",inset:"Inset",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},e[n].prototype={init:function(e){e=e.not("."+a.nopanel),e=this._initPanels(e),this.trigger("init",e),this.trigger("update")},update:function(){this.trigger("update")},setSelected:function(e){this.$menu.find("."+a.listview).children().removeClass(a.selected),e.addClass(a.selected),this.trigger("setSelected",e)},openPanel:function(t){var s=t.parent();if(s.hasClass(a.vertical)){var i=s.parents("."+a.subopened);
6643if(i.length)return this.openPanel(i.first());s.addClass(a.opened)}else{if(t.hasClass(a.current))return;var r=this.$menu.children("."+a.panel),l=r.filter("."+a.current);r.removeClass(a.highest).removeClass(a.current).not(t).not(l).not("."+a.vertical).addClass(a.hidden),e[n].support.csstransitions||l.addClass(a.hidden),t.hasClass(a.opened)?t.nextAll("."+a.opened).addClass(a.highest).removeClass(a.opened).removeClass(a.subopened):(t.addClass(a.highest),l.addClass(a.subopened)),t.removeClass(a.hidden).addClass(a.current),setTimeout(function(){t.removeClass(a.subopened).addClass(a.opened)},this.conf.openingInterval)}this.trigger("openPanel",t)},closePanel:function(e){var t=e.parent();t.hasClass(a.vertical)&&(t.removeClass(a.opened),this.trigger("closePanel",e))},closeAllPanels:function(){this.$menu.find("."+a.listview).children().removeClass(a.selected).filter("."+a.vertical).removeClass(a.opened);var e=this.$menu.children("."+a.panel),t=e.first();this.$menu.children("."+a.panel).not(t).removeClass(a.subopened).removeClass(a.opened).removeClass(a.current).removeClass(a.highest).addClass(a.hidden),this.openPanel(t)},togglePanel:function(e){var t=e.parent();t.hasClass(a.vertical)&&this[t.hasClass(a.opened)?"closePanel":"openPanel"](e)},getInstance:function(){return this},bind:function(e,t){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(t)},trigger:function(){var e=this,t=Array.prototype.slice.call(arguments),n=t.shift();if(this.cbck[n])for(var s=0,a=this.cbck[n].length;a>s;s++)this.cbck[n][s].apply(e,t)},_initMenu:function(){this.opts.offCanvas&&this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){e(this).attr("id",a.mm(e(this).attr("id")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$menu.parent().addClass(a.wrapper);var t=[a.menu];this.opts.slidingSubmenus||t.push(a.vertical),this.opts.extensions=this.opts.extensions.length?"mm-"+this.opts.extensions.join(" mm-"):"",this.opts.extensions&&t.push(this.opts.extensions),this.$menu.addClass(t.join(" "))},_initPanels:function(t){var n=this,s=this.__findAddBack(t,"ul, ol");this.__refactorClass(s,this.conf.classNames.inset,"inset").addClass(a.nolistview+" "+a.nopanel),s.not("."+a.nolistview).addClass(a.listview);var r=this.__findAddBack(t,"."+a.listview).children();this.__refactorClass(r,this.conf.classNames.selected,"selected"),this.__refactorClass(r,this.conf.classNames.divider,"divider"),this.__refactorClass(r,this.conf.classNames.spacer,"spacer"),this.__refactorClass(this.__findAddBack(t,"."+this.conf.classNames.panel),this.conf.classNames.panel,"panel");var l=e(),d=t.add(t.find("."+a.panel)).add(this.__findAddBack(t,"."+a.listview).children().children(this.conf.panelNodetype)).not("."+a.nopanel);this.__refactorClass(d,this.conf.classNames.vertical,"vertical"),this.opts.slidingSubmenus||d.addClass(a.vertical),d.each(function(){var t=e(this),s=t;t.is("ul, ol")?(t.wrap('<div class="'+a.panel+'" />'),s=t.parent()):s.addClass(a.panel);var i=t.attr("id");t.removeAttr("id"),s.attr("id",i||n.__getUniqueId()),t.hasClass(a.vertical)&&(t.removeClass(n.conf.classNames.vertical),s.add(s.parent()).addClass(a.vertical)),l=l.add(s)});var o=e("."+a.panel,this.$menu);l.each(function(){var t=e(this),s=t.parent(),r=s.children("a, span").first();if(s.is("."+a.menu)||(s.data(i.sub,t),t.data(i.parent,s)),!s.children("."+a.next).length&&s.parent().is("."+a.listview)){var l=t.attr("id"),d=e('<a class="'+a.next+'" href="#'+l+'" data-target="#'+l+'" />').insertBefore(r);r.is("span")&&d.addClass(a.fullsubopen)}if(!t.children("."+a.navbar).length&&!s.hasClass(a.vertical)){if(s.parent().is("."+a.listview))var s=s.closest("."+a.panel);else var r=s.closest("."+a.panel).find('a[href="#'+t.attr("id")+'"]').first(),s=r.closest("."+a.panel);var o=e('<div class="'+a.navbar+'" />');if(s.length){var l=s.attr("id");switch(n.opts.navbar.titleLink){case"anchor":_url=r.attr("href");break;case"panel":case"parent":_url="#"+l;break;case"none":default:_url=!1}o.append('<a class="'+a.btn+" "+a.prev+'" href="#'+l+'" data-target="#'+l+'" />').append(e('<a class="'+a.title+'"'+(_url?' href="'+_url+'"':"")+" />").text(r.text())).prependTo(t),n.opts.navbar.add&&t.addClass(a.hasnavbar)}else n.opts.navbar.title&&(o.append('<a class="'+a.title+'">'+n.opts.navbar.title+"</a>").prependTo(t),n.opts.navbar.add&&t.addClass(a.hasnavbar))}});var c=this.__findAddBack(t,"."+a.listview).children("."+a.selected).removeClass(a.selected).last(
6643).addClass(a.selected);c.add(c.parentsUntil("."+a.menu,"li")).filter("."+a.vertical).addClass(a.opened).end().not("."+a.vertical).each(function(){e(this).parentsUntil("."+a.menu,"."+a.panel).not("."+a.vertical).first().addClass(a.opened).parentsUntil("."+a.menu,"."+a.panel).not("."+a.vertical).first().addClass(a.opened).addClass(a.subopened)}),c.children("."+a.panel).not("."+a.vertical).addClass(a.opened).parentsUntil("."+a.menu,"."+a.panel).not("."+a.vertical).first().addClass(a.opened).addClass(a.subopened);var u=o.filter("."+a.opened);return u.length||(u=l.first()),u.addClass(a.opened).last().addClass(a.current),l.not("."+a.vertical).not(u.last()).addClass(a.hidden).end().appendTo(this.$menu),l},_initAnchors:function(){var t=this;l.$body.on(r.click+"-oncanvas","a[href]",function(s){var i=e(this),r=!1,d=t.$menu.find(i).length;for(var o in e[n].addons)if(r=e[n].addons[o].clickAnchor.call(t,i,d))break;if(!r&&d){var c=i.attr("href");if(c.length>1&&"#"==c.slice(0,1))try{var u=e(c,t.$menu);u.is("."+a.panel)&&(r=!0,t[i.parent().hasClass(a.vertical)?"togglePanel":"openPanel"](u))}catch(h){}}if(r&&s.preventDefault(),!r&&d&&i.is("."+a.listview+" > li > a")&&!i.is('[rel="external"]')&&!i.is('[target="_blank"]')){t.__valueOrFn(t.opts.onClick.setSelected,i)&&t.setSelected(e(s.target).parent());var p=t.__valueOrFn(t.opts.onClick.preventDefault,i,"#"==c.slice(0,1));p&&s.preventDefault(),t.__valueOrFn(t.opts.onClick.blockUI,i,!p)&&l.$html.addClass(a.blocking),t.__valueOrFn(t.opts.onClick.close,i,p)&&t.close()}})},_initAddons:function(){for(var t in e[n].addons)e[n].addons[t].add.call(this),e[n].addons[t].add=function(){};for(var t in e[n].addons)e[n].addons[t].setup.call(this)},__api:function(){var t=this,n={};return e.each(this._api,function(){var e=this;n[e]=function(){var s=t[e].apply(t,arguments);return"undefined"==typeof s?n:s}}),n},__valueOrFn:function(e,t,n){return"function"==typeof e?e.call(t[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,t,n){return e.filter("."+t).removeClass(t).addClass(a[n])},__findAddBack:function(e,t){return e.find(t).add(e.filter(t))},__filterListItems:function(e){return e.not("."+a.divider).not("."+a.hidden)},__transitionend:function(e,t,n){var s=!1,a=function(){s||t.call(e[0]),s=!0};e.one(r.transitionend,a),e.one(r.webkitTransitionEnd,a),setTimeout(a,1.1*n)},__getUniqueId:function(){return a.mm(e[n].uniqueId++)}},e.fn[n]=function(s,a){return t(),s=e.extend(!0,{},e[n].defaults,s),a=e.extend(!0,{},e[n].configuration,a),this.each(function(){var t=e(this);if(!t.data(n)){var i=new e[n](t,s,a);t.data(n,i.__api())}})},e[n].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints,csstransitions:function(){if("undefined"!=typeof Modernizr)return Modernizr.csstransitions;var e=document.body||document.documentElement,t=e.style,n="transition";if("string"==typeof t[n])return!0;var s=["Moz","webkit","Webkit","Khtml","O","ms"];n=n.charAt(0).toUpperCase()+n.substr(1);for(var a=0;a<s.length;a++)if("string"==typeof t[s[a]+n])return!0;return!1}()};var a,i,r,l}}(jQuery); 6644/* 6645 * jQuery mmenu offCanvas addon 6646 * mmenu.frebsite.nl 6647 * 6648 * Copyright (c) Fred Heusschen 6649 */ 6650!function(t){var e="mmenu",o="offCanvas";t[e].addons[o]={setup:function(){if(this.opts[o]){var n=this.opts[o],i=this.conf[o];a=t[e].glbl,this._api=t.merge(this._api,["open","close","setPage"]),("top"==n.position||"bottom"==n.position)&&(n.zposition="front"),"string"!=typeof i.pageSelector&&(i.pageSelector="> "+i.pageNodetype),a.$allMenus=(a.$allMenus||t()).add(this.$menu),this.vars.opened=!1;var r=[s.offcanvas];"left"!=n.position&&r.push(s.mm(n.position)),"back"!=n.zposition&&r.push(s.mm(n.zposition)),this.$menu.addClass(r.join(" ")).parent().removeClass(s.wrapper),this.setPage(a.$page),this._initBlocker(),this["_initWindow_"+o](),this.$menu[i.menuInjectMethod+"To"](i.menuWrapperSelector)}},add:function(){s=t[e]._c,n=t[e]._d,i=t[e]._e,s.add("offcanvas slideout modal background opening blocker page"),n.add("style"),i.add("resize")},clickAnchor:function(t){if(!this.opts[o])return!1;var e=this.$menu.attr("id");if(e&&e.length&&(this.conf.clone&&(e=s.umm(e)),t.is('[href="#'+e+'"]')))return this.open(),!0;if(a.$page){var e=a.$page.first().attr("id");return e&&e.length&&t.is('[href="#'+e+'"]')?(this.close(),!0):!1}}},t[e].defaults[o]={position:"left",zposition:"back",modal:!1,moveBackgroun
6650d:!0},t[e].configuration[o]={pageNodetype:"div",pageSelector:null,wrapPageIfNeeded:!0,menuWrapperSelector:"body",menuInjectMethod:"prepend"},t[e].prototype.open=function(){if(!this.vars.opened){var t=this;this._openSetup(),setTimeout(function(){t._openFinish()},this.conf.openingInterval),this.trigger("open")}},t[e].prototype._openSetup=function(){var e=this;this.closeAllOthers(),a.$page.each(function(){t(this).data(n.style,t(this).attr("style")||"")}),a.$wndw.trigger(i.resize+"-offcanvas",[!0]);var r=[s.opened];this.opts[o].modal&&r.push(s.modal),this.opts[o].moveBackground&&r.push(s.background),"left"!=this.opts[o].position&&r.push(s.mm(this.opts[o].position)),"back"!=this.opts[o].zposition&&r.push(s.mm(this.opts[o].zposition)),this.opts.extensions&&r.push(this.opts.extensions),a.$html.addClass(r.join(" ")),setTimeout(function(){e.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(s.current+" "+s.opened)},t[e].prototype._openFinish=function(){var t=this;this.__transitionend(a.$page.first(),function(){t.trigger("opened")},this.conf.transitionDuration),a.$html.addClass(s.opening),this.trigger("opening")},t[e].prototype.close=function(){if(this.vars.opened){var e=this;this.__transitionend(a.$page.first(),function(){e.$menu.removeClass(s.current).removeClass(s.opened),a.$html.removeClass(s.opened).removeClass(s.modal).removeClass(s.background).removeClass(s.mm(e.opts[o].position)).removeClass(s.mm(e.opts[o].zposition)),e.opts.extensions&&a.$html.removeClass(e.opts.extensions),a.$page.each(function(){t(this).attr("style",t(this).data(n.style))}),e.vars.opened=!1,e.trigger("closed")},this.conf.transitionDuration),a.$html.removeClass(s.opening),this.trigger("close"),this.trigger("closing")}},t[e].prototype.closeAllOthers=function(){a.$allMenus.not(this.$menu).each(function(){var o=t(this).data(e);o&&o.close&&o.close()})},t[e].prototype.setPage=function(e){var n=this,i=this.conf[o];e&&e.length||(e=a.$body.find(i.pageSelector),e.length>1&&i.wrapPageIfNeeded&&(e=e.wrapAll("<"+this.conf[o].pageNodetype+" />").parent())),e.each(function(){t(this).attr("id",t(this).attr("id")||n.__getUniqueId())}),e.addClass(s.page+" "+s.slideout),a.$page=e,this.trigger("setPage",e)},t[e].prototype["_initWindow_"+o]=function(){a.$wndw.off(i.keydown+"-offcanvas").on(i.keydown+"-offcanvas",function(t){return a.$html.hasClass(s.opened)&&9==t.keyCode?(t.preventDefault(),!1):void 0});var t=0;a.$wndw.off(i.resize+"-offcanvas").on(i.resize+"-offcanvas",function(e,o){if(1==a.$page.length&&(o||a.$html.hasClass(s.opened))){var n=a.$wndw.height();(o||n!=t)&&(t=n,a.$page.css("minHeight",n))}})},t[e].prototype._initBlocker=function(){var e=this;a.$blck||(a.$blck=t('<div id="'+s.blocker+'" class="'+s.slideout+'" />')),a.$blck.appendTo(a.$body).off(i.touchstart+"-offcanvas "+i.touchmove+"-offcanvas").on(i.touchstart+"-offcanvas "+i.touchmove+"-offcanvas",function(t){t.preventDefault(),t.stopPropagation(),a.$blck.trigger(i.mousedown+"-offcanvas")}).off(i.mousedown+"-offcanvas").on(i.mousedown+"-offcanvas",function(t){t.preventDefault(),a.$html.hasClass(s.modal)||(e.closeAllOthers(),e.close())})};var s,n,i,a}(jQuery); 6651/* 6652 * jQuery mmenu autoHeight addon 6653 * mmenu.frebsite.nl 6654 * 6655 * Copyright (c) Fred Heusschen 6656 */ 6657!function(t){var e="mmenu",i="autoHeight";t[e].addons[i]={setup:function(){if(this.opts.offCanvas){switch(this.opts.offCanvas.position){case"left":case"right":return}var n=this,o=this.opts[i];if(this.conf[i],h=t[e].glbl,"boolean"==typeof o&&o&&(o={height:"auto"}),"object"!=typeof o&&(o={}),o=this.opts[i]=t.extend(!0,{},t[e].defaults[i],o),"auto"==o.height){this.$menu.addClass(s.autoheight);var u=function(t){var e=this.$menu.children("."+s.current);_top=parseInt(e.css("top"),10)||0,_bot=parseInt(e.css("bottom"),10)||0,this.$menu.addClass(s.measureheight),t=t||this.$menu.children("."+s.current),t.is("."+s.vertical)&&(t=t.parents("."+s.panel).not("."+s.vertical).first()),this.$menu.height(t.outerHeight()+_top+_bot).removeClass(s.measureheight)};this.bind("update",u),this.bind("openPanel",u),this.bind("closePanel",u),this.bind("open",u),h.$wndw.off(a.resize+"-autoheight").on(a.resize+"-autoheight",function(){u.call(n)})}}},add:function(){s=t[e]._c,n=t[e]._d,a=t[e]._e,s.add("autoheight measureheight"),a.add("resize")},clickAnchor:function(){}},t[e].defaults[i]={height:"default"};var s,n,a,h}(jQuery); 6658/* 6659 * jQuery mmenu backButton addon 6660 * mmenu.frebsite.nl 6661 * 6662 * Copyright (c) Fred Heusschen 6663 */ 6664!function(o){var t="mmenu",n="backButton";o[t].addons[n]={setup:function(){if(this.opts.offCanvas){var i=this,e=this.opts[n];if(this.conf[n],a=o[t].glbl,"boolean"==typeof e&&(e={close:e}),"object"!=typeof e&&(e={}),e=o.extend(!0,{},o[t].defaults[n],e),e.close){var c="#"+i.$menu.attr("id");this.bind("opened",function(){location.hash!=c&&history.pushState(null,document.title,c)}),o(window).on("popstate",function(o){a.$html.hasClass(s.opened)?(o.stopPropagation(),i.close()):location.hash==c&&(o.stopPropagation(),i.open())})}}},add:function(){return window.history&&window.history.pushState?(s=o[t]._c,i=o[t]._d,e=o[t]._e,void 0):(o[t].addons[n].setup=function(){},void 0)},clickAnchor:function(){}},o[t].defaults[n]={close:!1};var s,i,e,a}(jQuery); 6665/* 6666 * jQuery mmenu counters addon 6667 * mmenu.frebsite.nl 6668 * 6669 * Copyright (c) Fred Heusschen 6670 */ 6671!function(t){var n="mmenu",e="counters";t[n].addons[e]={setup:function(){var c=this,o=this.opts[e];this.conf[e],s=t[n].glbl,"boolean"==typeof o&&(o={add:o,update:o}),"object"!=typeof o&&(o={}),o=this.opts[e]=t.extend(!0,{},t[n].defaults[e],o),this.bind("init",function(n){this.__refactorClass(t("em",n),this.conf.classNames[e].counter,"counter")}),o.add&&this.bind("init",function(n){n.each(function(){var n=t(this).data(a.parent);
6671n&&(n.children("em."+i.counter).length||n.prepend(t('<em class="'+i.counter+'" />')))})}),o.update&&this.bind("update",function(){this.$menu.find("."+i.panel).each(function(){var n=t(this),e=n.data(a.parent);if(e){var s=e.children("em."+i.counter);s.length&&(n=n.children("."+i.listview),n.length&&s.html(c.__filterListItems(n.children()).length))}})})},add:function(){i=t[n]._c,a=t[n]._d,c=t[n]._e,i.add("counter search noresultsmsg")},clickAnchor:function(){}},t[n].defaults[e]={add:!1,update:!1},t[n].configuration.classNames[e]={counter:"Counter"};var i,a,c,s}(jQuery); 6672/* 6673 * jQuery mmenu dividers addon 6674 * mmenu.frebsite.nl 6675 * 6676 * Copyright (c) Fred Heusschen 6677 */ 6678!function(i){var e="mmenu",s="dividers";i[e].addons[s]={setup:function(){var n=this,a=this.opts[s];if(this.conf[s],l=i[e].glbl,"boolean"==typeof a&&(a={add:a,fixed:a}),"object"!=typeof a&&(a={}),a=this.opts[s]=i.extend(!0,{},i[e].defaults[s],a),this.bind("init",function(){this.__refactorClass(i("li",this.$menu),this.conf.classNames[s].collapsed,"collapsed")}),a.add&&this.bind("init",function(e){switch(a.addTo){case"panels":var s=e;break;default:var s=i(a.addTo,this.$menu).filter("."+d.panel)}i("."+d.divider,s).remove(),s.find("."+d.listview).not("."+d.vertical).each(function(){var e="";n.__filterListItems(i(this).children()).each(function(){var s=i.trim(i(this).children("a, span").text()).slice(0,1).toLowerCase();s!=e&&s.length&&(e=s,i('<li class="'+d.divider+'">'+s+"</li>").insertBefore(this))})})}),a.collapse&&this.bind("init",function(e){i("."+d.divider,e).each(function(){var e=i(this),s=e.nextUntil("."+d.divider,"."+d.collapsed);s.length&&(e.children("."+d.subopen).length||(e.wrapInner("<span />"),e.prepend('<a href="#" class="'+d.subopen+" "+d.fullsubopen+'" />')))})}),a.fixed){var o=function(e){e=e||this.$menu.children("."+d.current);var s=e.find("."+d.divider).not("."+d.hidden);if(s.length){this.$menu.addClass(d.hasdividers);var n=e.scrollTop()||0,t="";e.is(":visible")&&e.find("."+d.divider).not("."+d.hidden).each(function(){i(this).position().top+n<n+1&&(t=i(this).text())}),this.$fixeddivider.text(t)}else this.$menu.removeClass(d.hasdividers)};this.$fixeddivider=i('<ul class="'+d.listview+" "+d.fixeddivider+'"><li class="'+d.divider+'"></li></ul>').prependTo(this.$menu).children(),this.bind("openPanel",o),this.bind("init",function(e){e.off(t.scroll+"-dividers "+t.touchmove+"-dividers").on(t.scroll+"-dividers "+t.touchmove+"-dividers",function(){o.call(n,i(this))})})}},add:function(){d=i[e]._c,n=i[e]._d,t=i[e]._e,d.add("collapsed uncollapsed fixeddivider hasdividers"),t.add("scroll")},clickAnchor:function(i,e){if(this.opts[s].collapse&&e){var n=i.parent();if(n.is("."+d.divider)){var t=n.nextUntil("."+d.divider,"."+d.collapsed);return n.toggleClass(d.opened),t[n.hasClass(d.opened)?"addClass":"removeClass"](d.uncollapsed),!0}}return!1}},i[e].defaults[s]={add:!1,addTo:"panels",fixed:!1,collapse:!1},i[e].configuration.classNames[s]={collapsed:"Collapsed"};var d,n,t,l}(jQuery); 6679/* 6680 * jQuery mmenu dragOpen addon 6681 * mmenu.frebsite.nl 6682 * 6683 * Copyright (c) Fred Heusschen 6684 */ 6685!function(e){function t(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}var n="mmenu",o="dragOpen";e[n].addons[o]={setup:function(){if(this.opts.offCanvas){var i=this,a=this.opts[o],p=this.conf[o];if(r=e[n].glbl,"boolean"==typeof a&&(a={open:a}),"object"!=typeof a&&(a={}),a=this.opts[o]=e.extend(!0,{},e[n].defaults[o],a),a.open){var d,f,c,u,h,l={},m=0,g=!1,v=!1,w=0,_=0;switch(this.opts.offCanvas.position){case"left":case"right":l.events="panleft panright",l.typeLower="x",l.typeUpper="X",v="width";break;case"top":case"bottom":l.events="panup pandown",l.typeLower="y",l.typeUpper="Y",v="height"}switch(this.opts.offCanvas.position){case"right":case"bottom":l.negative=!0,u=function(e){e>=r.$wndw[v]()-a.maxStartPos&&(m=1)};break;default:l.negative=!1,u=function(e){e<=a.maxStartPos&&(m=1)}}switch(this.opts.offCanvas.position){case"left":l.open_dir="right",l.close_dir="left";break;case"right":l.open_dir="left",l.close_dir="right";break;case"top":l.open_dir="down",l.close_dir="up";break;case"bottom":l.open_dir="up",l.close_dir="down"}switch(this.opts.offCanvas.zposition){case"front":h=function(){return this.$menu};break;default:h=function(){return e("."+s.slideout)}}var b=this.__valueOrFn(a.pageNode,this.$menu,r.$page);"string"==typeof b&&(b=e(b));var y=new Hammer(b[0],a.vendors.hammer);y.on("panstart",function(e){u(e.center[l.typeLower]),r.$slideOutNodes=h(),g=l.open_dir}).on(l.events+" panend",function(e){m>0&&e.preventDefault()}).on(l.events,function(e){if(d=e["delta"+l.typeUpper],l.negative&&(d=-d),d!=w&&(g=d>=w?l.open_dir:l.close_dir),w=d,w>a.threshold&&1==m){if(r.$html.hasClass(s.opened))return;m=2,i._openSetup(),i.trigger("opening"),r.$html.addClass(s.dragging),_=t(r.$wndw[v]()*p[v].perc,p[v].min,p[v].max)}2==m&&(f=t(w,10,_)-("front"==i.opts.offCanvas.zposition?_:0),l.negative&&(f=-f),c="translate"+l.typeUpper+"("+f+"px )",r.$slideOutNodes.css({"-webkit-transform":"-webkit-"+c,transform:c}))}).on("panend",function(){2==m&&(r.$html.removeClass(s.dragging),r.$slideOutNodes.css("transform",""),i[g==l.open_dir?"_openFinish":"close"]()),m=0})}}},add:function(){return"function"!=typeof Hammer||Hammer.VERSION<2?(e[n].addons[o].setup=function(){},void 0):(s=e[n]._c,i=e[n]._d,a=e[n]._e,s.add("dragging"),void 0)},clickAnchor:function(){}},e[n].defaults[o]={open:!1,maxStartPos:100,threshold:50,vendors:{hammer
6685:{}}},e[n].configuration[o]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}};var s,i,a,r}(jQuery); 6686/* 6687 * jQuery mmenu fixedElements addon 6688 * mmenu.frebsite.nl 6689 * 6690 * Copyright (c) Fred Heusschen 6691 */ 6692!function(i){var s="mmenu",n="fixedElements";i[s].addons[n]={setup:function(){if(this.opts.offCanvas){this.opts[n],this.conf[n],o=i[s].glbl;var a=function(i){var s=this.conf.classNames[n].fixed;this.__refactorClass(i.find("."+s),s,"slideout").appendTo(o.$body)};a.call(this,o.$page),this.bind("setPage",a)}},add:function(){a=i[s]._c,t=i[s]._d,e=i[s]._e,a.add("fixed")},clickAnchor:function(){}},i[s].configuration.classNames[n]={fixed:"Fixed"};var a,t,e,o}(jQuery); 6693/* 6694 * jQuery mmenu iconPanels addon 6695 * mmenu.frebsite.nl 6696 * 6697 * Copyright (c) Fred Heusschen 6698 */ 6699!function(e){var n="mmenu",i="iconPanels";e[n].addons[i]={setup:function(){var a=this,l=this.opts[i];if(this.conf[i],d=e[n].glbl,"boolean"==typeof l&&(l={add:l}),"number"==typeof l&&(l={add:!0,visible:l}),"object"!=typeof l&&(l={}),l=this.opts[i]=e.extend(!0,{},e[n].defaults[i],l),l.visible++,l.add){this.$menu.addClass(s.iconpanel);for(var t=[],o=0;o<=l.visible;o++)t.push(s.iconpanel+"-"+o);t=t.join(" ");var c=function(n){var i=a.$menu.children("."+s.panel).removeClass(t),d=i.filter("."+s.subopened);d.removeClass(s.hidden).add(n).slice(-l.visible).each(function(n){e(this).addClass(s.iconpanel+"-"+n)})};this.bind("openPanel",c),this.bind("init",function(n){c.call(a,a.$menu.children("."+s.current)),l.hideNavbars&&n.removeClass(s.hasnavbar),n.each(function(){e(this).children("."+s.subblocker).length||e(this).prepend('<a href="#'+e(this).closest("."+s.panel).attr("id")+'" class="'+s.subblocker+'" />')})})}},add:function(){s=e[n]._c,a=e[n]._d,l=e[n]._e,s.add("iconpanel subblocker")},clickAnchor:function(){}},e[n].defaults[i]={add:!1,visible:3,hideNavbars:!1};var s,a,l,d}(jQuery); 6700/* 6701 * jQuery mmenu navbar addon 6702 * mmenu.frebsite.nl 6703 * 6704 * Copyright (c) Fred Heusschen 6705 */ 6706!function(n){var a="mmenu",e="navbars";n[a].addons[e]={setup:function(){var r=this,i=this.opts[e],c=this.conf[e];if(s=n[a].glbl,"undefined"!=typeof i){i instanceof Array||(i=[i]);var d={};n.each(i,function(s){var o=i[s];"boolean"==typeof o&&o&&(o={}),"object"!=typeof o&&(o={}),"undefined"==typeof o.content&&(o.content=["prev","title"]),o.content instanceof Array||(o.content=[o.content]),o=n.extend(!0,{},r.opts.navbar,o);var l=o.position,h=o.height;"number"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),"bottom"!=l&&(l="top"),d[l]||(d[l]=0),d[l]++;var f=n("<div />").addClass(t.navbar+" "+t.navbar+"-"+l+" "+t.navbar+"-"+l+"-"+d[l]+" "+t.navbar+"-size-"+h);d[l]+=h-1;for(var v=0,u=o.content.length;u>v;v++){var p=n[a].addons[e][o.content[v]]||!1;p?p.call(r,f,o,c):(p=o.content[v],p instanceof n||(p=n(o.content[v])),p.each(function(){f.append(n(this))}))}var b=Math.ceil(f.children().not("."+t.btn).length/h);b>1&&f.addClass(t.navbar+"-content-"+b),f.children("."+t.btn).length&&f.addClass(t.hasbtns),f.prependTo(r.$menu)});for(var o in d)r.$menu.addClass(t.hasnavbar+"-"+o+"-"+d[o])}},add:function(){t=n[a]._c,r=n[a]._d,i=n[a]._e,t.add("close hasbtns")},clickAnchor:function(){}},n[a].configuration[e]={breadcrumbSeparator:"/"},n[a].configuration.classNames[e]={panelTitle:"Title",panelNext:"Next",panelPrev:"Prev"};var t,r,i,s}(jQuery),/* 6707 * jQuery mmenu navbar addon breadcrumbs content 6708 * mmenu.frebsite.nl 6709 * 6710 * Copyright (c) Fred Heusschen 6711 */ 6712function(n){var a="mmenu",e="navbars",t="breadcrumbs";n[a].addons[e][t]=function(e,t,r){var i=n[a]._c,s=n[a]._d;i.add("breadcrumbs separator"),e.append('<span class="'+i.breadcrumbs+'"></span>'),this.bind("init",function(a){a.removeClass(i.hasnavbar).each(function(){for(var a=[],e=n(this),t=n('<span class="'+i.breadcrumbs+'"></span>'),c=n(this).children().first(),d=!0;c&&c.length;){c.is("."+i.panel)||(c=c.closest("."+i.panel));var o=c.children("."+i.navbar).children("."+i.title).text();a.unshift(d?"<span>"+o+"</span>":'<a href="#'+c.attr("id")+'">'+o+"</a>"),d=!1,c=c.data(s.parent)}t.append(a.join('<span class="'+i.separator+'">'+r.breadcrumbSeparator+"</span>")).appendTo(e.children("."+i.navbar))})});var c=function(){var n=this.$menu.children("."+i.current),a=e.find("."+i.breadcrumbs),t=n.children("."+i.navbar).children("."+i.breadcrumbs);a.html(t.html())};this.bind("openPanel",c),this.bind("init",c)}}(jQuery),/* 6713 * jQuery mmenu navbar addon close content 6714 * mmenu.frebsite.nl 6715 * 6716 * Copyright (c) Fred Heusschen 6717 */ 6718function(n){var a="mmenu",e="navbars",t="close";n[a].addons[e][t]=function(e){var t=n[a]._c,r=n[a].glbl;e.append('<a class="'+t.close+" "+t.btn+'" href="#"></a>');var i=function(n){e.find("."+t.close).attr("href","#"+n.attr("id"))};i.call(this,r.$page),this.bind("setPage",i)}}(jQuery),/* 6719 * jQuery mmenu navbar addon next content 6720 * mmenu.frebsite.nl 6721 * 6722 * Copyright (c) Fred Heusschen 6723 */ 6724function(n){var a="mmenu",e="navbars",t="next";n[a].addons[e][t]=function(t){var r=n[a]._c;t.append('<a class="'+r.next+" "+r.btn+'" href="#"></a>');var i=function(n){n=n||this.$menu.children("."+r.current);var a=t.find("."+r.next),i=n.find("."+this.conf.classNames[e].panelNext),s=i.attr("href"),c=i.html();a[s?"attr":"removeAttr"]("href",s),a[s||c?"removeClass":"addClass"](r.hidden),a.html(c)};this.bind("openPanel",i),this.bind("init",function(){i.call(this)})}}(jQuery),/* 6725 * jQuery mmenu navbar addon prev content 6726 * mmenu.frebsite.nl 6727 * 6728 * Copyright (c) Fred Heusschen 6729 */ 6730function(n){var a="mmenu",e="navbars",t="prev";n[a].addons[e][t]=function(t){var r=n[a]._c;t.append('<a class="'+r.prev+" "+r.btn+'" href="#"></a>'),this.bind("init",function(n){n.removeClass(r.hasnavbar)});var i=function(){var n=this.$menu.children("."+r.current),a=t.find("."+r.prev),i=n.find("."+this.conf.classNames[e].panelPrev);i.length||(i=n.children("."+r.navbar).children("."+r.prev));var s=i.attr("href"),c=i.html();a[s?"attr":"removeAttr"]("href",s),a[s||c?"removeClass":"addClass"](r.hidden),a.html(c)};this.bind("openPanel",i),this.bind("init",i)}}(jQuery),/* 6731 * jQuery mmenu navbar addon searchfield content 6732 * mmenu.frebsite.nl 6733 * 6734 * Copyright (c) Fred Heusschen 6735 */ 6736function(n){var a="mmenu",e="navbars",t="searchfield";n[a].addons[e][t]=function(e){var t=n[a]._c,r=n('<div class="'+t.search+'" />').appendTo(e);"object"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=r}}(jQuery),/* 6737 * jQuery mmenu navbar addon title content 6738 * mmenu.frebsite.nl 6739 * 6740 * Copyright (c) Fred Heusschen 6741 */ 6742function(n){var a="mmenu",e="navbars",t="title";n[a].addons[e][t]=function(t,r){var i=n[a]._c;t.append('<a class="'+i.title+'"></a>');var s=function(n){n=n||this.$menu.children("."+i.current);var a=t.find("."+i.title),s=n.find("."+this.conf.classNames[e].panelTitle);s.length||(s=n.children("."+i.navbar).children("."+i.title));var c=s.attr("href"),d=s.html()||r.title;a[c?"attr":"removeAttr"]("href",c),a[c||d?"removeClass":"addClass"](i.hidden),a.html(d)};
6742this.bind("openPanel",s),this.bind("init",function(){s.call(this)})}}(jQuery); 6743/* 6744 * jQuery mmenu searchfield addon 6745 * mmenu.frebsite.nl 6746 * 6747 * Copyright (c) Fred Heusschen 6748 */ 6749!function(e){function s(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var n="mmenu",a="searchfield";e[n].addons[a]={setup:function(){var o=this,d=this.opts[a],c=this.conf[a];r=e[n].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),d=this.opts[a]=e.extend(!0,{},e[n].defaults[a],d),this.bind("close",function(){this.$menu.find("."+t.search).find("input").blur()}),this.bind("init",function(n){if(d.add){switch(d.addTo){case"panels":var a=n;break;default:var a=e(d.addTo,this.$menu)}a.each(function(){var s=e(this);if(!s.is("."+t.panel)||!s.is("."+t.vertical)){if(!s.children("."+t.search).length){var n=c.form?"form":"div",a=e("<"+n+' class="'+t.search+'" />');if(c.form&&"object"==typeof c.form)for(var l in c.form)a.attr(l,c.form[l]);a.append('<input placeholder="'+d.placeholder+'" type="text" autocomplete="off" />'),s.hasClass(t.search)?s.replaceWith(a):s.prepend(a).addClass(t.hassearch)}if(d.noResults){var i=s.closest("."+t.panel).length;if(i||(s=o.$menu.children("."+t.panel).first()),!s.children("."+t.noresultsmsg).length){var r=s.children("."+t.listview).first();e('<div class="'+t.noresultsmsg+'" />').append(d.noResults)[r.length?"insertAfter":"prependTo"](r.length?r:s)}}}}),d.search&&e("."+t.search,this.$menu).each(function(){var n=e(this),a=n.closest("."+t.panel).length;if(a)var r=n.closest("."+t.panel),c=r;else var r=e("."+t.panel,o.$menu),c=o.$menu;var h=n.children("input"),u=o.__findAddBack(r,"."+t.listview).children("li"),f=u.filter("."+t.divider),p=o.__filterListItems(u),v="> a",m=v+", > span",b=function(){var s=h.val().toLowerCase();r.scrollTop(0),p.add(f).addClass(t.hidden).find("."+t.fullsubopensearch).removeClass(t.fullsubopen).removeClass(t.fullsubopensearch),p.each(function(){var n=e(this),a=v;(d.showTextItems||d.showSubPanels&&n.find("."+t.next))&&(a=m),e(a,n).text().toLowerCase().indexOf(s)>-1&&n.add(n.prevAll("."+t.divider).first()).removeClass(t.hidden)}),d.showSubPanels&&r.each(function(){var s=e(this);o.__filterListItems(s.find("."+t.listview).children()).each(function(){var s=e(this),n=s.data(l.sub);s.removeClass(t.nosubresults),n&&n.find("."+t.listview).children().removeClass(t.hidden)})}),e(r.get().reverse()).each(function(s){var n=e(this),i=n.data(l.parent);i&&(o.__filterListItems(n.find("."+t.listview).children()).length?(i.hasClass(t.hidden)&&i.children("."+t.next).not("."+t.fullsubopen).addClass(t.fullsubopen).addClass(t.fullsubopensearch),i.removeClass(t.hidden).removeClass(t.nosubresults).prevAll("."+t.divider).first().removeClass(t.hidden)):a||(n.hasClass(t.opened)&&setTimeout(function(){o.openPanel(i.closest("."+t.panel))},1.5*(s+1)*o.conf.openingInterval),i.addClass(t.nosubresults)))}),c[p.not("."+t.hidden).length?"removeClass":"addClass"](t.noresults),this.update()};h.off(i.keyup+"-searchfield "+i.change+"-searchfield").on(i.keyup+"-searchfield",function(e){s(e.keyCode)||b.call(o)}).on(i.change+"-searchfield",function(){b.call(o)})})}})},add:function(){t=e[n]._c,l=e[n]._d,i=e[n]._e,t.add("search hassearch noresultsmsg noresults nosubresults fullsubopensearch"),i.add("change keyup")},clickAnchor:function(){}},e[n].defaults[a]={add:!1,addTo:"panels",search:!0,placeholder:"Search",noResults:"No results found.",showTextItems:!1,showSubPanels:!0},e[n].configuration[a]={form:!1};var t,l,i,r}(jQuery); 6750/* 6751 * jQuery mmenu sectionIndexer addon 6752 * mmenu.frebsite.nl 6753 * 6754 * Copyright (c) Fred Heusschen 6755 */ 6756!function(e){var a="mmenu",r="sectionIndexer";e[a].addons[r]={setup:function(){var i=this,d=this.opts[r];this.conf[r],s=e[a].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),d=this.opts[r]=e.extend(!0,{},e[a].defaults[r],d),this.bind("init",function(a){if(d.add){switch(d.addTo){case"panels":var r=a;break;default:var r=e(d.addTo,this.$menu).filter("."+n.panel)}r.find("."+n.divider).closest("."+n.panel).addClass(n.hasindexer)}if(!this.$indexer&&this.$menu.children("."+n.hasindexer).length){this.$indexer=e('<div class="'+n.indexer+'" />').prependTo(this.$menu).append('<a href="#a">a</a><a href="#b">b</a><a href="#c">c</a><a href="#d">d</a><a href="#e">e</a><a href="#f">f</a><a href="#g">g</a><a href="#h">h</a><a href="#i">i</a><a href="#j">j</a><a href="#k">k</a><a href="#l">l</a><a href="#m">m</a><a href="#n">n</a><a href="#o">o</a><a href="#p">p</a><a href="#q">q</a><a href="#r">r</a><a href="#s">s</a><a href="#t">t</a><a href="#u">u</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a><a href="#y">y</a><a href="#z">z</a>'),this.$indexer.children().on(t.mouseover+"-sectionindexer "+n.touchstart+"-sectionindexer",function(){var a=e(this).attr("href").slice(1),r=i.$menu.children("."+n.current),t=r.find("."+n.listview),s=!1,d=r.scrollTop(),h=t.position().top+parseInt(t.css("margin-top"),10)+parseInt(t.css("padding-top"),10)+d;r.scrollTop(0),t.children("."+n.divider).not("."+n.hidden).each(function(){s===!1&&a==e(this).text().slice(0,1).toLowerCase()&&(s=e(this).position().top+h)}),r.scrollTop(s!==!1?s:d)});var s=function(e){i.$menu[(e.hasClass(n.hasindexer)?"add":"remove")+"Class"](n.hasindexer)};this.bind("openPanel",s),s.call(this,this.$menu.children("."+n.current))}})},add:function(){n=e[a]._c,i=e[a]._d,t=e[a]._e,n.add("indexer hasindexer"),t.add("mouseover touchstart")},clickAnchor:function(e){return e.parent().is("."+n.indexer)?!0:void 0}},e[a].defaults[r]={add:!1,addTo:"panels"};var n,i,t,s}(jQuery); 6757/* 6758 * jQuery mmenu toggles addon 6759 * mmenu.frebsite.nl 6760 * 6761 * Copyright (c) Fred Heusschen 6762 */ 6763!function(t){var e="mmenu",c="toggles";t[e].addons[c]={setup:function(){var n=this;this.opts[c],this.conf[c],l=t[e].glbl,this.bind("init",function(e){this.__refactorClass(t("input",e),this.conf.classNames[c].toggle,"toggle"),this.__refactorClass(t("input",e),this.conf.classNames[c].check,"check"),t("input."+s.toggle+", input."+s.check,e).each(function(){var e=t(this),c=e.closest("li"),i=e.hasClass(s.toggle)?"toggle":"check",l=e.attr("id")||n.__getUniqueId();c.children('label[for="'+l+'"]').length||(e.attr("id",l),c.prepend(e),t('<label for="'+l+'" class="'+s[i]+'"></label>').insertBefore(c.children("a, span").last()))})})},add:function(){s=t[e]._c,n=t[e]._d,i=t[e]._e,s.add("toggle check")},clickAnchor:function(){}},t[e].configuration.classNames[c]={toggle:"Toggle",check:"Check"};var s,n,i,l}(jQuery); 6764/*! Magnific Popup - v1.0.0 - 2015-01-03
6765* http://dimsemenov.com/plugins/magnific-popup/ 6766* Copyright (c) 2015 Dmitry Semenov; */ 6767!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",b.ev=c.mainEl&&c.mainEl.length?c.mainEl.eq(0):d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}:{top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)}
6767,updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),b.currTemplate[d]=f?a(f):!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"schliessen (Esc)",tLoading:"Lade Inhalte..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1
6767));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;
6767var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});
6767var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"zurück (linke Pfeil-Taste)",tNext:"weiter (rechte Pfeil-Taste)",tCounter:"%curr% von %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}); 6768/*! 6769 * Bootstrap v3.3.5 (http://getbootstrap.com) 6770 * Copyright 2011-2015 Twitter, Inc. 6771 * Licensed under the MIT license 6772 */ 6773if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;
vendor: 4,072 bytes, line 6773
6773e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")}
vendor: 5,584 bytes, line 6773
6773,c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","fal
6773se"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.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(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.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(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("key
6773down.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5
vendor: 7,432 bytes, line 6773
6773",c.TRANSITION_DURATION=150,c.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}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.t
vendor: 9,257 bytes, lines 6773-6774
6773ype+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")), 6774d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
6774 6775document.addEventListener("DOMContentLoaded", function () { 6776 const elements = document.querySelectorAll(".slide-in-left, .slide-in-right, .fade-in-up"); 6777 6778 const observer = new IntersectionObserver((entries) => { 6779 entries.forEach(entry => { 6780 console.log(entry.target, entry.intersectionRatio, entry.boundingClientRect); 6781 if (entry.isIntersecting) { 6782 entry.target.classList.add("show"); 6783 } 6784 }); 6785 }, { threshold: 0.2 }); 6786 6787 elements.forEach(el => observer.observe(el)); 6788}); 6789 6790//detectRemoteDesktop(); 6791 6792 6793function addRipples() { 6794 console.log('add ripples'); 6795 const targets = document.querySelectorAll(".imageTextBgColorBox-wrap.color1, .header-teaser-image"); 6796 if (targets.length === 0) return; 6797 6798 const observerRipples = new IntersectionObserver( 6799 (entries) => { 6800 entries.forEach((entry) => { 6801 if (entry.isIntersecting) { 6802 console.log('add ripple entry?!'); 6803 $(entry.target).ripples({ 6804 resolution: 256, 6805 dropRadius: 10, 6806 perturbance: 0.02 6807 }); 6808 } else { 6809 $(entry.target).ripples("destroy"); 6810 } 6811 }); 6812 }, 6813 { threshold: 0.5 } 6814 ); 6815 6816 targets.forEach(el => observerRipples.observe(el)); 6817} 6818 6819function detectRemoteDesktop() { 6820 console.log("Check for Citrix/RDP..."); 6821 let isRDP = false; 6822 6823 // FPS-Test 6824 function checkFPS(threshold = 60, duration = 1000, callback) { 6825 let frames = 0; 6826 let start = performance.now(); 6827 6828 function measureFPS() { 6829 frames++; 6830 if (performance.now() - start < duration) { 6831 requestAnimationFrame(measureFPS); 6832 } else { 6833 let fps = frames / (duration / 1000); 6834 console.log("FPS:", fps); 6835 if (fps < threshold) { 6836 console.log("Niedrige FPS â Möglicherweise RDP/Citrix"); 6837 isRDP = true; 6838 } 6839 callback(); 6840 } 6841 } 6842 requestAnimationFrame(measureFPS); 6843 } 6844 6845 // WebGL-Renderer prüfen 6846 function detectWebGLRenderer() { 6847 try { 6848 const canvas = document.createElement("canvas"); 6849 const gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl"); 6850 if (!gl) return true; // Kein WebGL â verdächtig 6851 6852 const debugInfo = gl.getExtension("WEBGL_debug_renderer_info"); 6853 if (!debugInfo) return false; 6854 6855 const renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); 6856 console.log("WebGL Renderer:", renderer); 6857 6858 if ( 6859 renderer.toLowerCase().includes("llvmpipe") || 6860 renderer.toLowerCase().includes("mesa") || 6861 renderer.toLowerCase().includes("microsoft") || 6862 renderer.toLowerCase().includes("basic render") 6863 ) { 6864 console.log("Verdächtiger WebGL-Renderer â Möglicherweise RDP/Citrix"); 6865 return true; 6866 } 6867 } catch (e) { 6868 console.log("WebGL-Check fehlgeschlagen"); 6869 return true; // Vorsichtshalber verdächtig 6870 } 6871 return false; 6872 } 6873 6874 // Input-Lag prüfen 6875 function measureInputLag(callback) { 6876 let start = Date.now(); 6877 setTimeout(() => { 6878 let lag = Date.now() - start; 6879 console.log("Input lag:", lag); 6880 if (lag > 200) { 6881 console.log("Hoher Input-Lag â Möglicherweise RDP/Citrix"); 6882 isRDP = true; 6883 } 6884 callback(); 6885 }, 100); 6886 } 6887 6888 // User-Agent 6889 let ua = navigator.userAgent.toLowerCase(); 6890 console.log("User-Agent:", ua); 6891 if (ua.includes("citrix") || ua.includes("rdp") || ua.includes("remote")) { 6892 console.log("User-Agent Hinweis â Möglicherweise RDP/Citrix"); 6893 isRDP = true; 6894 } 6895 6896 // CPU-Kerne 6897 if (navigator.hardwareConcurrency && navigator.hardwareConcurrency <= 2) { 6898 console.log("Wenige CPU-Kerne â Möglicherweise RDP/Citrix"); 6899 isRDP = true; 6900 } 6901 6902 // Farbtiefe 6903 if (screen.colorDepth < 24) { 6904 console.log("Niedrige Farbtiefe â Möglicherweise RDP/Citrix"); 6905 isRDP = true; 6906 } 6907 6908 // Bildschirmverhältnis 6909 let screenRatio = window.screen.width / window.innerWidth; 6910 if (screenRatio < 0.9) { 6911 console.log("Screen-Ratio verdächtig â Möglicherweise RDP/Citrix"); 6912 isRDP = true; 6913 } 6914 6915 // GPU vorhanden? 6916 if (!navigator.gpu) { 6917 console.log("Kein GPU-Support â Möglicherweise RDP/Citrix"); 6918 isRDP = true; 6919 } 6920 6921 // WebGL-Renderer-Test 6922 if (detectWebGLRenderer()) { 6923 isRDP = true; 6924 } 6925 6926 // Reihenfolge: Input-Lag â FPS-Test â Entscheidung 6927 measureInputLag(() => { 6928 checkFPS(60, 1000, () => { 6929 if (isRDP) { 6930 console.log("â Citrix/RDP-Umgebung erkannt. Ripples deaktiviert."); 6931 } else { 6932 console.log("â Lokale Umgebung erkannt. Ripples aktiviert."); 6933 addRipples(); // Deine Animation 6934 } 6935 }); 6936 }); 6937} 6938 6939 6940jQuery(document).ready(function() { 6941 if (jQuery('.contentcube').length > 0) { 6942 jQuery('.contentcube').each(function() { 6943 let textHeight = 0; 6944 jQuery(this).find('.cube-item').each(function() { 6945 let height = jQuery(this).find('.cube-description').height(); 6946 6947 if (height > textHeight) { 6948 textHeight = height; 6949 } 6950 }) 6951 6952 jQuery(this).find('.cube-item').children('.cube-description').height(textHeight); 6953 }) 6954 } 6955}
6955); 6956 6957jQuery(window).on('resize orientationchange', function () { 6958 if (jQuery('.contentcube').length > 0) { 6959 jQuery('.contentcube').each(function() { 6960 let textHeight = 0; 6961 jQuery(this).find('.cube-item').each(function() { 6962 let height = jQuery(this).find('.cube-description').height(); 6963 6964 if (height > textHeight) { 6965 textHeight = height; 6966 } 6967 }) 6968 6969 jQuery(this).find('.cube-item').children('.cube-description').height(textHeight); 6970 }) 6971 } 6972}); 6973 6974jQuery(document).ready(function() { 6975 6976 var magnificClassGroupA = jQuery('.magnific-image').not('.cycle-sentinel .magnific-image'); 6977 var magnificClassGroupB = jQuery('.magnific-gallery').not('.cycle-sentinel .magnific-gallery'); 6978 var magnificClassGroupC = jQuery('.magnific-products').not('.cycle-sentinel .magnific-products'); 6979 var magnificClassGroupD = jQuery('.magnific-news').not('.cycle-sentinel .magnific-news'); 6980 6981 if(magnificClassGroupA.length > 0) { 6982 // enable magnific popup 6983 magnificClassGroupA.magnificPopup({ 6984 type : 'image', 6985 gallery : { 6986 enabled : true 6987 } 6988 }); 6989 } 6990 6991 if(magnificClassGroupB.length > 0) { 6992 // enable magnific popup 6993 magnificClassGroupB.magnificPopup({ 6994 type : 'image', 6995 gallery : { 6996 enabled : true 6997 } 6998 }); 6999 } 7000 7001 if(magnificClassGroupC.length > 0) { 7002 // enable magnific popup 7003 magnificClassGroupC.magnificPopup({ 7004 type : 'image', 7005 gallery : { 7006 enabled : true 7007 } 7008 }); 7009 } 7010 7011 if(magnificClassGroupD.length > 0) { 7012 // enable magnific popup 7013 magnificClassGroupD.magnificPopup({ 7014 type : 'image', 7015 gallery : { 7016 enabled : true 7017 } 7018 }); 7019 } 7020 7021}); 7022 7023jQuery(document).ajaxComplete(function() { 7024 7025 var magnificClassGroupA = jQuery('.magnific-image').not('.cycle-sentinel .magnific-image'); 7026 var magnificClassGroupB = jQuery('.magnific-gallery').not('.cycle-sentinel .magnific-gallery'); 7027 var magnificClassGroupC = jQuery('.magnific-products').not('.cycle-sentinel .magnific-products'); 7028 var magnificClassGroupD = jQuery('.magnific-news').not('.cycle-sentinel .magnific-news'); 7029 7030 if(magnificClassGroupA.length > 0) { 7031 // enable magnific popup 7032 magnificClassGroupA.magnificPopup({ 7033 type : 'image', 7034 gallery : { 7035 enabled : true 7036 } 7037 }); 7038 } 7039 7040 if(magnificClassGroupB.length > 0) { 7041 // enable magnific popup 7042 magnificClassGroupB.magnificPopup({ 7043 type : 'image', 7044 gallery : { 7045 enabled : true 7046 } 7047 }); 7048 } 7049 7050 if(magnificClassGroupC.length > 0) { 7051 // enable magnific popup 7052 magnificClassGroupC.magnificPopup({ 7053 type : 'image', 7054 gallery : { 7055 enabled : true 7056 } 7057 }); 7058 } 7059 7060 if(magnificClassGroupD.length > 0) { 7061 // enable magnific popup 7062 magnificClassGroupD.magnificPopup({ 7063 type : 'image', 7064 gallery : { 7065 enabled : true 7066 } 7067 }); 7068 } 7069 7070}); 7071LanguageSearchMenu = { 7072 7073 settings: { 7074 7075 selector: { 7076 languageMenuContainer : '.language-menu', 7077 searchFieldContainer : '.search-menu', 7078 searchButton : 'li.search > a', 7079 searchBox : '#ke_search_sword', 7080 languageButton : 'li.language > a', 7081 closeLanguageButton : '.language-menu a.close-button', 7082 closeSearchButton : '.search-menu a.close-button' 7083 }, 7084 7085 options: { 7086 slideSpeed : 500, 7087 slideEffect : 'easeInOutCubic', 7088 openClass : 'opened' 7089 } 7090 7091 }, 7092 7093 init: function(){ 7094 7095 var obj = this; 7096 7097 // Selectoren übergegben 7098 var languageMenuContainer = jQuery(obj.settings.selector.languageMenuContainer); 7099 var searchFieldContainer = jQuery(obj.settings.selector.searchFieldContainer); 7100 var searchBox = jQuery(obj.settings.selector.searchBox); 7101 var searchButton = obj.settings.selector.searchButton; 7102 var languageButton = obj.settings.selector.languageButton; 7103 var closeLanguageButton = obj.settings.selector.closeLanguageButton; 7104 var closeSearchButton = obj.settings.selector.closeSearchButton; 7105 7106 var openClass = obj.settings.options.openClass; 7107 var closeClass = obj.settings.options.closeClass; 7108 var slideSpeed = obj.settings.options.slideSpeed; 7109 var slideEffect = obj.settings.options.slideEffect; 7110 7111 var search_text_s = searchBox.val(); 7112 7113 // search input focus text 7114 searchBox.bind('focus', function () { 7115 if (jQuery(this).val() == search_text_s) { 7116 jQuery(this).val(""); 7117 } 7118 }).bind('blur', function () { 7119 if (jQuery(this).val() != search_text_s) { 7120 jQuery(this).val(search_text_s); 7121 } 7122 }); 7123 7124 if(jQuery(languageMenuContainer).length > 0) { 7125 7126 // Searchfield öffnen und schlieÃen 7127 jQuery(searchButton).bind('click', function(event) { 7128 event.preventDefault(); 7129 7130 //Prüfen ob das Language Menü angezeigt wird 7131 if(languageMenuContainer.hasClass(openClass)){ 7132 7133 languageMenuContainer.stop(true, true).animate({ 7134 height: "toggle" 7135 }, slideSpeed, slideEffect); 7136 languageMenuContainer.removeClass(openClass); 7137 }else{ 7138 7139 } 7140 7141 searchFieldContainer.stop(true, true).animate({ 7142 height: "toggle" 7143 }, slideSpeed, slideEffect); 7144 7145 if(jQuery('.search-menu'+ '.' + openClass).length > 0){ 7146 searchFieldContainer.removeClass(openClass); 7147 }else{ 7148 searchFieldContainer.addClass(openClass); 7149 } 7150 }); 7151 7152 // Close Button Seearchfield 7153 jQuery(closeSearchButton).bind('click', function(event) { 7154 event.preventDefault(); 7155 searchFieldContainer.stop(true, true).animate({ 7156 height: "toggle" 7157 }, slideSpeed, slideEffect); 7158 7159 searchFieldContainer.removeClass(openClass); 7160 }); 7161 7162 // LanguageMenu öffnen und schlieÃen 7163 jQuery(languageButton).bind('click', function(event) { 7164 event.preventDefault(); 7165 7166 //Prüfen ob die Searchbox angezeigt wird 7167 if(searchFieldContainer.hasClass(openClass)){ 7168 searchFieldContainer.stop(true, true).animate({ 7169 height: "toggle" 7170 }, slideSpeed, slideEffect); 7171 searchFieldContainer.removeClass(openClass); 7172 }else{ 7173 } 7174 7175 languageMenuContainer.stop(true, true).animate({ 7176 height: "toggle" 7177 }, slideSpeed, slideEffect); 7178 7179 if(jQuery('.language-menu' + '.' + openClass).length > 0){ 7180 languageMenuContainer.removeClass(openClass); 7181 }else{ 7182 languageMenuContainer.addClass(openClass); 7183 } 7184 }); 7185 7186 // Close Button Language Menu 7187 jQuery(closeLanguageButton).bind('click', function(event) { 7188 event.preventDefault(); 7189 7190 languageMenuContainer.stop(true, true).animate({ 7191 height: "toggle" 7192 }, slideSpeed, slideEffect); 7193 7194 languageMenuContainer.removeClass(openClass); 7195 }); 7196
7197 // menues schliessen bei window resize 7198 var windowWidth = jQuery(window).width(); 7199 7200 jQuery(window).resize(function() { 7201 7202 // windowWidth gegen prüfen, behebt iOS Bug: Srolling triggert Resize 7203 if (jQuery(window).width() != windowWidth) { 7204 7205 windowWidth = jQuery(window).width(); 7206 7207 if(searchFieldContainer.hasClass(openClass)) { 7208 jQuery(closeSearchButton).click(); 7209 } 7210 7211 if(languageMenuContainer.hasClass(openClass)) { 7212 jQuery(closeLanguageButton).click(); 7213 } 7214 } 7215 }); 7216 } 7217 }, 7218 7219 lastProperti: ':-)' 7220}; 7221 7222jQuery(document).ready(function() { 7223 7224 LanguageSearchMenu.init(); 7225 7226}); 7227MobileNavigation = { 7228 settings: { 7229 selector: { 7230 mobileContainer : '#mmenu', 7231 desktopContainer : '.xxl-menu-main-inner', 7232 specialLayer : '.special-layer', 7233 secondLayer : '.second-layer', 7234 thirdLayer : '.third-layer', 7235 backClass : '.mm-navbar a.mm-prev', 7236 closeClass : '.mm-navbar a.mm-close', 7237 firstLayerClass : 'first-layer', 7238 navlistClass : 'navlist' 7239 }, 7240 labels: { 7241 backButtonText : 'Zurück', 7242 navButtonText : 'Navigation' 7243 }, 7244 api: { 7245 mmenu : '' 7246 }, 7247 options: { 7248 maxMobileWidth : 992 7249 } 7250 }, 7251 7252 init: function(){ 7253 7254 var obj = this; 7255 var mobileContainer = jQuery(obj.settings.selector.mobileContainer); 7256 7257 if(mobileContainer.length > 0) { 7258 7259 obj.cascadingClasses(); 7260 obj.cloneFromDesktop(); 7261 obj.prepareDOM(); 7262 obj.initMmenu(); 7263 obj.customizeMmenu(); 7264 obj.resizeController(); 7265 7266 } 7267 7268 }, 7269 7270 cascadingClasses: function(){ 7271 7272 var obj = this; 7273 var desktopContainer = obj.settings.selector.desktopContainer; 7274 var secondLayer = obj.settings.selector.secondLayer; 7275 var thirdLayer = obj.settings.selector.thirdLayer; 7276 7277 jQuery(desktopContainer + ' ' + secondLayer).each(function() { 7278 //console.log(jQuery(this).parent().attr('rel')); 7279 var parentsRel = jQuery(this).parent().attr('rel'); 7280 jQuery(this).attr('rel', parentsRel).addClass(parentsRel); 7281 }); 7282 7283 jQuery(desktopContainer + ' ' + thirdLayer).each(function() { 7284 //console.log(jQuery(this).parent().parent().attr('rel')); 7285 var parentsRel = jQuery(this).parent().parent().attr('rel'); 7286 jQuery(this).attr('rel', parentsRel).addClass(parentsRel); 7287 }); 7288 7289 jQuery(desktopContainer).find('*').removeAttr('rel'); 7290 7291 }, 7292 7293 cloneFromDesktop: function(){ 7294 7295 var obj = this; 7296 var desktopContainer = obj.settings.selector.desktopContainer; 7297 var mobileContainer = obj.settings.selector.mobileContainer; 7298 7299 jQuery(desktopContainer + ' > ul').clone().prependTo(mobileContainer); 7300 7301 }, 7302 7303 prepareDOM: function(){ 7304 7305 var obj = this; 7306 var mobileContainer = obj.settings.selector.mobileContainer; 7307 var specialLayer = obj.settings.selector.specialLayer; 7308 var secondLayer = obj.settings.selector.secondLayer; 7309 var thirdLayer = obj.settings.selector.thirdLayer; 7310 var firstLayerClass = obj.settings.selector.firstLayerClass; 7311 var navlistClass = obj.settings.selector.navlistClass; 7312 7313 jQuery(mobileContainer + ' .' + firstLayerClass + ' > li').unwrap(); 7314 jQuery(mobileContainer + ' ' + specialLayer + ' > li').unwrap(); 7315 jQuery(mobileContainer + ' > li').wrapAll('<ul class="' + navlistClass + ' ' + firstLayerClass + '"></ul>'); 7316 7317 jQuery(mobileContainer + ' ' + secondLayer).each(function() { 7318 jQuery(this).changeElType('div'); 7319 }); 7320 jQuery(mobileContainer + ' ' + secondLayer + ' > li').each(function() { 7321 jQuery(this).changeElType('div'); 7322 }); 7323 jQuery(mobileContainer + ' ' + thirdLayer).each(function() { 7324 jQuery(this).changeElType('div'); 7325 }); 7326 jQuery(mobileContainer + ' ' + thirdLayer + ' > li').each(function() { 7327 jQuery(this).changeElType('div'); 7328 }); 7329 7330 }, 7331 7332 initMmenu: function(){ 7333 7334 var obj = this; 7335 var mobileContainer = obj.settings.selector.mobileContainer; 7336 7337 jQuery(mobileContainer).mmenu({ 7338 // options 7339 isMenu: true, 7340 selectedClass: "active", 7341 slidingSubmenus: true, 7342 onClick: { 7343 close: true 7344 }, 7345 extensions: [ "fullscreen", "border-full"], 7346 navbars : [{ 7347 position : "top", 7348 content : [ "close", "prev" ] 7349 }] 7350 }); 7351 7352 obj.settings.api.mmenu = jQuery(mobileContainer).data("mmenu"); 7353 7354 }, 7355 7356 customizeMmenu: function(){ 7357 7358 var obj = this; 7359 var mobileContainer = obj.settings.selector.mobileContainer; 7360 var backClass = obj.settings.selector.backClass; 7361 var closeClass = obj.settings.selector.closeClass; 7362 var api = obj.settings.api.mmenu; 7363 7364 var backButtonText = obj.settings.labels.backButtonText; 7365 var navButtonText = obj.settings.labels.navButtonText; 7366 7367 jQuery(backClass).text(backButtonText); 7368 jQuery(closeClass).text(navButtonText); 7369 7370 jQuery(closeClass).click(function() { 7371 //obj.settings.api.mmenu.closeAllPanels(); 7372 obj.settings.api.mmenu.close(); 7373 return false;
7374 }); 7375 7376 if(jQuery('body').outerWidth() >= 992) { 7377 //obj.settings.api.mmenu.closeAllPanels(); 7378 obj.settings.api.mmenu.close(); 7379 } 7380 7381 jQuery(window).resize(function() { 7382 7383 if(jQuery('body').outerWidth() >= 992) { 7384 //obj.settings.api.mmenu.closeAllPanels(); 7385 obj.settings.api.mmenu.close(); 7386 } 7387 7388 }); 7389 7390 }, 7391 7392 resizeController: function(){ 7393 7394 var obj = this; 7395 var api = obj.settings.api.mmenu; 7396 var maxMobileWidth = obj.settings.options.maxMobileWidth; 7397 7398 if(jQuery('body').outerWidth() >= maxMobileWidth) { 7399 //obj.settings.api.mmenu.closeAllPanels(); 7400 obj.settings.api.mmenu.close(); 7401 } 7402 7403 jQuery(window).resize(function() { 7404 7405 if(jQuery('body').outerWidth() >= maxMobileWidth) { 7406 //obj.settings.api.mmenu.closeAllPanels(); 7407 obj.settings.api.mmenu.close(); 7408 } 7409 7410 }); 7411 7412 }, 7413 7414 lastProperti: ':-)' 7415}; 7416 7417jQuery(document).ready(function() { 7418 7419 MobileNavigation.init(); 7420 7421}); 7422 7423DesktopNavigation = { 7424 7425 settings: { 7426 7427 selector: { 7428 naviWrap : '.xxl-menu', 7429 accordionWrap : '.xxl-menu-accordion', 7430 firstLayerWrap : '.xxl-menu-main-inner', 7431 liWithSubpages : '.xxl-menu-main-inner > ul.first-layer > li.open', 7432 liWithoutSubpages : '.xxl-menu-main-inner > ul.first-layer > li:not(.open)', 7433 specialNaviWrap : '.xxl-menu-main-inner > ul.special-layer', 7434 subpagesContainer : '.xxl-menu-subpages-inner', 7435 specialMenuContainerClass : 'special-menu-wrap', 7436 jsDisabledClass : 'js-disabled', 7437 jsEnabledClass : 'js-enabled', 7438 preHoveredClass : 'pre-hovered', 7439 touchHoveredClass : 'touch-hovered', 7440 subpagesWrapClass : 'xxl-menu-subpages-wrap' 7441 }, 7442 7443 options: { 7444 fadeSpeed : '', 7445 slideSpeed : '', 7446 openWaitingTime : 400, 7447 hoverWaitingTime : 400, // shold be the same as "openWaitingTime" 7448 closeWaitingTime : 500, 7449 firstLoadDelay : 100, 7450 firstLoad : true 7451 } 7452 7453 }, 7454 7455 init: function(){ 7456 7457 var obj = this; 7458 var firstLayerWrap = jQuery(obj.settings.selector.firstLayerWrap); 7459 var jsDisabledClass = obj.settings.selector.jsDisabledClass; 7460 7461 // do this only, if we find the wrapper class 7462 if(firstLayerWrap.hasClass(jsDisabledClass)) { 7463 7464 obj.firstLoadDelay(); 7465 obj.prepareDOM(); 7466 obj.hoverController(); 7467 obj.touchBypass(); 7468 7469 } 7470 7471 }, 7472 7473 firstLoadDelay: function() { 7474 7475 var obj = this; 7476 var firstLoadDelay = obj.settings.options.firstLoadDelay; 7477 7478 //console.log(obj.settings.options.firstLoad); 7479 7480 jQuery(document).bind({ 7481 7482 mousemove : function() { 7483 7484 if(obj.settings.options.firstLoad == true) { 7485 7486 setTimeout(function() { 7487 7488 obj.settings.options.firstLoad = false; 7489 jQuery(document).unbind('mouseenter'); 7490 7491 //console.log(obj.settings.options.firstLoad); 7492 7493 }, firstLoadDelay); 7494 7495 } 7496 7497 } 7498 7499 }); 7500 7501 }, 7502 7503 prepareDOM: function() { 7504 7505 // set some variables 7506 var obj = this; 7507 var firstLayerWrap = jQuery(obj.settings.selector.firstLayerWrap); 7508 var liWithSubpages = jQuery(obj.settings.selector.liWithSubpages); 7509 var accordionWrap = jQuery(obj.settings.selector.accordionWrap); 7510 var subpagesContainer = obj.settings.selector.subpagesContainer; 7511 var specialNaviWrap = obj.settings.selector.specialNaviWrap; 7512 var specialMenuContainerClass = obj.settings.selector.specialMenuContainerClass; 7513 var jsDisabledClass = obj.settings.selector.jsDisabledClass; 7514 var jsEnabledClass = obj.settings.selector.jsEnabledClass; 7515 var subpagesWrapClass = obj.settings.selector.subpagesWrapClass; 7516 7517 // disable JS fallback 7518 accordionWrap.css('visibility','visible'); 7519 7520 // init the js supported navigation by changing the wrapper class 7521 firstLayerWrap.removeClass(jsDisabledClass).addClass(jsEnabledClass); 7522 7523 // add a rel="ID" attribut to each first layer listitem and its child ul 7524 liWithSubpages.each(function(id) { 7525 jQuery(this).attr("rel", id); 7526 jQuery(this).children('ul').wrap('<div class="' + subpagesWrapClass + '"><div class="' + subpagesWrapClass + '-inner"></div></div>'); 7527 jQuery(this).children().attr("rel", id); 7528 }); 7529 7530 // move subpages to the right place 7531 liWithSubpages.children('div[rel]').appendTo(subpagesContainer); 7532 7533 // copy special navigation to each submenu 7534 jQuery('.' + subpagesWrapClass + '-inner > ul').each(function() { 7535 jQuery(this).append('<li class="' + specialMenuContainerClass + ' listitem"></li>'); 7536 }); 7537 7538 jQuery('.' + specialMenuContainerClass).each(function() { 7539 jQuery(this).append(jQuery(specialNaviWrap).clone()); 7540 }); 7541 7542 jQuery(specialNaviWrap).remove(); 7543 7544 // hide Subpages for first load 7545 jQuery(subpagesContainer + ' > div').hide();
7546 accordionWrap.css('overflow','hidden').stop(true, true).slideUp(0); 7547 7548 }, 7549 7550 hoverController: function() { 7551 7552 // set some variables 7553 var obj = this; 7554 var firstLayerWrap = obj.settings.selector.firstLayerWrap; 7555 var accordionWrap = jQuery(obj.settings.selector.accordionWrap); 7556 var liWithSubpages = obj.settings.selector.liWithSubpages; 7557 var liWithoutSubpages = obj.settings.selector.liWithoutSubpages; 7558 var preHoveredClass = obj.settings.selector.preHoveredClass; 7559 var subpagesContainer = obj.settings.selector.subpagesContainer; 7560 var fadeSpeed = obj.settings.options.fadeSpeed; 7561 var slideSpeed = obj.settings.options.slideSpeed; 7562 var openWaitingTime = obj.settings.options.openWaitingTime; 7563 var hoverWaitingTime = obj.settings.options.hoverWaitingTime; 7564 var closeWaitingTime = obj.settings.options.closeWaitingTime; 7565 var subpagesList = subpagesContainer + ' > div[rel] > div > ul'; 7566 7567 var openDelayTime = 0; 7568 var hoverDelayTime = 0; 7569 var closeDelayTime = 0; 7570 var switchDelayTime = 0; 7571 7572 // close the navi accordion when we leave the first layer ul 7573 jQuery(firstLayerWrap + ' > ul').bind({ 7574 7575 mouseleave : function() { 7576 7577 closeDelayTime = setTimeout(function() { 7578 7579 jQuery(subpagesContainer + ' > div[rel]').stop(true, true).fadeOut(fadeSpeed); 7580 7581 accordionWrap.stop(true, true).slideUp(slideSpeed); 7582 7583 jQuery(liWithSubpages + '[rel]').removeClass(preHoveredClass); 7584 7585 }, closeWaitingTime); 7586 7587 }, 7588 7589 mouseenter : function() { 7590 7591 clearTimeout(closeDelayTime); 7592 7593 } 7594 7595 }); 7596 7597 // close the navi accordion when we leave it with our mouse 7598 jQuery(accordionWrap).bind({ 7599 7600 mouseleave : function() { 7601 7602 closeDelayTime = setTimeout(function() { 7603 7604 jQuery(subpagesContainer + ' > div[rel]').stop(true, true).fadeOut(fadeSpeed); 7605 7606 accordionWrap.stop(true, true).slideUp(slideSpeed, function() { 7607 jQuery(liWithSubpages + '[rel]').removeClass(preHoveredClass); 7608 }); 7609 7610 }, closeWaitingTime); 7611 7612 }, 7613 7614 mouseenter : function() { 7615 7616 clearTimeout(closeDelayTime); 7617 7618 } 7619 7620 }); 7621 7622 // open navi accordion by hovering a link with subpages 7623 jQuery(liWithSubpages).bind({ 7624 7625 mouseenter : function() { 7626 7627 if(obj.settings.options.firstLoad == false) { 7628 var currentLiWithSubpages = jQuery(this); 7629 7630 switchDelayTime = setTimeout(function() { 7631 jQuery(subpagesContainer + ' > div[rel]').stop(true, true).hide(); 7632 jQuery(subpagesContainer + ' > div[rel="' + currentLiWithSubpages.attr('rel') + '"]').stop(true, true).show(); 7633 7634 jQuery(liWithSubpages + '[rel]').removeClass(preHoveredClass); 7635 }, 400); 7636 7637 if(accordionWrap.is(':visible')) { 7638 currentLiWithSubpages.addClass(preHoveredClass); 7639 } else { 7640 7641 hoverDelayTime = setTimeout(function() { 7642 currentLiWithSubpages.addClass(preHoveredClass); 7643 7644 }, hoverWaitingTime); 7645 7646 } 7647 7648 openDelayTime = setTimeout(function() { 7649 accordionWrap.stop(true, true).slideDown(slideSpeed); 7650 }, openWaitingTime); 7651 } 7652 7653 }, 7654 7655 mouseleave : function() { 7656 clearTimeout(switchDelayTime); 7657 clearTimeout(openDelayTime); 7658 clearTimeout(hoverDelayTime); 7659 7660 } 7661 7662 }); 7663 7664 // close navi accordion by hovering a link without subpages 7665 jQuery(liWithoutSubpages).bind({ 7666 7667 mouseenter : function() { 7668 7669 closeDelayTime = setTimeout(function() { 7670 7671 jQuery(subpagesContainer + ' > div[rel]').stop(true, true).fadeOut(fadeSpeed); 7672 7673 accordionWrap.stop(true, true).slideUp(slideSpeed, function() { 7674 jQuery(liWithSubpages + '[rel]').removeClass(preHoveredClass); 7675 }); 7676 7677 }, closeWaitingTime); 7678 7679 }, 7680 7681 mouseleave : function() { 7682 7683 clearTimeout(closeDelayTime); 7684 7685 } 7686 7687 }); 7688 7689 }, 7690 7691 isTouchDevice: function() { 7692 7693 return (window.ontouchstart !== undefined); 7694 7695 }, 7696 7697 touchBypass : function() { 7698 7699 // set some variables 7700 var obj = this; 7701 var liWithSubpages = obj.settings.selector.liWithSubpages; 7702 var touchHoveredClass = obj.settings.selector.touchHoveredClass; 7703 7704 if(obj.isTouchDevice) { 7705 jQuery(document).trigger('mousemove'); 7706 } 7707 7708 jQuery(liWithSubpages).on('touchstart', function(e) { 7709 7710 if(jQuery(this).hasClass(touchHoveredClass)) { 7711 7712 // follow the link, if parent already has the class "touchHoveredClass" 7713 jQuery(this).unbind('click').removeClass(touchHoveredClass).children('a').click(); 7714 7715 } else { 7716 7717 // if listitem has not the class "touchHoveredClass", add the class and block the link redirect 7718 jQuery(liWithSubpages).not(this).removeClass(touchHoveredClass); 7719 jQuery(this).click(function() { return false; }).addClass(touchHoveredClass).trigger('mouseenter'); 7720 7721 } 7722 7723 }); 7724 7725 }, 7726 7727 lastProperti: ':-)' 7728}; 7729 7730jQuery(document).ready(function() { 7731 7732 DesktopNavigation.init(); 7733}); 7734 7735SidebarNavigation = { 7736 7737 settings: { 7738 7739 selector: { 7740 container : '.sidebar-menu', 7741 trigger : '> p.sidebarlist-trigger', 7742 menu : '> ul.sidebarlist', 7743 }, 7744 7745 options: { 7746 slideSpeed : 'slow', 7747 openClass : 'opened', 7748 closeClass : 'closed', 7749 status : 'opened', 7750 maxWindowWidth : 976 7751 } 7752 7753 }, 7754 7755 init: function(){ 7756 7757 var obj = this; 7758 var container = obj.settings.selector.container; 7759 var trigger = obj.settings.selector.trigger; 7760 var menu = obj.settings.selector.menu; 7761 7762 if(jQuery(container).length > 0) { 7763 7764 obj.initMenuAccordeon(); 7765 7766 var windowWidth = jQuery(window).width(); 7767 7768 jQuery(window).resize(function() { 7769 7770 // windowWidth gegen prüfen, behebt iOS Bug: Srolling triggert Resize 7771 if (jQuery(window).width() != windowWidth) { 7772 7773 windowWidth = jQuery(window).width(); 7774 obj.initMenuAccordeon(); 7775 7776 } 7777 7778 }); 7779 7780 } 7781 7782 }, 7783 7784 initMenuAccordeon: function() { 7785 7786 var obj = this; 7787 var container = obj.settings.selector.container; 7788 var trigger = obj.settings.selector.trigger; 7789 var menu = obj.settings.selector.menu;
7790 var openClass = obj.settings.options.openClass; 7791 var closedClass = obj.settings.options.closedClass; 7792 var slideSpeed = obj.settings.options.slideSpeed; 7793 var maxWindowWidth = obj.settings.options.maxWindowWidth; 7794 7795 if(jQuery(window).width() <= maxWindowWidth) { 7796 7797 jQuery(container).each(function() { 7798 7799 var currentContainer = jQuery(this); 7800 var currentTrigger = currentContainer.find(trigger); 7801 var currentMenu = currentContainer.find(menu); 7802 7803 currentMenu.slideUp(0); 7804 obj.settings.options.status = closedClass; 7805 7806 currentTrigger.css('cursor','pointer').unbind('click').click(function() { 7807 7808 if(obj.settings.options.status == closedClass) { 7809 obj.settings.options.status = openClass; 7810 currentMenu.stop(true,true).slideDown(slideSpeed); 7811 currentContainer.addClass(openClass).removeClass(closedClass); 7812 } else { 7813 obj.settings.options.status = closedClass; 7814 currentMenu.stop(true,true).slideUp(slideSpeed); 7815 currentContainer.addClass(closedClass).removeClass(openClass); 7816 } 7817 7818 }); 7819 7820 }); 7821 7822 } else { 7823 7824 jQuery(container).find(menu).slideDown(0); 7825 jQuery(container).find(trigger).css('cursor','default').unbind('click'); 7826 obj.settings.options.status = closedClass; 7827 7828 } 7829 7830 }, 7831 7832 lastProperti: ':-)' 7833}; 7834 7835jQuery(document).ready(function() { 7836 7837 SidebarNavigation.init(); 7838 7839}); 7840 7841ResponsiveTable = { 7842 settings : { 7843 selector : { 7844 responsiveTable : 'table.contenttable', 7845 autoscrollContainer : 'autoscroll-table' 7846 } 7847 }, 7848 7849 init: function(){ 7850 7851 var obj = this; 7852 var responsiveTable = jQuery(obj.settings.selector.responsiveTable); 7853 7854 if(responsiveTable.length > 0) { 7855 7856 obj.prepareTable(); 7857 obj.firstCellFixing(); 7858 7859 var windowWidth = jQuery(window).width(); 7860 7861 jQuery(window).resize(function() { 7862 7863 // windowWidth gegen prüfen, behebt iOS Bug: Srolling triggert Resize 7864 if (jQuery(window).width() != windowWidth) { 7865 7866 windowWidth = jQuery(window).width(); 7867 obj.firstCellFixing(); 7868 7869 } 7870 7871 }); 7872 7873 } 7874 7875 }, 7876 7877 prepareTable: function(){ 7878 7879 var obj = this; 7880 var responsiveTable = jQuery(obj.settings.selector.responsiveTable); 7881 7882 responsiveTable.each(function() { 7883 7884 var currentTable = jQuery(this); 7885 7886 currentTable.tanResTables({ 7887 breakpoint: 768 7888 }); 7889 }); 7890 }, 7891 7892 firstCellFixing: function(){ 7893 7894 var obj = this; 7895 var responsiveTable = jQuery(obj.settings.selector.responsiveTable); 7896 var autoscrollContainer = obj.settings.selector.autoscrollContainer; 7897 7898 responsiveTable.each(function() { 7899 7900 var currentTable = jQuery(this); 7901 var currentColumns = currentTable.find('tr'); 7902 var currentCells = currentColumns.children(); 7903 var tableWidth = currentTable.outerWidth(); 7904 var tablesMarginTop = currentTable.css('margin-top'); 7905 var tablesMarginBottom = currentTable.css('margin-bottom'); 7906 var tablesMarginLeft = currentTable.css('margin-left'); 7907 var tablesMarginRight = currentTable.css('margin-right'); 7908 var tablesParent = currentTable.parent(); 7909 var tablesParentWidth = tablesParent.outerWidth(); 7910 7911 if (tablesParent.hasClass(autoscrollContainer + '-inner')) { 7912 currentTable.unwrap().unwrap().removeAttr('style'); 7913 currentCells.removeAttr('style'); 7914 } 7915 7916 if(tableWidth > tablesParentWidth) { 7917 currentTable.css({ 7918 7919 margin : 0 7920 7921 }).wrap('<div class="' + autoscrollContainer + '" />').wrap('<div class="' + autoscrollContainer + '-inner" />').parent().parent().css({ 7922 7923 marginTop : tablesMarginTop, 7924 marginBottom : tablesMarginBottom, 7925 marginLeft : tablesMarginLeft, 7926 marginRight : tablesMarginRight 7927 7928 }); 7929 7930 currentTable.each(function(index) { 7931 7932 var maxWidth = 0; 7933 var maxOuterWidth = 0; 7934 var currentColumns = jQuery(this).find('tr'); 7935 var currentFirstCell = currentColumns.children(':first-child'); 7936 var currentCell = currentColumns.children(); 7937 var tableWrapper = jQuery(this).parent().parent(); 7938 7939 currentFirstCell.each(function(index) { 7940 7941 if(jQuery(this).width() > maxWidth) { 7942 maxWidth = jQuery(this).width(); 7943 } 7944 7945 if(jQuery(this).outerWidth() > maxOuterWidth) { 7946 maxOuterWidth = jQuery(this).outerWidth(); 7947 } 7948 7949 }); 7950 7951 currentFirstCell.width(maxWidth); 7952 7953 tableWrapper.css({ 7954 paddingLeft : maxOuterWidth + 'px' 7955 }); 7956 7957 currentColumns.each(function() { 7958 var currentHeight = jQuery(this).height(); 7959 var currentNotFirstCell = jQuery(this).children(':not(:first-child)'); 7960 var currentFirstCell = jQuery(this).children(':first-child'); 7961 7962 currentFirstCell.outerHeight(currentHeight); 7963 }); 7964 7965 }); 7966 7967 } 7968 7969 }); 7970 }, 7971 7972 lastProperti: ':-)' 7973}; 7974 7975jQuery(document).ready(function() { 7976
7977 ResponsiveTable.init(); 7978 7979}); 7980 7981jQuery(document).ajaxComplete(function() { 7982 7983 ResponsiveTable.init(); 7984 7985}); 7986NormalizeItemHeight = { 7987 init : function(container, box, boxInner) { 7988 7989 var obj = this; 7990 7991 if (box.length > 0) { 7992 7993 obj.normalizeHeightPerRow(container, box, boxInner); 7994 7995 } 7996 7997 }, 7998 7999 normalizeHeightPerRow : function(container, box, boxInner) { 8000 8001 var obj = this; 8002 8003 jQuery(container).each(function() { 8004 8005 var numberPerRow = []; 8006 var offsets = []; 8007 8008 jQuery(boxInner, this).css('min-height', '2000px'); 8009 8010 jQuery(box).each(function() { 8011 8012 var thisOffset = jQuery(this).offset().top; 8013 //console.log(thisOffset); 8014 var index = jQuery.inArray(thisOffset, offsets); 8015 //console.log(index); 8016 if (index >= 0) { 8017 numberPerRow[index]++; 8018 //console.log(index); 8019 } else { 8020 offsets.push(thisOffset); 8021 numberPerRow.push(1); 8022 } 8023 }); 8024 8025 jQuery(boxInner, this).css('min-height', 0); 8026 8027 //var boxItem = jQuery(container + ' ' + box); 8028 //console.log(jQuery(container + ' ' + box).length); 8029 // fix: select only boxes in this container 8030 var boxItem = jQuery(box, this); 8031 8032 var k = 0; 8033 jQuery(numberPerRow).each(function(index, value) { 8034 maxcnt = k + value; 8035 8036 obj.equalboxHeights(boxItem, maxcnt, k, container, box, boxInner); 8037 8038 k = maxcnt; 8039 }); 8040 8041 }); 8042 8043 }, 8044 8045 equalboxHeights : function(boxItem, maxcnt, k, container, box, boxInner) { 8046 8047 var obj = this; 8048 8049 var boxsPerRow = []; 8050 for ( i = k; i < maxcnt; i++) { 8051 boxsPerRow.push(boxItem.eq(i)); 8052 } 8053 8054 var boxheight = 0; 8055 jQuery(boxsPerRow).each(function(index, obj) { 8056 if (obj.height() > boxheight) { 8057 boxheight = obj.height(); 8058 } 8059 }); 8060 8061 jQuery(boxsPerRow).each(function(index, obj) { 8062 //console.log(height); 8063 obj.find(boxInner).css({ 8064 'min-height' : boxheight + 2 8065 //'min-height' : boxheight 8066 }); 8067 //console.log(obj.height()); 8068 }); 8069 }, 8070 8071 lastProperti : ':-)' 8072}; 8073 8074jQuery(window).load(function() { 8075 /** 8076 * 1.container 8077 * 2.box 8078 * 3.boxInner 8079 **/ 8080 NormalizeItemHeight.init('.competenceTeaser-inner', '.wrap', '.wrap-inner'); 8081 NormalizeItemHeight.init('.news-container-inner', '.article', '.article-inner'); 8082}); 8083 8084jQuery(window).resize(function() { 8085 /** 8086 * 1.container 8087 * 2.box 8088 * 3.boxInner 8089 **/ 8090 NormalizeItemHeight.init('.competenceTeaser-inner', '.wrap', '.wrap-inner'); 8091 NormalizeItemHeight.init('.news-container-inner', '.article', '.article-inner'); 8092}); 8093LangswitchCookie = { 8094 settings : { 8095 url : window.location.search, 8096 debug : false 8097 }, 8098 cookie : { 8099 name : 'lang', 8100 value : { 8101 custom : 'custom', 8102 auto : 'auto' 8103 } 8104 }, 8105 8106 init: function(){ 8107 8108 var obj = this; 8109 var url = obj.settings.url; 8110 var debug = obj.settings.debug; 8111 var cookieName = obj.cookie.name; 8112 var cookieValueCustom = obj.cookie.value.custom; 8113 var cookieValueAuto = obj.cookie.value.auto; 8114 var cookieExists = jQuery.cookie(cookieName); 8115 8116 if(debug) { 8117 console.log('LangswitchCookie [DEBUG] URL query string is: "' + url + '"'); 8118 console.log('LangswitchCookie [DEBUG] Current cookie value is: "' + jQuery.cookie(cookieName) + '"'); 8119 } 8120 8121 if (url.toLowerCase().indexOf(cookieName + "=" + cookieValueCustom) >= 0) { 8122 8123 if(!jQuery.cookie(cookieName)) { 8124 8125 jQuery.cookie(cookieName, cookieValueCustom, {path: '/'}); 8126 8127 if(debug) { 8128 console.log('LangswitchCookie [DEBUG] Cookie created. New value is "' + jQuery.cookie(cookieName) + '"'); 8129 } 8130 8131 } else { 8132 8133 if(debug) { 8134 console.log('LangswitchCookie [DEBUG] Cookie "' + cookieValueCustom + '" not created because it already exist.'); 8135 } 8136 8137 } 8138 8139 8140 } else { 8141 8142 if(debug) { 8143 console.log('LangswitchCookie [DEBUG] URL does not contain string "' + cookieName + '=' + cookieValueCustom + '"'); 8144 } 8145 } 8146 8147 if (url.toLowerCase().indexOf(cookieName + "=" + cookieValueAuto) >= 0) { 8148 8149 if(jQuery.cookie(cookieName) == cookieValueCustom) { 8150 8151 jQuery.removeCookie(cookieName, {path: '/'}); 8152 8153 if(debug) {
8154 console.log('LangswitchCookie [DEBUG] Cookie deleted. New value is "' + jQuery.cookie(cookieName) + '"'); 8155 } 8156 8157 } else { 8158 8159 if(debug) { 8160 console.log('LangswitchCookie [DEBUG] Cookie "' + cookieValueCustom + '" not deleted because it does not exist.'); 8161 } 8162 } 8163 8164 } else { 8165 8166 if(debug) { 8167 console.log('LangswitchCookie [DEBUG] URL does not contain string "' + cookieName + '=' + cookieValueAuto + '"'); 8168 } 8169 } 8170 }, 8171 8172 lastProperti: ':-)' 8173}; 8174 8175jQuery(document).ready(function() { 8176 8177 LangswitchCookie.init(); 8178 8179}); 8180/** 8181 * START 8182 * http://stackoverflow.com/questions/30487078/picturefill-not-working-correctly-in-firefox-38-0-1 8183 * FF's first picture implementation is static and does not react to viewport changes, this tiny script fixes this. 8184 */ 8185(function (window) { 8186 /*jshint eqnull:true */ 8187 var ua = navigator.userAgent; 8188 8189 if (window.HTMLPictureElement && ((/ecko/).test(ua) && ua.match(/rv\:(\d+)/) && RegExp.$1 < 45)) { 8190 addEventListener("resize", (function () { 8191 var timer; 8192 8193 var dummySrc = document.createElement("source"); 8194 8195 var fixRespimg = function (img) { 8196 var source, sizes; 8197 var picture = img.parentNode; 8198 8199 if (picture.nodeName.toUpperCase() === "PICTURE") { 8200 source = dummySrc.cloneNode(); 8201 8202 picture.insertBefore(source, picture.firstElementChild); 8203 setTimeout(function () { 8204 picture.removeChild(source); 8205 }); 8206 } else if (!img._pfLastSize || img.offsetWidth > img._pfLastSize) { 8207 img._pfLastSize = img.offsetWidth; 8208 sizes = img.sizes; 8209 img.sizes += ",100vw"; 8210 setTimeout(function () { 8211 img.sizes = sizes; 8212 }); 8213 } 8214 }; 8215 8216 var findPictureImgs = function () { 8217 var i; 8218 var imgs = document.querySelectorAll("picture > img, img[srcset][sizes]"); 8219 for (i = 0; i < imgs.length; i++) { 8220 fixRespimg(imgs[i]); 8221 } 8222 }; 8223 var onResize = function () { 8224 clearTimeout(timer); 8225 timer = setTimeout(findPictureImgs, 99); 8226 }; 8227 var mq = window.matchMedia && matchMedia("(orientation: landscape)"); 8228 var init = function () { 8229 onResize(); 8230 8231 if (mq && mq.addListener) { 8232 mq.addListener(onResize); 8233 } 8234 }; 8235 8236 dummySrc.srcset = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; 8237 8238 if (/^[c|i]|d$/.test(document.readyState || "")) { 8239 init(); 8240 } else { 8241 document.addEventListener("DOMContentLoaded", init); 8242 } 8243 8244 return onResize; 8245 })()); 8246 } 8247})(window); 8248/** 8249 * ENDE 8250 * http://stackoverflow.com/questions/30487078/picturefill-not-working-correctly-in-firefox-38-0-1 8251 * FF's first picture implementation is static and does not react to viewport changes, this tiny script fixes this. 8252 */ 8253 8254function resizeTrigger() { 8255 if (document.createEvent) { // W3C 8256 var ev = document.createEvent('Event'); 8257 ev.initEvent('resize', true, true); 8258 window.dispatchEvent(ev); 8259 } 8260 else { // IE 8261 element = document.documentElement; 8262 var event = document.createEventObject(); 8263 element.fireEvent("onresize", event); 8264 } 8265} 8266 8267jQuery(document).ready(function () { 8268 8269 var lazyLoadSelector = '.csc-textpic img, img.img-responsive'; 8270 var lazyLoadClass = 'lazyload'; 8271 var jsDisabledClass = 'js-disabled'; 8272 var loadedClass = 'loaded'; 8273 var removeAtrributes = 'width height'; 8274 var cssDiplayFormat = 'block'; 8275 var lazyLoadConfig = { 8276 effect: 'fadeIn', 8277 skip_invisible: false, 8278 load: resizeTrigger 8279 }; 8280 8281 if (jQuery(lazyLoadSelector).length > 0) { 8282 8283 jQuery(lazyLoadSelector).removeClass(jsDisabledClass); 8284 8285 jQuery(lazyLoadSelector).each(function () { 8286 if (!jQuery(this).hasClass('.' + lazyLoadClass)) { 8287 jQuery(this).addClass(lazyLoadClass); 8288 } 8289 }); 8290 8291 jQuery('.' + lazyLoadClass).each(function () { 8292 if (!jQuery(this).attr('data-original')) { 8293 jQuery(this).attr('data-original', jQuery(this).attr('src')).removeAttr('src'); 8294 } 8295 }); 8296 8297 // disable lazyload for images in accordeons 8298 jQuery('.panel-body').find('.' + lazyLoadClass).removeClass(lazyLoadClass); 8299 8300 jQuery('.' + lazyLoadClass).css('display', cssDiplayFormat).removeAttr(removeAtrributes).lazyload(lazyLoadConfig); 8301 8302 jQuery('.panel').on('shown.bs.collapse', function (e) { 8303 if (!jQuery(this).hasClass(loadedClass)) { 8304 jQuery(this).find('.' + lazyLoadClass).css('display', cssDiplayFormat).removeAttr(removeAtrributes).lazyload(lazyLoadConfig); 8305 jQuery(this).addClass(loadedClass); 8306 } 8307 }); 8308 8309 jQuery('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { 8310 var target = jQuery(e.target).prop('hash'); 8311 if (!jQuery(e.target).hasClass(loadedClass)) { 8312 jQuery(target + ' .' + lazyLoadClass).css('display', cssDiplayFormat).removeAttr(removeAtrributes).lazyload(lazyLoadConfig); 8313 jQuery(e.target).addClass(loadedClass); 8314 } 8315 }); 8316 8317 } 8318 8319}); 8320 8321jQuery(window).load(function () { 8322 // 1. we need a scroll event on start to trigger the lazyload effect / IMPORTANT: This must be first in this ruleset 8323 jQuery(window).trigger('scroll'); 8324 8325 // 2. init adaptiv image loading / IMPORTANT: INIT AFTER LAZYLOAD 8326 picturefill(); 8327 8328 // 3. we need a resize event to trigger picturefill to show the right image for this viewport / IMPORTANT: INIT AFTER PICTUREFILL 8329 resizeTrigger(); 8330}); 8331 8332jQuery(document).ready(function() { 8333 8334 jQuery(function () { 8335 jQuery.scrollUp({ 8336 scrollName: 'scrollUp', // Element ID 8337 topDistance: '300', // Distance from top before showing element (px) 8338 topSpeed: 300, // Speed back to top (ms) 8339 animation: 'fade', // Fade, slide, none 8340 animationInSpeed: 200, // Animation in speed (ms) 8341 animationOutSpeed: 200, // Animation out speed (ms) 8342 scrollText: '', // Text for element
8343 activeOverlay: false // Set CSS color to display scrollUp active point, e.g '#00FFFF' 8344 }); 8345 }); 8346 8347}); 8348Gallery = { 8349 settings : { 8350 selector : { 8351 cycleContainer : '.gallery-container', 8352 cycleItem : '.gallery-item', 8353 cycleImageWrap : '.gallery-image', 8354 cycleTeaserText : '.text-box', 8355 cyclePrev : '> .cycle-prev > span', 8356 cycleNext : '> .cycle-next > span', 8357 pager : '.gallery-pager' 8358 }, 8359 8360 options : { 8361 fadeInSpeed : 'slow', 8362 fadeOutSpeed : 'slow', 8363 fadeHoverSpeed : 300, 8364 calcDelayTime : 300 8365 }, 8366 8367 backstretch: { 8368 extraLarge : { 8369 width : 992, 8370 attribute : 'data-source-extra-large' 8371 }, 8372 large : { 8373 width : 768, 8374 attribute : 'data-source-large' 8375 }, 8376 medium : { 8377 width : 480, 8378 attribute : 'data-source-medium' 8379 }, 8380 small : { 8381 width : 320, 8382 attribute : 'data-source-small' 8383 }, 8384 extraSmall : { 8385 attribute : 'data-source-extra-small' 8386 } 8387 } 8388 }, 8389 8390 init: function(){ 8391 8392 var obj = this; 8393 var cycleItem = jQuery(obj.settings.selector.cycleItem); 8394 8395 if(cycleItem.length > 0) { 8396 8397 obj.startCycle(); 8398 8399 } 8400 8401 }, 8402 8403 startCycle: function(){ 8404 8405 var obj = this; 8406 var cycleItem = obj.settings.selector.cycleItem; 8407 var cycleContainer = jQuery(obj.settings.selector.cycleContainer); 8408 var cycleTeaserText = obj.settings.selector.cycleTeaserText; 8409 var cyclePrev = obj.settings.selector.cyclePrev; 8410 var cycleNext = obj.settings.selector.cycleNext; 8411 var pager = obj.settings.selector.pager; 8412 var cycleImageWrap = obj.settings.selector.cycleImageWrap; 8413 var fadeInSpeed = obj.settings.options.fadeInSpeed; 8414 var fadeOutSpeed = obj.settings.options.fadeOutSpeed; 8415 8416 cycleContainer.find(cycleTeaserText).fadeTo(0, 0); 8417 jQuery(cycleItem).removeAttr('style'); 8418 8419 cycleContainer.on({ 8420 'cycle-post-initialize' : function(event, optionHash) { 8421 cycleContainer.find(cycleTeaserText + ':eq(0)').fadeTo(fadeInSpeed, 1);; 8422 cycleContainer.find(cycleImageWrap).each(function() { 8423 obj.renderBackstretch(jQuery(this)); 8424 }); 8425 8426 obj.setNavPosition(); 8427 obj.initNavHover(); 8428 }, 8429 'cycle-before' : function(event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) { 8430 var currentBackstretch = jQuery(cycleImageWrap, incomingSlideEl); 8431 obj.renderBackstretch(currentBackstretch); 8432 jQuery(outgoingSlideEl).find(cycleTeaserText).fadeTo(fadeOutSpeed, 0); 8433 //console.log('outgoingSlideEl: ' + jQuery(outgoingSlideEl).find('.text-box')); 8434 }, 8435 'cycle-after' : function(event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) { 8436 8437 jQuery(incomingSlideEl).find(cycleTeaserText).fadeTo(fadeInSpeed, 1);; 8438 //console.log('incomingSlideEl: ' + jQuery(incomingSlideEl).find('.text-box')); 8439 } 8440 }).cycle({ 8441 //fx : 'fade', 8442 slides : '> div' + cycleItem, 8443 prev : cyclePrev, 8444 next : cycleNext, 8445 swipe : true, 8446 pauseOnHover : true, 8447 pager : pager, 8448 pagerTemplate : '<span></span>' 8449 }); 8450 8451 }, 8452 8453 setNavPosition: function() { 8454 8455 var obj = this; 8456 var cycleContainer = jQuery(obj.settings.selector.cycleContainer); 8457 var cycleImageWrap = obj.settings.selector.cycleImageWrap; 8458 var cyclePrev = obj.settings.selector.cyclePrev; 8459 var cycleNext = obj.settings.selector.cycleNext; 8460 var calcDelayTime = obj.settings.options.calcDelayTime; 8461 8462 cycleContainer.each(function() { 8463 8464 var currentCycleContainer = jQuery(this); 8465 8466 function calcTopPosition() { 8467 8468 var currentImageWrapHeight = currentCycleContainer.find(cycleImageWrap + ':eq(0)').height(); 8469 var currentArrowWrapHeight = currentCycleContainer.find(cyclePrev + ':eq(0)').height(); 8470 var prevNextTopPosition = (currentImageWrapHeight/2)-(currentArrowWrapHeight/2); 8471 8472 currentCycleContainer.find(cyclePrev + ':eq(0)').parent().css('top', prevNextTopPosition); 8473 currentCycleContainer.find(cycleNext + ':eq(0)').parent().css('top', prevNextTopPosition); 8474 8475 } 8476 8477 setTimeout(function() { 8478 calcTopPosition(); 8479 }, calcDelayTime); 8480 8481 jQuery(window).resize(function() { 8482 calcTopPosition(); 8483 }); 8484 8485 }); 8486 8487 }, 8488 8489 initNavHover: function() { 8490 8491 var obj = this; 8492 var cycleContainer = jQuery(obj.settings.selector.cycleContainer); 8493 var cyclePrev = obj.settings.selector.cyclePrev; 8494 var cycleNext = obj.settings.selector.cycleNext; 8495 var fadeHoverSpeed = obj.settings.options.fadeHoverSpeed; 8496 8497 cycleContainer.each(function() { 8498 8499 var currentCycleContainer = jQuery(this); 8500 var currentCyclePrev = currentCycleContainer.find(cyclePrev + ':eq(0)').parent(); 8501 var currentCycleNext = currentCycleContainer.find(cycleNext + ':eq(0)').parent(); 8502 8503 if (!Modernizr.touch) { 8504 8505 currentCyclePrev.css('opacity', 0); 8506 currentCycleNext.css('opacity', 0); 8507 8508 cycleContainer.mousemove(function() { 8509 currentCyclePrev.stop(true,true).animate({'opacity': 1}, fadeHoverSpeed); 8510 currentCycleNext.stop(true,true).animate({'opacity': 1}, fadeHoverSpeed); 8511 }).mouseleave(function() { 8512 currentCyclePrev.stop(true,true).animate({'opacity': 0}, fadeHoverSpeed); 8513 currentCycleNext.stop(true,true).animate({'opacity': 0}, fadeHoverSpeed); 8514 }); 8515 8516 } 8517 8518 }); 8519 8520 }, 8521 8522 renderBackstretch: function(element) { 8523 8524 var obj = this; 8525
8526 var extraLargeAttr = obj.settings.backstretch.extraLarge.attribute; 8527 var largeAttr = obj.settings.backstretch.large.attribute; 8528 var mediumAttr = obj.settings.backstretch.medium.attribute; 8529 var smallAttr = obj.settings.backstretch.small.attribute; 8530 var extraSmallAttr = obj.settings.backstretch.extraSmall.attribute; 8531 8532 var extraLargeWidth = obj.settings.backstretch.extraLarge.width; 8533 var largeWidth = obj.settings.backstretch.large.width; 8534 var mediumWidth = obj.settings.backstretch.medium.width; 8535 var smallWidth = obj.settings.backstretch.small.width; 8536 8537 if(jQuery(window).outerWidth() > extraLargeWidth) { 8538 var backstretch = element.backstretch(element.attr(extraLargeAttr)); 8539 // console.log('data-source-extra-large'); 8540 } else if(jQuery(window).outerWidth() > largeWidth) { 8541 var backstretch = element.backstretch(element.attr(largeAttr)); 8542 // console.log('data-source-large'); 8543 } else if(jQuery(window).outerWidth() > mediumWidth) { 8544 var backstretch = element.backstretch(element.attr(mediumAttr)); 8545 // console.log('data-source-medium'); 8546 } else if(jQuery(window).outerWidth() > smallWidth) { 8547 var backstretch = element.backstretch(element.attr(smallAttr)); 8548 // console.log('data-source-small'); 8549 } else { 8550 var backstretch = element.backstretch(element.attr(extraSmallAttr)); 8551 // console.log('data-source-extra-small'); 8552 } 8553 8554 }, 8555 8556 lastProperti: ':-)' 8557}; 8558 8559jQuery(window).load(function() { 8560 8561 Gallery.init(); 8562 8563}); 8564 8565 8566AjaxController = { 8567 8568 settings: { 8569 ajaxContentUrl : '.ajaxContentUrl' 8570 }, 8571 8572 init: function(){ 8573 8574 var obj = this; 8575 var ajaxContentUrl = jQuery(obj.settings.ajaxContentUrl); 8576 8577 jQuery.each(ajaxContentUrl,function(){ 8578 var recorduid = jQuery(this).data('recorduid'); 8579 var ajaxLink = jQuery(this).find('a').attr('href'); 8580 jQuery.get(ajaxLink, function(data) { 8581 jQuery('.ajax-content'+recorduid).html(data); 8582 }); 8583 ajaxContentUrl.remove(); 8584 }); 8585 8586 }, 8587 8588 lastProperti: ':-)' 8589}; 8590 8591 8592 8593jQuery(window).load(function() { 8594 AjaxController.init(); 8595}); 8596 8597/** 8598 * Powermail required checkbox helper 8599 */ 8600jQuery(document).ready(function($) { 8601 jQuery('form.powermail_form').on('submit', function() { 8602 setTimeout(function() { 8603 var errorClass = 'powermail_field_error_container_dataprivacycheck'; 8604 if(jQuery('.' + errorClass + ' > ul > li').length > 0) { 8605 jQuery('.' + errorClass).parent().addClass(errorClass); 8606 //console.log('invalid'); 8607 } else { 8608 jQuery('.' + errorClass).parent().removeClass(errorClass); 8609 //console.log('valid'); 8610 } 8611 }, 500); 8612 }); 8613 8614 jQuery('form.powermail_form input#powermail_field_dataprivacycheck_1').on('change', function() { 8615 //console.log('change'); 8616 setTimeout(function() { 8617 var errorClass = 'powermail_field_error_container_dataprivacycheck'; 8618 if(jQuery('.' + errorClass + ' > ul > li').length > 0) { 8619 jQuery('.' + errorClass).parent().addClass(errorClass); 8620 //console.log('invalid'); 8621 } else { 8622 jQuery('.' + errorClass).parent().removeClass(errorClass); 8623 //console.log('valid'); 8624 } 8625 }, 500); 8626 }); 8627}); 8628$(function(){ 8629 $('.multiselect').select2({ 8630 width:'100%' 8631 }); 8632}); 8633 8634TableCleanUp = { 8635 settings : { 8636 selector : { 8637 TableCleanUp : '.tx-bircoproducts table.contenttable' 8638 } 8639 }, 8640 8641 init: function(){ 8642 8643 var obj = this; 8644 var TableCleanUp = jQuery(obj.settings.selector.TableCleanUp); 8645 8646 if(TableCleanUp.length > 0) { 8647 8648 obj.removeUnwantedData(); 8649 8650 } 8651 8652 }, 8653 8654 removeUnwantedData: function() { 8655 8656 var obj = this; 8657 var TableCleanUp = jQuery(obj.settings.selector.TableCleanUp); 8658 8659 TableCleanUp.each(function() { 8660 var currentTable = jQuery(this); 8661 var cols = currentTable.find("> thead > tr > th").length; 8662 var head = currentTable.find("> thead") 8663 var tbl = currentTable.find("> tbody") 8664 8665 for (var col = cols; col > 1; --col) 8666 { 8667 //console.log(col) 8668 var rowCells = tbl.find("td:nth-child(" + col + ")"); 8669 var valueCellsZero = rowCells.filter(function() { 8670 return $.trim($(this).text()) != "0.00"; 8671 }); 8672 var valueCellsEmpty = rowCells.filter(function() { 8673 return $.trim($(this).text()) != ""; 8674 });
8675 if (valueCellsZero.length == 0) { 8676 //console.log("remove zero cells: ", col); 8677 head.find("th:nth-child(" + col + ")").remove(); 8678 rowCells.remove(); 8679 } 8680 if (valueCellsEmpty.length == 0) { 8681 //console.log("remove empty cells: ", col); 8682 head.find("th:nth-child(" + col + ")").remove(); 8683 rowCells.remove(); 8684 } 8685 } 8686 8687 }); 8688 8689 }, 8690 8691 lastProperti: ':-)' 8692}; 8693 8694jQuery(document).ready(function() { 8695 8696 TableCleanUp.init(); 8697 8698}); 8699 8700jQuery(document).ajaxComplete(function() { 8701 8702 TableCleanUp.init(); 8703 8704}); 8705jQuery(document).ready(function() { 8706 if (jQuery('.powermail_form_42').length > 0) { 8707 jQuery('.powermail_form_42 .quantity').text(3); 8708 jQuery('#powermail_field_anzahlstrohhutstrohhuete').keyup(function(e) { 8709 jQuery('.powermail_form_42 .quantity').text(e.target.value); 8710 }) 8711 } 8712});
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.