PageSourceSearch

https://www.richterbaustoffe.de/wro/wro-min.js?k=1

js richterbaustoffe.de collected 2026-10-05 03:41:37 UTC 1,190,701 bytes, 2,133 lines download raw bytes

vendor: 22,793 bytes, lines 1-2
1
2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Z(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!=w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}
vendor: 1,967 bytes, line 2
2return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||
vendor: 9,546 bytes, line 2
2ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ne={};function re(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||
vendor: 8,814 bytes, line 2
2(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=ce.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<ce(i,this).index(l):ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);
vendor: 14,182 bytes, line 2
2n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",J.appendChild(u).appendChild(l);var e=ie.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;
vendor: 4,590 bytes, line 2
2return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1)
vendor: 13,972 bytes, line 2
2);!e&&o||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);
vendor: 9,033 bytes, line 2
2if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&ie.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&ie.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return 
vendor: 2,756 bytes, line 2
2M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce});(t=>{"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(V){V.ui=V.ui||{};V.ui.version="1.14.1";var n,s,x,k,o,a,r,l,h,i,E=0,N=Array.prototype.hasOwnProperty,c=Array.prototype.slice;
vendor: 5,766 bytes, line 2
2V.cleanData=(n=V.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=V._data(i,"events"))&&e.remove&&V(i).triggerHandler("remove");n(t)}),V.widget=function(t,i,e){var s,n,o,a,r={},l=t.split(".")[0];return"__proto__"===(t=t.split(".")[1])||"constructor"===t?V.error("Invalid widget name: "+t):(a=l+"-"+t,e||(e=i,i=V.Widget),Array.isArray(e)&&(e=V.extend.apply(null,[{}].concat(e))),V.expr.pseudos[a.toLowerCase()]=function(t){return!!V.data(t,a)},V[l]=V[l]||{},s=V[l][t],n=V[l][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},V.extend(n,s,{version:e.version,_proto:V.extend({},e),_childConstructors:[]}),(o=new i).options=V.widget.extend({},o.options),V.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof s?s:function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}}),n.prototype=V.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},r,{constructor:n,namespace:l,widgetName:t,widgetFullName:a}),s?(V.each(s._childConstructors,function(t,e){var i=e.prototype;V.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),V.widget.bridge(t,n),n)},V.widget.extend=function(t){for(var e,i,s=c.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],N.call(s[n],e)&&void 0!==i&&(V.isPlainObject(i)?t[e]=V.isPlainObject(t[e])?V.widget.extend({},t[e],i):V.widget.extend({},i):t[e]=i);return t},V.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;V.fn[o]=function(i){var t="string"==typeof i,s=c.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V.data(this,a);t?(t.option(i||{}),t._init&&t._init()):V.data(this,a,new e(i,this))})),n}},V.Widget=function(){},V.Widget._childConstructors=[],V.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=V(e||this.defaultElement||this)[0],this.element=V(e),this.uuid=E++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=V(),this.hoverable=V(),this.focusable=V(),this.classesElementLookup={},e!==this&&(V.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=V(e.style?e.ownerDocument:e.document||e),this.window=V(this.document[0].defaultView||this.document[0].parentWindow)),this.options=V.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:V.noop,_create:V.noop,_init:V.noop,destroy:function(){var i=this;this._destroy(),V.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:V.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return V.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=V.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=V(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||V(),i=n.add?((()=>{var i=[];n.element.each(function(t,e){V.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(V(i),{remove:"_untrackClassesElement"})})(),V(V.uniqueSort(i.get().concat(n.element.get())))):V(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=V.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;V.each(s.classesElementLookup,function(t,e){-1!==V.inArray(i.target,e)&&(s.classesElementLookup[t]=V(e.not(i.target).get()))}),this._off(V(i.target))}
vendor: 24,482 bytes, line 2
2,_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,e={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return e.element.toggleClass(this._classes(e),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=V(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),V.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!V(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||V.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),s=t[1]+r.eventNamespace,t=t[2];t?a.on(s,t,i):o.on(s,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=V(this.bindings.not(t).get()),this.focusable=V(this.focusable.not(t).get()),this.hoverable=V(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(V(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(V(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=V.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},V.each({show:"fadeIn",hide:"fadeOut"},function(o,a){V.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!V.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&V.effects&&V.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){V(this)[o](),i&&i.call(e[0]),t()})}}),V.widget;function C(t,e,i){return[parseFloat(t[0])*(h.test(t[0])?e/100:1),parseFloat(t[1])*(h.test(t[1])?i/100:1)]}function D(t,e){return parseInt(V.css(t,e),10)||0}function I(t){return null!=t&&t===t.window}x=Math.max,k=Math.abs,o=/left|center|right/,a=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,h=/%$/,i=V.fn.position,V.position={scrollbarWidth:function(){var t,e,i;return void 0!==s?s:(i=(e=V("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],V("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?V.position.scrollbarWidth():0,height:e?V.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=V(t||window),i=I(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?V(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},V.fn.position=function(u){var d,p,f,g,m,_,v,b,y,w,t,e;return u&&u.of?(_="string"==typeof(u=V.extend({},u)).of?V(document).find(u.of):V(u.of),v=V.position.getWithinInfo(u.within),b=V.position.getScrollInfo(v),y=(u.collision||"flip").split(" "),w={},e=9===(e=(t=_)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:I(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},_[0].preventDefault&&(u.at="left top"),p=e.width,f=e.height,m=V.extend({},g=e.offset),V.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):a.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=a.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],u[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=C(w.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,a=V(this),r=a.outerWidth(),l=a.outerHeight(),e=D(this,"marginLeft"),s=D(this,"marginTop"),n=r+e+D(this,"marginRight")+b.width,o=l+s+D(this,"marginBottom")+b.height,h=V.extend({},m),c=C(w.my,a.outerWidth(),a.outerHeight());"right"===u.my[0]?h.left-=r:"center"===u.my[0]&&(h.left-=r/2),"bottom"===u.my[1]?h.top-=l:"center"===u.my[1]&&(h.top-=l/2),h.left+=c[0],h.top+=c[1],i={marginLeft:e,marginTop:s},V.each(["left","top"],function(t,e){V.ui.position[y[t]]&&V.ui.position[y[t]][e](h,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:v,elem:a})}),u.using&&(t=function(t){var e=g.left-h.left,i=e+p-r,s=g.top-h.top,n=s+f-l,o={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:a,left:h.left,top:h.top,width:r,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&k(e+i)<p&&(o.horizontal="center"),f<l&&k(s+n)<f&&(o.vertical="middle"),x(k(e),k(i))>x(k(s),k(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(V.extend(h,{using:t}))})):i.apply(this,arguments)},V.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,s=s.width,o=t.left-e.collisionPosition.marginLeft,a=n-o,r=o+e.collisionWidth-s-n;s<e.collisionWidth?0<a&&r<=0?(i=t.left+a+e.collisionWidth-s-n,t.left+=a-i):t.left=!(0<r&&a<=0)&&r<a?n+s-e.collisionWidth:n:0<a?t.left+=a:0<r?t.left-=r:t.left=x(t.left-o,t.left)},top:function(t,e){var i,s=e.within,s=s.isWindow?s.scrollTop:s.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,a=s-o,r=o+e.collisionHeight-n-s;n<e.collisionHeight?0<a&&r<=0?(i=t.top+a+e.collisionHeight-n-s,t.top+=a-i):t.top=!(0<r&&a<=0)&&r<a?s+n-e.collisionHeight:s:0<a?t.top+=a:0<r?t.top-=r:t.top=x(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,o=t.left-e.collisionPosition.marginLeft,a=o-i,o=o+e.collisionWidth-n-i,r="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,l="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];a<0?((n=t.left+r+l+h+e.collisionWidth-n-s)<0||n<k(a))&&(t.left+=r+l+h):0<o&&(0<(s=t.left-e.collisionPosition.marginLeft+r+l+h-i)||k(s)<o)&&(t.left+=r+l+h)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,i=i.isWindow?i.scrollTop:i.offset.top,o=t.top-e.collisionPosition.marginTop,a=o-i,o=o+e.collisionHeight-n-i,r="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,l="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];a<0?((n=t.top+r+l+h+e.collisionHeight-n-s)<0||n<k(a))&&(t.top+=r+l+h):0<o&&(0<(s=t.top-e.collisionPosition.marginTop+r+l+h-i)||k(s)<o)&&(t.top+=r+l+h)}},flipfit:{left:function(){V.ui.position.flip.left.apply(this,arguments),V.ui.position.fit.left.apply(this,arguments)},top:function(){V.ui.position.flip.top.apply(this,arguments),V.ui.position.fit.top.apply(this,arguments)}}};V.ui.position,V.extend(V.expr.pseudos,{data:V.expr.createPseudo(function(e){return function(t){return!!V.data(t,e)}})}),V.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t,u=V,d={},W=d.toString,F=/^([\-+])=\s*(\d+\.?\d*)/,L=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),t[4]?(parseInt(t[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),t[4]?(parseInt(t[4]+t[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],p=u.Color=function(t,e,i,s){return new u.Color.fn.parse(t,e,i,s)},f={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},R={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},g=u.each;function m(t){return null==t?t+"":"object"==typeof t?d[W.call(t)]||"object":typeof t}function _(t,e,i){var s=R[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),s.mod?(t+s.mod)%s.mod:Math.min(s.max,Math.max(0,t)))}function Y(s){var n=p(),o=n._rgba=[];return s=s.toLowerCase(),g(L,function(t,e){var i=e.re.exec(s),i=i&&e.parse(i),e=e.space||"rgba";if(i)return i=n[e](i),n[f[e].cache]=i[f[e].cache],o=n._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&u.extend(o,y.transparent),n):y[s]}function v(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}g(f,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),u.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){d["[object "+e+"]"]=e.toLowerCase()}),p.fn=u.extend(p.prototype,{parse:function(n,t,e,i){if(void 0===n)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=u(n).css(t),t=void 0);var o=this,s=m(n),a=this._rgba=[];return void 0!==t&&(n=[n,t,e,i],s="array"),"string"===s?this.parse(Y(n)||y._default):"array"===s?(g(f.rgba.props,function(t,e){a[e.idx]=_(n[e.idx],e)}),this):"object"===s?(n instanceof p?g(f,function(t,e){n[e.cache]&&(o[e.cache]=n[e.cache].slice())}):g(f,function(t,i){var s=i.cache;g(i.props,function(t,e){if(!o[s]&&i.to){if("alpha"===t||null==n[t])return;o[s]=i.to(o._rgba)}o[s][e.idx]=_(n[t],e,!0)}),o[s]&&u.inArray(null,o[s].slice(0,3))<0&&(null==o[s][3]&&(o[s][3]=1),i.from)&&(o._rgba=i.from(o[s]))}),this):void 0},is:function(t){var n=p(t),o=!0,a=this;return g(f,function(t,e){var i,s=n[e.cache];return s&&(i=a[e.cache]||e.to&&e.to(a._rgba)||[],g(e.props,function(t,e){if(null!=s[e.idx])return o=s[e.idx]===i[e.idx]})),o}),o},_space:function(){var i=[],s=this;return g(f,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,a){var t=(h=p(t))._space(),e=f[t],i=0===this.alpha()?p("transparent"):this,r=i[e.cache]||e.to(i._rgba),l=r.slice(),h=h[e.cache];return g(e.props,function(t,e){var i=e.idx,s=r[i],n=h[i],o=R[e.type]||{};null!==n&&(null===s?l[i]=n:(o.mod&&(n-s>o.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=_((n-s)*a+s,e)))}),this[t](l)},blend:function(t){var e,i,s;return 1===this._rgba[3]?this:(e=this._rgba.slice(),i=e.pop(),s=p(t)._rgba,p(u.map(e,function(t,e){return(1-i)*s[e]+i*t})))},toRgbaString:function(){var t="rgba(",e=u.map(this._rgba,function(t,e){return null!=t?t:2<e?1:0});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join(", ")+")"},toHslaString:function(){var t="hsla(",e=u.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),t=e&&e<3?Math.round(100*t)+"%":t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join(", ")+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+u.map(e,function(t){return("0"+(t||0).toString(16)).substr(-2)}).join("")},toString:function(){return this.toRgbaString()}}),p.fn.parse.prototype=p.fn,f.hsla.to=function(t){var e,i,s,n,o,a,r,l;return null==t[0]||null==t[1]||null==t[2]?[null,null,null,t[3]]:(e=t[0]/255,i=t[1]/255,s=t[2]/255,t=t[3],n=(l=Math.max(e,i,s))-(r=Math.min(e,i,s)),a=.5*(o=l+r),r=r===l?0:e===l?60*(i-s)/n+360:i===l?60*(s-e)/n+120:60*(e-i)/n+240,l=0==n?0:a<=.5?n/o:n/(2-o),[Math.round(r)%360,l,a,null==t?1:t])},f.hsla.from=function(t){var e,i,s;return null==t[0]||null==t[1]||null==t[2]?[null,null,null,t[3]]:(e=t[0]/360,s=t[1],i=t[3],s=2*(t=t[2])-(t=t<=.5?t*(1+s):t+s-t*s),[Math.round(255*v(s,t,e+1/3)),Math.round(255*v(s,t,e)),Math.round(255*v(s,t,e-1/3)),i])},g(f,function(r,t){var e=t.props,o=t.cache,a=t.to,l=t.from;p.fn[r]=function(t){var i,s,n;return a&&!this[o]&&(this[o]=a(this._rgba)),void 0===t?this[o].slice():(i=m(t),s="array"===i||"object"===i?t:arguments,n=this[o].slice(),g(e,function(t,e){t=s["object"===i?t:e.idx];null==t&&(t=n[e.idx]),n[e.idx]=_(t,e)}),l?((t=p(l(n)))[o]=n,t):p(n))},g(e,function(o,a){p.fn[o]||(p.fn[o]=function(t){var e=m(t),i="alpha"===o?this._hsla?"hsla":"rgba":r,s=this[i](),n=s[a.idx];return"undefined"===e?n:("function"===e&&(e=m(t=t.call(this,n))),null==t&&a.empty?this:("string"===e&&(e=F.exec(t))&&(t=n+parseFloat(e[2])*("+"===e[1]?1:-1)),s[a.idx]=t,this[i](s)))})})}),p.hook=function(t){t=t.split(" ");g(t,function(t,s){u.cssHooks[s]={set:function(t,e){var i;"transparent"===e||"string"===m(e)&&!(i=Y(e))||(e=(e=p(i||e)).toRgbaString()),t.style[s]=e}},u.fx.step[s]=function(t){t.colorInit||(t.start=p(t.elem,s),t.end=p(t.end),t.colorInit=!0),u.cssHooks[s].set(t.elem,t.start.transition(t.end,t.pos))}})},p.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),u.cssHooks.borderColor={expand:function(i){var s={};return g(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}};var B,j,q,K,U,X,$,G,Q,b,y=u.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},w="ui-effects-",e="ui-effects-style",T="ui-effects-animated";function J(t){for(var e,i=t.ownerDocument.defaultView.getComputedStyle(t),s={},n=i.length;n--;)"string"==typeof i[e=i[n]]&&(s[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=i[e]);return s}function P(t,e,i,s){return t={effect:t=V.isPlainObject(t)?(e=t).effect:t},"function"==typeof(e=null==e?{}:e)&&(s=e,i=null,e={}),"number"!=typeof e&&!V.fx.speeds[e]||(s=i,i=e,e={}),"function"==typeof i&&(s=i,i=null),e&&V.extend(t,e),i=i||e.duration,t.duration=V.fx.off?0:"number"==typeof i?i:i in V.fx.speeds?V.fx.speeds[i]:V.fx.speeds._default,t.complete=s||e.complete,t}function M(t){return!t||"number"==typeof t||V.fx.speeds[t]||"string"==typeof t&&!V.effects.effect[t]||"function"==typeof t||"object"==typeof t&&!t.effect}function Z(t,e){var i=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?i:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}V.effects={effect:{}},K=["add","remove","toggle"],U={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},V.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){V.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(u.style(t.elem,e,t.end),t.setAttr=!0)}}),V.effects.animateClass=function(n,t,e,i){var o=V.speed(t,e,i);return this.queue(function(){var i=V(this),t=i.attr("class")||"",e=(e=o.children?i.find("*").addBack():i).map(function(){return{el:V(this),start:J(this)}}),s=function(){V.each(K,function(t,e){n[e]&&i[e+"Class"](n[e])})};s(),e=e.map(function(){return this.end=J(this.el[0]),this.diff=((t,e)=>{var i,s,n={};for(i in e)s=e[i],t[i]===s||U[i]||!V.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s);return n})(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=V.Deferred(),i=V.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),V.when.apply(V,e.get()).done(function(){s(),V.each(arguments,function(){var e=this.el;V.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},V.fn.extend({addClass:(q=V.fn.addClass,function(t,e,i,s){return e?V.effects.animateClass.call(this,{add:t},e,i,s):q.apply(this,arguments)}),removeClass:(j=V.fn.removeClass,function(t,e,i,s){return 1<arguments.length?V.effects.animateClass.call(this,{remove:t},e,i,s):j.apply(this,arguments)}),toggleClass:(B=V.fn.toggleClass,function(t,e,i,s,n){return"boolean"==typeof e||void 0===e?i?V.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,n):B.apply(this,arguments):V.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,n){return V.effects.animateClass.call(this,{add:e,remove:t},i,s,n)}}),V.expr&&V.expr.pseudos&&V.expr.pseudos.animated&&(V.expr.pseudos.animated=(X=V.expr.pseudos.animated,function(t){return!!V(t).data(T)||X(t)})),!0===V.uiBackCompat&&V.extend(V.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(w+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;s<n;s++)null!==e[s]&&(i=t.data(w+e[s]),t.css(e[s],i))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=V("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!V.contains(i[0],n)||V(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(V.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),V.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!V.contains(t[0],e)||V(e).trigger("focus")),t}}),V.extend(V.effects,{version:"1.14.1",define:function(t,e,i){return i||(i=e,e="effect"),V.effects.effect[t]=i,V.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){var s;return 0===e?{height:0,width:0,outerHeight:0,outerWidth:0}:(s="horizontal"!==i?(e||100)/100:1,i="vertical"!==i?(e||100)/100:1,{height:t.height()*i,width:t.width()*s,outerHeight:t.outerHeight()*i,outerWidth:t.outerWidth()*s})},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(e,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(e)||"",t.removeData(e)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=V("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(w+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=w+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){V.effects.restoreStyle(t),V.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},V.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(o[e]=i[0]*n+i[1])}),o}}),V.fn.extend({effect:function(){function t(t){var e=V(this),i=V.effects.mode(e,r)||o;e.data(T,!0),l.push(i),o&&("show"===i||i===o&&"hide"===i)&&e.show(),o&&"none"===i||V.effects.saveStyle(e),"function"==typeof t&&t()}var s=P.apply(this,arguments),n=V.effects.effect[s.effect],o=n.mode,e=s.queue,i=e||"fx",a=s.complete,r=s.mode,l=[];return V.fx.off||!n?r?this[r](s.duration,a):this.each(function(){a&&a.call(this)}):!1===e?this.each(t).each(h):this.queue(i,t).queue(i,h);function h(t){var e=V(this);function i(){"function"==typeof a&&a.call(e[0]),"function"==typeof t&&t()}s.mode=l.shift(),!0!==V.uiBackCompat||o?"none"===s.mode?(e[r](),i()):n.call(e[0],s,function(){e.removeData(T),V.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===r:"show"===r)?(e[r](),i()):n.call(e[0],s,i)}},show:(Q=V.fn.show,function(t){return M(t)?Q.apply(this,arguments):((t=P.apply(this,arguments)).mode="show",this.effect.call(this,t))}),hide:(G=V.fn.hide,function(t){return M(t)?G.apply(this,arguments):((t=P.apply(this,arguments)).mode="hide",this.effect.call(this,t))}),toggle:($=V.fn.toggle,function(t){return M(t)||"boolean"==typeof t?$.apply(this,arguments):((t=P.apply(this,arguments)).mode="toggle",this.effect.call(this,t))}),cssUnit:function(t){var i=this.css(t),s=[];return V.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):Z(this.css("clip"),this)},transfer:function(t,e){var i=V(this),s=V(t.to),n="fixed"===s.css("position"),o=V("body"),a=n?o.scrollTop():0,o=n?o.scrollLeft():0,r=s.offset(),r={top:r.top-a,left:r.left-o,height:s.innerHeight(),width:s.innerWidth()},s=i.offset(),l=V("<div class='ui-effects-transfer'></div>");l.appendTo("body").addClass(t.className).css({top:s.top-a,left:s.left-o,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(r,t.duration,t.easing,function(){l.remove(),"function"==typeof e&&e()})}}),V.fx.step.clip=function(t){t.clipInit||(t.start=V(t.elem).cssClip(),"string"==typeof t.end&&(t.end=Z(t.end,t.elem)),t.clipInit=!0),V(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},b={},V.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){b[t]=function(t){return Math.pow(t,e+2)}}),V.extend(b,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),V.each(b,function(t,e){V.easing["easeIn"+t]=e,V.easing["easeOut"+t]=function(t){return 1-e(1-t)},V.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});var tt,et,S,it=V.effects,st=(
vendor: 8,072 bytes, line 2
2V.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=V(this),n=t.direction||"up",o=s.cssClip(),a={clip:V.extend({},o)},r=V.effects.createPlaceholder(s);a.clip[i[n][0]]=a.clip[i[n][1]],"show"===t.mode&&(s.cssClip(a.clip),r&&r.css(V.effects.clipToBox(a)),a.clip=o),r&&r.animate(V.effects.clipToBox(a),t.duration,t.easing),s.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("bounce",function(t,e){var i,s,n=V(this),o=t.mode,a="hide"===o,o="show"===o,r=t.direction||"up",l=t.distance,h=t.times||5,c=2*h+(o||a?1:0),u=t.duration/c,d=t.easing,p="up"===r||"down"===r?"top":"left",f="up"===r||"left"===r,g=0,t=n.queue().length;for(V.effects.createPlaceholder(n),r=n.css(p),l=l||n["top"==p?"outerHeight":"outerWidth"]()/3,o&&((s={opacity:1})[p]=r,n.css("opacity",0).css(p,f?2*-l:2*l).animate(s,u,d)),a&&(l/=Math.pow(2,h-1)),(s={})[p]=r;g<h;g++)(i={})[p]=(f?"-=":"+=")+l,n.animate(i,u,d).animate(s,u,d),l=a?2*l:l/2;a&&((i={opacity:0})[p]=(f?"-=":"+=")+l,n.animate(i,u,d)),n.queue(e),V.effects.unshift(n,t,1+c)}),V.effects.define("clip","hide",function(t,e){var i={},s=V(this),n=t.direction||"vertical",o="both"===n,a=o||"horizontal"===n,o=o||"vertical"===n,n=s.cssClip();i.clip={top:o?(n.bottom-n.top)/2:n.top,right:a?(n.right-n.left)/2:n.right,bottom:o?(n.bottom-n.top)/2:n.bottom,left:a?(n.right-n.left)/2:n.left},V.effects.createPlaceholder(s),"show"===t.mode&&(s.cssClip(i.clip),i.clip=n),s.animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("drop","hide",function(t,e){var i,s=V(this),n="show"===t.mode,o=t.direction||"left",a="up"===o||"down"===o?"top":"left",o="up"===o||"left"===o?"-=":"+=",r="+="==o?"-=":"+=",l={opacity:0};V.effects.createPlaceholder(s),i=t.distance||s["top"==a?"outerHeight":"outerWidth"](!0)/2,l[a]=o+i,n&&(s.css(l),l[a]=r+i,l.opacity=1),s.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("explode","hide",function(t,e){var i,s,n,o,a,r,l=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=l,c=V(this),u="show"===t.mode,d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/h),f=Math.ceil(c.outerHeight()/l),g=[];function m(){g.push(this),g.length===l*h&&(c.css({visibility:"visible"}),V(g).remove(),e())}for(i=0;i<l;i++)for(o=d.top+i*f,r=i-(l-1)/2,s=0;s<h;s++)n=d.left+s*p,a=s-(h-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),V.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;V(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("fold","hide",function(e,t){var i=V(this),s=e.mode,n="show"===s,s="hide"===s,o=e.size||15,a=/([0-9]+)%/.exec(o),r=!!e.horizFirst?["right","bottom"]:["bottom","right"],l=e.duration/2,h=V.effects.createPlaceholder(i),c=i.cssClip(),u={clip:V.extend({},c)},d={clip:V.extend({},c)},p=[c[r[0]],c[r[1]]],f=i.queue().length;a&&(o=parseInt(a[1],10)/100*p[s?0:1]),u.clip[r[0]]=o,d.clip[r[0]]=o,d.clip[r[1]]=0,n&&(i.cssClip(d.clip),h&&h.css(V.effects.clipToBox(d)),d.clip=c),i.queue(function(t){h&&h.animate(V.effects.clipToBox(u),l,e.easing).animate(V.effects.clipToBox(d),l,e.easing),t()}).animate(u,l,e.easing).animate(d,l,e.easing).queue(t),V.effects.unshift(i,f,4)}),V.effects.define("highlight","show",function(t,e){var i=V(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),V.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("size",function(s,e){var n,i=V(this),t=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=s.mode,l="effect"!==r,h=s.scale||"both",c=s.origin||["middle","center"],u=i.css("position"),d=i.position(),p=V.effects.scaledDimensions(i),f=s.from||p,g=s.to||V.effects.scaledDimensions(i,0);V.effects.createPlaceholder(i),"show"===r&&(r=f,f=g,g=r),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(n.from.y!==n.to.y&&(f=V.effects.setTransition(i,o,n.from.y,f),g=V.effects.setTransition(i,o,n.to.y,g)),n.from.x!==n.to.x&&(f=V.effects.setTransition(i,a,n.from.x,f),g=V.effects.setTransition(i,a,n.to.x,g))),"content"!==h&&"both"!==h||n.from.y!==n.to.y&&(f=V.effects.setTransition(i,t,n.from.y,f),g=V.effects.setTransition(i,t,n.to.y,g)),c&&(r=V.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*r.y+d.top,f.left=(p.outerWidth-f.outerWidth)*r.x+d.left,g.top=(p.outerHeight-g.outerHeight)*r.y+d.top,g.left=(p.outerWidth-g.outerWidth)*r.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(t),a=a.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=V(this),e=V.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},e={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=V.effects.setTransition(t,o,n.from.y,i),e=V.effects.setTransition(t,o,n.to.y,e)),n.from.x!==n.to.x&&(i=V.effects.setTransition(t,a,n.from.x,i),e=V.effects.setTransition(t,a,n.to.x,e)),l&&V.effects.saveStyle(t),t.css(i),t.animate(e,s.duration,s.easing,function(){l&&V.effects.restoreStyle(t)})})),i.animate(g,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=i.offset();0===g.opacity&&i.css("opacity",f.opacity),l||(i.css("position","static"===u?"relative":u).offset(t),V.effects.saveStyle(i)),e()}})}),V.effects.define("scale",function(t,e){var i=V(this),s=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),i=V.extend(!0,{from:V.effects.scaledDimensions(i),to:V.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(i.from.opacity=1,i.to.opacity=0),V.effects.effect.size.call(this,i,e)}),V.effects.define("puff","hide",function(t,e){t=V.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});V.effects.effect.scale.call(this,t,e)}),V.effects.define("pulsate","show",function(t,e){var i=V(this),s=t.mode,n="show"===s,o=2*(t.times||5)+(n||"hide"===s?1:0),a=t.duration/o,r=0,l=1,s=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),r=1);l<o;l++)i.animate({opacity:r},a,t.easing),r=1-r;i.animate({opacity:r},a,t.easing),i.queue(e),V.effects.unshift(i,s,1+o)}),V.effects.define("shake",function(t,e){var i=1,s=V(this),n=t.direction||"left",o=t.distance||20,a=t.times||3,r=2*a+1,l=Math.round(t.duration/r),h="up"===n||"down"===n?"top":"left",n="up"===n||"left"===n,c={},u={},d={},p=s.queue().length;for(V.effects.createPlaceholder(s),c[h]=(n?"-=":"+=")+o,u[h]=(n?"+=":"-=")+2*o,d[h]=(n?"-=":"+=")+2*o,s.animate(c,l,t.easing);i<a;i++)s.animate(u,l,t.easing).animate(d,l,t.easing);s.animate(u,l,t.easing).animate(c,l/2,t.easing).queue(e),V.effects.unshift(s,p,1+r)}),V.effects.define("slide","show",function(t,e){var i,s,n=V(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,r=t.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r,c=t.distance||n["top"==l?"outerHeight":"outerWidth"](!0),u={};V.effects.createPlaceholder(n),i=n.cssClip(),s=n.position()[l],u[l]=(h?-1:1)*c+s,u.clip=n.cssClip(),u.clip[o[r][1]]=u.clip[o[r][0]],"show"===a&&(n.cssClip(u.clip),n.css(l,u[l]),u.clip=i,u[l]=s),n.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),
2it=!0===V.uiBackCompat?V.effects.define("transfer",function(t,e){V(this).transfer(t,e)}):it,V.ui.focusable=function(t,e){var i,s,n,o=t.nodeName.toLowerCase();return"area"===o?(n=(i=t.parentNode).name,!(!t.href||!n||"map"!==i.nodeName.toLowerCase())&&0<(i=V("img[usemap='#"+n+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(o)?(s=!t.disabled)&&(n=V(t).closest("fieldset")[0])&&(s=!n.disabled):s="a"===o&&t.href||e,s&&V(t).is(":visible")&&"visible"===V(t).css("visibility"))},V.extend(V.expr.pseudos,{focusable:function(t){return V.ui.focusable(t,null!=V.attr(t,"tabindex"))}}),V.ui.focusable,V.ui.formResetMixin={_formResetHandler:function(){var e=V(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");V.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=V(this.element.prop("form")),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(V.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},V.escapeSelector||(V.escapeSelector=function(t){return CSS.escape(t+"")}),V.fn.even&&V.fn.odd||V.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),V.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},V.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last(
vendor: 16,441 bytes, line 2
2)).add((i.length?i:this).siblings()),t="label[for='"+CSS.escape(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},V.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=V(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:V(this[0].ownerDocument||document)},V.extend(V.expr.pseudos,{tabbable:function(t){var e=V.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&V.ui.focusable(t,i)}}),V.fn.extend({uniqueId:(tt=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++tt)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&V(this).removeAttr("id")})}}),V.widget("ui.accordion",{version:"1.14.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(t){return t.find("> li > :first-child").add(t.find("> :not(li)").filter(function(t){return t%2==0}))},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=V(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():V()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=V("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"===t?this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e)&&this._createIcons())},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=V.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(V(t.target).attr("tabIndex",-1),V(n).attr("tabIndex",0),V(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===V.ui.keyCode.UP&&t.ctrlKey&&V(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=V()):!1===t.active?this._activate(0):this.active.length&&!V.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=V()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=V(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=V(this).outerHeight(!0)}),this.headers.next().each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=V(this).is(":visible");t||V(this).show(),i=Math.max(i,V(this).css("height","").height()),t||V(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):V()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():s.next(),r=i.next(),r={oldHeader:i,oldPanel:r,newHeader:o?V():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,r)||(e.active=!o&&this.headers.index(s),this.active=n?V():s,this._toggle(r),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(a=i.children(".ui-accordion-header-icon"),this._removeClass(a,null,e.icons.activeHeader)._addClass(a,null,e.icons.header)),n)||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(t=s.children(".ui-accordion-header-icon"),this._removeClass(t,null,e.icons.header)._addClass(t,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active"))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(V(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){function s(){o._toggleComplete(e)}var n,o=this,a=0,r=t.css("box-sizing"),l=t.length&&(!i.length||t.index()<i.index()),h=this.options.animate||{},l=l&&h.down||h,c=(c="string"==typeof l?l:c)||l.easing||h.easing,u=(u="number"==typeof l?l:u)||l.duration||h.duration;return i.length?t.length?(n=t.show().outerHeight(),i.animate(this.hideProps,{duration:u,easing:c,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:u,easing:c,complete:s,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===r&&(a+=e.now):"content"!==o.options.heightStyle&&(e.now=Math.round(n-i.outerHeight()-a),a=0)}})):i.animate(this.hideProps,u,c,s):t.animate(this.showProps,u,c,s)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),this._trigger("activate",null,t)}}),V.widget("ui.menu",{version:"1.14.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=V(t.target),i=V(this.document[0].activeElement);!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active)&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){V.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=V(t.target).closest(".ui-menu-item"),i=V(t.currentTarget),e[0]!==i[0])||i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=V(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case V.ui.keyCode.PAGE_UP:this.previousPage(t);break;case V.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case V.ui.keyCode.HOME:this._move("first","first",t);break;case V.ui.keyCode.END:this._move("last","last",t);break;case V.ui.keyCode.UP:this.previous(t);break;case V.ui.keyCode.DOWN:this.next(t);break;case V.ui.keyCode.LEFT:this.collapse(t);break;case V.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case V.ui.keyCode.ENTER:case V.ui.keyCode.SPACE:this._activate(t);break;case V.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),t=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=V(this),e=t.prev(),i=V("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(t,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=V(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),e=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(e,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!V.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(e=parseFloat(V.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(V.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-e-i,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s<e+t&&this.activeMenu.scrollTop(i+e-s+t))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=V.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:V(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},i?0:this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
2se")},_closeOnDocumentClick:function(t){return!V(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this._menuItems(this.active.children(".ui-menu")).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;(s=this.active?"first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(e=V(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=V(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||V(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var t=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return e.test(String.prototype.trim.call(V(this).children(".ui-menu-item-wrapper").text()))})}}),V.widget("ui.autocomplete",{version:"1.14.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&"true"===this.element.prop("contentEditable"),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)i=!1,this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault();else if(!s){var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){n?(n=!1,t.preventDefault()):this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value(
vendor: 13,192 bytes, line 2
2)},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=V("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent)&&/^mouse/.test(t.originalEvent.type)?(this.menu.blur(),this.document.one("mousemove",function(){V(t.target).trigger(t.originalEvent)})):(s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(i))},100)))},menuselect:function(t,e){var e=e.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.trigger("focus"),this.previous=i),!1!==this._trigger("select",t,{item:e})&&this._value(e.value),this.term=this._value(),this.close(t),this.selectedItem=e}}),this.liveRegion=V("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||V.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=(t=(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))&&t[0]?t:this.element.closest(".ui-front, dialog")).length?t:this.document[0].body},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(V.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=V.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:V.map(t,function(t){return"string"==typeof t?{label:t,value:t}:V.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(V.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;V.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return V("<li>").append(V("<div>").text(e.label)).appendTo(t)},_move:function(t,e){this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur()):this.menu[t](e):this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),V.extend(V.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(V.ui.autocomplete.escapeRegex(e),"i");return V.grep(t,function(t){return i.test(t.label||t.value||t)})}}),V.widget("ui.autocomplete",V.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(e))},100))}}),V.ui.autocomplete,/ui-corner-([a-z]){2,6}/g);V.widget("ui.controlgroup",{version:"1.14.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var o=this,a=[];V.each(this.options.items,function(s,t){var e,n={};t&&("controlgroupLabel"===s?((e=o.element.find(t)).each(function(){var t=V(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),o._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),a=a.concat(e.get())):V.fn[s]&&(n=o["_"+s+"Options"]?o["_"+s+"Options"]("middle"):{classes:{}},o.element.find(t).each(function(){var t=V(this),e=t[s]("instance"),i=V.widget.extend({},n);"button"===s&&t.parent(".ui-spinner").length||((e=e||t[s]()[s]("instance"))&&(i.classes=o._resolveClassesValues(i.classes,e)),t[s](i),i=t[s]("widget"),V.data(i[0],"ui-controlgroup-data",e||t[s]("instance")),a.push(i[0]))})))}),this.childWidgets=V(V.uniqueSort(a)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=V(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return V.each(i,function(t){var e=s.options.classes[t]||"",e=String.prototype.trim.call(e.replace(st,""));n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?this._callChildMethod(e?"disable":"enable"):this.refresh()},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,(n=this.options.onlyVisible?n.filter(":visible"):n).length&&(V.each(["first","last"],function(t,e){var i,s=n[e]().data("ui-controlgroup-data");s&&o["_"+s.widgetName+"Options"]?((i=o["_"+s.widgetName+"Options"](1===n.length?"only":e)).classes=o._resolveClassesValues(i.classes,s),s.element[s.widgetName](i)):o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}}),V.widget("ui.checkboxradio",[V.ui.formResetMixin,{version:"1.14.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e=this._super()||{};return this._readType(),t=this.element.labels(),this.label=V(t[t.length-1]),this.label.length||V.error("No label found for checkboxradio widget"),this.originalLabel="",(t=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=t.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(e.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(e.disabled=t),e},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||V.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+CSS.escape(t)+"']";return t?(this.form.length?V(this.form[0].elements).filter(e):V(e).filter(function(){return 0===V(V(this).prop("form")).length})).not(this.element):V([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=V(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){"label"===t&&!e||(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e):this.refresh())},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=V("<span>"),this.iconSpace=V("<span> </span>
2"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),(t=this.iconSpace?t.not(this.iconSpace[0]):t).remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),V.ui.checkboxradio,V.widget("ui.button",{version:"1.14.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===V.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var t="iconPosition"!==t,i=t?this.options.iconPosition:e,s="top"===i||"bottom"===i;this.icon?t&&this._removeClass(this.icon,null,this.options.icon):(this.icon=V("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),t&&this._addClass(this.icon,null,e),this._attachIcon(i),s?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
vendor: 45,161 bytes, line 2
2pace||(this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(i))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=(void 0===t.showLabel?this.options:t).showLabel,i=(void 0===t.icon?this.options:t).icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace)&&this.iconSpace.remove()),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e)&&this.element.trigger("blur")},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!0===V.uiBackCompat&&(V.widget("ui.button",V.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"===t?this._super("showLabel",e):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments))}}),V.fn.button=(et=V.fn.button,function(i){var t="string"==typeof i,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V(this).attr("type"),e=V.data(this,"ui-"+("checkbox"!==e&&"radio"!==e?"button":"checkboxradio"));return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for button widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on button prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V(this).attr("type"),t="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",e=V.data(this,"ui-"+t);e?(e.option(i||{}),e._init&&e._init()):"button"==t?et.call(V(this),i):V(this).checkboxradio(V.extend({icon:!1},i))})),n}),V.fn.buttonset=function(){return V.ui.controlgroup||V.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),V.ui.button;function nt(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=ot(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function ot(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,at)}function at(){V.datepicker._isDisabledDatepicker((S.inline?S.dpDiv.parent():S.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function H(t,e){for(var i in V.extend(t,e),e)null==e[i]&&(t[i]=e[i])}V.extend(V.ui,{datepicker:{version:"1.14.1"}}),V.extend(nt.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return H(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s=t.nodeName.toLowerCase(),n="div"===s||"span"===s;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(V(t),n)).settings=V.extend({},e||{}),"input"===s?this._connectDatepicker(t,i):n&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?ot(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=V(t);e.append=V([]),e.trigger=V([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),V.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s=this._get(e,"appendText"),n=this._get(e,"isRTL");e.append&&e.append.remove(),s&&(e.append=V("<span>").addClass(this._appendClass).text(s),t[n?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(s=this._get(e,"showOn"))&&"both"!==s||t.on("focus",this._showDatepicker),"button"!==s&&"both"!==s||(s=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),this._get(e,"buttonImageOnly")?e.trigger=V("<img>").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):(e.trigger=V("<button type='button'>").addClass(this._triggerClass),i?e.trigger.html(V("<img>").attr({src:i,alt:s,title:s})):e.trigger.text(s)),t[n?"before":"after"](e.trigger),e.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===t[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==t[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,i,s,n,o,a;this._get(t,"autoSize")&&!t.inline&&(o=new Date(2009,11,20),(a=this._get(t,"dateFormat")).match(/[DM]/)&&(o.setMonth((e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s})(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length))},_inlineDatepicker:function(t,e){var i=V(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),V.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,s,n){var o,a=this._dialogInst;return a||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(a=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",a)),H(a.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(a,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+e,s/2-150+n]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",a),this},_destroyDatepicker:function(t){var e,i=V(t),s=V.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),V.removeData(t,"datepicker"),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),V.datepicker._hideDatepicker(),S===s)&&(S=null,this._curInst=null)},_enableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((s=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((s=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(t)for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return V.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?V.extend({},V.datepicker._defaults):o?"all"===e?V.extend({},o.settings):this._get(o,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),o&&(this._curInst===o&&this._hideDatepicker(),e=this._getDateDatepicker(t,!0),i=this._getMinMaxDate(o,"min"),n=this._getMinMaxDate(o,"max"),H(o.settings,s),null!==i&&void 0!==s.dateFormat&&void 0===s.minDate&&(o.settings.minDate=this._formatDate(o,i)),null!==n&&void 0!==s.dateFormat&&void 0===s.maxDate&&(o.settings.maxDate=this._formatDate(o,n)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(V(t),o),this._autoSize(o),this._setDate(o,e),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,i,s=V.datepicker._getInst(t.target),n=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,V.datepicker._datepickerShowing)switch(t.keyCode){case 9:V.datepicker._hideDatepicker(),n=!1;break;case 13:return(i=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",s.dpDiv))[0]&&V.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,i[0]),(i=V.datepicker._get(s,"onSelect"))?(e=V.datepicker._formatDate(s),i.apply(s.input?s.input[0]:null,[e,s])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&V.datepicker._clearDate(t.target),n=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&V.datepicker._gotoToday(t.target),n=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?1:-1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,-7,"D"),n=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?-1:1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,7,"D"),n=t.ctrlKey||t.metaKey;break;default:n=!1}else 36===t.keyCode&&t.ctrlKey?V.datepicker._showDatepicker(this):n=!1;n&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i=V.datepicker._getInst(t.target);if(V.datepicker._get(i,"constrainInput"))return i=V.datepicker._possibleChars(V.datepicker._get(i,"dateFormat")),e=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||e<" "||!i||-1<i.indexOf(e)},_doKeyUp:function(t){t=V.datepicker._getInst(t.target);if(t.input.val()!==t.lastVal)try{V.datepicker.parseDate(V.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,V.datepicker._getFormatConfig(t))&&(V.datepicker._setDateFromField(t),V.datepicker._updateAlternate(t),V.datepicker._updateDatepicker(t))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=V("input",t.parentNode)[0]),V.datepicker._isDisabledDatepicker(t)||V.datepicker._lastInput===t||(n=V.datepicker._getInst(t),V.datepicker._curInst&&V.datepicker._curInst!==n&&(V.datepicker._curInst.dpDiv.stop(!0,!0),n)&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0]),!1===(i=(i=V.datepicker._get(n,"beforeShow"))?i.apply(t,[t,n]):{}))||(H(n.settings,i),n.lastVal=null,V.datepicker._lastInput=t,V.datepicker._setDateFromField(n),V.datepicker._inDialog&&(t.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(t),V.datepicker._pos[1]+=t.offsetHeight),e=!1,V(t).parents().each(function(){return!(e|="fixed"===V(this).css("position"))}),i={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(n),i=V.datepicker._checkOffset(n,i,e),n.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":e?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),n.inline)||(i=V.datepicker._get(n,"showAnim"),s=V.datepicker._get(n,"duration"),n.dpDiv.css("z-index",(t=>{for(var e;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(e=parseInt(t.css("zIndex"),10),!isNaN(e))&&0!==e)return e;t=t.parent()}return 0})(V(t))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[i]?n.dpDiv.show(i,V.datepicker._get(n,"showOptions"),s):n.dpDiv[i||"show"](i?s:null),V.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),V.datepicker._curInst=n)},_updateDatepicker:function(t){this.maxRows=4,(S=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),s=i[1],n=t.dpDiv.find("."+this._dayOverClass+" a"),o=V.datepicker._get(t,"onUpdateDatepicker");0<n.length&&at.apply(n.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml),e=t.yearshtml=null},0)),o&&o.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:V(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:V(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?V(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?V(document).scrollTop():0,e.left-=Math.min(e.left,r<e.left+s&&s<r?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,l<e.top+n&&n<l?Math.abs(n+a):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||V.expr.pseudos.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=V(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s=this._curInst;!s||t&&s!==V.data(t,"datepicker")||this._datepickerShowing&&(t=this._get(s,"showAnim"),i=this._get(s,"duration"),e=function(){V.datepicker._tidyDialog(s)},V.effects&&V.effects.effect[t]?s.dpDiv.hide(t,V.datepicker._get(s,"showOptions"),i,e):s.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?i:null,e),t||e(),this._datepickerShowing=!1,(i=this._get(s,"onClose"))&&i.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI)&&(V.unblockUI(),V("body").append(this.dpDiv)),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){var e;V.datepicker._curInst&&(t=V(t.target),e=V.datepicker._getInst(t[0]),!(t[0].id===V.datepicker._mainDivId||0!==t.parents("#"+V.datepicker._mainDivId).length||t.hasClass(V.datepicker.markerClassName)||t.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)||t.hasClass(V.datepicker.markerClassName)&&V.datepicker._curInst!==e)&&V.datepicker._hideDatepicker()},_adjustDate:function(t,e,i){var t=V(t),s=this._getInst(t[0]);this._isDisabledDatepicker(t[0])||(this._adjustInstDate(s,e,i),this._updateDatepicker(s))},_gotoToday:function(t){var e,t=V(t),i=this._getInst(t[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(e=new Date,i.selectedDay=e.getDate(),i.drawMonth=i.selectedMonth=e.getMonth(),i.drawYear=i.selectedYear=e.getFullYear()),this._notifyChange(i),this._adjustDate(t)},_selectMonthYear:function(t,e,i){var t=V(t),s=this._getInst(t[0]);s["selected"+("M"===i?"Month":"Year")]=s["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(t)},_selectDay:function(t,e,i,s){var n=V(t);V(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(n[0])||((n=this._getInst(n[0])).selectedDay=n.currentDay=parseInt(V("a",s).attr("data-date")),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){t=V(t);this._selectDate(t,"")},_selectDate:function(t,e){var i,t=V(t),t=this._getInst(t[0]);e=null!=e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(i=this._get(t,"onSelect"))?i.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,s=this._get(t,"altField");s&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),e=this._getDate(t),i=this.formatDate(i,e,this._getFormatConfig(t)),V(document).find(s).val(i))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e,t=new Date(t.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),e=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((e-t)/864e5)/7)+1},parseDate:function(e,n,t){if(null==e||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;for(var i,s,o=0,a=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,a="string"!=typeof a?a:(new Date).getFullYear()%100+parseInt(a,10),r=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,l=(t?t.dayNames:null)||this._defaults.dayNames,h=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,c=(t?t.monthNames:null)||this._defaults.monthNames,u=-1,d=-1,p=-1,f=-1,g=!1,m=function(t){t=y+1<e.length&&e.charAt(y+1)===t;return t&&y++,t},_=function(t){var e=m(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,t=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}"),e=n.substring(o).match(t);if(e)return o+=e[0].length,parseInt(e[0],10);throw"Missing number at position "+o},v=function(t,e,i){var s=-1,t=V.map(m(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(V.each(t,function(t,e){var i=e[1];if(n.substr(o,i.length).toLowerCase()===i.toLowerCase())return s=e[0],o+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+o},b=function(){if(n.charAt(o)!==e.charAt(y))throw"Unexpected literal at position "+o;o++},y=0;y<e.length;y++)if(g)"'"!==e.charAt(y)||m("'")?b():g=!1;else switch(e.charAt(y)){case"d":p=_("d");break;case"D":v("D",r,l);break;case"o":f=_("o");break;case"m":d=_("m");break;case"M":d=v("M",h,c);break;case"y":u=_("y");break;case"@":u=(s=new Date(_("@"))).getFullYear(),d=s.getMonth()+1,p=s.getDate();break;case"!":u=(s=new Date((_("!")-this._ticksTo1970)/1e4)).getFullYear(),d=s.getMonth()+1,p=s.getDate();break;case"'":m("'")?b():g=!0;break;default:b()}if(o<n.length&&(t=n.substr(o),!/^\s+/.test(t)))throw"Extra/unparsed characters found in date: "+t;if(-1===u?u=(new Date).getFullYear():u<100&&(u+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u<=a?0:-100)),-1<f)for(d=1,p=f;;){if(p<=(i=this._getDaysInMonth(u,d-1)))break;d++,p-=i}if((s=this._daylightSavingAdjust(new Date(u,d-1,p))).getFullYear()!==u||s.getMonth()+1!==d||s.getDate()!==p)throw"Invalid date";return s},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";function s(t,e,i){var s=""+e;if(c(t))for(;s.length<i;)s="0"+s;return s}function n(t,e,i,s){return(c(t)?s:i)[e]}var o,a=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,c=function(t){t=o+1<e.length&&e.charAt(o+1)===t;return t&&o++,t},u="",d=!1;if(t)for(o=0;o<e.length;o++)if(d)"'"!==e.charAt(o)||c("'")?u+=e.charAt(o):d=!1;else switch(e.charAt(o)){case"d":u+=s("d",t.getDate(),2);break;case"D":u+=n("D",t.getDay(),a,r);break;case"o":u+=s("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=s("m",t.getMonth()+1,2);break;case"M":u+=n("M",t.getMonth(),l,h);break;case"y":u+=c("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":c("'")?u+="'":d=!0;break;default:u+=e.charAt(o)}return u},_possibleChars:function(e){for(var t="",i=!1,s=function(t){t=n+1<e.length&&e.charAt(n+1)===t;return t&&n++,t},n=0;n<e.length;n++)if(i)"'"!==e.charAt(n)||s("'")?t+=e.charAt(n):i=!1;else switch(e.charAt(n)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":s("'")?t+="'":i=!0;break;default:t+=e.charAt(n)}return t},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(r,t,e){var i,s=null==t||""===t?e:"string"==typeof t?(t=>{try{return V.datepicker.parseDate(V.datepicker._get(r,"dateFormat"),t,V.datepicker._getFormatConfig(r))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?V.datepicker._getDate(r):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":n+=parseInt(a[1],10);break;case"w":case"W":n+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s))}a=o.exec(t)}return new Date(i,s,n)})(t):"number"==typeof t?isNaN(t)?e:(s=t,(i=new Date).setDate(i.getDate()+s),i):new Date(t.getTime());return(s=s&&"Invalid Date"===s.toString()?e:s)&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=e.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=e.getMonth(),t.drawYear=t.selectedYear=t.currentYear=e.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){V.datepicker._adjustDate(i,-e,"M")},next:function(){V.datepicker._adjustDate(i,+e,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(i)},selectDay:function(){return V.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(i,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,N,W,F,L,a,r,R,l,h,c,u,d,p,f,g,m,_,Y,v,b,B,y,j,q,w,x,k,C=new Date,K=this._daylightSavingAdjust(new Date(C.getFullYear(),C.getMonth(),C.getDate())),D=this._get(t,"isRTL"),C=this._get(t,"showButtonPanel"),I=this._get(t,"hideIfNoPrevNext"),T=this._get(t,"navigationAsDateFormat"),P=this._getNumberOfMonths(t),M=this._get(t,"showCurrentAtPos"),S=this._get(t,"stepMonths"),U=1!==P[0]||1!==P[1],H=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),z=this._getMinMaxDate(t,"min"),O=this._getMinMaxDate(t,"max"),A=t.drawMonth-M,E=t.drawYear;if(A<0&&(A+=12,E--),O)for(e=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth()-P[0]*P[1]+1,O.getDate())),e=z&&e<z?z:e;this._daylightSavingAdjust(new Date(E,A,1))>e;)--A<0&&(A=11,E--);for(t.drawMonth=A,t.drawYear=E,M=this._get(t,"prevText"),M=T?this.formatDate(M,this._daylightSavingAdjust(new Date(E,A-S,1)),this._getFormatConfig(t)):M,i=this._canAdjustMonth(t,-1,E,A)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:M}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(D?"e":"w")).text(M))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:M}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(D?"e":"w")).text(M))[0].outerHTML,M=this._get(t,"nextText"),M=T?this.formatDate(M,this._daylightSavingAdjust(new Date(E,A+S,1)),this._getFormatConfig(t)):M,s=this._canAdjustMonth(t,1,E,A)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:M}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(D?"w":"e")).text(M))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:M}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(D?"w":"e")).text(M))[0].outerHTML,S=this._get(t,"currentText"),I=this._get(t,"gotoCurrent")&&t.currentDay?H:K,S=T?this.formatDate(S,I,this._getFormatConfig(t)):S,M="",t.inline||(M=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),T="",C&&(T=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(D?M:"").append(this._isInRange(t,I)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(S):"").append(D?"":M)[0].outerHTML),n=parseInt(this._get(t,"firstDay"),10),n=isNaN(n)?0:n,o=this._get(t,"showWeek"),N=this._get(t,"dayNames"),W=this._get(t,"dayNamesMin"),F=this._get(t,"monthNames"),L=this._get(t,"monthNamesShort"),a=this._get(t,"beforeShowDay"),r=this._get(t,"showOtherMonths"),R=this._get(t,"selectOtherMonths"),l=this._getDefaultDate(t),h="",u=0;u<P[0];u++){for(d="",this.maxRows=4,p=0;p<P[1];p++){if(f=this._daylightSavingAdjust(new Date(E,A,t.selectedDay)),g=" ui-corner-all",m="",U){if(m+="<div class='ui-datepicker-group",1<P[1])switch(p){case 0:m+=" ui-datepicker-group-first",g=" ui-corner-"+(D?"right":"left");break;case P[1]-1:m+=" ui-datepicker-group-last",g=" ui-corner-"+(D?"left":"right");break;default:m+=" ui-datepicker-group-middle",g=""}m+="'>"}for(m+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+g+"'>"+(/all|left/.test(g)&&0===u?D?s:i:"")+(/all|right/.test(g)&&0===u?D?i:s:"")+this._generateMonthYearHeader(t,A,E,z,O,0<u||0<p,F,L)+"</div><table class='ui-datepicker-calendar'><thead><tr>",_=o?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",c=0;c<7;c++)_+="<th scope='col'"+(5<=(c+n+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+N[Y=(c+n)%7]+"'>"+W[Y]+"</span></th>";for(m+=_+"</tr></thead><tbody>",b=this._getDaysInMonth(E,A),E===t.selectedYear&&A===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,b)),v=(this._getFirstDayOfMonth(E,A)-n+7)%7,b=Math.ceil((v+b)/7),B=U&&this.maxRows>b?this.maxRows:b,this.maxRows=B,y=this._daylightSavingAdjust(new Date(E,A,1-v)),j=0;j<B;j++){for(m+="<tr>",q=o?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(y)+"</td>":"",c=0;c<7;c++)w=a?a.apply(t.input?t.input[0]:null,[y]):[!0,""],k=(x=y.getMonth()!==A)&&!R||!w[0]||z&&y<z||O&&O<y,q+="<td class='"+(5<=(c+n+6)%7?" ui-datepicker-week-end":"")+(x?" ui-datepicker-other-month":"")+(y.getTime()===f.getTime()&&A===t.selectedMonth&&t._keyEvent||l.getTime()===y.getTime()&&l.getTime()===f.getTime()?" "+this._dayOverClass:"")+(k?" "+this._unselectableClass+" ui-state-disabled":"")+(x&&!r?"":" "+w[1]+(y.getTime()===H.getTime()?" "+this._currentClass:"")+(y.getTime()===K.getTime()?" ui-datepicker-today":""))+"'"+(x&&!r||!w[2]?"":" title='"+w[2].replace(/'/g,"&#39;")+"'")+(k?"":" data-handler='selectDay' data-event='click' data-month='"+y.getMonth()+"' data-year='"+y.getFullYear()+"'")+">"+(x&&!r?"&#xa0;":k?"<span class='ui-state-default'>"+y.getDate()+"</span>":"<a class='ui-state-default"+(y.getTime()===K.getTime()?" ui-state-highlight":"")+(y.getTime()===H.getTime()?" ui-state-active":"")+(x?" ui-priority-secondary":"")+"' href='#' aria-current='"+(y.getTime()===H.getTime()?"true":"false")+"' data-date='"+y.getDate()+"'>"+y.getDate()+"</a>")+"</td>",y.setDate(y.getDate()+1),y=this._daylightSavingAdjust(y);m+=q+"</tr>"}11<++A&&(A=0,E++),d+=m+="</tbody></table>"+(U?"</div>"+(0<P[0]&&p===P[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}h+=d}return h+=T,t._keyEvent=!1,h},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f=this._get(t,"changeMonth"),g=this._get(t,"changeYear"),m=this._get(t,"showMonthAfterYear"),_=this._get(t,"selectMonthLabel"),v=this._get(t,"selectYearLabel"),b="<div class='ui-datepicker-title'>",y="";if(o||!f)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' aria-label='"+_+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(m||(b+=y+(!o&&f&&g?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!g)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(a=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),d=(_=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(a[0]),p=Math.max(d,_(a[1]||"")),d=s?Math.max(d,s.getFullYear()):d,p=n?Math.min(p,n.getFullYear()):p,t.yearshtml+="<select class='ui-datepicker-year' aria-label='"+v+"' data-handler='selectYear' data-event='change'>";d<=p;d++)t.yearshtml+="<option value='"+d+"'"+(d===i?" selected='selected'":"")+">"+d+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),m&&(b+=(!o&&f&&g?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,e)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),i=i&&e<i?i:e;return t&&t<i?t:i},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),i=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&i.setDate(this._getDaysInMonth(i.getFullYear(),i.getMonth())),this._isInRange(t,i)},_isInRange:function(t,e){var i,s=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),o=null,a=null,t=this._get(t,"yearRange");return t&&(t=t.split(":"),i=(new Date).getFullYear(),o=parseInt(t[0],10),a=parseInt(t[1],10),t[0].match(/[+\-].*/)&&(o+=i),t[1].match(/[+\-].*/))&&(a+=i),(!s||e.getTime()>=s.getTime())&&(!n||e.getTime()<=n.getTime())&&(!o||e.getFullYear()>=o)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:"string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);s=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))}}),V.fn.datepicker=function(t){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this].concat(e)):V.datepicker._attachDatepicker(this,t)})},V.datepicker=new nt,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.14.1";var z=!1;V(document).on("mouseup",function(){z=!1}),V.widget("ui.mouse",{version:"1.14.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===V.data(t.target,e.widgetName+".preventClickEvent"))return V.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){var e,i,s;if(!z)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),i=1===(this._mouseDownEvent=t).which,s="string"==typeof(e=this).options.cancel&&V(t.target).closest(this.options.cancel).length,i&&!s&&this._mouseCapture(t)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?t.preventDefault():(!0===V.data(t.target,this.widgetName+".preventClickEvent")&&V.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),z=!0)),!0},_mouseMove:function(t){if(this._mouseMoved&&!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t);return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&V.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,z=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),V.ui.plugin={add:function(t,e,i){var s,n=V.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},V.widget("ui.draggable",V.ui.mouse,{version:"1.14.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<V(t.target).closest(".ui-resizable-handle").length||(this.handle=this._getHandle(t),!this.handle)||(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=V(this);return V("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=this.document[0].activeElement;V(t.target).closest(e).length||V(e).trigger("blur"
vendor: 16,399 bytes, line 2
2)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),V.ui.ddmanager&&(V.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===V(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),V.ui.ddmanager&&!e.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),V.ui.ddmanager&&V.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new V.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return V.ui.ddmanager&&!this.options.dropBehaviour&&(i=V.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?V(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),V.ui.ddmanager&&V.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),V.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new V.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!V(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i="function"==typeof e.helper,t=i?V(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t,e;return"relative"!==this.cssPosition?{top:0,left:0}:(t=this.element.position(),e=this._isRootNode(this.scrollParent[0]),{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())})},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e=this.options,i=this.document[0];this.relativeContainer=null,e.containment?"window"===e.containment?this.containment=[V(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,V(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,V(window).scrollLeft()+V(window).width()-this.helperProportions.width-this.margins.left,V(window).scrollTop()+(V(window).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:"document"===e.containment?this.containment=[0,0,V(i).width()-this.helperProportions.width-this.margins.left,(V(i).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:e.containment.constructor===Array?this.containment=e.containment:("parent"===e.containment&&(e.containment=this.helper[0].parentNode),(e=(i=V(e.containment))[0])&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*t}},_generatePosition:function(t,e){var i,s=this.options,n=this._isRootNode(this.scrollParent[0]),o=t.pageX,a=t.pageY;return n&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),{top:(a=e&&(this.containment&&(i=this.relativeContainer?(e=this.relativeContainer.offset(),[this.containment[0]+e.left,this.containment[1]+e.top,this.containment[2]+e.left,this.containment[3]+e.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(a=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3])&&(a=i[3]+this.offset.click.top),s.grid&&(e=s.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,a=!i||e-this.offset.click.top>=i[1]||e-this.offset.click.top>i[3]?e:e-this.offset.click.top>=i[1]?e-s.grid[1]:e+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis)?this.originalPageY:a)-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),V.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),V.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),V.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=V.extend({},t,{item:i.element});i.sortables=[],V(i.options.connectToSortable).each(function(){var t=V(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=V.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,V.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){V.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,V.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&V.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,V.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,V.each(n.sortables,function(){this.refreshPositions()}))})}}),V.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=V("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&V("body").css("cursor",i._cursor)}}),V.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&V(e.helper).css("opacity",i._opacity)}}),V.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY<s.scrollSensitivity?o.scrollTop=n=o.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(o.scrollTop=n=o.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+o.offsetWidth-t.pageX<s.scrollSensitivity?o.scrollLeft=n=o.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(o.scrollLeft=n=o.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-V(a).scrollTop()<s.scrollSensitivity?n=V(a).scrollTop(V(a).scrollTop()-s.scrollSpeed):V(window).height()-(t.pageY-V(a).scrollTop())<s.scrollSensitivity&&(n=V(a).scrollTop(V(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-V(a).scrollLeft()<s.scrollSensitivity?n=V(a).scrollLeft(V(a).scrollLeft()-s.scrollSpeed):V(window).width()-(t.pageX-V(a).scrollLeft())<s.scrollSensitivity&&(n=V(a).scrollLeft(V(a).scrollLeft()+s.scrollSpeed)))),!1!==n&&V.ui.ddmanager&&!s.dropBehaviour&&V.ui.ddmanager.prepareOffsets(i,t)}}),V.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],V(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=V(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,n,o,a,r,l,h,c,u,d=i.options,p=d.snapTolerance,f=e.offset.left,g=f+i.helperProportions.width,m=e.offset.top,_=m+i.helperProportions.height,v=i.snapElements.length-1;0<=v;v--)l=(r=i.snapElements[v].left-i.margins.left)+i.snapElements[v].width,c=(h=i.snapElements[v].top-i.margins.top)+i.snapElements[v].height,g<r-p||l+p<f||_<h-p||c+p<m||!V.contains(i.snapElements[v].item.ownerDocument,i.snapElements[v].item)?(i.snapElements[v].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=!1):("inner"!==d.snapMode&&(s=Math.abs(h-_)<=p,n=Math.abs(c-m)<=p,o=Math.abs(r-g)<=p,a=Math.abs(l-f)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r-i.helperProportions.width}).left),a)&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),u=s||n||o||a,"outer"!==d.snapMode&&(s=Math.abs(h-m)<=p,n=Math.abs(c-_)<=p,o=Math.abs(r-f)<=p,a=Math.abs(l-g)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r}).left),a)&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),!i.snapElements[v].snapping&&(s||n||o||a||u)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=s||n||o||a||u)}}),V.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,i=i.options,i=V.makeArray(V(i.stack)).sort(function(t,e){return(parseInt(V(t).css("zIndex"),10)||0)-(parseInt(V(e).css("zIndex"),10)||0)});i.length&&(s=parseInt(V(i[0]).css("zIndex"),10)||0,V(i).each(function(t){V(this).css("zIndex",s+t)}),this.css("zIndex",s+i.length))}}),V.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("zIndex")&&(i._zIndex=e.css("zIndex")),e.css("zIndex",i.zIndex)},stop:function(t,e,i){i=i.options;i._zIndex&&V(e.helper).css("zIndex",i._zIndex)}}),V.ui.draggable,V.widget("ui.resizable",V.ui.mouse,{version:"1.1
24.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){var i=!1,s=V(t).css("overflow");if("hidden"===s)return!1;if("scroll"===s)return!0;if(0<t[s=e&&"left"===e?"scrollLeft":"scrollTop"])return!0;try{t[s]=1,i=0<t[s],t[s]=0}catch(t){}return i},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),V.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(V("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this._proportionallyResize()),this._setupHandles(),e.autoHide&&V(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){V(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,a=this;if(this.handles=o.handles||(V(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=V(),this._addedHandles=V(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),n=V("<div>"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=V(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=V(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?s.outerHeight():s.outerWidth(),i=["padding",/ne|nw|n
vendor: 4,452 bytes, line 2
2/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=V(this.handles[e])[0])!==t.target&&!V.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s,n=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),n.containment&&(e+=V(n.containment).scrollLeft()||0,i+=V(n.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this._helper||(s=this._calculateAdjustedElementDimensions(o)),this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width,height:s.height},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:s.width,height:s.height},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof n.aspectRatio?n.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=V(".ui-resizable-"+this.axis).css("cursor"),V("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(i=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),V.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(i=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,e=e?0:o.sizeDiff.width,e={width:o.helper.width()-e,height:o.helper.height()-i},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(V.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper)&&!n.animate&&this._proportionallyResize(),V("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.helper.css(t),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px",this.helper.width(t.width)),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px",this.helper.height(t.height)),t},_updateVirtualBoundaries:function(t){var e,i,s,n=this.options,n={minWidth:this._isNumber(n.minWidth)?n.minWidth:0,maxWidth:this._isNumber(n.maxWidth)?n.maxWidth:1/0,minHeight:this._isNumber(n.minHeight)?n.minHeight:0,maxHeight:this._isNumber(n.maxHeight)?n.maxHeight:1/0};(this._aspectRatio||t)&&(t=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,e=n.maxHeight*this.aspectRatio,s=n.maxWidth/this.aspectRatio,n.minWidth<t&&(n.minWidth=t),n.minHeight<i&&(n.minHeight=i),e<n.maxWidth&&(n.maxWidth=e),s<n.maxHeight)&&(n.maxHeight=s),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left
vendor: 6,375 bytes, line 2
2=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&i&&(t.top=l-e.minHeight),n&&i&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_calculateAdjustedElementDimensions:function(t){var e,i,s=t.get(0);return"content-box"!==t.css("box-sizing")||!this._hasScroll(s)&&!this._hasScroll(s,"left")?{height:parseFloat(t.css("height")),width:parseFloat(t.css("width"))}:(e=parseFloat(s.style.width),s=parseFloat(s.style.height),i=this._getPaddingPlusBorderDimensions(t),e=isNaN(e)?this._getElementTheoreticalSize(t,i,"width"):e,{height:isNaN(s)?this._getElementTheoreticalSize(t,i,"height"):s,width:e})},_getElementTheoreticalSize:function(t,e,i){return Math.max(0,Math.ceil(t.get(0)["offset"+i[0].toUpperCase()+i.slice(1)]-e[i]-.5))||0},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||V("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){V.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),V.ui.plugin.add("resizable","animate",{stop:function(e){var i=V(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,n=n?0:i.sizeDiff.width,n={width:i.size.width-n,height:i.size.height-o},o=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,a=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(V.extend(n,a&&o?{top:a,left:o}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&V(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),V.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,n=V(this).resizable("instance"),o=n.options,a=n.element,o=o.containment,a=o instanceof V?o.get(0):/parent/.test(o)?a.parent().get(0):o;a&&(n.containerElement=V(a),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:V(document),left:0,top:0,width:V(document).width(),height:V(document).height()||document.body.parentNode.scrollHeight}):(i=V(a),s=[],V(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},o=n.containerOffset,e=n.containerSize.height,t=n.containerSize.width,t=n._hasScroll(a,"left")?a.scrollWidth:t,e=n._hasScroll(a)?a.scrollHeight:e,n.parentData={element:a,left:o.left,top:o.top,width:t,height:e}))},resize:function(t){var e=V(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,t=e._aspectRatio||t.shiftKey,o={top:0,left:0},a=e.containerElement,r=!0;a[0]!==document&&/static/.test(a.css("position"))&&(o=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-o.left),t&&(e.size.height=e.size.width/e.aspectRatio,r=!1),e.position.left
vendor: 38,457 bytes, line 2
2=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),t&&(e.size.width=e.size.height*e.aspectRatio,r=!1),e.position.top=e._helper?s.top:0),a=e.containerElement.get(0)===e.element.parent().get(0),i=/relative|absolute/.test(e.containerElement.css("position")),a&&i?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-o.left:e.offset.left-s.left)),a=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-o.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,t)&&(e.size.height=e.size.width/e.aspectRatio,r=!1),a+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-a,t)&&(e.size.width=e.size.height*e.aspectRatio,r=!1),r||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=V(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=V(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o})}}),V.ui.plugin.add("resizable","alsoResize",{start:function(){var i=V(this).resizable("instance"),t=i.options;V(t.alsoResize).each(function(){var t=V(this),e=i._calculateAdjustedElementDimensions(t);t.data("ui-resizable-alsoresize",{width:e.width,height:e.height,left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=V(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,a={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};V(s.alsoResize).each(function(){var t=V(this),s=V(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];V.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){V(this).removeData("ui-resizable-alsoresize")}}),V.ui.plugin.add("resizable","ghost",{start:function(){var t=V(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!0===V.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=V(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=V(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),V.ui.plugin.add("resizable","grid",{resize:function(){var t,e=V(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,c=Math.round((s.width-n.width)/l)*l,s=Math.round((s.height-n.height)/h)*h,u=n.width+c,d=n.height+s,p=i.maxWidth&&i.maxWidth<u,f=i.maxHeight&&i.maxHeight<d,g=i.minWidth&&i.minWidth>u,m=i.minHeight&&i.minHeight>d;i.grid=r,g&&(u+=l),m&&(d+=h),p&&(u-=l),f&&(d-=h),/^(se|s|e)$/.test(a)?(e.size.width=u,e.size.height=d):/^(ne)$/.test(a)?(e.size.width=u,e.size.height=d,e.position.top=o.top-s):/^(sw)$/.test(a)?(e.size.width=u,e.size.height=d,e.position.left=o.left-c):((d-h<=0||u-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<d-h?(e.size.height=d,e.position.top=o.top-s):(d=h-t.height,e.size.height=d,e.position.top=o.top+n.height-d),0<u-l?(e.size.width=u,e.position.left=o.left-c):(u=l-t.width,e.size.width=u,e.position.left=o.left+n.width-u))}}),V.ui.resizable,V.widget("ui.dialog",{version:"1.14.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=V(this).css(t).offset().top;e<0&&V(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,uiDialogTitleHeadingLevel:0,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&V.fn.draggable&&this._makeDraggable(),this.options.resizable&&V.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?V(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:V.noop,enable:V.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||V(this.document[0].activeElement).trigger("blur"),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+V(this).css("z-index")}).get(),s=Math.max.apply(null,s);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=V(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;(t=(t=(t=(t=(t=t||this.element.find("[autofocus]")).length?t:this.element.find(":tabbable")).length?t:this.uiDialogButtonPane.find(":tabbable")).length?t:this.uiDialogTitlebarClose.filter(":tabbable")).length?t:this.uiDialog).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=this.document[0].activeElement;this.uiDialog[0]===t||V.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus()},_createWrapper:function(){this.uiDialog=V("<div>").hide().attr({tabIndex:-1,role:"dialog","aria-modal":this.options.modal?"true":null}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){var e,i,s;this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===V.ui.keyCode.ESCAPE?(t.preventDefault(),this.close(t)):t.keyCode!==V.ui.keyCode.TAB||t.isDefaultPrevented()||(e=this.uiDialog.find(":tabbable"),i=e.first(),s=e.last(),t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault()))},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){this.uiDialogTitlebar=V("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){V(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=V("<button type='button'></button>").button({label:V("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}});var t=Number.isInteger(this.options.uiDialogTitleHeadingLevel)&&0<this.options.uiDialogTitleHeadingLevel&&this.options.uiDialogTitleHeadingLevel<=6?"h"+this.options.uiDialogTitleHeadingLevel:"span",t=V("<"+t+">").uniqueId().prependTo(this.uiDialogTitlebar);this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=V("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=V("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var s=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),V.isEmptyObject(t)||Array.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(V.each(t,function(t,e){var i;e=V.extend({type:"button"},e="function"==typeof e?{click:e,text:t}:e),i=e.click,t={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,V("<button></button>",e).button(t).appendTo(s.uiButtonSet).on("click",function(){i.apply(s.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var n=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){n._addClass(V(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",t,a(e))},drag:function(t,e){n._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-n.document.scrollLeft(),s=e.offset.top-n.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=s?"+":"")+s,of:n.window},n._removeClass(V(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var n=this,o=this.options,t=o.resizable,e=this.uiDialog.css("position"),t="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:t,start:function(t,e){n._addClass(V(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",t,a(e))},resize:function(t,e){n._trigger("resize",t,a(e))},stop:function(t,e){var i=n.uiDialog.offset(),s=i.left-n.document.scrollLeft(),i=i.top-n.document.scrollTop();o.height=n.uiDialog.height(),o.width=n.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=s?"+":"")+s+" top"+(0<=i?"+":"")+i,of:n.window},n._removeClass(V(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",t,a(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=V(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=V.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||this.document.data("ui-dialog-instances",t=[]),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};V.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:V("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!e&&s.draggable("destroy"),!i)&&e&&this._makeDraggable(),"position"===t&&this._position(),"resizable"===t&&((i=s.is(":data(ui-resizable)"))&&!e&&s.resizable("destroy"),i&&"string"==typeof e&&s.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")),"modal"===t)&&s.attr("aria-modal",e?"true":null)},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=V(this);return V("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!V(t.target).closest(".ui-dialog").length||!!V(t.target).closest(".ui-datepicker").length},_createOverlay:function(){var i;this.options.modal&&(i=!0,this._delay(function(){i=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(t){var e;i||(e=this._trackingInstances()[0])._allowInteraction(t)||(t.preventDefault(),e._focusTabbable())}.bind(this)),this.overlay=V("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var t;this.options.modal&&this.overlay&&((t=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!0===V.uiBackCompat&&V.widget("ui.dialog",V.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),V.ui.dialog;function rt(t,e,i){return e<=t&&t<e+i}V.widget("ui.droppable",{version:"1.14.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t=t||{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){V.ui.ddmanager.droppables[t]=V.ui.ddmanager.droppables[t]||[],V.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=V.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept="function"==typeof e?e:function(t){return t.is(e)}:"scope"===t&&(i=V.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=V.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=V.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||V.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0]||(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=V(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&V.ui.intersect(i,V.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),s)||!this.accept.call(this.element[0],i.currentItem||i.element))&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),V.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var n=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,a=n+t.helperProportions.width,r=o+t.helperProportions.height,l=e.offset.left,h=e.offset.top,c=l+e.proportions().width,u=h+e.proportions().height;switch(i){case"fit":return l<=n&&a<=c&&h<=o&&r<=u;case"intersect":return l<n+t.helperProportions.width/2&&a-t.helperProportions.width/2<c&&h<o+t.helperProportions.height/2&&r-t.helperProportions.height/2<u;case"pointer":return rt(s.pageY,h,e.proportions().height)&&rt(s.pageX,l,e.proportions().width);case"touch":return(h<=o&&o<=u||h<=r&&r<=u||o<h&&u<r)&&(l<=n&&n<=c||l<=a&&a<=c||n<l&&c<a);default:return!1}},V.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,n=V.ui.ddmanager.droppables[t.options.scope]||[],o=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<n.length;i++)if(!(n[i].options.disabled||t&&!n[i].accept.call(n[i].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===n[i].element[0]){n[i].proportions().height=0;continue t}n[i].visible="none"!==n[i].element.css("display"),n[i].visible&&("mousedown"===o&&n[i]._activate.call(n[i],e),n[i].offset=n[i].element.offset(),n[i].proportions({width:n[i].element[0].offsetWidth,height:n[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return V.each((V.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&V.ui.intersect(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled)&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,o){n.options.refreshPositions&&V.ui.ddmanager.prepareOffsets(n,o),V.each(V.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s;this.options.disabled||this.greedyChild||!this.visible||(s=!(s=V.ui.intersect(n,this,this.options.tolerance,o))&&this.isover?"isout":s&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return V(this).droppable("instance").options.scope===e})).length)&&((t=V(i[0]).droppable("instance")).greedyChild="isover"===s),t&&"isover"===s&&(t.isover=!1,t.isout=!0,t._out.call(t,o)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,o),t)&&"isout"===s&&(t.isout=!1,t.isover=!0,t._over.call(t,o))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)}},!0===V.uiBackCompat&&V.widget("ui.droppable",V.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});V.ui.droppable,V.widget("ui.progressbar",{version:"1.14.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=V("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=V("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),V.widget("ui.selectable",V.ui.mouse,{version:"1.14.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var i=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){i.elementPos=V(i.element[0]).offset(),i.selectees=V(i.options.filter,i.element[0]),i._addClass(i.selectees,"ui-selectee"),i.selectees.each(function(){var t=V(this),e=t.offset(),e={left:e.left-i.elementPos.left,top:e.top-i.elementPos.top};V.data(this,"selectable-item",{element:this,$element:t,left:e.left,top:e.top,right:e.left+t.outerWidth(),bottom:e.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=V("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=V(this.element[0]).offset(),this.options.disabled||(this.selectees=V(t.filter,this.element[0]),this._trigger("start",i),V(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=V.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),V(i.target).parents().addBack().each(function(){var t,e=V.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){var t,n,o,a,r,l,h;if(this.dragged=!0,!this.options.disabled)return o=(n=this).options,a=this.opos[0],r=this.opos[1],(l=s.pageX)<a&&(t=l,l=a,a=t),(h=s.pageY)<r&&(t=h,h=r,r=t),this.helper.css({left:a,top:r,width:l-a,height:h-r}),this.selectees.each(function(){var t=V.data(this,"selectable-item"),e=!1,i={};t&&t.element!==n.element[0]&&(i.left=t.left+n.elementPos.left,i.right=t.right+n.elementPos.left,i.top=t.top+n.elementPos.top,i.bottom=t.bottom+n.elementPos.top,"touch"===o.tolerance?e=!(l<i.left||i.right<a||h<i.top||i.bottom<r):"fit"===o.tolerance&&(e=a<i.left&&i.right<l&&r<i.top&&i.bottom<h),e?(t.selected&&(n._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(n._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(n._addClass(t.$element,"ui-selecting"),t.selecting=!0,n._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,n._addClass(t.$element,"ui-selected"),t.selected=!0):(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),n._trigger("unselecting",s,{unselecting:t.element}))),!t.selected||s.metaKey||s.ctrlKey||t.startselected||(n._removeClass(t.$element,"ui-selected"),t.selected=!1,n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,n._trigger("unselecting",s,{unselecting:t.element}))))}),!1},_mouseStop:function(e){var i=this;return this.dragged=!1,V(".ui-unselecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),V(".ui-selecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),V.widget("ui.selectmenu",[V.ui.formResetMixin,{version:"1.14.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=V()},_drawButton:function(){var t,e=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.trigger("focus"),t.preventDefault()}}),this.element.hide(),this.button=V("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=V("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=V("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=V("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),i._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){e=e.item.data("ui-selectmenu-item");null!=i.focusIndex&&e.index!==i.focusIndex&&(i._trigger("focus",t,{item:e}),i.isOpen||i._select(e,t)),i.focusIndex=e.index,i.button.attr("aria-activedescendant",i.menuItems.eq(e.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(V.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=V("<span>");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(s,t){var n=this,o="";V.each(t,function(t,e){var i;e.optgroup!==o&&(i=V("<li>",{text:e.optgroup}),n._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(s),o=e.optgroup),n._renderItemData(s,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var i=V("<li>"),s=V("<div>",{title:e.element.attr("title")});return e.disabled&&this._addClass(i,null,"ui-state-disabled"),e.hidden?i.prop("hidden",!0):this._setText(s,e.label),i.append(s).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(i="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&((t=window.getSelection()).removeAllRanges(),t.addRange(this.range))},_documentClick:{mousedown:function(t){!this.isOpen||V(t.target).closest(".ui-selectmenu-menu, #"+CSS.escape(this.ids.button)).length||this.close(t)}},_buttonEvents:{mousedown:function(){var t=window.getSelection();t.rangeCount&&(this.range=t.getRangeAt(0))},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case V.ui.keyCode.TAB:case V.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case V.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case V.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case V.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case V.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case V.ui.keyCode.LEFT:this._move("prev",t);break;case V.ui.keyCode.RIGHT:this._move("next",t);break;case V.ui.keyCode.HOME:case V.ui.keyCode.PAGE_UP:this._move("first",t);break;case V.ui.keyCode.END:case V.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){t=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(t,e){var i;"icons"===t&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t=(t=(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))&&t[0]?t:this.element.closest(".ui-front, dialog")).length?t:this.document[0].body},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1===t?this.button.css("width",""):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var i=this,s=[];t.each(function(t,e){s.push(i._parseOption(V(e),t))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),hidden:i.prop("hidden")||t.prop("hidden"),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),V.widget("ui.slider",V.ui.mouse,{version:"1.14.1
vendor: 10,399 bytes, line 2
2",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e=this.options,i=this.element.find(".ui-slider-handle"),s=[],n=e.values&&e.values.length||1;for(i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),t=i.length;t<n;t++)s.push("<span tabindex='0'></span>");this.handles=i.add(V(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){V(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=V("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,o,e,a,r=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-r.values(t));(e<s||s===e&&(t===r._lastChangedValue||r.values(t)===l.min))&&(s=e,n=V(this),o=t)}),!1!==this._start(t,o))&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(n,null,"ui-state-active"),n.trigger("focus"),e=n.offset(),a=!V(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:t.pageX-e.left-n.width()/2,top:t.pageY-e.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,i),this._animateOff=!0)},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},e=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,e),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,t="horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=t/e;return(t=1<t?1:t)<0&&(t=0),"vertical"===this.orientation&&(t=1-t),e=this._valueMax()-this._valueMin(),t=this._valueMin()+t*e,this._trimAlignValue(t)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0)},values:function(t,e){var i,s,n;if(1<arguments.length)this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),this._change(null,t);else{if(!arguments.length)return this._values();if(!Array.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,s=t,n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()}},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,i;if(arguments.length)return t=this.options.values[t],this._trimAlignValue(t);if(this._hasMultipleValues()){for(e=this.options.values.slice(),i=0;i<e.length;i+=1)e[i]=this._trimAlignValue(e[i]);return e}return[]},_trimAlignValue:function(t){var e,i;return t<=this._valueMin()?this._valueMin():t>=this._valueMax()?this._valueMax():(e=0<this.options.step?this.options.step:1,i=t-(t=(t-this._valueMin())%e),2*Math.abs(t)>=e&&(i+=0<t?e:-e),parseFloat(i.toFixed(5)))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var t=t.toString(),e=t.indexOf(".");return-1===e?0:t.length-e-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,l=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,h["horizontal"===r.orientation?"left":"bottom"]=i+"%",V(this).stop(1,1)[l?"animate":"css"](h,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,s,n=V(t.target).data("ui-slider-handle-index");switch(t.keyCode){case V.ui.keyCode.HOME:case V.ui.keyCode.END:case V.ui.keyCode.PAGE_UP:case V.ui.keyCode.PAGE_DOWN:case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(t.preventDefault(),this._keySliding||(this._keySliding=!0,this._addClass(V(t.target),null,"ui-state-active"),!1!==this._start(t,n)))break;return}switch(s=this.options.step,e=i=this._hasMultipleValues()?this.values(n):this.value(),t.keyCode){case V.ui.keyCode.HOME:i=this._valueMin();break;case V.ui.keyCode.END:i=this._valueMax();break;case V.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},keyup:function(t){var e=V(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(V(t.target),null,"ui-state-active"))}}}),V.widget("ui.sortable",V.ui.mouse,{version:"1.1
24.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),V.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(t),V(t.target).parents().each(function(){if(V.data(this,n.widgetName+"-item")===n)return i=V(this),!1}),!(i=V.data(t.target,n.widgetName+"-item")===n?V(t.target):i))||(this.options.handle&&!e&&(V(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s)||(this.currentItem=i,this._removeCurrentsFromItems(),0)))},_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.appendTo=V("parent"!==o.appendTo?o.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},V.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),V.extend(this.offset,{parent:this._getParentOffset()}),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this._
vendor: 21,090 bytes, line 2
2storedStylesheet=V("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return V.ui.ddmanager&&(V.ui.ddmanager.current=this),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(t){var e,i,s,n,o=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),o.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),V.ui.ddmanager)&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||V.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&V.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,n,o;if(t)return V.ui.ddmanager&&!this.options.dropBehaviour&&V.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),o={},(n=this.options.axis)&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,V(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new V.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),V.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?V(this.domPosition.prev).after(this.currentItem):V(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},V(t).each(function(){var t=(V(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(V(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||r<s+h&&s+h<l,c="y"===this.options.axis||o<e+c&&e+c<a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h&&c:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this.dragDirection.vertical,t=this.dragDirection.horizontal,this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),t=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this.dragDirection.vertical,s=this.dragDirection.horizontal;return this.floating&&s?"right"===s&&t||"left"===s&&!t:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],a=[],r=this._connectWith();if(r&&t)for(e=r.length-1;0<=e;e--)for(i=(s=V(r[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&a.push(["function"==typeof n.options.items?n.options.items.call(n.element):V(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);function l(){o.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):V(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(l);return V(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=V.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,a,r,l,h=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):V(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=V(u[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push(["function"==typeof n.options.items?n.options.items.call(n.element[0],t,{item:this.currentItem}):V(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],l=(a=c[e][i=0]).length;i<l;i++)(r=V(a[i])).data(this.widgetName+"-item",o),h.push({item:r,instance:o,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){for(var e,i,s=this.items.length-1;0<=s;s--)e=this.items[s],this.currentContainer&&e.instance!==this.currentContainer&&e.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?V(this.options.toleranceElement,e.item):e.item,t||(e.width=i.outerWidth(),e.height=i.outerHeight()),i=i.offset(),e.left=i.left,e.top=i.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,n=i.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var t=V("<"+n+">",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),V("<tr>",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width())||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10))}}),i.placeholder=V(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){V("<td>&#160;</td>",i.document[0]).attr("colspan",V(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)V.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&V.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)V.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[h]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[h]-a)<i)&&(i=Math.abs(t[h]-a),s=this.items[e],this.direction=r?"up":"down");(s||this.options.dropOnEmpty)&&(this.currentContainer===this.containers[u]?this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1):(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[u].element,!0),this._trigger("change",t,this._uiHash()),this.containers[u]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1))}},_createHelper:function(t){var e=this.options,t="function"==typeof e.helper?V(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||this.appendTo[0].appendChild(t[0]),t[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t;return"relative"===this.cssPosition?{top:(t=this.currentItem.position()).top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}:{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=V(i.containment)[0],i=V(i.containment).offset(),e="hidden"!==V(t).css("overflow"),this.containment=[i.left+(parseInt(V(t).css("borderLeftWidth"),10)||0)+(parseInt(V(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(V(t).css("borderTopWidth"),10)||0)+(parseInt(V(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(e?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(V(t).css("borderLeftWidth"),10)||0)-(parseInt(V(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(e?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(V(t).css("borderTopWidth"),10)||0)-(parseInt(V(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(i[0].tagName);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:i.scrollTop())*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:i.scrollLeft())*t}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3])&&(s=this.containment[3]+this.offset.click.top),e.grid)&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0]),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this===this.currentContainer||e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.
vendor: 22,953 bytes, line 2
2_storedStylesheet&&(this._storedStylesheet.remove(),this._storedStylesheet=null),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===V.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||V([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});function O(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}V.widget("ui.spinner",{version:"1.14.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var s=this._super(),n=this.element;return V.each(["min","max","step"],function(t,e){var i=n.attr(e);null!=i&&i.length&&(s[e]=i)}),s},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t)},mousewheel:function(t,e){var i=this.document[0].activeElement;if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;e=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),function(){this.element[0]!==this.document[0].activeElement&&(this.element.trigger("focus"),this.previous=e)}.call(this),!1!==this._start(t)&&this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(V(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,i=V.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?"function"==typeof e?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var t=t.toString(),e=t.indexOf(".");return-1===e?0:t.length-e-1},_adjustValue:function(t){var e=this.options,i=null!==e.min?e.min:0,s=t-i;return t=i+Math.round(s/e.step)*e.step,t=parseFloat(t.toFixed(this._precision())),null!==e.max&&t>e.max?e.max:null!==e.min&&t<e.min?e.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i;"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i))):("max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,e.up),i=this.buttons.last().find(".ui-icon"),this._removeClass(i,null,this.options.icons.down),this._addClass(i,null,e.down)),this._super(t,e))},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:O(function(t){this._super(t)}),_parse:function(t){return""===(t="string"==typeof t&&""!==t?window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t:t)||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:O(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:O(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:O(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:O(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());O(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!0===V.uiBackCompat&&V.widget("ui.spinner",V.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var A;V.ui.spinner,V.widget("ui.tabs",{version:"1.14.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(A=/#.*$/,function(t){var e=t.href.replace(A,""),i=location.href.replace(A,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=V.uniqueSort(t.disabled.concat(V.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=V(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=decodeURIComponent(location.hash.substring(1));return null===i&&(s&&this.tabs.each(function(t,e){if(V(e).attr("aria-controls")===s)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):V()}},_tabKeydown:function(t){var e=V(this.document[0].activeElement).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:i++;break;case V.ui.keyCode.UP:case V.ui.keyCode.LEFT:s=!1,i--;break;case V.ui.keyCode.END:i=this.anchors.length-1;break;case V.ui.keyCode.HOME:i=0;break;case V.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case V.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===V.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===V.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===V.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==V.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"===t?this._activate(e):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e))},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=V.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!V.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=V()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=V()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var r=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){V(this).is(".ui-state-disabled")&&t.preventDefault()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return V("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=V(),this.anchors.each(function(t,e){var i,s,n=V(e).uniqueId().attr("id"),o=V(e).closest("li"),a=o.attr("aria-controls");r._isLocal(e)?(s=decodeURIComponent(e.hash).substring(1),i=r.element.find("#"+CSS.escape(s))):(s=o.attr("aria-controls")||V({}).uniqueId()[0].id,(i=r.element.find("#"+s)).length||(i=r._createPanel(s)).insertAfter(r.panels[t-1]||r.tablist),i.attr("aria-live","polite")),i.length&&(r.panels=r.panels.add(i)),a&&o.data("ui-tabs-aria-controls",a),o.attr({"aria-controls":s,"aria-labelledby":n}),i.attr("aria-labelledby",n)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return V("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=V(e),!0===t||-1!==V.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=V(this).outerHeight(!0)}),this.panels.each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,V(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):V(),i={oldTab:i,oldPanel:r,newTab:o?V():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?V():s,this.xhr&&this.xhr.abort(),r.length||a.length||V.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===V(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=t.length?t:this.active).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return!1===t?V():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+CSS.escape(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){V.data(this,"ui-tabs-destroy")?V(this).remove():V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=V(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?V.map(t,function(t){return t!==i?t:null}):V.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==V.inArray(t,e))return;e=Array.isArray(e)?V.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=V.ajax(this._ajaxSettings(t,s,r)),"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){a.html(t),o._trigger("load",s,r),n(i,e)}).fail(function(t,e){n(t,e)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,e){return n._trigger("beforeLoad",i,V.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=V(t).attr("aria-controls");return this.element.find("#"+CSS.escape(t))}}),!0===V.uiBackCompat&&V.widget("ui.tabs",V.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),V.ui.tabs,V.widget("ui.tooltip",{version:"1.14.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=V(this).attr("title");return V("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),e=V.inArray(e,i);-1!==e&&i.splice(e,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=V("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=V([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&V.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=V(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=V(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=V([])},open:function(t){var i=this,e=V(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=V(this);e.data("ui-tooltip-open")&&((t=V.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t=this.options.content,s=this,n=i?i.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(i,e,t);(t=t.call(e[0],function(t){e.data("ui-tooltip-open")&&(i&&(i.type=n),s._open(i,e,t))}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a=V.extend({},this.options.position);function r(t){a.of=t,s.is(":hidden")||s.position(a)}i&&((o=this._find(e))?o.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),o=this._tooltip(e),s=o.tooltip,this._addDescribedBy(e,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(o=V("<div>").html(s.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),o.removeAttr("id").find("[id]").removeAttr("id"),o.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):s.position(V.extend({of:e},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(n=this.delayedShow=setInterval(function(){s.is(":visible")&&(r(a.of),clearInterval(n))},13)),this._trigger("open",t,{tooltip:s}
2)))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){t.keyCode===V.ui.keyCode.ESCAPE&&((t=V.Event(t)).currentTarget=e[0],this.close(t,!0))}};e[0]!==this.element[0]&&(i.remove=function(){var t=this._find(e);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,s=V(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(V(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&V.each(this.parents,function(t,e){V(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding)||(n.closing=!1)):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=V("<div>").attr("role","tooltip"),i=V("<div>").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=t.length?t:this.document[0].body},_destroy:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur"),e=e.element;i.target=i.currentTarget=e[0],s.close(i,!0),V("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title")||e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!0===V.uiBackCompat&&V.widget("ui.tooltip",V.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),V.ui.tooltip});!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);;(function($){"use strict";var feature={};feature.fileapi=$("<input type='file'/>").get(0).files!==undefined;feature.formdata=window.FormData!==undefined;$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;}
3var method,action,url,$form=this;if(typeof options=='function'){options={success:options};}
4method=this.attr('method');action=this.attr('action');url=(typeof action==='string')?$.trim(action):'';url=url||window.location.href||'';if(url){url=(url.match(/^([^#]+)/)||[])[1];}
5options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||'GET',iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},options);var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}
6if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;}
7var traditional=options.traditional;if(traditional===undefined){traditional=$.ajaxSettings.traditional;}
8var elements=[];var qx,a=this.formToArray(options.semantic,elements);if(options.data){options.extraData=options.data;qx=$.param(options.data,traditional);}
9if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}
10this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}
11var q=$.param(a,traditional);if(qx){q=(q?(q+'&'+qx):qx);}
12if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
13else{options.data=q;}
14var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});}
15if(options.clearForm){callbacks.push(function(){$form.clearForm(options.includeHidden);});}
16if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(oldSuccess,arguments);});}
17else if(options.success){callbacks.push(options.success);}
18options.success=function(data,status,xhr){var context=options.context||options;for(var i=0,max=callbacks.length;i<max;i++){callbacks[i].apply(context,[data,status,xhr||$form,$form]);}};var fileInputs=$('input:file:enabled[value]',this);var hasFileInputs=fileInputs.length>0;var mp='multipart/form-data';var multipart=($form.attr('enctype')==mp||$form.attr('encoding')==mp);var fileAPI=feature.fileapi&&feature.formdata;log("fileAPI :"+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;if(options.iframe!==false&&(options.iframe||shouldUseFrame)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){fileUploadIframe(a);});}
19else{fileUploadIframe(a);}}
20else if((hasFileInputs||multipart)&&fileAPI){fileUploadXhr(a);}
21else{$.ajax(options);}
22for(var k=0;k<elements.length;k++)
23elements[k]=null;this.trigger('form-submit-notify',[this,options]);return this;function fileUploadXhr(a){var formdata=new FormData();for(var i=0;i<a.length;i++){formdata.append(a[i].name,a[i].value);}
24if(options.extraData){for(var p in options.extraData)
25if(options.extraData.hasOwnProperty(p))
26formdata.append(p,options.extraData[p]);}
27options.data=null;var s=$.extend(true,{},$.ajaxSettings,options,{contentType:false,processData:false,cache:false,type:'POST'});if(options.uploadProgress){s.xhr=function(){var xhr=jQuery.ajaxSettings.xhr();if(xhr.upload){xhr.upload.onprogress=function(event){var percent=0;var position=event.loaded||event.position;var total=event.total;if(event.lengthComputable){percent=Math.ceil(position/total*100);}
28options.uploadProgress(event,position,total,percent);};}
29return xhr;};}
30s.data=null;var beforeSend=s.beforeSend;s.beforeSend=function(xhr,o){o.data=formdata;if(beforeSend)
31beforeSend.call(o,xhr,options);};$.ajax(s);}
32function fileUploadIframe(a){var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;var useProp=!!$.fn.prop;if($(':input[name=submit],:input[id=submit]',form).length){alert('Error: Form elements must not have name or id of "submit".');return;}
33if(a){for(i=0;i<elements.length;i++){el=$(elements[i]);if(useProp)
34el.prop('disabled',false);else
35el.removeAttr('disabled');}}
36s=$.extend(true,{},$.ajaxSettings,options);s.context=s.context||s;id='jqFormIO'+(new Date().getTime());if(s.iframeTarget){$io=$(s.iframeTarget);n=$io.attr('name');if(!n)
37$io.attr('name',id);else
38id=n;}
39else{$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'" />');$io.css({position:'absolute',top:'-1000px',left:'-1000px'});}
40io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==='timeout'?'timeout':'aborted');log('aborting upload... '+e);this.aborted=1;$io.attr('src',s.iframeSrc);xhr.error=e;if(s.error)
41s.error.call(s.context,xhr,e,status);if(g)
42$.event.trigger("ajaxError",[xhr,s,e]);if(s.complete)
43s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&0===$.active++){$.event.trigger("ajaxStart");}
44if(g){$.event.trigger("ajaxSend",[xhr,s]);}
45if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}
46return;}
47if(xhr.aborted){return;}
48sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+'.x']=form.clk_x;s.extraData[n+'.y']=form.clk_y;}}}
49var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=frame.contentWindow?frame.contentWindow.document:frame.contentDocument?frame.contentDocument:frame.document;return doc;}
50var csrf_token=$('meta[name=csrf-token]').attr('content');var csrf_param=$('meta[name=csrf-param]').attr('content');if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token;}
51function doSubmit(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(!method){form.setAttribute('method','POST');}
52if(a!=s.url){form.setAttribute('action',s.url);}
53if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});}
54if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);}
55function checkState(){try{var state=getDoc(io).readyState;log('state = '+state);if(state&&state.toLowerCase()=='uninitialized')
56setTimeout(checkState,50);}
57catch(e){log('Server abort: ',e,' (',e.name,')');cb(SERVER_ABORT);if(timeoutHandle)
58clearTimeout(timeoutHandle);timeoutHandle=undefined;}}
59var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){if(s.extraData.hasOwnProperty(n)){extraInputs.push($('<input type="hidden" name="'+n+'">').attr('value',s.extraData[n]).appendTo(form)[0]);}}}
60if(!s.iframeTarget){$io.appendTo('body');if(io.attachEvent)
61io.attachEvent('onload',cb);else
62io.addEventListener('load',cb,false);}
63setTimeout(checkState,15);form.submit();}
64finally{form.setAttribute('action',a);if(t){form.setAttribute('target',t);}else{$form.removeAttr('target');}
65$(extraInputs).remove();}}
66if(s.forceSync){doSubmit();}
67else{setTimeout(doSubmit,10);}
68var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return;}
69try{doc=getDoc(io);}
70catch(ex){log('cannot access response document: ',ex);e=SERVER_ABORT;}
71if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort('timeout');return;}
72else if(e==SERVER_ABORT&&xhr){xhr.abort('server abort');return;}
73if(!doc||doc.location.href==s.iframeSrc){if(!timedOut)
74return;}
75if(io.detachEvent)
76io.detachEvent('onload',cb);else
77io.removeEventListener('load',cb,false);var status='success',errMsg;try{if(timedOut){throw'timeout';}
78var isXml=s.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}}
79var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml)
80s.dataType='xml';xhr.getResponseHeader=function(header){var headers={'content-type':s.dataType};return headers[header];};if(docRoot){xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;}
81var dt=(s.dataType||'').toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName('textarea')[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute('status'))||xhr.status;xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;}
82else if(scr){var pre=doc.getElementsByTagName('pre')[0];var b=doc.getElementsByTagName('body')[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText;}
83else if(b){xhr.responseText=b.textContent?b.textContent:b.innerText;}}}
84else if(dt=='xml'&&!xhr.responseXML&&xhr.responseText){xhr.responseXML=toXml(xhr.responseText);}
85try{data=httpData(xhr,dt,s);}
86catch(e){status='parsererror';xhr.error=errMsg=(e||status);}}
87catch(e){log('error caught: ',e);status='error';xhr.error=errMsg=(e||status);}
88if(xhr.aborted){log('upload aborted');status=null;}
89if(xhr.status){status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?'success':'error';}
90if(status==='success'){if(s.success)
91s.success.call(s.context,data,'success',xhr);if(g)
92$.event.trigger("ajaxSuccess",[xhr,s]);}
93else if(status){if(errMsg===undefined)
94errMsg=xhr.statusText;if(s.error)
95s.error.call(s.context,xhr,status,errMsg);if(g)
96$.event.trigger("ajaxError",[xhr,s,errMsg]);}
97if(g)
98$.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");}
99if(s.complete)
100s.complete.call(s.context,xhr,status);callbackProcessed=true;if(s.timeout)
101clearTimeout(timeoutHandle);setTimeout(function(){if(!s.iframeTarget)
102$io.remove();xhr.responseXML=null;},100);}
103var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
104else{doc=(new DOMParser()).parseFromString(s,'text/xml');}
105return(doc&&doc.documentElement&&doc.documentElement.nodeName!='parsererror')?doc:null;};var parseJSON=$.parseJSON||function(s){return window['eval']('('+s+')');};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader('content-type')||'',xml=type==='xml'||!type&&ct.indexOf('xml')>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==='parsererror'){if($.error)
106$.error('parsererror');}
107if(s&&s.dataFilter){data=s.dataFilter(data,type);}
108if(typeof data==='string'){if(type==='json'||!type&&ct.indexOf('json')>=0){data=parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){$.globalEval(data);}}
109return data;};}};$.fn.ajaxForm=function(options){options=options||{};options.delegation=options.delegation&&$.isFunction($.fn.on);if(!options.delegation&&this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log('DOM not ready, queuing ajaxForm');$(function(){$(o.s,o.c).ajaxForm(options);});return this;}
110log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}
111if(options.delegation){$(document).off('submit.form-plugin',this.selector,doAjaxSubmit).off('click.form-plugin',this.selector,captureSubmittingElement).on('submit.form-plugin',this.selector,options,doAjaxSubmit).on('click.form-plugin',this.selector,options,captureSubmittingElement);return this;}
112return this.ajaxFormUnbind().bind('submit.form-plugin',options,doAjaxSubmit).bind('click.form-plugin',options,captureSubmittingElement);};function doAjaxSubmit(e){var options=e.data;if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(options);}}
113function captureSubmittingElement(e){var target=e.target;var $el=$(target);if(!($el.is(":submit,input:image"))){var t=$el.closest(':submit');if(t.length===0){return;}
114target=t[0];}
115var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!==undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}}
116setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);}
117$.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic,elements){var a=[];if(this.length===0){return a;}
118var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els){return a;}
119var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n){continue;}
120if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val(),type:el.type});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}
121continue;}
122v=$.fieldValue(el,true);if(v&&v.constructor==Array){if(elements)
123elements.push(el);for(j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}
124else if(feature.fileapi&&el.type=='file'&&!el.disabled){if(elements)
125elements.push(el);var files=el.files;if(files.length){for(j=0;j<files.length;j++){a.push({name:n,value:files[j],type:el.type});}}
126else{a.push({name:n,value:'',type:el.type});}}
127else if(v!==null&&typeof v!='undefined'){if(elements)
128elements.push(el);a.push({name:n,value:v,type:el.type,required:el.required});}}
129if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0];n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
130return a;};
130$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return;}
131var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}
132else if(v!==null&&typeof v!='undefined'){a.push({name:this.name,value:v});}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length)){continue;}
133if(v.constructor==Array)
134$.merge(val,v);else
135val.push(v);}
136return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(successful===undefined){successful=true;}
137if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1)){return null;}
138if(tag=='select'){var index=el.selectedIndex;if(index<0){return null;}
139var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes['value']&&!(op.attributes['value'].specified))?op.text:op.value;}
140if(one){return v;}
141a.push(v);}}
142return a;}
143return $(el).val();};$.fn.clearForm=function(includeHidden){return this.each(function(){$('input,select,textarea',this).clearFields(includeHidden);});};$.fn.clearFields=$.fn.clearInputs=function(includeHidden){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag=='textarea'){this.value='';}
144else if(t=='checkbox'||t=='radio'){this.checked=false;}
145else if(tag=='select'){this.selectedIndex=-1;}
146else if(includeHidden){if((includeHidden===true&&/hidden/.test(t))||(typeof includeHidden=='string'&&$(this).is(includeHidden)))
147this.value='';}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}
148return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select===undefined){select=true;}
149return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio'){this.checked=select;}
150else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false);}
151this.selected=select;}});};$.fn.ajaxSubmit.debug=false;function log(){if(!$.fn.ajaxSubmit.debug)
152return;var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');if(window.console&&window.console.log){window.console.log(msg);}
153else if(window.opera&&window.opera.postError){window.opera.postError(msg);}}})(jQuery);if(typeof Object.create!=='function'){Object.create=function(obj){function F(){};F.prototype=obj;return new F();};}
154(function($,window,document,undefined){var ElevateZoom={init:function(options,elem){var self=this;self.elem=elem;self.$elem=$(elem);self.imageSrc=self.$elem.data("zoom-image")?self.$elem.data("zoom-image"):self.$elem.attr("src");self.options=$.extend({},$.fn.elevateZoom.options,options);if(self.options.tint){self.options.lensColour="none",self.options.lensOpacity="1"}
155if(self.options.zoomType=="inner"){self.options.showLens=false;}
156self.$elem.parent().removeAttr('title').removeAttr('alt');self.zoomImage=self.imageSrc;self.refresh(1);$('#'+self.options.gallery+' a').click(function(e){if(self.options.galleryActiveClass){$('#'+self.options.gallery+' a').removeClass(self.options.galleryActiveClass);$(this).addClass(self.options.galleryActiveClass);}
157e.preventDefault();if($(this).data("zoom-image")){self.zoomImagePre=$(this).data("zoom-image")}
158else{self.zoomImagePre=$(this).data("image");}
159self.swaptheimage($(this).data("image"),self.zoomImagePre);return false;});},refresh:function(length){var self=this;setTimeout(function(){self.fetch(self.imageSrc);},length||self.options.refresh);},fetch:function(imgsrc){var self=this;var newImg=new Image();newImg.onload=function(){self.largeWidth=newImg.width;
159self.largeHeight=newImg.height;self.startZoom();self.currentImage=self.imageSrc;self.options.onZoomedImageLoaded(self.$elem);}
160newImg.src=imgsrc;return;},startZoom:function(){var self=this;self.nzWidth=self.$elem.width();self.nzHeight=self.$elem.height();self.isWindowActive=false;self.isLensActive=false;self.isTintActive=false;self.overWindow=false;if(self.options.imageCrossfade){self.zoomWrap=self.$elem.wrap('<div style="height:'+self.nzHeight+'px;width:'+self.nzWidth+'px;" class="zoomWrapper" />');self.$elem.css('position','absolute');}
161self.zoomLock=1;self.scrollingLock=false;self.changeBgSize=false;self.currentZoomLevel=self.options.zoomLevel;self.nzOffset=self.$elem.offset();self.widthRatio=(self.largeWidth/self.currentZoomLevel)/self.nzWidth;self.heightRatio=(self.largeHeight/self.currentZoomLevel)/self.nzHeight;if(self.options.zoomType=="window"){self.zoomWindowStyle="overflow: hidden;"
162+"background-position: 0px 0px;text-align:center;"
163+"background-color: "+String(self.options.zoomWindowBgColour)
164+";width: "+String(self.options.zoomWindowWidth)+"px;"
165+"height: "+String(self.options.zoomWindowHeight)
166+"px;float: left;"
167+"background-size: "+self.largeWidth/self.currentZoomLevel+"px "+self.largeHeight/self.currentZoomLevel+"px;"
168+"display: none;z-index:100;"
169+"border: "+String(self.options.borderSize)
170+"px solid "+self.options.borderColour
171+";background-repeat: no-repeat;"
172+"position: absolute;";}
173if(self.options.zoomType=="inner"){var borderWidth=self.$elem.css("border-left-width");self.zoomWindowStyle="overflow: hidden;"
174+"margin-left: "+String(borderWidth)+";"
175+"margin-top: "+String(borderWidth)+";"
176+"background-position: 0px 0px;"
177+"width: "+String(self.nzWidth)+"px;"
178+"height: "+String(self.nzHeight)
179+"px;float: left;"
180+"display: none;"
181+"cursor:"+(self.options.cursor)+";"
182+"px solid "+self.options.borderColour
183+";background-repeat: no-repeat;"
184+"position: absolute;";}
185if(self.options.zoomType=="window"){if(self.nzHeight<self.options.zoomWindowWidth/self.widthRatio){lensHeight=self.nzHeight;}
186else{lensHeight=String((self.options.zoomWindowHeight/self.heightRatio))}
187if(self.largeWidth<self.options.zoomWindowWidth){lensWidth=self.nzWidth;}
188else{lensWidth=(self.options.zoomWindowWidth/self.widthRatio);}
189self.lensStyle="background-position: 0px 0px;width: "+String((self.options.zoomWindowWidth)/self.widthRatio)+"px;height: "+String((self.options.zoomWindowHeight)/self.heightRatio)
190+"px;float: right;display: none;"
191+"overflow: hidden;"
192+"z-index: 999;"
193+"-webkit-transform: translateZ(0);"
194+"opacity:"+(self.options.lensOpacity)+";filter: alpha(opacity = "+(self.options.lensOpacity*100)+"); zoom:1;"
195+"width:"+lensWidth+"px;"
196+"height:"+lensHeight+"px;"
197+"background-color:"+(self.options.lensColour)+";"
198+"cursor:"+(self.options.cursor)+";"
199+"border: "+(self.options.lensBorderSize)+"px"+" solid "+(self.options.lensBorderColour)+";background-repeat: no-repeat;position: absolute;";}
200self.tintStyle="display: block;"
201+"position: absolute;"
202+"background-color: "+self.options.tintColour+";"
203+"filter:alpha(opacity=0);"
204+"opacity: 0;"
205+"width: "+self.nzWidth+"px;"
206+"height: "+self.nzHeight+"px;";self.lensRound='';if(self.options.zoomType=="lens"){self.lensStyle="background-position: 0px 0px;"
207+"float: left;display: none;"
208+"border: "+String(self.options.borderSize)+"px solid "+self.options.borderColour+";"
209+"width:"+String(self.options.lensSize)+"px;"
210+"height:"+String(self.options.lensSize)+"px;"
211+"background-repeat: no-repeat;position: absolute;";}
212if(self.options.lensShape=="round"){self.lensRound="border-top-left-radius: "+String(self.options.lensSize/2+self.options.borderSize)+"px;"
213+"border-top-right-radius: "+String(self.options.lensSize/2+self.options.borderSize)+"px;"
214+"border-bottom-left-radius: "+String(self.options.lensSize/2+self.options.borderSize)+"px;"
215+"border-bottom-right-radius: "+String(self.options.lensSize/2+self.options.borderSize)+"px;";}
216self.zoomContainer=$('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:'+self.nzOffset.left+'px;top:'+self.nzOffset.top+'px;height:'+self.nzHeight+'px;width:'+self.nzWidth+'px;"></div>');$('body').append(self.zoomContainer);if(self.options.containLensZoom&&self.options.zoomType=="lens"){self.zoomContainer.css("overflow","hidden");}
217if(self.options.zoomType!="inner"){self.zoomLens=$("<div class='zoomLens' style='"+self.lensStyle+self.lensRound+"'>&nbsp;</div>").appendTo(self.zoomContainer).click(function(){self.$elem.trigger('click');});if(self.options.tint){self.tintContainer=$('<div/>').addClass('tintContainer');self.zoomTint=$("<div class='zoomTint' style='"+self.tintStyle+"'></div>");self.zoomLens.wrap(self.tintContainer);self.zoomTintcss=self.zoomLens.after(self.zoomTint);self.zoomTintImage=$('<img style="position: absolute; left: 0px; top: 0px; max-width: none; width: '+self.nzWidth+'px; height: '+self.nzHeight+'px;" src="'+self.imageSrc+'">').appendTo(self.zoomLens).click(function(){self.$elem.trigger('click');});}}
218if(isNaN(self.options.zoomWindowPosition)){self.zoomWindow=$("<div style='z-index:999;left:"+(self.windowOffsetLeft)+"px;top:"+(self.windowOffsetTop)+"px;"+self.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo('body').click(function(){self.$elem.trigger('click');});}else{self.zoomWindow=$("<div style='z-index:999;left:"+(self.windowOffsetLeft)+"px;top:"+(self.windowOffsetTop)+"px;"+self.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo(self.zoomContainer).click(function(){self.$elem.trigger('click');});}
219self.zoomWindowContainer=$('<div/>').addClass('zoomWindowContainer').css("width",self.options.zoomWindowWidth);self.zoomWindow.wrap(self.zoomWindowContainer);if(self.options.zoomType=="lens"){self.zoomLens.css({backgroundImage:"url('"+self.imageSrc+"')"});}
220if(self.options.zoomType=="window"){self.zoomWindow.css({backgroundImage:"url('"+self.imageSrc+"')"});}
221if(self.options.zoomType=="inner"){self.zoomWindow.css({backgroundImage:"url('"+self.imageSrc+"')"});}
222self.$elem.bind('touchmove',function(e){e.preventDefault();var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];self.setPosition(touch);});self.zoomContainer.bind('touchmove',function(e){if(self.options.zoomType=="inner"){self.showHideWindow("show");}
223e.preventDefault();var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];self.setPosition(touch);});self.zoomContainer.bind('touchend',function(e){self.showHideWindow("hide");if(self.options.showLens){self.showHideLens("hide");}
224if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("hide");}});self.$elem.bind('touchend',function(e){self.showHideWindow("hide");if(self.options.showLens){self.showHideLens("hide");}
225if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("hide");}});if(self.options.showLens){self.zoomLens.bind('touchmove',function(e){e.preventDefault();var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];self.setPosition(touch);});self.zoomLens.bind('touchend',function(e){self.showHideWindow("hide");if(self.options.showLens){self.showHideLens("hide");}
226if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("hide");}});}
227self.$elem.bind('mousemove',function(e){if(self.overWindow==false){self.setElements("show");}
228if(self.lastX!==e.clientX||self.lastY!==e.clientY){self.setPosition(e);self.currentLoc=e;}
229self.lastX=e.clientX;self.lastY=e.clientY;});self.zoomContainer.bind('mousemove',function(e){if(self.overWindow==false){self.setElements("show");}
230if(self.lastX!==e.clientX||self.lastY!==e.clientY){self.setPosition(e);self.currentLoc=e;}
231self.lastX=e.clientX;self.lastY=e.clientY;});if(self.options.zoomType!="inner"){self.zoomLens.bind('mousemove',function(e){if(self.lastX!==e.clientX||self.lastY!==e.clientY){self.setPosition(e);self.currentLoc=e;}
232self.lastX=e.clientX;self.lastY=e.clientY;});}
233if(self.options.tint&&self.options.zoomType!="inner"){self.zoomTint.bind('mousemove',function(e){if(self.lastX!==e.clientX||self.lastY!==e.clientY){self.setPosition(e);self.currentLoc=e;}
234self.lastX=e.clientX;self.lastY=e.clientY;});}
235if(self.options.zoomType=="inner"){self.zoomWindow.bind('mousemove',function(e){if(self.lastX!==e.clientX||self.lastY!==e.clientY){self.setPosition(e);self.currentLoc=e;}
236self.lastX=e.clientX;self.lastY=e.clientY;});}
237self.zoomContainer.add(self.$elem).mouseenter(function(){if(self.overWindow==false){self.setElements("show");}}).mouseleave(function(){if(!self.scrollLock){self.setElements("hide");}});if(self.options.zoomType!="inner"){self.zoomWindow.mouseenter(function(){self.overWindow=true;self.setElements("hide");}).mouseleave(function(){self.overWindow=false;});}
238if(self.options.zoomLevel!=1){}
239if(self.options.minZoomLevel){self.minZoomLevel=self.options.minZoomLevel;}
240else{self.minZoomLevel=self.options.scrollZoomIncrement*2;}
241if(self.options.scrollZoom){self.zoomContainer.add(self.$elem).bind('mousewheel DOMMouseScroll MozMousePixelScroll',function(e){self.scrollLock=true;clearTimeout($.data(this,'timer'));$.data(this,'timer',setTimeout(function(){self.scrollLock=false;},250));var theEvent=e.originalEvent.wheelDelta||e.originalEvent.detail*-1
242e.stopImmediatePropagation();e.stopPropagation();e.preventDefault();if(theEvent/120>0){if(self.currentZoomLevel>=self.minZoomLevel){self.changeZoomLevel(self.currentZoomLevel-self.options.scrollZoomIncrement);}}
243else{if(self.options.maxZoomLevel){if(self.currentZoomLevel<=self.options.maxZoomLevel){self.changeZoomLevel(parseFloat(self.currentZoomLevel)+self.options.scrollZoomIncrement);}}
244else{self.changeZoomLevel(parseFloat(self.currentZoomLevel)+self.options.scrollZoomIncrement);}}
245return false;});}},setElements:function(type){var self=this;if(!self.options.zoomEnabled){return false;}
246if(type=="show"){if(self.isWindowSet){if(self.options.zoomType=="inner"){self.showHideWindow("show");}
247if(self.options.zoomType=="window"){self.showHideWindow("show");}
248if(self.options.showLens){self.showHideLens("show");}
249if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("show");}}}
250if(type=="hide"){if(self.options.zoomType=="window"){self.showHideWindow("hide");}
251if(!self.options.tint){self.showHideWindow("hide");}
252if(self.options.showLens){self.showHideLens("hide");}
253if(self.options.tint){self.showHideTint("hide");}}},setPosition:function(e){var self=this;if(!self.options.zoomEnabled){return false;}
254self.nzHeight=self.$elem.height();self.nzWidth=self.$elem.width();self.nzOffset=self.$elem.offset();if(self.options.tint&&self.options.zoomType!="inner"){self.zoomTint.css({top:0});self.zoomTint.css({left:0});}
255if(self.options.responsive&&!self.options.scrollZoom){if(self.options.showLens){if(self.nzHeight<self.options.zoomWindowWidth/self.widthRatio){lensHeight=self.nzHeight;}
256else{lensHeight=String((self.options.zoomWindowHeight/self.heightRatio))}
257if(self.largeWidth<self.options.zoomWindowWidth){lensWidth=self.nzWidth;}
258else{lensWidth=(self.options.zoomWindowWidth/self.widthRatio);}
259self.widthRatio=self.largeWidth/self.nzWidth;self.heightRatio=self.largeHeight/self.nzHeight;if(self.options.zoomType!="lens"){if(self.nzHeight<self.options.zoomWindowWidth/self.widthRatio){lensHeight=self.nzHeight;}
260else{lensHeight=String((self.options.zoomWindowHeight/self.heightRatio))}
261if(self.options.zoomWindowWidth<self.options.zoomWindowWidth){lensWidth=self.nzWidth;}
262else{lensWidth=(self.options.zoomWindowWidth/self.widthRatio);}
263self.zoomLens.css('width',lensWidth);self.zoomLens.css('height',lensHeight);if(self.options.tint){self.zoomTintImage.css('width',self.nzWidth);self.zoomTintImage.css('height',self.nzHeight);}}
264if(self.options.zoomType=="lens"){self.zoomLens.css({width:String(self.options.lensSize)+'px',height:String(self.options.lensSize)+'px'})}}}
265self.zoomContainer.css({top:self.nzOffset.top});self.zoomContainer.css({left:self.nzOffset.left});self.mouseLeft=parseInt(e.pageX-self.nzOffset.left);
265self.mouseTop=parseInt(e.pageY-self.nzOffset.top);if(self.options.zoomType=="window"){self.Etoppos=(self.mouseTop<(self.zoomLens.height()/2));self.Eboppos=(self.mouseTop>self.nzHeight-(self.zoomLens.height()/2)-(self.options.lensBorderSize*2));self.Eloppos=(self.mouseLeft<0+((self.zoomLens.width()/2)));self.Eroppos=(self.mouseLeft>(self.nzWidth-(self.zoomLens.width()/2)-(self.options.lensBorderSize*2)));}
266if(self.options.zoomType=="inner"){self.Etoppos=(self.mouseTop<((self.nzHeight/2)/self.heightRatio));self.Eboppos=(self.mouseTop>(self.nzHeight-((self.nzHeight/2)/self.heightRatio)));self.Eloppos=(self.mouseLeft<0+(((self.nzWidth/2)/self.widthRatio)));self.Eroppos=(self.mouseLeft>(self.nzWidth-(self.nzWidth/2)/self.widthRatio-(self.options.lensBorderSize*2)));}
267if(self.mouseLeft<=0||self.mouseTop<0||self.mouseLeft>self.nzWidth||self.mouseTop>self.nzHeight){self.setElements("hide");return;}
268else{if(self.options.showLens){self.lensLeftPos=String(self.mouseLeft-self.zoomLens.width()/2);self.lensTopPos=String(self.mouseTop-self.zoomLens.height()/2);}
269if(self.Etoppos){self.lensTopPos=0;}
270if(self.Eloppos){self.windowLeftPos=0;self.lensLeftPos=0;self.tintpos=0;}
271if(self.options.zoomType=="window"){if(self.Eboppos){self.lensTopPos=Math.max((self.nzHeight)-self.zoomLens.height()-(self.options.lensBorderSize*2),0);}
272if(self.Eroppos){self.lensLeftPos=(self.nzWidth-(self.zoomLens.width())-(self.options.lensBorderSize*2));}}
273if(self.options.zoomType=="inner"){if(self.Eboppos){self.lensTopPos=Math.max(((self.nzHeight)-(self.options.lensBorderSize*2)),0);}
274if(self.Eroppos){self.lensLeftPos=(self.nzWidth-(self.nzWidth)-(self.options.lensBorderSize*2));}}
275if(self.options.zoomType=="lens"){self.windowLeftPos=String(((e.pageX-self.nzOffset.left)*self.widthRatio-self.zoomLens.width()/2)*(-1));self.windowTopPos=String(((e.pageY-self.nzOffset.top)*self.heightRatio-self.zoomLens.height()/2)*(-1));self.zoomLens.css({backgroundPosition:self.windowLeftPos+'px '+self.windowTopPos+'px'});if(self.changeBgSize){if(self.nzHeight>self.nzWidth){if(self.options.zoomType=="lens"){self.zoomLens.css({"background-size":self.largeWidth/self.newvalueheight+'px '+self.largeHeight/self.newvalueheight+'px'});}
276self.zoomWindow.css({"background-size":self.largeWidth/self.newvalueheight+'px '+self.largeHeight/self.newvalueheight+'px'});}
277else{if(self.options.zoomType=="lens"){self.zoomLens.css({"background-size":self.largeWidth/self.newvaluewidth+'px '+self.largeHeight/self.newvaluewidth+'px'});}
278self.zoomWindow.css({"background-size":self.largeWidth/self.newvaluewidth+'px '+self.largeHeight/self.newvaluewidth+'px'});}
279self.changeBgSize=false;}
280self.setWindowPostition(e);}
281if(self.options.tint&&self.options.zoomType!="inner"){self.setTintPosition(e);}
282if(self.options.zoomType=="window"){self.setWindowPostition(e);}
283if(self.options.zoomType=="inner"){self.setWindowPostition(e);}
284if(self.options.showLens){if(self.fullwidth&&self.options.zoomType!="lens"){self.lensLeftPos=0;}
285self.zoomLens.css({left:self.lensLeftPos+'px',top:self.lensTopPos+'px'})}}},showHideWindow:function(change){var self=this;if(change=="show"){if(!self.isWindowActive){if(self.options.zoomWindowFadeIn){self.zoomWindow.stop(true,true,false).fadeIn(self.options.zoomWindowFadeIn);}
286else{self.zoomWindow.show();}
287self.isWindowActive=true;}}
288if(change=="hide"){if(self.isWindowActive){if(self.options.zoomWindowFadeOut){self.zoomWindow.stop(true,true).fadeOut(self.options.zoomWindowFadeOut);}
289else{self.zoomWindow.hide();}
290self.isWindowActive=false;}}},showHideLens:function(change){var self=this;if(change=="show"){if(!self.isLensActive){if(self.options.lensFadeIn){self.zoomLens.stop(true,true,false).fadeIn(self.options.lensFadeIn);}
291else{self.zoomLens.show();}
292self.isLensActive=true;}}
293if(change=="hide"){if(self.isLensActive){if(self.options.lensFadeOut){self.zoomLens.stop(true,true).fadeOut(self.options.lensFadeOut);}
294else{self.zoomLens.hide();}
295self.isLensActive=false;}}},showHideTint:function(change){var self=this;if(change=="show"){if(!self.isTintActive){if(self.options.zoomTintFadeIn){self.zoomTint.css({opacity:self.options.tintOpacity}).animate().stop(true,true).fadeIn("slow");}
296else{self.zoomTint.css({opacity:self.options.tintOpacity}).animate();self.zoomTint.show();}
297self.isTintActive=true;}}
298if(change=="hide"){if(self.isTintActive){if(self.options.zoomTintFadeOut){self.zoomTint.stop(true,true).fadeOut(self.options.zoomTintFadeOut);}
299else{self.zoomTint.hide();}
300self.isTintActive=false;}}}
300,setLensPostition:function(e){},setWindowPostition:function(e){var self=this;if(!isNaN(self.options.zoomWindowPosition)){switch(self.options.zoomWindowPosition){case 1:self.windowOffsetTop=(self.options.zoomWindowOffety);self.windowOffsetLeft=(+self.nzWidth);break;case 2:if(self.options.zoomWindowHeight>self.nzHeight){self.windowOffsetTop=((self.options.zoomWindowHeight/2)-(self.nzHeight/2))*(-1);self.windowOffsetLeft=(self.nzWidth);}
301else{}
302break;case 3:self.windowOffsetTop=(self.nzHeight-self.zoomWindow.height()-(self.options.borderSize*2));self.windowOffsetLeft=(self.nzWidth);break;case 4:self.windowOffsetTop=(self.nzHeight);self.windowOffsetLeft=(self.nzWidth);break;case 5:self.windowOffsetTop=(self.nzHeight);self.windowOffsetLeft=(self.nzWidth-self.zoomWindow.width()-(self.options.borderSize*2));break;case 6:if(self.options.zoomWindowHeight>self.nzHeight){self.windowOffsetTop=(self.nzHeight);self.windowOffsetLeft=((self.options.zoomWindowWidth/2)-(self.nzWidth/2)+(self.options.borderSize*2))*(-1);}
303else{}
304break;case 7:self.windowOffsetTop=(self.nzHeight);self.windowOffsetLeft=0;break;case 8:self.windowOffsetTop=(self.nzHeight);self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))*(-1);break;case 9:self.windowOffsetTop=(self.nzHeight-self.zoomWindow.height()-(self.options.borderSize*2));self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))*(-1);break;case 10:if(self.options.zoomWindowHeight>self.nzHeight){self.windowOffsetTop=((self.options.zoomWindowHeight/2)-(self.nzHeight/2))*(-1);self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))*(-1);}
305else{}
306break;case 11:self.windowOffsetTop=(self.options.zoomWindowOffety);self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))*(-1);break;case 12:self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))*(-1);break;case 13:self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);self.windowOffsetLeft=(0);break;case 14:if(self.options.zoomWindowHeight>self.nzHeight){self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);self.windowOffsetLeft=((self.options.zoomWindowWidth/2)-(self.nzWidth/2)+(self.options.borderSize*2))*(-1);}
307else{}
308break;case 15:self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);self.windowOffsetLeft=(self.nzWidth-self.zoomWindow.width()-(self.options.borderSize*2));break;case 16:self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);self.windowOffsetLeft=(self.nzWidth);break;default:self.windowOffsetTop=(self.options.zoomWindowOffety);self.windowOffsetLeft=(self.nzWidth);}}
309else{self.externalContainer=$('#'+self.options.zoomWindowPosition);self.externalContainerWidth=self.externalContainer.width();self.externalContainerHeight=self.externalContainer.height();self.externalContainerOffset=self.externalContainer.offset();self.windowOffsetTop=self.externalContainerOffset.top;self.windowOffsetLeft=self.externalContainerOffset.left;}
310self.isWindowSet=true;self.windowOffsetTop=self.windowOffsetTop+self.options.zoomWindowOffety;self.windowOffsetLeft=self.windowOffsetLeft+self.options.zoomWindowOffetx;self.zoomWindow.css({top:self.windowOffsetTop});self.zoomWindow.css({left:self.windowOffsetLeft});if(self.options.zoomType=="inner"){self.zoomWindow.css({top:0});self.zoomWindow.css({left:0});}
311self.windowLeftPos=String(((e.pageX-self.nzOffset.left)*self.widthRatio-self.zoomWindow.width()/2)*(-1));self.windowTopPos=String(((e.pageY-self.nzOffset.top)*self.heightRatio-self.zoomWindow.height()/2)*(-1));if(self.Etoppos){self.windowTopPos=0;}
312if(self.Eloppos){self.windowLeftPos=0;}
313if(self.Eboppos){self.windowTopPos=(self.largeHeight/self.currentZoomLevel-self.zoomWindow.height())*(-1);}
314if(self.Eroppos){self.windowLeftPos=((self.largeWidth/self.currentZoomLevel-self.zoomWindow.width())*(-1));}
315if(self.fullheight){self.windowTopPos=0;}
316if(self.fullwidth){self.windowLeftPos=0;}
317if(self.options.zoomType=="window"||self.options.zoomType=="inner"){if(self.zoomLock==1){if(self.widthRatio<=1){self.windowLeftPos=0;}
318if(self.heightRatio<=1){self.windowTopPos=0;}}
319if(self.largeHeight<self.options.zoomWindowHeight){self.windowTopPos=0;}
320if(self.largeWidth<self.options.zoomWindowWidth){self.windowLeftPos=0;}
321if(self.options.easing){if(!self.xp){self.xp=0;}
322if(!self.yp){self.yp=0;}
323if(!self.loop){self.loop=setInterval(function(){self.xp+=(self.windowLeftPos-self.xp)/self.options.easingAmou
323nt;self.yp+=(self.windowTopPos-self.yp)/self.options.easingAmount;if(self.scrollingLock){clearInterval(self.loop);self.xp=self.windowLeftPos;self.yp=self.windowTopPos
324self.xp=((e.pageX-self.nzOffset.left)*self.widthRatio-self.zoomWindow.width()/2)*(-1);self.yp=(((e.pageY-self.nzOffset.top)*self.heightRatio-self.zoomWindow.height()/2)*(-1));if(self.changeBgSize){if(self.nzHeight>self.nzWidth){if(self.options.zoomType=="lens"){self.zoomLens.css({"background-size":self.largeWidth/self.newvalueheight+'px '+self.largeHeight/self.newvalueheight+'px'});}
325self.zoomWindow.css({"background-size":self.largeWidth/self.newvalueheight+'px '+self.largeHeight/self.newvalueheight+'px'});}
326else{if(self.options.zoomType!="lens"){self.zoomLens.css({"background-size":self.largeWidth/self.newvaluewidth+'px '+self.largeHeight/self.newvalueheight+'px'});}
327self.zoomWindow.css({"background-size":self.largeWidth/self.newvaluewidth+'px '+self.largeHeight/self.newvaluewidth+'px'});}
328self.changeBgSize=false;}
329self.zoomWindow.css({backgroundPosition:self.windowLeftPos+'px '+self.windowTopPos+'px'});self.scrollingLock=false;self.loop=false;}
330else{if(self.changeBgSize){if(self.nzHeight>self.nzWidth){if(self.options.zoomType=="lens"){self.zoomLens.css({"background-size":self.largeWidth/self.newvalueheight+'px '+self.largeHeight/self.newvalueheight+'px'});}
331self.zoomWindow.css({"background-size":self.largeWidth/self.newvalueheight+'px '+self.largeHeight/self.newvalueheight+'px'});}
332else{if(self.options.zoomType!="lens"){self.zoomLens.css({"background-size":self.largeWidth/self.newvaluewidth+'px '+self.largeHeight/self.newvaluewidth+'px'});}
333self.zoomWindow.css({"background-size":self.largeWidth/self.newvaluewidth+'px '+self.largeHeight/self.newvaluewidth+'px'});}
334self.changeBgSize=false;}
335self.zoomWindow.css({backgroundPosition:self.xp+'px '+self.yp+'px'});}},16);}}
336else{if(self.changeBgSize){if(self.nzHeight>self.nzWidth){if(self.options.zoomType=="lens"){self.zoomLens.css({"background-size":self.largeWidth/self.newvalueheight+'px '+self.largeHeight/self.newvalueheight+'px'});}
337self.zoomWindow.css({"background-size":self.largeWidth/self.newvalueheight+'px '+self.largeHeight/self.newvalueheight+'px'});}
338else{if(self.options.zoomType=="lens"){self.zoomLens.css({"background-size":self.largeWidth/self.newvaluewidth+'px '+self.largeHeight/self.newvaluewidth+'px'});}
339if((self.largeHeight/self.newvaluewidth)<self.options.zoomWindowHeight){self.zoomWindow.css({"background-size":self.largeWidth/self.newvaluewidth+'px '+self.largeHeight/self.newvaluewidth+'px'});}
340else{self.zoomWindow.css({"background-size":self.largeWidth/self.newvalueheight+'px '+self.largeHeight/self.newvalueheight+'px'});}}
341self.changeBgSize=false;}
342self.zoomWindow.css({backgroundPosition:self.windowLeftPos+'px '+self.windowTopPos+'px'});}}},setTintPosition:function(e){var self=this;self.nzOffset=self.$elem.offset();self.tintpos=String(((e.pageX-self.nzOffset.left)-(self.zoomLens.width()/2))*(-1));self.tintposy=String(((e.pageY-self.nzOffset.top)-self.zoomLens.height()/2)*(-1));if(self.Etoppos){self.tintposy=0;}
343if(self.Eloppos){self.tintpos=0;}
344if(self.Eboppos){self.tintposy=(self.nzHeight-self.zoomLens.height()-(self.options.lensBorderSize*2))*(-1);}
345if(self.Eroppos){self.tintpos=((self.nzWidth-self.zoomLens.width()-(self.options.lensBorderSize*2))*(-1));}
346if(self.options.tint){if(self.fullheight){self.tintposy=0;}
347if(self.fullwidth){self.tintpos=0;}
348self.zoomTintImage.css({'left':self.tintpos+'px'});self.zoomTintImage.css({'top':self.tintposy+'px'});}},swaptheimage:function(smallimage,largeimage){var self=this;var newImg=new Image();if(self.options.loadingIcon){self.spinner=$('<div style="background: url(\''+self.options.loadingIcon+'\') no-repeat center;height:'+self.nzHeight+'px;width:'+self.nzWidth+'px;z-index: 2000;position: absolute; background-position: center center;"></div>');self.$elem.after(self.spinner);}
349self.options.onImageSwap(self.$elem);newImg.onload=function(){self.largeWidth=newImg.width;self.largeHeight=newImg.height;self.zoomImage=largeimage;self.zoomWindow.css({"background-size":self.largeWidth+'px '+self.largeHeight+'px'});self.zoomWindow.css({"background-size":self.largeWidth+'px '+self.largeHeight+'px'});self.swapAction(smallimage,largeimage);return;}
350newImg.src=largeimage;},swapAction:function(smallimage,largeimage){var self=this;var newImg2=new Image();newImg2.onload=function(){self.nzHeight=newImg2.height;self.nzWidth=newImg2.width;self.options.onImageSwapComplete(self.$elem);self.doneCallback();return;}
351newImg2.src=smallimage;self.currentZoomLevel=self.options.zoomLevel;self.options.maxZoomLevel=false;if(self.options.zoomType=="lens"){self.zoomLens.css({backgroundImage:"url('"+largeimage+"')"});}
352if(self.options.zoomType=="window"){self.zoomWindow.css({backgroundImage:"url('"+largeimage+"')"});}
353if(self.options.zoomType=="inner"){self.zoomWindow.css({backgroundImage:"url('"+largeimage+"')"});}
354self.currentImage=largeimage;if(self.options.imageCrossfade){var oldImg=self.$elem;var newImg=oldImg.clone();self.$elem.attr("src",smallimage)
355self.$elem.after(newImg);
355newImg.stop(true).fadeOut(self.options.imageCrossfade,function(){$(this).remove();});self.$elem.width("auto").removeAttr("width");self.$elem.height("auto").removeAttr("height");oldImg.fadeIn(self.options.imageCrossfade);if(self.options.tint&&self.options.zoomType!="inner"){var oldImgTint=self.zoomTintImage;var newImgTint=oldImgTint.clone();self.zoomTintImage.attr("src",largeimage)
356self.zoomTintImage.after(newImgTint);newImgTint.stop(true).fadeOut(self.options.imageCrossfade,function(){$(this).remove();});oldImgTint.fadeIn(self.options.imageCrossfade);self.zoomTint.css({height:self.$elem.height()});self.zoomTint.css({width:self.$elem.width()});}
357self.zoomContainer.css("height",self.$elem.height());self.zoomContainer.css("width",self.$elem.width());if(self.options.zoomType=="inner"){if(!self.options.constrainType){self.zoomWrap.parent().css("height",self.$elem.height());self.zoomWrap.parent().css("width",self.$elem.width());self.zoomWindow.css("height",self.$elem.height());self.zoomWindow.css("width",self.$elem.width());}}
358if(self.options.imageCrossfade){self.zoomWrap.css("height",self.$elem.height());self.zoomWrap.css("width",self.$elem.width());}}
359else{self.$elem.attr("src",smallimage);if(self.options.tint){self.zoomTintImage.attr("src",largeimage);self.zoomTintImage.attr("height",self.$elem.height());self.zoomTintImage.css({height:self.$elem.height()});self.zoomTint.css({height:self.$elem.height()});}
360self.zoomContainer.css("height",self.$elem.height());self.zoomContainer.css("width",self.$elem.width());if(self.options.imageCrossfade){self.zoomWrap.css("height",self.$elem.height());self.zoomWrap.css("width",self.$elem.width());}}
361if(self.options.constrainType){if(self.options.constrainType=="height"){self.zoomContainer.css("height",self.options.constrainSize);self.zoomContainer.css("width","auto");if(self.options.imageCrossfade){self.zoomWrap.css("height",self.options.constrainSize);self.zoomWrap.css("width","auto");self.constwidth=self.zoomWrap.width();}
362else{self.$elem.css("height",self.options.constrainSize);self.$elem.css("width","auto");self.constwidth=self.$elem.width();}
363if(self.options.zoomType=="inner"){self.zoomWrap.parent().css("height",self.options.constrainSize);self.zoomWrap.parent().css("width",self.constwidth);self.zoomWindow.css("height",self.options.constrainSize);self.zoomWindow.css("width",self.constwidth);}
364if(self.options.tint){self.tintContainer.css("height",self.options.constrainSize);self.tintContainer.css("width",self.constwidth);self.zoomTint.css("height",self.options.constrainSize);self.zoomTint.css("width",self.constwidth);self.zoomTintImage.css("height",self.options.constrainSize);self.zoomTintImage.css("width",self.constwidth);}}
365if(self.options.constrainType=="width"){self.zoomContainer.css("height","auto");self.zoomContainer.css("width",self.options.constrainSize);if(self.options.imageCrossfade){self.zoomWrap.css("height","auto");self.zoomWrap.css("width",self.options.constrainSize);self.constheight=self.zoomWrap.height();}
366else{self.$elem.css("height","auto");self.$elem.css("width",self.options.constrainSize);self.constheight=self.$elem.height();}
367if(self.options.zoomType=="inner"){self.zoomWrap.parent().css("height",self.constheight);self.zoomWrap.parent().css("width",self.options.constrainSize);self.zoomWindow.css("height",self.constheight);self.zoomWindow.css("width",self.options.constrainSize);}
368if(self.options.tint){self.tintContainer.css("height",self.constheight);self.tintContainer.css("width",self.options.constrainSize);self.zoomTint.css("height",self.constheight);self.zoomTint.css("width",self.options.constrainSize);self.zoomTintImage.css("height",self.constheight);self.zoomTintImage.css("width",self.options.constrainSize);}}}},doneCallback:function(){var self=this;if(self.options.loadingIcon){self.spinner.hide();}
369self.nzOffset=self.$elem.offset();self.nzWidth=self.$elem.width();self.nzHeight=self.$elem.height();self.currentZoomLevel=self.options.zoomLevel;self.widthRatio=self.largeWidth/self.nzWidth;self.heightRatio=self.largeHeight/self.nzHeight;if(self.options.zoomType=="window"){if(self.nzHeight<self.options.zoomWindowWidth/self.widthRatio){lensHeight=self.nzHeight;}
370else{lensHeight=String((self.options.zoomWindowHeight/self.heightRatio))}
371if(self.options.zoomWindowWidth<self.options.zoomWindowWidth){lensWidth=self.nzWidth;}
372else{lensWidth=(self.options.zoomWindowWidth/self.widthRatio);}
373if(self.zoomLens){self.zoomLens.css('width',lensWidth);self.zoomLens.css('height',lensHeight);}}},getCurrentImage:function(){var self=this;return self.zoomImage;},getGalleryList:function(){var self=this;self.gallerylist=[];
373if(self.options.gallery){$('#'+self.options.gallery+' a').each(function(){var img_src='';if($(this).data("zoom-image")){img_src=$(this).data("zoom-image");}
374else if($(this).data("image")){img_src=$(this).data("image");}
375if(img_src==self.zoomImage){self.gallerylist.unshift({href:''+img_src+'',title:$(this).find('img').attr("title")});}
376else{self.gallerylist.push({href:''+img_src+'',title:$(this).find('img').attr("title")});}});}
377else{self.gallerylist.push({href:''+self.zoomImage+'',title:$(this).find('img').attr("title")});}
378return self.gallerylist;},changeZoomLevel:function(value){var self=this;self.scrollingLock=true;self.newvalue=parseFloat(value).toFixed(2);newvalue=parseFloat(value).toFixed(2);maxheightnewvalue=self.largeHeight/((self.options.zoomWindowHeight/self.nzHeight)*self.nzHeight);maxwidthtnewvalue=self.largeWidth/((self.options.zoomWindowWidth/self.nzWidth)*self.nzWidth);if(self.options.zoomType!="inner")
379{if(maxheightnewvalue<=newvalue){self.heightRatio=(self.largeHeight/maxheightnewvalue)/self.nzHeight;self.newvalueheight=maxheightnewvalue;self.fullheight=true;}
380else{self.heightRatio=(self.largeHeight/newvalue)/self.nzHeight;self.newvalueheight=newvalue;self.fullheight=false;}
381if(maxwidthtnewvalue<=newvalue){self.widthRatio=(self.largeWidth/maxwidthtnewvalue)/self.nzWidth;self.newvaluewidth=maxwidthtnewvalue;self.fullwidth=true;}
382else{self.widthRatio=(self.largeWidth/newvalue)/self.nzWidth;self.newvaluewidth=newvalue;self.fullwidth=false;}
383if(self.options.zoomType=="lens"){if(maxheightnewvalue<=newvalue){self.fullwidth=true;self.newvaluewidth=maxheightnewvalue;}else{self.widthRatio=(self.largeWidth/newvalue)/self.nzWidth;self.newvaluewidth=newvalue;self.fullwidth=false;}}}
384if(self.options.zoomType=="inner")
385{maxheightnewvalue=parseFloat(self.largeHeight/self.nzHeight).toFixed(2);maxwidthtnewvalue=parseFloat(self.largeWidth/self.nzWidth).toFixed(2);if(newvalue>maxheightnewvalue){newvalue=maxheightnewvalue;}
386if(newvalue>maxwidthtnewvalue){newvalue=maxwidthtnewvalue;}
387if(maxheightnewvalue<=newvalue){self.heightRatio=(self.largeHeight/newvalue)/self.nzHeight;if(newvalue>maxheightnewvalue){self.newvalueheight=maxheightnewvalue;}else{self.newvalueheight=newvalue;}
388self.fullheight=true;}
389else{self.heightRatio=(self.largeHeight/newvalue)/self.nzHeight;if(newvalue>maxheightnewvalue){self.newvalueheight=maxheightnewvalue;}else{self.newvalueheight=newvalue;}
390self.fullheight=false;}
391if(maxwidthtnewvalue<=newvalue){self.widthRatio=(self.largeWidth/newvalue)/self.nzWidth;if(newvalue>maxwidthtnewvalue){self.newvaluewidth=maxwidthtnewvalue;}else{self.newvaluewidth=newvalue;}
392self.fullwidth=true;}
393else{self.widthRatio=(self.largeWidth/newvalue)/self.nzWidth;self.newvaluewidth=newvalue;self.fullwidth=false;}}
394scrcontinue=false;if(self.options.zoomType=="inner"){if(self.nzWidth>=self.nzHeight){if(self.newvaluewidth<=maxwidthtnewvalue){scrcontinue=true;}
395else{scrcontinue=false;self.fullheight=true;self.fullwidth=true;}}
396if(self.nzHeight>self.nzWidth){if(self.newvaluewidth<=maxwidthtnewvalue){scrcontinue=true;}
397else{scrcontinue=false;self.fullheight=true;self.fullwidth=true;}}}
398if(self.options.zoomType!="inner"){scrcontinue=true;}
399if(scrcontinue){self.zoomLock=0;self.changeZoom=true;if(((self.options.zoomWindowHeight)/self.heightRatio)<=self.nzHeight){self.currentZoomLevel=self.newvalueheight;if(self.options.zoomType!="lens"&&self.options.zoomType!="inner"){self.changeBgSize=true;self.zoomLens.css({height:String((self.options.zoomWindowHeight)/self.heightRatio)+'px'})}
400if(self.options.zoomType=="lens"||self.options.zoomType=="inner"){self.changeBgSize=true;}}
401if((self.options.zoomWindowWidth/self.widthRatio)<=self.nzWidth){if(self.options.zoomType!="inner"){if(self.newvaluewidth>self.newvalueheight){self.currentZoomLevel=self.newvaluewidth;}}
402if(self.options.zoomType!="lens"&&self.options.zoomType!="inner"){self.changeBgSize=true;self.zoomLens.css({width:String((self.options.zoomWindowWidth)/self.widthRatio)+'px'})}
403if(self.options.zoomType=="lens"||self.options.zoomType=="inner"){self.changeBgSize=true;}}
404if(self.options.zoomType=="inner"){self.changeBgSize=true;if(self.nzWidth>self.nzHeight){self.currentZoomLevel=self.newvaluewidth;}
405if(self.nzHeight>self.nzWidth){self.currentZoomLevel=self.newvaluewidth;}}}
406self.setPosition(self.currentLoc);},closeAll:function(){if(self.zoomWindow){self.zoomWindow.hide();}
407if(self.zoomLens){self.zoomLens.hide();}
408if(self.zoomTint){self.zoomTint.hide();}},changeState:function(value){var self=this;if(value=='enable'){self.options.zoomEnabled=true;}
409if(value=='disable'){self.options.zoomEnabled=false;}}};$.fn.elevateZoom=function(options){return this.each(function(){var elevate=Object.create(ElevateZoom);elevate.init(options,this);$.data(this,'elevateZoom',elevate);});};$.fn.elevateZoom.options={zoomActivation:"hover",zoomEnabled:true,preloading:1,zoomLevel:1,scrollZoom:false,scrollZoomIncrement:0.1,minZoomLevel:false,maxZoomLevel:false,easing:false,easingAmou
409nt:12,lensSize:200,zoomWindowWidth:400,zoomWindowHeight:400,zoomWindowOffetx:0,zoomWindowOffety:0,zoomWindowPosition:1,zoomWindowBgColour:"#fff",lensFadeIn:false,lensFadeOut:false,debug:false,zoomWindowFadeIn:false,zoomWindowFadeOut:false,zoomWindowAlwaysShow:false,zoomTintFadeIn:false,zoomTintFadeOut:false,borderSize:4,showLens:true,borderColour:"#888",lensBorderSize:1,lensBorderColour:"#000",lensShape:"square",zoomType:"window",containLensZoom:false,lensColour:"white",lensOpacity:0.4,lenszoom:false,tint:false,tintColour:"#333",tintOpacity:0.4,gallery:false,galleryActiveClass:"zoomGalleryActive",imageCrossfade:false,constrainType:false,constrainSize:false,loadingIcon:false,cursor:"default",responsive:true,onComplete:$.noop,onZoomedImageLoaded:function(){},onImageSwap:$.noop,onImageSwapComplete:$.noop};})(jQuery,window,document);(function($){var debugMode=true;$.fn.extend({getUniqueId:function(p,q,r){if(r===undefined){r='';}else{r='-'+r;}
410return p+q+r;},accessibleTabs:function(config){var defaults={wrapperClass:'content',currentClass:'current',tabhead:'h4',tabheadClass:'tabhead',tabbody:'.tabbody',fx:'slideDown',fxspeed:'slow',currentInfoText:'current tab: ',currentInfoPosition:'prepend',currentInfoClass:'current-info',tabsListClass:'tabs-list',syncheights:false,syncHeightMethodName:'syncHeight',cssClassAvailable:true,saveState:false,autoAnchor:false,pagination:false,position:'top',wrapInnerNavLinks:'',firstNavItemClass:'first',lastNavItemClass:'last',clearfixClass:'clearfix'};var keyCodes={37:-1,38:-1,39:+1,40:+1};var positions={top:'prepend',bottom:'append'};this.options=$.extend(defaults,config);var tabsCount=0;
410if($("body").data('accessibleTabsCount')!==undefined){tabsCount=$("body").data('accessibleTabsCount');}
411$("body").data('accessibleTabsCount',this.size()+tabsCount);var o=this;return this.each(function(t){var el=$(this);var list='';var tabCount=0;var ids=[];$(el).wrapInner('<div class="'+o.options.wrapperClass+'"></div>');$(el).find(o.options.tabhead).each(function(i){var id='';var elId=$(this).attr('id');if(elId){if(elId.indexOf('accessibletabscontent')===0){return;}
412id=' id="'+elId+'"';}
413var tabId=o.getUniqueId('accessibletabscontent',tabsCount+t,i);var navItemId=o.getUniqueId('accessibletabsnavigation',tabsCount+t,i);ids.push(tabId);if(o.options.cssClassAvailable===true){var cssClass='';if($(this).attr('class')){cssClass=$(this).attr('class');cssClass=' class="'+cssClass+'"';}
414list+='<li id="'+navItemId+'"><a'+id+''+cssClass+' href="#'+tabId+'">'+$(this).html()+'</a></li>';}else{list+='<li id="'+navItemId+'"><a'+id+' href="#'+tabId+'">'+$(this).html()+'</a></li>';}
415$(this).attr({"id":tabId,"class":o.options.tabheadClass,"tabindex":"-1"});tabCount++;});if(o.options.syncheights&&$.fn[o.options.syncHeightMethodName]){$(el).find(o.options.tabbody)[o.options.syncHeightMethodName]();$(window).resize(function(){$(el).find(o.options.tabbody)[o.options.syncHeightMethodName]();});}
416var tabs_selector='.'+o.options.tabsListClass;if(!$(el).find(tabs_selector).length){$(el)[positions[o.options.position]]('<ul class="'+o.options.clearfixClass+' '+o.options.tabsListClass+' tabamount'+tabCount+'"></ul>');}
417$(el).find(tabs_selector).append(list);var content=$(el).find(o.options.tabbody);if(content.length>0){$(content).hide();$(content[0]).show();}
418$(el).find("ul."+o.options.tabsListClass+">li:first").addClass(o.options.currentClass).addClass(o.options.firstNavItemClass).find('a')[o.options.currentInfoPosition]('<span class="'+o.options.currentInfoClass+'">'+o.options.currentInfoText+'</span>').parents("ul."+o.options.tabsListClass).children('li:last').addClass(o.options.lastNavItemClass);if(o.options.wrapInnerNavLinks){$(el).find('ul.'+o.options.tabsListClass+'>li>a').wrapInner(o.options.wrapInnerNavLinks);}
419$(el).find('ul.'+o.options.tabsListClass+'>li>a').each(function(i){$(this).click(function(event){event.preventDefault();el.trigger("showTab.accessibleTabs",[$(event.target)]);if(o.options.saveState&&$.cookie){$.cookie('accessibletab_'+el.attr('id')+'_active',i);}
420$(el).find('ul.'+o.options.tabsListClass+'>li.'+o.options.currentClass).removeClass(o.options.currentClass).find("span."+o.options.currentInfoClass).remove();$(this).blur();$(el).find(o.options.tabbody+':visible').hide();$(el).find(o.options.tabbody).eq(i)[o.options.fx](o.options.fxspeed);if(HB.ViewportChange._viewport.index==0){$(this)[o.options.currentInfoPosition]('<span class="'+o.options.currentInfoClass+'">'+o.options.currentInfoText+'</span>').parent().addClass(o.options.currentClass).append($('#productTabs .content'));}else{$(this)[o.options.currentInfoPosition]('<span class="'+o.options.currentInfoClass+'">'+o.options.currentInfoText+'</span>').parent().addClass(o.options.currentClass);}
421$($(this).attr("href")).focus().keyup(function(event){if(keyCodes[event.keyCode]){o.showAccessibleTab(i+keyCodes[event.keyCode]);$(this).unbind("keyup");}});});$(this).focus(function(){$(document).keyup(function(event){if(keyCodes[event.keyCode]){o.showAccessibleTab(i+keyCodes[event.keyCode]);}});});$(this).blur(function(){$(document).unbind("keyup");});});if(o.options.saveState&&$.cookie){var savedState=$.cookie('accessibletab_'+el.attr('id')+'_active');debug($.cookie('accessibletab_'+el.attr('id')+'_active'));if(savedState!==null){o.showAccessibleTab(savedState,el.attr('id'));}}
422if(o.options.autoAnchor&&window.location.hash){var anchorTab=$('.'+o.options.tabsListClass).find(window.location.hash);if(anchorTab.size()){anchorTab.click();}}
423if(o.options.pagination){var m='<ul class="pagination">';m+='    <li class="previous"><a href="#{previousAnchor}"><span>{previousHeadline}</span></a></li>';m+='    <li class="next"><a href="#{nextAnchor}"><span>{nextHeadline}</span></a></li>';m+='</ul>';var tabs=$(el).find('.tabbody');var tabcount=tabs.size();tabs.each(function(idx){$(this).append(m);var next=idx+1;if(next>=tabcount){next=0;}
424var previous=idx-1;if(previous<0){previous=tabcount-1;}
425var p=$(this).find('.pagination');var previousEl=p.find('.previous');previousEl.find('span').text($('#'+ids[previous]).text());previousEl.find('a').attr('href','#'+ids[previous]).click(function(event){event.preventDefault();$(el).find('.tabs-list a').eq(previous).click();});var nextEl=p.find('.next');nextEl.find('span').text($('#'+ids[next]).text());nextEl.find('a').attr('href','#'+ids[next]).click(function(event){event.preventDefault();$(el).find('.tabs-list a').eq(next).click();});});}});},showAccessibleTab:function(index,id){debug('showAccessibleTab');var o=this;if(id){var el=$('#'+id);var links=el.find('ul.'+o.options.tabsListClass+'>li>a');el.trigger("showTab.accessibleTabs",[links.eq(index)]);links.eq(index).click();}else{return this.each(function(){var el=$(this);el.trigger("showTab.accessibleTabs");var links=el.find('ul.'+o.options.tabsListClass+'>li>a');el.trigger("showTab.accessibleTabs",[links.eq(index)]);links.eq(index).click();});}},showAccessibleTabSelector:function(selector){debug('showAccessibleTabSelector');var el=$(selector);if(el){if(el.get(0).nodeName.toLowerCase()==='a'){el.click();}else{debug('the selector of a showAccessibleTabSelector() call needs to point to a tabs headline!');}}}});function debug(msg,info){if(debugMode&&window.console&&window.console.log){if(info){window.console.log(info+': ',msg);}else{window.console.log(msg);}}}})(jQuery);!function(t,e){function n(t,e,n){var r=t.children(),o=!1;t.empty();for(var i=0,d=r.length;d>i;i++){var l=r.eq(i);if(t.append(l),n&&t.append(n),a(t,e)){l.remove(),o=!0;break}n&&n.detach()}return o}function r(e,n,i,d,l){var s=!1,c="a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",u="script, .dotdotdot-keep";return e.contents().detach().each(function(){var h=this,f=t(h);if("undefined"==typeof h)return!0;
vendor: 6,800 bytes, line 425
425if(f.is(u))e.append(f);else{if(s)return!0;e.append(f),!l||f.is(d.after)||f.find(d.after).length||e[e.is(c)?"after":"append"](l),a(i,d)&&(s=3==h.nodeType?o(f,n,i,d,l):r(f,n,i,d,l)),s||l&&l.detach()}}),n.addClass("is-truncated"),s}function o(e,n,r,o,d){var c=e[0];if(!c)return!1;var h=s(c),f=-1!==h.indexOf(" ")?" ":" ",p="letter"==o.wrap?"":f,g=h.split(p),v=-1,w=-1,b=0,m=g.length-1;for(o.fallbackToLetter&&0==b&&0==m&&(p="",g=h.split(p),m=g.length-1);m>=b&&(0!=b||0!=m);){var y=Math.floor((b+m)/2);if(y==w)break;w=y,l(c,g.slice(0,w+1).join(p)+o.ellipsis),r.children().each(function(){t(this).toggle().toggle()}),a(r,o)?(m=w,o.fallbackToLetter&&0==b&&0==m&&(p="",g=g[0].split(p),v=-1,w=-1,b=0,m=g.length-1)):(v=w,b=w)}if(-1==v||1==g.length&&0==g[0].length){var x=e.parent();e.detach();var C=d&&d.closest(x).length?d.length:0;if(x.contents().length>C?c=u(x.contents().eq(-1-C),n):(c=u(x,n,!0),C||x.detach()),c&&(h=i(s(c),o),l(c,h),C&&d)){var T=d.parent();t(c).parent().append(d),t.trim(T.html())||T.remove()}}else h=i(g.slice(0,v+1).join(p),o),l(c,h);return!0}function a(t,e){return t.innerHeight()>e.maxHeight}function i(e,n){for(;t.inArray(e.slice(-1),n.lastCharacter.remove)>-1;)e=e.slice(0,-1);return t.inArray(e.slice(-1),n.lastCharacter.noEllipsis)<0&&(e+=n.ellipsis),e}function d(t){return{width:t.innerWidth(),height:t.innerHeight()}}function l(t,e){t.innerText?t.innerText=e:t.nodeValue?t.nodeValue=e:t.textContent&&(t.textContent=e)}function s(t){return t.innerText?t.innerText:t.nodeValue?t.nodeValue:t.textContent?t.textContent:""}function c(t){do t=t.previousSibling;while(t&&1!==t.nodeType&&3!==t.nodeType);return t}function u(e,n,r){var o,a=e&&e[0];if(a){if(!r){if(3===a.nodeType)return a;if(t.trim(e.text()))return u(e.contents().last(),n)}for(o=c(a);!o;){if(e=e.parent(),e.is(n)||!e.length)return!1;o=c(e[0])}if(o)return u(t(o),n)}return!1}function h(e,n){return e?"string"==typeof e?(e=t(e,n),e.length?e:!1):e.jquery?e:!1:!1}function f(t){for(var e=t.innerHeight(),n=["paddingTop","paddingBottom"],r=0,o=n.length;o>r;r++){var a=parseInt(t.css(n[r]),10);isNaN(a)&&(a=0),e-=a}return e}if(!t.fn.dotdotdot){t.fn.dotdotdot=function(e){if(0==this.length)return t.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){t(this).dotdotdot(e)});var o=this,i=o.contents();o.data("dotdotdot")&&o.trigger("destroy.dot"),o.data("dotdotdot-style",o.attr("style")||""),o.css("word-wrap","break-word"),"nowrap"===o.css("white-space")&&o.css("white-space","normal"),o.bind_events=function(){return o.bind("update.dot",function(e,d){switch(o.removeClass("is-truncated"),e.preventDefault(),e.stopPropagation(),typeof l.height){case"number":l.maxHeight=l.height;break;case"function":l.maxHeight=l.height.call(o[0]);break;default:l.maxHeight=f(o)}l.maxHeight+=l.tolerance,"undefined"!=typeof d&&(("string"==typeof d||"nodeType"in d&&1===d.nodeType)&&(d=t("<div />").append(d).contents()),d instanceof t&&(i=d)),g=o.wrapInner('<div class="dotdotdot" />').children(),g.contents().detach().end().append(i.clone(!0)).find("br").replaceWith("  <br />  ").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,u=!1;return s.afterElement&&(c=s.afterElement.clone(!0),c.show(),s.afterElement.detach()),a(g,l)&&(u="children"==l.wrap?n(g,l,c):r(g,o,g,l,c)),g.replaceWith(g.contents()),g=null,t.isFunction(l.callback)&&l.callback.call(o[0],u,i),s.isTruncated=u,u}).bind("isTruncated.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],s.isTruncated),s.isTruncated}).bind("originalContent.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],i),i}).bind("destroy.dot",function(t){t.preventDefault(),t.stopPropagation(),o.unwatch().unbind_events().contents().detach().end().append(i).attr("style",o.data("dotdotdot-style")||"").removeClass("is-truncated").data("dotdotdot",!1)}),o},o.unbind_events=function(){return o.unbind(".dot"),o},o.watch=function(){if(o.unwatch(),"window"==l.watch){var e=t(window),n=e.width(),r=e.height();e.bind("resize.dot"+s.dotId,function(){n==e.width()&&r==e.height()&&l.windowResizeFix||(n=e.width(),r=e.height(),u&&clearInterval(u),u=setTimeout(function(){o.trigger("update.dot")},100))})}else c=d(o),u=setInterval(function(){if(o.is(":visible")){var t=d(o);c.width==t.width&&c.height==t.height||(o.trigger("update.dot"),c=t)}},500);return o},o.unwatch=function(){return t(window).unbind("resize.dot"+s.dotId),u&&clearInterval(u),o};var l=t.extend(!0,{},t.fn.dotdotdot.defaults,e),s={},c={},u=null,g=null;return l.lastCharacter.remove instanceof Array||(l.lastCharacter.remove=t.fn.dotdotdot.defaultArrays.lastCharacter.remove),l.lastCharacter.noEllipsis instanceof Array||(l.lastCharacter.noEllipsis=t.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),s.afterElement=h(l.after,o),s.isTruncated=!1,s.dotId=p++,o.data("dotdotdot",!0).bind_events().trigger("update.dot"),l.watch&&o.watch(),o},t.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},t.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" "," ",",",";",".","!","?"],noEllipsis:[]}},t.fn.dotdotdot.debug=function(t){};var p=1,g=t.fn.html;t.fn.html=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?this.trigger("update",[n]):g.apply(this,arguments)};var v=t.fn.text;t.fn.text=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?(n=t("<div />").text(n).html(),this.trigger("update",[n])):v.apply(this,arguments)}}}(jQuery),jQuery(document).ready(function(t){t(".dot-ellipsis").each(function(){var e=t(this).hasClass("dot-resize-update"),n=t(this).hasClass("dot-timer-update"),r=0,o=t(this).attr("class").split(/\s+/);t.each(o,function(t,e){var n=e.match(/^dot-height-(\d+)$/);null!==n&&(r=Number(n[1]))});var a=new Object;n&&(a.watch=!0),e&&(a.watch="window"),r>0&&(a.height=r),t(this).dotdotdot(a)})}),jQuery(window).on("load",function(){jQuery(".dot-ellipsis.dot-load-update").trigger("update.dot")});(function(root,factory){if(typeof define==='function'&&define.amd&&typeof require==='function'&&typeof require.specified==='function'&&require.specified('knockout')){define(['jquery','knockout'],factory);}else{factory(root.jQuery,root.ko);}})(this,function($,ko){"use strict";if(typeof ko!=='undefined'&&ko.bindingHandlers&&!ko.bindingHandlers.multiselect){ko.bindingHandlers.multiselect={after:['options','value','selectedOptions','enable','disable'],init:function(element,valueAccessor,allBindings,viewModel,bindingContext){var $element=$(element);var config=ko.toJS(valueAccessor());$element.multiselect(config);if(allBindings.has('options')){var options=allBindings.get('options');
vendor: 8,208 bytes, lines 425-450
425if(ko.isObservable(options)){ko.computed({read:function(){options();setTimeout(function(){var ms=$element.data('multiselect');if(ms)
426ms.updateOriginalOptions();$element.multiselect('rebuild');},1);},disposeWhenNodeIsRemoved:element});}}
427if(allBindings.has('value')){var value=allBindings.get('value');if(ko.isObservable(value)){ko.computed({read:function(){value();setTimeout(function(){$element.multiselect('refresh');},1);},disposeWhenNodeIsRemoved:element}).extend({rateLimit:100,notifyWhenChangesStop:true});}}
428if(allBindings.has('selectedOptions')){var selectedOptions=allBindings.get('selectedOptions');if(ko.isObservable(selectedOptions)){ko.computed({read:function(){selectedOptions();setTimeout(function(){$element.multiselect('refresh');},1);},disposeWhenNodeIsRemoved:element}).extend({rateLimit:100,notifyWhenChangesStop:true});}}
429var setEnabled=function(enable){setTimeout(function(){if(enable)
430$element.multiselect('enable');else
431$element.multiselect('disable');});};if(allBindings.has('enable')){var enable=allBindings.get('enable');if(ko.isObservable(enable)){ko.computed({read:function(){setEnabled(enable());},disposeWhenNodeIsRemoved:element}).extend({rateLimit:100,notifyWhenChangesStop:true});}else{setEnabled(enable);}}
432if(allBindings.has('disable')){var disable=allBindings.get('disable');if(ko.isObservable(disable)){ko.computed({read:function(){setEnabled(!disable());},disposeWhenNodeIsRemoved:element}).extend({rateLimit:100,notifyWhenChangesStop:true});}else{setEnabled(!disable);}}
433ko.utils.domNodeDisposal.addDisposeCallback(element,function(){$element.multiselect('destroy');});},update:function(element,valueAccessor,allBindings,viewModel,bindingContext){var $element=$(element);var config=ko.toJS(valueAccessor());$element.multiselect('setOptions',config);$element.multiselect('rebuild');}};}
434function forEach(array,callback){for(var index=0;index<array.length;++index){callback(array[index],index);}}
435function Multiselect(select,options){this.$select=$(select);this.options=this.mergeOptions($.extend({},options,this.$select.data()));if(this.$select.attr("data-placeholder")){this.options.nonSelectedText=this.$select.data("placeholder");}
436this.originalOptions=this.$select.clone()[0].options;this.query='';this.searchTimeout=null;this.lastToggledInput=null;this.options.multiple=this.$select.attr('multiple')==="multiple";this.options.onChange=$.proxy(this.options.onChange,this);this.options.onSelectAll=$.proxy(this.options.onSelectAll,this);this.options.onDeselectAll=$.proxy(this.options.onDeselectAll,this);this.options.onDropdownShow=$.proxy(this.options.onDropdownShow,this);this.options.onDropdownHide=$.proxy(this.options.onDropdownHide,this);this.options.onDropdownShown=$.proxy(this.options.onDropdownShown,this);this.options.onDropdownHidden=$.proxy(this.options.onDropdownHidden,this);this.options.onInitialized=$.proxy(this.options.onInitialized,this);this.options.onFiltering=$.proxy(this.options.onFiltering,this);this.buildContainer();this.buildButton();this.buildDropdown();this.buildReset();this.buildSelectAll();this.buildDropdownOptions();this.buildFilter();this.updateButtonText();this.updateSelectAll(true);if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}
437this.options.wasDisabled=this.$select.prop('disabled');if(this.options.disableIfEmpty&&$('option',this.$select).length<=0){this.disable();}
438this.$select.wrap('<span class="multiselect-native-select" />').after(this.$container);this.options.onInitialized(this.$select,this.$container);}
439Multiselect.prototype={defaults:{buttonText:function(options,select){if(this.disabledText.length>0&&(select.prop('disabled')||(options.length==0&&this.disableIfEmpty))){return this.disabledText;}
440else if(options.length===0){return this.nonSelectedText;}
441else if(this.allSelectedText&&options.length===$('option',$(select)).length&&$('option',$(select)).length!==1&&this.multiple){if(this.selectAllNumber){return this.allSelectedText+' ('+options.length+')';}
442else{return this.allSelectedText;}}
443else if(this.numberDisplayed!=0&&options.length>this.numberDisplayed){return options.length+' '+this.nSelectedText;}
444else{var selected='';var delimiter=this.delimiterText;options.each(function(){var label=($(this).attr('label')!==undefined)?$(this).attr('label'):$(this).text();selected+=label+delimiter;});return selected.substr(0,selected.length-this.delimiterText.length);}},buttonTitle:function(options,select){if(options.length===0){return this.nonSelectedText;}
445else{var selected='';var delimiter=this.delimiterText;options.each(function(){var label=($(this).attr('label')!==undefined)?$(this).attr('label'):$(this).text();selected+=label+delimiter;});return selected.substr(0,selected.length-this.delimiterText.length);}},checkboxName:function(option){return false;},optionLabel:function(element){return $(element).attr('label')||$(element).text();},optionClass:function(element){return $(element).attr('class')||'';},onChange:function(option,checked){},onDropdownShow:function(event){},onDropdownHide:function(event){},onDropdownShown:function(event){},onDropdownHidden:function(event){},onSelectAll:function(){},onDeselectAll:function(){},onInitialized:function($select,$container){},onFiltering:function($filter){},enableHTML:false,buttonClass:'btn btn-default',inheritClass:false,buttonWidth:'auto',buttonContainer:'<div class="btn-group" />',dropRight:false,dropUp:false,selectedClass:'active',maxHeight:false,includeSelectAllOption:false,includeSelectAllIfMoreThan:0,selectAllText:' Select all',selectAllValue:'multiselect-all',selectAllName:false,selectAllNumber:true,selectAllJustVisible:true,enableFiltering:false,enableCaseInsensitiveFiltering:false,enableFullValueFiltering:false,enableClickableOptGroups:false,enableCollapsibleOptGroups:false,collapseOptGroupsByDefault:false,filterPlaceholder:'Search',filterBehavior:'text',includeFilterClearBtn:true,preventInputChangeEvent:false,nonSelectedText:'None selected',nSelectedText:'selected',allSelectedText:'All selected',numberDisplayed:3,disableIfEmpty:false,disabledText:'',delimiterText:', ',includeResetOption:false,includeResetDivider:false,resetText:'Reset',templates:{button:'<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span> <b class="caret"></b></button>',ul:'<ul class="multiselect-container dropdown-menu"></ul>',filter:'<li class="multiselect-item multiselect-filter"><div class="input-group"><span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span><input class="form-control multiselect-search" type="text" /></div></li>',filterClearBtn:'<span class="input-group-btn"><button class="btn btn-default multiselect-clear-filter" type="button"><i class="glyphicon glyphicon-remove-circle"></i></button></span>',li:'<li><a tabindex="0"><label></label></a></li>',divider:'<li class="multiselect-item divider"></li>',liGroup:'<li class="multiselect-item multiselect-group"><label></label></li>',resetButton:'<li class="multiselect-reset text-center"><div class="input-group"><a class="btn btn-default btn-block"></a></div></li>'}},constructor:Multiselect,buildContainer:function(){this.$container=$(this.options.buttonContainer);this.$container.on('show.bs.dropdown',this.options.onDropdownShow);this.$container.on('hide.bs.dropdown',this.options.onDropdownHide);this.$container.on('shown.bs.dropdown',this.options.onDropdownShown);this.$container.on('hidden.bs.dropdown',this.options.onDropdownHidden);},buildButton:function(){this.$button=$(this.options.templates.button).addClass(this.options.buttonClass);if(this.$select.attr('class')&&this.options.inheritClass){this.$button.addClass(this.$select.attr('class'));}
446if(this.$select.prop('disabled')){this.disable();}
447else{this.enable();}
448if(this.options.buttonWidth&&this.options.buttonWidth!=='auto'){this.$button.css({'width':'100%','overflow':'hidden','text-overflow':'ellipsis'});this.$container.css({'width':this.options.buttonWidth});}
449var tabindex=this.$select.attr('tabindex');if(tabindex){this.$button.attr('tabindex',tabindex);}
450this.$container.prepend(this.$button);},buildDropdown:function(){this.$ul=$(this.options.templates.ul);
450if(this.options.dropRight){this.$ul.addClass('pull-right');}
451if(this.options.maxHeight){this.$ul.css({'max-height':this.options.maxHeight+'px','overflow-y':'auto','overflow-x':'hidden'});}
452if(this.options.dropUp){var height=Math.min(this.options.maxHeight,$('option[data-role!="divider"]',this.$select).length*26+$('option[data-role="divider"]',this.$select).length*19+(this.options.includeSelectAllOption?26:0)+(this.options.enableFiltering||this.options.enableCaseInsensitiveFiltering?44:0));var moveCalc=height+34;this.$ul.css({'max-height':height+'px','overflow-y':'auto','overflow-x':'hidden','margin-top':"-"+moveCalc+'px'});}
453this.$container.append(this.$ul);},buildDropdownOptions:function(){this.$select.children().each($.proxy(function(index,element){var $element=$(element);var tag=$element.prop('tagName').toLowerCase();if($element.prop('value')===this.options.selectAllValue){return;}
454if(tag==='optgroup'){this.createOptgroup(element);}
455else if(tag==='option'){if($element.data('role')==='divider'){this.createDivider();}
456else{this.createOptionValue(element);}}},this));$(this.$ul).off('change','li:not(.multiselect-group) input[type="checkbox"], li:not(.multiselect-group) input[type="radio"]');$(this.$ul).on('change','li:not(.multiselect-group) input[type="checkbox"], li:not(.multiselect-group) input[type="radio"]',$.proxy(function(event){var $target=$(event.target);var checked=$target.prop('checked')||false;var isSelectAllOption=$target.val()===this.options.selectAllValue;if(this.options.selectedClass){if(checked){$target.closest('li').addClass(this.options.selectedClass);}
457else{$target.closest('li').removeClass(this.options.selectedClass);}}
458var value=$target.val();var $option=this.getOptionByValue(value);var $optionsNotThis=$('option',this.$select).not($option);var $checkboxesNotThis=$('input',this.$container).not($target);if(isSelectAllOption){if(checked){this.selectAll(this.options.selectAllJustVisible,true);}
459else{this.deselectAll(this.options.selectAllJustVisible,true);}}
460else{if(checked){$option.prop('selected',true);if(this.options.multiple){$option.prop('selected',true);}
461else{if(this.options.selectedClass){$($checkboxesNotThis).closest('li').removeClass(this.options.selectedClass);}
462$($checkboxesNotThis).prop('checked',false);$optionsNotThis.prop('selected',false);this.$button.click();}
463if(this.options.selectedClass==="active"){$optionsNotThis.closest("a").css("outline","");}}
464else{$option.prop('selected',false);}
465this.options.onChange($option,checked);this.updateSelectAll();if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}}
466this.$select.change();this.updateButtonText();if(this.options.preventInputChangeEvent){return false;}},this));$('li a',this.$ul).on('mousedown',function(e){if(e.shiftKey){return false;}});$(this.$ul).on('touchstart click','li a',$.proxy(function(event){event.stopPropagation();var $target=$(event.target);if(event.shiftKey&&this.options.multiple){if($target.is("label")){event.preventDefault();$target=$target.find("input");$target.prop("checked",!$target.prop("checked"));}
467var checked=$target.prop('checked')||false;if(this.lastToggledInput!==null&&this.lastToggledInput!==$target){var from=this.$ul.find("li:visible").index($target.parents("li"));var to=this.$ul.find("li:visible").index(this.lastToggledInput.parents("li"));if(from>to){var tmp=to;to=from;from=tmp;}
468++to;var range=this.$ul.find("li").not(".multiselect-filter-hidden").slice(from,to).find("input");range.prop('checked',checked);if(this.options.selectedClass){range.closest('li').toggleClass(this.options.selectedClass,checked);}
469for(var i=0,j=range.length;i<j;i++){var $checkbox=$(range[i]);var $option=this.getOptionByValue($checkbox.val());$option.prop('selected',checked);}}
470$target.trigger("change");}
471if($target.is("input")&&!$target.closest("li").is(".multiselect-item")){this.lastToggledInput=$target;}
472$target.blur();},this));this.$container.off('keydown.multiselect').on('keydown.multiselect',$.proxy(function(event){if($('input[type="text"]',this.$container).is(':focus')){return;}
473if(event.keyCode===9&&this.$container.hasClass('open')){this.$button.click();}
474else{var $items=$(this.$container).find("li:not(.divider):not(.disabled) a").filter(":visible");if(!$items.length){return;}
475var index=$items.index($items.filter(':focus'));if(event.keyCode===38&&index>0){index--;}
476else if(event.keyCode===40&&index<$items.length-1){index++;}
477else if(!~index){index=0;}
478var $current=$items.eq(index);$current.focus();if(event.keyCode===32||event.keyCode===13){var $checkbox=$current.find('input');$checkbox.prop("checked",!$checkbox.prop("checked"));$checkbox.change();}
479event.stopPropagation();event.preventDefault();}},this));if(this.options.enableClickableOptGroups&&this.options.multiple){$("li.multiselect-group input",this.$ul).on("change",$.proxy(function(event){event.stopPropagation();var $target=$(event.target);var checked=$target.prop('checked')||false;var $li=$(event.target).closest('li');var $group=$li.nextUntil("li.multiselect-group").not('.multiselect-filter-hidden').not('.disabled');
479var $inputs=$group.find("input");var values=[];var $options=[];if(this.options.selectedClass){if(checked){$li.addClass(this.options.selectedClass);}
480else{$li.removeClass(this.options.selectedClass);}}
481$.each($inputs,$.proxy(function(index,input){var value=$(input).val();var $option=this.getOptionByValue(value);if(checked){$(input).prop('checked',true);$(input).closest('li').addClass(this.options.selectedClass);$option.prop('selected',true);}
482else{$(input).prop('checked',false);$(input).closest('li').removeClass(this.options.selectedClass);$option.prop('selected',false);}
483$options.push(this.getOptionByValue(value));},this))
484this.options.onChange($options,checked);this.$select.change();this.updateButtonText();this.updateSelectAll();},this));}
485if(this.options.enableCollapsibleOptGroups&&this.options.multiple){$("li.multiselect-group .caret-container",this.$ul).on("click",$.proxy(function(event){var $li=$(event.target).closest('li');var $inputs=$li.nextUntil("li.multiselect-group").not('.multiselect-filter-hidden');var visible=true;$inputs.each(function(){visible=visible&&!$(this).hasClass('multiselect-collapsible-hidden');});if(visible){$inputs.hide().addClass('multiselect-collapsible-hidden');}
486else{$inputs.show().removeClass('multiselect-collapsible-hidden');}},this));$("li.multiselect-all",this.$ul).css('background','#f3f3f3').css('border-bottom','1px solid #eaeaea');$("li.multiselect-all > a > label.checkbox",this.$ul).css('padding','3px 20px 3px 35px');$("li.multiselect-group > a > input",this.$ul).css('margin','4px 0px 5px -20px');}},createOptionValue:function(element){var $element=$(element);if($element.is(':selected')){$element.prop('selected',true);}
487var label=this.options.optionLabel(element);var labelText="";if($element.text()&&$element.text().length>0){labelText=$element.text();}
488var classes=this.options.optionClass(element);var value=$element.val();var inputType=this.options.multiple?"checkbox":"radio";var $li=$(this.options.templates.li);var $label=$('label',$li);$label.addClass(inputType);$label.attr("title",labelText);
488$li.addClass(classes);if(this.options.collapseOptGroupsByDefault&&$(element).parent().prop("tagName").toLowerCase()==="optgroup"){$li.addClass("multiselect-collapsible-hidden");$li.hide();}
489if(this.options.enableHTML){$label.html(" "+label);}
490else{$label.text(" "+label);}
491var $checkbox=$('<input/>').attr('type',inputType);var name=this.options.checkboxName($element);if(name){$checkbox.attr('name',name);}
492$label.prepend($checkbox);var selected=$element.prop('selected')||false;$checkbox.val(value);if(value===this.options.selectAllValue){$li.addClass("multiselect-item multiselect-all");$checkbox.parent().parent().addClass('multiselect-all');}
493$label.attr('title',$element.attr('title'));this.$ul.append($li);if($element.is(':disabled')){$checkbox.attr('disabled','disabled').prop('disabled',true).closest('a').attr("tabindex","-1").closest('li').addClass('disabled');}
494$checkbox.prop('checked',selected);if(selected&&this.options.selectedClass){$checkbox.closest('li').addClass(this.options.selectedClass);}},createDivider:function(element){var $divider=$(this.options.templates.divider);this.$ul.append($divider);},createOptgroup:function(group){var label=$(group).attr("label");var value=$(group).attr("value");var $li=$('<li class="multiselect-item multiselect-group"><a href="javascript:void(0);"><label><b></b></label></a></li>');var classes=this.options.optionClass(group);
vendor: 5,446 bytes, lines 494-522
494$li.addClass(classes);if(this.options.enableHTML){$('label b',$li).html(" "+label);}
495else{$('label b',$li).text(" "+label);}
496if(this.options.enableCollapsibleOptGroups&&this.options.multiple){$('a',$li).append('<span class="caret-container"><b class="caret"></b></span>');}
497if(this.options.enableClickableOptGroups&&this.options.multiple){$('a label',$li).prepend('<input type="checkbox" value="'+value+'"/>');}
498if($(group).is(':disabled')){$li.addClass('disabled');}
499this.$ul.append($li);$("option",group).each($.proxy(function($,group){this.createOptionValue(group);},this))},buildReset:function(){if(this.options.includeResetOption){if(this.options.includeResetDivider){this.$ul.prepend($(this.options.templates.divider));}
500var $resetButton=$(this.options.templates.resetButton);if(this.options.enableHTML){$('a',$resetButton).html(this.options.resetText);}
501else{$('a',$resetButton).text(this.options.resetText);}
502$('a',$resetButton).click($.proxy(function(){this.clearSelection();},this));this.$ul.prepend($resetButton);}},buildSelectAll:function(){if(typeof this.options.selectAllValue==='number'){this.options.selectAllValue=this.options.selectAllValue.toString();}
503var alreadyHasSelectAll=this.hasSelectAll();if(!alreadyHasSelectAll&&this.options.includeSelectAllOption&&this.options.multiple&&$('option',this.$select).length>this.options.includeSelectAllIfMoreThan){if(this.options.includeSelectAllDivider){this.$ul.prepend($(this.options.templates.divider));}
504var $li=$(this.options.templates.li);$('label',$li).addClass("checkbox");if(this.options.enableHTML){$('label',$li).html(" "+this.options.selectAllText);}
505else{$('label',$li).text(" "+this.options.selectAllText);}
506if(this.options.selectAllName){$('label',$li).prepend('<input type="checkbox" name="'+this.options.selectAllName+'" />');}
507else{$('label',$li).prepend('<input type="checkbox" />');}
508var $checkbox=$('input',$li);$checkbox.val(this.options.selectAllValue);$li.addClass("multiselect-item multiselect-all");$checkbox.parent().parent().addClass('multiselect-all');this.$ul.prepend($li);$checkbox.prop('checked',false);}},buildFilter:function(){if(this.options.enableFiltering||this.options.enableCaseInsensitiveFiltering){var enableFilterLength=Math.max(this.options.enableFiltering,this.options.enableCaseInsensitiveFiltering);if(this.$select.find('option').length>=enableFilterLength){this.$filter=$(this.options.templates.filter);$('input',this.$filter).attr('placeholder',this.options.filterPlaceholder);if(this.options.includeFilterClearBtn){var clearBtn=$(this.options.templates.filterClearBtn);clearBtn.on('click',$.proxy(function(event){clearTimeout(this.searchTimeout);this.query='';this.$filter.find('.multiselect-search').val('');$('li',this.$ul).show().removeClass('multiselect-filter-hidden');this.updateSelectAll();if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}},this));this.$filter.find('.input-group').append(clearBtn);}
509this.$ul.prepend(this.$filter);this.$filter.val(this.query).on('click',function(event){event.stopPropagation();}).on('input keydown',$.proxy(function(event){if(event.which===13){event.preventDefault();}
510clearTimeout(this.searchTimeout);this.searchTimeout=this.asyncFunction($.proxy(function(){if(this.query!==event.target.value){this.query=event.target.value;var currentGroup,currentGroupVisible;$.each($('li',this.$ul),$.proxy(function(index,element){var value=$('input',element).length>0?$('input',element).val():"";var text=$('label',element).text();var filterCandidate='';if((this.options.filterBehavior==='text')){filterCandidate=text;}
511else if((this.options.filterBehavior==='value')){filterCandidate=value;}
512else if(this.options.filterBehavior==='both'){filterCandidate=text+'\n'+value;}
513if(value!==this.options.selectAllValue&&text){var showElement=false;if(this.options.enableCaseInsensitiveFiltering){filterCandidate=filterCandidate.toLowerCase();this.query=this.query.toLowerCase();}
514if(this.options.enableFullValueFiltering&&this.options.filterBehavior!=='both'){var valueToMatch=filterCandidate.trim().substring(0,this.query.length);if(this.query.indexOf(valueToMatch)>-1){showElement=true;}}
515else if(filterCandidate.indexOf(this.query)>-1){showElement=true;}
516if(!showElement){$(element).css('display','none');$(element).addClass('multiselect-filter-hidden');}
517if(showElement){$(element).css('display','block');$(element).removeClass('multiselect-filter-hidden');}
518if($(element).hasClass('multiselect-group')){currentGroup=element;currentGroupVisible=showElement;}
519else{if(showElement){$(currentGroup).show().removeClass('multiselect-filter-hidden');}
520if(!showElement&&currentGroupVisible){$(element).show().removeClass('multiselect-filter-hidden');}}}},this));}
521this.updateSelectAll();if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}
522this.options.onFiltering(event.target);},this),300,this);},this));}}},destroy:function(){this.$container.remove();this.$select.show();this.$select.prop('disabled',this.options.wasDisabled);this.$select.data('multiselect',null);},refresh:function(){var inputs={};$('li input',this.$ul).each(function(){inputs[$(this).val()]=$(this);});$('option',this.$select).each($.proxy(function(index,element){var $elem=$(element);var $input=inputs[$(element).val()];if($elem.is(':selected')){$input.prop('checked',true);if(this.options.selectedClass){$input.closest('li').addClass(this.options.selectedClass);}}
523else{$input.prop('checked',false);if(this.options.selectedClass){$input.closest('li').removeClass(this.options.selectedClass);}}
524if($elem.is(":disabled")){$input.attr('disabled','disabled').prop('disabled',true).closest('li').addClass('disabled');}
525else{$input.prop('disabled',false).closest('li').removeClass('disabled');}},this));this.updateButtonText();this.updateSelectAll();if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}},select:function(selectValues,triggerOnChange){if(!$.isArray(selectValues)){selectValues=[selectValues];}
526for(var i=0;i<selectValues.length;i++){var value=selectValues[i];if(value===null||value===undefined){continue;}
527var $option=this.getOptionByValue(value);var $checkbox=this.getInputByValue(value);if($option===undefined||$checkbox===undefined){continue;}
528if(!this.options.multiple){this.deselectAll(false);}
529if(this.options.selectedClass){$checkbox.closest('li').addClass(this.options.selectedClass);}
530$checkbox.prop('checked',true);$option.prop('selected',true);if(triggerOnChange){this.options.onChange($option,true);}}
531this.updateButtonText();this.updateSelectAll();if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}},clearSelection:function(){this.deselectAll(false);this.updateButtonText();this.updateSelectAll();if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}},deselect:function(deselectValues,triggerOnChange){if(!$.isArray(deselectValues)){deselectValues=[deselectValues];}
532for(var i=0;i<deselectValues.length;i++){var value=deselectValues[i];if(value===null||value===undefined){continue;}
533var $option=this.getOptionByValue(value);var $checkbox=this.getInputByValue(value);if($option===undefined||$checkbox===undefined){continue;}
534if(this.options.selectedClass){$checkbox.closest('li').removeClass(this.options.selectedClass);}
535$checkbox.prop('checked',false);$option.prop('selected',false);if(triggerOnChange){this.options.onChange($option,false);}}
536this.updateButtonText();this.updateSelectAll();if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}},selectAll:function(justVisible,triggerOnSelectAll){var justVisible=typeof justVisible==='undefined'?true:justVisible;var allLis=$("li:not(.divider):not(.disabled):not(.multiselect-group)",this.$ul);var visibleLis=$("li:not(.divider):not(.disabled):not(.multiselect-group):not(.multiselect-filter-hidden):not(.multiselect-collapisble-hidden)",this.$ul).filter(':visible');if(justVisible){$('input:enabled',visibleLis).prop('checked',true);visibleLis.addClass(this.options.selectedClass);$('input:enabled',visibleLis).each($.proxy(function(index,element){var value=$(element).val();var option=this.getOptionByValue(value);$(option).prop('selected',true);},this));}
537else{$('input:enabled',allLis).prop('checked',true);allLis.addClass(this.options.selectedClass);$('input:enabled',allLis).each($.proxy(function(index,element){var value=$(element).val();var option=this.getOptionByValue(value);$(option).prop('selected',true);},this));}
538$('li input[value="'+this.options.selectAllValue+'"]',this.$ul).prop('checked',true);if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}
539if(triggerOnSelectAll){this.options.onSelectAll();}},deselectAll:function(justVisible,triggerOnDeselectAll){var justVisible=typeof justVisible==='undefined'?true:justVisible;var allLis=$("li:not(.divider):not(.disabled):not(.multiselect-group)",this.$ul);var visibleLis=$("li:not(.divider):not(.disabled):not(.multiselect-group):not(.multiselect-filter-hidden):not(.multiselect-collapisble-hidden)",this.$ul).filter(':visible');if(justVisible){$('input[type="checkbox"]:enabled',visibleLis).prop('checked',false);visibleLis.removeClass(this.options.selectedClass);$('input[type="checkbox"]:enabled',visibleLis).each($.proxy(function(index,element){var value=$(element).val();var option=this.getOptionByValue(value);$(option).prop('selected',false);},this));}
540else{$('input[type="checkbox"]:enabled',allLis).prop('checked',false);allLis.removeClass(this.options.selectedClass);$('input[type="checkbox"]:enabled',allLis).each($.proxy(function(index,element){var value=$(element).val();var option=this.getOptionByValue(value);$(option).prop('selected',false);},this));}
541$('li input[value="'+this.options.selectAllValue+'"]',this.$ul).prop('checked',fal
vendor: 4,262 bytes, lines 541-555
541se);if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}
542if(triggerOnDeselectAll){this.options.onDeselectAll();}},rebuild:function(){this.$ul.html('');this.options.multiple=this.$select.attr('multiple')==="multiple";this.buildSelectAll();this.buildDropdownOptions();this.buildFilter();this.updateButtonText();this.updateSelectAll(true);if(this.options.enableClickableOptGroups&&this.options.multiple){this.updateOptGroups();}
543if(this.options.disableIfEmpty&&$('option',this.$select).length<=0){this.disable();}
544else{this.enable();}
545if(this.options.dropRight){this.$ul.addClass('pull-right');}},dataprovider:function(dataprovider){var groupCounter=0;var $select=this.$select.empty();$.each(dataprovider,function(index,option){var $tag;if($.isArray(option.children)){groupCounter++;$tag=$('<optgroup/>').attr({label:option.label||'Group '+groupCounter,disabled:!!option.disabled,value:option.value});forEach(option.children,function(subOption){var attributes={value:subOption.value,label:subOption.label||subOption.value,title:subOption.title,selected:!!subOption.selected,disabled:!!subOption.disabled};for(var key in subOption.attributes){attributes['data-'+key]=subOption.attributes[key];}
546$tag.append($('<option/>').attr(attributes));});}
547else{var attributes={'value':option.value,'label':option.label||option.value,'title':option.title,'class':option['class'],'selected':!!option['selected'],'disabled':!!option['disabled']};for(var key in option.attributes){attributes['data-'+key]=option.attributes[key];}
548$tag=$('<option/>').attr(attributes);$tag.text(option.label||option.value);}
549$select.append($tag);});this.rebuild();},enable:function(){this.$select.prop('disabled',false);this.$button.prop('disabled',false).removeClass('disabled');},disable:function(){this.$select.prop('disabled',true);this.$button.prop('disabled',true).addClass('disabled');},setOptions:function(options){this.options=this.mergeOptions(options);},mergeOptions:function(options){return $.extend(true,{},this.defaults,this.options,options);},hasSelectAll:function(){return $('li.multiselect-all',this.$ul).length>0;},updateOptGroups:function(){var $groups=$('li.multiselect-group',this.$ul)
550var selectedClass=this.options.selectedClass;$groups.each(function(){var $options=$(this).nextUntil('li.multiselect-group').not('.multiselect-filter-hidden').not('.disabled');var checked=true;$options.each(function(){var $input=$('input',this);if(!$input.prop('checked')){checked=false;}});if(selectedClass){if(checked){$(this).addClass(selectedClass);}
551else{$(this).removeClass(selectedClass);}}
552$('input',this).prop('checked',checked);});},updateSelectAll:function(notTriggerOnSelectAll){if(this.hasSelectAll()){var allBoxes=$("li:not(.multiselect-item):not(.multiselect-filter-hidden):not(.multiselect-group):not(.disabled) input:enabled",this.$ul);var allBoxesLength=allBoxes.length;var checkedBoxesLength=allBoxes.filter(":checked").length;var selectAllLi=$("li.multiselect-all",this.$ul);var selectAllInput=selectAllLi.find("input");if(checkedBoxesLength>0&&checkedBoxesLength===allBoxesLength){selectAllInput.prop("checked",true);selectAllLi.addClass(this.options.selectedClass);}
553else{selectAllInput.prop("checked",false);selectAllLi.removeClass(this.options.selectedClass);}}},updateButtonText:function(){var options=this.getSelected();if(this.options.enableHTML){$('.multiselect .multiselect-selected-text',this.$container).html(this.options.buttonText(options,this.$select));}
554else{$('.multiselect .multiselect-selected-text',this.$container).text(this.options.buttonText(options,this.$select));}
555$('.multiselect',this.$container).attr('title',this.options.buttonTitle(options,this.$select));},getSelected:function(){return $('option',this.$select).filter(":selected");},getOptionByValue:function(value){var options=$('option',this.$select);var valueToCompare=value.toString();for(var i=0;i<options.length;i=i+1){var option=options[i];if(option.value===valueToCompare){return $(option);}}},getInputByValue:function(value){var checkboxes=$('li input:not(.multiselect-search)',this.$ul);var valueToCompare=value.toString();for(var i=0;i<checkboxes.length;i=i+1){var checkbox=checkboxes[i];if(checkbox.value===valueToCompare){return $(checkbox);}}
555},updateOriginalOptions:function(){this.originalOptions=this.$select.clone()[0].options;},asyncFunction:function(callback,timeout,self){var args=Array.prototype.slice.call(arguments,3);return setTimeout(function(){callback.apply(self||window,args);},timeout);},setAllSelectedText:function(allSelectedText){this.options.allSelectedText=allSelectedText;this.updateButtonText();}};$.fn.multiselect=function(option,parameter,extraOptions){return this.each(function(){var data=$(this).data('multiselect');var options=typeof option==='object'&&option;if(!data){data=new Multiselect(this,options);$(this).data('multiselect',data);}
556if(typeof option==='string'){data[option](parameter,extraOptions);if(option==='destroy'){$(this).data('multiselect',false);}}});};$.fn.multiselect.Constructor=Multiselect;$(function(){$("select[data-role=multiselect]").multiselect();});});(function(factory){if(typeof define==='function'&&define.amd){define(factory);}else if(typeof exports==='object'){module.exports=factory();}else{var _OldCookies=window.Cookies;var api=window.Cookies=factory();api.noConflict=function(){window.Cookies=_OldCookies;return api;};}}(function(){function extend(){var i=0;var result={};for(;i<arguments.length;i++){var attributes=arguments[i];for(var key in attributes){result[key]=attributes[key];}}
557return result;}
558function init(converter){function api(key,value,attributes){var result;if(arguments.length>1){attributes=extend({path:'/'},api.defaults,attributes);if(typeof attributes.expires==='number'){var expires=new Date();expires.setMilliseconds(expires.getMilliseconds()+attributes.expires*864e+5);attributes.expires=expires;}
559try{result=JSON.stringify(value);if(/^[\{\[]/.test(result)){value=result;}}catch(e){}
560value=encodeURIComponent(String(value));value=value.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);key=encodeURIComponent(String(key));key=key.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);key=key.replace(/[\(\)]/g,escape);return(document.cookie=[key,'=',value,attributes.expires&&'; expires='+attributes.expires.toUTCString(),attributes.path&&'; path='+attributes.path,attributes.domain&&'; domain='+attributes.domain,attributes.secure?'; secure':''].join(''));}
561if(!key){result={};}
562var cookies=document.cookie?document.cookie.split('; '):[];var rdecode=/(%[0-9A-Z]{2})+/g;var i=0;for(;i<cookies.length;i++){var parts=cookies[i].split('=');var name=parts[0].replace(rdecode,decodeURIComponent);var cookie=parts.slice(1).join('=');if(cookie.charAt(0)==='"'){cookie=cookie.slice(1,-1);}
563try{cookie=converter&&converter(cookie,name)||cookie.replace(rdecode,decodeURIComponent);if(this.json){try{cookie=JSON.parse(cookie);}catch(e){}}
564if(key===name){result=cookie;break;}
565if(!key){result[name]=cookie;}}catch(e){}}
566return result;}
567api.get=api.set=api;api.getJSON=function(){return api.apply({json:true},[].slice.call(arguments));};api.defaults={};api.remove=function(key,attributes){api(key,'',extend(attributes,{expires:-1}));};api.withConverter=init;return api;}
568return init();}));var mediator=(function(){var subscribe=function(tracker,fn){if(!mediator.trackers[tracker])
569{mediator.trackers[tracker]=[];}
570mediator.trackers[tracker].push({context:this,callback:fn});return this;},publish=function(tracker){if(!mediator.trackers[tracker])
571{return false;}
572var args=Array.prototype.slice.call(arguments,1);for(var i=0,l=mediator.trackers[tracker].length;i<l;i++)
573{var subscription=mediator.trackers[tracker][i];subscription.callback.apply(subscription.context,args);}
574return this;},publishAll=function(){if(Object.keys(mediator.trackers).length===0)
575{return false;}
576for(var tracker in mediator.trackers)
577{var args=[tracker].concat(Array.prototype.slice.call(arguments));mediator.publish.apply(this,args);}
578return this;};return{trackers:{},publish:publish,publishAll:publishAll,subscribe:subscribe}})();;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.8.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;
vendor: 14,024 bytes, line 578
578if(c)return c(b)&&c(b).matches||!1;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.flexboxlegacy=function(){return J("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,
vendor: 6,594 bytes, line 578
578sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 578
578ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
578slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
578parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
578,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 578
578,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
578!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
578):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
578o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
578,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});!function(e){function t(a){if(r[a])return r[a].exports;var n=r[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,r){"use strict";function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(e,t,r){if(e&&p.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}function i(e){return p.isString(e)&&(e=n(e)),e instanceof a?e.format():a.prototype.format.call(e)}function o(e,t){return n(e,!1,!0).resolve(t)}function s(e,t){return e?n(e,!1,!0).resolveObject(t):t}var l=r(10),p=r(12);t.parse=n,t.resolve=o,t.resolveObject=s,t.format=i,t.Url=a;var u=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(c),m=["'"].concat(f),b=["%","/","?",";","#"].concat(m),g=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,k=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},z={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=r(13);a.prototype.parse=function(e,t,r){if(!p.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),n=-1!==a&&a<e.indexOf("#")?"?":"#",i=e.split(n),o=/\\/g;i[0]=i[0].replace(o,"/"),e=i.join(n);var s=e;if(s=s.trim(),!r&&1===e.split("#").length){var h=d.exec(s);if(h)return this.path=s,this.href=s,this.pathname=h[1],h[2]?(this.search=h[2],this.query=t?P.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=u.exec(s);if(c){c=c[0];var f=c.toLowerCase();this.protocol=f,s=s.substr(c.length)}if(r||c||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===s.substr(0,2);!T||c&&z[c]||(s=s.substr(2),this.slashes=!0)}if(!z[c]&&(T||c&&!y[c])){for(var w=-1,x=0;x<g.length;x++){var U=s.indexOf(g[x]);-1!==U&&(-1===w||U<w)&&(w=U)}var C,R;R=-1===w?s.lastIndexOf("@"):s.lastIndexOf("@",w),-1!==R&&(C=s.slice(0,R),s=s.slice(R+1),this.auth=decodeURIComponent(C)),w=-1;for(var x=0;x<b.length;x++){var U=s.indexOf(b[x]);-1!==U&&(-1===w||U<w)&&(w=U)}-1===w&&(w=s.length),this.host=s.slice(0,w),s=s.slice(w),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var D=this.hostname.split(/\./),x=0,S=D.length;x<S;x++){var L=D[x];if(L&&!L.match(v)){for(var N="",O=0,F=L.length;O<F;O++)L.charCodeAt(O)>127?N+="x":N+=L[O];
vendor: 7,043 bytes, line 578
578if(!N.match(v)){var A=D.slice(0,x),q=D.slice(x+1),M=L.match(k);M&&(A.push(M[1]),q.unshift(M[2])),q.length&&(s="/"+q.join(".")+s),this.hostname=A.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=l.toASCII(this.hostname));var J=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+J,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!j[f])for(var x=0,S=m.length;x<S;x++){var W=m[x];if(-1!==s.indexOf(W)){var G=encodeURIComponent(W);G===W&&(G=escape(W)),s=s.split(W).join(G)}}var Q=s.indexOf("#");-1!==Q&&(this.hash=s.substr(Q),s=s.slice(0,Q));var B=s.indexOf("?");if(-1!==B?(this.search=s.substr(B),this.query=s.substr(B+1),t&&(this.query=P.parse(this.query)),s=s.slice(0,B)):t&&(this.search="",this.query={}),s&&(this.pathname=s),y[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var J=this.pathname||"",X=this.search||"";this.path=J+X}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",a=this.hash||"",n=!1,i="";this.host?n=e+this.host:this.hostname&&(n=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&p.isObject(this.query)&&Object.keys(this.query).length&&(i=P.stringify(this.query));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),a&&"#"!==a.charAt(0)&&(a="#"+a),o&&"?"!==o.charAt(0)&&(o="?"+o),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+n+r+o+a},a.prototype.resolve=function(e){return this.resolveObject(n(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(p.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var r=new a,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l<s.length;l++){var u=s[l];"protocol"!==u&&(r[u]=e[u])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var c=h[d];r[c]=e[c]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||z[e.protocol])r.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),r.pathname=f.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",b=r.search||"";r.path=m+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),k=v||g||r.host&&e.pathname,j=k,P=r.pathname&&r.pathname.split("/")||[],f=e.pathname&&e.pathname.split("/")||[],T=r.protocol&&!y[r.protocol];if(T&&(r.hostname="",r.port=null,r.host&&(""===P[0]?P[0]=r.host:P.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),k=k&&(""===f[0]||""===P[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,P=f;else if(f.length)P||(P=[]),P.pop(),P=P.concat(f),r.search=e.search,r.query=e.query;else if(!p.isNullOrUndefined(e.search)){if(T){r.hostname=r.host=P.shift();var w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return r.search=e.search,r.query=e.query,p.isNull(r.pathname)&&p.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!P.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=P.slice(-1)[0],U=(r.host||e.host||P.length>1)&&("."===x||".."===x)||""===x,C=0,R=P.length;R>=0;R--)x=P[R],"."===x?P.splice(R,1):".."===x?(P.splice(R,1),C++):C&&(P.splice(R,1),C--);if(!k&&!j)for(;C--;C)P.unshift("..");!k||""===P[0]||P[0]&&"/"===P[0].charAt(0)||P.unshift(""),U&&"/"!==P.join("/").substr(-1)&&P.push("");var I=""===P[0]||P[0]&&"/"===P[0].charAt(0);if(T){r.hostname=r.host=I?"":P.length?P.shift():"";var w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return k=k||r.host&&P.length,k&&!I&&P.unshift(""),P.length?r.pathname=P.join("/"):(r.pathname=null,r.path=null),p.isNull(r.pathname)&&p.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=h.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";r(3),e.exports=r(4)},function(e,t){},function(e,t,r){"use strict";(function(t){function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),o=r(5),s=r(6),l=r(0),p={theme:"color",backendUrl:null,infoUrl:"http://ct.de/-2467514",infoDisplay:"blank",lang:"de",langFallback:"en",mailUrl:function(){var e=l.parse(this.getURL(),!0);return e.query.view="mail",delete e.search,l.format(e)},mailBody:function(){return this.getURL()},mediaUrl:null,orientation:"horizontal",buttonStyle:"standard",referrerTrack:null,services:["twitter","facebook","info"],title:t.document.title,twitterVia:null,flattrUser:null,flattrCategory:null,url:function(){var e=t.document.location.href,r=o("link[rel=canonical]").attr("href")||this.getMeta("og:url")||"";return r.length>0&&(r.indexOf("http")<0&&(r=0!==r.indexOf("//")?t.document.location.protocol+"//"+t.document.location.host+r:t.document.location.protocol+r),e=r),e}},u=function(){function e(t,r){var n=this;a(this,e),this.element=t,o(t).empty(),this.options=o.extend({},p,r,o(t).data()),this.services=Object.keys(s).filter(function(e){return n.isEnabledService(e)}).sort(function(e,t){var r=n.options.services;return r.indexOf(e)-r.indexOf(t)}).map(function(e){return s[e](n)}),this._addButtonList(),null!==this.options.backendUrl&&"icon"!==this.options.buttonStyle&&this.get
vendor: 4,524 bytes, line 578
578Shares(this._updateCounts.bind(this))}return i(e,[{key:"isEnabledService",value:function(e){return this.options.services.indexOf(e)>-1}},{key:"$socialshareElement",value:function(){return o(this.element)}},{key:"getLocalized",value:function(e,t){return"object"===n(e[t])?void 0===e[t][this.options.lang]?e[t][this.options.langFallback]:e[t][this.options.lang]:"string"==typeof e[t]?e[t]:void 0}},{key:"getMeta",value:function(e){return o('meta[name="'+e+'"],[property="'+e+'"]').attr("content")||""}},{key:"getInfoUrl",value:function(){return this.options.infoUrl}},{key:"getInfoDisplayPopup",value:function(){return"popup"===this.options.infoDisplay}},{key:"getInfoDisplayBlank",value:function(){return"popup"!==this.options.infoDisplay&&"self"!==this.options.infoDisplay}},{key:"getURL",value:function(){return this.getOption("url")}},{key:"getOption",value:function(e){var t=this.options[e];return"function"==typeof t?t.call(this):t}},{key:"getTitle",value:function(){var e=this.getOption("title");if(o(this.element).data().title)return e;e=e||this.getMeta("DC.title");var t=this.getMeta("DC.creator");return e&&t?e+" - "+t:e}},{key:"getReferrerTrack",value:function(){return this.options.referrerTrack||""}},{key:"getShares",value:function(e){var t=l.parse(this.options.backendUrl,!0);return t.query.url=this.getURL(),delete t.search,o.getJSON(l.format(t),e)}},{key:"_updateCounts",value:function(e,t,r){var a=this;e&&o.each(e,function(e,t){a.isEnabledService(e)&&(t>=1e3&&(t=Math.round(t/1e3)+"k"),o(a.element).find("."+e+" a").append(o("<span/>").addClass("share_count").text(t)))})}},{key:"_addButtonList",value:function(){var e=this,r=o("<ul/>").addClass(["theme-"+this.options.theme,"orientation-"+this.options.orientation,"button-style-"+this.options.buttonStyle,"shariff-col-"+this.options.services.length].join(" "));this.services.forEach(function(t){var a=o("<li/>").addClass("shariff-button "+t.name),n=o("<a/>").attr("href",t.shareUrl);if("standard"===e.options.buttonStyle){var i=o("<span/>").addClass("share_text").text(e.getLocalized(t,"shareText"));n.append(i)}void 0!==t.faPrefix&&void 0!==t.faName&&n.prepend(o("<span/>").addClass(t.faPrefix+" "+t.faName)),t.popup?(n.attr("data-rel","popup"),"info"!==t.name&&n.attr("rel","nofollow")):t.blank?(n.attr("target","_blank"),"info"===t.name?n.attr("rel","noopener noreferrer"):n.attr("rel","nofollow noopener noreferrer")):"info"!==t.name&&n.attr("rel","nofollow"),n.attr("title",e.getLocalized(t,"title")),n.attr("role","button"),n.attr("aria-label",e.getLocalized(t,"title")),a.append(n),r.append(a)}),r.on("click",'[data-rel="popup"]',function(e){e.preventDefault();var r=o(this).attr("href");if(r.match(/twitter\.com\/intent\/(\w+)/)){var a=t.window;if(a.__twttr&&a.__twttr.widgets&&a.__twttr.widgets.loaded)return}t.window.open(r,"_blank","width=600,height=460")}),this.$socialshareElement().append(r)}}]),e}();e.exports=u,t.Shariff=u,o(function(){o(".shariff").each(function(){this.hasOwnProperty("shariff")||(this.shariff=new u(this))})})}).call(t,r(1))},function(e,t){e.exports=jQuery},function(e,t,r){"use strict";e.exports={addthis:r(7),buffer:r(8),diaspora:r(9),facebook:r(16),flattr:r(17),flipboard:r(18),info:r(19),linkedin:r(20),mail:r(21),pinterest:r(22),pocket:r(23),print:r(24),qzone:r(25),reddit:r(26),stumbleupon:r(27),telegram:r(28),tencent:r(29),threema:r(30),tumblr:r(31),twitter:r(32),vk:r(33),weibo:r(34),whatsapp:r(35),xing:r(36)}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"addthis",faPrefix:"fas",faName:"fa-plus",title:{bg:"Сподели в AddThis",cs:"Sdílet na AddThis",da:"Del på AddThis",de:"Bei AddThis teilen",en:"Share on AddThis",es:"Compartir en AddThis",fi:"Jaa AddThisissä",fr:"Partager sur AddThis",hr:"Podijelite na AddThis",hu:"Megosztás AddThisen",it:"Condividi su AddThis",ja:"AddThis上で共有",ko:"AddThis에서 공유하기",nl:"Delen op AddThis",no:"Del på AddThis",pl:"Udostępnij przez AddThis",pt:"Compartilhar no AddThis",ro:"Partajează pe AddThis",ru:"Поделиться на AddThis",sk:"Zdieľať na AddThis",sl:"Deli na AddThis",sr:"Podeli na AddThis",sv:"Dela på AddThis",tr:"AddThis'ta payla
578ş",zh:"在AddThis上分享"},shareUrl:"http://api.addthis.com/oexchange/0.8/offer?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"buffer",faPrefix:"fab",faName:"fa-buffer",title:{bg:"Сподели в buffer",cs:"Sdílet na buffer",da:"Del på buffer",de:"Bei buffer teilen",en:"Share on buffer",es:"Compartir en buffer",fi:"Jaa bufferissä",fr:"Partager sur buffer",hr:"Podijelite na buffer",hu:"Megosztás bufferen",it:"Condividi su buffer",ja:"buffer上で共有",ko:"buffer에서 공유하기",nl:"Delen op buffer",no:"Del på buffer",pl:"Udostępnij przez buffer",pt:"Compartilhar no buffer",ro:"Partajează pe buffer",ru:"Поделиться на buffer",sk:"Zdieľať na buffer",sl:"Deli na buffer",sr:"Podeli na buffer",sv:"Dela på buffer",tr:"buffer'ta paylaş",zh:"在buffer上分享"},shareUrl:"https://buffer.com/add?text="+encodeURIComponent(e.getTitle())+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";var a=r(0);e.exports=function(e){var t=a.parse("https://share.diasporafoundation.org/",!0);return t.query.url=e.getURL(),t.query.title=e.getTitle(),t.protocol="https",delete t.search,{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"diaspora",faPrefix:"fas",faName:"fa-asterisk",title:{bg:"Сподели в diaspora*",cs:"Sdílet na diaspora*",da:"Del på diaspora*",de:"Bei diaspora* teilen",en:"Share on diaspora*",es:"Compartir en diaspora*",fi:"Jaa Diasporaissä",fr:"Partager sur diaspora*",hr:"Podijelite na diaspora*",hu:"Megosztás diaspora*",it:"Condividi su diaspora*",ja:"diaspora*上で共有",ko:"diaspora*에서 공유하기",nl:"Delen op diaspora*",no:"Del på diaspora*",pl:"Udostępnij przez diaspora*",pt:"Compartilhar no diaspora*",ro:"Partajează pe diaspora*",ru:"Поделиться на diaspora*",sk:"Zdieľať na diaspora*",sl:"Deli na diaspora*",sr:"Podeli na diaspora*-u",sv:"Dela på diaspora*",tr:"diaspora*'ta paylaş",zh:"分享至diaspora*"},shareUrl:a.format(t)+e.getReferrerTrack()}}},function(e,t,r){(function(e,a){var n;!function(a){function i(e){throw new RangeError(I[e])}function o(e,t){for(var r=e.length,a=[];r--;)a[r]=t(e[r]);return a}function s(e,t){var r=e.split("@"),a="";return r.length>1&&(a=r[0]+"@",e=r[1]),e=e.replace(R,"."),a+o(e.split("."),t).join(".")}function l(e){for(var t,r,a=[],n=0,i=e.length;n<i;)t=e.charCodeAt(n++),t>=55296&&t<=56319&&n<i?(r=e.charCodeAt(n++),56320==(64512&r)?a.push(((1023&t)<<10)+(1023&r)+65536):(a.push(t),n--)):a.push(t);return a}function p(e){return o(e,function(e){var t="";return e>65535&&(e-=65536,t+=L(e>>>10&1023|55296),e=56320|1023&e),t+=L(e)}).join("")}function u(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:k}function h(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function d(e,t,r){var a=0;for(e=r?S(e/P):e>>1,e+=S(e/t);e>D*z>>1;a+=k)e=S(e/D);return S(a+(D+1)*e/(e+y))}function c(e){var t,r,a,n,o,s,l,h,c,f,m=[],b=e.length,g=0,y=w,P=T;for(r=e.lastIndexOf(x),r<0&&(r=0),a=0;a<r;++a)e.charCodeAt(a)>=128&&i("not-basic"),m.push(e.charCodeAt(a));for(n=r>0?r+1:0;n<b;){for(o=g,s=1,l=k;n>=b&&i("invalid-input"),h=u(e.charCodeAt(n++)),(h>=k||h>S((v-g)/s))&&i("overflow"),g+=h*s,c=l<=P?j:l>=P+z?z:l-P,!(h<c);l+=k)f=k-c,s>S(v/f)&&i("overflow"),s*=f;t=m.length+1,P=d(g-o,t,0==o),S(g/t)>v-y&&i("overflow"),y+=S(g/t),g%=t,m.splice(g++,0,y)}return p(m)}function f(e){var t,r,a,n,o,s,p,u,c,f,m,b,g,y,P,U=[];for(e=l(e),b=e.length,t=w,r=0,o=T,s=0;s<b;
578++s)(m=e[s])<128&&U.push(L(m));for(a=n=U.length,n&&U.push(x);a<b;){for(p=v,s=0;s<b;++s)(m=e[s])>=t&&m<p&&(p=m);for(g=a+1,p-t>S((v-r)/g)&&i("overflow"),r+=(p-t)*g,t=p,s=0;s<b;++s)if(m=e[s],m<t&&++r>v&&i("overflow"),m==t){for(u=r,c=k;f=c<=o?j:c>=o+z?z:c-o,!(u<f);c+=k)P=u-f,y=k-f,U.push(L(h(f+P%y,0))),u=S(P/y);U.push(L(h(u,0))),o=d(r,g,a==n),r=0,++a}++r,++t}return U.join("")}function m(e){return s(e,function(e){return U.test(e)?c(e.slice(4).toLowerCase()):e})}function b(e){return s(e,function(e){return C.test(e)?"xn--"+f(e):e})}var g,v=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,2147483647),k=36,j=1,z=26,y=38,P=700,T=72,w=128,x="-",U=/^xn--/,C=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=k-j,S=Math.floor,L=String.fromCharCode;g={version:"1.4.1",ucs2:{decode:l,encode:p},decode:c,encode:f,toASCII:b,toUnicode:m},void 0!==(n=function(){return g}.call(t,r,t,e))&&(e.exports=n)}()}).call(t,r(11)(e),r(1))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(14),t.encode=t.stringify=r(15)},function(e,t,r){"use strict";function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var l=1e3;i&&"number"==typeof i.maxKeys&&(l=i.maxKeys);var p=e.length;l>0&&p>l&&(p=l);for(var u=0;u<p;++u){var h,d,c,f,m=e[u].replace(s,"%20"),b=m.indexOf(r);b>=0?(h=m.substr(0,b),d=m.substr(b+1)):(h=m,d=""),c=decodeURIComponent(h),f=decodeURIComponent(d),a(o,c)?n(o[c])?o[c].push(f):o[c]=[o[c],f]:o[c]=f}return o};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";function a(e,t){if(e.map)return e.map(t);for(var r=[],a=0;a<e.length;a++)r.push(t(e[a],a));return r}var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?a(o(e),function(o){var s=encodeURIComponent(n(o))+r;return i(e[o])?a(e[o],function(e){return s+encodeURIComponent(n(e))}).join(t):s+encodeURIComponent(n(e[o]))}).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"facebook",faPrefix:"fab",faName:"fa-facebook-f",title:{bg:"Сподели във Facebook",cs:"Sdílet na Facebooku",da:"Del på Facebook",de:"Bei Facebook teilen",en:"Share on Facebook",es:"Compartir en Facebook",fi:"Jaa Facebookissa",fr:"Partager sur Facebook",hr:"Podijelite na Facebooku",hu:"Megosztás Facebookon",it:"Condividi su Facebook",ja:"フェイスブック上で共有",ko:"페이스북에서 공유하기",nl:"Delen op Facebook",no:"Del på Facebook",pl:"Udostępnij na Facebooku",pt:"Compartilhar no Facebook",ro:"Partajează pe Facebook",ru:"Поделиться на Facebook",sk:"Zdieľať na Facebooku",sl:"Deli na Facebooku",sr:"Podeli na Facebook-u",sv:"Dela på Facebook",tr:"Facebook'ta payla
578ş",zh:"在Facebook上分享"},shareUrl:"https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=e.getTitle(),a=e.getMeta("description");return{popup:!0,shareText:"Flattr",name:"flattr",faPrefix:"far",faName:"fa-money-bill-alt",title:{de:"Artikel flattrn",en:"Flattr this"},shareUrl:"https://flattr.com/submit/auto?title="+encodeURIComponent(r)+"&description="+encodeURIComponent(a)+"&category="+encodeURIComponent(e.options.flattrCategory||"text")+"&user_id="+encodeURIComponent(e.options.flattrUser)+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,shareText:"flip it",name:"flipboard",faPrefix:"fab",faName:"fa-flipboard",title:{bg:"Сподели в Flipboard",cs:"Sdílet na Flipboardu",da:"Del på Flipboard",de:"Bei Flipboard teilen",en:"Share on Flipboard",es:"Compartir en Flipboard",fi:"Jaa Flipboardissä",fr:"Partager sur Flipboard",hr:"Podijelite na Flipboardu",hu:"Megosztás Flipboardon",it:"Condividi su Flipboard",ja:"Flipboard上で共有",ko:"Flipboard에서 공유하기",nl:"Delen op Flipboard",no:"Del på Flipboard",pl:"Udostępnij na Flipboardu",pt:"Compartilhar no Flipboard",ro:"Partajează pe Flipboard",ru:"Поделиться на Flipboard",sk:"Zdieľať na Flipboardu",sl:"Deli na Flipboardu",sr:"Podeli na Flipboard-u",sv:"Dela på Flipboard",tr:"Flipboard'ta paylaş",zh:"在Flipboard上分享"},shareUrl:"https://share.flipboard.com/bookmarklet/popout?v=2&title="+encodeURIComponent(e.getTitle())+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{blank:e.getInfoDisplayBlank(),popup:e.getInfoDisplayPopup(),shareText:"Info",name:"info",faPrefix:"fas",faName:"fa-info",title:{bg:"Повече информация",cs:"Více informací",da:"Flere oplysninger",de:"Weitere Informationen",en:"More information",es:"Más informaciones",fi:"Lisätietoja",fr:"Plus d'informations",hr:"Više informacija",hu:"Több információ",it:"Maggiori informazioni",ja:"詳しい情報",ko:"추가 정보",nl:"Verdere informatie",no:"Mer informasjon",pl:"Więcej informacji",pt:"Mais informações",ro:"Mai multe informatii",ru:"Больше информации",sk:"Viac informácií",sl:"Več informacij",sr:"Više informacija",sv:"Mer information",tr:"Daha fazla bilgi",zh:"更多信息"},shareUrl:e.getInfoUrl()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"mitteilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"シェア",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"distribuiți",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"linkedin",faPrefix:"fab",faName:"fa-linkedin-in",title:{bg:"Сподели в LinkedIn",cs:"Sdílet na LinkedIn",da:"Del på LinkedIn",de:"Bei LinkedIn teilen",en:"Share on LinkedIn",es:"Compartir en LinkedIn",fi:"Jaa LinkedInissä",fr:"Partager sur LinkedIn",hr:"Podijelite na LinkedIn",hu:"Megosztás LinkedInen",it:"Condividi su LinkedIn",ja:"LinkedIn上で共有",ko:"LinkedIn에서 공유하기",nl:"Delen op LinkedIn",no:"Del på LinkedIn",pl:"Udostępnij przez LinkedIn",pt:"Compartilhar no LinkedIn",ro:"Partajează pe LinkedIn",ru:"Поделиться на LinkedIn",sk:"Zdieľať na LinkedIn",sl:"Deli na LinkedIn",sr:"Podeli na LinkedIn-u",sv:"Dela på LinkedIn",tr:"LinkedIn'ta paylaş",zh:"在LinkedIn上分享"},shareUrl:"https://www.linkedin.com/shareArticle?mini=true&summary="+encodeURIComponent(e.getMeta("description"))+"&title="+r+"&url="+t}}},function(e,t,r){"use strict";e.exports=function(e){var t=e.getOption("mailUrl");return 0===t.indexOf("mailto:")&&(t+="?subject="+encodeURIComponent(e.getOption("mailSubject")||e.getTitle()),t+="&body="+encodeURIComponent(e.getOption("mailBody").replace(/\{url\}/i,e.getURL()))),{blank:0===t.indexOf("http"),popup:!1,shareText:{en:"mail",zh:"分享"},name:"mail",faPrefix:"fas",faName:"fa-envelope",title:{bg:"Изпрати по имейл",cs:"Poslat mailem",da:"Sende via e-mail",de:"Per E-Mail versenden",en:"Send by email",es:"Enviar por email",fi:"Lähetä sähköpostitse",fr:"Envoyer par courriel",hr:"Pošaljite emailom",hu:"Elküldés e-mailben",it:"Inviare via email",ja:"電子メールで送信",ko:"이메일로 보내기",nl:"Sturen via e-mail",no:"Send via epost",pl:"Wyślij e-mailem",pt:"Enviar por e-mail",ro:"Trimite prin e-mail",ru:"Отправить по эл. почте",sk:"Poslať e-mailom",sl:"Pošlji po elektronski pošti",sr:"Pošalji putem email-a",sv:"Skicka via e-post",tr:"E-posta ile gönder",zh:"通过电子邮件传送"},shareUrl:t}}},function(e,t,r){"use strict";var a=r(0);e.exports=function(e){var t=e.getTitle(),r=e.getMeta("DC.creator");r.length>0&&(t+=" - "+r);var n=e.getOption("mediaUrl");(!n||n.length<=0)&&(n=e.getMeta("og:image"));var i=a.parse("https://www.pinterest.com/pin/create/link/",!0);return i.query.url=e.getURL(),i.query.media=n,i.query.description=t,delete i.search,{popup:!0,shareText:"pin it",name:"pinterest",faPrefix:"fab",faName:"fa-pinterest-p",title:{bg:"Сподели в Pinterest",cs:"Přidat na Pinterest",da:"Del på Pinterest",de:"Bei Pinterest pinnen",en:"Pin it on Pinterest",es:"Compartir en Pinterest",fi:"Jaa Pinterestissä",fr:"Partager sur Pinterest",hr:"Podijelite na Pinterest",hu:"Megosztás Pinteresten",it:"Condividi su Pinterest",ja:"Pinterest上で共有",ko:"Pinterest에서 공유하기",nl:"Delen op Pinterest",no:"Del på Pinterest",pl:"Udostępnij przez Pinterest",pt:"Compartilhar no Pinterest",ro:"Partajează pe Pinterest",ru:"Поделиться на Pinterest",sk:"Zdieľať na Pinterest",sl:"Deli na Pinterest",sr:"Podeli na Pinterest-u",sv:"Dela på Pinterest",tr:"Pinterest'ta payla
578ş",zh:"分享至Pinterest"},shareUrl:a.format(i)+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,shareText:"Pocket",name:"pocket",faPrefix:"fab",faName:"fa-get-pocket",title:{bg:"Запазване в Pocket",cs:"Uložit do Pocket",da:"Gem i Pocket",de:"In Pocket speichern",en:"Save to Pocket",es:"Guardar en Pocket",fi:"Tallenna kohtaan Pocket",fr:"Enregistrer dans Pocket",hr:"Spremi u Pocket",hu:'Mentés "Pocket"-be',it:"Salva in Pocket",ja:"「ポケット」に保存",ko:"Pocket에 저장",nl:"Opslaan in Pocket",no:"Lagre i Pocket",pl:"Zapisz w Pocket",pt:"Salvar em Pocket",ro:"Salvați în Pocket",ru:"Сохранить в Pocket",sk:"Uložiť do priečinka Pocket",sl:"Shrani v Pocket",sr:"Sačuvaj u Pocket",sv:"Spara till Pocket",tr:"Pocket e kaydet",zh:"保存到Pocket"},shareUrl:"https://getpocket.com/save?title="+encodeURIComponent(e.getTitle())+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{name:"print",faPrefix:"fas",faName:"fa-print",popup:!1,shareText:{bg:"",cs:"tlačit",da:"",de:"drucken",en:"print",es:"impresión",fi:"",fr:"imprimer",hr:"",hu:"",it:"stampa",ja:"",ko:"",nl:"afdrukken",no:"",pl:"drukuj",pt:"",ro:"",ru:"Распечатать",sk:"",sl:"",sr:"",sv:"",tr:"",zh:""},title:{bg:"",cs:"tlačit",da:"",de:"drucken",en:"print",es:"impresión",fi:"",fr:"imprimer",hr:"",hu:"",it:"stampa",ja:"",ko:"",nl:"afdrukken",no:"",pl:"drukuj",pt:"",ro:"",ru:"Распечатать",sk:"",sl:"",sr:"",sv:"",tr:"",zh:""},shareUrl:"javascript:window.print();"}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"qzone",faPrefix:"fab",faName:"fa-qq",title:{bg:"Сподели в Qzone",cs:"Sdílet na Qzone",da:"Del på Qzone",de:"Bei Qzone teilen",en:"Share on Qzone",es:"Compartir en Qzone",fi:"Jaa Qzoneissä",fr:"Partager sur Qzone",hr:"Podijelite na Qzone",hu:"Megosztás Qzone",it:"Condividi su Qzone",ja:"Qzone上で共有",ko:"Qzone에서 공유하기",nl:"Delen op Qzone",no:"Del på Qzone",pl:"Udostępnij przez Qzone",pt:"Compartilhar no Qzone",ro:"Partajează pe Qzone",ru:"Поделиться на Qzone",sk:"Zdieľať na Qzone",sl:"Deli na Qzone",sr:"Podeli na Qzone-u",sv:"Dela på Qzone",tr:"Qzone'ta paylaş",zh:"分享至QQ空间"},shareUrl:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+encodeURIComponent(e.getURL())+"&title="+e.getTitle()+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return""!==r&&(r="&title="+r),{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"reddit",faPrefix:"fab",faName:"fa-reddit-alien",title:{bg:"Сподели в Reddit",cs:"Sdílet na Redditu",da:"Del på Reddit",de:"Bei Reddit teilen",en:"Share on Reddit",es:"Compartir en Reddit",fi:"Jaa Redditissä",fr:"Partager sur Reddit",hr:"Podijelite na Reddit",hu:"Megosztás Redditen",it:"Condividi su Reddit",ja:"Reddit上で共有",ko:"Reddit에서 공유하기",nl:"Delen op Reddit",no:"Del på Reddit",pl:"Udostępnij przez Reddit",pt:"Compartilhar no Reddit",ro:"Partajează pe Reddit",ru:"Поделиться на Reddit",sk:"Zdieľať na Reddit",sl:"Deli na Reddit",sr:"Podeli na Reddit-u",sv:"Dela på Reddit",tr:"Reddit'ta paylaş",zh:"分享至Reddit"},shareUrl:"https://reddit.com/submit?url="+t+r+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return""!==r&&(r="&title="+r),{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"stumbleupon",faPrefix:"fab",faName:"fa-stumbleupon",title:{bg:"Сподели в Stumbleupon",cs:"Sdílet na Stumbleuponu",da:"Del på Stumbleupon",de
vendor: 4,562 bytes, line 578
578:"Bei Stumbleupon teilen",en:"Share on Stumbleupon",es:"Compartir en Stumbleupon",fi:"Jaa Stumbleuponissä",fr:"Partager sur Stumbleupon",hr:"Podijelite na Stumbleupon",hu:"Megosztás Stumbleupon",it:"Condividi su Stumbleupon",ja:"Stumbleupon上で共有",ko:"Stumbleupon에서 공유하기",nl:"Delen op Stumbleupon",no:"Del på Stumbleupon",pl:"Udostępnij przez Stumbleupon",pt:"Compartilhar no Stumbleupon",ro:"Partajează pe Stumbleupon",ru:"Поделиться на Stumbleupon",sk:"Zdieľať na Stumbleupon",sl:"Deli na Stumbleupon",sr:"Podeli na Stumbleupon-u",sv:"Dela på Stumbleupon",tr:"Stumbleupon'ta paylaş",zh:"分享至Stumbleupon"},shareUrl:"https://www.stumbleupon.com/submit?url="+t+r+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"telegram",faPrefix:"fab",faName:"fa-telegram",title:{bg:"Сподели в Telegram",cs:"Sdílet na Telegramu",da:"Del på Telegram",de:"Bei Telegram teilen",en:"Share on Telegram",es:"Compartir en Telegram",fi:"Jaa Telegramissä",fr:"Partager sur Telegram",hr:"Podijelite na Telegram",hu:"Megosztás Telegramen",it:"Condividi su Telegram",ja:"Telegram上で共有",ko:"Telegram에서 공유하기",nl:"Delen op Telegram",no:"Del på Telegram",pl:"Udostępnij przez Telegram",pt:"Compartilhar no Telegram",ro:"Partajează pe Telegram",ru:"Поделиться на Telegram",sk:"Zdieľať na Telegram",sl:"Deli na Telegram",sr:"Podeli na Telegram-u",sv:"Dela på Telegram",tr:"Telegram'ta paylaş",zh:"在Telegram上分享"},shareUrl:"https://t.me/share/url?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"tencent-weibo",faPrefix:"fab",faName:"fa-tencent-weibo",title:{bg:"Сподели в tencent weibo",cs:"Sdílet na tencent weibo",da:"Del på tencent weibo",de:"Bei tencent weibo teilen",en:"Share on tencent weibo",es:"Compartir en tencent weibo",fi:"Jaa tencent weiboissä",fr:"Partager sur tencent weibo",hr:"Podijelite na tencent weibo",hu:"Megosztás tencent weiboen",it:"Condividi su tencent weibo",ja:"Tencent weibo上で共有",ko:"Tencent weibo에서 공유하기",nl:"Delen op tencent weibo",no:"Del på tencent weibo",pl:"Udostępnij przez tencent weibo",pt:"Compartilhar no tencent weibo",ro:"Partajează pe tencent weibo",ru:"Поделиться на tencent weibo",sk:"Zdieľať na tencent weibo",sl:"Deli na tencent weibo",sr:"Podeli na tencent weibo-u",sv:"Dela på tencent weibo",tr:"Tencent weibo'ta paylaş",zh:"分享至腾讯微博"},shareUrl:"http://v.t.qq.com/share/share.php?url="+encodeURIComponent(e.getURL())+"&title="+e.getTitle()+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=e.getTitle();return{popup:!1,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"threema",faPrefix:"fas",faName:"fa-lock",title:{bg:"Сподели в Threema",cs:"Sdílet na Threema",da:"Del på Threema",de:"Bei Threema teilen",en:"Share on Threema",es:"Compartir en Threema",fi:"Jaa Threemaissä",fr:"Partager sur Threema",hr:"Podijelite na Threema",hu:"Megosztás Threemaen",it:"Condividi su Threema",ja:"Threema上で共有",ko:"Threema에서 공유하기",nl:"Delen op Threema",no:"Del på Threema",pl:"Udostępnij przez Threema",pt:"Compartilhar no Threema",ro:"Partajează pe Threema",ru:"Поделиться на Threema",sk:"Zdieľať na Threema",sl:"Deli na Threema",sr:"Podeli na Threema-u",sv:"Dela på Threema",tr:"Threema'ta payla
578ş",zh:"在Threema上分享"},shareUrl:"threema://compose?text="+encodeURIComponent(r)+"%20"+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"tumblr",faPrefix:"fab",faName:"fa-tumblr",title:{bg:"Сподели в tumblr",cs:"Sdílet na tumblru",da:"Del på tumblr",de:"Bei tumblr teilen",en:"Share on tumblr",es:"Compartir en tumblr",fi:"Jaa tumblrissä",fr:"Partager sur tumblr",hr:"Podijelite na tumblr",hu:"Megosztás tumblren",it:"Condividi su tumblr",ja:"tumblr上で共有",ko:"tumblr에서 공유하기",nl:"Delen op tumblr",no:"Del på tumblr",pl:"Udostępnij przez tumblr",pt:"Compartilhar no tumblr",ro:"Partajează pe tumblr",ru:"Поделиться на tumblr",sk:"Zdieľať na tumblr",sl:"Deli na tumblr",sr:"Podeli na tumblr-u",sv:"Dela på tumblr",tr:"tumblr'ta paylaş",zh:"在tumblr上分享"},shareUrl:"http://tumblr.com/widgets/share/tool?canonicalUrl="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";var a=r(0),n=function(e,t){var r=document.createElement("div"),a=document.createTextNode(e);r.appendChild(a);var n=r.textContent;if(n.length<=t)return e;var i=n.substring(0,t-1).lastIndexOf(" ");return n=n.substring(0,i)+"…"};e.exports=function(e){var t=a.parse("https://twitter.com/intent/tweet",!0),r=e.getTitle();return t.query.text=n(r,120),t.query.url=e.getURL(),null!==e.options.twitterVia&&(t.query.via=e.options.twitterVia),delete t.search,{popup:!0,shareText:{en:"tweet",ja:"のつぶやき",ko:"짹짹",ru:"твит",sr:"твеет",zh:"鸣叫"},name:"twitter",faPrefix:"fab",faName:"fa-twitter",title:{bg:"Сподели в Twitter",cs:"Sdílet na Twiiteru",da:"Del på Twitter",de:"Bei Twitter teilen",en:"Share on Twitter",es:"Compartir en Twitter",fi:"Jaa Twitterissä",fr:"Partager sur Twitter",hr:"Podijelite na Twitteru",hu:"Megosztás Twitteren",it:"Condividi su Twitter",ja:"ツイッター上で共有",ko:"트위터에서 공유하기",nl:"Delen op Twitter",no:"Del på Twitter",pl:"Udostępnij na Twitterze",pt:"Compartilhar no Twitter",ro:"Partajează pe Twitter",ru:"Поделиться на Twitter",sk:"Zdieľať na Twitteri",sl:"Deli na Twitterju",sr:"Podeli na Twitter-u",sv:"Dela på Twitter",tr:"Twitter'da paylaş",zh:"在Twitter上分享"},shareUrl:a.format(t)+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"vk",faPrefix:"fab",faName:"fa-vk",title:{bg:"Сподели във VK",cs:"Sdílet na VKu",da:"Del på VK",de
vendor: 4,149 bytes, line 578
578:"Bei VK teilen",en:"Share on VK",es:"Compartir en VK",fi:"Jaa VKissa",fr:"Partager sur VK",hr:"Podijelite na VKu",hu:"Megosztás VKon",it:"Condividi su VK",ja:"フェイスブック上で共有",ko:"페이스북에서 공유하기",nl:"Delen op VK",no:"Del på VK",pl:"Udostępnij na VKu",pt:"Compartilhar no VK",ro:"Partajează pe VK",ru:"Поделиться на ВКонтакте",sk:"Zdieľať na VKu",sl:"Deli na VKu",sr:"Podeli na VK-u",sv:"Dela på VK",tr:"VK'ta paylaş",zh:"在VK上分享"},shareUrl:"https://vk.com/share.php?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"weibo",faPrefix:"fab",faName:"fa-weibo",title:{bg:"Сподели в weibo",cs:"Sdílet na weibo",da:"Del på weibo",de:"Bei weibo teilen",en:"Share on weibo",es:"Compartir en weibo",fi:"Jaa weiboissä",fr:"Partager sur weibo",hr:"Podijelite na weibo",hu:"Megosztás weiboen",it:"Condividi su weibo",ja:"Weibo上で共有",ko:"Weibo에서 공유하기",nl:"Delen op weibo",no:"Del på weibo",pl:"Udostępnij przez weibo",pt:"Compartilhar no weibo",ro:"Partajează pe weibo",ru:"Поделиться на weibo",sk:"Zdieľať na weibo",sl:"Deli na weibo",sr:"Podeli na weibo-u",sv:"Dela på weibo",tr:"Weibo'ta paylaş",zh:"分享至新浪微博"},shareUrl:"http://service.weibo.com/share/share.php?url="+encodeURIComponent(e.getURL())+"&title="+e.getTitle()+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=e.getTitle();return{popup:!1,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"whatsapp",faPrefix:"fab",faName:"fa-whatsapp",title:{bg:"Сподели в Whatsapp",cs:"Sdílet na Whatsappu",da:"Del på Whatsapp",de:"Bei Whatsapp teilen",en:"Share on Whatsapp",es:"Compartir en Whatsapp",fi:"Jaa WhatsAppissä",fr:"Partager sur Whatsapp",hr:"Podijelite na Whatsapp",hu:"Megosztás WhatsAppen",it:"Condividi su Whatsapp",ja:"Whatsapp上で共有",ko:"Whatsapp에서 공유하기",nl:"Delen op Whatsapp",no:"Del på Whatsapp",pl:"Udostępnij przez WhatsApp",pt:"Compartilhar no Whatsapp",ro:"Partajează pe Whatsapp",ru:"Поделиться на Whatsapp",sk:"Zdieľať na Whatsapp",sl:"Deli na Whatsapp",sr:"Podeli na WhatsApp-u",sv:"Dela på Whatsapp",tr:"Whatsapp'ta paylaş",zh:"在Whatsapp上分享"},shareUrl:"whatsapp://send?text="+encodeURIComponent(r)+"%20"+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"xing",faPrefix:"fab",faName:"fa-xing",title:{bg:"Сподели в XING",cs:"Sdílet na XINGu",da:"Del på XING",de:"Bei XING teilen",en:"Share on XING",es:"Compartir en XING",fi:"Jaa XINGissä",fr:"Partager sur XING",hr:"Podijelite na XING",hu:"Megosztás XINGen",it:"Condividi su XING",ja:"XING上で共有",ko:"XING에서 공유하기",nl:"Delen op XING",no:"Del på XING",pl:"Udostępnij przez XING",pt:"Compartilhar no XING",ro:"Partajează pe XING",ru:"Поделиться на XING",sk:"Zdieľať na XING",sl:"Deli na XING",sr:"Podeli na XING-u",sv:"Dela på XING",tr:"XING'ta payla
vendor: 7,104 bytes, lines 578-686
578ş",zh:"分享至XING"},shareUrl:"https://www.xing.com/spi/shares/new?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}}]);+function($){'use strict';var Modal=function(element,options){this.options=options
579this.$body=$(document.body)
580this.$element=$(element)
581this.$dialog=this.$element.find('.modal-dialog')
582this.$backdrop=null
583this.isShown=null
584this.originalBodyPad=null
585this.scrollbarWidth=0
586this.ignoreBackdropClick=false
587this.fixedContent='.navbar-fixed-top, .navbar-fixed-bottom'
588if(this.options.remote){this.$element.find('.modal-content').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')},this))}}
589Modal.VERSION='3.4.1'
590Modal.TRANSITION_DURATION=300
591Modal.BACKDROP_TRANSITION_DURATION=150
592Modal.DEFAULTS={backdrop:true,keyboard:true,show:true}
593Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)}
594Modal.prototype.show=function(_relatedTarget){var that=this
595var e=$.Event('show.bs.modal',{relatedTarget:_relatedTarget})
596this.$element.trigger(e)
597if(this.isShown||e.isDefaultPrevented())return
598this.isShown=true
599this.checkScrollbar()
600this.setScrollbar()
601this.$body.addClass('modal-open')
602this.escape()
603this.resize()
604this.$element.on('click.dismiss.bs.modal','[data-dismiss="modal"]',$.proxy(this.hide,this))
605this.$dialog.on('mousedown.dismiss.bs.modal',function(){that.$element.one('mouseup.dismiss.bs.modal',function(e){if($(e.target).is(that.$element))that.ignoreBackdropClick=true})})
606this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade')
607if(!that.$element.parent().length){that.$element.appendTo(that.$body)}
608that.$element.show().scrollTop(0)
609that.adjustDialog()
610if(transition){that.$element[0].offsetWidth}
611that.$element.addClass('in')
612that.enforceFocus()
613var e=$.Event('shown.bs.modal',{relatedTarget:_relatedTarget})
614transition?that.$dialog.one('bsTransitionEnd',function(){that.$element.trigger('focus').trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger('focus').trigger(e)})}
615Modal.prototype.hide=function(e){if(e)e.preventDefault()
616e=$.Event('hide.bs.modal')
617this.$element.trigger(e)
618if(!this.isShown||e.isDefaultPrevented())return
619this.isShown=false
620this.escape()
621this.resize()
622$(document).off('focusin.bs.modal')
623this.$element.removeClass('in').off('click.dismiss.bs.modal').off('mouseup.dismiss.bs.modal')
624this.$dialog.off('mousedown.dismiss.bs.modal')
625$.support.transition&&this.$element.hasClass('fade')?this.$element.one('bsTransitionEnd',$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal()}
626Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(document!==e.target&&this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.trigger('focus')}},this))}
627Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keydown.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keydown.dismiss.bs.modal')}}
628Modal.prototype.resize=function(){if(this.isShown){$(window).on('resize.bs.modal',$.proxy(this.handleUpdate,this))}else{$(window).off('resize.bs.modal')}}
629Modal.prototype.hideModal=function(){var that=this
630this.$element.hide()
631this.backdrop(function(){that.$body.removeClass('modal-open')
632that.resetAdjustments()
633that.resetScrollbar()
634that.$element.trigger('hidden.bs.modal')})}
635Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove()
636this.$backdrop=null}
637Modal.prototype.backdrop=function(callback){var that=this
638var animate=this.$element.hasClass('fade')?'fade':''
639if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate
640this.$backdrop=$(document.createElement('div')).addClass('modal-backdrop '+animate).appendTo(this.$body)
641this.$element.on('click.dismiss.bs.modal',$.proxy(function(e){if(this.ignoreBackdropClick){this.ignoreBackdropClick=false
642return}
643if(e.target!==e.currentTarget)return
644this.options.backdrop=='static'?this.$element[0].focus():this.hide()},this))
645if(doAnimate)this.$backdrop[0].offsetWidth
646this.$backdrop.addClass('in')
647if(!callback)return
648doAnimate?this.$backdrop.one('bsTransitionEnd',callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in')
649var callbackRemove=function(){that.removeBackdrop()
650callback&&callback()}
651$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one('bsTransitionEnd',callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else if(callback){callback()}}
652Modal.prototype.handleUpdate=function(){this.adjustDialog()}
653Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight
654this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:'',paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:''})}
655Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:'',paddingRight:''})}
656Modal.prototype.checkScrollbar=function(){var fullWindowWidth=window.innerWidth
657if(!fullWindowWidth){var documentElementRect=document.documentElement.getBoundingClientRect()
658fullWindowWidth=documentElementRect.right-Math.abs(documentElementRect.left)}
659this.bodyIsOverflowing=document.body.clientWidth<fullWindowWidth
660this.scrollbarWidth=this.measureScrollbar()}
661Modal.prototype.setScrollbar=function(){var bodyPad=parseInt((this.$body.css('padding-right')||0),10)
662this.originalBodyPad=document.body.style.paddingRight||''
663var scrollbarWidth=this.scrollbarWidth
664if(this.bodyIsOverflowing){this.$body.css('padding-right',bodyPad+scrollbarWidth)
665$(this.fixedContent).each(function(index,element){var actualPadding=element.style.paddingRight
666var calculatedPadding=$(element).css('padding-right')
667$(element).data('padding-right',actualPadding).css('padding-right',parseFloat(calculatedPadding)+scrollbarWidth+'px')})}}
668Modal.prototype.resetScrollbar=function(){this.$body.css('padding-right',this.originalBodyPad)
669$(this.fixedContent).each(function(index,element){var padding=$(element).data('padding-right')
670$(element).removeData('padding-right')
671element.style.paddingRight=padding?padding:''})}
672Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement('div')
673scrollDiv.className='modal-scrollbar-measure'
674this.$body.append(scrollDiv)
675var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth
676this.$body[0].removeChild(scrollDiv)
677return scrollbarWidth}
678function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this)
679var data=$this.data('bs.modal')
680var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=='object'&&option)
681if(!data)$this.data('bs.modal',(data=new Modal(this,options)))
682if(typeof option=='string')data[option](_relatedTarget)
683else if(options.show)data.show(_relatedTarget)})}
684var old=$.fn.modal
685$.fn.modal=Plugin
686$.fn.modal.Constructor=Modal
687$.fn.modal.noConflict=function(){$.fn.modal=old
688return this}
689$(document).on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this)
690var href=$this.attr('href')
691var target=$this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,''))
692var $target=$(document).find(target)
693var option=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data())
694if($this.is('a'))e.preventDefault()
695$target.one('show.bs.modal',function(showEvent){if(showEvent.isDefaultPrevented())return
696$target.one('hidden.bs.modal',function(){$this.is(':visible')&&$this.trigger('focus')})})
697Plugin.call($target,option,this)})}(jQuery);(function($,undefined){function UTCDate(){return new Date(Date.UTC.apply(Date,arguments));}
698function UTCToday(){var today=new Date();return UTCDate(today.getFullYear(),today.getMonth(),today.getDate());}
699function isUTCEquals(date1,date2){return(date1.getUTCFullYear()===date2.getUTCFullYear()&&date1.getUTCMonth()===date2.getUTCMonth()&&date1.getUTCDate()===date2.getUTCDate());}
700function alias(method){return function(){return this[method].apply(this,arguments);};}
701var DateArray=(function(){var extras={get:function(i){return this.slice(i)[0];},contains:function(d){var val=d&&d.valueOf();for(var i=0,l=this.length;i<l;i++)
702if(this[i].valueOf()===val)
703return i;return-1;},remove:function(i){this.splice(i,1);},replace:function(new_array){if(!new_array)
704return;if(!$.isArray(new_array))
705new_array=[new_array];this.clear();this.push.apply(this,new_array);},clear:function(){this.length=0;},copy:function(){var a=new DateArray();a.replace(this);return a;}};return function(){var a=[];a.push.apply(a,arguments);$.extend(a,extras);return a;};})();var Datepicker=function(element,options){this._process_options(options);this.dates=new DateArray();this.viewDate=this.o.defaultViewDate;this.focusDate=null;this.element=$(element);this.isInline=false;this.isInput=this.element.is('input');this.component=this.element.hasClass('date')?this.element.find('.add-on, .input-group-addon, .btn'):false;this.hasInput=this.component&&this.element.find('input').length;if(this.component&&this.component.length===0)
706this.component=false;let label="";if(this.element.is("input")){let labelElement=this.element[0].labels;if(labelElement&&labelElement.length){label=labelElement[0].innerText;}}
707if(!label){let inputElement=this.element.find('input');if(inputElement&&inputElement.length){let labelElement=inputElement[0].labels;if(labelElement&&labelElement.length){label=labelElement[0].innerText;}}}
708if(!label){let parentElement=this.element.parent().parent();if(parentElement&&parentElement.length){let labelElement=parentElement[0].querySelector('label');if(labelElement){label=labelElement.innerText;}}}
709label=label.charAt(0).toUpperCase()+label.slice(1);let labelDate=$('#fromDate').val()
710if(labelDate){label=labelDate.replace(/(\w+\.?\s*)(\d{2})/,'$1 20$2');}
711this.picker=$(DPGlobal.template.replaceAll('{{label}}',label));this._buildEvents();this._attachEvents();if(this.isInline){this.picker.addClass('datepicker-inline').appendTo(this.element);}
712else{this.picker.addClass('datepicker-dropdown dropdown-menu '+HB.Utils.mobilePopupConstants.overlayClass);}
713if(this.o.rtl){this.picker.addClass('datepicker-rtl');}
714this.viewMode=this.o.startView;if(this.o.calendarWeeks)
715this.picker.find('tfoot .today, tfoot .clear').attr('colspan',function(i,val){return parseInt(val)+1;});this._allow_update=false;this.setStartDate(this._o.startDate);this.setEndDate(this._o.endDate);this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);this.setDatesDisabled(this.o.datesDisabled);this.fillDow();this.fillMonths();this._allow_update=true;this.update();this.showMode();if(this.isInline){this.show();}};Datepicker.prototype={constructor:Datepicker,_process_options:function(opts){this._o=$.extend({},this._o,opts);var o=this.o=$.extend({},this._o);var lang=o.language;if(!dates[lang]){lang=lang.split('-')[0];if(!dates[lang])
716lang=defaults.language;}
717o.language=lang;switch(o.startView){case 2:case'decade':o.startView=2;break;case 1:case'year':o.startView=1;break;default:o.startView=0;}
718switch(o.minViewMode){case 1:case'months':o.minViewMode=1;break;case 2:case'years':o.minViewMode=2;break;default:o.minViewMode=0;}
719o.startView=Math.max(o.startView,o.minViewMode);
719if(o.multidate!==true){o.multidate=Number(o.multidate)||false;if(o.multidate!==false)
720o.multidate=Math.max(0,o.multidate);}
721o.multidateSeparator=String(o.multidateSeparator);o.weekStart%=7;o.weekEnd=((o.weekStart+6)%7);var format=DPGlobal.parseFormat(o.format);if(o.startDate!==-Infinity){if(!!o.startDate){if(o.startDate instanceof Date)
722o.startDate=this._local_to_utc(this._zero_time(o.startDate));else
723o.startDate=DPGlobal.parseDate(o.startDate,format,o.language);}
724else{o.startDate=-Infinity;}}
725if(o.endDate!==Infinity){if(!!o.endDate){if(o.endDate instanceof Date)
726o.endDate=this._local_to_utc(this._zero_time(o.endDate));else
727o.endDate=DPGlobal.parseDate(o.endDate,format,o.language);}
728else{o.endDate=Infinity;}}
729o.daysOfWeekDisabled=o.daysOfWeekDisabled||[];if(!$.isArray(o.daysOfWeekDisabled))
730o.daysOfWeekDisabled=o.daysOfWeekDisabled.split(/[,\s]*/);o.daysOfWeekDisabled=$.map(o.daysOfWeekDisabled,function(d){return parseInt(d,10);});o.datesDisabled=o.datesDisabled||[];if(!$.isArray(o.datesDisabled)){var datesDisabled=[];datesDisabled.push(DPGlobal.parseDate(o.datesDisabled,format,o.language));o.datesDisabled=datesDisabled;}
731o.datesDisabled=$.map(o.datesDisabled,function(d){return DPGlobal.parseDate(d,format,o.language);});var plc=String(o.orientation).toLowerCase().split(/\s+/g),_plc=o.orientation.toLowerCase();plc=$.grep(plc,function(word){return/^auto|left|right|top|bottom$/.test(word);});o.orientation={x:'auto',y:'auto'};if(!_plc||_plc==='auto');else if(plc.length===1){switch(plc[0]){case'top':case'bottom':o.orientation.y=plc[0];break;case'left':case'right':o.orientation.x=plc[0];break;}}
732else{_plc=$.grep(plc,function(word){return/^left|right$/.test(word);});o.orientation.x=_plc[0]||'auto';_plc=$.grep(plc,function(word){return/^top|bottom$/.test(word);});o.orientation.y=_plc[0]||'auto';}
733if(o.defaultViewDate){var year=o.defaultViewDate.year||new Date().getFullYear();var month=o.defaultViewDate.month||0;var day=o.defaultViewDate.day||1;o.defaultViewDate=UTCDate(year,month,day);}else{o.defaultViewDate=UTCToday();}
734o.showOnFocus=o.showOnFocus!==undefined?o.showOnFocus:true;},_events:[],_secondaryEvents:[],_applyEvents:function(evs){for(var i=0,el,ch,ev;i<evs.length;i++){el=evs[i][0];if(evs[i].length===2){ch=undefined;ev=evs[i][1];}
735else if(evs[i].length===3){ch=evs[i][1];ev=evs[i][2];}
736el.on(ev,ch);}},_unapplyEvents:function(evs){for(var i=0,el,ev,ch;i<evs.length;i++){el=evs[i][0];if(evs[i].length===2){ch=undefined;ev=evs[i][1];}
737else if(evs[i].length===3){ch=evs[i][1];ev=evs[i][2];}
738el.off(ev,ch);}},_buildEvents:function(){var events={keyup:$.proxy(function(e){if($.inArray(e.keyCode,[27,37,39,38,40,32,13,9])===-1)
739this.update();},this),keydown:$.proxy(this.keydown,this)};if(this.o.showOnFocus===true){events.focus=$.proxy(this.show,this);}
740if(this.isInput){this._events=[[this.element,events]];}
741else if(this.component&&this.hasInput){this._events=[[this.element.find('input'),events],[this.component,{click:$.proxy(this.show,this)}]];}
742else if(this.element.is('div')){this.isInline=true;}
743else{this._events=[[this.element,{click:$.proxy(this.show,this)}]];}
744this._events.push([this.element,'*',{blur:$.proxy(function(e){this._focused_from=e.target;},this)}],[this.element,{blur:$.proxy(function(e){this._focused_from=e.target;},this)}]);this._secondaryEvents=[[this.picker,{click:$.proxy(this.click,this)}],[$(window),{resize:$.proxy(this.place,this)}]];this._secondaryEvents.push([$(document),{'mousedown touchstart':$.proxy(function(e){if(HB.Utils.isMobile()){return;}
745if(!(this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length)){this.hide();}},this)}]);},_attachEvents:function(){this._detachEvents();this._applyEvents(this._events);},_detachEvents:function(){this._unapplyEvents(this._events);},_attachSecondaryEvents:function(){this._detachSecondaryEvents();this._applyEvents(this._secondaryEvents);},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents);},_trigger:function(event,altdate){var date=altdate||this.dates.get(-1),local_date=this._utc_to_local(date);this.element.trigger({type:event,date:local_date,dates:$.map(this.dates,this._utc_to_local),format:$.proxy(function(ix,format){if(arguments.length===0){ix=this.dates.length-1;format=this.o.format;}
746else if(typeof ix==='string'){format=ix;ix=this.dates.length-1;}
747format=format||this.o.format;var date=this.dates.get(ix);return DPGlobal.formatDate(date,format,this.o.language);},this)});},show:function(){if(this.element.attr('readonly')&&this.o.enableOnReadonly===false)
748return;if(!this.isInline)
749this.picker.appendTo(this.o.container);this.place();this.picker.show();this._attachSecondaryEvents();this._trigger('show');if((window.navigator.msMaxTouchPoints||'ontouchstart'in document)&&this.o.disableTouchKeyboard){$(this.element).blur();}
750if(!this.opened){HB.Utils.createMobileBackdrop(this.picker.parent(),()=>{this.hide();});this.element.blur();}
751this.opened=true;return this;},hide:function(){if(this.isInline||!this.opened)
752return this;HB.Utils.removeMobileBackdrop();this.opened=false;this.focusDate=null;this.picker.hide().detach();this._detachSecondaryEvents();this.viewMode=this.o.startView;this.showMode();if(this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find('input').val()))
753this.setValue();this._trigger('hide');return this;},remove:function(){this.hide();this._detachEvents();this._detachSecondaryEvents();this.picker.remove();delete this.element.data().datepicker;if(!this.isInput){delete this.element.data().date;}
754return this;},_utc_to_local:function(utc){return utc&&new Date(utc.getTime()+(utc.getTimezoneOffset()*60000));},_local_to_utc:function(local){return local&&new Date(local.getTime()-(local.getTimezoneOffset()*60000));},_zero_time:function(local){return local&&new Date(local.getFullYear(),local.getMonth(),local.getDate());},_zero_utc_time:function(utc){return utc&&new Date(Date.UTC(utc.getUTCFullYear(),utc.getUTCMonth(),utc.getUTCDate()));},getDates:function(){return $.map(this.dates,this._utc_to_local);},getUTCDates:function(){return $.map(this.dates,function(d){return new Date(d);});},getDate:function(){return this._utc_to_local(this.getUTCDate());},getUTCDate:function(){var selected_date=this.dates.get(-1);if(typeof selected_date!=='undefined'){return new Date(selected_date);}else{return null;}},clearDates:function(){var element;if(this.isInput){element=this.element;}else if(this.component){element=this.element.find('input');}
755if(element){element.val('').change();}
756this.update();this._trigger('changeDate');
756if(this.o.autoclose){this.hide();}},setDates:function(){var args=$.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,args);this._trigger('changeDate');this.setValue();return this;},setUTCDates:function(){var args=$.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,$.map(args,this._utc_to_local));this._trigger('changeDate');this.setValue();return this;},setDate:alias('setDates'),setUTCDate:alias('setUTCDates'),setValue:function(){var formatted=this.getFormattedDate();if(!this.isInput){if(this.component){this.element.find('input').val(formatted).change();}}
757else{this.element.val(formatted).change();}
758return this;},getFormattedDate:function(format){if(format===undefined)
759format=this.o.format;var lang=this.o.language;return $.map(this.dates,function(d){return DPGlobal.formatDate(d,format,lang);}).join(this.o.multidateSeparator);},setStartDate:function(startDate){this._process_options({startDate:startDate});this.update();this.updateNavArrows();return this;},setEndDate:function(endDate){this._process_options({endDate:endDate});this.update();this.updateNavArrows();return this;},setDaysOfWeekDisabled:function(daysOfWeekDisabled){this._process_options({daysOfWeekDisabled:daysOfWeekDisabled});this.update();this.updateNavArrows();return this;},setDatesDisabled:function(datesDisabled){this._process_options({datesDisabled:datesDisabled});this.update();this.updateNavArrows();},place:function(){if(this.isInline)
760return this;if(HB.Utils.isMobile()){return this}
761var $picker=this.picker,wasVisible=$picker.is(':visible');if(!wasVisible){$picker.css({visibility:'hidden',display:'block'});}
762var calendarWidth=$picker.outerWidth();var calendarHeight=$picker.outerHeight();if(!wasVisible){$picker.css({visibility:'',display:'none'});}
763var visualPadding=10,windowWidth=(this.o.container==='body'?$(window).width():$(this.o.container).width()),windowHeight=(this.o.container==='body'?$(window).height():$(this.o.container).height()),scrollTop=(this.o.container==='body'?$(window).scrollTop():$(this.o.container).scrollTop()),appendOffset=$(this.o.container).offset();var parentsZindex=[];this.element.parents().each(function(){var itemZIndex=$(this).css('z-index');if(itemZIndex!=='auto'&&itemZIndex!==0)parentsZindex.push(parseInt(itemZIndex));});var zIndex=Math.max.apply(Math,parentsZindex)+10;var offset=this.component?this.component.parent().offset():this.element.offset();var height=this.component?this.component.outerHeight(true):this.element.outerHeight(false);var width=this.component?this.component.outerWidth(true):this.element.outerWidth(false);var left=offset.left-appendOffset.left,top=offset.top-appendOffset.top;this.picker.removeClass('datepicker-orient-top datepicker-orient-bottom '+'datepicker-orient-right datepicker-orient-left');if(this.o.orientation.x!=='auto'){this.picker.addClass('datepicker-orient-'+this.o.orientation.x);if(this.o.orientation.x==='right')
764left-=calendarWidth-width;}
765else{if(offset.left<0){this.picker.addClass('datepicker-orient-left');left-=offset.left-visualPadding;}else if(left+calendarWidth>windowWidth){this.picker.addClass('datepicker-orient-right');left=offset.left+width-calendarWidth;}else{this.picker.addClass('datepicker-orient-left');}}
766var yorient=this.o.orientation.y,top_overflow,bottom_overflow;if(yorient==='auto'){top_overflow=-scrollTop+top-calendarHeight;bottom_overflow=scrollTop+windowHeight-(top+height+calendarHeight);if(Math.max(top_overflow,bottom_overflow)===bottom_overflow)
767yorient='top';else
768yorient='bottom';}
769this.picker.addClass('datepicker-orient-'+yorient);if(yorient==='top')
770top+=height;else
771top-=calendarHeight+parseInt(this.picker.css('padding-top'));if(this.o.rtl){var right=windowWidth-(left+width);this.picker.css({top:top,right:right,zIndex:zIndex});}else{this.picker.css({top:top,left:left,zIndex:zIndex});}
772return this;},_allow_update:true,update:function(){if(!this._allow_update)
773return this;var oldDates=this.dates.copy(),dates=[],fromArgs=false;if(arguments.length){$.each(arguments,$.proxy(function(i,date){if(date instanceof Date)
774date=this._local_to_utc(date);dates.push(date);},this));fromArgs=true;}
775else{dates=this.isInput?this.element.val():this.element.data('date')||this.element.find('input').val();if(dates&&this.o.multidate)
776dates=dates.split(this.o.multidateSeparator);else
777dates=[dates];delete this.element.data().date;}
778dates=$.map(dates,$.proxy(function(date){return DPGlobal.parseDate(date,this.o.format,this.o.language);},this));dates=$.grep(dates,$.proxy(function(date){return(date<this.o.startDate||date>this.o.endDate||!date);},this),true);this.dates.replace(dates);if(this.dates.length)
779this.viewDate=new Date(this.dates.get(-1));else if(this.viewDate<this.o.startDate)
780this.viewDate=new Date(this.o.startDate);else if(this.viewDate>this.o.endDate)
781this.viewDate=new Date(this.o.endDate);if(fromArgs){this.setValue();}
782else if(dates.length){if(String(oldDates)!==String(this.dates))
783this._trigger('changeDate');}
784if(!this.dates.length&&oldDates.length)
785this._trigger('clearDate');this.fill();return this;},fillDow:function(){var dowCnt=this.o.weekStart,html='<tr>';if(this.o.calendarWeeks){this.picker.find('.datepicker-days thead tr:first-child .datepicker-switch').attr('colspan',function(i,val){return parseInt(val)+1;});var cell='<th class="cw">&#160;</th>';html+=cell;}
786while(dowCnt<this.o.weekStart+7){html+='<th class="dow">'+dates[this.o.language].daysMin[(dowCnt++)%7]+'</th>';}
787html+='</tr>';this.picker.find('.datepicker-days thead').append(html);},fillMonths:function(){var html='',i=0;while(i<12){html+='<span class="month">'+dates[this.o.language].monthsShort[i++].replace(".","")+'</span>';}
788this.picker.find('.datepicker-months td').html(html);},setRange:function(range){if(!range||!range.length)
789delete this.range;else
790this.range=$.map(range,function(d){return d.valueOf();});this.fill();},getClassNames:function(date){var cls=[],year=this.viewDate.getUTCFullYear(),month=this.viewDate.getUTCMonth(),today=new Date();if(date.getUTCFullYear()<year||(date.getUTCFullYear()===year&&date.getUTCMonth()<month)){cls.push('old');}
791else if(date.getUTCFullYear()>year||(date.getUTCFullYear()===year&&date.getUTCMonth()>month)){cls.push('new');}
792if(this.focusDate&&date.valueOf()===this.focusDate.valueOf())
793cls.push('focused');if(this.o.todayHighlight&&date.getUTCFullYear()===today.getFullYear()&&date.getUTCMonth()===today.getMonth()&&date.getUTCDate()===today.getDate()){cls.push('today');}
794if(this.dates.contains(date)!==-1){cls.push('active');if($('#fromDate').val()){$('.datepicker-label').text(formatDate(date));}}
795if(date.valueOf()<this.o.startDate||date.valueOf()>this.o.endDate||$.inArray(date.getUTCDay(),this.o.daysOfWeekDisabled)!==-1){cls.push('disabled');}
796if(this.o.datesDisabled.length>0&&$.grep(this.o.datesDisabled,function(d){return isUTCEquals(date,d);}).length>0){cls.push('disabled','disabled-date');}
797if(this.range){if(date>this.range[0]&&date<this.range[this.range.length-1]){cls.push('range');}
798if($.inArray(date.valueOf(),this.range)!==-1){cls.push('selected');}}
799return cls;},fill:function(){var d=new Date(this.viewDate),year=d.getUTCFullYear(),month=d.getUTCMonth(),startYear=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,startMonth=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,endYear=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,endMonth=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,todaytxt=dates[this.o.language].today||dates['en'].today||'',cleartxt=dates[this.o.language].clear||dates['en'].clear||'',tooltip;if(isNaN(year)||isNaN(month))
800return;this.picker.find('.datepicker-days thead .datepicker-switch').text(dates[this.o.language].months[month]+' '+year);this.picker.find('tfoot .today').text(todaytxt).toggle(this.o.todayBtn!==false);this.picker.find('tfoot .clear').text(cleartxt).toggle(this.o.clearBtn!==false);this.updateNavArrows();this.fillMonths();var prevMonth=UTCDate(year,month-1,28),day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.o.weekStart+7)%7);var nextMonth=new Date(prevMonth);nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var clsName;while(prevMonth.valueOf()<nextMonth){if(prevMonth.getUTCDay()===this.o.weekStart){html.push('<tr>');if(this.o.calendarWeeks){var
801ws=new Date(+prevMonth+(this.o.weekStart-prevMonth.getUTCDay()-7)%7*864e5),th=new Date(Number(ws)+(7+4-ws.getUTCDay())%7*864e5),yth=new Date(Number(yth=UTCDate(th.getUTCFullYear(),0,1))+(7+4-yth.getUTCDay())%7*864e5),calWeek=(th-yth)/864e5/7+1;html.push('<td class="cw">'+calWeek+'</td>');}}
802clsName=this.getClassNames(prevMonth);clsName.push('day');if(this.o.beforeShowDay!==$.noop){var before=this.o.beforeShowDay(this._utc_to_local(prevMonth));if(before===undefined)
803before={};else if(typeof(before)==='boolean')
804before={enabled:before};else if(typeof(before)==='string')
805before={classes:before};if(before.enabled===false)
806clsName.push('disabled');
806if(before.classes)
807clsName=clsName.concat(before.classes.split(/\s+/));if(before.tooltip)
808tooltip=before.tooltip;}
809clsName=$.unique(clsName);html.push('<td class="datepicker-day-entry '+clsName.join(' ')+'"'+(tooltip?' title="'+tooltip+'"':'')+'> '+prevMonth.getUTCDate()+' </td>');tooltip=null;if(prevMonth.getUTCDay()===this.o.weekEnd){html.push('</tr>');}
810prevMonth.setUTCDate(prevMonth.getUTCDate()+1);}
811this.picker.find('.datepicker-days tbody').empty().append(html.join(''));var months=this.picker.find('.datepicker-months').find('th:eq(1)').text(year).end().find('span').removeClass('active');$.each(this.dates,function(i,d){if(d.getUTCFullYear()===year){months.eq(d.getUTCMonth()).addClass('active');}});if(year<startYear||year>endYear){months.addClass('disabled');}
812if(year===startYear){months.slice(0,startMonth).addClass('disabled');}
813if(year===endYear){months.slice(endMonth+1).addClass('disabled');}
814if(this.o.beforeShowMonth!==$.noop){var that=this;$.each(months,function(i,month){if(!$(month).hasClass('disabled')){var moDate=new Date(year,i,1);var before=that.o.beforeShowMonth(moDate);if(before===false)
815$(month).addClass('disabled');}});}
816html='';year=parseInt(year/10,10)*10;var yearCont=this.picker.find('.datepicker-years').find('th:eq(1)').text(year+'-'+(year+9)).end().find('td');year-=1;var years=$.map(this.dates,function(d){return d.getUTCFullYear();}),classes;for(var i=-1;i<11;i++){classes=['year'];if(i===-1)
817classes.push('old');else if(i===10)
818classes.push('new');if($.inArray(year,years)!==-1){classes.push('active');}
819if(year<startYear||year>endYear)
820classes.push('disabled');html+='<span class="'+classes.join(' ')+'">'+year+'</span>';year+=1;}
821yearCont.html(html);},updateNavArrows:function(){if(!this._allow_update)
822return;var d=new Date(this.viewDate),year=d.getUTCFullYear(),month=d.getUTCMonth();switch(this.viewMode){case 0:if(this.o.startDate!==-Infinity&&year<=this.o.startDate.getUTCFullYear()&&month<=this.o.startDate.getUTCMonth()){this.picker.find('.prev').css({visibility:'hidden'});}
823else{this.picker.find('.prev').css({visibility:'visible'});}
824if(this.o.endDate!==Infinity&&year>=this.o.endDate.getUTCFullYear()&&month>=this.o.endDate.getUTCMonth()){this.picker.find('.next').css({visibility:'hidden'});}
825else{this.picker.find('.next').css({visibility:'visible'});}
826break;case 1:case 2:if(this.o.startDate!==-Infinity&&year<=this.o.startDate.getUTCFullYear()){this.picker.find('.prev').css({visibility:'hidden'});}
827else{this.picker.find('.prev').css({visibility:'visible'});}
828if(this.o.endDate!==Infinity&&year>=this.o.endDate.getUTCFullYear()){this.picker.find('.next').css({visibility:'hidden'});}
829else{this.picker.find('.next').css({visibility:'visible'});}
830break;}},click:function(e){e.preventDefault();var target=$(e.target).closest('span, td, th'),year,month,day;if(target.length===1){switch(target[0].nodeName.toLowerCase()){case'th':switch(target[0].className){case'datepicker-switch':this.showMode(1);break;case'prev':case'next':var dir=DPGlobal.modes[this.viewMode].navStep*(target[0].className==='prev'?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,dir);this._trigger('changeMonth',this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,dir);if(this.viewMode===1)
831this._trigger('changeYear',this.viewDate);break;}
832this.fill();break;case'today':var date=new Date();date=UTCDate(date.getFullYear(),date.getMonth(),date.getDate(),0,0,0);this.showMode(-2);var which=this.o.todayBtn==='linked'?null:'view';this._setDate(date,which);break;case'clear':this.clearDates();break;}
833break;case'span':if(!target.hasClass('disabled')){this.viewDate.setUTCDate(1);if(target.hasClass('month')){day=1;month=target.parent().find('span').index(target);year=this.viewDate.getUTCFullYear();this.viewDate.setUTCMonth(month);this._trigger('changeMonth',this.viewDate);if(this.o.minViewMode===1){this._setDate(UTCDate(year,month,day));}}
834else{day=1;month=0;year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year);this._trigger('changeYear',this.viewDate);if(this.o.minViewMode===2){this._setDate(UTCDate(year,month,day));}}
835this.showMode(-1);this.fill();}
836break;case'td':if(target.hasClass('day')&&!target.hasClass('disabled')){day=parseInt(target.text(),10)||1;year=this.viewDate.getUTCFullYear();month=this.viewDate.getUTCMonth();if(target.hasClass('old')){if(month===0){month=11;year-=1;}
837else{month-=1;}}
838else if(target.hasClass('new')){if(month===11){month=0;year+=1;}
839else{month+=1;}}
840this._setDate(UTCDate(year,month,day));}
841break;}}
842if(this.picker.is(':visible')&&this._focused_from){$(this._focused_from).focus();}
843delete this._focused_from;},_toggle_multidate:function(date){var ix=this.dates.contains(date);if(!date){this.dates.clear();}
844if(ix!==-1){if(this.o.multidate===true||this.o.multidate>1||this.o.toggleActive){this.dates.remove(ix);}}else if(this.o.multidate===false){this.dates.clear();this.dates.push(date);}
845else{this.dates.push(date);}
846if(typeof this.o.multidate==='number')
847while(this.dates.length>this.o.multidate)
848this.dates.remove(0);},_setDate:function(date,which){HB.Utils.removeMobileBackdrop();if(!which||which==='date')
849this._toggle_multidate(date&&new Date(date));if(!which||which==='view')
850this.viewDate=date&&new Date(date);this.fill();this.setValue();if(!which||which!=='view'){this._trigger('changeDate');}
851var element;if(this.isInput){element=this.element;}
852else if(this.component){element=this.element.find('input');}
853if(element){element.change();}
854if(this.o.autoclose&&(!which||which==='date')){this.hide();}
855this.opened=false;},moveMonth:function(date,dir){if(!date)
856return undefined;if(!dir)
857return date;var new_date=new Date(date.valueOf()),day=new_date.getUTCDate(),month=new_date.getUTCMonth(),mag=Math.abs(dir),new_month,test;dir=dir>0?1:-1;if(mag===1){test=dir===-1?function(){return new_date.getUTCMonth()===month;}:function(){return new_date.getUTCMonth()!==new_month;};new_month=month+dir;new_date.setUTCMonth(new_month);if(new_month<0||new_month>11)
858new_month=(new_month+12)%12;}
859else{for(var i=0;i<mag;i++)
860new_date=this.moveMonth(new_date,dir);new_month=new_date.getUTCMonth();new_date.setUTCDate(day);test=function(){return new_month!==new_date.getUTCMonth();};}
861while(test()){new_date.setUTCDate(--day);new_date.setUTCMonth(new_month);}
862return new_date;},moveYear:function(date,dir){return this.moveMonth(date,dir*12);},dateWithinRange:function(date){return date>=this.o.startDate&&date<=this.o.endDate;},keydown:function(e){if(!this.picker.is(':visible')){if(e.keyCode===27)
863this.show();return;}
864var dateChanged=false,dir,newDate,newViewDate,focusDate=this.focusDate||this.viewDate;if(!focusDate||isNaN(focusDate.getTime())){focusDate=UTCToday();}
865switch(e.keyCode){case 27:if(this.focusDate){this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();}
866else
867this.hide();e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)
868break;dir=e.keyCode===37?-1:1;if(e.ctrlKey){newDate=this.moveYear(this.dates.get(-1)||UTCToday(),dir);newViewDate=this.moveYear(focusDate,dir);this._trigger('changeYear',this.viewDate);}
869else if(e.shiftKey){newDate=this.moveMonth(this.dates.get(-1)||UTCToday(),dir);newViewDate=this.moveMonth(focusDate,dir);this._trigger('changeMonth',this.viewDate);}
870else{newDate=new Date(this.dates.get(-1)||UTCToday());newDate.setUTCDate(newDate.getUTCDate()+dir);newViewDate=new Date(focusDate);newViewDate.setUTCDate(focusDate.getUTCDate()+dir);}
871if(this.dateWithinRange(newViewDate)){this.focusDate=this.viewDate=newViewDate;this.setValue();this.fill();e.preventDefault();}
872break;case 38:case 40:if(!this.o.keyboardNavigation)
873break;dir=e.keyCode===38?-1:1;
873if(e.ctrlKey){newDate=this.moveYear(this.dates.get(-1)||UTCToday(),dir);newViewDate=this.moveYear(focusDate,dir);this._trigger('changeYear',this.viewDate);}
874else if(e.shiftKey){newDate=this.moveMonth(this.dates.get(-1)||UTCToday(),dir);newViewDate=this.moveMonth(focusDate,dir);this._trigger('changeMonth',this.viewDate);}
875else{newDate=new Date(this.dates.get(-1)||UTCToday());newDate.setUTCDate(newDate.getUTCDate()+dir*7);newViewDate=new Date(focusDate);newViewDate.setUTCDate(focusDate.getUTCDate()+dir*7);}
876if(this.dateWithinRange(newViewDate)){this.focusDate=this.viewDate=newViewDate;this.setValue();this.fill();e.preventDefault();}
877break;case 32:break;case 13:var $disabledDay=this.picker.find('.datepicker-day-entry.focused.disabled');if($disabledDay.length>0){e.preventDefault();return;}
878focusDate=this.focusDate||this.dates.get(-1)||this.viewDate;if(this.o.keyboardNavigation){this._toggle_multidate(focusDate);dateChanged=true;}
879this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();if(this.picker.is(':visible')){e.preventDefault();if(typeof e.stopPropagation==='function'){e.stopPropagation();}else{e.cancelBubble=true;}
880if(this.o.autoclose)
881this.hide();}
882break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1);this.fill();this.hide();return;}
883if(dateChanged){if(this.dates.length)
884this._trigger('changeDate');else
885this._trigger('clearDate');var element;if(this.isInput){element=this.element;}
886else if(this.component){element=this.element.find('input');}
887if(element){element.change();}}},showMode:function(dir){if(dir){this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+dir));}
888this.picker.children('div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display','block');this.updateNavArrows();}};var DateRangePicker=function(element,options){this.element=$(element);this.inputs=$.map(options.inputs,function(i){return i.jquery?i[0]:i;});delete options.inputs;datepickerPlugin.call($(this.inputs),options).bind('changeDate',$.proxy(this.dateUpdated,this));this.pickers=$.map(this.inputs,function(i){return $(i).data('datepicker');});this.updateDates();};DateRangePicker.prototype={updateDates:function(){this.dates=$.map(this.pickers,function(i){return i.getUTCDate();});this.updateRanges();},updateRanges:function(){var range=$.map(this.dates,function(d){return d.valueOf();});$.each(this.pickers,function(i,p){p.setRange(range);});},dateUpdated:function(e){if(this.updating)
889return;this.updating=true;var dp=$(e.target).data('datepicker'),new_date=dp.getUTCDate(),i=$.inArray(e.target,this.inputs),j=i-1,k=i+1,l=this.inputs.length;if(i===-1)
890return;$.each(this.pickers,function(i,p){if(!p.getUTCDate())
891p.setUTCDate(new_date);});if(new_date<this.dates[j]){while(j>=0&&new_date<this.dates[j]){this.pickers[j--].setUTCDate(new_date);}}
892else if(new_date>this.dates[k]){while(k<l&&new_date>this.dates[k]){this.pickers[k++].setUTCDate(new_date);}}
893this.updateDates();delete this.updating;},remove:function(){$.map(this.pickers,function(p){p.remove();});delete this.element.data().datepicker;}};function opts_from_el(el,prefix){var data=$(el).data(),out={},inkey,replace=new RegExp('^'+prefix.toLowerCase()+'([A-Z])');prefix=new RegExp('^'+prefix.toLowerCase());function re_lower(_,a){return a.toLowerCase();}
894for(var key in data)
895if(prefix.test(key)){inkey=key.replace(replace,re_lower);out[inkey]=data[key];}
896return out;}
897function opts_from_locale(lang){var out={};if(!dates[lang]){lang=lang.split('-')[0];if(!dates[lang])
898return;}
899var d=dates[lang];$.each(locale_opts,function(i,k){if(k in d)
900out[k]=d[k];});return out;}
901var old=$.fn.datepicker;var datepickerPlugin=function(option){var args=Array.apply(null,arguments);args.shift();var internal_return;this.each(function(){var $this=$(this),data=$this.data('datepicker'),options=typeof option==='object'&&option;if(!data){var elopts=opts_from_el(this,'date'),xopts=$.extend({},defaults,elopts,options),locopts=opts_from_locale(xopts.language),opts=$.extend({},defaults,locopts,elopts,options);if($this.hasClass('input-daterange')||opts.inputs){var ropts={input
901s:opts.inputs||$this.find('input').toArray()};$this.data('datepicker',(data=new DateRangePicker(this,$.extend(opts,ropts))));}
902else{$this.data('datepicker',(data=new Datepicker(this,opts)));}}
903if(typeof option==='string'&&typeof data[option]==='function'){internal_return=data[option].apply(data,args);if(internal_return!==undefined)
904return false;}});if(internal_return!==undefined)
905return internal_return;else
906return this;};$.fn.datepicker=datepickerPlugin;var defaults=$.fn.datepicker.defaults={autoclose:false,beforeShowDay:$.noop,beforeShowMonth:$.noop,calendarWeeks:false,clearBtn:false,toggleActive:false,daysOfWeekDisabled:[],datesDisabled:[],endDate:Infinity,forceParse:true,format:'mm/dd/yyyy',keyboardNavigation:true,language:'en',minViewMode:0,multidate:false,multidateSeparator:',',orientation:"auto",rtl:false,startDate:-Infinity,startView:0,todayBtn:false,todayHighlight:false,weekStart:0,disableTouchKeyboard:false,enableOnReadonly:true,container:'body'};var locale_opts=$.fn.datepicker.locale_opts=['format','rtl','weekStart'];$.fn.datepicker.Constructor=Datepicker;var dates=$.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}};var DPGlobal={modes:[{clsName:'days',navFnc:'Month',navStep:1},{clsName:'months',navFnc:'FullYear',navStep:1},{clsName:'years',navFnc:'FullYear',navStep:10}],isLeapYear:function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));},getDaysInMonth:function(year,month){return[31,(DPGlobal.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(format){var separators=format.replace(this.validParts,'\0').split('\0'),parts=format.match(this.validParts);if(!separators||!separators.length||!parts||parts.length===0){throw new Error("Invalid date format.");}
907return{separators:separators,parts:parts};},parseDate:function(date,format,language){if(!date)
908return undefined;if(date instanceof Date)
909return date;if(typeof format==='string')
910format=DPGlobal.parseFormat(format);var part_re=/([\-+]\d+)([dmwy])/,parts=date.match(/([\-+]\d+)([dmwy])/g),part,dir,i;if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)){date=new Date();for(i=0;i<parts.length;i++){part=part_re.exec(parts[i]);dir=parseInt(part[1]);switch(part[2]){case'd':date.setUTCDate(date.getUTCDate()+dir);break;case'm':date=Datepicker.prototype.moveMonth.call(Datepicker.prototype,date,dir);break;case'w':date.setUTCDate(date.getUTCDate()+dir*7);break;case'y':date=Datepicker.prototype.moveYear.call(Datepicker.prototype,date,dir);break;}}
911return UTCDate(date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDate(),0,0,0);}
912parts=date&&date.match(this.nonpunctuation)||[];date=new Date();var parsed={},setters_order=['yyyy','yy','M','MM','m','mm','d','dd'],setters_map={yyyy:function(d,v){return d.setUTCFullYear(v);},yy:function(d,v){return d.setUTCFullYear(2000+v);},m:function(d,v){if(isNaN(d))
913return d;v-=1;while(v<0)v+=12;v%=12;d.setUTCMonth(v);while(d.getUTCMonth()!==v)
914d.setUTCDate(d.getUTCDate()-1);return d;},d:function(d,v){return d.setUTCDate(v);}},val,filtered;setters_map['M']=setters_map['MM']=setters_map['mm']=setters_map['m'];setters_map['dd']=setters_map['d'];date=UTCDate(date.getFullYear(),date.getMonth(),date.getDate(),0,0,0);var fparts=format.parts.slice();if(parts.length!==fparts.length){fparts=$(fparts).filter(function(i,p){return $.inArray(p,setters_order)!==-1;}).toArray();}
915function match_part(){var m=this.slice(0,parts[i].length),p=parts[i].slice(0,m.length);return m.toLowerCase()===p.toLowerCase();}
916if(parts.length===fparts.length){var cnt;for(i=0,cnt=fparts.length;i<cnt;i++){val=parseInt(parts[i],10);part=fparts[i];if(isNaN(val)){switch(part){case'MM':filtered=$(dates[language].months).filter(match_part);val=$.inArray(filtered[0],dates[language].months)+1;break;case'M':filtered=$(dates[language].monthsShort).filter(match_part);val=$.inArray(filtered[0],dates[language].monthsShort)+1;break;}}
917parsed[part]=val;}
918var _date,s;for(i=0;i<setters_order.length;i++){s=setters_order[i];if(s in parsed&&!isNaN(parsed[s])){_date=new Date(date);setters_map[s](_date,parsed[s]);if(!isNaN(_date))
919date=_date;}}}
920return date;},formatDate:function(date,format,language){if(!date)
921return'';if(typeof format==='string')
922format=DPGlobal.parseFormat(format);var val={d:date.getUTCDate(),D:dates[language].daysShort[date.getUTCDay()],DD:dates[language].days[date.getUTCDay()],m:date.getUTCMonth()+1,M:dates[language].monthsShort[date.getUTCMonth()],MM:dates[language].months[date.getUTCMonth()],yy:date.getUTCFullYear().toString().substring(2),yyyy:date.getUTCFullYear()};val.dd=(val.d<10?'0':'')+val.d;val.mm=(val.m<10?'0':'')+val.m;date=[];var seps=$.extend([],format.separators);for(var i=0,cnt=format.parts.length;i<=cnt;i++){if(seps.length)
923date.push(seps.shift());date.push(val[format.parts[i]]);}
924return date.join('');},headTemplate:'<thead>'+'<tr>'+'<div class="datepicker-label">'+'{{label}}'+'</div>'+'<th class="prev">&lt;</th>'+'<th colspan="5" class="datepicker-switch"></th>'+'<th class="next">&gt;</th>
924'+'</tr>'+'</thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot>'+'<tr>'+'<th colspan="7" class="today"></th>'+'</tr>'+'<tr>'+'<th colspan="7" class="clear"></th>'+'</tr>'+'</tfoot>'};DPGlobal.template='<div class="datepicker">'+'<div class="datepicker-days">'+'<table class=" table-condensed">'+
925DPGlobal.headTemplate+'<tbody></tbody>'+
926DPGlobal.footTemplate+'</table>'+'</div>'+'<div class="datepicker-months">'+'<table class="table-condensed">'+
927DPGlobal.headTemplate+
928DPGlobal.contTemplate+
929DPGlobal.footTemplate+'</table>'+'</div>'+'<div class="datepicker-years">'+'<table class="table-condensed">'+
930DPGlobal.headTemplate+
931DPGlobal.contTemplate+
932DPGlobal.footTemplate+'</table>'+'</div>'+'</div>';$.fn.datepicker.DPGlobal=DPGlobal;$.fn.datepicker.noConflict=function(){$.fn.datepicker=old;return this;};$.fn.datepicker.version="1.4.0";$(document).on('focus.datepicker.data-api click.datepicker.data-api','[data-provide="datepicker"]',function(e){var $this=$(this);if($this.data('datepicker'))
933return;e.preventDefault();datepickerPlugin.call($this,'show');});$(function(){datepickerPlugin.call($('[data-provide="datepicker-inline"]'));});}(window.jQuery));function formatDate(date){const monthNames=["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"];const month=monthNames[date.getMonth()];const year=date.getFullYear();return`${month} ${year}`;};+function($){'use strict';var DISALLOWED_ATTRIBUTES=['sanitize','whiteList','sanitizeFn']
934var uriAttrs=['background','cite','href','itemtype','longdesc','poster','src','xlink:href']
935var ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i
936var DefaultWhitelist={'*':['class','dir','id','lang','role',ARIA_ATTRIBUTE_PATTERN],a:['target','href','title','rel'],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:['src','alt','title','width','height'],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}
937var SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi
938var DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i
939function allowedAttribute(attr,allowedAttributeList){var attrName=attr.nodeName.toLowerCase()
940if($.inArray(attrName,allowedAttributeList)!==-1){if($.inArray(attrName,uriAttrs)!==-1){return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN)||attr.nodeValue.match(DATA_URL_PATTERN))}
941return true}
942var regExp=$(allowedAttributeList).filter(function(index,value){return value instanceof RegExp})
943for(var i=0,l=regExp.length;i<l;i++){if(attrName.match(regExp[i])){return true}}
944return false}
945function sanitizeHtml(unsafeHtml,whiteList,sanitizeFn){if(unsafeHtml.length===0){return unsafeHtml}
946if(sanitizeFn&&typeof sanitizeFn==='function'){return sanitizeFn(unsafeHtml)}
947if(!document.implementation||!document.implementation.createHTMLDocument){return unsafeHtml}
948var createdDocument=document.implementation.createHTMLDocument('sanitization')
949createdDocument.body.innerHTML=unsafeHtml
950var whitelistKeys=$.map(whiteList,function(el,i){return i})
951var elements=$(createdDocument.body).find('*')
952for(var i=0,len=elements.length;i<len;i++){var el=elements[i]
953var elName=el.nodeName.toLowerCase()
954if($.inArray(elName,whitelistKeys)===-1){el.parentNode.removeChild(el)
955continue}
956var attributeList=$.map(el.attributes,function(el){return el})
957var whitelistedAttributes=[].concat(whiteList['*']||[],whiteList[elName]||[])
958for(var j=0,len2=attributeList.length;j<len2;j++){if(!allowedAttribute(attributeList[j],whitelistedAttributes)){el.removeAttribute(attributeList[j].nodeName)}}}
959return createdDocument.body.innerHTML}
960var Tooltip=function(element,options){this.type=null
961this.options=null
962this.enabled=null
963this.timeout=null
964this.hoverState=null
965this.$element=null
966this.inState=null
967this.init('tooltip',element,options)}
968Tooltip.VERSION='3.4.1'
969Tooltip.TRANSITION_DURATION=150
970Tooltip.DEFAULTS={animation:true,placement:'top',selector:false,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,container:false,viewport:{selector:'body',padding:0},sanitize:true,sanitizeFn:null,whiteList:DefaultWhitelist}
971Tooltip.prototype.init=function(type,element,options){this.enabled=true
vendor: 5,729 bytes, lines 972-1058
972this.type=type
973this.$element=$(element)
974this.options=this.getOptions(options)
975this.$viewport=this.options.viewport&&$(document).find($.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):(this.options.viewport.selector||this.options.viewport))
976this.inState={click:false,hover:false,focus:false}
977if(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!')}
978var triggers=this.options.trigger.split(' ')
979for(var i=triggers.length;i--;){var trigger=triggers[i]
980if(trigger=='click'){this.$element.on('click.'+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!='manual'){var eventIn=trigger=='hover'?'mouseenter':'focusin'
981var eventOut=trigger=='hover'?'mouseleave':'focusout'
982this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this))
983this.$element.on(eventOut+'.'+this.type,this.options.selector,$.proxy(this.leave,this))}}
984this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()}
985Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS}
986Tooltip.prototype.getOptions=function(options){var dataAttributes=this.$element.data()
987for(var dataAttr in dataAttributes){if(dataAttributes.hasOwnProperty(dataAttr)&&$.inArray(dataAttr,DISALLOWED_ATTRIBUTES)!==-1){delete dataAttributes[dataAttr]}}
988options=$.extend({},this.getDefaults(),dataAttributes,options)
989if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}}
990if(options.sanitize){options.template=sanitizeHtml(options.template,options.whiteList,options.sanitizeFn)}
991return options}
992Tooltip.prototype.getDelegateOptions=function(){var options={}
993var defaults=this.getDefaults()
994this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value})
995return options}
996Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type)
997if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions())
998$(obj.currentTarget).data('bs.'+this.type,self)}
999if(obj instanceof $.Event){self.inState[obj.type=='focusin'?'focus':'hover']=true}
1000if(self.tip().hasClass('in')||self.hoverState=='in'){self.hoverState='in'
1001return}
1002clearTimeout(self.timeout)
1003self.hoverState='in'
1004if(!self.options.delay||!self.options.delay.show)return self.show()
1005self.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)}
1006Tooltip.prototype.isInStateTrue=function(){for(var key in this.inState){if(this.inState[key])return true}
1007return false}
1008Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type)
1009if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions())
1010$(obj.currentTarget).data('bs.'+this.type,self)}
1011if(obj instanceof $.Event){self.inState[obj.type=='focusout'?'focus':'hover']=false}
1012if(self.isInStateTrue())return
1013clearTimeout(self.timeout)
1014self.hoverState='out'
1015if(!self.options.delay||!self.options.delay.hide)return self.hide()
1016self.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)}
1017Tooltip.prototype.show=function(){var e=$.Event('show.bs.'+this.type)
1018if(this.hasContent()&&this.enabled){this.$element.trigger(e)
1019var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0])
1020if(e.isDefaultPrevented()||!inDom)return
1021var that=this
1022var $tip=this.tip()
1023var tipId=this.getUID(this.type)
1024this.setContent()
1025$tip.attr('id',tipId)
1026this.$element.attr('aria-describedby',tipId)
1027if(this.options.animation)$tip.addClass('fade')
1028var placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement
1029var autoToken=/\s?auto?\s?/i
1030var autoPlace=autoToken.test(placement)
1031if(autoPlace)placement=placement.replace(autoToken,'')||'top'
1032$tip.detach().css({top:0,left:0,display:'block'}).addClass(placement).data('bs.'+this.type,this)
1033this.options.container?$tip.appendTo($(document).find(this.options.container)):$tip.insertAfter(this.$element)
1034this.$element.trigger('inserted.bs.'+this.type)
1035var pos=this.getPosition()
1036var actualWidth=$tip[0].offsetWidth
1037var actualHeight=$tip[0].offsetHeight
1038if(autoPlace){var orgPlacement=placement
1039var viewportDim=this.getPosition(this.$viewport)
1040placement=placement=='bottom'&&pos.bottom+actualHeight>viewportDim.bottom?'top':placement=='top'&&pos.top-actualHeight<viewportDim.top?'bottom':placement=='right'&&pos.right+actualWidth>viewportDim.width?'left':placement=='left'&&pos.left-actualWidth<viewportDim.left?'right':placement
1041$tip.removeClass(orgPlacement).addClass(placement)}
1042var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight)
1043this.applyPlacement(calculatedOffset,placement)
1044var complete=function(){var prevHoverState=that.hoverState
1045that.$element.trigger('shown.bs.'+that.type)
1046that.hoverState=null
1047if(prevHoverState=='out')that.leave(that)}
1048$.support.transition&&this.$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()}}
1049Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip()
1050var width=$tip[0].offsetWidth
1051var height=$tip[0].offsetHeight
1052var marginTop=parseInt($tip.css('margin-top'),10)
1053var marginLeft=parseInt($tip.css('margin-left'),10)
1054if(isNaN(marginTop))marginTop=0
1055if(isNaN(marginLeft))marginLeft=0
1056offset.top+=marginTop
1057offset.left+=marginLeft
1058$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left
vendor: 4,510 bytes, lines 1058-1121
1058:Math.round(props.left)})}},offset),0)
1059$tip.addClass('in')
1060var actualWidth=$tip[0].offsetWidth
1061var actualHeight=$tip[0].offsetHeight
1062if(placement=='top'&&actualHeight!=height){offset.top=offset.top+height-actualHeight}
1063var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight)
1064if(delta.left)offset.left+=delta.left
1065else offset.top+=delta.top
1066var isVertical=/top|bottom/.test(placement)
1067var arrowDelta=isVertical?delta.left*2-width+actualWidth:delta.top*2-height+actualHeight
1068var arrowOffsetPosition=isVertical?'offsetWidth':'offsetHeight'
1069$tip.offset(offset)
1070this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],isVertical)}
1071Tooltip.prototype.replaceArrow=function(delta,dimension,isVertical){this.arrow().css(isVertical?'left':'top',50*(1-delta/dimension)+'%').css(isVertical?'top':'left','')}
1072Tooltip.prototype.setContent=function(){var $tip=this.tip()
1073var title=this.getTitle()
1074if(this.options.html){if(this.options.sanitize){title=sanitizeHtml(title,this.options.whiteList,this.options.sanitizeFn)}
1075$tip.find('.tooltip-inner').html(title)}else{$tip.find('.tooltip-inner').text(title)}
1076$tip.removeClass('fade in top bottom left right')}
1077Tooltip.prototype.hide=function(callback){var that=this
1078var $tip=$(this.$tip)
1079var e=$.Event('hide.bs.'+this.type)
1080function complete(){if(that.hoverState!='in')$tip.detach()
1081if(that.$element){that.$element.removeAttr('aria-describedby').trigger('hidden.bs.'+that.type)}
1082callback&&callback()}
1083this.$element.trigger(e)
1084if(e.isDefaultPrevented())return
1085$tip.removeClass('in')
1086$.support.transition&&$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()
1087this.hoverState=null
1088return this}
1089Tooltip.prototype.fixTitle=function(){var $e=this.$element
1090if($e.attr('title')||typeof $e.attr('data-original-title')!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}}
1091Tooltip.prototype.hasContent=function(){return this.getTitle()}
1092Tooltip.prototype.getPosition=function($element){$element=$element||this.$element
1093var el=$element[0]
1094var isBody=el.tagName=='BODY'
1095var elRect=el.getBoundingClientRect()
1096if(elRect.width==null){elRect=$.extend({},elRect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top})}
1097var isSvg=window.SVGElement&&el instanceof window.SVGElement
1098var elOffset=isBody?{top:0,left:0}:(isSvg?null:$element.offset())
1099var scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop()}
1100var outerDims=isBody?{width:$(window).width(),height:$(window).height()}:null
1101return $.extend({},elRect,scroll,outerDims,elOffset)}
1102Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement=='bottom'?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:placement=='top'?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:placement=='left'?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}}
1103Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0}
1104if(!this.$viewport)return delta
1105var viewportPadding=this.options.viewport&&this.options.viewport.padding||0
1106var viewportDimensions=this.getPosition(this.$viewport)
1107if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll
1108var bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight
1109if(topEdgeOffset<viewportDimensions.top){delta.top=viewportDimensions.top-topEdgeOffset}else if(bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height){delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset}}else{var leftEdgeOffset=pos.left-viewportPadding
1110var rightEdgeOffset=pos.left+viewportPadding+actualWidth
1111if(leftEdgeOffset<viewportDimensions.left){delta.left=viewportDimensions.left-leftEdgeOffset}else if(rightEdgeOffset>viewportDimensions.right){delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset}}
1112return delta}
1113Tooltip.prototype.getTitle=function(){var title
1114var $e=this.$element
1115var o=this.options
1116title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title)
1117return title}
1118Tooltip.prototype.getUID=function(prefix){do prefix+=~~(Math.random()*1000000)
1119while(document.getElementById(prefix))
1120return prefix}
1121Tooltip.prototype.tip=function(){if(!this.$tip){this.$tip=$(this.options.template)
vendor: 12,628 bytes, lines 1122-1326
1122if(this.$tip.length!=1){throw new Error(this.type+' `template` option must consist of exactly 1 top-level element!')}}
1123return this.$tip}
1124Tooltip.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow'))}
1125Tooltip.prototype.enable=function(){this.enabled=true}
1126Tooltip.prototype.disable=function(){this.enabled=false}
1127Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled}
1128Tooltip.prototype.toggle=function(e){var self=this
1129if(e){self=$(e.currentTarget).data('bs.'+this.type)
1130if(!self){self=new this.constructor(e.currentTarget,this.getDelegateOptions())
1131$(e.currentTarget).data('bs.'+this.type,self)}}
1132if(e){self.inState.click=!self.inState.click
1133if(self.isInStateTrue())self.enter(self)
1134else self.leave(self)}else{self.tip().hasClass('in')?self.leave(self):self.enter(self)}}
1135Tooltip.prototype.destroy=function(){var that=this
1136clearTimeout(this.timeout)
1137this.hide(function(){that.$element.off('.'+that.type).removeData('bs.'+that.type)
1138if(that.$tip){that.$tip.detach()}
1139that.$tip=null
1140that.$arrow=null
1141that.$viewport=null
1142that.$element=null})}
1143Tooltip.prototype.sanitizeHtml=function(unsafeHtml){return sanitizeHtml(unsafeHtml,this.options.whiteList,this.options.sanitizeFn)}
1144function Plugin(option){return this.each(function(){var $this=$(this)
1145var data=$this.data('bs.tooltip')
1146var options=typeof option=='object'&&option
1147if(!data&&/destroy|hide/.test(option))return
1148if(!data)$this.data('bs.tooltip',(data=new Tooltip(this,options)))
1149if(typeof option=='string')data[option]()})}
1150var old=$.fn.tooltip
1151$.fn.tooltip=Plugin
1152$.fn.tooltip.Constructor=Tooltip
1153$.fn.tooltip.noConflict=function(){$.fn.tooltip=old
1154return this}}(jQuery);+function($){'use strict';var Popover=function(element,options){this.init('popover',element,options)}
1155if(!$.fn.tooltip)throw new Error('Popover requires tooltip.js')
1156Popover.VERSION='3.4.1'
1157Popover.DEFAULTS=$.extend({},$.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>'})
1158Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype)
1159Popover.prototype.constructor=Popover
1160Popover.prototype.getDefaults=function(){return Popover.DEFAULTS}
1161Popover.prototype.setContent=function(){var $tip=this.tip()
1162var title=this.getTitle()
1163var content=this.getContent()
1164if(this.options.html){var typeContent=typeof content
1165if(this.options.sanitize){title=this.sanitizeHtml(title)
1166if(typeContent==='string'){content=this.sanitizeHtml(content)}}
1167$tip.find('.popover-title').html(title)
1168$tip.find('.popover-content').children().detach().end()[typeContent==='string'?'html':'append'](content)}else{$tip.find('.popover-title').text(title)
1169$tip.find('.popover-content').children().detach().end().text(content)}
1170$tip.removeClass('fade top bottom left right in')
1171if(!$tip.find('.popover-title').html())$tip.find('.popover-title').hide()}
1172Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()}
1173Popover.prototype.getContent=function(){var $e=this.$element
1174var o=this.options
1175return $e.attr('data-content')||(typeof o.content=='function'?o.content.call($e[0]):o.content)}
1176Popover.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.arrow'))}
1177function Plugin(option){return this.each(function(){var $this=$(this)
1178var data=$this.data('bs.popover')
1179var options=typeof option=='object'&&option
1180if(!data&&/destroy|hide/.test(option))return
1181if(!data)$this.data('bs.popover',(data=new Popover(this,options)))
1182if(typeof option=='string')data[option]()})}
1183var old=$.fn.popover
1184$.fn.popover=Plugin
1185$.fn.popover.Constructor=Popover
1186$.fn.popover.noConflict=function(){$.fn.popover=old
1187return this}}(jQuery);+function($){'use strict';function transitionEnd(){var el=document.createElement('bootstrap')
1188var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'}
1189for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}
1190return false}
1191$.fn.emulateTransitionEnd=function(duration){var called=false
1192var $el=this
1193$(this).one('bsTransitionEnd',function(){called=true})
1194var callback=function(){if(!called)$($el).trigger($.support.transition.end)}
1195setTimeout(callback,duration)
1196return this}
1197$(function(){$.support.transition=transitionEnd()
1198if(!$.support.transition)return
1199$.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}})}(jQuery);+function($){'use strict';var Collapse=function(element,options){this.$element=$(element)
1200this.options=$.extend({},Collapse.DEFAULTS,options)
1201this.$trigger=$('[data-toggle="collapse"][href="#'+element.id+'"],'+'[data-toggle="collapse"][data-target="#'+element.id+'"]')
1202this.transitioning=null
1203if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}
1204if(this.options.toggle)this.toggle()}
1205Collapse.VERSION='3.4.1'
1206Collapse.TRANSITION_DURATION=350
1207Collapse.DEFAULTS={toggle:true}
1208Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass('width')
1209return hasWidth?'width':'height'}
1210Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass('in'))return
1211var activesData
1212var actives=this.$parent&&this.$parent.children('.panel').children('.in, .collapsing')
1213if(actives&&actives.length){activesData=actives.data('bs.collapse')
1214if(activesData&&activesData.transitioning)return}
1215var startEvent=$.Event('show.bs.collapse')
1216this.$element.trigger(startEvent)
1217if(startEvent.isDefaultPrevented())return
1218if(actives&&actives.length){Plugin.call(actives,'hide')
1219activesData||actives.data('bs.collapse',null)}
1220var dimension=this.dimension()
1221this.$element.removeClass('collapse').addClass('collapsing')[dimension](0)
1222this.$trigger.removeClass('collapsed').attr('aria-expanded',true)
1223this.transitioning=1
1224var complete=function(){this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('')
1225this.transitioning=0
1226this.$element.trigger('shown.bs.collapse')}
1227if(!$.support.transition)return complete.call(this)
1228var scrollSize=$.camelCase(['scroll',dimension].join('-'))
1229this.$element.one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])}
1230Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass('in'))return
1231var startEvent=$.Event('hide.bs.collapse')
1232this.$element.trigger(startEvent)
1233if(startEvent.isDefaultPrevented())return
1234var dimension=this.dimension()
1235this.$element[dimension](this.$element[dimension]())[0].offsetHeight
1236this.$element.addClass('collapsing').removeClass('collapse in')
1237this.$trigger.addClass('collapsed').attr('aria-expanded',false)
1238this.transitioning=1
1239var complete=function(){this.transitioning=0
1240this.$element.removeClass('collapsing').addClass('collapse').trigger('hidden.bs.collapse')}
1241if(!$.support.transition)return complete.call(this)
1242this.$element
1243[dimension](0).one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)}
1244Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()}
1245Collapse.prototype.getParent=function(){return $(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each($.proxy(function(i,element){var $element=$(element)
1246this.addAriaAndCollapsedClass(getTargetFromTrigger($element),$element)},this)).end()}
1247Collapse.prototype.addAriaAndCollapsedClass=function($element,$trigger){var isOpen=$element.hasClass('in')
1248$trigger.toggleClass('collapsed',!isOpen).attr('aria-expanded',isOpen)}
1249function getTargetFromTrigger($trigger){var href
1250var target=$trigger.attr('data-target')||(href=$trigger.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')
1251return $(document).find(target)}
1252function Plugin(option){return this.each(function(){var $this=$(this)
1253var data=$this.data('bs.collapse')
1254var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=='object'&&option)
1255if(!data&&options.toggle&&/show|hide/.test(option))options.toggle=false
1256if(!data)$this.data('bs.collapse',(data=new Collapse(this,options)))
1257if(typeof option=='string')data[option]()})}
1258var old=$.fn.collapse
1259$.fn.collapse=Plugin
1260$.fn.collapse.Constructor=Collapse
1261$.fn.collapse.noConflict=function(){$.fn.collapse=old
1262return this}
1263$(document).on('click.bs.collapse.data-api','[data-toggle="collapse"]',function(e){var $this=$(this)
1264if(!$this.attr('data-target'))e.preventDefault()
1265var $target=getTargetFromTrigger($this)
1266var data=$target.data('bs.collapse')
1267var option=data?'toggle':$this.data()
1268Plugin.call($target,option)})}(jQuery);+function($){'use strict';var backdrop='.dropdown-backdrop'
1269var toggle='[data-toggle="dropdown"]'
1270var Dropdown=function(element){$(element).on('click.bs.dropdown',this.toggle)}
1271Dropdown.VERSION='3.4.1'
1272function getParent($this){var selector=$this.attr('data-target')
1273if(!selector){selector=$this.attr('href')
1274selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')}
1275var $parent=selector!=='#'?$(document).find(selector):null
1276return $parent&&$parent.length?$parent:$this.parent()}
1277function clearMenus(e){if(e&&e.which===3)return
1278$(backdrop).remove()
1279$(toggle).each(function(){var $this=$(this)
1280var $parent=getParent($this)
1281var relatedTarget={relatedTarget:this}
1282if(!$parent.hasClass('open'))return
1283if(e&&e.type=='click'&&/input|textarea/i.test(e.target.tagName)&&$.contains($parent[0],e.target))return
1284$parent.trigger(e=$.Event('hide.bs.dropdown',relatedTarget))
1285if(e.isDefaultPrevented())return
1286$this.attr('aria-expanded','false')
1287$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown',relatedTarget))})}
1288Dropdown.prototype.toggle=function(e){var $this=$(this)
1289if($this.is('.disabled, :disabled'))return
1290var $parent=getParent($this)
1291var isActive=$parent.hasClass('open')
1292clearMenus()
1293if(!isActive){if('ontouchstart'in document.documentElement&&!$parent.closest('.navbar-nav').length){$(document.createElement('div')).addClass('dropdown-backdrop').insertAfter($(this)).on('click',clearMenus)}
1294var relatedTarget={relatedTarget:this}
1295$parent.trigger(e=$.Event('show.bs.dropdown',relatedTarget))
1296if(e.isDefaultPrevented())return
1297$this.trigger('focus').attr('aria-expanded','true')
1298$parent.toggleClass('open').trigger($.Event('shown.bs.dropdown',relatedTarget))}
1299return false}
1300Dropdown.prototype.keydown=function(e){if(!/(38|40|27|32)/.test(e.which)||/input|textarea/i.test(e.target.tagName))return
1301var $this=$(this)
1302e.preventDefault()
1303e.stopPropagation()
1304if($this.is('.disabled, :disabled'))return
1305var $parent=getParent($this)
1306var isActive=$parent.hasClass('open')
1307if(!isActive&&e.which!=27||isActive&&e.which==27){if(e.which==27)$parent.find(toggle).trigger('focus')
1308return $this.trigger('click')}
1309var desc=' li:not(.disabled):visible a'
1310var $items=$parent.find('.dropdown-menu'+desc)
1311if(!$items.length)return
1312var index=$items.index(e.target)
1313if(e.which==38&&index>0)index--
1314if(e.which==40&&index<$items.length-1)index++
1315if(!~index)index=0
1316$items.eq(index).trigger('focus')}
1317function Plugin(option){return this.each(function(){var $this=$(this)
1318var data=$this.data('bs.dropdown')
1319if(!data)$this.data('bs.dropdown',(data=new Dropdown(this)))
1320if(typeof option=='string')data[option].call($this)})}
1321var old=$.fn.dropdown
1322$.fn.dropdown=Plugin
1323$.fn.dropdown.Constructor=Dropdown
1324$.fn.dropdown.noConflict=function(){$.fn.dropdown=old
1325return this}
1326$(document).on('click.bs.dropdown.data-api',clearMenus).on('click.bs.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.bs.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.bs.dropdown.data-api',toggle,Dropdown.prototype.keydown).on('keydown.bs.dropdown.data-api','.dropdown-menu',Dropdown.prototype.keydown)}(jQuery);!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(t){var e,n,p,o,r,h,f,g,m,v,y,s,i,_,a,a=(t&&t.fn&&t.fn.select2&&t.fn.select2.amd&&(u=t.fn.select2.amd),u&&u.requirejs||(u?n=u:u={},g={},m={},v={},y={},s=Object.prototype.hasOwnProperty,i=[].slice,_=/\.js$/,h=function(e,t){var n,s,i=c(e),o=i[0],t=t[1];return e=i[1],o&&(n=x(o=l(o,t))),o?e=n&&n.normalize?n.normalize(e,(s=t,function(e){return l(e,s)}
vendor: 4,438 bytes, line 1326
1326)):l(e,t):(o=(i=c(e=l(e,t)))[0],e=i[1],o&&(n=x(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},f={require:function(e){return w(e)},exports:function(e){var t=g[e];return void 0!==t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:(t=e,function(){return v&&v.config&&v.config[t]||{}})};var t}},o=function(e,t,n,s){var i,o,r,a,l,c=[],u=typeof n,d=A(s=s||e);if("undefined"==u||"function"==u){for(t=!t.length&&n.length?["require","exports","module"]:t,a=0;a<t.length;a+=1)if("require"===(o=(r=h(t[a],d)).f))c[a]=f.require(e);else if("exports"===o)c[a]=f.exports(e),l=!0;else if("module"===o)i=c[a]=f.module(e);else if(b(g,o)||b(m,o)||b(y,o))c[a]=x(o);else{if(!r.p)throw new Error(e+" missing "+o);r.p.load(r.n,w(s,!0),function(t){return function(e){g[t]=e}}(o),{}),c[a]=g[o]}u=n?n.apply(g[e],c):void 0,e&&(i&&i.exports!==p&&i.exports!==g[e]?g[e]=i.exports:u===p&&l||(g[e]=u))}else e&&(g[e]=n)},e=n=r=function(e,t,n,s,i){if("string"==typeof e)return f[e]?f[e](t):x(h(e,A(t)).f);if(!e.splice){if((v=e).deps&&r(v.deps,v.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=s,s=i),s?o(p,e,t,n):setTimeout(function(){o(p,e,t,n)},4),r},r.config=function(e){return r(e)},e._defined=g,(a=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),b(g,e)||b(m,e)||(m[e]=[e,t,n])}).amd={jQuery:!0},u.requirejs=e,u.require=n,u.define=a),u.define("almond",function(){}),u.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),u.define("select2/utils",["jquery"],function(o){var s={};function c(e){var t,n=e.prototype,s=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&s.push(t);return s}s.Extend=function(e,t){var n,s={}.hasOwnProperty;function i(){this.constructor=e}for(n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},s.Decorate=function(s,i){var e=c(i),t=c(s);function o(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=s.prototype.constructor;0<t&&(e.call(arguments,s.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=s.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var r=t[n];o.prototype[r]=s.prototype[r]}for(var a=0;a<e.length;a++){var l=e[a];o.prototype[l]=function(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}(l)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,s=e.length;n<s;n++)e[n].apply(this,t)},s.Observable=e,s.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},s.bind=function(e,t){return function(){e.apply(t,arguments)}},s._convertData=function(e){for(var t in e){var n=t.split("-"),s=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in s||(s[o]={}),i==n.length-1&&(s[o]=e[t]),s=s[o]}delete e[t]}}return e},s.hasScroll=function(e,t){var n=o(t),s=t.style.overflowX,i=t.style.overflowY;return(s!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===s||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},s.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},s.__cache={};var n=0;return s.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null!=t||(t=e.id?"select2-data-"+e.id:"select2-data-"+(++n).toString()+"-"+s.generateChars(4),e.setAttribute("data-select2-id",t)),t},s.StoreData=function(e,t,n){e=s.GetUniqueElementId(e);
1326s.__cache[e]||(s.__cache[e]={}),s.__cache[e][t]=n},s.GetData=function(e,t){var n=s.GetUniqueElementId(e);return t?s.__cache[n]&&null!=s.__cache[n][t]?s.__cache[n][t]:o(e).data(t):s.__cache[n]},s.RemoveData=function(e){var t=s.GetUniqueElementId(e);null!=s.__cache[t]&&delete s.__cache[t],e.removeAttribute("data-select2-id")},s.copyNonInternalCssClasses=function(e,t){var n=(n=e.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0===e.indexOf("select2-")}),t=(t=t.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0!==e.indexOf("select2-")}),t=n.concat(t);e.setAttribute("class",t.join(" "))},s}),u.define("select2/results",["jquery","./utils"],function(d,p){function s(e,t,n){this.$element=e,this.data=n,this.options=t,s.__super__.constructor.call(this)}return p.Extend(s,p.Observable),s.prototype.render=function(){var e=d('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=d('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),s=this.options.get("translations").get(e.message);n.append(t(s(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var s=e.results[n],s=this.option(s);t.push(s)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},s.prototype.position=function(e,t){t.find(".select2-results").append(e)},s.prototype.sort=function(e){return this.options.get("sorter")(e)},s.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");(0<t.length?t:e).first().trigger("mouseenter"),this.ensureHighlightVisible()},s.prototype.setClasses=function(){var t=this;this.data.current(function(e){var s=e.map(function(e){return e.id.toString()});t.$results.find(".select2-results__option--selectable").each(function(){var e=d(this),t=p.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<s.indexOf(n)?(this.classList.add("select2-results__option--selected"),e.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),e.attr("aria-selected","false"))})})},s.prototype.showLoading=function(e){this.hideLoading();e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},e=this.option(e);e.className+=" loading-results",this.$results.prepend(e)},s.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},s.prototype.option=function(e){var t=document.createElement("li");t.classList.add("select2-results__option"),t.classList.add("select2-results__option--selectable");var n,s={role:"option"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(n in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(s["aria-disabled"]="true",t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--disabled")),null==e.id&&t.classList.remove("select2-results__option--selectable"),null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(s.role="group",s["aria-label"]=e.text,t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--group")),s){var o=s[n];t.setAttribute(n,o)}if(e.children){var r=d(t),a=document.createElement("strong");a.className="select2-results__group",this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],u=this.option(u);l.push(u)}i=d("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});i.append(l),r.append(a),r.append(i)}else this.template(e,t);return p.StoreData(t,"data",e),t},s.prototype.bind=function(t,e){var i=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}
vendor: 4,998 bytes, line 1326
1326),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e,t=i.getHighlightedResults();0!==t.length&&(e=p.GetData(t[0],"data"),t.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:e}))}),t.on("results:previous",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t);s<=0||(e=s-1,0===t.length&&(e=0),(s=n.eq(e)).trigger("mouseenter"),t=i.$results.offset().top,n=s.offset().top,s=i.$results.scrollTop()+(n-t),0===e?i.$results.scrollTop(0):n-t<0&&i.$results.scrollTop(s))}),t.on("results:next",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t)+1;s>=n.length||((e=n.eq(s)).trigger("mouseenter"),t=i.$results.offset().top+i.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=i.$results.scrollTop()+n-t,0===s?i.$results.scrollTop(0):t<n&&i.$results.scrollTop(e))}),t.on("results:focus",function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")}),t.on("results:message",function(e){i.displayMessage(e)}),d.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=i.$results.height();t?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option--selectable",function(e){var t=d(this),n=p.GetData(this,"data");t.hasClass("select2-results__option--selected")?i.options.get("multiple")?i.trigger("unselect",{originalEvent:e,data:n}):i.trigger("close",{}):i.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option--selectable",function(e){var t=p.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:t,element:d(this)})})},s.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},s.prototype.destroy=function(){this.$results.remove()},s.prototype.ensureHighlightVisible=function(){var e,t,n,s,i=this.getHighlightedResults();0!==i.length&&(e=this.$results.find(".select2-results__option--selectable").index(i),s=this.$results.offset().top,t=i.offset().top,n=this.$results.scrollTop()+(t-s),s=t-s,n-=2*i.outerHeight(!1),e<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(n))},s.prototype.template=function(e,t){var n=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),e=n(e,t);null==e?t.style.display="none":"string"==typeof e?t.innerHTML=s(e):d(t).append(e)},s}),u.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),u.define("select2/selection/base",["jquery","../utils","../keys"],function(n,s,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return s.Extend(o,s.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=s.GetData(this.$element[0],"old-tabindex")?this._tabindex=s.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,s=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",s),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","fal
1326se"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&s.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),u.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,s){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var s=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",s),this.$selection.attr("aria-controls",s),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){var t,n;0!==e.length?(n=e[0],t=this.$selection.find(".select2-selection__rendered"),e=this.display(n,t),t.empty().append(e),(n=n.title||n.text)?t.attr("title",n):t.removeAttr("title")):this.clear()},i}),u.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,c){function o(e,t){o.__super__.constructor.apply(this,arguments)}return c.Extend(o,e),o.prototype.render=function(){var e=o.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments);var s=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){var t;n.isDisabled()||(t=i(this).parent(),t=c.GetData(t[0],"data"),n.trigger("unselect",{originalEvent:e,data:t}))}),this.$selection.on("keydown",".select2-selection__choice__remove",function(e){n.isDisabled()||e.stopPropagation()})},o.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},o.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",s=0;s<e.length;s++){var i=e[s],o=this.selectionContainer(),r=this.display(i,o),a=n+c.generateChars(4)+"-";i.id?a+=i.id:a+=c.generateChars(4),o.find(".select2-selection__choice__display").append(r).attr("id",a);var l=i.title||i.text;l&&o.attr("title",l);r=this.options.get("translations").get("removeItem"),l=o.find(".select2-selection__choice__remove");l.attr("title",r()),l.attr("aria-label",r()),l.attr("aria-describedby",a),c.StoreData(o[0],"data",i),t.push(o)}this.$selection.find(".select2-selection__rendered").append(t)}},o}),u.define("select2/selection/placeholder",[],function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");t=t.title||t.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",t),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();t=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(t)},e}
1326),u.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,s,a){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){s._handleClear(e)}),t.on("keypress",function(e){s._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var s=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var o={data:s};if(this.trigger("clear",o),o.prevented)this.$element.val(i);else{for(var r=0;r<s.length;r++)if(o={data:s[r]},this.trigger("unselect",o),o.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=s.DELETE&&t.which!=s.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){var n,s;e.call(this,t),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),0<this.$selection.find(".select2-selection__placeholder").length||0===t.length||(n=this.$selection.find(".select2-selection__rendered").attr("id"),s=this.options.get("translations").get("removeAllItems"),(e=i('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>')).attr("title",s()),e.attr("aria-label",s()),e.attr("aria-describedby",n),a.StoreData(e[0],"data",t),this.$selection.prepend(e),this.$selection[0].classList.add("select2-selection--clearable"))},e}),u.define("select2/selection/search",["jquery","../utils","../keys"],function(s,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=this.options.get("translations").get("search"),n=s('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=n,this.$search=n.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",t());e=e.call(this);return this._transferTabIndex(),e.append(this.$searchContainer),e},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results",o=t.id+"-container";e.call(this,t,n),s.$search.attr("aria-describedby",o),t.on("open",function(){s.$search.attr("aria-controls",i),s.$search.trigger("focus")}),t.on("close",function(){s.$search.val(""),s.resizeSearch(),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.trigger("focus")}),t.on("enable",function(){s.$search.prop("disabled",!1),s._transferTabIndex()}),t.on("disable",function(){s.$search.prop("disabled",!0)}),t.on("focus",function(e){s.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){s.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){s._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){var t;e.stopPropagation(),s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented(),e.which!==l.BACKSPACE||""!==s.$search.val()||0<(t=s.$selection.find(".select2-selection__choice").last()).length&&(t=a.GetData(t[0],"data"),s.searchRemoveChoice(t),e.preventDefault())}),this.$selection.on("click",".select2-search--inline",function(e){s.$search.val()&&e.stopPropagation()});var t=document.documentMode,r=t&&t<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){r?s.$selection.off("input.search input.searchcheck"):s.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){var t;r&&"input"===e.type?s.$selection.off("input.search input.searchcheck"):(t=e.which)!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&s.handleSearch(e)})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},e}),u.define("select2/selection/selectionCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("selectionCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasse
1326s(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/selection/eventRelay",["jquery"],function(r){function e(){}return e.prototype.bind=function(e,t,n){var s=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){var n;-1!==i.indexOf(e)&&(t=t||{},n=r.Event("select2:"+e,{params:t}),s.$element.trigger(n),-1!==o.indexOf(e)&&(t.prevented=n.isDefaultPrevented()))})},e}),u.define("select2/translation",["jquery","require"],function(t,n){function s(e){this.dict=e||{}}return s.prototype.all=function(){return this.dict},s.prototype.get=function(e){return this.dict[e]},s.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},s._cache={},s.loadPath=function(e){var t;return e in s._cache||(t=n(e),s._cache[e]=t),new s(s._cache[e])},s}),u.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"
1326V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),u.define("select2/data/base",["../utils"],function(n){function s(e,t){s.__super__.constructor.call(this)}return n.Extend(s,n.Observable),s.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},s.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},s.prototype.bind=function(e,t){},s.prototype.destroy=function(){},s.prototype.generateResultId=function(e,t){e=e.id+"-result-";return e+=n.generateChars(4),null!=t.id?e+="-"+t.id.toString():e+="-"+n.generateChars(4),e},s}),u.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(e){return t.item(l(e))}))},n.prototype.select=function(i){var e,o=this;if(i.selected=!0,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var s=i[n].id;-1===t.indexOf(s)&&t.push(s)}o.$element.val(t),o.$element.trigger("input").trigger("change")}):(e=i.id,this.$element.val(e),this.$element.trigger("input").trigger("change"))},n.prototype.unselect=function(i){var o=this;if(this.$element.prop("multiple")){if(i.selected=!1,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var s=e[n].id;s!==i.id&&-1===t.indexOf(s)&&t.push(s)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(t,e){var n=[],s=this;this.$element.children().each(function(){var e;"option"!==this.tagName.toLowerCase()&&"optgroup"!==this.tagName.toLowerCase()||(e=l(this),e=s.item(e),null!==(e=s.matches(t,e))&&n.push(e))}),e({results:n})},n.prototype.addOptions=function(e){this.$element.append(e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);e=this._normalizeItem(e);return e.element=t,a.StoreData(t,"data",e),l(t)},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;var n=e[0];if("option"===n.tagName.toLowerCase())t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===n.tagName.toLowerCase()){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var s=e.children("option"),i=[],o=0;o<s.length;o++){var r=l(s[o]),r=this.item(r);i.push(r)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),u.define("select2/data/array",["./select","../utils","jquery"],function(e,t,c){function s(e,t){this._dataToConvert=t.get("data")||[],s.__super__.constructor.call(this,e,t)}return t.Extend(s,e),s.prototype.bind=function(e,t){s.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},s.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),s.__super__.select.call(this,n)},s.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),s=n.map(function(){return t.item(c(this)).id}).get(),i=[];for(var o=0;o<e.length;o++){var r,a,l=this._normalizeItem(e[o]);0<=s.indexOf(l.id)?(r=n.filter(function(e){return function(){return c(this).val()==e.id}}(l)),a=this.item(r),a=c.extend(!0,{},l,a),a=this.option(a),r.replaceWith(a)):(a=this.option(l),l.children&&(l=this.convertToOptions(l.children),a.append(l)),i.push(a))}return i},s}),u.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){e=o.ajax(e);return e.then(t),e.fail(n),e}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(t,n){var s=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var i=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=i.transport(i,function(e){e=s.processResults(e,t);s.options.get("debug")&&window.console&&console.error&&(e&&e.results&&Array.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){"status"in e&&(0===e.status||"0"===e.status)||s.trigger("results:message",{message:"errorLoading"})});s._request=e}"function"==typeof i.url&&(i.url=i.url.call(this.$element,t)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),u.define("select2/data/tags",["jquery"],function(t){function e(e,t,n){var s=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);i=n.get("insertTag");if(void 0!==i&&(this.insertTag=i),e.call(this,t,n),Array.isArray(s))for(var o=0;o<s.length;o++){var r=s[o],r=this._normalizeItem(r),r=this.option(r);this.$element.append(r)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var s=t.results,i=0;i<s.length;i++){var o=s[i],r=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||r)return!n&&(t.data=s,void u(t))}if(n)return!0;var a,l=d.createTag(c);null!=l&&((a=d.option(l)).attr("data-select2-tag","true"),d.addOptions([a]),d.insertTag(s,l)),t.results=s,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){if(null==t.term)return null;t=t.term.trim();return""===t?null:{id:t,text:t}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||t(this).remove()})},e}),u.define("select2/data/tokenizer",["jquery"],function(c){function e(e,t,n){var s=n.get("tokenizer");void 0!==s&&(this.tokenizer=s),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var s=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=s._normalizeItem(e);s.$element.find("option").filter(function(){return c(this).val()===n.id}).length||((t=s.option(n)).attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([t])),t=n,s.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.trigger("focus")),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,s){for(var i=n.get("tokenSeparators")||[],o=t.term,r=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};r<o.length;){var l=o[r];-1!==i.indexOf(l)?(l=o.substr(0,r),null!=(l=a(c.extend({},t,{term:l})))?(s(l),o=o.substr(r+1)||"",r=0):r++):r++}return{term:o}},e}),u.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(){s._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var s=this;this._checkIfMaximumSelected(function(){e.call(s,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){e=null!=e?e.length:0;0<n.maximumSelectionLength&&e>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()})},e}),u.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),u.define("select2/dropdown/search",["jquery"],function(o){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("translations").get("search"),e=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),t.prepend(e),t},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){s.trigger("keypress",e),s._
vendor: 4,581 bytes, line 1326
1326keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){s.handleSearch(e)}),t.on("open",function(){s.$search.attr("tabindex",0),s.$search.attr("aria-controls",i),s.$search.trigger("focus"),window.setTimeout(function(){s.$search.trigger("focus")},0)}),t.on("close",function(){s.$search.attr("tabindex",-1),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.val(""),s.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||s.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(s.showSearch(e)?s.$searchContainer[0].classList.remove("select2-search--hide"):s.$searchContainer[0].classList.add("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")})},e.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},e.prototype.showSearch=function(e,t){return!0},e}),u.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,s){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,s)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),s=t.length-1;0<=s;s--){var i=t[s];this.placeholder.id===i.id&&n.splice(s,1)}return n},e}),u.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,s){this.lastParams={},e.call(this,t,n,s),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("query",function(e){s.lastParams=e,s.loading=!0}),t.on("query:append",function(e){s.lastParams=e,s.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&(e=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=e+50&&this.loadMore())},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),u.define("select2/dropdown/attachBody",["jquery","../utils"],function(u,r){function e(e,t,n){this.$dropdownParent=u(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("open",function(){s._showDropdown(),s._attachPositioningHandler(t),s._bindContainerResultHandlers(t)}),t.on("close",function(){s._hideDropdown(),s._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=u("<span></span>"),e=e.call(this);return t.append(e),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){var n;this._containerResultsHandlersBound||(n=this,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0)},e.prototype._attachPositioningHandler=function(e,t){var n=this,s="scroll.
1326select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,t=this.$container.parents().filter(r.hasScroll);t.each(function(){r.StoreData(this,"select2-scroll-position",{x:u(this).scrollLeft(),y:u(this).scrollTop()})}),t.on(s,function(e){var t=r.GetData(this,"select2-scroll-position");u(this).scrollTop(t.y)}),u(window).on(s+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,s="resize.select2."+t.id,t="orientationchange.select2."+t.id;this.$container.parents().filter(r.hasScroll).off(n),u(window).off(n+" "+s+" "+t)},e.prototype._positionDropdown=function(){var e=u(window),t=this.$dropdown[0].classList.contains("select2-dropdown--above"),n=this.$dropdown[0].classList.contains("select2-dropdown--below"),s=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var r=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-r,e=l>i.bottom+r,a={left:i.left,top:o.bottom},l=this.$dropdownParent;"static"===l.css("position")&&(l=l.offsetParent());i={top:0,left:0};(u.contains(document.body,l[0])||l[0].isConnected)&&(i=l.offset()),a.top-=i.top,a.left-=i.left,t||n||(s="below"),e||!c||t?!c&&e&&t&&(s="below"):s="above",("above"==s||t&&"below"!==s)&&(a.top=o.top-i.top-r),null!=s&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+s),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+s)),this.$dropdownContainer.css(a)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),u.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,s){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,s)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,s=0;s<t.length;s++){var i=t[s];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),u.define("select2/dropdown/selectOnClose",["../utils"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("close",function(e){s._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}n=this.getHighlightedResults();n.length<1||(null!=(n=s.GetData(n[0],"data")).element&&n.element.selected||null==n.element&&n.selected||this.trigger("select",{data:n}))},e}),u.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(e){s._selectTriggered(e)}),t.on("unselect",function(e){s._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),u.define("select2/dropdown/dropdownCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("dropdownCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(s){function e(){}return e.prototype.highlightFirstItem=function(e){var t=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(0<t.length){var n=t.first(),t=s.GetData(n[0],"data").element;if(t&&t.getAttribute&&"true"===t.getAttribute("data-select2-tag"))return void n.trigger("mouseenter")}e.call(this)},e}),u.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,e="Please delete "+t+" character";return 1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return HB.translations.general.searchNotFoundText},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}}),u.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function(l,o,r,a,c,u,d,p,h,f,g,t,m,v,y,_,b,w,$,x,A,D,S,O,L,E,C,T,q,I,e){function n(){this.reset()}return n.prototype.apply=function(e){var t;null==(e=l.extend(!0,{},this.defaults,e)).dataAdapter&&(null!=e.ajax?e.dataAdapter=y:null!=e.data?e.dataAdapter=v:e.dataAdapter=m,0<e.minimumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,w)),0<e.maximumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,$)),0<e.maximumSelectionLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,x)),e.tags&&(e.dataAdapter=f.Decorate(e.dataAdapter,_)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=f.Decorate(e.dataAdapter,b))),null==e.resultsAdapter&&(e.resultsAdapter=o,null!=e.ajax&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,O)),null!=e.placeholder&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,S)),e.selectOnClose&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,C)),e.tags&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter&&(e.multiple?e.dropdownAdapter=A:(t=f.Decorate(A,D),e.dropdownAdapter=t),0!==e.minimumResultsForSearch&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,E)),e.closeOnSelect&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,T)),null!=e.dropdownCssClass&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,q)),e.dropdownAdapter=f.Decorate(e.dropdownAdapter,L)),null==e.selectionAdapter&&(e.multiple?e.selectionAdapter=a:e.selectionAdapter=r,
vendor: 9,990 bytes, line 1326
1326null!=e.placeholder&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,c)),e.allowClear&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,u)),e.multiple&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,d)),null!=e.selectionCssClass&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,p)),e.selectionAdapter=f.Decorate(e.selectionAdapter,h)),e.language=this._resolveLanguage(e.language),e.language.push("en");for(var n=[],s=0;s<e.language.length;s++){var i=e.language[s];-1===n.indexOf(i)&&n.push(i)}return e.language=n,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:f.escapeMarkup,language:{},matcher:function e(t,n){if(null==t.term||""===t.term.trim())return n;if(n.children&&0<n.children.length){for(var s=l.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&s.children.splice(i,1);return 0<s.children.length?s:e(t,s)}var o=a(n.text).toUpperCase(),r=a(t.term).toUpperCase();return-1<o.indexOf(r)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,s=this.defaults.language,i=t.prop("lang"),t=t.closest("[lang]").prop("lang"),t=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(s),this._resolveLanguage(t));return e.language=t,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(l.isEmptyObject(e))return[];if(l.isPlainObject(e))return[e];for(var t,n=Array.isArray(e)?e:[e],s=[],i=0;i<n.length;i++)s.push(n[i]),"string"==typeof n[i]&&0<n[i].indexOf("-")&&(t=n[i].split("-")[0],s.push(t));return s},n.prototype._processTranslations=function(e,t){for(var n=new g,s=0;s<e.length;s++){var i=new g,o=e[s];if("string"==typeof o)try{i=g.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,i=g.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else i=l.isPlainObject(o)?new g(o):o;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[l.camelCase(e)]=t;n=f._convertData(n);l.extend(!0,this.defaults,n)},new n}),u.define("select2/options",["jquery","./defaults","./utils"],function(c,n,u){function e(e,t){this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=n.applyFromElement(this.options,t)),this.options=n.apply(this.options)}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.autocomplete&&e.prop("autocomplete")&&(this.options.autocomplete=e.prop("autocomplete")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),u.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),u.StoreData(e[0],"data",u.GetData(e[0],"select2Tags")),u.StoreData(e[0],"tags",!0)),u.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",u.GetData(e[0],"ajaxUrl")),u.StoreData(e[0],"ajax-Url",u.GetData(e[0],"ajaxUrl")));var n={};function s(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var o=e[0].attributes[i].name,r="data-";o.substr(0,r.length)==r&&(o=o.substring(r.length),r=u.GetData(e[0],o),n[o.replace(/-([a-z])/g,s)]=r)}c.fn.jquery&&"1."==c.fn.jquery.substr(0,2)&&e[0].dataset&&(n=c.extend(!0,{},e[0].dataset,n));var a,l=c.extend(!0,{},u.GetData(e[0]),n);for(a in l=u._convertData(l))-1<t.indexOf(a)||(c.isPlainObject(this.options[a])?c.extend(this.options[a],l[a]):this.options[a]=l[a]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),u.define("select2/core",["jquery","./options","./utils","./keys"],function(t,i,o,s){var r=function(e,t){null!=o.GetData(e[0],"select2")&&o.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new i(t,e),r.__super__.constructor.call(this);var n=e.attr("tabindex")||0;o.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");t=this.options.get("dataAdapter");this.dataAdapter=new t(e,this.options);n=this.render();this._placeContainer(n);t=this.options.get("selectionAdapter");this.selection=new t(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,n);t=this.options.get("dropdownAdapter");this.dropdown=new t(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,n);n=this.options.get("resultsAdapter");this.results=new n(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var s=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){s.trigger("selection:update",{data:e})}),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),o.StoreData(e[0],"select2",this),e.data("select2",this)};return o.Extend(r,o.Observable),r.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+o.generateChars(2):o.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var s=this._resolveWidth(e,"style");return null!=s?s:this._resolveWidth(e,"element")}if("element"==t){s=e.outerWidth(!1);return s<=0?"auto":s+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;e=e.attr("style");if("string"!=typeof e)return null;for(var i=e.split(";"),o=0,r=i.length;o<r;o+=1){var a=i[o].replace(/\s/g,"").match(n);if(null!==a&&1<=a.length)return a[1]}return null},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=o.bind(this._syncAttributes,this),this._syncS=o.bind(this._syncSubtree,this),this._observer=new window.MutationObserver(function(e){t._syncA(),t._syncS(e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},r.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},r.prototype._registerSelectionEvents=function(){var n=this,s=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===s.indexOf(e)&&n.trigger(e,t)})},r.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},r.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},r.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container[0].classList.add("select2-container--open")}),this.on("close",function(){n.$container[0].classList.remove("select2-container--open")}),this.on("enable",function(){n.$container[0].classList.remove("select2-container--disabled")}),this.on("disable",function(){n.$container[0].classList.add("select2-container--disabled")}),this.on("blur",function(){n.$container[0].classList.remove("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===s.ESC||t===s.UP&&e.altKey?(n.close(e),e.preventDefault()):t===s.ENTER||t===s.TAB?(n.trigger("results:select",{}),e.preventDefault()):t===s.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===s.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===s.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===s.ENTER||t===s.SPACE||t===s.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&0<e.addedNodes.length){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&0<e.removedNodes.length)return!0;
vendor: 5,543 bytes, line 1326
1326if(Array.isArray(e))return e.some(function(e){return t._isChangeMutation(e)})}return!1},r.prototype._syncSubtree=function(e){var e=this._isChangeMutation(e),t=this;e&&this.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})},r.prototype.trigger=function(e,t){var n=r.__super__.trigger,s={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in s){var i=s[e],s={prevented:!1,name:e,args:t};if(n.call(this,i,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},r.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},r.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},r.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},r.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);e=!e[0];this.$element.prop("disabled",e)},r.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},r.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();e=e[0];Array.isArray(e)&&(e=e.map(function(e){return e.toString()})),this.$element.val(e).trigger("input").trigger("change")},r.prototype.destroy=function(){o.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",o.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),o.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),o.StoreData(e[0],"element",this.$element),e},r}),u.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t[0].classList.add("select2-dropdown--below"),n[0].classList.add("select2-container--below")},e}),u.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),u.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),a=function(u){var d,p,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],h=Array.prototype.slice;if(u.event.fixHooks)for(var n=e.length;n;)u.event.fixHooks[e[--n]]=u.event.mouseHooks;var f=u.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],s,!1);else this.onmousewheel=s;u.data(this,"mousewheel-line-height",f.getLineHeight(this)),u.data(this,"mousewheel-page-height",f.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],s,!1);else this.onmousewheel=null;u.removeData(this,"mousewheel-line-height"),u.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=u(e),e=t["offsetParent"in u.fn?"offsetParent":"parent"]();return e.length||(e=u("body")),parseInt(e.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return u(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};
1326function s(e){var t,n=e||window.event,s=h.call(arguments,1),i=0,o=0,r=0,a=0,l=0,c=0;if(e=u.event.fix(n),e.type="mousewheel","detail"in n&&(r=-1*n.detail),"wheelDelta"in n&&(r=n.wheelDelta),"wheelDeltaY"in n&&(r=n.wheelDeltaY),"wheelDeltaX"in n&&(o=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(o=-1*r,r=0),i=0===r?o:r,"deltaY"in n&&(i=r=-1*n.deltaY),"deltaX"in n&&(o=n.deltaX,0===r&&(i=-1*o)),0!==r||0!==o)return 1===n.deltaMode?(i*=t=u.data(this,"mousewheel-line-height"),r*=t,o*=t):2===n.deltaMode&&(i*=t=u.data(this,"mousewheel-page-height"),r*=t,o*=t),a=Math.max(Math.abs(r),Math.abs(o)),(!p||a<p)&&m(n,p=a)&&(p/=40),m(n,a)&&(i/=40,o/=40,r/=40),i=Math[1<=i?"floor":"ceil"](i/p),o=Math[1<=o?"floor":"ceil"](o/p),r=Math[1<=r?"floor":"ceil"](r/p),f.settings.normalizeOffset&&this.getBoundingClientRect&&(a=this.getBoundingClientRect(),l=e.clientX-a.left,c=e.clientY-a.top),e.deltaX=o,e.deltaY=r,e.deltaFactor=p,e.offsetX=l,e.offsetY=c,e.deltaMode=0,s.unshift(e,i,o,r),d&&clearTimeout(d),d=setTimeout(g,200),(u.event.dispatch||u.event.handle).apply(this,s)}function g(){p=null}function m(e,t){return f.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}u.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof u.define&&u.define.amd?u.define("jquery-mousewheel",["jquery"],a):"object"==typeof exports?module.exports=a:a(t),u.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,r){var a;return null==i.fn.select2&&(a=["open","close","destroy"],i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,s)}),-1<a.indexOf(t)?this:n}),null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),o}),{define:u.define,require:u.require});function b(e,t){return s.call(e,t)}function l(e,t){var n,s,i,o,r,a,l,c,u,d,p=t&&t.split("/"),h=v.map,f=h&&h["*"]||{};if(e){for(t=(e=e.split("/")).length-1,v.nodeIdCompat&&_.test(e[t])&&(e[t]=e[t].replace(_,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),c=0;c<e.length;c++)"."===(d=e[c])?(e.splice(c,1),--c):".."===d&&(0===c||1===c&&".."===e[2]||".."===e[c-1]||0<c&&(e.splice(c-1,2),c-=2));e=e.join("/")}if((p||f)&&h){for(c=(n=e.split("/")).length;0<c;--c){if(s=n.slice(0,c).join("/"),p)for(u=p.length;0<u;--u)if(i=h[p.slice(0,u).join("/")],i=i&&i[s]){o=i,r=c;break}if(o)break;!a&&f&&f[s]&&(a=f[s],l=c)}!o&&a&&(o=a,r=l),o&&(n.splice(0,r,o),e=n.join("/"))}return e}function w(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),r.apply(p,e.concat([t,n]))}}function x(e){var t;if(b(m,e)&&(t=m[e],delete m[e],y[e]=!0,o.apply(p,t)),!b(g,e)&&!b(y,e))throw new Error("No "+e);return g[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function A(e){return e?c(e):[]}var u=a.require("jquery.select2");return t.fn.select2.amd=a,u});;(function(window,document){'use strict';var nextTick,addEvent;nextTick=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60);};addEvent=(function(){if(document.addEventListener){return function addStandardEventListener(el,eventName,fn){return el.addEventListener(eventName,fn,false);};}
1327else{return function addIEEventListener(el,eventName,fn){return el.attachEvent('on'+eventName,fn);};}})();function Imager(elements,opts){var self=this,doc=document;opts=opts||{};this.elements=elements||'.js-responsive-image';this.className=opts.className||'js-responsive-image-replaced';this.onResize=opts.hasOwnProperty('onResize')?opts.onResize:true;this.onImagesReplaced=opts.onImagesReplaced||function(){};this.eles=$(elements);nextTick(function(){self.init();});}
1328Imager.prototype.init=function(){this.checkImagesNeedReplacing(this.eles);if(this.onResize){this.registerResizeEvent();}};Imager.prototype.checkImagesNeedReplacing=function(images){var self=this;if(!this.isResizing){this.isResizing=true;images.each(function(){self.replaceImagesBasedOnScreenDimensions(this);});this.isResizing=false;this.onImagesReplaced(images);}};Imager.prototype.replaceImagesBasedOnScreenDimensions=function(image){var src,availableWidths=[],srcARRAY,cwidth;if($(image).attr("data-media")!=undefined){var eMedia=$(image).attr("data-media")
1329$(image).removeAttr("data-media")
1330eMedia=JSON.parse(eMedia)
1331$.each(eMedia,function(key,value){availableWidths.push(parseInt(key));});$(image).data("width",availableWidths);$(image).data("media",eMedia);}
1332srcARRAY=$(image).data("media");cwidth=Imager.getClosestValue(window.innerWidth,$.extend([],$(image).data("width")));if(!srcARRAY[cwidth]||image.src==srcARRAY[cwidth]){return;}
1333image.src=srcARRAY[cwidth];};Imager.getClosestValue=function getClosestValue(baseValue,candidates){if(baseValue>=candidates[0]&&candidates.length>1){candidates.shift()
1334getClosestValue(baseValue,candidates)}
1335return candidates[0];}
1336Imager.prototype.registerResizeEvent=function(){var self=this;addEvent(window,'resize',function(){self.checkImagesNeedReplacing(self.eles);});};if(typeof module==='object'&&typeof module.exports==='object'){module.exports=exports=Imager;}else if(typeof define==='function'&&define.amd){define(function(){return Imager;});}else if(typeof window==='object'){window.Imager=Imager;}}(window,document));ACC={};ACC.global={init:function(){ACC.global.initImager},passwordStrength:function(){$('.password-strength').pstrength({verdicts:[ACC.pwdStrengthTooShortPwd,A
1336CC.pwdStrengthVeryWeak,ACC.pwdStrengthWeak,ACC.pwdStrengthMedium,ACC.pwdStrengthStrong,ACC.pwdStrengthVeryStrong],minCharText:ACC.pwdStrengthMinCharText});},bindToggleOffcanvas:function(){$(document).on("click",".js-toggle-sm-navigation",function(){ACC.global.toggleClassState($("main"),"offcanvas");ACC.global.toggleClassState($("html"),"offcanvas");ACC.global.toggleClassState($("body"),"offcanvas");ACC.global.resetXsSearch();});},bindToggleXsSearch:function(){$(document).on("click",".js-toggle-xs-search",function(){ACC.global.toggleClassState($(".site-search"),"active");ACC.global.toggleClassState($(".js-mainHeader .navigation--middle"),"search-open");});},resetXsSearch:function(){$('.site-search').removeClass('active');$(".js-mainHeader .navigation--middle").removeClass("search-open");},toggleClassState:function($e,c){$e.hasClass(c)?$e.removeClass(c):$e.addClass(c);return $e.hasClass(c);},bindHoverIntentMainNavigation:function(){enquire.register("screen and (min-width:"+ACC.common.encodeHtml(screenMdMin)+")",{match:function(){$(".js-enquire-has-sub").hoverIntent(function(){var $this=$(this),itemWidth=$this.width();var $subNav=$this.find('.js_sub__navigation'),subNavWidth=$subNav.outerWidth();var $mainNav=$('.js_navigation--bottom'),mainNavWidth=$mainNav.width();var leftPos=$this.position().left+itemWidth/2-subNavWidth/2;var topPos=$this.position().top+$this.height();if(leftPos>0&&leftPos+subNavWidth<mainNavWidth){$subNav.css({"left":leftPos,"top":topPos,"right":"auto"});}else if(leftPos<0){$subNav.css({"left":0,"top":topPos,"right":"auto"});}else if(leftPos+subNavWidth>
1336mainNavWidth){$subNav.css({"right":0,"top":topPos,"left":"auto"});}
1337$this.addClass("show-sub");},function(){$(this).removeClass("show-sub")});},unmatch:function(){$(".js_sub__navigation").removeAttr("style");$(".js-enquire-has-sub").hoverIntent(function(){});}});},initImager:function(elems){elems=elems||'.js-responsive-image';this.imgr=new Imager(elems);},reprocessImages:function(elems){elems=elems||'.js-responsive-image';if(this.imgr==undefined){this.initImager(elems);}else{this.imgr.checkImagesNeedReplacing($(elems));}},addGoogleMapsApi:function(callback){if(callback!=undefined&&$(".js-googleMapsApi").length==0){var googleApiSrc="//maps.googleapis.com/maps/api/js?key="+ACC.common.encodeHtml(ACC.config.googleApiKey)+'&sensor=false&callback='+ACC.common.encodeHtml(callback);$('head').append($("<script>").addClass("js-googleMapsApi").attr("type","text/javascript").attr("src",googleApiSrc));}else if(callback!=undefined){eval(callback+"()");}},backToHome:function(){$(".backToHome").on("click",function(){var sUrl=ACC.config.contextPath;window.location=sUrl;});},bindDropdown:function(){$(document).on("click",".dropdown-toggle",dropdownToggle);},closeAccAlert:function(){$(".closeAccAlert").on("click",function(){$(this).parent('.getAccAlert').remove();});}};function dropdownParent($this){var selector=$this.attr('href')
1338selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')
1339var $parent=selector&&$(selector)
1340return $parent&&$parent.length?$parent:$this.parent()};function dropdownClearMenus(e){if(e&&e.which===3)return
1341$('.dropdown-backdrop').remove()
1342$(".dropdown-toggle").each(function(){var $parent=dropdownParent($(this))
1343var relatedTarget={relatedTarget:this}
1344if(!$parent.hasClass('open'))return
1345if(e&&e.type=='click'&&/input|textarea/i.test(e.target.tagName)&&$.contains($parent[0],e.target))return
1346$parent.removeClass('open')})};function dropdownToggle(e){var $this=$(this)
1347if($this.is('.disabled, :disabled'))return
1348var $parent=dropdownParent($this)
1349var isActive=$parent.hasClass('open')
1350dropdownClearMenus()
1351if(!isActive){if('ontouchstart'in document.documentElement&&!$parent.closest('.navbar-nav').length){$(document.createElement('div')).addClass('dropdown-backdrop').insertAfter($(this)).on('click',dropdownClearMenus)}
1352var relatedTarget={relatedTarget:this}
1353if(e.isDefaultPrevented())return
1354$this.trigger('focus').attr('aria-expanded','true')
1355$parent.toggleClass('open')}
1356return false};ACC.navigation={myAccountNavigation:function(){}};ACC.carousel={bindCarousel:function(){}};ACC.autocomplete={bindSearchAutocomplete:function(){}};if(typeof HB==='undefined')var HB={};HB.LazyLoad={timeout:10,retry:10,getObject:function(_classPath){var parts=_classPath.split('.');var obj=window;for(var index in parts){var name=parts[index];if(typeof obj[name]!=='undefined'){obj=obj[name];}else{return null;}}
1357return obj;},waitUntilAvailable:function(_classPath){var count=0;var obj=HB.LazyLoad.getObject(_classPath);do{if(obj!==null){return;}else{var start=new Date().getTime();for(var i=0;i<1e7;i++)if((new Date().getTime()-start)>HB.LazyLoad.timeout)break;}}while(count++<HB.LazyLoad.retry);throw'Class '+_classPath+' is not available jet!';}};HB.LazyLoad.StaticLoader=function(){var that=this;var classPath='';var config={};this.extend=function(_classPath,_config){if(_classPath!==''&&typeof _config==='object'){classPath=_classPath;config=_config;for(var key in config){singleExtend(key,config[key]);}}}
1358function setClassMember(_classPath,_member,_mixed){var object=HB.LazyLoad.getObject(_classPath);if(object===null)throw'Could not set property "'+_member+'" of class '+_classPath;object[_member]=_mixed;}
1359function singleExtend(_key,_value){HB.LazyLoad.waitUntilAvailable(classPath);var object=HB.LazyLoad.getObject(classPath);if(typeof object.Super==='undefined')setClassMember(classPath,'Super',{});if(typeof object[_key]==='function'){setClassMember(classPath+'.Super',_key,object[_key]);}
1360setClassMember(classPath,_key,_value);}
1361return this;};HB.LazyLoad.Static=new HB.LazyLoad.StaticLoader();var AdyenCheckoutHybris=(function(){'use strict';
1361var CardBrand={Visa:'visa',MasterCard:'mc',Elo:'elo',Maestro:'maestro',Electron:'electron',EloDebit:'elodebit'};var ErrorMessages={PaymentCancelled:'checkout.error.authorization.payment.cancelled',PaymentError:'checkout.error.authorization.payment.error'};return{oneClickForms:[],dobDateFormat:"yy-mm-dd",securedFieldsData:{},allowedCards:[],cseEncryptedForm:null,checkout:null,card:null,oneClickCards:{},selectedCardBrand:null,sepaDirectDebit:null,convertCardBrand:function(){var cardBrand=this.selectedCardBrand;if(cardBrand===CardBrand.Visa){return CardBrand.Electron;}
1362if(cardBrand===CardBrand.MasterCard){return CardBrand.Maestro;}
1363if(cardBrand===CardBrand.Elo){return CardBrand.EloDebit;}},isValidBrandType:function(){var cardBrand=this.selectedCardBrand;return cardBrand===CardBrand.Visa||cardBrand===CardBrand.MasterCard||cardBrand===CardBrand.Elo;},getCardType:function(){var cardType=$('#adyen_combo_card_type').val();if(cardType===""||cardType==undefined)
1364cardType="credit";return cardType;},isDebitCard:function(){return this.getCardType()==='debit';},validateForm:function(){var paymentMethod=$('input[type=radio][name="paymentMethod"]:checked').val();if(paymentMethod===""){window.alert("Please select a payment method");return false;}
1365if(paymentMethod==="adyen_cc"){var isInvalidCard=!this.card.isValid||(this.isDebitCard()&&!this.isValidBrandType());if(isInvalidCard){window.alert('This '+this.getCardType()+' card is not allowed');return false;}
1366this.copyCardData();}
1367if(paymentMethod.indexOf("adyen_oneclick_")===0){var recurringReference=paymentMethod.slice("adyen_oneclick_".length);var oneClickCard=this.oneClickCards[recurringReference];if(!(oneClickCard&&oneClickCard.isValid)){window.alert('This credit card is not allowed');return false;}
1368if(['bcmc','maestro'].indexOf(oneClickCard.props.brand)>=0){this.copyOneClickCardBrandData(recurringReference,oneClickCard.props.brand)}
1369else{this.copyOneClickCardData(recurringReference,oneClickCard.data.paymentMethod.encryptedSecurityCode);}}
1370$('input[name="txvariant"]').remove();if(['eps','ideal'].indexOf(paymentMethod)>=0){var issuerIdField=document.getElementById('issuerId');if(issuerIdField.value===""){window.alert("Please select an issuer");return false;}}
1371if(paymentMethod==="pos"){var terminalId=$('#adyen_pos_terminal');if(terminalId.val()===""){window.alert("Please select a terminal");return false;}}
1372if(paymentMethod==="sepadirectdebit"){if(!this.sepaDirectDebit.state.isValid){window.alert("Invalid SEPA Owner Name and IBAN number");return false;}}
1373return true;},copyCardData:function(){var state=this.card.data.paymentMethod;$('input[name="encryptedCardNumber"]').val(state.encryptedCardNumber);$('input[name="encryptedExpiryMonth"]').val(state.encryptedExpiryMonth);$('input[name="encryptedExpiryYear"]').val(state.encryptedExpiryYear);$('input[name="encryptedSecurityCode"]').val(state.encryptedSecurityCode);$('input[name="cardHolder"]').val(state.holderName);if(this.card.data.storePaymentMethod!=null){$('input[name="rememberTheseDetails"]').val(this.card.data.storePaymentMethod);}
1374if(this.isDebitCard()){$('input[name="cardBrand"]').val(this.convertCardBrand());$('input[name="cardType"]').val(this.getCardType());}
1375$('input[name="browserInfo"]').val(JSON.stringify(this.card.data.browserInfo));},copyOneClickCardData:function(recurringReference,cvc){$("#selectedReference").val(recurringReference);$('input[name="encryptedSecurityCode"]').val(cvc);$('input[name="browserInfo"]').val(JSON.stringify(this.card.data.browserInfo));},copyOneClickCardBrandData:function(recurringReference,brand){$("#selectedReference").val(recurringReference);$('input[name="cardBrand"]').val(brand);$('input[name="browserInfo"]').val(JSON.stringify(this.card.data.browserInfo));},setCustomPaymentMethodValues:function(){var paymentMethod=$('input[type=radio][name=paymentMethod]:checked').val();var dob=$('#p_method_adyen_hpp_'+paymentMethod+'_dob');if(dob){$("#dob").val(dob.val());}
1376var ssn=$('#p_method_adyen_hpp_'+paymentMethod+'_ssn');if(ssn){$("#socialSecurityNumber").val(ssn.val());}
1377var terminalId=$('#adyen_pos_terminal');if(terminalId){$("#terminalId").val(terminalId.val());}},createDobDatePicker:function(element){$("."+element).datepicker({dateFormat:this.dobDateFormat,changeMonth:true,changeYear:true,yearRange:"-120:+0"});},togglePaymentMethod:function(paymentMethod){$(".payment_method_details").hide();$(".chckt-pm__details").hide();$("#dd_method_"+paymentMethod).show();$("#adyen_hpp_"+paymentMethod+"_container").show();},createDfValue:function(){window.dfDo("dfValue");},initiateCheckout:function(locale,environment,clientKey){var configuration={locale:locale,environment:environment,clientKey:clientKey,risk:{enabled:false}};this.checkout=new AdyenCheckout(configuration);},initiateOneClickCard:function(storedCard){var oneClickCardNode=document.getElementById("one-click-card_"+storedCard.storedPaymentMethodId);var oneClickCard=this.checkout.create('card',storedCard);oneClickCard.mount(oneClickCardNode);this.oneClickCards[storedCard.storedPaymentMethodId]=oneClickCard;},initiateCard:function(allowedCards,showRememberDetails){var context=this;this.card=this.checkout.create('card',{type:'card',hasHolderName:true,holderNameRequired:true,enableStoreDetails:showRememberDetails,brands:allowedCards,onBrand:copyCardBrand});function copyCardBrand(event){context.selectedCardBrand=event.brand;}
1378this.card.mount(document.getElementById('card-div'));},initiateSepaDirectDebit:function(){var context=this;var sepaDirectDebitNode=document.getElementById('adyen_hpp_sepadirectdebit_container');this.sepaDirectDebit=this.checkout.create('sepadirectdebit',{onChange:handleOnChange});function handleOnChange(event){var sepaOwnerNameField=document.getElementById('sepaOwnerName');var sepaIbanNumberField=document.getElementById('sepaIbanNumber');var sepaOwnerName=event.data.paymentMethod["ownerName"]
1379var sepaIbanNumber=event.data.paymentMethod["iban"]
1380sepaOwnerNameField.value=sepaOwnerName;sepaIbanNumberField.value=sepaIbanNumber;}
1381this.sepaDirectDebit.mount(sepaDirectDebitNode);},initiateIdeal:function(idealDetails){var idealNode=document.getElementById('adyen_hpp_ideal_container');var ideal=this.checkout.create('ideal',{details:idealDetails,showImage:true,onChange:handleChange});function handleChange(event){var issuerIdField=document.getElementById('issuerId');var issuerId=event.data.paymentMethod.issuer;issuerIdField.value=issuerId;}
1382try{ideal.mount(idealNode);}catch(e){console.log('Something went wrong trying to mount the iDEAL component: ${e}');}},initiateEps:function(epsDetails){var epsNode=document.getElementById('adyen_hpp_eps_container');var eps=this.checkout.create('eps',{details:epsDetails,showImage:true,onChange:handleOnChange});function handleOnChange(event){var issuerIdField=document.getElementById('issuerId');var issuerId=event.data.paymentMethod.issuer;issuerIdField.value=issuerId;}
1383try{eps.mount(epsNode);}catch(e){console.log('Something went wrong trying to mount the EPS component: ${e}');}},initiatePaypal:function(amount,isImmediateCapture,paypalMerchantId,label){var paypalNode=document.getElementById('adyen-paypal-container-'+label);var adyenComponent=this.checkout.create("paypal",{environment:this.checkout.options.environment,amount:{currency:amount.currency,value:amount.value},intent:isImmediateCapture?"capture":"authorize",merchantId:(this.checkout.options.environment==='test')?null:paypalMerchantId,onChange:(state,component)=>{if(!state.isValid){this.enablePlaceOrder(label);}},onSubmit:(state,component)=>{if(!state.isValid){this.enablePlaceOrder(label);return false;}
1384this.makePayment(state.data.paymentMethod,component,this.handleResult,label);},onCancel:(data,component)=>{this.handleResult(ErrorMessages.PaymentCancelled,true);},onError:(error,component)=>{this.handleResult(ErrorMessages.PaymentError,true);},onAdditionalDetails:(state,component)=>{this.submitDetails(state.data,this.handleResult);}});try{adyenComponent.mount(paypalNode);}catch(e){console.log('Something went wrong trying to mount the PayPal component: '+e);}},initiateMbway:function(label){var mbwayNode=document.getElementById('adyen-component-container-'+label);var adyenComponent=this.checkout.create("mbway",{showPayButton:false,onChange:(state,component)=>{if(!state.isValid){this.enablePlaceOrder(label);}},onSubmit:(state,component)=>{if(!state.isValid){this.enablePlaceOrder(label);return;}
1385this.makePayment(state.data.paymentMethod,component,this.handleResult,label);},onAdditionalDetails:(state,component)=>{this.submitDetails(state.data,this.handleResult);},onError:(error,component)=>{console.log('Something went wrong trying to make the MBWay payment: '+error);this.handleResult(ErrorMessages.PaymentError,true);}});try{adyenComponent.mount(mbwayNode);this.configureButton(adyenComponent,false,label);}catch(e){console.log('Something went wrong trying to mount the MBWay component: '+e);}},configureButton:function(form,useSpinner,label){$(document).ready(function(){$("#placeOrder-"+label).click(function(){$(this).prop('disabled',true);if(useSpinner){AdyenCheckoutHybris.showSpinner();}
1386form.submit();});});},makePayment:function(data,component,handleResult,label){$.ajax({url:ACC.config.encodedContextPath+'/adyen/component/payment',type:"POST",data:JSON.stringify({paymentMethodDetails:data,termsCheck:document.getElementById('terms-conditions-check-'+label).checked}),contentType:"application/json; charset=utf-8",success:function(data){try{var response=JSON.parse(data);if(response.resultCode&&response.resultCode==='Pending'&&response.action){component.handleAction(response.action);}else{handleResult(ErrorMessages.PaymentError,true);}}catch(e){console.log('Error parsing makePayment response: '+data);handleResult(ErrorMessages.PaymentError,true);}},error:function(xmlHttpResponse,exception){var responseMessage=xmlHttpResponse.responseJSON;if(xmlHttpResponse.status===400){handleResult(responseMessage,true);}else{console.log('Error on makePayment: '+responseMessage);handleResult(ErrorMessages.PaymentError,true);}}})},submitDetails:function(data,handleResult){$.ajax({url:ACC.config.encodedContextPath+'/adyen/component/submit-details',type:"POST",data:JSON.stringify(data),contentType:"application/json; charset=utf-8",success:function(data){try{var response=JSON.parse(data);if(response.resultCode){handleResult(response,false);}else{handleResult(ErrorMessages.PaymentError,true);}}catch(e){console.log('Error parsing submitDetails response: '+data);handleResult(ErrorMessages.PaymentError,true);}},error:function(xhr,exception){var responseMessage=xhr.responseJSON;if(xhr.status===400){handleResult(responseMessage,true);}else{console.log('Error on submitDetails: '+responseMessage);handleResult(ErrorMessages.PaymentError,true);}}})},handleResult:function(data,error){if(error){document.querySelector("#resultData").value=data;document.querySelector("#isResultError").value=error;}else{document.querySelector("#resultData").value=JSON.stringify(data);}
1387document.querySelector("#handleComponentResultForm").submit();},showSpinner:function(){document.getElementById("spinner_wrapper").style.display="flex";},enablePlaceOrder:function(label){document.getElementById("spinner_wrapper").style.display="none";$("#placeOrder-"+label).prop('disabled',false);}};})();HB.track={debug:0,overiFrame:-1,trackImageGallery:false,init:function(){if(HB.config.track.piwikAnalyticsTrackingId){HB.track.debug?console.log("HB.track.init >> "):null;if(HB.track.isNoProblemWithTrackingDetected()){window.mediator.subscribe('trackEvent',function(data){HB.track.debug?console.log("event catched: ",data):null;if(data.type&&data.id)
1388{HB.track.pushEvent(data.type,data.id);}});}
1389HB.track.addListeners();}},trackAddToCart:function(productCode,quantity,cartData)
1390{if(HB.track.isNoProblemWithTrackingDetected()){window.mediator.publish('trackAddToCart',{productC
1390ode:productCode,quantity:quantity,cartData:cartData});}},trackRemoveFromCart:function(productCode,initialCartQuantity)
1391{if(HB.track.isNoProblemWithTrackingDetected()){window.mediator.publish('trackRemoveFromCart',{productCode:productCode,initialCartQuantity:initialCartQuantity});}},trackUpdateCart:function(productCode,initialCartQuantity,newCartQuantity)
1392{if(HB.track.isNoProblemWithTrackingDetected()){window.mediator.publish('trackUpdateCart',{productCode:productCode,initialCartQuantity:initialCartQuantity,newCartQuantity:newCartQuantity});}},trackEvent:function(type,id){HB.track.debug?console.log("tracking event: ",type,id):null;if(HB.track.isNoProblemWithTrackingDetected()){window.mediator.publish('trackEvent',{type:type,id:id});}},pushEvent:function(type,id){HB.track.debug?console.log("pushing event "+type+", "+id):null;_paq.push(['trackEvent',type,id]);},addListeners:function(){},isNoProblemWithTrackingDetected:function(){if(typeof window.mediator!=='undefined'){return true;}
1393return false;}};;HB.Core={recalculateQuantity:function(_quantity,_conversion){var qty=parseFloat(_quantity);var step=1/_conversion;if(isNaN(step))return 0;if(isNaN(qty)||qty<step)return step;return Math.ceil(qty/step)*step;},increaseQuantity:function(_quantity,_conversion){var qty=parseInt(_quantity);var step=1/_conversion;if(isNaN(step))return 0;if(isNaN(qty)||qty<step)return step;return Math.ceil(qty/step)*step;},decreaseQuantity:function(_quantity,_conversion){var qty=parseInt(_quantity);var step=1/_conversion;if(isNaN(step))return 0;if(isNaN(qty)||qty<step)return 0;return Math.floor(qty/step)*step;},parseLocalNum:function(num){return+(num.replace(',','.'));},isComfort:function(){if(((document.cookie.indexOf(HB.cookieSettings.cookieName)>=0)||(HB.cookieSettings.hideCookieSettings==="true"))){var consentFor="COMFORT";if(HB.CookieSettings.getCookieByName("cookieSettings").indexOf(consentFor.toUpperCase())>=0){return true;}}
1394return false;},isConsentTrue:function(serviceId){if(HB.config.usercentricsApiKey!==''){if(HB.cookieSettings.hideUCCookieSettings==="true"){return false;}
1395let ucStorageService=JSON.parse(window.localStorage.uc_settings).services.find(service=>service.id===serviceId);if(ucStorageService){return ucStorageService.status;}}},isUCConsentOrComfort:function(serviceId){if(HB.config.usercentricsApiKey!==''&&serviceId!==''){return this.isConsentTrue(serviceId);}else{return this.isComfort();}}};jQuery.extend({postJSON:function(url,data,callback){return jQuery.post(url,data,callback,"json");}});$.ajaxPrefilter(function(options,originalOptions,jqXHR)
1396{if(options.type==="post"||options.type==="POST")
1397{var noData=(typeof options.data==="undefined");if(noData)
1398{options.data="CSRFToken="+HB.config.CSRFToken;}
1399else
1400{var patt1=/application\/json/i;if(options.data instanceof window.FormData)
1401{options.data.append("CSRFToken",HB.config.CSRFToken);}
1402else if(patt1.test(options.contentType))
1403{jqXHR.setRequestHeader('CSRFToken',HB.config.CSRFToken);}
1404else if(options.data.indexOf("CSRFToken")===-1)
1405{options.data=options.data+"&"+"CSRFToken="+HB.config.CSRFToken;}}}});HB.ViewportChange={_viewport:null,_previousViewport:null,_contactPersonContainer:$("#accountContactPerson"),_cpAppendContainer:$(".accountContent"),_width:$(window).width(),debug:0,_viewportDefinition:{xs:0,sm:1,md:2,lg:3,0:"xs",1:"sm",2:"md",3:"lg"},init:function(){HB.ViewportChange._viewport=HB.ViewportChange.getViewport();HB.ViewportChange._previousViewport=HB.ViewportChange._viewport;HB.ViewportChange._contactPersonContainer=$("#accountContactPerson");HB.ViewportChange._cpAppendContainer=$(".accountContent");HB.ViewportChange._width=$(window).width();if(HB.ViewportChange._viewport.name=='xs'||HB.ViewportChange._viewport.name=='sm'){HB.ViewportChange.executeViewportChanges("initial");HB.MyAccount.ShiftingContactPerson();HB.ViewportChange.onScreenOrientationChanged();}
1406HB.ArrowBannerComponent.init();HB.ViewportChange.updateCssVariables();$(window).scroll(HB.ViewportChange.onScroll);$(window).resize(HB.ViewportChange.onResize);},onScroll:function(event){},onResize:function(event){var viewportChange=null;HB.ViewportChange._viewport=HB.ViewportChange.getViewport();
1406viewportChange=HB.ViewportChange.viewportChanged();if(viewportChange&&viewportChange!=="ignore"){HB.ViewportChange.executeViewportChanges();HB.MyAccount.ShiftingContactPerson();}
1407HB.NavigationBar.init();HB.ArrowBannerComponent.resizeArrow();HB.Review.multipleLineTruncate();HB.Utils.setCssClassCmsComponents();HB.Utils.setFontSizeInComponents();HB.Header.setCssTopForPositionSticky();HB.ViewportChange.updateCssVariables();if(HB.ViewportChange._viewport.name=='sm')
1408{$('.contact-box .contact-inner').attr("style","");}
1409if($(window).width()!=HB.ViewportChange._width&&Object.keys($('#mobile-main-nav')).length>2)
1410{HB.Header.defaultStateNavi();}
1411if(HB.ViewportChange._viewport.name!='xs'&&$('body').hasClass('page-singleStepCheckoutConfigurationPage'))
1412{HB.CheckoutConfig.showAllCollapseCollects('#checkoutConfigForm .collect-template');HB.CheckoutConfig.showAllCollapseDeliver('#checkoutConfigForm .deliver-template');HB.CheckoutConfig.switchPopoverPlacement();}
1413if(HB.ViewportChange._viewport.name=='xs'&&$('body').hasClass('page-singleStepCheckoutConfigurationPage'))
1414{HB.CheckoutConfig.hideAllCollapseCollects('#checkoutConfigForm .collect-template');HB.CheckoutConfig.hideAllCollapseDeliver('#checkoutConfigForm .deliver-template');HB.CheckoutConfig.switchPopoverPlacement();}
1415if(HB.ViewportChange._viewport.name!='xs'&&$('body').hasClass('page-singleStepCheckoutSummaryPage'))
1416{HB.CheckoutConfig.showAllCollapseCollects('.configure-collections .collect-template');HB.CheckoutConfig.showAllCollapseDeliver('.configure-deliveries .collect-template');}
1417if(HB.ViewportChange._viewport.name=='xs'&&$('body').hasClass('page-singleStepCheckoutSummaryPage'))
1418{HB.CheckoutConfig.hideAllCollapseCollects('.configure-collections .collect-template');HB.CheckoutConfig.hideAllCollapseDeliver('.configure-deliveries .collect-template');}
1419if(HB.ViewportChange._viewport.name=='xs'&&$('body').hasClass('page-account'))
1420{HB.MyAccount.showReducedNavOnUserAccount();}
1421if($('body').hasClass('page-account'))
1422{HB.MyAccount.setVisibilityForEntryPoints();}
1423if($('body').hasClass('page-productList')||$('body').hasClass('page-search')){if(HB.ViewportChange._viewport.name=='lg'||HB.ViewportChange._viewport.name=='md'){HB.ListViewSwitcher.handleViewportSwitchBack();HB.ViewportChange.debug>0?console.log("switch back"):null;}else{HB.ListViewSwitcher.handleViewportSwitchToGrid();HB.ViewportChange.debug>0?console.log("switch grid"):null;}}
1424if(HB.ViewportChange._viewport.name=='xs'){HB.LocationSwitcher.setMenuPosition();}
1425if($('body').hasClass('page-articleListPage')){HB.ArticleList.checkIfArrowsAreNeeded();}
1426if(HB.ViewportChange._viewport.name!='xs'){HB.Refinements.reorderFacetLinkShowMore();}
1427if(HB.ViewportChange._viewport.name!='xs'&&$('body').hasClass('template-pages-craftsman-search'))
1428{HB.craftsmanfinder.showHiddenDetailsOnTabletAndAbove();}},getViewport:function(){var viewport={name:'',index:0}
1429var width=window.innerWidth;if(width<=767){viewport.name="xs";}else if((768<=width)&&(width<=969)){viewport.name="sm";}else if((970<=width)&&(width<=1199)){viewport.name="md";}else if(1200<=width){viewport.name="lg";}
1430viewport.index=parseInt(HB.ViewportChange._viewportDefinition[viewport.name]);return viewport;},viewportChanged:function(){if(HB.ViewportChange._previousViewport){if(HB.ViewportChange._viewport.index===HB.ViewportChange._previousViewport.index){return false;}else{if(((HB.ViewportChange._previousViewport.index==0||HB.ViewportChange._previousViewport.index==1)&&HB.ViewportChange._viewport.index>=2)||(HB.ViewportChange._previousViewport.index>=2&&(HB.ViewportChange._viewport.index==0||HB.ViewportChange._viewport.index==1)))
1431{HB.ViewportChange._previousViewport=HB.ViewportChange._viewport;$(window).trigger('viewport-changed');return true;}else{HB.ViewportChange._previousViewport=HB.ViewportChange._viewport;return"ignore";}}}else{HB.ViewportChange._previousViewport=HB.ViewportChange._viewport;return HB.ViewportChange._viewport.index==0?true:false;}},onScreenOrientationChanged:function(){try{screen.orientation.addEventListener("change",(event)=>{$(window).trigger('viewport-changed');});}catch(error){window.addEventListener("orientationchange",(event)=>{$(window).trigger('viewport-changed');});}}
1431,executeViewportChanges:function(initialFlag){if($('#footer-wrapper').find('.hagebaufootercomponent').length){var footerAdvantagesRow=$("#footer-wrapper .hagebaufootercomponent .advantages-wrapper");var footerNavnotesRow=$("#footer-wrapper .hagebaufootercomponent .main-content-wrapper");var footerNavnotesRowSimple=$("#footer-wrapper .hagebaufootercomponent .main-content-simple-footer");var footerSubNavnotes=$(".hagebaufootercomponent .sub-navi-wrapper .row");if(HB.ViewportChange._viewport.index<=1){if($("#footer-wrapper").find(".main-content").length){HB.ViewportChange.changeFirstViewport(footerAdvantagesRow,footerNavnotesRow,footerSubNavnotes);}
1432if($("#footer-wrapper").find(".main-content-simple-footer").length){HB.ViewportChange.changeFirstViewport(footerAdvantagesRow,footerNavnotesRowSimple,footerSubNavnotes);}}
1433if(HB.ViewportChange._viewport.index>=2){if($("#footer-wrapper").find(".main-content").length){HB.ViewportChange.changeNoneFirstViewport(footerAdvantagesRow,footerNavnotesRow,footerSubNavnotes);}
1434if($("#footer-wrapper").find(".main-content-simple-footer").length){HB.ViewportChange.changeNoneFirstViewport(footerAdvantagesRow,footerNavnotesRowSimple,footerSubNavnotes);}}}
1435HB.ViewportChange.changeAdditionals(initialFlag);},changeFirstViewport:function(footerAdvantagesRow,footerNavnotesRow,footerSubNavnotes){footerAdvantagesRow.addClass("hidden-xs hidden-sm hidden-md");footerNavnotesRow.after(footerAdvantagesRow);footerAdvantagesRow.removeClass("hidden-xs hidden-sm");var firstChild=footerSubNavnotes.children().first();var lastChild=footerSubNavnotes.children().last();firstChild.before(lastChild);},changeNoneFirstViewport:function(footerAdvantagesRow,footerNavnotesRow,footerSubNavnotes){HB.Header.bindToTouchMenu(HB.Header.$touchParentNodes);footerAdvantagesRow.addClass("hidden-xs hidden-sm hidden-md");footerNavnotesRow.before(footerAdvantagesRow);footerAdvantagesRow.removeClass("hidden-xs hidden-md");var firstChild=footerSubNavnotes.children().first();var lastChild=footerSubNavnotes.children().last();firstChild.before(lastChild);},changeAdditionals:function(initialFlag){if($("body").hasClass("page-productDetails")){HB.SlickSlider.executeProductPageViewPortChange();}},updateCssVariables:function(){document.documentElement.style.setProperty('--global-view-height',window.innerHeight);document.documentElement.style.setProperty('--global-view-width',window.innerWidth);}};;HB.Utils={waitTimeout:10,modal:null,debug:0,beforeInit:function(){HB.Utils.checkInIframe();},initAjax:function(){$.ajaxSetup({timeout:11000,error:HB.Message.onAjaxErrorInModal});},initComponents:function(){HB.Utils.modal=$("div#hbModal");HB.Utils.onCloseClearModalPopup();HB.Utils.initContactOpener();HB.Utils.stylingFakeSelectOnHover();HB.ViewportChange.init();HB.NavigationBar.init();HB.DirectOrder.init();HB.AccountLogin.init();HB.LocationSwitcher.init();HB.B2BUnitSwitcher.init();HB.WishlistLayer.init();HB.Utils.parallaxScroll();HB.Questionnaire.init();HB.Bom.init();HB.EventCalendar.init();HB.Download.init();HB.Product.init();HB.DecodeEmail.init();HB.Contact.init();HB.Widerruf.init();HB.ProductReferences.init();HB.PopUpGallery.init();HB.AddToCartPostMessagerListener.init();HB.ConnectedArticle.init();HB.ArticleSlider.init();HB.StoreSelection.init();HB.Header.bindAll();HB.Review.init();HB.Utils.setCssClassCmsComponents();HB.Utils.setFontSizeInComponents();$('#top-scroller-btn').on("click",function(){$("html, body").animate({scrollTop:0},'500');});if(window.location.href.split("#").length>1){if(window.location.href.split("#")[1].length>0){window.scrollBy(0,-$('#js-page-header').height());}}
1436$('a.tabHead').click(function(e){e.preventDefault();});$('a').not('.tabHead').click(function(event){var splitArray=$(this).attr('href')?.split("#");if(splitArray&&splitArray.length>1&&splitArray[0].length===0&&splitArray[1].length>1){setTimeout(function(){window.scrollBy(0,-$('#js-page-header').height());},100);}});},initConditional:function(){if($('body').hasClass('pageType-ProductPage')||$('body').hasClass('page-searchListPage')){HB.LiveStocks.init();if($('.productDetail').length){HB.LivePrice.init();HB.Utils.stickBottom('.productDetail',($(window).height()-55)+'px');$(window).resize(function(){HB.Utils.stickBottom('.productDetail',($(window).height()-55)+'px');});}}
1437if($('body').hasClass('showContentNav')){HB.Utils.headlineNavigation();}
1438if(!HB.Utils.isSmartEdit()){}
1439if($('body').hasClass('template-pages-category-productListPage')||$('body').hasClass('template-pages-search-searchListPage')){HB.ListViewSwitcher.init();
1439HB.ListItem.init();HB.ProductList.init();HB.Refinements.init();}
1440if($('body').hasClass('template-pages-search-searchListPage')){HB.Tabs.init();}
1441if($('body').hasClass('page-cartPage')){HB.Cart.init();HB.postcodeSuggest.init();}
1442if($('body').hasClass('page-checkout-login')){HB.CheckoutLogin.init();HB.Registration.init();HB.postcodeSuggest.init();}
1443if($('body').hasClass('page-simpleCheckoutConfigurationPage')){HB.SimpleCheckoutConfig.init();}
1444if($('body').hasClass('page-singleStepCheckoutSummaryPage')){HB.CheckoutSummary.init();HB.CheckoutConfig.init();}
1445if($('body').hasClass('page-simpleCheckoutSummaryPage')){HB.CheckoutSummary.init();}
1446if($('body').hasClass('page-requestConfirmationPage')){HB.NoBack.pageForward();}
1447if($('body').hasClass('page-registration')){HB.Registration.init();HB.Utils.setMarginAfterFormError();HB.postcodeSuggest.init();}
1448if($('form').length>0&&$('form').hasClass('validate')){HB.FormValidation.init();}
1449if($('body').hasClass('page-search')){HB.SearchPage.init();HB.ArticleList.init();}
1450if($('body').hasClass('page-account')){HB.MyAccount.init();}
1451if($('body').hasClass('page-articleListPage')){HB.ListItem.init();HB.ArticleList.init();HB.Refinements.init();}
1452if($('body').hasClass('page-articleDetailsPage')){HB.ArticleDetails.init();}
1453if($('body').hasClass('template-pages-craftsman-search')){HB.craftsmanfinder.init();}
1454if(/iPad/i.test(navigator.userAgent)){HB.Utils.iPadMainNaviFix();}
1455if(!Modernizr.touch){$('[data-toggle="tooltip"]').tooltip();$('.showTooltip').tooltip();}
1456HB.Utils.startsWithSupport();HB.Utils.endsWithSupport();HB.Utils.includesSupport();},initCookieDependentComponents:function(){if($('.videoComponent').length){HB.HagebauVideoComponent.init();}
1457if($('.acceptCookiesBannerComponent').length){HB.AcceptCookiesBannerComponent.init();}},displayModalPopupLoading:function(_sizeParam){var content='<div class="modal-loading-spinner"><img src="'+HB.config.sharedResourcePath+'/images/spinner-128.gif" alt="ajax spinner"/></div';HB.Utils.displayModalPopup(content,_sizeParam);},displayModalPopup:function(_content,_sizeParam,preventClose=false){HB.Utils.debug>0?console.log(_content,_sizeParam):null;HB.Utils.modal.find('div.modal-dialog').removeClass('modal-xl modal-lg modal-md modal-sm modal-xs');HB.Utils.modal.find(".modal-dialog").addClass(_sizeParam);var modalContent=HB.Utils.modal.find(".modal-content");modalContent.html("");modalContent.append(_content);if(!preventClose){HB.Utils.modal.modal();}else{HB.Utils.modal.modal({backdrop:'static',keyboard:false});$("#js-account-login-close").addClass("hidden");}},hideModalPopup:function(){HB.Utils.modal.modal('hide');},hideModalPopupWithDelay:function(sec){if(typeof sec!=='undefined'&&$.isNumeric(sec)){setTimeout(function(){HB.Utils.modal.modal('hide');},sec);}},onCloseClearModalPopup:function(){HB.Utils.modal.on("hide.bs.modal",function(e){var relaodNecessary=($('#relaodPagePopup').length>0);HB.Utils.modal.find('div.modal-dialog').removeClass('modal-lg modal-md modal-sm modal-xs');HB.Utils.modal.find('div.modal-content').empty();if(relaodNecessary==true){location.reload();}});},onCloseClearModalPopupAndReload:function(){HB.Utils.modal.on("hide.bs.modal",function(e){HB.Utils.onCloseClearModalPopup();location.reload();});},onCloseDefaultToCookieAndReload:function(cookieName,cookieValue){HB.Utils.modal.on('hidden.bs.modal',function(event){HB.StoreSelection.setCookie(cookieName,cookieValue);location.reload();})},enableButton:function(_id){$(_id).removeAttr("disabled");$(_id).removeAttr("aria-disabled");},disableButton:function(_id){var $button=$(_id);$button.attr("disabled","disabled");$button.attr("aria-disabled","true");$button.off();},checkFormChanges:function(selector,btn){if(navigator.userAgent.indexOf("MSIE 8")>0){$(selector).click(function(){$(btn).removeAttr("disabled").removeClass("disabled");});}
1458$(selector).change(function(){$(btn).removeAttr("disabled").removeClass("disabled");});$(selector).on('input',function(){$(btn).removeAttr("disabled").removeClass("disabled");});},fadeSuccessAlert:function(){var messageContainer=$("#globalMessages .alert.positive");if($("#globalMessages .alert.positive .message").text()!=''){window.setTimeout(function(){messageContainer.css("min-height","inherit");messageContainer.animate({height:0,opacity:'toggle',marginBottom:0,'padding-top':0,'padding-bottom':0},1000);},4000);}},setMarginAfterFormError:function(){if($("#guestCheckoutForm").find(".error").length>1){$("#guestCheckoutForm .form-group").each(function(){if(!$(this).hasClass("error")){$(this).addClass("errorMargin");}});}},getVisibleHeaderHeightWithPositionSticky:function(){if(HB.ViewportChange.getViewport().name==='xs'){var $logoHeader=$('header .logo-header');if($logoHeader.length){return $logoHeader.outerHeight();}}else if(HB.ViewportChange.getViewport().name==='sm'){var $logoHeader=$('header .logo-header');if($logoHeader.length){return $logoHeader.outerHeight();}}else{var $header=$('header');if($header.length){return $header.outerHeight()-1;}}
1459return 0;},getEntireHeaderWrapperHeight:function(){if($('.entire-header-wrapper').length&&$('.entire-header-wrapper').css('display').indexOf('none')<0){return $('.entire-header-wrapper').outerHeight();}else{return Number(0);}},getTopHeaderHeight:function(){let height=0;const $topHeader=$('#topHeader');if($topHeader&&$topHeader.css("display")!="none"){height=$topHeader.outerHeight();}
1460return height;},replacePhoneLinks:function(){if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){$.each($('.phone-link'),function(i,val){$(val).replaceWith($(val).text());});}},modalBoxPositionIOS:function(){if(navigator.userAgent.match(/iPhone|iPad|iPod/i)){var scrollLocation=0;$('.modal').on('show.bs.modal',function(){setTimeout(function(){scrollLocation=$(window).scrollTop();$('.modal').addClass('modal-ios').height($(window).height()).css({'margin-top':scrollLocation+'px'});}
1460,0);});$('input').on('blur',function(){setTimeout(function(){$(window).scrollLeft(0);var $focused=$(':focus');if(!$focused.is('input')){$(window).scrollTop(scrollLocation);}},0);});}},initContactOpener:function(){var $trigger=$('.mobile-contact-box'),$contactInfo=$('.contact-inner'),$button=$('#open-contact-info'),$productReferenceContainer;$trigger.on('click',function(){$contactInfo.slideToggle();$button.toggleClass('open');});},isMobile:function(){return window.matchMedia("(max-width: 768px)").matches;},mobilePopupConstants:{backdropClass:'mobile-menu-backdrop',overlayClass:'mobile-menu-overlay'},createMobileBackdrop:function(element,onBackdropInteract){let backdropDiv=document.createElement('div');backdropDiv.className=this.mobilePopupConstants.backdropClass;$(backdropDiv).on('mousedown',(e)=>{e.preventDefault();onBackdropInteract();});$(element).prepend(backdropDiv);$('.'+this.mobilePopupConstants.backdropClass).not(backdropDiv).remove();},removeMobileBackdrop:function(){$('.'+this.mobilePopupConstants.backdropClass).remove();$('html, body').css({'overflow':'unset','height':'unset','width':'unset'});},iPadMainNaviFix:function(){$("#nav-main").on("touchstart","a",function(event){var $target=$(event.target);if($target.parent().hasClass("Lb")||$target.parent().hasClass("Lc")||$target.parent().hasClass("show-all")){location.href=event.target.href;}});},insertSorted:function(list,obj,property){if(typeof list!=='undefined'&&list.constructor==Array&&typeof obj!=='undefined'){if(typeof property==='string'){var pos=0;var found=false;for(;pos<list.length;pos++){if(obj[property]>=list[pos][property]){if(pos+1<list.length&&obj[property]>=list[pos+1][property])continue;found=true;pos++;break;}}
1461list.splice(found?pos:0,0,obj);}else{var pos=0;var found=false;for(;pos<list.length;pos++){if(obj[property]>=list[pos][property]){if(pos+1<list.length&&obj[property]>=list[pos+1][property])continue;found=true;pos++;break;}}
1462list.splice(found?pos:0,0,obj);}}
1463return list;},headlineNavigation:function(){var headlines=$('#content h2').not(':empty'),lastHeadline=headlines.length,headlinePositions=[],headlineNavigation=[];for(var i=0,len=headlines.length;i<len;i++){var headline=$(headlines[i]),item=$('<div class="cms-navigation'+((i==0)?' active':'')+'">'+'<div class="dot"></div><div class="item">'+headline.text()+'</div></div>');headlinePositions.push(headline.offset().top);headlineNavigation.push(item);}
1464$('#content').prepend('<div class="headline-nav hover"></div>');const $nav=$('.headline-nav');$nav.html(headlineNavigation);const navHeight=$(window).height()/2-$nav.outerHeight()/2+40;const position="top: "+navHeight+"px;";$nav.attr('style',position);setTimeout(function(){$nav.removeClass('hover');},1000);var navItem=$('.cms-navigation');navItem.on('click',function(){var clickedItem=$(this).text();for(var i=0,len=headlines.length;i<len;i++){var headline=$(headlines[i]);if(headline.text()==clickedItem){$('body,html').animate({scrollTop:headline.offset().top-(HB.Utils.getVisibleHeaderHeightWithPositionSticky()+20)},1000);break;}}});var scrollPos=0,activeHeadline=1;$(window).on('scroll',function(){var scroll=window.pageYOffset,maxScroll=$(document).height()-$(window).height();if(scroll>scrollPos){if(window.pageYOffset>=(headlinePositions[activeHeadline]-HB.Utils.getVisibleHeaderHeightWithPositionSticky()-81)){activeHeadline++;}}else{activeHeadline=(activeHeadline==lastHeadline&&lastHeadline!=1)?lastHeadline-1:activeHeadline;if(window.pageYOffset<(headlinePositions[activeHeadline-1]-HB.Utils.getVisibleHeaderHeightWithPositionSticky()-81)){activeHeadline=(activeHeadline==1)?1:activeHeadline-1;}}
1465scrollPos=(scroll-2);activeHeadline=(scrollPos==maxScroll)?lastHeadline:activeHeadline;$('.cms-navigation').removeClass('active');$(headlineNavigation[activeHeadline-1]).addClass('active');});},stickPosition:function(ele,pos,stickyElement,scrollPos){var window_top=$(window).scrollTop();var stickyElement=stickyElement&&stickyElement.length?stickyElement:$(ele).find('.js-sticky-wrapper');var scrollPos=scrollPos?scrollPos:$(ele).offset().top-parseFloat(pos);if(window_top>scrollPos){stickyElement.addClass('sticked').removeClass('unsticked').css('top',pos);}else{stickyElement.addClass('unsticked').removeClass('sticked').removeAttr("style");}},stickBottom:function(ele,pos){var stickyElement=$(ele).find('.js-sticky-wrapper');stickyElement.addClass('sticked').removeClass('unsticked').css('top',pos);},parallaxScroll:function(){var parallax=$(".parallax-component"),speed=0.5;$(parallax).each(function(i,el){var elOffset=$(el).offset().top,elPos="50% -"+(elOffset*speed)+"px";el.style.backgroundPosition=elPos;});$(window).on('scroll',function(){$(parallax).each(function(i,el){var windowYOffset=window.pageYOffset,elementYOffset=$(el).offset().top,elBackgroun
1465dPos="50% "+(windowYOffset*speed-elementYOffset*speed)+"px";el.style.backgroundPosition=elBackgroundPos;});});},scrollToElement:function($element){if($element.length){var elementOffset=$element.offset().top;var elementHeight=$element.height();var windowHeight=$(window).height();var offset;if(elementHeight<windowHeight){offset=elementOffset-((windowHeight/2)-(elementHeight/2));}
1466else{offset=elementOffset;}
1467$('html, body').animate({scrollTop:offset},'slow');}},stylingFakeSelectOnHover:function(){HB.Utils.debug>0?console.log("HB.Utils.stylingFakeSelectOnHover()"):null;var fakeSelectWrapper=$('.select-wrapper:not(.facet)');fakeSelectWrapper.on('click',function(){HB.Utils.debug>0?console.log("select-wrapper activated"):null;if(!$(this).hasClass('active')){$(this).addClass('active');HB.Utils.debug>0?console.log("adding active"):null;}else{$(this).removeClass('active');HB.Utils.debug>0?console.log("removing active"):null;}});$('body').contextmenu(function(){fakeSelectWrapper.removeClass('active');});$('body').on('click',function(e){if(!fakeSelectWrapper.is(e.target)&&fakeSelectWrapper.has(e.target).length===0){fakeSelectWrapper.removeClass('active');}});},setCssClassCmsComponents:function(){$('#content').find('.yCmsComponent:not(:has("> .flexible-wrapper"))').each(function(){var $component=$(this);var width=$component.width();$component.removeClass('xs sm md lg');width=width+20;if(width<=767){$component.addClass('xs');}else if((768<=width)&&(width<=969)){$component.addClass('sm');}else if((970<=width)&&(width<=1199)){$component.addClass('md');}else if(1200<=width){$component.addClass('lg');}});HB.Utils.setSrcToComponentImageContainer();},setSrcToComponentImageContainer:function(){$('#content').find('.componentImageContainer').not('.cookieClass').each(function(){var $componentImageContainer=$(this);var urlJSON=$componentImageContainer.data('url');$yCmsComponent=$componentImageContainer.closest('.yCmsComponent');if($componentImageContainer.attr('src')?.length){if(typeof urlJSON=='object'&&$yCmsComponent.length>0&&$yCmsComponent.is('.xs, .sm, .md, .lg')){$yCmsComponent.attr('class').split(' ').map(function(className){if(typeof urlJSON[className]!=='undefined'&&$componentImageContainer.attr('src')!==urlJSON[className]){$componentImageContainer.attr('src',urlJSON[className]);}});}}});},setFontSizeInComponents:function($element){if(typeof $element==='undefined'||$element==null){$element=$('#content');}
1468$element.find('.banner, .image-gallery, .toggle-component').each(function(){var fontSize=0;var $img=$([]);if($(this).hasClass('toggle-component')){$img=$(this).find('> .image .js-main-image');}else{$img=$(this).find('.js-main-image');}
1469if($img.parent().hasClass('image-wrapper')){$img=$img.parent().hasClass('image-wrapper');}
1470if($img.length>0){fontSize=parseInt($img.height())/11;}
1471var $comp=$(this).parent();if($comp.hasClass('yCmsComponent')&&fontSize<36&&($comp.hasClass('md')||$comp.hasClass('lg'))){fontSize=36;}
1472if(fontSize>24){$(this).find('.headline').css({'font-size':fontSize+'px','line-height':(fontSize+6)+'px'});}else{$(this).find('.headline').css({'font-size':'','line-height':''});}});},checkInIframe:function(){try{if(window.self!==window.top){$('body').addClass('window-in-iframe');}else{$('body').addClass('window-not-in-iframe');}}catch(e){}},startsWithSupport:function(){if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){return this.substr(position||0,searchString.length)===searchString;};}},endsWithSupport:function(){if(!String.prototype.endsWith){String.prototype.endsWith=function(searchString,position){var subjectString=this.toString();if(typeof position!=='number'||!isFinite(position)||Math.floor(position)!==position||position>subjectString.length){position=subjectString.length;}
1473position-=searchString.length;var lastIndex=subjectString.indexOf(searchString,position);return lastIndex!==-1&&lastIndex===position;};}},includesSupport:function(){if(!String.prototype.includes){String.prototype.includes=function(search,start){'use strict';if(typeof start!=='number'){start=0;}
1474if(start+search.length>this.length){return false;}else{return this.indexOf(search,start)!==-1;}};}},isSmartEdit:function(){if($('.smartEditComponent').length){return true;}else{return false;}},isPageScrollable:function(){var docHeight=$('body').height();var winHeight=window.innerHeight;var reducedRange=71;if((docHeight-reducedRange)>winHeight){return true;}
1475return false;},isUserAgentInternetExplorer:function(){if(navigator.userAgent.indexOf('MSIE')!==-1||navigator.appVersion.indexOf('Trident/')>-1){return true;}
1476return false;},isOverflown:function($element){return $element.prop('scrollHeight')>$element.prop('clientHeight')||$element.prop('scrollWidth')>$element.prop('clientWidth');},isChildVisibleInParent:function($parent,$child){if($parent&&$parent.length&&$child&&$child.length){return!(($child.offset().left-$parent.offset().left>$parent.outerWidth())||($child.offset().top-$parent.offset().top>$parent.outerHeight()))}},localStorage:{isSupported:function(){return typeof(Storage)!=="undefined";},set:function(key,value){if(this.isSupported()){window.localStorage.setItem(key,value);}else{HB.Utils.debug>0?console.error('No web storage support'):null;}},get:function(key){if(this.isSupported()){return window.localStorage.getItem(key);}else{HB.Utils.debug>0?console.error('No web storage support'):null;}},remove:function(key){if(this.isSupported()){window.localStorage.removeItem(key);}else{HB.Utils.debug>0?console.error('No web storage support'):null;}}},addProtocolToUrl:function(url){if(!/^https?:\/\//i.test(url)){url='https://'+url;}
1477return url;},insertLoadingIndicator:function(targetSelector){const $element=$(target
1477Selector);if(!$element)return;const dimensions={height:$element.height(),width:$element.width()};const containerCSS=`background-color: transparent; position: relative; height: ${dimensions.height}px; width: ${dimensions.width}px;`;const spinnerCSS=`position: absolute; top: calc(50% - 48px); left: calc(50% - 48px); translate: 50% 50%;`;$element.html(`<div style="${containerCSS}"><img style="${spinnerCSS}" id="accountLoaderImage" class="account-loader" src="${HB.config.sharedResourcePath}/images/spinner-48.gif" alt="ajax spinner" /></div>`);},removeLoadingIndicator:function(targetSelector){const $element=$(targetSelector);if(!$element)return;$element.empty();}};;HB.Tabs={debug:0,init:()=>{HB.Tabs.bindTabLinks();},bindTabLinks:()=>{const allTabLinks=$('.tabs__parent-container').find('[class*=tab-link--]');if(allTabLinks.length){allTabLinks.on('click touch',function(){const href=$(this).attr('href');if(typeof href==='undefined'||href==='#'||href==='javascript:;'){HB.Tabs.onTabLink($(this),allTabLinks);}});}},onTabLink:(_this,_allTabLinks)=>{HB.Tabs.debug>0?console.log("click on tab-link",_this):null;if(!_this.hasClass('active')){let specifiedClassName;const classList=_this.attr('class').split(/\s+/);$.each(classList,function(index,item){if(item.startsWith('tab-link--')){specifiedClassName=item.split('--');return false;}});if(typeof specifiedClassName[1]!=='undefined'){HB.Tabs.toggleTabContent(specifiedClassName[1],_this,_allTabLinks);}}},toggleTabContent:(_lastPartSpecifiedClassName,_clickedTabLink,_allTabLinks)=>{HB.Tabs.debug>0?console.log("toggleTabContent with this last part of css class = "+_lastPartSpecifiedClassName):null;HB.Tabs.debug>0?console.log("toggleTabContent all tab links",_allTabLinks):null;const tabsParentContainer=_clickedTabLink.closest('.tabs__parent-container');if(tabsParentContainer.length){const tabContent=tabsParentContainer.find(('.tab-content--'+_lastPartSpecifiedClassName));if(tabContent.length&&!tabContent.hasClass('active')){_allTabLinks.removeClass('active');_clickedTabLink.addClass('active');tabsParentContainer.find('[class*=tab-content--]').addClass('hidden');tabContent.removeClass('hidden');}}}};HB.Header={navbar:{},$menuHandle:$("#js-menu-handle"),$searchHandle:$("#js-site-search"),$accountHandle:$("#js-site-myaccount"),$touchParentNodes:$(".parent",$(".touch")),$accountNavi:$('#account-nav'),$cartHandle:$('#js-site-cart'),$naviWrapper:$('.logo-header'),$stickyHeaderWrapper:$('#sticky-header-wrapper'),$discountPriceElement:$('#miniCartDiscount'),$contactSlot:$('.logo-header .contact-wrapper'),bindAll:function(){HB.Header.cloneContactLinkForMobileHeader(HB.Header.$contactSlot);HB.Header.accountNaviLayout();HB.Header.addObserverForHeaderIsSticky();HB.Header.addDiscountPriceMobile();HB.Header.bindToMenu(HB.Header.$menuHandle);HB.Header.bindToTouchMenu(HB.Header.$touchParentNodes);HB.Header.bindToSearch(HB.Header.$searchHandle);HB.Header.setCssTopForPositionSticky();},bindToMenu:function($handle){var mainNaviLinks,mobileMainNav,list,listItem,anchor;$handle.on("click",function(e){e.preventDefault();HB.Header.defaultStateSearch();if(!$handle.hasClass("active")){if(HB.Header.$accountNavi.length>0){mainNaviLinks=$("#account-nav a");}else{mainNaviLinks=$("#nav-main .La>a");}
1478list=$('<ul id="mobile-main-nav" class="visible-xs visible-sm"></ul>');if($('.template-pages-AccountPageTemplate').length){var shopLink;if(HB.config.url.backToShopLink&&HB.config.url.backToShopLink!=''){shopLink=HB.config.url.backToShopLink;}else{shopLink=HB.config.url.backToShopLinkDefault;}
1479var backToShop=$('<li><a href="'+shopLink+'"\n'+'class="backToShop visible-xs visible-sm">\n'+
1480HB.translations.account.linkMobilShop+' <i class="icon-arrow-right"></i></a></li>');list.append(backToShop);}
1481mainNaviLinks.each(function(){listItem=$('<li></li>')
1482anchor=$(this).clone();anchor.removeClass("accordion-toggle list-group-item");if(anchor.hasClass("hasSubNodes")){anchor.append('<i class="icon-arrow-right"></i>');}
1483listItem.append(anchor);list.append(listItem);});mobileMainNav=list;HB.Header.bindToSubmenu(mobileMainNav);mobileMainNav.insertAfter(HB.Header.$naviWrapper.find('.full-table'));mobileMainNav.hide();mobileMainNav.slideDown("slow",function(){mobileMainNav.show();});$handle.addClass("active");}else{$("#mobile-main-nav").slideUp("slow",function(){$("#mobile-main-nav").remove();$handle.removeClass("active");});}});},bindToTouchMenu:function($nodes){$nodes.each(function(index,element){$(element).on('touchend',function(evt){if(!$(this).hasClass('active')){evt.preventDefault();
1483$nodes.removeClass('active');$(this).addClass('active');$('a.hasSubNodes',$(this)).focus();}});});$(document).on('touchend',function(evt){if(!$(evt.target).hasClass('hasSubNodes')){$('a.hasSubNodes').blur();$nodes.removeClass('active');HB.Header.setMaxHeightForScrollBarToMobileMenu();}});},bindToSubmenu:function($content){var $this;$content.on("click","a.hasSubNodes, a.lvlUpNodes",function(e){e.preventDefault();$this=$(this);if($this.hasClass("hasSubNodes")){$.ajax({url:$(this).data("mobile-children-url"),success:function(data){HB.Header.navbar[$this.data("code")]=$content.html();$content.html(data);}});}else if($this.hasClass("lvlUpNodes")){$content.html(HB.Header.navbar[$this.data("code")]);}
1484HB.Header.setMaxHeightForScrollBarToMobileMenu();});},bindToSearch:function($handle){$handle.on("click",function(e){e.preventDefault();HB.Header.defaultStateNavi();$("header .siteSearch").toggleClass("show");$handle.toggleClass("active");$('#search').focus();HB.AutoComplete.bindSearchAutocomplete();});},accountNaviLayout:function(){if(HB.Header.$accountNavi.length>0){$('.navi-wrapper').addClass('mobile-main-navi');HB.Header.$cartHandle.hide();HB.Header.$searchHandle.hide();HB.Header.$accountHandle.hide();}
1485$('.navi-wrapper').removeClass('hidden');},setMaxHeightForScrollBarToMobileMenu:function(){if($('#mobile-main-nav').length>0){$('#mobile-main-nav').css('max-height',($(window).height()-document.getElementById("js-menu-handle").getBoundingClientRect().bottom)+"px");}},defaultStateNavi:function(){$("#mobile-main-nav").slideUp("slow",function(){HB.Header.$menuHandle.removeClass('active');$("#mobile-main-nav").remove();});},defaultStateSearch:function(){$("header .siteSearch").slideUp("slow",function(){$("header .siteSearch").removeClass("show");HB.Header.$searchHandle.removeClass("active");});},addDiscountPriceMobile:function(){if(HB.Header.$discountPriceElement.length>0){HB.Header.$naviWrapper.append(HB.Header.$discountPriceElement.clone().addClass('miniCartDiscountClone'));}},addObserverForHeaderIsSticky:function(){const stickyElm=document.querySelector('header');if('IntersectionObserver'in window){if(stickyElm&&!HB.Utils.isUserAgentInternetExplorer()){const observer=new IntersectionObserver(([e])=>setTimeout(function(){e.target.closest('body')?.classList.toggle('isHeaderSticky',e.intersectionRatio<1);},200),{threshold:[1]},);observer.observe(stickyElm);}}},cloneContactLinkForMobileHeader:function($contactSlotElement){if($contactSlotElement.length&&$('#header-logo').length){if($contactSlotElement.find('a i').length){const $contactLink=$contactSlotElement.find('a i').eq(0).closest('a');if($contactLink.length){var $contactLinkClone=$contactLink.clone();$contactLinkClone.empty();$contactLinkClone.addClass('btn btn-default contact-clone visible-xs visible-sm');$contactLinkClone.append($contactLink.find('i').clone());$('#header-logo').before($('<td></td>').append($contactLinkClone));}}}},setCssTopForPositionSticky:function(){const $stickyElm=$('header');if($stickyElm.length){if(HB.ViewportChange.getViewport().name==='xs'){const topHeaderHeight=HB.Utils.getTopHeaderHeight();if(topHeaderHeight>0){$stickyElm.css('top',(-61-topHeaderHeight)+'px');}}else if(HB.ViewportChange.getViewport().name==='sm'){const topHeaderHeight=HB.Utils.getTopHeaderHeight();if(topHeaderHeight>0){$stickyElm.css('top',(0-topHeaderHeight-1)+'px');}}else{$stickyElm.css('top','');}}}};;HB.DirectOrder={m_response:null,m_productCount:0,$m_directOrderContainer:null,$m_directOrderForm:null,$m_boxProductContainer:null,$m_buttonAddToCart:null,$m_buttonClose:null,$m_inputSearchTerm:null,$messageContainer:$(".globalMessages .negative.directorder"),$messageContainerNeutral:$(".globalMessages .neutral.directorder"),$messageNeg:$(".negative.directorder .message"),$messageNeutral:$(".neutral.directorder .message"),m_suggestionCache:{},m_productCache:{},autoCompleteOptions:null,ProductData:function(_data){this.name=_data.name;this.producer=_data.producer;this.image=_data.image;this.code=_data.code;this.classifications=_data.classifications;this.price=_data.price;this.priceRaw=_data.priceRaw;this.unit=_data.unit;this.unitCode=_data.unitCode;this.contentUnit=_data.contentUnit;this.contentUnitCode=_data.contentUnitCode;this.conversion=_data.conversion;
1485this.quantity=(1/_data.conversion).toLocaleString();this.contentQuantity=_data.contentQuantity;this.available=_data.available;this.warehouseName=_data.warehouseName;this.productDimensions=_data.productDimensions;this.units=_data.units;this.timestamp=_data.timestamp;},init:function(){HB.DirectOrder.$m_directOrderContainer=$('#js-direct-order-container');HB.DirectOrder.$m_directOrderForm=$('#js-direct-order-form',HB.DirectOrder.$m_directOrderContainer);HB.DirectOrder.$m_boxProductContainer=$('#js-direct-order-product-container',HB.DirectOrder.$m_directOrderForm);HB.DirectOrder.$m_buttonAddToCart=$('#js-direct-order-add-to-cart',HB.DirectOrder.$m_directOrderForm);HB.DirectOrder.$m_buttonClose=$('#js-direct-order-close',HB.DirectOrder.$m_directOrderContainer);HB.DirectOrder.$m_inputSearchTerm=$('#js-direct-order-search-term',HB.DirectOrder.$m_directOrderForm);HB.DirectOrder.$messageContainer=$(".globalMessages .negative.directorder");HB.DirectOrder.$messageContainerNeutral=$(".globalMessages .neutral.directorder");HB.DirectOrder.$messageNeg=$(".negative.directorder .message");HB.DirectOrder.$messageNeutral=$(".neutral.directorder .message");HB.DirectOrder.autoCompleteOptions={minLength:HB.config.autocomplete.minLength,delay:HB.config.autocomplete.delay,appendTo:'#js-direct-order-search-container',source:HB.DirectOrder.onPrepareSearch,select:HB.DirectOrder.onSuggestionSelect,focus:false};if(typeof HB.DirectOrder.$m_inputSearchTerm.autocomplete(HB.DirectOrder.autoCompleteOptions).data("uiAutocomplete")!=="undefined"){HB.DirectOrder.$m_inputSearchTerm.autocomplete(HB.DirectOrder.autoCompleteOptions).data("uiAutocomplete")._renderItem=function(ul,item){var renderHtml="<div class='product clearfix'>";renderHtml+="<div class='thumb text-center col-xs-3 col-md-2'><img src='"+item.image+"'></div>";renderHtml+="<div class='desc col-xs-9 col-md-10 clearfix'>";renderHtml+="<div class='title bold'>"+item.name+"</div>";renderHtml+="<div class='productNumber'><span class='mrm'>"+HB.translations.directOrder.articelNumber+"</span>"+item.code+"</div>";return $("<li />").data("item.autocomplete",item).append(renderHtml).appendTo(ul);};}
1486$('a#directOrderIcon, .directOrderIcon').on("click",function(e){e.preventDefault();HB.DirectOrder.show();});HB.DirectOrder.$m_inputSearchTerm.on('keyup keypress',function(e){var code=e.keyCode||e.which;if(code==13){e.preventDefault();return false;}});},show:function(){HB.DirectOrder.$messageContainer.hide();HB.DirectOrder.$messageContainerNeutral.hide();HB.DirectOrder.$m_buttonClose.click(function(e){e.preventDefault();HB.DirectOrder.onCloseClick();});HB.DirectOrder.$m_buttonAddToCart.click(function(e){e.preventDefault();HB.DirectOrder.onAddToCartClick(e);});HB.Utils.displayModalPopup(HB.DirectOrder.$m_directOrderContainer,'modal-lg modal-directorder');HB.DirectOrder.$m_directOrderContainer.show();if(Object.keys(HB.DirectOrder.m_productCache).length===0){HB.DirectOrder.showStateWithoutProducts();}else{HB.DirectOrder.showStateWithProducts();}
1487if(typeof HB.DirectOrder.$m_inputSearchTerm.autocomplete(HB.DirectOrder.autoCompleteOptions).data("uiAutocomplete")!=="undefined"){HB.DirectOrder.$m_inputSearchTerm.autocomplete(HB.DirectOrder.autoCompleteOptions).data("uiAutocomplete")._renderItem=function(ul,item){var renderHtml="<div class='product clearfix'>";renderHtml+="<div class='thumb text-center col-xs-3 col-md-2'><img src='"+item.image+"'></div>";renderHtml+="<div class='desc col-xs-9 col-md-10 clearfix'>";renderHtml+="<div class='title bold'>"+item.name+"</div>";renderHtml+="<div class='productNumber'><span class='mrm'>"+HB.translations.directOrder.articelNumber+"</span>"+item.code+"</div>";return $("<li />").data("item.autocomplete",item).append(renderHtml).appendTo(ul);};}},onPrepareSearch:function(_request,_response){HB.DirectOrder.m_response=_response;var term=_request.term.toLowerCase();if(term in HB.DirectOrder.m_suggestionCache){if(HB.DirectOrder.m_suggestionCache[term].length==1){HB.DirectOrder.onSuggestionSelect(null,HB.DirectOrder.m_suggestionCache[term][0]);}
1488return HB.DirectOrder.m_response(HB.DirectOrder.m_suggestionCache[term]);}
1489term=_request.term.charAt(0).toUpperCase()+_request.term.slice(1);$.ajax({type:'POST',url:HB.config.url.directOrder.search,data:{term:term},success:HB.DirectOrder.onProcessSearchResult,dataType:'json'});},onProcessSearchResult:function(_response){var term=_response.meta.term.toLowerCase();HB.DirectOrder.$messageContainer.hide();HB.DirectOrder.$messageContainerNeutral.hide();if(_response.success===false||_response.suggestions===null){if(_response.meta.error!=null&&_response.meta.error!=''){HB.DirectOrder.$messageContainer.show();}
1490return HB.DirectOrder.m_response([]);}
1491var suggestions=[];for(var count=0;count<_response.suggestions.length;count++){if(_response.suggestions[count].images===null){var image=HB.config.missingImg60x45;}else{var image=_response.suggestions[count].images[0].url;}
1492suggestions.push({value:_response.suggestions[count].producer+' '+_response.suggestions[count].name,producer:_response.suggestions[count].producer,name:_response.suggestions[count].name,image:image,code:_response.suggestions[count].
1492code});}
1493HB.DirectOrder.m_suggestionCache[term]=suggestions;return HB.DirectOrder.m_response(suggestions);},onSuggestionSelect:function(_event,_item){if(_item.item!=null){if(_item.item.code in HB.DirectOrder.m_productCache){HB.DirectOrder.showStateWithProducts();}else{$.ajax({type:'POST',url:HB.config.url.directOrder.details,data:{code:_item.item.code},success:HB.DirectOrder.onProcessDetailsResult,dataType:'json'});}}
1494HB.DirectOrder.$m_inputSearchTerm.val('');return false;},onProcessDetailsResult:function(_response){if(_response.success===false||_response.product===null){if(_response.meta.error!=null&&_response.meta.error!=''){HB.DirectOrder.$messageContainer.show();}
1495return;}
1496var product=new HB.DirectOrder.ProductData(_response.product);HB.DirectOrder.m_productCache[product.code]=product;HB.DirectOrder.showStateWithProducts();},onProcessDetailsResultForReplaceProduct:function(_response,_code,_timestamp){if(_response.success===false||_response.product===null){if(_response.meta.error!=null&&_response.meta.error!=''){HB.DirectOrder.$messageContainer.show();}
1497return;}
1498var product=new HB.DirectOrder.ProductData(_response.product);product.timestamp=_timestamp;HB.DirectOrder.m_productCache[product.code]=product;if(_code in HB.DirectOrder.m_productCache){delete HB.DirectOrder.m_productCache[_code];$('#js-product-tile-'+_code,HB.DirectOrder.m_boxProductContainer).remove();}
1499HB.DirectOrder.showStateWithProducts();},onQuantityChange:function(_event,_code){var quantity=$('#js-direct-order-quantity-'+_code,HB.DirectOrder.$m_boxProductContainer);quantity.attr('disabled','disabled');var value=quantity.val();if(value>HB.DirectOrder.m_productCache[_code].quantity){value=HB.Core.increaseQuantity(value,HB.DirectOrder.m_productCache[_code].conversion);}else{value=HB.Core.decreaseQuantity(value,HB.DirectOrder.m_productCache[_code].conversion);}
1500value=value.toLocaleString();quantity.attr('value',value);HB.DirectOrder.m_productCache[_code].quantity=value;quantity.removeAttr('disabled');},productMasterDropdown:function(_event,_code,_timestamp,_url){_event.preventDefault();HB.DirectOrder.$messageContainer.hide();HB.DirectOrder.$messageContainerNeutral.hide();if(_url!==null&&_url!==undefined&&_url!==""){var productCodeFromUrl="";if(_url.includes('notAvailable')){productCodeFromUrl=_url.substr(_url.indexOf("Available/")+10);productCodeFromUrl=productCodeFromUrl.substr(0,productCodeFromUrl.indexOf('?given'));}else if(_url.includes('/p/')){productCodeFromUrl=_url.substr(_url.indexOf("/p/")+3);productCodeFromUrl=decodeURI(productCodeFromUrl);}
1501if(productCodeFromUrl!==""){if(productCodeFromUrl in HB.DirectOrder.m_productCache&&_code in HB.DirectOrder.m_productCache){HB.DirectOrder.m_productCache[productCodeFromUrl].timestamp=HB.DirectOrder.m_productCache[_code].timestamp;delete HB.DirectOrder.m_productCache[_code];$('#js-product-tile-'+_code,HB.DirectOrder.m_boxProductContainer).remove();HB.DirectOrder.showStateWithProducts();HB.DirectOrder.$messageContainerNeutral.show();}else{$.ajax({type:'POST',url:HB.config.url.directOrder.details,data:{code:productCodeFromUrl},success:function(_result){HB.DirectOrder.onProcessDetailsResultForReplaceProduct(_result,_code,_timestamp);},dataType:'json'});}}}},onAddToCartClick:function(_event){_event.preventDefault();HB.DirectOrder.$m_directOrderForm.attr('action',HB.config.url.directOrder.add);HB.DirectOrder.$m_directOrderForm.submit();},onRemoveClick:function(_event,_code){if(_code in HB.DirectOrder.m_productCache){delete HB.DirectOrder.m_productCache[_code];$('#js-product-tile-'+_code,HB.DirectOrder.m_boxProductContainer).remove();}
1502if(Object.keys(HB.DirectOrder.m_productCache).length===0){HB.DirectOrder.showStateWithoutProducts();}else{HB.DirectOrder.showStateWithProducts();}},onCloseClick:function(_event){HB.DirectOrder.$m_directOrderContainer.hide();HB.Utils.hideModalPopup();},showStateWithoutProducts:function(){HB.DirectOrder.$m_boxProductContainer.empty();HB.DirectOrder.$m_boxProductContainer.hide();HB.DirectOrder.$m_buttonAddToCart.attr('disabled','disabled');}
1502,showStateWithProducts:function(){for(let productCode in HB.DirectOrder.m_productCache){let $unitInput=$('#unitInput-'+productCode,HB.DirectOrder.$m_boxProductContainer);if($unitInput.length){HB.DirectOrder.m_productCache[productCode].unitCode=$unitInput.val();}}
1503HB.DirectOrder.$m_boxProductContainer.empty();HB.DirectOrder.$m_boxProductContainer.show();var arrayKeyWithTimestamp={};for(var key in HB.DirectOrder.m_productCache){arrayKeyWithTimestamp[HB.DirectOrder.m_productCache[key].timestamp]=HB.DirectOrder.m_productCache[key];}
1504var keys=Object.keys(arrayKeyWithTimestamp);keys.sort(function(a,b){return b-a;});for(var i=0;i<keys.length;i++){var product=arrayKeyWithTimestamp[keys[i]];HB.DirectOrder.$m_boxProductContainer.append(HB.DirectOrder.createHtmlForProduct(product));}
1505HB.DirectOrder.$m_buttonAddToCart.removeAttr('disabled');},createHtmlForProduct:function(_product){var $image=$('<div class="direct-order-product-image-container col-xs-4 col-sm-3"></div>').append('<img src="'+_product.image+'" />');var $content=$('<div class="direct-order-product-content-container col-xs-8 col-sm-4"></div>').append('<p><h3>'+_product.producer+' '+_product.name
1506+'</h3></p>').append('<span>'+HB.config.messages.code+' '
1507+_product.code+'</span>');var $ul=$('<ul></ul>');for(var count=0;count<_product.classifications.length;count++){var featureString='<li>';featureString=featureString+_product.classifications[count].name+': &nbsp; ';for(var fcount=0;fcount<_product.classifications[count].featureValues.length;fcount++){featureString=featureString+_product.classifications[count].featureValues[fcount].value;if(_product.classifications[count].range){if(count<_product.classifications[count].featureValues[fcount].length-1){featureString=featureString+"-";}else{if(_product.classifications[count].featureUnit){featureString=featureString+_product.classifications[count].featureUnit.symbol;}}}else{if(_product.classifications[count].featureUnit){featureString=featureString+_product.classifications[count].featureUnit.symbol;}
1508if(count<_product.classifications[count].featureValues[fcount].length-1){featureString=featureString+'<br/>';}}}
1509featureString=featureString+'</li>';$ul.append(featureString);}
1510var $classifications=$('<div class="direct-order-product-classifications-container col-xs-8 col-xs-offset-4 col-sm-5"></div>').append($ul);var $pricing=$('<div class="direct-order-product-pricing-container col-xs-10 col-sm-10"></div>');if(HB.config.showPrice){if(_product.price){if(_product.priceRaw>0){var $price=_product.price;$pricing.append('<p>'+HB.translations.directOrder.singleprice
1511+'<br/>'
1512+$price
1513+"/"
1514+_product.unit
1515+'</p>');if(_product.strikePrice){$pricing.append('<p class="strikePrice">'
1516+_product.strikePrice
1517+"/"
1518+_product.unit
1519+'</p>')}}else{$pricing.append('<p>'+HB.translations.directOrder.singleprice
1520+'<br/>'
1521+HB.translations.price.zeroprice
1522+'</p>');}}else{$pricing.append('<span>'+HB.translations.directOrder.anonymous
1523+'</span><br/>');}}
1524var $dimensionAndAmount=$('<div class="direct-order-product-dimension-container col-xs-12"></div>');if(_product.productDimensions){var $dimensionWrapper=$('<div id="productMaster-'+_product.code+'" class="productMaster mbm"></div>').on("change","select",function(_event){var _url=$(this).val();HB.DirectOrder.productMasterDropdown(_event,_product.code,_product.timestamp,_url)});if(_product.productDimensions.features.length>0){_product.productDimensions.features.forEach(function(feature){var $dimensionRow=$('<div class="productDimensions row"></div>').append('<div class="col-xs-12 prm"><label for="productMaster">'+feature+'</label></div>');var $dimensionDropdown=$('<div  class="col-xs-12"></div>');var $dimSelectWrapper=$('<div class="select-wrapper"></div>');var $dimDropdownFake=$('<div class="dropdown-fake"><i class="icon-arrow-down"></i></div>');var $dimensionSelect=$('<select id="selectProductMaster-'+_product.code+'"></select>');_product.productDimensions.dimensions[feature].forEach(function(dimension){var dimensionUrl=dimension.url;var selectFragment="";if(dimension.selected){selectFragment=selectFragment+' selected class="dimensionSelected"';}else{if(!dimension.available){selectFragment=selectFragment+' class="not-available"';}}
1525var $dimForEachOption=$('<option value="'+dimensionUrl+'" '+selectFragment+'>'+dimension.name+'</option>');$dimensionSelect.append($dimForEachOption);})
1526$dimensionWrapper.append($dimensionRow.append($dimensionDropdown.append($dimSelectWrapper.append($dimDropdownFake,$dimensionSelect))));});}
1527$dimensionAndAmount.append($dimensionWrapper);}
1528var $unitCol=$('<div class="col-xs-9 unitCol"></div>');if(_product.units.length>1){var $unitSelect=$('<select name="products['+HB.DirectOrder.m_productC
1528ount+'].unit" id="unitInput-'+_product.code+'" class="unitInput"></select>')
1529_product.units.forEach(function(unitData){var selectedAttribut="";if(_product.unitCode===unitData.code){selectedAttribut=selectedAttribut+'selected="selected" ';}
1530var optionHTML="";if(unitData.name!==""||unitData.name!==null){optionHTML=optionHTML+unitData.name+'</option>';}else{optionHTML=optionHTML+unitData.symbol+'</option>';}
1531$unitSelect.append('<option value="'+unitData.code+'" '+selectedAttribut+'>'+optionHTML);});var $unitsHTML=$('<div class="select-wrapper">'
1532+'<div class="dropdown-fake"><i class="icon-arrow-down"></i></div></div>').append($unitSelect);}else{$unitsHTML=$('<span class="mls">'+_product.contentUnit+'</span>');}
1533$unitCol.append($unitsHTML);var $number=$('<input id="js-direct-order-quantity-'+_product.code
1534+'" type="text" name="products['+HB.DirectOrder.m_productCount
1535+'].quantity" value="'+_product.quantity+'" class="direct-order-quantity"/>').change(function(_event){HB.DirectOrder.onQuantityChange(_event,_product.code);});var $qtyInputCol=$('<div class="col-xs-3 qtyInputCol"></div>').append($number).append('<input type="hidden" name="products['+HB.DirectOrder.m_productC
1535ount
1536+'].code" value="'+_product.code+'"/>');var $qtyInputWrapperRow=$('<div id="qtyInputWrapper_'+_product.code+'" class="qtyInput row"><div class="col-xs-12">'
1537+'<label for="qtyInput">'+HB.translations.directOrder.amount+'</label></div></div>').append($qtyInputCol);$qtyInputWrapperRow.append($unitCol);$dimensionAndAmount.append($qtyInputWrapperRow);var $stockRow=$('<div class="stocklevel-container row"> </div>');if(_product.available=='inStock'){var stockClass="positive";var stockText=HB.translations.directOrder.inStock;}
1538else{var stockClass="negative";var stockText=HB.translations.directOrder.mustBeOrdered;}
1539if(_product.warehouseName){HB.DirectOrder.createStockInfo($stockRow,stockClass,stockText,_product.warehouseName);}
1540var $closeSM=$('<button type="button" class="close remove hidden-xs"><i class="icon-bin"></i></button>').click(function(_event){HB.DirectOrder.onRemoveClick(_event,_product.code);});var $closeXS=$('<button type="button" class="close remove hidden-sm hidden-md hidden-lg"><i class="icon-bin"></i></button>').click(function(_event){HB.DirectOrder.onRemoveClick(_event,_product.code);});var $controls=$('<div class="direct-order-product-controls-container col-xs-2 col-sm-2"></div>').append($closeSM);var $priceCloseRow=$('<div class="row price-close"></div>').append($pricing,$controls,$dimensionAndAmount);var $priceCloseCol=$('<div class="col-xs-12 col-sm-4"></div>').append($priceCloseRow);var $detailsRow=$('<div class="row"></div>').append($image,$content,$classifications);$stockRow.append($closeXS);var $detailsCol=$('<div class="direct-order-details col-sm-8"></div>').append($detailsRow,$stockRow);var $container=$('<div id="js-product-tile-'+_product.code
1541+'" class="direct-order-product-tile row"></div>').append($detailsCol,$priceCloseCol);
1541HB.DirectOrder.m_productCount++;return $container[0];},createStockInfo:function(_stockRow,_stockClass,_stockText,_warehouseName){_stockRow.append('<div class="'
1542+_stockClass
1543+' stock-message col-xs-10 col-sm-6 col-sm-push-3">'
1544+'<strong>'
1545+_stockText
1546+'&nbsp;'
1547+HB.translations.directOrder.location
1548+'&nbsp;'
1549+_warehouseName
1550+'</strong></div>');}};;HB.NavigationBar={init:function(){var topNav=document.getElementById("nav-main");var jtopNav=$(topNav);var navNodes=jtopNav.find("ul li .La");for(var i=0;i<navNodes.length;i++){var jnavNode=$(navNodes[i]);var navMenu=jnavNode.find(".navigation-menu");for(var f=0;f<navMenu.length;f++){if(navMenu[f]!==null&&navMenu[f]!==undefined){var componentWidth=navNodes[i].getAttribute("data-column-width");var offset="0px";if(componentWidth!==null&&componentWidth!==undefined&&componentWidth!=="100"){var parentOffset=$(navNodes[i]).offset().left-jtopNav.offset().left;var componentPixelWidth=(componentWidth/100)*topNav.offsetWidth;var overflowWidth=(topNav.offsetWidth-(parentOffset+componentPixelWidth))
1551if(overflowWidth<0){navMenu[f].style.right="0%";navMenu[f].style.left="";}else{var offset=parentOffset+"px";navMenu[f].style.left=offset;navMenu[f].style.right="";}}else{navMenu[f].style.left="0%";navMenu[f].style.right="";}}}}}};HB.SlickSlider={debug:0,slidersInitialized:false,init:function(){var $sssi=$('.slick-slider-single-image');var sssiOptions={slidesToShow:1,slidesToScroll:1,arrows:true,prevArrow:'<button id="'+$sssi.data('uid')+'-prev" type="button" class="slick-prev" aria-label='+HB.translations.general.prevButtonLabel+'></button>',nextArrow:'<button id="'+$sssi.data('uid')+'-next" type="button" class="slick-next" aria-label='+HB.translations.general.nextButtonLabel+'></button>',fade:false,dots:HB.SlickSlider.hasNavigation('.slick-slider-single-image'),autoplay:HB.SlickSlider.isAutomaticSlider('.slick-slider-single-image'),autoplaySpeed:5000,adaptiveHeight:false,swipe:true,lazyLoad:'progressive',accessibility:true};HB.SlickSlider.setResponsiveDataLazy($sssi);$sssi.slick(sssiOptions);HB.SlickSlider.applyResponsiveSrc($sssi);HB.SlickSlider.setHeightBasedOnFirstImageSize($sssi);$(window).on('viewport-changed',()=>{$sssi.slick('unslick');HB.SlickSlider.setResponsiveDataLazy($sssi);$sssi.slick(sssiOptions);HB.SlickSlider.applyResponsiveSrc($sssi);HB.SlickSlider.setHeightBasedOnFirstImageSize($sssi);HB.SlickSlider.handleSliders();});$sssi.each(function(){HB.SlickSlider.displayComponent($(this));});var $ssfi=$('.slick-slider-four-images');$ssfi.slick({slidesToShow:5,slidesToScroll:1,arrows:true,prevArrow:'<button id="'+$ssfi.data('uid')+'-prev" type="button" class="slick-prev" aria-label='+HB.translations.general.prevButtonLabel+'></button>',nextArrow:'<button id="'+$ssfi.data('uid')+'-next" type="button" class="slick-next" aria-label='+HB.translations.general.nextButtonLabel+'></button>',fade:false,autoplay:HB.SlickSlider.isAutomaticSlider('.slick-slider-four-images'),autoplaySpeed:4000,swipe:true,adaptiveHeight:true,lazyLoad:'progressive',responsive:[{breakpoint:970,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:1200,settings:{slidesToShow:4,slidesToScroll:1}}]});$ssfi.each(function(){HB.SlickSlider.displayComponent($(this));});HB.SlickSlider.reinitializeTheSetFontSizeFunction($ssfi);var $ssns=$('.slick-slider-navigated-single');$ssns.on('init',function(event,slick){$(this).removeClass('hidden');$('.product-image-note-col').removeClass('hidden');});$ssns.slick({slidesToShow:1,slidesToScroll:1,arrows:true,prevArrow:'<button id="'+$ssns.data('uid')+'-prev" type="button" class="slick-prev hidden-lg" aria-label="<spring:theme code=\'arialabel.button.prevSlide\'/>"></button>',nextArrow:'<button id="'+$ssns.data('uid')+'-next" type="button" class="slick-next hidden-lg" aria-label="<spring:theme code=\'arialabel.button.nextSlide\'/>"></button>',fade:false,swipe:true,adaptiveHeight:true,dots:HB.ViewportChange._viewport.index==0,asNavFor:'.slick-slider-nav-slider',lazyLoad:'progressive'});$ssns.css("visibility","visible");var $ssnavigator=$('.slick-slider-nav-slider');$ssnavigator.slick({slidesToShow:3,slidesToScroll:1,arrows:true,prevArrow:'<button id="'+$ssnavigator.data('uid')+'-prev" type="button" class="slick-prev" aria-label='+HB.translations.general.prevButtonLabel+'></button>',nextArrow:'<button id="'+$ssnavigator.data('uid')+'-next" type="button" class="slick-next" aria-label='+HB.translations.general.nextButtonLabel+'></button>',focusOnSelect:false,draggable:false,lazyLoad:'progressive'});HB.SlickSlider.productNavSliderAdditionalInit();HB.SlickSlider.clickListenerForNavigationSlider();$ssnavigator.css("visibility","visible");HB.SlickSlider.slidersInitialized=true;HB.SlickSlider.fixSliderAccessibility();$('.slick-slider').on('afterChange',function(){HB.SlickSlider.fixSliderAccessibility();});HB.SlickSlider.waitForImageInit($sssi);HB.SlickSlider.handleSliders();}
1551,fixSliderAccessibility:function(){$('.slick-slider').each(function(){$(this).find('.slick-slide.slick-current[aria-hidden="true"]').each(function(){$(this).attr('tabindex','-1');$(this).find('a, button, input, select, textarea, [tabindex]').attr('tabindex','-1');});});},displayComponent:function($slider){HB.SlickSlider.debug>0?console.log("Starting displayComponent for slider"):null;HB.SlickSlider.debug>0?console.log($slider):null;if(!$slider||!$slider.length){HB.SlickSlider.debug>0?console.warn('Invalid slider. Skipping'):null;return;}
1552const $track=$slider.find('.slick-track');if(!$track.length||$track.children().length===0){HB.SlickSlider.debug>0?console.log("Slick-track is empty => hide slider"):null;$slider.addClass('hidden');return;}
1553HB.SlickSlider.debug>0?console.log("Slider is not empty. Proceeding"):null;const hasLoadedChildren=$slider.find('.simple_disp-img.loaded, .arrowbanner.loaded, .img-responsive, .html-snippet').length>0;if(hasLoadedChildren){HB.SlickSlider.debug>0?console.log("At least one child is already loaded, show the slider"):null;$slider.addClass('loaded');}else{HB.SlickSlider.debug>0?console.log("Loaded class not available in child elements. Adding observer"):null;const observer=new MutationObserver(function(mutations){for(const mutation of mutations){if(mutation.type==='attributes'&&mutation.attributeName==='class'){if($(mutation.target).hasClass('loaded')||$(mutation.target).hasClass('img-responsive')||$(mutation.target).hasClass('html-snippet')){HB.SlickSlider.debug>0?console.log("Loaded class found in child element. Disconnecting observer"):null;$slider.addClass('loaded');HB.SlickSlider.debug>0?console.log($slider):null;observer.disconnect();break;}}}});observer.observe($slider[0],{subtree:true,attributes:true,attributeFilter:['class']});}},handleSliders(){if($('#content').find('.slick-slider').length>0){$('.slick-slider').each(function(){$(this).slick('slickPause');if($(this).data('automatic-slide')){$(this).slick('slickPlay');if($(this).find('.slick-pause-button').length===0){if($(this).find('.slick-track').children().length>0&&$(this)[0].getAttribute('data-show-navigation')==='true'){HB.SlickSlider.createPauseButton($(this));}else{$(this).find('.slick-dots').hide();}}}});}},createPauseButton(element){let $pauseButton=$('<button type="button" class="slick-pause-button" aria-label="Pause slideshow">&#10074;&#10074; Pause</button>');let $dotsContainer=element.find('.slick-dots');if($dotsContainer.length>0){let $pauseLi=$('<li class="slick-control-button" role="presentation" aria-hidden="true"></li>').append($pauseButton);$dotsContainer.append($pauseLi);$pauseLi.on('click',function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();});}else{let $siblingWrapper=element.next('.slick-pause-control-wrapper');if($siblingWrapper.length===0){$siblingWrapper=$('<div class="slick-pause-control-wrapper"></div>');element.after($siblingWrapper);}}
1554$pauseButton.on('click',function(){var $slider=element;if(!$(this).hasClass('paused')){$slider.slick('slickPause');$(this).addClass('paused');$(this).attr('aria-label','Play slideshow');}else{$slider.slick('slickPlay');$(this).removeClass('paused');$(this).attr('aria-label','Pause slideshow');}});},createPlayButton(element){let playHtml="<span class='slick-play-button btn'>&#9654; Play</span>";if(element.find('.slick-dots').length>0){if(element.find('.slick-dots .slick-pause-button').length>0){element.find('li .slick-pause-button').parent().replaceWith('<li>'+playHtml+'</li>');}else if(element.find('.slick-pause-button').length===0){element.find('.slick-dots').append('<li class="slick-control-button">'+playHtml+'</li>');}}},waitForImageInit:function(slider){const img=slider.find('.slick-current .main-product-image');img.on('load',function(){HB.SlickSlider.initializeZoom();$('.slick-list.draggable').css('height','auto');});},productNavSliderAdditionalInit:function(){var $ssns=$('.slick-slider-navigated-single');var $ssnavigator=$('.slick-slider-nav-slider');if($ssnavigator.find('.slick-slide').length&&$ssnavigator.find('.slick-slide').length<=3){$ssnavigator.find('.slick-track').addClass('disable-slide');}
1555if($ssns[0]&&$ssnavigator[0]){var currentSlideNum=$ssns.slick('slickCurrentSlide');HB.SlickSlider.setFirstSlideBorder(currentSlideNum);}
1556$ssns.on('beforeChange',function(event,slick,currentSlide,nextSlide){if($ssnavigator[0]){HB.SlickSlider.setFirstSlideBorder(nextSlide);$ssnavigator.slick('slickGoTo',nextSlide,true);}});},isAutomaticSlider:function(sliderClass){var autoPlayBool=false;if($(sliderClass)&&$(sliderClass)[0]&&$(sliderClass)[0].getAttribute('data-automatic-slide')=='true'){autoPlayBool=true;}
1557return autoPlayBool;}
1557,hasNavigation:function(sliderClass){var hasNaviBool=false;if($(sliderClass)&&$(sliderClass)[0]&&$(sliderClass)[0].getAttribute('data-show-navigation')=='true'){hasNaviBool=true;}
1558return hasNaviBool;},clickListenerForNavigationSlider:function(){var $navSlider=$('.slick-slider-nav-slider');if($navSlider[0]&&$navSlider.slick('getSlick')){var navImages=$navSlider.slick('getSlick').$slides;for(var i=0;i<navImages.length;i++){if(navImages[i]){$(navImages[i]).click(function(){var nextSlideNum=this.getAttribute("data-slick-index");HB.SlickSlider.setFirstSlideBorder(nextSlideNum);});}}}
1559if($('.slick-slider-navigated-single')&&$navSlider[0]){$navSlider.find('a').bind('click',function(e){e.preventDefault();var nextSlideNum=this.getAttribute("data-slick-index");HB.SlickSlider.setMainProductSliderImage(nextSlideNum);});}},setMainProductSliderImage:function(nextSlideNum){var $ssns=$('.slick-slider-navigated-single');$('.zoomContainer').removeClass('hidden');if($ssns&&$ssns.slick('getSlick')&&$ssns.slick('getSlick').$slides&&!isNaN(nextSlideNum)){var sliderSlick=$ssns.slick('getSlick');if(sliderSlick.$slides.length<nextSlideNum){nextSlideNum=nextSlideNum-sliderSlick.$slides.length;}
1560$ssns.slick('slickGoTo',nextSlideNum,true);}
1561HB.SlickSlider.initializeZoom();},setFirstSlideBorder:function(nextSlideNum){var $ssns=$('.slick-slider-nav-slider');if($ssns&&$ssns.slick('getSlick')&&!isNaN(nextSlideNum)){var navElements=$('.slick-slider-nav-slider a');for(var i=0;i<navElements.length;i++){if(navElements[i]){jQuery(navElements[i]).removeClass('first-slide');}}
1562var newCurrentSlide=$ssns.slick('getSlick').$slides[nextSlideNum];jQuery(newCurrentSlide).addClass('first-slide');var overStandingImageNum=$ssns.slick('getSlick').$slides.length+nextSlideNum;if(navElements.length>overStandingImageNum){for(var index=0;index<navElements.length;index++){if(navElements[index]&&navElements[index].getAttribute("data-slick-index")==overStandingImageNum){jQuery(navElements[index]).addClass('first-slide');}}}}},initializeZoom:function(){$(".zoomContainer").remove();const $zoomer=$("#product-main-slider .slick-current").find(".main-product-image");if($zoomer.length>0){$("ul.js-hooks,ul.js-certificates").removeClass("hidden");if(!$zoomer.hasClass("js-missing-image")){$zoomer.elevateZoom({zoomWindowFadeIn:300,zoomWindowFadeOut:300,lensFadeIn:300,lensFadeOut:300,zoomWindowHeight:HB.SlickSlider.getHeightForZoom(),zoomWindowWidth:HB.SlickSlider.getWidthForZoom(),zoomWindowPosition:1,zoomWindowOffetx:40,zoomWindowOffety:0,borderSize:1,responsive:true,lensOpacity:0.35,lensBorder:1,borderColour:'#e2E3E4',cursor:'pointer'});}}
1563else{$("ul.js-hooks,ul.js-certificates").addClass("hidden");}
1564if(HB.ViewportChange._viewport.name==='xs'||HB.ViewportChange._viewport.name==='sm'||HB.ViewportChange._viewport.name==='md'){setTimeout(function(){$(".main-product-image").unbind();},2000);}
1565setTimeout(function(){$('.zoomLens').on('click',function(){$('.main-img-container.slick-slide.slick-active .main-product-image-zoom').trigger('click');});},1000);},getHeightForZoom:function(){return $(".slick-active").find(".main-product-image").outerHeight();},getWidthForZoom:function(){return $(".slick-active").find(".main-product-image").outerWidth();},executeProductPageViewPortChange:function(){if(HB.SlickSlider.slidersInitialized){$('.slick-slider-navigated-single').slick('slickSetOption','dots',HB.ViewportChange._viewport.name.toUpperCase()!='SM',true);}},debugSlickSlider:function(pdss){var $ssns=$('.slick-slider-navigated-single'),$ssnavigator=$('.slick-slider-nav-slider'),$ssnsImg=$ssns.find("img"),flag=false;$.each($ssnsImg,function(index,value){if($(value).height()===0){console.log("ERROR in",value);flag=true;}});if(flag){$ssns.slick('unslick');$ssns.remove();$ssnavigator.slick('unslick');$ssnavigator.remove();$ssns.slick({slidesToShow:1,slidesToScroll:1,arrows:true,prevArrow:'<button id="'+$ssns.data('uid')+'-prev" type="button" class="slick-prev" aria-label='+HB.translations.general.prevButtonLabel+'></button>',nextArrow:'<button id="'+$ssns.data('uid')+'-next" type="button" class="slick-next" aria-label='+HB.translations.general.nextButtonLabel+'></button>',fade:false,swipe:true,dots:HB.ViewportChange._viewport.index==0,asNavFor:'.slick-slider-nav-slider'});$ssns.css("visibility","visible");$ssnavigator.slick({slidesToShow:3,slidesToScroll:1,arrows:true,prevArrow:'<button id="'+$ssnavigator.data('uid')+'-prev" type="button" class="slick-prev" aria-label='+HB.translations.general.prevButtonLabel+'></button>',nextArrow:'<button id="'+$ssnavigator.data('uid')+'-next" type="button" class="slick-next" aria-label='+HB.translations.general.nextButtonLabel+'></button>',focusOnSelect:false,draggable:false});HB.SlickSlider.productNavSliderAdditionalInit();HB.SlickSlider.initializeZoom();HB.SlickSlider.clickListenerForNavigationSlider();$ssnavigator.css("visibility","visible");flag=false;}},reinitializeTheSetFontSizeFunction:function(element){if(typeof element==='undefined'||element==null){HB.Utils.setFontSizeInComponents(element);}},setResponsiveDataLazy:function($slider){if(typeof HB==='undefined'||typeof HB.ViewportChange==='undefined'||!HB.ViewportChange._viewport){return;}
1566var viewportName=HB.ViewportChange._viewport.name;$slider.find('img.componentImageContainer[data-url]').each(function(){var $img=$(this);if($img.attr('src')){return;}
1567var urlJSON=$img.data('url');if(typeof urlJSON==='object'&&typeof urlJSON[viewportName]!=='undefined'){$img.attr('data-lazy',urlJSON[viewportName]);}});},applyResponsiveSrc:function($slider){$slider.on('lazyLoaded',function(event,slick,image){HB.SlickSlider.setResponsiveSrcForImage(image);});$slider.find('img.componentImageContainer[src]').each(function(){HB.SlickSlider.setResponsiveSrcForImage($(this));});},setResponsiveSrcForImage:function(image){var urlJSON=image.data('url');if(typeof urlJSON!=='object'){return;}
1568var viewportClass=null;var $yCmsComponent=image.closest('.yCmsComponent');if($yCmsComponent.length>0&&$yCmsComponent.is('.xs, .sm, .md, .lg')){$yCmsComponent.attr('class').split(' ').forEach(function(cls){if(['xs','sm','md','lg'].indexOf(cls)!==-1){viewportClass=cls;}});}
1569if(!viewportClass&&typeof HB!=='undefined'&&typeof HB.ViewportChange!=='undefined'){viewportClass=HB.ViewportChange._viewport.name;}
1570if(viewportClass&&typeof urlJSON[viewportClass]!=='undefined'){image.attr('src',urlJSON[viewportClass]);}},setHeightBasedOnFirstImageSize:function($slider){$slider.each((index)=>{var $firstImage=$($slider[index]).find('.slick-track img').first();$firstImage.on('load',()=>{HB.SlickSlider.debug>0?console.log(`Determined height of ${$firstImage.height()} for first image:`,$firstImage):null;var renderedHeight=$firstImage.height();$($slider[index]).find('.slick-track').css('height',renderedHeight>0?renderedHeight+'px':'auto');$($slider[index]).addClass('height-set');})});}};;HB.SimpleBannerComponent={debug:0,init:function(){HB.SimpleBannerComponent.debug>0&&console.log('Processing simple banners...');$(".simple_disp-img").each(function(){const banner=$(this);HB.SimpleBannerComponent.debug>0&&console.log('Processing simple banner:',banner);const img=banner.find('img');if(img.length){if(img[0].complete){HB.SimpleBannerComponent.debug>0&&console.log('Image already loaded, displaying banner');banner.addClass('loaded');}else{HB.SimpleBannerComponent.debug>0&&console.log('Setting up load event for image');img.on('load',function(){HB.SimpleBannerComponent.debug>0&&console.log('Image loaded, displaying banner');banner.addClass('loaded');});}}else{HB.SimpleBannerComponent.debug>0&&console.log('No image found in banner, hiding banner');banner.addClass('hidden');}});}};HB.Product={debug:0,init:function(){HB.Product.bindImageSliderModalInit();HB.Product.initVideoThumbs();HB.Product.initVideoFrameHeight();HB.Product.bindVideoFrameHeight();HB.Product.productMasterDropdown();HB.Product.bindQuantityInput($('.productDetail'));},bindToAddToCartForm:function(){window.setTimeout(function(){var addToCartForm=$('.add-to-cart-form'),qtyInput
1570=$('#qtyInput'),qty=$('#qty'),unitInput=$('.unitInput'),unit=$('#unit');addToCartForm.ajaxForm({beforeSerialize:function($form,options){if(qtyInput){qty.val(qtyInput.val());}
1571if(unitInput){unit.val(unitInput.val());}},success:HB.Product.displayAddToCartPopup});addToCartForm.find(".addToCartButton").on("click",function(e){HB.Utils.displayModalPopupLoading('modal-md');});$('#addToCartButton').data("prevent-enabling-by-binding",false);HB.Product.debug?console.log("CHECKING addToCartButton on BINDING"):null;HB.Product.enableAddToCartButton();},500);},bindAddOptionalFollowUpProductToCartButton:function(){$('.addFollowToCartButton').each(function(idx){$(this).click(function(event){var $item=$(event.target).closest('.productListItem');var productCode=$item.data('productcode');var unit;if($item.find('.unitInput option').length){unit=$item.find('.unitInput option:selected').val();}else{unit=$item.find('.unitSingle').data('unit');}
1572var qty=$item.find('#qtyInput').val();if(productCode&&unit&&qty){$.ajax({url:HB.config.url.product.addOptionalFollowUp,method:"POST",dataType:"json",data:{code:productCode,quantity:qty,unitCode:unit},success:function(response){$item.closest('.modal-body').find('.globalMessages').html(response.addOptionalFollowProductToCart.message);if(response.addOptionalFollowProductToCart.success==='true'){HB.MiniCart.refreshMiniCartCount();}else{$item.addClass('success-error');setTimeout(function(){$item.removeClass('success-error');},1100);}},error:function(xhr,status,error){$item.closest('.modal-body').find('.globalMessages').html(response.addOptionalFollowProductToCart.message);}});}});});},displayAddToCartPopup:function(cartResult,statusText,xhr,formElement){HB.Utils.displayModalPopup(cartResult.addToCartPopup.content,'modal-md');HB.MiniCart.refreshMiniCartCount();HB.Product.bindAddOptionalFollowUpProductToCartButton();HB.Product.bindQuantityInput($('.modal-body .followUpProducts'));var productCode=$('[name=productCodePost]',formElement).val();var quantityField=$('[name=qty]',formElement).val();var quantity=1;if(quantityField!=undefined){quantity=quantityField;}
1573HB.track.trackAddToCart(productCode,quantity,cartResult.cartData);if($('#orderFormAddToCart').length>0){$('#addToCartBtn').attr('disabled','disabled');}
1574HB.Product.hideAddToCartPopup();},hideAddToCartPopup:function(){if(HB.config.isModalAddToCartAutoClose!=='false'){if($('.modal .followUpProducts.optional').length===0){var hasErrorMessages=$('.modal .globalMessages .alert:contains("Mindestbestellmenge")').length>0||$('.modal .globalMessages .alert:contains("Verpackungsgröße")').length>0;if(hasErrorMessages){HB.Utils.hideModalPopupWithDelay(8000);}else if($('.modal .followUpProducts.mandatory').length>0){HB.Utils.hideModalPopupWithDelay(4000);}else{HB.Utils.hideModalPopupWithDelay(3000);}}}},bindImageSliderModalInit:function(){$('.main-product-image-zoom').each(function(){$(this).bind('click',function(e){var viewport=HB.ViewportChange.getViewport();if(viewport.name!=='xs'){const slideIndex=$(this).parent().data("slick-index");HB.Product.showImageSliderModal(slideIndex);}});});},showImageSliderModal:function(slideIndex){$("#hbSliderModal").modal();$("#product-modal-slider").slick("slickGoTo",slideIndex);let modalSliderContainer=$('#product-modal-slider');modalSliderContainer.find('.slick-track').css('width','auto');modalSliderContainer.find('.main-img-container.slick-slide').css('width','auto');},productMasterDropdown:function(){$("#productMaster").on("change","select",function(){var url=$(this).val();if(url){window.location=url;}});},initVideoFrameHeight:function(){var $videoframes=$(".productVideoFrame");$videoframes.height($videoframes.width()*0.75);},bindVideoFrameHeight:function(){$(window).resize(function(){HB.Product.initVideoFrameHeight();});},initVideoThumbs:function(){$.each($('img[data-video-id]'),function(index,value){if($(value).data("video-url").toLowerCase().indexOf("vimeo")>-1){HB.Product.vimeoLoadingThumb($(value).data("video-id"));}});},vimeoLoadingThumb:function(id){var url="https://vimeo.com/api/v2/video/"+id+".json?callback=HB.Product.showThumb";var id_img="#video-"+id;var script=document.createElement('script');script.src=url;$(id_img).before(script);},showThumb:function(data){var id_img="#video-"+data[0].id;$(id_img).attr('src',data[0].thumbnail_medium);}
1574,bindQuantityInput:function(_context){_context.find('.js-increase-quantity').on('click',function(e){HB.Product.onQuantityClick(e,true);});_context.find('.js-decrease-quantity').on('click',function(e){HB.Product.onQuantityClick(e,false);});_context.find('.js-quantity-input').on('focusin',HB.Product.onQuantityFocus);_context.find('.js-quantity-input').on('focusout',HB.Product.onQuantityUnFocus);},onQuantityClick:function(e,isIncrease){e.preventDefault();var $quantityInput=$(e.target).closest('.productActionContainer').find('.js-quantity-input');var value=$quantityInput.val();if(isIncrease){$quantityInput.val(++value);}else{if(value>=1)$quantityInput.val(--value);}},onQuantityFocus:function(e){var $context=$(e.target).closest('.quantityContainer');$context.find('.js-increase-quantity').hide();$context.find('.js-decrease-quantity').hide();},onQuantityUnFocus:function(e){var $context=$(e.target).closest('.quantityContainer');$context.find('.js-increase-quantity').show();$context.find('.js-decrease-quantity').show();},enableAddToCartButton:function(){let $btn=$('#addToCartButton');HB.Product.debug?console.log("prevent-enabling-by-stocklevel = "+$btn.data("prevent-enabling-by-stocklevel")):null;HB.Product.debug?console.log("prevent-enabling-by-price = "+$btn.data("prevent-enabling-by-price")):null;HB.Product.debug?console.log("prevent-enabling-by-binding = "+$btn.data("prevent-enabling-by-binding")):null;if($btn.data("prevent-enabling-by-stocklevel")!==true&&$btn.data("prevent-enabling-by-price")!==true&&$btn.data("prevent-enabling-by-binding")!==true)
1575{$btn.removeAttr("disabled");$btn.removeAttr("aria-disabled");HB.Product.debug?console.log("ENABLED addToCartButton"):null;}}};HB.AccountLogin={loginPopUp:null,loginLinkId:'a#link-login',loginLink:null,logoutPopUp:null,logoutLinkId:'a#link-logout',logoutLink:null,init:function(){HB.AccountLogin.bindUserNameFormSubmit();HB.AccountLogin.bindShowPasswordAsPlainText();HB.AccountLogin.loginPopUp=$("#account-login-popup");$("#account-login-popup").detach();HB.AccountLogin.loginPopUp.removeClass("hidden");HB.AccountLogin.loginLinkId=$(HB.AccountLogin.loginLinkId);HB.AccountLogin.bindToLoginLink();HB.AccountLogin.logoutPopUp=$("#account-logout-popup");$("#account-logout-popup").detach();HB.AccountLogin.logoutPopUp.removeClass("hidden");HB.AccountLogin.logoutLinkId=$(HB.AccountLogin.logoutLinkId);HB.AccountLogin.bindToLogoutLink();HB.AccountLogin.showLoginPopupIfRequired();},bindToLoginLink:function(){HB.AccountLogin.loginLinkId.on("click",function(e){e.preventDefault();HB.AccountLogin.showLoginPopUp();});},showLoginPopUp:function(preventClose=false){HB.Utils.displayModalPopup(HB.AccountLogin.loginPopUp,'modal-xs',preventClose);if(!preventClose)HB.AccountLogin.bindLoginCloseButton();},showLogoutPopUp:function(){HB.Utils.displayModalPopup(HB.AccountLogin.logoutPopUp,'modal-md');HB.AccountLogin.bindLogoutCloseButton();HB.WishlistLayer.logout='logout';HB.WishlistLayer.bindToAddToWishlistLayerForm();},bindLoginCloseButton:function(){$("#js-account-login-close").click(function(e){e.preventDefault();HB.Utils.hideModalPopup();});},bindLogoutCloseButton:function(){$(".js-account-logout-close").click(function(e){e.preventDefault();HB.Utils.hideModalPopup();});},bindToLogoutLink:function(){HB.AccountLogin.logoutLinkId.on("click",function(e){if(parseInt(HB.cartData.itemCount)>0){HB.WishlistLayer.init();e.preventDefault();HB.AccountLogin.showLogoutPopUp();}else{var $form=$(document.createElement('form')).css({display:'none'}).attr("method","POST").attr("action",HB.AccountLogin.logoutLinkId.data('url'));var $input=$(document.createElement('input')).attr('name','CSRFToken').val(HB.config.CSRFToken);$form.append($input);$("body").append($form);$form.submit();}});},bindUserNameFormSubmit:function(){$("input[name='j_username'], form#forgottenPwdForm input[name='email']").each(function(){var previousResponseContent;var $userNameElement=$(this);var $form=$userNameElement.closest("form");var $baseStoresDiv=$form.find("div.user-basestores");$form.submit(function(e){var multipleBaseStoresResponse=$.ajax({url:HB.config.url.login.multipleB2BUnits,type:'GET',async:false,data:{username:$userNameElement.val()}}).responseJSON;if(typeof multipleBaseStoresResponse!=='undefined'&&multipleBaseStoresResponse.ambiguous===true){if(previousResponseContent!=multipleBaseStoresResponse.divContent){previousResponseContent=multipleBaseStoresResponse.divContent;e.preventDefault();$baseStoresDiv.html(multipleBaseStoresResponse.divContent);}}});});},showLoginPopupIfRequired:function(){if(HB.page.showLoginPopup==='true'){HB.AccountLogin.showLoginPopUp();}},bindShowPasswordAsPlainText:function(){$("#loginForm, #updatePasswordForm, #customerResetPasswordForm, #updatePwdForm").each(function(){var $form=$(this);
1575$form.find(".icon-preview.password").each(function(){$(this).on("click",function(){let $passwordElement=$(this).siblings("input[type=password]");$passwordElement.attr("type","text");setTimeout(()=>$passwordElement.attr("type","password"),3000);});});});},};HB.LocationSwitcher={SELECTOR_TOGGLE:".js-location-selector",SELECTOR_DROPDOWN:".js-location-selector-dropdown",SELECTOR_FORM:".js-location-selector-form",SELECTOR_SELECTED:".js-location-selector-form input[name='location']:checked",SELECTOR_OVERRIDE:".js-location-selector-form input[name='preselectionOverride']:checked",SELECTOR_SUBMIT:".js-location-selector-submit",init:function(){HB.LocationSwitcher.bindToggleDropdown();},bindToggleDropdown:function(){$(HB.LocationSwitcher.SELECTOR_TOGGLE).click(function(e){HB.LocationSwitcher.handleToggleDropdown(e);});},bindSubmitSelection:function(){$(HB.LocationSwitcher.SELECTOR_SUBMIT).click(function(e){var $selection=$(e.target).closest('.dropdown').find(HB.LocationSwitcher.SELECTOR_SELECTED);var $preselectionOverride=$(e.target).closest('.dropdown').find(HB.LocationSwitcher.SELECTOR_OVERRIDE);if($selection.length!=0){var url=HB.config.url.locationSwitcher.setLocation+"/"+encodeURI($selection.val());if($preselectionOverride.length!=0&&$preselectionOverride.is(":checked")){url+="?disablePreselection=true";}
1576window.location.href=url;}});},handleToggleDropdown:function(e){var $dropdown=$(e.target).closest('.dropdown').find(HB.LocationSwitcher.SELECTOR_DROPDOWN);HB.Utils.createMobileBackdrop($dropdown.parent(),()=>{HB.Utils.removeMobileBackdrop();$dropdown.parent().removeClass('open');$dropdown.closest(".dropdown-backdrop").remove();});if($dropdown.find(HB.LocationSwitcher.SELECTOR_FORM).length==0){$.ajax({url:HB.config.url.locationSwitcher.getLocationSwitcher,type:'POST',success:response=>{if(response.ambiguous===true){$dropdown.html(response.content);HB.LocationSwitcher.bindSubmitSelection();}}});}
1577if($(e.target).closest('.dropdown-xs').length>0){HB.LocationSwitcher.setMenuPosition();}},handleResponse:res=>{var json=JSON.parse(res);window.location.href=json.url;},setMenuPosition:function(){if($('.navi-wrapper .dropdown-xs').length>0){var offsetLeft=Math.ceil($('.navi-wrapper .dropdown-xs').offset().left);var naviWrapperWidth=Math.ceil($('.navi-wrapper').width());$('.navi-wrapper .dropdown-menu-xs').css('left','-'+offsetLeft+'px');$('.navi-wrapper .dropdown-menu-xs').css('width',naviWrapperWidth+'px');}},};HB.B2BUnitSwitcher={SELECTOR_TOGGLE:".js-b2b-unit-selector",SELECTOR_DROPDOWN:".js-b2b-unit-selector-dropdown",SELECTOR_FORM:".js-b2b-unit-selector-form",SELECTOR_SELECTED:".js-b2b-unit-selector-form input[name='b2bunit']:checked",SELECTOR_SUBMIT:".js-b2b-unit-selector-submit",init:function(){HB.B2BUnitSwitcher.bindToggleDropdown();},bindToggleDropdown:function(){$(HB.B2BUnitSwitcher.SELECTOR_TOGGLE).click(function(e){HB.B2BUnitSwitcher.handleToggleDropdown(e);});},bindSubmitSelection:function(){$(HB.B2BUnitSwitcher.SELECTOR_SUBMIT).click(function(e){var $selection=$(e.target).closest('.dropdown').find(HB.B2BUnitSwitcher.SELECTOR_SELECTED);if($selection.length!==0){$('.b2bUnitSelectorCurrent').html('<img src="'+HB.config.sharedResourcePath+'/images/spinner-16.gif" class="loadingB2BUnits" alt="loading image"/>');$.ajax({url:HB.config.url.b2bUnitSwitcher.setB2BUnit,type:'POST',dataType:'json',data:{selectedB2BUnitUid:$selection.val(),},success:function(res){HB.B2BUnitSwitcher.handleResponse(res);},error:function(){console.log("Error receiving B2B switching response, reloading page");window.location.reload();}});}});},handleToggleDropdown:function(e){var $dropdown=$(e.target).closest('.dropdown').find(HB.B2BUnitSwitcher.SELECTOR_DROPDOWN);HB.Utils.createMobileBackdrop($dropdown.parent(),()=>{HB.Utils.removeMobileBackdrop();$dropdown.parent().removeClass('open');$dropdown.closest(".dropdown-backdrop").remove();});if($dropdown.find(HB.B2BUnitSwitcher.SELECTOR_FORM).length==0){$.ajax({url:HB.config.url.b2bUnitSwitcher.getB2BUnitSwitcher,type:'POST',success:response=>{if(response.ambiguous===true){$dropdown.html(response.content);HB.B2BUnitSwitcher.bindSubmitSelection();}}});}
1578if($(e.target).closest('.dropdown-xs').length>0){HB.B2BUnitSwitcher.setMenuPosition();}},handleResponse:res=>{if(res){window.location.href=res.url;}
1579else{console.log("No reload target, loading root");window.location.href=HB.config.siteUrl;}},setMenuPosition:function(){if($('.navi-wrapper .dropdown-xs').length>0){var offsetLeft=Math.ceil($('.navi-wrapper .dropdown-xs').offset().left);var naviWrapperWidth=Math.ceil($('.navi-wrapper').width());$('.navi-wrapper .dropdown-menu-xs').css('left','-'+offsetLeft+'px');$('.navi-wrapper .dropdown-menu-xs').css('width',naviWrapperWidth+'px');}},};HB.AutoComplete={init:function(){},bindAll:function(){this.bindSearchAutocomplete();},bindSearchAutocomplete:function(){var $search=$("#search");var option=$search.data("options");var cache={};if(option){const searchautocomplete=$search.autocomplete({minLength:1,delay:option.waitTimeBeforeRequest,appendTo:".siteSearch",source:function(request,response){var term=request.term.toLowerCase();if(term in cache){return response(cache[term]);}
1580$.getJSON(option.autocompleteUrl,{term:request.term},function(data){var autoSearchData=[];var productSearch=(data.productSearchEnabled)?true:false;var contentSearch=(data.contentSearchEnabled)?true:false;autoSearchData.push({type:"suggestTypes",value:((productSearch)?"":"no-product-suggest")+"-"+""});var _autoSuggestion=[]
1581if((typeof data.suggestions!=='undefined'&&data.suggestions!==null&&data.suggestions.length>0)||(typeof data.contentSuggestions!=='undefined'&&data.contentSuggestions!==null&&data.contentSuggestions.length>0)){_autoSuggestion.push({type:"suggestHeadline",value:HB.translations.search.suggest.tab.suggest});if(typeof data.suggestions!=='undefined'&&data.suggestions!==null&&data.suggestions.length>0){$.each(data.suggestions,function(i,obj){_autoSuggestion.push({type:"autoSuggestion",value:obj.term,url:HB.config.url.
1581search+"?q="+obj.term,term:term});});}
1582if(typeof data.contentSuggestions!=='undefined'&&data.contentSuggestions!==null&&data.contentSuggestions.length>0){$.each(data.contentSuggestions,function(i,obj){if(_autoSuggestion.find(e=>obj.term==e.value)===undefined){_autoSuggestion.push({type:"autoSuggestion",value:obj.term,url:HB.config.url.search+"?q="+obj.term,term:term});}});}}
1583var _productSuggestions=[];var _categorySuggestions=[];if(productSearch&&data.productCount>0){_productSuggestions.push({type:"productHeadline",value:HB.translations.search.suggest.tab.product,count:data.productCount,width:((data.contentSuggestions!==null&&data.contentSuggestions.length>0)||(data.suggestions!==null&&data.suggestions.length>0))?"":"classLarge"});if(typeof data.products!=='undefined'&&data.products!==null&&data.products.length>0){$.each(data.products,function(i,obj){_productSuggestions.push({type:"productResult",value:obj.name,code:obj.code,desc:obj.description,manufacturer:obj.manufacturer,url:HB.config.contextPath+obj.url,image:obj.images==null?"":obj.images[0].url});});_productSuggestions.push({type:"allSearchButton",value:"search",count:data.productCount,url:HB.config.url.search+"?q="+term});}
1584else{_productSuggestions.push({type:"productNoMatch",value:HB.translations.search.suggest.productNoMatch,url:HB.config.url.search+"?q="+term});}
1585_categorySuggestions.push({type:"lowerSection",value:HB.translations.search.suggest.tab.product,width:((data.contentSuggestions!==null&&data.contentSuggestions.length>0)||(data.suggestions!==null&&data.suggestions.length>0))?"":"classLarge",height:(typeof data.products==='undefined'||data.products===null||data.products.length<=0)?"upperHeightOffset":""});if(typeof data.categories!=='undefined'&&data.categories!==null&&data.categories.length>0){_categorySuggestions.push({type:"categoryHeadline",value:HB.translations.search.suggest.tab.categories});siteUrl=(HB.config.siteUrl)?HB.config.siteUrl:"";if(siteUrl.charAt(siteUrl.length-1)=='/'){siteUrl=siteUrl.substr(0,siteUrl.length-1);}
1586$.each(data.categories,function(i,obj){_categorySuggestions.push({type:"autoSuggestCategories",value:obj.name,code:obj.code,url:siteUrl+obj.query.url,term:term});});}}
1587var _contentSuggestions=[];if(contentSearch&&(typeof data.pages!=='undefined'&&data.pages!==null&&data.pages.length>0)){if(data.productCount===0){_contentSuggestions.push({type:"lowerSection",value:HB.translations.search.suggest.tab.product,width:((data.contentSuggestions!==null&&data.contentSuggestions.length>0)||(data.suggestions!==null&&data.suggestions.length>0))?"":"classLarge",height:(typeof data.products==='undefined'||data.products===null||data.products.length<=0)?"upperHeightOffset":""});}
1588_contentSuggestions.push({type:"contentHeadline",value:HB.translations.search.suggest.tab.content,width:data.categories!==null&&data.categories.length>0?"":"contentNoMargin"});$.each(data.pages,function(i,obj){siteUrl=(HB.config.siteUrl)?HB.config.siteUrl:"";if(siteUrl.charAt(siteUrl.length-1)=='/'){siteUrl=siteUrl.substr(0,siteUrl.length-1);}
1589categoryTab=(obj.tab)?obj.tab:"AWS";if(categoryTab=='MISC'){categoryTab=HB.translations.search.miscTab;}
1590else if(categoryTab=='AWS'){categoryTab=HB.translations.search.awsTab;}
1591_contentSuggestions.push({type:"contentResult",value:obj.title,code:obj.title,desc:obj.description,url:siteUrl+obj.url,image:obj.previewImageURL,tab:categoryTab,term:term});});}
1592if(HB.ViewportChange.getViewport().index>0){autoSearchData.push({type:"closeButton",value:null},..._productSuggestions,..._categorySuggestions,..._contentSuggestions,..._autoSuggestion);}else{autoSearchData.push({type:"closeButton",value:null},..._autoSuggestion,..._productSuggestions,..._categorySuggestions,..._contentSuggestions);}
1593if(autoSearchData.length<=2){autoSearchData=null}
1594cache[term]=autoSearchData;window.cache=autoSearchData;return response(autoSearchData);});},select:function(event,ui){if(!ui.item||/headline|lowersection/.test(ui.item.type.toLowerCase())){return false;}else{window.location.href=ui.item.url;}
1595return false;},messages:{noResults:function(){return'Keine Ergebnisse gefunden.'},results:function(amount){return amount+(amount>1?" results are":" result is")+" available, use up and down arrow keys to navigate.";},},close:function(event,ui){if(HB.ViewportChange.getViewport().index>0)return;$('body').css('overflow','');},open:function(event,ui){if(HB.ViewportChange.getViewport().index>0)return;$('body').css('overflow','hidden');},});if(searchautocomplete.data("uiAutocomplete")){searchautocomplete.data("uiAutocomplete")._renderItem=function(ul,item){if(item.type=="closeButton"){$("<li class='close-icon' aria-label='close-icon'><i class='icon-close pull-right'></i></li>").appendTo(ul);$("ul li.close-icon").click(()=>{$("#search").autocomplete("close");})
1596return $();}
1597if(item.type=="suggestTypes"){if(item.value.includes("no-product-suggest")){ul.addClass("no-product-suggest");}
1598return $();}
1599if(item.type==="suggestHeadline"){let renderHtml="<h4>"+item.value+"</h4>";return $("<li class='suggest-tab suggest-tab-text head'></li>").data("item.autocomplete",item).append(renderHtml).attr('data-track-id','suggestSearchTerm').appendTo(ul);}
1600if(item.type==="autoSuggestion"){var terms=item.term.split(' ');var itemValue=item.value!=null?item.value:"";for(let i=0,len=terms.length;i<len;i++){if(terms[i]!==''){itemValue=itemValue.replace(new RegExp('('+terms[i]+')(.*)','gi'),'$1<b>$2</b>');}}
1601let renderHtml="<i class='icon-search'></i><a href='"+item.url+"' class='clearfix'>"+itemValue+"</a>";return $("<li class='suggestions suggest-tab suggest-tab-text suggest-element'>").data("item.autocomplete",item).append(renderHtml).attr('data-track-id','suggestSearchTerm').appendTo(ul);}
1602if(item.type==="productHeadline"){let renderHtml="<h4>"+item.value+' ('+item.count+')'+"</h4>";return $("<li class='product-tab product-tab-text head'></li>").data("item.autocomplete",item).append(renderHtml).appendTo(ul);}
1603if(item.type==="productResult"){let renderHtml="<a href='"+item.url+"' class='product row'>";if(option.displayProductImages&&item.image!=null&&item.image!==''){renderHtml+="<div class='thumb col-xs-3'><img class='img-responsive' src='"+item.image+"' /></div><div class='desc col-xs-9 clearfix'>";}else{renderHtml+="<div class='thumb col-xs-3'><img class='img-responsive' src='"+HB.config.missingImg60x45+"' /></div><div class='desc col-xs-9 clearfix'>";}
1604renderHtml+="<div class='title'><b>"+item.value+"</b></div>"+"<div class='productNumber'><span class='mrm'>"+HB.translations.search.articleNumber+"</span>"+item.code+"</div></div>"+"</a>";return $("<li class='product-tab product-tab-main suggest-element'>").data("item.autocomplete",item).append(renderHtml).appendTo(ul);}
1605if(item.type==="allSearchButton"){return $("<li class='product-tab suggest-element'><button class='btn btn-primary searchAllProductsBtn' onclick='window.location.href="+'"'+item.url+'"'+"'>"+'Alle '+item.count+' Produkte anzeigen'+"</button></li>").attr('data-track-id','resultCountContainer').appendTo(ul);}
1606if(item.type=="productNoMatch"){return $("<li class='product-tab product-tab-text nomatch'><p>"+item.value+"</p></li>").appendTo(ul);}
1607if(item.type=="contentHeadline"){const container=$('li#lowerSectionContainer');const colCount=parseInt(container.attr('data-columns'))+1;container.attr('data-columns',colCount);let innerMostChild=$("<h4>"+item.value+"</h4>");let renderHtml=$("<li class='category-tab category-tab-text head'></li>");renderHtml.data("ui-autocomplete-item",item);renderHtml.append(innerMostChild);return $("<ul id='contentList'></ul>").append(renderHtml).appendTo(container);}
1608if(item.type=="contentResult"){let terms=item.term.split(' ');let itemValue=item.value!=null?item.value:"";for(let i=0,len=terms.length;i<len;i++){if(terms[i]!==''){itemValue=item.value.replace(new RegExp('('+terms[i]+')(.*)','gi'),'<b>$1</b>$2');}}
1609let renderHtml="<a href='"+item.url+"'><div class='desc'><div class='title'>"+itemValue+"<small>
1609"+' in '+item.tab+"</small>"+"</div></div></a>";return $("<li class='contentsuggestions content-tab content-tab-main suggest-element content-tab-text'>").data("item.autocomplete",item).append(renderHtml).appendTo('ul#contentList');}
1610if(item.type=="contentNoMatch"){return $("<li class='content-tab content-tab-text nomatch'><p>"+item.value+"</p></li>").appendTo(ul);}
1611if(item.type==="lowerSection"){return $(`<li id='lowerSectionContainer' data-columns='0'></li>`).appendTo(ul);}
1612if(item.type==="categoryHeadline"){const container=$('li#lowerSectionContainer');const colCount=parseInt(container.attr('data-columns'))+1
1613container.attr('data-columns',colCount);let innerMostChild=$("<h4>"+item.value+"</h4>");let renderHtml=$("<li class='category-tab category-tab-text head'></li>");renderHtml.data("ui-autocomplete-item",item);renderHtml.append(innerMostChild);return $("<ul id='categoryList'></ul>").append(renderHtml).appendTo(container);}
1614if(item.type==="autoSuggestCategories"){let terms=item.term.split(' ');let itemValue=item.value!=null?item.value:"";for(let i=0,len=terms.length;i<len;i++){if(terms[i]!==''){itemValue=item.value.replace(new RegExp('('+terms[i]+')(.*)','gi'),'<b>$1</b>$2');}}
1615let renderHtml="<a href='"+item.url+"' class='clearfix'>"+itemValue+"</a>";return $("<li class='suggestCategories category-tab category-tab-text suggest-element'>").data("item.autocomplete",item).append(renderHtml).appendTo('ul#categoryList');}};}}}};HB.MiniCart={refreshMiniCartCount:function(){$.ajax({dataType:"json",url:HB.config.url.minicart.refreshUrl+Math.floor(Math.random()*101)*(new Date().getTime()),timeout:HB.config.ajax.timeout,success:function(data){HB.MiniCart.updateDisplay(data);}});},validate:function(){var miniCartCount=$(".miniCartCount").html(),miniCartCountCookie=Cookies.get("miniCartCount"),updateMinicart=false;if((typeof miniCartCount==='string'&&typeof miniCartCountCookie==='string')&&(miniCartCount.trim()!=miniCartCountCookie.trim()))
1616{updateMinicart=true;}
1617if(updateMinicart){HB.MiniCart.refreshMiniCartCount();}},updateDisplay:function(data){var $minicartMobile=$("#js-site-cart .mini-cart");var $minicartDesktop=$(".mini-cart-wrapper .mini-cart");$minicartDesktop.html(data.miniCart);if($minicartDesktop.find('#miniCartPrice')){$minicartDesktop.find('#miniCartPrice').remove();}
1618if(data.miniCartCount>0){$minicartDesktop.addClass("text-color-red");$minicartMobile.addClass("text-color-red");}else{$minicartDesktop.removeClass("text-color-red");$minicartMobile.removeClass("text-color-red");}
1619if($minicartMobile&&data.miniCartCount>0){$minicartMobile.find(".miniCartCount").html(data.miniCartCount);}else{$minicartMobile.find(".miniCartCount").html("");}
1620document.cookie='miniCartCount='+data.miniCartCount+';max-age='+HB.config.cookieMaxAge+';path=/';}};;HB.Cart={formWrapperElement:$('<form id="formWrapper" style="display: none;" action="'+HB.config.url.cartUpdateMultipleEntries+'" method="post"></form>'),inputElements:$(),idsClearCartPopup:null,debug:0,init:function(){HB.Cart.bindCartRemoveProduct();HB.Cart.bindCartUpdateQuantityProduct();HB.Cart.bindCartUpdateQuantityInputKeys();HB.Cart.bindCheckoutButton();HB.Cart.bindRequestOfferButton();HB.Cart.bindContinueShoppingButton();HB.Cart.bindEmptyCartModal();HB.ListItem.init();HB.Utils.enableButton('#checkoutButton');HB.Utils.enableButton('#offerRequestButton')},bindCartRemoveProduct:function(){$('.submitRemoveProduct').on("click",function(e){e.preventDefault();var entryNum=$(this).attr('id').split("_")[1];var $form=$('#updateCartForm'+entryNum);var productCode=$form.find('input[name=productCode]').val();var initialCartQuantity=$form.find('input[name=initialQuantity]');var cartQuantity=$form.find('input[name=quantityString]');cartQuantity.val(0);HB.track.trackRemoveFromCart(productCode,initialCartQuantity);HB.Cart.wrapUpdateQuantityFormsIntoOneForm(e);});},bindCartUpdateQuantityProduct:function(){$('.updateQuantityProduct').on("click",HB.Cart.onUpdateQuantity);},bindCartUpdateQuantityInputKeys:function(){$('.update-cart-form .qtyInput').on("keydown",function(e){HB.Cart.debug>0?console.log("keydown event.which="+e.which):null;if(e.which===13){e.preventDefault();HB.Cart.onUpdateQuantity(e);}});},bindCheckoutButton:function(){$('.checkoutButton').on("click",HB.Cart.onCartButton);},bindRequestOfferButton:function(){$('.offerRequestButton').on("click",HB.Cart.onCartButton);},bindContinueShoppingButton:function(){$('.continueButton').on("click",HB.Cart.onCartButton);},bindEmptyCartModal:()=>{$('.idsEmptyCart').on('click',()=>{$.ajax({url:HB.config.siteUrl+'cart/emptyCartModal',type:'get',dataType:'json',success:(result)=>{HB.Utils.displayModalPopup(result.emptyCartPopupData.content,'modal
1620-md');HB.Cart.bindModalCloseButton();HB.Cart.bindEmptyCart();},error:(e)=>{console.error('Error fetching cart empty modal, error: '+e);}})});},bindEmptyCart:()=>{$('.js-cart-modal-confirm').on('click',(e)=>{e.preventDefault();HB.Utils.hideModalPopup();$('#resultsList .cartItem').each(function(){$(this).find('input[name=quantityString]').val(0)});HB.Cart.wrapUpdateQuantityFormsIntoOneForm(e);});},bindModalCloseButton:()=>{$('.js-cart-modal-close').on('click',(e)=>{e.preventDefault();HB.Utils.hideModalPopup();});},onUpdateQuantity:function(event){event.preventDefault();HB.Cart.wrapUpdateQuantityFormsIntoOneForm(event);},onCartButton:function(event){event.preventDefault();if(HB.Cart.wrapUpdateQuantityFormsIntoOneForm(event)==false){HB.Cart.openLinkByEvent(event);}},openLinkByEvent:function(event){var linkElement=$(event.currentTarget);if(typeof linkElement.attr('href')!=='undefined'&&linkElement.attr('href')!=''){window.location=linkElement.attr('href');}},wrapUpdateQuantityFormsIntoOneForm:function(event){var isChangedUpdateQuantityForm=false;var cartForms=$('.cartItems').find('form[id^="updateCartForm"]');cartForms.each(function(index){if(HB.Cart.checkUpdateQuantity($(this))){isChangedUpdateQuantityForm==false?isChangedUpdateQuantityForm=true:null;var formId=$(this).attr('id').split("updateCartForm")[1];var formData=$(this).serialize();HB.Cart.inputElements=HB.Cart.inputElements.add('<input type="hidden" name="entryNumber'+formId+'" value="'+formData+'">');HB.Cart.inputElements=HB.Cart.inputElements.add('<input type="hidden" name="CSRFToken'+'" value="'+HB.config.CSRFToken+'">');HB.Cart.debug>0?console.log("update form with changes",$(this)):null;}});if(isChangedUpdateQuantityForm){HB.Cart.submitWrappedUpdateQuantityForm(event);return true;}else{return false;}},submitWrappedUpdateQuantityForm:function(event){if(HB.Cart.inputElements.length>0){HB.Cart.addUserActionAsFormData(event);HB.Cart.formWrapperElement.append(HB.Cart.inputElements);$('body').append(HB.Cart.formWrapperElement);HB.Cart.formWrapperElement.submit();}},addUserActionAsFormData:function(event){var $userActionElement=$(event.currentTarget);var actionName="";if($userActionElement.hasClass('updateQuantityProduct')){actionName="update";}else if($userActionElement.hasClass('checkoutButton')){actionName="checkout";}else if($userActionElement.hasClass('submitRemoveProduct')){actionName="remove";}else if($userActionElement.hasClass('continueButton')&&typeof $userActionElement.data('non-formatted-url')!=='undefined'){actionName=$userActionElement.data('non-formatted-url');}
1621else if($userActionElement.hasClass('offerRequestButton')){actionName="/cart/checkout?requestType=offer";}
1622HB.Cart.inputElements=HB.Cart.inputElements.add('<input type="hidden" name="userAction" value="'+actionName+'">');},checkUpdateQuantity:function($form){var entryNum=$form.attr('id').split("updateCartForm")[1];var productCode=$form.find('input[name=productCode]').val();var initialCartUnit=$form.find('input[name=initialUnit]').val();var initialCartQuantity=parseFloat($form.find('input[name=initialQuantity]').val());var initialRoundedCartQuantity=$form.find('input[name=roundedQuantity]').val();var cartUnit=$form.find('.unitInput option:selected').val();var cartQuantity=$form.find('input.qty').val();HB.Cart.debug>0?console.log("checkUpdateQuantity: "+entryNum,$form,productCode,initialCartQuantity,cartQuantity,initialCartUnit,cartUnit):null;if(initialRoundedCartQuantity!=cartQuantity||initialCartUnit!=cartUnit){HB.track.trackUpdateCart(productCode,initialCartQuantity,cartQuantity);HB.Cart.debug>0?console.log("form is changed",$form):null;return true;}
1623return false;},addCartEntriesToCartViaAjax:function(cartEntriesData){$.ajax({url:HB.config.siteUrl+'cart/addGrid',timeout:90000,type:'post',dataType:'json',contentType:'application/json; charset=utf-8',data:JSON.stringify(cartEntriesData),success:function(data){HB.MyAccount.debug>0?console.log("ajax success",data):null;HB.MiniCart.refreshMiniCartCount();HB.Utils.displayModalPopup(data.addToCartPopup.content,'modal-md');HB.Product.hideAddToCartPopup();document.querySelector('#vueProductList .btnAllAddToCart')?.classList.remove('loading');},error:function(xhr,status,error){HB.MyAccount.debug>0?console.log(xhr,status,error):null;HB.Utils.hideModalPopup();document.querySelector('#vueProductList .btnAllAddToCart')?.classList.remove('loading');}});}};;HB.CheckoutLogin={debug:0,init:function(){HB.CheckoutLogin.debug>0?console.log("HB.CheckoutLogin.init"):null;var $guestCheckoutLogin=$('#guestcheckout-tag');HB.CheckoutLogin.bindToogleUserOutingSections($guestCheckoutLogin);
1623HB.CheckoutLogin.bindCheckoutRegisterRequest($guestCheckoutLogin);HB.CheckoutLogin.bindIsCompanyToggle();HB.Tabs.init();HB.CheckoutLogin.setAutocompleteClasses();HB.CheckoutLogin.bindPopover();},bindToogleUserOutingSections:function(_context){$(_context).find(".userOuting").find('h3').on('click',HB.CheckoutLogin.toogleUserOutingSections);},toogleUserOutingSections:function(e){var $clickedSection=$(e.target).closest('.userOuting');var $guestCheckoutLogin=$clickedSection.closest('#guestcheckout-tag');$guestCheckoutLogin.find('.userOuting').each(function(){if($(this).is($clickedSection)){if($(this).hasClass('toggle-on')){$(this).removeClass('toggle-on');$(this).addClass('toggle-off');}else{$(this).removeClass('toggle-off');$(this).addClass('toggle-on');}}else{$(this).removeClass('toggle-on');$(this).addClass('toggle-off');}});},bindCheckoutRegisterRequest:function(_context){$(_context).find('#butt-register').on('click',HB.CheckoutLogin.showRegisterAndOfferRequestForm);},bindIsCompanyToggle:function(){$('.js-is-company-toggle').on('click touchend',function(){if($(this).find('input').prop('checked')){$('.js-company-name-field').removeClass('hidden');$('.js-company-taxid-field').removeClass('hidden');}else{$('.js-company-name-field').addClass('hidden');$('.js-company-name-field').find('input').val('');$('.js-company-taxid-field').addClass('hidden');$('.js-company-taxid-field').find('input').val('');}});},showRegisterAndOfferRequestForm:function(e){var $guestCheckoutLogin=$(e.target).closest('#guestcheckout-tag');var $guestCheckoutLoginParent=$guestCheckoutLogin.parent();var $guestCheckoutForm=$guestCheckoutLoginParent.find('.guest-form');$guestCheckoutLogin.addClass('hidden');$guestCheckoutForm.removeClass('hidden');},setAutocompleteClasses:()=>{$('#postalcode').addClass('js-postcode');$('#location').addClass('js-town');let input=$('.js-postcode');HB.postcodeSuggest.inputSelect(input);},bindPopover:function(){$('body').on('click touchend',function(e){$('[data-toggle="popover"]').each(function(){if(!$(this).is(e.target)&&$(this).has(e.target).length===0&&$('.popover').has(e.target).length===0){$(this).popover('hide');}});});$('[data-toggle="popover"]').popover();},};HB.WishlistLayer={logout:null,debug:0,init:function(){var $wishList=$('#editWishlistForm');HB.ListItem.bindQuantityInput($wishList);HB.WishlistLayer.bindToWishlistRadioButton();HB.WishlistLayer.bindToAddToWishlistLayerForm();},bindToAddToWishlistForm:function(){var addToWishlistForm=$('form.add-to-wishlist-form');addToWishlistForm.ajaxForm({beforeSerialize:function($form,options){var $productActionContainer=$('.productActionContainer');var qtyInput=$productActionContainer.find('#qtyInput');qty=addToWishlistForm.find("input[name='qty']");var unitInput=$productActionContainer.find('.unitInput');unit=addToWishlistForm.find("input[name='unit']");HB.WishlistLayer.debug>0?console.log("Before set: qtyInput.val(): ",qtyInput.val()," qty.val(): ",qty.val()," unitInput.val(): ",unitInput.val()," unit.val(): ",unit.val()):null;if(qtyInput){qty.val(qtyInput.val());}
1624if(unitInput){unit.val(unitInput.val());}
1625HB.WishlistLayer.debug>0?console.log("After set: qtyInput.val(): ",qtyInput.val()," qty.val(): ",qty.val()," unitInput.val(): ",unitInput.val()," unit.val(): ",unit.val()):null;},success:HB.WishlistLayer.displayWishlistPopup});addToWishlistForm.on("click",function(e){HB.Utils.displayModalPopupLoading('modal-md');});HB.Utils.enableButton('.addToWishlist');},displayWishlistPopup:function(wishlistResult,statusText,xhr,formElement){HB.Utils.displayModalPopup(wishlistResult.wishlistPopup.content,'modal-md');HB.WishlistLayer.bindToAddToWishlistLayerForm();HB.WishlistLayer.bindToWishlistRadioButton();},bindToAddToWishlistLayerForm:function(){var wishlistLayerForm=$('form.wishlist-layer-form');wishlistLayerForm.ajaxForm({success:HB.WishlistLayer.reloadWishlistPopup,error:HB.WishlistLayer.redirectOnError,beforeSend:function(xhr){xhr.setRequestHeader("X-Ajax-NoRedirect","true");}});},reloadWishlistPopup:function(wishlistResult,statusText,xhr,formElement){if(typeof wishlistResult.wishlistPopup=="undefined"){window.location=HB.config.url.login.page;return;}
1626if(formElement.attr('id')=='newWishlistForm'){HB.Utils.onCloseClearModalPopup();}
1627HB.Utils.displayModalPopup(wishlistResult.wishlistPopup.content,'modal
1627-md');HB.WishlistLayer.bindToAddToWishlistLayerForm();HB.WishlistLayer.bindToWishlistRadioButton();if($(wishlistResult.wishlistPopup.content).filter(".added-to-wishlist")[0]&&HB.WishlistLayer.logout){HB.Utils.modal.on("hide.bs.modal",function(e){HB.WishlistLayer.doLogoutPost();});}
1628HB.WishlistLayer.bindContinueShoppingButton();},redirectOnError:function(errorResult){window.location=HB.config.url.login.page;},bindReloadIcon:function(){var createWishlistForm=$('#newWishlistForm');createWishlistForm.submit(function(){HB.MyAccount.displayLoadingIcon(createWishlistForm);});},bindToWishlistRadioButton:function(){var checkbox=$('input.wishlist-button');checkbox.on("click",function(e){var wishlistLayerForm=document.getElementById("select_wishlist");wishlistLayerForm.wishlistCode.value=this.value;$(this).submit();});},bindContinueShoppingButton:function(){const $btnContinueShopping=$('.wishlist-popup .btn-continue-shopping');if($btnContinueShopping.length){$btnContinueShopping.on("click",HB.WishlistLayer.onContinueShoppingButton);}},onContinueShoppingButton:function(event){const $hbModal=$(event.target).closest('#hbModal');if($hbModal.length){const $btnClose=$hbModal.find('button.close');if($btnClose.length){$btnClose.click();}}},doLogoutPost:function(){var $form=$(document.createElement('form')).css({display:'none'}).attr("method","POST").attr("action",HB.config.url.logout);var $input=$(document.createElement('input')).attr('name','CSRFToken').val(HB.config.CSRFToken);$form.append($input);$("body").append($form);$form.submit();}};HB.SimpleCheckoutConfig={debug:HB.checkout.shippingMethodInfo.debug!='true'?0:1,Cache:[],nextDayCounter:0,openingTimeInfo:[],offsets:[],weekDay:HB.config.shortWeekDays.split(','),shippingMethodInfo:{'standard-net':{'saturday':HB.checkout.shippingMethodInfo.standardNet.saturday,'defaultOffsetDays':1,'timeExcludes':''},'express-delivery':{'saturday':HB.checkout.shippingMethodInfo.expressDelivery.saturday,'defaultOffsetDays':0,'defaultOffsetHours':3,'timeExcludes':''},'pickup':{'saturday':HB.checkout.shippingMethodInfo.pickup.saturday,'defaultOffsetDays':0,'timeExcludes':''},'quickservice':{'saturday':HB.checkout.shippingMethodInfo.quickservice.saturday,'defaultOffsetDays':0,'timeExcludes':''}},init:function(){if(typeof(HB.checkout.openingTimeInfo)!=='undefined'&&HB.checkout.openingTimeInfo!==null){HB.SimpleCheckoutConfig.openingTimeInfo=JSON.parse(HB.checkout.openingTimeInfo);}
1629if(typeof(HB.checkout.offsets)!=='undefined'&&HB.checkout.offsets!==null&&HB.checkout.offsets!==''){HB.SimpleCheckoutConfig.offsets=JSON.parse(HB.checkout.offsets);}
1630HB.SimpleCheckoutConfig.shippingMethodInfo["standard-net"].saturday=HB.checkout.shippingMethodInfo.standardNet.saturday;if(HB.SimpleCheckoutConfig.shippingMethodInfo["express-delivery"]!==undefined){HB.SimpleCheckoutConfig.shippingMethodInfo["express-delivery"].saturday=HB.checkout.shippingMethodInfo.expressDelivery.saturday;}
1631HB.SimpleCheckoutConfig.shippingMethodInfo["pickup"].saturday=HB.checkout.shippingMethodInfo.pickup.saturday;if(HB.SimpleCheckoutConfig.shippingMethodInfo["quickservice"]!==undefined){HB.SimpleCheckoutConfig.shippingMethodInfo["quickservice"].saturday=HB.checkout.shippingMethodInfo.pickup.saturday;}
1632HB.SimpleCheckoutConfig.initAllDatePicker();HB.SimpleCheckoutConfig.initAllAddressChosen();HB.SimpleCheckoutConfig.initShippingMethodForm();HB.SimpleCheckoutConfig.initQuickServiceDate();HB.SimpleCheckoutConfig.initQuickServiceNamedTimeSelect();HB.SimpleCheckoutConfig.initExpressDeliveryTimeSlot();HB.SimpleCheckoutConfig.bindAll();HB.SimpleCheckoutConfig.initSeparateDeliveryFormShow();},bindAll:function(){HB.SimpleCheckoutConfig.bindPopover();HB.SimpleCheckoutConfig.bindFormChange();HB.SimpleCheckoutConfig.bindSeparateDeliveryFormChange();HB.SimpleCheckoutConfig.bindAddressDialogModal();HB.SimpleCheckoutConfig.bindMultipleSelect();HB.SimpleCheckoutConfig.bindOrderNote();HB.SimpleCheckoutConfig.bindFormSubmit();if(HB.checkout.pickupProductNotAvailableForLocation){HB.SimpleCheckoutConfig.bindPickupUnavailableMessage();}},initQuickServiceDate:function(){HB.SimpleCheckoutConfig.setFixedDateQuickService();},initQuickServiceNamedTimeSelect:function(){HB.SimpleCheckoutConfig.fillQuickServiceNamedTimeSelect();},initShippingMethodForm:function(){var $shippingMethodInput=$('input[type=radio][name=deliveryMode]:checked');if(HB.checkout.pickupProductNotAvailableForLocation==="true"){$shippingMethodInput=HB.SimpleCheckoutConfig.handlePickupNotAvailable();}else if(typeof $shippingMethodInput=='undefined'||$shippingMethodInput==null||$shippingMethodInput.length===0){$shippingMethodInput=$('input[type=radio][name=deliveryMode]').first();$shippingMethodInput.prop("checked",true);}
1633var shippingMethodID=HB.SimpleCheckoutConfig.getShippingMethodID($shippingMethodInput);HB.SimpleCheckoutConfig.showForm(shippingMethodID);}
1633,handlePickupNotAvailable:function(){var $shippingMethodInputs=$('input[type=radio][name=deliveryMode]');var $validInput=$shippingMethodInputs.filter(function(){return!$(this).prop('disabled')&&$(this).val()!=='pickup';}).first();if($validInput.length>0){$validInput.prop('checked',true);return $validInput;}else{console.log('No available non-pickup shipping methods');return null;}},showForm:function(shippingMethodID){HB.SimpleCheckoutConfig.debug!=0?console.log("HB.SimpleCheckoutConfig.showForm() name: ",shippingMethodID):null;var givenShippingMethodID=shippingMethodID;if(typeof givenShippingMethodID=='undefined'||givenShippingMethodID==null){var $firstInput=$('input[type=radio][name=deliveryMode]').first();$firstInput.prop("checked",true);givenShippingMethodID=HB.SimpleCheckoutConfig.getShippingMethodID($firstInput);}
1634var $shippingMethodForm=HB.SimpleCheckoutConfig.getShippingMethodForm(givenShippingMethodID);$('#simpleCheckoutForms').find('.simple-checkout-form').each(function(index){if(!$(this).hasClass('hidden')){$(this).addClass('hidden');}});if($shippingMethodForm.length){$shippingMethodForm.removeClass('hidden');}
1635if(HB.user.isB2C&&shippingMethodID==='pickup'&&this.showNotAvailableMessage(shippingMethodID)){HB.SimpleCheckoutConfig.showGlobalMessage(`<div class='alert neutral'><div class='message-icon'><i class='icon-close'> </i></div><span class='message'>${HB.translations.checkout.pickupOnRequest} </span><div class='pull-right gm-close-icon mrm'><i class='icon-close'></i></div></div>`);}
1636if(HB.user.isB2C&&shippingMethodID==='standard-net'&&this.showNotAvailableMessage(shippingMethodID)){HB.SimpleCheckoutConfig.showGlobalMessage(`<div class='alert neutral'><div class='message-icon'><i class='icon-close'> </i></div><span class='message'>${HB.translations.checkout.noDelivery} </span><div class='pull-right gm-close-icon mrm'><i class='icon-close'></i></div></div>`);let deliveryForm=$('#simpleCheckoutDeliveryConfigForm');deliveryForm.find('.col-date').addClass('hidden');$('#namedDateDelivery_delivery').prop('disabled',true)
1637deliveryForm.find('.col-time').addClass('hidden');$('#timeSlotIdDelivery_delivery').prop('disabled',true)}
1638HB.Message.hideGlobalMessage();},showGlobalMessage:function(_content){$("#globalMessages").html(_content);const messageContainer=$("#globalMessages .alert.neutral");window.setTimeout(()=>{messageContainer.css("min-height","inherit");messageContainer.animate({height:0,opacity:'toggle',marginBottom:0,'padding-top':0,'padding-bottom':0},1000);},4000);},toggleSeparateDeliveryForm:function(_input){HB.SimpleCheckoutConfig.debug!=0?console.log("HB.SimpleCheckoutConfig.toggleSeparateDeliveryForm() $(input).val(): ",$(_input).val()):null;var $anonymousDeliverySeparateForm=$(_input).closest("form").find('#anonymousDeliverySeparateForm, #anonymousExpressDeliverySeparateForm');if($(_input).val()==='true'){if($anonymousDeliverySeparateForm.hasClass('hidden')){HB.SimpleCheckoutConfig.preventSeparateDeliveryFormSubmit(false);$anonymousDeliverySeparateForm.removeClass('hidden');}}else{if(!$anonymousDeliverySeparateForm.hasClass('hidden')){$anonymousDeliverySeparateForm.addClass('hidden');HB.SimpleCheckoutConfig.preventSeparateDeliveryFormSubmit(true);}}},preventSeparateDeliveryFormSubmit:function(_boolean){if(typeof _boolean==="boolean"){var $anonymousDeliverySeparateForm=$('#anonymousDeliverySeparateForm, #anonymousExpressDeliverySeparateForm');$anonymousDeliverySeparateForm.find('input').each(function(){$(this).prop('disabled',_boolean);});$('#anonymousSeparateDeliveryAddressCountryIsocode').prop('disabled',_boolean);}},getShippingMethodID:function(input){HB.SimpleCheckoutConfig.debug!=0?console.log("HB.SimpleCheckoutConfig.getShippingMethodID() $(input).val(): ",$(input).val()):null;return $(input).val();},getShippingMethodForm:function(shippingMethodID){HB.SimpleCheckoutConfig.debug!=0?console.log("HB.SimpleCheckoutConfig.getShippingMethodForm() shippingMethodID: ",shippingMethodID):null;var $shippingMethodForm;if(shippingMethodID=='standard-net'){$shippingMethodForm=$('form[name=deliveryForm]');}
1639else if(shippingMethodID=='express-delivery'){$shippingMethodForm=$('form[name=expressDeliveryForm]');}
1640else if(shippingMethodID=='pickup'){$shippingMethodForm=$('form[name=collectForm]');}
1641else if(shippingMethodID=='quickservice'){$shippingMethodForm=$('form[name=quickserviceForm]');}
1642return $shippingMethodForm;},getSelectedPOSID:function(shippingMethodID){var pos;if(shippingMethodID=='quickservice'){pos=$('#pointOfServiceIdQuickService').val();}
1643else if(shippingMethodID=='pickup'){pos=$('#pointOfServiceId_collect').val();}
1644else if(shippingMethodID=='standard-net'){if(HB.checkout.nearestDeliveryPos!==undefined){pos=HB.checkout.nearestDeliveryPos;}else{pos=$('#pointOfServiceId_delivery').val();}}
1645return pos;},bindFormChange:function(){$('input[type=radio][name=deliveryMode]').on('change',function(){var shippingMethodID=HB.SimpleCheckoutConfig.getShippingMethodID(this);HB.SimpleCheckoutConfig.showForm(shippingMethodID);});},bindSeparateDeliveryFormChange:function(){HB.SimpleCheckoutConfig.preventSeparateDeliveryFormSubmit(true);$('.anonymous-delivery-address-options input[type=radio]').on('change',function(){HB.SimpleCheckoutConfig.toggleSeparateDeliveryForm(this);});},bindFormSubmit:function(){$('.checkout-config-submit').each(function(){$(this).on('click',(event)=>{event.preventDefault();var $configForm=$('#simpleCheckoutForms .simple-checkout-form:not(.hidden)');HB.FormValidation.initConditional($configForm);HB.SimpleCheckoutConfig.debug>0?console.log("HB.SimpleCheckoutConfig.bindFormSubmit() configForm: ",$configForm):null;const requiredFieldsValid=(HB.FormValidation.checkRequiredFields()&&HB.FormValidation.validateDateNotInPast($configForm));if(!requiredFieldsValid)return;if('b2cguestorder'===HB.checkout.checkoutType.toLowerCase()&&$('#adyen-encrypted-form').length){HB.SimpleCheckoutConfig.savePaymentData($configForm);}else{$configForm.submit();}});});},savePaymentData:($configForm)=>{AdyenCheckoutHybris.setCustomPaymentMethodValues();const $checkedPaymentMethod=$('input[type=radio][name=paymentMethod]:checked');const paymentMethodName=$checkedPaymentMethod.parent().find('.js-chckt-pm__name').html();$('input[name="paymentMethodName"]').val(paymentMethodName);if(AdyenCheckoutHybris.validateForm()){const $form=$('#adyen-encrypted-form');$.ajax({url:$form.attr('action'),type:"POST",data:$form.serialize(),success:(response)=>{HB.SimpleCheckoutConfig.debug!=0?console.log('Paymentdata response '+JSON.stringify(response)):null;if(response.success){const shippingMethodID=HB.SimpleCheckoutConfig.getShippingMethodID($('input[type=radio][name=deliveryMode]:checked'));const $orderNote=$('#orderNote');const $hiddenOrderNote=HB.SimpleCheckoutConfig.getShippingMethodForm(shippingMethodID).find('input[name="orderNote"]');$hiddenOrderNote.val($orderNote.val());HB.SimpleCheckoutConfig.submitConfigForm($configForm);}else{HB.SimpleCheckoutConfig.debug!=0?console.log('Error saving paymentdata: '+JSON.stringify(response.errorMsg)):null;}},error:(xhr)=>{HB.SimpleCheckoutConfig.debug!=0?console.log('Error saving paymentdata: '+JSON.stringify(xhr)):null;}})}},submitConfigForm:($configForm)=>{$configForm.submit();},initAllAddressChosen:function(){$('.address-select').each(function(){let selectId='#'+$(this).attr('id');$(document).ready(function(){let $simpleCheckoutForms=$('#simpleCheckoutForms');if($simpleCheckoutForms.find(selectId).next('.select2-container').length<1){$simpleCheckoutForms.find(selectId).select2();}
1646setTimeout(function(){if($simpleCheckoutForms.find('.select2-container').length){$simpleCheckoutForms.find(selectId).css('display','none');$simpleCheckoutForms.find('.select2-container').css('width','');}},100);});});}
1646,initAllDatePicker:function(){$('.shipping-mode-options').find('input[name=deliveryMode]').each(function(index){var shippingMethodID=HB.SimpleCheckoutConfig.getShippingMethodID(this);HB.SimpleCheckoutConfig.datePickerCheckout(shippingMethodID);});},datePickerCheckout:function(shippingMethodID){var $shippingMethodForm=HB.SimpleCheckoutConfig.getShippingMethodForm(shippingMethodID);if(shippingMethodID!='quickservice'&&$shippingMethodForm.find('.date').length){if(HB.config.currentLanguage=='de'){$.fn.datepicker.dates['de']={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute"};}
1647if(!HB.user.isB2C||HB.SimpleCheckoutConfig.datePickerEnabled(shippingMethodID)){var datePicker=$($shippingMethodForm).find('.date').datepicker({startDate:'+1d',format:'dd.mm.yyyy',language:'de',container:$($shippingMethodForm).find('.date'),weekStart:1,beforeShowDay:function(date){if(HB.SimpleCheckoutConfig.datePickerSaturdayAllowed(shippingMethodID)){return date.getDay()!=0;}else{return date.getDay()!=0&&date.getDay()!=6;}}});var earliestDate=HB.SimpleCheckoutConfig.datePickerGetEarliestDate(shippingMethodID);var prefilledDate=HB.SimpleCheckoutConfig.datePickerGetSelectedDate(shippingMethodID,earliestDate);if(typeof earliestDate!='undefined'&&earliestDate!=null){var todayLocal=new Date();todayLocal.setHours(0,0,0,0);var startUTC=Date.UTC(todayLocal.getFullYear(),todayLocal.getMonth(),todayLocal.getDate());var endUTC=Date.UTC(earliestDate.getFullYear(),earliestDate.getMonth(),earliestDate.getDate());var differenceDays=Math.round((endUTC-startUTC)/86400000);$($shippingMethodForm).find('.date').datepicker('setStartDate',"+"+differenceDays+"d");}
1648if(typeof prefilledDate!='undefined'&&prefilledDate!=null){$($shippingMethodForm).find('.date').datepicker('setDate',HB.SimpleCheckoutConfig.datePickerFormatDate(prefilledDate));}else{$($shippingMethodForm).find('.date').datepicker('setDate','');}
1649datePicker.on('keydown',function(event){return event.keyCode===9});datePicker.on('changeDate',function(){$(this).datepicker('hide');let changedDay=$(this).datepicker('getDate').getDay();HB.SimpleCheckoutConfig.checkBlockedTimeSlots(changedDay,$(this));if(shippingMethodID=='express-delivery'){HB.SimpleCheckoutConfig.initExpressDeliveryTimeSlot();}});}else{$($shippingMethodForm).find('#namedDateCollect').prop('disabled',true);$($shippingMethodForm).find('.time-select').prop('disabled',true);}}},datePickerGetEarliestDate:function(shippingMethodID){const pos=HB.SimpleCheckoutConfig.getSelectedPOSID(shippingMethodID);var info=HB.SimpleCheckoutConfig.shippingMethodInfo[shippingMethodID];if(info==null){return;}
1650const holidays=[0];if(!HB.SimpleCheckoutConfig.datePickerSaturdayAllowed(shippingMethodID)){holidays.push(6);}
1651const today=new Date(new Date().setHours(0,0,0,0));const edate=HB.SimpleCheckoutConfig.addWorkDays(today,HB.SimpleCheckoutConfig.getOffset(shippingMethodID,info,pos),holidays);HB.SimpleCheckoutConfig.debug!=0?console.log("Earliest date: "+edate+" for shipping method "+shippingMethodID+" and PoS "+pos):null;return edate;},datePickerEnabled:(shippingMethodID)=>{const pos=HB.SimpleCheckoutConfig.getSelectedPOSID(shippingMethodID);const offsetsForShippingMethod=HB.SimpleCheckoutConfig.offsets[shippingMethodID];let offsetForPoS=undefined;if(offsetsForShippingMethod&&offsetsForShippingMethod[pos]){offsetForPoS=offsetsForShippingMethod[pos];}
1652HB.SimpleCheckoutConfig.debug!=0?console.log("Datepicker enabled for shippingMethod "+shippingMethodID+" and pos "+pos+"("+offsetForPoS+"): "+(offsetForPoS===undefined||offsetForPoS>=0)):null;return offsetForPoS===undefined||offsetForPoS>=0;},showNotAvailableMessage:(shippingMethodID)=>{const pos=HB.SimpleCheckoutConfig.getSelectedPOSID(shippingMethodID);const offsetsForShippingMethod=HB.SimpleCheckoutConfig.offsets[shippingMethodID];let offsetForPoS=undefined;if(offsetsForShippingMethod!==undefined&&offsetsForShippingMethod[pos]!==undefined){offsetForPoS=offsetsForShippingMethod[pos];}
1653return offsetForPoS!==undefined&&offsetForPoS<0;},getOffset:(shippingMethodID,info,pos)=>{const offsetsForShippingMethod=HB.SimpleCheckoutConfig.offsets[shippingMethodID];let offsetForPoS=info.defaultOffsetDays;if(offsetsForShippingMethod&&offsetsForShippingMethod[pos]){offsetForPoS=offsetsForShippingMethod[pos];}
1654return offsetForPoS;},datePickerGetSelectedDate:function(shippingMethodID,earliestDate){var validSelectedDate=null;var $shippingMethodForm=HB.SimpleCheckoutConfig.getShippingMethodForm(shippingMethodID);var selectedDate=$($shippingMethodForm).find('.date').datepicker('getDate');
1654if(typeof selectedDate!=='undefined'&&selectedDate!==null){if(typeof earliestDate!=='undefined'&&earliestDate!==null&&selectedDate.getTime()>=earliestDate.getTime()){validSelectedDate=selectedDate;}}
1655return validSelectedDate;},getFixedDateQuickservice:function(shippingMethodID){var fixedDate=null;var currentTime=new Date();var selectedPointOfServiceId=$('#pointOfServiceIdQuickService').val();if(typeof selectedPointOfServiceId!="undefined"&&selectedPointOfServiceId!=null){var selectedPOSOpeningInfos=HB.SimpleCheckoutConfig.openingTimeInfo[selectedPointOfServiceId];if(selectedPOSOpeningInfos!=null){if(currentTime.getDay()==0||(currentTime.getDay()==6&&!HB.SimpleCheckoutConfig.datePickerSaturdayAllowed(shippingMethodID))){}else{var openingInfo=selectedPOSOpeningInfos[HB.SimpleCheckoutConfig.weekDay[currentTime.getDay()]];if(typeof openingInfo!=='undefined'){var pickupTimeOffsetInMinutes;if(typeof(openingInfo)!=='undefined'&&openingInfo.defaultLeadTime!==null&&openingInfo.defaultLeadTime>=0){pickupTimeOffsetInMinutes=openingInfo.defaultLeadTime;}else{pickupTimeOffsetInMinutes=0;}
1656var currentTimeWithOffset=new Date();currentTimeWithOffset.setMinutes(currentTime.getMinutes()+pickupTimeOffsetInMinutes);if(openingInfo.pickupTimeSlots!==null&&openingInfo.pickupTimeSlots.length>0){var lastPickupTimeSlot=openingInfo.pickupTimeSlots[openingInfo.pickupTimeSlots.length-1];if(lastPickupTimeSlot.hours!==null&&lastPickupTimeSlot.minutes!==null){var lastPickupTime=new Date(new Date().setHours(lastPickupTimeSlot.hours,lastPickupTimeSlot.minutes,0,0));if(currentTimeWithOffset.getTime()<lastPickupTime.getTime()){fixedDate=currentTimeWithOffset;}}}}}
1657if(fixedDate===null){fixedDate=HB.SimpleCheckoutConfig.getNextAvailableWeekdayFromOpeningSchedule(currentTime,selectedPOSOpeningInfos,shippingMethodID);}}}
1658return fixedDate;},getNextAvailableWeekdayFromOpeningSchedule:function(startDate,selectedPOSOpeningInfos,shippingMethodID){var dateInFuture=startDate;do{dateInFuture.setDate(dateInFuture.getDate()+1);}while(typeof selectedPOSOpeningInfos[HB.SimpleCheckoutConfig.weekDay[dateInFuture.getDay()]]==='undefined')
1659return dateInFuture;},datePickerFormatDate:function(date){var month=''+(date.getMonth()+1);var day=''+date.getDate();var year=date.getFullYear();if(month.length<2)
1660month='0'+month;if(day.length<2)
1661day='0'+day;return day+"."+month+"."+year;},validateDateFormatString:function(dateString){return!!(dateString.length==10&&dateString.indexOf('.')==2);},getDateObjectFromDateString:function(dateString){if(dateString&&dateString!=''){let valueDateArray=dateString.split('.');let date=new Date(valueDateArray[2],(valueDateArray[1]-1),valueDateArray[0],0,0,0);if(date){return date;}else{return false;}}},datePickerSaturdayAllowed:function(shippingMethodID){var cacheKey="datePickerSaturdayAllowed_"+shippingMethodID;if(typeof HB.SimpleCheckoutConfig.Cache[cacheKey]==='undefined'){let saturdayAllowed=false;saturdayAllowed=HB.SimpleCheckoutConfig.shippingMethodInfo[shippingMethodID].saturday=="true";if(saturdayAllowed&&shippingMethodID=='quickservice'){var selectedPointOfServiceId=$('#pointOfServiceIdQuickService').val();var selectedPOSOpeningInfos=HB.SimpleCheckoutConfig.openingTimeInfo[selectedPointOfServiceId];if(selectedPOSOpeningInfos!=null&&selectedPOSOpeningInfos['Sa.']!=null){}else{saturdayAllowed=false;}}
1662HB.SimpleCheckoutConfig.Cache[cacheKey]=saturdayAllowed;return saturdayAllowed;}else{return HB.SimpleCheckoutConfig.Cache[cacheKey];}},setFixedDateQuickService:function(){let namedDateQuickservice=$('#namedDateQuickservice');if(namedDateQuickservice.length){var shippingMethodID="quickservice";var prefilledDate=HB.SimpleCheckoutConfig.getFixedDateQuickservice(shippingMethodID);var dateFormatted=HB.SimpleCheckoutConfig.datePickerFormatDate(prefilledDate);if(dateFormatted!==null){namedDateQuickservice.val(dateFormatted);namedDateQuickservice.text(dateFormatted);namedDateQuickservice.prop('readonly','true');}}},fillQuickServiceNamedTimeSelect:function(){if($('#namedDateQuickservice').length&&$('#namedTimeSelect').length){const selectedPointOfServiceId=$('#pointOfServiceIdQuickService').val();HB.SimpleCheckoutConfig.debug!=0?console.log('Selected Point of Service: '+selectedPointOfServiceId):null;if(typeof selectedPointOfServiceId!="undefined"&&selectedPointOfServiceId!=null){let selectedPOSOpeningInfos=HB.SimpleCheckoutConfig.openingTimeInfo[selectedPointOfServiceId];HB.SimpleCheckoutConfig.debug!=0?console.log('Selected Point of Service opening Infos: '+JSON.stringify(selectedPOSOpeningInfos)):null;
1662if(selectedPOSOpeningInfos!=null){const selDate=$('#namedDateQuickservice').val();let selectedDate;if(selDate&&selDate.length){selectedDate=new Date(selDate.replace(/(\d{2}).(\d{2}).(\d{4})/,"$2/$1/$3"));}
1663if(typeof selectedDate!="undefined"&&selectedDate!=null){let pickUpDateTime=HB.SimpleCheckoutConfig.getEarliestPickUpDateTime('quickservice',selectedPointOfServiceId);if(pickUpDateTime.getTime()<selectedDate.getTime()){pickUpDateTime=selectedDate;}
1664let openingInfo=selectedPOSOpeningInfos[HB.SimpleCheckoutConfig.weekDay[pickUpDateTime.getDay()]];let isTimeslotEnabled=false;let $namedTimeSelector=$('#namedTimeSelect');const initialValue=($namedTimeSelector.find('option[data-init="true"]').length>0)?$namedTimeSelector.find('option[data-init="true"]').val():'';$namedTimeSelector.empty();if(typeof(openingInfo)!=='undefined'&&openingInfo.pickupTimeSlots!==null&&openingInfo.pickupTimeSlots.length>0){HB.SimpleCheckoutConfig.debug!=0?console.log(openingInfo):null;$namedTimeSelector.append($('<option value="null">'+HB.translations.checkout.chooseCollectTime+'</option>'));pickupTimeInterval=openingInfo.pickupTimeInterval;openingInfo.pickupTimeSlots.forEach(function(item){let slotTimestamp=new Date(selectedDate).setHours(item.hours,item.minutes);if(slotTimestamp>=pickUpDateTime.getTime()){HB.SimpleCheckoutConfig.renderTimeSlotToDropdown(item,$namedTimeSelector,initialValue,pickupTimeInterval);isTimeslotEnabled=true;}});}
1665if(isTimeslotEnabled){$namedTimeSelector.removeClass('disabled');}
1666else if(!$namedTimeSelector.hasClass('disabled'))
1667{$namedTimeSelector.addClass('disabled');}}}}}},getEarliestPickUpDateTime:function(shippingMethodID,pointOfServiceID){var posOpeningInfos=HB.SimpleCheckoutConfig.openingTimeInfo[pointOfServiceID];if(posOpeningInfos==null){return;}
1668var earliestDateTime=new Date();let offset=HB.SimpleCheckoutConfig.getOffset(shippingMethodID,posOpeningInfos,pointOfServiceID);if(offset>0){const holidays=[0];if(!HB.SimpleCheckoutConfig.datePickerSaturdayAllowed(shippingMethodID)){holidays.push(6);}
1669const today=new Date(new Date().setHours(0,0,0,0));const pos=HB.SimpleCheckoutConfig.getSelectedPOSID(shippingMethodID);var info=HB.SimpleCheckoutConfig.shippingMethodInfo[shippingMethodID];if(info==null){return;}
1670let earliestDate=HB.SimpleCheckoutConfig.addWorkDays(today,HB.SimpleCheckoutConfig.getOffset(shippingMethodID,info,pos),holidays);earliestDateTime=HB.SimpleCheckoutConfig.getOpeningDateTime(earliestDate,pointOfServiceID);}
1671if(!HB.SimpleCheckoutConfig.isWorkingDayDate(earliestDateTime,pointOfServiceID)){var nextWorkingDayDate=HB.SimpleCheckoutConfig.getNextWorkingDayDate(earliestDateTime,pointOfServiceID);var nextWorkingDayOpeningDateTime=HB.SimpleCheckoutConfig.getOpeningDateTime(nextWorkingDayDate,pointOfServiceID);earliestDateTime=HB.SimpleCheckoutConfig.getDateTimeWithLeadTime(nextWorkingDayOpeningDateTime,shippingMethodID,pointOfServiceID);}else{var openingDateTime=HB.SimpleCheckoutConfig.getOpeningDateTime(earliestDateTime,pointOfServiceID);var closingDateTime=HB.SimpleCheckoutConfig.getClosingDateTime(earliestDateTime,pointOfServiceID);if(earliestDateTime.getTime()<=openingDateTime.getTime()){earliestDateTime=HB.SimpleCheckoutConfig.getDateTimeWithLeadTime(openingDateTime,shippingMethodID,pointOfServiceID);}
1672else if(HB.SimpleCheckoutConfig.getDateTimeWithLeadTime(earliestDateTime,shippingMethodID,pointOfServiceID)<=closingDateTime.getTime()){earliestDateTime=HB.SimpleCheckoutConfig.getDateTimeWithLeadTime(earliestDateTime,shippingMethodID,pointOfServiceID);}else{var nextWorkingDayDate=HB.SimpleCheckoutConfig.getNextWorkingDayDate(earliestDateTime,pointOfServiceID);var nextWorkingDayOpeningDateTime=HB.SimpleCheckoutConfig.getOpeningDateTime(nextWorkingDayDate,pointOfServiceID);earliestDateTime=HB.SimpleCheckoutConfig.getDateTimeWithLeadTime(nextWorkingDayOpeningDateTime,shippingMethodID,pointOfServiceID);}}
1673return earliestDateTime;},isWorkingDayDate:function(date,pointOfServiceID){var itIs=false;var posOpeningInfos=HB.SimpleCheckoutConfig.openingTimeInfo[pointOfServiceID];HB.SimpleCheckoutConfig.debug!=0?console.log('isWorkingDayDate():',posOpeningInfos):null;if(typeof posOpeningInfos!="undefined"&&posOpeningInfos!=null){var openingInfo=posOpeningInfos[HB.SimpleCheckoutConfig.weekDay[date.getDay()]];if(typeof openingInfo!="undefined"&&openingInfo!=null&&typeof openingInfo.openingHours!="undefined"&&openingInfo.openingHours!=null){itIs=true;}}
1674return itIs;},addWorkDays:(date,workdays,holidays)=>{const result=date;let addedDays=0;let days=workdays;while(addedDays<days){result.setDate(result.getDate()+1);if(holidays.includes(result.getDay())){++days;}
1675++addedDays;}
1676return result;},getNextWorkingDayDate:function(date,pointOfServiceID){HB.SimpleCheckoutConfig.nextDayCounter=++HB.SimpleCheckoutConfig.nextDayCounter;var nextWorkingDayDate=new Date(date.getTime()+24*60*60*1000);if(!HB.SimpleCheckoutConfig.isWorkingDayDate(nextWorkingDayDate,pointOfServiceID)&&HB.SimpleCheckoutConfig.nextDayCounter<=31){nextWorkingDayDate=HB.SimpleCheckoutConfig.getNextWorkingDayDate(nextWorkingDayDate,pointOfServiceID);}
1677return nextWorkingDayDate;},getOpeningDateTime:function(date,pointOfServiceID){let openingDateTime;const posOpeningInfos=HB.SimpleCheckoutConfig.openingTimeInfo[pointOfServiceID];if(typeof posOpeningInfos!="undefined"&&posOpeningInfos!=null){var openingInfo=posOpeningInfos[HB.SimpleCheckoutConfig.weekDay[date.getDay()]];if(typeof openingInfo!="undefined"&&openingInfo!=null){var openingHours=openingInfo.openingHours;if(typeof openingHours!="undefined"&&openingHours!=null){var openingTime=openingHours.openingTime;if(typeof openingTime!="undefined"&&openingTime!=null){var hour=openingTime.hour;var minutes=openingTime.minutes;if(hour!="undefined"&&hour!=null&&minutes!="undefined"&&minutes!=null){openingDateTime=new Date(new Date(date.getTime()).setHours(hour,minutes,0,0));}}}}}
1678return openingDateTime;},getClosingDateTime:function(date,pointOfServiceID){var closingDateTime;var posOpeningInfos=HB.SimpleCheckoutConfig.openingTimeInfo[pointOfServiceID];if(typeof posOpeningInfos!="undefined"&&posOpeningInfos!=null){var openingInfo=posOpeningInfos[HB.SimpleCheckoutConfig.weekDay[date.getDay()]];if(typeof openingInfo!="undefined"&&openingInfo!=null){var openingHours=openingInfo.openingHours;if(typeof openingHours!="undefined"&&openingHours!=null){var closingTime=openingHours.closingTime;if(typeof closingTime!="undefined"&&closingTime!=null){var hour=closingTime.hour;var minutes=closingTime.minutes;if(hour!="undefined"&&hour!=null&&minutes!="undefined"&&minutes!=null){closingDateTime=new Date(new Date(date.getTime()).setHours(hour,minutes,0,0));}}}}}
1679return closingDateTime;},getDateTimeWithLeadTime:function(date,shippingMethodID,pointOfServiceID){var dateWithLeadTime=new Date(date.getTime());var leadTimeInMinutes=HB.SimpleCheckoutConfig.getLeadTime(date,shippingMethodID,pointOfServiceID);if(typeof leadTimeInMinutes!="undefined"&&leadTimeInMinutes!=null){dateWithLeadTime=new Date(date.getTime()+(leadTimeInMinutes*60*1000));if(date.getDay()!=dateWithLeadTime.getDay())
1680dateWithLeadTime=new Date(new Date(date.getTime()).setHours(23,59,59,999));}
1681return dateWithLeadTime;},getLeadTime:function(date,shippingMethodID,pointOfServiceID){var leadTime=0;var posOpeningInfos=HB.SimpleCheckoutConfig.openingTimeInfo[pointOfServiceID];if(typeof posOpeningInfos!="undefined"&&posOpeningInfos!=null){var openingInfo=posOpeningInfos[HB.SimpleCheckoutConfig.weekDay[date.getDay()]];if(typeof openingInfo!="undefined"&&openingInfo!=null){leadTime=openingInfo.leadTimes[shippingMethodID]||openingInfo.defaultLeadTime;}}
1682return leadTime;},renderTimeSlotToDropdown:function(item,$namedTimeSelector,initialValue,leadTime){var time=("0"+item.hours).slice(-2)+":"+("0"+item.minutes).slice(-2);var $optionToAdd=$('<option value="'+time+'">'+time+'</option>');if(time==initialValue){$optionToAdd.attr('selected',true);}
1683$namedTimeSelector.append($optionToAdd);},bindPopover:function(){$('body').on('click touchend',function(e){$('[data-toggle="popover"]').each(function(){if(!$(this).is(e.target)&&$(this).has(e.target).length===0&&$('.popover').has(e.target).length===0){$(this).popover('hide');}});});$('[data-toggle="popover"]').popover();$('.popover-service-product').on('click touchend',function(e){HB.Utils.displayModalPopup($('.service-product-popover-content-wrapper').html(),'modal-lg');});$('#expressPop').click(function(e){HB.Utils.displayModalPopup($('.express-product-popover-content-wrapper').html(),'modal-lg');});},bindMultipleSelect:function(wrapperElement){let elementsMultiSelect;if(wrapperElement&&wrapperElement.length){elementsMultiSelect=wrapperElement.find('.service-select');}else{elementsMultiSelect=$('.service-select');}
1684elementsMultiSelect.each(function(){$(this).multiselect({nonSelectedText:HB.translations.checkout.chooseDefaultText,allSelectedText:HB.translations.multiselect.allSelectedText,enableHTML:true,numberDis
1684played:1,nSelectedText:HB.translations.multiselect.nSelectedText,templates:{button:'<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span><div class="dropdown-fake"><i class="icon-arrow-down"></i></div></button>',li:'<li class="checkbox"><a tabindex="0"><div class="control-label pseudo-checkbox"><label class="real-label"></label></div></a></li>'},optionLabel:function(element){return'<span class="checkbox"><i class="icon-check"></i></span>'+$(element).text();}});});},bindOrderNote:function(){$('.order-note label').each(function(){$(this).on('click touchend',function(event){event.preventDefault();var $textAreaWrapper=$(this).closest('.order-note').find('.note-textarea-wrapper');var $orderNoteInput=$(this).closest('.order-note').find('input[type="checkbox"]');if($textAreaWrapper.hasClass('hide')){$textAreaWrapper.removeClass('hide');$orderNoteInput.prop('checked',true);}else{$textAreaWrapper.addClass('hide');$orderNoteInput.prop('checked',false);$textAreaWrapper.find('textarea').val('');}});$(this).on('keydown',function(e){if(e.key==='Enter'||e.key===' '||e.keyCode===13||e.keyCode===32){e.preventDefault();e.stopPropagation();$(this).trigger('click');}});});},initExpressDeliveryTimeSlot:function(){HB.SimpleCheckoutConfig.activateDefaultTextExpressDeliveryTimeSlot();let $selectTimeSlot=$('#timeSlotIdDelivery_expressDelivery');if($selectTimeSlot.length){$selectTimeSlot.find('option').each(function(){let from=$(this).data('from');if(from){let $inputDatepicker=$('#simpleCheckoutExpressDeliveryConfigForm').find('.date input.form-control');if($inputDatepicker.length&&$inputDatepicker.val()!=''){HB.SimpleCheckoutConfig.showOnlyAvailableTimeSlotsForExpressDelivery($selectTimeSlot,$inputDatepicker);return false;}}});}},showOnlyAvailableTimeSlotsForExpressDelivery:function($selectTimeSlot,$inputDatepicker){if(HB.SimpleCheckoutConfig.validateDateFormatString($inputDatepicker.val())){let shippingMethodID='express-delivery';let dateObject=HB.SimpleCheckoutConfig.getDateObjectFromDateString($inputDatepicker.val());const currentDatePlusDefaultOffset=new Date();currentDatePlusDefaultOffset.setDate(currentDatePlusDefaultOffset.getDate()+HB.SimpleCheckoutConfig.shippingMethodInfo[shippingMethodID].defaultOffsetDays);currentDatePlusDefaultOffset.setHours(currentDatePlusDefaultOffset.getHours()+HB.SimpleCheckoutConfig.shippingMethodInfo[shippingMethodID].defaultOffsetHours);if(dateObject&&(dateObject.getTime()<currentDatePlusDefaultOffset.getTime())){$selectTimeSlot.find('option').each(function(){let from=$(this).data('from');if(from){let fromArray=from.split(':');if(fromArray.length==2&&!isNaN(fromArray[0])&&!isNaN(fromArray[1])){let fromDateObject=new Date();fromDateObject.setHours(fromArray[0]);fromDateObject.setMinutes(fromArray[1]);fromDateObject.setDate(currentDatePlusDefaultOffset.getDate());fromDateObject.setMonth(currentDatePlusDefaultOffset.getMonth());fromDateObject.setFullYear(currentDatePlusDefaultOffset.getFullYear());if(fromDateObject.getTime()>currentDatePlusDefaultOffset.getTime()){$(this).prop("disabled",false);$(this).removeClass('hidden');}else{$(this).prop("disabled",true);$(this).addClass('hidden');}}}});}else{$selectTimeSlot.find('option').each(function(){$(this).prop("disabled",false);$(this).removeClass('hidden');});}
1685if(HB.SimpleCheckoutConfig.isAtLeastOneExpressDeliveryTimeslotIsAvailable()){HB.SimpleCheckoutConfig.activateDefaultTextExpressDeliveryTimeSlot();}else{HB.SimpleCheckoutConfig.activateUnavailableTextExpressDeliveryTimeSlot();}}},isAtLeastOneExpressDeliveryTimeslotIsAvailable:function(){let $selectTimeSlot=$('#timeSlotIdDelivery_expressDelivery');let optionsNotDisabled=$selectTimeSlot.find('option:not([value="null"]):not([value=""]):not(:disabled)');return!!(optionsNotDisabled&&optionsNotDisabled.length);},activateDefaultTextExpressDeliveryTimeSlot:function(){let $selectTimeSlot=$('#timeSlotIdDelivery_expressDelivery');if($selectTimeSlot.length){$selectTimeSlot.find('option.default-text').removeClass('hidden');$selectTimeSlot.find('option.unavailable-text').addClass('hidden');HB.SimpleCheckoutConfig.clearSelectedOptionsExpressDeliveryTimeSlot();}},activateUnavailableTextExpressDeliveryTimeSlot:function(){let $selectTimeSlot=$('#timeSlotIdDelivery_expressDelivery');if($selectTimeSlot.length){$selectTimeSlot.find('option.default-text').addClass('hidden');$selectTimeSlot.find('option.unavailable-text').removeClass('hidden');HB.SimpleCheckoutConfig.clearSelectedOptionsExpressDeliveryTimeSlot();}},clearSelectedOptionsExpressDeliveryTimeSlot:function(){let $selectTimeSlot=$('#timeSlotIdDelivery_expressDelivery');if($selectTimeSlot.length){if(!$selectTimeSlot.find('option[value="null"]').hasClass('hidden')){$selectTimeSlot.val('null').change();}else if(!$selectTimeSlot.find('option[value=""]').hasClass('hidden')){$selectTimeSlot.val('').change();}}},bindAddressDialogModal:function(){$('.new-address-wrapper > a').on('click touchend',function(event){HB.SimpleCheckoutConfig.showAddressDialogModal(this,true);});$('.address-section').find('select.address-select').on('change',function(event){HB.SimpleCheckoutConfig.onChangeAddressSelect(this);});},onChangeAddressSelect:function(_context){const $newSelectedOption=$("option:selected",_context);if($newSelectedOption.data('context')=='custom'){HB.SimpleCheckoutConfig.showAddressDialogModal(_context,false);}else{const $addressSection=$(_context).closest('.address-section');const $newAddressFlag=$addressSection.find('input[name="newAddress"]');$newAddressFlag.val('false');}},showAddressDialogModal:function(_trigger,_clear){var $addressSection=$(_trigger).closest('.address-section');var $newAddressFormLayer=$addressSection.find('.new-address-formlayer');var $newAddressFormLayerContent=$newAddressFormLayer.find('.new-address-formlayer-content');var $newAddressFormLayerModal=$newAddressFormLayerContent.clone();var $oldGlobalMessage=$($newAddressFormLayerModal).find('.globalMessages');if($oldGlobalMessage.length>0){$oldGlobalMessage.remove();}
1686if(_clear){$newAddressFormLayerModal.find('input').val('');}
1687HB.Utils.displayModalPopup($newAddressFormLayerModal.wrap('<form>').parent(),'modal-lg');let input=$newAddressFormLayerModal.find('input[name="addressPostcode"]');HB.postcodeSuggest.inputSelect(input);HB.SimpleCheckoutConfig.bindSubmitAddressDialogModal($newAddressFormLayerModal,$addressSection);},bindSubmitAddressDialogModal:function(_modalContent,_addressSection){$(_modalContent).find('button[name="save"]').on('click',function(event){HB.SimpleCheckoutConfig.submitAddressDialogModal(_modalContent,_addressSection);});},submitAddressDialogModal:function(_modalContent,_addressSection){if(HB.SimpleCheckoutConfig.validateAddressDialogForm(_modalContent)){HB.SimpleCheckoutConfig.saveAndCloseAddressDialogModal(_modalContent,_addressSection);}}
1687,validateAddressDialogForm:function(_modalContent){const $addressForm=_modalContent;const invalidFields=[];const requiredFields=$(".tmp-required-field:visible",$addressForm);$(".form-error",$addressForm).remove();requiredFields.each(function(index,element){var $element=$(element);if($element.val()=="null"||$element.val()==""){invalidFields.push($element);$('<p class="form-error">'+HB.translations.general.requiredError+"</p>").insertAfter($element);}});if(invalidFields.length>0){HB.CheckoutConfig.showMessage(HB.translations.general.formGlobalError,"negative");return false;}
1688return true;},saveAndCloseAddressDialogModal:function(_modalContent,_addressSection){const $modalContent=$(_modalContent);const $newAddressFormLayer=$(_addressSection).find('.new-address-formlayer');const $newAddressFlag=$(_addressSection).find('input[name="newAddress"]');const $addressSelectBox=$(_addressSection).find('select.address-select');let $addressNewSelectOption=$addressSelectBox.find('option[data-context="custom"]');const addressLineForSelect=$modalContent.find('[name=addressLine1]').val()
1689+" "+$modalContent.find('[name=addressLine2]').val()+", "+$modalContent.find('[name=addressPostcode]').val()
1690+" "+$modalContent.find('[name=addressTowncity]').val();const $newAddressCountry=$modalContent.find('[name=addressCountryIsocode]');const $oldGlobalMessage=$modalContent.find('.globalMessages');if($oldGlobalMessage.length>0){$oldGlobalMessage.remove();}
1691if($newAddressCountry.length>0){var newCountryCodeToSelect=$newAddressCountry.val();$newAddressCountry.find('option').removeAttr('selected');$newAddressCountry.find('option[value="'+newCountryCodeToSelect+'"]').attr("selected",true);}
1692$newAddressFormLayer.empty();$newAddressFormLayer.append($modalContent);$newAddressFlag.val('true');$addressSelectBox.find('option').removeAttr('selected');if($addressNewSelectOption.length>0){$addressNewSelectOption.remove();}
1693$addressNewSelectOption=$('<option>');$addressSelectBox.find('option:eq(0)').after($addressNewSelectOption);$addressNewSelectOption.attr('data-context','custom');$addressNewSelectOption.val("NEW");$addressNewSelectOption.text(addressLineForSelect);$addressNewSelectOption.attr("selected",true);$addressSelectBox.trigger("chosen:updated");HB.Utils.hideModalPopup();},checkBlockedTimeSlots:function(day,currentElement){let shippingMethodID=currentElement.closest('form').data('shippingMethodId');let selectBox=currentElement.closest('form').find('.select-wrapper-collect-time');let selectOptions=selectBox.find('select option');if(HB.SimpleCheckoutConfig.shippingMethodInfo[shippingMethodID].timeExcludes!==undefined){if(HB.SimpleCheckoutConfig.shippingMethodInfo[shippingMethodID].timeExcludes[day]!==undefined){selectOptions.each(function(){HB.SimpleCheckoutConfig.shippingMethodInfo[shippingMethodID].timeExcludes[day].forEach(item=>{let optionValue=parseInt($(this).val());if(item===optionValue){$(this).prop({'disabled':true,'selected':false});}});});}else{selectOptions.each(function(){$(this).prop('disabled',false);});}}},initSeparateDeliveryFormShow:function(){$('.js-anonymous-delivery-address-init-click').click()},bindPickupUnavailableMessage:function(){$('#unavailable-pickup').off('click');$('#unavailable-pickup').on('click',function(e){e.preventDefault();e.stopPropagation();let message='<div class="alert neutral"><div class="message-icon"><i class="icon-close"></i></div><span class="message">';message+=HB.checkout.pickupProductNotAvailableForLocationMessage;message+='</span><div class="pull-right gm-close-icon mrm"><i class="icon-close"></i></div></div>';HB.SimpleCheckoutConfig.showGlobalMessage(message);});}};;HB.MyAccount={debug:0,DashboardCache:[],DetailsCache:[],FIRST_PARAMETER_NAME:"p1",SECOND_PARAMETER_NAME:"p2",init:function(){$(".entry-point.clickable").click(HB.MyAccount.onContentLoadClick);HB.MyAccount.setInitialContentLoad();HB.MyAccount.setupCustomSelect2AttributeForDeliveryModeDropdown();HB.MyAccount.setupCustomSelect2AttributeForWorkersDropdown();HB.MyAccount.bindSelect2MousewheelScroll();},onAfterContentLoad:function(data){var viewportName=HB.ViewportChange.getViewport().name;var $content=$('#accountContent');if($content.find('.js-top-articles-content').length){HB.TopArticle.fadeEachElement($(".
1693js-top-articles-content"));HB.TopArticle.bindListener($(".js-top-articles-content"));HB.ListItem.init();}
1694if($content.find('.user-account-content').length){if(viewportName==='xs'){HB.MyAccount.showReducedNavOnUserAccount();}
1695$content.find('.user-account-tiles .inner:not(.notClickable)').on('click',HB.MyAccount.onTilesInnerClick);HB.MyAccount.openUserAccountSubpageByUrlParameter();}
1696if($content.find('.order-history').length){HB.Orders.init();HB.MyAccount.orderHistoryTooltip();$content.find('.js-order-details').on('click',HB.MyAccount.onOrderDetailsLoadClick);HB.MyAccount.bindPaginationBar();$content.find('.js-apply-filter').on('click',HB.MyAccount.onOrderFilterSubmit);$content.find(".order-sort-arrow").on('click',HB.MyAccount.onOrderFilterSort);}
1697if($content.find('.documents').length){HB.Documents.accountCollapse('.collapse-openItem');HB.Documents.init();HB.Documents.datepickerDocumentsList();HB.Documents.accountCollapse('.collapse-documentsListInfo');$content.find('.js-document-details').on('click',HB.MyAccount.onDocumentDetailsLoadClick);HB.MyAccount.bindPaginationBar();$content.find('.js-apply-filter').on('click',HB.MyAccount.onDocumentFilterSubmit);$content.find('.order-sort-arrow').on('click',HB.MyAccount.onDocumentFilterSort);let documentType=$('#js-documents-list-type').attr('value')
1698HB.MyAccount.debug>0?console.log(data):null;HB.MyAccount.debug>0?console.log(`Returned documentType: ${documentType}`):null;documentType==""?$('#documentTypes').val(''):this.onDocumentFilterTypeChange($('#js-documents-list-type').attr('value'));}
1699if($content.find('.wishlist-list').length){$content.find('.js-wishlist-details').on('click',HB.MyAccount.onWishlistDetailsLoadClick);$content.find('.js-wishlist-cancel-submit').on('click',HB.MyAccount.onWishlistDeleteSubmitClick);$content.find('.js-new-wishlist-submit').on('click',HB.MyAccount.onNewWishlistSubmit);HB.Wishlist.list.init();}
1700if($content.find('#site-cockpit-container').length){HB.SiteCockpit.init();}},onWishlistDeleteSubmitClick:function(){event.preventDefault();HB.MyAccount.getAjaxContent(null,$(this).closest('form'));HB.MyAccount.scrollToEntryPoints();},onAfterContentDetailLoad:function(documentDownloadUrl,deliveryWishdate){var $content=$('#accountContent');if($content.find('.documents').length){var phone=$('#contact-phone').data("phone");var email=$('#contact-mail').data("mail");$content.find('a.document-position-contact').each(function(){var $contactfield=$(this);if(phone){$contactfield.attr("href","tel:"+phone);$contactfield.find(".js-phone").removeClass("hidden");$contactfield.tooltip();}else{if(email){$contactfield.attr("href","mailto:"+email);$contactfield.find(".js-email").removeClass("hidden");$contactfield.tooltip();}}});HB.ListItem.init();HB.Documents.updateOfferButtonsOnQtyChange();}
1701if($content.find('.order-history').length){HB.ListItem.init();}
1702$content.find('.js-add-all-to-cart').on('click',HB.MyAccount.onOrdersAddAllProductstoCartClick);
1702if($content.find('.wishlist-edit').length){HB.Wishlist.init();}
1703$content.find('.js-document-origin').on('click',HB.MyAccount.onDocumentOriginSubmit);if(documentDownloadUrl){$content.find('.detail-document-link').attr('href',documentDownloadUrl);$content.find('.document-detail-download').removeClass('hidden');}
1704if(deliveryWishdate){$content.find('.js-delivery-wishdate').append(deliveryWishdate);$content.find('.wishdate-wrapper').removeClass('invisible');}},onAfterUserAccountContentLoad:function(){HB.MyAccount.bindUserAccountContentClick();var $userAccountContent=$('#userAccountContent');if($userAccountContent.hasClass('accountProfileEdit')){HB.Utils.checkFormChanges("#updateProfileForm input, #updateProfileForm select",".hb-action .btn-primary");}
1705if($userAccountContent.hasClass('accountChangePassword')){HB.Utils.checkFormChanges("#updatePasswordForm input, #updatePasswordForm select",".hb-action .btn-primary");HB.AccountLogin.bindShowPasswordAsPlainText();}
1706if($userAccountContent.hasClass('accountEditCraftsmanfinder')){HB.Utils.checkFormChanges("#editCraftsmanfinderForm input, #editCraftsmanfinderForm select, #editCraftsmanfinderForm textarea",".hb-action .btn-primary");HB.craftsmanfinder.initEditPage();HB.MyAccount.hideAccountContentLoader();}
1707if($userAccountContent.find('.price-toggle').length>0){HB.MyAccount.initPriceToggle();}
1708if($userAccountContent.hasClass('accountUnitManageUsers')){HB.ManageUsers.init();$('.collapse-userMoreInfo').collapse();HB.AccountLogin.bindShowPasswordAsPlainText();}
1709if($userAccountContent.hasClass('accountUnitUserAddEditForm')){HB.Utils.checkFormChanges("#b2BCustomerForm input, #b2BCustomerForm select",".hb-action .btn-primary");HB.FormValidation.init();}
1710if($userAccountContent.hasClass('accountManagePermissions')||$userAccountContent.hasClass('accountUnitUserPermissions')){HB.Permissions.init();HB.Utils.checkFormChanges("#b2BPermissionForm input, #b2BPermissionForm select",".hb-action .btn-primary");}
1711if($userAccountContent.hasClass('accountManagePermissionAdd')||$userAccountContent.hasClass('accountManagePermissionEdit')){HB.Utils.checkFormChanges("#b2BPermissionForm input, #b2BPermissionForm select",".hb-action .btn-primary");}
1712if($userAccountContent.hasClass('accountUnitAddressBook')){HB.Address.init();}
1713if($userAccountContent.hasClass('accountOrderApprovalDashboard')||$userAccountContent.hasClass('accountOrderApprovalDetails')){HB.Approval.init();HB.Orders.init();}
1714if($userAccountContent.hasClass('accountBomHistory')){HB.CompletedForms.init();}
1715HB.RoleSelection.initInfoIcon();},onBeforeUserAccountContentLoad:function(){HB.MyAccount.showAccountContentLoader();HB.Message.removeGlobalMessage();$("#userAccountContent").empty();if(HB.ViewportChange.getViewport().name==='xs'){HB.MyAccount.scrollToUserAccountContent();}},onTilesInnerClick:function(event){HB.MyAccount.debug>0?console.log("click on ",event):null;HB.MyAccount.showReducedNavOnUserAccount();var $entry=$(event.currentTarget);$(".user-account-tiles .inner").each(function(index,element){if($(element).hasClass('active')){$(element).removeClass('active');}});$entry.addClass('active');var url=$(event.currentTarget).data('url');if(url)HB.MyAccount.getUserAccountContent(url,null);event.preventDefault();},onTilesGoBackClick:function(event){HB.MyAccount.debug>0?console.log("click on ",event):null;if(HB.ViewportChange.getViewport().name==='xs'){$(".entry-point").each(function(index,element){if($(element).hasClass('active')){$(element).removeClass('active');}});HB.MyAccount.setVisibilityForEntryPoints();$("#accountContent").empty();}},onContentLoadClick:function(event){var $entry=$(event.currentTarget);if(HB.ViewportChange.getViewport().name==='xs'&&$entry.hasClass('active')){HB.MyAccount.onTilesGoBackClick(event);}else{$(".entry-point").each(function(index,element){if($(element).hasClass('active')){$(element).removeClass('active');}});$entry.addClass('active');if(HB.ViewportChange.getViewport().name==='xs'){HB.MyAccount.setVisibilityForEntryPoints();}
1716var url=$entry.data('url');if(url)HB.MyAccount.getAjaxContent(url);}},onPageInputBlur:function(event){var $input=$(event.currentTarget);if($input.val()!=$input.data('value')){if(HB.MyAccount.debug>0){console.log($input.val()+' '+$input.data('value'));console.log((typeof $input.val())+' '+(typeof $input.data('value')));}
1717var url=$input.data('url')+'&'+$input.data('param')+'='+$input.val();HB.MyAccount.getAjaxContent(url);}},onPageInputKeyPress:function(event){var $input=$(event.currentTarget);if(event.keyCode===13&&$input.val()!=$input.data('value')){var url=$input.data('url')+'&'+$input.data('param')+'='+$input.val();var target=$(event.currentTarget).data('target');if(url){if(target=='accountContent'){HB.MyAccount.getAjaxContent(url);}else{HB.MyAccount.getUserAccountContent(url,null);}}}},onPageSwitchClick:function(event){var $button=$(event.currentTarget);var url=$button.data('url');HB.MyAccount.getAjaxContent(url);},onActionInWishlistClick:function(event){if(!event){event=window.event;}
1718var $button=$(event.currentTarget);var url=$button.data('url');HB.MyAccount.getAjaxContentForWishlist(url);},onDocumentFilterSubmit:function(event){var $button=$(event.currentTarget);var $form=$button.closest('form');if(!$('#fromDate').val()||!$('#toDate').val()){HB.MyAccount.setDefaultFromAndToDate()}
1719var url=$form.attr('action')+'&'+$form.serialize();HB.MyAccount.getAjaxContent(url);},onDocumentFilterSort:function(event){let sortValue=$(event.currentTarget).data('value');let $form=$('.documents').find('#filterTyp_form');let url=$form.attr('action')+'&'+$form.serialize()+'&'+'sort='+sortValue;HB.MyAccount.getAjaxContent(url);},onOrderFilterSubmit:function(event){var $button=$(event.currentTarget);var $form=$button.closest('form');var url=$form.attr('action')+'&'+$form.serialize();HB.MyAccount.getAjaxContent(url);},onOrderFilterSort:function(event){let sortValue=$(event.currentTarget).data('value');let $form=$('.order-history').find('#filterTyp_form');let url=$form.attr('action')+'&'+$form.serialize()+'&'+'sort='+sortValue;HB.MyAccount.getAjaxContent(url);},onDocumentOriginSubmit:function(event){event.preventDefault();var $button=$(event.currentTarget);var url=$button.data('url');HB.MyAccount.getAjaxContent(url);},onNewWishlistSubmit:function(event){event.preventDefault();var $button=$(event.currentTarget);var $form=$button.closest('form');var nameVal=$form.find('input[name ="name"]').val();if(nameVal==''){$form.find('input[name ="name"]').closest('.form-group').addClass('error');return;}
1720if($('#entryPointWishlist').data('url')){HB.MyAccount.removeEntryFromDashboardCache($('#entryPointWishlist').data('url'));}
1721HB.MyAccount.getAjaxContent(null,$form);},onOrderDetailsLoadClick:function(event){var $button=$(event.currentTarget);var $wrapper=$button.closest('.js-order-history-entry-wrapper');if($wrapper.hasClass('expanded')){HB.MyAccount.closeDetails('.js-order-history-entry-wrapper');HB.Utils.scrollToElement($wrapper);
1721$($wrapper).find('.js-extended-details').addClass('hidden');$($wrapper).find('.order-history-total').addClass('hidden');}
1722else{$($wrapper).find('.order-history-total').removeClass('hidden');$('.order-history').find('.js-extended-details').addClass('hidden');$($wrapper).find('.js-extended-details').removeClass('hidden');var url=$button.data('url');HB.MyAccount.getAjaxDetails(url,$wrapper,'.js-order-history-entry-wrapper',null,null);HB.MyAccount.hideOrderTotals();}},hideOrderTotals:function(){$('.order-history').find('.js-order-history-entry-wrapper').each(function(){if(!$(this).hasClass('expanded')){$(this).find('.order-history-total').addClass('hidden');}});},onWishlistDetailsLoadClick:function(event){var $button=$(event.currentTarget);var $wrapper=$button.closest('.js-wishlist-entry-wrapper');if($wrapper.hasClass('expanded')){HB.MyAccount.closeDetails('.js-wishlist-entry-wrapper');HB.Utils.scrollToElement($wrapper);}
1723else{var url=$wrapper.data('detail-url');HB.MyAccount.getAjaxDetails(url,$wrapper,'.js-wishlist-entry-wrapper',null,null);}},onDocumentDetailsLoadClick:function(event){var $button=$(event.currentTarget);var $wrapper=$button.closest('.js-document-entry-wrapper');let documentDownloadUrl=$(event.currentTarget).closest('.detail-order-link').data('dms-download');let deliveryWishdate=$(event.currentTarget).closest('.detail-order-link').data('wishdate');$('.js-order-info').addClass('order-info')
1724if($wrapper.hasClass('expanded')){HB.MyAccount.closeDetails('.js-document-entry-wrapper');HB.Utils.scrollToElement($wrapper);}
1725else{var url=$button.data('url');HB.MyAccount.getAjaxDetails(url,$wrapper,'.js-document-entry-wrapper',documentDownloadUrl,deliveryWishdate);$wrapper.find('.js-order-info').removeClass('order-info')}},onOrdersAddAllProductstoCartClick:function(event){var $container=$(event.currentTarget).closest('.js-panel-details');HB.MyAccount.sendProductsToCart($container);},onUserAccountContentClick:function(event){if(!event){event=window.event;}
1726event.preventDefault();HB.MyAccount.debug>0?console.log("click on ",event):null;var url=$(event.currentTarget).data('url');var target=$(event.currentTarget).data('target');if(url){if(target=='accountContent'){HB.MyAccount.getAjaxContent(url);}else{HB.MyAccount.getUserAccountContent(url,null);}}},onFormSubmitInUserAccountContent:function(event){HB.MyAccount.debug>0?console.log("click on ",event):null;HB.FormValidation.checkAtLeastOnCheckboxChecked();event.preventDefault();if(!HB.FormValidation.formIsValid)return;var $element=$(event.currentTarget);if($element.is('form')){HB.MyAccount.getUserAccountContent(null,$element);}else if($element.closest('form')){HB.MyAccount.getUserAccountContent(null,$element.closest('form'));}},onBackToMenuClick:function(){$("#userAccountContent").html("");if(HB.ViewportChange.getViewport().name!=='xs'){HB.MyAccount.showFullNavOnUserAccount();}},ShiftingContactPerson:function(){if($("body").hasClass("template-pages-AccountPageTemplate")){if(HB.ViewportChange._viewport.name=='xs'){$(HB.ViewportChange._contactPersonContainer).appendTo(HB.ViewportChange._cpAppendContainer);}
1727if(HB.ViewportChange._viewport.name=='sm'){$("#account-nav").after(HB.ViewportChange._contactPersonContainer);}}},displayResponseMessage:function(parsedResult){HB.MiniCart.refreshMiniCartCount();var wishlistPosMessage=$("#layer-positive-message");var wishlistNegMessage=$("#layer-negative-message");var wishlistMessage=wishlistNegMessage.find(".message");wishlistNegMessage.hide();wishlistPosMessage.hide();if(null!==parsedResult.success&&undefined!==parsedResult.success&&null!==parsedResult.message&&undefined!==parsedResult.message)
1728{if(parsedResult.success=="true"){var wishlistMessage=wishlistPosMessage.find(".message");if(null!==wishlistPosMessage&&undefined!==wishlistPosMessage&&null!==wishlistNegMessage&&undefined!==wishlistNegMessage&&null!==wishlistMessage&&undefined!==wishlistMessage)
1729{wishlistMessage.html(parsedResult.message);wishlistPosMessage.show();wishlistNegMessage.hide();}}else{var wishlistMessage=wishlistNegMessage.find(".message");
1729if(null!==wishlistPosMessage&&undefined!==wishlistPosMessage&&null!==wishlistNegMessage&&undefined!==wishlistNegMessage&&null!==wishlistMessage&&undefined!==wishlistMessage)
1730{wishlistMessage.html(parsedResult.message);wishlistNegMessage.show();wishlistPosMessage.hide();}}}},setInitialContentLoad:function(){if($('.entry-point').length){var isEntryPointOpenByUrlParameter=HB.MyAccount.openEntryPointByUrlParameter();if(!isEntryPointOpenByUrlParameter){if(HB.ViewportChange.getViewport().name!=='xs'){$('.entry-point:first').click();}}}},openEntryPointByUrlParameter:function(){if($('.entry-point').length){var firstLevel=HB.MyAccount.getUrlParameterByKey(HB.MyAccount.FIRST_PARAMETER_NAME);if(firstLevel&&firstLevel!==''){HB.MyAccount.removeUrlParameterByKey(HB.MyAccount.FIRST_PARAMETER_NAME);var $entryPointFirstLevel=$('.entry-point[data-url$='+firstLevel+']');if($entryPointFirstLevel.length){$entryPointFirstLevel.click();return true;}}}
1731return false;},openUserAccountSubpageByUrlParameter:function(){if($('.user-account-tiles').length){var secondLevel=HB.MyAccount.getUrlParameterByKey(HB.MyAccount.SECOND_PARAMETER_NAME);if(secondLevel&&secondLevel!==''){HB.MyAccount.removeUrlParameterByKey(HB.MyAccount.SECOND_PARAMETER_NAME);var $userAccountSubpageLink=$('.user-account-tiles [data-url$='+secondLevel+']');if($userAccountSubpageLink.length){$userAccountSubpageLink.click();return true;}}}
1732return false;},getAjaxContent:function(targetUrl,$form){HB.MyAccount.debug>0?console.log("HB.MyAccount.getAjaxContent()",targetUrl,$form):null;$("#accountContent").empty();HB.Message.removeGlobalMessage();if(typeof HB.MyAccount.DashboardCache==='undefined'){HB.MyAccount.DashboardCache=[];}
1733if(typeof HB.MyAccount.DashboardCache[targetUrl]==='undefined'){HB.MyAccount.showAccountContentLoader();var type="GET";var data=null;if($form&&$form.attr('action')){if($form.attr('method')&&$form.attr('method')!==''){type=$form.attr('method');}
1734targetUrl=$form.attr('action');data=$form.serialize();}
1735$.ajax({type:type,data:data,url:targetUrl,dataType:'json',timeout:HB.config.ajax.timeout,headers:{'X-Ajax-NoRedirect':'true'},success:function(data){HB.MyAccount.debug>0?console.log("HB.MyAccount.getAjaxContent() ajax --> success. data",data):null;if(typeof $form==='undefined'){HB.MyAccount.DashboardCache[targetUrl]=data.html;}
1736$("#accountContent").html(data.html);HB.Message.addGlobalMessageByGivenAjaxData(data,true);if(data.globalMessagesHtml){HB.Utils.scrollToElement($("#globalMessages"));}
1737HB.MyAccount.onAfterContentLoad(data);},error:function(xhr,status,error){HB.MyAccount.debug>0?console.log(xhr,status,error):null;if(!HB.MyAccount.checkResponseToHardLogin(xhr)){HB.MyAccount.onAccountContentAjaxError(status);}},complete:function(){HB.MyAccount.hideAccountContentLoader();}});}else{$("#accountContent").html(HB.MyAccount.DashboardCache[targetUrl]);HB.MyAccount.onAfterContentLoad();}},getAjaxDetails:function(targetUrl,$wrapper,entryClass,documentDownloadUrl,deliveryWishdate){HB.MyAccount.debug>0?console.log("HB.MyAccount.getAjaxContent()",targetUrl):null;var $currentDetails=$wrapper.find('.js-panel-details');if($currentDetails.length===1&&$currentDetails.html()===''){HB.MyAccount.closeDetails(entryClass);HB.MyAccount.openDetails($wrapper,$currentDetails);if(typeof HB.MyAccount.DetailsCache==='undefined'){HB.MyAccount.DetailsCache=[];}
1738if(typeof HB.MyAccount.DetailsCache[targetUrl]==='undefined'){$.ajax({url:targetUrl,dataType:'json',headers:{'X-Ajax-NoRedirect':'true'},success:function(data){HB.MyAccount.debug>0?console.log("HB.MyAccount.getAjaxDetails() ajax --> success. data",data):null;HB.MyAccount.DetailsCache[targetUrl]=data.content;HB.MyAccount.replaceDetails(data.content,$wrapper,$currentDetails,entryClass,documentDownloadUrl,deliveryWishdate);HB.Message.addGlobalMessageByGivenAjaxData(data,true);if(data.globalMessagesHtml){HB.Utils.scrollToElement($("#globalMessages"));}},error:function(xhr,status,error){HB.MyAccount.debug>0?console.log(xhr,status,error):null;HB.MyAccount.checkResponseToHardLogin(xhr);}});}else{HB.MyAccount.replaceDetails(HB.MyAccount.DetailsCache[targetUrl],$wrapper,$currentDetails,entryClass,documentDownloadUrl,deliveryWishdate);}}},submitWishlistDetailsForm:function($form,$wrapper,entryClass){HB.MyAccount.debug>0?console.log("HB.MyAccount.submitDetailsForm()",$form):null;if($wrapper.length&&$wrapper.data('detail-url')){HB.MyAccount.removeEntryFromDetailsCache($wrapper.data('detail-url'));}
1739if($('#entryPointWishlist').data('url')){HB.MyAccount.removeEntryFromDashboardCache($('#entryPointWishlist').data('url'));}
1740var $currentDetails=$wrapper.find('.js-panel-details');if($currentDetails.length&&$form&&$form.attr('action')){var $imgElement=$('<img />',{src:$currentDetails.data('loader'),class:'detail-loader',alt:'Detail Loader'});
1740$currentDetails.html($imgElement);var type="GET";if($form.attr('method')&&$form.attr('method')!==''){type=$form.attr('method');}
1741$.ajax({type:type,data:$form.serialize(),url:$form.attr('action'),dataType:'json',success:function(data){HB.MyAccount.debug>0?console.log("HB.MyAccount.submitWishlistDetailsForm() ajax --> success. data",data):null;if('html'in data){HB.MyAccount.DashboardCache[$('#entryPointWishlist').data('url')]=data.html;HB.MyAccount.closeDetails(entryClass);HB.Utils.scrollToElement($wrapper);$("#accountContent").html(data.html);HB.MyAccount.onAfterContentLoad(data);}else if('content'in data){if($wrapper.length&&$wrapper.data('detail-url')){HB.MyAccount.DetailsCache[$wrapper.data('detail-url')]=data.content;}
1742HB.MyAccount.replaceDetails(data.content,$wrapper,$currentDetails,entryClass,null,null);}},error:function(xhr,status,error){HB.MyAccount.debug>0?console.log(xhr,status,error):null;if(!HB.MyAccount.checkResponseToHardLogin(xhr)){var statusText="";if(status==='timeout'){statusText=HB.translations.general.modalErrorTimeout;}else{statusText=HB.translations.general.modalError;}
1743$currentDetails.html("<h2 class='center'>"+statusText+"</h2>");HB.Message.onAjaxError(status);}}});}},closeDetails:function(entryClass){$(entryClass).removeClass('expanded');$('.js-panel-details').html('');$('.js-safety-prompt').each(function(index,value){$(value).addClass(($(value).hasClass('hidden'))?'':'hidden');});},openDetails:function($wrapper,$currentDetails){$wrapper.addClass('expanded');var $imgElement=$('<img />',{src:$currentDetails.data('loader'),class:'detail-loader',alt:'Detail Loader'});$currentDetails.html($imgElement);$('html, body').animate({'scrollTop':$wrapper.offset().top-170},'slow');},replaceDetails:function(content,$wrapper,$currentDetails,entryClass,documentDownloadUrl,deliveryWishdate){$currentDetails.html(content);HB.MyAccount.onAfterContentDetailLoad(documentDownloadUrl,deliveryWishdate);},getUserAccountContent:function(targetUrl,$form){HB.MyAccount.debug>0?console.log("HB.MyAccount.getUserAccountContent()",targetUrl,$form):null;HB.MyAccount.onBeforeUserAccountContentLoad();var type="GET";var data=null;if($form&&$form.attr('action')){if($form.attr('method')&&$form.attr('method')!==''){type=$form.attr('method');}
1744targetUrl=$form.attr('action');data=$form.serialize();}
1745$.ajax({type:type,data:data,url:targetUrl,dataType:'json',timeout:HB.config.ajax.timeout,success:function(data){HB.MyAccount.debug>0?console.log("HB.MyAccount.getUserAccountContent() ajax --> success. data",data):null;$("#userAccountContent").removeClass();if(data.page){$("#userAccountContent").addClass(data.page);}
1746if(data.page&&data.page=='successResponseFragment'){$("#userAccountContent").html('<p>'+data.localizedMessage+'</p>');}else{$("#userAccountContent").html(data.html);HB.MyAccount.onAfterUserAccountContentLoad(data);}
1747HB.Message.addGlobalMessageByGivenAjaxData(data,true);},error:function(xhr,status,error){HB.MyAccount.debug>0?console.log(xhr,status,error):null;if(!HB.MyAccount.checkResponseToHardLogin(xhr)){var statusText="";if(status==='timeout'){statusText=HB.translations.general.modalErrorTimeout;}else{statusText=HB.translations.general.modalError;}
1748$("#userAccountContent").html("<h2 class='center'>"+statusText+"</h2>");HB.Message.onAjaxError(status);}},complete:function(){HB.MyAccount.hideAccountContentLoader();HB.Utils.hideModalPopup();HB.MyAccount.scrollToUserAccountContent();}});},sendProductsToCart:function($container){var data={cartEntries:[]};var url=$container.data('url');$container.find('form').each(function(index,element){var entry={};entry['entryNumber']=$(element).find('input[name=entryNumber]').val();entry['sku']=$(element).find('input[name=productCode]').val();entry['quantity']=parseFloat($(element).find('input[name=qty]').val());entry['unit']=$(element).find('select[name=unit]').val();data.cartEntries.push(entry);});HB.Utils.displayModalPopupLoading('modal-md');$.ajax({url:url,type:'POST',dataType:'json',contentType:'application/json; charset=utf-8',data:JSON.stringify(data),success:function(data){HB.MyAccount.displayResponseMessage(data.cartGlobalMessagesHtml);
1748HB.Utils.displayModalPopup(data.addToCartPopup.content,'modal-md');HB.Product.hideAddToCartPopup();},error:function(xhr,status,error){HB.MyAccount.debug>0?console.log(xhr,status,error):null;HB.MyAccount.debug>0?console.log("xhr.responseText",xhr.responseText):null;HB.Utils.hideModalPopup();}})},bindUserAccountContentClick:function()
1749{if($("#userAccountContent").length){$("#userAccountContent .page-size-form input").off('click',"**");$("#userAccountContent .page-size-form input").on('click',HB.MyAccount.onFormSubmitInUserAccountContent);$("#userAccountContent [type='submit']").off('click',"**");$("#userAccountContent [type='submit']:not([data-prevent-global-submit-listener])").on('click',HB.MyAccount.onFormSubmitInUserAccountContent);$("#userAccountContent [data-url]:not(input)").off('click',"**");$("#userAccountContent [data-url]:not(input)").on('click',HB.MyAccount.onUserAccountContentClick);$("#userAccountContent .js-input-page").off('keypress','**');$("#userAccountContent .js-input-page").on('keypress',HB.MyAccount.onPageInputKeyPress);}},bindPaginationBar:function()
1750{var $content=$('#accountContent');$content.find('.js-input-page').on('blur',HB.MyAccount.onPageInputBlur);$content.find('.js-input-page').on('keypress',HB.MyAccount.onPageInputKeyPress);$content.find('.js-btn-page-prev').on('click',HB.MyAccount.onPageSwitchClick);$content.find('.js-btn-page-next').on('click',HB.MyAccount.onPageSwitchClick);},checkResponseToHardLogin:function(xhr){if(xhr.status&&(xhr.status===401||xhr.status===403)){window.location.replace(HB.config.url.login.page+'?timeout=true');return true;}
1751return false;},showAccountContentLoader:function(cssTopInteger,cssLeftInteger){if($('#accountLoaderImage').length){let topCss=100;if(cssTopInteger&&!isNaN(parseFloat(cssTopInteger))){topCss=cssTopInteger;}else{var $userAccountTiles=$('.user-account-content.reduced-nav .user-account-tiles');if($userAccountTiles.length&&HB.ViewportChange.getViewport().name==='xs'){topCss=$userAccountTiles.outerHeight()+100;}else{var accountContentTop=$('#accountContent').offset().top;var minAccountContentTop=100;var maxAccountContentBottom=$('#accountContent').height()>100?$('#accountContent').height()-100:0;var windowMiddlePositionRelativeToAccountContentElement=$(window).scrollTop()+($(window).height()/2)-accountContentTop;if(windowMiddlePositionRelativeToAccountContentElement<minAccountContentTop){topCss=minAccountContentTop;}else if(windowMiddlePositionRelativeToAccountContentElement>maxAccountContentBottom){topCss=maxAccountContentBottom;}else{topCss=windowMiddlePositionRelativeToAccountContentElement;}}}
1752if(cssLeftInteger&&!isNaN(parseFloat(cssLeftInteger))){$('#accountLoaderImage').css('left',cssLeftInteger+'px');}
1753$('#accountLoaderImage').css('top',topCss+'px');$('#accountLoaderImage').removeClass('hidden');}},hideAccountContentLoader:function(){if($('#accountLoaderImage').length){$('#accountLoaderImage').addClass('hidden');$('#accountLoaderImage').css('top','');}},showReducedNavOnUserAccount:function(){if($("#accountContent .user-account-content").length&&!$("#accountContent .user-account-content").hasClass('reduced-nav')){$("#accountContent .user-account-content").addClass('reduced-nav');}},showFullNavOnUserAccount:function(){if($("#accountContent .user-account-content").length&&$("#accountContent .user-account-content").hasClass('reduced-nav')){$("#accountContent .user-account-content").removeClass('reduced-nav');}},setVisibilityForEntryPoints:function(){var viewportName=HB.ViewportChange.getViewport().name;if(viewportName==='xs'&&$(".entry-point.active").length){$(".entry-point").each(function(index,element){if($(element).hasClass('active')){$(element).show();}else{$(element).hide();}});}else{$(".entry-point").show();}},getUrlParameterByKey:function(key){if(key&&key!==''){var url=window.location.href;if(key&&url.includes("?")){if(url.includes(key+"=")&&url.split(key+"=")[1]&&url.includes("&")){var subString=url.split(key+"=")[1];if(subString.split("&")[0]){var splitSubString=subString.split("&")[0];if(!splitSubString.includes("?")&&!splitSubString.includes("=")&&!splitSubString.includes("&")){return splitSubString;}}}else if(url.includes(key+"=")&&url.split(key+"=")[1]){var splitSubString=url.split(key+"=")[1];if(!splitSubString.includes("?")&&!splitSubString.includes("=")&&!splitSubString.includes("&")){return splitSubString;}}}}
1754return false;},removeUrlParameterByKey:function(key){var url=window.location.href;if(key&&url.includes("?")){if(url.includes(key)&&url.includes("&")){window.history.pushState({},"",url.split(key)[0]+url.split("&")[1]);return true;}else{window.history.pushState({},"",url.split("?")[0]);return true;}}
1755return false;},scrollToUserAccountContent:function(){if($('#userAccountContent').length){if(HB.Utils.isPageScrollable()){if(HB.ViewportChange.getViewport().name==='xs'){$('html, body').animate({scrollTop:$('#userAccountContent').offset().top-140},'slow');}else{$('html, body').animate({scrollTop:$('#userAccountContent').offset().top-240},'slow');}}}},scrollToEntryPoints:function(){if($('.my-account-entry-points').length){if(HB.Utils.isPageScrollable()){$('html, body').animate({scrollTop:$('.my-account-entry-points').offset().top-80},'slow');}}},displayLoadingIcon:function(clickedForm){if(clickedForm){var button=$(clickedForm).find("button");$(button).attr('disabled',true);var iconWrapper=$(clickedForm).find(".replaceable-icon");$($(iconWrapper).find("i")).hide();$(iconWrapper).removeClass("icon-wrapper");$(iconWrapper).addClass("displayed-loading-icon");$($(iconWrapper).find(".loading-image")).show();}},removeLoadingIcon:function(clickedForm){if(clickedForm){var button=$(clickedForm).find("button");$(button).attr('disabled',false);var iconWrapper=$(clickedForm).find(".replaceable-icon");$(iconWrapper).addClass("icon-wrapper");$(iconWrapper).removeClass("displayed-loading-icon");$($(iconWrapper).find(".loading-image")).hide();$($(iconWrapper).find("i")).show();}},removeEntryFromDashboardCache:function(targetUrl){if(targetUrl&&typeof HB.MyAccount.DashboardCache!=='undefined'&&typeof HB.MyAccount.DashboardCache[targetUrl]!=='undefined'){delete HB.MyAccount.DashboardCache[targetUrl];}},removeEntryFromDetailsCache:function(targetUrl){if(targetUrl&&typeof HB.MyAccount.DetailsCache!=='undefined'&&typeof HB.MyAccount.DetailsCache[targetUrl]!=='undefined'){delete HB.MyAccount.DetailsCache[targetUrl];}},onAccountContentAjaxError:function(_status){var statusText="";if(_status==='timeout'){statusText=HB.translations.general.modalErrorTimeout;}else{statusText=HB.translations.general.modalError;}
1756$("#accountContent").html("<h2 class='center'>"+statusText+"</h2>");HB.Message.onAjaxError(_status);},orderHistoryTooltip:function(){$('body').on('click touchend',function(e){$('.popover-history-tooltip').each(function(){if(!$(this).is(e.target)&&$(this).has(e.target).length===0&&$('.popover').has(e.target).length===0){$(this).popover('hide');}});});$('.popover-history-tooltip').on('click',function(event){event.stopPropagation();$(this).popover();});},setupCustomSelect2AttributeForDeliveryModeDropdown:function(){$(document).on('select2:open','#deliveryModes',function(){setTimeout(function(){$('.
1756select2-container--open').attr('data-custom-dropdown','delivery-modes');},0);});},setupCustomSelect2AttributeForWorkersDropdown:function(){$(document).on('select2:open','#customerIds',function(){setTimeout(function(){var $container=$('.select2-container--open');$container.attr('data-custom-dropdown','customerIds');$container.find('.select2-search__field').addClass('custom-search-field-for-customerIds');},0);});},onDocumentFilterTypeChange:function(documentType){if(HB.MyAccount.debug)console.log(`Changed filter to ${documentType}`)
1757let $toDateElement=$('#toDate');let $fromDateElement=$('#fromDate');if($('#fromDate').is(':disabled')){HB.MyAccount.setDefaultFromAndToDate();}
1758$toDateElement.prop('disabled',false);$fromDateElement.prop('disabled',false);$('#orderNumberFilter').val('');$('#documentNumberFilter').val('');$('#documentFilterSubmit').prop('disabled',false);$('.js-order-number-min-input-warning').hide();$('.js-document-number-min-input-warning').hide();},initPriceToggle:function(){var $priceToggle=$('#priceToggle');
1758if($priceToggle.length===0){return;}
1759$priceToggle.off('change');$priceToggle.on('change',function(){var showPriceForCustomer=$(this).is(':checked');$priceToggle.prop('disabled',true);HB.MyAccount.updateToggleVisuals(showPriceForCustomer);HB.MyAccount.updatePriceDisplay(showPriceForCustomer,$(this));});},updatePriceDisplay:function(showPriceForCustomer,$toggleElement){if(typeof HB==='undefined'||typeof HB.config==='undefined'||typeof HB.config.contextPath==='undefined'){this.revertToggle($toggleElement,!showPriceForCustomer);return;}
1760var url=HB.config.contextPath+'/my-account/update-price-display';$.ajax({url:url,type:'POST',dataType:'json',data:{showPriceForCustomer:showPriceForCustomer},success:function(response){HB.MyAccount.updateToggleText(showPriceForCustomer);if(showPriceForCustomer===true){HB.config.showPrice="netto";}else{HB.config.showPrice="";}
1761$toggleElement.prop('disabled',false);},error:function(xhr,status,error){HB.MyAccount.revertToggle($toggleElement,!showPriceForCustomer);$toggleElement.prop('disabled',false);}});},revertToggle:function($toggleElement,state){if($toggleElement&&$toggleElement.length){$toggleElement.prop('checked',state);this.updateToggleVisuals(state);}},updateToggleText:function(showPriceForCustomer){var textElement=$('#priceToggleText');if(textElement.length===0){return;}
1762var showText=textElement.data('show-text');var hideText=textElement.data('hide-text');var newText=showPriceForCustomer?showText:hideText;textElement.text(newText);},updateToggleVisuals:function(state){var $switch=$('label[for="priceToggle"]');$switch.toggleClass('On',state).toggleClass('Off',!state);},setDefaultFromAndToDate:function(){const months=["Jan.","Feb.","Mar.","Apr.","Mai","Jun.","Jul.","Aug.","Sept.","Okt.","Nov.","Dez."];const today=new Date();const currentYear=today.getFullYear();const currentMonth=today.getMonth();const formattedFromDate=`${months[currentMonth]} ${currentYear.toString().slice(-2)}`;$('#fromDate').val(formattedFromDate);const lastDayOfMonth=new Date(currentYear,currentMonth+1,0);const lastDate=lastDayOfMonth.getDate();const formattedToDate=`${lastDate.toString().padStart(2, '0')}.${(currentMonth + 1).toString().padStart(2, '0')}.${currentYear}`;$('#toDate').val(formattedToDate);},bindSelect2MousewheelScroll:function(){if(HB.Orders._select2WheelBound){return;}
1763HB.Orders._select2WheelBound=true;var scrollSpeedMultiplier=0.4;document.addEventListener('wheel',function(e){var $dropdown=$(e.target).closest('.select2-dropdown');if(!$dropdown.length){return;}
1764var el=$dropdown.get(0);if(!el||el.scrollHeight<=el.clientHeight){return;}
1765var deltaY=0;if(typeof e.deltaY==='number'){deltaY=e.deltaY;}
1766if(deltaY===0){return;}
1767deltaY=deltaY*scrollSpeedMultiplier;var atTop=el.scrollTop<=0;var atBottom=(el.scrollTop+el.clientHeight)>=(el.scrollHeight-1);var scrollingUp=deltaY<0;var scrollingDown=deltaY>0;if((scrollingUp&&atTop)||(scrollingDown&&atBottom)){return;}
1768el.scrollTop=el.scrollTop+deltaY;e.preventDefault();},{passive:false,capture:true});}};;HB.FormValidation={formIsValid:false,requiredFields:null,requiredFieldSet:null,submitButton:$('[type=submit]'),globalMessages:$('#globalMessages'),errorMessage:'<p class="form-error">'+HB.translations.general.requiredError+'</p>',errorMessageOneChecked:'<div class="help-inline"><span id="email.errors">'+HB.translations.general.errorMessageOneChecked+'</span></div>',contactMailInvalidErrorMessage:'<p class="form-error">'+HB.translations.general.contactMailInvalidError+'</p>',fileSizeErrorMessage:'<p class="form-error">'+HB.translations.general.fileSizeError+'</p>',invalidFields:[],cssClassError:'error',debug:0,init:function(){HB.FormValidation.requiredFields=$('.required-field:not(:disabled)');HB.FormValidation.requiredFieldSet=$('.required-fieldset:not(:disabled)');},initConditional:function(target){HB.FormValidation.requiredFields=$(target).find(' .required-field:not(:disabled)');},checkRequiredFields:function(){$('.form-error').remove();HB.FormValidation.invalidFields=[];if(HB.FormValidation.requiredFields&&HB.FormValidation.requiredFields!=='null'&&HB.FormValidation.requiredFields!=='undefined'){HB.FormValidation.requiredFields.each(function(index,element){let $element=$(element);HB.FormValidation.removeErrorCssClass($element);if(element.localName!=='div'&&($element.val()=='null'||$element.val()=='')){HB.FormValidation.invalidFields.push($element);if($element.siblings('.select2-container').length){$(HB.FormValidation.errorMessage).insertAfter($element.parent());}else{$(HB.FormValidation.errorMessage).insertAfter($element);}
1769HB.FormValidation.addErrorCssClass($element);}else{let inputs=$element.find('input');let dropdownSelect=$element.find('select');let valid=false;if(inputs.length>0&&dropdownSelect.length===0){let isRadio=inputs.is('input[type="radio"]');if(isRadio){for(let i=0;i<inputs.length;i++){if(inputs[i].checked){valid=true;break;}}}else{let wrapper=$element.find('div.checkbox-list');let maxSelect=wrapper.data('max');let checkedCount=0;for(let i=0;i<inputs.length;i++){if(inputs[i].checked){checkedCount++;
1769if(checkedCount>maxSelect){valid=false;break;}}}
1770if(checkedCount>0&&checkedCount<=maxSelect){valid=true;}}}else if(dropdownSelect.length>0){for(let i=0;i<dropdownSelect.length;i++){if(dropdownSelect[i].value!=''){valid=true;break;}}}else{valid=true;}
1771if(!valid){HB.FormValidation.invalidFields.push($element);if($element.siblings('.select2-container').length){$(HB.FormValidation.errorMessage).insertAfter($element.parent());}else{$(HB.FormValidation.errorMessage).insertAfter($element);}
1772HB.FormValidation.addErrorCssClass($element);}}});HB.FormValidation.checkEMailFields();}
1773if(HB.FormValidation.invalidFields.length>0){HB.FormValidation.showNegativeGlobalMessage(HB.translations.general.formGlobalError);return false;}
1774HB.FormValidation.formIsValid=true;return true;},trimInputValues:function(elementSelector){const $element=$(elementSelector);if($element.is('form')){$element.find('input').each(function(){let $input=$(this);$input.val($.trim($input.val()));});}else if($element.is('input')){$element.val($.trim($element.val()));}},addErrorCssClass:function(_element){let $formGroup=_element.closest('.form-group');if($formGroup){$formGroup.addClass(HB.FormValidation.cssClassError);}},removeErrorCssClass:function(_element){let $formGroup=_element.closest('.form-group');if($formGroup){$formGroup.removeClass(HB.FormValidation.cssClassError);}},checkEMailFields:function(){let checkEMailFields=$('input[type="email"]');$(checkEMailFields).each(function(index,element){let $element=$(element);if($element.val()!='null'&&$element.val()!='')
1775{if(HB.FormValidation.validateEMail($element.val())==false)
1776{HB.FormValidation.invalidFields.push($element);$(HB.FormValidation.contactMailInvalidErrorMessage).insertAfter($element);}}});},checkAtLeastOnCheckboxChecked:function(){HB.FormValidation.formIsValid=true;if(!HB.FormValidation.requiredFieldSet)return;HB.FormValidation.requiredFieldSet.each(function(index,fieldSet){let $checkBoxes=$(fieldSet).find('input.checkbox');let checkBoxChecked=false;for(let i=0;i<$checkBoxes.length;i++){if($checkBoxes[i].checked){checkBoxChecked=true;break;}}
1777HB.FormValidation.removeErrorCssClass($(fieldSet));$(fieldSet).closest('.form-group').find('.help-inline').remove();if(!checkBoxChecked){HB.FormValidation.formIsValid=false;HB.FormValidation.addErrorCssClass($(fieldSet));$(HB.FormValidation.errorMessageOneChecked).insertAfter($(fieldSet).closest('.form-group').find('label')[0]);}});},showNegativeGlobalMessage:function(message){$('.alert',HB.FormValidation.globalMessages).remove();HB.FormValidation.globalMessages.append('<div class="alert neutral"><div class="message-icon"><i class="icon-info"></i></div><span class="message"></span><div class="pull-right gm-close-icon mrm"><i class="icon-close"></i></div></div>');$('.message',HB.FormValidation.globalMessages).text(message);$('#globalMessages')[0].scrollIntoView(false);HB.Message.hideGlobalMessage();},validateDateNotInPast:function($element){let $returnValue=true;if($element){$element.find("input[id*='-date-']").each(function(){$returnValue=HB.FormValidation.runCheckForDateNotInPast($(this));});}else{$("input[id*='-date-']").each(function(){$returnValue=HB.FormValidation.runCheckForDateNotInPast($(this));});}
1778if($element){$element.find("input[id*='Date']").each(function(){$returnValue=HB.FormValidation.runCheckForDateNotInPast($(this));});}else{$("input[id*='Date']").each(function(){$returnValue=HB.FormValidation.runCheckForDateNotInPast($(this));});}
1779return $returnValue;},runCheckForDateNotInPast:function($element){let $returnValue=true;if(!$element.val().length==0){let $inputDate=$element.val();let $inputDateSplit=$inputDate.split('.');let $modifiedInputDate=new Date($inputDateSplit[2],($inputDateSplit[1]-1),$inputDateSplit[0],0,0,0,0).getTime();let $today=new Date();$today.setHours(0);$today.setMinutes(0);$today.setSeconds(0);$today.setMilliseconds(0);$today=$today.getTime();if($modifiedInputDate<$today){HB.FormValidation.showNegativeGlobalMessage("Ein Datum liegt in der Vergangenheit!");$element.closest('.form-group').addClass('error');$returnValue=false;}else if($element.closest('.form-group').hasClass('error')){$element.closest('.form-group').removeClass('error');}}
1780return $returnValue;},validateFileSize:function(form,sizeMB){HB.FormValidation.debug>0?console.log("HB.FormValidation.validateFileSize() form",form,sizeMB):null;let uploadField=$(form).find("input[type=file]");HB.FormValidation.debug>0?console.log("HB.FormValidation.validateFileSize() uploadField",uploadField):null;uploadField.on('change',function(){HB.FormValidation.debug>0?console.log("HB.FormValidation.validateFileSize(): checking size of ",this.files[0]):null;$(this).next('.form-error').remove();if(this.files[0].size>(sizeMB*1048576)){HB.FormValidation.showNegativeGlobalMessage("Die angegebene Datei ist zu groß.");$(HB.FormValidation.fileSizeErrorMessage).insertAfter($(this));this.value="";}});},validateEMail:function(input_mail){let reg=new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)(\\@)([a-zA-Z0-9\\-\\.]+)(\\.)([a-zA-Z]{2,})$');return reg.test(input_mail);}};;
1780HB.LivePrice={debug:0,cssClassTheChosenPrice:'the-chosen-price',init:function(idSuffix,productCode,isNotUseProductDataInScope){const deferredInit=$.Deferred();if(typeof idSuffix==='undefined'){idSuffix=false;}
1781if(typeof productCode==='undefined'){productCode=false;}
1782if(typeof isNotUseProductDataInScope==='undefined'){isNotUseProductDataInScope=false;}
1783HB.LivePrice.debug?console.log("HB.LivePrice.init  >> "+(idSuffix?"idSuffix="+idSuffix:"")):null;if(HB.user.isLoggedIn==='true'&&HB.config.showPrice){HB.LivePrice.showInitialBulks();HB.LivePrice.getLivePriceForProduct(idSuffix,productCode,isNotUseProductDataInScope).done(function(){HB.LivePrice.debug?console.log("HB.LivePrice.getLivePriceForProduct is done!"):null;deferredInit.resolve();});}else if(HB.config.showPrice){HB.LivePrice.showInitialBulks();if(HB.user.isLoggedIn==='true'){HB.LivePrice.getBulksForProduct(idSuffix,productCode);}
1784HB.LivePrice.showListPrice(null,false,idSuffix,isNotUseProductDataInScope).done(function(){HB.LivePrice.debug?console.log("HB.LivePrice.showListPrice is done!"):null;deferredInit.resolve();});}else{HB.LivePrice.showNothing(idSuffix);deferredInit.resolve();}
1785const prom=deferredInit.promise();prom.done(function run(){HB.LivePrice.debug?console.log("CHECKING addToCartButton on PRICE"):null;HB.Product.enableAddToCartButton();});return prom;}
1785,getLivePriceForProduct:function(idSuffix,productCode,isNotUseProductDataInScope){const deferredGetLivePrice=$.Deferred();const showPrice=HB.config.showPrice;if(!showPrice){deferredGetLivePrice.resolve();return deferredGetLivePrice.promise();}
1786var urlLivePrice="";if(productCode){urlLivePrice=HB.config.siteUrl+"p/"+productCode+HB.config.url.product.livePrice;}else{urlLivePrice=document.URL.split("?")[0].split("#")[0]+HB.config.url.product.livePrice;}
1787HB.LivePrice.debug?console.log("HB.LivePrice.getLivePriceForProduct  >> url: "+urlLivePrice):null;$("#js-loading-price"+(idSuffix?idSuffix:"")).removeClass('hidden');$("#loading-price-caption"+(idSuffix?idSuffix:"")).removeClass('hidden');const $yourPrice=$("#js-your-price"+(idSuffix?idSuffix:""));const $bulkWrapper=$yourPrice.find(".bulk-wrapper");const $bulkRow=$bulkWrapper.closest(".row");HB.LivePrice.debug?console.log("Hiding bulk price row during price loading",$bulkRow.length):null;$bulkRow.addClass("hidden");$.ajax({url:urlLivePrice,cache:false,type:'GET',timeout:HB.config.ajax.timeout,success:function(result){HB.LivePrice.onLivePriceForProductResult(result,idSuffix,isNotUseProductDataInScope).done(function(){HB.LivePrice.debug?console.log("HB.LivePrice.onLivePriceForProductResult is done!"):null;if(result&&result.product&&result.product.price&&result.product.price.liveNet&&!result.product.price.liveNet.fallbackPrice&&parseFloat(result.product.price.liveNet.value)>0){if(HB.config.livePriceCallForEachBulkLimitEnabled){HB.LivePrice.debug?console.log("Calling live prices for each bulk limit..."):null;
1787HB.LivePrice.getBulksForProduct(idSuffix,productCode)}
1788else{HB.LivePrice.debug?console.log("Skipping live price call for individual bulks because HB.config.livePriceCallForEachBulkLimitEnabled is false"):null;}}else{HB.LivePrice.debug?console.log("Skipping bulk live price call due to invalid price"):null;let $priceContainer=$("#js-your-price"+(idSuffix?idSuffix:""));$priceContainer.find(".bulk-wrapper").closest(".row").addClass("hidden");}
1789deferredGetLivePrice.resolve();});},error:function(jqXHR,textStatus,errorThrown){HB.LivePrice.onLivePriceForProductError(textStatus,errorThrown,idSuffix).done(function(){HB.LivePrice.debug?console.log("HB.LivePrice.onLivePriceForProductError is done!"):null;deferredGetLivePrice.resolve();});}});return deferredGetLivePrice.promise();},onLivePriceForProductResult:function(_response,idSuffix,isNotUseProductDataInScope){HB.LivePrice.debug?console.log("HB.LivePrice.onLivePriceForProductResult  >> ",_response):null;const deferredOnLivePrice=$.Deferred();if(_response.success){var $manufacturerPrice=$("#js-manufacturer-price"+(idSuffix?idSuffix:""));var $yourPrice=$("#js-your-price"+(idSuffix?idSuffix:""));if(_response.product.price.liveNet){var oldUnitFactor='';var bigUnitFactor='';if(_response.product.price.catalogNet&&_response.product.price.catalogNet.unitFactor!=1){oldUnitFactor=''+(_response.product.price.catalogNet.unitFactor*100).toFixed(0)/100;oldUnitFactor=oldUnitFactor.replace('.',',')+"&nbsp;";}
1790if(_response.product.price.liveNet.unitFactor!=1){bigUnitFactor=''+(_response.product.price.liveNet.unitFactor*100).toFixed(0)/100;bigUnitFactor=bigUnitFactor.replace('.',',')+"&nbsp;";}
1791$yourPrice.find("#loading-price-caption"+(idSuffix?idSuffix:"")).remove();$yourPrice.find("#your-price-caption"+(idSuffix?idSuffix:"")).removeClass('hidden');if(_response.product.price.liveNet.value>0){let productBaseUnit="";let productContentUnit="";if(isNotUseProductDataInScope){try{productContentUnit=_response.product.price.liveNet.unit.symbol?_response.product.price.liveNet.unit.symbol:'';}catch(e){HB.LivePrice.debug?console.log("An Exception was thrown ",e):null;}
1792try{productBaseUnit=_response.product.price.liveBase.unit.symbol?_response.product.price.liveBase.unit.symbol:'';}catch(e){HB.LivePrice.debug?console.log("An Exception was thrown ",e):null;}}else{productBaseUnit=HB.productData.baseUnit;productContentUnit=HB.productData.contentUnit;}
1793const $bigPrice=$yourPrice.find("#js-big-price"+(idSuffix?idSuffix:""));$bigPrice.addClass(HB.LivePrice.cssClassTheChosenPrice);$bigPrice.attr('data-price',_response.product.price.liveNet.value);$bigPrice.html(_response.product.price.liveNet.formattedValue+"<span class='big-price-unit'> / "+bigUnitFactor+productContentUnit+"*</span>").removeClass('hidden');if(productBaseUnit&&productBaseUnit!=productContentUnit&&_response.product.price.liveBase){var baseUnitFactor='';if(_response.product.price.liveBase.unitFactor!=1){baseUnitFactor=''+(_response.product.price.liveBase.unitFactor*100).toFixed(0)/100;baseUnitFactor=baseUnitFactor.replace('.',',')+"&nbsp;";}
1794$yourPrice.find("#base-price"+(idSuffix?idSuffix:"")).html(_response.product.price.liveBase.formattedValue+" / "+baseUnitFactor+productBaseUnit).parent().removeClass("invisible");}
1795if(_response.product.price.liveNet&&_response.product.price.catalogNet&&parseFloat(_response.product.price.liveNet.value)<parseFloat(_response.product.price.catalogNet.value))
1796{const $oldPrice=$yourPrice.find("#old-price"+(idSuffix?idSuffix:""));const oldPriceValue=_response.product.price.catalogNet.formattedValue+" / "+oldUnitFactor+productContentUnit;$oldPrice.html(oldPriceValue).parent().removeClass("invisible");}
1797if(_response.product.price.liveNet.bulks&&_response.product.price.liveNet.bulks.length>0){const $bulkContent=$yourPrice.find("#bulk-price-content");const $bulkRow=$yourPrice.find(".bulk-wrapper").closest(".row");$bulkContent.empty();let visibleCount=0;_response.product.price.liveNet.bulks.forEach(bulk=>{if(bulk.hidePrice||bulk.fallbackPrice){return;}
1798$bulkContent.append('<div class="col-xs-4">'+bulk.formattedLimit+': </div><div class="col-xs-8"><b>'+bulk.formattedPrice+'</b> / '+bigUnitFactor+bulk.priceUnitSymbol+'</div>');visibleCount++;});if(visibleCount>0){$bulkRow.removeClass("hidden");}else{$bulkRow.addClass("hidden");}}}else{if(idSuffix){$yourPrice.find("#your-price-caption"+(idSuffix?idSuffix:"")).addClass('hidden');}
1799const $bigPrice=$yourPrice.find("#js-big-price"+(idSuffix?idSuffix:""));$bigPrice.addClass(HB.LivePrice.cssClassTheChosenPrice+' price-zero');$bigPrice.html(HB.translations.price.zeroprice);$yourPrice.find(".bulk-wrapper").closest(".row").addClass("hidden");}
1800if(_response.product.price.liveNet.net){$("#js-tax-note"+(idSuffix?idSuffix:"")).removeClass('hidden');}else{$("#js-tax-note-inc"+(idSuffix?idSuffix:"")).removeClass('hidden');}}
1801if(!_response.product.price.liveNet||_response.product.price.liveNet.fallbackPrice){if(idSuffix){$yourPrice.find("#your-price-caption"+(idSuffix?idSuffix:"")).addClass('hidden');}
1802$yourPrice.find(".bulk-wrapper").closest(".row").addClass("hidden");HB.LivePrice.showListPrice(_response,true,idSuffix,isNotUseProductDataInScope);}else{$('#addToCartButton').data("prevent-enabling-by-price",false);}}else{HB.LivePrice.showListPrice(_response,true,idSuffix,isNotUseProductDataInScope);}
1803deferredOnLivePrice.resolve();$('#addToCartButton').data("prevent-enabling-by-price",false);return deferredOnLivePrice.promise();},onLivePriceForProductError:function(_textStatus,_errorThrown,idSuffix){HB.LivePrice.debug?console.log("HB.LivePrice.onLivePriceForProductError  >>",_textStatus,_errorThrown,idSuffix):null;const deferredOnLivePriceError=$.Deferred();HB.LivePrice.removeLoadingMessage(idSuffix);HB.Utils.disableButton('#addToCartButton');$('#addToCartButton'+(idSuffix?idSuffix:"")).removeClass('addToCartButton');$("#js-price-error"+(idSuffix?idSuffix:"")).addClass(HB.LivePrice.cssClassTheChosenPrice+' price-error');$("#js-price-error"+(idSuffix?idSuffix:"")).text(HB.translations.livePrice.errorNoprice).removeClass("hidden");console.error("liveprice error: "+_errorThrown);setTimeout(function(){HB.track.pushEvent('liveprice error','liveprice error: '+window.location.href);},2000);const $yourPrice=$("#js-your-price"+(idSuffix?idSuffix:""));$yourPrice.find(".bulk-wrapper").closest(".row").addClass("hidden");deferredOnLivePriceError.resolve();return deferredOnLivePriceError.promise();},removeLoadingMessage:function(idSuffix){var $yourPrice=$("#js-your-price"+(idSuffix?idSuffix:""));$yourPrice.find("#loading-price-caption"+(idSuffix?idSuffix:"")).addClass('hidden');$("#js-loading-price"+(idSuffix?idSuffix:"")).addClass('hidden');},showListPrice:function(_response,userIsLoggedIn,idSuffix,isNotUseProductDataInScope){const deferredShowListPrice=$.Deferred();const $yourPrice=$("#js-your-price"+(idSuffix?idSuffix:""));let productBaseUnit="";let productContentUnit="";let productUnit="";let productEcirpgolatacValue="";let productEcirpgolatacFormattedValue="";let productEcirpgolatacNet="";let productEcirpgolatacUnitFactor="";let productEcirpesabValue="";let productEcirpesabFormattedValue="";let productEcirpesabNet="";let productEcirpesabUnitFactor="";if(_response&&isNotUseProductDataInScope){try{productContentUnit=_response.product.price.liveNet.unit.symbol?_response.product.price.liveNet.unit.symbol:'';productEcirpgolatacValue=_response.product.price.liveNet.value?_response.product.price.liveNet.value:'';productEcirpgolatacFormattedValue=_response.product.price.liveNet.formattedValue?_response.product.price.liveNet.formattedValue:'';productEcirpgolatacNet=_response.product.price.liveNet.net?_response.product.price.liveNet.net:'';productEcirpgolatacUnitFactor=_response.product.price.liveNet.unitFactor?_response.product.price.liveNet.unitFactor:'';}catch(e){HB.LivePrice.debug?console.log("An Exception was thrown ",e):null;}
1804try{productBaseUnit=_response.product.price.liveBase.unit.symbol?_response.product.price.liveBase.unit.symbol:'';productEcirpesabValue=_response.product.price.liveBase.value?_response.product.price.liveBase.value:'';productEcirpesabFormattedValue=_response.product.price.liveBase.formattedValue?_response.product.price.liveBase.formattedValue:'';productEcirpesabNet=_response.product.price.liveBase.net?_response.product.price.liveBase.net:'';productEcirpesabUnitFactor=_response.product.price.liveBase.unitFactor?_response.product.price.liveBase.unitFactor:'';}catch(e){HB.LivePrice.debug?console.log("An Exception was thrown ",e):null;}}else{productUnit=HB.productData.unit;productBaseUnit=HB.productData.baseUnit;
1804productContentUnit=HB.productData.contentUnit;productEcirpgolatacValue=HB.productData.ecirPgolatac.value;productEcirpgolatacFormattedValue=HB.productData.ecirPgolatac.formattedValue;productEcirpgolatacNet=HB.productData.ecirPgolatac.isNet;productEcirpgolatacUnitFactor=HB.productData.ecirPgolatac.unitFactor;productEcirpesabValue=HB.productData.ecirPesab.value;productEcirpesabFormattedValue=HB.productData.ecirPesab.formattedValue;productEcirpesabNet=HB.productData.ecirPesab.isNet;productEcirpesabUnitFactor=HB.productData.ecirPesab.unitFactor;HB.LivePrice.debug?console.log("HB.LivePrice.showListPrice  >> Catalog price: ",HB.productData.ecirPgolatac):null;}
1805if(productEcirpgolatacValue){HB.LivePrice.removeLoadingMessage(idSuffix);$("#your-price-caption"+(idSuffix?idSuffix:"")).addClass('hidden');$("#consumer-price-caption-fallback"+(idSuffix?idSuffix:"")).removeClass('hidden');if(productEcirpgolatacValue>0){const $bigPrice=$("#js-big-price"+(idSuffix?idSuffix:""));$bigPrice.addClass(HB.LivePrice.cssClassTheChosenPrice);$bigPrice.attr('data-price',productEcirpgolatacValue);if(HB.user.isB2B==='true'){$bigPrice.html(productEcirpgolatacFormattedValue+"<span class='big-price-unit'>&#32;/&#32;"+productEcirpgolatacUnitFactor+productContentUnit+"*</span>");if(productBaseUnit&&productEcirpesabFormattedValue&&(productBaseUnit!=productUnit||productEcirpesabFormattedValue!=productEcirpgolatacFormattedValue)){$yourPrice.find("#base-price"+(idSuffix?idSuffix:"")).html(productEcirpesabFormattedValue+"&#32;/&#32;"+productEcirpesabUnitFactor+productBaseUnit).parent().removeClass("invisible");;}}else{$bigPrice.html(productEcirpgolatacFormattedValue+"<span class='big-price-unit'>&#32;/&#32;"+productEcirpgolatacUnitFactor+productUnit+"*</span>");if(productBaseUnit&&productEcirpesabFormattedValue&&(productBaseUnit!=productUnit||productEcirpesabFormattedValue!=productEcirpgolatacFormattedValue)){$yourPrice.find("#base-price"+(idSuffix?idSuffix:"")).html(productEcirpesabFormattedValue+"&#32;/&#32;"+productEcirpesabUnitFactor+productBaseUnit).parent().removeClass("invisible");;}}}else{const $bigPrice=$("#js-big-price"+(idSuffix?idSuffix:""));$bigPrice.addClass(HB.LivePrice.cssClassTheChosenPrice+' price-zero');$bigPrice.html(HB.translations.price.zeroprice);}
1806if(productEcirpgolatacNet==="true"){$("#js-tax-note"+(idSuffix?idSuffix:"")).removeClass('hidden');}else{$("#js-tax-note-inc"+(idSuffix?idSuffix:"")).removeClass('hidden');}
1807$('#addToCartButton').data("prevent-enabling-by-price",false);deferredShowListPrice.resolve();}else{HB.LivePrice.onLivePriceForProductError(null,"",idSuffix);deferredShowListPrice.resolve();}
1808return deferredShowListPrice.promise();},showNothing:function(idSuffix){$("#js-your-price"+(idSuffix?idSuffix:"")).addClass('hidden');$("#js-big-price"+(idSuffix?idSuffix:"")).text("");let cartButton=$('#addToCartButton');if(cartButton.length>0){cartButton.data("prevent-enabling-by-price",false);}
1809HB.LivePrice.showSiteMessage(idSuffix);},showSiteMessage:function(idSuffix){$("#no-product-price-message"+(idSuffix?idSuffix:"")).removeClass('hidden');},showInitialBulks:function(){const $initialBulk=$(".bulk-price-limit");if($initialBulk.length>0){$initialBulk.parent().parent().parent().removeClass("hidden");}}
1809,getBulksForProduct:function(idSuffix,productCode){const deferredGetBulks=$.Deferred();const showPrice=HB.config.showPrice;if(!showPrice||!HB.config.livePriceCallForEachBulkLimitEnabled||HB.productData.isNonErpProduct){deferredGetBulks.resolve();return deferredGetBulks.promise();}
1810let bulksUrl;if(productCode){bulksUrl=HB.config.siteUrl+"p/"+productCode+"/bulks";}else{bulksUrl=document.URL.split("?")[0].split("#")[0]+"/bulks";}
1811HB.LivePrice.debug?console.log("Calling bulks data with URL "+bulksUrl):null;$.ajax({url:bulksUrl,cache:false,type:'GET',timeout:HB.config.ajax.timeout,success:function(result){HB.LivePrice.debug?console.log("HB.LivePrice.getBulksForProduct success:",result):null;let $yourPrice=$("#js-your-price"+(idSuffix?idSuffix:""));let $bulkContent=$yourPrice.find("#bulk-price-content");let $bulkWrapper=$yourPrice.find(".bulk-wrapper");let $bulkRow=$bulkWrapper.closest(".row");if(result&&result.bulks&&result.bulks.length>0){$bulkContent.empty();result.bulks.forEach(bulk=>{if(bulk.hidePrice){$bulkContent.append('<div class="col-xs-12 bulk-price-limit">'+bulk.formattedLimit+'</div>');}else{let unitFactorDisplay='';if(bulk.unitFactor&&bulk.unitFactor!=1){unitFactorDisplay=''+(parseFloat(bulk.unitFactor)*100).toFixed(0)/100;unitFactorDisplay=unitFactorDisplay.replace('.',',')+"&nbsp;";}
1812$bulkContent.append('<div class="col-xs-4 bulk-price-limit">'+bulk.formattedLimit+': </div><div class="col-xs-8"><b>'+bulk.formattedPrice+'</b> / '+unitFactorDisplay+bulk.priceUnitSymbol+'</div>');}});$bulkRow.removeClass("hidden");}else{HB.LivePrice.debug?console.log("Hiding bulk price row due to no data"):null;$bulkRow.addClass("hidden");}
1813deferredGetBulks.resolve();},error:function(jqXHR,textStatus,errorThrown){HB.LivePrice.debug?console.log("HB.LivePrice.getBulksForProduct error: "+textStatus):null;const $yourPrice=$("#js-your-price"+(idSuffix?idSuffix:""));const $bulkWrapper=$yourPrice.find(".bulk-wrapper");const $bulkRow=$bulkWrapper.closest(".row");HB.LivePrice.debug?console.log("Hiding bulk price row due to error"):null;$bulkRow.addClass("hidden");deferredGetBulks.resolve();}});return deferredGetBulks.promise();}};HB.LiveStocks={result:null,allStocksResult:null,singleStockUrl:"/getStockForProducts",allStocksUrl:"/getStocksForProduct",allStocksModalUrl:"/getAllStocksForProductModal",debug:0,init:function(){HB.LiveStocks.debug?console.log("HB.LiveStocks.init >>"):null;let $moreStocksPopUpLink=$('.locationStockLink');let $stockMessage=$("#liveStock");let $detailPageWrapper=$('.js-location-wrapper');if($moreStocksPopUpLink&&$moreStocksPopUpLink.length>0&&$stockMessage&&$stockMessage.length>0){HB.LiveStocks.loadSingleStockForProduct($stockMessage,$moreStocksPopUpLink,undefined,$detailPageWrapper);}},loadSingleStockForProduct:function($stockMessage,$moreStocksPopUpLink,$productCode,$detailPageWrapper){var stockUrl=HB.config.contextPath+"/stocklevel"+HB.LiveStocks.singleStockUrl;HB.LiveStocks.debug?console.log("HB.LiveStocks.loadSingleStockForProduct >> url: "+stockUrl):null;if($productCode===undefined){$productCode=document.URL.substring(document.URL.lastIndexOf('/')+1).split("?")[0].split("#")[0];}
1814$.ajax({url:stockUrl,cache:false,type:'POST',timeout:HB.config.ajax.timeout,contentType:'application/json',data:JSON.stringify({products:[$productCode]}),success:function(result){HB.LiveStocks.onSingleStockForProductResult(result,$stockMessage,$moreStocksPopUpLink,$detailPageWrapper);$detailPageWrapper.css('min-height','unset');},error:function(jqXHR,textStatus,errorThrown){HB.LiveStocks.onSingleStockForProductError(textStatus,errorThrown,$stockMessage);$detailPageWrapper.css('min-height','unset')}});},onSingleStockForProductResult:function(_response,$stockMessage,$moreStocksPopUpLink,$detailPageWrapper){HB.LiveStocks.debug?console.log("HB.LiveStocks.onSingleStockForProductResult >>",_response,$stockMessage,$moreStocksPopUpLink):null;HB.LiveStocks.result=JSON.parse(_response);if(HB.LiveStocks.result.success===true){$stockMessage.empty();for(var key of Object.keys(HB.LiveStocks.result.stocks)){$stockMessage.append(HB.LiveStocks.result.stocks[key]);}
1815let productCode=$moreStocksPopUpLink.data('code');HB.ListItem.initStockInformation($detailPageWrapper);HB.LiveStocks.result.warehouseCount>1?$moreStocksPopUpLink.removeClass("hidden"):null;$moreStocksPopUpLink.one('click',function(e){e.preventDefault();e.stopPropagation();let oldLinkContent=$moreStocksPopUpLink.html();$moreStocksPopUpLink.empty().append(HB.translations.liveStocks.retrieving);HB.LiveStocks.loadMoreStocksForProduct(HB.LiveStocks.allStocksUrl,$stockMessage,$moreStocksPopUpLink,productCode,oldLinkContent);});let isUnavailable=$stockMessage.find('.availability-outofstock-localization').length>0;if(isUnavailable){$('#js-your-price').addClass('hidden');}else{$('#addToCartButton').data("prevent-enabling-by-stocklevel",false);HB.LiveStocks.debug?console.log("CHECKING addToCartButton on STOCKLEVEL"):null;HB.Product.enableAddToCartButton();}}else{$stockMessage.empty();$stockMessage.append(HB.translations.liveStocks.error);console.warn(HB.translations.liveStocks.error);}},onSingleStockForProductError:function(_textStatus,_errorThrown,$stockMessage){HB.LiveStocks.debug?console.log("HB.LiveStocks.onSingleStockForProductError >>",_textStatus,_errorThrown,$stockMessage):null;$stockMessage.empty();$stockMessage.append(HB.translations.liveStocks.error).append(' ('+_errorThrown+')');},bindToMoreStocksLink:function($stockMessage,$moreStocksPopUpLink,$popoverContent,productCode){let yOffset=window.pageYOffset;let distanceToBottom=$($moreStocksPopUpLink)[0].getBoundingClientRect().bottom;let spaceForPopup=window.innerHeight-distanceToBottom;let popoverHeight=250;let popoverOptions={html:true,template:'<div class="popover stock-popover" role="tooltip"><div class="arrow"></div><a type="button" class="close stock-close" data-dismiss="popover" style="margin:10px 10px 0 20px;display:block;" onclick="$(this).closest(`.stock-popover`).popover(`hide`)"><i class="icon-cancel" style="font-size:11px;"></i></a><h3 class="popover-title"></h3><div class="popover-content" style="max-height:'+popoverHeight+'px; overflow-y:auto;"></div></div>',trigger:'manual',container:'body',placement:yOffset!==0&&spaceForPopup>popoverHeight+80?'bottom':'top',content:$popoverContent,sanitize:false};$moreStocksPopUpLink.popover(popoverOptions);$moreStocksPopUpLink.on('click',function(e){e.preventDefault();e.stopPropagation();$moreStocksPopUpLink.popover('toggle');HB.LiveStocks.bindAllStocksLinkInPopover(productCode);HB.LiveStocks.bindCloseClick($moreStocksPopUpLink);});if($moreStocksPopUpLink.is('.other-stock')||$moreStocksPopUpLink.is('.locationStockLink')){$moreStocksPopUpLink.popover('toggle');HB.LiveStocks.bindAllStocksLinkInPopover(productCode);HB.LiveStocks.bindCloseClick($moreStocksPopUpLink);}},loadMoreStocksForProduct:function(stockUrlFragment,$stockMessage,$stockLevelPopUpLink,productCode,oldLinkContent){var stockUrl=HB.config.contextPath+"/stocklevel"+stockUrlFragment;HB.LiveStocks.debug?console.log("HB.LiveStocks.loadMoreLiveStocksForProduct >> url: "+stockUrl):null;if(productCode===undefined){productCode=document.URL.substring(document.URL.lastIndexOf('/')+1).split("?")[0].split("#")[0];}
1816$.ajax({url:stockUrl,cache:false,type:'POST',timeout:HB.config.ajax.timeout,contentType:'application/json',data:JSON.stringify({product:productCode,warehouses:JSON.parse(HB.warehouse.alternativeWarehouses)}),success:function(result){HB.LiveStocks.onMoreStocksForProductResult(result,$stockMessage,$stockLevelPopUpLink,productCode);$stockLevelPopUpLink.empty();$stockLevelPopUpLink.append(oldLinkContent);},error:function(jqXHR,textStatus,errorThrown){HB.LiveStocks.onMoreStocksForProductError(jqXHR,textStatus,errorThrown);$stockLevelPopUpLink.empty();$stockLevelPopUpLink.append(oldLinkContent);}});},onMoreStocksForProductResult:function(_response,$stockMessage,$stockLevelPopUpLink,productCode){HB.LiveStocks.debug?console.log("HB.LiveStocks.onMoreStocksForProductResult >>",_response):null;let $content=JSON.parse(_response);let $popoverContent='';if($content.success===true){if(HB.config.showMoreStockLevelPositiveOnly==='true'){for(let key of Object.keys($content.stocks)){let stockClass=$($content.stocks[key])[0].className;if(stockClass.indexOf('js-stock-positive')!==-1){$popoverContent+=$content.stocks[key];}}
1817if($popoverContent===''){$popoverContent=HB.translations.liveStocks.empty;}}else{for(let key of Object.keys($content.stocks)){$popoverContent+=$content.stocks[key];}}
1818if($content.allStocksLink!==undefined){$popoverContent+=$content.allStocksLink;}}else{$popoverContent=HB.translations.liveStocks.error;}
1819$stockMessage.empty().append($content.stocks[HB.warehouse.defaultWarehouse]);HB.LiveStocks.bindToMoreStocksLink($stockMessage,$stockLevelPopUpLink,$popoverContent,productCode);},onMoreStocksForProductError:function(_textStatus,_errorThrown,$stockMessage){HB.LiveStocks.debug?console.log("HB.LiveStocks.onMoreStocksForProductError >>",_textStatus,_errorThrown,$stockMessage):null;var $popoverContent=$(".popover-content");$popoverContent.empty();$popoverContent.append(HB.translations.liveStocks.error).append(' ('+_errorThrown+')');},showAllStocksPopup:function($link,productCode){$link.empty();$link.append(HB.translations.liveStocks.retrieving);HB.LiveStocks.loadAllStocksForProduct($link,productCode);},bindAllStocksLinkInPopover:function(productCode){let allStocksLink=$('#allStocksLink');let focusCatcher=$('#focusCatcherForAllStocksLink');focusCatcher.focus();focusCatcher.on('keydown',function(e){if(e.key==='Escape'||e.keyCode===27){e.preventDefault();e.stopPropagation();focusCatcher.closest(`.stock-popover`).popover('hide');}});allStocksLink.on('keydown',function(e){if(e.key==='Escape'||e.keyCode===27){e.preventDefault();e.stopPropagation();focusCatcher.closest(`.stock-popover`).popover('hide');}});allStocksLink.on('keydown',function(e){if(e.key==='Enter'||e.key===' '||e.keyCode===13||e.keyCode===32){e.preventDefault();e.stopPropagation();HB.LiveStocks.showAllStocksPopup(allStocksLink,productCode);}});allStocksLink.click(function(e){e.preventDefault();HB.LiveStocks.showAllStocksPopup(allStocksLink,productCode);});},loadAllStocksForProduct:function($link,productCode){var stockUrl=HB.config.contextPath+"/stocklevel"+HB.LiveStocks.allStocksModalUrl;HB.LiveStocks.debug?console.log("HB.LiveStocks.loadAllLiveStocksForProduct >> url: "+stockUrl):null;if(productCode===undefined){productCode=document.URL.substring(document.URL.lastIndexOf('/')+1).split("?")[0].split("#")[0];}
1820$.ajax({url:stockUrl,cache:false,type:'POST',timeout:HB.config.ajax.timeout,data:{productCode:encodeURI(productCode)},success:function(result){HB.LiveStocks.onAllStocksForProductResult(result,$link);},error:function(jqXHR,textStatus,errorThrown){HB.LiveStocks.onAllStocksForProductError($link,textStatus,errorThrown);}});},onAllStocksForProductResult:function(_response,$link){HB.LiveStocks.debug?console.log("HB.LiveStocks.loadAllLiveStocksForProduct >> "+_response):null;var $content=JSON.parse(_response);HB.LiveStocks.allStocksResult=$content;if(HB.LiveStocks.allStocksResult.success===true){$('.popover').popover('hide');HB.Utils.displayModalPopup($content.content,'modal-md');if(HB.config.showMoreStockLevelPositiveOnly==='true'){$('.allstockspopup').find('.js-stock-negative').remove();}
1821$("#js-stocklevel-close").click(function(e){e.preventDefault();HB.Utils.hideModalPopup();});}else{$link.empty();$link.append(HB.translations.liveStocks.error);}},onAllStocksForProductError:function($link,_textStatus,_errorThrown){HB.LiveStocks.debug?console.log("HB.LiveStocks.onAllUnifiedStockForProductError >>",_textStatus,_errorThrown):null;$link.empty();$link.append(HB.translations.liveStocks.error).append(' ('+_errorThrown+')');},listStockLevel:function(productCode,listItems,$resultsList,$stockMessage){let stockUrl=HB.config.contextPath+"/stocklevel"+HB.LiveStocks.singleStockUrl;HB.LiveStocks.debug?console.log("HB.LiveStocks.loadSingleStockForProduct >> url: "+stockUrl):null;if(productCode.length>0){$.ajax({url:stockUrl,cache:false,type:'POST',timeout:HB.config.ajax.timeout,contentType:'application/json',data:JSON.stringify({products:productCode}),success:function(result){HB.ListItem.listStockLevelCallback(result,listItems,$resultsList);},error:function(jqXHR,textStatus,errorThrown){HB.LiveStocks.onSingleStockForProductError(textStatus,errorThrown,$stockMessage);}});}else{console.warn('No product code for product found.');}},bindCloseClick:function($moreStocksPopUpLink){$('body').on('click touchend',function(e){if(!$moreStocksPopUpLink.is(e.target)&&$moreStocksPopUpLink.has(e.target).length===0&&$('.popover').has(e.target).length===0){$moreStocksPopUpLink.popover('hide');}});$('.zoomLens').on('mouseenter',function(){$('[data-toggle="stock-popover"]').popover('hide');});}};;HB.ListViewSwitcher={switcher:[],productList:null,active:null,debug:false,setSwitcher:function(){this.switcher=$(".list-view-switcher");},setProductList:function(){this.productList=$("#resultsList");},initSwitcher:function(){if(HB.ListViewSwitcher.debug)console.log("DEBUG: HB.ListViewSwitcher.initSwitcher()");this.switcher.on("click","li",function(e){e.preventDefault();var $this=$(this);if(!$this.hasClass("active")){if($this.hasClass("list")){HB.ListViewSwitcher.updateProductList("list");HB.ListViewSwitcher.updateSwitcher("list");$.ajax({url:HB.config.url.productList.listViewSwitcher,data:"layout=LIST"});}else if($this.hasClass("grid")){HB.ListViewSwitcher.productList.removeClass("saved-list");HB.ListViewSwitcher.updateProductList("grid");HB.ListViewSwitcher.updateSwitcher("grid");$.ajax({url:HB.config.url.productList.listViewSwitcher,data:'layout=GRID'});}}});if(HB.ViewportChange.getViewport().name=="xs"||HB.ViewportChange.getViewport().name=="sm"){HB.ListViewSwitcher.handleViewportSwitchToGrid();}
1822this.productList.fadeIn();},updateSwitcher:function(style){if(HB.ListViewSwitcher.debug)console.log("DEBUG: HB.ListViewSwitcher.updateSwitcher(), style: ",style);this.switcher.each(function(){var $this=$(this);if(style=="grid"){$this.find(".grid").addClass("active").find('a').addClass("active");$this.find(".list").removeClass("active").find('a').removeClass("active");}else if(style=="list"){$this.find(".list").addClass("active").find('a').addClass("active");$this.find(".grid").removeClass("active").find('a').removeClass("active");}});},updateProductList:function(style){if(HB.ListViewSwitcher.debug)console.log("DEBUG: HB.ListViewSwitcher.updateProductList(), style: ",style);if(style=="grid"){this.productList.addClass("styleGrid").removeClass("styleList");}else if(style=="list"){this.productList.addClass("styleList").removeClass("styleGrid");}
1823$("#resultsListWrapper").css("min-height","unset");},handleViewportSwitchBack:function(){if(HB.ListViewSwitcher.productList.hasClass('saved-list')){HB.ListViewSwitcher.updateProductList("list");}},handleViewportSwitchToGrid:function(){if(HB.ListViewSwitcher.productList.hasClass('styleList')){HB.ListViewSwitcher.updateProductList("grid");HB.ListViewSwitcher.productList.addClass("saved-list");}},init:function(){this.setSwitcher();this.setProductList();this.initSwitcher();if(HB.ListViewSwitcher.debug)console.log("DEBUG: HB.ListViewSwitcher.init() mit: ",this);}};HB.ListItem={debug:0,init:function(){var $resultsList=$('.results-list ');HB.ListItem.bindQuantityInput($resultsList);HB.ListItem.bindFormActions($resultsList);HB.ListItem.bindDimensionSelects($resultsList);if($('body').hasClass('page-productList')||$('body').hasClass('page-search')){HB.ListItem.bindStockPopovers($resultsList);HB.ListItem.initStockInformationNoLink($resultsList);}else{HB.ListItem.checkStockLevels($resultsList);}}
1823,bindDimensionSelects:function(_context){_context.find('.productDimension select').on('change',HB.ListItem.onDimensionChange);},bindQuantityInput:function(_context){_context.find('.js-increase-quantity').on('click',function(e){HB.ListItem.onQuantityClick(e,true);});_context.find('.js-decrease-quantity').on('click',function(e){HB.ListItem.onQuantityClick(e,false);});_context.find('.js-quantity-input').on('focusin',HB.ListItem.onQuantityFocus);_context.find('.js-quantity-input').on('focusout',HB.ListItem.onQuantityUnFocus);},bindFormActions:function(_context){HB.ListItem.debug>0?console.log("HB.ListItem.bindFormActions()"):null;_context.find('.addToCartButton').on('click',HB.ListItem.onFormSubmit);_context.find('.listItemForm').on('submit',HB.ListItem.onFormSubmit);_context.find('.addToWishlistButton').on('click',HB.ListItem.onWishListSubmit);HB.Utils.enableButton(_context.find('.addToWishlistButton'));},bindStockPopovers:function(_context){_context.find('.js-product-stockLevel').each(function(){let $listItem=$(this);let $stockMessage=$listItem.find(".stock-default-warehouse");let $stockLevelPopUpLink=$listItem.find('.other-stock');let productCode=$stockLevelPopUpLink.data('code');$stockLevelPopUpLink.one('click',function(e){e.preventDefault();e.stopPropagation();let oldLinkContent=$stockLevelPopUpLink.html();$stockLevelPopUpLink.empty().append(HB.translations.liveStocks.retrieving);HB.LiveStocks.loadMoreStocksForProduct(HB.LiveStocks.allStocksUrl,$stockMessage,$stockLevelPopUpLink,productCode,oldLinkContent,_context);})});},checkStockLevels:function(_context){let $listItemArr=_context.find('.js-product-stockLevel');let productCodeArray=[];$listItemArr.each(function(){productCodeArray.push($(this).data('code').toString());});let $stockMessage=$listItemArr.find(".stock-default-warehouse");HB.LiveStocks.listStockLevel(productCodeArray,$listItemArr,_context,$stockMessage);},listStockLevelCallback:function(_response,listItems,$resultsList){HB.LiveStocks.result=JSON.parse(_response);if(HB.LiveStocks.result.success===true){listItems.each(function(){let $stockMessage=$(this).find(".stock-default-warehouse");let productCode=$(this).data('code');let $stockLevelPopUpLink=$(this).find('.other-stock');HB.LiveStocks.result.warehouseCount>1?$stockLevelPopUpLink.removeClass("hidden"):null;$stockMessage.empty();
1823$stockMessage.append(HB.LiveStocks.result.stocks[productCode]);HB.LiveStocks.result.warehouseCount>1?HB.ListItem.initStockInformation($resultsList):HB.ListItem.initStockInformationNoLink($resultsList);$stockLevelPopUpLink.one('click',function(e){e.preventDefault();e.stopPropagation();let oldLinkContent=$stockLevelPopUpLink.html();$stockLevelPopUpLink.empty().append(HB.translations.liveStocks.retrieving);HB.LiveStocks.loadMoreStocksForProduct(HB.LiveStocks.allStocksUrl,$stockMessage,$stockLevelPopUpLink,productCode,oldLinkContent);});$stockLevelPopUpLink.on('keydown',function(e){if(e.key==='Enter'||e.key===' '||e.keyCode===13||e.keyCode===32){e.preventDefault();e.stopPropagation();$stockLevelPopUpLink.trigger('click');}});});}else{listItems.each(function(){let $stockMessage=$(this).find(".stock-default-warehouse");$stockMessage.empty();$stockMessage.append(HB.translations.liveStocks.error);HB.ListItem.initStockInformationNoLink($resultsList);});}},initStockInformation:function(_context){_context.find('.stock-info-loader').remove();_context.find('.stock-info-detail').removeClass('hidden');_context.find('.other-stock').removeClass('hidden');},initStockInformationNoLink:function(_context){_context.find('.stock-info-loader').remove();_context.find('.stock-info-detail').removeClass('hidden');},onFormSubmit:function(e){e.preventDefault();HB.ListItem.debug>0?console.log("HB.ListItem.onFormSubmit()",$(e.target)):null;var $form=$(e.target).closest('.productListItem').find('.listItemForm');var context=$(e.target).attr('value');HB.Utils.displayModalPopupLoading('modal-md');HB.ListItem.handleSubmitForm(context,$form);},onWishListSubmit:function(e){e.preventDefault();HB.ListItem.debug>0?console.log("HB.ListItem.onWishListSubmit()",$(e.target)):null;var $form=$(e.target).closest('.productListItem').find('.listItemForm');var context="wishlist";HB.Utils.displayModalPopupLoading('modal-md');HB.ListItem.handleSubmitForm(context,$form);},onDimensionChange:function(e){var $product=$(e.target).closest('.productListItem');var code=$(e.target).val();HB.ListItem.handleDimensionChange($product,code);},onQuantityClick:function(e,isIncrease){e.preventDefault();if($(e.target).closest('.js-offer-position-item').length){return;}
1824var $quantityInput=$(e.target).closest('.quantityContainer ').find('.js-quantity-input');var value=$quantityInput.val();var valueInt=parseInt(value);if(isIncrease){$quantityInput.val(++valueInt);$quantityInput.change();}else{if(valueInt>=1){if(valueInt.toString()==value){$quantityInput.val(--valueInt);}else{$quantityInput.val(valueInt);}
1825$quantityInput.change();}}},onQuantityFocus:function(e){var $context=$(e.target).closest('.quantityContainer');$context.find('.js-increase-quantity').hide();$context.find('.js-decrease-quantity').hide();},onQuantityUnFocus:function(e){var $context=$(e.target).closest('.quantityContainer');$context.find('.js-increase-quantity').show();$context.find('.js-decrease-quantity').show();},handleSubmitForm:function(_context,_form){HB.ListItem.debug>0?console.log("HB.ListItem.handleSubmitForm()",_context,_form):null;if(_context==undefined){_context='cart';}
1826window.setTimeout(function(){_form.ajaxSubmit({type:(function(){if(_context=='wishlist'){return'GET';}else{return'POST';}})(),url:(function(){if(_context=='wishlist'){return HB.config.siteUrl+'wishlist/layer/select';}else{return HB.config.siteUrl+'cart/add';}})(),success:(function(){if(_context=='wishlist'){return HB.WishlistLayer.displayWishlistPopup;}else{return HB.Product.displayAddToCartPopup;}})()});},500);},handleDimensionChange:function(_product,_code){var urlSuffix='changetile/'+_code;$.ajax({url:(HB.config.siteUrl+urlSuffix),type:'get',success:function(result){result=$(result);_product.replaceWith(result);HB.ListItem.bindQuantityInput(result);HB.ListItem.bindFormActions(result);HB.ListItem.bindDimensionSelects(result);HB.ListItem.bindStockPopovers(result);HB.ListItem.initStockInformation(result);}});}};;HB.ProductList={init:function(){HB.ProductList.initPageSizeSelects();HB.ProductList.initSortingSelects();if(HB.user.isLoggedIn==='true'){}else{HB.ProductList.showSiteMessage();}},initPageSizeSelects:function(){var pageSizeSelects=$(".page-size-selector");pageSizeSelects.on("change",function(e){$(this).closest('form').trigger('submit');});},initSortingSelects:function(){var sortOptions=$(".sortOptions");sortOptions.on("change",function(e){});},animateProducts:function(){$('.results-list  .productListItem').each(function(i){$(this).delay((i++)*300).fadeTo(1000,1);});},showSiteMessage:function(){$("#no-product-price-message").removeClass('hidden');}};HB.ProductTabs={bindAll:function(){if($('#productTabs').length>0){HB.ProductTabs.productTabs=$('#productTabs').accessibleTabs({wrapperClass:'content',currentClass:'current',tabhead:'.tabHead',tabbody:'.tabBody',fx:'slideDown',fxspeed:'normal',currentInfoText:'current tab: ',currentInfoPosition:'prepend',currentInfoClass:'current-info',autoAnchor:true});if(HB.ViewportChange._viewport.index==0){$("#accessibletabsnavigation0-0").append($('#productTabs .content'));};}}};;HB.Refinements={debug:0,currentQuery:"",query:"",currentRange:"",currentSort:"",searchTerm:"",categoryQuery:"",facetMobileForm:null,sortValue:"",currentSortValue:"",globalCurrentQuery:"",specialUrlEncodedMap:{"+":"%252B"},scrollposition:0,filtersExpanded:false,init:function(){HB.Refinements.searchTerm=encodeURIComponent($('#facet-filter-top').data('search-term'));let $facetSiteFilterWrapper=$('#facet-filter-side.toggle-facets');if($facetSiteFilterWrapper.length){HB.Refinements.bindRefinementCategoryToggles($facetSiteFilterWrapper);HB.Refinements.bindRefinementQuery($facetSiteFilterWrapper);}
1827let $facetFilterWrapper=$("#facet-filter-top");if($facetFilterWrapper.length){HB.Refinements.setCurrentSort($facetFilterWrapper);HB.Refinements.bindLinksOfTheFacets();HB.Refinements.bindButtonsOfTheFacets($facetFilterWrapper);HB.Refinements.reorderFacetLinkShowMore();HB.Refinements.initSortingAsFacet($facetFilterWrapper);HB.Refinements.initMobileFacetsFilter();HB.Refinements.initialRemoveListener($facetFilterWrapper);HB.Refinements.initFilterMarkingClass($facetFilterWrapper);HB.Refinements.handleFakeSelectFacet($facetFilterWrapper);HB.Refinements.bindModalClose();}
1828HB.Refinements.bindRangeFilter($facetFilterWrapper.find(".range-facet"));HB.Refinements.bindPageSwitchers();HB.Refinements.bindCategoryButtons();HB.Refinements.getCurrentCategoryQuery();HB.Refinements.getCurrentSortParam();}
1828,getCurrentSortParam:function(){let currentUrl=window.location.href;let params=currentUrl.split('?')[1];if(!params){return;}
1829let paramsSplit=params.split('&');for(let i=0;i<paramsSplit.length;i++){if(paramsSplit[i].startsWith("sort=")){HB.Refinements.currentSort=paramsSplit[i].substring(5);HB.Refinements.sortValue=HB.Refinements.currentSort;break;}}},getCurrentCategoryQuery:function(){let currentUrl=window.location.href;let params=currentUrl.split('?')[1];if(!params){return;}
1830let paramsSplit=params.split('&');let query=""
1831for(let i=0;i<paramsSplit.length;i++){if(paramsSplit[i].startsWith("q=")){query=paramsSplit[i].substring(2);break;}}
1832if(query){let querySplit=query.split(":");for(let i=0;i<querySplit.length;i++){if(querySplit[i]==="categoryPath"&&i+1<querySplit.length){HB.Refinements.categoryQuery=querySplit[i+1];if(HB.Refinements.categoryQuery.includes("%")){HB.Refinements.categoryQuery=decodeURIComponent(HB.Refinements.categoryQuery);}
1833break;}}}},bindCategoryButtons:function(){let buttonsDesktop=$('.js-facetCategoryButton');let holdCategoryQuery=HB.Refinements.categoryQuery;buttonsDesktop.each(function(){let button=$(this);let dataHint=button.data('hint');let facetSiteFilterWrapper=$('#facet-filter-top');const facetValueContainers=facetSiteFilterWrapper.closest('#facet-filter-top').find('.filter-flex .facet .dropdown__facet-values');HB.Refinements.categoryQuery=dataHint;let query=HB.Refinements.createCombinedQuery(facetValueContainers);let currentUrl=window.location.href;let baseUrl=currentUrl.split('?')[0];if(dataHint&&query){button.attr("href",baseUrl+"?q="+query);}});HB.Refinements.categoryQuery=holdCategoryQuery;let buttonsMobile=$('.js-facetCategoryButton-Mobile');buttonsMobile.each(function(){let button=$(this);let dataHint=button.data('hint');button.on('click',function(e){e.stopImmediatePropagation();HB.Refinements.categoryQuery=dataHint;HB.Refinements.sendQuery(button,function(response,facetCode){HB.Refinements.onFacetChangeSuccess(response,"category");});});});let resetButton=$('.js-facetNavRefinementCategoriesFacet-categories-back');if(resetButton.length){let removeCategoryFilter=this.getCategoryRemovedURL();resetButton.attr("href",removeCategoryFilter);}},showMobileFilters:function($element){$element.closest('#facet-filter-top').removeClass('hidden-xs');$('body').css('overflow-y','hidden');},bindPageSwitchers:function(){let sitePageInfo=this.getSitePageInfo();let newUrl=sitePageInfo[0];if(!newUrl.includes("?")){newUrl+="?";}
1834let currentPage=sitePageInfo[1];{let combined=newUrl;if(!combined.includes("?")){combined+="?page=1";}else{combined+="&page=1";}
1835let element=$('.js-pageSelectionPagination-first');if(element.length){element.attr('href',combined);}}
1836{let combined=newUrl;if(!combined.includes("?")){combined+="?page="+(currentPage-1);}else{combined+="&page="+(currentPage-1);}
1837let element=$('.js-pageSelectionPagination-previous');if(element.length){element.attr('href',combined);}}
1838{let combined=newUrl;if(!combined.includes("?")){combined+="?page="+(currentPage+1);}else{combined+="&page="+(currentPage+1);}
1839let element=$('.js-pageSelectionPagination-next');if(element.length){element.attr('href',combined);}}
1840let maxPage=1;{let element=$('.js-pageSelectionPagination-last');if(element.length){let maxPageString=element.text();maxPage=parseInt(maxPageString);let combined=newUrl;if(!combined.includes("?")){combined+="?page="+maxPage;}else{combined+="&page="+maxPage;}
1841element.attr('href',combined);}}
1842{let element=$('.js-pageSelectionPagination-inputForm');if(element.length){element.on('submit',function(e){e.preventDefault();HB.Refinements.navigateToPage($(this).find('input[name="page"]').val());return false;})}}},getSitePageInfo:function(){let hrefSplit=window.location.href.split('?');let baseUrl=hrefSplit[0];let urlParams=hrefSplit[1];if(!urlParams){return[baseUrl,1];}
1843let urlParamsSplit=urlParams.split('&');let currentPage=1;let indexToRemove=-1;for(let i=0;i<urlParamsSplit.length;i++){let param=urlParamsSplit[i];let paramSplit=param.split('=');if(paramSplit[0]==='page'){currentPage=parseInt(paramSplit[1]);indexToRemove=i;break;}}
1844if(indexToRemove>
1844=0){urlParamsSplit.splice(indexToRemove,1);}
1845return[baseUrl+'?'+urlParamsSplit.join('&'),currentPage];},navigateToPage:function(value){let sitePageInfo=this.getSitePageInfo();let newUrl=sitePageInfo[0];let combined=newUrl;if(!combined.includes("?")){combined+="?page="+value;}else{combined+="&page="+value;}
1846window.location.href=combined;},initMobileFacetsFilter:function(){var $filterPopupHandle=$("#filter-facet-popup-handle");$filterPopupHandle.on("click",function(){HB.Refinements.showMobileFilters($('#facet-filter-top'));});},bindRangeFilter:function(rangeFilter){if(rangeFilter&&rangeFilter.length){var $inputMin=rangeFilter.find("[name=relMin]"),$inputMax=rangeFilter.find("[name=relMax]"),relMin=Math.floor($inputMin.val()),relMax=Math.floor($inputMax.val()),absMin=Math.floor(rangeFilter.data("min-value")),absMax=Math.floor(rangeFilter.data("max-value")),$sliderRange=rangeFilter.find(".slider-range");$inputMin.attr('data-change-value',relMin);$inputMax.attr('data-change-value',relMax);const initialMin=$inputMin.attr('data-change-value');const initialMax=$inputMax.attr('data-change-value');if(typeof absMin==='undefined'||absMin===null){absMin=relMin;}
1847if(typeof absMax==='undefined'||absMax===null){absMax=relMax;}
1848$sliderRange.slider({range:true,min:absMin,max:absMax,values:[relMin,relMax],slide:function(event,ui){if(ui.values[0]==ui.values[1])return false;$inputMin.val(ui.values[0]);$inputMax.val(ui.values[1]);HB.Refinements.getRangeSelect($inputMin.val(),$inputMax.val(),rangeFilter,initialMin,initialMax)
1849rangeFilter.find(".js-facet-filter-submit").enable();rangeFilter.find(".js-facet-filter-update").enable();},create:function(){var offset1=$(this).children('.ui-slider-handle').first();var offset2=$(this).children('.ui-slider-handle').last();$(offset2).css('margin-left',"0px");}});$inputMin.change(function(){var $this=$(this);if(Math.floor($this.val())<Math.floor($inputMax.val())&&$this.val()<=absMax&&$this.val()>=absMin){$this.attr("data-change-value",$this.val());$sliderRange.slider("values",$this.data("index"),$this.val());HB.Refinements.getRangeSelect($this.attr('data-change-value'),null,rangeFilter,initialMin,initialMax);}else{$this.val($this.attr("data-change-value"));HB.Refinements.getRangeSelect($this.val(),null,rangeFilter,initialMin,initialMax);}
1850rangeFilter.find(".js-facet-filter-submit").enable();rangeFilter.find(".js-facet-filter-update").enable();});$inputMax.change(function(){var $this=$(this);if(Math.floor($this.val())>Math.floor($inputMin.val())&&$this.val()<=absMax&&$this.val()>=absMin){$this.attr("data-change-value",$this.val());$sliderRange.slider("values",$this.data("index"),$this.val());HB.Refinements.getRangeSelect(null,$this.attr('data-change-value'),rangeFilter,initialMin,initialMax);}else{$this.val($this.attr("data-change-value"));HB.Refinements.getRangeSelect(null,$this.val(),rangeFilter,initialMin,initialMax);}
1851rangeFilter.find(".js-facet-filter-submit").enable();rangeFilter.find(".js-facet-filter-update").enable();});HB.Refinements.getRangeSelect($inputMin.val(),$inputMax.val(),rangeFilter,initialMin,initialMax);}},getRangeSelect:function(min,max,rangeFilter,initialMin,initialMax){let facetCode=rangeFilter.data("identifier");let floatMin=parseFloat(min);let floatMax=parseFloat(max);let floatInitialMin=parseFloat(rangeFilter.data("min-value"));let floatInitialMax=parseFloat(rangeFilter.data("max-value"));let shouldDisplay=floatMin!==floatInitialMin||floatMax!==floatInitialMax;if(shouldDisplay){let parsedMin=floatMin.toFixed(1);let parsedMax=floatMax.toFixed(1);HB.Refinements.currentRange=':'+facetCode+':'+parsedMin+'TO'+parsedMax;let buttonHtml="";buttonHtml+="<a class='btn btn-function btn-remove-filter price-filter text-truncate visible-xs' data-query-value='"+HB.Refinements.currentRange+"' href='javascript:;'>";buttonHtml+="<span class='facetValueName pull-left'>Preis</span>";buttonHtml+="<i class='icon-close small-icon pull-right'></i>";buttonHtml+="</a>";if(rangeFilter.closest('.facet').find('.btn-remove-filter.price-filter').length===1){rangeFilter.closest('.facet').find('.btn-remove-filter.price-filter').remove();rangeFilter.closest('.facet').find('.facetHead .facet-applied-filters-wrapper').append(buttonHtml);HB.Refinements.bubbleCount(rangeFilter.closest('.facet'));}else{rangeFilter.closest('.facet').find('.facetHead .facet-applied-filters-wrapper').append(buttonHtml);HB.Refinements.bubbleCount(rangeFilter.closest('.facet'));}
1852rangeFilter.closest('.facet').addClass('active-filters');$('.btn-remove-filter.price-filter .icon-close').on('click',function(e){e.stopImmediatePropagation();
1852let $inputMin=rangeFilter.find("[name=relMin]"),$inputMax=rangeFilter.find("[name=relMax]");$inputMin.attr('data-change-value',initialMin);$inputMin.val(initialMin);$inputMax.attr('data-change-value',initialMax);$inputMax.val(initialMax);$(this).closest("#facet-filter-top").find('.btn-remove-filter.price-filter').remove();$(e.currentTarget).closest('.btn-remove-filter.price-filter').remove();rangeFilter.closest('.facet').removeClass('active-filters');HB.Refinements.bubbleCount($(this).closest('.facet'));});}else{HB.Refinements.currentRange="";rangeFilter.closest('.facet').find('.btn-remove-filter.price-filter').remove();rangeFilter.closest('.facet').removeClass('active-filters');HB.Refinements.bubbleCount(rangeFilter.closest('.facet'));}},bindRefinementCategoryToggles:function($facetFilterWrapper){$facetFilterWrapper.find('.facetHead').each(function(){$(this).on("click",function(e){e.preventDefault();var $this=$(this),facetBody=$this.next(),icon=$this.find("i");if($this.hasClass('active')){facetBody.addClass("slide-up");}else{facetBody.removeClass("slide-up");}
1853$this.toggleClass('active');});});},bindRefinementQuery:function($facetFilterWrapper){var $facetValuesInput=$facetFilterWrapper.find(".facetValues input"),$checkboxes=$facetValuesInput.filter(":checkbox"),$radioButtons=$facetValuesInput.filter(":radio"),$allInputs=$.merge($checkboxes,$radioButtons);$radioButtons.addClass('inputRadio');$facetFilterWrapper.find(".pseudo-checkbox").each(function(){$(this).on("click",function(e){e.preventDefault();let $clickElement=$(e.currentTarget);let $checkbox=$clickElement.find("input[type='checkbox']");if($checkbox.is(':checked')){$checkbox.attr('checked',false);}else{$checkbox.attr('checked',true);}
1854HB.Refinements.onSideFacetSubmit($checkbox);});});},onSideFacetSubmit:function($submitElement){const $facetValueContainers=$submitElement.closest('#facet-filter-side').find('.facet .facetValues');if($facetValueContainers.length){let combinedQuery=HB.Refinements.createCombinedQuery($facetValueContainers);if(combinedQuery){const url=window.location.href.split('?')[0]+"?q="+combinedQuery;console.log("onSideFacetSubmit: "+url);window.location.href=url;}}},setCurrentSort:function(filterWrapper){HB.Refinements.sortValue=filterWrapper.data("current-query").split(":")[1];},sortChange:function(){$('#mobileSort select').on('change',function(){var valueSelected=this.value;HB.Refinements.sortValue=valueSelected;});},removePriceQuery:function(){var url=window.location.href;var params=new URLSearchParams(url.split('?')[1]);params.delete('relMin');params.delete('relMax');params.delete('facetCode');const newUrl=url.split('?')[0]+"?"+params.toString()
1855console.log("removePriceQuery: "+newUrl);window.location.href=newUrl;},getFacetQuery:function($facetForm,currentSort){var facetQuery="",facetType=$facetForm.data("facet-type"),checkbox,currentQuery=$('#facet-filter-side').data("current-query"),rangeFacetCode,rangeRelMin,rangeRelMax,rangeAbsMin,rangeAbsMax;$facetForm.each(function(){var facetForm=$(this).find('form');facetType=$(facetForm).data("facet-type");if(facetType==="rangeSelect"){rangeFacetCode=$(facetForm).find('input[name=facetCode]').val();rangeRelMin=$(facetForm).find('input[name=relMin]').val();rangeRelMax=$(facetForm).find('input[name=relMax]').val();rangeAbsMin=$(facetForm).parent().data("min-value");rangeAbsMax=$(facetForm).parent().data("max-value");if(rangeAbsMin<rangeRelMin||rangeAbsMax>rangeRelMax){HB.Refinements.facetMobileForm.append("<input type='hidden' value='priceValue' name='facetCode' />");HB.Refinements.facetMobileForm.append("<input type='hidden' value="+rangeRelMin+" name='relMin' />");HB.Refinements.facetMobileForm.append("<input type='hidden' value="+rangeRelMax+" name='relMax' />");$('#facet-mobile-form').find('input[name=relMin]').val(rangeRelMin);$('#facet-mobile-form').find('input[name=relMax]').val(rangeRelMax);}}else if(facetType==="sortSelect"){HB.Refinements.getSortValue($facetForm);}else{HB.Refinements.getInputValues($facetForm);}});},getSortValue:function($facetForm){HB.Refinements.sortChange();var startIndex=HB.Refinements.currentQuery.indexOf(HB.Refinements.sortValue);if(startIndex<0){HB.Refinements.currentQuery=HB.Refinements.currentQuery.replace(HB.Refinements.currentSortValue,HB.Refinements.sortValue);}},getInputValues:function($facetForm){let queryInput=$facetForm.find("input");let queryValue;for(var i=0;i<queryInput.length;
1855i++){var queryContainer=$(queryInput[i]),selectedBox;if($(queryContainer).is(':checked')){selectedBox=$(queryContainer);queryValue=selectedBox.data('query');var startIndex=HB.Refinements.currentQuery.indexOf(queryValue);if(startIndex<0){HB.Refinements.currentQuery+=queryValue;}}else{selectedBox=$(queryContainer);queryValue=selectedBox.data('query');startIndex=HB.Refinements.currentQuery.indexOf(queryValue);if(startIndex>0){var replaceSortQuery=HB.Refinements.currentQuery.replace(queryValue,"");HB.Refinements.currentQuery=replaceSortQuery;}}}},bindFilterFacetChange:function(filterTop){let filterForm=filterTop.find('.facet .facet-block .pseudo-checkbox input[type="checkbox"]');for(let i=0;i<filterForm.length;i++){$(filterForm[i]).on('change',function(event){event.stopImmediatePropagation();HB.Refinements.onFacetChange($(event.currentTarget));});}},bubbleCount:function(elementWrapper,countUp){let counter=0;counter+=elementWrapper.find('.facetHead .facet-applied-filters-wrapper').children().length;let bubble=elementWrapper.find('.bubble-red');if(typeof countUp!=='undefined'){if(countUp){counter=1;}else{counter=0;}}
1856bubble.removeClass('hidden');bubble.find('.bubble-counter').text("").text(counter);if(counter===0){bubble.addClass("hidden");}},getCategoryRemovedURL:function(){let holdCategoryQuery=HB.Refinements.categoryQuery;HB.Refinements.categoryQuery="";let facetSiteFilterWrapper=$('#facet-filter-top');const facetValueContainers=facetSiteFilterWrapper.closest('#facet-filter-top').find('.filter-flex .facet .dropdown__facet-values');let query=HB.Refinements.createCombinedQuery(facetValueContainers);HB.Refinements.categoryQuery=holdCategoryQuery;return window.location.href.split('?')[0]+'?q='+query;},initialRemoveListener:function(filterTop){let appliedFilterButtons=filterTop.find('.btn-remove-filter').not('.price-filter');let appliedPriceFilterButton=filterTop.find('.btn-remove-filter.price-filter');if(appliedFilterButtons.length>0){appliedFilterButtons.each(function(){$(this).find('.icon-close').on('click',function(e){e.stopImmediatePropagation();let currentButton=$(e.currentTarget).closest(".btn-remove-filter");let queryValue=currentButton.data('query-value');if(currentButton.hasClass("category-filter")){HB.Refinements.categoryQuery="";}
1857let checkbox=$(".dropdown__facet-values [data-query='"+queryValue+"']");checkbox.attr('checked',false);checkbox.prop('checked',false);checkbox.removeAttr('checked');checkbox.siblings('.checkbox .icon-check').html("");if(currentButton.parents(".applied-filter-wrapper-desktop").length>0){HB.Refinements.onFacetSubmit();}else{HB.Refinements.onFacetUpdate(checkbox);}});});}
1858if(appliedPriceFilterButton.length>0){appliedPriceFilterButton.each(function(){let $currentButton=$(this);$currentButton.find('.icon-close').on('click',function(e){e.stopImmediatePropagation();HB.Refinements.removePriceQuery();});});}},facetQueryBuilder:function($facetFilterWrapper){var facetForms=$facetFilterWrapper.find(".facet");HB.Refinements.getFacetQuery(facetForms,HB.Refinements.currentSort);},initDoQueryTrigger:function($doFilterHandle,$facetFilterWrapper){$doFilterHandle.on("click",function(){HB.Refinements.facetQueryBuilder($facetFilterWrapper);HB.Refinements.facetMobileForm.find("[name=q]").val(HB.Refinements.currentQuery);HB.Refinements.facetMobileForm.find("[name=text]").val(HB.Refinements.searchTerm);HB.Refinements.facetMobileForm.submit();});},uncheckCategoriesInput:function(){$('.inputRadio').on("click",function(){var facetContainer=$(this).parents('.facetValues');var inputRadios=$(facetContainer).find('.inputRadio');for(var i=0,len=inputRadios.length;i<len;i++){var radio=inputRadios[i];$(radio).prop('checked',false);}
1859$(this).prop('checked',true);});},bindLinksOfTheFacets:function(){$('.js-link-facet-category-show-more').on('click',HB.Refinements.onLinkFacetCategoryShowMore);$('.js-link-facet-show-more').on('click',HB.Refinements.onLinkFacetShowMore);},bindButtonsOfTheFacets:function(_elementWrapper){HB.Refinements.debug>0?console.log("bindButtonsOfTheFacets",_elementWrapper):null;_elementWrapper.find('.js-facet-filter-submit').on('click',(event)=>HB.Refinements.onFacetSubmit());_elementWrapper.find('.js-facet-filter-update').on('click',(event)=>HB.Refinements.onFacetUpdate($(event.currentTarget)));_elementWrapper.find('.facetValues.single-select .input-radio').on('change',HB.Refinements.onFacetSingleSelect);HB.Refinements.bindFilterFacetChange(_elementWrapper);
1859HB.Refinements.faceSortMobileOptionsBinding(_elementWrapper);HB.Refinements.bindRemoveAllFilters(_elementWrapper);},bindSortingOptions:function(_element){if(_element&&_element.length&&_element.find('.facet-sorting .custom-option').length){_element.find('.facet-sorting .custom-option').on('click',HB.Refinements.onSortingOptions);}
1860if(_element&&_element.length&&_element.find('.facet-sorting #sortOptions_mobile option').length){_element.find('.facet-sorting #sortOptions_mobile').on('change',HB.Refinements.onSortingOptionsMobile);}},onSortingOptions:function(event){const $customOption=$(event.currentTarget);const dataValue=$customOption.data('value');const $select=$customOption.closest('.facet-sorting').find('.facetValues form select');if($select.length&&dataValue){$customOption.closest('.facetValues').find('.custom-option.selected').removeClass('selected');$customOption.addClass('selected');$select.val(dataValue);HB.Refinements.sortValue=dataValue;HB.Refinements.onFacetSubmit();}},onSortingOptionsMobile:function(event){const option=$(event.currentTarget);const optionValue=option.val();const select=option.closest('.facet-sorting').find('.facetHead form select');if(select.length&&optionValue){option.closest('.facetValues').find('option.selected').removeClass('selected');option.addClass('selected');select.val(optionValue);HB.Refinements.sortValue=optionValue;option.closest('#facet-filter-top').find('.js-facet-filter-submit').attr('disabled',false);const selectDesktopOption=option.closest('.facet-sorting').find(".facetValues");selectDesktopOption.find('.custom-option.selected').removeClass('selected');selectDesktopOption.find("li[data-value='"+optionValue+"']").addClass('selected');selectDesktopOption.closest('.facetValues form select').val(optionValue);if($(".applied-filter-wrapper-desktop").is(':visible')){HB.Refinements.onFacetSubmit();}else{HB.Refinements.onFacetUpdate(selectDesktopOption);}}},onLinkFacetCategoryShowMore:function(event){const $linkElement=$(event.currentTarget);const $level1Elements=$linkElement.closest('.facet').find('.level1.hidden-level1');if($level1Elements.length){$level1Elements.removeClass('hidden-level1');}
1861$linkElement.closest('.link-wrapper-facet-category--show-more').addClass('hidden');},onLinkFacetShowMore:function(){HB.Refinements.debug>0?console.log("onLinkFacetShowMore"):null;HB.Refinements.filtersExpanded=true;const $linkElement=$('.js-link-facet-show-more');const $facetFilterContainer=$linkElement.closest('.facet-filter');if($facetFilterContainer.length){$facetFilterContainer.css('max-height','none');}
1862$linkElement.closest('.link-wrapper-facet--show-more').addClass('hidden');},onFacetSubmit:function(){let facetSiteFilterWrapper=$('#facet-filter-top');const facetValueContainers=facetSiteFilterWrapper.closest('#facet-filter-top').find('.filter-flex .facet .dropdown__facet-values');let combinedQuery=HB.Refinements.createCombinedQuery(facetValueContainers);if(combinedQuery){const url=window.location.href.split('?')[0]+"?q="+combinedQuery;console.log("onFacetSubmit: "+url);window.location.href=url;}},isProductSearchTabSelected:function(){let tabButtonOthers=$('#tabButtonOthers');if(tabButtonOthers&&tabButtonOthers.hasClass('active'))return false;return!window.location.href.includes(":tab:")&&!window.location.href.includes("%3Atab%3A")&&!window.location.href.includes("/article");},createCombinedQuery:function(_$facetValueContainer){HB.Refinements.query=HB.Refinements.searchTerm
1863HB.Refinements.query+=":"+encodeURIComponent(HB.Refinements.sortValue);let combinedQuery=HB.Refinements.query;const checkedInputsPartialQueryArray=[];_$facetValueContainer.each(function(){HB.Refinements.debug>0?console.log($(this)):null;if($(this).hasClass('multi-select')){if($(this).length){$(this).find('.facet-block input[type="checkbox"]:checked').each(function(index,element){let query=$(element).data('query');query=query.replace(/%26amp%3b/g,"%26");query=query.replace(/%/g,"%25")
1864query=query.replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/-/g,"%2D").replace(/\./g,"%2E").replace(/_/g,"%5F").replace(/~/g,"%7E");query=query.replace(/%25[^%]25/g,"%2525");query=query.replace(/%3A/g,"%253A");checkedInputsPartialQueryArray.push(query);});}}});combinedQuery+=checkedInputsPartialQueryArray.join("");
1864if(HB.Refinements.categoryQuery!==""){combinedQuery+=':categoryPath:'+encodeURIComponent(HB.Refinements.categoryQuery);}
1865if($('#tabButtonAws').hasClass('active')){combinedQuery+=":tab:blog";}
1866if(HB.Refinements.currentRange!==""){let splits=this.currentRange.split(":");combinedQuery+='&facetCode='+encodeURIComponent(splits[1]);let rangeSplits=splits[2].split("TO");combinedQuery+='&relMin='+encodeURIComponent(rangeSplits[0])+'&relMax='+encodeURIComponent(rangeSplits[1]);}
1867if(this.isProductSearchTabSelected()){if(HB.Refinements.sortValue!=null){combinedQuery+="&sort="+encodeURIComponent(HB.Refinements.sortValue);}else if(HB.Refinements.currentSort!=null){combinedQuery+="&sort="+encodeURIComponent(HB.Refinements.currentSort);}}
1868return combinedQuery;},onFacetUpdate:function($submitElement){HB.Refinements.debug>0?console.log("onFacetUpdate",$submitElement):null;HB.Refinements.sendQuery($submitElement,HB.Refinements.onFacetUpdateSuccess);},onFacetChange:function($submitElement){HB.Refinements.debug>0?console.log("onFacetChange",$submitElement):null;HB.Refinements.scrollposition=$submitElement.closest(".facet-block").scrollTop();HB.Refinements.sendQuery($submitElement,HB.Refinements.onFacetChangeSuccess);},sendQuery:function($submitElement,callback){const $facetValueContainers=$submitElement.closest('#facet-filter-top').find('.filter-flex .facet .dropdown__facet-values');let combinedQuery=HB.Refinements.createCombinedQuery($facetValueContainers);if(combinedQuery){let url=window.location.href.split('?')[0];url+="/updateSearch?q="+combinedQuery;$("#facet-filter-top").addClass("loading");$.ajax({url:url,type:'GET',timeout:HB.config.ajax.timeout,success:function(result){callback(result,$submitElement.parents(".facet").data("facet-code"));let topFacets=$("#facet-filter-top");topFacets.removeClass("loading");topFacets.removeClass("hidden-xs");},error:function(jqXHR,textStatus,errorThrown){console.log("HB.Refinements.sendQuery encountered an error.",textStatus,errorThrown,jqXHR);let topFacets=$("#facet-filter-top");topFacets.removeClass("loading");topFacets.removeClass("hidden-xs");}});}},onFacetChangeSuccess:function(response,facetCode){HB.Refinements.debug>0?console.log("onFacetChangeSuccess",response,facetCode):null;let $topfacets=$(response.topfacets);HB.Refinements.bindButtonsOfTheFacets($topfacets);HB.Refinements.initSortingAsFacet($topfacets);HB.Refinements.initialRemoveListener($topfacets);HB.Refinements.handleFakeSelectFacet($topfacets);HB.Refinements.bindRangeFilter($topfacets.find(".range-facet"));$currentFacet=$topfacets.find(".facet[data-facet-code='"+facetCode+"']");$currentFacet.addClass("active");$currentFacet.find(".js-facet-filter-submit").enable();$currentFacet.find(".js-facet-filter-update").enable();let done=false;function onMutate(mutations){if(done)return;mutations.forEach(function(mutation){if(mutation.type==='attributes'&&mutation.attributeName==='class'){if(!$currentFacet.hasClass("active")){done=true;HB.Refinements.sendQuery($currentFacet,function(response,facetCode){HB.Refinements.onFacetUpdateSuccess(response,facetCode);});}}});}
1869let mutationObserver=new MutationObserver(onMutate);mutationObserver.observe($currentFacet.get(0),{attributes:true});$(".js-replace-topfacets").find(".facet[data-facet-code='"+facetCode+"']").replaceWith($currentFacet);$currentFacet.find(".facet-block").scrollTop(HB.Refinements.scrollposition-55);let currentFacetElement=document.querySelector(".facet[data-facet-code='"+facetCode+"']");currentFacetElement.dataset.observed="true";HB.Refinements.bindCategoryButtons();HB.Refinements.bubbleCount($('.facet[data-facet-code="'+facetCode+'"]'));if(HB.Refinements.debug>0){console.log(facetCode,$(".js-replace-topfacets").find(".facet[data-facet-code='"+facetCode+"']"));console.log("$topfacets",$topfacets);console.log("$currentFacet",$currentFacet);}},onFacetUpdateSuccess:function(response,facetCode){HB.Refinements.debug>0?console.log("onFacetUpdateSuccess",response,facetCode):null;let $topfacets=$(response.topfacets);HB.Refinements.setCurrentSort($topfacets);HB.Refinements.bindButtonsOfTheFacets($topfacets);HB.Refinements.initSortingAsFacet($topfacets);HB.Refinements.initialRemoveListener($topfacets);HB.Refinements.initFilterMarkingClass($topfacets);HB.Refinements.handleFakeSelectFacet($topfacets);HB.Refinements.bindRangeFilter($topfacets.find(".range-facet"));$topfacets.find(".js-facet-filter-submit").enable();$topfacets.find(".js-facet-filter-submit").removeClass('hidden');let appliedFilters=$('.applied-filter-wrapper-desktop');$(".js-replace-topfacets").replaceWith($topfacets);$('.applied-filter-wrapper-desktop').replaceWith(appliedFilters);HB.Refinements.bindModalClose();HB.Refinements.bindLinksOfTheFacets();HB.Refinements.bindCategoryButtons();HB.Refinements.reorderFacetLinkShowMore();if(HB.Refinements.filtersExpanded){HB.Refinements.onLinkFacetShowMore();}
1870HB.Refinements.debug>0?console.log(facetCode,$(".facet[data-facet-code='"+facetCode+"']")):null;},onFacetSingleSelect:function(event){$(event.currentTarget).closest('form').submit();},reorderFacetLinkShowMore:function(){const $facetContainer=$('#facet-filter-top .facet-filter');const $linkWrapper=$('.link-wrapper-facet--show-more');$linkWrapper.addClass('hidden');if($facetContainer.length&&HB.Utils.isOverflown($facetContainer)){const $facetElements=$facetContainer.find('.facet');if($facetElements.length){$facetElements.css('order','');$linkWrapper.removeClass('hidden');$($facetElements.get().reverse()).each(function(index,element){$(element).css('order','9');
1870if(HB.Utils.isChildVisibleInParent($facetContainer,$linkWrapper)){return false;}});}}},getCombinedQueryFromMultipleQueries:function(_partialQueryArray){let newQuery=HB.Refinements.query;if(_partialQueryArray.length){_partialQueryArray.forEach(function(currentValue,index){if(newQuery.indexOf(currentValue)===-1){newQuery=newQuery+currentValue;}});if(newQuery!==""){return newQuery;}}
1871return false;},faceSortMobileOptionsBinding:function(wrapperForm){wrapperForm.find('#sort_form_mobile select').on('click',function(){const option=$(event.currentTarget);const value=option.val();const $select=option.closest('.facet-sorting').find('form select');if($select.length&&value){$select.val(value);HB.Refinements.sortValue=value;}});},initSortingAsFacet:function(_element){if(_element&&_element.length&&_element.find('.facet-sorting').length){const $facetSorting=_element.find('.facet-sorting');const $customOption=$facetSorting.find('.custom-option');const $formSelect=$facetSorting.find('#sort_form1 select');if($formSelect.find('option').length){$formSelect.find('option').each(function(index,element){const isChecked=$(element).attr('selected')=='selected'?'selected':'';if(index==0){$customOption.attr('data-value',$(element).val());$customOption.find('.real-label').text($(element).text());$customOption.addClass(isChecked);}else{const $clone=$customOption.clone();$clone.attr('data-value',$(element).val());$clone.find('.real-label').text($(element).text());$clone.removeClass('selected');$clone.addClass(isChecked);$customOption.after($clone);}});HB.Refinements.bindSortingOptions(_element);}}},initFilterMarkingClass:function($facetFilterWrapper){let facets=$facetFilterWrapper.find('.facet .facetHead .facet-applied-filters-wrapper');facets.each(function(){if($(this).children().length>0){$(this).closest('.facet').addClass('active-filters');HB.Refinements.bubbleCount($(this).closest('.facet'));}else{$(this).closest('.facet').removeClass('active-filters');}});},bindRemoveAllFilters:function($facetFilterWrapper){const removeAllButton=$facetFilterWrapper.find('.btn-remove-all-filters');removeAllButton.on('click',function(event){let filterTopElement=$('#facet-filter-top');if(!filterTopElement.hasClass("hidden-xs")){event.preventDefault();event.stopPropagation();let dummyElement=$('<div></div>');HB.Refinements.categoryQuery='';HB.Refinements.currentRange='';HB.Refinements.sendQuery(dummyElement,HB.Refinements.onFacetUpdateSuccess);}});const currentUrl=window.location.href;let currentPage=window.location.href.split('?')[0];let newUrl=currentPage+"?q="+HB.Refinements.searchTerm;let params=new URLSearchParams(currentUrl.split('?')[1]);let queryParam=params.get('q');if(queryParam){let querySubParams=queryParam.split(':');if(querySubParams.length>1){for(let i=0;i<querySubParams.length;i++){if(querySubParams[i]==='tab'&&i+1<querySubParams.length){let newTab=querySubParams[i+1];if(newTab){newUrl+=":tab:"+encodeURIComponent(newTab);}}}}}
1872removeAllButton.attr('href',newUrl);},bindModalClose:function(){$('.mobile-filter-header .icon-close').on('click',function(){console.log('close');$('#facet-filter-top').addClass('hidden-xs');$('body').css('overflow-y','unset');});},handleFakeSelectFacet:function(_elementWrapper){if(_elementWrapper.length){let fakeSelectWrapper=_elementWrapper.find('.facet.select-wrapper');fakeSelectWrapper.find('.dropdown__facet-head').on('click',async function(){HB.Refinements.debug>0?console.log("on click",$(this)):null;let $selectWrapperElement=$(this).closest('.facet.select-wrapper');let openDataId=$selectWrapperElement.data('facet-code');let facetToClose=$('.facet.select-wrapper.active');if(facetToClose.length){let facetToCloseDataId=facetToClose.data('facet-code');facetToClose.removeClass('active');if(openDataId===facetToCloseDataId){return;}
1873let hasObserver=facetToClose.data('observed')===true;if(hasObserver){let timeout=500;let interval=10;while(timeout>0){let closedElement=$('.facet.select-wrapper[data-facet-code="'+facetToCloseDataId+'"]');if(closedElement.data('observed')!==true){break;}
1874await new Promise(resolve=>setTimeout(resolve,interval));timeout-=interval;}
1875await new Promise(resolve=>setTimeout(resolve,50));}}
1876if(!$selectWrapperElement.hasClass("facet-sorting")){$selectWrapperElement=$('.facet.select-wrapper[data-facet-code="'+openDataId+'"]');if(!$selectWrapperElement.length){return;}}
1877if(!$selectWrapperElement.hasClass('active')){$selectWrapperElement.addClass('active');HB.Refinements.debug>0?console.log("adding active"):null;if($selectWrapperElement.closest('.modal-content').length){$selectWrapperElement.closest('.modal-content').scrollTop(0);$selectWrapperElement.closest('.mobile-facet-wrapper').addClass('facet-opened');}
1878$(".submit-container.global").addClass("hidden");}else{if(!$selectWrapperElement.closest('.mobile-facet-wrapper').length){$selectWrapperElement.removeClass('active');HB.Refinements.debug>
18780?console.log("removing active"):null;}else{$selectWrapperElement.closest('.mobile-facet-wrapper').removeClass('facet-opened');}
1879$(".submit-container.global").removeClass("hidden");}});$('body').contextmenu(function(){fakeSelectWrapper.removeClass('active');});$('body').on('click',function(e){if(!fakeSelectWrapper.is(e.target)&&fakeSelectWrapper.has(e.target).length===0){fakeSelectWrapper.removeClass('active');}});HB.Refinements.initAddFacetSearchBars();}},initAddFacetSearchBars:function(){$(document).ready(function(){$('.js-searchable-facet-block').each(function(){var $facetBlock=$(this);var $facetValues=$facetBlock.find(".facet-value-item");var $facetSearch=$facetBlock.find(".facet-search");if(!$facetSearch.length){$facetBlock.prepend(`<input type='text' class='facet-search' placeholder='${HB.translations.searchFacet.searchPlaceHolder}'>`);}
1880$facetBlock.find(".facet-search").on("keyup",function(){var searchTerm=$(this).val().toLowerCase();$facetValues.each(function(){var facetValueText=$(this).text().toLowerCase();facetValueText.indexOf(searchTerm)==-1?$(this).hide():$(this).show();});});});});},};HB.Address={init:function(){HB.Address.bindAddressDetailsLink();HB.Address.bindDetailDeleteForm();},bindAddressDetailsLink:function(){var showAddressDetailLinks=$('.address-details-link');for(var i=0;i<showAddressDetailLinks.length;i++){var jShowAddressDetailLink=$(showAddressDetailLinks[i]);jShowAddressDetailLink.on("click",function(){HB.Address.getAddressDetails(this);});}},getAddressDetails:function(clickedElement){var addressID=clickedElement.getAttribute("data-address-id");if(null!==addressID&&undefined!==addressID){HB.Utils.displayModalPopupLoading('modal-lg');$.ajax({url:HB.config.url.address.details,type:'get',dataType:'json',data:{addressID:addressID},success:function(result){HB.Utils.displayModalPopup(result.addressPopup.content,'modal-lg');},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});}},bindDetailDeleteForm:function(){var removeForm=$('.address-detail-delete-form');removeForm.ajaxForm({dataType:'json',success:function(result){HB.Utils.displayModalPopup(result.addressPopup.content,'modal-lg');HB.Address.bindAddressDetailsLink();},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});},scrollToCollapse:function(){var hStickyHeader=$('#sticky-header-wrapper').height();$('#moreInfos').on('shown.bs.collapse',function(e){var target=$(this);var clickElement=e.target.previousElementSibling;if(target.length){$('html, body').animate({scrollTop:$(clickElement).offset().top-hStickyHeader},1000);}});}};HB.Approval={init:function(){HB.Approval.submitApproverStatus();},submitApproverStatus:function(){var selectApprover=$(".selectAp
1880prover");selectApprover.on("click",function(){$('#approverSelectedDecision').attr('value',$(this).attr('data-decision'));HB.MyAccount.getUserAccountContent(null,$("#approvalDecisionForm"));});}};HB.Bom={productData:{},variantCounter:{},dimensionCounter:{},delete_allowed:true,formIsValid:false,requiredFields:null,submitButton:$('[type=submit]'),bomContainer:$('.component-bom'),errorMessage:'<p class="form-error">'+HB.translations.general.requiredError+'</p>',invalidFields:[],maxFileSize:2,debug:0,templates:{'label':'<label class="control-label"></label>','form-group':'<div class="form-group left"></div>','required':'<div class="text-required mbm"></div>'},init:function(){var $bomForms=$(".bomForm");$.each($bomForms,function(index,value){if(value!=null){HB.Bom.bindBOMData(value,null);HB.Bom.bindSubmit(value);}});},checkRequiredFields:function(){$('.bom-error').removeClass('bom-error');$('.form-error').remove();HB.Bom.invalidFields=[];HB.Bom.requiredFields.each(function(index,element){var $element=$(element);if($element.val()=='null'||$element.val()==''&&!$element.hasClass('checkbox')){HB.Bom.invalidFields.push($element);$($element).addClass('bom-error');}});HB.Bom.checkSelectBoxes();if(HB.Bom.invalidFields.length>0){$('.bom-globalMessages').remove();HB.Bom.bomContainer.before('<div class="bom-globalMessages globalMessages" ><div class="alert negative"><div class="message-icon"><i class="icon-info"></i></div><span class="message"></span><div class="pull-right gm-close-icon mrm"><i class="icon-close"></i></div></div></div>');$('.message',$('.bom-globalMessages')).text(HB.translations.general.formGlobalError);$('html, body').animate({scrollTop:$(".bom-globalMessages").offset().top-40},1000);return false;}
1881HB.Bom.formIsValid=true;return true;},checkSelectBoxes:function(){var checkBoxes=[];HB.Bom.requiredFields.each(function(index,element){var $element=$(element);if($element.hasClass('checkbox')){checkBoxes.push($element);}});$(checkBoxes).each(function(index,boxes){if(!HB.Bom.validateSelectBoxes(boxes)){var $element=$(boxes);HB.Bom.invalidFields.push($element);$(HB.Bom.errorMessage).insertAfter($element);}});},validateSelectBoxes:function(_selectBoxes){if($(_selectBoxes).length>0){var $pseudoCheckbox=$(_selectBoxes).children();for(i=0;i<$pseudoCheckbox.length;++i){if($pseudoCheckbox[i].children[0].checked)return true;}}
1882return false;},bindBOMData:function(form,data){if('undefined'===typeof data||data===null){HB.Bom.productData[form.id]=$(form).data("formdata");}
1883$(form).find('#addProductButton').on('click',function(e){e.preventDefault();var $selector=$(form).find("#productSelector")[0];var selection=$selector.options[$selector.selectedIndex].value;HB.Bom.addProduct(form.id,HB.Bom.getId(selection),selection);var products=$('.bom-product');if(products.length==1){var $submitButton=$('.js-form-submit');$submitButton.removeClass('disabled');$submitButton.removeAttr('disabled');}
1884$('.showTooltip').tooltip();});},bindSubmit:function(form){HB.FormValidation.validateFileSize(form,HB.Bom.maxFileSize);$(form).find('button[type="submit"]').on('click',function(e){e.preventDefault();HB.Bom.requiredFields=$('.bom-required-field');if(HB.Bom.checkRequiredFields()){$(form).submit();}});},addProduct:function(formid,idCounter,product){var data=HB.Bom.productData[formid][product];var id=data['code']+'_'+idCounter;var $element=$('<div>');$element.attr('id',id);$element.attr('class','row bom-product mbm');var $label=$('<div>');$label.attr('class','col-xs-12');$label.append('<div class="h3 left">'+data['label']+'</div');$label.append(HB.Bom.createRemoveButton(id));;$element.append($label);$element.append('<input type="hidden" name="productVariants" id="productVariants" value="'+id+'" ></input>');HB.Bom.appendParameters($element,data['parameters'],id);$element.append(HB.Bom.createRequiredElement(data));$element.insertBefore($('#'+formid).find('#addProduct'));$element.hide();$element.slideDown("slow");},getId:function(product){if('undefined'===typeof HB.Bom.variantCounter[product]||HB.Bom.variantCounter[product]===null){HB.Bom.variantCounter[product]=0;}
1885return HB.Bom.variantCounter[product]++;},getDimensionsId:function(dimension){if('undefined'===typeof HB.Bom.dimensionCounter[dimension]||HB.Bom.dimensionCounter[dimension]===null){HB.Bom.dimensionCounter[dimension]=0;}
1886return HB.Bom.dimensionCounter[dimension]++;},appendParameters:function(row,parameters,id,isDimension){var cols=0;for(var parameter in parameters){var data=parameters[parameter];HB.Bom.debug>0?console.log("appendParameters: ",data,id):null;switch(data['type']){case'DESCRIPTION':row.append(HB.Bom.createDescriptionElement(data));break;case'CHECKBOX':row.append(HB.Bom.createCheckboxElement(data,id));break;case'RADIOBUTTON':row.append(HB.Bom.createRadioButtonElement(data,id));break;case'SELECTBOX':row.append(HB.Bom.createSelectboxElement(data,id));break;case'TEXTAREA':row.append(HB.Bom.createTextareaElement(data,id));break;case'TEXT':row.append(HB.Bom.createTextElement(data,id));break;case'DIMENSIONS':row.append(HB.Bom.createDimensions(data,id));break;case'IMAGE':row.append(HB.Bom.createImageElement(data,id));break;default:break;}
1887if(isDimension){var size=(data['width'])?data['width']:4;if(size<4){if(cols+size==4){row.find(".form-group").last().addClass('last');cols=0;}else if(cols+size>4){cols=size;}else{cols+=size;}}}}},createDimensions:function(data,id){var $addDimensionsButton=HB.Bom.createAddDimensionsButton(id);$addDimensionsButton.on('click',function(e){e.preventDefault();
1887HB.Bom.addDimension($(this).parent(),data,id).find(':input').first().focus();var $removeButtons=$(this).parents('#'+id).find(".dimensionRemoveButton");if($removeButtons.length>1){$removeButtons.attr("disabled",false);}
1888$('.showTooltip').tooltip();});var $elem=$('<div class="col-sm-12"></div>');$elem.append($addDimensionsButton);HB.Bom.addDimension($elem,data,id);return $elem;},addDimension:function(pos,data,id){var dimension_id=id+"_"+data['code'].replaceAll(" ","_")+"_"+HB.Bom.getDimensionsId(id);var $dimensions_row=$('<div class="row pos-relative" id="'+dimension_id+'"> </div>');var $parameters_col=$('<div class="col-sm-11 col-xs-12"></div>');var $parameters_row=$('<div class="row flex-row"></div>');HB.Bom.appendParameters($parameters_row,data['dimensions'],dimension_id,true);$parameters_col.append($parameters_row);$dimensions_row.append($parameters_col);var $removeButton=$('<div class="col-sm-1 col-xs-12 pos-bottom"></div>').append(HB.Bom.createRemoveDimensionButton(dimension_id));$dimensions_row.append($removeButton);$dimensions_row.hide();pos.find('#'+id+'_addButton').before($dimensions_row);$dimensions_row.slideDown("slow");return $dimensions_row;},createAddDimensionsButton:function(id){var $addButton=$('<button class="btn btn-function right showTooltip">');$addButton.attr('id',id+'_addButton');$addButton.attr('name',id+'_addButton');$addButton.attr('title',HB.translations.bom.addButton);$addButton.attr('type','button');var $icon=$('<i class="icon-plus"></i>');$addButton.append($icon);var $buttonCol=$('<div class="col-sm-1 col-xs-12"></div>');$buttonCol.append($addButton);var $buttonRow=$('<div class="row"></div>');$buttonRow.append($buttonCol);return $addButton;},createRemoveDimensionButton:function(id){var $removeButton=$('<button class="btn btn-function dimensionRemoveButton right showTooltip" title='+HB.translations.bom.removeButton+' onclick="HB.Bom.onClickRemoveDimension(\''+id+'\')" tabindex="-1" disabled>');$removeButton.attr('id',id+'_removeButton');$removeButton.attr('name',id+'_removeButton');$removeButton.attr('type','button');$removeButton.append('<i class="icon-minus"></i>');return $removeButton;},onClickRemoveDimension:function(id){if(HB.Bom.delete_allowed){HB.Bom.delete_allowed=false;var $removeRow=$("#"+id);var $removeButtons=$removeRow.parents('.bom-product').find(".dimensionRemoveButton");if($removeButtons.length===2){$removeButtons.attr("disabled",true);}
1889$removeRow.slideUp("slow",function(){$removeRow.remove();HB.Bom.delete_allowed=true;});}},createDescriptionElement:function(data){var $elem=$(HB.Bom.templates['form-group']);$elem.addClass("col-sm-12");$elem.html('<span>'+data['label']+'</span>');return $elem;},createRequiredElement:function(data){var $elem=$(HB.Bom.templates['required']);$elem.addClass("col-sm-12");$elem.html('<span>'+HB.translations.bom.required+'</span>');return $elem;},createCheckboxElement:function(data,id){var $elem=$(HB.Bom.templates['form-group']);var $label=$(HB.Bom.templates['label']);$label.append(data['label']);if(data['required']){$label.append('*');}
1890var $inputDiv=$('<div>');if('undefined'!==typeof data['choices']&&data['choices'].length>0){$inputDiv.attr('class','controls checkbox');if(data['required']){$inputDiv.addClass('bom-required-field');}
1891for(var choice in data['choices']){var chc=data['choices'][choice];
1891var $innerLabel=$('<label>');$innerLabel.attr('class','control-label pseudo-checkbox');var $input=$('<input>');$input.attr('type','checkbox');$input.attr('id',id+'_'+data['code']+"_"+choice);$input.attr('name',id+'_'+data['code']);$input.attr('value',chc);var $span=$('<span>');$span.attr('class','checkbox');$span.append('<i class="icon-check"></i>');var $spanLabel=$('<span>');$spanLabel.attr('class','real-label');$spanLabel.append(chc);$innerLabel.append($input);$innerLabel.append($span);$innerLabel.append($spanLabel);$inputDiv.append($innerLabel);$elem.append($label);$label.append($inputDiv);}}else{$inputDiv.attr('class','controls');if(data['required']){$inputDiv.addClass('bom-required-field');}
1892$innerLabel=$('<label>');$innerLabel.attr('class','control-label pseudo-checkbox');$input=$('<input>');$input.attr('type','checkbox');$input.attr('id',id+'_'+data['code']);$input.attr('name',id+'_'+data['code']);$input.attr('value',data['code']);if(data['required']){$input.attr('required','required');}
1893$span=$('<span>');$span.attr('class','checkbox');$span.append('<i class="icon-check"></i>');$spanLabel=$('<span>');$spanLabel.attr('class','real-label');$innerLabel.append($input);$innerLabel.append($span);$innerLabel.append($spanLabel);$inputDiv.append($innerLabel);$elem.append($label);$label.append($inputDiv);}
1894$elem.addClass(HB.Bom.getClassForWidth(data['width']));return $elem;},createRadioButtonElement:function(data,id){var $elem=$(HB.Bom.templates['form-group']);var $label=$(HB.Bom.templates['label']);$label.append(data['label']);if(data['required']){$label.append('*');}
1895$elem.append($label);for(var choice in data['choices']){var chc=data['choices'][choice];var labelId=id+'_'+data['code']+'Label'
1896var $innerDiv=$('<div>');$innerDiv.attr('class','form-field-label pseudo-checkbox '+labelId);
1896var $innerLabel=$('<label>');$innerLabel.attr('class','pseudo-checkbox '+labelId);$innerLabel.attr('for',id+'_'+data['code']+"_"+chc);var $input=$('<input>');$input.attr('type','radio');$input.attr('id',id+'_'+data['code']+"_"+chc);$input.attr('name',id+'_'+data['code']);$input.attr('class','radio-button '+id+'_'+data['code']);$input.attr('value',chc);if(data['required']){$input.addClass('bom-required-field');}
1897var $span=$('<span>');$span.attr('class','radio-button');$span.append('<i class="radio-inner"></i>');var $spanLabel=$('<span>');$spanLabel.attr('class','real-label');$spanLabel.append(chc);$innerLabel.append($input);$innerLabel.append($span);$innerLabel.append($spanLabel);$innerDiv.append($innerLabel);$label.append($innerDiv);}
1898if(data['required']){$elem.find('input')[0].checked=true;}
1899$elem.addClass(HB.Bom.getClassForWidth(data['width']));return $elem;},createSelectboxElement:function(data,id){var $elem=$(HB.Bom.templates['form-group']);var $label=$(HB.Bom.templates['label']);$label.append(data['label']);var $inputDiv=$('<div>');$inputDiv.attr('class','controls select-wrapper');var $control=$('<div>');$control.attr('class','dropdown-fake');$control.append('<i class="icon-arrow-down"></i>');var $input=$('<select>');$input.attr('id',id+'_'+data['code']);$input.attr('name',id+'_'+data['code']);if(data['required']){$input.attr('required','required');$label.append('*');$input.addClass('bom-required-field');}
1900for(choice in data['choices']){var opt=data['choices'][choice];var $option=$('<option>');$option.attr('value',opt);$option.append(opt);if(data['value']===opt){$option.attr('selected','selected');}
1901$input.append($option);}
1902HB.Bom.debug>1?console.log($control,$input,$inputDiv):null;$inputDiv.append($control);$inputDiv.append($input);$elem.append($label);$label.after($inputDiv);$elem.addClass(HB.Bom.getClassForWidth(data['width']));return $elem;},createTextareaElement:function(data,id){var $elem=$(HB.Bom.templates['form-group']);var $label=$(HB.Bom.templates['label']);$label.append(data['label']);var $inputDiv=$('<div>');$inputDiv.attr('class','controls');var $input=$('<textarea>');$input.attr('id',id+'_'+data['code']);$input.attr('name',id+'_'+data['code']);$input.attr('class','form-control');$input.attr('value',(data['value']!==null?data['value']:''));if(data['required']){$input.attr('required','required');$label.append('*');$input.addClass('bom-required-field');}
1903$elem.addClass(HB.Bom.getClassForWidth(data['width']));$inputDiv.append($input);$elem.append($label);$elem.append($inputDiv);return $elem;},createTextElement:function(data,id){var $elem=$(HB.Bom.templates['form-group']);var $label=$(HB.Bom.templates['label']);$label.append(data['label']);var $inputDiv=$('<div class="controls">');var $inputField=$('<input>');$inputField.attr('type','text');$inputField.attr('id',id+'_'+data['code']);$inputField.attr('name',id+'_'+data['code']);$inputField.attr('class','text');$label.attr('for',id+'_'+data['code']);$inputField.attr('value',(data['value']!==null?data['value']:''));$inputField.keypress(function(event){if(event.keyCode==13)event.preventDefault();});if(data['required']){$inputField.attr('required','required');$label.append('*');$inputField.addClass('bom-required-field');}
1904$elem.addClass(HB.Bom.getClassForWidth(data['width']));$inputDiv.append($inputField);$elem.append($label);$label.after($inputDiv);return $elem;},createImageElement:function(data,id){var $elem=$(HB.Bom.templates['form-group']);var $label=$(HB.Bom.templates['label']);$label.append(data['label']);var $imageDiv=$('<div class="image">');var $imageField=$('<img>');$imageField.attr('class','img-responsive');$imageField.attr('id',id+'_'+data['code']);$imageField.attr('alt',data['image'].altText);$imageField.attr('src',data['image'].url);$label.attr('for',id+'_'+data['code']);$elem.addClass(HB.Bom.getClassForWidth(data['width']));$imageDiv.append($imageField);$elem.append($label);$label.after($imageDiv);return $elem;},createRemoveButton:function(id){var $div=$('<div class="right"></div>');var $removeButton=$('<button class="btn close showTooltip">');$removeButton.attr('id',id+'_button');$removeButton.attr('name',id+'_button');$removeButton.attr('title',HB.translations.bom.close);$removeButton.attr('type','button');$removeButton.on('click',function(e){e.preventDefault();if(HB.Bom.delete_allowed){HB.Bom.delete_allowed=false;var row=document.getElementById(id);$(row).slideUp("slow",function(){$(row).remove();HB.Bom.delete_allowed=true;var products=$('.bom-product');if(products.length==0){$('.bom-globalMessages').remove();var $submitButton=$('.js-form-submit');$submitButton.addClass('disabled');$submitButton.attr('disabled','disabled');}});}});var $icon=$('<i class="icon-bin"></i>');$removeButton.append($icon);$div.append($removeButton);return $div;},getClassForWidth:function(width){switch(width){case 1:return'col-sm-3 col-xs-12';case 2:return'col-sm-6 col-xs-12';case 3:return'col-sm-9 col-xs-12';case 4:return'col-sm-12 col-xs-12';default:return'col-xs-12';}}};
1904HB.CheckoutSummary={$simpleCheckoutContainer:$('.simple-checkout'),debug:0,init:function(){if(HB.CheckoutSummary.$simpleCheckoutContainer.length>0){HB.CheckoutSummary.bindAlternativeSubmit();HB.CheckoutSummary.bindInfoToggles();HB.CheckoutSummary.bindOfferRequestRegisteredSubmit();HB.CheckoutSummary.bindIdsSubmit();HB.CheckoutSummary.bindBonusPointsFeatures();HB.CheckoutSummary.bindApplyVoucher();HB.CheckoutSummary.bindToReleaseVoucher();HB.CheckoutSummary.bindCouponToggle();HB.ListItem.checkStockLevels(HB.CheckoutSummary.$simpleCheckoutContainer);HB.CheckoutSummary.prefillBonusPoints();}},bindAlternativeSubmit:function(){$('#checkout-summary-submit-alternative').on('click',function(_context){$('#placeOrderForm').submit();});},bindInfoToggles:function(){let infoBox=HB.CheckoutSummary.$simpleCheckoutContainer.find('.infoBoxWrapperTop .info-box');infoBox.addClass('active');infoBox.click(function(e){HB.CheckoutSummary.debug?console.log(e):null;$(e.target).closest(".info-box").toggleClass("active");});},bindBonusPointsFeatures:function(){if($('#useBonusPoints').length&&$('#bonuspointslider').length){HB.CheckoutSummary.setMaxBonusPointsToPreventNegativePrice();$('#useBonusPoints').on('change',function(e){HB.CheckoutSummary.onUseBonusPoints(e);});$('#bonuspointslider').on('input',function(e){HB.CheckoutSummary.onBonusPointsSlider(e);});const $form=$('#checkout-summary-submit-order').closest('form');$form.submit(function(e){e.preventDefault();const val=$('#bonuspointslider').val();$('#redeemedBonusPoints').val(val);HB.Utils.localStorage.remove('tempBonusPoints');e.currentTarget.submit();});HB.CheckoutSummary.changeInputRangeForInternetExplorer();}},onUseBonusPoints:function(e){const $container=$('.bonusPointsWraper');if($container.length){if($container.hasClass('hidden')){$container.removeClass('hidden');}else{$container.addClass('hidden');HB.CheckoutSummary.resetBonusPointsSlider();}}},onBonusPointsSlider:function(e){const val=e.currentTarget.value;const format=new Intl.NumberFormat(HB.config.currentLanguage,{style:'currency',currency:HB.config.currentCurrency});$('#bonuspointsliderlabel').html(val+" "+HB.translations.bonusPoints.redeem);const discount=HB.CheckoutSummary.calculateDiscountForBonusPoints(val);$('#pointsdiscountvalue').html(format.format(-discount));let total;if(typeof HB.cartData.totalPriceWithDiscounts!=='undefined'&&HB.cartData.totalPriceWithDiscounts>0){total=Math.max(0,HB.cartData.totalPriceWithDiscounts-discount);}else{total=Math.max(0,HB.cartData.totalPrice-HB.cartData.orderDiscounts-discount);}
1905$('#totalPriceWithDiscountValue').html(format.format(total));const taxPercentage=(HB.cartData.totalTax*100/(HB.cartData.totalPriceWithTax-HB.cartData.totalTax));let tax=total/100*taxPercentage;if(isNaN(tax)){tax=0.00;}
1906$('#taxValue').html(format.format(tax));const totalWithTax=total+tax;$('#totalWithTax').html(format.format(totalWithTax));const redeemableBonusPoints=HB.CheckoutSummary.calculateRedeemableBonusPoints(total);$('#redeemable-bonus-points-value').html(redeemableBonusPoints);HB.Utils.localStorage.set('tempBonusPoints',val);},resetBonusPointsSlider:function(){const $slider=$('#bonuspointslider');$slider.val(0);$slider.trigger("input");HB.Utils.localStorage.remove('tempBonusPoints');},setMaxBonusPointsToPreventNegativePrice:function(){const availableBonusPoints=HB.bonusPoints.available;const discountEuroPerBonusPoint=HB.bonusPoints.discountEuroPerBonusPoint;if(availableBonusPoints&&discountEuroPerBonusPoint){const discountEuroWithAllBonusPoints=HB.CheckoutSummary.calculateDiscountForBonusPoints(availableBonusPoints);let total;if(typeof HB.cartData.totalPriceWithDiscounts!=='undefined'&&HB.cartData.totalPriceWithDiscounts>0){total=HB.cartData.totalPriceWithDiscounts;}else{total=HB.cartData.totalPrice-HB.cartData.orderDiscounts;}
1907if(discountEuroWithAllBonusPoints>total){const maxBonusPoints=HB.CheckoutSummary.calculateNecessaryBonusPointsForDiscount(total);const storedBonusPoints=HB.Utils.localStorage.get('tempBonusPoints');$('#bonuspointslider').attr('max',maxBonusPoints);if(storedBonusPoints!==undefined&&parseInt(storedBonusPoints)>maxBonusPoints){HB.Utils.localStorage.set('tempBonusPoints',maxBonusPoints);}}}},prefillBonusPoints:function(){let tempBonusPoints=HB.Utils.localStorage.get('tempBonusPoints');if(!HB.Utils.localStorage.isSupported()||!tempBonusPoints)return;$('#useBonusPoints')[0].checked=true;$('#bonuspointslider')[0].value=tempBonusPoints;
1907HB.CheckoutSummary.onUseBonusPoints();HB.CheckoutSummary.onBonusPointsSlider({currentTarget:{value:tempBonusPoints}});},calculateDiscountForBonusPoints:function(points){return Math.floor((points*HB.bonusPoints.discountEuroPerBonusPoint)*100)/100;},calculateNecessaryBonusPointsForDiscount:function(discount){return Math.ceil(discount/HB.bonusPoints.discountEuroPerBonusPoint);},calculateRedeemableBonusPoints:function(total){return Math.floor(total*HB.bonusPoints.bonusPointsPerEuro);},changeInputRangeForInternetExplorer:function(e){if(window.document.documentMode){$('#bonuspointslider').attr('type','number');$('#bonuspointslider').attr('placeholder','Zahl eingeben');}},bindOfferRequestRegisteredSubmit:function(e){$('.js-checkout-summary-request-offer-registered').click(function(){$('#requestOfferRegistered').val('true');});},bindIdsSubmit:function(e){$('#checkout-summary-submit-ids-order').click(function(){$('#idsCheckout').val('true');});},bindApplyVoucher:function(){let $btn=$("#js-voucher-apply-btn");if($btn.length!=0){$btn.on("click",function(e){HB.CheckoutSummary.handleApplyVoucher(e);});$("#js-voucher-code-text").on("keypress",function(e){let code=(e.keyCode?e.keyCode:e.which);if(code==13){HB.CheckoutSummary.handleApplyVoucher(e);}});}},handleApplyVoucher:function(e){let voucherCode=$.trim($("#js-voucher-code-text").val());if(voucherCode!==''&&voucherCode.length>0){$("#applyVoucherForm").submit();}},bindToReleaseVoucher:function(){let $btn=$('.js-release-voucher-remove-btn');if($btn.length!==0){$btn.on("click",function(event){$(this).closest('form').submit();});}},bindCouponToggle:function(){let couponContainer=$('.js-voucher-respond');let couponToggleCheckbox=$('#displayCouponCheckbox');couponToggleCheckbox.is(':checked')?couponContainer.fadeIn('slow'):null;couponToggleCheckbox.on('click',function(){couponToggleCheckbox.is(':checked')?couponToggleCheckbox.checked=false:couponToggleCheckbox.checked=true;couponToggleCheckbox.on('change',function(){if(couponToggleCheckbox.is(':checked')){couponContainer.fadeIn('slow');}else{$('.js-release-voucher-remove-btn').click();couponContainer.fadeOut('slow');}});});}};HB.CompletedForms={init:function(){HB.CompletedForms.bindDetailsLink();},bindDetailsLink:function(){var showDetailLinks=$('.detail-completedform-link');for(var i=0;i<showDetailLinks.length;i++){var jshowDetailLinks=$(showDetailLinks[i]);jshowDetailLinks.on("click",function(e){e.preventDefault();HB.CompletedForms.getCompletedFormDetails(this);});}},getCompletedFormDetails:function(clickedElement){HB.Utils.displayModalPopupLoading('modal-lg');var order=clickedElement;$.ajax({url:$(order).attr('href'),type:'get',dataType:'json',success:function(result){HB.Utils.displayModalPopup(result.bomDetailsPopup.content,'modal-lg');},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});}};HB.ManageUsers={init:function(){HB.ManageUsers.bindUsersDetailsLink();HB.ManageUsers.bindLinkDisableUser();HB.ManageUsers.bindLinkDeleteUser();HB.ManageUsers.bindToggleUserForm();$(".accountUnitManageUsers").find('.js-apply-filter').on('click',HB.ManageUsers.onManageUsersFilterSubmit);},bindUsersDetailsLink:function(){var showAddressDetailLinks=$('.detail-user-link');for(var i=0;i<showAddressDetailLinks.length;i++){var jShowAddressDetailLink=$(showAddressDetailLinks[i]);jShowAddressDetailLink.on("click",function(e){e.preventDefault();HB.ManageUsers.getUserDetails(this);});}},getUserDetails:function(clickedElement){var userID=clickedElement.getAttribute("data-user-id");if(null!==userID&&undefined!==userID){HB.Utils.displayModalPopupLoading('modal-lg');$.ajax({cache:false,url:HB.config.url.users.details,type:'get',dataType:'json',data:{user:userID},timeout:5000,success:function(result){HB.Utils.displayModalPopup(result.userDetailsPopup.content,'modal-lg');HB.ManageUsers.bindlinkRemovePermission();HB.ManageUsers.bindLinkDisableUser();HB.ManageUsers.bindToggleUserForm();HB.ManageUsers.bindLinkDeleteUser();},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});}},displayNewUserPopup:function(newUserResult){HB.Utils.displayModalPopup(newUserResult.newUserPopup.content,'modal
1907-md');},bindLinkRemovePermission:function(clickedElement){var linkResetPW=$(".removePermission-link")
1908linkResetPW.on("click",function(event){$.ajax({url:$(this).attr('href'),type:'get',dataType:'json',success:function(result){HB.Utils.displayModalPopup(result.userDetailsPopup.content,'modal-lg');},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});event.preventDefault();});},bindLinkDisableUser:function(clickedElement){$(document).on('click','.link-disableUser',function(event){var userID=$(this).attr("data-user-id");$.ajax({url:HB.config.url.users.userDisable,type:'get',dataType:'json',data:{user:userID},success:function(result){HB.Utils.displayModalPopup(result.userDisablePopup.content,'modal-lg');HB.ManageUsers.bindToggleUserForm();},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});event.preventDefault();});},bindLinkDeleteUser:function(){$(document).on('click','.link-deleteUser',function(event){var userID=$(this).attr("data-user-id");$.ajax({url:HB.config.url.users.userDelete,type:'get',dataType:'json',data:{user:userID},success:function(result){HB.Utils.displayModalPopup(result.userDeletePopup.content,'modal-lg');HB.ManageUsers.deleteUserFromList(userID);},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});event.preventDefault();});},bindToggleUserForm:function(){var toggleUserActiveForm=$('.js-toggleUserActive');toggleUserActiveForm.ajaxForm({dataType:'json',success:function(result){var tableEntry=$('.table-grid-entry[data-id="'+result.userDetailsPopup.id+'"]');HB.Utils.hideModalPopup();$('#globalMessages').html(result.userDetailsPopup.message);tableEntry.find('.table-entry-moreInfo .hb-action').replaceWith(result.userDetailsPopup.button);tableEntry.find('label .js-status').html(result.userDetailsPopup.status);tableEntry.find('.hb-collapse .js-status').html(result.userDetailsPopup.status);},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);},complete:function(){HB.ManageUsers.bindToggleUserForm();HB.Utils.fadeSuccessAlert();}});},onManageUsersFilterSubmit:function(event){var $button=$(event.currentTarget);var $form=$button.closest('form');var url=$form.attr('action')+'&'+$form.serialize();HB.MyAccount.getUserAccountContent(url,$form);},deleteUserFromList:function(userID){let deleteUser=$('.js-deleteUser');deleteUser.ajaxForm({dataType:'json',success:function(result){if(result==='true'){let tableEntry=$('.table-grid-entry[data-id="'+userID+'"]');HB.Utils.hideModalPopup();tableEntry.remove();}}});}};HB.Documents={init:function(){HB.Documents.bindToShowDocumentsDetails();HB.Documents.bindChoosenForAddress();HB.Documents.bindOrderNumberFilter();HB.Documents.bindDocumentNumberFilter();HB.Documents.bindUpdateOfferCockpit();HB.Documents.bindAcceptOfferCockpit();HB.Documents.bindTransferToIdsCockpit();HB.Documents.bindAcceptAndTransferToIdsCockpit();HB.Documents.bindAlternativePositionSelection();HB.Documents.bindOfferQuantityControls();},bindToShowDocumentsDetails:function(){var showDocumentDetailsForm=$('form.show-documentsDetails-form');showDocumentDetailsForm.ajaxForm({success:HB.Documents.displayDocumentDetailsPopup});showDocumentDetailsForm.on("click",function(e){HB.Utils.displayModalPopupLoading('modal-lg');});},displayDocumentDetailsPopup:function(documentDetailsResult,statusText,xhr,formElement){HB.Utils.displayModalPopup(documentDetailsResult.documentDetailsPopup.content,'modal-lg');HB.Documents.bindToShowDocumentsDetailsRefDokument();setTimeout(function(){HB.Print.bindModalPrintButton($('.documentsList-details-popup .print-button'));},100);},showDetailPanelLoader:function(){var $wrapper=$('.js-document-entry-wrapper.expanded');if($wrapper.length){var $panel=$wrapper.find('.js-panel-details');var $imgElement=$('<img />',{src:$panel.data('loader'),class:'detail-loader',alt:'Detail Loader'});$panel.html($imgElement);}},replaceDocumentDetailsPanel:function(content){var $wrapper=$('.js-document-entry-wrapper.expanded');if($wrapper.length){var $panel=$wrapper.find('.js-panel-details');var detailUrl=$wrapper.find('.js-document-details').data('url');if(detailUrl){HB.MyAccount.DetailsCache[detailUrl]=content;}
1909HB.MyAccount.replaceDetails(content,$wrapper,$panel,'.js-document-entry-wrapper',null,null);}},updateHeaderTotalAfterOfferChange:function(content){var $wrapper=$('.js-document-entry-wrapper.expanded');if(!$wrapper.length){return;}
1910var $nettoTotal=$('<div/>').html(content).find('.js-offer-total-netto').first();if($nettoTotal.length){$wrapper.find('.js-document-total-value').text($.trim($nettoTotal.text()));}},updateHeaderButtonAfterOfferAccept:function(content){var $wrapper=$('.js-document-entry-wrapper.expanded');if(!$wrapper.length){return;}
1911var $waitingButton=$('<div/>').html(content).find('.js-offer-waiting-btn').first();if($waitingButton.length){var waitingText=$.trim($waitingButton.text());$wrapper.find('.js-hide-on-extend').text(waitingText).attr('title',waitingText);}},removeCurrentDocumentFromDetailsCache:function(){var $wrapper=$('.js-document-entry-wrapper.expanded');if($wrapper.length){var detailUrl=$wrapper.find('.js-document-details').data('url');if(detailUrl){HB.MyAccount.removeEntryFromDetailsCache(detailUrl);}}},removeOfferEntriesFromDashboardCache:function(){if(typeof HB.MyAccount.DashboardCache==='undefined'){return;}
1912var documentsControllerPath='/my-account/documents';var offerDocumentTypeParam='documentType=OFFERS';var keysToRemove=Object.keys(HB.MyAccount.DashboardCache).filter(function(url){var listUrlIndex=url.indexOf(documentsControllerPath);if(listUrlIndex===-1){return false;}
1913var restAfterList=url.substring(listUrlIndex+documentsControllerPath.length);if(restAfterList!==''&&restAfterList.indexOf('?')!==0){return false;}
1914return url.indexOf(offerDocumentTypeParam)!==-1;});$.each(keysToRemove,function(index,url){HB.MyAccount.removeEntryFromDashboardCache(url);});},bindToShowDocumentsDetailsRefDokument:function(){HB.Documents.bindAcceptOffer();var showDocumentDetailsForm=$('form.show-documentsDetailsRefDokuemnt-form');showDocumentDetailsForm.ajaxForm({dataType:'json',success:HB.Documents.displayDocumentDetailsPopup});showDocumentDetailsForm.submit(function(e){HB.Utils.displayModalPopupLoading('modal-lg');});},bindAcceptOffer:function(){var showDocumentDetailsForm=$('form.acceptOffer');showDocumentDetailsForm.ajaxForm({dataType:'json',success:HB.Documents.displayDocumentDetailsPopup});},displayOfferResponseSentPopUp:function(accountOfferResult){HB.Utils.displayModalPopup(accountOfferResult.accountOfferResponseSentPopUp.content,'modal-md');},accountCollapse:function(selector){$(selector).collapse();},bindOrderNumberFilter:function(){$('input[name="orderNumberFilter"]').on("input",()=>{$('input[name="fromDate"]').val("");$('#documentTypes').val('');if($('input[name="orderNumberFilter"]').val().length<3){$('.js-order-number-min-input-warning').show();$('#documentFilterSubmit').prop('disabled',true);}
1915else{$('.js-order-number-min-input-warning').hide();$('#documentFilterSubmit').prop('disabled',false);}});},bindDocumentNumberFilter:function(){$('input[name="documentNumberFilter"]').on("input",()=>{$('input[name="fromDate"]').val("");$('#documentTypes').val('');let documentNumberFilterInput=$('input[name="documentNumberFilter"]').val();if(documentNumberFilterInput.length<3||documentNumberFilterInput.length>8||!(/^\d+$/.test(documentNumberFilterInput))){$('#documentNumberFilter').addClass('document-number-input-warning-input');$('#documentNumberFilterLabel').addClass('document-number-input-warning-label');$('.js-document-number-min-input-warning').show();$('#documentFilterSubmit').prop('disabled',true);}
1916else{$('#documentNumberFilter').removeClass('document-number-input-warning-input');$('#documentNumberFilterLabel').removeClass('document-number-input-warning-label');$('.js-document-number-min-input-warning').hide();$('#documentFilterSubmit').prop('disabled',false);}});},datepickerDocumentsList:function(){if(HB.config.currentLanguage=='de'){$.fn.datepicker.dates['de']={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan.","Feb.","Mar.","Apr.","Mai","Jun.","Jul.","Aug.","Sept.","Okt.","Nov.","Dez."],today:"Heute"};}
1917var nowTemp=new Date();var now=new Date(nowTemp.getFullYear(),nowTemp.getMonth(),nowTemp.getDate(),0,0,0,0);var startDatePropertyValue="";if(HB.propertyValue.fromDate!=null&&HB.propertyValue.fromDate!==""){if(HB.propertyValue.fromDate.indexOf(".",2)==2&&HB.propertyValue.fromDate.indexOf(".",5)==5){startDatePropertyValue=HB.propertyValue.fromDate;var splitDate=HB.propertyValue.fromDate.split('.');var fromDate=new Date(splitDate[2],splitDate[1]-1,splitDate[0]);var now=new Date();now.setHours(0,0,0,0);var differenceDays=Math.round((now-fromDate)/(1000*60*60*24));HB.Documents.validateInputFromDate(differenceDays);}else if(HB.propertyValue.fromDate.match(/^[0-9]+$/)!=null){startDatePropertyValue="-"+HB.propertyValue.fromDate+"d";HB.Documents.validateInputFromDate(HB.propertyValue.fromDate);}}
1918var fromDate=$('#fromDate').datepicker({changeMonth:true,changeYear:true,viewMode:"months",minViewMode:"months",endDate:'+0d',format:'M yy',language:'de'}).on('changeDate',function(ev){$('#fromDate').val($(this).val());$('.datepicker').hide();if($(this).val().length===10){$('#toDate')[0].focus();}
1919$('input[name="orderNumberFilter"]').val("");$('input[name="documentNumberFilter"]').val("");$('.document-number-min-input-warning').hide();$('.order-number-min-input-warning').hide();$('#documentFilterSubmit').prop('disabled',false);$('#documentTypes').val()==null?$('#documentTypes option:first').prop('selected',true):null;$('#documentFilterSubmit').trigger('click');});$('#toDate').on('focusout',function(){HB.Documents.validateInputToDate();});},validateInputFromDate:function(daysInPast){var $inputFields=$('.datepickerBox').find('#fromDate, #toDate');$inputFields.each(function(){$(this).on('input',function(){var $userInputValue=$(this).val();if($userInputValue.length===10){if($userInputValue.indexOf(".")===2){var $userInputValueSplit=$userInputValue.split('.');var $modifiedInputDate=new Date($userInputValueSplit[2],($userInputValueSplit[1]-1),$userInputValueSplit[0],0,0,0,1);var $maximumDateInPast=new Date();$maximumDateInPast.setDate($maximumDateInPast.getDate()-daysInPast);if($(this).attr('id')==='#toDate'&&$('#fromDate').val().length===10){$(this).focusout();}else if($modifiedInputDate<$maximumDateInPast){var $day=$maximumDateInPast.getDate();var $month=$maximumDateInPast.getMonth()+1;var $year=$maximumDateInPast.getFullYear();if($day<10){$day='0'+$day;}
1920if($month<10){$month='0'+$month;}
1921$(this).val($day+'.'+$month+'.'+$year);}}}});});},validateInputToDate:function(){var $fromDate=$('#fromDate').val();var $toDate=$('#toDate').val();if($fromDate.length===10&&$toDate.length===10){var $splitFromDate=$fromDate.split('.');var $modifiedFromDate=new Date($splitFromDate[2],($splitFromDate[1]-1),$splitFromDate[0],0,0,0,1);var $splitToDate=$toDate.split('.');var $modifiedToDate=new Date($splitToDate[2],($splitToDate[1]-1),$splitToDate[0],0,0,0,1);if($modifiedFromDate>$modifiedToDate){$('#toDate').val($fromDate);}}},PrintContent:function(){var DocumentContainer=document.getElementById('hbModal');var WindowObject=window.open("","PrintWindow","width=750,height=650,top=0,left=0,toolbars=no,scrollbars=yes,status=no,resizable=yes");WindowObject.document.writeln('<!DOCTYPE html>');WindowObject.document.writeln('<html><head><title></title>');$("link[rel='stylesheet']").each(function(){style=$(this).attr('href');WindowObject.document.writeln("<link href='"+style+"' media='all' t
1921ype='text/css' rel='stylesheet'>");});WindowObject.document.writeln('</head><body>');WindowObject.document.writeln(DocumentContainer.innerHTML);WindowObject.document.writeln('</body></html>');WindowObject.document.close();WindowObject.focus();WindowObject.print();WindowObject.close();},bindChoosenForAddress:function(){$(document).ready(function(){$('#siteIds').select2();setTimeout(function(){if($('#siteIds').next('.select2-container').length){$('#siteIds').css('display','none');$('.select2-container').css('width','');}},100);});},validateOfferQuantities:function(){var valid=true;var positionsToSubmit=HB.Documents.getPositionsToSubmit();$('.js-offer-qty-input').each(function(){var $input=$(this);var position=$input.attr('data-position');if($.inArray(position,positionsToSubmit)===-1){return true;}
1922var minQty=parseFloat(($input.data('min-qty')+'').replace(',','.'))||0;var currentQty=parseFloat(($input.val()+'').replace(',','.'));if(isNaN(currentQty)||currentQty<minQty){$input.addClass('has-error');valid=false;}else{$input.removeClass('has-error');}});return valid;},getPositionsToSubmit:function(){var positionsToSubmit=[];$('.js-offer-position-item').each(function(){var $item=$(this);var position=$item.attr('data-position');var selected=$item.attr('data-alternative-position-selected')==='true';var initiallyDisabled=$item.attr('data-initially-disabled')==='true';if(initiallyDisabled){return;}
1923if(selected){positionsToSubmit.push(position);}});var groupsWithSelectedAlternative={};$('.js-offer-position-item[data-alternative-position-selected="true"]').each(function(){var prefix=$(this).attr('data-position-prefix');groupsWithSelectedAlternative[prefix]=true;});$('.js-offer-position-item').each(function(){var $item=$(this);var prefix=$item.attr('data-position-prefix');var position=$item.attr('data-position');var isAlternative=$item.hasClass('js-alternative-position-item');var initiallyDisabled=$item.attr('data-initially-disabled')==='true';if(initiallyDisabled){return;}
1924if(!isAlternative&&!groupsWithSelectedAlternative[prefix]){positionsToSubmit.push(position);}});return positionsToSubmit;},collectOfferPositionFields:function(){var $container=$('#js-offer-position-fields');$container.empty();var positionsToSubmit=HB.Documents.getPositionsToSubmit();$('.js-offer-qty-input').each(function(){var $input=$(this);var $item=$input.closest('.js-offer-position-item');var position=$input.attr('data-position');if($item.attr('data-initially-disabled')==='true'){return true;}
1925if($.inArray(position,positionsToSubmit)===-1){return true;}
1926var qty=$input.val();var selectedAlternativePosition=$input.closest('.js-offer-position-item').attr('data-alternative-position-selected')==='true';$container.append('<input type="hidden" name="positions[]" value="'+position+'"/>');$container.append('<input type="hidden" name="productIds[]" value="'+($input.attr('data-product-id')||'')+'"/>');$container.append('<input type="hidden" name="quantities[]" value="'+qty+'"/>');$container.append('<input type="hidden" name="alternativePositions[]" value="'+selectedAlternativePosition+'"/>');});},collectIdsPositionFields:function($container){$container.empty();var positionsToSubmit=HB.Documents.getPositionsToSubmit();$('.js-offer-qty-input').each(function(){var $input=$(this);var $item=$input.closest('.js-offer-position-item');var position=$input.attr('data-position');if($item.attr('data-initially-disabled')==='true'){return true;}
1927if($.inArray(position,positionsToSubmit)===-1){return true;}
1928$container.append('<input type="hidden" name="positions[]" value="'+position+'"/>');$container.append('<input type="hidden" name="productIds[]" value="'+($input.attr('data-product-id')||'')+'"/>');$container.append('<input type="hidden" name="quantities[]" value="'+$input.val()+'"/>');$container.append('<input type="hidden" name="prices[]" value="'+($input.attr('data-price')||'')+'"/>');});},bindUpdateOfferCockpit:function(){$(document).off('submit.updateOffer').on('submit.updateOffer','form.updateOffer',function(e){e.preventDefault();HB.Documents.collectOfferPositionFields();var form=$(this);var url=form.attr('action');var data=form.serialize();var currentContent=$('.js-document-entry-wrapper.expanded').find('.js-panel-details').html();HB.Documents.removeCurrentDocumentFromDetailsCache();HB.Documents.showDetailPanelLoader();$.ajax({url:url,type:'POST',data:data,dataType:'json',success:function(response){HB.Message.addGlobalMessageByGivenAjaxData(response,true);if(response.globalMessagesHtml){HB.Utils.scrollToElement($("#globalMessages"));}
1929if(response.updateOfferSuccess===false){HB.Documents.replaceDocumentDetailsPanel(currentContent);return;}
1930HB.Documents.replaceDocumentDetailsPanel(response.content);HB.Documents.updateHeaderTotalAfterOfferChange(response.content);HB.Documents.removeOfferEntriesFromDashboardCache();},error:function(xhr,status,error){console.error('Error updating offer:',error);}});});},bindAcceptOfferCockpit:function(){$(document).off('submit.acceptOfferCockpit').on('submit.acceptOfferCockpit','form.acceptOffer',function(e){e.preventDefault();var form=$(this);var url=form.attr('action');var data=form.serialize();var currentContent=$('.js-document-entry-wrapper.expanded').find('.js-panel-details').html();HB.Documents.removeCurrentDocumentFromDetailsCache();HB.Documents.showDetailPanelLoader();$.ajax({url:url,type:'POST',data:data,dataType:'json',success:function(response){HB.Message.addGlobalMessageByGivenAjaxData(response,true);if(response.globalMessagesHtml){HB.Utils.scrollToElement($("#globalMessages"));}
1931if(response.acceptOfferSuccess===false){HB.Documents.replaceDocumentDetailsPanel(currentContent);return;}
1932HB.Documents.replaceDocumentDetailsPanel(response.content);HB.Documents.updateHeaderButtonAfterOfferAccept(response.content);HB.Documents.updateHeaderTotalAfterOfferChange(response.content);HB.Documents.removeOfferEntriesFromDashboardCache();},error:function(xhr,status,error){console.error('Error accepting offer:',error);}});});},bindTransferToIdsCockpit:function(){$(document).off('submit.transferToIds').on('submit.transferToIds','form.transferToIds',function(e){e.preventDefault();var $form=$(this);
1932HB.Documents.collectIdsPositionFields($form.find('#js-ids-transfer-position-fields'));HB.Documents.removeCurrentDocumentFromDetailsCache();HB.Documents.submitIdsTransferForm($form);});},bindAcceptAndTransferToIdsCockpit:function(){$(document).off('submit.acceptAndTransferToIds').on('submit.acceptAndTransferToIds','form.acceptAndTransferToIds',function(e){e.preventDefault();var $form=$(this);HB.Documents.collectIdsPositionFields($form.find('#js-ids-accept-position-fields'));var currentContent=$('.js-document-entry-wrapper.expanded').find('.js-panel-details').html();HB.Documents.removeCurrentDocumentFromDetailsCache();HB.Documents.showDetailPanelLoader();$.ajax({url:$form.attr('data-accept-url'),type:'POST',data:$form.serialize(),dataType:'json',success:function(response){HB.Message.addGlobalMessageByGivenAjaxData(response,true);if(response.globalMessagesHtml){HB.Utils.scrollToElement($("#globalMessages"));}
1933if(response.acceptOfferSuccess===false){HB.Documents.replaceDocumentDetailsPanel(currentContent);return;}
1934HB.Documents.replaceDocumentDetailsPanel(response.content);HB.Documents.updateHeaderButtonAfterOfferAccept(response.content);HB.Documents.updateHeaderTotalAfterOfferChange(response.content);HB.Documents.removeOfferEntriesFromDashboardCache();HB.Documents.submitIdsTransferForm($form);},error:function(xhr,status,error){console.error('Error accepting offer before IDS transfer:',error);HB.Documents.replaceDocumentDetailsPanel(currentContent);}});});},submitIdsTransferForm:function($form){$.ajax({url:$form.attr('action'),type:'POST',data:$form.serialize(),dataType:'json',success:function(response){if(response.transferToIdsSuccess===false){HB.Message.addGlobalMessageByGivenAjaxData(response,false);if(response.globalMessagesHtml){HB.Utils.scrollToElement($("#globalMessages"));}
1935return;}
1936HB.Documents.buildAndSubmitIdsForm(response);},error:function(xhr,status,error){console.error('Error transferring offer to IDS:',error);}});},buildAndSubmitIdsForm:function(response){var $idsForm=$('<form>',{method:'post',action:response.idsCallbackHookUrl,target:response.idsCallbackTarget,enctype:'multipart/form-data'}).hide();$idsForm.append($('<input>',{type:'hidden',name:'version',value:response.idsCallbackVersion}));$idsForm.append($('<input>',{type:'hidden',name:'warenkorb',value:response.idsCallbackCartXml}));$(document.body).append($idsForm);$idsForm.submit();$idsForm.remove();},bindAlternativePositionSelection:function(){$(document).on('click','.js-select-alternative-position',function(e){e.preventDefault();var $button=$(this);var positionPrefix=$button.attr('data-position-prefix');var selectedPosition=$button.attr('data-position');var $clickedItem=$button.closest('.js-offer-position-item');var resetSelection=$clickedItem.attr('data-alternative-position-selected')==='true';var $positionGroup=$('.js-offer-position-item').filter(function(){return $(this).attr('data-position-prefix')===positionPrefix;});$positionGroup.each(function(){var $item=$(this);var initiallyDisabled=$item.attr('data-initially-disabled')==='true';if(initiallyDisabled){return;}
1937var selected=!resetSelection&&$item.attr('data-position')===selectedPosition;var locked=!resetSelection;$item.attr('data-alternative-position-selected',selected?'true':'false');$item.attr('data-quantity-locked',locked?'true':'false');$item.toggleClass('offer-position-disabled',locked&&!selected&&!initiallyDisabled);$item.toggleClass('offer-qty-locked',locked);$item.find('.js-offer-qty-input, .js-decrease-quantity, .js-increase-quantity').prop('disabled',locked);$item.find('.js-select-alternative-position').prop('disabled',locked&&!selected);$item.find('.js-select-alternative-position').each(function(){var $groupButton=$(this);var selectedLabel=$groupButton.attr('data-selected-label');var selectLabel=$groupButton.attr('data-select-label');var groupButtonSelected=selected&&$groupButton.attr('data-position')===selectedPosition;$groupButton.text(groupButtonSelected?selectedLabel:selectLabel);$groupButton.attr('aria-label',(groupButtonSelected?selectedLabel:selectLabel)+' '+$groupButton.attr('data-position'));});});HB.Documents.updateOfferButtonsOnQtyChange();});}
1937,bindOfferQuantityControls:function(){$(document).off('click.offerQtyDec').on('click.offerQtyDec','.js-offer-position-item .js-decrease-quantity',function(e){e.preventDefault();e.stopImmediatePropagation();var $input=$(this).closest('.js-offer-position-item').find('.js-offer-qty-input');if($input.length===0)return;if($input.prop('disabled'))return;var minQty=HB.Documents.parseOfferQty($input.data('min-qty'));var currentQty=HB.Documents.parseOfferQty($input.val());if(isNaN(currentQty)||currentQty<=minQty){$input.val(HB.Documents.formatOfferQty(minQty));HB.Documents.flashQuantityError($input);return;}
1938var newQty=HB.Documents.changeOfferQtyByOne($input.val(),-1);if(HB.Documents.parseOfferQty(newQty)<minQty){newQty=HB.Documents.formatOfferQty(minQty);}
1939$input.val(newQty);$input.removeClass('has-error');HB.Documents.updateOfferButtonsOnQtyChange();});$(document).off('click.offerQtyInc').on('click.offerQtyInc','.js-offer-position-item .js-increase-quantity',function(e){e.preventDefault();e.stopImmediatePropagation();var $input=$(this).closest('.js-offer-position-item').find('.js-offer-qty-input');if($input.length===0)return;if($input.prop('disabled'))return;var minQty=HB.Documents.parseOfferQty($input.data('min-qty'));var currentQty=HB.Documents.parseOfferQty($input.val());var currentValue=$input.val();if(isNaN(currentQty)){currentValue=HB.Documents.formatOfferQty(minQty);}
1940$input.val(HB.Documents.changeOfferQtyByOne(currentValue,1));$input.removeClass('has-error');HB.Documents.updateOfferButtonsOnQtyChange();});$(document).off('keydown.offerQtyInput').on('keydown.offerQtyInput','.js-offer-qty-input',function(e){if(e.which===13||e.keyCode===13){e.preventDefault();e.stopImmediatePropagation();return false;}});$(document).off('blur.offerQtyInput').on('blur.offerQtyInput','.js-offer-qty-input',function(e){var $input=$(this);if($input.prop('disabled'))return;var minQty=HB.Documents.parseOfferQty($input.data('min-qty'));var currentQty=HB.Documents.parseOfferQty($input.val());if(isNaN(currentQty)||currentQty<minQty){$input.val(HB.Documents.formatOfferQty(minQty));HB.Documents.flashQuantityError($input);}else{$input.val(HB.Documents.formatOfferQty(currentQty));$input.removeClass('has-error');}
1941HB.Documents.updateOfferButtonsOnQtyChange();});$(document).off('input.offerQtyInput').on('input.offerQtyInput','.js-offer-qty-input',function(e){$(this).removeClass('has-error');HB.Documents.updateOfferButtonsOnQtyChange();});},allOfferPositionsDisabled:function(){var $items=$('.js-offer-position-item');if(!$items.length){return false;}
1942return $items.length===$items.filter('[data-initially-disabled="true"]').length;},updateOfferButtonsOnQtyChange:function(){var $updateBtn=$('.js-update-offer-btn');var $acceptBtn=$('.js-accept-offer-btn');var $transferBtn=$('.js-transfer-to-ids-btn');var $acceptTransferBtn=$('.js-accept-and-transfer-btn');if(HB.Documents.allOfferPositionsDisabled()){$updateBtn.prop('disabled',true);$acceptBtn.prop('disabled',true);$transferBtn.prop('disabled',true);$acceptTransferBtn.prop('disabled',true);return;}
1943if($updateBtn.length&&typeof $updateBtn.attr('data-initial-disabled')==='undefined'){$updateBtn.attr('data-initial-disabled',$updateBtn.is(':disabled')?'true':'false');}
1944if($acceptBtn.length&&typeof $acceptBtn.attr('data-initial-disabled')==='undefined'){$acceptBtn.attr('data-initial-disabled',$acceptBtn.is(':disabled')?'true':'false');}
1945if($transferBtn.length&&typeof $transferBtn.attr('data-initial-disabled')==='undefined'){$transferBtn.attr('data-initial-disabled',$transferBtn.is(':disabled')?'true':'false');}
1946if($acceptTransferBtn.length&&typeof $acceptTransferBtn.attr('data-initial-disabled')==='undefined'){$acceptTransferBtn.attr('data-initial-disabled',$acceptTransferBtn.is(':disabled')?'true':'false');}
1947var hasQtyChange=false;$('.js-offer-qty-input').each(function(){var $input=$(this);var minQty=HB.Documents.parseOfferQty($input.data('min-qty'));var currentQty=HB.Documents.parseOfferQty($input.val());if(currentQty>minQty){hasQtyChange=true;return false;}});if(hasQtyChange){$updateBtn.prop('disabled',false);$acceptBtn.prop('disabled',true);$transferBtn.prop('disabled',true);$acceptTransferBtn.prop('disabled',true);}else{$updateBtn.prop('disabled',$updateBtn.attr('data-initial-disabled')==='true');$acceptBtn.prop('disabled',$acceptBtn.attr('data-initial-disabled')==='true');$transferBtn.prop('disabled',$transferBtn.attr('data-initial-disabled')==='true');$acceptTransferBtn.prop('disabled',$acceptTransferBtn.attr('data-initial-disabled')==='true');}},parseOfferQty:function(value){if(!value)return 0;return parseFloat((value+'').replace(',','.'))||0;},formatOfferQty:function(value){if(isNaN(value))return'0';var str=value.toString();return str.replace('.',',');},changeOfferQtyByOne:function(value,direction){var parts=(value+'').replace(',','.').split('.');var integerPart=parseInt(parts[0],10);if(isNaN(integerPart)){integerPart=0;}
1948var fractionPart=parts.length>1?parts[1]:'';return(integerPart+direction)+(fractionPart?','+fractionPart:'');},flashQuantityError:function($input){$input.addClass('has-error');var $container=$input.closest('.quantityContainer');$container.addClass('has-error');setTimeout(function(){$container.removeClass('has-error');},300);}};;HB.Orders={init:function(){HB.Orders.initPageSizeSelects();HB.Orders.bindChoosenForAddress();HB.Orders.initDatepickerOrderList();},initPageSizeSelects:function(){var pageSizeSelects=$(".page-size-selector");pageSizeSelects.on("change",function(e){$(this).closest('form').trigger('submit');});},bindChoosenForAddress:function(){$('select.orderFilterOptions').select2({width:"100%"});$('select.orderFilterOptions').css("display","none");},initDatepickerOrderList:function(){if(HB.config.currentLanguage=='de'){$.fn.datepicker.dates['de']={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute"};}
1949var nowTemp=new Date();var now=new Date(nowTemp.getFullYear(),nowTemp.getMonth(),nowTemp.getDate(),0,0,0,0);var startDatePropertyValue="";if(HB.propertyValue.fromDate!=null&&HB.propertyValue.fromDate!==""){if(HB.propertyValue.fromDate.indexOf(".",2)==2&&HB.propertyValue.fromDate.indexOf(".",5)==5){startDatePropertyValue=HB.propertyValue.fromDate;var splitDate=HB.propertyValue.fromDate.split('.');var fromDate=new Date(splitDate[2],splitDate[1]-1,splitDate[0]);var now=new Date();now.setHours(0,0,0,0);var differenceDays=Math.round((now-fromDate)/(1000*60*60*24));HB.Orders.validateInputFromDate(differenceDays);}else if(HB.propertyValue.fromDate.match(/^[0-9]+$/)!=null){startDatePropertyValue="-"+HB.propertyValue.fromDate+"d";HB.Orders.validateInputFromDate(HB.propertyValue.fromDate);}}
1950var fromDate=$('#fromDate').datepicker({startDate:startDatePropertyValue,endD
1950ate:'+0d',format:'dd.mm.yyyy',language:'de',container:'#datepicker_form-left'}).on('changeDate',function(ev){$('.datepicker').hide();if($(this).val().length===10){$('#toDate')[0].focus();}});var toDate=$('#toDate').datepicker({startDate:startDatePropertyValue,endDate:'+0d',format:'dd.mm.yyyy',language:'de',container:'#datepicker_form-right'}).on('changeDate',function(ev){$('.datepicker').hide();if($(this).val().length===10){$(this).focusout();}});$('#toDate').on('focusout',function(){HB.Orders.validateInputToDate();});},validateInputFromDate:function(daysInPast){var $inputFields=$('.datepickerBox').find('#fromDate, #toDate');$inputFields.each(function(){$(this).on('input',function(){var $userInputValue=$(this).val();if($userInputValue.length===10){if($userInputValue.indexOf(".")===2){var $userInputValueSplit=$userInputValue.split('.');var $modifiedInputDate=new Date($userInputValueSplit[2],($userInputValueSplit[1]-1),$userInputValueSplit[0],0,0,0,1);var $maximumDateInPast=new Date();$maximumDateInPast.setDate($maximumDateInPast.getDate()-daysInPast);if($(this).attr('id')==='#toDate'&&$('#fromDate').val().length===10){$(this).focusout();}else if($modifiedInputDate<$maximumDateInPast){var $day=$maximumDateInPast.getDate();var $month=$maximumDateInPast.getMonth()+1;var $year=$maximumDateInPast.getFullYear();if($day<10){$day='0'+$day;}
1951if($month<10){$month='0'+$month;}
1952$(this).val($day+'.'+$month+'.'+$year);}}}});});},validateInputToDate:function(){var $fromDate=$('#fromDate').val();var $toDate=$('#toDate').val();if($fromDate.length===10&&$toDate.length===10){var $splitFromDate=$fromDate.split('.');var $modifiedFromDate=new Date($splitFromDate[2],($splitFromDate[1]-1),$splitFromDate[0],0,0,0,1);var $splitToDate=$toDate.split('.');var $modifiedToDate=new Date($splitToDate[2],($splitToDate[1]-1),$splitToDate[0],0,0,0,1);if($modifiedFromDate>$modifiedToDate){$('#toDate').val($fromDate);}}}};HB.Permissions={init:function(){HB.Permissions.bindPermissionsDetailsLink();HB.Permissions.selectDeselectLinkInit();HB.Permissions.bindlinkDisable();HB.Permissions.bindlinkEnable();},bindPermissionsDetailsLink:function(){var showPermissionsDetailLinks=$('.detail-permissions-link');for(const element of showPermissionsDetailLinks){var jshowPermissionsDetailLinks=$(element);jshowPermissionsDetailLinks.on("click",function(e){e.preventDefault();HB.Permissions.getPermissionsDetails(this);});}},getPermissionsDetails:function(clickedElement){var permID=clickedElement.getAttribute("data-permissions-id");if(null!==permID&&undefined!==permID){HB.Utils.displayModalPopupLoading('modal-lg');$.ajax({url:HB.config.url.permissions.details,type:'get',dataType:'json',data:{permissionCode:permID},success:function(result){HB.Utils.displayModalPopup(result.permissionsDetailsPopup.content,'modal-lg');HB.Permissions.bindlinkDisable();HB.Permissions.bindlinkEnable();},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});}},bindlinkDisable:function(clickedElement){$(document).on('click','.link-disablePermission',function(event){var permID=$(this).attr("data-permissions-id");$.ajax({url:HB.config.url.permissions.disable,type:'get',dataType:'json',data:{permissionCode:permID},success:function(result){HB.Utils.displayModalPopup(result.permissionsDetailsPopup.content,'modal-lg');HB.Permissions.bindDisableForm();HB.Permissions.bindPermissionsDetailsLink();},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});event.preventDefault();});},bindlinkEnable:function(clickedElement){$(document).on('click','.link-enablePermission',function(event){var permID=$(this).attr("data-permissions-id");$.ajax({url:HB.config.url.permissions.enable,type:'get',dataType:'json',data:{permissionCode:permID},success:function(result){var tableEntry=$('.table-grid-entry[data-id="'+result.permissionsDetailsPopup.id+'"]');HB.Utils.hideModalPopup();$('#globalMessages').html(result.permissionsDetailsPopup.message);tableEntry.find('.link-enablePermission').replaceWith(result.permissionsDetailsPopup.button);tableEntry.find('.table-entry-moreInfo .js-status').html(result.permissionsDetailsPopup.statusText);tableEntry.find('label .js-status').html(result.permissionsDetailsPopup.statusIcon);},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);},complete:function(result){HB.Utils.fadeSuccessAlert();}});event.preventDefault();});},bindDisableForm:function(){var permissionForm=$('#command');permissionForm.ajaxForm({dataType:'json',success:function(result){var tableEntry=$('.table-grid-entry[data-id="'+result.permissionsDetailsPopup.id+'"]');HB.Utils.hideModalPopup();$('#globalMessages').html(result.permissionsDetailsPopup.message);tableEntry.find('.link-disablePermission').replaceWith(result.permissionsDetailsPopup.button);tableEntry.find('.table-entry-moreInfo .js-status').html(result.permissionsDetailsPopup.statusText);tableEntry.find('label .js-status').html(result.permissionsDetailsPopup.statusIcon);},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);},complete:function(result){HB.Utils.fadeSuccessAlert();}});},displayResetPopup:function(newUserResult){HB.Utils.displayModalPopup(newUserResult.permissionsDetailsPopup.content,'modal
1952-md');HB.Permissions.bindlinkEnable();HB.Permissions.bindlinkDisable();},getPermissionsSelect:function(clickedElement){var permID=clickedElement.getAttribute("data-permissionsSelect-id");console.log("clickedElement",clickedElement);if(null!==permID&&undefined!==permID){HB.Utils.displayModalPopupLoading('modal-lg');$.ajax({url:HB.config.url.permissions.select,type:'get',dataType:'json',data:{user:permID},success:function(result){HB.Utils.displayModalPopup(result.permissionsDetailsPopup.content,'modal-lg');},error:function(xhr){HB.MyAccount.checkResponseToHardLogin(xhr);}});}},selectDeselectLinkInit:function(){HB.Permissions.bindToSelectLink();HB.Permissions.bindToDeselectLink();$('.showTooltip').tooltip();},bindToSelectLink:function(){$('body').on('click','.selectionLink',function(e){let that=$(this);let globalMsg=$("#globalMessages");e.preventDefault();console.log("clicked",that);$.ajax({type:"POST",url:this.getAttribute('url'),dataType:"json",success:function(data){HB.Permissions.selectionLinkCallback(data);},error:function(xhr,textStatus,errorThrown){HB.MyAccount.checkResponseToHardLogin(xhr);that.addClass('toggleError');globalMsg.html("<div class='alert negative'><div class='message-icon'><i class='icon-info'></i></div><span class='message'>"+HB.translations.general.modalError+"</span><div class='pull-right gm-close-icon mrm'><i class='icon-close'></i></div></div>");if(!globalMsg.hasClass('ajaxAlert')){globalMsg.hide();}
1953HB.Message.hideGlobalMessage();globalMsg.slideDown().addClass('ajaxAlert');}});});},bindToDeselectLink:function(){$('body').on('click','.deselectionLink',function(e){let that=$(this);globalMsg=$("#globalMessages");e.preventDefault();$.ajax({type:"POST",url:this.getAttribute('url'),dataType:"json",success:function(data){HB.Permissions.deselectionLinkCallback(data);},error:function(xhr,textStatus,errorThrown){HB.MyAccount.checkResponseToHardLogin(xhr);that.addClass('toggleError');globalMsg.html("<div class='alert negative'><div class='message-icon'><i class='icon-info'></i></div><span class='message'>"+HB.translations.general.modalError+"</span><div class='pull-right gm-close-icon mrm'><i class='icon-close'></i></div></div>");if(!globalMsg.hasClass('ajaxAlert')){globalMsg.hide();}
1954HB.Message.hideGlobalMessage();globalMsg.slideDown().addClass('ajaxAlert');}});});},selectionLinkCallback:function(obj){$('#row-'+obj.normalizedCode).addClass("selected");$('#span-'+obj.normalizedCode).find('.selectionLink').addClass('hidden');$('#span-'+obj.normalizedCode).find('.deselectionLink').removeClass('hidden');},deselectionLinkCallback:function(obj){$('#row-'+obj.normalizedCode).removeClass("selected");$('#span-'+obj.normalizedCode).find('.deselectionLink').addClass('hidden');$('#span-'+obj.normalizedCode).find('.selectionLink').removeClass('hidden');}};HB.Wishlist={privateWishlistKey:"privateList",sharedWishlistKey:"sharedList",debug:0,init:function(){var $wishlistForm=$('form#editWishlistForm');HB.Wishlist.initSortableComponents($wishlistForm);HB.Wishlist.initListItemComponents($wishlistForm);HB.Wishlist.bindWishlistSave($wishlistForm);HB.Wishlist.bindWishlistToCart($wishlistForm);HB.Wishlist.bindWishlistEntryAddToCart($wishlistForm);HB.Wishlist.bindWishlistEntryDimensionChange($wishlistForm);HB.Wishlist.bindWishlistEntryMarkAsDelete($wishlistForm);HB.Wishlist.bindWishlistEntryUndoMarkAsDelete($wishlistForm);},initSortableComponents:function(_context){$('body').one('mousemove.sortableComponents',function(e){var $sortableList=_context.find('#sortable');$sortableList.sortable();$sortableList.disableSelection();});$('body').one('touchstart',function(e){$('body').unbind("mousemove.sortableComponents");});},initListItemComponents:function(_context){HB.ListItem.bindQuantityInput(_context);HB.ListItem.initStockInformation(_context);let wishlistStockInfo=_context.find('.productList');HB.ListItem.checkStockLevels(wishlistStockInfo);},bindWishlistSave:function(_wishlistForm){$(_wishlistForm).find('#submitFormButton').on('click',HB.Wishlist.onWishlistSave);},onWishlistSave:function(e){e.preventDefault();var $addListToCartForm=$(e.target).closest('#editWishlistForm');HB.Wishlist.correctUnitAndIndex($addListToCartForm);var $wishlistEntryWrapper=$(e.currentTarget).closest('.js-wishlist-entry-wrapper');var $form=$(e.currentTarget).closest('form');HB.MyAccount.submitWishlistDetailsForm($form,$wishlistEntryWrapper,'.js-wishlist-entry-wrapper');},correctUnitAndIndex:function(_form){$(_form).find('ul.edit-wishlist-entries > li').each(function(index,value){var $fakeDropDown=$(value).find(".js-unit-input");var $hiddenFormField=$(value).find(".js-unit-input-form-field");if(typeof $fakeDropDown!=="undefined"&&$hiddenFormField!=="undefined"){$hiddenFormField.val($fakeDropDown.val());}
1955$(value).find('input.js-product-code-input').attr('name','entries['+index+'].product.code');$(value).find('input.js-quantity-input').attr('name','entries['+index+'].quantityString');$(value).find('input.js-unit-input-form-field').attr('name','entries['+index+'].unit');$(value).find('input.js-delete-entry-input').attr('name','entries['+index+'].delete');});},bindWishlistToCart:function(_wishlistForm){$(_wishlistForm).find('.add-wishlist-to-cart-form').on('click',HB.Wishlist.onWishlistToCart);},onWishlistToCart:function(e){e.preventDefault();var $addListToCartForm=$(e.target).closest('#editWishlistForm');HB.Wishlist.correctUnitAndIndex($addListToCartForm);$.ajax({url:HB.config.url.wishlist.addListToCart,type:'post',beforeSend:HB.MyAccount.displayLoadingIcon($addListToCartForm),dataType:'json',data:$addListToCartForm.serialize(),success:function(result){HB.MyAccount.displayResponseMessage(result);HB.MyAccount.removeLoadingIcon($addListToCartForm);}});},bindWishlistEntryAddToCart:function(_context){$(_context).find('.wishlist-entry-add-to-cart').on('click',HB.Wishlist.onWishlistEntryAddToCart);},onWishlistEntryAddToCart:function(e){e.preventDefault();var $wishlistEntry=$(e.target).closest('.edit-wishlist-item');HB.Utils.displayModalPopupLoading('modal-md');var $fakeForm=$('<form>');$('<input>
1955').attr({name:'productCodePost',value:$wishlistEntry.find('.js-product-code-input').val()}).appendTo($fakeForm);$('<input>').attr({name:'qty',value:$wishlistEntry.find('.js-quantity-input').val()}).appendTo($fakeForm);$('<input>').attr({name:'unit',value:$wishlistEntry.find('.js-unit-input').val()}).appendTo($fakeForm);HB.ListItem.handleSubmitForm('cart',$fakeForm);},bindWishlistEntryDimensionChange:function(_context){$(_context).find('.productDimension select').on('change',HB.Wishlist.onWishlistEntryDimensionChange);},onWishlistEntryDimensionChange:function(e){var productCode=$(e.target).val();var $wishlistEntry=$(e.target).closest('.edit-wishlist-item');var dimensionChangeUrl=$wishlistEntry.data('dimension-change-url');dimensionChangeUrl=dimensionChangeUrl+'/'+productCode;var $currentDetails=$wishlistEntry.closest('.js-panel-details');var $imgElement=$('<img />',{src:$currentDetails.data('loader'),class:'detail-loader',alt:'Detail Loader'});$wishlistEntry.html($imgElement);$.ajax({url:dimensionChangeUrl,type:'get',success:function(result){var $newWishlistEntry=$(result);$wishlistEntry.replaceWith($newWishlistEntry);HB.Wishlist.initListItemComponents($newWishlistEntry);HB.Wishlist.bindWishlistEntryAddToCart($newWishlistEntry);HB.Wishlist.bindWishlistEntryDimensionChange($newWishlistEntry);HB.Wishlist.bindWishlistEntryMarkAsDelete($newWishlistEntry);HB.Wishlist.bindWishlistEntryUndoMarkAsDelete($newWishlistEntry);}});},bindWishlistEntryMarkAsDelete:function(_context){$(_context).find('.edit-wishlist-entry-delete').on('click',HB.Wishlist.onWishlistEntryMarkAsDelete);},onWishlistEntryMarkAsDelete:function(e){var $wishlistEntry=$(e.target).closest('.edit-wishlist-item');$wishlistEntry.find('.js-delete-entry-input').val('true');$wishlistEntry.addClass('deleted-edit-wishlist-entry');$wishlistEntry.find('.edit-wishlist-entry-delete').hide();$wishlistEntry.find('.edit-wishlist-entry-undo').css('display','inline-block');},bindWishlistEntryUndoMarkAsDelete:function(_context){$(_context).find('.edit-wishlist-entry-undo').on('click',HB.Wishlist.onWishlistEntryUndoMarkAsDelete);},onWishlistEntryUndoMarkAsDelete:function(e){var $wishlistEntry=$(e.target).closest('.edit-wishlist-item');$wishlistEntry.find('.js-delete-entry-input').val('false');$wishlistEntry.removeClass('deleted-edit-wishlist-entry');$wishlistEntry.find('.edit-wishlist-entry-undo').hide();$wishlistEntry.find('.edit-wishlist-entry-delete').show();},list:{init:function(_context){HB.Wishlist.list.initSortableWishlists();HB.Wishlist.list.bindWishlistNewShowForm(_context);HB.Wishlist.list.bindWishlistNewCancel(_context);HB.Wishlist.list.bindWishlistDeletePrompt(_context);HB.Wishlist.list.bindWishlistDeletePromptCancel(_context);},initSortableWishlists:function(){$('body').one('mousemove.sortableWishlist',function(e){var wishlistList=$('#resultsList.wishlist-table');if(wishlistList.length){if(wishlistList.find('.privateListItems').length){wishlistList.find('.privateListItems').sortable({opacity:0.8,containment:"parent"});}
1956if(wishlistList.find('.sharedListItems').length){wishlistList.find('.sharedListItems').sortable({opacity:0.8,containment:"parent"});}
1957wishlistList.disableSelection();HB.Wishlist.list.bindUpdateSortableWishlists(wishlistList);}});$('body').on('touchstart',function(event){$('body').unbind("mousemove.sortableWishlist");});},bindUpdateSortableWishlists:function(_wishlistList){_wishlistList.find('.privateListItems.ui-sortable').on('sortstop',function(event,ui){HB.Wishlist.list.onUpateSortableWishlists(HB.Wishlist.privateWishlistKey,event);});_wishlistList.find('.sharedListItems.ui-sortable').on('sortstop',function(event,ui){HB.Wishlist.list.onUpateSortableWishlists(HB.Wishlist.sharedWishlistKey,event);});},bindWishlistNewShowForm:function(_context){var context=(typeof _context!=='undefined')?_context:'.wishlist-list';$(context).find('.js-new-wishlist').on('click',HB.Wishlist.list.onWishlistNewShowForm);},onUpateSortableWishlists:function(_listType,_event){var wishlistIdConcatenation="";var listEntries=$(_event.target).find('.list-entry');var listEntriesLength=listEntries.length;if(listEntries!=null&&listEntriesLength){listEntries.each(function(index){var wishlistId=$(this).data('wl-id');if(wishlistId!=null){if(index<(listEntriesLength-1)){wishlistIdConcatenation+=wishlistId+",";}else{wishlistIdConcatenation+=wishlistId;}}});HB.Wishlist.list.sendOrderOfWishlistToBackend(wishlistIdConcatenation,_listType);if($('#entryPointWishlist').data('url')){HB.MyAccount.removeEntryFromDashboardCache($('#entryPointWishlist').data('url'));}}},sendOrderOfWishlistToBackend:function(_list,_listType){if(_listType!=null&&_list!=null&&_list!=''){$.ajax({url:HB.config.url.wishlist.updateIndex,type:'post',beforeSend:HB.MyAccount.showAccountContentLoader(),dataType:'json',data:{indexList:_list,wishlistListType:_listType},success:function(result){HB.MyAccount.hideAccountContentLoader();if(result.page&&result.page=='successResponseFragment'){}else{HB.Wishlist.list.onErrorUpateSortableWishlists(result);}},error:function(result){HB.MyAccount.hideAccountContentLoader();HB.Wishlist.list.onErrorUpateSortableWishlists(result);}});}},onErrorUpateSortableWishlists:function(_result){if(_result.globalMessagesHtml&&_result.globalMessagesHtml!=''){if(HB.Utils.isPageScrollable()){$('html, body').animate({scrollTop:0},'fast');}
1958HB.Message.addGlobalMessageByGivenAjaxData(_result,false);}},onWishlistNewShowForm:function(e){var $wishlistList=$(e.target).closest('.wishlist-list');var $newWishlistForm=$wishlistList.find('.create-wishlist-form');var $newWishlistTrigger=$wishlistList.find('.js-new-wishlist');$newWishlistTrigger.hide();$newWishlistForm.show();HB.Utils.scrollToElement($newWishlistForm);},bindWishlistNewCancel:function(_context){var context=(typeof _context!=='undefined')?_context:'.wishlist-list';$(context).find('.js-new-wishlist-cancel').on('click',HB.Wishlist.list.onWishlistNewCancelForm);},onWishlistNewCancelForm:function(e){var $wishlistList=$(e.target).closest('.wishlist-list');var $newWishlistForm=$wishlistList.find('.create-wishlist-form');var $newWishlistTrigger=$wishlistList.find('.js-new-wishlist');$newWishlistForm.hide();$newWishlistTrigger.show();HB.Utils.scrollToElement($wishlistList);},bindWishlistDeletePrompt:function(_context){var context=(typeof _context!=='undefined')?_context:'.wishlist-table';$(context).find('.js-wishlist-delete-prompt').on('click',HB.Wishlist.list.onWishlistDeletePrompt);},bindWishlistDeletePromptCancel:function(_context){var context=(typeof _context!=='undefined')?_context:'.wishlist-table';$(context).find('.js-wishlist-cancel-delete').on('click',HB.Wishlist.list.onWishlistDeletePrompt);},onWishlistDeletePrompt:function(e){e.stopPropagation();var $wishlist=$(e.target).closest('.js-wishlist-entry-wrapper');var $wishlistList=$wishlist.closest('.wishlist-table');$wishlistList.find('.js-wishlist-entry-wrapper').each(function(){var $safetyPrompt=$(this).find('.js-safety-prompt');if($(this).is($wishlist)){if($safetyPrompt.hasClass('hidden')){$safetyPrompt.removeClass('hidden');$(this).addClass(($(this).hasClass('expanded'))?'':'expanded');}else{$safetyPrompt.addClass('hidden');if($(this).hasClass('expanded')&&$(this).find('.wishlist-edit').length==0){$(this).removeClass('expanded');}}}else{$safetyPrompt.addClass(($safetyPrompt.hasClass('hidden'))?'':'hidden');$(this).removeClass(($(this).hasClass('expanded'))?'expanded':'');$(this).find($('.js-panel-details')).html('');}});HB.Utils.scrollToElement($wishlist);}}};HB.Questionnaire={answers:{},init:function(){const $quests=$(".js-questionnaire");$.each($quests,function(index,value){if(value!=null){HB.Questionnaire.bindQuestData(value);HB.Questionnaire.bindNext(value);}});},bindQuestData:function(quest){$current_answer=$(quest).find(".active");$.each($current_answer.find("button"),function(index,value){$(value).on("click",function(e){var uid=$(quest).data("uid");var target=$(this).data("target");if(uid!=null&&target!=null){if(HB.Questionnaire.answers[uid]==null){HB.Questionnaire.answers[uid]={};}
1959if(HB.Questionnaire.answers[uid][target]==null){HB.Questionnaire.answers[uid][target]=0;}
1960HB.Questionnaire.answers[uid][target]++;}});});},bindNext:function(form){$(form).find('button').on('click',function(e){HB.Questionnaire.nextQuestion(this);}).removeAttr("disabled");},nextQuestion:function(element){$current=$(element).parents('.js-questionnaire').find(".active");if($current.next().length){$current.slideUp("slow");$current.removeClass("active");$current.next().removeClass("hidden").addClass("active").hide().show("slow");}
1961else{HB.Questionnaire.finishQuestionnaire(element);}},finishQuestionnaire:function(element){var $questionnaire=$(element).parents('.js-questionnaire');var uid=$questionnaire.data("uid");var $current=$questionnaire.find('.active');var bestResult="/";var bestCount=0;for(target in HB.Questionnaire.answers[uid]){if(HB.Questionnaire.answers[uid]!=null&&HB.Questionnaire.answers[uid][target]!=null&&HB.Questionnaire.answers[uid][target]>bestCount){bestResult=target;}};$current.slideUp('slow');$current.removeClass("active");$questionnaire.find('.bnt-next-wrapper h2').remove();$questionnaire.find('.bnt-next-wrapper').append($('<h2 class="mtm">Sie haben alle Fragen beantwortet und werden nun weitergeleitet.</h2>'));setTimeout(function(){window.location.replace(bestResult);},3000);}};HB.Download={page:1,pageSize:10,sort:'title-asc',view:'GRID',$component:'',debug:false,init:function(){if(HB.Download.debug){console.log("HB.Download.init")};if($(".downloadComponent").length>0){HB.Download.bindPaginationClick();HB.Download.bindPaginationInput();HB.Download.bindPageSizeSelector();HB.Download.bindSortSelector();HB.Download.bindDownloadButton();HB.Download.bindPreviewButton();HB.Download.fadeEachDownloadElement();}},bindPaginationClick:function(){var $paginationBar,page,numPages,$li;if(HB.Download.debug)console.log("HB.Download.bindPaginationClick()");$(".downloadPagination").on("click","a",function(e){e.preventDefault();$paginationBar=$(e.target).closest(".downloadPaginationBar");page=$paginationBar.data('page');numPages=$paginationBar.data('numpages');$li=$(e.target).closest("li");if($li.hasClass('first')){HB.Download.page=1;}
1962if($li.hasClass('prev')){HB.Download.page=page-1;}
1963if($li.hasClass('next')){HB.Download.page=page+1;}
1964if($li.hasClass('last')){HB.Download.page=numPages;}
1965HB.Download.$component=$(e.target).closest(".downloadComponent");var componentId=HB.Download.$component.attr('id');HB.Download.updatePage(componentId);});},bindPaginationInput:function(){var $input=$(".downloadPagination").find("input"),input,numPages,keycode,componentId,$paginationBar;if(HB.Download.debug)console.log("HB.Download.bindPaginationInput()");
1965$input.keypress(function(e){keycode=(event.keyCode?event.keyCode:event.which);if(keycode=='13'){$paginationBar=$(e.target).closest(".downloadPaginationBar");numPages=$paginationBar.data('numpages');input=parseInt($input.val());HB.Download.page=(input<=numPages)?input:numPages;HB.Download.$component=$(e.target).closest(".downloadComponent");componentId=HB.Download.$component.attr('id');HB.Download.updatePage(componentId);return false;}});},bindPageSizeSelector:function(){var componentId;if(HB.Download.debug)console.log("HB.Download.bindPageSizeSelector()");$("select[name='downloadPageSize']").change(function(e){e.preventDefault();e.stopPropagation();var $position=$(e.target);HB.Download.$component=$position.closest(".downloadComponent");componentId=HB.Download.$component.attr('id');HB.Download.page=1;HB.Download.readPageSize($position.closest(".downloadPaginationBar"));HB.Download.updatePage(componentId);});$(".js-downloadPageSize").on('click',function(e){e.preventDefault();HB.Download.page=1;var $position=$(this);$position.parent().find(".js-downloadPageSize").removeClass('active');$position.addClass('active');HB.Download.$component=$position.closest(".downloadComponent");componentId=HB.Download.$component.attr('id');HB.Download.readPageSize($position.closest(".downloadPaginationBar"),true);HB.Download.updatePage(componentId);});},bindSortSelector:function(){if(HB.Download.debug){console.log("HB.Download.bindSortSelector")};$(".downloadComponent").find(".sortOptions").change(function(e){e.preventDefault();var $sortForm=$(e.target).closest(".sortForm");HB.Download.$component=$sortForm.closest(".downloadComponent");var componentId=HB.Download.$component.attr('id');HB.Download.page=1;HB.Download.sort=$sortForm.find(".sortOptions :selected").val();if(HB.Download.debug){console.log("HB.Download: Sort Option changed. Component Id: ",componentId);console.log("Form: ",$sortForm);console.log("Option seleceted: ",HB.Download.sort);};HB.Download.updatePage(componentId);});},bindDownloadButton:function(){$('.js-mediadownloadlink').on("click",function(e){HB.Download.counterUp(e);});},bindPreviewButton:function(){$('.js-mediapreviewbutton').on("click",function(e){e.preventDefault();HB.Download.showPreview(e);var calcHeight=$(window).height()-150;$('#download-embed-modal-container').attr({'height':calcHeight})
1966if(HB.Download.debug){console.log("Calculated Object Height",calcHeight,$('#download-embed-modal-container'));}});},counterUp:function(event){var $target=$(event.target).closest('.js-mediadownloadlink');$.ajax({url:$target.data('counter'),type:'get'});},showPreview:function(event){var $target=$(event.target).closest('.js-mediapreviewbutton');if($target.data("mimetype")=="application/pdf"){HB.Utils.displayModalPopup('<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="icon-close"></i></button><span class="h1">'+HB.translations.downloadComponent.previewHeadline+'</span></div><div class="modal-body iframeWrapper download-modal"><object id="download-embed-modal-container" type="application/pdf" data="'+$target.data('url')+'" width="100%" height="500px"><p class="mvx">'+HB.translations.downloadComponent.noPDF+'<a href="'+$target.data('url')+'" download>Download PDF</a>. </p> </object></div>','modal-lg');}else{HB.Utils.displayModalPopup('<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="icon-close"></i></button><span class="h1">'+HB.translations.downloadComponent.previewHeadline+'</span></div><div class="modal-body download-modal"><img src="'+$target.data('url')+'"/></div>','modal-lg');}},updatePage:function(componentId,noSelectField){if(HB.Download.debug){console.log("HB.Download.updatePage, componentId: ",componentId)};$.ajax({url:HB.config.url.download.updatePage,type:'get',dataType:'json',data:{componentCode:componentId,page:HB.Download.page,pagesize:HB.Download.pageSize,sort:HB.Download.sort},success:function(result){HB.Download.onUpdatePageSuccess(componentId,result.downloadListerHtml);},error:function(jqXHR,textStatus,errorThrown){console.log("error: "+errorThrown);}});},onUpdatePageSuccess:function(componentId,html){if(HB.Download.debug){console.log("HB.Download.onUpdatePageSuccess, componentId: ",componentId)};HB.Download.$component=$('#'+componentId);HB.Download.$component.find(".js-replace").html(html);HB.Download.fadeEachDownloadElement();HB.Download.init();},readPageSize:function($component,noSelectFild){if(noSelectFild){HB.Download.pageSize=$component.find(".js-downloadPageSize.active").attr('data-pageSize');}else{HB.Download.pageSize=$component.find("select[name='downloadPageSize'] :selected").val();}},fadeEachDownloadElement:function(){var delay=0;$(".downloadList .downloadListItem").each(function(index){$(this).delay(delay).fadeIn(350);delay+=100;});}};HB.ProductReferences={debug:0,init:function(){HB.ProductReferences.debug>0?console.log("HB.ProductReferences.init"):null;$(".js-product-references-component").each(function(index){var $component=$(this);var componentUid=$component.data("componentUid");
1966var productCode=$component.data("productCode");var url=$component.data("componentUrl");HB.ProductReferences.debug>0?console.log($component,componentUid,productCode,url):null;HB.ProductReferences.getProductReferences(componentUid,productCode,url);});},getProductReferences:function(componentUid,productCode,url){HB.ProductReferences.debug>0?console.log("HB.ProductReferences.getProductReferences, componentId: ",componentUid,productCode,url):null;$.ajax({url:url,type:'get',dataType:'json',data:{componentUid:componentUid,productCode:productCode},success:function(result){HB.ProductReferences.debug>0?console.log("SUCCESS: "+componentUid+" - RESULT:",result):null;HB.ProductReferences.onAjaxSuccess(componentUid,result);},error:function(jqXHR,textStatus,errorThrown){HB.ProductReferences.debug>0?console.log("ERROR: "+componentUid+" - RESULT: "+errorThrown):null;$('#'+componentUid).addClass('hidden');}});},displayComponent:function($component){HB.ProductReferences.debug>0?console.log("Starting displayComponent for component"):null;if(!$component||!$component.length){HB.ProductReferences.debug>0?console.warn('Invalid component element, skipping'):null;return;}
1967if($component.length){HB.ProductReferences.debug>0?console.log("Container found. Setting loaded class"):null;$component.addClass('loaded');}else{HB.ProductReferences.debug>0?console.log("Container found. Setting hidden class"):null;$component.addClass('hidden');}},onAjaxSuccess:function(componentUid,result){HB.ProductReferences.debug>0?console.log("HB.ProductReferences.onAjaxSuccess: ",componentUid):null;HB.ProductReferences.debug>0?console.log("References result: ",result):null;var $component=$('#'+componentUid);if(result.count>0&&result.html!==""){HB.ProductReferences.debug>0?console.log($component):null;$component.find(".js-replace").html(result.html);let referenceList=$component.find('.productListItem');HB.ListItem.bindQuantityInput($component);HB.ListItem.bindFormActions($component);HB.ListItem.bindStockPopovers(referenceList);HB.ListItem.initStockInformation($component);HB.ProductReferences.fadeEachElement($component);if(typeof result.isAutoplayCarousel!=='undefined'&&result.isAutoplayCarousel!==""){HB.ProductReferences.initSlider($component,result.isAutoplayCarousel,undefined);}else{HB.ProductReferences.initSlider($component,undefined,undefined);}
1968if($component.length){HB.ProductReferences.displayComponent($component);}}
1969else{$component.addClass('hidden');}},fadeEachElement:function($component){var delay=0;$component.find(".productListItem").each(function(index){HB.ProductReferences.debug>0?console.log("Fading element: ",this):null;$(this).delay(delay).fadeIn(350);delay+=100;});},initSlider:function($component,_isAutoplayCarousel,maxSlides){HB.ProductReferences.debug>0?console.log("HB.ProductReferences.initSlider: Init Sliders for component: ",$component):null;HB.ProductReferences.slickifyProductReferences($component,_isAutoplayCarousel,maxSlides);},slickifyProductReferences:function($component,_isAutoplayCarousel,maxSlides){var autoplayCarousel=false;if(typeof _isAutoplayCarousel!=='undefined'&&_isAutoplayCarousel!==null&&_isAutoplayCarousel==='true'){autoplayCarousel=true;}
1970var $prcpl=$component.find('.js-slide');$prcpl.each(function(index){HB.ProductReferences.debug>0?console.log("HB.ProductReferences.slickifyProductReferences: ",$(this)):null;$(this).slick({slidesToScroll:1,slidesToShow:maxSlides?maxSlides:5,arrows:true,prevArrow:'<button id="'+$(this).data('uid')+'-prev" type="button" class="slick-prev" aria-label='+HB.translations.general.prevButtonLabel+'></button>',nextArrow:'<button id="'+$(this).data('uid')+'-next" type="button" class="slick-next" aria-label='+HB.translations.general.nextButtonLabel+'></button>',fade:false,autoplay:autoplayCarousel,swipe:true,swipeToSlide:true,lazyLoad:'progressive',accessibility:true,respondTo:'slider',responsive:[{breakpoint:768,settings:{slidesToShow:2,}},{breakpoint:970,settings:{slidesToShow:3,}},{breakpoint:1169,settings:{slidesToShow:4,}},]});$(this).data('automatic-slide',autoplayCarousel);});$prcpl.css("visibility","visible");HB.SlickSlider.handleSliders();}};;HB.storefinder={map:"",debug:0,longitude:null,latitude:null,previousGoogleMapsConsent:null,init:function()
1971{HB.storefinder.bindConfirmationNecessary();HB.storefinder.bindFindStoresNearMe();if(window.location.hash.indexOf("storelocator")>-1){HB.storefinder.refererSearch();history.replaceState(null,null,location.pathname);}
1972HB.storefinder.bindSearch();},drawMap:function(){HB.storefinder.debug?console.log("drawMap"):null;if($('#map_canvas').length!=0)
1973{var $e=$('#map_canvas');HB.storefinder.debug>1?console.log("$e=$('#map_canvas')",$e):null;if($e.data("latitude")&&$e.data("latitude")!="0.0"){HB.storefinder.latitude=$e.data("latitude");HB.storefinder.longitude=$e.data("longitude");}
1974else{var stores=$e.data('stores');HB.storefinder.debug>1?console.log("stores: ",stores):null;var firstKey=Object.keys(stores)[0];HB.storefinder.debug>1?console.log("first Store: ",firstKey):null;if(firstKey!=null){HB.storefinder.latitude=stores[firstKey].latitude;HB.storefinder.longitude=stores[firstKey].longitude;}}
1975HB.storefinder.debug>1?console.log("latitude",HB.storefinder.latitude):null;HB.storefinder.debug>1?console.log("longitude",HB.storefinder.longitude):null;var centerPoint=new google.maps.LatLng(HB.storefinder.latitude,HB.storefinder.longitude);var ZoomLvlAndCenterPoint=HB.storefinder.getZoomLvlAndCenterPoint();var mapOptions={zoom:ZoomLvlAndCenterPoint['zoomLvl'],zoomControl:true,mapTypeControl:false,streetViewControl:false,mapTypeId:google.maps.MapTypeId.ROADMAP,center:ZoomLvlAndCenterPoint['centerPoint'],mapId:window.location.pathname}
1976HB.storefinder.map=new google.maps.Map(document.getElementById("map"),mapOptions);if($e.data("southlatitulde")&&$e.data("southlatitude")!="0.0")
1977{HB.storefinder.setMapBounds();}
1978HB.storefinder.getStorePosition();}
1979HB.storefinder.debug?console.log("drawMap finished."):null;},setMapBounds:function(){var $e=$('#map_canvas');var swBounds=new google.maps.LatLng($e.data("southlatitude"),$e.data("westlongitude"));var neBounds=new google.maps.LatLng($e.data("northlatitude"),$e.data("eastlongitude"));var bounds=new google.maps.LatLngBounds(swBounds,neBounds);HB.storefinder.debug>1?console.log("MapBounds: "+bounds):null;HB.storefinder.map.fitBounds(bounds);},getZoomLvlAndCenterPoint:function(){var DATA=new Array();var $e=$('#map_canvas');var markers=$e.data('stores');for(var i in markers){var this_lat=markers[i].latitude||null;var this_lng=markers[i].longitude||null;if((this_lat&&!isNaN(this_lat))&&(this_lng&&!isNaN(this_lng))){var minLat=minLat||this_lat;var maxLat=maxLat||this_lat;var minLng=minLng||this_lng;var maxLng=maxLng||this_lng;minLat=Math.min(minLat,this_lat);maxLat=Math.max(maxLat,this_lat);minLng=Math.min(minLng,this_lng);maxLng=Math.max(maxLng,this_lng);}}
1980if(markers&&!jQuery.isEmptyObject(markers)){var centerLat=minLat+((maxLat-minLat)/2);var centerLng=minLng+((maxLng-minLng)/2);}else{var centerLat=HB.storefinder.latitude||51.1657;var centerLng=HB.storefinder.longitude||10.4515;}
1981var dist=(6371*Math.acos(Math.sin(minLat/57.2958)*Math.sin(maxLat/57.2958)+(Math.cos(minLat/57.2958)*Math.cos(maxLat/57.2958)*Math.cos(maxLng/57.2958-minLng/57.2958))));var zoomLvl=13;DATA['centerPoint']={lat:centerLat,lng:centerLng};if(dist<24576)
1982zoomLvl=1;if(dist<12288)
1983zoomLvl=2;if(dist<6144)
1984zoomLvl=3;if(dist<3072)
1985zoomLvl=4;if(dist<1536)
1986zoomLvl=5;if(dist<768)
1987zoomLvl=6;if(dist<384)
1988zoomLvl=7;if(dist<192)
1989zoomLvl=8;
1989if(dist<96)
1990zoomLvl=9;if(dist<48)
1991zoomLvl=10;if(dist<24)
1992zoomLvl=11;if(dist<11)
1993zoomLvl=12;if(dist<4.8)
1994zoomLvl=13;if(dist<3.2)
1995zoomLvl=14;if(dist<1.6)
1996zoomLvl=15;if(dist<0.8)
1997zoomLvl=16;if(dist<0.3)
1998zoomLvl=17;DATA['zoomLvl']=zoomLvl;return DATA;},getStorePosition:function(){HB.storefinder.debug?console.log("getStorePosition"):null;var $e=$('#map_canvas');if($e&&$e.length>0){var stores=$e.data('stores');HB.storefinder.debug?console.log(stores):null;$.each(stores,function(k,v){HB.storefinder.addStore(v.id,v.latitude,v.longitude,v.name,v.info);});}else{HB.storefinder.debug?console.log("no store data found. ",$e):null;}},addStore:function(i,latitude,longitude,name,info)
1999{HB.storefinder.debug?console.log("addStore: ",i,latitude,longitude,name):null;const img=document.createElement('img');img.src='https://www.google.com/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-2-medium.png,assets/icons/poi/tactile/pinlet_outline_v2-2-medium.png,assets/icons/poi/tactile/pinlet-2-medium.png,assets/icons/poi/quantum/pinlet/shoppingbag_pinlet-2-medium.png&highlight=ff000000,ffffff,ea4335,ffffff?scale=1';img.className='map-marker-drop-animation';img.alt="Marker";var marker=new google.maps.marker.AdvancedMarkerElement({position:new google.maps.LatLng(latitude,longitude),map:HB.storefinder.map,content:img,title:name,});var infowindow=new google.maps.InfoWindow({content:info,disableAutoPan:true});google.maps.event.addListener(marker,'click',function()
2000{infowindow.open(HB.storefinder.map,marker);});},bindFindStoresNearMe:function(){HB.storefinder.debug?console.log("bindFindStoresNearMe()"):null;$(document).on("click","#findStoresNearMe",function(e){e.preventDefault();var gps=navigator.geolocation;if(gps)
2001{gps.getCurrentPosition(HB.storefinder.positionSuccessStoresNearMe,function(error)
2002{console.log("An error occurred... The error code and message are: "+error.code+"/"+error.message);});}});HB.storefinder.debug?console.log("bindFindStoresNearMe() finished."):null;},positionSuccessStoresNearMe:function(position)
2003{HB.storefinder.debug?console.log("positionSuccessStoresNearMe"):null;$("#latitude").val(position.coords.latitude);$("#longitude").val(position.coords.longitude);if($("#radius").val()>0){$("#nearMeRadius").val($("#radius").val().split(" ")[0]*1000);}
2004$.ajax({url:$("#nearMeStorefinderForm").attr("action"),data:$("#nearMeStorefinderForm").serialize(),success:HB.storefinder.onQuerySuccess});HB.storefinder.debug?console.log("positionSuccessStoresNearMe() finished."):null;return false;},bindSearch:function(){HB.storefinder.debug?console.log("bindSearch()"):null;$(document).on("click","#storeFinderSearch",function(e){e.preventDefault();var $form=$("#storeFinderForm");if($form.find("#query").val().length==0){$("#radius").val('');}
2005if($("#radius").val()>0){$("#searchRadius").val($("#radius").val().split(" ")[0]*1000);}
2006$.ajax({url:$form.attr("action"),data:$form.serialize(),success:HB.storefinder.onQuerySuccess});});HB.storefinder.debug?console.log("bindSearch() finished."):null;},refererSearch:function(){HB.storefinder.debug?console.log("refererSearch()"):null;var $form=$("#storeFinderForm");var str=window.location.hash.substring(1);str=decodeURIComponent(str);var json="{"+str.replace(/.*\{|\}/gi,'')+"}";var obj=$.parseJSON(json);if(HB.storefinder.debug)console.log('Sie suchen nach '+obj.search+' im radius von '+obj.radius+' km');if((obj.search).length>0){$("#query").val(obj.search);}
2007if((obj.radius).length==0){$("#radius").val('');}
2008if((obj.radius).length>0){$("#searchRadius").val((obj.radius).split(" ")[0]*1000);$("#radius").val(obj.radius);}
2009$.ajax({url:$form.attr("action"),data:$form.serialize(),success:HB.storefinder.onQuerySuccess});HB.storefinder.debug?console.log("refererSearch() finished."):null;},onQuerySuccess:function(response){HB.storefinder.latitude=undefined;HB.storefinder.longitude=undefined;var result=response["result"];var additionalLocationsLink=response["additionalLocationsLink"];if(HB.storefinder.debug)console.log("onQuerySuccess()");if(HB.storefinder.debug>1)console.log("result:",result);var $e=$('#map_canvas');$e.data('longitude',result.sourceLongitude);$e.data('latitude',result.sourceLatitude);$e.data('southlatitude',result.boundSouthLatitude);$e.data('westlongitude',result.boundWestLongitude);$e.data('northlatitude',result.boundNorthLatitude);$e.data('eastlongitude',result.boundEastLongitude);var storeString="{";var storeList=$(".storeResultList");storeList.html("");$.each(result.results,function(k,v){HB.storefinder.debug>1?console.log("results: ",k,v):null;let imageIcon;if(v.mapIcon!=null&&v.mapIcon.url!=null){imageIcon=v.mapIcon.url;}else{imageIcon=HB.config.sharedResourcePath+"/images/favicon.ico";}
2010let storeInfo='<hr/><div class="storeItem" data-name="'+v.name+'">'+'<div class="storeMarker"><img src="'+imageIcon+'" alt=""/> </div>'+'<div class="storeDetails">'+'<h5 class="itemName">'+
2011(v.url?'<a href="'+v.url+'" target="_blank">'+(v.displayName?v.displayName:'')+'</a>':(v.displayName?v.displayName:''))+'</h5>';if(v.address!==null){storeInfo+=(v.address.phone?'<p><a href=\"tel:'+v.address.phone+'\">'+v.address.phone+'</a></p>':'')+
2012(v.formattedDistance!=null&&v.formattedDistance!='0 Km'?'<p>'+v.formattedDistance+'</p>':'')+
2013(v.address.line1?'<p>'+v.address.line1+'</p>':'')+
2014(v.address.line2?'<p>'+v.address.line2+'</p>':'')+
2015(v.address.town||v.address.postalCode?'<p>'+v.address.postalCode+'&nbsp;'+v.address.town+'</p>':'')+
2016(v.active&&v.combinedId?`<a href="${$e.parents(".storeMap").find(".url-switchLocation").text() + "/" + encodeURIComponent(v.combinedId)}">${$e.parents(".storeMap").find(".locale-switchLocation").text()}</a>`:'');}
2017storeInfo+=(v.url?'<p>'+'<a href="'+v.url+'" target="_blank"> zum Standort</a></p>
2017':'')+'</div></div>'
2018storeList.append(storeInfo);storeString+=(k>0?',':'')+'"store'+k+'":{'+'"id":"'+k+'","latitude":"'+v.geoPoint.latitude+'","longitude":"'+v.geoPoint.longitude+'","name":"'+v.displayName+'","info":"<div class=\\"title h3 full-width\\">'+v.displayName+'</div>'+
2019(v.address?'<div class=\\"full-width\\">'+v.address.formattedAddress+'</div>':'')+'<div class=\\"full-width\\">'+v.formattedDistance+'</div>'+'<div class=\\"view-link\\">';HB.storefinder.debug>0?console.log(additionalLocationsLink,v.active):null;if(additionalLocationsLink&&v.active){storeString+='<a href=\\"'+$e.parents(".storeMap").find(".url-switchLocation").text()+"/"+encodeURIComponent(v.combinedId)+'\\">'+'<span>'+$e.parents(".storeMap").find(".locale-switchLocation").text()+'</span></a></div>';}else{storeString+='<a target=\\"_blank\\" href=\\"https://www.google.com/maps/search/'+
2020v.displayName+", "+
2021(v.address?v.address.formattedAddress:'')+'\\">'+'<span>'+$e.parents(".storeMap").find(".locale-toGoogleMaps").text()+'</span></a></div>';};storeString+='"}';});storeString+="}";storeList.append('<hr/><div class="vertical-fade"></div>');HB.storefinder.debug>1?console.log("storeString: ",storeString):null;$e.data('stores',JSON.parse(storeString));HB.storefinder.drawMap(result);if(HB.storefinder.debug)console.log("onQuerySuccess() finished.");},bindConfirmationNecessary:function(){HB.storefinder.debug?console.log("bindConfirmationNecessary()"):null;$('a.js-store-finder-component').on("click",function(e){e.preventDefault();HB.storefinder.setCookieStorefinderConfirmation();HB.storefinder.reloadStorefinderMap();});},setCookieStorefinderConfirmation:function(){HB.storefinder.debug?console.log("setCookieStorefinderConfirmation()"):null;var maxAge=';max-age='+HB.config.cookieMaxAge;document.cookie=encodeURIComponent(HB.config.url.storefinder.cookieName)+"="+encodeURIComponent(true)+maxAge+"; path=/";HB.RoleSelection.debug?console.log("document.Cookie "+document.cookie):null;},reloadStorefinderMap:function(){HB.storefinder.debug?console.log("reloadStorefinderMap()"):null;$.getScript("https://maps.googleapis.com/maps/api/js?key="+HB.config.googleApiKey+"&?v=3.20&callback=HB.storefinder.drawMap&loading=async&libraries=marker").done(function(script,textStatus){$.ajax({dataType:'HTML',url:HB.config.url.storefinder.contentUrl,type:'GET',success:function(result){$('.storefinder-component').html(result);HB.storefinder.init();},error:function(jqXHR,textStatus,errorThrown){HB.storefinder.debug?console.log("error in ajax"):null;}});}).fail(function(jqxhr,settings,exception){HB.storefinder.debug?console.log("script loading error for googleapis"):null;});},onMapUpdate:function(){let storefinderSearchOverlay=$('.storefinder-component').find('.searchPane');HB.Core.isConsentTrue("S1pcEj_jZX")?storefinderSearchOverlay.removeClass('hidden'):null;$(window).on('UC_UI_CMP_EVENT',function(){let currentGoogleMapsConsent=HB.Core.isConsentTrue("S1pcEj_jZX");if(currentGoogleMapsConsent){setTimeout(function(){HB.storefinder.init();if(currentGoogleMapsConsent!==HB.storefinder.previousGoogleMapsConsent){HB.storefinder.previousGoogleMapsConsent=currentGoogleMapsConsent;}
2022storefinderSearchOverlay.removeClass('hidden');},500);}else{storefinderSearchOverlay.addClass('hidden');HB.storefinder.init();if(currentGoogleMapsConsent!==HB.storefinder.previousGoogleMapsConsent){location.reload();}}});}};$(document).ready(function()
2023{HB.storefinder.init();let loadMapScript=$('#loadMap');HB.storefinder.debug?console.log(loadMapScript):null;if(loadMapScript.attr("type")==="application/usercentrics"){HB.storefinder.debug?console.log("forcing map creation to show google maps confirmation prompt"):null;var ZoomLvlAndCenterPoint=HB.storefinder.getZoomLvlAndCenterPoint();var mapOptions={zoom:ZoomLvlAndCenterPoint['zoomLvl'],zoomControl:true,mapTypeControl:false,streetViewControl:false,center:ZoomLvlAndCenterPoint['centerPoint'],mapId:window.location.pathname}
2024HB.storefinder.map=new google.maps.Map(document.getElementById("map"),mapOptions);}});HB.EventCalendar={debug:0,init:function(){if(HB.EventCalendar.debug){console.log("HB.EventCalendar.init(
2024)");}
2025const $widgets=$(".event-calendar-widget");$widgets.find('.next').on("click",function(e){e.preventDefault();HB.EventCalendar.nextMonth(this);});$widgets.find('.prev').on("click",function(e){e.preventDefault();HB.EventCalendar.prevMonth(this);});const $detailPage=$(".page-eventDetailsPage");$detailPage.find('.js-open-form').on('click',function(e){e.preventDefault();HB.EventCalendar.showRegisterForm(this);});$detailPage.find('.js-close-form').on('click',function(e){e.preventDefault();HB.EventCalendar.hideRegisterForm(this);});if(!$("body").hasClass("page-eventDetailsPage")){HB.EventCalendar.displayEventCalendarLabel();$(window).resize(HB.EventCalendar.onResize);}},nextMonth:function(pos){if(HB.EventCalendar.debug){console.log("HB.EventCalendar.nextMonth()");}
2026let $widget=$(pos).parents(".event-calendar-widget");let widgetMonth=parseInt($widget.data("month"));let widgetYear=parseInt($widget.data("year"));let componentPK=$widget.data("pk");widgetMonth++;if(widgetMonth>11){widgetMonth=0;widgetYear++;}
2027HB.EventCalendar.getView($widget,widgetMonth,widgetYear);},prevMonth:function(pos){if(HB.EventCalendar.debug){console.log("HB.EventCalendar.prevMonth()");}
2028let $widget=$(pos).parents(".event-calendar-widget");let widgetMonth=parseInt($widget.data("month"));let widgetYear=parseInt($widget.data("year"));widgetMonth--;if(widgetMonth<0){widgetMonth=11;widgetYear--;}
2029HB.EventCalendar.getView($widget,widgetMonth,widgetYear);},getView($widget,widgetMonth,widgetYear){let widgetUrl=$widget.data("url");let componentPK=$widget.data("pk");if(HB.EventCalendar.debug>1){console.log("widgetMonth: ",widgetMonth);console.log("widgetYear: ",widgetYear);console.log("widgetUrl: ",widgetUrl);}
2030$.ajax({url:widgetUrl,type:'get',dataType:'json',data:{month:widgetMonth,year:widgetYear,pk:componentPK},success:function(result){HB.EventCalendar.showPrev(result,$widget)},error:function(error){console.log("error: ",error);}});},showNext:function(result,pos){if(HB.EventCalendar.debug){console.log("result: ",result);}
2031let $widget=$(pos);$widget.find(".events").replaceWith(result.events);$widget.data("month",result.month);$widget.data("year",result.year);HB.EventCalendar.updateTitle($widget.find('.event-calendar-widget-nav h2'),result.monthname,result.year);if(HB.EventCalendar.debug){console.log("$widget.data(month): ",$widget.data("month"));console.log("$widget.data(year): ",$widget.data("year"));}},showPrev:function(result,pos){if(HB.EventCalendar.debug){console.log("result: ",result);}
2032let $widget=$(pos);$widget.find(".events").replaceWith(result.events);$widget.data("month",result.month);$widget.data("year",result.year);HB.EventCalendar.updateTitle($widget.find('.event-calendar-widget-nav h2'),result.monthname,result.year);if(HB.EventCalendar.debug){console.log("$widget.data(month): ",$widget.data("month"));console.log("$widget.data(year): ",$widget.data("year"));}},updateTitle:function(element,monthname,year){var title=$(element).data('title');
2032if(typeof title!='undefined'&&title!=null){if(title.includes("{0}")){title=title.replace("{0}",monthname);title=title.replace("{1}",year);}
2033else{title=title+" "+monthname;}
2034$(element).html(title);}},showRegisterForm:function(pos){$('.event-registration').slideDown('slow');let $detail=$('.event-calendar-detail');$detail.find('.js-open-form').hide();$detail.find('.js-close-form').fadeIn();},hideRegisterForm:function(pos){$('.event-registration').slideUp('slow');let $detail=$('.event-calendar-detail');$detail.find('.js-close-form').hide();$detail.find('.js-open-form').fadeIn();},onResize:function(event){HB.EventCalendar.displayEventCalendarLabel();},displayEventCalendarLabel:function(){const $maxDescriptionWidth=1140;const $maxCharacters=305;if(HB.EventCalendar.debug){console.log("displayEventCalendarLabel");}
2035$(".event-calendar-component-single-event").each(function(){let $labelElement=$(this).find(".event-label-show-more");if($labelElement.parents(".event-calendar-widget").length<1){let $descriptionTextLength=$labelElement.siblings(".description").text().length;let $descriptionWidth=$labelElement.siblings(".description").width();let $calcDescriptionWidth=$descriptionTextLength*$maxDescriptionWidth/$maxCharacters;if($labelElement.parents(".flexible-wrapper").length>0){$calcDescriptionWidth=$calcDescriptionWidth+80;}else{$calcDescriptionWidth=$calcDescriptionWidth+50;}
2036if($descriptionWidth<$calcDescriptionWidth){$labelElement.css("display","inline-block");}else{$labelElement.css("display","none");}}});}};HB.StoreSelection={cname:HB.storeSelection.cookieName,exdays:30,debug:0,storeID:'',stores:[],init:function(){HB.StoreSelection.debug?console.log("HB.StoreSelection.init  >>"):null;}};;HB.CookieSettings={init:function(){if(document.cookie.indexOf(HB.cookieSettings.cookieName)>=0){HB.CookieSettings.bindCookieSettingsUpdate();HB.RoleSelection.init();}else if(HB.cookieSettings.hideCookieSettings==="true"){HB.CookieSettings.bindCookieSettingsUpdate();}else{if(HB.Utils.isSmartEdit()){$.ajax({cache:false,url:HB.config.url.cookieSettings,type:'post',data:'statistics=true&comfort=true',timeout:HB.config.ajax.timeout,success:function(result){console.log("Success: Add 'statistics' and 'comfort' to cookieSettings for SmartEdit");HB.CookieSettings.bindCookieSettingsUpdate();HB.RoleSelection.init();},error:function(result){if(HB.config.usercentricsApiKey===''){HB.CookieSettings.getCookieSettingsContent();}}});}else{if(HB.config.usercentricsApiKey===''){HB.CookieSettings.getCookieSettingsContent();}}}},getCookieSettingsContent:function(cookieValue){HB.Utils.displayModalPopupLoading('modal-lg');$.ajax({cache:false,url:HB.config.url.cookieSettings,type:'get',dataType:'json',timeout:HB.config.ajax.timeout,success:function(result){HB.CookieSettings.showCookieSettings(result);HB.CookieSettings.bindTextLinks();HB.CookieSettings.bindSubmit();HB.CookieSettings.disableModalClose();if(typeof cookieValue!=='undefined'){HB.CookieSettings.setPreSelectionByCookieValue(cookieValue);}}});},showCookieSettings:function(result){if('cookiePopup'in result){HB.Utils.displayModalPopup(result.cookiePopup.content,'modal-lg');if($('#hbModal').length>0){$('#hbModal').css('top','60px');}}},bindSubmit:function(){if($('.modal-cookie #submitAll').length>0){$('.modal-cookie #submitAll').on('click',HB.CookieSettings.onSubmitAll);}},bindTextLinks:function(){if($('.modal-cookie a').length>0){$('.modal-cookie').find('a').on('click',HB.CookieSettings.onTextLink);}},onSubmitAll:function(){if($('.modal-cookie form').length>0){var $cookieForm=$('.modal-cookie form');$cookieForm.find('.checkbox-wrapper input').each(function(){$(this).prop('checked',true);});$cookieForm.submit();}},onTextLink:function(e){e.preventDefault();var url=$(e.currentTarget).attr('href');if(url){$.post(url,function(data){var w=window.open('about:blank');if(w){w.document.open();w.document.write(data);w.document.close();}});}},disableModalClose:function(){if($('#hbModal').length>0&&typeof $('#hbModal').data('bs.modal')!=='undefined'){$('#hbModal').off('keydown.dismiss.bs.modal');$('#hbModal').data('bs.modal').options.keyboard=false;$('#hbModal').data('bs.modal').options.backdrop='static';}},bindCookieSettingsUpdate:function(){if($('body').find('a[href*="/updatecookiesettings"]').length>0){$('body').find('a[href*="/updatecookiesettings"]').on('click touchstart',function(event){event.preventDefault();HB.CookieSettings.onCookieSettingsUpdate();});}},onCookieSettingsUpdate:function(){if(document.cookie.indexOf(HB.cookieSettings.cookieName)>=0){HB.CookieSettings.getCookieSettingsContent(HB.CookieSettings.getCookieByName(HB.cookieSettings.cookieName));}else{HB.CookieSettings.getCookieSettingsContent();}},getCookieByName:function(cookieName){var name=cookieName+"=";var decodedCookie=decodeURIComponent(document.cookie);var ca=decodedCookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1);}
2037if(c.indexOf(name)==0){return c.substring(name.length,c.length);}}
2038return"";},setPreSelectionByCookieValue:function(cookieValue){if(cookieValue!==''){var cookies=cookieValue.split('|');for(var i=0;i<cookies.length;i++){var $checkbox=$('.modal-body.cookie').find('input[name="'+cookies[i].toLowerCase()+'"]');if($checkbox.length>0){$checkbox.click();}}}}};;HB.NoBack={pageForward:function(){window.history.forward();}};HB.DecodeEmail={debug:0,init:function(){HB.DecodeEmail.bindActions();},bindActions:function(){var $tags=$('.maskedEmailAddress');$tags.each(function(index){HB.DecodeEmail.debug>0?console.log('$tags[index]: ',$($tags[index])):null;var uri=$tags[index].href;HB.DecodeEmail.debug>0?console.log('uri: ',unescape(uri)):null;var encoded=HB.DecodeEmail.removePrefix(unescape(uri),'mailto:');if(encoded.indexOf('?')>-1){encoded=encoded.substring(0,encoded.indexOf('?'));}
2039HB.DecodeEmail.debug>0?console.log('encoded: ',encoded):null;var decoded=HB.DecodeEmail.b64DecodeUnicode(encoded);HB.DecodeEmail.debug>0?console.log('decoded: ',decoded):null;$(this).mouseover(function(){$(this).html(decoded);});$(this).on("click",function(e){e.preventDefault();HB.DecodeEmail.debug>0?console.log('uri: ',unescape(uri)):null;var decodedUri=unescape(uri).replace(encoded,decoded);HB.DecodeEmail.debug>0?console.log('decoded URI: ',decoded):null;document.location.href=decodedUri;});});},removePrefix:function(str,prefix){return str.indexOf(prefix)>-1?str.substring(prefix.length):str;},b64DecodeUnicode:function b64DecodeUnicode(str){try{var prefix='{masked}';var code=HB.DecodeEmail.removePrefix(str,prefix);return decodeURIComponent(atob(code).split('').map(function(c){return'%'+('00'+c.charCodeAt(0).toString(16)).slice(-2);}).join(''));}catch(e){console.log("Error decoding Email: ",e);return"Could not parse Email";}}};HB.RoleSelection={cname:'isB2B',debug:0,selection:'',content:'',init:function(){HB.RoleSelection.debug?console.log("HB.RoleSelection.init  >>"):null;if(HB.RoleSelection.roleSelectPending()){HB.RoleSelection.getLayerContent();}},initInfoIcon:function(){$('.popover-role').each(function(){$(this).popover({trigger:'focus'});});},roleSelectPending:function(){if(HB.user.isLoggedIn==='false'&&HB.config.checkUserRole==='true'){return HB.RoleSelection.checkCookie();}
2040return false;},getCookie:function(cname){HB.RoleSelection.debug?console.log("HB.RoleSelection.getCookie >>"):null;var keyValue=document.cookie.match('(^|;) ?'+cname+'=([^;]*)(;|$)');
2040return keyValue?keyValue[2]:null;},setCookie:function(name,value){HB.RoleSelection.debug?console.log("HB.RoleSelection.setCookie >>"):null;var maxAge=';max-age='+HB.config.cookieMaxAge;var path=HB.config.siteUrl;if(path!=null&&path.length>1&&path.startsWith('/')&&path.endsWith('/')){path=path.slice(0,-1);}
2041document.cookie=encodeURIComponent(name)+"="+encodeURIComponent(value)+maxAge+"; path="+path;HB.RoleSelection.debug?console.log("document.Cookie "+document.cookie):null;},checkCookie:function(){HB.RoleSelection.debug?console.log("HB.RoleSelection.checkCookie >>"):null;HB.RoleSelection.cname=HB.roleSelection.cookieName;if(HB.RoleSelection.getCookie(HB.RoleSelection.cname)==null){HB.RoleSelection.debug?console.log("cookie not set !"):null;return true;}else{HB.RoleSelection.debug?console.log("cookie is set !"):null;return false;}},getLayerContent:function(){HB.RoleSelection.debug?console.log("HB.RoleSelection.getLayerContent >> requesting from: "+HB.config.url.roleSelection.layerContentUrl):null;$.ajax({url:HB.config.url.roleSelection.layerContentUrl,cache:false,type:'GET',timeout:HB.config.ajax.timeout,success:function(result){if(HB.RoleSelection.debug){console.log(result.roleSelectorPopup);};HB.RoleSelection.content=result.roleSelectorPopup.content;HB.RoleSelection.callSelectionLayer();},error:function(jqXHR,textStatus,errorThrown){HB.RoleSelection.debug?console.log("error: "+textStatus+" errorThrown: "+errorThrown):null;}});},callSelectionLayer:function(){if(HB.RoleSelection.debug){console.log("HB.RoleSelection.callSectionLayer >>")};HB.Utils.displayModalPopup(HB.RoleSelection.content,'modal-xl role-select-modal');$('.modal-backdrop').off('click');$('.modal-body .js-consumer').on('click',function(e){e.preventDefault();if(HB.RoleSelection.debug){console.log("HB.RoleSelection.callSectionLayer >> selected B2C")};HB.RoleSelection.trackRoleSelect("Privat");HB.RoleSelection.setCookie(HB.RoleSelection.cname,'false');location.reload();});$('.modal-body .js-business').on('click',function(e){e.preventDefault();if(HB.RoleSelection.debug){console.log("HB.RoleSelection.callSectionLayer >> selected B2B")};HB.RoleSelection.trackRoleSelect("Gewerblich");HB.RoleSelection.setCookie(HB.RoleSelection.cname,'true');location.reload();});},trackRoleSelect:function(userRole)
2042{if(HB.RoleSelection.debug){console.log("HB.RoleSelection.trackRoleSelect >> selected "+userRole)};if(typeof(_paq)!=="undefined"){_paq.push(['trackEvent','Kundengruppe',userRole]);}}};;HB.ArrowBannerComponent={debug:0,init:function(){HB.ArrowBannerComponent.resizeArrow();},displayComponents:function(banner){HB.ArrowBannerComponent.debug>0?console.log('Starting displayComponents for banner:',banner):null;if(!banner||!banner.length){HB.ArrowBannerComponent.debug>0?console.warn('Invalid banner element, skipping'):null;return;}
2043HB.ArrowBannerComponent.debug>0?console.log('Adding loaded class to banner'):null;banner.addClass('loaded');},resizeArrow:function(){$(document).ready(function(){HB.ArrowBannerComponent.debug>0?console.log('Document ready, processing arrow banners'):null;$(".arrowbanner").each(function(index){const banner=$(this);HB.ArrowBannerComponent.debug>0?console.log(`Processing banner ${index}:`,banner):null;HB.ArrowBannerComponent.displayComponents(banner);});HB.ArrowBannerComponent.findArrowBannerWithinSliderForResize();HB.ArrowBannerComponent.findArrowBannerForResize();});},findArrowBannerForResize:function(){$(".arrowbanner").each(function(index){var arrowBanner=this;if($(arrowBanner).closest(".slick-slider-single-image").length===0){HB.ArrowBannerComponent.debug>0?console.log("Component:",arrowBanner):null;HB.ArrowBannerComponent.settingClassForResize(arrowBanner);}});},findArrowBannerWithinSliderForResize:function(){if($(".slick-slider-single-image").length>0){$(".slick-slider-single-image").each(function(){$(".slick-slider-single-image").on("setPosition",function(){$(this).find(".arrowbanner").each(function(){var arrowBanner=this;HB.ArrowBannerComponent.debug>0?console.log("Component:",arrowBanner):null;HB.ArrowBannerComponent.settingClassForResize(arrowBanner);});$(this).off();});});}},settingClassForResize:function(element){var width=parseInt($(element).width());HB.ArrowBannerComponent.debug>0?console.log("component width:",width):null;if(width>757){$(element).addClass("large");}else{$(element).removeClass("large");}
2044if(width>757&&width<850){$(element).addClass("small-spacing");}else{$(element).removeClass("small-spacing");}}};;HB.SearchPage={init:function(){},onClickMiscButtonMobile:function(){console.log("HB.SearchPage.onClickMiscButtonMobile");$('#tabButtonProduct').removeClass('active');$('#tabButtonAllCms').addClass('active');$('.tabBodyCms').removeClass('hidden');$('.tabBodyProduct').addClass('hidden');}};HB.Print={bindModalPrintButton:function(buttonElement){$(buttonElement).on("click",function(){HB.Print.onModalPrintButton($(this).closest('.modal'));});$(window).keydown(function(e){if(e.ctrlKey&&e.keyCode==80){if($('.modal').is(':visible')){e.preventDefault();e.stopPropagation();HB.Print.onModalPrintButton($(buttonElement).closest('.modal'));}}});},onModalPrintButton:function(element){var w=window.open();if(w){w.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");w.document.write("<html>");w.document.write("<head>");w.document.write("<meta charset='utf-8'>");if($("link[rel=stylesheet]").length){$("link[rel=stylesheet]").each(function(){var href=$(this).attr("href");if(href){var media=$(this).attr("media")||"all";w.document.write("<link type='text/css' rel='stylesheet' href='"+href+"' media='"+media+"'>");}});}
2045w.document.write('</head><body>');w.document.write($(element).wrap('<div>').parent().html());w.document.write('<script type="text/javascript">function closeme(){window.close();}setTimeout(closeme,50);window.print();</script></body></html>');w.document.close();}}};HB.Contact={debug:0,maxFileSize:2,init:function(){$.each($("form#contactMessageForm"),function(index,value){if(value!=null){HB.Contact.setAutocompleteClasses();HB.Contact.bindSubmit(value);HB.FormValidation.validateFileSize(value,HB.Contact.maxFileSize);}});},setAutocompleteClasses:()=>{$('input[name="postalCode"]').addClass('js-postcode');$('input[name="location"]').addClass('js-town');let input=$('.js-postcode');HB.postcodeSuggest.inputSelect(input);},bindSubmit:function(form){HB.Contact.debug>0?console.log('Binding form',form):null;$(form).find('button[type="submit"]').on('click',function(e){e.preventDefault();HB.FormValidation.init();HB.Contact.debug>0?console.log('HB.Contact.bindSubmit(): Checking form for submit',form):null;if(HB.FormValidation.checkRequiredFields()==true){HB.Contact.debug>0?console.log('HB.Contact.bindSubmit(): Submitting form',form):null;$(form).submit();}});}};;HB.Widerruf={debug:0,init:function(){HB.Widerruf.initDatePicker();$.each($("form#widerrufForm"),function(index,value){if(value!=null){HB.Widerruf.bindSubmit(value);}});},initDatePicker:function(){var $dateInput=$('#widerrufForm').find('.input-group.date');if($dateInput.length){if(HB.config.currentLanguage=='de'){$.fn.datepicker.dates['de']={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute"};}
2046$dateInput.datepicker({format:'dd.mm.yyyy',language:'de',container:$dateInput,weekStart:1,endDate:'0d',autoclose:true});$dateInput.on('keydown',function(event){return event.keyCode===9;});}},bindSubmit:function(form){HB.Widerruf.debug>0?console.log('Binding form',form):null;$(form).find('button[type="submit"]').on('click',function(e){e.preventDefault();HB.FormValidation.init();HB.Widerruf.debug>0?console.log('HB.Widerruf.bindSubmit(): Checking form for submit',form):null;if(HB.FormValidation.checkRequiredFields()==true&&HB.Widerruf.validateDateFormat()){HB.Widerruf.debug>0?console.log('HB.Widerruf.bindSubmit(): Submitting form',form):null;$(form).submit();}});},validateDateFormat:function(){var $dateInput=$('#widerruf\\.orderDate');var dateValue=$dateInput.val();if(!dateValue){return true;}
2047var regex=/^(0?[1-9]|[12][0-9]|3[01])\.(0?[1-9]|1[0-2])\.\d{4}$/;if(!regex.test(dateValue)){HB.FormValidation.showNegativeGlobalMessage("Bitte geben Sie ein gültiges Datum im Format dd.MM.yyyy ein.");$dateInput.closest('.form-group').addClass('error');return false;}
2048var parts=dateValue.split('.');var day=parseInt(parts[0],10);var month=parseInt(parts[1],10)-1;var year=parseInt(parts[2],10);var date=new Date(year,month,day);if(date.getFullYear()!==year||date.getMonth()!==month||date.getDate()!==day){HB.FormValidation.showNegativeGlobalMessage("Bitte geben Sie ein gültiges Datum im Format dd.MM.yyyy ein.");$dateInput.closest('.form-group').addClass('error');return false;}
2049var today=new Date();today.setHours(0,0,0,0);if(date.getTime()>today.getTime()){HB.FormValidation.showNegativeGlobalMessage("Das Bestelldatum darf nicht in der Zukunft liegen.");$dateInput.closest('.form-group').addClass('error');return false;}
2050$dateInput.closest('.form-group').removeClass('error');return true;}};HB.Review={init:function(){HB.Review.multipleLineTruncate();},multipleLineTruncate:function(){$('.review-details-wrapper .review-message').each(function(){$(this).dotdotdot({wrap:"letter"});});}};HB.TopArticle={debug:0,getTopArticle:function($component,pageNumber,facetCode){var componentUid=$component.data("componentUid");var pageSize=$component.data("pagesize");var sortCode=$component.find('.sortOptions').val();var url=$component.data("componentUrl");HB.TopArticle.debug>0?console.log("HB.TopArticle.getTopArticle, componentId: ",componentUid):null;$.ajax({url:url,type:'get',dataType:'json',data:{componentUid:componentUid,pagesize:pageSize,page:pageNumber,sort:sortCode,facetCode:facetCode},success:function(result){HB.TopArticle.debug>0?console.log(result):null;HB.TopArticle.onAjaxSuccess(componentUid,result.html);},error:function(jqXHR,textStatus,errorThrown){console.log("error: "+errorThrown);}});},onAjaxSuccess:function(componentUid,html){HB.TopArticle.debug>0?console.log("HB.TopArticle.onAjaxSuccess: ",componentUid):null;var $content=$(".js-top-articles-content[data-component-uid='"+componentUid+"']");HB.TopArticle.debug>0?console.log($content):null;var $newContent=$(html);$content.replaceWith($newContent);HB.TopArticle.initBinding($newContent);}
2050,fadeEachElement:function($component){var delay=0;$component.find(".productListItem").each(function(index){HB.TopArticle.debug>1?console.log("Fading element: ",this):null;$(this).delay(delay).fadeIn(200);delay+=50;});},initBinding:function($component){HB.TopArticle.debug>0?console.log("HB.TopArticle.initBinding: ",$component):null;HB.ListItem.bindStockPopovers($component);HB.TopArticle.fadeEachElement($component);HB.TopArticle.bindListener($component);HB.ProductReferences.initSlider($component);HB.ListItem.init();},bindListener:function($component){HB.TopArticle.debug>0?console.log("HB.TopArticle.bindListener",$component):null;var categorySelect=$component.find('[id^="categoryOptions"]');HB.TopArticle.debug>0?console.log("activeFacet",categorySelect):null;var selectedFacetCode=categorySelect.children('option:selected').val();$component.find('.sortOptions').change(function(){HB.TopArticle.debug>0?console.log("change sort to "+$(this).val()):null;HB.TopArticle.getTopArticle($component,HB.TopArticle.getCurrentPage($component),selectedFacetCode);});var $pager=$component.find('.pager');$pager.find('.first').click(function(e){e.preventDefault();HB.TopArticle.getTopArticle($component,0,selectedFacetCode);});$pager.find('.prev').click(function(e){e.preventDefault();var currentPage=HB.TopArticle.getCurrentPage($component);var prevPage=currentPage<=0?0:currentPage-1;HB.TopArticle.getTopArticle($component,prevPage,selectedFacetCode);});$pager.find('.numberInput').keypress(function(e){var value=$(this).val();if(/^[0-9]+$/.test(value)){if(e.which==13){var numberOfPages=HB.TopArticle.getLastPage($component);var checkedValue=value<=0?0:(value>numberOfPages?numberOfPages:value-1);HB.TopArticle.getTopArticle($component,checkedValue,selectedFacetCode);return false;}}});$pager.find('.next').click(function(e){e.preventDefault();var currentPage=HB.TopArticle.getCurrentPage($component);var numberOfPages=HB.TopArticle.getLastPage($component);var nextPage=currentPage>=numberOfPages?numberOfPages:currentPage+1;HB.TopArticle.getTopArticle($component,nextPage,selectedFacetCode);});$pager.find('.last').click(function(e){e.preventDefault();HB.TopArticle.getTopArticle($component,HB.TopArticle.getLastPage($component),selectedFacetCode);});$component.find('[id^="categoryOptions"]').change(function(e){var $option=$(this).val();HB.TopArticle.debug>0?console.log("Category facet dropdown changed:",$component,$option):null;HB.TopArticle.getTopArticle($component,0,$option);});},getCurrentPage:function($component){var $pager=$component.find('.pager')
2051return(typeof $pager!=='undefined')?$pager.data('currentPage'):0;},getLastPage:function($component){var $pager=$component.find('.pager')
2052return(typeof $pager!=='undefined')?$pager.data('numberOfPages')-1:0;}};
2052HB.ArticleList={$topicSlider:$('.topic-slider-wrapper'),init:function(){HB.ArticleList.initPageSizeSelects();HB.ArticleList.initSortingSelects();HB.ArticleList.initBreadcrumbOverImage();HB.ArticleList.initTopicSlider();HB.ArticleList.bindTopicsInSlider();},initPageSizeSelects:function(){var pageSizeSelects=$(".page-size-selector");pageSizeSelects.on("change",function(e){$(this).closest('form').trigger('submit');});},initSortingSelects:function(){var sortOptions=$(".sortOptions");sortOptions.on("change",function(e){});},initBreadcrumbOverImage:function(){var $section1Slot=$('.page-articleListPage .yCmsContentSlot.section1');if($section1Slot.length&&$section1Slot.find('img').length>0){$section1Slot.addClass('filled');}
2053var $breadcrumb=$('.page-articleListPage .breadcrumb-row');if($breadcrumb.length){$breadcrumb.css('visibility','visible');}},bindTopicsInSlider:function(){if(HB.ArticleList.$topicSlider.length>0){var $topicLinks=HB.ArticleList.$topicSlider.find(".topic-link");$topicLinks.each(function(){$(this).on("click",function(e){$(this).find('form').submit();});});}},initTopicSlider:function(){if(HB.ArticleList.$topicSlider.length>0){HB.ArticleList.$topicSlider.slick({infinite:'true',waitForAnimate:'false',prevArrow:'<button id="nav-prev" type="button" class="slick-prev" aria-label="Previous slide"></button>',nextArrow:'<button id="nav-next" type="button" class="slick-next" aria-label="Next slide"></button>',slidesToScroll:1,swipe:false,variableWidth:true,initialSlide:-1,arrows:false,accessibility:true});HB.ArticleList.checkIfArrowsAreNeeded();}},fixVariableWidth:function(){var interval=setInterval(function(){if(HB.ArticleList.$topicSlider.hasClass('slick-initialized')){clearInterval(interval);var lastIndex=HB.ArticleList.$topicSlider.find('.slick-slide').last().data('slick-index');HB.ArticleList.$topicSlider.find('.slick-next').on('click touch',function(event){var currentSlideIndex=HB.ArticleList.$topicSlider.find('.slick-current').data('slick-index');if(window.innerWidth>820){if(lastIndex&&lastIndex>3&&currentSlideIndex==(lastIndex-2)){HB.ArticleList.onSlickNextAtTheAndOfTheSlide(event);}}else if(window.innerWidth>520){if(lastIndex&&lastIndex>2&&currentSlideIndex==(lastIndex-1)){HB.ArticleList.onSlickNextAtTheAndOfTheSlide(event);}}else{}});HB.ArticleList.$topicSlider.find('.slick-prev').on('click touch',function(event){var currentSlideIndex=HB.ArticleList.$topicSlider.find('.slick-current').data('slick-index');if(window.innerWidth>820){if(lastIndex&&lastIndex>3&&currentSlideIndex==(lastIndex-1)){HB.ArticleList.onSlickPrevAtTheBeginOfTheSlide(event,(lastIndex-3));}}else if(window.innerWidth>520){if(lastIndex&&lastIndex>2&&currentSlideIndex==(lastIndex-1)){HB.ArticleList.onSlickPrevAtTheBeginOfTheSlide(event,(lastIndex-2));}}else{}});}},50);},onSlickNextAtTheAndOfTheSlide:function(event){event.preventDefault();HB.ArticleList.$topicSlider[0].slick.slickGoTo(-1,true);},onSlickPrevAtTheBeginOfTheSlide:function(event,toIndex){event.preventDefault();HB.ArticleList.$topicSlider[0].slick.slickGoTo(parseInt(toIndex),true);},checkIfArrowsAreNeeded:function(){var interval=setInterval(function(){if(HB.ArticleList.$topicSlider.hasClass('slick-initialized')){clearInterval(interval);var lastIndex=HB.ArticleList.$topicSlider.find('.slick-slide').last().data('slick-index');if(window.innerWidth>780){if(lastIndex&&lastIndex>2){HB.ArticleList.showArrows();}else{HB.ArticleList.hideArrows();}}else if(window.innerWidth>520){if(lastIndex&&lastIndex>1){HB.ArticleList.showArrows();}else{HB.ArticleList.hideArrows();}}else{if(lastIndex&&lastIndex>0){HB.ArticleList.showArrows();}else{HB.ArticleList.hideArrows();}}}},50);},showArrows:function(){HB.ArticleList.$topicSlider.slick('slickSetOption',{swipe:true,arrows:true},true);HB.ArticleList.fixVariableWidth();},hideArrows:function(){HB.ArticleList.$topicSlider.slick('slickSetOption',{swipe:false,arrows:false},true);}};HB.ArticleDetails={debug:1,init:function(){HB.ArticleDetails.initSliderContentStream();HB.ArticleDetails.initSliderContentStreamZoom();HB.ArticleDetails.initSliderProducts();$(".js-content-product-slider").each(function(index){const $component=$(this);
2053const productCodes=$component.data("productcodes");const productSliderTitleSelector=$component.prev("h4.js-content-product-slider-title").data("productslidertitle");let productSliderTitle;if(productSliderTitleSelector){productSliderTitle=productSliderTitleSelector.split('title:')[1];}
2054HB.ArticleDetails.debug>0?console.log($component,productCodes):null;HB.ArticleDetails.getProductReferences($component,productCodes,productSliderTitle);});},initSliderContentStream:function(){var $contentSlider=$('.article-content .rowslider').addClass('expandable');if($contentSlider.length>0){$contentSlider.on('init',function(event,slick){function setUuid(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,c=>(c^crypto.getRandomValues(new Uint8Array(1))[0]&15>>c/4).toString(16));}
2055slick.$slider[0].setAttribute('data-uuid',setUuid());});$contentSlider.slick({lazyLoad:'progressive',infinite:true,waitForAnimate:false,prevArrow:'<button id="nav-prev" type="button" class="slick-prev" aria-label="Previous slide"></button>',nextArrow:'<button id="nav-next" type="button" class="slick-next" aria-label="Next slide"></button>',slidesToShow:3,slidesToScroll:1,swipe:true,variableWidth:false,isExpanded:false,isDragged:false,accessibility:true,respondTo:'window',responsive:[{breakpoint:901,settings:{slidesToShow:2}},{breakpoint:769,settings:{slidesToShow:1}}]});$contentSlider.on('beforeChange',function(event,slick){slick.$slider.slick('slickSetOption','isDragged',true);});$contentSlider.on('afterChange',function(event,slick){slick.$slider.slick('slickSetOption','isDragged',false);HB.ArticleDetails.initSliderContentStreamZoom();});}},initSliderContentStreamZoom:function(){const $closeButton=$('<button type="button" class="slick-minimize slick-next slick-arrow"><span aria-hidden="true">&times;</span></button>');document.querySelectorAll('.article-content .rowslider .slick-slide').forEach(sli
2055de=>{slide.addEventListener('click',(event)=>{const uuid=event.currentTarget.closest('.rowslider').dataset.uuid;const currSlider=$(`.rowslider[data-uuid="${uuid}"]`);if(currSlider.slick('slickGetOption','isExpanded')||currSlider.slick('slickGetOption','isDragged'))return;const clickedSlide=event.currentTarget.dataset.slickIndex||0;const before={responsive:currSlider.slick('slickGetOption','responsive'),slidesToShow:currSlider.slick('slickGetOption','slidesToShow')};currSlider.slick('slickGoTo',clickedSlide,true);currSlider.slick('slickSetOption',{"isExpanded":true,"slidesToShow":1},true);currSlider.prepend($closeButton);currSlider.find('.slick-minimize').on('click',(event)=>{const currSlideIndex=$(`.rowslider[data-uuid="${uuid}"] .slick-current`).data('slick-index')||0;currSlider.slick('slickGoTo',currSlideIndex,true);currSlider.slick('slickSetOption',{"isExpanded":false,"slidesToShow":before.slidesToShow},true);event.currentTarget.remove();})})})},getProductReferences:function($component,productCodes,productSliderTitle){HB.ProductReferences.debug>0?console.log("HB.ArticleDetails.getProductReferences, component: ",$component,productCodes):null;$.ajax({url:HB.config.siteUrl+'article/product-slider',type:'get',dataType:'json',data:{productCodes:productCodes},success:function(result){HB.ArticleDetails.debug>0?console.log("SUCCESS: "+$component+" - RESULT:",result):null;HB.ArticleDetails.onAjaxSuccess($component,result,productSliderTitle);},error:function(jqXHR,textStatus,errorThrown){HB.ArticleDetails.debug>0?console.log("ERROR: "+$component+" - RESULT: "+errorThrown):null;}});},onAjaxSuccess:function($component,result,productSliderTitle){if(result.count>0&&result.html!==""){$component.closest('.article-productslider-container').addClass('loaded');HB.ArticleDetails.debug>0?console.log($component):null;$component.html(result.html);HB.ListItem.bindQuantityInput($component);HB.ListItem.bindFormActions($component);HB.ListItem.bindStockPopovers($component);HB.ListItem.initStockInformation($component);HB.ProductReferences.fadeEachElement($component);let maxSlides=3;if(typeof result.isAutoplayCarousel!=='undefined'&&result.isAutoplayCarousel!==""){HB.ProductReferences.initSlider($component,result.isAutoplayCarousel,maxSlides);}else{HB.ProductReferences.initSlider($component,undefined,maxSlides);}
2056if($component.length){$component.removeClass("hidden");if(productSliderTitle){$component.prev("h4.js-content-product-slider-title").text(productSliderTitle);}}}else{$component.css('min-height','unset');$component.prev("h4.js-content-product-slider-title").hide();}},initSliderProducts:function(){var $productsSlider=$('.awsArticleDetailsContent .products-slider-wrapper');if($productsSlider.length>0){$productsSlider.slick({infinite:true,waitForAnimate:true,prevArrow:'<button id="nav-prev" type="button" class="slick-prev" aria-label="Previous slide"></button>',nextArrow:'<button id="nav-next" type="button" class="slick-next" aria-label="Next slide"></button>',slidesToShow:5,slidesToScroll:1,swipe:true,variableWidth:false,accessibility:true,responsive:[{breakpoint:1199,settings:{slidesToShow:4}},{breakpoint:969,settings:{slidesToShow:2}},{breakpoint:767,settings:{slidesToShow:2}}]});}
2057HB.SlickSlider.handleSliders();},onBreadcrumbForSearchPage:function(event){var url=window.location.href;if(url.length>0&&url.lastIndexOf('/')>0){var urlWithoutArticlePath=url.substring(0,url.lastIndexOf('/'));window.location.href=urlWithoutArticlePath;}}};HB.PopUpGallery={debug:0,readyForResize:true,$singleItem:null,$navItem:null,ratio:1,navImageBiggestHeight:0,init:function(){$('.js-popup-gallery-target').on("click",function(e){e.preventDefault();HB.PopUpGallery.prepare($(this));});},prepare:function(element){var $content=$(element).parents('.js-popup-gallery-origin').siblings('.js-popup-gallery-content');if($content.length>0){var index=$(element).data('slick-index');if(typeof index=="number"&&index>=0){HB.PopUpGallery.show($content,index);}else{HB.PopUpGallery.show($content,0);}}},show:function(content,index){var $gallery=$(content).clone(),modalHeader='<div class="modal-header clearfix row">'+'<div class="col-xs-10 col-sm-10"><h2>'+
2058$(content).data("headline")+'</h2></div><div class="col-xs-2 col-sm-2">'+'<button type="button" class="close" data-dismiss="modal" aria-label="'+
2059HB.translations.general.close+'"><i class="icon-close"></i></div></div>',modalContent='<div class="modal-body invisible"><div class="popup-gallery-single-slick">'+
2060$gallery.html()+'</div><div class="popup-gallery-nav-slick">'+
2061$gallery.html()+'</div></div>';HB.Utils.displayModalPopup(modalHeader+modalContent,'modal-xl popup-gallery');HB.PopUpGallery.$singleItem=$('.popup-gallery-single-slick');HB.PopUpGallery.$navItem=$('.popup-gallery-nav-slick');HB.PopUpGallery.$singleItem.slick({lazyLoad:'ondemand',slidesToShow:1,slidesToScroll:1,initialSlide:index,swipe:true,prevArrow:'<button id="single-prev" type="button" class="slick-prev"></button>',nextArrow:'<button id="single-next" type="button" class="slick-next"></button>',asNavFor:'.popup-gallery-nav-slick',accessibility:true});HB.PopUpGallery.$navItem.slick({lazyLoad:'ondemand',slidesToShow:3,slidesToScroll:1,initialSlide:index,swipe:true,prevArrow:'<button id="nav-prev" type="button" class="slick-prev" aria-label="Previous slide"></button>',nextArrow:'<button id="nav-next" type="button" class="slick-next" aria-label="Next slide"></button>',asNavFor:'.popup-gallery-single-slick',focusOnSelect:true,dots:true,accessibility:true});HB.PopUpGallery.$singleItem.on('setPosition',function(event,slick){HB.PopUpGallery.checkForResize();});HB.PopUpGallery.$navItem.on('setPosition',function(event,slick){HB.PopUpGallery.checkForResize();});HB.PopUpGallery.$singleItem.on('lazyLoaded',function(event,slick,image,imageSource){if(image&&image.closest('.slick-slide').length>0&&image.closest('.slick-slide').hasClass('slick-current')){var singleInterval=setInterval(function(){if(HB.PopUpGallery.checkForResize()){clearInterval(singleInterval);}},50);}});HB.PopUpGallery.$navItem.on('lazyLoaded',function(event,slick,image,imageSource){var navInterval=setInterval(function(){if(HB.PopUpGallery.checkForResize()){if(image&&image.closest('.slick-slide').outerHeight(true)>HB.PopUpGallery.navImageBiggestHeight){HB.PopUpGallery.navImageBiggestHeight=image.closest('.slick-slide').outerHeight(true);}
2062clearInterval(navInterval);}},50);});if(HB.track.trackPopUpGallery){HB.PopUpGallery.$singleItem.on('afterChange',function(event,slick,currentSlide,nextSlide){HB.PopUpGallery.debug?console.log("afterChange: ",event,"Slick: ",slick,"CurrentSlide: ",currentSlide,"nextSlide: ",nextSlide):null;HB.track.trackEvent('Galerieansicht',$(slick.$slides[currentSlide]).find("img").data("id"));});};HB.Utils.modal.on('shown.bs.modal',function(e){HB.track.trackEvent('Galerieansicht',HB.PopUpGallery.$singleItem.find(".slick-active img").data("id"));HB.PopUpGallery.$singleItem.slick('setPosition');HB.PopUpGallery.$navItem.slick('setPosition');$(".modal-body").removeClass("invisible");});HB.SlickSlider.handleSliders();},checkForResize:function(){if(HB.PopUpGallery.readyForResize){HB.PopUpGallery.resizePopup();return true;}else{return false;}},resizePopup:function(){HB.PopUpGallery.readyForResize=false;setTimeout(function(){var $modal=$('#hbModal');if(!$modal.find(".modal-dialog").hasClass("modal-xl")){$modal.find(".modal-dialog").removeClass("modal-xs").removeClass("modal-sm").removeClass("modal-md").removeClass("modal-lg").addClass("modal-xl");HB.PopUpGallery.$navItem.slick('setPosition');HB.PopUpGallery.$singleItem.slick('setPosition');}
2063while(($modal.find(".modal-header").outerHeight(true)+$modal.find(".modal-body").outerHeight(true))>($(window).height()-30)&&!$modal.find(".modal-xs").length>0){if(HB.PopUpGallery.debug){console.log("Resizing Popup to smaller version");console.log("Slider height: "+$modal.find(".modal-body").outerHeight(true));console.log("Window height: "+$(window).height());console.log("Ratio: "+($modal.find(".modal-header").outerHeight(true)+$modal.find(".modal-body").outerHeight(true))/$(window).height())
2064console.log("modal classList = ",$modal.find('.popup-gallery').attr('class'))}
2065$modal.find(".modal-sm").removeClass("modal-sm").addClass("modal-xs");$modal.find(".modal-md").removeClass("modal-md").addClass("modal-sm");$modal.find(".modal-lg").removeClass("modal-lg").addClass("modal-md");
2065$modal.find(".modal-xl").removeClass("modal-xl").addClass("modal-lg");HB.PopUpGallery.navImageBiggestHeight=0;HB.PopUpGallery.$navItem.slick('setPosition');HB.PopUpGallery.$singleItem.slick('setPosition');}
2066HB.PopUpGallery.readyForResize=true;},100);}};;HB.AddToCartPostMessagerListener={debug:0,init:function(){HB.AddToCartPostMessagerListener.bindPostMessageVue();HB.AddToCartPostMessagerListener.bindPostMessageGeneric();},bindPostMessageVue:function(){if($('configurator-vue').length){window.addEventListener("message",function(event){if(typeof event.data!=='undefined'&&event.data.toString().indexOf("configuratorVue")>=0){HB.AddToCartPostMessagerListener.extractProductsFromConfiguratorVueMessage(event.data);}},false);}},bindPostMessageGeneric:function(){window.addEventListener("message",function(event){if(typeof event.data!=='undefined'&&event.data.toString().indexOf("addProductsToCart")>=0){HB.AddToCartPostMessagerListener.extractProductsFromConfiguratorVueMessage(event.data);}},false);},extractProductsFromConfiguratorVueMessage:function(messageData){HB.Cart.debug>0?console.log("messageData",messageData):null;const data=JSON.parse(messageData);if(data&&typeof data.configuratorVue!=='undefined'){HB.AddToCartPostMessagerListener.parseProductsArrayToCartEntries(data.configuratorVue);}},extractProductsFromConfiguratorVueMessage:function(messageData){HB.Cart.debug>0?console.log("messageData",messageData):null;const data=JSON.parse(messageData);if(data&&typeof data.addProductsToCart!=='undefined'){HB.AddToCartPostMessagerListener.parseProductsArrayToCartEntries(data.addProductsToCart);}},parseProductsArrayToCartEntries:function(arrayProducts){if(typeof arrayProducts!=='undefined'&&arrayProducts!==null){let property=undefined;let products=undefined;let cartAttachmentDocumentsMedia;let cartAttachmentDocumentsPassword;if(Array.isArray(arrayProducts)){products=arrayProducts;}else if(typeof arrayProducts==='object'&&arrayProducts!==null&&Array.isArray(arrayProducts.products)){products=arrayProducts.products;property=arrayProducts.property;}
2067if(products!==undefined&&products.length>0){HB.Cart.debug>0?console.log("addToCartProductsFromArray",products):null;let cartEntriesData={cartEntries:[]};if(property!==undefined){cartEntriesData.property=property;}
2068if(arrayProducts.cartAttachmentDocumentsMedia!==undefined){cartEntriesData.cartAttachmentDocumentsMedia=arrayProducts.cartAttachmentDocumentsMedia;}
2069if(arrayProducts.cartAttachmentDocumentsPassword!==undefined){cartEntriesData.cartAttachmentDocumentsPassword=arrayProducts.cartAttachmentDocumentsPassword;}
2070$.each(products,function(index,value){if(value!==null&&typeof value.productNumber!=='undefined'&&typeof value.quantity!=='undefined'){const productNumber=value.productNumber;const productQty=value.quantity;const productUnit=typeof value.unit!=='undefined'?value.unit:null;HB.Cart.debug>0?console.log("product="+productNumber+", Qty="+productQty+", Unit="+productUnit):null;if(productNumber!==null&&productQty!==null){let entry={};entry['entryNumber']=index;entry['sku']=productNumber;entry['quantity']=productQty;cartEntriesData.cartEntries.push(entry);}}});if(cartEntriesData.cartEntries.length>0){HB.Cart.addCartEntriesToCartViaAjax(cartEntriesData);}}}}};HB.Message={onAjaxErrorInModal:function(jqXHR,textStatus){if(textStatus==='timeout'){$("#hbModal .modalContent").html("<div class='modal-header'>"+"<button class='close' aria-label='Close' data-dismiss='modal' type='button'>"+"<i class='icon-close'> </i>"+"</button><h1 class='details-heading'>"+
2071HB.translations.general.modalErrorHeadline+"</h1>"+"</div><div class='modal-body'>"+"<div id='globalMessages'>"+"<div class='alert negative'>"+"<div class='message-icon'><i class='icon-info'></i></div>"+"<span class='message'>"+
2072HB.translations.general.modalErrorTimeout+"</span>"+"</div>"+"</div>"+
2073HB.translations.general.modalErrorTimeoutHint+"</div>");}else{$("#hbModal .modalContent").html("<div class='modal-header'>"+"<button class='close' aria-label='Close' data-dismiss='modal' type='button'>"+"<i class='icon-close'> </i>"+"</button><h1 class='details-heading'>"+
2074HB.translations.general.modalErrorHeadline+"</h1>"+"</div><div class='modal-body'>"+"<div id='globalMessages'>"+"<div class='alert negative'>"+"<div class='message-icon'><i class='icon-info'></i></div>"+"<span class='message'>"+
2075HB.translations.general.modalError+"</span>"+"</div>"+"</div>"+
2076HB.translations.general.modalErrorHint+"</div>");}},onAjaxError:function(textStatus){if(textStatus==='timeout'){$("#globalMessages").html("<div class='alert negative'>"+"<div class='message-icon'>"+"<i class='icon-info'> </i>"+"</div>"+"<span class='message'>"+
2077HB.translations.general.modalErrorTimeout+"</span>
2077"+"<div class='pull-right gm-close-icon mrm'>"+"<i class='icon-close'></i>"+"</div>"+"</div>");}else{$("#globalMessages").html("<div class='alert negative'>"+"<div class='message-icon'>"+"<i class='icon-info'> </i>"+"</div>"+"<span class='message'>"+
2078HB.translations.general.modalError+"</span>"+"<div class='pull-right gm-close-icon mrm'>"+"<i class='icon-close'></i>"+"</div>"+"</div>");}},addGlobalMessageByGivenAjaxData:function(data,_isConfirmationMessage){if(data.globalMessagesHtml){$('#globalMessages').html(data.globalMessagesHtml);}
2079if(_isConfirmationMessage!=null&&_isConfirmationMessage){HB.Utils.fadeSuccessAlert();}
2080HB.Message.hideGlobalMessage();},removeGlobalMessage:function(){$('#globalMessages').html("");},hideGlobalMessage:function(){$('.alert .gm-close-icon').on('click',function(){$(this).parent().remove();});}};HB.SiteCockpit={debug:0,SITE_ADDRESSES:undefined,PAGINATION_ITEMS_PER_PAGE:10,init:()=>{HB.SiteCockpit.getAddressSelector();},getAddressSelector:()=>{const url=HB.config.url.siteCockpit.siteAddresses;if(typeof HB.MyAccount.DashboardCache==='undefined'){HB.MyAccount.DashboardCache=[];}
2081if(typeof HB.MyAccount.DashboardCache[url]==='undefined'){HB.MyAccount.showAccountContentLoader();$.ajax({type:'GET',url:url,dataType:'json',timeout:HB.config.ajax.timeout,success:(data)=>{HB.SiteCockpit.debug>0?console.log("ajax success",data):null;if(typeof data.html!=='undefined'){HB.SiteCockpit.SITE_ADDRESSES=data.addresses;$('.js-site-cockpit-container').html(data.html);HB.MyAccount.DashboardCache[url]=data.html;HB.SiteCockpit.bindAddressSelector();HB.SiteCockpit.bindChoosenForAddress();}},error:function(xhr,status,error){HB.SiteCockpit.debug>0?console.log("ajax error",xhr,status,error):null;HB.MyAccount.checkResponseToHardLogin(xhr);HB.MyAccount.onAccountContentAjaxError(status);},complete:function(){HB.MyAccount.hideAccountContentLoader();}});}else{$('.js-site-cockpit-container').html(HB.MyAccount.DashboardCache[url]);HB.SiteCockpit.bindAddressSelector();HB.SiteCockpit.bindChoosenForAddress();}},bindAddressSelector:()=>{$('#site-address-selector').on('change',(event)=>{HB.SiteCockpit.debug>0?console.log(`Selected address id: ${event.currentTarget.value}`):null;const url=`${HB.config.url.siteCockpit.siteAddresses}/${encodeURIComponent(event.currentTarget.value)}`;if(typeof HB.MyAccount.DashboardCache==='undefined'){HB.MyAccount.DashboardCache=[];}
2082if(typeof HB.MyAccount.DashboardCache[url]==='undefined'){HB.SiteCockpit.showAddressSelectLoader();$.ajax({type:'GET',url:url,dataType:'json',timeout:HB.config.ajax.timeout,success:(data)=>{HB.SiteCockpit.debug>0?console.log("ajax success",data):null;if(typeof data.html!=='undefined'){HB.SiteCockpit.destroyChoosenForAddress();$('#accountContent').hide();const $siteAddressSelector=$('#site-address-selector-wrapper');$('.js-site-cockpit-container').html(data.html);$('#site-address-selector-container').append($siteAddressSelector);HB.MyAccount.DashboardCache[url]=data.html;HB.SiteCockpit.onSiteAddressLoad();}},error:function(xhr,status,error){HB.SiteCockpit.debug>0?console.log("ajax error",xhr,status,error):null;HB.MyAccount.checkResponseToHardLogin(xhr);HB.MyAccount.onAccountContentAjaxError(status);},complete:function(){HB.SiteCockpit.hideAddressSelectLoader();}});}else{HB.SiteCockpit.destroyChoosenForAddress();$('#accountContent').hide();const $siteAddressSelector=$('#site-address-selector-wrapper');$('.js-site-cockpit-container').html(HB.MyAccount.DashboardCache[url]);$('#site-address-selector-container').append($siteAddressSelector);HB.SiteCockpit.onSiteAddressLoad();}});},bindProductsBuyAgain:()=>{$('.site-address__product-list .js-link-buy-again').on('click',HB.SiteCockpit.onProductBuyAgain);},bindArticleSearch:()=>{$('#article-search-selector-wrapper select').on('change',HB.SiteCockpit.onChangeSearch);$('#article-search-selector-wrapper .btn-cancel').on('click touch',HB.SiteCockpit.onBtnCancel);},bindArticleSort:()=>{$('#tab-products .site-articles__sort').on('change',(event)=>{HB.SiteCockpit.onChangeSort(event);});},bindChoosenForArticleSearch:()=>{$('#article-search-selector-wrapper select').select2({width:"100%",});$('#article-search-selector-wrapper select').css('display','none');},bindChoosenForAddress:()=>{$('#site-address-selector-wrapper select').select2({width:"100%",});$('#site-address-selector-wrapper select').css('display','none');},bindPaginationBar:(paginationWrapper)=>{if(paginationWrapper.length){paginationWrapper.find('.js-input-page').on('blur',HB.SiteCockpit.onPageSwitchInput);paginationWrapper.find('.js-input-page').on('keypress',HB.SiteCockpit.onPageSwitchInput);paginationWrapper.find('.js-btn-page').on('click',HB.SiteCockpit.onPageSwitchClick);}},bindProductDataSheet:()=>{$('.js-link-product-data-sheet').on('click',HB.SiteCockpit.onProductDataSheet);},bindQtyInputForPriceUpdate:(randomElementWithinArticleItem)=>{if(randomElementWithinArticleItem&&randomElementWithinArticleItem.length){const $qtyInput
2082=randomElementWithinArticleItem.closest('.list-item').find('.js-quantity-input');const $totalPriceTheChosenPrice=randomElementWithinArticleItem.closest('.list-item').find('.product-total-price .'+HB.LivePrice.cssClassTheChosenPrice);if($qtyInput.length&&$totalPriceTheChosenPrice.length&&typeof $totalPriceTheChosenPrice.data('price')!=='undefined'){$qtyInput.on('change',HB.SiteCockpit.onQtyInputForPriceUpdate);}}
2083return false;},bindDocumentTab:()=>{$('#tab-link-documents').on('click',HB.SiteCockpit.onDocumentTab);},bindPaginationBarDocumentList:function()
2084{var $documentListContainer=$('.site-address__document-container');$documentListContainer.find('.js-input-page').on('blur keypress',HB.SiteCockpit.onDocumentPageSwitchInput);$documentListContainer.find('.js-btn-page-prev').on('click',HB.SiteCockpit.onDocumentPageSwitchClick);$documentListContainer.find('.js-btn-page-next').on('click',HB.SiteCockpit.onDocumentPageSwitchClick);},bindCsvDownload:()=>{$('#btn-site-cockpit-export').on('click',HB.SiteCockpit.onCsvDownload);},onSiteAddressLoad:()=>{HB.SiteCockpit.bindArticleSort();HB.SiteCockpit.setInitialSortOptions($('#product-sort'));$('#accountContent').show();HB.SiteCockpit.bindAddressSelector();HB.SiteCockpit.bindChoosenForAddress();HB.SiteCockpit.bindChoosenForArticleSearch();HB.Tabs.init();HB.ListItem.init();HB.SiteCockpit.bindProductsBuyAgain();HB.SiteCockpit.initPaginationBar($('#tab-products .js-pagination'));HB.SiteCockpit.bindArticleSearch();HB.SiteCockpit.bindProductDataSheet();HB.SiteCockpit.bindDocumentTab();HB.SiteCockpit.bindCsvDownload();},onProductBuyAgain:(event)=>{const $elementClicked=$(event.currentTarget);const $articleListItemWrapper=$elementClicked.closest('.js-site-article-item');if($articleListItemWrapper.length){const $linkProductBuyAgain=$articleListItemWrapper.find('.js-link-buy-again');const $panelProductBuyAgain=$articleListItemWrapper.find('.js-buy-again-panel');if($linkProductBuyAgain.length&&$panelProductBuyAgain.length){if($linkProductBuyAgain.hasClass('closed')){$linkProductBuyAgain.removeClass('closed');HB.SiteCockpit.openPanelProductBuyAgain($panelProductBuyAgain);HB.SiteCockpit.handlePriceDisplay($linkProductBuyAgain);}else{$linkProductBuyAgain.addClass('closed');HB.SiteCockpit.closePanelProductBuyAgain($panelProductBuyAgain);}}}},onPageSwitchClick:(event)=>{const $button=$(event.currentTarget);const rel=$button.attr('rel');if(rel&&rel!==''){HB.SiteCockpit.changePageNumber(rel,$button);}},onPageSwitchInput:(event)=>{const $input=$(event.currentTarget);if($input.val()!=$input.data('value')){if(typeof event.keyCode==='undefined'||event.keyCode===13){HB.SiteCockpit.changePageNumber($input.val(),$input)}}},onDocumentPageSwitchClick:(event)=>{const $button=$(event.currentTarget);let url=$button.data('url');HB.SiteCockpit.getAjaxDocumentContent(url);},onDocumentPageSwitchInput:(event)=>{const $input=$(event.currentTarget);if($input.val()!=$input.data('value')){if(typeof event.keyCode==='undefined'||event.keyCode===13){let url=$input.data('url')+'&'+$input.data('param')+'='+$input.val();HB.SiteCockpit.getAjaxDocumentContent(url);}}},onChangeSearch:(event)=>{const selectedOptionValue=$(event.currentTarget).find("option:selected").attr('value');if(selectedOptionValue&&selectedOptionValue!==null){HB.SiteCockpit.showOnlyOneListItemById(selectedOptionValue,$(event.currentTarget),true);}},onBtnCancel:()=>{const $listItem=$(event.currentTarget).closest('.tab-content').find('.list-item:visible');if($listItem.length){const $linkBuyAgain=$listItem.find('.js-link-buy-again');if($linkBuyAgain.length&&!$linkBuyAgain.hasClass('closed')){$linkBuyAgain.click();}}
2085const $select=$(event.currentTarget).closest('#article-search-selector-wrapper').find('select');HB.SiteCockpit.showAllListItems($select);HB.SiteCockpit.showSortOptions($select);HB.SiteCockpit.showPagination($select);$select.select2('destroy');$select.prop("selectedIndex",-1);HB.SiteCockpit.bindChoosenForArticleSearch();},onChangeSort:(event)=>{const selectedOptionValue=$(event.currentTarget).find("option:selected").attr('value');let isSortingSuccessful=false;if(selectedOptionValue&&selectedOptionValue!==null){if(selectedOptionValue==='id'){isSortingSuccessful=HB.SiteCockpit.sortListItems($(event.currentTarget),'id',false,false);}else if(selectedOptionValue==='name-asc'){isSortingSuccessful=HB.SiteCockpit.sortListItems($(event.currentTarget),'name',false,false);}else if(selectedOptionValue==='name-desc'){isSortingSuccessful=HB.SiteCockpit.sortListItems($(event.currentTarget),'name',false,true);}else if(selectedOptionValue==='price-asc'){isSortingSuccessful=HB.SiteCockpit.sortListItems($(event.currentTarget),'price',true,false);}else if(selectedOptionValue==='price-desc'){isSortingSuccessful=HB.SiteCockpit.sortListItems($(event.currentTarget),'price',true,true);}
2086if(isSortingSuccessful){HB.SiteCockpit.changePageNumber(1,$(event.currentTarget));}}},onProductDataSheet:(event)=>{const url=$(event.currentTarget).data('href');
2086if(url){HB.SiteCockpit.showDataSheetLoader($(event.currentTarget));$.ajax({type:'GET',url:url,timeout:HB.config.ajax.timeout,xhrFields:{responseType:'blob'},success:(data)=>{HB.SiteCockpit.debug>0?console.log("ajax success",data):null;const articleId=HB.SiteCockpit.getArticleId($(event.currentTarget));const filename=HB.translations.siteCockpit.dataSheetFileName+(articleId?'_'+articleId+'.zip':'.zip');const link=document.createElement('a');document.body.appendChild(link);link.href=window.URL.createObjectURL(data);link.download=filename;link.click();},error:function(xhr,status,error){HB.SiteCockpit.debug>0?console.log("ajax error",xhr,status,error):null;HB.MyAccount.checkResponseToHardLogin(xhr);HB.MyAccount.onAccountContentAjaxError(status);},complete:function(){HB.SiteCockpit.hideDataSheetLoader($(event.currentTarget));}});}},onQtyInputForPriceUpdate:(event)=>{const qtyInputValue=$(event.currentTarget).val();if(qtyInputValue!=''){HB.SiteCockpit.updateTotalPriceByQuantity(qtyInputValue,$(event.currentTarget))}},onDocumentTab:()=>{const $tabContentDocumentsContainer=$('#tab-documents');if($tabContentDocumentsContainer.length){const dataUrl=$tabContentDocumentsContainer.data('url');HB.SiteCockpit.getAjaxDocumentContent(dataUrl);}},onDocumentContentLoad:()=>{const $documentContainer=$('.site-address__document-container');HB.SiteCockpit.cloneDocumentPagination();HB.Documents.init();HB.SiteCockpit.bindPaginationBarDocumentList();$documentContainer.find('#documentTypes').on('change',HB.SiteCockpit.onDocumentTypes);$documentContainer.find('.js-document-details').on('click',HB.MyAccount.onDocumentDetailsLoadClick);},onDocumentTypes:(event)=>{const $form=$(event.currentTarget).closest('form');const url=$form.attr('action')+'&'+$form.serialize();HB.SiteCockpit.getAjaxDocumentContent(url);},onCsvDownload:()=>{const $listItems=$('#siteArticlesResultsList .list-item');let csvContent='Artikelnummer,Name,Anzahl,Mengeneinheit,Preis\n';if($listItems.length){Object.values($listItems).forEach((item)=>{let id=$(item).data('id');let name=$(item).data('name');let amount=$(item).data('amount');let price=$(item).data('formattedprice');let unit=$(item).data('unit');if(id){let row=id+',"'+name+'",'+amount+','+unit+',"'+price+'"';csvContent+=row+'\n';}});}
2087const hiddenElement=document.createElement('a');const universalBOM="\uFEFF";hiddenElement.href='data:text/csv;charset=utf-8,'+encodeURIComponent(universalBOM+csvContent);hiddenElement.target='_blank';let fileName='baustelle.csv';const addressId=HB.SiteCockpit.getIdOfTheSelectedAddress();if(addressId){fileName='baustelle_'+addressId+'.csv';}
2088hiddenElement.download=fileName;hiddenElement.click();},destroyChoosenForAddress:()=>{$('#site-address-selector-wrapper select').select2("destroy");},getIdOfTheSelectedAddress:()=>{const selectedOptionValue=$('#site-address-selector').find("option:selected").attr('value');if(selectedOptionValue){return selectedOptionValue;}
2089return false;},showAddressSelectLoader:function(){if($('.address-select-loader__container').length){$('.address-select-loader__container').removeClass('hidden');}},hideAddressSelectLoader:function(){if($('.address-select-loader__container').length){$('.address-select-loader__container').addClass('hidden');}},showOnlyOneListItemById:(id,$randomElementWithinTabContent,isProductBuyAgainPanelOpen)=>{if(id&&$randomElementWithinTabContent&&$randomElementWithinTabContent.length){const $listItem=$randomElementWithinTabContent.closest('.tab-content').find('.results-list  .list-item[data-id="'+id+'"]');if($listItem.length&&$listItem.hasClass('list-item')){HB.SiteCockpit.hideAllListItems($randomElementWithinTabContent);HB.SiteCockpit.hidePagination($randomElementWithinTabContent,false);HB.SiteCockpit.hideSortOptions($randomElementWithinTabContent);$listItem.show();if(typeof isProductBuyAgainPanelOpen!=='undefined'&&isProductBuyAgainPanelOpen){const $linkBuyAgain=$listItem.find('.js-link-buy-again');if($linkBuyAgain.length&&$linkBuyAgain.hasClass('closed')){$linkBuyAgain.click();}}}}},showAllListItems:($randomElementWithinTabContent)=>{if($randomElementWithinTabContent&&$randomElementWithinTabContent.length){const $listItems=$randomElementWithinTabContent.closest('.tab-content').find('.results-list  .list-item');
2089if($listItems.length){$listItems.removeAttr("style");}}},hideAllListItems:($randomElementWithinTabContent)=>{if($randomElementWithinTabContent&&$randomElementWithinTabContent.length){const $listItems=$randomElementWithinTabContent.closest('.tab-content').find('.results-list  .list-item');if($listItems.length){$listItems.hide();}}},showSortOptions:($randomElementWithinTabContent)=>{if($randomElementWithinTabContent&&$randomElementWithinTabContent.length){const $sortOptions=$randomElementWithinTabContent.closest('.tab-content').find('.site-address__filter-sort');if($sortOptions.length){$sortOptions.show();}}},hideSortOptions:($randomElementWithinTabContent)=>{if($randomElementWithinTabContent&&$randomElementWithinTabContent.length){const $sortOptions=$randomElementWithinTabContent.closest('.tab-content').find('.site-address__filter-sort');if($sortOptions.length){$sortOptions.hide();}}},sortListItems:(randomElementWithinTabContent,dataAttributeName,isSortByNumber,isDescending)=>{if(randomElementWithinTabContent&&randomElementWithinTabContent.length&&dataAttributeName){if(HB.SiteCockpit.debug>0){console.log("sortListItems -> randomElementWithinTabContent",randomElementWithinTabContent);console.log("sortListItems -> dataAttributeName="+dataAttributeName);console.log("sortListItems -> isSortByNumber="+isSortByNumber);console.log("sortListItems -> isDescending="+isDescending);}
2090const $listContainer=randomElementWithinTabContent.closest('.tab-content').find('.results-list ');if($listContainer.length){$listContainer.find('.list-item').sort(function(a,b){if($(a).data(dataAttributeName)&&$(b).data(dataAttributeName)){if(isSortByNumber&&!isNaN(parseFloat($(a).data(dataAttributeName)))&&!isNaN(parseFloat($(b).data(dataAttributeName)))){if(isDescending){return($(b).data(dataAttributeName)-$(a).data(dataAttributeName));}else{return $(a).data(dataAttributeName)-$(b).data(dataAttributeName);}}else{const an=$(a).data(dataAttributeName).toString().toLowerCase(),bn=$(b).data(dataAttributeName).toString().toLowerCase(),pos=isDescending?-1:1,neg=isDescending?1:-1;if(an>bn){return pos;}
2091if(an<bn){return neg;}
2092return 0;}}else{return false;}}).appendTo($listContainer);return true;}}
2093return false;},setInitialSortOptions:(randomElementWithinTabContent)=>{if(randomElementWithinTabContent&&randomElementWithinTabContent.length){const $sortOptionSelect=randomElementWithinTabContent.closest('.tab-content').find('.site-address__filter-sort select');if($sortOptionSelect.length){$sortOptionSelect.change();}}},openPanelProductBuyAgain:(panelProductBuyAgain)=>{if(panelProductBuyAgain){panelProductBuyAgain.fadeIn(300);}},closePanelProductBuyAgain:(panelProductBuyAgain)=>{if(panelProductBuyAgain){panelProductBuyAgain.fadeOut(300);}},handlePriceDisplay:(randomElementWithinArticleItem)=>{if(randomElementWithinArticleItem&&randomElementWithinArticleItem.length){const articleId=HB.SiteCockpit.getArticleId(randomElementWithinArticleItem);if(articleId){const idSuffix='_'+articleId;HB.LivePrice.init(idSuffix,articleId,true).done(function(){HB.LivePrice.debug?console.log("HB.LivePrice.init is done!"):null;});}}},getArticleId:(randomElementWithinArticleItem)=>{if(randomElementWithinArticleItem&&randomElementWithinArticleItem.length){const id=randomElementWithinArticleItem.closest('.list-item').data('id');if(id){return id;}}
2094return false;},copyItemPriceToTotalPrice:(randomElementWithinArticleItem)=>{if(randomElementWithinArticleItem&&randomElementWithinArticleItem.length){const $theChosenPriceContainer=randomElementWithinArticleItem.closest('.list-item').find('.product-item-price .the-chosen-price');const $totalPriceContainer=randomElementWithinArticleItem.closest('.list-item').find('.product-total-price');if($theChosenPriceContainer.length&&$totalPriceContainer.length){$totalPriceContainer.html($theChosenPriceContainer.clone());}}},updateTotalPriceByQuantity:(qty,randomElementWithinArticleItem)=>{if(qty&&randomElementWithinArticleItem&&randomElementWithinArticleItem.length){const $totalPriceTheChosenPrice=randomElementWithinArticleItem.closest('.list-item').find('.product-total-price .'+HB.LivePrice.cssClassTheChosenPrice);if($totalPriceTheChosenPrice.length){const price=$totalPriceTheChosenPrice.data('price');if(typeof price!=='undefined'&&!isNaN(parseFloat(price))&&!isNaN(parseFloat(qty))){let newPrice=(parseFloat(price)*parseFloat(qty)).toFixed(2);if(newPrice>0.00){const totalPriceText=$totalPriceTheChosenPrice.text();if(totalPriceText&&totalPriceText.indexOf('€')>0){let subString=totalPriceText.substring(totalPriceText.indexOf('€'));newPrice=newPrice.replace(',','');
2094newPrice=newPrice.replace('.',',');$totalPriceTheChosenPrice.text(newPrice+' '+subString);}}}}}},showDataSheetLoader:(randomElementWithinArticleItem)=>{if(randomElementWithinArticleItem&&randomElementWithinArticleItem.length){const $dataSheetLoader=randomElementWithinArticleItem.closest('.list-item').find('.data-sheet-loader');if($dataSheetLoader.length){$dataSheetLoader.removeClass('hidden');}}},hideDataSheetLoader:(randomElementWithinArticleItem)=>{if(randomElementWithinArticleItem&&randomElementWithinArticleItem.length){const $dataSheetLoader=randomElementWithinArticleItem.closest('.list-item').find('.data-sheet-loader');if($dataSheetLoader.length){$dataSheetLoader.addClass('hidden');}}},getAjaxDocumentContent:(url)=>{let paramPrefix=url.indexOf("?")===-1?'?':'&'
2095url+=paramPrefix+'isSiteCockpit=true';url=HB.SiteCockpit.removeDateParams(url);HB.SiteCockpit.debug>0?console.log("getAjaxDocumentContent given url",url):null;$(".site-address__document-container").empty();HB.Message.removeGlobalMessage();const $documentContainer=$('.site-address__document-container');if(url&&typeof url==='string'){if(url.indexOf("siteID")===-1){const addressId=HB.SiteCockpit.getIdOfTheSelectedAddress();if(addressId){const encodedAddressId=encodeURIComponent(addressId);if(url.indexOf("?")===-1){url=url+'?siteID='+encodedAddressId;}else{url=url+'&siteID='+encodedAddressId}}
2096HB.SiteCockpit.debug>0?console.log("getAjaxDocumentContent extended url with siteID",url):null;}
2097if(typeof HB.MyAccount.DashboardCache==='undefined'){HB.MyAccount.DashboardCache=[];}
2098if(typeof HB.MyAccount.DashboardCache[url]==='undefined'){HB.MyAccount.showAccountContentLoader();$.ajax({type:'GET',url:url,dataType:'json',timeout:HB.config.ajax.timeout,success:(data)=>{HB.SiteCockpit.debug>0?console.log("ajax success",data):null;if(typeof data.html!=='undefined'){$documentContainer.html(data.html);HB.MyAccount.DashboardCache[url]=data.html;HB.SiteCockpit.onDocumentContentLoad();}},error:function(xhr,status,error){HB.SiteCockpit.debug>0?console.log("ajax error",xhr,status,error):null;HB.MyAccount.checkResponseToHardLogin(xhr);HB.MyAccount.onAccountContentAjaxError(status);},complete:function(){HB.MyAccount.hideAccountContentLoader();}});}else{$documentContainer.html(HB.MyAccount.DashboardCache[url]);HB.SiteCockpit.onDocumentContentLoad();}}},cloneDocumentPagination:()=>{const $documents=$('.site-address__document-container').find('.documents');if($documents.length&&$documents.find('.account-pagination').length){const $originalPagination=$documents.find('.account-pagination');const $clone=$originalPagination.clone();$clone.find('[id^="page-size-form"]').attr('id',function(i,oldId){return oldId+'-clone';});$clone.find('[id^="select-"]').attr('id',function(i,oldId){return oldId+'-clone';});$documents.append($clone);}},showPagination:($randomElementWithinTabContent,isImportant)=>{if($randomElementWithinTabContent&&$randomElementWithinTabContent.length){const $paginationContainer=$randomElementWithinTabContent.closest('.tab-content').find('.site-address__filter-pages');if($paginationContainer.length){if(isImportant){$paginationContainer.removeClass('hidden');}else{$paginationContainer.show();}}}},hidePagination:($randomElementWithinTabContent,isImportant)=>{if($randomElementWithinTabContent&&$randomElementWithinTabContent.length){const $paginationContainer=$randomElementWithinTabContent.closest('.tab-content').find('.site-address__filter-pages');if($paginationContainer.length){if(isImportant){$paginationContainer.addClass('hidden');}else{$paginationContainer.hide();}}}},initPaginationBar:(paginationWrapper)=>{if(paginationWrapper.length){const listItemsLength=paginationWrapper.closest('.tab-content').find('.results-list  .list-item').length;if(listItemsLength&&listItemsLength>HB.SiteCockpit.PAGINATION_ITEMS_PER_PAGE){const allPaginationsWrapper=paginationWrapper.closest('.tab-content').find('.filter-pagination-wrapper');if(allPaginationsWrapper.length){const maxPageNumber=Math.ceil(listItemsLength/HB.SiteCockpit.PAGINATION_ITEMS_PER_PAGE);allPaginationsWrapper.find('.last .number--next').text(maxPageNumber);allPaginationsWrapper.show();HB.SiteCockpit.bindPaginationBar(paginationWrapper);}}else{}}},changePageNumber:(pageNumber,randomElementWithinTabContent)=>{let newPageNumber;const currentPageNumber=parseInt(randomElementWithinTabContent.closest('.tab-content').find('.js-input-page').first().data('value'));const maxPageNumber=randomElementWithinTabContent.closest('.tab-content').find('.number--next').first().text();if(pageNumber==='first'){newPageNumber=1;}else if(pageNumber==='next'){newPageNumber=currentPageNumber+1;}else if(pageNumber==='prev'){newPageNumber=currentPageNumber-1;}else if(pageNumber==='last'){newPageNumber=parseInt(maxPageNumber);}else{newPageNumber=parseInt(pageNumber);}
2099if(!isNaN(newPageNumber)){newPageNumber=parseInt(newPageNumber);if(newPageNumber!==currentPageNumber&&newPageNumber<=maxPageNumber&&newPageNumber>=1){HB.SiteCockpit.setAllPaginationByNumber(newPageNumber,randomElementWithinTabContent);}}},setAllPaginationByNumber:(toThePageNumber,randomElementWithinTabContent)=>{const $paginations=randomElementWithinTabContent.closest('.tab-content').find('.filter-pagination-wrapper');const $buttonsFirstAndPrev=$paginations.find('li.first, li.prev');const $inputCurrentPage=$paginations.find('.js-input-page');const $buttonsNextAndLast=$paginations.find('li.next, li.last');const maxPageNumber=$paginations.find('.number--next').first().text();if(maxPageNumber==1){if($paginations.length){HB.SiteCockpit.hidePagination($paginations.first(),true);}}else if(toThePageNumber==1){$buttonsFirstAndPrev.hide();$buttonsNextAndLast.show();}else if(toThePageNumber==maxPageNumber){$buttonsNextAndLast.hide();$buttonsFirstAndPrev.show();}else{$buttonsFirstAndPrev.show();$buttonsNextAndLast.show();}
2100$paginations.find('.js-input-page').val(toThePageNumber);$paginations.find('.js-input-page').data('value',toThePageNumber);HB.SiteCockpit.changeCssClassForPagination(toThePageNumber,randomElementWithinTabContent);},changeCssClassForPagination:(pageNumber,randomElementWithinTabContent)=>{const $resultsList=randomElementWithinTabContent.closest('.tab-content').find('.results-list ');if($resultsList.length){const classList=$resultsList.attr('class').split(' ');$.each(classList,function(id,item){if(item.indexOf('js-paging-')==0)$resultsList.removeClass(item);});const cssClassName="js-paging-"+pageNumber;$resultsList.addClass(cssClassName);}},removeDateParams:function(url){const paramsRegex=/([&?])(fromDate|toDate)=[^&]*/g;let cleanedUrl=url.replace(paramsRegex,(match,parameterPrefix)=>parameterPrefix=='?'?'?':'');cleanedUrl=cleanedUrl.replace(/[?&]$/,'');return cleanedUrl;}};HB.Registration={debug:0,additionalFormElementsToValidate:[],$guestCheckoutForm:$('#guestCheckoutForm'),$registrationRequestCheckbox:$('#registrationrequest'),cssClassMandatoryFormElement:"required-field",htmlSpanMandatory:'<span class="mandatory"><span class="skip">
2100'+HB.translations.general.mandatoryInputLabel+'</span></span>',init:()=>{if(HB.Registration.$registrationRequestCheckbox.length){HB.Registration.handleRegistrationRequestCheckbox();}else{HB.Registration.setAdditionalMandatoryFields();HB.Registration.setAutocompleteClasses();}
2101HB.Registration.bindFormValidation();let input=$('.js-postcode');HB.postcodeSuggest.inputSelect(input);},handleRegistrationRequestCheckbox:()=>{HB.Registration.$registrationRequestCheckbox.on('change',HB.Registration.onRegistrationRequest);HB.Registration.$registrationRequestCheckbox.change();},setAdditionalMandatoryFields:()=>{if(HB.Registration.additionalFormElementsToValidate.length){HB.Registration.additionalFormElementsToValidate.forEach(arrayElement=>HB.Registration.setFieldAsMandatory(arrayElement));}},setAutocompleteClasses:()=>{$('#postalcode').addClass('js-postcode');$('#location').addClass('js-town');let input=$('.js-postcode');HB.postcodeSuggest.inputSelect(input);},setFieldAsMandatory:(id)=>{if(id&&id!==''&&HB.Registration.$guestCheckoutForm.length){const $formElement=HB.Registration.$guestCheckoutForm.find('#'+id);if($formElement.length){const $formElementWrapper=$formElement.closest('.form-group');$(HB.Registration.htmlSpanMandatory).appendTo($formElementWrapper.find('label'));$formElement.addClass(HB.Registration.cssClassMandatoryFormElement);}}},removeAdditionalMandatoryFields:()=>{if(HB.Registration.additionalFormElementsToValidate.length){HB.Registration.additionalFormElementsToValidate.forEach(arrayElement=>HB.Registration.removeFieldAsMandatory(arrayElement));}},removeFieldAsMandatory:(id)=>{if(id&&id!==''&&HB.Registration.$guestCheckoutForm.length){const $formElement=HB.Registration.$guestCheckoutForm.find('#'+id);if($formElement.length){const $formElementWrapper=$formElement.closest('.form-group');$formElementWrapper.find('label .mandatory').remove();$formElement.removeClass(HB.Registration.cssClassMandatoryFormElement);}}},bindFormValidation:()=>{HB.Registration.$guestCheckoutForm.find('button[type="submit"]:not(".hidden")').on('click',HB.Registration.onSubmit);},onRegistrationRequest:(event)=>{HB.SiteCockpit.debug>0?console.log("onRegistrationRequest event",event):null;const $input=$(event.currentTarget);if($input.prop('checked')){HB.Registration.setAdditionalMandatoryFields();}else{HB.Registration.removeAdditionalMandatoryFields();}},onSubmit:(event)=>{HB.SiteCockpit.debug>0?console.log("onSubmit event",event):null;event.preventDefault();HB.FormValidation.initConditional(HB.Registration.$guestCheckoutForm);if(HB.FormValidation.checkRequiredFields()){HB.Registration.$guestCheckoutForm.submit();}}};;HB.Highlight={debug:0,cname:'highlight',highlightEl:{'#link-login span':{title:'Anmelden',content:'Melden Sie sich hier mit Ihrem Kundenaccount an.'},'.js-location-highlight':{title:'Standortauswahl',content:'Wählen Sie hier den Standort der Filiale.'},},highlightValue:[],init:function(){if(HB.Core.isUCConsentOrComfort('wJKfE6gul')===true&&(!HB.RoleSelection.roleSelectPending())){HB.Highlight.bindCheckCookie();HB.Highlight.closeNearestPopover();}},bindCheckCookie:function(){if(HB.CookieSettings.getCookieByName(HB.Highlight.cname).length){HB.Highlight.highlightValue=HB.CookieSettings.getCookieByName(HB.Highlight.cname).split('|');HB.Highlight.debug?console.log(HB.Highlight.highlightValue):null;}
2102HB.Highlight.elementHighlight();},setHighlightCookie:function(name,value){var maxAge=';max-age='+HB.config.cookieMaxAge;var path=HB.config.siteUrl;if(path!=null&&path.length>1&&path.startsWith('/')&&path.endsWith('/')){path=path.slice(0,-1);}
2103document.cookie=encodeURIComponent(name)+"="+encodeURIComponent(value)+maxAge+"; path="+path;},closeNearestPopover:function(){$(".popover-highlight").on("click",".pop-close",function(e){e.stopPropagation();e.preventDefault();$(e.target).closest('.popover-highlight').popover('hide');let closedEl=$(e.target).closest('.popover-highlight').data('id');$(closedEl).find(".animate").remove();HB.Highlight.highlightValue.push(closedEl);HB.Highlight.setHighlightCookie(HB.Highlight.cname,HB.Highlight.highlightValue.join('|'));})},elementHighlight:function(){for(var el in HB.Highlight.highlightEl){var $el=$(el);if(el.length!==0&&(HB.Highlight.highlightValue.indexOf(el)<0)&&($el.css('display')!=='none')&&($el.css('visibility')!=='hidden')){let highlightWidth=($el.innerWidth()/2)-20;$el.html($el.html()+'<i class="animate" style="right:'+highlightWidth+'px"></i>');$el.popover({template:'<div class="popover popover-highlight" data-id="'+el+'" role="tooltip"><div class="arrow"></div><a type="button" class="pop-close" data-dismiss="popover" style="margin-left:20px;
2103display:block;float:right;cursor:pointer;"><i id="pop-cancel" class="icon-cancel" style="font-size:11px;"></i></a><h3 id="pop-title" class="popover-title"></h3><div id="pop-body" class="popover-content"></div></div>',html:true,sanitize:false,animation:true,placement:"bottom",title:HB.Highlight.highlightEl[el].title,content:HB.Highlight.highlightEl[el].content,}).popover('show');HB.Highlight.debug?console.log(HB.Highlight.highlightEl[el.title],HB.Highlight.highlightEl[el.content]):null;}};$('body').on('click touchend',function(e){$('.popover-highlight').each(function(){if(!$(this).is(e.target)&&$(this).has(e.target).length===0&&($('.popover-highlight').has(e.target).length===0)){HB.Highlight.removeHighlight();}})});setTimeout(function(){$('.popover-highlight').popover('hide');HB.Highlight.removeHighlight();},30000);},removeHighlight:function(){for(let el in HB.Highlight.highlightEl){let foundEl=$(document).find(el);if((foundEl.length!==0)&&(foundEl.find(".animate").length>0)){foundEl.find(".animate").remove();HB.Highlight.highlightValue.push(el);}}
2104$('.popover-highlight').popover('hide');HB.Highlight.setHighlightCookie(HB.Highlight.cname,HB.Highlight.highlightValue.join('|'));},};;HB.HagebauVideoComponent={debug:0,videoComponents:$('.videoComponent'),ytTemplate:'<iframe class="youtubeplayer" type="text/html" frameborder="0" allowfullscreen allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"></iframe>',vmTemplate:'<iframe class="vimeoplayer" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>',s3Template:'<iframe class="s3player" frameborder="0" allow="autoplay; encrypted-media;" allowfullscreen></iframe>',init:function(){if(HB.config.usercentricsApiKey!==''){HB.HagebauVideoComponent.videoComponents.each(function(i){HB.HagebauVideoComponent.displayVideo(i);});}
2105else if(HB.Core.isComfort()===true&&(!HB.RoleSelection.roleSelectPending())){HB.HagebauVideoComponent.videoComponents.each(function(i){HB.HagebauVideoComponent.displayVideo(i);});}else{HB.HagebauVideoComponent.videoComponents.each(function(i){HB.HagebauVideoComponent.videoBlock(i);});}},displayVideo:function(i){let provider=HB.HagebauVideoComponent.videoComponents.eq(i).data('provider');let videoCode=HB.HagebauVideoComponent.videoComponents.eq(i).data('url');let altText=HB.HagebauVideoComponent.videoComponents.eq(i).data('alttext');let autoplay=HB.HagebauVideoComponent.videoComponents.eq(i).data('autoplay');let title=HB.HagebauVideoComponent.videoComponents.eq(i).data('title');let name=HB.HagebauVideoComponent.videoComponents.eq(i).data('name');let videoTitle=title||altText||name;HB.HagebauVideoComponent.debug?console.log(autoplay,videoCode,provider,title,altText,name):null;switch(provider){case'YOUTUBE':HB.HagebauVideoComponent.videoComponents.eq(i).append(HB.HagebauVideoComponent.ytTemplate).children();$('.youtubeplayer').eq(i).attr({id:'ytplayer'+videoCode,src:'https://www.youtube.com/embed/'+(autoplay?videoCode+'?autoplay=1&muted=1':videoCode),alt:altText,title:videoTitle});break;case'VIMEO':HB.HagebauVideoComponent.videoComponents.eq(i).append(HB.HagebauVideoComponent.vmTemplate);$('.vimeoplayer').eq(i).attr({id:'vimeoplayer'+videoCode,src:'https://player.vimeo.com/video/'+(autoplay?videoCode+'?autoplay=1&muted=1':videoCode),alt:altText,title:videoTitle});break;case'AWSS3':HB.HagebauVideoComponent.videoComponents.eq(i).append(HB.HagebauVideoComponent.s3Template);$('.s3player').eq(i).attr({id:'s3player'+videoCode,src:'https://dez4a9mvelwa7.cloudfront.net/'+(autoplay?videoCode+'?autoplay=1&muted=1':videoCode),alt:altText,title:videoTitle});break;}},videoBlock:function(i){let altImg=HB.HagebauVideoComponent.videoComponents.eq(i).data('altimg');let blockTxt=HB.HagebauVideoComponent.videoComponents.eq(i).data('blocktxt');let fallbackTxt=HB.HagebauVideoComponent.videoComponents.eq(i).data('fallbacktxt');HB.HagebauVideoComponent.debug?console.log(altImg,blockTxt):null;if((altImg!==undefined&&altImg.length>0)&&(blockTxt!==undefined&&blockTxt.length>0)){HB.HagebauVideoComponent.videoComponents.eq(i).append('<div class="videoComponentPictureOverlay"><div class="blockContainer"><h3>'+blockTxt+'</h3><button class="videoComponentOverlayButtonDefault btnIndex'+i+' btn btn-primary" type="button">Inhalt anzeigen</button></div></div>');$('.videoComponentPictureOverlay').css('background-image','url('+altImg+')');$('.videoComponentOverlayButtonDefault.btnIndex'+i).on('click',function(e){$(e.target).closest('.videoComponentPictureOverlay').remove();HB.HagebauVideoComponent.displayVideo(i);});}else{HB.HagebauVideoComponent.videoComponents.eq(i).append('<div class="videoComponentOverlay"><p>'+fallbackTxt+'</p><button class="videoComponentOverlayButtonDefault btnIndex'+i+' btn btn-primary" type="button">Inhalt anzeigen</button></div>');$('.videoComponentOverlayButtonDefault.btnIndex'+i).on('click',function(e){$(e.target).closest('.videoComponentOverlay').remove();HB.HagebauVideoComponent.displayVideo(i);});}},};HB.CodeScanner={debug:0,init:function(){HB.CodeScanner.debug?console.log('Dynamsoft code reader initialized'):null;let scanModalHeader='<div class="modal-header clearfix"><button id="js-codescanner-close" type="button" class="close" data-dismiss="modal" style="height: auto"><i class="icon-close"></i></button><span id="headerMsg" class="h2">Bar- oder QR-Code scannen</span></div>';let scanModalBody='<div id="div-ui-container" class="modal-body"><div id="video-container" class="dce-video-container" style="height: 80vh; width: 100%;
2105 object-fit: fill;"></div></div>';$('.js-codescanner').on('click',async()=>{HB.Utils.displayModalPopup(scanModalHeader+scanModalBody,'modal-lg');HB.CodeScanner.load();});},load:function(){const dynamsoftUrl="https://cdn.jsdelivr.net/npm/[email protected]/dist/dbr.js";$.getScript(dynamsoftUrl,function(){Dynamsoft.DBR.BarcodeScanner.license=atob(HB.config.dynamsoftBCScannerKey);(async()=>{let scanner=await Dynamsoft.DBR.BarcodeScanner.createInstance();let settings=await scanner.getRuntimeSettings();await scanner.setUIElement(document.getElementById('video-container'));scanner.onFrameRead=results=>{if(results.length!==0){let link=results[0].barcodeText;let storeUrl=window.location.protocol+'//'+window.location.host;if(link.includes(storeUrl)){$('#headerMsg').html('Gültiger Code.');window.location.href=link;HB.CodeScanner.scannerCountRequest();HB.CodeScanner.bindCloseRedirect();}else{let arr=[window.location.protocol,window.location.host]
2106let externalLinkCheck=new RegExp(arr.join('|')).test(link);if(externalLinkCheck){$('#headerMsg').html('Ungültiger Code.').css('color','red');return false;}else{let productNumber=results[0].barcodeText;HB.CodeScanner.scannerSearchRedirect(productNumber);HB.CodeScanner.scannerCountRequest();$('#headerMsg').html('Gültiger Code.');HB.CodeScanner.bindCloseRedirect(scanner);}}}};scanner.setVideoFit('cover');scanner.ifShowRegionMask=true;await scanner.show();settings.region.regionMeasuredByPercentage=1;settings.region.regionLeft=10;settings.region.regionTop=10;settings.region.regionRight=90;settings.region.regionBottom=90;await scanner.updateRuntimeSettings(settings);HB.CodeScanner.bindCloseModal(scanner);})();HB.CodeScanner.debug?console.log(`Started continous decode from camera with BACK CAMERA`):null;});},bindCloseModal:function(scanner){$('#js-codescanner-close, .modal-backdrop').on('click',function(){HB.Utils.hideModalPopup();scanner.destroyContext();});},bindCloseRedirect:function(scanner){HB.Utils.hideModalPopup();scanner.destroyContext();},scannerCountRequest:function(){$.ajax({type:'POST',url:HB.config.siteUrl+'scannerCounter'})},scannerSearchRedirect:function(productNumber){window.location.href=HB.config.url.search+'/?q='+productNumber+'&isScan=true';}};HB.pwaToHome={debug:0,cname:'pwaA2HS',defPrompt:null,pageTitle:document.title,bottomPanel:'<div class="container" id="bottomPanelInstall"><a type="button" id="bottomPanelCloseBtn" class="close"><i class="icon-close"></i></a>',init:function(){if(HB.config.pwaEnabled===true){HB.pwaToHome.checkCookieRole();}},checkCookieRole:function(){if(HB.Core.isUCConsentOrComfort('Ap0JaNKV9')===true&&(!HB.RoleSelection.roleSelectPending())){HB.pwaToHome.checkCookie();}},checkCookie:function(){if(HB.CookieSettings.getCookieByName(HB.pwaToHome.cname).length===0){HB.pwaToHome.bindCheckUserAgent();}},setPwaCookie:function(name,value){var maxAge=';max-age='+HB.config.cookieMaxAge;var path=HB.config.siteUrl;if(path!=null&&path.length>1&&path.startsWith('/')&&path.endsWith('/')){path=path.slice(0,-1);}
2107document.cookie=encodeURIComponent(name)+"="+encodeURIComponent(value)+maxAge+"; path="+path;},bindCheckUserAgent:function(){let ua=navigator.userAgent.toLowerCase();let chrome=!!window.chrome;let ios=/ipad|iphone/.test(ua);let safari=/safari/.test(ua);
2107HB.pwaToHome.debug?console.log(chrome,ios,safari):null;if(HB.ViewportChange._viewport.name==="xs"||HB.ViewportChange._viewport.name==="sm"){if(chrome){HB.pwaToHome.chromeListener();}else if(ios&&safari){$('body').append(HB.pwaToHome.bottomPanel);HB.pwaToHome.safariListener();}else{$('body').append(HB.pwaToHome.bottomPanel);HB.pwaToHome.generalBrowserListener();}
2108HB.pwaToHome.bindPanelClose();HB.pwaToHome.bindPanelCloseButton();}},chromeListener:function(){window.addEventListener('beforeinstallprompt',handleEvent);function handleEvent(e){e.preventDefault();HB.pwaToHome.defPrompt=e;HB.pwaToHome.debug?console.log("'beforeinstallprompt' event was fired."):null;HB.pwaToHome.debug?console.log(HB.pwaToHome.defPrompt):null;HB.pwaToHome.defPrompt.prompt();HB.pwaToHome.defPrompt.userChoice.then((choiceResult)=>{if(choiceResult.outcome==='accepted'){HB.pwaToHome.debug?console.log('User accepted the A2HS prompt'):null;}else{HB.pwaToHome.debug?console.log('User dismissed the A2HS prompt'):null;}
2109HB.pwaToHome.defPrompt=null;HB.pwaToHome.setPwaCookie(HB.pwaToHome.cname,'seen');});window.removeEventListener('beforeinstallprompt',handleEvent);}},safariListener:function(){$('#bottomPanelInstall').append(`<span id="bottomPanelInstallBtn"><img src="${HB.config.sharedResourcePath}/images/android-icon-48x48.png" alt=""/><p>${HB.pwaToHome.pageTitle} </br>Um die App zum Startbildschirm hinzuzufügen, tippen Sie auf "Teilen" und wählen Sie "Hinzufügen"</p></span>`)},generalBrowserListener:function(){$('#bottomPanelInstall').append(`<span id="bottomPanelInstallBtn"><img src="${HB.config.sharedResourcePath}/images/android-icon-48x48.png" alt=""/><p>${HB.pwaToHome.pageTitle} </br>Um die App zum Startbildschirm hinzuzufügen, klicken Sie auf die Optionen und wählen Sie "Installieren".</p></span>`)},bindPanelClose:function(){$(document).one('click',function(e){let bottomPanel=$('#bottomPanelInstall');if(!bottomPanel.is(e.target)&&bottomPanel.has(e.target).length===0){bottomPanel.hide();HB.pwaToHome.setPwaCookie(HB.pwaToHome.cname,'seen');}});},bindPanelCloseButton:function(){$('#bottomPanelCloseBtn').on("click",function(){$('#bottomPanelInstall').hide();HB.pwaToHome.setPwaCookie(HB.pwaToHome.cname,'seen');});},};HB.pwaInit={debug:0,init:function(){if('serviceWorker'in navigator){navigator.serviceWorker.register(HB.config.siteUrl+'pwa/serviceworkers/serviceworker.js',{scope:'/'}).then(function(registration){HB.pwaInit.debug?console.log('Service worker registration succeeded:',registration):null;},function(error){HB.pwaInit.debug?console.log('Service worker registration failed:',error):null;});}else{HB.pwaInit.debug?console.log('Service workers are not supported.'):null;}}};HB.postcodeSuggest={debug:0,autocompleteOptions:null,checkCart:window.location.href.includes('/cart'),appendDiv:'<div class="plzAppend"></div>',init:function(){if(HB.postcodeSuggest.checkCart){$('#postcodeDropdown').on('click',function(){$('#postcodeDropdown').popover({template:'<div class="popover popover-postcodesuggest" role="tooltip"><div class="arrow"></div><a type="button" id="plzPopClose" class="pop-close" data-dismiss="popover" style="margin-left:20px;display:block;"><i id="pop-cancel" class="icon-cancel" style="font-size:11px;"></i></a><h3 id="pop-title" class="popover-title"></h3><div id="pop-body"><input class="autocomplete-input" type="text" name="plzInput" placeholder="PLZ" autofocus /></div></div>',html:true,title:'PLZ eingeben',placement:"left",trigger:'manual',sanitize:false,}).popover('show');HB.postcodeSuggest.closeAutoPopover();if($('.plzAppend').length===0){$('.popover-postcodesuggest').after(HB.postcodeSuggest.appendDiv);}
2110$('.autocomplete-input').change(HB.postcodeSuggest.autoSuggest());});}else{HB.postcodeSuggest.inputSelect();}},inputSelect:function($input){if(HB.config.postalSuggestionEnabled===true&&$input){if($('.plzAppend').length===0){$input.parent().after(HB.postcodeSuggest.appendDiv);}
2111$input.addClass('autocomplete-input');$input.change(HB.postcodeSuggest.autoSuggest());}},autoSuggest:function(){HB.postcodeSuggest.autocompleteOptions={minLength:3,delay:500,autoFocus:true,source:HB.postcodeSuggest.postcodeRequest,select:HB.postcodeSuggest.postcodeSelect,appendTo:$('.plzAppend')}
2111;$('.autocomplete-input').autocomplete(HB.postcodeSuggest.autocompleteOptions).data("uiAutocomplete");},postcodeRequest:function(request,response){$.ajax({url:HB.config.siteUrl+'suggestion/postalCodePrefix/'+encodeURIComponent($('.autocomplete-input').val()),dataType:'json',type:'GET',success:function(data){response(HB.postcodeSuggest.onResult(data));},});},onResult:function(data){let arr=[];for(let i=0;i<data.list.length;i++){let list=data.list[i];let zipCode=list.postalCode;let town=list.town;let countryCode=list.countryCode.toUpperCase();let combinedCode=zipCode+' '+town+', '+countryCode;arr.push(combinedCode);}
2112return arr;},postcodeSelect:function(event,ui){let postCodeSplit=ui.item.value.split(/[ ,]+/).map(function(item){return item.trim();});let postCode=postCodeSplit[0];let town=postCodeSplit.slice(1,postCodeSplit.length-1).join(' ');let country=postCodeSplit[postCodeSplit.length-1].toLowerCase();if(HB.postcodeSuggest.checkCart){$('.autocomplete-input').val(ui.item.value);window.location.href=HB.config.siteUrl+'cart/updateDeliveryTo/'+postCode+'/'+encodeURIComponent(encodeURIComponent(town))+'/'+country;}
2113if($('body').find('.js-postcode')){setTimeout(function(){$('.js-postcode').empty().val(postCodeSplit[0]);$('.js-town').val(town);},50)}
2114if($('body').find('.js-postcode-town')){setTimeout(function(){$('.js-postcode-town').empty().val(postCode+", "+town);},50)}},closeAutoPopover:function(){$("#plzPopClose").on("click",function(e){e.stopPropagation();e.preventDefault();$('.popover-postcodesuggest').popover('hide');});},};HB.AcceptCookiesBannerComponent={debug:0,pictureComponents:$('.acceptCookiesBannerComponent'),componentsWithLoadedScripts:{},init:function(){HB.AcceptCookiesBannerComponent.pictureComponents.each(function(i){let $component=$(this);let componentUrl=$component.data("url");let componentUid=$component.data("uid");let componentUCid=$component.data("ucid");if(HB.Core.isUCConsentOrComfort(componentUCid)===true&&(!HB.RoleSelection.roleSelectPending())){if(!HB.AcceptCookiesBannerComponent.componentsWithLoadedScripts[componentUid]){HB.AcceptCookiesBannerComponent.loadScript(componentUrl,componentUid);}}else{HB.AcceptCookiesBannerComponent.displayPicture($component,componentUCid);}});},displayPicture:function($component,ucId){HB.AcceptCookiesBannerComponent.debug?console.log("displayPicture",$component):null;let fallbackText=$component.data('fallbacktxt');let availablePicture;let availableMediaContainer;if(typeof $component.find("img").data('lazy-src')!=='undefined'){availablePicture=$component.find("img").data('lazy-src').length>0;}
2115if(typeof $component.find("img").data('url')!=='undefined'){availableMediaContainer=$component.find("img").data('url')!=="";}
2116let $imageContainer=$component.find(".componentImageContainer");if($imageContainer.length>0){$imageContainer.removeClass('hidden');let url=$imageContainer.data('url')['xs'];$imageContainer.attr('src',url);HB.AcceptCookiesBannerComponent.setSrc($component);}else{let $image=$component.find('img');$image.removeClass('hidden');let url=$image.data('lazy-src');$image.attr('src',url);}
2117$component.find(".js-replace").append('<div class="picture"><p>'+fallbackText+'</p><button class="cookieBannerComponentOverlayButtonDefault btn btn-primary" type="button">Inhalt anzeigen</button></div>');(availablePicture||availableMediaContainer)?$component.find(".picture").css("position","absolute"):$component.find(".picture").css("position","relative");$component.find('.cookieBannerComponentOverlayButtonDefault').on('click',function(e){$(e.target).closest('.picture').remove();if(HB.config.usercentricsApiKey!==''){UC_UI.acceptService(ucId).then(()=>HB.AcceptCookiesBannerComponent.init());}else{HB.CookieSettings.onCookieSettingsUpdate();}});},setSrc:function($component){let container=$component.find('.componentImageContainer.cookieClass');let urlJSON=container.data('url');let $yCmsComponent=container.closest('.yCmsComponent');if(container.attr('src')!==null){if(typeof urlJSON=='object'&&$yCmsComponent.length>0&&$yCmsComponent.is('.xs, .sm, .md, .lg')){$yCmsComponent.attr('class').split(' ').map(function(className){if(typeof urlJSON[className]!=='undefined'&&container.attr('src')!==urlJSON[className]){container.attr('src',urlJSON[className]);}});}}else{container.next('.picture').css('transform','none');}}
2117,loadScript:function(url,uid){HB.AcceptCookiesBannerComponent.componentsWithLoadedScripts[uid]=true;$.ajax({url:url,type:'GET',dataType:'json',data:{componentUid:uid},success:function(result){HB.AcceptCookiesBannerComponent.replaceContent(result,uid);delete HB.AcceptCookiesBannerComponent.componentsWithLoadedScripts[uid];},error:function(err){console.warn('No element found for uid '+uid);HB.AcceptCookiesBannerComponent.onAjaxError(uid);delete HB.AcceptCookiesBannerComponent.componentsWithLoadedScripts[uid];}})},replaceContent:function(result,uid){let $component=$('#'+uid);if(result.html!==""){$component.find('.banner-headline').hide();let $content=result.html;$content=$content.replace(/##SQ##/g,"'");$component.find('.js-replace').html($content);}},onAjaxError:function(uid){let $component=$('#'+uid);$component.find('.js-replace').html("");},ucReinit:function(){HB.AcceptCookiesBannerComponent.pictureComponents.each(function(i){let $component=$(this);$component.find('.js-replace').empty();HB.AcceptCookiesBannerComponent.init();});}};HB.ConnectedArticle={debug:0,init:function(){HB.ConnectedArticle.debug>0?console.log("HB.ProductReferences.init"):null;$(".js-connected-article-component").each(function(index){var $component=$(this);var componentUid=$component.data("componentUid");
2117var productCode=$component.data("productCode");var url=$component.data("componentUrl");HB.ConnectedArticle.debug>0?console.log($component,componentUid,productCode,url):null;HB.ConnectedArticle.getConnectedArticle(componentUid,productCode,url);});},getConnectedArticle:function(componentUid,productCode,url){HB.ConnectedArticle.debug>0?console.log("HB.ConnectedArticle.getConnectedArticle, componentId: ",componentUid,productCode,url):null;$.ajax({url:url,type:'get',dataType:'json',data:{componentUid:componentUid,productCode:productCode},success:function(result){HB.ConnectedArticle.debug>0?console.log("SUCCESS: "+componentUid+" - RESULT:",result):null;HB.ConnectedArticle.onAjaxSuccess(componentUid,result);},error:function(jqXHR,textStatus,errorThrown){HB.ConnectedArticle.debug>0?console.log("ERROR: "+componentUid+" - RESULT: "+errorThrown):null;}});},onAjaxSuccess:function(componentUid,result){HB.ConnectedArticle.debug>0?console.log("HB.ConnectedArticle.onAjaxSuccess: ",componentUid):null;if(result.html!==""){const $component=$('#'+componentUid);HB.ConnectedArticle.debug>0?console.log($component):null;$component.find(".js-replace").html(result.html);if($component.length){$component.removeClass("hidden");}}},};HB.ArticleSlider={debug:0,init:function(){HB.ArticleSlider.debug>0?console.log("HB.ArticleSlider.init"):null;$(".js-article-slider-component").each(function(index){const $component=$(this);const componentUid=$component.data("componentUid");const url=$component.data("componentUrl");HB.ArticleSlider.debug>0?console.log($component,componentUid,url):null;HB.ArticleSlider.getArticleSlider(componentUid,url);});},getArticleSlider:function(componentUid,url){HB.ArticleSlider.debug>0?console.log("HB.ArticleSlider.getArticleSlider, componentId: ",componentUid,url):null;$.ajax({url:url,type:'get',dataType:'json',data:{componentUid:componentUid,},success:function(result){HB.ArticleSlider.debug>0?console.log("SUCCESS: "+componentUid+" - RESULT:",result):null;HB.ArticleSlider.onAjaxSuccess(componentUid,result);},error:function(jqXHR,textStatus,errorThrown){HB.ArticleSlider.debug>0?console.log("ERROR: "+componentUid+" - RESULT: "+errorThrown):null;}});},onAjaxSuccess:function(componentUid,result){HB.ArticleSlider.debug>0?console.log("HB.ArticleSlider.onAjaxSuccess: ",componentUid):null;if(result.html!==""){const $component=$('#'+componentUid);HB.ArticleSlider.debug>0?console.log($component):null;$component.find(".js-replace").html(result.html);HB.ProductReferences.fadeEachElement($component);if(typeof result.isAutoplayCarousel!=='undefined'&&result.isAutoplayCarousel!==""){HB.ArticleSlider.initSlider($component,result.isAutoplayCarousel);}else{HB.ArticleSlider.initSlider($component);}
2118if($component.length){$component.removeClass("hidden");}}},initSlider:function($component,_isAutoplayCarousel){HB.ArticleSlider.slickifyArticles($component,_isAutoplayCarousel);},slickifyArticles:function($component,_isAutoplayCarousel){let autoplayCarousel=false;if(typeof _isAutoplayCarousel!=='undefined'&&_isAutoplayCarousel!==null&&_isAutoplayCarousel==='true'){autoplayCarousel=true;}
2119let $slide=$component.find('.js-slide');$slide.each(function(index){$(this).slick({lazyLoad:'progressive',slidesToScroll:1,slidesToShow:4,arrows:true,prevArrow:'<button id="'+$(this).data('uid')+'-prev" type="button" class="slick-prev" aria-label='+HB.translations.general.prevButtonLabel+'></button>',nextArrow:'<button id="'+$(this).data('uid')+'-next" type="button" class="slick-next" aria-label='+HB.translations.general.nextButtonLabel+'></button>',fade:false,autoplay:autoplayCarousel,swipe:true,swipeToSlide:true,accessibility:true,responsive:[{breakpoint:768,settings:{slidesToShow:2,}},{breakpoint:970,settings:{slidesToShow:3,}},]});});$slide.css("visibility","visible");HB.SlickSlider.handleSliders();}};HB.Usercentrics={debug:0,eventsInit:function(){$(window).on('UC_UI_CMP_EVENT',function(event){HB.Usercentrics.debug?console.log(UC_UI.getServicesBaseInfo()):null;if(event.detail.type==="SAVE"||event.detail.type==="ACCEPT_ALL"||event.detail.type==="DENY_ALL"){HB.Usercentrics.reinitComponents();}
2120let ucConsentMap=UC_UI.getServicesBaseInfo();let reducedMap=HB.Usercentrics.reduceConsentMap(ucConsentMap);let url=HB.config.siteUrl+"usercentricsData/consentMap";$.ajax({url:url,type:'POST',data:{consentString:JSON.stringify(reducedMap)},dataType:'application/json',timeout:HB.config.ajax.timeout,success:function(){},error:function(){}});});},reduceConsentMap:function(map){return map.reduce(function(filtered,option){let reducedContent={id:option.id,consentStatus:option.consent.status};filtered.push(reducedContent);return filtered;},[]);}
2120,reinitComponents:function(){HB.AcceptCookiesBannerComponent.ucReinit();HB.storefinder.onMapUpdate();HB.Highlight.init();}};HB.craftsmanfinder={SearchResultCache:[],$ajaxContentPlaceHolder:$('#craftsmanSearch.js-replace'),debug:1,result:'',longitude:null,latitude:null,multiSelectPlaceholder:HB.translations.checkout.chooseDefaultText,init:function(){HB.craftsmanfinder.debug?console.log('HB.craftsmanfinder.init()'):null;HB.craftsmanfinder.getCraftsmanList($('#craftsmanSearch').data('url'),'get',null);},initSearchPage:function(){HB.craftsmanfinder.multiSelectPlaceholder=HB.translations.multiselect.allResultsText;HB.craftsmanfinder.bindSearch();HB.craftsmanfinder.bindMultipleSelect();HB.craftsmanfinder.bindPaginationButtons();HB.craftsmanfinder.bindAddressAutocomplete();HB.craftsmanfinder.expandTilesOnMobile();},initEditPage:function(){HB.craftsmanfinder.bindMultipleSelect();HB.craftsmanfinder.bindEditFormSubmit();HB.craftsmanfinder.bindAddressAutocomplete();HB.craftsmanfinder.bindAddProtocolToWebpage();},toggleFeature:function(element){const $textBox1=$('#js-switcher-flag');const $textBox2=$('#js-switcher-text');const $spinner=$('.craftsmanfinder-switcher .spinner');const $toggle=$(element);$.ajax({url:'my-account/craftsmanfinder/switch',type:'POST',contentType:'application/json',data:JSON.stringify({}),beforeSend:function(){$toggle.addClass('loading');},complete:function(){$toggle.removeClass('loading');},success:function(){HB.craftsmanfinder.debug>0?console.log('POST Switch successful'):null;$toggle.toggleClass(['Off','On']);if($toggle.hasClass('On')){$textBox1.text(HB.translations.craftsmanfinder.switchActiveLabel);$textBox2.text(HB.translations.craftsmanfinder.switchActiveText);}else{$textBox1.text(HB.translations.craftsmanfinder.switchInactiveLabel);$textBox2.text(HB.translations.craftsmanfinder.switchInactiveText);}},error:function(xhr,status,error){HB.craftsmanfinder.debug>0?console.log(xhr,status,error):null;}});},bindMultipleSelect:function(){HB.craftsmanfinder.debug?console.log('bindMultipleSelect()'):null;let elementsMultiSelect=$('#gewerk');elementsMultiSelect.each(function(){$(this).multiselect({nonSelectedText:HB.craftsmanfinder.multiSelectPlaceholder,allSelectedText:HB.translations.multiselect.allSelectedText,enableHTML:true,numberDisplayed:2,nSelectedText:HB.translations.multiselect.nSelectedText,templates:{button:'<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span><div class="dropdown-fake"><i class="icon-arrow-down"></i></div></button>',li:'<li class="checkbox"><a tabindex="0"><div class="control-label pseudo-checkbox"><label class="real-label"></label></div></a></li>'},optionLabel:function(element){return'<span class="checkbox"><i class="icon-check"></i></span>'+$(element).text();}});});},bindAddressAutocomplete:()=>{$('#query').addClass('js-postcode-town');let input=$('.js-postcode-town');HB.postcodeSuggest.inputSelect(input);},bindEditFormSubmit:function(){HB.craftsmanfinder.debug?console.log('bindFormSubmit()'):null;HB.craftsmanfinder.debug?console.log($('#editCraftsmanfinderForm').attr('action')):null;const form=document.getElementById('editCraftsmanfinderForm');HB.FormValidation.init();HB.FormValidation.trimInputValues('form#editCraftsmanfinderForm');form.addEventListener('submit',function(e){e.preventDefault();if(!HB.FormValidation.checkRequiredFields())return;HB.MyAccount.showAccountContentLoader();const xhr=new XMLHttpRequest();const formData=new FormData(form);xhr.open('POST',form.action,true);xhr.onload=function(){if(xhr.status===200){const data=JSON.parse(xhr.responseText);$('#userAccountContent').removeClass();if(data.page)$('#userAccountContent').addClass(data.page);$('#userAccountContent').html(data.html);HB.MyAccount.onAfterUserAccountContentLoad(data);HB.Message.addGlobalMessageByGivenAjaxData(data,true);if(data.globalMessagesHtml)HB.Utils.scrollToElement($('#globalMessages'));}else{HB.craftsmanfinder.debug>0?console.log(xhr,xhr.status,xhr.responseText):null;HB.Message.onAjaxError(null);}
2121HB.MyAccount.hideAccountContentLoader();};xhr.onerror=function(){HB.craftsmanfinder.debug>
21210?console.log('Network Error',xhr,xhr.status,xhr.responseText):null;HB.MyAccount.hideAccountContentLoader();};xhr.send(formData);});},bindPaginationButtons:function(){const $pagination=$('ul.pagination.js-pagination');const onDocumentPageSwitchInput=(event)=>{$input=$(event.currentTarget);if($input.val()!=$input.data('value')){if(typeof event.keyCode==='undefined'||event.keyCode===13){let url=$input.data('url')+'&'+$input.data('param')+'='+$input.val();HB.craftsmanfinder.debug>0?console.log('Pagination Input Change','URL',url,'event',event):null;HB.craftsmanfinder.getPageContent(url);}}}
2122const onDocumentPageSwitchClick=(event)=>{const $button=$(event.currentTarget);let url=$button.data('url');HB.craftsmanfinder.debug>0?console.log('Pagination Button Clicked','URL',url,'event',event):null;HB.craftsmanfinder.getPageContent(url);}
2123$pagination.find('.js-input-page').on('blur keypress',onDocumentPageSwitchInput);$pagination.find('.js-btn-page-prev').on('click',onDocumentPageSwitchClick);$pagination.find('.js-btn-page-next').on('click',onDocumentPageSwitchClick);},getPageContent:function(url){HB.Message.removeGlobalMessage();if(url&&typeof url==='string'){HB.Utils.insertLoadingIndicator('.js-replace');if(typeof HB.craftsmanfinder.SearchResultCache==='undefined'){HB.craftsmanfinder.SearchResultCache=[];}
2124if(typeof HB.craftsmanfinder.SearchResultCache[url]==='undefined'){$.ajax({type:'post',url:url,dataType:'json',timeout:HB.config.ajax.timeout,success:(data)=>{HB.craftsmanfinder.debug>0?console.log("ajax success",data):null;if(typeof data.html!=='undefined'){HB.craftsmanfinder.$ajaxContentPlaceHolder.html(data.html);HB.craftsmanfinder.SearchResultCache[url]=data.html;}},error:function(xhr,status,error){HB.craftsmanfinder.debug>0?console.log("ajax error",xhr,status,error):null;HB.craftsmanfinder.$ajaxContentPlaceHolder.html(HB.craftsmanfinder.SearchResultCache[$('#craftsmanSearch').data('url')]);},complete:function(){HB.craftsmanfinder.initSearchPage();}});}else{HB.craftsmanfinder.$ajaxContentPlaceHolder.html(HB.craftsmanfinder.SearchResultCache[url]);HB.craftsmanfinder.initSearchPage();}}},validateImage:function(fileInput){document.querySelector('.craftsmanfinder-logo img')?.remove();const file=fileInput.files[0];const allowedFormats=['image/png','image/jpeg'];const minWidth=300;const minHeight=240;if(!file){HB.FormValidation.showNegativeGlobalMessage(HB.translations.general.errorMissingImage);return false;}
2125if(!allowedFormats.includes(file.type)){HB.FormValidation.showNegativeGlobalMessage(HB.translations.general.errorWrongImageType);fileInput.value='';return false;}
2126const img=new Image();img.onload=function(){const imgWidth=this.width;const imgHeight=this.height;if(imgWidth<minWidth||imgHeight<minHeight){HB.FormValidation.showNegativeGlobalMessage(HB.translations.general.errorWrongImageDimensions);fileInput.value='';return false;}
2127displayImage(URL.createObjectURL(file))};img.src=URL.createObjectURL(file);function displayImage(imageUrl){const placeholderDiv=document.querySelector('.craftsmanfinder-logo');const spanElement=placeholderDiv.querySelector('span');const imgElement=document.createElement('img');imgElement.src=imageUrl;if(spanElement)spanElement.style.display='none';imgElement.style.display='block';imgElement.width=130;imgElement.height=100;placeholderDiv.appendChild(imgElement);}},getCraftsmanList:function(action,type,formData){HB.craftsmanfinder.debug>0?console.log('HB.craftsmanfinder.getCraftsmanList: ',action,formData):null;HB.Message.removeGlobalMessage();HB.Utils.insertLoadingIndicator('.js-replace');$.ajax({url:action,type:type,data:formData?formData:'true',success:function(data){HB.craftsmanfinder.debug>0?console.log('ajax success',data):null;HB.craftsmanfinder.$ajaxContentPlaceHolder.html(data.html);HB.craftsmanfinder.SearchResultCache[action]=data.html;},error:function(xhr,status,error){HB.craftsmanfinder.debug>0?console.log(xhr,status,error):null;HB.craftsmanfinder.$ajaxContentPlaceHolder.html(HB.craftsmanfinder.SearchResultCache[$('#craftsmanSearch').data('url')]);console.error(xhr,status,error);HB.Message.onAjaxError(status);},complete:function(){HB.craftsmanfinder.initSearchPage();}});},bindSearch:function(){HB.craftsmanfinder.debug?console.log('bindSearch()'):null;HB.craftsmanfinder.debug?console.log($('#craftsmanSearchForm').attr('action')):null;$(document).one('click','#craftsmanSearchBtn',function(e){e.preventDefault();var $form=$('#craftsmanSearchForm');
2127if($form.find('#query')?.val().length==0){$('#radius').val('');}
2128HB.craftsmanfinder.debug?console.log('radius: '+$('#radius').val()):null;if($('#radius').val()>0){$('#searchRadius').val($('#radius').val().split(' ')[0]*1000);}
2129HB.craftsmanfinder.getCraftsmanList($form.attr('action'),'post',$form.serialize());});HB.craftsmanfinder.debug?console.log('bindSearch() finished.'):null;},expandTilesOnMobile:function(){$('label.entry').on('click',(ev)=>{if(HB.ViewportChange.getViewport().index>0)return;const $clickedCraftsman=$(ev.currentTarget).closest('.entry-wrapper');const $allCraftsman=$('.craftsmanfinder-search__results .entry-wrapper');const isExpanded=$clickedCraftsman.hasClass('expanded');const animatedElements='.contact-details, .profile, .gewerk';if(!isExpanded)$clickedCraftsman.find(animatedElements).css('display','none');$allCraftsman.each(index=>{let current=$($allCraftsman[index]);if(current.hasClass('expanded')){current.find(animatedElements).slideUp('slow',()=>{current.removeClass('expanded');});return;}});if(!isExpanded){$clickedCraftsman.addClass('expanded');$clickedCraftsman.find(animatedElements).slideDown('slow',()=>{});}})},showHiddenDetailsOnTabletAndAbove:function(){const animatedElements='.contact-details, .profile, .gewerk';$(animatedElements).removeAttr('style');},bindAddProtocolToWebpage:function(){$('input[name="webpage"]').focusout(function(){$(this).val(HB.Utils.addProtocolToUrl($(this).val()));});}};HB.TourboTrack={map:null,debug:0,previousGoogleMapsConsent:null,drawMap:function(){let $canvas=$('.js-tourbotrack-map-wrapper');if($canvas.length===0){return;}
2130let latitude=parseFloat($canvas.data('latitude'));let longitude=parseFloat($canvas.data('longitude'));let statusLocation=$canvas.data('statuslocation');if(isNaN(latitude)||isNaN(longitude)){if(HB.TourboTrack.debug)console.warn('HB.TourboTrack: invalid coordinates for map',latitude,longitude);return;}
2131const center={lat:latitude,lng:longitude};let mapOptions={zoom:statusLocation=="1"?15:19,zoomControl:true,mapTypeControl:false,streetViewControl:false,mapTypeId:google.maps.MapTypeId.ROADMAP,center:center,mapId:window.location.pathname};HB.TourboTrack.map=new google.maps.Map(document.getElementById('tourbotrack-map'),mapOptions);const pin=new google.maps.marker.PinElement();new google.maps.marker.AdvancedMarkerElement({position:center,map:HB.TourboTrack.map,content:pin.element,title:statusLocation=="1"?'Lieferfahrzeug':'Abladestelle'});},onMapUpdate:function(){$(window).on('UC_UI_CMP_EVENT',function(){let currentGoogleMapsConsent=HB.Core.isConsentTrue("S1pcEj_jZX");if(currentGoogleMapsConsent){setTimeout(function(){HB.TourboTrack.drawMap();if(currentGoogleMapsConsent!==HB.TourboTrack.previousGoogleMapsConsent){HB.TourboTrack.previousGoogleMapsConsent=currentGoogleMapsConsent;}},500);}else if(currentGoogleMapsConsent!==HB.TourboTrack.previousGoogleMapsConsent){location.reload();}});}};$(document).ready(function(){let loadMapScript=$('#loadTourboTrackMap');if(loadMapScript.attr("type")==="application/usercentrics"){HB.TourboTrack.drawMap();}
2132HB.TourboTrack.previousGoogleMapsConsent=HB.Core.isConsentTrue("S1pcEj_jZX");HB.TourboTrack.onMapUpdate();});HB.Init={debug:0,load:function(){if(HB.Init.debug){console.log("HB.Init.load()")};HB.Product.bindToAddToCartForm();HB.WishlistLayer.bindToAddToWishlistForm();},ready:function(){if(HB.Init.debug){console.log("HB.Init.load()")};HB.Utils.beforeInit();HB.Utils.initAjax();HB.Utils.initComponents();HB.Utils.initConditional();HB.Utils.fadeSuccessAlert();HB.Utils.replacePhoneLinks();HB.Utils.modalBoxPositionIOS();HB.SlickSlider.init();HB.SimpleBannerComponent.init();HB.AutoComplete.bindAll();if($('body').hasClass('page-singleStepCheckoutConfigurationPage')){HB.CheckoutConfig.showConfiguration();}
2133HB.CookieSettings.init();if($('body').find('[class^=smartedit-page-uid]')){window.smartedit.addOnReprocessPageListener(function(){HB.SlickSlider.init();HB.Utils.parallaxScroll();HB.Utils.replacePhoneLinks();HB.Download.init();});}},initiallyBlockedScripts:function(){HB.Highlight.init();HB.CodeScanner.init();HB.pwaToHome.init();
2133HB.pwaInit.init();HB.Usercentrics.eventsInit();},pageShow:function(){if(HB.Init.debug){console.log("HB.Init.pageShow()")};HB.MiniCart.validate();},usercentricsInit:function(){if(HB.config.usercentricsApiKey!==''){$(window).on('UC_UI_INITIALIZED',function(){HB.RoleSelection.init();HB.Init.initiallyBlockedScripts();HB.Utils.initCookieDependentComponents();HB.storefinder.previousGoogleMapsConsent=HB.Core.isConsentTrue("S1pcEj_jZX");HB.storefinder.onMapUpdate();});}else{HB.Init.initiallyBlockedScripts();HB.Utils.initCookieDependentComponents();}}};$(window).on('load',function(){HB.Init.load()});$(document).ready(function(){HB.Init.ready();HB.Init.usercentricsInit();HB.Message.hideGlobalMessage()});$(window).on("pageshow",function(){HB.Init.pageShow()});;

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.