!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";(function(e){var n;function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*!
 * jQuery JavaScript Library v3.4.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2019-05-01T21:04Z
 */
/*!
 * jQuery JavaScript Library v3.4.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2019-05-01T21:04Z
 */
!function(t,n){"object"===r(e)&&"object"===r(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,i){var a=[],s=o.document,u=Object.getPrototypeOf,l=a.slice,c=a.concat,d=a.push,f=a.indexOf,p={},h=p.toString,v=p.hasOwnProperty,m=v.toString,y=m.call(Object),g={},b=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},w={type:!0,src:!0,nonce:!0,noModule:!0};function k(e,t,n){var r,o,i=(n=n||s).createElement("script");if(i.text=e,t)for(r in w)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function C(e){return null==e?e+"":"object"===r(e)||"function"==typeof e?p[h.call(e)]||"object":r(e)}var T=function e(t,n){return new e.fn.init(t,n)},j=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function S(e){var t=!!e&&"length"in e&&e.length,n=C(e);return!b(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}T.fn=T.prototype={jquery:"3.4.1",constructor:T,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:d,sort:a.sort,splice:a.splice},T.extend=T.fn.extend=function(){var e,t,n,o,i,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===r(s)||b(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)o=e[t],"__proto__"!==t&&s!==o&&(c&&o&&(T.isPlainObject(o)||(i=Array.isArray(o)))?(n=s[t],a=i&&!Array.isArray(n)?[]:i||T.isPlainObject(n)?n:{},i=!1,s[t]=T.extend(c,a,o)):void 0!==o&&(s[t]=o));return s},T.extend({expando:"jQuery"+("3.4.1"+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]"!==h.call(e))&&(!(t=u(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&m.call(n)===y)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){k(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(S(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(j,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(S(Object(e))?T.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:f.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r=[],o=0,i=e.length,a=!n;o<i;o++)!t(e[o],o)!==a&&r.push(e[o]);return r},map:function(e,t,n){var r,o,i=0,a=[];if(S(e))for(r=e.length;i<r;i++)null!=(o=t(e[i],i,n))&&a.push(o);else for(i in e)null!=(o=t(e[i],i,n))&&a.push(o);return c.apply([],a)},guid:1,support:g}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=a[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){p["[object "+t+"]"]=t.toLowerCase()});var _=
/*!
   * Sizzle CSS Selector Engine v2.3.4
   * https://sizzlejs.com/
   *
   * Copyright JS Foundation and other contributors
   * Released under the MIT license
   * https://js.foundation/
   *
   * Date: 2019-04-08
   */
function(e){var t,n,r,o,i,a,s,u,l,c,d,f,p,h,v,m,y,g,b,x="sizzle"+1*new Date,w=e.document,k=0,C=0,T=ue(),j=ue(),S=ue(),_=ue(),A=function(e,t){return e===t&&(d=!0),0},E={}.hasOwnProperty,N=[],D=N.pop,q=N.push,L=N.push,O=N.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+H+"*("+R+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+H+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(H+"+","g"),Q=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),F=new RegExp("^"+H+"*,"+H+"*"),B=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),z=new RegExp(H+"|>"),U=new RegExp(W),X=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+H+"?|("+H+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){f()},ae=xe(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{L.apply(N=O.call(w.childNodes),w.childNodes),N[w.childNodes.length].nodeType}catch(e){L={apply:N.length?function(e,t){q.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,o){var i,s,l,c,d,h,y,g=t&&t.ownerDocument,k=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==k&&9!==k&&11!==k)return r;if(!o&&((t?t.ownerDocument||t:w)!==p&&f(t),t=t||p,v)){if(11!==k&&(d=Z.exec(e)))if(i=d[1]){if(9===k){if(!(l=t.getElementById(i)))return r;if(l.id===i)return r.push(l),r}else if(g&&(l=g.getElementById(i))&&b(t,l)&&l.id===i)return r.push(l),r}else{if(d[2])return L.apply(r,t.getElementsByTagName(e)),r;if((i=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(i)),r}if(n.qsa&&!_[e+" "]&&(!m||!m.test(e))&&(1!==k||"object"!==t.nodeName.toLowerCase())){if(y=e,g=t,1===k&&z.test(e)){for((c=t.getAttribute("id"))?c=c.replace(re,oe):t.setAttribute("id",c=x),s=(h=a(e)).length;s--;)h[s]="#"+c+" "+be(h[s]);y=h.join(","),g=ee.test(e)&&ye(t.parentNode)||t}try{return L.apply(r,g.querySelectorAll(y)),r}catch(t){_(e,!0)}finally{c===x&&t.removeAttribute("id")}}}return u(e.replace(Q,"$1"),t,r,o)}function ue(){var e=[];return function t(n,o){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function le(e){return e[x]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),o=n.length;o--;)r.attrHandle[n[o]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ve(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le(function(t){return t=+t,le(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!G.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,o,a=e?e.ownerDocument||e:w;return a!==p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,v=!i(p),w!==p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",ie,!1):o.attachEvent&&o.attachEvent("onunload",ie)),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=K.test(p.getElementsByClassName),n.getById=ce(function(e){return h.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},y=[],m=[],(n.qsa=K.test(p.querySelectorAll))&&(ce(function(e){h.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+H+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+H+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+x+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||m.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+H+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=K.test(g=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=g.call(e,"*"),g.call(e,"[s!='']:x"),y.push("!=",W)}),m=m.length&&new RegExp(m.join("|")),y=y.length&&new RegExp(y.join("|")),t=K.test(h.compareDocumentPosition),b=t||K.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===w&&b(w,e)?-1:t===p||t.ownerDocument===w&&b(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!o||!i)return e===p?-1:t===p?1:o?-1:i?1:c?P(c,e)-P(c,t):0;if(o===i)return fe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?fe(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&f(e),n.matchesSelector&&v&&!_[t+" "]&&(!y||!y.test(t))&&(!m||!m.test(t)))try{var r=g.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){_(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!==p&&f(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==p&&f(e);var o=r.attrHandle[t.toLowerCase()],i=o&&E.call(r.attrHandle,t.toLowerCase())?o(e,t,!v):void 0;return void 0!==i?i:n.attributes||!v?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},se.escape=function(e){return(e+"").replace(re,oe)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],o=0,i=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),d){for(;t=e[i++];)t===e[i]&&(o=r.push(i));for(;o--;)e.splice(r[o],1)}return c=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:V,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(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===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]||se.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]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(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(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&T(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=se.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,f,p,h,v=i!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),g=!u&&!s,b=!1;if(m){if(i){for(;v;){for(f=t;f=f[v];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=v="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&g){for(b=(p=(l=(c=(d=(f=m)[x]||(f[x]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===k&&l[1])&&l[2],f=p&&m.childNodes[p];f=++p&&f&&f[v]||(b=p=0)||h.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[k,p,b];break}}else if(g&&(b=p=(l=(c=(d=(f=t)[x]||(f[x]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===k&&l[1]),!1===b)for(;(f=++p&&f&&f[v]||(b=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++b||(g&&((c=(d=f[x]||(f[x]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[k,b]),f!==t)););return(b-=o)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,o=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return o[x]?o(t):o.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,n){for(var r,i=o(e,t),a=i.length;a--;)e[r=P(e,i[a])]=!(n[r]=i[a])}):function(e){return o(e,0,n)}):o}},pseudos:{not:le(function(e){var t=[],n=[],r=s(e.replace(Q,"$1"));return r[x]?le(function(e,t,n,o){for(var i,a=r(e,null,o,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:le(function(e){return function(t){return se(e,t).length>0}}),contains:le(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||o(t)).indexOf(e)>-1}}),lang:le(function(e){return X.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ve(!1),disabled:ve(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!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!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me(function(){return[0]}),last:me(function(e,t){return[t-1]}),eq:me(function(e,t,n){return[n<0?n+t:n]}),even:me(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:me(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:me(function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:me(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=he(t);function ge(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xe(e,t,n){var r=t.dir,o=t.next,i=o||r,a=n&&"parentNode"===i,s=C++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,u){var l,c,d,f=[k,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(d=t[x]||(t[x]={}))[t.uniqueID]||(d[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[i])&&l[0]===k&&l[1]===s)return f[2]=l[2];if(c[i]=f,f[2]=e(t,n,u))return!0}return!1}}function we(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function ke(e,t,n,r,o){for(var i,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(i=e[s])&&(n&&!n(i,r,o)||(a.push(i),l&&t.push(s)));return a}function Ce(e,t,n,r,o,i){return r&&!r[x]&&(r=Ce(r)),o&&!o[x]&&(o=Ce(o,i)),le(function(i,a,s,u){var l,c,d,f=[],p=[],h=a.length,v=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!i&&t?v:ke(v,f,e,s,u),y=n?o||(i?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r)for(l=ke(y,p),r(l,[],s,u),c=l.length;c--;)(d=l[c])&&(y[p[c]]=!(m[p[c]]=d));if(i){if(o||e){if(o){for(l=[],c=y.length;c--;)(d=y[c])&&l.push(m[c]=d);o(null,y=[],l,u)}for(c=y.length;c--;)(d=y[c])&&(l=o?P(i,d):f[c])>-1&&(i[l]=!(a[l]=d))}}else y=ke(y===a?y.splice(h,y.length):y),o?o(null,a,y,u):L.apply(a,y)})}function Te(e){for(var t,n,o,i=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=xe(function(e){return e===t},s,!0),d=xe(function(e){return P(t,e)>-1},s,!0),f=[function(e,n,r){var o=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,o}];u<i;u++)if(n=r.relative[e[u].type])f=[xe(we(f),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[x]){for(o=++u;o<i&&!r.relative[e[o].type];o++);return Ce(u>1&&we(f),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(Q,"$1"),n,u<o&&Te(e.slice(u,o)),o<i&&Te(e=e.slice(o)),o<i&&be(e))}f.push(n)}return we(f)}return ge.prototype=r.filters=r.pseudos,r.setFilters=new ge,a=se.tokenize=function(e,t){var n,o,i,a,s,u,l,c=j[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(o=F.exec(s))||(o&&(s=s.slice(o[0].length)||s),u.push(i=[])),n=!1,(o=B.exec(s))&&(n=o.shift(),i.push({value:n,type:o[0].replace(Q," ")}),s=s.slice(n.length)),r.filter)!(o=V[a].exec(s))||l[a]&&!(o=l[a](o))||(n=o.shift(),i.push({value:n,type:a,matches:o}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):j(e,u).slice(0)},s=se.compile=function(e,t){var n,o=[],i=[],s=S[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=Te(t[n]))[x]?o.push(s):i.push(s);(s=S(e,function(e,t){var n=t.length>0,o=e.length>0,i=function(i,a,s,u,c){var d,h,m,y=0,g="0",b=i&&[],x=[],w=l,C=i||o&&r.find.TAG("*",c),T=k+=null==w?1:Math.random()||.1,j=C.length;for(c&&(l=a===p||a||c);g!==j&&null!=(d=C[g]);g++){if(o&&d){for(h=0,a||d.ownerDocument===p||(f(d),s=!v);m=e[h++];)if(m(d,a||p,s)){u.push(d);break}c&&(k=T)}n&&((d=!m&&d)&&y--,i&&b.push(d))}if(y+=g,n&&g!==y){for(h=0;m=t[h++];)m(b,x,a,s);if(i){if(y>0)for(;g--;)b[g]||x[g]||(x[g]=D.call(u));x=ke(x)}L.apply(u,x),c&&!i&&x.length>0&&y+t.length>1&&se.uniqueSort(u)}return c&&(k=T,l=w),b};return n?le(i):i}(i,o))).selector=e}return s},u=se.select=function(e,t,n,o){var i,u,l,c,d,f="function"==typeof e&&e,p=!o&&a(e=f.selector||e);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&v&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(i=V.needsContext.test(e)?0:u.length;i--&&(l=u[i],!r.relative[c=l.type]);)if((d=r.find[c])&&(o=d(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ye(t.parentNode)||t))){if(u.splice(i,1),!(e=o.length&&be(u)))return L.apply(n,o),n;break}}return(f||s(e,p))(o,t,!v,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=x.split("").sort(A).join("")===x,n.detectDuplicates=!!d,f(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||de(M,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(o);T.find=_,T.expr=_.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=_.uniqueSort,T.text=_.getText,T.isXMLDoc=_.isXML,T.contains=_.contains,T.escapeSelector=_.escape;var A=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&T(e).is(n))break;r.push(e)}return r},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=T.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return b(t)?T.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?T.grep(e,function(e){return e===t!==n}):"string"!=typeof t?T.grep(e,function(e){return f.call(t,e)>-1!==n}):T.filter(t,e,n)}T.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t<r;t++)if(T.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)T.find(e,o[t],n);return r>1?T.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&N.test(e)?T(e):e||[],!1).length}});var O,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||O,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:P.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 T?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:s,!0)),q.test(r[1])&&T.isPlainObject(t))for(r in t)b(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=s.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):b(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this)}).prototype=T.fn,O=T(s);var M=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function R(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(T.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,o=this.length,i=[],a="string"!=typeof e&&T(e);if(!N.test(e))for(;r<o;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&T.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?T.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?f.call(T(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return R(e,"nextSibling")},prev:function(e){return R(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(D(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},function(e,t){T.fn[e]=function(n,r){var o=T.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=T.filter(r,o)),this.length>1&&(H[e]||T.uniqueSort(o),M.test(e)&&o.reverse()),this.pushStack(o)}});var I=/[^\x20\t\r\n\f]+/g;function W(e){return e}function $(e){throw e}function Q(e,t,n,r){var o;try{e&&b(o=e.promise)?o.call(e).done(t).fail(n):e&&b(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}T.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return T.each(e.match(I)||[],function(e,n){t[n]=!0}),t}(e):T.extend({},e);var t,n,r,o,i=[],a=[],s=-1,u=function(){for(o=o||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<i.length;)!1===i[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=i.length,n=!1);e.memory||(n=!1),t=!1,o&&(i=n?[]:"")},l={add:function(){return i&&(n&&!t&&(s=i.length-1,a.push(n)),function t(n){T.each(n,function(n,r){b(r)?e.unique&&l.has(r)||i.push(r):r&&r.length&&"string"!==C(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return T.each(arguments,function(e,t){for(var n;(n=T.inArray(t,i,n))>-1;)i.splice(n,1),n<=s&&s--}),this},has:function(e){return e?T.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},T.extend({Deferred:function(e){var t=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return T.Deferred(function(n){T.each(t,function(t,r){var o=b(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=o&&o.apply(this,arguments);e&&b(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(e,n,i){var a=0;function s(e,t,n,i){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<a)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===r(o)||"function"==typeof o)&&o.then,b(c)?i?c.call(o,s(a,t,W,i),s(a,t,$,i)):(a++,c.call(o,s(a,t,W,i),s(a,t,$,i),s(a,t,W,t.notifyWith))):(n!==W&&(u=void 0,l=[o]),(i||t.resolveWith)(u,l))}},d=i?c:function(){try{c()}catch(r){T.Deferred.exceptionHook&&T.Deferred.exceptionHook(r,d.stackTrace),e+1>=a&&(n!==$&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?d():(T.Deferred.getStackHook&&(d.stackTrace=T.Deferred.getStackHook()),o.setTimeout(d))}}return T.Deferred(function(r){t[0][3].add(s(0,r,b(i)?i:W,r.notifyWith)),t[1][3].add(s(0,r,b(e)?e:W)),t[2][3].add(s(0,r,b(n)?n:$))}).promise()},promise:function(e){return null!=e?T.extend(e,i):i}},a={};return T.each(t,function(e,r){var o=r[2],s=r[5];i[r[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(r[3].fire),a[r[0]]=function(){return a[r[0]+"With"](this===a?void 0:this,arguments),this},a[r[0]+"With"]=o.fireWith}),i.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),o=l.call(arguments),i=T.Deferred(),a=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?l.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&(Q(e,i.done(a(n)).resolve,i.reject,!t),"pending"===i.state()||b(o[n]&&o[n].then)))return i.then();for(;n--;)Q(o[n],a(n),i.reject);return i.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&F.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},T.readyException=function(e){o.setTimeout(function(){throw e})};var B=T.Deferred();function z(){s.removeEventListener("DOMContentLoaded",z),o.removeEventListener("load",z),T.ready()}T.fn.ready=function(e){return B.then(e).catch(function(e){T.readyException(e)}),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==e&&--T.readyWait>0||B.resolveWith(s,[T]))}}),T.ready.then=B.then,"complete"===s.readyState||"loading"!==s.readyState&&!s.documentElement.doScroll?o.setTimeout(T.ready):(s.addEventListener("DOMContentLoaded",z),o.addEventListener("load",z));var U=function e(t,n,r,o,i,a,s){var u=0,l=t.length,c=null==r;if("object"===C(r))for(u in i=!0,r)e(t,n,u,r[u],!0,a,s);else if(void 0!==o&&(i=!0,b(o)||(s=!0),c&&(s?(n.call(t,o),n=null):(c=n,n=function(e,t,n){return c.call(T(e),n)})),n))for(;u<l;u++)n(t[u],r,s?o:o.call(t[u],u,n(t[u],r)));return i?t:c?n.call(t):l?n(t[0],r):a},X=/^-ms-/,V=/-([a-z])/g;function G(e,t){return t.toUpperCase()}function J(e){return e.replace(X,"ms-").replace(V,G)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function K(){this.expando=T.expando+K.uid++}K.uid=1,K.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"==typeof t)o[J(t)]=n;else for(r in t)o[J(r)]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][J(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(J):(t=J(t))in r?[t]:t.match(I)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||T.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&&!T.isEmptyObject(t)}};var Z=new K,ee=new K,te=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ne=/[A-Z]/g;function re(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ne,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:te.test(e)?JSON.parse(e):e)}(n)}catch(e){}ee.set(e,t,n)}else n=void 0;return n}T.extend({hasData:function(e){return ee.hasData(e)||Z.hasData(e)},data:function(e,t,n){return ee.access(e,t,n)},removeData:function(e,t){ee.remove(e,t)},_data:function(e,t,n){return Z.access(e,t,n)},_removeData:function(e,t){Z.remove(e,t)}}),T.fn.extend({data:function(e,t){var n,o,i,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(i=ee.get(a),1===a.nodeType&&!Z.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(o=s[n].name).indexOf("data-")&&(o=J(o.slice(5)),re(a,o,i[o]));Z.set(a,"hasDataAttrs",!0)}return i}return"object"===r(e)?this.each(function(){ee.set(this,e)}):U(this,function(t){var n;if(a&&void 0===t)return void 0!==(n=ee.get(a,e))?n:void 0!==(n=re(a,e))?n:void 0;this.each(function(){ee.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ee.remove(this,e)})}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Z.get(e,t),n&&(!r||Array.isArray(n)?r=Z.access(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,o=n.shift(),i=T._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,function(){T.dequeue(e,t)},i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Z.get(e,n)||Z.access(e,n,{empty:T.Callbacks("once memory").add(function(){Z.remove(e,[t+"queue",n])})})}}),T.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?T.queue(this[0],e):void 0===t?this:this.each(function(){var n=T.queue(this,e,t);T._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&T.dequeue(this,e)})},dequeue:function(e){return this.each(function(){T.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=T.Deferred(),i=this,a=this.length,s=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Z.get(i[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),o.promise(t)}});var oe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+oe+")([a-z%]*)$","i"),ae=["Top","Right","Bottom","Left"],se=s.documentElement,ue=function(e){return T.contains(e.ownerDocument,e)},le={composed:!0};se.getRootNode&&(ue=function(e){return T.contains(e.ownerDocument,e)||e.getRootNode(le)===e.ownerDocument});var ce=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ue(e)&&"none"===T.css(e,"display")},de=function(e,t,n,r){var o,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=n.apply(e,r||[]),t)e.style[i]=a[i];return o};function fe(e,t,n,r){var o,i,a=20,s=r?function(){return r.cur()}:function(){return T.css(e,t,"")},u=s(),l=n&&n[3]||(T.cssNumber[t]?"":"px"),c=e.nodeType&&(T.cssNumber[t]||"px"!==l&&+u)&&ie.exec(T.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)T.style(e,t,c+l),(1-i)*(1-(i=s()/u||.5))<=0&&(a=0),c/=i;c*=2,T.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=o)),o}var pe={};function he(e){var t,n=e.ownerDocument,r=e.nodeName,o=pe[r];return o||(t=n.body.appendChild(n.createElement(r)),o=T.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),pe[r]=o,o)}function ve(e,t){for(var n,r,o=[],i=0,a=e.length;i<a;i++)(r=e[i]).style&&(n=r.style.display,t?("none"===n&&(o[i]=Z.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&ce(r)&&(o[i]=he(r))):"none"!==n&&(o[i]="none",Z.set(r,"display",n)));for(i=0;i<a;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}T.fn.extend({show:function(){return ve(this,!0)},hide:function(){return ve(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ce(this)?T(this).show():T(this).hide()})}});var me=/^(?:checkbox|radio)$/i,ye=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i,be={option:[1,"<select multiple='multiple'>","</select>"],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 xe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?T.merge([e],n):n}function we(e,t){for(var n=0,r=e.length;n<r;n++)Z.set(e[n],"globalEval",!t||Z.get(t[n],"globalEval"))}be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td;var ke=/<|&#?\w+;/;function Ce(e,t,n,r,o){for(var i,a,s,u,l,c,d=t.createDocumentFragment(),f=[],p=0,h=e.length;p<h;p++)if((i=e[p])||0===i)if("object"===C(i))T.merge(f,i.nodeType?[i]:i);else if(ke.test(i)){for(a=a||d.appendChild(t.createElement("div")),s=(ye.exec(i)||["",""])[1].toLowerCase(),u=be[s]||be._default,a.innerHTML=u[1]+T.htmlPrefilter(i)+u[2],c=u[0];c--;)a=a.lastChild;T.merge(f,a.childNodes),(a=d.firstChild).textContent=""}else f.push(t.createTextNode(i));for(d.textContent="",p=0;i=f[p++];)if(r&&T.inArray(i,r)>-1)o&&o.push(i);else if(l=ue(i),a=xe(d.appendChild(i),"script"),l&&we(a),n)for(c=0;i=a[c++];)ge.test(i.type||"")&&n.push(i);return d}!function(){var e=s.createDocumentFragment().appendChild(s.createElement("div")),t=s.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),g.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Te=/^key/,je=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Se=/^([^.]*)(?:\.(.+)|)/;function _e(){return!0}function Ae(){return!1}function Ee(e,t){return e===function(){try{return s.activeElement}catch(e){}}()==("focus"===t)}function Ne(e,t,n,o,i,a){var s,u;if("object"===r(t)){for(u in"string"!=typeof n&&(o=o||n,n=void 0),t)Ne(e,u,n,o,t[u],a);return e}if(null==o&&null==i?(i=n,o=n=void 0):null==i&&("string"==typeof n?(i=o,o=void 0):(i=o,o=n,n=void 0)),!1===i)i=Ae;else if(!i)return e;return 1===a&&(s=i,(i=function(e){return T().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,o,n)})}function De(e,t,n){n?(Z.set(e,t,!1),T.event.add(e,t,{namespace:!1,handler:function(e){var r,o,i=Z.get(this,t);if(1&e.isTrigger&&this[t]){if(i.length)(T.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=l.call(arguments),Z.set(this,t,i),r=n(this,t),this[t](),i!==(o=Z.get(this,t))||r?Z.set(this,t,!1):o={},i!==o)return e.stopImmediatePropagation(),e.preventDefault(),o.value}else i.length&&(Z.set(this,t,{value:T.event.trigger(T.extend(i[0],T.Event.prototype),i.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Z.get(e,t)&&T.event.add(e,t,_e)}T.event={global:{},add:function(e,t,n,r,o){var i,a,s,u,l,c,d,f,p,h,v,m=Z.get(e);if(m)for(n.handler&&(n=(i=n).handler,o=i.selector),o&&T.find.matchesSelector(se,o),n.guid||(n.guid=T.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==T&&T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;l--;)p=v=(s=Se.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=T.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=T.event.special[p]||{},c=T.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&T.expr.match.needsContext.test(o),namespace:h.join(".")},i),(f=u[p])||((f=u[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,c):f.push(c),T.event.global[p]=!0)},remove:function(e,t,n,r,o){var i,a,s,u,l,c,d,f,p,h,v,m=Z.hasData(e)&&Z.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(I)||[""]).length;l--;)if(p=v=(s=Se.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=T.event.special[p]||{},f=u[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=f.length;i--;)c=f[i],!o&&v!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(i,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,m.handle)||T.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)T.event.remove(e,p+t[l],n,r,!0);T.isEmptyObject(u)&&Z.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,a,s=T.event.fix(e),u=new Array(arguments.length),l=(Z.get(this,"events")||{})[s.type]||[],c=T.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=T.event.handlers.call(this,s,l),t=0;(o=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==i.namespace&&!s.rnamespace.test(i.namespace)||(s.handleObj=i,s.data=i.data,void 0!==(r=((T.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,o,i,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(i=[],a={},n=0;n<u;n++)void 0===a[o=(r=t[n]).selector+" "]&&(a[o]=r.needsContext?T(o,this).index(l)>-1:T.find(o,this,null,[l]).length),a[o]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(T.Event.prototype,e,{enumerable:!0,configurable:!0,get:b(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[T.expando]?e:new T.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return me.test(t.type)&&t.click&&D(t,"input")&&De(t,"click",_e),!1},trigger:function(e){var t=this||e;return me.test(t.type)&&t.click&&D(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return me.test(t.type)&&t.click&&D(t,"input")&&Z.get(t,"click")||D(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},T.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},T.Event=function(e,t){if(!(this instanceof T.Event))return new T.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?_e:Ae,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&&T.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:Ae,isPropagationStopped:Ae,isImmediatePropagationStopped:Ae,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=_e,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=_e,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=_e,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},T.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:function(e){var t=e.button;return null==e.which&&Te.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&je.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},T.event.addProp),T.each({focus:"focusin",blur:"focusout"},function(e,t){T.event.special[e]={setup:function(){return De(this,e,Ee),!1},trigger:function(){return De(this,e),!0},delegateType:t}}),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){T.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,o=e.handleObj;return r&&(r===this||T.contains(this,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),T.fn.extend({on:function(e,t,n,r){return Ne(this,e,t,n,r)},one:function(e,t,n,r){return Ne(this,e,t,n,r,1)},off:function(e,t,n){var o,i;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,T(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"===r(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=Ae),this.each(function(){T.event.remove(this,e,n,t)})}});var qe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/<script|<style|<link/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Me(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ie(e,t){var n,r,o,i,a,s,u,l;if(1===t.nodeType){if(Z.hasData(e)&&(i=Z.access(e),a=Z.set(t,i),l=i.events))for(o in delete a.handle,a.events={},l)for(n=0,r=l[o].length;n<r;n++)T.event.add(t,o,l[o][n]);ee.hasData(e)&&(s=ee.access(e),u=T.extend({},s),ee.set(t,u))}}function We(e,t){var n=t.nodeName.toLowerCase();"input"===n&&me.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function $e(e,t,n,r){t=c.apply([],t);var o,i,a,s,u,l,d=0,f=e.length,p=f-1,h=t[0],v=b(h);if(v||f>1&&"string"==typeof h&&!g.checkClone&&Oe.test(h))return e.each(function(o){var i=e.eq(o);v&&(t[0]=h.call(this,o,i.html())),$e(i,t,n,r)});if(f&&(i=(o=Ce(t,e[0].ownerDocument,!1,e,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=(a=T.map(xe(o,"script"),He)).length;d<f;d++)u=o,d!==p&&(u=T.clone(u,!0,!0),s&&T.merge(a,xe(u,"script"))),n.call(e[d],u,d);if(s)for(l=a[a.length-1].ownerDocument,T.map(a,Re),d=0;d<s;d++)u=a[d],ge.test(u.type||"")&&!Z.access(u,"globalEval")&&T.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?T._evalUrl&&!u.noModule&&T._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):k(u.textContent.replace(Pe,""),u,l))}return e}function Qe(e,t,n){for(var r,o=t?T.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||T.cleanData(xe(r)),r.parentNode&&(n&&ue(r)&&we(xe(r,"script")),r.parentNode.removeChild(r));return e}T.extend({htmlPrefilter:function(e){return e.replace(qe,"<$1></$2>")},clone:function(e,t,n){var r,o,i,a,s=e.cloneNode(!0),u=ue(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(a=xe(s),r=0,o=(i=xe(e)).length;r<o;r++)We(i[r],a[r]);if(t)if(n)for(i=i||xe(e),a=a||xe(s),r=0,o=i.length;r<o;r++)Ie(i[r],a[r]);else Ie(e,s);return(a=xe(s,"script")).length>0&&we(a,!u&&xe(e,"script")),s},cleanData:function(e){for(var t,n,r,o=T.event.special,i=0;void 0!==(n=e[i]);i++)if(Y(n)){if(t=n[Z.expando]){if(t.events)for(r in t.events)o[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[Z.expando]=void 0}n[ee.expando]&&(n[ee.expando]=void 0)}}}),T.fn.extend({detach:function(e){return Qe(this,e,!0)},remove:function(e){return Qe(this,e)},text:function(e){return U(this,function(e){return void 0===e?T.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||Me(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Me(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&&(T.cleanData(xe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return U(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&&!Le.test(e)&&!be[(ye.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(T.cleanData(xe(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return $e(this,arguments,function(t){var n=this.parentNode;T.inArray(this,e)<0&&(T.cleanData(xe(this)),n&&n.replaceChild(t,this))},e)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){T.fn[e]=function(e){for(var n,r=[],o=T(e),i=o.length-1,a=0;a<=i;a++)n=a===i?this:this.clone(!0),T(o[a])[t](n),d.apply(r,n.get());return this.pushStack(r)}});var Fe=new RegExp("^("+oe+")(?!px)[a-z%]+$","i"),Be=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)},ze=new RegExp(ae.join("|"),"i");function Ue(e,t,n){var r,o,i,a,s=e.style;return(n=n||Be(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ue(e)||(a=T.style(e,t)),!g.pixelBoxStyles()&&Fe.test(a)&&ze.test(t)&&(r=s.width,o=s.minWidth,i=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=o,s.maxWidth=i)),void 0!==a?a+"":a}function Xe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",se.appendChild(l).appendChild(c);var e=o.getComputedStyle(c);n="1%"!==e.top,u=12===t(e.marginLeft),c.style.right="60%",a=36===t(e.right),r=36===t(e.width),c.style.position="absolute",i=12===t(c.offsetWidth/3),se.removeChild(l),c=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,a,u,l=s.createElement("div"),c=s.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===c.style.backgroundClip,T.extend(g,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),i}}))}();var Ve=["Webkit","Moz","ms"],Ge=s.createElement("div").style,Je={};function Ye(e){var t=T.cssProps[e]||Je[e];return t||(e in Ge?e:Je[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ve.length;n--;)if((e=Ve[n]+t)in Ge)return e}(e)||e)}var Ke=/^(none|table(?!-c[ea]).+)/,Ze=/^--/,et={position:"absolute",visibility:"hidden",display:"block"},tt={letterSpacing:"0",fontWeight:"400"};function nt(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function rt(e,t,n,r,o,i){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=T.css(e,n+ae[a],!0,o)),r?("content"===n&&(u-=T.css(e,"padding"+ae[a],!0,o)),"margin"!==n&&(u-=T.css(e,"border"+ae[a]+"Width",!0,o))):(u+=T.css(e,"padding"+ae[a],!0,o),"padding"!==n?u+=T.css(e,"border"+ae[a]+"Width",!0,o):s+=T.css(e,"border"+ae[a]+"Width",!0,o));return!r&&i>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-u-s-.5))||0),u}function ot(e,t,n){var r=Be(e),o=(!g.boxSizingReliable()||n)&&"border-box"===T.css(e,"boxSizing",!1,r),i=o,a=Ue(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Fe.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&o||"auto"===a||!parseFloat(a)&&"inline"===T.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===T.css(e,"boxSizing",!1,r),(i=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+rt(e,t,n||(o?"border":"content"),i,r,a)+"px"}function it(e,t,n,r,o){return new it.prototype.init(e,t,n,r,o)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ue(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!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,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,s,u=J(t),l=Ze.test(t),c=e.style;if(l||(t=Ye(u)),s=T.cssHooks[t]||T.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,o))?i:c[t];"string"===(a=r(n))&&(i=ie.exec(n))&&i[1]&&(n=fe(e,t,i),a="number"),null!=n&&n==n&&("number"!==a||l||(n+=i&&i[3]||(T.cssNumber[u]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,o))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var o,i,a,s=J(t);return Ze.test(t)||(t=Ye(s)),(a=T.cssHooks[t]||T.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=Ue(e,t,r)),"normal"===o&&t in tt&&(o=tt[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),T.each(["height","width"],function(e,t){T.cssHooks[t]={get:function(e,n,r){if(n)return!Ke.test(T.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,t,r):de(e,et,function(){return ot(e,t,r)})},set:function(e,n,r){var o,i=Be(e),a=!g.scrollboxSize()&&"absolute"===i.position,s=(a||r)&&"border-box"===T.css(e,"boxSizing",!1,i),u=r?rt(e,t,r,s,i):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-rt(e,t,"border",!1,i)-.5)),u&&(o=ie.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=T.css(e,t)),nt(0,n,u)}}}),T.cssHooks.marginLeft=Xe(g.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ue(e,"marginLeft"))||e.getBoundingClientRect().left-de(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),T.each({margin:"",padding:"",border:"Width"},function(e,t){T.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[e+ae[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(T.cssHooks[e+t].set=nt)}),T.fn.extend({css:function(e,t){return U(this,function(e,t,n){var r,o,i={},a=0;if(Array.isArray(t)){for(r=Be(e),o=t.length;a<o;a++)i[t[a]]=T.css(e,t[a],!1,r);return i}return void 0!==n?T.style(e,t,n):T.css(e,t)},e,t,arguments.length>1)}}),T.Tween=it,it.prototype={constructor:it,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(T.cssNumber[n]?"":"px")},cur:function(){var e=it.propHooks[this.prop];return e&&e.get?e.get(this):it.propHooks._default.get(this)},run:function(e){var t,n=it.propHooks[this.prop];return this.options.duration?this.pos=t=T.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):it.propHooks._default.set(this),this}},it.prototype.init.prototype=it.prototype,it.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=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||!T.cssHooks[e.prop]&&null==e.elem.style[Ye(e.prop)]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}},it.propHooks.scrollTop=it.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=it.prototype.init,T.fx.step={};var at,st,ut=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ct(){st&&(!1===s.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(ct):o.setTimeout(ct,T.fx.interval),T.fx.tick())}function dt(){return o.setTimeout(function(){at=void 0}),at=Date.now()}function ft(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)o["margin"+(n=ae[r])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function pt(e,t,n){for(var r,o=(ht.tweeners[t]||[]).concat(ht.tweeners["*"]),i=0,a=o.length;i<a;i++)if(r=o[i].call(n,t,e))return r}function ht(e,t,n){var r,o,i=0,a=ht.prefilters.length,s=T.Deferred().always(function(){delete u.elem}),u=function(){if(o)return!1;for(var t=at||dt(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),i=0,a=l.tweens.length;i<a;i++)l.tweens[i].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:T.extend({},t),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},n),originalProperties:t,originalOptions:n,startTime:at||dt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=T.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(o)return this;for(o=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,o,i,a;for(n in e)if(o=t[r=J(n)],i=e[n],Array.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),(a=T.cssHooks[r])&&"expand"in a)for(n in i=a.expand(i),delete e[r],i)n in e||(e[n]=i[n],t[n]=o);else t[r]=o}(c,l.opts.specialEasing);i<a;i++)if(r=ht.prefilters[i].call(l,e,c,l.opts))return b(r.stop)&&(T._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return T.map(c,pt,l),b(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),T.fx.timer(T.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}T.Animation=T.extend(ht,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return fe(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){b(e)?(t=e,e=["*"]):e=e.match(I);for(var n,r=0,o=e.length;r<o;r++)n=e[r],ht.tweeners[n]=ht.tweeners[n]||[],ht.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,o,i,a,s,u,l,c,d="width"in t||"height"in t,f=this,p={},h=e.style,v=e.nodeType&&ce(e),m=Z.get(e,"fxshow");for(r in n.queue||(null==(a=T._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,f.always(function(){f.always(function(){a.unqueued--,T.queue(e,"fx").length||a.empty.fire()})})),t)if(o=t[r],ut.test(o)){if(delete t[r],i=i||"toggle"===o,o===(v?"hide":"show")){if("show"!==o||!m||void 0===m[r])continue;v=!0}p[r]=m&&m[r]||T.style(e,r)}if((u=!T.isEmptyObject(t))||!T.isEmptyObject(p))for(r in d&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=m&&m.display)&&(l=Z.get(e,"display")),"none"===(c=T.css(e,"display"))&&(l?c=l:(ve([e],!0),l=e.style.display||l,c=T.css(e,"display"),ve([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===T.css(e,"float")&&(u||(f.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",f.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,p)u||(m?"hidden"in m&&(v=m.hidden):m=Z.access(e,"fxshow",{display:l}),i&&(m.hidden=!v),v&&ve([e],!0),f.done(function(){for(r in v||ve([e]),Z.remove(e,"fxshow"),p)T.style(e,r,p[r])})),u=pt(v?m[r]:0,r,f),r in m||(m[r]=u.start,v&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ht.prefilters.unshift(e):ht.prefilters.push(e)}}),T.speed=function(e,t,n){var o=e&&"object"===r(e)?T.extend({},e):{complete:n||!n&&t||b(e)&&e,duration:e,easing:n&&t||t&&!b(t)&&t};return T.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in T.fx.speeds?o.duration=T.fx.speeds[o.duration]:o.duration=T.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){b(o.old)&&o.old.call(this),o.queue&&T.dequeue(this,o.queue)},o},T.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ce).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=T.isEmptyObject(e),i=T.speed(t,n,r),a=function(){var t=ht(this,T.extend({},e),i);(o||Z.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===i.queue?this.each(a):this.queue(i.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",i=T.timers,a=Z.get(this);if(o)a[o]&&a[o].stop&&r(a[o]);else for(o in a)a[o]&&a[o].stop&&lt.test(o)&&r(a[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));!t&&n||T.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Z.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=T.timers,a=r?r.length:0;for(n.finish=!0,T.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),T.each(["toggle","show","hide"],function(e,t){var n=T.fn[t];T.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ft(t,!0),e,r,o)}}),T.each({slideDown:ft("show"),slideUp:ft("hide"),slideToggle:ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){T.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),T.timers=[],T.fx.tick=function(){var e,t=0,n=T.timers;for(at=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||T.fx.stop(),at=void 0},T.fx.timer=function(e){T.timers.push(e),T.fx.start()},T.fx.interval=13,T.fx.start=function(){st||(st=!0,ct())},T.fx.stop=function(){st=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(e,t){return e=T.fx&&T.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=s.createElement("input"),t=s.createElement("select").appendChild(s.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=s.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var vt,mt=T.expr.attrHandle;T.fn.extend({attr:function(e,t){return U(this,T.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?T.prop(e,t,n):(1===i&&T.isXMLDoc(e)||(o=T.attrHooks[t.toLowerCase()]||(T.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void T.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:null==(r=T.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(I);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(e,t){var n=mt[t]||T.find.attr;mt[t]=function(e,t,r){var o,i,a=t.toLowerCase();return r||(i=mt[a],mt[a]=o,o=null!=n(e,t,r)?a:null,mt[a]=i),o}});var yt=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function bt(e){return(e.match(I)||[]).join(" ")}function xt(e){return e.getAttribute&&e.getAttribute("class")||""}function wt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(I)||[]}T.fn.extend({prop:function(e,t){return U(this,T.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&T.isXMLDoc(e)||(t=T.propFix[t]||t,o=T.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=T.find.attr(e,"tabindex");return t?parseInt(t,10):yt.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(T.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)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(e){var t,n,r,o,i,a,s,u=0;if(b(e))return this.each(function(t){T(this).addClass(e.call(this,t,xt(this)))});if((t=wt(e)).length)for(;n=this[u++];)if(o=xt(n),r=1===n.nodeType&&" "+bt(o)+" "){for(a=0;i=t[a++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");o!==(s=bt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,o,i,a,s,u=0;if(b(e))return this.each(function(t){T(this).removeClass(e.call(this,t,xt(this)))});if(!arguments.length)return this.attr("class","");if((t=wt(e)).length)for(;n=this[u++];)if(o=xt(n),r=1===n.nodeType&&" "+bt(o)+" "){for(a=0;i=t[a++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");o!==(s=bt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=r(e),o="string"===n||Array.isArray(e);return"boolean"==typeof t&&o?t?this.addClass(e):this.removeClass(e):b(e)?this.each(function(n){T(this).toggleClass(e.call(this,n,xt(this),t),t)}):this.each(function(){var t,r,i,a;if(o)for(r=0,i=T(this),a=wt(e);t=a[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=xt(this))&&Z.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Z.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+bt(xt(n))+" ").indexOf(t)>-1)return!0;return!1}});var kt=/\r/g;T.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=b(e),this.each(function(n){var o;1===this.nodeType&&(null==(o=r?e.call(this,n,T(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=T.map(o,function(e){return null==e?"":e+""})),(t=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=T.valHooks[o.type]||T.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(kt,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:bt(T.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?i+1:o.length;for(r=i<0?u:a?i:0;r<u;r++)if(((n=o[r]).selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!D(n.parentNode,"optgroup"))){if(t=T(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=T.makeArray(t),a=o.length;a--;)((r=o[a]).selected=T.inArray(T.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=T.inArray(T(e).val(),t)>-1}},g.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),g.focusin="onfocusin"in o;var Ct=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(e,t,n,i){var a,u,l,c,d,f,p,h,m=[n||s],y=v.call(e,"type")?e.type:e,g=v.call(e,"namespace")?e.namespace.split("."):[];if(u=h=l=n=n||s,3!==n.nodeType&&8!==n.nodeType&&!Ct.test(y+T.event.triggered)&&(y.indexOf(".")>-1&&(y=(g=y.split(".")).shift(),g.sort()),d=y.indexOf(":")<0&&"on"+y,(e=e[T.expando]?e:new T.Event(y,"object"===r(e)&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:T.makeArray(t,[e]),p=T.event.special[y]||{},i||!p.trigger||!1!==p.trigger.apply(n,t))){if(!i&&!p.noBubble&&!x(n)){for(c=p.delegateType||y,Ct.test(c+y)||(u=u.parentNode);u;u=u.parentNode)m.push(u),l=u;l===(n.ownerDocument||s)&&m.push(l.defaultView||l.parentWindow||o)}for(a=0;(u=m[a++])&&!e.isPropagationStopped();)h=u,e.type=a>1?c:p.bindType||y,(f=(Z.get(u,"events")||{})[e.type]&&Z.get(u,"handle"))&&f.apply(u,t),(f=d&&u[d])&&f.apply&&Y(u)&&(e.result=f.apply(u,t),!1===e.result&&e.preventDefault());return e.type=y,i||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(m.pop(),t)||!Y(n)||d&&b(n[y])&&!x(n)&&((l=n[d])&&(n[d]=null),T.event.triggered=y,e.isPropagationStopped()&&h.addEventListener(y,Tt),n[y](),e.isPropagationStopped()&&h.removeEventListener(y,Tt),T.event.triggered=void 0,l&&(n[d]=l)),e.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}}),g.focusin||T.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){T.event.simulate(t,e.target,T.event.fix(e))};T.event.special[t]={setup:function(){var r=this.ownerDocument||this,o=Z.access(r,t);o||r.addEventListener(e,n,!0),Z.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=Z.access(r,t)-1;o?Z.access(r,t,o):(r.removeEventListener(e,n,!0),Z.remove(r,t))}}});var jt=o.location,St=Date.now(),_t=/\?/;T.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||T.error("Invalid XML: "+e),t};var At=/\[\]$/,Et=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function qt(e,t,n,o){var i;if(Array.isArray(t))T.each(t,function(t,i){n||At.test(e)?o(e,i):qt(e+"["+("object"===r(i)&&null!=i?t:"")+"]",i,n,o)});else if(n||"object"!==C(t))o(e,t);else for(i in t)qt(e+"["+i+"]",t[i],n,o)}T.param=function(e,t){var n,r=[],o=function(e,t){var n=b(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){o(this.name,this.value)});else for(n in e)qt(n,e[n],t,o);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&Dt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!me.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Lt=/%20/g,Ot=/#.*$/,Pt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Qt=s.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(I)||[];if(b(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Bt(e,t,n,r){var o={},i=e===Wt;function a(s){var u;return o[s]=!0,T.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||i||o[l]?i?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!o["*"]&&a("*")}function zt(e,t){var n,r,o=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}Qt.href=jt.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(jt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,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":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,T.ajaxSettings),t):zt(T.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(e,t){"object"===r(e)&&(t=e,e=void 0),t=t||{};var n,i,a,u,l,c,d,f,p,h,v=T.ajaxSetup({},t),m=v.context||v,y=v.context&&(m.nodeType||m.jquery)?T(m):T.event,g=T.Deferred(),b=T.Callbacks("once memory"),x=v.statusCode||{},w={},k={},C="canceled",j={readyState:0,getResponseHeader:function(e){var t;if(d){if(!u)for(u={};t=Mt.exec(a);)u[t[1].toLowerCase()+" "]=(u[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=u[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return d?a:null},setRequestHeader:function(e,t){return null==d&&(e=k[e.toLowerCase()]=k[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==d&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(d)j.always(e[j.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return n&&n.abort(t),S(0,t),this}};if(g.promise(j),v.url=((e||v.url||jt.href)+"").replace(Rt,jt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(I)||[""],null==v.crossDomain){c=s.createElement("a");try{c.href=v.url,c.href=c.href,v.crossDomain=Qt.protocol+"//"+Qt.host!=c.protocol+"//"+c.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=T.param(v.data,v.traditional)),Bt(It,v,t,j),d)return j;for(p in(f=T.event&&v.global)&&0==T.active++&&T.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ht.test(v.type),i=v.url.replace(Ot,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Lt,"+")):(h=v.url.slice(i.length),v.data&&(v.processData||"string"==typeof v.data)&&(i+=(_t.test(i)?"&":"?")+v.data,delete v.data),!1===v.cache&&(i=i.replace(Pt,"$1"),h=(_t.test(i)?"&":"?")+"_="+St+++h),v.url=i+h),v.ifModified&&(T.lastModified[i]&&j.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&j.setRequestHeader("If-None-Match",T.etag[i])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&j.setRequestHeader("Content-Type",v.contentType),j.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+$t+"; q=0.01":""):v.accepts["*"]),v.headers)j.setRequestHeader(p,v.headers[p]);if(v.beforeSend&&(!1===v.beforeSend.call(m,j,v)||d))return j.abort();if(C="abort",b.add(v.complete),j.done(v.success),j.fail(v.error),n=Bt(Wt,v,t,j)){if(j.readyState=1,f&&y.trigger("ajaxSend",[j,v]),d)return j;v.async&&v.timeout>0&&(l=o.setTimeout(function(){j.abort("timeout")},v.timeout));try{d=!1,n.send(w,S)}catch(e){if(d)throw e;S(-1,e)}}else S(-1,"No Transport");function S(e,t,r,s){var u,c,p,h,w,k=t;d||(d=!0,l&&o.clearTimeout(l),n=void 0,a=s||"",j.readyState=e>0?4:0,u=e>=200&&e<300||304===e,r&&(h=function(e,t,n){for(var r,o,i,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in s)if(s[o]&&s[o].test(r)){u.unshift(o);break}if(u[0]in n)i=u[0];else{for(o in n){if(!u[0]||e.converters[o+" "+u[0]]){i=o;break}a||(a=o)}i=i||a}if(i)return i!==u[0]&&u.unshift(i),n[i]}(v,j,r)),h=function(e,t,n,r){var o,i,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=c.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(!(a=l[u+" "+i]||l["* "+i]))for(o in l)if((s=o.split(" "))[1]===i&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[o]:!0!==l[o]&&(i=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 "+i}}}return{state:"success",data:t}}(v,h,j,u),u?(v.ifModified&&((w=j.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=w),(w=j.getResponseHeader("etag"))&&(T.etag[i]=w)),204===e||"HEAD"===v.type?k="nocontent":304===e?k="notmodified":(k=h.state,c=h.data,u=!(p=h.error))):(p=k,!e&&k||(k="error",e<0&&(e=0))),j.status=e,j.statusText=(t||k)+"",u?g.resolveWith(m,[c,k,j]):g.rejectWith(m,[j,k,p]),j.statusCode(x),x=void 0,f&&y.trigger(u?"ajaxSuccess":"ajaxError",[j,v,u?c:p]),b.fireWith(m,[j,k]),f&&(y.trigger("ajaxComplete",[j,v]),--T.active||T.event.trigger("ajaxStop")))}return j},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,t){T[t]=function(e,n,r,o){return b(n)&&(o=o||r,r=n,n=void 0),T.ajax(T.extend({url:e,type:t,dataType:o,data:n,success:r},T.isPlainObject(e)&&e))}}),T._evalUrl=function(e,t){return T.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){T.globalEval(e,t)}})},T.fn.extend({wrapAll:function(e){var t;return this[0]&&(b(e)&&(e=e.call(this[0])),t=T(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return b(e)?this.each(function(t){T(this).wrapInner(e.call(this,t))}):this.each(function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b(e);return this.each(function(n){T(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Xt=T.ajaxSettings.xhr();g.cors=!!Xt&&"withCredentials"in Xt,g.ajax=Xt=!!Xt,T.ajaxTransport(function(e){var t,n;if(g.cors||Xt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),T.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),T.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 T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),T.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=T("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),s.head.appendChild(t[0])},abort:function(){n&&n()}}});var Vt=[],Gt=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vt.pop()||T.expando+"_"+St++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(Gt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=b(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Gt,"$1"+r):!1!==e.jsonp&&(e.url+=(_t.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||T.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?T(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Vt.push(r)),a&&b(i)&&i(a[0]),a=i=void 0}),"script"}),g.createHTMLDocument=function(){var e=s.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((r=(t=s.implementation.createHTMLDocument("")).createElement("base")).href=s.location.href,t.head.appendChild(r)):t=s),o=q.exec(e),i=!n&&[],o?[t.createElement(o[1])]:(o=Ce([e],t,i),i&&i.length&&T(i).remove(),T.merge([],o.childNodes)));var r,o,i},T.fn.load=function(e,t,n){var o,i,a,s=this,u=e.indexOf(" ");return u>-1&&(o=bt(e.slice(u)),e=e.slice(0,u)),b(t)?(n=t,t=void 0):t&&"object"===r(t)&&(i="POST"),s.length>0&&T.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(o?T("<div>").append(T.parseHTML(e)).find(o):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.pseudos.animated=function(e){return T.grep(T.timers,function(t){return e===t.elem}).length},T.offset={setOffset:function(e,t,n){var r,o,i,a,s,u,l=T.css(e,"position"),c=T(e),d={};"static"===l&&(e.style.position="relative"),s=c.offset(),i=T.css(e,"top"),u=T.css(e,"left"),("absolute"===l||"fixed"===l)&&(i+u).indexOf("auto")>-1?(a=(r=c.position()).top,o=r.left):(a=parseFloat(i)||0,o=parseFloat(u)||0),b(t)&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+o),"using"in t?t.using.call(e,d):c.css(d)}},T.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){T.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],o={top:0,left:0};if("fixed"===T.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===T.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((o=T(e).offset()).top+=T.css(e,"borderTopWidth",!0),o.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-T.css(r,"marginTop",!0),left:t.left-o.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||se})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;T.fn[e]=function(r){return U(this,function(e,r,o){var i;if(x(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===o)return i?i[t]:e[r];i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o},e,r,arguments.length)}}),T.each(["top","left"],function(e,t){T.cssHooks[t]=Xe(g.pixelPosition,function(e,n){if(n)return n=Ue(e,t),Fe.test(n)?T(e).position()[t]+"px":n})}),T.each({Height:"height",Width:"width"},function(e,t){T.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){T.fn[r]=function(o,i){var a=arguments.length&&(n||"boolean"!=typeof o),s=n||(!0===o||!0===i?"margin":"border");return U(this,function(t,n,o){var i;return x(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===o?T.css(t,n,s):T.style(t,n,o,s)},t,a?o:void 0,a)}})}),T.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,t){T.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),T.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),T.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)}}),T.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),b(e))return r=l.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(l.call(arguments)))}).guid=e.guid=e.guid||T.guid++,o},T.holdReady=function(e){e?T.readyWait++:T.ready(!0)},T.isArray=Array.isArray,T.parseJSON=JSON.parse,T.nodeName=D,T.isFunction=b,T.isWindow=x,T.camelCase=J,T.type=C,T.now=Date.now,T.isNumeric=function(e){var t=T.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},void 0===(n=function(){return T}.apply(t,[]))||(e.exports=n);var Jt=o.jQuery,Yt=o.$;return T.noConflict=function(e){return o.$===T&&(o.$=Yt),e&&o.jQuery===T&&(o.jQuery=Jt),T},i||(o.jQuery=o.$=T),T})}).call(this,n(3)(e))},function(e,t){e.exports=prestashop},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.psShowHide=
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
function(){(0,r.default)(".ps-shown-by-js").show(),(0,r.default)(".ps-hidden-by-js").hide()},t.psGetRequestParameter=o,t.refreshCheckoutPage=function(){if(null!==o("updatedTransaction"))window.location.reload();else{var e=o();e.updatedTransaction=1;var t=[];for(var n in e){var r=e[n];t.push(n+"="+r)}window.location.href=window.location.pathname+"?"+t.join("&")}};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));function o(e){var t={};return window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(e,n,r){t[n]=void 0!==r?r:""}),void 0!==e?t[e]?t[e]:null:t}},function(e,t,n){"use strict";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){(function(t){e.exports=t}).call(this,{})},function(e,t,n){e.exports=n(6)},function(e,t,n){"use strict";var r=u(n(0));n(7),n(8),n(9),n(10),n(11),n(12),n(17),n(18),n(19),n(20);var o=u(n(1)),i=u(n(21)),a=n(2),s=u(n(22));function u(e){return e&&e.__esModule?e:{default:e}}for(var l in window.$=r.default,window.jQuery=r.default,i.default.prototype)o.default[l]=i.default.prototype[l];(0,r.default)(document).ready(function(){(0,a.psShowHide)(),(0,s.default)('input[type="email"]')})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */(n(0));void 0===r.default.migrateMute&&(r.default.migrateMute=!window.prestashop.debug)},function(e,t,n){"use strict";var r,o;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*!
 * jQuery Migrate - v3.1.0 - 2019-06-08
 * Copyright OpenJS Foundation and other contributors
 */r=[n(0)],void 0===(o=function(e){return function(e,t){function n(t){return function(e,t){for(var n=/^(\d+)\.(\d+)\.(\d+)/,r=n.exec(e)||[],o=n.exec(t)||[],i=1;i<=3;i++){if(+r[i]>+o[i])return 1;if(+r[i]<+o[i])return-1}return 0}(e.fn.jquery,t)>=0}e.migrateVersion="3.1.0",t.console&&t.console.log&&(e&&n("3.0.0")||t.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),e.migrateWarnings&&t.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),t.console.log("JQMIGRATE: Migrate is installed"+(e.migrateMute?"":" with logging active")+", version "+e.migrateVersion));var r={};function o(n){var o=t.console;r[n]||(r[n]=!0,e.migrateWarnings.push(n),o&&o.warn&&!e.migrateMute&&(o.warn("JQMIGRATE: "+n),e.migrateTrace&&o.trace&&o.trace()))}function a(e,t,n,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return o(r),n},set:function(e){o(r),n=e}})}function s(e,t,n,r){e[t]=function(){return o(r),n.apply(this,arguments)}}e.migrateWarnings=[],void 0===e.migrateTrace&&(e.migrateTrace=!0),e.migrateReset=function(){r={},e.migrateWarnings.length=0},"BackCompat"===t.document.compatMode&&o("jQuery is not compatible with Quirks Mode");var u,l=e.fn.init,c=e.isNumeric,d=e.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,p=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;for(u in e.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(o("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},e.fn.init.prototype=e.fn,e.find=function(e){var n=Array.prototype.slice.call(arguments);if("string"==typeof e&&f.test(e))try{t.document.querySelector(e)}catch(r){e=e.replace(p,function(e,t,n,r){return"["+t+n+'"'+r+'"]'});try{t.document.querySelector(e),o("Attribute selector with '#' must be quoted: "+n[0]),n[0]=e}catch(e){o("Attribute selector with '#' was not fixed: "+n[0])}}return d.apply(this,n)},d)Object.prototype.hasOwnProperty.call(d,u)&&(e.find[u]=d[u]);e.fn.size=function(){return o("jQuery.fn.size() is deprecated and removed; use the .length property"),this.length},e.parseJSON=function(){return o("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},e.isNumeric=function(t){var n=c(t),r=function(t){var n=t&&t.toString();return!e.isArray(t)&&n-parseFloat(n)+1>=0}(t);return n!==r&&o("jQuery.isNumeric() should not be called on constructed objects"),r},n("3.3.0")&&s(e,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated"),s(e,"holdReady",e.holdReady,"jQuery.holdReady is deprecated"),s(e,"unique",e.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),a(e.expr,"filters",e.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),a(e.expr,":",e.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),n("3.2.0")&&s(e,"nodeName",e.nodeName,"jQuery.nodeName is deprecated");var h=e.ajax;e.ajax=function(){var e=h.apply(this,arguments);return e.promise&&(s(e,"success",e.done,"jQXHR.success is deprecated and removed"),s(e,"error",e.fail,"jQXHR.error is deprecated and removed"),s(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e};var v=e.fn.removeAttr,m=e.fn.toggleClass,y=/\S+/g;e.fn.removeAttr=function(t){var n=this;return e.each(t.match(y),function(t,r){e.expr.match.bool.test(r)&&(o("jQuery.fn.removeAttr no longer sets boolean properties: "+r),n.prop(r,!1))}),v.apply(this,arguments)},e.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?m.apply(this,arguments):(o("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var n=this.getAttribute&&this.getAttribute("class")||"";n&&e.data(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===t?"":e.data(this,"__className__")||"")}))};var g=!1;e.swap&&e.each(["height","width","reliableMarginRight"],function(t,n){var r=e.cssHooks[n]&&e.cssHooks[n].get;r&&(e.cssHooks[n].get=function(){var e;return g=!0,e=r.apply(this,arguments),g=!1,e})}),e.swap=function(e,t,n,r){var i,a,s={};for(a in g||o("jQuery.swap() is undocumented and deprecated"),t)s[a]=e.style[a],e.style[a]=t[a];for(a in i=n.apply(e,r||[]),t)e.style[a]=s[a];return i};var b=e.data;e.data=function(t,n,r){var a;if(n&&"object"===i(n)&&2===arguments.length){a=e.hasData(t)&&b.call(this,t);var s={};for(var u in n)u!==e.camelCase(u)?(o("jQuery.data() always sets/gets camelCased names: "+u),a[u]=n[u]):s[u]=n[u];return b.call(this,t,s),n}return n&&"string"==typeof n&&n!==e.camelCase(n)&&(a=e.hasData(t)&&b.call(this,t))&&n in a?(o("jQuery.data() always sets/gets camelCased names: "+n),arguments.length>2&&(a[n]=r),a[n]):b.apply(this,arguments)};var x=e.Tween.prototype.run,w=function(e){return e};e.Tween.prototype.run=function(){e.easing[this.easing].length>1&&(o("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),e.easing[this.easing]=w),x.apply(this,arguments)};var k=e.fx.interval||13;t.requestAnimationFrame&&Object.defineProperty(e.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return t.document.hidden||o("jQuery.fx.interval is deprecated"),k},set:function(e){o("jQuery.fx.interval is deprecated"),k=e}});var C=e.fn.load,T=e.event.add,j=e.event.fix;e.event.props=[],e.event.fixHooks={},a(e.event.props,"concat",e.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),e.event.fix=function(t){var n,r=t.type,i=this.fixHooks[r],a=e.event.props;if(a.length)for(o("jQuery.event.props are deprecated and removed: "+a.join());a.length;)e.event.addProp(a.pop());if(i&&!i._migrated_&&(i._migrated_=!0,o("jQuery.event.fixHooks are deprecated and removed: "+r),(a=i.props)&&a.length))for(;a.length;)e.event.addProp(a.pop());return n=j.call(this,t),i&&i.filter?i.filter(n,t):n},e.event.add=function(e,n){return e===t&&"load"===n&&"complete"===t.document.readyState&&o("jQuery(window).on('load'...) called after load event occurred"),T.apply(this,arguments)},e.each(["load","unload","error"],function(t,n){e.fn[n]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===n&&"string"==typeof e[0]?C.apply(this,e):(o("jQuery.fn."+n+"() is deprecated"),e.splice(0,0,n),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),e.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(t,n){e.fn[n]=function(e,t){return o("jQuery.fn."+n+"() event shorthand is deprecated"),arguments.length>0?this.on(n,null,e,t):this.trigger(n)}}),e(function(){e(t.document).triggerHandler("ready")}),e.event.special.ready={setup:function(){this===t.document&&o("'ready' event is deprecated")}},e.fn.extend({bind:function(e,t,n){return o("jQuery.fn.bind() is deprecated"),this.on(e,null,t,n)},unbind:function(e,t){return o("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,n,r){return o("jQuery.fn.delegate() is deprecated"),this.on(t,e,n,r)},undelegate:function(e,t,n){return o("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return o("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});var S=e.fn.offset;e.fn.offset=function(){var n,r=this[0],i={top:0,left:0};return r&&r.nodeType?(n=(r.ownerDocument||t.document).documentElement,e.contains(n,r)?S.apply(this,arguments):(o("jQuery.fn.offset() requires an element connected to a document"),i)):(o("jQuery.fn.offset() requires a valid DOM element"),i)};var _=e.param;e.param=function(t,n){var r=e.ajaxSettings&&e.ajaxSettings.traditional;return void 0===n&&r&&(o("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),n=r),_.call(this,t,n)};var A=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return o("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),A.apply(this,arguments)};var E=e.Deferred,N=[["resolve","done",e.Callbacks("once memory"),e.Callbacks("once memory"),"resolved"],["reject","fail",e.Callbacks("once memory"),e.Callbacks("once memory"),"rejected"],["notify","progress",e.Callbacks("memory"),e.Callbacks("memory")]];return e.Deferred=function(t){var n=E(),r=n.promise();return n.pipe=r.pipe=function(){var t=arguments;return o("deferred.pipe() is deprecated"),e.Deferred(function(o){e.each(N,function(i,a){var s=e.isFunction(t[i])&&t[i];n[a[1]](function(){var t=s&&s.apply(this,arguments);t&&e.isFunction(t.promise)?t.promise().done(o.resolve).fail(o.reject).progress(o.notify):o[a[0]+"With"](this===r?o.promise():this,s?[t]:arguments)})}),t=null}).promise()},t&&t.call(n,n),n},e.Deferred.exceptionHook=E.exceptionHook,e}(e,window)}.apply(t,r))||(e.exports=o)},function(e,t,n){"use strict";var r,o;r=[n(0)],void 0===(o=function(e){return function(e){function t(e){void 0===e&&(e=window.navigator.userAgent),e=e.toLowerCase();var t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[],r={},o={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",versionNumber:t[4]||t[2]||"0",platform:n[0]||""};if(o.browser&&(r[o.browser]=!0,r.version=o.version,r.versionNumber=parseInt(o.versionNumber,10)),o.platform&&(r[o.platform]=!0),(r.android||r.bb||r.blackberry||r.ipad||r.iphone||r.ipod||r.kindle||r.playbook||r.silk||r["windows phone"])&&(r.mobile=!0),(r.cros||r.mac||r.linux||r.win)&&(r.desktop=!0),(r.chrome||r.opr||r.safari)&&(r.webkit=!0),(r.rv||r.iemobile)&&(o.browser="msie",r.msie=!0),r.edge&&(delete r.edge,o.browser="msedge",r.msedge=!0),r.safari&&r.blackberry&&(o.browser="blackberry",r.blackberry=!0),r.safari&&r.playbook&&(o.browser="playbook",r.playbook=!0),r.bb){var i="blackberry";o.browser=i,r[i]=!0}return r.opr&&(o.browser="opera",r.opera=!0),r.safari&&r.android&&(o.browser="android",r.android=!0),r.safari&&r.kindle&&(o.browser="kindle",r.kindle=!0),r.safari&&r.silk&&(o.browser="silk",r.silk=!0),r.name=o.browser,r.platform=o.platform,r}return window.jQBrowser=t(window.navigator.userAgent),window.jQBrowser.uaMatch=t,e&&(e.browser=window.jQBrowser),window.jQBrowser}(e)}.apply(t,r))||(e.exports=o)},function(e,t,n){"use strict";var r,o,i;o=[n(0)],void 0===(i="function"==typeof(r=function(e){var t=e.fn.init;e.fn.init=function(e){var n=Array.prototype.slice.call(arguments);"string"==typeof e&&"#"===e&&(console.warn("jQuery('#') is not a valid selector"),n[0]=[]);var r=t.apply(this,arguments);return r.selector="string"==typeof e?e:"",r},e.fn.init.prototype=e.fn,void 0!==e.fn.live&&e.isFunction(e.fn.live)||e.fn.extend({live:function(t,n,r){return this.selector&&e(document).on(t,this.selector,n,r),console.warn("jQuery.live() has been removed since jquery v1.9, please use jQuery.on() instead."),this}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1)),i=n(2);function a(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */(0,r.default)(document).ready(function(){o.default.on("updateCart",function(e){o.default.cart=e.reason.cart;var t=(0,r.default)(".js-cart").data("refresh-url");if(t){var n={};e&&e.reason&&(n={id_product_attribute:e.reason.idProductAttribute,id_product:e.reason.idProduct}),r.default.post(t,n).then(function(e){(0,r.default)(".cart-detailed-totals").replaceWith(e.cart_detailed_totals),(0,r.default)(".cart-summary-items-subtotal").replaceWith(e.cart_summary_items_subtotal),(0,r.default)(".cart-summary-subtotals-container").replaceWith(e.cart_summary_subtotals_container),(0,r.default)(".cart-summary-totals").replaceWith(e.cart_summary_totals),(0,r.default)(".cart-detailed-actions").replaceWith(e.cart_detailed_actions),(0,r.default)(".cart-voucher").replaceWith(e.cart_voucher),(0,r.default)(".cart-overview").replaceWith(e.cart_detailed),(0,r.default)("#product_customization_id").val(0),(0,r.default)(".js-cart-line-product-quantity").each(function(e,t){var n=(0,r.default)(t);n.attr("value",n.val())}),(0,r.default)(".js-cart-payment-step-refresh").length&&(0,i.refreshCheckoutPage)(),o.default.emit("updatedCart",{eventType:"updateCart",resp:e})}).fail(function(e){o.default.emit("handleError",{eventType:"updateCart",resp:e})})}});var e=(0,r.default)("body");e.on("click",'[data-button-action="add-to-cart"]',function(e){if(e.preventDefault(),(0,r.default)("#quantity_wanted").val()>(0,r.default)("[data-stock]").data("stock")&&0===(0,r.default)("[data-allow-oosp]").data("allow-oosp").length)(0,r.default)('[data-button-action="add-to-cart"]').attr("disabled","disabled");else{var t=(0,r.default)(e.target).closest("form"),n=t.serialize()+"&add=1&action=update",i=t.attr("action"),a=function(e){e.parents(".product-add-to-cart").first().find(".product-minimal-quantity").addClass("error"),e.parent().find("label").addClass("error")},s=t.find("input[min]");if(!function(e){var t=!0;return e.each(function(e,n){var o=(0,r.default)(n),i=parseInt(o.attr("min"),10);i&&o.val()<i&&(a(o),t=!1)}),t}(s))return void a(s);r.default.post(i,n,null,"json").then(function(e){o.default.emit("updateCart",{reason:{idProduct:e.id_product,idProductAttribute:e.id_product_attribute,idCustomization:e.id_customization,linkAction:"add-to-cart",cart:e.cart},resp:e})}).fail(function(e){o.default.emit("handleError",{eventType:"addProductToCart",resp:e})})}}),e.on("submit",'[data-link-action="add-voucher"]',function(e){e.preventDefault();var t=(0,r.default)(e.currentTarget),n=t.attr("action");0===t.find("[name=action]").length&&t.append((0,r.default)("<input>",{type:"hidden",name:"ajax",value:1})),0===t.find("[name=action]").length&&t.append((0,r.default)("<input>",{type:"hidden",name:"action",value:"update"})),r.default.post(n,t.serialize(),null,"json").then(function(t){t.hasError?(0,r.default)(".js-error").show().find(".js-error-text").text(t.errors[0]):o.default.emit("updateCart",{reason:e.target.dataset,resp:t})}).fail(function(e){o.default.emit("handleError",{eventType:"updateCart",resp:e})})})})},function(e,t,n){"use strict";var r=l(n(0)),o=l(n(1)),i=l(n(13)),a=l(n(14)),s=l(n(15)),u=l(n(16));function l(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */function c(){(0,i.default)(),(0,a.default)(),(0,s.default)(),function(){var e=new u.default;e.getClickableSteps().on("click",function(t){var n=u.default.getClickedStep(t);n.isUnreachable()||(e.makeCurrent(n),n.hasContinueButton()?n.disableAllAfter():n.enableAllBefore()),o.default.emit("changedCheckoutStep",{event:t})})}(),(0,r.default)(".checkout-step form").submit(function(e){!0===(0,r.default)(this).data("disabled")&&e.preventDefault(),(0,r.default)(this).data("disabled",!0),(0,r.default)('button[type="submit"]',this).addClass("disabled")})}(0,r.default)(document).ready(function(){1===(0,r.default)("#checkout").length&&c()})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){(0,r.default)(".js-edit-addresses").on("click",function(e){e.stopPropagation(),(0,r.default)("#checkout-addresses-step").trigger("click"),o.default.emit("editAddress")}),(0,r.default)("#delivery-addresses input[type=radio], #invoice-addresses input[type=radio]").on("click",function(){(0,r.default)(".address-item").removeClass("selected"),(0,r.default)(".address-item:has(input[type=radio]:checked)").addClass("selected");var e=(0,r.default)(".js-address-error").prop("id").split("-").pop(),t=(0,r.default)("#not-valid-addresses").val(),n=this.name.split("_").pop(),o=(0,r.default)(".js-address-error[name=alert-"+n+"]");l(!1,e,n),""!==t&&null===s&&t.split(",").indexOf(this.value)>=0?(o.show(),l(!0,this.value,n),(0,r.default)(".js-address-error").prop("id","id-failure-address-"+this.value)):o.hide();var i=(0,r.default)(".js-address-error:visible");c(i.length<=0)})};var r=a(n(0)),o=a(n(1)),i=n(2);function a(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */var s=(0,i.psGetRequestParameter)("editAddress"),u=(0,i.psGetRequestParameter)("use_same_address");(0,r.default)(window).on("load",function(){var e=(0,r.default)(".js-address-error:visible");if(0===parseInt(u)&&(0,r.default)("#invoice-addresses input[type=radio]:checked").trigger("click"),(null!==s||(0,r.default)(".js-address-form:visible").length>1)&&e.hide(),e.length>0){var t=(0,r.default)(".js-address-error").prop("id").split("-").pop();e.each(function(){l(!0,t,(0,r.default)(this).attr("name").split("-").pop())})}e=(0,r.default)(".js-address-error:visible"),c(e.length<=0)});var l=function(e,t,n){var o="#7a7a7a";e&&((0,r.default)("#"+n+"-addresses a.edit-address").prop("style","color: #7a7a7a !important"),o="#2fb5d2"),(0,r.default)("#id-address-"+n+"-address-"+t+" a.edit-address").prop("style","color: "+o+" !important")},c=function(e){(0,r.default)("button[name=confirm-addresses]").prop("disabled",!e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
function(){var e=(0,r.default)("body");e.on("change","#js-delivery input",function(e){var t=(0,r.default)("#js-delivery"),n=t.serialize(),a=(0,r.default)(e.currentTarget).parents(".delivery-option");r.default.post(t.data("url-update"),n).then(function(e){(0,r.default)("#js-checkout-summary").replaceWith(e.preview),(0,r.default)(".js-cart-payment-step-refresh").length&&(0,i.refreshCheckoutPage)(),o.default.emit("updatedDeliveryForm",{dataForm:t.serializeArray(),deliveryOption:a,resp:e})}).fail(function(e){o.default.trigger("handleError",{eventType:"updateDeliveryOptions",resp:e})})}),e.on("click",".js-edit-delivery",function(e){e.stopPropagation(),(0,r.default)("#checkout-delivery-step").trigger("click"),o.default.emit("editDelivery")})};var r=a(n(0)),o=a(n(1)),i=n(2);function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=new i;return e.init(),e};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.confirmationSelector="#payment-confirmation",this.paymentSelector="#payment-section",this.conditionsSelector="#conditions-to-approve",this.conditionAlertSelector=".js-alert-payment-conditions",this.additionalInformatonSelector=".js-additional-information",this.optionsForm=".js-payment-option-form"}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{key:"init",value:function(){(0,r.default)(this.paymentSelector+' input[type="checkbox"][disabled]').attr("disabled",!1);var e=(0,r.default)("body");e.on("change",this.conditionsSelector+' input[type="checkbox"]',r.default.proxy(this.toggleOrderButton,this)),e.on("change",'input[name="payment-option"]',r.default.proxy(this.toggleOrderButton,this)),e.on("click",this.confirmationSelector+" button",r.default.proxy(this.confirm,this)),this.collapseOptions()}},{key:"collapseOptions",value:function(){(0,r.default)(this.additionalInformatonSelector+", "+this.optionsForm).hide()}},{key:"getSelectedOption",value:function(){return(0,r.default)('input[name="payment-option"]:checked').attr("id")}},{key:"hideConfirmation",value:function(){(0,r.default)(this.confirmationSelector).hide()}},{key:"showConfirmation",value:function(){(0,r.default)(this.confirmationSelector).show()}},{key:"toggleOrderButton",value:function(){var e=!0;(0,r.default)(this.conditionsSelector+' input[type="checkbox"]').each(function(t,n){n.checked||(e=!1)}),this.collapseOptions();var t=this.getSelectedOption();if(t||(e=!1),(0,r.default)("#"+t+"-additional-information").show(),(0,r.default)("#pay-with-"+t+"-form").show(),(0,r.default)(".js-payment-binary").hide(),(0,r.default)("#"+t).hasClass("binary")){var n=this.getPaymentOptionSelector(t);this.hideConfirmation(),(0,r.default)(n).show(),e?(0,r.default)(n).removeClass("disabled"):(0,r.default)(n).addClass("disabled")}else this.showConfirmation(),(0,r.default)(this.confirmationSelector+" button").attr("disabled",!e),e?(0,r.default)(this.conditionAlertSelector).hide():(0,r.default)(this.conditionAlertSelector).show()}},{key:"getPaymentOptionSelector",value:function(e){var t=(0,r.default)("#".concat(e)).data("module-name");return".js-payment-".concat(t)}},{key:"confirm",value:function(){var e=this.getSelectedOption();e&&((0,r.default)(this.confirmationSelector+" button").prop("disabled",!0),(0,r.default)("#pay-with-"+e+"-form form").submit())}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}var s=".".concat("js-current-step"),u=function(){function e(){o(this,e),this.$steps=(0,r.default)(".checkout-step"),this.$steps.off("click"),this.$clickableSteps=(0,r.default)(s).prevAll().andSelf(),this.$clickableSteps.addClass("-clickable")}return a(e,[{key:"getClickableSteps",value:function(){return this.$clickableSteps}},{key:"makeCurrent",value:function(e){this.$steps.removeClass("-current"),this.$steps.removeClass("js-current-step"),e.makeCurrent()}}],[{key:"getClickedStep",value:function(e){return new l((0,r.default)(e.target).closest(".checkout-step"))}}]),e}();t.default=u;var l=function(){function e(t){o(this,e),this.$step=t}return a(e,[{key:"isUnreachable",value:function(){return this.$step.hasClass("-unreachable")}},{key:"makeCurrent",value:function(){this.$step.addClass("-current"),this.$step.addClass("js-current-step")}},{key:"hasContinueButton",value:function(){return(0,r.default)("button.continue",this.$step).length>0}},{key:"disableAllAfter",value:function(){var e=this.$step.nextAll();e.addClass("-unreachable").removeClass("-complete"),(0,r.default)(".step-title",e).addClass("not-allowed")}},{key:"enableAllBefore",value:function(){var e=this.$step.nextAll(".checkout-step.-clickable");e.removeClass("-unreachable").addClass("-complete"),(0,r.default)(".step-title",e).removeClass("not-allowed")}}]),e}()},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */(n(0));var o=!1;function i(e){o=!1,prestashop.emit("updateProductList",e),window.history.pushState(e,document.title,e.current_url)}function a(){o=!1}(0,r.default)(document).ready(function(){prestashop.on("updateFacets",function(e){!function(e){if(o);else{var t=[e,e.indexOf("?")>=0?"&":"?","from-xhr"].join("");r.default.get(t,null,null,"json").then(i).fail(a)}}(e)})})},function(e,t,n){"use strict";var r=i(n(0)),o=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */(0,r.default)(document).ready(function(){(0,r.default)("body").on("click",".quick-view",function(e){o.default.emit("clickQuickView",{dataset:(0,r.default)(e.target).closest(".js-product-miniature").data()}),e.preventDefault()})})},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1)),i=n(2);function a(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */var s=null,u=null;function l(e){void 0===e&&(e="An error occurred while processing your request"),function(e,t){var n=(0,r.default)('<div class="alert alert-danger ajax-error" role="alert">'.concat(t,"</div>"));e.replaceWith(n)}((0,r.default)(".quickview #product-availability, .page-product:not(.modal-open) .row #product-availability, .page-product:not(.modal-open) .product-container #product-availability"),e)}function c(e,t,n){var a=(0,r.default)(".product-actions"),c=a.find("#quantity_wanted"),f=a.find("form:first").serialize(),p=(0,i.psGetRequestParameter)("preview");if(p=null!==p?"&preview="+p:"",null!==n){if(!e||"keyup"!==e.type||c.val()!==c.data("old-value")){c.data("old-value",c.val()),u&&clearTimeout(u);var h=30;"updatedProductQuantity"===t&&(h=750),u=setTimeout(function(){""!==f&&(s=r.default.ajax({url:n+(-1===n.indexOf("?")?"?":"&")+f+p,method:"POST",data:{quickview:(0,r.default)(".modal.quickview.in").length,ajax:1,action:"refresh",quantity_wanted:"updatedProductCombination"===t?c.attr("min"):c.val()},dataType:"json",beforeSend:function(){null!==s&&s.abort()},error:function(e,t,n){"abort"!==t&&0===(0,r.default)("section#main > .ajax-error").length&&l()},success:function(e,n,i){var a=(0,r.default)("<div>").append(e.product_cover_thumbnails);(0,r.default)(".quickview .images-container, .page-product:not(.modal-open) .row .images-container, .page-product:not(.modal-open) .product-container .images-container").html()!==a.find(".quickview .images-container, .page-product:not(.modal-open) .row .images-container, .page-product:not(.modal-open) .product-container .images-container").html()&&(0,r.default)(".quickview .images-container, .page-product:not(.modal-open) .row .images-container, .page-product:not(.modal-open) .product-container .images-container").replaceWith(e.product_cover_thumbnails),(0,r.default)(".quickview .product-prices, .page-product:not(.modal-open) .row .product-prices, .page-product:not(.modal-open) .product-container .product-prices").first().replaceWith(e.product_prices),(0,r.default)(".quickview .product-customization, .page-product:not(.modal-open) .row .product-customization, .page-product:not(.modal-open) .product-container .product-customization").first().replaceWith(e.product_customization),(0,r.default)(".quickview .product-variants, .page-product:not(.modal-open) .row .product-variants, .page-product:not(.modal-open) .product-container .product-variants").first().replaceWith(e.product_variants),(0,r.default)(".quickview .product-discounts, .page-product:not(.modal-open) .row .product-discounts, .page-product:not(.modal-open) .product-container .product-discounts").first().replaceWith(e.product_discounts),(0,r.default)(".quickview .product-additional-info, .page-product:not(.modal-open) .row .product-additional-info, .page-product:not(.modal-open) .product-container .product-additional-info").first().replaceWith(e.product_additional_info),(0,r.default)(".quickview #product-details, #product-details").replaceWith(e.product_details),(0,r.default)(".quickview .product-flags, .page-product:not(.modal-open) .row .product-flags, .page-product:not(.modal-open) .product-container .product-flags").first().replaceWith(e.product_flags),function(e){var t=null;(0,r.default)(e.product_add_to_cart).each(function(e,n){if((0,r.default)(n).hasClass("product-add-to-cart"))return t=(0,r.default)(n),!1}),null===t&&l();var n=(0,r.default)(".product-add-to-cart");d({$addToCartSnippet:t,$targetParent:n,targetSelector:".add"}),d({$addToCartSnippet:t,$targetParent:n,targetSelector:"#product-availability"}),d({$addToCartSnippet:t,$targetParent:n,targetSelector:".product-minimal-quantity"})}(e);var s=parseInt(e.product_minimal_quantity,10);isNaN(s)||"updatedProductQuantity"===t||(c.attr("min",s),c.val(s)),o.default.emit("updatedProduct",e)},complete:function(e,t){s=null,u=null}}))}.bind(s,u),h)}}else l()}function d(e){var t=(0,r.default)(e.$targetParent.find(e.targetSelector));if(!(t.length<=0)){var n=e.$addToCartSnippet.find(e.targetSelector);n.length>0?t.replaceWith(n[0].outerHTML):t.html("")}}(0,r.default)(document).ready(function(){(0,r.default)("body").on("change touchspin.on.startspin",".product-variants *[name]",function(e){o.default.emit("updateProduct",{eventType:"updatedProductCombination",event:e,resp:{},reason:{productUrl:o.default.urls.pages.product||""}})}),(0,r.default)("body").on("click",".product-refresh",function(e,t){e.preventDefault();var n="updatedProductCombination";void 0!==t&&t.eventType&&(n=t.eventType),o.default.emit("updateProduct",{eventType:n,event:e,resp:{},reason:{productUrl:o.default.urls.pages.product||""}})}),o.default.on("updateProduct",function(e){var t=e.eventType,n=e.event;(function(){var e=r.default.Deferred(),t=(0,r.default)(".product-actions"),n=(0,r.default)("#quantity_wanted");if(null!==o.default&&null!==o.default.urls&&null!==o.default.urls.pages&&""!==o.default.urls.pages.product&&null!==o.default.urls.pages.product)return e.resolve(o.default.urls.pages.product),e.promise();var i={};return(0,r.default)(t.find("form:first").serializeArray()).each(function(e,t){i[t.name]=t.value}),r.default.ajax({url:t.find("form:first").attr("action"),method:"POST",data:Object.assign({ajax:1,action:"productrefresh",quantity_wanted:n.val()},i),dataType:"json",success:function(t){var n=t.productUrl;o.default.page.canonical=n,e.resolve(n)},error:function(t,n,r){e.reject({jqXHR:t,textStatus:n,errorThrown:r})}}),e.promise()})().done(function(e){return c(n,t,e)}).fail(function(){0===(0,r.default)("section#main > .ajax-error").length&&l()})}),o.default.on("updatedProduct",function(e){if(e.product_url&&e.id_product_attribute&&!(0,r.default)(".modal.quickview").length){var t=document.title;e.product_title&&(t=e.product_title,(0,r.default)(document).attr("title",t)),window.history.replaceState({id_product_attribute:e.id_product_attribute},t,e.product_url)}}),o.default.on("updateCart",function(e){e&&e.reason&&"add-to-cart"===e.reason.linkAction&&(0,r.default)("#quantity_wanted").val(1)}),o.default.on("showErrorNextToAddtoCartButton",function(e){e&&e.errorMessage&&l(e.errorMessage)})})},function(e,t,n){"use strict";var r=i(n(0)),o=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}(0,r.default)(document).ready(function(){!function(e){(0,r.default)("body").on("change",e.country,function(){var t={id_country:(0,r.default)(e.country).val(),id_address:(0,r.default)(e.address+" form").data("id-address")},n=(0,r.default)(e.address+" form").data("refresh-url"),i=e.address+" input";r.default.post(n,t).then(function(t){var n=[];(0,r.default)(i).each(function(){n[(0,r.default)(this).prop("name")]=(0,r.default)(this).val()}),(0,r.default)(e.address).replaceWith(t.address_form),(0,r.default)(i).each(function(){(0,r.default)(this).val(n[(0,r.default)(this).prop("name")])}),o.default.emit("updatedAddressForm",{target:(0,r.default)(e.address),resp:t})}).fail(function(e){o.default.emit("handleError",{eventType:"updateAddressForm",resp:e})})})}({country:".js-country",address:".js-address-form"})})},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function a(e){return"object"===r(e)&&null!==e}function s(e){return void 0===e}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0,o.defaultMaxListeners=10,o.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},o.prototype.emit=function(e){var t,n,r,o,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(s(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),r=(l=n.slice()).length,u=0;u<r;u++)l[u].apply(this,o);return!0},o.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?o.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},o.prototype.on=o.prototype.addListener,o.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},o.prototype.removeListener=function(e,t){var n,r,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-->0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},o.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},o.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},o.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},o.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(23));function i(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */var a=function(e){var t=(0,r.default)(e);r.default.each(t,function(e,t){if(!t.checkValidity()){var n=t.value.split("@");o.default.toASCII(n[0])===n[0]&&(t.value=o.default.toASCII(t.value))}})};t.default=a},function(e,t,n){"use strict";(function(e,r){var o;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){var s="object"==i(t)&&t&&!t.nodeType&&t,u="object"==i(e)&&e&&!e.nodeType&&e,l="object"==(void 0===r?"undefined":i(r))&&r;l.global!==l&&l.window!==l&&l.self!==l||(a=l);var c,d,f=2147483647,p=36,h=1,v=26,m=38,y=700,g=72,b=128,x="-",w=/^xn--/,k=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=p-h,S=Math.floor,_=String.fromCharCode;function A(e){throw new RangeError(T[e])}function E(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function N(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+E((e=e.replace(C,".")).split("."),t).join(".")}function D(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function q(e){return E(e,function(e){var t="";return e>65535&&(t+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=_(e)}).join("")}function L(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function P(e,t,n){var r=0;for(e=n?S(e/y):e>>1,e+=S(e/t);e>j*v>>1;r+=p)e=S(e/j);return S(r+(j+1)*e/(e+m))}function M(e){var t,n,r,o,i,a,s,u,l,c,d=[],m=e.length,y=0,w=b,k=g;for((n=e.lastIndexOf(x))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&A("not-basic"),d.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<m;){for(i=y,a=1,s=p;o>=m&&A("invalid-input"),((u=L(e.charCodeAt(o++)))>=p||u>S((f-y)/a))&&A("overflow"),y+=u*a,!(u<(l=s<=k?h:s>=k+v?v:s-k));s+=p)a>S(f/(c=p-l))&&A("overflow"),a*=c;k=P(y-i,t=d.length+1,0==i),S(y/t)>f-w&&A("overflow"),w+=S(y/t),y%=t,d.splice(y++,0,w)}return q(d)}function H(e){var t,n,r,o,i,a,s,u,l,c,d,m,y,w,k,C=[];for(m=(e=D(e)).length,t=b,n=0,i=g,a=0;a<m;++a)(d=e[a])<128&&C.push(_(d));for(r=o=C.length,o&&C.push(x);r<m;){for(s=f,a=0;a<m;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>S((f-n)/(y=r+1))&&A("overflow"),n+=(s-t)*y,t=s,a=0;a<m;++a)if((d=e[a])<t&&++n>f&&A("overflow"),d==t){for(u=n,l=p;!(u<(c=l<=i?h:l>=i+v?v:l-i));l+=p)k=u-c,w=p-c,C.push(_(O(c+k%w,0))),u=S(k/w);C.push(_(O(u,0))),i=P(n,y,r==o),n=0,++r}++n,++t}return C.join("")}if(c={version:"1.4.1",ucs2:{decode:D,encode:q},decode:M,encode:H,toASCII:function(e){return N(e,function(e){return k.test(e)?"xn--"+H(e):e})},toUnicode:function(e){return N(e,function(e){return w.test(e)?M(e.slice(4).toLowerCase()):e})}},"object"==i(n(4))&&n(4))void 0===(o=function(){return c}.call(t,n,t,e))||(e.exports=o);else if(s&&u)if(e.exports==s)u.exports=c;else for(d in c)c.hasOwnProperty(d)&&(s[d]=c[d]);else a.punycode=c}(void 0)}).call(this,n(3)(e),n(24))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":r(window))&&(o=window)}e.exports=o}]);!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=28)}([function(t,e){t.exports=jQuery},function(t,e){t.exports=prestashop},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(e){i(this,t),this.el=e}return r(t,[{key:"init",value:function(){this.el.on("show.bs.dropdown",function(t,e){e?(0,a.default)("#"+e).find(".dropdown-menu").first().stop(!0,!0).slideDown():(0,a.default)(t.target).find(".dropdown-menu").first().stop(!0,!0).slideDown()}),this.el.on("hide.bs.dropdown",function(t,e){e?(0,a.default)("#"+e).find(".dropdown-menu").first().stop(!0,!0).slideUp():(0,a.default)(t.target).find(".dropdown-menu").first().stop(!0,!0).slideUp()}),this.el.find("select.link").each(function(t,e){(0,a.default)(e).on("change",function(t){window.location=(0,a.default)(this).val()})})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(){i(this,t)}return r(t,[{key:"init",value:function(){(0,a.default)(".js-product-miniature").each(function(t,e){(0,a.default)(e).find(".color").length>5&&function(){var t=0;(0,a.default)(e).find(".color").each(function(e,n){e>4&&((0,a.default)(n).hide(),t++)}),(0,a.default)(e).find(".js-count").append("+"+t)}()})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o);n(5);var s=function(){function t(){i(this,t)}return r(t,[{key:"init",value:function(){var t=this,e=(0,a.default)(".js-modal-arrows"),n=(0,a.default)(".js-modal-product-images");(0,a.default)("body").on("click",".js-modal-thumb",function(t){(0,a.default)(".js-modal-thumb").hasClass("selected")&&(0,a.default)(".js-modal-thumb").removeClass("selected"),(0,a.default)(t.currentTarget).addClass("selected"),(0,a.default)(".js-modal-product-cover").attr("src",(0,a.default)(t.target).data("image-large-src")),(0,a.default)(".js-modal-product-cover").attr("title",(0,a.default)(t.target).attr("title")),(0,a.default)(".js-modal-product-cover").attr("alt",(0,a.default)(t.target).attr("alt"))}).on("click","aside#thumbnails",function(t){"thumbnails"==t.target.id&&(0,a.default)("#product-modal").modal("hide")}),(0,a.default)(".js-modal-product-images li").length<=5?e.css("opacity",".2"):e.on("click",function(e){(0,a.default)(e.target).hasClass("arrow-up")&&n.position().top<0?(t.move("up"),(0,a.default)(".js-modal-arrow-down").css("opacity","1")):(0,a.default)(e.target).hasClass("arrow-down")&&n.position().top+n.height()>(0,a.default)(".js-modal-mask").height()&&(t.move("down"),(0,a.default)(".js-modal-arrow-up").css("opacity","1"))})}},{key:"move",value:function(t){var e=(0,a.default)(".js-modal-product-images"),n=(0,a.default)(".js-modal-product-images li img").height()+10,i=e.position().top;e.velocity({translateY:"up"===t?i+n:i-n},function(){e.position().top>=0?(0,a.default)(".js-modal-arrow-up").css("opacity",".2"):e.position().top+e.height()<=(0,a.default)(".js-modal-mask").height()&&(0,a.default)(".js-modal-arrow-down").css("opacity",".2")})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";var i,r;!function(t){function e(t){var e=t.length,i=n.type(t);return"function"!==i&&!n.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t))}if(!t.jQuery){var n=function t(e,n){return new t.fn.init(e,n)};n.isWindow=function(t){return t&&t===t.window},n.type=function(t){return t?"object"==typeof t||"function"==typeof t?r[a.call(t)]||"object":typeof t:t+""},n.isArray=Array.isArray||function(t){return"array"===n.type(t)},n.isPlainObject=function(t){var e;if(!t||"object"!==n.type(t)||t.nodeType||n.isWindow(t))return!1;try{if(t.constructor&&!o.call(t,"constructor")&&!o.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}for(e in t);return void 0===e||o.call(t,e)},n.each=function(t,n,i){var r=0,o=t.length,a=e(t);if(i){if(a)for(;r<o&&!1!==n.apply(t[r],i);r++);else for(r in t)if(t.hasOwnProperty(r)&&!1===n.apply(t[r],i))break}else if(a)for(;r<o&&!1!==n.call(t[r],r,t[r]);r++);else for(r in t)if(t.hasOwnProperty(r)&&!1===n.call(t[r],r,t[r]))break;return t},n.data=function(t,e,r){if(void 0===r){var o=t[n.expando],a=o&&i[o];if(void 0===e)return a;if(a&&e in a)return a[e]}else if(void 0!==e){var s=t[n.expando]||(t[n.expando]=++n.uuid);return i[s]=i[s]||{},i[s][e]=r,r}},n.removeData=function(t,e){var r=t[n.expando],o=r&&i[r];o&&(e?n.each(e,function(t,e){delete o[e]}):delete i[r])},n.extend=function(){var t,e,i,r,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[l]||{},l++),"object"!=typeof s&&"function"!==n.type(s)&&(s={}),l===u&&(s=this,l--);l<u;l++)if(o=arguments[l])for(r in o)o.hasOwnProperty(r)&&(t=s[r],i=o[r],s!==i&&(c&&i&&(n.isPlainObject(i)||(e=n.isArray(i)))?(e?(e=!1,a=t&&n.isArray(t)?t:[]):a=t&&n.isPlainObject(t)?t:{},s[r]=n.extend(c,a,i)):void 0!==i&&(s[r]=i)));return s},n.queue=function(t,i,r){if(t){i=(i||"fx")+"queue";var o=n.data(t,i);return r?(!o||n.isArray(r)?o=n.data(t,i,function(t,n){var i=n||[];return t&&(e(Object(t))?function(t,e){for(var n=+e.length,i=0,r=t.length;i<n;)t[r++]=e[i++];if(n!==n)for(;void 0!==e[i];)t[r++]=e[i++];t.length=r}(i,"string"==typeof t?[t]:t):[].push.call(i,t)),i}(r)):o.push(r),o):o||[]}},n.dequeue=function(t,e){n.each(t.nodeType?[t]:t,function(t,i){e=e||"fx";var r=n.queue(i,e),o=r.shift();"inprogress"===o&&(o=r.shift()),o&&("fx"===e&&r.unshift("inprogress"),o.call(i,function(){n.dequeue(i,e)}))})},n.fn=n.prototype={init:function(t){if(t.nodeType)return this[0]=t,this;throw new Error("Not a DOM node.")},offset:function(){var e=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:e.top+(t.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:e.left+(t.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){var t=this[0],e=function(t){for(var e=t.offsetParent;e&&"html"!==e.nodeName.toLowerCase()&&e.style&&"static"===e.style.position;)e=e.offsetParent;return e||document}(t),i=this.offset(),r=/^(?:body|html)$/i.test(e.nodeName)?{top:0,left:0}:n(e).offset();return i.top-=parseFloat(t.style.marginTop)||0,i.left-=parseFloat(t.style.marginLeft)||0,e.style&&(r.top+=parseFloat(e.style.borderTopWidth)||0,r.left+=parseFloat(e.style.borderLeftWidth)||0),{top:i.top-r.top,left:i.left-r.left}}};var i={};n.expando="velocity"+(new Date).getTime(),n.uuid=0;for(var r={},o=r.hasOwnProperty,a=r.toString,s="Boolean Number String Function Array Date RegExp Object Error".split(" "),l=0;l<s.length;l++)r["[object "+s[l]+"]"]=s[l].toLowerCase();n.fn.init.prototype=n.fn,t.Velocity={Utilities:n}}}(window),function(o){"object"==typeof t&&"object"==typeof t.exports?t.exports=o():(i=o,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r))}(function(){return function(t,e,n,i){function r(t){for(var e=-1,n=t?t.length:0,i=[];++e<n;){var r=t[e];r&&i.push(r)}return i}function o(t){return _.isWrapped(t)?t=y.call(t):_.isNode(t)&&(t=[t]),t}function a(t){var e=h.data(t,"velocity");return null===e?i:e}function s(t,e){var n=a(t);n&&n.delayTimer&&!n.delayPaused&&(n.delayRemaining=n.delay-e+n.delayBegin,n.delayPaused=!0,clearTimeout(n.delayTimer.setTimeout))}function l(t,e){var n=a(t);n&&n.delayTimer&&n.delayPaused&&(n.delayPaused=!1,n.delayTimer.setTimeout=setTimeout(n.delayTimer.next,n.delayRemaining))}function u(t){return function(e){return Math.round(e*t)*(1/t)}}function c(t,n,i,r){function o(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function s(t){return 3*t}function l(t,e,n){return((o(e,n)*t+a(e,n))*t+s(e))*t}function u(t,e,n){return 3*o(e,n)*t*t+2*a(e,n)*t+s(e)}function c(e,n){for(var r=0;r<m;++r){var o=u(n,t,i);if(0===o)return n;n-=(l(n,t,i)-e)/o}return n}function f(){for(var e=0;e<b;++e)S[e]=l(e*_,t,i)}function d(e,n,r){var o,a,s=0;do{a=n+(r-n)/2,o=l(a,t,i)-e,o>0?r=a:n=a}while(Math.abs(o)>v&&++s<y);return a}function p(e){for(var n=0,r=1,o=b-1;r!==o&&S[r]<=e;++r)n+=_;--r;var a=(e-S[r])/(S[r+1]-S[r]),s=n+a*_,l=u(s,t,i);return l>=g?c(e,s):0===l?s:d(e,n,n+_)}function h(){E=!0,t===n&&i===r||f()}var m=4,g=.001,v=1e-7,y=10,b=11,_=1/(b-1),w="Float32Array"in e;if(4!==arguments.length)return!1;for(var x=0;x<4;++x)if("number"!=typeof arguments[x]||isNaN(arguments[x])||!isFinite(arguments[x]))return!1;t=Math.min(t,1),i=Math.min(i,1),t=Math.max(t,0),i=Math.max(i,0);var S=w?new Float32Array(b):new Array(b),E=!1,T=function(e){return E||h(),t===n&&i===r?e:0===e?0:1===e?1:l(p(e),n,r)};T.getControlPoints=function(){return[{x:t,y:n},{x:i,y:r}]};var C="generateBezier("+[t,n,i,r]+")";return T.toString=function(){return C},T}function f(t,e){var n=t;return _.isString(t)?E.Easings[t]||(n=!1):n=_.isArray(t)&&1===t.length?u.apply(null,t):_.isArray(t)&&2===t.length?T.apply(null,t.concat([e])):!(!_.isArray(t)||4!==t.length)&&c.apply(null,t),!1===n&&(n=E.Easings[E.defaults.easing]?E.defaults.easing:S),n}function d(t){if(t){var e=E.timestamp&&!0!==t?t:v.now(),n=E.State.calls.length;n>1e4&&(E.State.calls=r(E.State.calls),n=E.State.calls.length);for(var o=0;o<n;o++)if(E.State.calls[o]){var s=E.State.calls[o],l=s[0],u=s[2],c=s[3],f=!!c,g=null,y=s[5],b=s[6];if(c||(c=E.State.calls[o][3]=e-16),y){if(!0!==y.resume)continue;c=s[3]=Math.round(e-b-16),s[5]=null}b=s[6]=e-c;for(var w=Math.min(b/u.duration,1),x=0,S=l.length;x<S;x++){var T=l[x],A=T.element;if(a(A)){var I=!1;if(u.display!==i&&null!==u.display&&"none"!==u.display){if("flex"===u.display){var k=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];h.each(k,function(t,e){C.setPropertyValue(A,"display",e)})}C.setPropertyValue(A,"display",u.display)}u.visibility!==i&&"hidden"!==u.visibility&&C.setPropertyValue(A,"visibility",u.visibility);for(var D in T)if(T.hasOwnProperty(D)&&"element"!==D){var P,N=T[D],L=_.isString(N.easing)?E.Easings[N.easing]:N.easing;if(_.isString(N.pattern)){var j=1===w?function(t,e,n){var i=N.endValue[e];return n?Math.round(i):i}:function(t,e,n){var i=N.startValue[e],r=N.endValue[e]-i,o=i+r*L(w,u,r);return n?Math.round(o):o};P=N.pattern.replace(/{(\d+)(!)?}/g,j)}else if(1===w)P=N.endValue;else{var B=N.endValue-N.startValue;P=N.startValue+B*L(w,u,B)}if(!f&&P===N.currentValue)continue;if(N.currentValue=P,"tween"===D)g=P;else{var V;if(C.Hooks.registered[D]){V=C.Hooks.getRoot(D);var F=a(A).rootPropertyValueCache[V];F&&(N.rootPropertyValue=F)}var M=C.setPropertyValue(A,D,N.currentValue+(m<9&&0===parseFloat(P)?"":N.unitType),N.rootPropertyValue,N.scrollData);C.Hooks.registered[D]&&(C.Normalizations.registered[V]?a(A).rootPropertyValueCache[V]=C.Normalizations.registered[V]("extract",null,M[1]):a(A).rootPropertyValueCache[V]=M[1]),"transform"===M[0]&&(I=!0)}}u.mobileHA&&a(A).transformCache.translate3d===i&&(a(A).transformCache.translate3d="(0px, 0px, 0px)",I=!0),I&&C.flushTransformCache(A)}}u.display!==i&&"none"!==u.display&&(E.State.calls[o][2].display=!1),u.visibility!==i&&"hidden"!==u.visibility&&(E.State.calls[o][2].visibility=!1),u.progress&&u.progress.call(s[1],s[1],w,Math.max(0,c+u.duration-e),c,g),1===w&&p(o)}}E.State.isTicking&&O(d)}function p(t,e){if(!E.State.calls[t])return!1;for(var n=E.State.calls[t][0],r=E.State.calls[t][1],o=E.State.calls[t][2],s=E.State.calls[t][4],l=!1,u=0,c=n.length;u<c;u++){var f=n[u].element;e||o.loop||("none"===o.display&&C.setPropertyValue(f,"display",o.display),"hidden"===o.visibility&&C.setPropertyValue(f,"visibility",o.visibility));var d=a(f);if(!0!==o.loop&&(h.queue(f)[1]===i||!/\.velocityQueueEntryFlag/i.test(h.queue(f)[1]))&&d){d.isAnimating=!1,d.rootPropertyValueCache={};var p=!1;h.each(C.Lists.transforms3D,function(t,e){var n=/^scale/.test(e)?1:0,r=d.transformCache[e];d.transformCache[e]!==i&&new RegExp("^\\("+n+"[^.]").test(r)&&(p=!0,delete d.transformCache[e])}),o.mobileHA&&(p=!0,delete d.transformCache.translate3d),p&&C.flushTransformCache(f),C.Values.removeClass(f,"velocity-animating")}if(!e&&o.complete&&!o.loop&&u===c-1)try{o.complete.call(r,r)}catch(t){setTimeout(function(){throw t},1)}s&&!0!==o.loop&&s(r),d&&!0===o.loop&&!e&&(h.each(d.tweensContainer,function(t,e){if(/^rotate/.test(t)&&(parseFloat(e.startValue)-parseFloat(e.endValue))%360==0){var n=e.startValue;e.startValue=e.endValue,e.endValue=n}/^backgroundPosition/.test(t)&&100===parseFloat(e.endValue)&&"%"===e.unitType&&(e.endValue=0,e.startValue=100)}),E(f,"reverse",{loop:!0,delay:o.delay})),!1!==o.queue&&h.dequeue(f,o.queue)}E.State.calls[t]=!1;for(var m=0,g=E.State.calls.length;m<g;m++)if(!1!==E.State.calls[m]){l=!0;break}!1===l&&(E.State.isTicking=!1,delete E.State.calls,E.State.calls=[])}var h,m=function(){if(n.documentMode)return n.documentMode;for(var t=7;t>4;t--){var e=n.createElement("div");if(e.innerHTML="\x3c!--[if IE "+t+"]><span></span><![endif]--\x3e",e.getElementsByTagName("span").length)return e=null,t}return i}(),g=function(){var t=0;return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(e){var n,i=(new Date).getTime();return n=Math.max(0,16-(i-t)),t=i+n,setTimeout(function(){e(i+n)},n)}}(),v=function(){var t=e.performance||{};if("function"!=typeof t.now){var n=t.timing&&t.timing.navigationStart?t.timing.navigationStart:(new Date).getTime();t.now=function(){return(new Date).getTime()-n}}return t}(),y=function(){var t=Array.prototype.slice;try{return t.call(n.documentElement),t}catch(e){return function(e,n){var i=this.length;if("number"!=typeof e&&(e=0),"number"!=typeof n&&(n=i),this.slice)return t.call(this,e,n);var r,o=[],a=e>=0?e:Math.max(0,i+e),s=n<0?i+n:Math.min(n,i),l=s-a;if(l>0)if(o=new Array(l),this.charAt)for(r=0;r<l;r++)o[r]=this.charAt(a+r);else for(r=0;r<l;r++)o[r]=this[a+r];return o}}}(),b=function(){return Array.prototype.includes?function(t,e){return t.includes(e)}:Array.prototype.indexOf?function(t,e){return t.indexOf(e)>=0}:function(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1}},_={isNumber:function(t){return"number"==typeof t},isString:function(t){return"string"==typeof t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isFunction:function(t){return"[object Function]"===Object.prototype.toString.call(t)},isNode:function(t){return t&&t.nodeType},isWrapped:function(t){return t&&t!==e&&_.isNumber(t.length)&&!_.isString(t)&&!_.isFunction(t)&&!_.isNode(t)&&(0===t.length||_.isNode(t[0]))},isSVG:function(t){return e.SVGElement&&t instanceof e.SVGElement},isEmptyObject:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}},w=!1;if(t.fn&&t.fn.jquery?(h=t,w=!0):h=e.Velocity.Utilities,m<=8&&!w)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(m<=7)return void(jQuery.fn.velocity=jQuery.fn.animate);var x=400,S="swing",E={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:e.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:n.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[],delayedElements:{count:0}},CSS:{},Utilities:h,Redirects:{},Easings:{},Promise:e.Promise,defaults:{queue:"",duration:x,easing:S,begin:i,complete:i,progress:i,display:i,visibility:i,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0,promiseRejectEmpty:!0},init:function(t){h.data(t,"velocity",{isSVG:_.isSVG(t),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:5,patch:0},debug:!1,timestamp:!0,pauseAll:function(t){var e=(new Date).getTime();h.each(E.State.calls,function(e,n){if(n){if(t!==i&&(n[2].queue!==t||!1===n[2].queue))return!0;n[5]={resume:!1}}}),h.each(E.State.delayedElements,function(t,n){n&&s(n,e)})},resumeAll:function(t){var e=(new Date).getTime();h.each(E.State.calls,function(e,n){if(n){if(t!==i&&(n[2].queue!==t||!1===n[2].queue))return!0;n[5]&&(n[5].resume=!0)}}),h.each(E.State.delayedElements,function(t,n){n&&l(n,e)})}};e.pageYOffset!==i?(E.State.scrollAnchor=e,E.State.scrollPropertyLeft="pageXOffset",E.State.scrollPropertyTop="pageYOffset"):(E.State.scrollAnchor=n.documentElement||n.body.parentNode||n.body,E.State.scrollPropertyLeft="scrollLeft",E.State.scrollPropertyTop="scrollTop");var T=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,n,i){var r={x:e.x+i.dx*n,v:e.v+i.dv*n,tension:e.tension,friction:e.friction};return{dx:r.v,dv:t(r)}}function n(n,i){var r={dx:n.v,dv:t(n)},o=e(n,.5*i,r),a=e(n,.5*i,o),s=e(n,i,a),l=1/6*(r.dx+2*(o.dx+a.dx)+s.dx),u=1/6*(r.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+l*i,n.v=n.v+u*i,n}return function t(e,i,r){var o,a,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0;for(e=parseFloat(e)||500,i=parseFloat(i)||20,r=r||null,l.tension=e,l.friction=i,o=null!==r,o?(c=t(e,i),a=c/r*.016):a=.016;;)if(s=n(s||l,a),u.push(1+s.x),c+=16,!(Math.abs(s.x)>1e-4&&Math.abs(s.v)>1e-4))break;return o?function(t){return u[t*(u.length-1)|0]}:c}}();E.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},h.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){E.Easings[e[0]]=c.apply(null,e[1])});var C=E.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t<C.Lists.colors.length;t++){var e="color"===C.Lists.colors[t]?"0 0 0 1":"255 255 255 1";C.Hooks.templates[C.Lists.colors[t]]=["Red Green Blue Alpha",e]}var n,i,r;if(m)for(n in C.Hooks.templates)if(C.Hooks.templates.hasOwnProperty(n)){i=C.Hooks.templates[n],r=i[0].split(" ");var o=i[1].match(C.RegEx.valueSplit);"Color"===r[0]&&(r.push(r.shift()),o.push(o.shift()),C.Hooks.templates[n]=[r.join(" "),o.join(" ")])}for(n in C.Hooks.templates)if(C.Hooks.templates.hasOwnProperty(n)){i=C.Hooks.templates[n],r=i[0].split(" ");for(var a in r)if(r.hasOwnProperty(a)){var s=n+r[a],l=a;C.Hooks.registered[s]=[n,l]}}},getRoot:function(t){var e=C.Hooks.registered[t];return e?e[0]:t},getUnit:function(t,e){var n=(t.substr(e||0,5).match(/^[a-z%]+/)||[])[0]||"";return n&&b(C.Lists.units,n)?n:""},fixColors:function(t){return t.replace(/(rgba?\(\s*)?(\b[a-z]+\b)/g,function(t,e,n){return C.Lists.colorNames.hasOwnProperty(n)?(e||"rgba(")+C.Lists.colorNames[n]+(e?"":",1)"):e+n})},cleanRootPropertyValue:function(t,e){return C.RegEx.valueUnwrap.test(e)&&(e=e.match(C.RegEx.valueUnwrap)[1]),C.Values.isCSSNullValue(e)&&(e=C.Hooks.templates[t][1]),e},extractValue:function(t,e){var n=C.Hooks.registered[t];if(n){var i=n[0],r=n[1];return e=C.Hooks.cleanRootPropertyValue(i,e),e.toString().match(C.RegEx.valueSplit)[r]}return e},injectValue:function(t,e,n){var i=C.Hooks.registered[t];if(i){var r,o=i[0],a=i[1];return n=C.Hooks.cleanRootPropertyValue(o,n),r=n.toString().match(C.RegEx.valueSplit),r[a]=e,r.join(" ")}return n}},Normalizations:{registered:{clip:function(t,e,n){switch(t){case"name":return"clip";case"extract":var i;return C.RegEx.wrappedValueAlreadyExtracted.test(n)?i=n:(i=n.toString().match(C.RegEx.valueUnwrap),i=i?i[1].replace(/,(\s+)?/g," "):n),i;case"inject":return"rect("+n+")"}},blur:function(t,e,n){switch(t){case"name":return E.State.isFirefox?"filter":"-webkit-filter";case"extract":var i=parseFloat(n);if(!i&&0!==i){var r=n.toString().match(/blur\(([0-9]+[A-z]+)\)/i);i=r?r[1]:0}return i;case"inject":return parseFloat(n)?"blur("+n+")":"none"}},opacity:function(t,e,n){if(m<=8)switch(t){case"name":return"filter";case"extract":var i=n.toString().match(/alpha\(opacity=(.*)\)/i);return n=i?i[1]/100:1;case"inject":return e.style.zoom=1,parseFloat(n)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(n),10)+")"}else switch(t){case"name":return"opacity";case"extract":case"inject":return n}}},register:function(){function t(t,e,n){if("border-box"===C.getPropertyValue(e,"boxSizing").toString().toLowerCase()===(n||!1)){var i,r,o=0,a="width"===t?["Left","Right"]:["Top","Bottom"],s=["padding"+a[0],"padding"+a[1],"border"+a[0]+"Width","border"+a[1]+"Width"];for(i=0;i<s.length;i++)r=parseFloat(C.getPropertyValue(e,s[i])),isNaN(r)||(o+=r);return n?-o:o}return 0}function e(e,n){return function(i,r,o){switch(i){case"name":return e;case"extract":return parseFloat(o)+t(e,r,n);case"inject":return parseFloat(o)-t(e,r,n)+"px"}}}m&&!(m>9)||E.State.isGingerbread||(C.Lists.transformsBase=C.Lists.transformsBase.concat(C.Lists.transforms3D));for(var n=0;n<C.Lists.transformsBase.length;n++)!function(){var t=C.Lists.transformsBase[n];C.Normalizations.registered[t]=function(e,n,r){switch(e){case"name":return"transform";case"extract":return a(n)===i||a(n).transformCache[t]===i?/^scale/i.test(t)?1:0:a(n).transformCache[t].replace(/[()]/g,"");case"inject":var o=!1;switch(t.substr(0,t.length-1)){case"translate":o=!/(%|px|em|rem|vw|vh|\d)$/i.test(r);break;case"scal":case"scale":E.State.isAndroid&&a(n).transformCache[t]===i&&r<1&&(r=1),o=!/(\d)$/i.test(r);break;case"skew":case"rotate":o=!/(deg|\d)$/i.test(r)}return o||(a(n).transformCache[t]="("+r+")"),a(n).transformCache[t]}}}();for(var r=0;r<C.Lists.colors.length;r++)!function(){var t=C.Lists.colors[r];C.Normalizations.registered[t]=function(e,n,r){switch(e){case"name":return t;case"extract":var o;if(C.RegEx.wrappedValueAlreadyExtracted.test(r))o=r;else{var a,s={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(r)?a=s[r]!==i?s[r]:s.black:C.RegEx.isHex.test(r)?a="rgb("+C.Values.hexToRgb(r).join(" ")+")":/^rgba?\(/i.test(r)||(a=s.black),o=(a||r).toString().match(C.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return(!m||m>8)&&3===o.split(" ").length&&(o+=" 1"),o;case"inject":return/^rgb/.test(r)?r:(m<=8?4===r.split(" ").length&&(r=r.split(/\s+/).slice(0,3).join(" ")):3===r.split(" ").length&&(r+=" 1"),(m<=8?"rgb":"rgba")+"("+r.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}}();C.Normalizations.registered.innerWidth=e("width",!0),C.Normalizations.registered.innerHeight=e("height",!0),C.Normalizations.registered.outerWidth=e("width"),C.Normalizations.registered.outerHeight=e("height")}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(m||E.State.isAndroid&&!E.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(E.State.prefixMatches[t])return[E.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],n=0,i=e.length;n<i;n++){var r;if(r=0===n?t:e[n]+t.replace(/^\w/,function(t){return t.toUpperCase()}),_.isString(E.State.prefixElement.style[r]))return E.State.prefixMatches[t]=r,[r,!0]}return[t,!1]}},Values:{hexToRgb:function(t){var e,n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return t=t.replace(n,function(t,e,n,i){return e+e+n+n+i+i}),e=i.exec(t),e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[0,0,0]},isCSSNullValue:function(t){return!t||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(t)},getUnitType:function(t){return/^(rotate|skew)/i.test(t)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(t)?"":"px"},getDisplayType:function(t){var e=t&&t.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(e)?"inline":/^(li)$/i.test(e)?"list-item":/^(tr)$/i.test(e)?"table-row":/^(table)$/i.test(e)?"table":/^(tbody)$/i.test(e)?"table-row-group":"block"},addClass:function(t,e){if(t)if(t.classList)t.classList.add(e);else if(_.isString(t.className))t.className+=(t.className.length?" ":"")+e;else{var n=t.getAttribute(m<=7?"className":"class")||"";t.setAttribute("class",n+(n?" ":"")+e)}},removeClass:function(t,e){if(t)if(t.classList)t.classList.remove(e);else if(_.isString(t.className))t.className=t.className.toString().replace(new RegExp("(^|\\s)"+e.split(" ").join("|")+"(\\s|$)","gi")," ");else{var n=t.getAttribute(m<=7?"className":"class")||"";t.setAttribute("class",n.replace(new RegExp("(^|s)"+e.split(" ").join("|")+"(s|$)","gi")," "))}}},getPropertyValue:function(t,n,r,o){function s(t,n){var r=0;if(m<=8)r=h.css(t,n);else{var l=!1;/^(width|height)$/.test(n)&&0===C.getPropertyValue(t,"display")&&(l=!0,C.setPropertyValue(t,"display",C.Values.getDisplayType(t)));var u=function(){l&&C.setPropertyValue(t,"display","none")};if(!o){if("height"===n&&"border-box"!==C.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var c=t.offsetHeight-(parseFloat(C.getPropertyValue(t,"borderTopWidth"))||0)-(parseFloat(C.getPropertyValue(t,"borderBottomWidth"))||0)-(parseFloat(C.getPropertyValue(t,"paddingTop"))||0)-(parseFloat(C.getPropertyValue(t,"paddingBottom"))||0);return u(),c}if("width"===n&&"border-box"!==C.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var f=t.offsetWidth-(parseFloat(C.getPropertyValue(t,"borderLeftWidth"))||0)-(parseFloat(C.getPropertyValue(t,"borderRightWidth"))||0)-(parseFloat(C.getPropertyValue(t,"paddingLeft"))||0)-(parseFloat(C.getPropertyValue(t,"paddingRight"))||0);return u(),f}}var d;d=a(t)===i?e.getComputedStyle(t,null):a(t).computedStyle?a(t).computedStyle:a(t).computedStyle=e.getComputedStyle(t,null),"borderColor"===n&&(n="borderTopColor"),r=9===m&&"filter"===n?d.getPropertyValue(n):d[n],""!==r&&null!==r||(r=t.style[n]),u()}if("auto"===r&&/^(top|right|bottom|left)$/i.test(n)){var p=s(t,"position");("fixed"===p||"absolute"===p&&/top|left/i.test(n))&&(r=h(t).position()[n]+"px")}return r}var l;if(C.Hooks.registered[n]){var u=n,c=C.Hooks.getRoot(u);r===i&&(r=C.getPropertyValue(t,C.Names.prefixCheck(c)[0])),C.Normalizations.registered[c]&&(r=C.Normalizations.registered[c]("extract",t,r)),l=C.Hooks.extractValue(u,r)}else if(C.Normalizations.registered[n]){var f,d;f=C.Normalizations.registered[n]("name",t),"transform"!==f&&(d=s(t,C.Names.prefixCheck(f)[0]),C.Values.isCSSNullValue(d)&&C.Hooks.templates[n]&&(d=C.Hooks.templates[n][1])),l=C.Normalizations.registered[n]("extract",t,d)}if(!/^[\d-]/.test(l)){var p=a(t);if(p&&p.isSVG&&C.Names.SVGAttribute(n))if(/^(height|width)$/i.test(n))try{l=t.getBBox()[n]}catch(t){l=0}else l=t.getAttribute(n);else l=s(t,C.Names.prefixCheck(n)[0])}return C.Values.isCSSNullValue(l)&&(l=0),E.debug,l},setPropertyValue:function(t,n,i,r,o){var s=n;if("scroll"===n)o.container?o.container["scroll"+o.direction]=i:"Left"===o.direction?e.scrollTo(i,o.alternateValue):e.scrollTo(o.alternateValue,i);else if(C.Normalizations.registered[n]&&"transform"===C.Normalizations.registered[n]("name",t))C.Normalizations.registered[n]("inject",t,i),s="transform",i=a(t).transformCache[n];else{if(C.Hooks.registered[n]){var l=n,u=C.Hooks.getRoot(n);r=r||C.getPropertyValue(t,u),i=C.Hooks.injectValue(l,i,r),n=u}if(C.Normalizations.registered[n]&&(i=C.Normalizations.registered[n]("inject",t,i),n=C.Normalizations.registered[n]("name",t)),s=C.Names.prefixCheck(n)[0],m<=8)try{t.style[s]=i}catch(t){E.debug}else{var c=a(t);c&&c.isSVG&&C.Names.SVGAttribute(n)?t.setAttribute(n,i):t.style[s]=i}E.debug}return[s,i]},flushTransformCache:function(t){var e="",n=a(t);if((m||E.State.isAndroid&&!E.State.isChrome)&&n&&n.isSVG){var i=function(e){return parseFloat(C.getPropertyValue(t,e))},r={translate:[i("translateX"),i("translateY")],skewX:[i("skewX")],skewY:[i("skewY")],scale:1!==i("scale")?[i("scale"),i("scale")]:[i("scaleX"),i("scaleY")],rotate:[i("rotateZ"),0,0]};h.each(a(t).transformCache,function(t){/^translate/i.test(t)?t="translate":/^scale/i.test(t)?t="scale":/^rotate/i.test(t)&&(t="rotate"),r[t]&&(e+=t+"("+r[t].join(" ")+") ",delete r[t])})}else{var o,s;h.each(a(t).transformCache,function(n){if(o=a(t).transformCache[n],"transformPerspective"===n)return s=o,!0;9===m&&"rotateZ"===n&&(n="rotate"),e+=n+o+" "}),s&&(e="perspective"+s+" "+e)}C.setPropertyValue(t,"transform",e)}};C.Hooks.register(),C.Normalizations.register(),E.hook=function(t,e,n){var r;return t=o(t),h.each(t,function(t,o){if(a(o)===i&&E.init(o),n===i)r===i&&(r=C.getPropertyValue(o,e));else{var s=C.setPropertyValue(o,e,n);"transform"===s[0]&&E.CSS.flushTransformCache(o),r=s}}),r};var A=function t(){function r(){return m?A.promise||null:g}function u(t,r){function o(o){var c,p;if(l.begin&&0===I)try{l.begin.call(y,y)}catch(t){setTimeout(function(){throw t},1)}if("scroll"===P){var m,g,v,x=/^x$/i.test(l.axis)?"Left":"Top",T=parseFloat(l.offset)||0;l.container?_.isWrapped(l.container)||_.isNode(l.container)?(l.container=l.container[0]||l.container,m=l.container["scroll"+x],v=m+h(t).position()[x.toLowerCase()]+T):l.container=null:(m=E.State.scrollAnchor[E.State["scrollProperty"+x]],g=E.State.scrollAnchor[E.State["scrollProperty"+("Left"===x?"Top":"Left")]],v=h(t).offset()[x.toLowerCase()]+T),u={scroll:{rootPropertyValue:!1,startValue:m,currentValue:m,endValue:v,unitType:"",easing:l.easing,scrollData:{container:l.container,direction:x,alternateValue:g}},element:t},E.debug}else if("reverse"===P){if(!(c=a(t)))return;if(!c.tweensContainer)return void h.dequeue(t,l.queue);"none"===c.opts.display&&(c.opts.display="auto"),"hidden"===c.opts.visibility&&(c.opts.visibility="visible"),c.opts.loop=!1,c.opts.begin=null,c.opts.complete=null,S.easing||delete l.easing,S.duration||delete l.duration,l=h.extend({},c.opts,l),p=h.extend(!0,{},c?c.tweensContainer:null);for(var k in p)if(p.hasOwnProperty(k)&&"element"!==k){var D=p[k].startValue;p[k].startValue=p[k].currentValue=p[k].endValue,p[k].endValue=D,_.isEmptyObject(S)||(p[k].easing=l.easing),E.debug}u=p}else if("start"===P){c=a(t),c&&c.tweensContainer&&!0===c.isAnimating&&(p=c.tweensContainer);var N=function(r,o){var a,f=C.Hooks.getRoot(r),d=!1,m=o[0],g=o[1],v=o[2];if(!(c&&c.isSVG||"tween"===f||!1!==C.Names.prefixCheck(f)[1]||C.Normalizations.registered[f]!==i))return void E.debug;(l.display!==i&&null!==l.display&&"none"!==l.display||l.visibility!==i&&"hidden"!==l.visibility)&&/opacity|filter/.test(r)&&!v&&0!==m&&(v=0),l._cacheValues&&p&&p[r]?(v===i&&(v=p[r].endValue+p[r].unitType),d=c.rootPropertyValueCache[f]):C.Hooks.registered[r]?v===i?(d=C.getPropertyValue(t,f),v=C.getPropertyValue(t,r,d)):d=C.Hooks.templates[f][1]:v===i&&(v=C.getPropertyValue(t,r));var y,b,w,x=!1,S=function(t,e){var n,i;return i=(e||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(t){return n=t,""}),n||(n=C.Values.getUnitType(t)),[i,n]};if(v!==m&&_.isString(v)&&_.isString(m)){a="";var T=0,A=0,O=[],I=[],k=0,D=0,P=0;for(v=C.Hooks.fixColors(v),m=C.Hooks.fixColors(m);T<v.length&&A<m.length;){var N=v[T],L=m[A];if(/[\d\.-]/.test(N)&&/[\d\.-]/.test(L)){for(var j=N,B=L,V=".",M=".";++T<v.length;){if((N=v[T])===V)V="..";else if(!/\d/.test(N))break;j+=N}for(;++A<m.length;){if((L=m[A])===M)M="..";else if(!/\d/.test(L))break;B+=L}var R=C.Hooks.getUnit(v,T),H=C.Hooks.getUnit(m,A);if(T+=R.length,A+=H.length,R===H)j===B?a+=j+R:(a+="{"+O.length+(D?"!":"")+"}"+R,O.push(parseFloat(j)),I.push(parseFloat(B)));else{var W=parseFloat(j),U=parseFloat(B);a+=(k<5?"calc":"")+"("+(W?"{"+O.length+(D?"!":"")+"}":"0")+R+" + "+(U?"{"+(O.length+(W?1:0))+(D?"!":"")+"}":"0")+H+")",W&&(O.push(W),I.push(0)),U&&(O.push(0),I.push(U))}}else{if(N!==L){k=0;break}a+=N,T++,A++,0===k&&"c"===N||1===k&&"a"===N||2===k&&"l"===N||3===k&&"c"===N||k>=4&&"("===N?k++:(k&&k<5||k>=4&&")"===N&&--k<5)&&(k=0),0===D&&"r"===N||1===D&&"g"===N||2===D&&"b"===N||3===D&&"a"===N||D>=3&&"("===N?(3===D&&"a"===N&&(P=1),D++):P&&","===N?++P>3&&(D=P=0):(P&&D<(P?5:4)||D>=(P?4:3)&&")"===N&&--D<(P?5:4))&&(D=P=0)}}T===v.length&&A===m.length||(E.debug,a=i),a&&(O.length?(E.debug,v=O,m=I,b=w=""):a=i)}a||(y=S(r,v),v=y[0],w=y[1],y=S(r,m),m=y[0].replace(/^([+-\/*])=/,function(t,e){return x=e,""}),b=y[1],v=parseFloat(v)||0,m=parseFloat(m)||0,"%"===b&&(/^(fontSize|lineHeight)$/.test(r)?(m/=100,b="em"):/^scale/.test(r)?(m/=100,b=""):/(Red|Green|Blue)$/i.test(r)&&(m=m/100*255,b="")));if(/[\/*]/.test(x))b=w;else if(w!==b&&0!==v)if(0===m)b=w;else{s=s||function(){var i={myParent:t.parentNode||n.body,position:C.getPropertyValue(t,"position"),fontSize:C.getPropertyValue(t,"fontSize")},r=i.position===F.lastPosition&&i.myParent===F.lastParent,o=i.fontSize===F.lastFontSize;F.lastParent=i.myParent,F.lastPosition=i.position,F.lastFontSize=i.fontSize;var a={};if(o&&r)a.emToPx=F.lastEmToPx,a.percentToPxWidth=F.lastPercentToPxWidth,a.percentToPxHeight=F.lastPercentToPxHeight;else{var s=c&&c.isSVG?n.createElementNS("http://www.w3.org/2000/svg","rect"):n.createElement("div");E.init(s),i.myParent.appendChild(s),h.each(["overflow","overflowX","overflowY"],function(t,e){E.CSS.setPropertyValue(s,e,"hidden")}),E.CSS.setPropertyValue(s,"position",i.position),E.CSS.setPropertyValue(s,"fontSize",i.fontSize),E.CSS.setPropertyValue(s,"boxSizing","content-box"),h.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){E.CSS.setPropertyValue(s,e,"100%")}),E.CSS.setPropertyValue(s,"paddingLeft","100em"),a.percentToPxWidth=F.lastPercentToPxWidth=(parseFloat(C.getPropertyValue(s,"width",null,!0))||1)/100,a.percentToPxHeight=F.lastPercentToPxHeight=(parseFloat(C.getPropertyValue(s,"height",null,!0))||1)/100,a.emToPx=F.lastEmToPx=(parseFloat(C.getPropertyValue(s,"paddingLeft"))||1)/100,i.myParent.removeChild(s)}return null===F.remToPx&&(F.remToPx=parseFloat(C.getPropertyValue(n.body,"fontSize"))||16),null===F.vwToPx&&(F.vwToPx=parseFloat(e.innerWidth)/100,F.vhToPx=parseFloat(e.innerHeight)/100),a.remToPx=F.remToPx,a.vwToPx=F.vwToPx,a.vhToPx=F.vhToPx,E.debug,a}();var q=/margin|padding|left|right|width|text|word|letter/i.test(r)||/X$/.test(r)||"x"===r?"x":"y";switch(w){case"%":v*="x"===q?s.percentToPxWidth:s.percentToPxHeight;break;case"px":break;default:v*=s[w+"ToPx"]}switch(b){case"%":v*=1/("x"===q?s.percentToPxWidth:s.percentToPxHeight);break;case"px":break;default:v*=1/s[b+"ToPx"]}}switch(x){case"+":m=v+m;break;case"-":m=v-m;break;case"*":m*=v;break;case"/":m=v/m}u[r]={rootPropertyValue:d,startValue:v,currentValue:v,endValue:m,unitType:b,easing:g},a&&(u[r].pattern=a),E.debug};for(var L in w)if(w.hasOwnProperty(L)){var j=C.Names.camelCase(L),B=function(e,n){var i,o,a;return _.isFunction(e)&&(e=e.call(t,r,O)),_.isArray(e)?(i=e[0],!_.isArray(e[1])&&/^[\d-]/.test(e[1])||_.isFunction(e[1])||C.RegEx.isHex.test(e[1])?a=e[1]:_.isString(e[1])&&!C.RegEx.isHex.test(e[1])&&E.Easings[e[1]]||_.isArray(e[1])?(o=n?e[1]:f(e[1],l.duration),a=e[2]):a=e[1]||e[2]):i=e,n||(o=o||l.easing),_.isFunction(i)&&(i=i.call(t,r,O)),_.isFunction(a)&&(a=a.call(t,r,O)),[i||0,o,a]}(w[L]);if(b(C.Lists.colors,j)){var V=B[0],R=B[1],H=B[2];if(C.RegEx.isHex.test(V)){for(var W=["Red","Green","Blue"],U=C.Values.hexToRgb(V),q=H?C.Values.hexToRgb(H):i,z=0;z<W.length;z++){var $=[U[z]];R&&$.push(R),q!==i&&$.push(q[z]),N(j+W[z],$)}continue}}N(j,B)}u.element=t}u.element&&(C.Values.addClass(t,"velocity-animating"),M.push(u),c=a(t),c&&(""===l.queue&&(c.tweensContainer=u,c.opts=l),c.isAnimating=!0),I===O-1?(E.State.calls.push([M,y,l,null,A.resolver,null,0]),!1===E.State.isTicking&&(E.State.isTicking=!0,d())):I++)}var s,l=h.extend({},E.defaults,S),u={};switch(a(t)===i&&E.init(t),parseFloat(l.delay)&&!1!==l.queue&&h.queue(t,l.queue,function(e){E.velocityQueueEntryFlag=!0;var n=E.State.delayedElements.count++;E.State.delayedElements[n]=t;var i=function(t){return function(){E.State.delayedElements[t]=!1,e()}}(n);a(t).delayBegin=(new Date).getTime(),a(t).delay=parseFloat(l.delay),a(t).delayTimer={setTimeout:setTimeout(e,parseFloat(l.delay)),next:i}}),l.duration.toString().toLowerCase()){case"fast":l.duration=200;break;case"normal":l.duration=x;break;case"slow":l.duration=600;break;default:l.duration=parseFloat(l.duration)||1}if(!1!==E.mock&&(!0===E.mock?l.duration=l.delay=1:(l.duration*=parseFloat(E.mock)||1,l.delay*=parseFloat(E.mock)||1)),l.easing=f(l.easing,l.duration),l.begin&&!_.isFunction(l.begin)&&(l.begin=null),l.progress&&!_.isFunction(l.progress)&&(l.progress=null),l.complete&&!_.isFunction(l.complete)&&(l.complete=null),l.display!==i&&null!==l.display&&(l.display=l.display.toString().toLowerCase(),"auto"===l.display&&(l.display=E.CSS.Values.getDisplayType(t))),l.visibility!==i&&null!==l.visibility&&(l.visibility=l.visibility.toString().toLowerCase()),l.mobileHA=l.mobileHA&&E.State.isMobile&&!E.State.isGingerbread,!1===l.queue)if(l.delay){var c=E.State.delayedElements.count++;E.State.delayedElements[c]=t;var p=function(t){return function(){E.State.delayedElements[t]=!1,o()}}(c);a(t).delayBegin=(new Date).getTime(),a(t).delay=parseFloat(l.delay),a(t).delayTimer={setTimeout:setTimeout(o,parseFloat(l.delay)),next:p}}else o();else h.queue(t,l.queue,function(t,e){if(!0===e)return A.promise&&A.resolver(y),!0;E.velocityQueueEntryFlag=!0,o(t)});""!==l.queue&&"fx"!==l.queue||"inprogress"===h.queue(t)[0]||h.dequeue(t)}var c,m,g,v,y,w,S,T=arguments[0]&&(arguments[0].p||h.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||_.isString(arguments[0].properties));_.isWrapped(this)?(m=!1,v=0,y=this,g=this):(m=!0,v=1,y=T?arguments[0].elements||arguments[0].e:arguments[0]);var A={promise:null,resolver:null,rejecter:null};if(m&&E.Promise&&(A.promise=new E.Promise(function(t,e){A.resolver=t,A.rejecter=e})),T?(w=arguments[0].properties||arguments[0].p,S=arguments[0].options||arguments[0].o):(w=arguments[v],S=arguments[v+1]),!(y=o(y)))return void(A.promise&&(w&&S&&!1===S.promiseRejectEmpty?A.resolver():A.rejecter()));var O=y.length,I=0;if(!/^(stop|finish|finishAll|pause|resume)$/i.test(w)&&!h.isPlainObject(S)){var k=v+1;S={};for(var D=k;D<arguments.length;D++)_.isArray(arguments[D])||!/^(fast|normal|slow)$/i.test(arguments[D])&&!/^\d/.test(arguments[D])?_.isString(arguments[D])||_.isArray(arguments[D])?S.easing=arguments[D]:_.isFunction(arguments[D])&&(S.complete=arguments[D]):S.duration=arguments[D]}var P;switch(w){case"scroll":P="scroll";break;case"reverse":P="reverse";break;case"pause":var N=(new Date).getTime();return h.each(y,function(t,e){s(e,N)}),h.each(E.State.calls,function(t,e){var n=!1;e&&h.each(e[1],function(t,r){var o=S===i?"":S;return!0!==o&&e[2].queue!==o&&(S!==i||!1!==e[2].queue)||(h.each(y,function(t,i){if(i===r)return e[5]={resume:!1},n=!0,!1}),!n&&void 0)})}),r();case"resume":return h.each(y,function(t,e){l(e,N)}),h.each(E.State.calls,function(t,e){var n=!1;e&&h.each(e[1],function(t,r){var o=S===i?"":S;return!0!==o&&e[2].queue!==o&&(S!==i||!1!==e[2].queue)||(!e[5]||(h.each(y,function(t,i){if(i===r)return e[5].resume=!0,n=!0,!1}),!n&&void 0))})}),r();case"finish":case"finishAll":case"stop":h.each(y,function(t,e){a(e)&&a(e).delayTimer&&(clearTimeout(a(e).delayTimer.setTimeout),a(e).delayTimer.next&&a(e).delayTimer.next(),delete a(e).delayTimer),"finishAll"!==w||!0!==S&&!_.isString(S)||(h.each(h.queue(e,_.isString(S)?S:""),function(t,e){_.isFunction(e)&&e()}),h.queue(e,_.isString(S)?S:"",[]))});var L=[];return h.each(E.State.calls,function(t,e){e&&h.each(e[1],function(n,r){var o=S===i?"":S;if(!0!==o&&e[2].queue!==o&&(S!==i||!1!==e[2].queue))return!0;h.each(y,function(n,i){if(i===r)if((!0===S||_.isString(S))&&(h.each(h.queue(i,_.isString(S)?S:""),function(t,e){_.isFunction(e)&&e(null,!0)}),h.queue(i,_.isString(S)?S:"",[])),"stop"===w){var s=a(i);s&&s.tweensContainer&&!1!==o&&h.each(s.tweensContainer,function(t,e){e.endValue=e.currentValue}),L.push(t)}else"finish"!==w&&"finishAll"!==w||(e[2].duration=1)})})}),"stop"===w&&(h.each(L,function(t,e){p(e,!0)}),A.promise&&A.resolver(y)),r();default:if(!h.isPlainObject(w)||_.isEmptyObject(w)){if(_.isString(w)&&E.Redirects[w]){c=h.extend({},S);var j=c.duration,B=c.delay||0;return!0===c.backwards&&(y=h.extend(!0,[],y).reverse()),h.each(y,function(t,e){parseFloat(c.stagger)?c.delay=B+parseFloat(c.stagger)*t:_.isFunction(c.stagger)&&(c.delay=B+c.stagger.call(e,t,O)),c.drag&&(c.duration=parseFloat(j)||(/^(callout|transition)/.test(w)?1e3:x),c.duration=Math.max(c.duration*(c.backwards?1-t/O:(t+1)/O),.75*c.duration,200)),E.Redirects[w].call(e,e,c||{},t,O,y,A.promise?A:i)}),r()}var V="Velocity: First argument ("+w+") was not a property map, a known action, or a registered redirect. Aborting.";return A.promise?A.rejecter(new Error(V)):e.console,r()}P="start"}var F={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},M=[];h.each(y,function(t,e){_.isNode(e)&&u(e,t)}),c=h.extend({},E.defaults,S),c.loop=parseInt(c.loop,10);var R=2*c.loop-1;if(c.loop)for(var H=0;H<R;H++){var W={delay:c.delay,progress:c.progress};H===R-1&&(W.display=c.display,W.visibility=c.visibility,W.complete=c.complete),t(y,"reverse",W)}return r()};E=h.extend(A,E),E.animate=A;var O=e.requestAnimationFrame||g;if(!E.State.isMobile&&n.hidden!==i){var I=function(){n.hidden?(O=function(t){return setTimeout(function(){t(!0)},16)},d()):O=e.requestAnimationFrame||g};I(),n.addEventListener("visibilitychange",I)}return t.Velocity=E,t!==e&&(t.fn.velocity=A,t.fn.velocity.defaults=E.defaults),h.each(["Down","Up"],function(t,e){E.Redirects["slide"+e]=function(t,n,r,o,a,s){var l=h.extend({},n),u=l.begin,c=l.complete,f={},d={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""};l.display===i&&(l.display="Down"===e?"inline"===E.CSS.Values.getDisplayType(t)?"inline-block":"block":"none"),l.begin=function(){0===r&&u&&u.call(a,a);for(var n in d)if(d.hasOwnProperty(n)){f[n]=t.style[n];var i=C.getPropertyValue(t,n);d[n]="Down"===e?[i,0]:[0,i]}f.overflow=t.style.overflow,t.style.overflow="hidden"},l.complete=function(){for(var e in f)f.hasOwnProperty(e)&&(t.style[e]=f[e]);r===o-1&&(c&&c.call(a,a),s&&s.resolver(a))},E(t,d,l)}}),h.each(["In","Out"],function(t,e){E.Redirects["fade"+e]=function(t,n,r,o,a,s){var l=h.extend({},n),u=l.complete,c={opacity:"In"===e?1:0};0!==r&&(l.begin=null),l.complete=r!==o-1?null:function(){u&&u.call(a,a),s&&s.resolver(a)},l.display===i&&(l.display="In"===e?"auto":"none"),E(this,c,l)}}),E}(window.jQuery||window.Zepto||window,window,window?window.document:void 0)})},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}n(27),n(21),n(23),n(20),n(24),n(19),n(10),n(14),n(17),n(18),n(9);var r=n(1),o=i(r),a=n(22),s=i(a),l=n(2),u=i(l),c=n(12),f=i(c),d=n(3),p=i(d),h=n(4),m=i(h),g=n(13),v=i(g);n(15),n(16),n(11);var y=n(0),b=i(y);for(var _ in s.default.prototype)o.default[_]=s.default.prototype[_];(0,b.default)(document).ready(function(){var t=(0,b.default)(".js-dropdown"),e=new f.default,n=(0,b.default)('.js-top-menu ul[data-depth="0"]'),i=new u.default(t),r=new v.default(n),o=new p.default,a=new m.default;i.init(),e.init(),r.init(),o.init(),a.init(),(0,b.default)('.carousel[data-touch="true"]').swipe({swipe:function(t,e,n,i,r,o){"left"==e&&(0,b.default)(this).carousel("next"),"right"==e&&(0,b.default)(this).carousel("prev")},allowPageScroll:"vertical"})})},function(t,e){},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(){a.default.each((0,a.default)(u),function(t,e){(0,a.default)(e).TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin js-increase-product-quantity",buttonup_class:"btn btn-touchspin js-touchspin js-decrease-product-quantity",min:parseInt((0,a.default)(e).attr("min"),10),max:1e6})}),p.switchErrorStat()}var o=n(0),a=i(o),s=n(1),l=i(s);l.default.cart=l.default.cart||{},l.default.cart.active_inputs=null;var u='input[name="product-quantity-spin"]',c=!1,f=!1,d="";(0,a.default)(document).ready(function(){function t(t){return"on.startupspin"===t||"on.startdownspin"===t}function e(t){return"on.startupspin"===t}function n(t){var e=t.parents(".bootstrap-touchspin").find(h);return e.is(":focus")?null:e}function i(t){var e=t.split("-"),n=void 0,i=void 0,r="";for(n=0;n<e.length;n++)i=e[n],0!==n&&(i=i.substring(0,1).toUpperCase()+i.substring(1)),r+=i;return r}function o(r,o){if(!t(o))return{url:r.attr("href"),type:i(r.data("link-action"))};var a=n(r);if(a){return e(o)?{url:a.data("up-url"),type:"increaseProductQuantity"}:{url:a.data("down-url"),type:"decreaseProductQuantity"}}}function s(t,e,n){return v(),a.default.ajax({url:t,method:"POST",data:e,dataType:"json",beforeSend:function(t){m.push(t)}}).then(function(t){p.checkUpdateOpertation(t),n.val(t.quantity);var e;e=n&&n.dataset?n.dataset:t,l.default.emit("updateCart",{reason:e})}).fail(function(t){l.default.emit("handleError",{eventType:"updateProductQuantityInCart",resp:t})})}function c(t){return{ajax:"1",qty:Math.abs(t),action:"update",op:f(t)}}function f(t){return t>0?"up":"down"}function d(t){var e=(0,a.default)(t.currentTarget),n=e.data("update-url"),i=e.attr("value"),r=e.val();if(r!=parseInt(r)||r<0||isNaN(r))return void e.val(i);var o=r-i;0!==o&&(e.attr("value",r),s(n,c(o),e))}var h=".js-cart-line-product-quantity",m=[];l.default.on("updateCart",function(){(0,a.default)(".quickview").modal("hide")}),l.default.on("updatedCart",function(){r()}),r();var g=(0,a.default)("body"),v=function(){for(var t;m.length>0;)t=m.pop(),t.abort()},y=function(t){return(0,a.default)(t.parents(".bootstrap-touchspin").find("input"))},b=function(t){t.preventDefault();var e=(0,a.default)(t.currentTarget),n=t.currentTarget.dataset,i=o(e,t.namespace),r={ajax:"1",action:"update"};void 0!==i&&(v(),a.default.ajax({url:i.url,method:"POST",data:r,dataType:"json",beforeSend:function(t){m.push(t)}}).then(function(t){p.checkUpdateOpertation(t),y(e).val(t.quantity),l.default.emit("updateCart",{reason:n})}).fail(function(t){l.default.emit("handleError",{eventType:"updateProductInCart",resp:t,cartAction:i.type})}))};g.on("click",'[data-link-action="delete-from-cart"], [data-link-action="remove-voucher"]',b),g.on("touchspin.on.startdownspin",u,b),g.on("touchspin.on.startupspin",u,b),g.on("focusout keyup",h,function(t){if("keyup"===t.type)return 13===t.keyCode&&d(t),!1;d(t)});g.on("hidden.bs.collapse","#promo-code",function(){(0,a.default)(".display-promo").show(400)}),g.on("click",".promo-code-button",function(t){t.preventDefault(),(0,a.default)("#promo-code").collapse("toggle")}),g.on("click",".display-promo",function(t){(0,a.default)(t.currentTarget).hide(400)}),g.on("click",".js-discount .code",function(t){t.stopPropagation();var e=(0,a.default)(t.currentTarget);return(0,a.default)("[name=discount_name]").val(e.text()),(0,a.default)("#promo-code").collapse("show"),(0,a.default)(".display-promo").hide(400),!1})});var p={switchErrorStat:function(){var t=(0,a.default)(".checkout a");if(((0,a.default)("#notifications article.alert-danger").length||""!==d&&!c)&&t.addClass("disabled"),""!==d){var e=' <article class="alert alert-danger" role="alert" data-alert="danger"><ul><li>'+d+"</li></ul></article>";(0,a.default)("#notifications .container").html(e),d="",f=!1,c&&t.removeClass("disabled")}else!c&&f&&(c=!1,f=!1,(0,a.default)("#notifications .container").html(""),t.removeClass("disabled"))},checkUpdateOpertation:function(t){c=t.hasOwnProperty("hasError");var e=t.errors||"";d=e instanceof Array?e.join(" "):e,f=!0}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(){(0,s.default)(".js-terms a").on("click",function(t){t.preventDefault();var e=(0,s.default)(t.target).attr("href");e&&(e+="?content_only=1",s.default.get(e,function(t){(0,s.default)("#modal").find(".js-modal-content").html((0,s.default)(t).find(".page-cms").contents())}).fail(function(t){u.default.emit("handleError",{eventType:"clickTerms",resp:t})})),(0,s.default)("#modal").modal("show")}),(0,s.default)(".js-gift-checkbox").on("click",function(t){(0,s.default)("#gift").collapse("toggle")})}function o(){(0,s.default)(".card-block .cart-summary-products p a").on("click",function(t){t=(0,s.default)(this).find("i.material-icons"),"expand_more"==t.text()?t.text("expand_less"):t.text("expand_more")})}var a=n(0),s=i(a),l=n(1),u=i(l);(0,s.default)(document).ready(function(){1===(0,s.default)("body#checkout").length&&(r(),o()),u.default.on("updatedDeliveryForm",function(t){void 0!==t.deliveryOption&&0!==t.deliveryOption.length&&((0,s.default)(".carrier-extra-content").hide(),t.deliveryOption.next(".carrier-extra-content").slideDown())})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),a=n(0),s=i(a);o.default.blockcart=o.default.blockcart||{},o.default.blockcart.showModal=function(t){function e(){return(0,s.default)("#blockcart-modal")}var n=e();n.length&&n.remove(),(0,s.default)("body").append(t),n=e(),n.modal("show").on("hidden.bs.modal",function(t){o.default.emit("updateProduct",{reason:t.currentTarget.dataset,event:t})})}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(){i(this,t)}return r(t,[{key:"init",value:function(){this.parentFocus(),this.togglePasswordVisibility()}},{key:"parentFocus",value:function(){(0,a.default)(".js-child-focus").focus(function(){(0,a.default)(this).closest(".js-parent-focus").addClass("focus")}),(0,a.default)(".js-child-focus").focusout(function(){(0,a.default)(this).closest(".js-parent-focus").removeClass("focus")})}},{key:"togglePasswordVisibility",value:function(){(0,a.default)('button[data-action="show-password"]').on("click",function(){var t=(0,a.default)(this).closest(".input-group").children("input.js-visible-password");"password"===t.attr("type")?(t.attr("type","text"),(0,a.default)(this).text((0,a.default)(this).data("textHide"))):(t.attr("type","password"),(0,a.default)(this).text((0,a.default)(this).data("textShow")))})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=function(t,e,n){for(var i=!0;i;){var r=t,o=e,a=n;i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return;t=u,e=o,n=a,i=!0,s=u=void 0}},l=n(0),u=i(l),c=n(2),f=i(c),d=function(t){function e(){r(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),a(e,[{key:"init",value:function(){var t=this,n=void 0,i=this;this.el.find("li").hover(function(e){if(!t.el.parent().hasClass("mobile")){var i=(0,u.default)(e.currentTarget).attr("class");if(n!==i){var r=Array.prototype.slice.call(e.currentTarget.classList).map(function(t){return"string"==typeof t&&"."+t});n=r.join(""),n&&0===(0,u.default)(e.target).data("depth")&&(0,u.default)(n+" .js-sub-menu").css({top:(0,u.default)(""+n).height()+(0,u.default)(""+n).position().top})}}}),(0,u.default)("#menu-icon").on("click",function(){(0,u.default)("#mobile_top_menu_wrapper").toggle(),i.toggleMobileMenu()}),(0,u.default)(".js-top-menu .category").mouseleave(function(){t.el.parent().hasClass("mobile")}),this.el.on("click",function(e){t.el.parent().hasClass("mobile")||e.stopPropagation()}),prestashop.on("responsive update",function(t){(0,u.default)(".js-sub-menu").removeAttr("style"),i.toggleMobileMenu()}),s(Object.getPrototypeOf(e.prototype),"init",this).call(this)}},{key:"toggleMobileMenu",value:function(){(0,u.default)("#header").toggleClass("is-open"),(0,u.default)("#mobile_top_menu_wrapper").is(":visible")?(0,u.default)("#notifications, #wrapper, #footer").hide():(0,u.default)("#notifications, #wrapper, #footer").show()}}]),e}(f.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function i(){(0,a.default)("#order-return-form table thead input[type=checkbox]").on("click",function(){var t=(0,a.default)(this).prop("checked");(0,a.default)("#order-return-form table tbody input[type=checkbox]").each(function(e,n){(0,a.default)(n).prop("checked",t)})})}function r(){(0,a.default)("body#order-detail")&&i()}var o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o);(0,a.default)(document).ready(r)},function(t,e,n){"use strict";!function(t){var e=0,n=function(e,n){this.options=n,this.$elementFilestyle=[],this.$element=t(e)};n.prototype={clear:function(){this.$element.val(""),this.$elementFilestyle.find(":text").val(""),this.$elementFilestyle.find(".badge").remove()},destroy:function(){this.$element.removeAttr("style").removeData("filestyle"),this.$elementFilestyle.remove()},disabled:function(t){if(!0===t)this.options.disabled||(this.$element.attr("disabled","true"),this.$elementFilestyle.find("label").attr("disabled","true"),this.options.disabled=!0);else{if(!1!==t)return this.options.disabled;this.options.disabled&&(this.$element.removeAttr("disabled"),this.$elementFilestyle.find("label").removeAttr("disabled"),this.options.disabled=!1)}},buttonBefore:function(t){if(!0===t)this.options.buttonBefore||(this.options.buttonBefore=!0,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()));else{if(!1!==t)return this.options.buttonBefore;this.options.buttonBefore&&(this.options.buttonBefore=!1,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()))}},icon:function(t){if(!0===t)this.options.icon||(this.options.icon=!0,this.$elementFilestyle.find("label").prepend(this.htmlIcon()));else{if(!1!==t)return this.options.icon;this.options.icon&&(this.options.icon=!1,this.$elementFilestyle.find(".icon-span-filestyle").remove())}},input:function(t){if(!0===t)this.options.input||(this.options.input=!0,this.options.buttonBefore?this.$elementFilestyle.append(this.htmlInput()):this.$elementFilestyle.prepend(this.htmlInput()),this.$elementFilestyle.find(".badge").remove(),this.pushNameFiles(),this.$elementFilestyle.find(".group-span-filestyle").addClass("input-group-btn"));else{if(!1!==t)return this.options.input;if(this.options.input){this.options.input=!1,this.$elementFilestyle.find(":text").remove();var e=this.pushNameFiles();e.length>0&&this.options.badge&&this.$elementFilestyle.find("label").append(' <span class="badge">'+e.length+"</span>"),this.$elementFilestyle.find(".group-span-filestyle").removeClass("input-group-btn")}}},size:function(t){if(void 0===t)return this.options.size;var e=this.$elementFilestyle.find("label"),n=this.$elementFilestyle.find("input");e.removeClass("btn-lg btn-sm"),n.removeClass("input-lg input-sm"),"nr"!=t&&(e.addClass("btn-"+t),n.addClass("input-"+t))},placeholder:function(t){if(void 0===t)return this.options.placeholder;this.options.placeholder=t,this.$elementFilestyle.find("input").attr("placeholder",t)},buttonText:function(t){if(void 0===t)return this.options.buttonText;this.options.buttonText=t,this.$elementFilestyle.find("label .buttonText").html(this.options.buttonText)},buttonName:function(t){if(void 0===t)return this.options.buttonName;this.options.buttonName=t,this.$elementFilestyle.find("label").attr({class:"btn "+this.options.buttonName})},iconName:function(t){if(void 0===t)return this.options.iconName;this.$elementFilestyle.find(".icon-span-filestyle").attr({class:"icon-span-filestyle "+this.options.iconName})},htmlIcon:function(){return this.options.icon?'<span class="icon-span-filestyle '+this.options.iconName+'"></span> ':""},htmlInput:function(){return this.options.input?'<input type="text" class="form-control '+("nr"==this.options.size?"":"input-"+this.options.size)+'" placeholder="'+this.options.placeholder+'" disabled> ':""},pushNameFiles:function(){var t="",e=[];void 0===this.$element[0].files?e[0]={name:this.$element[0]&&this.$element[0].value}:e=this.$element[0].files;for(var n=0;n<e.length;n++)t+=e[n].name.split("\\").pop()+", ";return""!==t?this.$elementFilestyle.find(":text").val(t.replace(/\, $/g,"")):this.$elementFilestyle.find(":text").val(""),e},constructor:function(){var n=this,i="",r=n.$element.attr("id"),o="";""!==r&&r||(r="filestyle-"+e,n.$element.attr({id:r}),e++),o='<span class="group-span-filestyle '+(n.options.input?"input-group-btn":"")+'"><label for="'+r+'" class="btn '+n.options.buttonName+" "+("nr"==n.options.size?"":"btn-"+n.options.size)+'" '+(n.options.disabled?'disabled="true"':"")+">"+n.htmlIcon()+'<span class="buttonText">'+n.options.buttonText+"</span></label></span>",i=n.options.buttonBefore?o+n.htmlInput():n.htmlInput()+o,n.$elementFilestyle=t('<div class="bootstrap-filestyle input-group">'+i+"</div>"),n.$elementFilestyle.find(".group-span-filestyle").attr("tabindex","0").keypress(function(t){if(13===t.keyCode||32===t.charCode)return n.$elementFilestyle.find("label").click(),!1}),n.$element.css({position:"absolute",clip:"rect(0px 0px 0px 0px)"}).attr("tabindex","-1").after(n.$elementFilestyle),n.options.disabled&&n.$element.attr("disabled","true"),n.$element.change(function(){var t=n.pushNameFiles();0==n.options.input&&n.options.badge?0==n.$elementFilestyle.find(".badge").length?n.$elementFilestyle.find("label").append(' <span class="badge">'+t.length+"</span>"):0==t.length?n.$elementFilestyle.find(".badge").remove():n.$elementFilestyle.find(".badge").html(t.length):n.$elementFilestyle.find(".badge").remove()}),window.navigator.userAgent.search(/firefox/i)>-1&&n.$elementFilestyle.find("label").click(function(){return n.$element.click(),!1})}};var i=t.fn.filestyle;t.fn.filestyle=function(e,i){var r="",o=this.each(function(){if("file"===t(this).attr("type")){var o=t(this),a=o.data("filestyle"),s=t.extend({},t.fn.filestyle.defaults,e,"object"==typeof e&&e);a||(o.data("filestyle",a=new n(this,s)),a.constructor()),"string"==typeof e&&(r=a[e](i))}});return void 0!==typeof r?r:o},t.fn.filestyle.defaults={buttonText:"Choose file",iconName:"glyphicon glyphicon-folder-open",buttonName:"btn-default",size:"nr",input:!0,badge:!0,icon:!0,buttonBefore:!1,disabled:!1,placeholder:""},t.fn.filestyle.noConflict=function(){return t.fn.filestyle=i,this},t(function(){t(".filestyle").each(function(){var e=t(this),n={input:"false"!==e.attr("data-input"),icon:"false"!==e.attr("data-icon"),buttonBefore:"true"===e.attr("data-buttonBefore"),disabled:"true"===e.attr("data-disabled"),size:e.attr("data-size"),buttonText:e.attr("data-buttonText"),buttonName:e.attr("data-buttonName"),iconName:e.attr("data-iconName"),badge:"false"!==e.attr("data-badge"),placeholder:e.attr("data-placeholder")};e.filestyle(n)})})}(window.jQuery)},function(t,e,n){"use strict";!function(t){t.fn.scrollbox=function(e){var n={linear:!1,startDelay:2,delay:3,step:5,speed:32,switchItems:1,direction:"vertical",distance:"auto",autoPlay:!0,onMouseOverPause:!0,paused:!1,queue:null,listElement:"ul",listItemElement:"li",infiniteLoop:!0,switchAmount:0,afterForward:null,afterBackward:null,triggerStackable:!1};return e=t.extend(n,e),e.scrollOffset="vertical"===e.direction?"scrollTop":"scrollLeft",e.queue&&(e.queue=t("#"+e.queue)),this.each(function(){var n,i,r,o,a,s,l,u,c,f=t(this),d=null,p=null,h=!1,m=0,g=0;e.onMouseOverPause&&(f.bind("mouseover",function(){h=!0}),f.bind("mouseout",function(){h=!1})),n=f.children(e.listElement+":first-child"),!1===e.infiniteLoop&&0===e.switchAmount&&(e.switchAmount=n.children().length),s=function(){if(!h){var r,a,s,l,u;if(r=n.children(e.listItemElement+":first-child"),l="auto"!==e.distance?e.distance:"vertical"===e.direction?r.outerHeight(!0):r.outerWidth(!0),e.linear?s=Math.min(f[0][e.scrollOffset]+e.step,l):(u=Math.max(3,parseInt(.3*(l-f[0][e.scrollOffset]),10)),s=Math.min(f[0][e.scrollOffset]+u,l)),f[0][e.scrollOffset]=s,s>=l){for(a=0;a<e.switchItems;a++)e.queue&&e.queue.find(e.listItemElement).length>0?(n.append(e.queue.find(e.listItemElement)[0]),n.children(e.listItemElement+":first-child").remove()):n.append(n.children(e.listItemElement+":first-child")),++m;if(f[0][e.scrollOffset]=0,clearInterval(d),d=null,t.isFunction(e.afterForward)&&e.afterForward.call(f,{switchCount:m,currentFirstChild:n.children(e.listItemElement+":first-child")}),e.triggerStackable&&0!==g)return void i();if(!1===e.infiniteLoop&&m>=e.switchAmount)return;e.autoPlay&&(p=setTimeout(o,1e3*e.delay))}}},l=function(){if(!h){var r,a,s,l,u;if(0===f[0][e.scrollOffset]){for(a=0;a<e.switchItems;a++)n.children(e.listItemElement+":last-child").insertBefore(n.children(e.listItemElement+":first-child"));r=n.children(e.listItemElement+":first-child"),l="auto"!==e.distance?e.distance:"vertical"===e.direction?r.height():r.width(),f[0][e.scrollOffset]=l}if(e.linear?s=Math.max(f[0][e.scrollOffset]-e.step,0):(u=Math.max(3,parseInt(.3*f[0][e.scrollOffset],10)),s=Math.max(f[0][e.scrollOffset]-u,0)),f[0][e.scrollOffset]=s,0===s){if(--m,clearInterval(d),d=null,t.isFunction(e.afterBackward)&&e.afterBackward.call(f,{switchCount:m,currentFirstChild:n.children(e.listItemElement+":first-child")}),e.triggerStackable&&0!==g)return void i();e.autoPlay&&(p=setTimeout(o,1e3*e.delay))}}},i=function(){0!==g&&(g>0?(g--,p=setTimeout(o,0)):(g++,p=setTimeout(r,0)))},o=function(){clearInterval(d),d=setInterval(s,e.speed)},r=function(){clearInterval(d),d=setInterval(l,e.speed)},u=function(){e.autoPlay=!0,h=!1,clearInterval(d),d=setInterval(s,e.speed)},c=function(){h=!0},a=function(t){e.delay=t||e.delay,clearTimeout(p),e.autoPlay&&(p=setTimeout(o,1e3*e.delay))},e.autoPlay&&(p=setTimeout(o,1e3*e.startDelay)),f.bind("resetClock",function(t){a(t)}),f.bind("forward",function(){e.triggerStackable?null!==d?g++:o():(clearTimeout(p),o())}),f.bind("backward",function(){e.triggerStackable?null!==d?g--:r():(clearTimeout(p),r())}),f.bind("pauseHover",function(){c()}),f.bind("forwardHover",function(){u()}),f.bind("speedUp",function(t,n){"undefined"===n&&(n=Math.max(1,parseInt(e.speed/2,10))),e.speed=n}),f.bind("speedDown",function(t,n){"undefined"===n&&(n=2*e.speed),e.speed=n}),f.bind("updateConfig",function(n,i){e=t.extend(e,i)})})}}(jQuery)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t){(0,a.default)("#search_filters").replaceWith(t.rendered_facets),(0,a.default)("#js-active-search-filters").replaceWith(t.rendered_active_filters),(0,a.default)("#js-product-list-top").replaceWith(t.rendered_products_top),(0,a.default)("#js-product-list").replaceWith(t.rendered_products),(0,a.default)("#js-product-list-bottom").replaceWith(t.rendered_products_bottom),t.rendered_products_header&&(0,a.default)("#js-product-list-header").replaceWith(t.rendered_products_header),(new c.default).init()}var o=n(0),a=i(o),s=n(1),l=i(s);n(5);var u=n(3),c=i(u);(0,a.default)(document).ready(function(){l.default.on("clickQuickView",function(e){var n={action:"quickview",id_product:e.dataset.idProduct,id_product_attribute:e.dataset.idProductAttribute};a.default.post(l.default.urls.pages.product,n,null,"json").then(function(e){(0,a.default)("body").append(e.quickview_html);var n=(0,a.default)("#quickview-modal-"+e.product.id+"-"+e.product.id_product_attribute);n.modal("show"),t(n),n.on("hidden.bs.modal",function(){n.remove()})}).fail(function(t){l.default.emit("handleError",{eventType:"clickQuickView",resp:t})})});var t=function(t){var n=(0,a.default)(".js-arrows"),i=t.find(".js-qv-product-images");(0,a.default)(".js-thumb").on("click",function(t){(0,a.default)(".js-thumb").hasClass("selected")&&(0,a.default)(".js-thumb").removeClass("selected"),(0,a.default)(t.currentTarget).addClass("selected"),(0,a.default)(".js-qv-product-cover").attr("src",(0,a.default)(t.target).data("image-large-src"))}),i.find("li").length<=4?n.hide():n.on("click",function(t){(0,a.default)(t.target).hasClass("arrow-up")&&(0,a.default)(".js-qv-product-images").position().top<0?(e("up"),(0,a.default)(".arrow-down").css("opacity","1")):(0,a.default)(t.target).hasClass("arrow-down")&&i.position().top+i.height()>(0,a.default)(".js-qv-mask").height()&&(e("down"),(0,a.default)(".arrow-up").css("opacity","1"))}),t.find("#quantity_wanted").TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:1,max:1e6})},e=function(t){var e=(0,a.default)(".js-qv-product-images"),n=(0,a.default)(".js-qv-product-images li img").height()+20,i=e.position().top;e.velocity({translateY:"up"===t?i+n:i-n},function(){e.position().top>=0?(0,a.default)(".arrow-up").css("opacity",".2"):e.position().top+e.height()<=(0,a.default)(".js-qv-mask").height()&&(0,a.default)(".arrow-down").css("opacity",".2")})};(0,a.default)("body").on("click","#search_filter_toggler",function(){(0,a.default)("#search_filters_wrapper").removeClass("hidden-sm-down"),(0,a.default)("#content-wrapper").addClass("hidden-sm-down"),(0,a.default)("#footer").addClass("hidden-sm-down")}),(0,a.default)("#search_filter_controls .clear").on("click",function(){(0,a.default)("#search_filters_wrapper").addClass("hidden-sm-down"),(0,a.default)("#content-wrapper").removeClass("hidden-sm-down"),(0,a.default)("#footer").removeClass("hidden-sm-down")}),(0,a.default)("#search_filter_controls .ok").on("click",function(){(0,a.default)("#search_filters_wrapper").addClass("hidden-sm-down"),(0,a.default)("#content-wrapper").removeClass("hidden-sm-down"),(0,a.default)("#footer").removeClass("hidden-sm-down")});var n=function(t){if(void 0!==t.target.dataset.searchUrl)return t.target.dataset.searchUrl;if(void 0===(0,a.default)(t.target).parent()[0].dataset.searchUrl)throw new Error("Can not parse search URL");return(0,a.default)(t.target).parent()[0].dataset.searchUrl};(0,a.default)("body").on("change","#search_filters input[data-search-url]",function(t){l.default.emit("updateFacets",n(t))}),(0,a.default)("body").on("click",".js-search-filters-clear-all",function(t){l.default.emit("updateFacets",n(t))}),(0,a.default)("body").on("click",".js-search-link",function(t){t.preventDefault(),l.default.emit("updateFacets",(0,a.default)(t.target).closest("a").get(0).href)}),(0,a.default)("body").on("change","#search_filters select",function(t){var e=(0,a.default)(t.target).closest("form");l.default.emit("updateFacets","?"+e.serialize())}),l.default.on("updateProductList",function(t){r(t),window.scrollTo(0,0)})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(0),o=i(r),a=n(1),s=i(a),l=n(4),u=i(l);(0,o.default)(document).ready(function(){function t(){(0,o.default)(".js-thumb").on("click",function(t){(0,o.default)(".js-modal-product-cover").attr("src",(0,o.default)(t.target).data("image-large-src")),(0,o.default)(".selected").removeClass("selected"),(0,o.default)(t.target).addClass("selected"),(0,o.default)(".js-qv-product-cover").prop("src",(0,o.default)(t.currentTarget).data("image-large-src"))})}function e(){(0,o.default)("#main .js-qv-product-images li").length>2?((0,o.default)("#main .js-qv-mask").addClass("scroll"),(0,o.default)(".scroll-box-arrows").addClass("scroll"),(0,o.default)("#main .js-qv-mask").scrollbox({direction:"h",distance:113,autoPlay:!1}),(0,o.default)(".scroll-box-arrows .left").click(function(){(0,o.default)("#main .js-qv-mask").trigger("backward")}),(0,o.default)(".scroll-box-arrows .right").click(function(){(0,o.default)("#main .js-qv-mask").trigger("forward")})):((0,o.default)("#main .js-qv-mask").removeClass("scroll"),(0,o.default)(".scroll-box-arrows").removeClass("scroll"))}function n(){(0,o.default)(".js-file-input").on("change",function(t){var e=void 0,n=void 0;(e=(0,o.default)(t.currentTarget)[0])&&(n=e.files[0])&&(0,o.default)(e).prev().text(n.name)})}!function(){var t=(0,o.default)("#quantity_wanted");t.TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:parseInt(t.attr("min"),10),max:1e6}),(0,o.default)("body").on("change keyup","#quantity_wanted",function(t){(0,o.default)(t.currentTarget).trigger("touchspin.stopspin"),s.default.emit("updateProduct",{eventType:"updatedProductQuantity",event:t})})}(),n(),t(),e(),s.default.on("updatedProduct",function(i){if(n(),t(),i&&i.product_minimal_quantity){var r=parseInt(i.product_minimal_quantity,10);(0,o.default)("#quantity_wanted").trigger("touchspin.updatesettings",{min:r})}e(),(0,o.default)((0,o.default)(".tabs .nav-link.active").attr("href")).addClass("active").removeClass("fade"),(0,o.default)(".js-product-images-modal").replaceWith(i.product_images_modal),(new u.default).init()})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=e.children().detach();e.empty().append(t.children().detach()),t.append(n)}function o(){u.default.responsive.mobile?(0,s.default)("*[id^='_desktop_']").each(function(t,e){var n=(0,s.default)("#"+e.id.replace("_desktop_","_mobile_"));n.length&&r((0,s.default)(e),n)}):(0,s.default)("*[id^='_mobile_']").each(function(t,e){var n=(0,s.default)("#"+e.id.replace("_mobile_","_desktop_"));n.length&&r((0,s.default)(e),n)}),u.default.emit("responsive update",{mobile:u.default.responsive.mobile})}var a=n(0),s=i(a),l=n(1),u=i(l);u.default.responsive=u.default.responsive||{},u.default.responsive.current_width=window.innerWidth,u.default.responsive.min_width=768,u.default.responsive.mobile=u.default.responsive.current_width<u.default.responsive.min_width,(0,s.default)(window).on("resize",function(){var t=u.default.responsive.current_width,e=u.default.responsive.min_width,n=window.innerWidth,i=t>=e&&n<e||t<e&&n>=e;u.default.responsive.current_width=n,u.default.responsive.mobile=u.default.responsive.current_width<u.default.responsive.min_width,i&&o()}),(0,s.default)(document).ready(function(){u.default.responsive.mobile&&o()})},function(t,e,n){"use strict";!function(t){function e(t,e){return t+".touchspin_"+e}function n(n,i){return t.map(n,function(t){return e(t,i)})}var i=0;t.fn.TouchSpin=function(e){if("destroy"===e)return void this.each(function(){var e=t(this),i=e.data();t(document).off(n(["mouseup","touchend","touchcancel","mousemove","touchmove","scroll","scrollstart"],i.spinnerid).join(" "))});var r={min:0,max:100,initval:"",replacementval:"",step:1,decimals:0,stepinterval:100,forcestepdivisibility:"round",stepintervaldelay:500,verticalbuttons:!1,verticalupclass:"glyphicon glyphicon-chevron-up",verticaldownclass:"glyphicon glyphicon-chevron-down",prefix:"",postfix:"",prefix_extraclass:"",postfix_extraclass:"",booster:!0,boostat:10,maxboostedstep:!1,mousewheel:!0,buttondown_class:"btn btn-default",buttonup_class:"btn btn-default",buttondown_txt:"-",buttonup_txt:"+"},o={min:"min",max:"max",initval:"init-val",replacementval:"replacement-val",step:"step",decimals:"decimals",stepinterval:"step-interval",verticalbuttons:"vertical-buttons",verticalupclass:"vertical-up-class",verticaldownclass:"vertical-down-class",forcestepdivisibility:"force-step-divisibility",stepintervaldelay:"step-interval-delay",prefix:"prefix",postfix:"postfix",prefix_extraclass:"prefix-extra-class",postfix_extraclass:"postfix-extra-class",booster:"booster",boostat:"boostat",maxboostedstep:"max-boosted-step",mousewheel:"mouse-wheel",buttondown_class:"button-down-class",buttonup_class:"button-up-class",buttondown_txt:"button-down-txt",buttonup_txt:"button-up-txt"};return this.each(function(){function a(){""!==C.initval&&""===L.val()&&L.val(C.initval)}function s(t){c(t),b();var e=O.input.val();""!==e&&(e=Number(O.input.val()),O.input.val(e.toFixed(C.decimals)))}function l(){C=t.extend({},r,j,u(),e)}function u(){var e={};return t.each(o,function(t,n){var i="bts-"+n;L.is("[data-"+i+"]")&&(e[t]=L.data(i))}),e}function c(e){C=t.extend({},C,e)}function f(){var t=L.val(),e=L.parent();""!==t&&(t=Number(t).toFixed(C.decimals)),L.data("initvalue",t).val(t),L.addClass("form-control"),e.hasClass("input-group")?d(e):p()}function d(e){e.addClass("bootstrap-touchspin");var n,i,r=L.prev(),o=L.next(),a='<span class="input-group-addon bootstrap-touchspin-prefix">'+C.prefix+"</span>",s='<span class="input-group-addon bootstrap-touchspin-postfix">'+C.postfix+"</span>";r.hasClass("input-group-btn")?(n='<button class="'+C.buttondown_class+' bootstrap-touchspin-down" type="button">'+C.buttondown_txt+"</button>",r.append(n)):(n='<span class="input-group-btn"><button class="'+C.buttondown_class+' bootstrap-touchspin-down" type="button">'+C.buttondown_txt+"</button></span>",t(n).insertBefore(L)),o.hasClass("input-group-btn")?(i='<button class="'+C.buttonup_class+' bootstrap-touchspin-up" type="button">'+C.buttonup_txt+"</button>",o.prepend(i)):(i='<span class="input-group-btn"><button class="'+C.buttonup_class+' bootstrap-touchspin-up" type="button">'+C.buttonup_txt+"</button></span>",t(i).insertAfter(L)),t(a).insertBefore(L),t(s).insertAfter(L),A=e}function p(){var e;e=C.verticalbuttons?'<div class="input-group bootstrap-touchspin"><span class="input-group-addon bootstrap-touchspin-prefix">'+C.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+C.postfix+'</span><span class="input-group-btn-vertical"><button class="'+C.buttondown_class+' bootstrap-touchspin-up" type="button"><i class="'+C.verticalupclass+'"></i></button><button class="'+C.buttonup_class+' bootstrap-touchspin-down" type="button"><i class="'+C.verticaldownclass+'"></i></button></span></div>':'<div class="input-group bootstrap-touchspin"><span class="input-group-btn"><button class="'+C.buttondown_class+' bootstrap-touchspin-down" type="button">'+C.buttondown_txt+'</button></span><span class="input-group-addon bootstrap-touchspin-prefix">'+C.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+C.postfix+'</span><span class="input-group-btn"><button class="'+C.buttonup_class+' bootstrap-touchspin-up" type="button">'+C.buttonup_txt+"</button></span></div>",A=t(e).insertBefore(L),t(".bootstrap-touchspin-prefix",A).after(L),L.hasClass("input-sm")?A.addClass("input-group-sm"):L.hasClass("input-lg")&&A.addClass("input-group-lg")}function h(){O={down:t(".bootstrap-touchspin-down",A),up:t(".bootstrap-touchspin-up",A),input:t("input",A),prefix:t(".bootstrap-touchspin-prefix",A).addClass(C.prefix_extraclass),postfix:t(".bootstrap-touchspin-postfix",A).addClass(C.postfix_extraclass)}}function m(){""===C.prefix&&O.prefix.hide(),""===C.postfix&&O.postfix.hide()}function g(){L.on("keydown",function(t){var e=t.keyCode||t.which;38===e?("up"!==V&&(w(),E()),t.preventDefault()):40===e&&("down"!==V&&(x(),S()),t.preventDefault())}),L.on("keyup",function(t){var e=t.keyCode||t.which;38===e?T():40===e&&T()}),L.on("blur",function(){b()}),O.down.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("down"!==V&&(x(),S()),t.preventDefault())}),O.down.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||T()}),O.up.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("up"!==V&&(w(),E()),t.preventDefault())}),O.up.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||T()}),O.down.on("mousedown.touchspin",function(t){O.down.off("touchstart.touchspin"),L.is(":disabled")||(x(),S(),t.preventDefault(),t.stopPropagation())}),O.down.on("touchstart.touchspin",function(t){O.down.off("mousedown.touchspin"),L.is(":disabled")||(x(),S(),t.preventDefault(),t.stopPropagation())}),O.up.on("mousedown.touchspin",function(t){O.up.off("touchstart.touchspin"),L.is(":disabled")||(w(),E(),t.preventDefault(),t.stopPropagation())}),O.up.on("touchstart.touchspin",function(t){O.up.off("mousedown.touchspin"),L.is(":disabled")||(w(),E(),t.preventDefault(),t.stopPropagation())}),O.up.on("mouseout touchleave touchend touchcancel",function(t){V&&(t.stopPropagation(),T())}),O.down.on("mouseout touchleave touchend touchcancel",function(t){V&&(t.stopPropagation(),T())}),O.down.on("mousemove touchmove",function(t){V&&(t.stopPropagation(),t.preventDefault())}),O.up.on("mousemove touchmove",function(t){V&&(t.stopPropagation(),t.preventDefault())}),t(document).on(n(["mouseup","touchend","touchcancel"],i).join(" "),function(t){V&&(t.preventDefault(),T())}),t(document).on(n(["mousemove","touchmove","scroll","scrollstart"],i).join(" "),function(t){V&&(t.preventDefault(),T())}),L.on("mousewheel DOMMouseScroll",function(t){if(C.mousewheel&&L.is(":focus")){var e=t.originalEvent.wheelDelta||-t.originalEvent.deltaY||-t.originalEvent.detail;t.stopPropagation(),t.preventDefault(),e<0?x():w()}})}function v(){L.on("touchspin.uponce",function(){T(),w()}),L.on("touchspin.downonce",function(){T(),x()}),L.on("touchspin.startupspin",function(){E()}),L.on("touchspin.startdownspin",function(){S()}),L.on("touchspin.stopspin",function(){T()}),L.on("touchspin.updatesettings",function(t,e){s(e)})}function y(t){switch(C.forcestepdivisibility){case"round":return(Math.round(t/C.step)*C.step).toFixed(C.decimals);case"floor":return(Math.floor(t/C.step)*C.step).toFixed(C.decimals);case"ceil":return(Math.ceil(t/C.step)*C.step).toFixed(C.decimals);default:return t}}function b(){var t,e,n;if(""===(t=L.val()))return void(""!==C.replacementval&&(L.val(C.replacementval),L.trigger("change")));C.decimals>0&&"."===t||(e=parseFloat(t),isNaN(e)&&(e=""!==C.replacementval?C.replacementval:0),n=e,e.toString()!==t&&(n=e),e<C.min&&(n=C.min),e>C.max&&(n=C.max),n=y(n),Number(t).toString()!==n.toString()&&(L.val(n),L.trigger("change")))}function _(){if(C.booster){var t=Math.pow(2,Math.floor(B/C.boostat))*C.step;return C.maxboostedstep&&t>C.maxboostedstep&&(t=C.maxboostedstep,I=Math.round(I/t)*t),Math.max(C.step,t)}return C.step}function w(){b(),I=parseFloat(O.input.val()),isNaN(I)&&(I=0);var t=I,e=_();I+=e,I>C.max&&(I=C.max,L.trigger("touchspin.on.max"),T()),O.input.val(Number(I).toFixed(C.decimals)),t!==I&&L.trigger("change")}function x(){b(),I=parseFloat(O.input.val()),isNaN(I)&&(I=0);var t=I,e=_();I-=e,I<C.min&&(I=C.min,L.trigger("touchspin.on.min"),T()),O.input.val(I.toFixed(C.decimals)),t!==I&&L.trigger("change")}function S(){T(),B=0,V="down",L.trigger("touchspin.on.startspin"),L.trigger("touchspin.on.startdownspin"),P=setTimeout(function(){k=setInterval(function(){B++,x()},C.stepinterval)},C.stepintervaldelay)}function E(){T(),B=0,V="up",L.trigger("touchspin.on.startspin"),L.trigger("touchspin.on.startupspin"),N=setTimeout(function(){D=setInterval(function(){B++,w()},C.stepinterval)},C.stepintervaldelay)}function T(){switch(clearTimeout(P),clearTimeout(N),clearInterval(k),clearInterval(D),V){case"up":L.trigger("touchspin.on.stopupspin"),L.trigger("touchspin.on.stopspin");break;case"down":L.trigger("touchspin.on.stopdownspin"),L.trigger("touchspin.on.stopspin")}B=0,V=!1}var C,A,O,I,k,D,P,N,L=t(this),j=L.data(),B=0,V=!1;!function(){L.data("alreadyinitialized")||(L.data("alreadyinitialized",!0),i+=1,L.data("spinnerid",i),L.is("input")&&(l(),a(),b(),f(),h(),m(),g(),v(),O.input.css("display","block")))}()})}}(jQuery)},function(t,e,n){"use strict";if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(t){return(t[0]||t).nodeType}function i(){return{bindType:a.end,delegateType:a.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function r(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in s)if(void 0!==t.style[e])return{end:s[e]};return!1}function o(e){var n=this,i=!1;return t(this).one(l.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||l.triggerTransitionEnd(n)},e),this}var a=!1,s={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");return e||(e=t.getAttribute("href")||"",e=/^#[a-z]/i.test(e)?e:null),e},reflow:function(t){new Function("bs","return bs")(t.offsetHeight)},triggerTransitionEnd:function(e){t(e).trigger(a.end)},supportsTransitionEnd:function(){return Boolean(a)},typeCheckConfig:function(t,i,r){for(var o in r)if(r.hasOwnProperty(o)){var a=r[o],s=i[o],l=void 0;if(l=s&&n(s)?"element":e(s),!new RegExp(a).test(l))throw new Error(t.toUpperCase()+': Option "'+o+'" provided type "'+l+'" but expected type "'+a+'".')}}};return function(){a=r(),t.fn.emulateTransitionEnd=o,l.supportsTransitionEnd()&&(t.event.special[l.TRANSITION_END]=i())}(),l}(jQuery),a=(function(t){var e="alert",i="bs.alert",a="."+i,s=t.fn[e],l={DISMISS:'[data-dismiss="alert"]'},u={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+".data-api"},c={ALERT:"alert",FADE:"fade",IN:"in"},f=function(){function e(t){n(this,e),this._element=t}return e.prototype.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.prototype.dispose=function(){t.removeData(this._element,i),this._element=null},e.prototype._getRootElement=function(e){var n=o.getSelectorFromElement(e),i=!1;return n&&(i=t(n)[0]),i||(i=t(e).closest("."+c.ALERT)[0]),i},e.prototype._triggerCloseEvent=function(e){var n=t.Event(u.CLOSE);return t(e).trigger(n),n},e.prototype._removeElement=function(e){return t(e).removeClass(c.IN),o.supportsTransitionEnd()&&t(e).hasClass(c.FADE)?void t(e).one(o.TRANSITION_END,t.proxy(this._destroyElement,this,e)).emulateTransitionEnd(150):void this._destroyElement(e)},e.prototype._destroyElement=function(e){t(e).detach().trigger(u.CLOSED).remove()},e._jQueryInterface=function(n){return this.each(function(){var r=t(this),o=r.data(i);o||(o=new e(this),r.data(i,o)),"close"===n&&o[n](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(u.CLICK_DATA_API,l.DISMISS,f._handleDismiss(new f)),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){var e="button",i="bs.button",o="."+i,a=".data-api",s=t.fn[e],l={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},u={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},c={CLICK_DATA_API:"click"+o+a,FOCUS_BLUR_DATA_API:"focus"+o+a+" blur"+o+a},f=function(){function e(t){n(this,e),this._element=t}return e.prototype.toggle=function(){var e=!0,n=t(this._element).closest(u.DATA_TOGGLE)[0];if(n){var i=t(this._element).find(u.INPUT)[0];if(i){if("radio"===i.type)if(i.checked&&t(this._element).hasClass(l.ACTIVE))e=!1;else{var r=t(n).find(u.ACTIVE)[0];r&&t(r).removeClass(l.ACTIVE)}e&&(i.checked=!t(this._element).hasClass(l.ACTIVE),t(this._element).trigger("change")),i.focus()}}else this._element.setAttribute("aria-pressed",!t(this._element).hasClass(l.ACTIVE));e&&t(this._element).toggleClass(l.ACTIVE)},e.prototype.dispose=function(){t.removeData(this._element,i),this._element=null},e._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(i);r||(r=new e(this),t(this).data(i,r)),"toggle"===n&&r[n]()})},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(c.CLICK_DATA_API,u.DATA_TOGGLE_CARROT,function(e){e.preventDefault();var n=e.target;t(n).hasClass(l.BUTTON)||(n=t(n).closest(u.BUTTON)),f._jQueryInterface.call(t(n),"toggle")}).on(c.FOCUS_BLUR_DATA_API,u.DATA_TOGGLE_CARROT,function(e){var n=t(e.target).closest(u.BUTTON)[0];t(n).toggleClass(l.FOCUS,/^focus(in)?$/.test(e.type))}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){var e="carousel",a="bs.carousel",s="."+a,l=".data-api",u=t.fn[e],c={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},f={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},d={NEXT:"next",PREVIOUS:"prev"},p={SLIDE:"slide"+s,SLID:"slid"+s,KEYDOWN:"keydown"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s,LOAD_DATA_API:"load"+s+l,CLICK_DATA_API:"click"+s+l},h={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"right",LEFT:"left",ITEM:"carousel-item"},m={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".next, .prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},g=function(){function l(e,i){n(this,l),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this._config=this._getConfig(i),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(m.INDICATORS)[0],this._addEventListeners()}return l.prototype.next=function(){this._isSliding||this._slide(d.NEXT)},l.prototype.nextWhenVisible=function(){document.hidden||this.next()},l.prototype.prev=function(){this._isSliding||this._slide(d.PREVIOUS)},l.prototype.pause=function(e){e||(this._isPaused=!0),t(this._element).find(m.NEXT_PREV)[0]&&o.supportsTransitionEnd()&&(o.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},l.prototype.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval(t.proxy(document.visibilityState?this.nextWhenVisible:this.next,this),this._config.interval))},l.prototype.to=function(e){var n=this;this._activeElement=t(this._element).find(m.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(p.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var r=e>i?d.NEXT:d.PREVIOUS;this._slide(r,this._items[e])}},l.prototype.dispose=function(){t(this._element).off(s),t.removeData(this._element,a),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function(n){return n=t.extend({},c,n),o.typeCheckConfig(e,n,f),n},l.prototype._addEventListeners=function(){this._config.keyboard&&t(this._element).on(p.KEYDOWN,t.proxy(this._keydown,this)),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||t(this._element).on(p.MOUSEENTER,t.proxy(this.pause,this)).on(p.MOUSELEAVE,t.proxy(this.cycle,this))},l.prototype._keydown=function(t){if(t.preventDefault(),!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}},l.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(m.ITEM)),this._items.indexOf(e)},l.prototype._getItemByDirection=function(t,e){var n=t===d.NEXT,i=t===d.PREVIOUS,r=this._getItemIndex(e),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return e;var a=t===d.PREVIOUS?-1:1,s=(r+a)%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},l.prototype._triggerSlideEvent=function(e,n){var i=t.Event(p.SLIDE,{relatedTarget:e,direction:n});return t(this._element).trigger(i),i},l.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(m.ACTIVE).removeClass(h.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(h.ACTIVE)}},l.prototype._slide=function(e,n){var i=this,r=t(this._element).find(m.ACTIVE_ITEM)[0],a=n||r&&this._getItemByDirection(e,r),s=Boolean(this._interval),l=e===d.NEXT?h.LEFT:h.RIGHT;if(a&&t(a).hasClass(h.ACTIVE))return void(this._isSliding=!1);if(!this._triggerSlideEvent(a,l).isDefaultPrevented()&&r&&a){this._isSliding=!0,s&&this.pause(),this._setActiveIndicatorElement(a);var u=t.Event(p.SLID,{relatedTarget:a,direction:l});o.supportsTransitionEnd()&&t(this._element).hasClass(h.SLIDE)?(t(a).addClass(e),o.reflow(a),t(r).addClass(l),t(a).addClass(l),t(r).one(o.TRANSITION_END,function(){t(a).removeClass(l).removeClass(e),t(a).addClass(h.ACTIVE),t(r).removeClass(h.ACTIVE).removeClass(e).removeClass(l),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(u)},0)}).emulateTransitionEnd(600)):(t(r).removeClass(h.ACTIVE),t(a).addClass(h.ACTIVE),this._isSliding=!1,t(this._element).trigger(u)),s&&this.cycle()}},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r=t.extend({},c,t(this).data());"object"===(void 0===e?"undefined":i(e))&&t.extend(r,e);var o="string"==typeof e?e:r.slide;if(n||(n=new l(this,r),t(this).data(a,n)),"number"==typeof e)n.to(e);else if("string"==typeof o){if(void 0===n[o])throw new Error('No method named "'+o+'"');n[o]()}else r.interval&&(n.pause(),n.cycle())})},l._dataApiClickHandler=function(e){var n=o.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(h.CAROUSEL)){var r=t.extend({},t(i).data(),t(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),l._jQueryInterface.call(t(i),r),s&&t(i).data(a).to(s),e.preventDefault()}}},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return c}}]),l}();t(document).on(p.CLICK_DATA_API,m.DATA_SLIDE,g._dataApiClickHandler),t(window).on(p.LOAD_DATA_API,function(){t(m.DATA_RIDE).each(function(){var e=t(this);g._jQueryInterface.call(e,e.data())})}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=u,g._jQueryInterface}}(jQuery),function(t){var e="collapse",a="bs.collapse",s="."+a,l=t.fn[e],u={toggle:!0,parent:""},c={toggle:"boolean",parent:"string"},f={SHOW:"show"+s,SHOWN:"shown"+s,HIDE:"hide"+s,HIDDEN:"hidden"+s,CLICK_DATA_API:"click"+s+".data-api"},d={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},h={ACTIVES:".card > .in, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function s(e,i){n(this,s),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]')),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return s.prototype.toggle=function(){t(this._element).hasClass(d.IN)?this.hide():this.show()},s.prototype.show=function(){var e=this;if(!this._isTransitioning&&!t(this._element).hasClass(d.IN)){var n=void 0,i=void 0;if(this._parent&&(n=t.makeArray(t(h.ACTIVES)),n.length||(n=null)),!(n&&(i=t(n).data(a))&&i._isTransitioning)){var r=t.Event(f.SHOW);if(t(this._element).trigger(r),!r.isDefaultPrevented()){n&&(s._jQueryInterface.call(t(n),"hide"),i||t(n).data(a,null));var l=this._getDimension();t(this._element).removeClass(d.COLLAPSE).addClass(d.COLLAPSING),this._element.style[l]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&t(this._triggerArray).removeClass(d.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var u=function(){t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).addClass(d.IN),e._element.style[l]="",e.setTransitioning(!1),t(e._element).trigger(f.SHOWN)};if(!o.supportsTransitionEnd())return void u();var c=l[0].toUpperCase()+l.slice(1),p="scroll"+c;t(this._element).one(o.TRANSITION_END,u).emulateTransitionEnd(600),this._element.style[l]=this._element[p]+"px"}}}},s.prototype.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(d.IN)){var n=t.Event(f.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),r=i===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[r]+"px",o.reflow(this._element),t(this._element).addClass(d.COLLAPSING).removeClass(d.COLLAPSE).removeClass(d.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&t(this._triggerArray).addClass(d.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var a=function(){e.setTransitioning(!1),t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).trigger(f.HIDDEN)};return this._element.style[i]="",o.supportsTransitionEnd()?void t(this._element).one(o.TRANSITION_END,a).emulateTransitionEnd(600):void a()}}},s.prototype.setTransitioning=function(t){this._isTransitioning=t},s.prototype.dispose=function(){t.removeData(this._element,a),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},s.prototype._getConfig=function(n){return n=t.extend({},u,n),n.toggle=Boolean(n.toggle),o.typeCheckConfig(e,n,c),n},s.prototype._getDimension=function(){return t(this._element).hasClass(p.WIDTH)?p.WIDTH:p.HEIGHT},s.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(s._getTargetFromElement(n),[n])}),n},s.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(d.IN);e.setAttribute("aria-expanded",i),n.length&&t(n).toggleClass(d.COLLAPSED,!i).attr("aria-expanded",i)}},s._getTargetFromElement=function(e){var n=o.getSelectorFromElement(e);return n?t(n)[0]:null},s._jQueryInterface=function(e){return this.each(function(){var n=t(this),r=n.data(a),o=t.extend({},u,n.data(),"object"===(void 0===e?"undefined":i(e))&&e);if(!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||(r=new s(this,o),n.data(a,r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e]()}})},r(s,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}}]),s}();t(document).on(f.CLICK_DATA_API,h.DATA_TOGGLE,function(e){e.preventDefault();var n=m._getTargetFromElement(this),i=t(n).data(a),r=i?"toggle":t(this).data();m._jQueryInterface.call(t(n),r)}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=l,m._jQueryInterface}}(jQuery),function(t){var e="dropdown",i="bs.dropdown",a="."+i,s=".data-api",l=t.fn[e],u={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click"+a+s,KEYDOWN_DATA_API:"keydown"+a+s},c={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},f={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},d=function(){function e(t){n(this,e),this._element=t,this._addEventListeners()}return e.prototype.toggle=function(){if(this.disabled||t(this).hasClass(c.DISABLED))return!1;var n=e._getParentFromElement(this),i=t(n).hasClass(c.OPEN);if(e._clearMenus(),i)return!1;if("ontouchstart"in document.documentElement&&!t(n).closest(f.NAVBAR_NAV).length){var r=document.createElement("div");r.className=c.BACKDROP,t(r).insertBefore(this),t(r).on("click",e._clearMenus)}var o={relatedTarget:this},a=t.Event(u.SHOW,o);return t(n).trigger(a),!a.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded","true"),t(n).toggleClass(c.OPEN),t(n).trigger(t.Event(u.SHOWN,o)),!1)},e.prototype.dispose=function(){t.removeData(this._element,i),t(this._element).off(a),this._element=null},e.prototype._addEventListeners=function(){t(this._element).on(u.CLICK,this.toggle)},e._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(i);if(r||t(this).data(i,r=new e(this)),"string"==typeof n){if(void 0===r[n])throw new Error('No method named "'+n+'"');r[n].call(this)}})},e._clearMenus=function(n){if(!n||3!==n.which){var i=t(f.BACKDROP)[0];i&&i.parentNode.removeChild(i);for(var r=t.makeArray(t(f.DATA_TOGGLE)),o=0;o<r.length;o++){var a=e._getParentFromElement(r[o]),s={relatedTarget:r[o]};if(t(a).hasClass(c.OPEN)&&!(n&&"click"===n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(a,n.target))){var l=t.Event(u.HIDE,s);t(a).trigger(l),l.isDefaultPrevented()||(r[o].setAttribute("aria-expanded","false"),t(a).removeClass(c.OPEN).trigger(t.Event(u.HIDDEN,s)))}}}},e._getParentFromElement=function(e){var n=void 0,i=o.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},e._dataApiKeydownHandler=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)&&(n.preventDefault(),n.stopPropagation(),!this.disabled&&!t(this).hasClass(c.DISABLED))){var i=e._getParentFromElement(this),r=t(i).hasClass(c.OPEN);if(!r&&27!==n.which||r&&27===n.which){if(27===n.which){var o=t(i).find(f.DATA_TOGGLE)[0];t(o).trigger("focus")}return void t(this).trigger("click")}var a=t.makeArray(t(f.VISIBLE_ITEMS));if(a=a.filter(function(t){return t.offsetWidth||t.offsetHeight}),a.length){var s=a.indexOf(n.target);38===n.which&&s>0&&s--,40===n.which&&s<a.length-1&&s++,s<0&&(s=0),a[s].focus()}}},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(u.KEYDOWN_DATA_API,f.DATA_TOGGLE,d._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,f.ROLE_MENU,d._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,f.ROLE_LISTBOX,d._dataApiKeydownHandler).on(u.CLICK_DATA_API,d._clearMenus).on(u.CLICK_DATA_API,f.DATA_TOGGLE,d.prototype.toggle).on(u.CLICK_DATA_API,f.FORM_CHILD,function(t){t.stopPropagation()}),t.fn[e]=d._jQueryInterface,t.fn[e].Constructor=d,t.fn[e].noConflict=function(){return t.fn[e]=l,d._jQueryInterface}}(jQuery),function(t){var e="modal",a="bs.modal",s="."+a,l=t.fn[e],u={backdrop:!0,keyboard:!0,focus:!0,show:!0},c={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},f={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,FOCUSIN:"focusin"+s,RESIZE:"resize"+s,CLICK_DISMISS:"click.dismiss"+s,KEYDOWN_DISMISS:"keydown.dismiss"+s,MOUSEUP_DISMISS:"mouseup.dismiss"+s,MOUSEDOWN_DISMISS:"mousedown.dismiss"+s,CLICK_DATA_API:"click"+s+".data-api"},d={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",IN:"in"},p={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".navbar-fixed-top, .navbar-fixed-bottom, .is-fixed"},h=function(){function l(e,i){n(this,l),this._config=this._getConfig(i),this._element=e,this._dialog=t(e).find(p.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return l.prototype.toggle=function(t){return this._isShown?this.hide():this.show(t)},l.prototype.show=function(e){var n=this,i=t.Event(f.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),t(document.body).addClass(d.OPEN),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(f.CLICK_DISMISS,p.DATA_DISMISS,t.proxy(this.hide,this)),t(this._dialog).on(f.MOUSEDOWN_DISMISS,function(){t(n._element).one(f.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(t.proxy(this._showElement,this,e)))},l.prototype.hide=function(e){e&&e.preventDefault();var n=t.Event(f.HIDE);t(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),t(document).off(f.FOCUSIN),t(this._element).removeClass(d.IN),t(this._element).off(f.CLICK_DISMISS),t(this._dialog).off(f.MOUSEDOWN_DISMISS),o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE)?t(this._element).one(o.TRANSITION_END,t.proxy(this._hideModal,this)).emulateTransitionEnd(300):this._hideModal())},l.prototype.dispose=function(){t.removeData(this._element,a),t(window).off(s),t(document).off(s),t(this._element).off(s),t(this._backdrop).off(s),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._originalBodyPadding=null,this._scrollbarWidth=null},l.prototype._getConfig=function(n){return n=t.extend({},u,n),o.typeCheckConfig(e,n,c),n},l.prototype._showElement=function(e){var n=this,i=o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&o.reflow(this._element),t(this._element).addClass(d.IN),this._config.focus&&this._enforceFocus();var r=t.Event(f.SHOWN,{relatedTarget:e}),a=function(){n._config.focus&&n._element.focus(),t(n._element).trigger(r)};i?t(this._dialog).one(o.TRANSITION_END,a).emulateTransitionEnd(300):a()},l.prototype._enforceFocus=function(){var e=this;t(document).off(f.FOCUSIN).on(f.FOCUSIN,function(n){document===n.target||e._element===n.target||t(e._element).has(n.target).length||e._element.focus()})},l.prototype._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(f.KEYDOWN_DISMISS,function(t){27===t.which&&e.hide()}):this._isShown||t(this._element).off(f.KEYDOWN_DISMISS)},l.prototype._setResizeEvent=function(){this._isShown?t(window).on(f.RESIZE,t.proxy(this._handleUpdate,this)):t(window).off(f.RESIZE)},l.prototype._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden","true"),this._showBackdrop(function(){t(document.body).removeClass(d.OPEN),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(f.HIDDEN)})},l.prototype._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},l.prototype._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(d.FADE)?d.FADE:"";if(this._isShown&&this._config.backdrop){var r=o.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=d.BACKDROP,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(f.CLICK_DISMISS,function(t){return n._ignoreBackdropClick?void(n._ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide()))}),r&&o.reflow(this._backdrop),t(this._backdrop).addClass(d.IN),!e)return;if(!r)return void e();t(this._backdrop).one(o.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(d.IN);var a=function(){n._removeBackdrop(),e&&e()};o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE)?t(this._backdrop).one(o.TRANSITION_END,a).emulateTransitionEnd(150):a()}else e&&e()},l.prototype._handleUpdate=function(){this._adjustDialog()},l.prototype._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},l.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},l.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},l.prototype._setScrollbar=function(){var e=parseInt(t(p.FIXED_CONTENT).css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"",this._isBodyOverflowing&&(document.body.style.paddingRight=e+this._scrollbarWidth+"px")},l.prototype._resetScrollbar=function(){document.body.style.paddingRight=this._originalBodyPadding},l.prototype._getScrollbarWidth=function(){var t=document.createElement("div");t.className=d.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e},l._jQueryInterface=function(e,n){return this.each(function(){var r=t(this).data(a),o=t.extend({},l.Default,t(this).data(),"object"===(void 0===e?"undefined":i(e))&&e);if(r||(r=new l(this,o),t(this).data(a,r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e](n)}else o.show&&r.show(n)})},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}}]),l}();t(document).on(f.CLICK_DATA_API,p.DATA_TOGGLE,function(e){var n=this,i=void 0,r=o.getSelectorFromElement(this);r&&(i=t(r)[0]);var s=t(i).data(a)?"toggle":t.extend({},t(i).data(),t(this).data());"A"===this.tagName&&e.preventDefault();var l=t(i).one(f.SHOW,function(e){e.isDefaultPrevented()||l.one(f.HIDDEN,function(){t(n).is(":visible")&&n.focus()})});h._jQueryInterface.call(t(i),s,this)}),t.fn[e]=h._jQueryInterface,t.fn[e].Constructor=h,t.fn[e].noConflict=function(){return t.fn[e]=l,h._jQueryInterface}}(jQuery),function(t){var e="scrollspy",a="bs.scrollspy",s="."+a,l=t.fn[e],u={offset:10,method:"auto",target:""},c={offset:"number",method:"string",target:"(string|element)"},f={ACTIVATE:"activate"+s,SCROLL:"scroll"+s,LOAD_DATA_API:"load"+s+".data-api"},d={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",NAV_LINK:"nav-link",NAV:"nav",ACTIVE:"active"},p={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LIST_ITEM:".list-item",LI:"li",LI_DROPDOWN:"li.dropdown",NAV_LINKS:".nav-link",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},h={OFFSET:"offset",POSITION:"position"},m=function(){function l(e,i){n(this,l),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(i),this._selector=this._config.target+" "+p.NAV_LINKS+","+this._config.target+" "+p.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(f.SCROLL,t.proxy(this._process,this)),this.refresh(),this._process()}return l.prototype.refresh=function(){var e=this,n=this._scrollElement!==this._scrollElement.window?h.POSITION:h.OFFSET,i="auto"===this._config.method?n:this._config.method,r=i===h.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n=void 0,a=o.getSelectorFromElement(e);return a&&(n=t(a)[0]),n&&(n.offsetWidth||n.offsetHeight)?[t(n)[i]().top+r,a]:null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},l.prototype.dispose=function(){t.removeData(this._element,a),t(this._scrollElement).off(s),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},l.prototype._getConfig=function(n){if(n=t.extend({},u,n),"string"!=typeof n.target){var i=t(n.target).attr("id");i||(i=o.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return o.typeCheckConfig(e,n,c),n},l.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop},l.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},l.prototype._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._scrollElement.offsetHeight;if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}if(this._activeTarget&&t<this._offsets[0])return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&(void 0===this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}},l.prototype._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(d.DROPDOWN_ITEM)?(i.closest(p.DROPDOWN).find(p.DROPDOWN_TOGGLE).addClass(d.ACTIVE),i.addClass(d.ACTIVE)):i.parents(p.LI).find(p.NAV_LINKS).addClass(d.ACTIVE),t(this._scrollElement).trigger(f.ACTIVATE,{relatedTarget:e})},l.prototype._clear=function(){t(this._selector).filter(p.ACTIVE).removeClass(d.ACTIVE)},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r="object"===(void 0===e?"undefined":i(e))&&e||null;if(n||(n=new l(this,r),t(this).data(a,n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}}]),l}();t(window).on(f.LOAD_DATA_API,function(){for(var e=t.makeArray(t(p.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);m._jQueryInterface.call(i,i.data())}}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=l,m._jQueryInterface}}(jQuery),function(t){var e="tab",i="bs.tab",a="."+i,s=t.fn[e],l={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK_DATA_API:"click"+a+".data-api"},u={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",FADE:"fade",IN:"in"},c={A:"a",LI:"li",DROPDOWN:".dropdown",UL:"ul:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},f=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!t(this._element).hasClass(u.ACTIVE)){var n=void 0,i=void 0,r=t(this._element).closest(c.UL)[0],a=o.getSelectorFromElement(this._element);r&&(i=t.makeArray(t(r).find(c.ACTIVE)),i=i[i.length-1]);var s=t.Event(l.HIDE,{relatedTarget:this._element}),f=t.Event(l.SHOW,{relatedTarget:i});if(i&&t(i).trigger(s),t(this._element).trigger(f),!f.isDefaultPrevented()&&!s.isDefaultPrevented()){a&&(n=t(a)[0]),this._activate(this._element,r);var d=function(){var n=t.Event(l.HIDDEN,{relatedTarget:e._element}),r=t.Event(l.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(r)};n?this._activate(n,n.parentNode,d):d()}}},e.prototype.dispose=function(){t.removeClass(this._element,i),this._element=null},e.prototype._activate=function(e,n,i){var r=t(n).find(c.ACTIVE_CHILD)[0],a=i&&o.supportsTransitionEnd()&&(r&&t(r).hasClass(u.FADE)||Boolean(t(n).find(c.FADE_CHILD)[0])),s=t.proxy(this._transitionComplete,this,e,r,a,i);r&&a?t(r).one(o.TRANSITION_END,s).emulateTransitionEnd(150):s(),r&&t(r).removeClass(u.IN)},e.prototype._transitionComplete=function(e,n,i,r){if(n){t(n).removeClass(u.ACTIVE);var a=t(n).find(c.DROPDOWN_ACTIVE_CHILD)[0];a&&t(a).removeClass(u.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0),i?(o.reflow(e),t(e).addClass(u.IN)):t(e).removeClass(u.FADE),e.parentNode&&t(e.parentNode).hasClass(u.DROPDOWN_MENU)){var s=t(e).closest(c.DROPDOWN)[0];s&&t(s).find(c.DROPDOWN_TOGGLE).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0)}r&&r()},e._jQueryInterface=function(n){return this.each(function(){var r=t(this),o=r.data(i);if(o||(o=o=new e(this),r.data(i,o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(l.CLICK_DATA_API,c.DATA_TOGGLE,function(e){e.preventDefault(),f._jQueryInterface.call(t(this),"show")}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){if(void 0===window.Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var e="tooltip",a="bs.tooltip",s="."+a,l=t.fn[e],u={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[]},c={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array"},f={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},d={IN:"in",OUT:"out"},p={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},h={FADE:"fade",IN:"in"},m={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},g={element:!1,enabled:!1},v={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},y=function(){function l(t,e){n(this,l),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return l.prototype.enable=function(){this._isEnabled=!0},l.prototype.disable=function(){this._isEnabled=!1},l.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},l.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(h.IN))return void this._leave(null,this);this._enter(null,this)}},l.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},l.prototype.show=function(){var e=this,n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var r=this.getTipElement(),a=o.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&t(r).addClass(h.FADE);var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,u=this._getAttachment(s);t(r).data(this.constructor.DATA_KEY,this).appendTo(document.body),t(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:u,element:r,target:this.element,classes:g,classPrefix:"bs-tether",offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),o.reflow(r),this._tether.position(),t(r).addClass(h.IN);var c=function(){var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d.OUT&&e._leave(null,e)};if(o.supportsTransitionEnd()&&t(this.tip).hasClass(h.FADE))return void t(this.tip).one(o.TRANSITION_END,c).emulateTransitionEnd(l._TRANSITION_DURATION);c()}},l.prototype.hide=function(e){var n=this,i=this.getTipElement(),r=t.Event(this.constructor.Event.HIDE),a=function(){n._hoverState!==d.IN&&i.parentNode&&i.parentNode.removeChild(i),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),n.cleanupTether(),e&&e()};t(this.element).trigger(r),r.isDefaultPrevented()||(t(i).removeClass(h.IN),o.supportsTransitionEnd()&&t(this.tip).hasClass(h.FADE)?t(i).one(o.TRANSITION_END,a).emulateTransitionEnd(150):a(),this._hoverState="")},l.prototype.isWithContent=function(){return Boolean(this.getTitle())},l.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},l.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m.TOOLTIP_INNER),this.getTitle()),e.removeClass(h.FADE).removeClass(h.IN),this.cleanupTether()},l.prototype.setElementContent=function(e,n){var r=this.config.html;"object"===(void 0===n?"undefined":i(n))&&(n.nodeType||n.jquery)?r?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[r?"html":"text"](n)},l.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},l.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},l.prototype._getAttachment=function(t){return f[t.toUpperCase()]},l.prototype._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,t.proxy(e.toggle,e));else if(n!==v.MANUAL){var i=n===v.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=n===v.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,t.proxy(e._enter,e)).on(r,e.config.selector,t.proxy(e._leave,e))}}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},l.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},l.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;return n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?v.FOCUS:v.HOVER]=!0),t(n.getTipElement()).hasClass(h.IN)||n._hoverState===d.IN?void(n._hoverState=d.IN):(clearTimeout(n._timeout),n._hoverState=d.IN,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===d.IN&&n.show()},n.config.delay.show)):void n.show())},l.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;if(n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?v.FOCUS:v.HOVER]=!1),!n._isWithActiveTrigger())return clearTimeout(n._timeout),n._hoverState=d.OUT,n.config.delay&&n.config.delay.hide?void(n._timeout=setTimeout(function(){n._hoverState===d.OUT&&n.hide()},n.config.delay.hide)):void n.hide()},l.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},l.prototype._getConfig=function(n){return n=t.extend({},this.constructor.Default,t(this.element).data(),n),n.delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),o.typeCheckConfig(e,n,this.constructor.DefaultType),n},l.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r="object"===(void 0===e?"undefined":i(e))?e:null;if((n||!/dispose|hide/.test(e))&&(n||(n=new l(this,r),t(this).data(a,n)),"string"==typeof e)){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return a}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return c}}]),l}();return t.fn[e]=y._jQueryInterface,t.fn[e].Constructor=y,t.fn[e].noConflict=function(){return t.fn[e]=l,y._jQueryInterface},y}(jQuery));!function(o){var s="popover",l="bs.popover",u="."+l,c=o.fn[s],f=o.extend({},a.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),d=o.extend({},a.DefaultType,{content:"(string|element|function)"}),p={FADE:"fade",IN:"in"},h={TITLE:".popover-title",CONTENT:".popover-content"},m={HIDE:"hide"+u,HIDDEN:"hidden"+u,SHOW:"show"+u,SHOWN:"shown"+u,INSERTED:"inserted"+u,CLICK:"click"+u,FOCUSIN:"focusin"+u,FOCUSOUT:"focusout"+u,MOUSEENTER:"mouseenter"+u,MOUSELEAVE:"mouseleave"+u},g=function(a){function c(){return n(this,c),t(this,a.apply(this,arguments))}return e(c,a),c.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},c.prototype.getTipElement=function(){return this.tip=this.tip||o(this.config.template)[0]},c.prototype.setContent=function(){var t=o(this.getTipElement());this.setElementContent(t.find(h.TITLE),this.getTitle()),this.setElementContent(t.find(h.CONTENT),this._getContent()),t.removeClass(p.FADE).removeClass(p.IN),this.cleanupTether()},c.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},c._jQueryInterface=function(t){return this.each(function(){var e=o(this).data(l),n="object"===(void 0===t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new c(this,n),o(this).data(l,e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},r(c,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return f}},{key:"NAME",get:function(){return s}},{key:"DATA_KEY",get:function(){return l}},{key:"Event",get:function(){return m}},{key:"EVENT_KEY",get:function(){return u}},{key:"DefaultType",get:function(){return d}}]),c}(a);o.fn[s]=g._jQueryInterface,o.fn[s].Constructor=g,o.fn[s].noConflict=function(){return o.fn[s]=c,g._jQueryInterface}}(jQuery)}()},function(t,e,n){"use strict";function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function o(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,n,i,o,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l<i;l++)u[l].apply(this,o);return!0},i.prototype.addListener=function(t,e){var n;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(n=s(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.trace),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},i.prototype.removeListener=function(t,e){var n,i,o,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-->0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";var i,i;!function(e){t.exports=e()}(function(){return function t(e,n,r){function o(s,l){if(!n[s]){if(!e[s]){var u="function"==typeof i&&i;if(!l&&u)return i(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[s]={exports:{}};e[s][0].call(f.exports,function(t){var n=e[s][1][t];return o(n||t)},f,f.exports,t,e,n,r)}return n[s].exports}for(var a="function"==typeof i&&i,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){e.exports=function(t){var e,n,i,r=-1;if(t.lines.length>1&&"flex-start"===t.style.alignContent)for(e=0;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"flex-end"===t.style.alignContent)for(e=t.flexStyle.crossSpace;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"center"===t.style.alignContent)for(e=t.flexStyle.crossSpace/2;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"space-between"===t.style.alignContent)for(n=t.flexStyle.crossSpace/(t.lines.length-1),e=0;i=t.lines[++r];)i.crossStart=e,e+=i.cross+n;else if(t.lines.length>1&&"space-around"===t.style.alignContent)for(n=2*t.flexStyle.crossSpace/(2*t.lines.length),e=n/2;i=t.lines[++r];)i.crossStart=e,e+=i.cross+n;else for(n=t.flexStyle.crossSpace/t.lines.length,e=t.flexStyle.crossInnerBefore;i=t.lines[++r];)i.crossStart=e,i.cross+=n,e+=i.cross}},{}],2:[function(t,e,n){e.exports=function(t){for(var e,n=-1;line=t.lines[++n];)for(e=-1;child=line.children[++e];){var i=child.style.alignSelf;"auto"===i&&(i=t.style.alignItems),"flex-start"===i?child.flexStyle.crossStart=line.crossStart:"flex-end"===i?child.flexStyle.crossStart=line.crossStart+line.cross-child.flexStyle.crossOuter:"center"===i?child.flexStyle.crossStart=line.crossStart+(line.cross-child.flexStyle.crossOuter)/2:(child.flexStyle.crossStart=line.crossStart,child.flexStyle.crossOuter=line.cross,child.flexStyle.cross=child.flexStyle.crossOuter-child.flexStyle.crossBefore-child.flexStyle.crossAfter)}}},{}],3:[function(t,e,n){e.exports=function(t,e){var n="row"===e||"row-reverse"===e,i=t.mainAxis;if(i){n&&"inline"===i||!n&&"block"===i||(t.flexStyle={main:t.flexStyle.cross,cross:t.flexStyle.main,mainOffset:t.flexStyle.crossOffset,crossOffset:t.flexStyle.mainOffset,mainBefore:t.flexStyle.crossBefore,mainAfter:t.flexStyle.crossAfter,crossBefore:t.flexStyle.mainBefore,crossAfter:t.flexStyle.mainAfter,mainInnerBefore:t.flexStyle.crossInnerBefore,mainInnerAfter:t.flexStyle.crossInnerAfter,crossInnerBefore:t.flexStyle.mainInnerBefore,crossInnerAfter:t.flexStyle.mainInnerAfter,mainBorderBefore:t.flexStyle.crossBorderBefore,mainBorderAfter:t.flexStyle.crossBorderAfter,crossBorderBefore:t.flexStyle.mainBorderBefore,crossBorderAfter:t.flexStyle.mainBorderAfter})}else t.flexStyle=n?{main:t.style.width,cross:t.style.height,mainOffset:t.style.offsetWidth,crossOffset:t.style.offsetHeight,mainBefore:t.style.marginLeft,mainAfter:t.style.marginRight,crossBefore:t.style.marginTop,crossAfter:t.style.marginBottom,mainInnerBefore:t.style.paddingLeft,mainInnerAfter:t.style.paddingRight,crossInnerBefore:t.style.paddingTop,crossInnerAfter:t.style.paddingBottom,mainBorderBefore:t.style.borderLeftWidth,mainBorderAfter:t.style.borderRightWidth,crossBorderBefore:t.style.borderTopWidth,crossBorderAfter:t.style.borderBottomWidth}:{main:t.style.height,cross:t.style.width,mainOffset:t.style.offsetHeight,crossOffset:t.style.offsetWidth,mainBefore:t.style.marginTop,mainAfter:t.style.marginBottom,crossBefore:t.style.marginLeft,crossAfter:t.style.marginRight,mainInnerBefore:t.style.paddingTop,mainInnerAfter:t.style.paddingBottom,crossInnerBefore:t.style.paddingLeft,crossInnerAfter:t.style.paddingRight,mainBorderBefore:t.style.borderTopWidth,mainBorderAfter:t.style.borderBottomWidth,crossBorderBefore:t.style.borderLeftWidth,crossBorderAfter:t.style.borderRightWidth},"content-box"===t.style.boxSizing&&("number"==typeof t.flexStyle.main&&(t.flexStyle.main+=t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter),"number"==typeof t.flexStyle.cross&&(t.flexStyle.cross+=t.flexStyle.crossInnerBefore+t.flexStyle.crossInnerAfter+t.flexStyle.crossBorderBefore+t.flexStyle.crossBorderAfter));t.mainAxis=n?"inline":"block",t.crossAxis=n?"block":"inline","number"==typeof t.style.flexBasis&&(t.flexStyle.main=t.style.flexBasis+t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter),t.flexStyle.mainOuter=t.flexStyle.main,t.flexStyle.crossOuter=t.flexStyle.cross,"auto"===t.flexStyle.mainOuter&&(t.flexStyle.mainOuter=t.flexStyle.mainOffset),"auto"===t.flexStyle.crossOuter&&(t.flexStyle.crossOuter=t.flexStyle.crossOffset),"number"==typeof t.flexStyle.mainBefore&&(t.flexStyle.mainOuter+=t.flexStyle.mainBefore),"number"==typeof t.flexStyle.mainAfter&&(t.flexStyle.mainOuter+=t.flexStyle.mainAfter),"number"==typeof t.flexStyle.crossBefore&&(t.flexStyle.crossOuter+=t.flexStyle.crossBefore),"number"==typeof t.flexStyle.crossAfter&&(t.flexStyle.crossOuter+=t.flexStyle.crossAfter)}},{}],4:[function(t,e,n){var i=t("../reduce");e.exports=function(t){if(t.mainSpace>0){var e=i(t.children,function(t,e){return t+parseFloat(e.style.flexGrow)},0);e>0&&(t.main=i(t.children,function(n,i){return"auto"===i.flexStyle.main?i.flexStyle.main=i.flexStyle.mainOffset+parseFloat(i.style.flexGrow)/e*t.mainSpace:i.flexStyle.main+=parseFloat(i.style.flexGrow)/e*t.mainSpace,i.flexStyle.mainOuter=i.flexStyle.main+i.flexStyle.mainBefore+i.flexStyle.mainAfter,n+i.flexStyle.mainOuter},0),t.mainSpace=0)}}},{"../reduce":12}],5:[function(t,e,n){var i=t("../reduce");e.exports=function(t){if(t.mainSpace<0){var e=i(t.children,function(t,e){return t+parseFloat(e.style.flexShrink)},0);e>0&&(t.main=i(t.children,function(n,i){return i.flexStyle.main+=parseFloat(i.style.flexShrink)/e*t.mainSpace,i.flexStyle.mainOuter=i.flexStyle.main+i.flexStyle.mainBefore+i.flexStyle.mainAfter,n+i.flexStyle.mainOuter},0),t.mainSpace=0)}}},{"../reduce":12}],6:[function(t,e,n){var i=t("../reduce");e.exports=function(t){var e;t.lines=[e={main:0,cross:0,children:[]}];for(var n,r=-1;n=t.children[++r];)"nowrap"===t.style.flexWrap||0===e.children.length||"auto"===t.flexStyle.main||t.flexStyle.main-t.flexStyle.mainInnerBefore-t.flexStyle.mainInnerAfter-t.flexStyle.mainBorderBefore-t.flexStyle.mainBorderAfter>=e.main+n.flexStyle.mainOuter?(e.main+=n.flexStyle.mainOuter,e.cross=Math.max(e.cross,n.flexStyle.crossOuter)):t.lines.push(e={main:n.flexStyle.mainOuter,cross:n.flexStyle.crossOuter,children:[]}),e.children.push(n);t.flexStyle.mainLines=i(t.lines,function(t,e){return Math.max(t,e.main)},0),t.flexStyle.crossLines=i(t.lines,function(t,e){return t+e.cross},0),"auto"===t.flexStyle.main&&(t.flexStyle.main=Math.max(t.flexStyle.mainOffset,t.flexStyle.mainLines+t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter)),"auto"===t.flexStyle.cross&&(t.flexStyle.cross=Math.max(t.flexStyle.crossOffset,t.flexStyle.crossLines+t.flexStyle.crossInnerBefore+t.flexStyle.crossInnerAfter+t.flexStyle.crossBorderBefore+t.flexStyle.crossBorderAfter)),t.flexStyle.crossSpace=t.flexStyle.cross-t.flexStyle.crossInnerBefore-t.flexStyle.crossInnerAfter-t.flexStyle.crossBorderBefore-t.flexStyle.crossBorderAfter-t.flexStyle.crossLines,t.flexStyle.mainOuter=t.flexStyle.main+t.flexStyle.mainBefore+t.flexStyle.mainAfter,t.flexStyle.crossOuter=t.flexStyle.cross+t.flexStyle.crossBefore+t.flexStyle.crossAfter}},{"../reduce":12}],7:[function(t,e,n){function i(e){for(var n,i=-1;n=e.children[++i];)t("./flex-direction")(n,e.style.flexDirection);t("./flex-direction")(e,e.style.flexDirection),t("./order")(e),t("./flexbox-lines")(e),t("./align-content")(e),i=-1;for(var r;r=e.lines[++i];)r.mainSpace=e.flexStyle.main-e.flexStyle.mainInnerBefore-e.flexStyle.mainInnerAfter-e.flexStyle.mainBorderBefore-e.flexStyle.mainBorderAfter-r.main,t("./flex-grow")(r),t("./flex-shrink")(r),t("./margin-main")(r),t("./margin-cross")(r),t("./justify-content")(r,e.style.justifyContent,e);t("./align-items")(e)}e.exports=i},{"./align-content":1,"./align-items":2,"./flex-direction":3,"./flex-grow":4,"./flex-shrink":5,"./flexbox-lines":6,"./justify-content":8,"./margin-cross":9,"./margin-main":10,"./order":11}],8:[function(t,e,n){e.exports=function(t,e,n){var i,r,o,a=n.flexStyle.mainInnerBefore,s=-1;if("flex-end"===e)for(i=t.mainSpace,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter;else if("center"===e)for(i=t.mainSpace/2,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter;else if("space-between"===e)for(r=t.mainSpace/(t.children.length-1),i=0,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter+r;else if("space-around"===e)for(r=2*t.mainSpace/(2*t.children.length),i=r/2,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter+r;else for(i=0,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter}},{}],9:[function(t,e,n){e.exports=function(t){for(var e,n=-1;e=t.children[++n];){var i=0;"auto"===e.flexStyle.crossBefore&&++i,"auto"===e.flexStyle.crossAfter&&++i;var r=t.cross-e.flexStyle.crossOuter;"auto"===e.flexStyle.crossBefore&&(e.flexStyle.crossBefore=r/i),"auto"===e.flexStyle.crossAfter&&(e.flexStyle.crossAfter=r/i),"auto"===e.flexStyle.cross?e.flexStyle.crossOuter=e.flexStyle.crossOffset+e.flexStyle.crossBefore+e.flexStyle.crossAfter:e.flexStyle.crossOuter=e.flexStyle.cross+e.flexStyle.crossBefore+e.flexStyle.crossAfter}}},{}],10:[function(t,e,n){e.exports=function(t){for(var e,n=0,i=-1;e=t.children[++i];)"auto"===e.flexStyle.mainBefore&&++n,"auto"===e.flexStyle.mainAfter&&++n;if(n>0){for(i=-1;e=t.children[++i];)"auto"===e.flexStyle.mainBefore&&(e.flexStyle.mainBefore=t.mainSpace/n),"auto"===e.flexStyle.mainAfter&&(e.flexStyle.mainAfter=t.mainSpace/n),"auto"===e.flexStyle.main?e.flexStyle.mainOuter=e.flexStyle.mainOffset+e.flexStyle.mainBefore+e.flexStyle.mainAfter:e.flexStyle.mainOuter=e.flexStyle.main+e.flexStyle.mainBefore+e.flexStyle.mainAfter;t.mainSpace=0}}},{}],11:[function(t,e,n){var i=/^(column|row)-reverse$/;e.exports=function(t){t.children.sort(function(t,e){return t.style.order-e.style.order||t.index-e.index}),i.test(t.style.flexDirection)&&t.children.reverse()}},{}],12:[function(t,e,n){function i(t,e,n){for(var i=t.length,r=-1;++r<i;)r in t&&(n=e(n,t[r],r));return n}e.exports=i},{}],13:[function(t,e,n){function i(t){s(a(t))}var r=t("./read"),o=t("./write"),a=t("./readAll"),s=t("./writeAll");e.exports=i,e.exports.read=r,e.exports.write=o,e.exports.readAll=a,e.exports.writeAll=s},{"./read":15,"./readAll":16,"./write":17,"./writeAll":18}],14:[function(t,e,n){function i(t,e){var n=String(t).match(o);if(!n)return t;var i=n[1],a=n[2];return"px"===a?1*i:"cm"===a?.3937*i*96:"in"===a?96*i:"mm"===a?.3937*i*96/10:"pc"===a?12*i*96/72:"pt"===a?96*i/72:"rem"===a?16*i:r(t,e)}function r(t,e){a.style.cssText="border:none!important;clip:rect(0 0 0 0)!important;display:block!important;font-size:1em!important;height:0!important;margin:0!important;padding:0!important;position:relative!important;width:"+t+"!important",e.parentNode.insertBefore(a,e.nextSibling);var n=a.offsetWidth;return e.parentNode.removeChild(a),n}e.exports=i;var o=/^([-+]?\d*\.?\d+)(%|[a-z]+)$/,a=document.createElement("div")},{}],15:[function(t,e,n){function i(t){var e={alignContent:"stretch",alignItems:"stretch",alignSelf:"auto",borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,boxSizing:"content-box",display:"inline",flexBasis:"auto",flexDirection:"row",flexGrow:0,flexShrink:1,flexWrap:"nowrap",justifyContent:"flex-start",height:"auto",marginTop:0,marginRight:0,marginLeft:0,marginBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,paddingBottom:0,maxHeight:"none",maxWidth:"none",minHeight:0,minWidth:0,order:0,position:"static",width:"auto"};if(t instanceof Element){var n=t.hasAttribute("data-style"),i=n?t.getAttribute("data-style"):t.getAttribute("style")||"";n||t.setAttribute("data-style",i),a(e,window.getComputedStyle&&getComputedStyle(t)||{}),r(e,t.currentStyle||{}),o(e,i);for(var s in e)e[s]=l(e[s],t);var u=t.getBoundingClientRect();e.offsetHeight=u.height||t.offsetHeight,e.offsetWidth=u.width||t.offsetWidth}return{element:t,style:e}}function r(t,e){for(var n in t){if(n in e)t[n]=e[n];else{var i=n.replace(/[A-Z]/g,"-$&").toLowerCase();i in e&&(t[n]=e[i])}}"-js-display"in e&&(t.display=e["-js-display"])}function o(t,e){for(var n;n=s.exec(e);){t[n[1].toLowerCase().replace(/-[a-z]/g,function(t){return t.slice(1).toUpperCase()})]=n[2]}}function a(t,e){for(var n in t){n in e&&!/^(alignSelf|height|width)$/.test(n)&&(t[n]=e[n])}}e.exports=i;var s=/([^\s:;]+)\s*:\s*([^;]+?)\s*(;|$)/g,l=t("./getComputedLength")},{"./getComputedLength":14}],16:[function(t,e,n){function i(t){var e=[];return r(t,e),e}function r(t,e){for(var n,i=o(t),s=[],l=-1;n=t.childNodes[++l];){var u=3===n.nodeType&&!/^\s*$/.test(n.nodeValue);if(i&&u){var c=n;n=t.insertBefore(document.createElement("flex-item"),c),n.appendChild(c)}if(n instanceof Element){var f=r(n,e);if(i){var d=n.style;d.display="inline-block",d.position="absolute",f.style=a(n).style,s.push(f)}}}var p={element:t,children:s};return i&&(p.style=a(t).style,e.push(p)),p}function o(t){var e=t instanceof Element,n=e&&t.getAttribute("data-style"),i=e&&t.currentStyle&&t.currentStyle["-js-display"];return s.test(n)||l.test(i)}e.exports=i;var a=t("../read"),s=/(^|;)\s*display\s*:\s*(inline-)?flex\s*(;|$)/i,l=/^(inline-)?flex$/i},{"../read":15}],17:[function(t,e,n){function i(t){o(t);var e=t.element.style,n="inline"===t.mainAxis?["main","cross"]:["cross","main"];e.boxSizing="content-box",e.display="block",e.position="relative",e.width=r(t.flexStyle[n[0]]-t.flexStyle[n[0]+"InnerBefore"]-t.flexStyle[n[0]+"InnerAfter"]-t.flexStyle[n[0]+"BorderBefore"]-t.flexStyle[n[0]+"BorderAfter"]),e.height=r(t.flexStyle[n[1]]-t.flexStyle[n[1]+"InnerBefore"]-t.flexStyle[n[1]+"InnerAfter"]-t.flexStyle[n[1]+"BorderBefore"]-t.flexStyle[n[1]+"BorderAfter"]);for(var i,a=-1;i=t.children[++a];){var s=i.element.style,l="inline"===i.mainAxis?["main","cross"]:["cross","main"];s.boxSizing="content-box",s.display="block",s.position="absolute","auto"!==i.flexStyle[l[0]]&&(s.width=r(i.flexStyle[l[0]]-i.flexStyle[l[0]+"InnerBefore"]-i.flexStyle[l[0]+"InnerAfter"]-i.flexStyle[l[0]+"BorderBefore"]-i.flexStyle[l[0]+"BorderAfter"])),"auto"!==i.flexStyle[l[1]]&&(s.height=r(i.flexStyle[l[1]]-i.flexStyle[l[1]+"InnerBefore"]-i.flexStyle[l[1]+"InnerAfter"]-i.flexStyle[l[1]+"BorderBefore"]-i.flexStyle[l[1]+"BorderAfter"])),s.top=r(i.flexStyle[l[1]+"Start"]),s.left=r(i.flexStyle[l[0]+"Start"]),s.marginTop=r(i.flexStyle[l[1]+"Before"]),s.marginRight=r(i.flexStyle[l[0]+"After"]),s.marginBottom=r(i.flexStyle[l[1]+"After"]),s.marginLeft=r(i.flexStyle[l[0]+"Before"])}}function r(t){return"string"==typeof t?t:Math.max(t,0)+"px"}e.exports=i;var o=t("../flexbox")},{"../flexbox":7}],18:[function(t,e,n){function i(t){for(var e,n=-1;e=t[++n];)r(e)}e.exports=i;var r=t("../write")},{"../write":17}]},{},[13])(13)})},function(t,e,n){"use strict";var i,r,o;!function(a){n(6)&&n(6).jQuery?(r=[n(0)],i=a,void 0!==(o="function"==typeof i?i.apply(e,r):i)&&(t.exports=o)):a(void 0!==t&&t.exports?n(0):jQuery)}(function(t){function e(e){return!e||void 0!==e.allowPageScroll||void 0===e.swipe&&void 0===e.swipeStatus||(e.allowPageScroll=u),void 0!==e.click&&void 0===e.tap&&(e.tap=e.click),e||(e={}),e=t.extend({},t.fn.swipe.defaults,e),this.each(function(){var i=t(this),r=i.data(A);r||(r=new n(this,e),i.data(A,r))})}function n(e,n){function O(e){if(!(ut()||t(e.target).closest(n.excludedElements,zt).length>0)){var i=e.originalEvent?e.originalEvent:e;if(!i.pointerType||"mouse"!=i.pointerType||0!=n.fallbackToMouseEvents){var r,o=i.touches,a=o?o[0]:i;return $t=_,o?Qt=o.length:!1!==n.preventDefaultEvents&&e.preventDefault(),jt=0,Bt=null,Vt=null,Ut=null,Ft=0,Mt=0,Rt=0,Ht=1,Wt=0,qt=gt(),st(),ft(0,a),!o||Qt===n.fingers||n.fingers===y||U()?(Yt=Tt(),2==Qt&&(ft(1,o[1]),Mt=Rt=bt(Gt[0].start,Gt[1].start)),(n.swipeStatus||n.pinchStatus)&&(r=j(i,$t))):r=!1,!1===r?($t=S,j(i,$t),r):(n.hold&&(ee=setTimeout(t.proxy(function(){zt.trigger("hold",[i.target]),n.hold&&(r=n.hold.call(zt,i,i.target))},this),n.longTapThreshold)),ct(!0),null)}}}function I(t){var e=t.originalEvent?t.originalEvent:t;if($t!==x&&$t!==S&&!lt()){var i,r=e.touches,o=r?r[0]:e,a=dt(o);if(Kt=Tt(),r&&(Qt=r.length),n.hold&&clearTimeout(ee),$t=w,2==Qt&&(0==Mt?(ft(1,r[1]),Mt=Rt=bt(Gt[0].start,Gt[1].start)):(dt(r[1]),Rt=bt(Gt[0].end,Gt[1].end),Ut=wt(Gt[0].end,Gt[1].end)),Ht=_t(Mt,Rt),Wt=Math.abs(Mt-Rt)),Qt===n.fingers||n.fingers===y||!r||U()){if(Bt=Et(a.start,a.end),Vt=Et(a.last,a.end),H(t,Vt),jt=xt(a.start,a.end),Ft=yt(),ht(Bt,jt),i=j(e,$t),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var s=!0;if(n.triggerOnTouchLeave){var l=Ct(this);s=At(a.end,l)}!n.triggerOnTouchEnd&&s?$t=L(w):n.triggerOnTouchLeave&&!s&&($t=L(x)),$t!=S&&$t!=x||j(e,$t)}}else $t=S,j(e,$t);!1===i&&($t=S,j(e,$t))}}function k(t){var e=t.originalEvent?t.originalEvent:t,i=e.touches;if(i){if(i.length&&!lt())return at(e),!0;if(i.length&&lt())return!0}return lt()&&(Qt=Zt),Kt=Tt(),Ft=yt(),F()||!V()?($t=S,j(e,$t)):n.triggerOnTouchEnd||!1===n.triggerOnTouchEnd&&$t===w?(!1!==n.preventDefaultEvents&&!1!==t.cancelable&&t.preventDefault(),$t=x,j(e,$t)):!n.triggerOnTouchEnd&&K()?($t=x,B(e,$t,p)):$t===w&&($t=S,j(e,$t)),ct(!1),null}function D(){Qt=0,Kt=0,Yt=0,Mt=0,Rt=0,Ht=1,st(),ct(!1)}function P(t){var e=t.originalEvent?t.originalEvent:t;n.triggerOnTouchLeave&&($t=L(x),j(e,$t))}function N(){zt.off(kt,O),zt.off(Lt,D),zt.off(Dt,I),zt.off(Pt,k),Nt&&zt.off(Nt,P),ct(!1)}function L(t){var e=t,i=R(),r=V(),o=F();return!i||o?e=S:!r||t!=w||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!r&&t==x&&n.triggerOnTouchLeave&&(e=S):e=x,e}function j(t,e){var n,i=t.touches;return(Q()||$())&&(n=B(t,e,f)),(q()||U())&&!1!==n&&(n=B(t,e,d)),rt()&&!1!==n?n=B(t,e,h):ot()&&!1!==n?n=B(t,e,m):it()&&!1!==n&&(n=B(t,e,p)),e===S&&D(t),e===x&&(i?i.length||D(t):D(t)),n}function B(e,u,c){var g;if(c==f){if(zt.trigger("swipeStatus",[u,Bt||null,jt||0,Ft||0,Qt,Gt,Vt]),n.swipeStatus&&!1===(g=n.swipeStatus.call(zt,e,u,Bt||null,jt||0,Ft||0,Qt,Gt,Vt)))return!1;if(u==x&&z()){if(clearTimeout(te),clearTimeout(ee),zt.trigger("swipe",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipe&&!1===(g=n.swipe.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt)))return!1;switch(Bt){case i:zt.trigger("swipeLeft",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipeLeft&&(g=n.swipeLeft.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt));break;case r:zt.trigger("swipeRight",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipeRight&&(g=n.swipeRight.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt));break;case o:zt.trigger("swipeUp",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipeUp&&(g=n.swipeUp.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt));break;case a:zt.trigger("swipeDown",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipeDown&&(g=n.swipeDown.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt))}}}if(c==d){if(zt.trigger("pinchStatus",[u,Ut||null,Wt||0,Ft||0,Qt,Ht,Gt]),n.pinchStatus&&!1===(g=n.pinchStatus.call(zt,e,u,Ut||null,Wt||0,Ft||0,Qt,Ht,Gt)))return!1;if(u==x&&W())switch(Ut){case s:zt.trigger("pinchIn",[Ut||null,Wt||0,Ft||0,Qt,Ht,Gt]),n.pinchIn&&(g=n.pinchIn.call(zt,e,Ut||null,Wt||0,Ft||0,Qt,Ht,Gt));break;case l:zt.trigger("pinchOut",[Ut||null,Wt||0,Ft||0,Qt,Ht,Gt]),n.pinchOut&&(g=n.pinchOut.call(zt,e,Ut||null,Wt||0,Ft||0,Qt,Ht,Gt))}}return c==p?u!==S&&u!==x||(clearTimeout(te),clearTimeout(ee),X()&&!tt()?(Jt=Tt(),te=setTimeout(t.proxy(function(){Jt=null,zt.trigger("tap",[e.target]),n.tap&&(g=n.tap.call(zt,e,e.target))},this),n.doubleTapThreshold)):(Jt=null,zt.trigger("tap",[e.target]),n.tap&&(g=n.tap.call(zt,e,e.target)))):c==h?u!==S&&u!==x||(clearTimeout(te),clearTimeout(ee),Jt=null,zt.trigger("doubletap",[e.target]),n.doubleTap&&(g=n.doubleTap.call(zt,e,e.target))):c==m&&(u!==S&&u!==x||(clearTimeout(te),Jt=null,zt.trigger("longtap",[e.target]),n.longTap&&(g=n.longTap.call(zt,e,e.target)))),g}function V(){var t=!0;return null!==n.threshold&&(t=jt>=n.threshold),t}function F(){var t=!1;return null!==n.cancelThreshold&&null!==Bt&&(t=mt(Bt)-jt>=n.cancelThreshold),t}function M(){return null===n.pinchThreshold||Wt>=n.pinchThreshold}function R(){return!n.maxTimeThreshold||!(Ft>=n.maxTimeThreshold)}function H(t,e){if(!1!==n.preventDefaultEvents)if(n.allowPageScroll===u)t.preventDefault();else{var s=n.allowPageScroll===c;switch(e){case i:(n.swipeLeft&&s||!s&&n.allowPageScroll!=g)&&t.preventDefault();break;case r:(n.swipeRight&&s||!s&&n.allowPageScroll!=g)&&t.preventDefault();break;case o:(n.swipeUp&&s||!s&&n.allowPageScroll!=v)&&t.preventDefault();break;case a:(n.swipeDown&&s||!s&&n.allowPageScroll!=v)&&t.preventDefault()}}}function W(){var t=G(),e=Y(),n=M();return t&&e&&n}function U(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function q(){return!(!W()||!U())}function z(){var t=R(),e=V(),n=G(),i=Y();return!F()&&i&&n&&e&&t}function $(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function Q(){return!(!z()||!$())}function G(){return Qt===n.fingers||n.fingers===y||!E}function Y(){return 0!==Gt[0].end.x}function K(){return!!n.tap}function X(){return!!n.doubleTap}function Z(){return!!n.longTap}function J(){if(null==Jt)return!1;var t=Tt();return X()&&t-Jt<=n.doubleTapThreshold}function tt(){return J()}function et(){return(1===Qt||!E)&&(isNaN(jt)||jt<n.threshold)}function nt(){return Ft>n.longTapThreshold&&b>jt}function it(){return!(!et()||!K())}function rt(){return!(!J()||!X())}function ot(){return!(!nt()||!Z())}function at(t){Xt=Tt(),Zt=t.touches.length+1}function st(){Xt=0,Zt=0}function lt(){var t=!1;if(Xt){Tt()-Xt<=n.fingerReleaseThreshold&&(t=!0)}return t}function ut(){return!(!0!==zt.data(A+"_intouch"))}function ct(t){zt&&(!0===t?(zt.on(Dt,I),zt.on(Pt,k),Nt&&zt.on(Nt,P)):(zt.off(Dt,I,!1),zt.off(Pt,k,!1),Nt&&zt.off(Nt,P,!1)),zt.data(A+"_intouch",!0===t))}function ft(t,e){var n={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return n.start.x=n.last.x=n.end.x=e.pageX||e.clientX,n.start.y=n.last.y=n.end.y=e.pageY||e.clientY,Gt[t]=n,n}function dt(t){var e=void 0!==t.identifier?t.identifier:0,n=pt(e);return null===n&&(n=ft(e,t)),n.last.x=n.end.x,n.last.y=n.end.y,n.end.x=t.pageX||t.clientX,n.end.y=t.pageY||t.clientY,n}function pt(t){return Gt[t]||null}function ht(t,e){t!=u&&(e=Math.max(e,mt(t)),qt[t].distance=e)}function mt(t){return qt[t]?qt[t].distance:void 0}function gt(){var t={};return t[i]=vt(i),t[r]=vt(r),t[o]=vt(o),t[a]=vt(a),t}function vt(t){return{direction:t,distance:0}}function yt(){return Kt-Yt}function bt(t,e){var n=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y);return Math.round(Math.sqrt(n*n+i*i))}function _t(t,e){return(e/t*1).toFixed(2)}function wt(){return 1>Ht?l:s}function xt(t,e){return Math.round(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)))}function St(t,e){var n=t.x-e.x,i=e.y-t.y,r=Math.atan2(i,n),o=Math.round(180*r/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function Et(t,e){if(Ot(t,e))return u;var n=St(t,e);return 45>=n&&n>=0?i:360>=n&&n>=315?i:n>=135&&225>=n?r:n>45&&135>n?a:o}function Tt(){return(new Date).getTime()}function Ct(e){e=t(e);var n=e.offset();return{left:n.left,right:n.left+e.outerWidth(),top:n.top,bottom:n.top+e.outerHeight()}}function At(t,e){return t.x>e.left&&t.x<e.right&&t.y>e.top&&t.y<e.bottom}function Ot(t,e){return t.x==e.x&&t.y==e.y}var n=t.extend({},n),It=E||C||!n.fallbackToMouseEvents,kt=It?C?T?"MSPointerDown":"pointerdown":"touchstart":"mousedown",Dt=It?C?T?"MSPointerMove":"pointermove":"touchmove":"mousemove",Pt=It?C?T?"MSPointerUp":"pointerup":"touchend":"mouseup",Nt=It?C?"mouseleave":null:"mouseleave",Lt=C?T?"MSPointerCancel":"pointercancel":"touchcancel",jt=0,Bt=null,Vt=null,Ft=0,Mt=0,Rt=0,Ht=1,Wt=0,Ut=0,qt=null,zt=t(e),$t="start",Qt=0,Gt={},Yt=0,Kt=0,Xt=0,Zt=0,Jt=0,te=null,ee=null;try{zt.on(kt,O),zt.on(Lt,D)}catch(e){t.error("events not supported "+kt+","+Lt+" on jQuery.swipe")}this.enable=function(){return this.disable(),zt.on(kt,O),zt.on(Lt,D),zt},this.disable=function(){return N(),zt},this.destroy=function(){N(),zt.data(A,null),zt=null},this.option=function(e,i){if("object"==typeof e)n=t.extend(n,e);else if(void 0!==n[e]){if(void 0===i)return n[e];n[e]=i}else{if(!e)return n;t.error("Option "+e+" does not exist on jQuery.swipe.options")}return null}}var i="left",r="right",o="up",a="down",s="in",l="out",u="none",c="auto",f="swipe",d="pinch",p="tap",h="doubletap",m="longtap",g="horizontal",v="vertical",y="all",b=10,_="start",w="move",x="end",S="cancel",E="ontouchstart"in window,T=window.navigator.msPointerEnabled&&!window.PointerEvent&&!E,C=(window.PointerEvent||window.navigator.msPointerEnabled)&&!E,A="TouchSwipe",O={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};t.fn.swipe=function(n){var i=t(this),r=i.data(A);if(r&&"string"==typeof n){if(r[n])return r[n].apply(r,Array.prototype.slice.call(arguments,1));t.error("Method "+n+" does not exist on jQuery.swipe")}else if(r&&"object"==typeof n)r.option.apply(r,arguments);else if(!(r||"object"!=typeof n&&n))return e.apply(this,arguments);return i},t.fn.swipe.version="1.6.18",t.fn.swipe.defaults=O,t.fn.swipe.phases={PHASE_START:_,PHASE_MOVE:w,PHASE_END:x,PHASE_CANCEL:S},t.fn.swipe.directions={LEFT:i,RIGHT:r,UP:o,DOWN:a,IN:s,OUT:l},t.fn.swipe.pageScroll={NONE:u,HORIZONTAL:g,VERTICAL:v,AUTO:c},t.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:y}})},function(t,e,n){"use strict";var i,r;!function(o,a){i=a,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(t,e,n){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t){var e=t.getBoundingClientRect(),n={};for(var i in e)n[i]=e[i];if(t.ownerDocument!==document){var o=t.ownerDocument.defaultView.frameElement;if(o){var a=r(o);n.top+=a.top,n.bottom+=a.top,n.left+=a.left,n.right+=a.left}}return n}function o(t){var e=getComputedStyle(t)||{},n=e.position,i=[];if("fixed"===n)return[t];for(var r=t;(r=r.parentNode)&&r&&1===r.nodeType;){var o=void 0;try{o=getComputedStyle(r)}catch(t){}if(void 0===o||null===o)return i.push(r),i;var a=o,s=a.overflow,l=a.overflowX;/(auto|scroll)/.test(s+a.overflowY+l)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(o.position)>=0)&&i.push(r)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}function a(){T&&document.body.removeChild(T),T=null}function s(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var n=e.documentElement,i=r(t),o=O();return i.top-=o.top,i.left-=o.left,void 0===i.width&&(i.width=document.body.scrollWidth-i.left-i.right),void 0===i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-n.clientTop,i.left=i.left-n.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}function l(t){return t.offsetParent||document.documentElement}function u(){if(I)return I;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");c(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;n===i&&(i=e.clientWidth),document.body.removeChild(e);var r=n-i;return I={width:r,height:r}}function c(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}),t}function f(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var n=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=h(t).replace(n," ");m(t,i)}}function d(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{f(t,e);var n=h(t)+" "+e;m(t,n)}}function p(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=h(t);return new RegExp("(^| )"+e+"( |$)","gi").test(n)}function h(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function m(t,e){t.setAttribute("class",e)}function g(t,e,n){n.forEach(function(n){-1===e.indexOf(n)&&p(t,n)&&f(t,n)}),e.forEach(function(e){p(t,e)||d(t,e)})}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+n>=e&&e>=t-n}function b(){return"undefined"!=typeof performance&&void 0!==performance.now?performance.now():+new Date}function _(){for(var t={top:0,left:0},e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return n.forEach(function(e){var n=e.top,i=e.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=n,t.left+=i}),t}function w(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function x(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),void 0!==e.nodeType&&function(){var t=e,n=s(e),i=n,r=getComputedStyle(e);if(e=[i.left,i.top,n.width+i.left,n.height+i.top],t.ownerDocument!==document){var o=t.ownerDocument.defaultView;e[0]+=o.pageXOffset,e[1]+=o.pageYOffset,e[2]+=o.pageXOffset,e[3]+=o.pageYOffset}Y.forEach(function(t,n){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[n]+=parseFloat(r["border"+t+"Width"]):e[n]-=parseFloat(r["border"+t+"Width"])})}(),e}var S=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),E=void 0;void 0===E&&(E={modules:[]});var T=null,C=function(){var t=0;return function(){return++t}}(),A={},O=function(){var t=T;t&&document.body.contains(t)||(t=document.createElement("div"),t.setAttribute("data-tether-id",C()),c(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),T=t);var e=t.getAttribute("data-tether-id");return void 0===A[e]&&(A[e]=r(t),D(function(){delete A[e]})),A[e]},I=null,k=[],D=function(t){k.push(t)},P=function(){for(var t=void 0;t=k.pop();)t()},N=function(){function t(){i(this,t)}return S(t,[{key:"on",value:function(t,e,n){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:n,once:i})}},{key:"once",value:function(t,e,n){this.on(t,e,n,!0)}},{key:"off",value:function(t,e){if(void 0!==this.bindings&&void 0!==this.bindings[t])if(void 0===e)delete this.bindings[t];else for(var n=0;n<this.bindings[t].length;)this.bindings[t][n].handler===e?this.bindings[t].splice(n,1):++n}},{key:"trigger",value:function(t){if(void 0!==this.bindings&&this.bindings[t]){for(var e=0,n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];for(;e<this.bindings[t].length;){var o=this.bindings[t][e],a=o.handler,s=o.ctx,l=o.once,u=s;void 0===u&&(u=this),a.apply(u,i),l?this.bindings[t].splice(e,1):++e}}}}]),t}();E.Utils={getActualBoundingClientRect:r,getScrollParents:o,getBounds:s,getOffsetParent:l,extend:c,addClass:d,removeClass:f,hasClass:p,updateClasses:g,defer:D,flush:P,uniqueId:C,Evented:N,getScrollBarSize:u,removeUtilElements:a};var L=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),j=function(t,e,n){for(var i=!0;i;){var r=t,o=e,a=n;i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return;t=u,e=o,n=a,i=!0,s=u=void 0}};if(void 0===E)throw new Error("You must include the utils.js file before tether.js");var B=E.Utils,o=B.getScrollParents,s=B.getBounds,l=B.getOffsetParent,c=B.extend,d=B.addClass,f=B.removeClass,g=B.updateClasses,D=B.defer,P=B.flush,u=B.getScrollBarSize,a=B.removeUtilElements,V=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],n=0;n<e.length;++n){var i=e[n];if(void 0!==t.style[i])return i}}(),F=[],M=function(){F.forEach(function(t){t.position(!1)}),P()};!function(){var t=null,e=null,n=null,i=function i(){if(void 0!==e&&e>16)return e=Math.min(e-16,250),void(n=setTimeout(i,250));void 0!==t&&b()-t<10||(null!=n&&(clearTimeout(n),n=null),t=b(),M(),e=b()-t)};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var R={center:"center",left:"right",right:"left"},H={middle:"middle",top:"bottom",bottom:"top"},W={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},U=function(t,e){var n=t.left,i=t.top;return"auto"===n&&(n=R[e.left]),"auto"===i&&(i=H[e.top]),{left:n,top:i}},q=function(t){var e=t.left,n=t.top;return void 0!==W[t.left]&&(e=W[t.left]),void 0!==W[t.top]&&(n=W[t.top]),{left:e,top:n}},z=function(t){var e=t.split(" "),n=L(e,2);return{top:n[0],left:n[1]}},$=z,Q=function(t){function e(t){var n=this;i(this,e),j(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),F.push(this),this.history=[],this.setOptions(t,!1),E.modules.forEach(function(t){void 0!==t.initialize&&t.initialize.call(n)}),this.position()}return v(e,t),S(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(i,t);var r=this.options,a=r.element,s=r.target,l=r.targetModifier;if(this.element=a,this.target=s,this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(void 0===e[t])throw new Error("Tether Error: Both element and target must be defined");void 0!==e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=$(this.options.targetAttachment),this.attachment=$(this.options.attachment),this.offset=z(this.options.offset),this.targetOffset=z(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=o(this.target),!1!==this.options.enabled&&this.enable(n)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=s(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,n=this.target;n===document.body?(n=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=s(n);var i=getComputedStyle(n),r=n.scrollWidth>n.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,o=0;r&&(o=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-o,e={width:15,height:.975*a*(a/n.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},l=0;a<408&&this.target===document.body&&(l=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var u=this.target.scrollTop/(n.scrollHeight-a);return e.top=u*(a-e.height-l)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return void 0===this._cache&&(this._cache={}),void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;f(this.target,this.getClass("enabled")),f(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),F.forEach(function(e,n){e===t&&F.splice(n,1)}),0===F.length&&a()}},{key:"updateAttachClasses",value:function(t,e){var n=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var r=this._addAttachClasses;t.top&&r.push(this.getClass("element-attached")+"-"+t.top),t.left&&r.push(this.getClass("element-attached")+"-"+t.left),e.top&&r.push(this.getClass("target-attached")+"-"+e.top),e.left&&r.push(this.getClass("target-attached")+"-"+e.left);var o=[];i.forEach(function(t){o.push(n.getClass("element-attached")+"-"+t),o.push(n.getClass("target-attached")+"-"+t)}),D(function(){void 0!==n._addAttachClasses&&(g(n.element,n._addAttachClasses,o),!1!==n.options.addTargetClasses&&g(n.target,n._addAttachClasses,o),delete n._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var n=U(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var i=this.cache("element-bounds",function(){return s(t.element)}),r=i.width,o=i.height;if(0===r&&0===o&&void 0!==this.lastSize){var a=this.lastSize;r=a.width,o=a.height}else this.lastSize={width:r,height:o};var c=this.cache("target-bounds",function(){return t.getTargetBounds()}),f=c,d=w(q(this.attachment),{width:r,height:o}),p=w(q(n),f),h=w(this.offset,{width:r,height:o}),m=w(this.targetOffset,f);d=_(d,h),p=_(p,m);for(var g=c.left+p.left-d.left,v=c.top+p.top-d.top,y=0;y<E.modules.length;++y){var b=E.modules[y],x=b.position.call(this,{left:g,top:v,targetAttachment:n,targetPos:c,elementPos:i,offset:d,targetOffset:p,manualOffset:h,manualTargetOffset:m,scrollbarSize:A,attachment:this.attachment});if(!1===x)return!1;void 0!==x&&"object"==typeof x&&(v=x.top,g=x.left)}var S={page:{top:v,left:g},viewport:{top:v-pageYOffset,bottom:pageYOffset-v-o+innerHeight,left:g-pageXOffset,right:pageXOffset-g-r+innerWidth}},T=this.target.ownerDocument,C=T.defaultView,A=void 0;return C.innerHeight>T.documentElement.clientHeight&&(A=this.cache("scrollbar-size",u),S.viewport.bottom-=A.height),C.innerWidth>T.documentElement.clientWidth&&(A=this.cache("scrollbar-size",u),S.viewport.right-=A.width),-1!==["","static"].indexOf(T.body.style.position)&&-1!==["","static"].indexOf(T.body.parentElement.style.position)||(S.page.bottom=T.body.scrollHeight-v-o,S.page.right=T.body.scrollWidth-g-r),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return l(t.target)}),n=t.cache("target-offsetparent-bounds",function(){return s(e)}),i=getComputedStyle(e),r=n,o={};if(["Top","Left","Bottom","Right"].forEach(function(t){o[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),n.right=T.body.scrollWidth-n.left-r.width+o.right,n.bottom=T.body.scrollHeight-n.top-r.height+o.bottom,S.page.top>=n.top+o.top&&S.page.bottom>=n.bottom&&S.page.left>=n.left+o.left&&S.page.right>=n.right){var a=e.scrollTop,u=e.scrollLeft;S.offset={top:S.page.top-n.top+a-o.top,left:S.page.left-n.left+u-o.left}}}(),this.move(S),this.history.unshift(S),this.history.length>3&&this.history.pop(),e&&P(),!0}}},{key:"move",value:function(t){var e=this;if(void 0!==this.element.parentNode){var n={};for(var i in t){n[i]={};for(var r in t[i]){for(var o=!1,a=0;a<this.history.length;++a){var s=this.history[a];if(void 0!==s[i]&&!y(s[i][r],t[i][r])){o=!0;break}}o||(n[i][r]=!0)}}var u={top:"",left:"",right:"",bottom:""},f=function(t,n){if(!1!==(void 0!==e.options.optimizations?e.options.optimizations.gpu:null)){var i=void 0,r=void 0;t.top?(u.top=0,i=n.top):(u.bottom=0,i=-n.bottom),t.left?(u.left=0,r=n.left):(u.right=0,r=-n.right),window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 1.3dppx)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3)").matches||(r=Math.round(r),i=Math.round(i))),u[V]="translateX("+r+"px) translateY("+i+"px)","msTransform"!==V&&(u[V]+=" translateZ(0)")}else t.top?u.top=n.top+"px":u.bottom=n.bottom+"px",t.left?u.left=n.left+"px":u.right=n.right+"px"},d=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(u.position="absolute",f(n.page,t.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(u.position="fixed",f(n.viewport,t.viewport)):void 0!==n.offset&&n.offset.top&&n.offset.left?function(){u.position="absolute";var i=e.cache("target-offsetparent",function(){return l(e.target)});l(e.element)!==i&&D(function(){e.element.parentNode.removeChild(e.element),i.appendChild(e.element)}),f(n.offset,t.offset),d=!0}():(u.position="absolute",f({top:!0,left:!0},t.page)),!d)if(this.options.bodyElement)this.options.bodyElement.appendChild(this.element);else{for(var p=!0,h=this.element.parentNode;h&&1===h.nodeType&&"BODY"!==h.tagName;){if("static"!==getComputedStyle(h).position){p=!1;break}h=h.parentNode}p||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var m={},g=!1;for(var r in u){var v=u[r];this.element.style[r]!==v&&(g=!0,m[r]=v)}g&&D(function(){c(e.element.style,m),e.trigger("repositioned")})}}}]),e}(N);Q.modules=[],E.position=M;var G=c(Q,E),L=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),B=E.Utils,s=B.getBounds,c=B.extend,g=B.updateClasses,D=B.defer,Y=["left","top","right","bottom"];E.modules.push({position:function(t){var e=this,n=t.top,i=t.left,r=t.targetAttachment;if(!this.options.constraints)return!0;var o=this.cache("element-bounds",function(){return s(e.element)}),a=o.height,l=o.width;if(0===l&&0===a&&void 0!==this.lastSize){var u=this.lastSize;l=u.width,a=u.height}var f=this.cache("target-bounds",function(){return e.getTargetBounds()}),d=f.height,p=f.width,h=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,n=t.pinnedClass;e&&h.push(e),n&&h.push(n)}),h.forEach(function(t){["left","top","right","bottom"].forEach(function(e){h.push(t+"-"+e)})});var m=[],v=c({},r),y=c({},this.attachment);return this.options.constraints.forEach(function(t){var o=t.to,s=t.attachment,u=t.pin;void 0===s&&(s="");var c=void 0,f=void 0;if(s.indexOf(" ")>=0){var h=s.split(" "),g=L(h,2);f=g[0],c=g[1]}else c=f=s;var b=x(e,o);"target"!==f&&"both"!==f||(n<b[1]&&"top"===v.top&&(n+=d,v.top="bottom"),n+a>b[3]&&"bottom"===v.top&&(n-=d,v.top="top")),"together"===f&&("top"===v.top&&("bottom"===y.top&&n<b[1]?(n+=d,v.top="bottom",n+=a,y.top="top"):"top"===y.top&&n+a>b[3]&&n-(a-d)>=b[1]&&(n-=a-d,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&n+a>b[3]?(n-=d,v.top="top",n-=a,y.top="bottom"):"bottom"===y.top&&n<b[1]&&n+(2*a-d)<=b[3]&&(n+=a-d,v.top="top",y.top="top")),"middle"===v.top&&(n+a>b[3]&&"top"===y.top?(n-=a,y.top="bottom"):n<b[1]&&"bottom"===y.top&&(n+=a,y.top="top"))),"target"!==c&&"both"!==c||(i<b[0]&&"left"===v.left&&(i+=p,v.left="right"),i+l>b[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===c&&(i<b[0]&&"left"===v.left?"right"===y.left?(i+=p,v.left="right",i+=l,y.left="left"):"left"===y.left&&(i+=p,v.left="right",i-=l,y.left="right"):i+l>b[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=l,y.left="left"):"center"===v.left&&(i+l>b[2]&&"left"===y.left?(i-=l,y.left="right"):i<b[0]&&"right"===y.left&&(i+=l,y.left="left"))),"element"!==f&&"both"!==f||(n<b[1]&&"bottom"===y.top&&(n+=a,y.top="top"),n+a>b[3]&&"top"===y.top&&(n-=a,y.top="bottom")),"element"!==c&&"both"!==c||(i<b[0]&&("right"===y.left?(i+=l,y.left="left"):"center"===y.left&&(i+=l/2,y.left="left")),i+l>b[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof u?u=u.split(",").map(function(t){return t.trim()}):!0===u&&(u=["top","left","right","bottom"]),u=u||[];var _=[],w=[];n<b[1]&&(u.indexOf("top")>=0?(n=b[1],_.push("top")):w.push("top")),n+a>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-a,_.push("bottom")):w.push("bottom")),i<b[0]&&(u.indexOf("left")>=0?(i=b[0],_.push("left")):w.push("left")),i+l>b[2]&&(u.indexOf("right")>=0?(i=b[2]-l,_.push("right")):w.push("right")),_.length&&function(){var t=void 0;t=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),_.forEach(function(e){m.push(t+"-"+e)})}(),w.length&&function(){var t=void 0;t=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),w.forEach(function(e){m.push(t+"-"+e)})}(),(_.indexOf("left")>=0||_.indexOf("right")>=0)&&(y.left=v.left=!1),(_.indexOf("top")>=0||_.indexOf("bottom")>=0)&&(y.top=v.top=!1),v.top===r.top&&v.left===r.left&&y.top===e.attachment.top&&y.left===e.attachment.left||(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),D(function(){!1!==e.options.addTargetClasses&&g(e.target,m,h),g(e.element,m,h)}),{top:n,left:i}}});var B=E.Utils,s=B.getBounds,g=B.updateClasses,D=B.defer;E.modules.push({position:function(t){var e=this,n=t.top,i=t.left,r=this.cache("element-bounds",function(){return s(e.element)}),o=r.height,a=r.width,l=this.getTargetBounds(),u=n+o,c=i+a,f=[];n<=l.bottom&&u>=l.top&&["left","right"].forEach(function(t){var e=l[t];e!==i&&e!==c||f.push(t)}),i<=l.right&&c>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];e!==n&&e!==u||f.push(t)});var d=[],p=[],h=["left","top","right","bottom"];return d.push(this.getClass("abutted")),h.forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),f.length&&p.push(this.getClass("abutted")),f.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),D(function(){!1!==e.options.addTargetClasses&&g(e.target,p,d),g(e.element,p,d)}),!0}});var L=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return E.modules.push({position:function(t){var e=t.top,n=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:n}));var r=void 0,o=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var a=i,s=L(a,2);r=s[0],o=s[1],r=parseFloat(r,10),o=parseFloat(o,10)}else r=i.top,o=i.left;return e+=r,n+=o,{top:e,left:n}}}}),G})},function(t,e,n){"use strict";var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,n){(function(e){t.exports=e.Tether=n(25)}).call(e,n(26))},function(t,e,n){n(7),t.exports=n(8)}]);/**
 * 2007-2020 PrestaShop.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2020 PrestaShop SA
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */
$(document).ready(function(){$('.block_newsletter form').on('submit',function(){var psemailsubscriptionForm=$(this);if(typeof psemailsubscription_subscription==='undefined'){return!0}
$('.block_newsletter_alert').remove();$.ajax({type:'POST',dataType:'JSON',url:psemailsubscription_subscription,cache:!1,data:$(this).serialize(),success:function(data){if(data.nw_error){psemailsubscriptionForm.prepend('<p class="alert alert-danger block_newsletter_alert">'+data.msg+'</p>')}else{psemailsubscriptionForm.prepend('<p class="alert alert-success block_newsletter_alert">'+data.msg+'</p>')}},error:function(err){console.log(err)}});return!1})});/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./_dev/front/index.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./_dev/front/front.scss":
/*!*******************************!*\
  !*** ./_dev/front/front.scss ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../node_modules/mini-css-extract-plugin/dist/loader.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./front.scss */ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./_dev/front/front.scss");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./_dev/front/index.js":
/*!*****************************!*\
  !*** ./_dev/front/index.js ***!
  \*****************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _front_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./front.scss */ "./_dev/front/front.scss");
/* harmony import */ var _front_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_front_scss__WEBPACK_IMPORTED_MODULE_0__);
/**
 * 2007-2019 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2019 PrestaShop SA
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */
$(window).ready(function(){$('.blockreassurance_product img.svg, .blockreassurance img.svg').each(function(){var imgObject=$(this);var imgID=imgObject.attr('id');var imgClass=imgObject.attr('class');var imgURL=imgObject.attr('src');$.ajax({url:imgURL,type:'GET',success:function(data){if($.isXMLDoc(data)){var $svg=$(data).find('svg');$svg=typeof imgID!=='undefined'?$svg.attr('id',imgID):$svg;$svg=typeof imgClass!=='undefined'?$svg.attr('class',imgClass+' replaced-svg'):$svg.attr('class',' replaced-svg');$svg.removeClass('invisible');$svg=$svg.attr('data-img-url',imgURL);$svg=$svg.removeAttr('xmlns:a');$svg.find('path[fill]').attr('fill',psr_icon_color);$svg.find('path:not([fill])').css('fill',psr_icon_color);imgObject.replaceWith($svg)}
imgObject.removeClass('invisible')}})})})}),"./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./_dev/front/front.scss":
/*!******************************************************************************************************************************************************************!*\
  !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./_dev/front/front.scss ***!
  \******************************************************************************************************************************************************************/
/*! no static exports found */
(function(module,exports,__webpack_require__){}),"./node_modules/style-loader/lib/addStyles.js":
/*!****************************************************!*\
  !*** ./node_modules/style-loader/lib/addStyles.js ***!
  \****************************************************/
/*! no static exports found */
(function(module,exports,__webpack_require__){var stylesInDom={};var memoize=function(fn){var memo;return function(){if(typeof memo==="undefined")memo=fn.apply(this,arguments);return memo}};var isOldIE=memoize(function(){return window&&document&&document.all&&!window.atob});var getTarget=function(target,parent){if(parent){return parent.querySelector(target)}
return document.querySelector(target)};var getElement=(function(fn){var memo={};return function(target,parent){if(typeof target==='function'){return target()}
if(typeof memo[target]==="undefined"){var styleTarget=getTarget.call(this,target,parent);if(window.HTMLIFrameElement&&styleTarget instanceof window.HTMLIFrameElement){try{styleTarget=styleTarget.contentDocument.head}catch(e){styleTarget=null}}
memo[target]=styleTarget}
return memo[target]}})();var singleton=null;var singletonCounter=0;var stylesInsertedAtTop=[];var fixUrls=__webpack_require__(/*! ./urls */"./node_modules/style-loader/lib/urls.js");module.exports=function(list,options){if(typeof DEBUG!=="undefined"&&DEBUG){if(typeof document!=="object")throw new Error("The style-loader cannot be used in a non-browser environment")}
options=options||{};options.attrs=typeof options.attrs==="object"?options.attrs:{};if(!options.singleton&&typeof options.singleton!=="boolean")options.singleton=isOldIE();if(!options.insertInto)options.insertInto="head";if(!options.insertAt)options.insertAt="bottom";var styles=listToStyles(list,options);addStylesToDom(styles,options);return function update(newList){var mayRemove=[];for(var i=0;i<styles.length;i++){var item=styles[i];var domStyle=stylesInDom[item.id];domStyle.refs--;mayRemove.push(domStyle)}
if(newList){var newStyles=listToStyles(newList,options);addStylesToDom(newStyles,options)}
for(var i=0;i<mayRemove.length;i++){var domStyle=mayRemove[i];if(domStyle.refs===0){for(var j=0;j<domStyle.parts.length;j++)domStyle.parts[j]();delete stylesInDom[domStyle.id]}}}};function addStylesToDom(styles,options){for(var i=0;i<styles.length;i++){var item=styles[i];var domStyle=stylesInDom[item.id];if(domStyle){domStyle.refs++;for(var j=0;j<domStyle.parts.length;j++){domStyle.parts[j](item.parts[j])}
for(;j<item.parts.length;j++){domStyle.parts.push(addStyle(item.parts[j],options))}}else{var parts=[];for(var j=0;j<item.parts.length;j++){parts.push(addStyle(item.parts[j],options))}
stylesInDom[item.id]={id:item.id,refs:1,parts:parts}}}}
function listToStyles(list,options){var styles=[];var newStyles={};for(var i=0;i<list.length;i++){var item=list[i];var id=options.base?item[0]+options.base:item[0];var css=item[1];var media=item[2];var sourceMap=item[3];var part={css:css,media:media,sourceMap:sourceMap};if(!newStyles[id])styles.push(newStyles[id]={id:id,parts:[part]});else newStyles[id].parts.push(part)}
return styles}
function insertStyleElement(options,style){var target=getElement(options.insertInto)
if(!target){throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.")}
var lastStyleElementInsertedAtTop=stylesInsertedAtTop[stylesInsertedAtTop.length-1];if(options.insertAt==="top"){if(!lastStyleElementInsertedAtTop){target.insertBefore(style,target.firstChild)}else if(lastStyleElementInsertedAtTop.nextSibling){target.insertBefore(style,lastStyleElementInsertedAtTop.nextSibling)}else{target.appendChild(style)}
stylesInsertedAtTop.push(style)}else if(options.insertAt==="bottom"){target.appendChild(style)}else if(typeof options.insertAt==="object"&&options.insertAt.before){var nextSibling=getElement(options.insertAt.before,target);target.insertBefore(style,nextSibling)}else{throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n")}}
function removeStyleElement(style){if(style.parentNode===null)return!1;style.parentNode.removeChild(style);var idx=stylesInsertedAtTop.indexOf(style);if(idx>=0){stylesInsertedAtTop.splice(idx,1)}}
function createStyleElement(options){var style=document.createElement("style");if(options.attrs.type===undefined){options.attrs.type="text/css"}
if(options.attrs.nonce===undefined){var nonce=getNonce();if(nonce){options.attrs.nonce=nonce}}
addAttrs(style,options.attrs);insertStyleElement(options,style);return style}
function createLinkElement(options){var link=document.createElement("link");if(options.attrs.type===undefined){options.attrs.type="text/css"}
options.attrs.rel="stylesheet";addAttrs(link,options.attrs);insertStyleElement(options,link);return link}
function addAttrs(el,attrs){Object.keys(attrs).forEach(function(key){el.setAttribute(key,attrs[key])})}
function getNonce(){if(!1){}
return __webpack_require__.nc}
function addStyle(obj,options){var style,update,remove,result;if(options.transform&&obj.css){result=typeof options.transform==='function'?options.transform(obj.css):options.transform.default(obj.css);if(result){obj.css=result}else{return function(){}}}
if(options.singleton){var styleIndex=singletonCounter++;style=singleton||(singleton=createStyleElement(options));update=applyToSingletonTag.bind(null,style,styleIndex,!1);remove=applyToSingletonTag.bind(null,style,styleIndex,!0)}else if(obj.sourceMap&&typeof URL==="function"&&typeof URL.createObjectURL==="function"&&typeof URL.revokeObjectURL==="function"&&typeof Blob==="function"&&typeof btoa==="function"){style=createLinkElement(options);update=updateLink.bind(null,style,options);remove=function(){removeStyleElement(style);if(style.href)URL.revokeObjectURL(style.href)}}else{style=createStyleElement(options);update=applyToTag.bind(null,style);remove=function(){removeStyleElement(style)}}
update(obj);return function updateStyle(newObj){if(newObj){if(newObj.css===obj.css&&newObj.media===obj.media&&newObj.sourceMap===obj.sourceMap){return}
update(obj=newObj)}else{remove()}}}
var replaceText=(function(){var textStore=[];return function(index,replacement){textStore[index]=replacement;return textStore.filter(Boolean).join('\n')}})();function applyToSingletonTag(style,index,remove,obj){var css=remove?"":obj.css;if(style.styleSheet){style.styleSheet.cssText=replaceText(index,css)}else{var cssNode=document.createTextNode(css);var childNodes=style.childNodes;if(childNodes[index])style.removeChild(childNodes[index]);if(childNodes.length){style.insertBefore(cssNode,childNodes[index])}else{style.appendChild(cssNode)}}}
function applyToTag(style,obj){var css=obj.css;var media=obj.media;if(media){style.setAttribute("media",media)}
if(style.styleSheet){style.styleSheet.cssText=css}else{while(style.firstChild){style.removeChild(style.firstChild)}
style.appendChild(document.createTextNode(css))}}
function updateLink(link,options,obj){var css=obj.css;var sourceMap=obj.sourceMap;var autoFixUrls=options.convertToAbsoluteUrls===undefined&&sourceMap;if(options.convertToAbsoluteUrls||autoFixUrls){css=fixUrls(css)}
if(sourceMap){css+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))))+" */"}
var blob=new Blob([css],{type:"text/css"});var oldSrc=link.href;link.href=URL.createObjectURL(blob);if(oldSrc)URL.revokeObjectURL(oldSrc)}}),"./node_modules/style-loader/lib/urls.js":
/*!***********************************************!*\
  !*** ./node_modules/style-loader/lib/urls.js ***!
  \***********************************************/
/*! no static exports found */
(function(module,exports){module.exports=function(css){var location=typeof window!=="undefined"&&window.location;if(!location){throw new Error("fixUrls requires window.location")}
if(!css||typeof css!=="string"){return css}
var baseUrl=location.protocol+"//"+location.host;var currentDir=baseUrl+location.pathname.replace(/\/[^\/]*$/,"/");var fixedCss=css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(fullMatch,origUrl){var unquotedOrigUrl=origUrl.trim().replace(/^"(.*)"$/,function(o,$1){return $1}).replace(/^'(.*)'$/,function(o,$1){return $1});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)){return fullMatch}
var newUrl;if(unquotedOrigUrl.indexOf("//")===0){newUrl=unquotedOrigUrl}else if(unquotedOrigUrl.indexOf("/")===0){newUrl=baseUrl+unquotedOrigUrl}else{newUrl=currentDir+unquotedOrigUrl.replace(/^\.\//,"")}
return"url("+JSON.stringify(newUrl)+")"});return fixedCss}})});/*!
 * dist/jquery.inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2023 Robin Herbots
 * Licensed under the MIT license
 * Version: 5.0.9-beta.24
 */
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],t);else{var i="object"==typeof exports?t(require("jquery")):t(e.jQuery);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={3046:function(e,t,i){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(7149),i(3194),i(9302),i(4013),i(3851),i(219),i(207),i(5296);var a=((n=i(2394))&&n.__esModule?n:{default:n}).default;t.default=a},3976:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(2839),a={_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:function(){},onincomplete:function(){},oncleared:function(){},repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:function(){},onBeforeMask:null,onBeforePaste:function(e,t){return"function"==typeof t.onBeforeMask?t.onBeforeMask.call(this,e,t):e},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:function(){},skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],ignorables:Object.keys(n.ignorables),isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}};t.default=a},7392:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={9:{validator:"[0-9\uff10-\uff19]",definitionSymbol:"*"},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",definitionSymbol:"*"},"*":{validator:"[0-9\uff10-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]"}}},3287:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=i(7957))&&n.__esModule?n:{default:n};if(void 0===a.default)throw "jQuery not loaded!";var r=a.default;t.default=r},9845:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.mobile=t.iphone=t.ie=void 0;var n,a=(n=i(9380))&&n.__esModule?n:{default:n};var r=a.default.navigator&&a.default.navigator.userAgent||"",o=r.indexOf("MSIE ")>0||r.indexOf("Trident/")>0,s=a.default.navigator&&a.default.navigator.userAgentData&&a.default.navigator.userAgentData.mobile||a.default.navigator&&a.default.navigator.maxTouchPoints||"ontouchstart" in a.default,l=/iphone/i.test(r);t.iphone=l,t.mobile=s,t.ie=o},7184:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(i,"\\$1")};var i=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(e,t,i){function n(e){return 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},n(e)}
Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandlers=void 0;var a,r=i(8711),o=i(2839),s=i(9845),l=i(7215),c=i(7760),u=i(4713),f=(a=i(9380))&&a.__esModule?a:{default:a};function p(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */p=function(){return e};var e={},t=Object.prototype,i=t.hasOwnProperty,a=Object.defineProperty||function(e,t,i){e[t]=i.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function c(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}
try{c({},"")}catch(e){c=function(e,t,i){return e[t]=i}}
function u(e,t,i,n){var r=t&&t.prototype instanceof h?t:h,o=Object.create(r.prototype),s=new M(n||[]);return a(o,"_invoke",{value:w(e,i,s)}),o}
function f(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}
e.wrap=u;var d={};function h(){}
function v(){}
function m(){}
var g={};c(g,o,(function(){return this}));var y=Object.getPrototypeOf,k=y&&y(y(E([])));k&&k!==t&&i.call(k,o)&&(g=k);var b=m.prototype=h.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}
function P(e,t){function r(a,o,s,l){var c=f(e[a],e,o);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==n(p)&&i.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(p).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,l)}))}
l(c.arg)}
var o;a(this,"_invoke",{value:function(e,i){function n(){return new t((function(t,n){r(e,i,t,n)}))}
return o=o?o.then(n,n):n()}})}
function w(e,t,i){var n="suspendedStart";return function(a,r){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw r;return j()}
for(i.method=a,i.arg=r;;){var o=i.delegate;if(o){var s=S(o,i);if(s){if(s===d)continue;return s}}
if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else "return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=f(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:i.done}}
"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}
function S(e,t){var i=t.method,n=e.iterator[i];if(void 0===n)return t.delegate=null,"throw"===i&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==i&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+i+"' method")),d;var a=f(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var r=a.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}
function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}
function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}
function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}
function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}
return{next:j}}
function j(){return{value:void 0,done:!0}}
return v.prototype=m,a(b,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:v,configurable:!0}),v.displayName=c(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},x(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,i,n,a,r){void 0===r&&(r=Promise);var o=new P(u(t,i,n,a),r);return e.isGeneratorFunction(i)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(b),c(b,l,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),i=[];for(var n in t)i.push(n);return i.reverse(),function e(){for(;i.length;){var n=i.pop();if(n in t)return e.value=n,e.done=!1,e}
return e.done=!0,e}},e.values=E,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0);},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(i,n){return o.type="throw",o.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}
for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a],o=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(s&&l){if(this.prev<r.catchLoc)return n(r.catchLoc,!0);if(this.prev<r.finallyLoc)return n(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return n(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return n(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var r=a;break}}
r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,d):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),_(i),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var a=n.arg;_(i)}
return a}}
throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:E(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),d}},e}
function d(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}
var r,o=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}
function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}
function v(e,t,i,n,a,r,o){try{var s=e[r](o),l=s.value}catch(e){return void i(e)}
s.done?t(l):Promise.resolve(l).then(n,a)}
var m,g,y={keyEvent:function(e,t,i,n,a){var f=this.inputmask,p=f.opts,d=f.dependencyLib,h=f.maskset,v=this,m=d(v),g=e.key,k=r.caret.call(f,v),b=p.onKeyDown.call(this,e,r.getBuffer.call(f),k,p);if(void 0!==b)return b;if(g===o.keys.Backspace||g===o.keys.Delete||s.iphone&&g===o.keys.BACKSPACE_SAFARI||e.ctrlKey&&g===o.keys.x&&!("oncut" in v))e.preventDefault(),l.handleRemove.call(f,v,g,k),(0,c.writeBuffer)(v,r.getBuffer.call(f,!0),h.p,e,v.inputmask._valueGet()!==r.getBuffer.call(f).join(""));else if(g===o.keys.End||g===o.keys.PageDown){e.preventDefault();var x=r.seekNext.call(f,r.getLastValidPosition.call(f));r.caret.call(f,v,e.shiftKey?k.begin:x,x,!0)}else g===o.keys.Home&&!e.shiftKey||g===o.keys.PageUp?(e.preventDefault(),r.caret.call(f,v,0,e.shiftKey?k.begin:0,!0)):p.undoOnEscape&&g===o.keys.Escape&&!0!==e.altKey?((0,c.checkVal)(v,!0,!1,f.undoValue.split("")),m.trigger("click")):g!==o.keys.Insert||e.shiftKey||e.ctrlKey||void 0!==f.userOptions.insertMode?!0===p.tabThrough&&g===o.keys.Tab?!0===e.shiftKey?(k.end=r.seekPrevious.call(f,k.end,!0),!0===u.getTest.call(f,k.end-1).match.static&&k.end--,k.begin=r.seekPrevious.call(f,k.end,!0),k.begin>=0&&k.end>0&&(e.preventDefault(),r.caret.call(f,v,k.begin,k.end))):(k.begin=r.seekNext.call(f,k.begin,!0),k.end=r.seekNext.call(f,k.begin,!0),k.end<h.maskLength&&k.end--,k.begin<=h.maskLength&&(e.preventDefault(),r.caret.call(f,v,k.begin,k.end))):e.shiftKey||p.insertModeVisual&&!1===p.insertMode&&(g===o.keys.ArrowRight?setTimeout((function(){var e=r.caret.call(f,v);r.caret.call(f,v,e.begin)}),0):g===o.keys.ArrowLeft&&setTimeout((function(){var e=r.translatePosition.call(f,v.inputmask.caretPos.begin);r.translatePosition.call(f,v.inputmask.caretPos.end);f.isRTL?r.caret.call(f,v,e+(e===h.maskLength?0:1)):r.caret.call(f,v,e-(0===e?0:1))}),0)):l.isSelection.call(f,k)?p.insertMode=!p.insertMode:(p.insertMode=!p.insertMode,r.caret.call(f,v,k.begin,k.begin));return f.isComposing=g==o.keys.Process||g==o.keys.Unidentified,f.ignorable=p.ignorables.includes(g),y.keypressEvent.call(this,e,t,i,n,a)},keypressEvent:function(e,t,i,n,a){var s=this.inputmask||this,u=s.opts,f=s.dependencyLib,p=s.maskset,d=s.el,h=f(d),v=e.key;if(!0===t||e.ctrlKey&&e.altKey||!(e.ctrlKey||e.metaKey||s.ignorable)){if(v){var m,g=t?{begin:a,end:a}:r.caret.call(s,d);v=u.substitutes[v]||v,p.writeOutBuffer=!0;var y=l.isValid.call(s,g,v,n,void 0,void 0,void 0,t);if(!1!==y&&(r.resetMaskSet.call(s,!0),m=void 0!==y.caret?y.caret:r.seekNext.call(s,y.pos.begin?y.pos.begin:y.pos),p.p=m),m=u.numericInput&&void 0===y.caret?r.seekPrevious.call(s,m):m,!1!==i&&(setTimeout((function(){u.onKeyValidation.call(d,v,y)}),0),p.writeOutBuffer&&!1!==y)){var k=r.getBuffer.call(s);(0,c.writeBuffer)(d,k,m,e,!0!==t)}
if(e.preventDefault(),t)return!1!==y&&(y.forwardPosition=m),y}}else v===o.keys.Enter&&s.undoValue!==s._valueGet(!0)&&(s.undoValue=s._valueGet(!0),setTimeout((function(){h.trigger("change")}),0))},pasteEvent:(m=p().mark((function e(t){var i,n,a,o,s,l;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=function(e,i,n,a,s){var l=r.caret.call(e,i,void 0,void 0,!0),u=n.substr(0,l.begin),f=n.substr(l.end,n.length);if(u==(e.isRTL?r.getBufferTemplate.call(e).slice().reverse():r.getBufferTemplate.call(e)).slice(0,l.begin).join("")&&(u=""),f==(e.isRTL?r.getBufferTemplate.call(e).slice().reverse():r.getBufferTemplate.call(e)).slice(l.end).join("")&&(f=""),a=u+a+f,e.isRTL&&!0!==o.numericInput){a=a.split("");var p,h=d(r.getBufferTemplate.call(e));try{for(h.s();!(p=h.n()).done;){var v=p.value;a[0]===v&&a.shift()}}catch(e){h.e(e)}finally{h.f()}
a=a.reverse().join("")}
var m=a;if("function"==typeof s){if(!1===(m=s.call(e,m,o)))return!1;m||(m=n)}(0,c.checkVal)(i,!0,!1,m.toString().split(""),t)},n=this,a=this.inputmask,o=a.opts,s=a._valueGet(!0),a.skipInputEvent=!0,t.clipboardData&&t.clipboardData.getData?l=t.clipboardData.getData("text/plain"):f.default.clipboardData&&f.default.clipboardData.getData&&(l=f.default.clipboardData.getData("Text")),i(a,n,s,l,o.onBeforePaste),t.preventDefault();case 7:case "end":return e.stop()}}),e,this)})),g=function(){var e=this,t=arguments;return new Promise((function(i,n){var a=m.apply(e,t);function r(e){v(a,i,n,r,o,"next",e)}
function o(e){v(a,i,n,r,o,"throw",e)}
r(void 0)}))},function(e){return g.apply(this,arguments)}),inputFallBackEvent:function(e){var t=this.inputmask,i=t.opts,n=t.dependencyLib;var a,l=this,f=l.inputmask._valueGet(!0),p=(t.isRTL?r.getBuffer.call(t).slice().reverse():r.getBuffer.call(t)).join(""),d=r.caret.call(t,l,void 0,void 0,!0);if(p!==f){if(a=function(e,n,a){for(var o,s,l,c=e.substr(0,a.begin).split(""),f=e.substr(a.begin).split(""),p=n.substr(0,a.begin).split(""),d=n.substr(a.begin).split(""),h=c.length>=p.length?c.length:p.length,v=f.length>=d.length?f.length:d.length,m="",g=[],y="~";c.length<h;)c.push(y);for(;p.length<h;)p.push(y);for(;f.length<v;)f.unshift(y);for(;d.length<v;)d.unshift(y);var k=c.concat(f),b=p.concat(d);for(s=0,o=k.length;s<o;s++)switch(l=u.getPlaceholder.call(t,r.translatePosition.call(t,s)),m){case "insertText":b[s-1]===k[s]&&a.begin==k.length-1&&g.push(k[s]),s=o;break;case "insertReplacementText":case "deleteContentBackward":k[s]===y?a.end++:s=o;break;default:k[s]!==b[s]&&(k[s+1]!==y&&k[s+1]!==l&&void 0!==k[s+1]||(b[s]!==l||b[s+1]!==y)&&b[s]!==y?b[s+1]===y&&b[s]===k[s+1]?(m="insertText",g.push(k[s]),a.begin--,a.end--):k[s]!==l&&k[s]!==y&&(k[s+1]===y||b[s]!==k[s]&&b[s+1]===k[s+1])?(m="insertReplacementText",g.push(k[s]),a.begin--):k[s]===y?(m="deleteContentBackward",(r.isMask.call(t,r.translatePosition.call(t,s),!0)||b[s]===i.radixPoint)&&a.end++):s=o:(m="insertText",g.push(k[s]),a.begin--,a.end--))}
return{action:m,data:g,caret:a}}(f,p,d),(l.inputmask.shadowRoot||l.ownerDocument).activeElement!==l&&l.focus(),(0,c.writeBuffer)(l,r.getBuffer.call(t)),r.caret.call(t,l,d.begin,d.end,!0),!s.mobile&&t.skipNextInsert&&"insertText"===e.inputType&&"insertText"===a.action&&t.isComposing)return!1;switch("insertCompositionText"===e.inputType&&"insertText"===a.action&&t.isComposing?t.skipNextInsert=!0:t.skipNextInsert=!1,a.action){case "insertText":case "insertReplacementText":a.data.forEach((function(e,i){var a=new n.Event("keypress");a.key=e,t.ignorable=!1,y.keypressEvent.call(l,a)})),setTimeout((function(){t.$el.trigger("keyup")}),0);break;case "deleteContentBackward":var h=new n.Event("keydown");h.key=o.keys.Backspace,y.keyEvent.call(l,h);break;default:(0,c.applyInputValue)(l,f),r.caret.call(t,l,d.begin,d.end,!0)}
e.preventDefault()}},setValueEvent:function(e){var t=this.inputmask,i=this,n=e&&e.detail?e.detail[0]:arguments[1];void 0===n&&(n=i.inputmask._valueGet(!0)),(0,c.applyInputValue)(i,n),(e.detail&&void 0!==e.detail[1]||void 0!==arguments[2])&&r.caret.call(t,i,e.detail?e.detail[1]:arguments[2])},focusEvent:function(e){var t=this.inputmask,i=t.opts,n=t&&t._valueGet();i.showMaskOnFocus&&n!==r.getBuffer.call(t).join("")&&(0,c.writeBuffer)(this,r.getBuffer.call(t),r.seekNext.call(t,r.getLastValidPosition.call(t))),!0!==i.positionCaretOnTab||!1!==t.mouseEnter||l.isComplete.call(t,r.getBuffer.call(t))&&-1!==r.getLastValidPosition.call(t)||y.clickEvent.apply(this,[e,!0]),t.undoValue=t&&t._valueGet(!0)},invalidEvent:function(e){this.inputmask.validationEvent=!0},mouseleaveEvent:function(){var e=this.inputmask,t=e.opts,i=this;e.mouseEnter=!1,t.clearMaskOnLostFocus&&(i.inputmask.shadowRoot||i.ownerDocument).activeElement!==i&&(0,c.HandleNativePlaceholder)(i,e.originalPlaceholder)},clickEvent:function(e,t){var i=this.inputmask;i.clicked++;var n=this;if((n.inputmask.shadowRoot||n.ownerDocument).activeElement===n){var a=r.determineNewCaretPosition.call(i,r.caret.call(i,n),t);void 0!==a&&r.caret.call(i,n,a)}},cutEvent:function(e){var t=this.inputmask,i=t.maskset,n=this,a=r.caret.call(t,n),s=t.isRTL?r.getBuffer.call(t).slice(a.end,a.begin):r.getBuffer.call(t).slice(a.begin,a.end),u=t.isRTL?s.reverse().join(""):s.join("");f.default.navigator&&f.default.navigator.clipboard?f.default.navigator.clipboard.writeText(u):f.default.clipboardData&&f.default.clipboardData.getData&&f.default.clipboardData.setData("Text",u),l.handleRemove.call(t,n,o.keys.Delete,a),(0,c.writeBuffer)(n,r.getBuffer.call(t),i.p,e,t.undoValue!==t._valueGet(!0))},blurEvent:function(e){var t=this.inputmask,i=t.opts,n=t.dependencyLib;t.clicked=0;var a=n(this),o=this;if(o.inputmask){(0,c.HandleNativePlaceholder)(o,t.originalPlaceholder);var s=o.inputmask._valueGet(),u=r.getBuffer.call(t).slice();""!==s&&(i.clearMaskOnLostFocus&&(-1===r.getLastValidPosition.call(t)&&s===r.getBufferTemplate.call(t).join("")?u=[]:c.clearOptionalTail.call(t,u)),!1===l.isComplete.call(t,u)&&(setTimeout((function(){a.trigger("incomplete")}),0),i.clearIncomplete&&(r.resetMaskSet.call(t,!1),u=i.clearMaskOnLostFocus?[]:r.getBufferTemplate.call(t).slice())),(0,c.writeBuffer)(o,u,void 0,e)),s=t._valueGet(!0),t.undoValue!==s&&(""!=s||t.undoValue!=r.getBufferTemplate.call(t).join("")||t.undoValue==r.getBufferTemplate.call(t).join("")&&t.maskset.validPositions.length>0)&&(t.undoValue=s,a.trigger("change"))}},mouseenterEvent:function(){var e=this.inputmask,t=e.opts.showMaskOnHover,i=this;if(e.mouseEnter=!0,(i.inputmask.shadowRoot||i.ownerDocument).activeElement!==i){var n=(e.isRTL?r.getBufferTemplate.call(e).slice().reverse():r.getBufferTemplate.call(e)).join("");t&&(0,c.HandleNativePlaceholder)(i,n)}},submitEvent:function(){var e=this.inputmask,t=e.opts;e.undoValue!==e._valueGet(!0)&&e.$el.trigger("change"),-1===r.getLastValidPosition.call(e)&&e._valueGet&&e._valueGet()===r.getBufferTemplate.call(e).join("")&&e._valueSet(""),t.clearIncomplete&&!1===l.isComplete.call(e,r.getBuffer.call(e))&&e._valueSet(""),t.removeMaskOnSubmit&&(e._valueSet(e.unmaskedvalue(),!0),setTimeout((function(){(0,c.writeBuffer)(e.el,r.getBuffer.call(e))}),0))},resetEvent:function(){var e=this.inputmask;e.refreshValue=!0,setTimeout((function(){(0,c.applyInputValue)(e.el,e._valueGet(!0))}),0)}};t.EventHandlers=y},9716:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.EventRuler=void 0;var n,a=(n=i(2394))&&n.__esModule?n:{default:n},r=i(2839),o=i(8711),s=i(7760);var l={on:function(e,t,i){var n=e.inputmask.dependencyLib,l=function(t){t.originalEvent&&(t=t.originalEvent||t,arguments[0]=t);var l,c=this,u=c.inputmask,f=u?u.opts:void 0;if(void 0===u&&"FORM"!==this.nodeName){var p=n.data(c,"_inputmask_opts");n(c).off(),p&&new a.default(p).mask(c)}else{if(["submit","reset","setvalue"].includes(t.type)||"FORM"===this.nodeName||!(c.disabled||c.readOnly&&!("keydown"===t.type&&t.ctrlKey&&t.key===r.keys.c||!1===f.tabThrough&&t.key===r.keys.Tab))){switch(t.type){case "input":if(!0===u.skipInputEvent)return u.skipInputEvent=!1,t.preventDefault();break;case "click":case "focus":return u.validationEvent?(u.validationEvent=!1,e.blur(),(0,s.HandleNativePlaceholder)(e,(u.isRTL?o.getBufferTemplate.call(u).slice().reverse():o.getBufferTemplate.call(u)).join("")),setTimeout((function(){e.focus()}),f.validationEventTimeOut),!1):(l=arguments,void setTimeout((function(){e.inputmask&&i.apply(c,l)}),0))}
var d=i.apply(c,arguments);return!1===d&&(t.preventDefault(),t.stopPropagation()),d}
t.preventDefault()}};["submit","reset"].includes(t)?(l=l.bind(e),null!==e.form&&n(e.form).on(t,l)):n(e).on(t,l),e.inputmask.events[t]=e.inputmask.events[t]||[],e.inputmask.events[t].push(l)},off:function(e,t){if(e.inputmask&&e.inputmask.events){var i=e.inputmask.dependencyLib,n=e.inputmask.events;for(var a in t&&((n=[])[t]=e.inputmask.events[t]),n){for(var r=n[a];r.length>0;){var o=r.pop();["submit","reset"].includes(a)?null!==e.form&&i(e.form).off(a,o):i(e).off(a,o)}
delete e.inputmask.events[a]}}}};t.EventRuler=l},219:function(e,t,i){var n=p(i(2394)),a=i(2839),r=p(i(7184)),o=i(8711),s=i(4713);function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,a,r,o,s=[],l=!0,c=!1;try{if(r=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=r.call(i)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw a}}
return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}
function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}
function f(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value" in n&&(n.writable=!0),Object.defineProperty(e,(a=n.key,r=void 0,r=function(e,t){if("object"!==u(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}
return("string"===t?String:Number)(e)}(a,"string"),"symbol"===u(r)?r:String(r)),n)}
var a,r}
function p(e){return e&&e.__esModule?e:{default:e}}
var d=n.default.dependencyLib,h=function(){function e(t,i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mask=t,this.format=i,this.opts=n,this._date=new Date(1,0,1),this.initDateObject(t,this.opts)}
var t,i,n;return t=e,(i=[{key:"date",get:function(){return void 0===this._date&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts)),this._date}},{key:"initDateObject",value:function(e,t){var i;for(P(t).lastIndex=0;i=P(t).exec(this.format);){var n=new RegExp("\\d+$").exec(i[0]),a=n?i[0][0]+"x":i[0],r=void 0;if(void 0!==e){if(n){var o=P(t).lastIndex,s=E(i.index,t);P(t).lastIndex=o,r=e.slice(0,e.indexOf(s.nextMatch[0]))}else r=e.slice(0,g[a]&&g[a][4]||a.length);e=e.slice(r.length)}
Object.prototype.hasOwnProperty.call(g,a)&&this.setValue(this,r,a,g[a][2],g[a][1])}}},{key:"setValue",value:function(e,t,i,n,a){if(void 0!==t&&(e[n]="ampm"===n?t:t.replace(/[^0-9]/g,"0"),e["raw"+n]=t.replace(/\s/g,"_")),void 0!==a){var r=e[n];("day"===n&&29===parseInt(r)||"month"===n&&2===parseInt(r))&&(29!==parseInt(e.day)||2!==parseInt(e.month)||""!==e.year&&void 0!==e.year||e._date.setFullYear(2012,1,29)),"day"===n&&(m=!0,0===parseInt(r)&&(r=1)),"month"===n&&(m=!0),"year"===n&&(m=!0,r.length<4&&(r=O(r,4,!0))),""===r||isNaN(r)||a.call(e._date,r),"ampm"===n&&a.call(e._date,r)}}},{key:"reset",value:function(){this._date=new Date(1,0,1)}},{key:"reInit",value:function(){this._date=void 0,this.date}}])&&f(t.prototype,i),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),v=(new Date).getFullYear(),m=!1,g={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return O(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",function(e){var t=e?parseInt(e):0;return t>0&&t--,Date.prototype.setMonth.call(this,t)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(e){var t=e?parseInt(e):0;return t>0&&t--,Date.prototype.setMonth.call(this,t)},"month",function(){return O(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return O(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return O(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return O(Date.prototype.getHours.call(this),2)}],hx:[function(e){return"[0-9]{".concat(e,"}")},Date.prototype.setHours,"hours",function(e){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return O(Date.prototype.getHours.call(this),2)}],Hx:[function(e){return"[0-9]{".concat(e,"}")},Date.prototype.setHours,"hours",function(e){return function(){return O(Date.prototype.getHours.call(this),e)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return O(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return O(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return O(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return O(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",k,"ampm",b,1],tt:["[ap]m",k,"ampm",b,2],T:["[AP]",k,"ampm",b,1],TT:["[AP]M",k,"ampm",b,2],Z:[".*",void 0,"Z",function(){var e=this.toString().match(/\((.+)\)/)[1];e.includes(" ")&&(e=(e=e.replace("-"," ").toUpperCase()).split(" ").map((function(e){return l(e,1)[0]})).join(""));return e}],o:[""],S:[""]},y={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function k(e){var t=this.getHours();e.toLowerCase().includes("p")?this.setHours(t+12):e.toLowerCase().includes("a")&&t>=12&&this.setHours(t-12)}
function b(){var e=this.getHours();return(e=e||12)>=12?"PM":"AM"}
function x(e){var t=new RegExp("\\d+$").exec(e[0]);if(t&&void 0!==t[0]){var i=g[e[0][0]+"x"].slice("");return i[0]=i[0](t[0]),i[3]=i[3](t[0]),i}
if(g[e[0]])return g[e[0]]}
function P(e){if(!e.tokenizer){var t=[],i=[];for(var n in g)if(/\.*x$/.test(n)){var a=n[0]+"\\d+";-1===i.indexOf(a)&&i.push(a)}else-1===t.indexOf(n[0])&&t.push(n[0]);e.tokenizer="("+(i.length>0?i.join("|")+"|":"")+t.join("+|")+")+?|.",e.tokenizer=new RegExp(e.tokenizer,"g")}
return e.tokenizer}
function w(e,t,i){if(!m)return!0;if(void 0===e.rawday||!isFinite(e.rawday)&&new Date(e.date.getFullYear(),isFinite(e.rawmonth)?e.month:e.date.getMonth()+1,0).getDate()>=e.day||"29"==e.day&&(!isFinite(e.rawyear)||void 0===e.rawyear||""===e.rawyear)||new Date(e.date.getFullYear(),isFinite(e.rawmonth)?e.month:e.date.getMonth()+1,0).getDate()>=e.day)return t;if("29"==e.day){var n=E(t.pos,i);if("yyyy"===n.targetMatch[0]&&t.pos-n.targetMatchIndex==2)return t.remove=t.pos+1,t}else if("02"==e.month&&"30"==e.day&&void 0!==t.c)return e.day="03",e.date.setDate(3),e.date.setMonth(1),t.insert=[{pos:t.pos,c:"0"},{pos:t.pos+1,c:t.c}],t.caret=o.seekNext.call(this,t.pos+1),t;return!1}
function S(e,t,i,n){var a,o,s="";for(P(i).lastIndex=0;a=P(i).exec(e);){if(void 0===t)if(o=x(a))s+="("+o[0]+")";else switch(a[0]){case "[":s+="(";break;case "]":s+=")?";break;default:s+=(0,r.default)(a[0])}else if(o=x(a))if(!0!==n&&o[3])s+=o[3].call(t.date);else o[2]?s+=t["raw"+o[2]]:s+=a[0];else s+=a[0]}
return s}
function O(e,t,i){for(e=String(e),t=t||2;e.length<t;)e=i?e+"0":"0"+e;return e}
function _(e,t,i){return"string"==typeof e?new h(e,t,i):e&&"object"===u(e)&&Object.prototype.hasOwnProperty.call(e,"date")?e:void 0}
function M(e,t){return S(t.inputFormat,{date:e},t)}
function E(e,t){var i,n,a=0,r=0;for(P(t).lastIndex=0;n=P(t).exec(t.inputFormat);){var o=new RegExp("\\d+$").exec(n[0]);if((a+=r=o?parseInt(o[0]):n[0].length)>=e+1){i=n,n=P(t).exec(t.inputFormat);break}}
return{targetMatchIndex:a-r,nextMatch:n,targetMatch:i}}
n.default.extendAliases({datetime:{mask:function(e){return e.numericInput=!1,g.S=e.i18n.ordinalSuffix.join("|"),e.inputFormat=y[e.inputFormat]||e.inputFormat,e.displayFormat=y[e.displayFormat]||e.displayFormat||e.inputFormat,e.outputFormat=y[e.outputFormat]||e.outputFormat||e.inputFormat,e.placeholder=""!==e.placeholder?e.placeholder:e.inputFormat.replace(/[[\]]/,""),e.regex=S(e.inputFormat,void 0,e),e.min=_(e.min,e.inputFormat,e),e.max=_(e.max,e.inputFormat,e),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},preValidation:function(e,t,i,n,a,r,o,s){if(s)return!0;if(isNaN(i)&&e[t]!==i){var l=E(t,a);if(l.nextMatch&&l.nextMatch[0]===i&&l.targetMatch[0].length>1){var c=g[l.targetMatch[0]][0];if(new RegExp(c).test("0"+e[t-1]))return e[t]=e[t-1],e[t-1]="0",{fuzzy:!0,buffer:e,refreshFromBuffer:{start:t-1,end:t+1},pos:t+1}}}
return!0},postValidation:function(e,t,i,n,a,r,o,l){var c,u;if(o)return!0;if(!1===n&&(((c=E(t+1,a)).targetMatch&&c.targetMatchIndex===t&&c.targetMatch[0].length>1&&void 0!==g[c.targetMatch[0]]||(c=E(t+2,a)).targetMatch&&c.targetMatchIndex===t+1&&c.targetMatch[0].length>1&&void 0!==g[c.targetMatch[0]])&&(u=g[c.targetMatch[0]][0]),void 0!==u&&(void 0!==r.validPositions[t+1]&&new RegExp(u).test(i+"0")?(e[t]=i,e[t+1]="0",n={pos:t+2,caret:t}):new RegExp(u).test("0"+i)&&(e[t]="0",e[t+1]=i,n={pos:t+2})),!1===n))return n;if(n.fuzzy&&(e=n.buffer,t=n.pos),(c=E(t,a)).targetMatch&&c.targetMatch[0]&&void 0!==g[c.targetMatch[0]]){var f=g[c.targetMatch[0]];u=f[0];var p=e.slice(c.targetMatchIndex,c.targetMatchIndex+c.targetMatch[0].length);if(!1===new RegExp(u).test(p.join(""))&&2===c.targetMatch[0].length&&r.validPositions[c.targetMatchIndex]&&r.validPositions[c.targetMatchIndex+1]&&(r.validPositions[c.targetMatchIndex+1].input="0"),"year"==f[2])for(var d=s.getMaskTemplate.call(this,!1,1,void 0,!0),h=t+1;h<e.length;h++)e[h]=d[h],r.validPositions.splice(t+1,1);}
var m=n,y=_(e.join(""),a.inputFormat,a);return m&&!isNaN(y.date.getTime())&&(a.prefillYear&&(m=function(e,t,i){if(e.year!==e.rawyear){var n=v.toString(),a=e.rawyear.replace(/[^0-9]/g,""),r=n.slice(0,a.length),o=n.slice(a.length);if(2===a.length&&a===r){var s=new Date(v,e.month-1,e.day);e.day==s.getDate()&&(!i.max||i.max.date.getTime()>=s.getTime())&&(e.date.setFullYear(v),e.year=n,t.insert=[{pos:t.pos+1,c:o[0]},{pos:t.pos+2,c:o[1]}])}}
return t}(y,m,a)),m=function(e,t,i,n,a){if(!t)return t;if(t&&i.min&&!isNaN(i.min.date.getTime())){var r;for(e.reset(),P(i).lastIndex=0;r=P(i).exec(i.inputFormat);){var o;if((o=x(r))&&o[3]){for(var s=o[1],l=e[o[2]],c=i.min[o[2]],u=i.max?i.max[o[2]]:c,f=[],p=!1,d=0;d<c.length;d++)void 0!==n.validPositions[d+r.index]||p?(f[d]=l[d],p=p||l[d]>c[d]):(f[d]=c[d],"year"===o[2]&&l.length-1==d&&c!=u&&(f=(parseInt(f.join(""))+1).toString().split("")),"ampm"===o[2]&&c!=u&&i.min.date.getTime()>e.date.getTime()&&(f[d]=u[d]));s.call(e._date,f.join(""))}}
t=i.min.date.getTime()<=e.date.getTime(),e.reInit()}
return t&&i.max&&(isNaN(i.max.date.getTime())||(t=i.max.date.getTime()>=e.date.getTime())),t}(y,m=w.call(this,y,m,a),a,r)),void 0!==t&&m&&n.pos!==t?{buffer:S(a.inputFormat,y,a).split(""),refreshFromBuffer:{start:t,end:n.pos},pos:n.caret||n.pos}:m},onKeyDown:function(e,t,i,n){e.ctrlKey&&e.key===a.keys.ArrowRight&&(this.inputmask._valueSet(M(new Date,n)),d(this).trigger("setvalue"))},onUnMask:function(e,t,i){return t?S(i.outputFormat,_(e,i.inputFormat,i),i,!0):t},casing:function(e,t,i,n){return 0==t.nativeDef.indexOf("[ap]")?e.toLowerCase():0==t.nativeDef.indexOf("[AP]")?e.toUpperCase():e},onBeforeMask:function(e,t){return"[object Date]"===Object.prototype.toString.call(e)&&(e=M(e,t)),e},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},3851:function(e,t,i){var n,a=(n=i(2394))&&n.__esModule?n:{default:n},r=i(8711),o=i(4713);a.default.extendDefinitions({A:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",casing:"upper"},"&":{validator:"[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var s=new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");function l(e,t,i,n,a){return i-1>-1&&"."!==t.buffer[i-1]?(e=t.buffer[i-1]+e,e=i-2>-1&&"."!==t.buffer[i-2]?t.buffer[i-2]+e:"0"+e):e="00"+e,s.test(e)}
a.default.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:"i{1,3}.j{1,3}.k{1,3}.l{1,3}",definitions:{i:{validator:l},j:{validator:l},k:{validator:l},l:{validator:l}},onUnMask:function(e,t,i){return e},inputmode:"decimal",substitutes:{",":"."}},email:{mask:function(e){var t=e.separator,i=e.quantifier,n="*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",a=n;if(t)for(var r=0;r<i;r++)a+="[".concat(t).concat(n,"]");return a},greedy:!1,casing:"lower",separator:null,quantifier:5,skipOptionalPartCharacter:"",onBeforePaste:function(e,t){return(e=e.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(e,t,i){return e},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0},ssn:{mask:"999-99-9999",postValidation:function(e,t,i,n,a,s,l){var c=o.getMaskTemplate.call(this,!0,r.getLastValidPosition.call(this),!0,!0);return/^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(c.join(""))}}})},207:function(e,t,i){var n=s(i(2394)),a=s(i(7184)),r=i(8711),o=i(2839);function s(e){return e&&e.__esModule?e:{default:e}}
var l=n.default.dependencyLib;function c(e,t){for(var i="",a=0;a<e.length;a++)n.default.prototype.definitions[e.charAt(a)]||t.definitions[e.charAt(a)]||t.optionalmarker[0]===e.charAt(a)||t.optionalmarker[1]===e.charAt(a)||t.quantifiermarker[0]===e.charAt(a)||t.quantifiermarker[1]===e.charAt(a)||t.groupmarker[0]===e.charAt(a)||t.groupmarker[1]===e.charAt(a)||t.alternatormarker===e.charAt(a)?i+="\\"+e.charAt(a):i+=e.charAt(a);return i}
function u(e,t,i,n){if(e.length>0&&t>0&&(!i.digitsOptional||n)){var a=e.indexOf(i.radixPoint),r=!1;i.negationSymbol.back===e[e.length-1]&&(r=!0,e.length--),-1===a&&(e.push(i.radixPoint),a=e.length-1);for(var o=1;o<=t;o++)isFinite(e[a+o])||(e[a+o]="0");}
return r&&e.push(i.negationSymbol.back),e}
function f(e,t){var i=0;for(var n in "+"===e&&(i=r.seekNext.call(this,t.validPositions.length-1)),t.tests)if((n=parseInt(n))>=i)for(var a=0,o=t.tests[n].length;a<o;a++)if((void 0===t.validPositions[n]||"-"===e)&&t.tests[n][a].match.def===e)return n+(void 0!==t.validPositions[n]&&"-"!==e?1:0);return i}
function p(e,t){for(var i=-1,n=0,a=t.validPositions.length;n<a;n++){var r=t.validPositions[n];if(r&&r.match.def===e){i=n;break}}
return i}
function d(e,t,i,n,a){var r=t.buffer?t.buffer.indexOf(a.radixPoint):-1,o=(-1!==r||n&&a.jitMasking)&&new RegExp(a.definitions[9].validator).test(e);return a._radixDance&&-1!==r&&o&&null==t.validPositions[r]?{insert:{pos:r===i?r+1:r,c:a.radixPoint},pos:i}:o}
n.default.extendAliases({numeric:{mask:function(e){e.repeat=0,e.groupSeparator===e.radixPoint&&e.digits&&"0"!==e.digits&&("."===e.radixPoint?e.groupSeparator=",":","===e.radixPoint?e.groupSeparator=".":e.groupSeparator="")," "===e.groupSeparator&&(e.skipOptionalPartCharacter=void 0),e.placeholder.length>1&&(e.placeholder=e.placeholder.charAt(0)),"radixFocus"===e.positionCaretOnClick&&""===e.placeholder&&(e.positionCaretOnClick="lvp");var t="0",i=e.radixPoint;!0===e.numericInput&&void 0===e.__financeInput?(t="1",e.positionCaretOnClick="radixFocus"===e.positionCaretOnClick?"lvp":e.positionCaretOnClick,e.digitsOptional=!1,isNaN(e.digits)&&(e.digits=2),e._radixDance=!1,i=","===e.radixPoint?"?":"!",""!==e.radixPoint&&void 0===e.definitions[i]&&(e.definitions[i]={},e.definitions[i].validator="["+e.radixPoint+"]",e.definitions[i].placeholder=e.radixPoint,e.definitions[i].static=!0,e.definitions[i].generated=!0)):(e.__financeInput=!1,e.numericInput=!0);var n,r="[+]";if(r+=c(e.prefix,e),""!==e.groupSeparator?(void 0===e.definitions[e.groupSeparator]&&(e.definitions[e.groupSeparator]={},e.definitions[e.groupSeparator].validator="["+e.groupSeparator+"]",e.definitions[e.groupSeparator].placeholder=e.groupSeparator,e.definitions[e.groupSeparator].static=!0,e.definitions[e.groupSeparator].generated=!0),r+=e._mask(e)):r+="9{+}",void 0!==e.digits&&0!==e.digits){var o=e.digits.toString().split(",");isFinite(o[0])&&o[1]&&isFinite(o[1])?r+=i+t+"{"+e.digits+"}":(isNaN(e.digits)||parseInt(e.digits)>0)&&(e.digitsOptional||e.jitMasking?(n=r+i+t+"{0,"+e.digits+"}",e.keepStatic=!0):r+=i+t+"{"+e.digits+"}")}else e.inputmode="numeric";return r+=c(e.suffix,e),r+="[-]",n&&(r=[n+c(e.suffix,e)+"[-]",r]),e.greedy=!1,function(e){void 0===e.parseMinMaxOptions&&(null!==e.min&&(e.min=e.min.toString().replace(new RegExp((0,a.default)(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.min=e.min.replace(e.radixPoint,".")),e.min=isFinite(e.min)?parseFloat(e.min):NaN,isNaN(e.min)&&(e.min=Number.MIN_VALUE)),null!==e.max&&(e.max=e.max.toString().replace(new RegExp((0,a.default)(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.max=e.max.replace(e.radixPoint,".")),e.max=isFinite(e.max)?parseFloat(e.max):NaN,isNaN(e.max)&&(e.max=Number.MAX_VALUE)),e.parseMinMaxOptions="done")}(e),""!==e.radixPoint&&e.substituteRadixPoint&&(e.substitutes["."==e.radixPoint?",":"."]=e.radixPoint),r},_mask:function(e){return"("+e.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"decimal",shortcuts:{k:"1000",m:"1000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:d},1:{validator:d,definitionSymbol:"9"},9:{validator:"[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]",definitionSymbol:"*"},"+":{validator:function(e,t,i,n,a){return a.allowMinus&&("-"===e||e===a.negationSymbol.front)}},"-":{validator:function(e,t,i,n,a){return a.allowMinus&&e===a.negationSymbol.back}}},preValidation:function(e,t,i,n,a,r,o,s){var l=this;if(!1!==a.__financeInput&&i===a.radixPoint)return!1;var c=e.indexOf(a.radixPoint),u=t;if(t=function(e,t,i,n,a){return a._radixDance&&a.numericInput&&t!==a.negationSymbol.back&&e<=i&&(i>0||t==a.radixPoint)&&(void 0===n.validPositions[e-1]||n.validPositions[e-1].input!==a.negationSymbol.back)&&(e-=1),e}(t,i,c,r,a),"-"===i||i===a.negationSymbol.front){if(!0!==a.allowMinus)return!1;var d=!1,h=p("+",r),v=p("-",r);return-1!==h&&(d=[h,v]),!1!==d?{remove:d,caret:u-a.negationSymbol.back.length}:{insert:[{pos:f.call(l,"+",r),c:a.negationSymbol.front,fromIsValid:!0},{pos:f.call(l,"-",r),c:a.negationSymbol.back,fromIsValid:void 0}],caret:u+a.negationSymbol.back.length}}
if(i===a.groupSeparator)return{caret:u};if(s)return!0;if(-1!==c&&!0===a._radixDance&&!1===n&&i===a.radixPoint&&void 0!==a.digits&&(isNaN(a.digits)||parseInt(a.digits)>0)&&c!==t){var m=f.call(l,a.radixPoint,r);return r.validPositions[m]&&(r.validPositions[m].generatedInput=r.validPositions[m].generated||!1),{caret:a._radixDance&&t===c-1?c+1:c}}
if(!1===a.__financeInput)if(n){if(a.digitsOptional)return{rewritePosition:o.end};if(!a.digitsOptional){if(o.begin>c&&o.end<=c)return i===a.radixPoint?{insert:{pos:c+1,c:"0",fromIsValid:!0},rewritePosition:c}:{rewritePosition:c+1};if(o.begin<c)return{rewritePosition:o.begin-1}}}else if(!a.showMaskOnHover&&!a.showMaskOnFocus&&!a.digitsOptional&&a.digits>0&&""===this.__valueGet.call(this.el))return{rewritePosition:c};return{rewritePosition:t}},postValidation:function(e,t,i,n,a,r,o){if(!1===n)return n;if(o)return!0;if(null!==a.min||null!==a.max){var s=a.onUnMask(e.slice().reverse().join(""),void 0,l.extend({},a,{unmaskAsNumber:!0}));if(null!==a.min&&s<a.min&&(s.toString().length>a.min.toString().length||s<0))return!1;if(null!==a.max&&s>a.max)return!!a.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:u(a.max.toString().replace(".",a.radixPoint).split(""),a.digits,a).reverse()}}
return n},onUnMask:function(e,t,i){if(""===t&&!0===i.nullable)return t;var n=e.replace(i.prefix,"");return n=(n=n.replace(i.suffix,"")).replace(new RegExp((0,a.default)(i.groupSeparator),"g"),""),""!==i.placeholder.charAt(0)&&(n=n.replace(new RegExp(i.placeholder.charAt(0),"g"),"0")),i.unmaskAsNumber?(""!==i.radixPoint&&-1!==n.indexOf(i.radixPoint)&&(n=n.replace(a.default.call(this,i.radixPoint),".")),n=(n=n.replace(new RegExp("^"+(0,a.default)(i.negationSymbol.front)),"-")).replace(new RegExp((0,a.default)(i.negationSymbol.back)+"$"),""),Number(n)):n},isComplete:function(e,t){var i=(t.numericInput?e.slice().reverse():e).join("");return i=(i=(i=(i=(i=i.replace(new RegExp("^"+(0,a.default)(t.negationSymbol.front)),"-")).replace(new RegExp((0,a.default)(t.negationSymbol.back)+"$"),"")).replace(t.prefix,"")).replace(t.suffix,"")).replace(new RegExp((0,a.default)(t.groupSeparator)+"([0-9]{3})","g"),"$1"),","===t.radixPoint&&(i=i.replace((0,a.default)(t.radixPoint),".")),isFinite(i)},onBeforeMask:function(e,t){var i=t.radixPoint||",";isFinite(t.digits)&&(t.digits=parseInt(t.digits)),"number"!=typeof e&&"number"!==t.inputType||""===i||(e=e.toString().replace(".",i));var n="-"===e.charAt(0)||e.charAt(0)===t.negationSymbol.front,r=e.split(i),o=r[0].replace(/[^\-0-9]/g,""),s=r.length>1?r[1].replace(/[^0-9]/g,""):"",l=r.length>1;e=o+(""!==s?i+s:s);var c=0;if(""!==i&&(c=t.digitsOptional?t.digits<s.length?t.digits:s.length:t.digits,""!==s||!t.digitsOptional)){var f=Math.pow(10,c||1);e=e.replace((0,a.default)(i),"."),isNaN(parseFloat(e))||(e=(t.roundingFN(parseFloat(e)*f)/f).toFixed(c)),e=e.toString().replace(".",i)}
if(0===t.digits&&-1!==e.indexOf(i)&&(e=e.substring(0,e.indexOf(i))),null!==t.min||null!==t.max){var p=e.toString().replace(i,".");null!==t.min&&p<t.min?e=t.min.toString().replace(".",i):null!==t.max&&p>t.max&&(e=t.max.toString().replace(".",i))}
return n&&"-"!==e.charAt(0)&&(e="-"+e),u(e.toString().split(""),c,t,l).join("")},onBeforeWrite:function(e,t,i,n){function r(e,t){if(!1!==n.__financeInput||t){var i=e.indexOf(n.radixPoint);-1!==i&&e.splice(i,1)}
if(""!==n.groupSeparator)for(;-1!==(i=e.indexOf(n.groupSeparator));)e.splice(i,1);return e}
var o,s;if(n.stripLeadingZeroes&&(s=function(e,t){var i=new RegExp("(^"+(""!==t.negationSymbol.front?(0,a.default)(t.negationSymbol.front)+"?":"")+(0,a.default)(t.prefix)+")(.*)("+(0,a.default)(t.suffix)+(""!=t.negationSymbol.back?(0,a.default)(t.negationSymbol.back)+"?":"")+"$)").exec(e.slice().reverse().join("")),n=i?i[2]:"",r=!1;return n&&(n=n.split(t.radixPoint.charAt(0))[0],r=new RegExp("^[0"+t.groupSeparator+"]*").exec(n)),!(!r||!(r[0].length>1||r[0].length>0&&r[0].length<n.length))&&r}(t,n)))for(var c=t.join("").lastIndexOf(s[0].split("").reverse().join(""))-(s[0]==s.input?0:1),f=s[0]==s.input?1:0,p=s[0].length-f;p>0;p--)this.maskset.validPositions.splice(c+p,1),delete t[c+p];if(e)switch(e.type){case "blur":case "checkval":if(null!==n.min){var d=n.onUnMask(t.slice().reverse().join(""),void 0,l.extend({},n,{unmaskAsNumber:!0}));if(null!==n.min&&d<n.min)return{refreshFromBuffer:!0,buffer:u(n.min.toString().replace(".",n.radixPoint).split(""),n.digits,n).reverse()}}
if(t[t.length-1]===n.negationSymbol.front){var h=new RegExp("(^"+(""!=n.negationSymbol.front?(0,a.default)(n.negationSymbol.front)+"?":"")+(0,a.default)(n.prefix)+")(.*)("+(0,a.default)(n.suffix)+(""!=n.negationSymbol.back?(0,a.default)(n.negationSymbol.back)+"?":"")+"$)").exec(r(t.slice(),!0).reverse().join(""));0==(h?h[2]:"")&&(o={refreshFromBuffer:!0,buffer:[0]})}else if(""!==n.radixPoint){t.indexOf(n.radixPoint)===n.suffix.length&&(o&&o.buffer?o.buffer.splice(0,1+n.suffix.length):(t.splice(0,1+n.suffix.length),o={refreshFromBuffer:!0,buffer:r(t)}))}
if(n.enforceDigitsOnBlur){var v=(o=o||{})&&o.buffer||t.slice().reverse();o.refreshFromBuffer=!0,o.buffer=u(v,n.digits,n,!0).reverse()}}
return o},onKeyDown:function(e,t,i,n){var a,r=l(this);if(3!=e.location){var s,c=e.key;if((s=n.shortcuts&&n.shortcuts[c])&&s.length>1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(s)),r.trigger("setvalue"),!1}
if(e.ctrlKey)switch(e.key){case o.keys.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(n.step)),r.trigger("setvalue"),!1;case o.keys.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(n.step)),r.trigger("setvalue"),!1}
if(!e.shiftKey&&(e.key===o.keys.Delete||e.key===o.keys.Backspace||e.key===o.keys.BACKSPACE_SAFARI)&&i.begin!==t.length){if(t[e.key===o.keys.Delete?i.begin-1:i.end]===n.negationSymbol.front)return a=t.slice().reverse(),""!==n.negationSymbol.front&&a.shift(),""!==n.negationSymbol.back&&a.pop(),r.trigger("setvalue",[a.join(""),i.begin]),!1;if(!0===n._radixDance){var f=t.indexOf(n.radixPoint);if(n.digitsOptional){if(0===f)return(a=t.slice().reverse()).pop(),r.trigger("setvalue",[a.join(""),i.begin>=a.length?a.length:i.begin]),!1}else if(-1!==f&&(i.begin<f||i.end<f||e.key===o.keys.Delete&&(i.begin===f||i.begin-1===f))){var p=void 0;return i.begin===i.end&&(e.key===o.keys.Backspace||e.key===o.keys.BACKSPACE_SAFARI?i.begin++:e.key===o.keys.Delete&&i.begin-1===f&&(p=l.extend({},i),i.begin--,i.end--)),(a=t.slice().reverse()).splice(a.length-i.begin,i.begin-i.end+1),a=u(a,n.digits,n).join(""),p&&(i=p),r.trigger("setvalue",[a,i.begin>=a.length?f+1:i.begin]),!1}}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",inputmode:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(e){return"("+e.groupSeparator+"99){*|1}("+e.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}})},9380:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=!("undefined"==typeof window||!window.document||!window.document.createElement)?window:{};t.default=i},7760:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HandleNativePlaceholder=function(e,t){var i=e?e.inputmask:this;if(s.ie){if(e.inputmask._valueGet()!==t&&(e.placeholder!==t||""===e.placeholder)){var n=r.getBuffer.call(i).slice(),a=e.inputmask._valueGet();if(a!==t){var o=r.getLastValidPosition.call(i);-1===o&&a===r.getBufferTemplate.call(i).join("")?n=[]:-1!==o&&u.call(i,n),p(e,n)}}}else e.placeholder!==t&&(e.placeholder=t,""===e.placeholder&&e.removeAttribute("placeholder"))},t.applyInputValue=c,t.checkVal=f,t.clearOptionalTail=u,t.unmaskedvalue=function(e){var t=e?e.inputmask:this,i=t.opts,n=t.maskset;if(e){if(void 0===e.inputmask)return e.value;e.inputmask&&e.inputmask.refreshValue&&c(e,e.inputmask._valueGet(!0))}
for(var a=[],o=n.validPositions,s=0,l=o.length;s<l;s++)o[s]&&o[s].match&&(1!=o[s].match.static||Array.isArray(n.metadata)&&!0!==o[s].generatedInput)&&a.push(o[s].input);var u=0===a.length?"":(t.isRTL?a.reverse():a).join("");if("function"==typeof i.onUnMask){var f=(t.isRTL?r.getBuffer.call(t).slice().reverse():r.getBuffer.call(t)).join("");u=i.onUnMask.call(t,f,u,i)}
return u},t.writeBuffer=p;var n=i(2839),a=i(4713),r=i(8711),o=i(7215),s=i(9845),l=i(6030);function c(e,t){var i=e?e.inputmask:this,n=i.opts;e.inputmask.refreshValue=!1,"function"==typeof n.onBeforeMask&&(t=n.onBeforeMask.call(i,t,n)||t),f(e,!0,!1,t=(t||"").toString().split("")),i.undoValue=i._valueGet(!0),(n.clearMaskOnLostFocus||n.clearIncomplete)&&e.inputmask._valueGet()===r.getBufferTemplate.call(i).join("")&&-1===r.getLastValidPosition.call(i)&&e.inputmask._valueSet("")}
function u(e){e.length=0;for(var t,i=a.getMaskTemplate.call(this,!0,0,!0,void 0,!0);void 0!==(t=i.shift());)e.push(t);return e}
function f(e,t,i,n,s){var c=e?e.inputmask:this,u=c.maskset,f=c.opts,d=c.dependencyLib,h=n.slice(),v="",m=-1,g=void 0,y=f.skipOptionalPartCharacter;f.skipOptionalPartCharacter="",r.resetMaskSet.call(c,!1),c.clicked=0,m=f.radixPoint?r.determineNewCaretPosition.call(c,{begin:0,end:0},!1,!1===f.__financeInput?"radixFocus":void 0).begin:0,u.p=m,c.caretPos={begin:m};var k=[],b=c.caretPos;if(h.forEach((function(e,t){if(void 0!==e){var n=new d.Event("_checkval");n.key=e,v+=e;var o=r.getLastValidPosition.call(c,void 0,!0);!function(e,t){for(var i=a.getMaskTemplate.call(c,!0,0).slice(e,r.seekNext.call(c,e,!1,!1)).join("").replace(/'/g,""),n=i.indexOf(t);n>0&&" "===i[n-1];)n--;var o=0===n&&!r.isMask.call(c,e)&&(a.getTest.call(c,e).match.nativeDef===t.charAt(0)||!0===a.getTest.call(c,e).match.static&&a.getTest.call(c,e).match.nativeDef==="'"+t.charAt(0)||" "===a.getTest.call(c,e).match.nativeDef&&(a.getTest.call(c,e+1).match.nativeDef===t.charAt(0)||!0===a.getTest.call(c,e+1).match.static&&a.getTest.call(c,e+1).match.nativeDef==="'"+t.charAt(0)));if(!o&&n>0&&!r.isMask.call(c,e,!1,!0)){var s=r.seekNext.call(c,e);c.caretPos.begin<s&&(c.caretPos={begin:s})}
return o}(m,v)?(g=l.EventHandlers.keypressEvent.call(c,n,!0,!1,i,c.caretPos.begin))&&(m=c.caretPos.begin+1,v=""):g=l.EventHandlers.keypressEvent.call(c,n,!0,!1,i,o+1),g?(void 0!==g.pos&&u.validPositions[g.pos]&&!0===u.validPositions[g.pos].match.static&&void 0===u.validPositions[g.pos].alternation&&(k.push(g.pos),c.isRTL||(g.forwardPosition=g.pos+1)),p.call(c,void 0,r.getBuffer.call(c),g.forwardPosition,n,!1),c.caretPos={begin:g.forwardPosition,end:g.forwardPosition},b=c.caretPos):void 0===u.validPositions[t]&&h[t]===a.getPlaceholder.call(c,t)&&r.isMask.call(c,t,!0)?c.caretPos.begin++:c.caretPos=b}})),k.length>0){var x,P,w=r.seekNext.call(c,-1,void 0,!1);if(!o.isComplete.call(c,r.getBuffer.call(c))&&k.length<=w||o.isComplete.call(c,r.getBuffer.call(c))&&k.length>0&&k.length!==w&&0===k[0])for(var S=w;void 0!==(x=k.shift());){var O=new d.Event("_checkval");if((P=u.validPositions[x]).generatedInput=!0,O.key=P.input,(g=l.EventHandlers.keypressEvent.call(c,O,!0,!1,i,S))&&void 0!==g.pos&&g.pos!==x&&u.validPositions[g.pos]&&!0===u.validPositions[g.pos].match.static)k.push(g.pos);else if(!g)break;S++}}
t&&p.call(c,e,r.getBuffer.call(c),g?g.forwardPosition:c.caretPos.begin,s||new d.Event("checkval"),s&&("input"===s.type&&c.undoValue!==r.getBuffer.call(c).join("")||"paste"===s.type)),f.skipOptionalPartCharacter=y}
function p(e,t,i,a,s){var l=e?e.inputmask:this,c=l.opts,u=l.dependencyLib;if(a&&"function"==typeof c.onBeforeWrite){var f=c.onBeforeWrite.call(l,a,t,i,c);if(f){if(f.refreshFromBuffer){var p=f.refreshFromBuffer;o.refreshFromBuffer.call(l,!0===p?p:p.start,p.end,f.buffer||t),t=r.getBuffer.call(l,!0)}
void 0!==i&&(i=void 0!==f.caret?f.caret:i)}}
if(void 0!==e&&(e.inputmask._valueSet(t.join("")),void 0===i||void 0!==a&&"blur"===a.type||r.caret.call(l,e,i,void 0,void 0,void 0!==a&&"keydown"===a.type&&(a.key===n.keys.Delete||a.key===n.keys.Backspace)),!0===s)){var d=u(e),h=e.inputmask._valueGet();e.inputmask.skipInputEvent=!0,d.trigger("input"),setTimeout((function(){h===r.getBufferTemplate.call(l).join("")?d.trigger("cleared"):!0===o.isComplete.call(l,t)&&d.trigger("complete")}),0)}}},2394:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(157),a=v(i(3287)),r=v(i(9380)),o=i(2391),s=i(4713),l=i(8711),c=i(7215),u=i(7760),f=i(9716),p=v(i(7392)),d=v(i(3976));function h(e){return h="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},h(e)}
function v(e){return e&&e.__esModule?e:{default:e}}
var m=r.default.document,g="_inputmask_opts";function y(e,t,i){if(!(this instanceof y))return new y(e,t,i);this.dependencyLib=a.default,this.el=void 0,this.events={},this.maskset=void 0,!0!==i&&("[object Object]"===Object.prototype.toString.call(e)?t=e:(t=t||{},e&&(t.alias=e)),this.opts=a.default.extend(!0,{},this.defaults,t),this.noMasksCache=t&&void 0!==t.definitions,this.userOptions=t||{},k(this.opts.alias,t,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.hasAlternator=!1}
function k(e,t,i){var n=y.prototype.aliases[e];return n?(n.alias&&k(n.alias,void 0,i),a.default.extend(!0,i,n),a.default.extend(!0,i,t),!0):(null===i.mask&&(i.mask=e),!1)}
y.prototype={dataAttribute:"data-inputmask",defaults:d.default,definitions:p.default,aliases:{},masksCache:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(e){var t=this;return"string"==typeof e&&(e=m.getElementById(e)||m.querySelectorAll(e)),(e=e.nodeName?[e]:Array.isArray(e)?e:[].slice.call(e)).forEach((function(e,i){var s=a.default.extend(!0,{},t.opts);if(function(e,t,i,n){function o(t,a){var o=""===n?t:n+"-"+t;null!==(a=void 0!==a?a:e.getAttribute(o))&&("string"==typeof a&&(0===t.indexOf("on")?a=r.default[a]:"false"===a?a=!1:"true"===a&&(a=!0)),i[t]=a)}
if(!0===t.importDataAttributes){var s,l,c,u,f=e.getAttribute(n);if(f&&""!==f&&(f=f.replace(/'/g,'"'),l=JSON.parse("{"+f+"}")),l)for(u in c=void 0,l)if("alias"===u.toLowerCase()){c=l[u];break}
for(s in o("alias",c),i.alias&&k(i.alias,i,t),t){if(l)for(u in c=void 0,l)if(u.toLowerCase()===s.toLowerCase()){c=l[u];break}
o(s,c)}}
a.default.extend(!0,t,i),("rtl"===e.dir||t.rightAlign)&&(e.style.textAlign="right");("rtl"===e.dir||t.numericInput)&&(e.dir="ltr",e.removeAttribute("dir"),t.isRTL=!0);return Object.keys(i).length}(e,s,a.default.extend(!0,{},t.userOptions),t.dataAttribute)){var l=(0,o.generateMaskSet)(s,t.noMasksCache);void 0!==l&&(void 0!==e.inputmask&&(e.inputmask.opts.autoUnmask=!0,e.inputmask.remove()),e.inputmask=new y(void 0,void 0,!0),e.inputmask.opts=s,e.inputmask.noMasksCache=t.noMasksCache,e.inputmask.userOptions=a.default.extend(!0,{},t.userOptions),e.inputmask.el=e,e.inputmask.$el=(0,a.default)(e),e.inputmask.maskset=l,a.default.data(e,g,t.userOptions),n.mask.call(e.inputmask))}})),e&&e[0]&&e[0].inputmask||this},option:function(e,t){return"string"==typeof e?this.opts[e]:"object"===h(e)?(a.default.extend(this.userOptions,e),this.el&&!0!==t&&this.mask(this.el),this):void 0},unmaskedvalue:function(e){if(this.maskset=this.maskset||(0,o.generateMaskSet)(this.opts,this.noMasksCache),void 0===this.el||void 0!==e){var t=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,e,this.opts)||e).split("");u.checkVal.call(this,void 0,!1,!1,t),"function"==typeof this.opts.onBeforeWrite&&this.opts.onBeforeWrite.call(this,void 0,l.getBuffer.call(this),0,this.opts)}
return u.unmaskedvalue.call(this,this.el)},remove:function(){if(this.el){a.default.data(this.el,g,null);var e=this.opts.autoUnmask?(0,u.unmaskedvalue)(this.el):this._valueGet(this.opts.autoUnmask);e!==l.getBufferTemplate.call(this).join("")?this._valueSet(e,this.opts.autoUnmask):this._valueSet(""),f.EventRuler.off(this.el),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),"value")&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0}):m.__lookupGetter__&&this.el.__lookupGetter__("value")&&this.__valueGet&&(this.el.__defineGetter__("value",this.__valueGet),this.el.__defineSetter__("value",this.__valueSet)),this.el.inputmask=void 0}
return this.el},getemptymask:function(){return this.maskset=this.maskset||(0,o.generateMaskSet)(this.opts,this.noMasksCache),(this.isRTL?l.getBufferTemplate.call(this).reverse():l.getBufferTemplate.call(this)).join("")},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||(0,o.generateMaskSet)(this.opts,this.noMasksCache),c.isComplete.call(this,l.getBuffer.call(this))},getmetadata:function(){if(this.maskset=this.maskset||(0,o.generateMaskSet)(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){var e=s.getMaskTemplate.call(this,!0,0,!1).join("");return this.maskset.metadata.forEach((function(t){return t.mask!==e||(e=t,!1)})),e}
return this.maskset.metadata},isValid:function(e){if(this.maskset=this.maskset||(0,o.generateMaskSet)(this.opts,this.noMasksCache),e){var t=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,e,this.opts)||e).split("");u.checkVal.call(this,void 0,!0,!1,t)}else e=this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join("");for(var i=l.getBuffer.call(this),n=l.determineLastRequiredPosition.call(this),a=i.length-1;a>n&&!l.isMask.call(this,a);a--);return i.splice(n,a+1-n),c.isComplete.call(this,i)&&e===(this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join(""))},format:function(e,t){this.maskset=this.maskset||(0,o.generateMaskSet)(this.opts,this.noMasksCache);var i=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,e,this.opts)||e).split("");u.checkVal.call(this,void 0,!0,!1,i);var n=this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join("");return t?{value:n,metadata:this.getmetadata()}:n},setValue:function(e){this.el&&(0,a.default)(this.el).trigger("setvalue",[e])},analyseMask:o.analyseMask},y.extendDefaults=function(e){a.default.extend(!0,y.prototype.defaults,e)},y.extendDefinitions=function(e){a.default.extend(!0,y.prototype.definitions,e)},y.extendAliases=function(e){a.default.extend(!0,y.prototype.aliases,e)},y.format=function(e,t,i){return y(t).format(e,i)},y.unmask=function(e,t){return y(t).unmaskedvalue(e)},y.isValid=function(e,t){return y(t).isValid(e)},y.remove=function(e){"string"==typeof e&&(e=m.getElementById(e)||m.querySelectorAll(e)),(e=e.nodeName?[e]:e).forEach((function(e){e.inputmask&&e.inputmask.remove()}))},y.setValue=function(e,t){"string"==typeof e&&(e=m.getElementById(e)||m.querySelectorAll(e)),(e=e.nodeName?[e]:e).forEach((function(e){e.inputmask?e.inputmask.setValue(t):(0,a.default)(e).trigger("setvalue",[t])}))},y.dependencyLib=a.default,r.default.Inputmask=y;var b=y;t.default=b},5296:function(e,t,i){function n(e){return 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},n(e)}
var a=d(i(9380)),r=d(i(2394));function o(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value" in a&&(a.writable=!0),Object.defineProperty(e,(r=a.key,o=void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var a=i.call(e,t||"default");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}
return("string"===t?String:Number)(e)}(r,"string"),"symbol"===n(o)?o:String(o)),a)}
var r,o}
function s(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}
function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}
function n(){return c(e,arguments,p(this).constructor)}
return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)},l(e)}
function c(e,t,i){return c=u()?Reflect.construct.bind():function(e,t,i){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return i&&f(a,i.prototype),a},c.apply(null,arguments)}
function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}
function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}
function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}
function d(e){return e&&e.__esModule?e:{default:e}}
var h=a.default.document;if(h&&h.head&&h.head.attachShadow&&a.default.customElements&&void 0===a.default.customElements.get("input-mask")){var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(d,e);var t,i,n,a,l,c=(t=d,i=u(),function(){var e,n=p(t);if(i){var a=p(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return s(this,e)});function d(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d);var t=(e=c.call(this)).getAttributeNames(),i=e.attachShadow({mode:"closed"}),n=h.createElement("input");for(var a in n.type="text",i.appendChild(n),t)Object.prototype.hasOwnProperty.call(t,a)&&n.setAttribute(t[a],e.getAttribute(t[a]));var o=new r.default;return o.dataAttribute="",o.mask(n),n.inputmask.shadowRoot=i,e}
return n=d,a&&o(n.prototype,a),l&&o(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n}(l(HTMLElement));a.default.customElements.define("input-mask",v)}},443:function(e,t,i){var n=o(i(7957)),a=o(i(2394));function r(e){return r="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},r(e)}
function o(e){return e&&e.__esModule?e:{default:e}}
void 0===n.default.fn.inputmask&&(n.default.fn.inputmask=function(e,t){var i,o=this[0];if(void 0===t&&(t={}),"string"==typeof e)switch(e){case "unmaskedvalue":return o&&o.inputmask?o.inputmask.unmaskedvalue():(0,n.default)(o).val();case "remove":return this.each((function(){this.inputmask&&this.inputmask.remove()}));case "getemptymask":return o&&o.inputmask?o.inputmask.getemptymask():"";case "hasMaskedValue":return!(!o||!o.inputmask)&&o.inputmask.hasMaskedValue();case "isComplete":return!o||!o.inputmask||o.inputmask.isComplete();case "getmetadata":return o&&o.inputmask?o.inputmask.getmetadata():void 0;case "setvalue":a.default.setValue(o,t);break;case "option":if("string"!=typeof t)return this.each((function(){if(void 0!==this.inputmask)return this.inputmask.option(t)}));if(o&&void 0!==o.inputmask)return o.inputmask.option(t);break;default:return t.alias=e,i=new a.default(t),this.each((function(){i.mask(this)}))}else{if(Array.isArray(e))return t.alias=e,i=new a.default(t),this.each((function(){i.mask(this)}));if("object"==r(e))return i=new a.default(e),void 0===e.mask&&void 0===e.alias?this.each((function(){if(void 0!==this.inputmask)return this.inputmask.option(e);i.mask(this)})):this.each((function(){i.mask(this)}));if(void 0===e)return this.each((function(){(i=new a.default(t)).mask(this)}))}})},2839:function(e,t){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}
function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,a,r,o,s=[],l=!0,c=!1;try{if(r=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=r.call(i)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw a}}
return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}
function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}
return i}
function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!==i(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}
return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
Object.defineProperty(t,"__esModule",{value:!0}),t.keys=t.keyCode=t.ignorables=void 0,t.toKey=function(e,t){return c[e]||(t?String.fromCharCode(e):String.fromCharCode(e).toLowerCase())},t.toKeyCode=function(e){return l[e]};var s={Alt:18,AltGraph:18,ArrowDown:40,ArrowLeft:37,ArrowRight:39,ArrowUp:38,Backspace:8,CapsLock:20,Control:17,ContextMenu:93,Dead:221,Delete:46,End:35,Escape:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,Home:36,Insert:45,NumLock:144,PageDown:34,PageUp:33,Pause:19,PrintScreen:44,Process:229,Shift:16,ScrollLock:145,Tab:9,Unidentified:229};t.ignorables=s;var l=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}
return e}({c:67,x:88,z:90,BACKSPACE_SAFARI:127,Enter:13,Meta_LEFT:91,Meta_RIGHT:92,Space:32},s);t.keyCode=l;var c=Object.entries(l).reduce((function(e,t){var i=n(t,2),a=i[0],r=i[1];return e[r]=void 0===e[r]?a:e[r],e}),{}),u=Object.entries(l).reduce((function(e,t){var i=n(t,2),a=i[0];i[1];return e[a]="Space"===a?" ":a,e}),{});t.keys=u},2391:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.analyseMask=function(e,t,i){var n,o,s,l,c,u,f=/(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g,p=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,d=!1,h=new a.default,v=[],m=[],g=!1;function y(e,n,a){a=void 0!==a?a:e.matches.length;var o=e.matches[a-1];if(t){if(0===n.indexOf("[")||d&&/\\d|\\s|\\w|\\p/i.test(n)||"."===n){var s=i.casing?"i":"";/^\\p\{.*}$/i.test(n)&&(s+="u"),e.matches.splice(a++,0,{fn:new RegExp(n,s),static:!1,optionality:!1,newBlockMarker:void 0===o?"master":o.def!==n,casing:null,def:n,placeholder:void 0,nativeDef:n})}else d&&(n=n[n.length-1]),n.split("").forEach((function(t,n){o=e.matches[a-1],e.matches.splice(a++,0,{fn:/[a-z]/i.test(i.staticDefinitionSymbol||t)?new RegExp("["+(i.staticDefinitionSymbol||t)+"]",i.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:void 0===o?"master":o.def!==t&&!0!==o.static,casing:null,def:i.staticDefinitionSymbol||t,placeholder:void 0!==i.staticDefinitionSymbol?t:void 0,nativeDef:(d?"'":"")+t})}));d=!1}else{var l=i.definitions&&i.definitions[n]||i.usePrototypeDefinitions&&r.default.prototype.definitions[n];l&&!d?e.matches.splice(a++,0,{fn:l.validator?"string"==typeof l.validator?new RegExp(l.validator,i.casing?"i":""):new function(){this.test=l.validator}:new RegExp("."),static:l.static||!1,optionality:l.optional||!1,defOptionality:l.optional||!1,newBlockMarker:void 0===o||l.optional?"master":o.def!==(l.definitionSymbol||n),casing:l.casing,def:l.definitionSymbol||n,placeholder:l.placeholder,nativeDef:n,generated:l.generated}):(e.matches.splice(a++,0,{fn:/[a-z]/i.test(i.staticDefinitionSymbol||n)?new RegExp("["+(i.staticDefinitionSymbol||n)+"]",i.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:void 0===o?"master":o.def!==n&&!0!==o.static,casing:null,def:i.staticDefinitionSymbol||n,placeholder:void 0!==i.staticDefinitionSymbol?n:void 0,nativeDef:(d?"'":"")+n}),d=!1)}}
function k(){if(v.length>0){if(y(l=v[v.length-1],o),l.isAlternator){c=v.pop();for(var e=0;e<c.matches.length;e++)c.matches[e].isGroup&&(c.matches[e].isGroup=!1);v.length>0?(l=v[v.length-1]).matches.push(c):h.matches.push(c)}}else y(h,o)}
function b(e){var t=new a.default(!0);return t.openGroup=!1,t.matches=e,t}
function x(){if((s=v.pop()).openGroup=!1,void 0!==s)if(v.length>0){if((l=v[v.length-1]).matches.push(s),l.isAlternator){for(var e=(c=v.pop()).matches[0].matches?c.matches[0].matches.length:1,t=0;t<c.matches.length;t++)c.matches[t].isGroup=!1,c.matches[t].alternatorGroup=!1,null===i.keepStatic&&e<(c.matches[t].matches?c.matches[t].matches.length:1)&&(i.keepStatic=!0),e=c.matches[t].matches?c.matches[t].matches.length:1;v.length>0?(l=v[v.length-1]).matches.push(c):h.matches.push(c)}}else h.matches.push(s);else k()}
function P(e){var t=e.pop();return t.isQuantifier&&(t=b([e.pop(),t])),t}
t&&(i.optionalmarker[0]=void 0,i.optionalmarker[1]=void 0);for(;n=t?p.exec(e):f.exec(e);){if(o=n[0],t){switch(o.charAt(0)){case "?":o="{0,1}";break;case "+":case "*":o="{"+o+"}";break;case "|":if(0===v.length){var w=b(h.matches);w.openGroup=!0,v.push(w),h.matches=[],g=!0}}
switch(o){case "\\d":o="[0-9]";break;case "\\p":o+=p.exec(e)[0],o+=p.exec(e)[0]}}
if(d)k();else switch(o.charAt(0)){case "$":case "^":t||k();break;case i.escapeChar:d=!0,t&&k();break;case i.optionalmarker[1]:case i.groupmarker[1]:x();break;case i.optionalmarker[0]:v.push(new a.default(!1,!0));break;case i.groupmarker[0]:v.push(new a.default(!0));break;case i.quantifiermarker[0]:var S=new a.default(!1,!1,!0),O=(o=o.replace(/[{}?]/g,"")).split("|"),_=O[0].split(","),M=isNaN(_[0])?_[0]:parseInt(_[0]),E=1===_.length?M:isNaN(_[1])?_[1]:parseInt(_[1]),j=isNaN(O[1])?O[1]:parseInt(O[1]);"*"!==M&&"+"!==M||(M="*"===E?0:1),S.quantifier={min:M,max:E,jit:j};var T=v.length>0?v[v.length-1].matches:h.matches;(n=T.pop()).isGroup||(n=b([n])),T.push(n),T.push(S);break;case i.alternatormarker:if(v.length>0){var D=(l=v[v.length-1]).matches[l.matches.length-1];u=l.openGroup&&(void 0===D.matches||!1===D.isGroup&&!1===D.isAlternator)?v.pop():P(l.matches)}else u=P(h.matches);if(u.isAlternator)v.push(u);else if(u.alternatorGroup?(c=v.pop(),u.alternatorGroup=!1):c=new a.default(!1,!1,!1,!0),c.matches.push(u),v.push(c),u.openGroup){u.openGroup=!1;var A=new a.default(!0);A.alternatorGroup=!0,v.push(A)}
break;default:k()}}
g&&x();for(;v.length>0;)s=v.pop(),h.matches.push(s);h.matches.length>0&&(!function e(n){n&&n.matches&&n.matches.forEach((function(a,r){var o=n.matches[r+1];(void 0===o||void 0===o.matches||!1===o.isQuantifier)&&a&&a.isGroup&&(a.isGroup=!1,t||(y(a,i.groupmarker[0],0),!0!==a.openGroup&&y(a,i.groupmarker[1]))),e(a)}))}(h),m.push(h));(i.numericInput||i.isRTL)&&function e(t){for(var n in t.matches=t.matches.reverse(),t.matches)if(Object.prototype.hasOwnProperty.call(t.matches,n)){var a=parseInt(n);if(t.matches[n].isQuantifier&&t.matches[a+1]&&t.matches[a+1].isGroup){var r=t.matches[n];t.matches.splice(n,1),t.matches.splice(a+1,0,r)}
void 0!==t.matches[n].matches?t.matches[n]=e(t.matches[n]):t.matches[n]=((o=t.matches[n])===i.optionalmarker[0]?o=i.optionalmarker[1]:o===i.optionalmarker[1]?o=i.optionalmarker[0]:o===i.groupmarker[0]?o=i.groupmarker[1]:o===i.groupmarker[1]&&(o=i.groupmarker[0]),o)}
var o;return t}(m[0]);return m},t.generateMaskSet=function(e,t){var i;function a(e,t){var i=t.repeat,n=t.groupmarker,a=t.quantifiermarker,r=t.keepStatic;if(i>0||"*"===i||"+"===i){var l="*"===i?0:"+"===i?1:i;e=n[0]+e+n[1]+a[0]+l+","+i+a[1]}
if(!0===r){var c=e.match(new RegExp("(.)\\[([^\\]]*)\\]","g"));c&&c.forEach((function(t,i){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,a,r,o,s=[],l=!0,c=!1;try{if(r=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=r.call(i)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw a}}
return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.split("["),2),a=n[0],r=n[1];r=r.replace("]",""),e=e.replace(new RegExp("".concat((0,o.default)(a),"\\[").concat((0,o.default)(r),"\\]")),a.charAt(0)===r.charAt(0)?"(".concat(a,"|").concat(a).concat(r,")"):"".concat(a,"[").concat(r,"]"))}))}
return e}
function l(e,i,o){var s,l,c=!1;return null!==e&&""!==e||((c=null!==o.regex)?e=(e=o.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(c=!0,e=".*")),1===e.length&&!1===o.greedy&&0!==o.repeat&&(o.placeholder=""),e=a(e,o),l=c?"regex_"+o.regex:o.numericInput?e.split("").reverse().join(""):e,null!==o.keepStatic&&(l="ks_"+o.keepStatic+l),void 0===r.default.prototype.masksCache[l]||!0===t?(s={mask:e,maskToken:r.default.prototype.analyseMask(e,c,o),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:i,maskLength:void 0,jitOffset:{}},!0!==t&&(r.default.prototype.masksCache[l]=s,s=n.default.extend(!0,{},r.default.prototype.masksCache[l]))):s=n.default.extend(!0,{},r.default.prototype.masksCache[l]),s}
"function"==typeof e.mask&&(e.mask=e.mask(e));if(Array.isArray(e.mask)){if(e.mask.length>1){null===e.keepStatic&&(e.keepStatic=!0);var c=e.groupmarker[0];return(e.isRTL?e.mask.reverse():e.mask).forEach((function(t){c.length>1&&(c+=e.alternatormarker),void 0!==t.mask&&"function"!=typeof t.mask?c+=t.mask:c+=t})),l(c+=e.groupmarker[1],e.mask,e)}
e.mask=e.mask.pop()}
i=e.mask&&void 0!==e.mask.mask&&"function"!=typeof e.mask.mask?l(e.mask.mask,e.mask,e):l(e.mask,e.mask,e);null===e.keepStatic&&(e.keepStatic=!1);return i};var n=l(i(3287)),a=l(i(9695)),r=l(i(2394)),o=l(i(7184));function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}
function l(e){return e&&e.__esModule?e:{default:e}}},157:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.mask=function(){var e=this,t=this.opts,i=this.el,u=this.dependencyLib;o.EventRuler.off(i);var f=function(t,i){"textarea"!==t.tagName.toLowerCase()&&i.ignorables.push(n.keys.Enter);var s=t.getAttribute("type"),l="input"===t.tagName.toLowerCase()&&i.supportsInputType.includes(s)||t.isContentEditable||"textarea"===t.tagName.toLowerCase();if(!l)if("input"===t.tagName.toLowerCase()){var c=document.createElement("input");c.setAttribute("type",s),l="text"===c.type,c=null}else l="partial";return!1!==l?function(t){var n,s;function l(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==a.getLastValidPosition.call(e)||!0!==i.nullable?(this.inputmask.shadowRoot||this.ownerDocument).activeElement===this&&i.clearMaskOnLostFocus?(e.isRTL?r.clearOptionalTail.call(e,a.getBuffer.call(e).slice()).reverse():r.clearOptionalTail.call(e,a.getBuffer.call(e).slice())).join(""):n.call(this):"":n.call(this)}
function c(e){s.call(this,e),this.inputmask&&(0,r.applyInputValue)(this,e)}
if(!t.inputmask.__valueGet){if(!0!==i.noValuePatching){if(Object.getOwnPropertyDescriptor){var f=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value"):void 0;f&&f.get&&f.set?(n=f.get,s=f.set,Object.defineProperty(t,"value",{get:l,set:c,configurable:!0})):"input"!==t.tagName.toLowerCase()&&(n=function(){return this.textContent},s=function(e){this.textContent=e},Object.defineProperty(t,"value",{get:l,set:c,configurable:!0}))}else document.__lookupGetter__&&t.__lookupGetter__("value")&&(n=t.__lookupGetter__("value"),s=t.__lookupSetter__("value"),t.__defineGetter__("value",l),t.__defineSetter__("value",c));t.inputmask.__valueGet=n,t.inputmask.__valueSet=s}
t.inputmask._valueGet=function(t){return e.isRTL&&!0!==t?n.call(this.el).split("").reverse().join(""):n.call(this.el)},t.inputmask._valueSet=function(t,i){s.call(this.el,null==t?"":!0!==i&&e.isRTL?t.split("").reverse().join(""):t)},void 0===n&&(n=function(){return this.value},s=function(e){this.value=e},function(t){if(u.valHooks&&(void 0===u.valHooks[t]||!0!==u.valHooks[t].inputmaskpatch)){var n=u.valHooks[t]&&u.valHooks[t].get?u.valHooks[t].get:function(e){return e.value},o=u.valHooks[t]&&u.valHooks[t].set?u.valHooks[t].set:function(e,t){return e.value=t,e};u.valHooks[t]={get:function(t){if(t.inputmask){if(t.inputmask.opts.autoUnmask)return t.inputmask.unmaskedvalue();var r=n(t);return-1!==a.getLastValidPosition.call(e,void 0,void 0,t.inputmask.maskset.validPositions)||!0!==i.nullable?r:""}
return n(t)},set:function(e,t){var i=o(e,t);return e.inputmask&&(0,r.applyInputValue)(e,t),i},inputmaskpatch:!0}}}(t.type),function(e){o.EventRuler.on(e,"mouseenter",(function(){var e=this,t=e.inputmask._valueGet(!0);t!=(e.inputmask.isRTL?a.getBuffer.call(e.inputmask).slice().reverse():a.getBuffer.call(e.inputmask)).join("")&&(0,r.applyInputValue)(e,t)}))}(t))}}(t):t.inputmask=void 0,l}(i,t);if(!1!==f){e.originalPlaceholder=i.placeholder,e.maxLength=void 0!==i?i.maxLength:void 0,-1===e.maxLength&&(e.maxLength=void 0),"inputMode" in i&&null===i.getAttribute("inputmode")&&(i.inputMode=t.inputmode,i.setAttribute("inputmode",t.inputmode)),!0===f&&(t.showMaskOnFocus=t.showMaskOnFocus&&-1===["cc-number","cc-exp"].indexOf(i.autocomplete),s.iphone&&(t.insertModeVisual=!1,i.setAttribute("autocorrect","off")),o.EventRuler.on(i,"submit",c.EventHandlers.submitEvent),o.EventRuler.on(i,"reset",c.EventHandlers.resetEvent),o.EventRuler.on(i,"blur",c.EventHandlers.blurEvent),o.EventRuler.on(i,"focus",c.EventHandlers.focusEvent),o.EventRuler.on(i,"invalid",c.EventHandlers.invalidEvent),o.EventRuler.on(i,"click",c.EventHandlers.clickEvent),o.EventRuler.on(i,"mouseleave",c.EventHandlers.mouseleaveEvent),o.EventRuler.on(i,"mouseenter",c.EventHandlers.mouseenterEvent),o.EventRuler.on(i,"paste",c.EventHandlers.pasteEvent),o.EventRuler.on(i,"cut",c.EventHandlers.cutEvent),o.EventRuler.on(i,"complete",t.oncomplete),o.EventRuler.on(i,"incomplete",t.onincomplete),o.EventRuler.on(i,"cleared",t.oncleared),!0!==t.inputEventOnly&&o.EventRuler.on(i,"keydown",c.EventHandlers.keyEvent),(s.mobile||t.inputEventOnly)&&i.removeAttribute("maxLength"),o.EventRuler.on(i,"input",c.EventHandlers.inputFallBackEvent)),o.EventRuler.on(i,"setvalue",c.EventHandlers.setValueEvent),a.getBufferTemplate.call(e).join(""),e.undoValue=e._valueGet(!0);var p=(i.inputmask.shadowRoot||i.ownerDocument).activeElement;if(""!==i.inputmask._valueGet(!0)||!1===t.clearMaskOnLostFocus||p===i){(0,r.applyInputValue)(i,i.inputmask._valueGet(!0),t);var d=a.getBuffer.call(e).slice();!1===l.isComplete.call(e,d)&&t.clearIncomplete&&a.resetMaskSet.call(e,!1),t.clearMaskOnLostFocus&&p!==i&&(-1===a.getLastValidPosition.call(e)?d=[]:r.clearOptionalTail.call(e,d)),(!1===t.clearMaskOnLostFocus||t.showMaskOnFocus&&p===i||""!==i.inputmask._valueGet(!0))&&(0,r.writeBuffer)(i,d),p===i&&a.caret.call(e,i,a.seekNext.call(e,a.getLastValidPosition.call(e)))}}};var n=i(2839),a=i(8711),r=i(7760),o=i(9716),s=i(9845),l=i(7215),c=i(6030)},9695:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i,n){this.matches=[],this.openGroup=e||!1,this.alternatorGroup=!1,this.isGroup=e||!1,this.isOptional=t||!1,this.isQuantifier=i||!1,this.isAlternator=n||!1,this.quantifier={min:1,max:1}}},3194:function(){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),n=i.length>>>0;if(0===n)return!1;for(var a=0|t,r=Math.max(a>=0?a:n-Math.abs(a),0);r<n;){if(i[r]===e)return!0;r++}
return!1}})},9302:function(){var e=Function.bind.call(Function.call,Array.prototype.reduce),t=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),i=Function.bind.call(Function.call,Array.prototype.concat),n=Object.keys;Object.entries||(Object.entries=function(a){return e(n(a),(function(e,n){return i(e,"string"==typeof n&&t(a,n)?[[n,a[n]]]:[])}),[])})},7149:function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}
"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===e("test".__proto__)?function(e){return e.__proto__}:function(e){return e.constructor.prototype})},4013:function(){String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)})},8711:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.caret=function(e,t,i,n,r){var o,s=this,l=this.opts;if(void 0===t)return"selectionStart" in e&&"selectionEnd" in e?(t=e.selectionStart,i=e.selectionEnd):a.default.getSelection?(o=a.default.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==e&&o.commonAncestorContainer!==e||(t=o.startOffset,i=o.endOffset):document.selection&&document.selection.createRange&&(o=document.selection.createRange(),t=0-o.duplicate().moveStart("character",-e.inputmask._valueGet().length),i=t+o.text.length),{begin:n?t:f.call(s,t),end:n?i:f.call(s,i)};if(Array.isArray(t)&&(i=s.isRTL?t[0]:t[1],t=s.isRTL?t[1]:t[0]),void 0!==t.begin&&(i=s.isRTL?t.begin:t.end,t=s.isRTL?t.end:t.begin),"number"==typeof t){t=n?t:f.call(s,t),i="number"==typeof(i=n?i:f.call(s,i))?i:t;var c=parseInt(((e.ownerDocument.defaultView||a.default).getComputedStyle?(e.ownerDocument.defaultView||a.default).getComputedStyle(e,null):e.currentStyle).fontSize)*i;if(e.scrollLeft=c>e.scrollWidth?c:0,e.inputmask.caretPos={begin:t,end:i},l.insertModeVisual&&!1===l.insertMode&&t===i&&(r||i++),e===(e.inputmask.shadowRoot||e.ownerDocument).activeElement)if("setSelectionRange" in e)e.setSelectionRange(t,i);else if(a.default.getSelection){if(o=document.createRange(),void 0===e.firstChild||null===e.firstChild){var u=document.createTextNode("");e.appendChild(u)}
o.setStart(e.firstChild,t<e.inputmask._valueGet().length?t:e.inputmask._valueGet().length),o.setEnd(e.firstChild,i<e.inputmask._valueGet().length?i:e.inputmask._valueGet().length),o.collapse(!0);var p=a.default.getSelection();p.removeAllRanges(),p.addRange(o)}else e.createTextRange&&((o=e.createTextRange()).collapse(!0),o.moveEnd("character",i),o.moveStart("character",t),o.select())}},t.determineLastRequiredPosition=function(e){var t,i,n=this,a=n.maskset,s=n.dependencyLib,c=r.getMaskTemplate.call(n,!0,l.call(n),!0,!0),u=c.length,f=l.call(n),p={},d=a.validPositions[f],h=void 0!==d?d.locator.slice():void 0;for(t=f+1;t<c.length;t++)i=r.getTestTemplate.call(n,t,h,t-1),h=i.locator.slice(),p[t]=s.extend(!0,{},i);var v=d&&void 0!==d.alternation?d.locator[d.alternation]:void 0;for(t=u-1;t>f&&(((i=p[t]).match.optionality||i.match.optionalQuantifier&&i.match.newBlockMarker||v&&(v!==p[t].locator[d.alternation]&&1!=i.match.static||!0===i.match.static&&i.locator[d.alternation]&&o.checkAlternationMatch.call(n,i.locator[d.alternation].toString().split(","),v.toString().split(","))&&""!==r.getTests.call(n,t)[0].def))&&c[t]===r.getPlaceholder.call(n,t,i.match));t--)u--;return e?{l:u,def:p[u]?p[u].match:void 0}:u},t.determineNewCaretPosition=function(e,t,i){var n=this,a=n.maskset,o=n.opts;t&&(n.isRTL?e.end=e.begin:e.begin=e.end);if(e.begin===e.end){switch(i=i||o.positionCaretOnClick){case "none":break;case "select":e={begin:0,end:s.call(n).length};break;case "ignore":e.end=e.begin=u.call(n,l.call(n));break;case "radixFocus":if(n.clicked>1&&0==a.validPositions.length)break;if(function(e){if(""!==o.radixPoint&&0!==o.digits){var t=a.validPositions;if(void 0===t[e]||t[e].input===r.getPlaceholder.call(n,e)){if(e<u.call(n,-1))return!0;var i=s.call(n).indexOf(o.radixPoint);if(-1!==i){for(var l=0,c=t.length;l<c;l++)if(t[l]&&i<l&&t[l].input!==r.getPlaceholder.call(n,l))return!1;return!0}}}
return!1}(e.begin)){var f=s.call(n).join("").indexOf(o.radixPoint);e.end=e.begin=o.numericInput?u.call(n,f):f;break}
default:var p=e.begin,d=l.call(n,p,!0),h=u.call(n,-1!==d||c.call(n,0)?d:-1);if(p<=h)e.end=e.begin=c.call(n,p,!1,!0)?p:u.call(n,p);else{var v=a.validPositions[d],m=r.getTestTemplate.call(n,h,v?v.match.locator:void 0,v),g=r.getPlaceholder.call(n,h,m.match);if(""!==g&&s.call(n)[h]!==g&&!0!==m.match.optionalQuantifier&&!0!==m.match.newBlockMarker||!c.call(n,h,o.keepStatic,!0)&&m.match.def===g){var y=u.call(n,h);(p>=y||p===h)&&(h=y)}
e.end=e.begin=h}}
return e}},t.getBuffer=s,t.getBufferTemplate=function(){var e=this.maskset;void 0===e._buffer&&(e._buffer=r.getMaskTemplate.call(this,!1,1),void 0===e.buffer&&(e.buffer=e._buffer.slice()));return e._buffer},t.getLastValidPosition=l,t.isMask=c,t.resetMaskSet=function(e){var t=this.maskset;t.buffer=void 0,!0!==e&&(t.validPositions=[],t.p=0);!1===e&&(t.tests={})},t.seekNext=u,t.seekPrevious=function(e,t){var i=this,n=e-1;if(e<=0)return 0;for(;n>0&&(!0===t&&(!0!==r.getTest.call(i,n).match.newBlockMarker||!c.call(i,n,void 0,!0))||!0!==t&&!c.call(i,n,void 0,!0));)n--;return n},t.translatePosition=f;var n,a=(n=i(9380))&&n.__esModule?n:{default:n},r=i(4713),o=i(7215);function s(e){var t=this,i=t.maskset;return void 0!==i.buffer&&!0!==e||(i.buffer=r.getMaskTemplate.call(t,!0,l.call(t),!0),void 0===i._buffer&&(i._buffer=i.buffer.slice())),i.buffer}
function l(e,t,i){var n=this.maskset,a=-1,r=-1,o=i||n.validPositions;void 0===e&&(e=-1);for(var s=0,l=o.length;s<l;s++)o[s]&&(t||!0!==o[s].generatedInput)&&(s<=e&&(a=s),s>=e&&(r=s));return-1===a||a==e?r:-1==r||e-a<r-e?a:r}
function c(e,t,i){var n=this,a=this.maskset,o=r.getTestTemplate.call(n,e).match;if(""===o.def&&(o=r.getTest.call(n,e).match),!0!==o.static)return o.fn;if(!0===i&&void 0!==a.validPositions[e]&&!0!==a.validPositions[e].generatedInput)return!0;if(!0!==t&&e>-1){if(i){var s=r.getTests.call(n,e);return s.length>1+(""===s[s.length-1].match.def?1:0)}
var l=r.determineTestTemplate.call(n,e,r.getTests.call(n,e)),c=r.getPlaceholder.call(n,e,l.match);return l.match.def!==c}
return!1}
function u(e,t,i){var n=this;void 0===i&&(i=!0);for(var a=e+1;""!==r.getTest.call(n,a).match.def&&(!0===t&&(!0!==r.getTest.call(n,a).match.newBlockMarker||!c.call(n,a,void 0,!0))||!0!==t&&!c.call(n,a,void 0,i));)a++;return a}
function f(e){var t=this.opts,i=this.el;return!this.isRTL||"number"!=typeof e||t.greedy&&""===t.placeholder||!i||(e=this._valueGet().length-e)<0&&(e=0),e}},4713:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.determineTestTemplate=c,t.getDecisionTaker=o,t.getMaskTemplate=function(e,t,i,n,a){var r=this,o=this.opts,u=this.maskset,f=o.greedy;a&&o.greedy&&(o.greedy=!1,r.maskset.tests={});t=t||0;var d,h,v,m,g=[],y=0;do{if(!0===e&&u.validPositions[y])v=a&&u.validPositions[y].match.optionality&&void 0===u.validPositions[y+1]&&(!0===u.validPositions[y].generatedInput||u.validPositions[y].input==o.skipOptionalPartCharacter&&y>0)?c.call(r,y,p.call(r,y,d,y-1)):u.validPositions[y],h=v.match,d=v.locator.slice(),g.push(!0===i?v.input:!1===i?h.nativeDef:s.call(r,y,h));else{v=l.call(r,y,d,y-1),h=v.match,d=v.locator.slice();var k=!0!==n&&(!1!==o.jitMasking?o.jitMasking:h.jit);(m=(m||u.validPositions[y-1])&&h.static&&h.def!==o.groupSeparator&&null===h.fn)||!1===k||void 0===k||"number"==typeof k&&isFinite(k)&&k>y?g.push(!1===i?h.nativeDef:s.call(r,g.length,h)):m=!1}
y++}while(!0!==h.static||""!==h.def||t>y);""===g[g.length-1]&&g.pop();!1===i&&void 0!==u.maskLength||(u.maskLength=y-1);return o.greedy=f,g},t.getPlaceholder=s,t.getTest=u,t.getTestTemplate=l,t.getTests=p,t.isSubsetOf=f;var n,a=(n=i(2394))&&n.__esModule?n:{default:n};function r(e,t){var i=(null!=e.alternation?e.mloc[o(e)]:e.locator).join("");if(""!==i)for(;i.length<t;)i+="0";return i}
function o(e){var t=e.locator[e.alternation];return"string"==typeof t&&t.length>0&&(t=t.split(",")[0]),void 0!==t?t.toString():""}
function s(e,t,i){var n=this.opts,a=this.maskset;if(void 0!==(t=t||u.call(this,e).match).placeholder||!0===i)return"function"==typeof t.placeholder?t.placeholder(n):t.placeholder;if(!0===t.static){if(e>-1&&void 0===a.validPositions[e]){var r,o=p.call(this,e),s=[];if(o.length>1+(""===o[o.length-1].match.def?1:0))for(var l=0;l<o.length;l++)if(""!==o[l].match.def&&!0!==o[l].match.optionality&&!0!==o[l].match.optionalQuantifier&&(!0===o[l].match.static||void 0===r||!1!==o[l].match.fn.test(r.match.def,a,e,!0,n))&&(s.push(o[l]),!0===o[l].match.static&&(r=o[l]),s.length>1&&/[0-9a-bA-Z]/.test(s[0].match.def)))return n.placeholder.charAt(e%n.placeholder.length);}
return t.def}
return n.placeholder.charAt(e%n.placeholder.length)}
function l(e,t,i){return this.maskset.validPositions[e]||c.call(this,e,p.call(this,e,t?t.slice():t,i))}
function c(e,t){var i=this.opts,n=0,a=function(e,t){var i=0,n=!1;t.forEach((function(e){e.match.optionality&&(0!==i&&i!==e.match.optionality&&(n=!0),(0===i||i>e.match.optionality)&&(i=e.match.optionality))})),i&&(0==e||1==t.length?i=0:n||(i=0));return i}(e,t);e=e>0?e-1:0;var o,s,l,c=r(u.call(this,e));i.greedy&&t.length>1&&""===t[t.length-1].match.def&&(n=1);for(var f=0;f<t.length-n;f++){var p=t[f];o=r(p,c.length);var d=Math.abs(o-c);(void 0===s||""!==o&&d<s||l&&!i.greedy&&l.match.optionality&&l.match.optionality-a>0&&"master"===l.match.newBlockMarker&&(!p.match.optionality||p.match.optionality-a<1||!p.match.newBlockMarker)||l&&!i.greedy&&l.match.optionalQuantifier&&!p.match.optionalQuantifier)&&(s=d,l=p)}
return l}
function u(e,t){var i=this.maskset;return i.validPositions[e]?i.validPositions[e]:(t||p.call(this,e))[0]}
function f(e,t,i){function n(e){for(var t,i=[],n=-1,a=0,r=e.length;a<r;a++)if("-"===e.charAt(a))for(t=e.charCodeAt(a+1);++n<t;)i.push(String.fromCharCode(n));else n=e.charCodeAt(a),i.push(e.charAt(a));return i.join("")}
return e.match.def===t.match.nativeDef||!(!(i.regex||e.match.fn instanceof RegExp&&t.match.fn instanceof RegExp)||!0===e.match.static||!0===t.match.static)&&-1!==n(t.match.fn.toString().replace(/[[\]/]/g,"")).indexOf(n(e.match.fn.toString().replace(/[[\]/]/g,"")))}
function p(e,t,i){var n,r,o=this,s=this.dependencyLib,l=this.maskset,u=this.opts,p=this.el,d=l.maskToken,h=t?i:0,v=t?t.slice():[0],m=[],g=!1,y=t?t.join(""):"";function k(t,i,r,s){function c(r,s,d){function v(e,t){var i=0===t.matches.indexOf(e);return i||t.matches.every((function(n,a){return!0===n.isQuantifier?i=v(e,t.matches[a-1]):Object.prototype.hasOwnProperty.call(n,"matches")&&(i=v(e,n)),!i})),i}
function x(e,t,i){var n,a;if((l.tests[e]||l.validPositions[e])&&(l.tests[e]||[l.validPositions[e]]).every((function(e,r){if(e.mloc[t])return n=e,!1;var o=void 0!==i?i:e.alternation,s=void 0!==e.locator[o]?e.locator[o].toString().indexOf(t):-1;return(void 0===a||s<a)&&-1!==s&&(n=e,a=s),!0})),n){var r=n.locator[n.alternation];return(n.mloc[t]||n.mloc[r]||n.locator).slice((void 0!==i?i:n.alternation)+1)}
return void 0!==i?x(e,t):void 0}
function P(e,t){var i=e.alternation,n=void 0===t||i===t.alternation&&-1===e.locator[i].toString().indexOf(t.locator[i]);if(!n&&i>t.alternation)for(var a=t.alternation;a<i;a++)if(e.locator[a]!==t.locator[a]){i=a,n=!0;break}
if(n){e.mloc=e.mloc||{};var r=e.locator[i];if(void 0!==r){if("string"==typeof r&&(r=r.split(",")[0]),void 0===e.mloc[r]&&(e.mloc[r]=e.locator.slice()),void 0!==t){for(var o in t.mloc)"string"==typeof o&&(o=o.split(",")[0]),void 0===e.mloc[o]&&(e.mloc[o]=t.mloc[o]);e.locator[i]=Object.keys(e.mloc).join(",")}
return!0}
e.alternation=void 0}
return!1}
function w(e,t){if(e.locator.length!==t.locator.length)return!1;for(var i=e.alternation+1;i<e.locator.length;i++)if(e.locator[i]!==t.locator[i])return!1;return!0}
if(h>e+u._maxTestPos)throw "Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+l.mask;if(h===e&&void 0===r.matches){if(m.push({match:r,locator:s.reverse(),cd:y,mloc:{}}),!r.optionality||void 0!==d||!(u.definitions&&u.definitions[r.nativeDef]&&u.definitions[r.nativeDef].optional||a.default.prototype.definitions[r.nativeDef]&&a.default.prototype.definitions[r.nativeDef].optional))return!0;g=!0,h=e}else if(void 0!==r.matches){if(r.isGroup&&d!==r)return function(){if(r=c(t.matches[t.matches.indexOf(r)+1],s,d))return!0}();if(r.isOptional)return function(){var t=r,a=m.length;if(r=k(r,i,s,d),m.length>0){if(m.forEach((function(e,t){t>=a&&(e.match.optionality=e.match.optionality?e.match.optionality+1:1)})),n=m[m.length-1].match,void 0!==d||!v(n,t))return r;g=!0,h=e}}();if(r.isAlternator)return function(){o.hasAlternator=!0;var n,a,v,y=r,k=[],b=m.slice(),S=s.length,O=!1,_=i.length>0?i.shift():-1;if(-1===_||"string"==typeof _){var M,E=h,j=i.slice(),T=[];if("string"==typeof _)T=_.split(",");else for(M=0;M<y.matches.length;M++)T.push(M.toString());if(void 0!==l.excludes[e]){for(var D=T.slice(),A=0,L=l.excludes[e].length;A<L;A++){var B=l.excludes[e][A].toString().split(":");s.length==B[1]&&T.splice(T.indexOf(B[0]),1)}
0===T.length&&(delete l.excludes[e],T=D)}(!0===u.keepStatic||isFinite(parseInt(u.keepStatic))&&E>=u.keepStatic)&&(T=T.slice(0,1));for(var C=0;C<T.length;C++){M=parseInt(T[C]),m=[],i="string"==typeof _&&x(h,M,S)||j.slice();var R=y.matches[M];if(R&&c(R,[M].concat(s),d))r=!0;else if(0===C&&(O=!0),R&&R.matches&&R.matches.length>y.matches[0].matches.length)break;n=m.slice(),h=E,m=[];for(var F=0;F<n.length;F++){var I=n[F],N=!1;I.match.jit=I.match.jit||O,I.alternation=I.alternation||S,P(I);for(var V=0;V<k.length;V++){var G=k[V];if("string"!=typeof _||void 0!==I.alternation&&T.includes(I.locator[I.alternation].toString())){if(I.match.nativeDef===G.match.nativeDef){N=!0,P(G,I);break}
if(f(I,G,u)){P(I,G)&&(N=!0,k.splice(k.indexOf(G),0,I));break}
if(f(G,I,u)){P(G,I);break}
if(v=G,!0===(a=I).match.static&&!0!==v.match.static&&v.match.fn.test(a.match.def,l,e,!1,u,!1)){w(I,G)||void 0!==p.inputmask.userOptions.keepStatic?P(I,G)&&(N=!0,k.splice(k.indexOf(G),0,I)):u.keepStatic=!0;break}}}
N||k.push(I)}}
m=b.concat(k),h=e,g=m.length>0,r=k.length>0,i=j.slice()}else r=c(y.matches[_]||t.matches[_],[_].concat(s),d);if(r)return!0}();if(r.isQuantifier&&d!==t.matches[t.matches.indexOf(r)-1])return function(){for(var a=r,o=!1,f=i.length>0?i.shift():0;f<(isNaN(a.quantifier.max)?f+1:a.quantifier.max)&&h<=e;f++){var p=t.matches[t.matches.indexOf(a)-1];if(r=c(p,[f].concat(s),p)){if(m.forEach((function(t,i){(n=b(p,t.match)?t.match:m[m.length-1].match).optionalQuantifier=f>=a.quantifier.min,n.jit=(f+1)*(p.matches.indexOf(n)+1)>a.quantifier.jit,n.optionalQuantifier&&v(n,p)&&(g=!0,h=e,u.greedy&&null==l.validPositions[e-1]&&f>a.quantifier.min&&-1!=["*","+"].indexOf(a.quantifier.max)&&(m.pop(),y=void 0),o=!0,r=!1),!o&&n.jit&&(l.jitOffset[e]=p.matches.length-p.matches.indexOf(n))})),o)break;return!0}}}();if(r=k(r,i,s,d))return!0}else h++}
for(var d=i.length>0?i.shift():0;d<t.matches.length;d++)if(!0!==t.matches[d].isQuantifier){var v=c(t.matches[d],[d].concat(r),s);if(v&&h===e)return v;if(h>e)break}}
function b(e,t){var i=-1!=e.matches.indexOf(t);return i||e.matches.forEach((function(e,n){void 0===e.matches||i||(i=b(e,t))})),i}
if(e>-1){if(void 0===t){for(var x,P=e-1;void 0===(x=l.validPositions[P]||l.tests[P])&&P>-1;)P--;void 0!==x&&P>-1&&(v=function(e,t){var i,n=[];return Array.isArray(t)||(t=[t]),t.length>0&&(void 0===t[0].alternation||!0===u.keepStatic?0===(n=c.call(o,e,t.slice()).locator.slice()).length&&(n=t[0].locator.slice()):t.forEach((function(e){""!==e.def&&(0===n.length?(i=e.alternation,n=e.locator.slice()):e.locator[i]&&-1===n[i].toString().indexOf(e.locator[i])&&(n[i]+=","+e.locator[i]))}))),n}(P,x),y=v.join(""),h=P)}
if(l.tests[e]&&l.tests[e][0].cd===y)return l.tests[e];for(var w=v.shift();w<d.length;w++){if(k(d[w],v,[w])&&h===e||h>e)break}}
return(0===m.length||g)&&m.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:y}),void 0!==t&&l.tests[e]?r=s.extend(!0,[],m):(l.tests[e]=s.extend(!0,[],m),r=l.tests[e]),m.forEach((function(e){e.match.optionality=e.match.defOptionality||!1})),r}},7215:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.alternate=s,t.checkAlternationMatch=function(e,t,i){for(var n,a=this.opts.greedy?t:t.slice(0,1),r=!1,o=void 0!==i?i.split(","):[],s=0;s<o.length;s++)-1!==(n=e.indexOf(o[s]))&&e.splice(n,1);for(var l=0;l<e.length;l++)if(a.includes(e[l])){r=!0;break}
return r},t.handleRemove=function(e,t,i,o,l){var c=this,u=this.maskset,f=this.opts;if((f.numericInput||c.isRTL)&&(t===a.keys.Backspace?t=a.keys.Delete:t===a.keys.Delete&&(t=a.keys.Backspace),c.isRTL)){var p=i.end;i.end=i.begin,i.begin=p}
var d,h=r.getLastValidPosition.call(c,void 0,!0);i.end>=r.getBuffer.call(c).length&&h>=i.end&&(i.end=h+1);t===a.keys.Backspace?i.end-i.begin<1&&(i.begin=r.seekPrevious.call(c,i.begin)):t===a.keys.Delete&&i.begin===i.end&&(i.end=r.isMask.call(c,i.end,!0,!0)?i.end+1:r.seekNext.call(c,i.end)+1);if(!1!==(d=v.call(c,i))){if(!0!==o&&!1!==f.keepStatic||null!==f.regex&&-1!==n.getTest.call(c,i.begin).match.def.indexOf("|")){var m=s.call(c,!0);if(m){var g=void 0!==m.caret?m.caret:m.pos?r.seekNext.call(c,m.pos.begin?m.pos.begin:m.pos):r.getLastValidPosition.call(c,-1,!0);(t!==a.keys.Delete||i.begin>g)&&i.begin}}
!0!==o&&(u.p=t===a.keys.Delete?i.begin+d:i.begin,u.p=r.determineNewCaretPosition.call(c,{begin:u.p,end:u.p},!1,!1===f.insertMode&&t===a.keys.Backspace?"none":void 0).begin)}},t.isComplete=c,t.isSelection=u,t.isValid=f,t.refreshFromBuffer=d,t.revalidateMask=v;var n=i(4713),a=i(2839),r=i(8711),o=i(6030);function s(e,t,i,a,o,l){var c,u,p,d,h,v,m,g,y,k,b,x=this,P=this.dependencyLib,w=this.opts,S=x.maskset,O=P.extend(!0,[],S.validPositions),_=P.extend(!0,{},S.tests),M=!1,E=!1,j=void 0!==o?o:r.getLastValidPosition.call(x);if(l&&(k=l.begin,b=l.end,l.begin>l.end&&(k=l.end,b=l.begin)),-1===j&&void 0===o)c=0,u=(d=n.getTest.call(x,c)).alternation;else for(;j>=0;j--)if((p=S.validPositions[j])&&void 0!==p.alternation){if(j<=(e||0)&&d&&d.locator[p.alternation]!==p.locator[p.alternation])break;c=j,u=S.validPositions[c].alternation,d=p}
if(void 0!==u){m=parseInt(c),S.excludes[m]=S.excludes[m]||[],!0!==e&&S.excludes[m].push((0,n.getDecisionTaker)(d)+":"+d.alternation);var T=[],D=-1;for(h=m;m<r.getLastValidPosition.call(x,void 0,!0)+1;h++)-1===D&&e<=h&&void 0!==t&&(T.push(t),D=T.length-1),(v=S.validPositions[m])&&!0!==v.generatedInput&&(void 0===l||h<k||h>=b)&&T.push(v.input),S.validPositions.splice(m,1);for(-1===D&&void 0!==t&&(T.push(t),D=T.length-1);void 0!==S.excludes[m]&&S.excludes[m].length<10;){for(S.tests={},r.resetMaskSet.call(x,!0),M=!0,h=0;h<T.length&&(g=M.caret||r.getLastValidPosition.call(x,void 0,!0)+1,y=T[h],M=f.call(x,g,y,!1,a,!0));h++)h===D&&(E=M),1==e&&M&&(E={caretPos:h});if(M)break;if(r.resetMaskSet.call(x),d=n.getTest.call(x,m),S.validPositions=P.extend(!0,[],O),S.tests=P.extend(!0,{},_),!S.excludes[m]){E=s.call(x,e,t,i,a,m-1,l);break}
var A=(0,n.getDecisionTaker)(d);if(-1!==S.excludes[m].indexOf(A+":"+d.alternation)){E=s.call(x,e,t,i,a,m-1,l);break}
for(S.excludes[m].push(A+":"+d.alternation),h=m;h<r.getLastValidPosition.call(x,void 0,!0)+1;h++)S.validPositions.splice(m);}}
return E&&!1===w.keepStatic||delete S.excludes[m],E}
function l(e,t,i){var n=this.opts,r=this.maskset;switch(n.casing||t.casing){case "upper":e=e.toUpperCase();break;case "lower":e=e.toLowerCase();break;case "title":var o=r.validPositions[i-1];e=0===i||o&&o.input===String.fromCharCode(a.keyCode.Space)?e.toUpperCase():e.toLowerCase();break;default:if("function"==typeof n.casing){var s=Array.prototype.slice.call(arguments);s.push(r.validPositions),e=n.casing.apply(this,s)}}
return e}
function c(e){var t=this,i=this.opts,a=this.maskset;if("function"==typeof i.isComplete)return i.isComplete(e,i);if("*"!==i.repeat){var o=!1,s=r.determineLastRequiredPosition.call(t,!0),l=s.l;if(void 0===s.def||s.def.newBlockMarker||s.def.optionality||s.def.optionalQuantifier){o=!0;for(var c=0;c<=l;c++){var u=n.getTestTemplate.call(t,c).match;if(!0!==u.static&&void 0===a.validPositions[c]&&(!1===u.optionality||void 0===u.optionality||u.optionality&&0==u.newBlockMarker)&&(!1===u.optionalQuantifier||void 0===u.optionalQuantifier)||!0===u.static&&""!=u.def&&e[c]!==n.getPlaceholder.call(t,c,u)){o=!1;break}}}
return o}}
function u(e){var t=this.opts.insertMode?0:1;return this.isRTL?e.begin-e.end>t:e.end-e.begin>t}
function f(e,t,i,a,o,p,m){var g=this,y=this.dependencyLib,k=this.opts,b=g.maskset;i=!0===i;var x=e;function P(e){if(void 0!==e){if(void 0!==e.remove&&(Array.isArray(e.remove)||(e.remove=[e.remove]),e.remove.sort((function(e,t){return g.isRTL?e.pos-t.pos:t.pos-e.pos})).forEach((function(e){v.call(g,{begin:e,end:e+1})})),e.remove=void 0),void 0!==e.insert&&(Array.isArray(e.insert)||(e.insert=[e.insert]),e.insert.sort((function(e,t){return g.isRTL?t.pos-e.pos:e.pos-t.pos})).forEach((function(e){""!==e.c&&f.call(g,e.pos,e.c,void 0===e.strict||e.strict,void 0!==e.fromIsValid?e.fromIsValid:a)})),e.insert=void 0),e.refreshFromBuffer&&e.buffer){var t=e.refreshFromBuffer;d.call(g,!0===t?t:t.start,t.end,e.buffer),e.refreshFromBuffer=void 0}
void 0!==e.rewritePosition&&(x=e.rewritePosition,e=!0)}
return e}
function w(t,i,o){var s=!1;return n.getTests.call(g,t).every((function(c,f){var p=c.match;if(r.getBuffer.call(g,!0),!1!==(s=(!p.jit||void 0!==b.validPositions[r.seekPrevious.call(g,t)])&&(null!=p.fn?p.fn.test(i,b,t,o,k,u.call(g,e)):(i===p.def||i===k.skipOptionalPartCharacter)&&""!==p.def&&{c:n.getPlaceholder.call(g,t,p,!0)||p.def,pos:t}))){var d=void 0!==s.c?s.c:i,h=t;return d=d===k.skipOptionalPartCharacter&&!0===p.static?n.getPlaceholder.call(g,t,p,!0)||p.def:d,!0!==(s=P(s))&&void 0!==s.pos&&s.pos!==t&&(h=s.pos),!0!==s&&void 0===s.pos&&void 0===s.c?!1:(!1===v.call(g,e,y.extend({},c,{input:l.call(g,d,p,h)}),a,h)&&(s=!1),!1)}
return!0})),s}
void 0!==e.begin&&(x=g.isRTL?e.end:e.begin);var S=!0,O=y.extend(!0,[],b.validPositions);if(!1===k.keepStatic&&void 0!==b.excludes[x]&&!0!==o&&!0!==a)for(var _=x;_<(g.isRTL?e.begin:e.end);_++)void 0!==b.excludes[_]&&(b.excludes[_]=void 0,delete b.tests[_]);if("function"==typeof k.preValidation&&!0!==a&&!0!==p&&(S=P(S=k.preValidation.call(g,r.getBuffer.call(g),x,t,u.call(g,e),k,b,e,i||o))),!0===S){if(S=w(x,t,i),(!i||!0===a)&&!1===S&&!0!==p){var M=b.validPositions[x];if(!M||!0!==M.match.static||M.match.def!==t&&t!==k.skipOptionalPartCharacter){if(k.insertMode||void 0===b.validPositions[r.seekNext.call(g,x)]||e.end>x){var E=!1;if(b.jitOffset[x]&&void 0===b.validPositions[r.seekNext.call(g,x)]&&!1!==(S=f.call(g,x+b.jitOffset[x],t,!0,!0))&&(!0!==o&&(S.caret=x),E=!0),e.end>x&&(b.validPositions[x]=void 0),!E&&!r.isMask.call(g,x,k.keepStatic&&0===x))for(var j=x+1,T=r.seekNext.call(g,x,!1,0!==x);j<=T;j++)if(!1!==(S=w(j,t,i))){S=h.call(g,x,void 0!==S.pos?S.pos:j)||S,x=j;break}}}else S={caret:r.seekNext.call(g,x)}}
g.hasAlternator&&!0!==o&&!i&&(o=!0,!1===S&&k.keepStatic&&(c.call(g,r.getBuffer.call(g))||0===x)?S=s.call(g,x,t,i,a,void 0,e):(u.call(g,e)&&b.tests[x]&&b.tests[x].length>1&&k.keepStatic||1==S&&!0!==k.numericInput&&b.tests[x]&&b.tests[x].length>1&&r.getLastValidPosition.call(g,void 0,!0)>x)&&(S=s.call(g,!0))),!0===S&&(S={pos:x})}
if("function"==typeof k.postValidation&&!0!==a&&!0!==p){var D=k.postValidation.call(g,r.getBuffer.call(g,!0),void 0!==e.begin?g.isRTL?e.end:e.begin:e,t,S,k,b,i,m);void 0!==D&&(S=!0===D?S:D)}
S&&void 0===S.pos&&(S.pos=x),!1===S||!0===p?(r.resetMaskSet.call(g,!0),b.validPositions=y.extend(!0,[],O)):h.call(g,void 0,x,!0);var A=P(S);void 0!==g.maxLength&&(r.getBuffer.call(g).length>g.maxLength&&!a&&(r.resetMaskSet.call(g,!0),b.validPositions=y.extend(!0,[],O),A=!1));return A}
function p(e,t,i){for(var a=this.maskset,r=!1,o=n.getTests.call(this,e),s=0;s<o.length;s++){if(o[s].match&&(o[s].match.nativeDef===t.match[i.shiftPositions?"def":"nativeDef"]&&(!i.shiftPositions||!t.match.static)||o[s].match.nativeDef===t.match.nativeDef||i.regex&&!o[s].match.static&&o[s].match.fn.test(t.input,a,e,!1,i))){r=!0;break}
if(o[s].match&&o[s].match.def===t.match.nativeDef){r=void 0;break}}
return!1===r&&void 0!==a.jitOffset[e]&&(r=p.call(this,e+a.jitOffset[e],t,i)),r}
function d(e,t,i){var n,a,s=this,l=this.maskset,c=this.opts,u=this.dependencyLib,f=c.skipOptionalPartCharacter,p=s.isRTL?i.slice().reverse():i;if(c.skipOptionalPartCharacter="",!0===e)r.resetMaskSet.call(s,!1),e=0,t=i.length,a=r.determineNewCaretPosition.call(s,{begin:0,end:0},!1).begin;else{for(n=e;n<t;n++)l.validPositions.splice(e,0);a=e}
var d=new u.Event("keypress");for(n=e;n<t;n++){d.key=p[n].toString(),s.ignorable=!1;var h=o.EventHandlers.keypressEvent.call(s,d,!0,!1,!1,a);!1!==h&&void 0!==h&&(a=h.forwardPosition)}
c.skipOptionalPartCharacter=f}
function h(e,t,i){var a=this,o=this.maskset,s=this.dependencyLib;if(void 0===e)for(e=t-1;e>0&&!o.validPositions[e];e--);for(var l=e;l<t;l++){if(void 0===o.validPositions[l]&&!r.isMask.call(a,l,!1))if(0==l?n.getTest.call(a,l):o.validPositions[l-1]){var c=n.getTests.call(a,l).slice();""===c[c.length-1].match.def&&c.pop();var u,p=n.determineTestTemplate.call(a,l,c);if(p&&(!0!==p.match.jit||"master"===p.match.newBlockMarker&&(u=o.validPositions[l+1])&&!0===u.match.optionalQuantifier)&&((p=s.extend({},p,{input:n.getPlaceholder.call(a,l,p.match,!0)||p.match.def})).generatedInput=!0,v.call(a,l,p,!0),!0!==i)){var d=o.validPositions[t].input;return o.validPositions[t]=void 0,f.call(a,t,d,!0,!0)}}}}
function v(e,t,i,a){var o=this,s=this.maskset,l=this.opts,c=this.dependencyLib;function u(e,t,i){var n=t[e];if(void 0!==n&&!0===n.match.static&&!0!==n.match.optionality&&(void 0===t[0]||void 0===t[0].alternation)){var a=i.begin<=e-1?t[e-1]&&!0===t[e-1].match.static&&t[e-1]:t[e-1],r=i.end>e+1?t[e+1]&&!0===t[e+1].match.static&&t[e+1]:t[e+1];return a&&r}
return!1}
var d=0,h=void 0!==e.begin?e.begin:e,v=void 0!==e.end?e.end:e,m=!0;if(e.begin>e.end&&(h=e.end,v=e.begin),a=void 0!==a?a:h,void 0===i&&(h!==v||l.insertMode&&void 0!==s.validPositions[a]||void 0===t||t.match.optionalQuantifier||t.match.optionality)){var g,y=c.extend(!0,[],s.validPositions),k=r.getLastValidPosition.call(o,void 0,!0);for(s.p=h,g=k;g>=h;g--)s.validPositions.splice(g,1),void 0===t&&delete s.tests[g+1];var b,x,P=a,w=P;for(t&&(s.validPositions[a]=c.extend(!0,{},t),w++,P++),null==y[v]&&s.jitOffset[v]&&(v+=s.jitOffset[v]+1),g=t?v:v-1;g<=k;g++){if(void 0!==(b=y[g])&&!0!==b.generatedInput&&(g>=v||g>=h&&u(g,y,{begin:h,end:v}))){for(;""!==n.getTest.call(o,w).match.def;){if(!1!==(x=p.call(o,w,b,l))||"+"===b.match.def){"+"===b.match.def&&r.getBuffer.call(o,!0);var S=f.call(o,w,b.input,"+"!==b.match.def,!0);if(m=!1!==S,P=(S.pos||w)+1,!m&&x)break}else m=!1;if(m){void 0===t&&b.match.static&&g===e.begin&&d++;break}
if(!m&&r.getBuffer.call(o),w>s.maskLength)break;w++}
""==n.getTest.call(o,w).match.def&&(m=!1),w=P}
if(!m)break}
if(!m)return s.validPositions=c.extend(!0,[],y),r.resetMaskSet.call(o,!0),!1}else t&&n.getTest.call(o,a).match.cd===t.match.cd&&(s.validPositions[a]=c.extend(!0,{},t));return r.resetMaskSet.call(o,!0),d}},7957:function(t){t.exports=e}},i={};function n(e){var a=i[e];if(void 0!==a)return a.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,n),r.exports}
var a={};return function(){var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t,i=(t=n(3046))&&t.__esModule?t:{default:t};n(443);var r=i.default;e.default=r}(),a}()}));/*! Magnific Popup - v1.1.0 - 2016-02-20
* http://dimsemenov.com/plugins/magnific-popup/
* Copyright (c) 2016 Dmitry Semenov; */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});(function(a){var b="0.3.4",c="hasOwnProperty",d=/[\.\/]/,e="*",f=function(){},g=function(a,b){return a-b},h,i,j={n:{}},k=function(a,b){var c=j,d=i,e=Array.prototype.slice.call(arguments,2),f=k.listeners(a),l=0,m=!1,n,o=[],p={},q=[],r=h,s=[];h=a,i=0;for(var t=0,u=f.length;t<u;t++)"zIndex"in f[t]&&(o.push(f[t].zIndex),f[t].zIndex<0&&(p[f[t].zIndex]=f[t]));o.sort(g);while(o[l]<0){n=p[o[l++]],q.push(n.apply(b,e));if(i){i=d;return q}}for(t=0;t<u;t++){n=f[t];if("zIndex"in n)if(n.zIndex==o[l]){q.push(n.apply(b,e));if(i)break;do{l++,n=p[o[l]],n&&q.push(n.apply(b,e));if(i)break}while(n)}else p[n.zIndex]=n;else{q.push(n.apply(b,e));if(i)break}}i=d,h=r;return q.length?q:null};k.listeners=function(a){var b=a.split(d),c=j,f,g,h,i,k,l,m,n,o=[c],p=[];for(i=0,k=b.length;i<k;i++){n=[];for(l=0,m=o.length;l<m;l++){c=o[l].n,g=[c[b[i]],c[e]],h=2;while(h--)f=g[h],f&&(n.push(f),p=p.concat(f.f||[]))}o=n}return p},k.on=function(a,b){var c=a.split(d),e=j;for(var g=0,h=c.length;g<h;g++)e=e.n,!e[c[g]]&&(e[c[g]]={n:{}}),e=e[c[g]];e.f=e.f||[];for(g=0,h=e.f.length;g<h;g++)if(e.f[g]==b)return f;e.f.push(b);return function(a){+a==+a&&(b.zIndex=+a)}},k.stop=function(){i=1},k.nt=function(a){if(a)return(new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)")).test(h);return h},k.off=k.unbind=function(a,b){var f=a.split(d),g,h,i,k,l,m,n,o=[j];for(k=0,l=f.length;k<l;k++)for(m=0;m<o.length;m+=i.length-2){i=[m,1],g=o[m].n;if(f[k]!=e)g[f[k]]&&i.push(g[f[k]]);else for(h in g)g[c](h)&&i.push(g[h]);o.splice.apply(o,i)}for(k=0,l=o.length;k<l;k++){g=o[k];while(g.n){if(b){if(g.f){for(m=0,n=g.f.length;m<n;m++)if(g.f[m]==b){g.f.splice(m,1);break}!g.f.length&&delete g.f}for(h in g.n)if(g.n[c](h)&&g.n[h].f){var p=g.n[h].f;for(m=0,n=p.length;m<n;m++)if(p[m]==b){p.splice(m,1);break}!p.length&&delete g.n[h].f}}else{delete g.f;for(h in g.n)g.n[c](h)&&g.n[h].f&&delete g.n[h].f}g=g.n}}},k.once=function(a,b){var c=function(){var d=b.apply(this,arguments);k.unbind(a,c);return d};return k.on(a,c)},k.version=b,k.toString=function(){return"You are running Eve "+b},typeof module!="undefined"&&module.exports?module.exports=k:typeof define!="undefined"?define("eve",[],function(){return k}):a.eve=k})(this),function(){function cF(a){for(var b=0;b<cy.length;b++)cy[b].el.paper==a&&cy.splice(b--,1)}function cE(b,d,e,f,h,i){e=Q(e);var j,k,l,m=[],o,p,q,t=b.ms,u={},v={},w={};if(f)for(y=0,z=cy.length;y<z;y++){var x=cy[y];if(x.el.id==d.id&&x.anim==b){x.percent!=e?(cy.splice(y,1),l=1):k=x,d.attr(x.totalOrigin);break}}else f=+v;for(var y=0,z=b.percents.length;y<z;y++){if(b.percents[y]==e||b.percents[y]>f*b.top){e=b.percents[y],p=b.percents[y-1]||0,t=t/b.top*(e-p),o=b.percents[y+1],j=b.anim[e];break}f&&d.attr(b.anim[b.percents[y]])}if(!!j){if(!k){for(var A in j)if(j[g](A))if(U[g](A)||d.paper.customAttributes[g](A)){u[A]=d.attr(A),u[A]==null&&(u[A]=T[A]),v[A]=j[A];switch(U[A]){case C:w[A]=(v[A]-u[A])/t;break;case"colour":u[A]=a.getRGB(u[A]);var B=a.getRGB(v[A]);w[A]={r:(B.r-u[A].r)/t,g:(B.g-u[A].g)/t,b:(B.b-u[A].b)/t};break;case"path":var D=bR(u[A],v[A]),E=D[1];u[A]=D[0],w[A]=[];for(y=0,z=u[A].length;y<z;y++){w[A][y]=[0];for(var F=1,G=u[A][y].length;F<G;F++)w[A][y][F]=(E[y][F]-u[A][y][F])/t}break;case"transform":var H=d._,I=ca(H[A],v[A]);if(I){u[A]=I.from,v[A]=I.to,w[A]=[],w[A].real=!0;for(y=0,z=u[A].length;y<z;y++){w[A][y]=[u[A][y][0]];for(F=1,G=u[A][y].length;F<G;F++)w[A][y][F]=(v[A][y][F]-u[A][y][F])/t}}else{var J=d.matrix||new cb,K={_:{transform:H.transform},getBBox:function(){return d.getBBox(1)}};u[A]=[J.a,J.b,J.c,J.d,J.e,J.f],b$(K,v[A]),v[A]=K._.transform,w[A]=[(K.matrix.a-J.a)/t,(K.matrix.b-J.b)/t,(K.matrix.c-J.c)/t,(K.matrix.d-J.d)/t,(K.matrix.e-J.e)/t,(K.matrix.f-J.f)/t]}break;case"csv":var L=r(j[A])[s](c),M=r(u[A])[s](c);if(A=="clip-rect"){u[A]=M,w[A]=[],y=M.length;while(y--)w[A][y]=(L[y]-u[A][y])/t}v[A]=L;break;default:L=[][n](j[A]),M=[][n](u[A]),w[A]=[],y=d.paper.customAttributes[A].length;while(y--)w[A][y]=((L[y]||0)-(M[y]||0))/t}}var O=j.easing,P=a.easing_formulas[O];if(!P){P=r(O).match(N);if(P&&P.length==5){var R=P;P=function(a){return cC(a,+R[1],+R[2],+R[3],+R[4],t)}}else P=bf}q=j.start||b.start||+(new Date),x={anim:b,percent:e,timestamp:q,start:q+(b.del||0),status:0,initstatus:f||0,stop:!1,ms:t,easing:P,from:u,diff:w,to:v,el:d,callback:j.callback,prev:p,next:o,repeat:i||b.times,origin:d.attr(),totalOrigin:h},cy.push(x);if(f&&!k&&!l){x.stop=!0,x.start=new Date-t*f;if(cy.length==1)return cA()}l&&(x.start=new Date-x.ms*f),cy.length==1&&cz(cA)}else k.initstatus=f,k.start=new Date-k.ms*f;eve("raphael.anim.start."+d.id,d,b)}}function cD(a,b){var c=[],d={};this.ms=b,this.times=1;if(a){for(var e in a)a[g](e)&&(d[Q(e)]=a[e],c.push(Q(e)));c.sort(bd)}this.anim=d,this.top=c[c.length-1],this.percents=c}function cC(a,b,c,d,e,f){function o(a,b){var c,d,e,f,j,k;for(e=a,k=0;k<8;k++){f=m(e)-a;if(z(f)<b)return e;j=(3*i*e+2*h)*e+g;if(z(j)<1e-6)break;e=e-f/j}c=0,d=1,e=a;if(e<c)return c;if(e>d)return d;while(c<d){f=m(e);if(z(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function m(a){return((i*a+h)*a+g)*a}var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;return n(a,1/(200*f))}function cq(){return this.x+q+this.y+q+this.width+" × "+this.height}function cp(){return this.x+q+this.y}function cb(a,b,c,d,e,f){a!=null?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function bH(b,c,d){b=a._path2curve(b),c=a._path2curve(c);var e,f,g,h,i,j,k,l,m,n,o=d?0:[];for(var p=0,q=b.length;p<q;p++){var r=b[p];if(r[0]=="M")e=i=r[1],f=j=r[2];else{r[0]=="C"?(m=[e,f].concat(r.slice(1)),e=m[6],f=m[7]):(m=[e,f,e,f,i,j,i,j],e=i,f=j);for(var s=0,t=c.length;s<t;s++){var u=c[s];if(u[0]=="M")g=k=u[1],h=l=u[2];else{u[0]=="C"?(n=[g,h].concat(u.slice(1)),g=n[6],h=n[7]):(n=[g,h,g,h,k,l,k,l],g=k,h=l);var v=bG(m,n,d);if(d)o+=v;else{for(var w=0,x=v.length;w<x;w++)v[w].segment1=p,v[w].segment2=s,v[w].bez1=m,v[w].bez2=n;o=o.concat(v)}}}}}return o}function bG(b,c,d){var e=a.bezierBBox(b),f=a.bezierBBox(c);if(!a.isBBoxIntersect(e,f))return d?0:[];var g=bB.apply(0,b),h=bB.apply(0,c),i=~~(g/5),j=~~(h/5),k=[],l=[],m={},n=d?0:[];for(var o=0;o<i+1;o++){var p=a.findDotsAtSegment.apply(a,b.concat(o/i));k.push({x:p.x,y:p.y,t:o/i})}for(o=0;o<j+1;o++)p=a.findDotsAtSegment.apply(a,c.concat(o/j)),l.push({x:p.x,y:p.y,t:o/j});for(o=0;o<i;o++)for(var q=0;q<j;q++){var r=k[o],s=k[o+1],t=l[q],u=l[q+1],v=z(s.x-r.x)<.001?"y":"x",w=z(u.x-t.x)<.001?"y":"x",x=bD(r.x,r.y,s.x,s.y,t.x,t.y,u.x,u.y);if(x){if(m[x.x.toFixed(4)]==x.y.toFixed(4))continue;m[x.x.toFixed(4)]=x.y.toFixed(4);var y=r.t+z((x[v]-r[v])/(s[v]-r[v]))*(s.t-r.t),A=t.t+z((x[w]-t[w])/(u[w]-t[w]))*(u.t-t.t);y>=0&&y<=1&&A>=0&&A<=1&&(d?n++:n.push({x:x.x,y:x.y,t1:y,t2:A}))}}return n}function bF(a,b){return bG(a,b,1)}function bE(a,b){return bG(a,b)}function bD(a,b,c,d,e,f,g,h){if(!(x(a,c)<y(e,g)||y(a,c)>x(e,g)||x(b,d)<y(f,h)||y(b,d)>x(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(!k)return;var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(n<+y(a,c).toFixed(2)||n>+x(a,c).toFixed(2)||n<+y(e,g).toFixed(2)||n>+x(e,g).toFixed(2)||o<+y(b,d).toFixed(2)||o>+x(b,d).toFixed(2)||o<+y(f,h).toFixed(2)||o>+x(f,h).toFixed(2))return;return{x:l,y:m}}}function bC(a,b,c,d,e,f,g,h,i){if(!(i<0||bB(a,b,c,d,e,f,g,h)<i)){var j=1,k=j/2,l=j-k,m,n=.01;m=bB(a,b,c,d,e,f,g,h,l);while(z(m-i)>n)k/=2,l+=(m<i?1:-1)*k,m=bB(a,b,c,d,e,f,g,h,l);return l}}function bB(a,b,c,d,e,f,g,h,i){i==null&&(i=1),i=i>1?1:i<0?0:i;var j=i/2,k=12,l=[-0.1252,.1252,-0.3678,.3678,-0.5873,.5873,-0.7699,.7699,-0.9041,.9041,-0.9816,.9816],m=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],n=0;for(var o=0;o<k;o++){var p=j*l[o]+j,q=bA(p,a,c,e,g),r=bA(p,b,d,f,h),s=q*q+r*r;n+=m[o]*w.sqrt(s)}return j*n}function bA(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function by(a,b){var c=[];for(var d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function bx(){return this.hex}function bv(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join("␀"),h=d.cache=d.cache||{},i=d.count=d.count||[];if(h[g](f)){bu(i,f);return c?c(h[f]):h[f]}i.length>=1e3&&delete h[i.shift()],i.push(f),h[f]=a[m](b,e);return c?c(h[f]):h[f]}return d}function bu(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function bm(a){if(Object(a)!==a)return a;var b=new a.constructor;for(var c in a)a[g](c)&&(b[c]=bm(a[c]));return b}function a(c){if(a.is(c,"function"))return b?c():eve.on("raphael.DOMload",c);if(a.is(c,E))return a._engine.create[m](a,c.splice(0,3+a.is(c[0],C))).add(c);var d=Array.prototype.slice.call(arguments,0);if(a.is(d[d.length-1],"function")){var e=d.pop();return b?e.call(a._engine.create[m](a,d)):eve.on("raphael.DOMload",function(){e.call(a._engine.create[m](a,d))})}return a._engine.create[m](a,arguments)}a.version="2.1.0",a.eve=eve;var b,c=/[, ]+/,d={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},e=/\{(\d+)\}/g,f="prototype",g="hasOwnProperty",h={doc:document,win:window},i={was:Object.prototype[g].call(h.win,"Raphael"),is:h.win.Raphael},j=function(){this.ca=this.customAttributes={}},k,l="appendChild",m="apply",n="concat",o="createTouch"in h.doc,p="",q=" ",r=String,s="split",t="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[s](q),u={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},v=r.prototype.toLowerCase,w=Math,x=w.max,y=w.min,z=w.abs,A=w.pow,B=w.PI,C="number",D="string",E="array",F="toString",G="fill",H=Object.prototype.toString,I={},J="push",K=a._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,L=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,M={NaN:1,Infinity:1,"-Infinity":1},N=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,O=w.round,P="setAttribute",Q=parseFloat,R=parseInt,S=r.prototype.toUpperCase,T=a._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},U=a._availableAnimAttrs={blur:C,"clip-rect":"csv",cx:C,cy:C,fill:"colour","fill-opacity":C,"font-size":C,height:C,opacity:C,path:"path",r:C,rx:C,ry:C,stroke:"colour","stroke-opacity":C,"stroke-width":C,transform:"transform",width:C,x:C,y:C},V=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g,W=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,X={hs:1,rg:1},Y=/,?([achlmqrstvxz]),?/gi,Z=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,$=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,_=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig,ba=a._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,bb={},bc=function(a,b){return a.key-b.key},bd=function(a,b){return Q(a)-Q(b)},be=function(){},bf=function(a){return a},bg=a._rectPath=function(a,b,c,d,e){if(e)return[["M",a+e,b],["l",c-e*2,0],["a",e,e,0,0,1,e,e],["l",0,d-e*2],["a",e,e,0,0,1,-e,e],["l",e*2-c,0],["a",e,e,0,0,1,-e,-e],["l",0,e*2-d],["a",e,e,0,0,1,e,-e],["z"]];return[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},bh=function(a,b,c,d){d==null&&(d=c);return[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},bi=a._getPath={path:function(a){return a.attr("path")},circle:function(a){var b=a.attrs;return bh(b.cx,b.cy,b.r)},ellipse:function(a){var b=a.attrs;return bh(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=a.attrs;return bg(b.x,b.y,b.width,b.height,b.r)},image:function(a){var b=a.attrs;return bg(b.x,b.y,b.width,b.height)},text:function(a){var b=a._getBBox();return bg(b.x,b.y,b.width,b.height)}},bj=a.mapPath=function(a,b){if(!b)return a;var c,d,e,f,g,h,i;a=bR(a);for(e=0,g=a.length;e<g;e++){i=a[e];for(f=1,h=i.length;f<h;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d}return a};a._g=h,a.type=h.win.SVGAngle||h.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(a.type=="VML"){var bk=h.doc.createElement("div"),bl;bk.innerHTML='<v:shape adj="1"/>',bl=bk.firstChild,bl.style.behavior="url(#default#VML)";if(!bl||typeof bl.adj!="object")return a.type=p;bk=null}a.svg=!(a.vml=a.type=="VML"),a._Paper=j,a.fn=k=j.prototype=a.prototype,a._id=0,a._oid=0,a.is=function(a,b){b=v.call(b);if(b=="finite")return!M[g](+a);if(b=="array")return a instanceof Array;return b=="null"&&a===null||b==typeof a&&a!==null||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||H.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return(180+w.atan2(-i,-h)*180/B+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*B/180},a.deg=function(a){return a*180/B%360},a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,E)){var e=b.length;while(e--)if(z(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(f<d)return c-f;if(f>b-d)return c-f+b}return c};var bn=a.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=w.random()*16|0,c=a=="x"?b:b&3|8;return c.toString(16)});a.setWindow=function(b){eve("raphael.setWindow",a,h.win,b),h.win=b,h.doc=h.win.document,a._engine.initWin&&a._engine.initWin(h.win)};var bo=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write("<body>"),e.close(),d=e.body}catch(f){d=createPopup().document.body}var g=d.createTextRange();bo=bv(function(a){try{d.style.color=r(a).replace(c,p);var b=g.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=h.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",h.doc.body.appendChild(i),bo=bv(function(a){i.style.color=a;return h.doc.defaultView.getComputedStyle(i,p).getPropertyValue("color")})}return bo(b)},bp=function(){return"hsb("+[this.h,this.s,this.b]+")"},bq=function(){return"hsl("+[this.h,this.s,this.l]+")"},br=function(){return this.hex},bs=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,D)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;return[b,c,d]},bt=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:br};a.is(e,"finite")&&(f.opacity=e);return f};a.color=function(b){var c;a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b?(c=a.hsb2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b?(c=a.hsl2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):(a.is(b,"string")&&(b=a.getRGB(b)),a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b?(c=a.rgb2hsl(b),b.h=c.h,b.s=c.s,b.l=c.l,c=a.rgb2hsb(b),b.v=c.b):(b={hex:"none"},b.r=b.g=b.b=b.h=b.s=b.v=b.l=-1)),b.toString=br;return b},a.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;a=a%360/60,i=c*b,h=i*(1-z(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bt(e,f,g,d)},a.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h);if(a>1||b>1||c>1)a/=360,b/=100,c/=100;a*=360;var e,f,g,h,i;a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-z(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bt(e,f,g,d)},a.rgb2hsb=function(a,b,c){c=bs(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;f=x(a,b,c),g=f-y(a,b,c),d=g==0?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=g==0?0:g/f;return{h:d,s:e,b:f,toString:bp}},a.rgb2hsl=function(a,b,c){c=bs(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;g=x(a,b,c),h=y(a,b,c),i=g-h,d=i==0?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=i==0?0:f<.5?i/(2*f):i/(2-2*f);return{h:d,s:e,l:f,toString:bq}},a._path2string=function(){return this.join(",").replace(Y,"$1")};var bw=a._preload=function(a,b){var c=h.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,h.doc.body.removeChild(this)},c.onerror=function(){h.doc.body.removeChild(this)},h.doc.body.appendChild(c),c.src=a};a.getRGB=bv(function(b){if(!b||!!((b=r(b)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bx};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:bx};!X[g](b.toLowerCase().substring(0,2))&&b.charAt()!="#"&&(b=bo(b));var c,d,e,f,h,i,j,k=b.match(L);if(k){k[2]&&(f=R(k[2].substring(5),16),e=R(k[2].substring(3,5),16),d=R(k[2].substring(1,3),16)),k[3]&&(f=R((i=k[3].charAt(3))+i,16),e=R((i=k[3].charAt(2))+i,16),d=R((i=k[3].charAt(1))+i,16)),k[4]&&(j=k[4][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),k[1].toLowerCase().slice(0,4)=="rgba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100));if(k[5]){j=k[5][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,f,h)}if(k[6]){j=k[6][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsla"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,f,h)}k={r:d,g:e,b:f,toString:bx},k.hex="#"+(16777216|f|e<<8|d<<16).toString(16).slice(1),a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bx}},a),a.hsb=bv(function(b,c,d){return a.hsb2rgb(b,c,d).hex}),a.hsl=bv(function(b,c,d){return a.hsl2rgb(b,c,d).hex}),a.rgb=bv(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b}));return c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=function(b){if(!b)return null;var c=bz(b);if(c.arr)return bJ(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];a.is(b,E)&&a.is(b[0],E)&&(e=bJ(b)),e.length||r(b).replace(Z,function(a,b,c){var f=[],g=b.toLowerCase();c.replace(_,function(a,b){b&&f.push(+b)}),g=="m"&&f.length>2&&(e.push([b][n](f.splice(0,2))),g="l",b=b=="m"?"l":"L");if(g=="r")e.push([b][n](f));else while(f.length>=d[g]){e.push([b][n](f.splice(0,d[g])));if(!d[g])break}}),e.toString=a._path2string,c.arr=bJ(e);return e},a.parseTransformString=bv(function(b){if(!b)return null;var c={r:3,s:4,t:2,m:6},d=[];a.is(b,E)&&a.is(b[0],E)&&(d=bJ(b)),d.length||r(b).replace($,function(a,b,c){var e=[],f=v.call(b);c.replace(_,function(a,b){b&&e.push(+b)}),d.push([b][n](e))}),d.toString=a._path2string;return d});var bz=function(a){var b=bz.ps=bz.ps||{};b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[g](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])});return b[a]};a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=A(j,3),l=A(j,2),m=i*i,n=m*i,o=k*a+l*3*i*c+j*3*i*i*e+n*g,p=k*b+l*3*i*d+j*3*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,x=j*e+i*g,y=j*f+i*h,z=90-w.atan2(q-s,r-t)*180/B;(q>s||r<t)&&(z+=180);return{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:x,y:y},alpha:z}},a.bezierBBox=function(b,c,d,e,f,g,h,i){a.is(b,"array")||(b=[b,c,d,e,f,g,h,i]);var j=bQ.apply(null,b);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},a.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},a.isBBoxIntersect=function(b,c){var d=a.isPointInsideBBox;return d(c,b.x,b.y)||d(c,b.x2,b.y)||d(c,b.x,b.y2)||d(c,b.x2,b.y2)||d(b,c.x,c.y)||d(b,c.x2,c.y)||d(b,c.x,c.y2)||d(b,c.x2,c.y2)||(b.x<c.x2&&b.x>c.x||c.x<b.x2&&c.x>b.x)&&(b.y<c.y2&&b.y>c.y||c.y<b.y2&&c.y>b.y)},a.pathIntersection=function(a,b){return bH(a,b)},a.pathIntersectionNumber=function(a,b){return bH(a,b,1)},a.isPointInsidePath=function(b,c,d){var e=a.pathBBox(b);return a.isPointInsideBBox(e,c,d)&&bH(b,[["M",c,d],["H",e.x2+10]],1)%2==1},a._removedFactory=function(a){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+a+"” of removed object",a)}};var bI=a.pathBBox=function(a){var b=bz(a);if(b.bbox)return b.bbox;if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=bR(a);var c=0,d=0,e=[],f=[],g;for(var h=0,i=a.length;h<i;h++){g=a[h];if(g[0]=="M")c=g[1],d=g[2],e.push(c),f.push(d);else{var j=bQ(c,d,g[1],g[2],g[3],g[4],g[5],g[6]);e=e[n](j.min.x,j.max.x),f=f[n](j.min.y,j.max.y),c=g[5],d=g[6]}}var k=y[m](0,e),l=y[m](0,f),o=x[m](0,e),p=x[m](0,f),q={x:k,y:l,x2:o,y2:p,width:o-k,height:p-l};b.bbox=bm(q);return q},bJ=function(b){var c=bm(b);c.toString=a._path2string;return c},bK=a._pathToRelative=function(b){var c=bz(b);if(c.rel)return bJ(c.rel);if(!a.is(b,E)||!a.is(b&&b[0],E))b=a.parsePathString(b);var d=[],e=0,f=0,g=0,h=0,i=0;b[0][0]=="M"&&(e=b[0][1],f=b[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=b.length;j<k;j++){var l=d[j]=[],m=b[j];if(m[0]!=v.call(m[0])){l[0]=v.call(m[0]);switch(l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;n<o;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}}else{l=d[j]=[],m[0]=="m"&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;p<q;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}d.toString=a._path2string,c.rel=bJ(d);return d},bL=a._pathToAbsolute=function(b){var c=bz(b);if(c.abs)return bJ(c.abs);if(!a.is(b,E)||!a.is(b&&b[0],E))b=a.parsePathString(b);if(!b||!b.length)return[["M",0,0]];var d=[],e=0,f=0,g=0,h=0,i=0;b[0][0]=="M"&&(e=+b[0][1],f=+b[0][2],g=e,h=f,i++,d[0]=["M",e,f]);var j=b.length==3&&b[0][0]=="M"&&b[1][0].toUpperCase()=="R"&&b[2][0].toUpperCase()=="Z";for(var k,l,m=i,o=b.length;m<o;m++){d.push(k=[]),l=b[m];if(l[0]!=S.call(l[0])){k[0]=S.call(l[0]);switch(k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+f);break;case"V":k[1]=+l[1]+f;break;case"H":k[1]=+l[1]+e;break;case"R":var p=[e,f][n](l.slice(1));for(var q=2,r=p.length;q<r;q++)p[q]=+p[q]+e,p[++q]=+p[q]+f;d.pop(),d=d[n](by(p,j));break;case"M":g=+l[1]+e,h=+l[2]+f;default:for(q=1,r=l.length;q<r;q++)k[q]=+l[q]+(q%2?e:f)}}else if(l[0]=="R")p=[e,f][n](l.slice(1)),d.pop(),d=d[n](by(p,j)),k=["R"][n](l.slice(-2));else for(var s=0,t=l.length;s<t;s++)k[s]=l[s];switch(k[0]){case"Z":e=g,f=h;break;case"H":e=k[1];break;case"V":f=k[1];break;case"M":g=k[k.length-2],h=k[k.length-1];default:e=k[k.length-2],f=k[k.length-1]}}d.toString=a._path2string,c.abs=bJ(d);return d},bM=function(a,b,c,d){return[a,b,c,d,c,d]},bN=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},bO=function(a,b,c,d,e,f,g,h,i,j){var k=B*120/180,l=B/180*(+e||0),m=[],o,p=bv(function(a,b,c){var d=a*w.cos(c)-b*w.sin(c),e=a*w.sin(c)+b*w.cos(c);return{x:d,y:e}});if(!j){o=p(a,b,-l),a=o.x,b=o.y,o=p(h,i,-l),h=o.x,i=o.y;var q=w.cos(B/180*e),r=w.sin(B/180*e),t=(a-h)/2,u=(b-i)/2,v=t*t/(c*c)+u*u/(d*d);v>1&&(v=w.sqrt(v),c=v*c,d=v*d);var x=c*c,y=d*d,A=(f==g?-1:1)*w.sqrt(z((x*y-x*u*u-y*t*t)/(x*u*u+y*t*t))),C=A*c*u/d+(a+h)/2,D=A*-d*t/c+(b+i)/2,E=w.asin(((b-D)/d).toFixed(9)),F=w.asin(((i-D)/d).toFixed(9));E=a<C?B-E:E,F=h<C?B-F:F,E<0&&(E=B*2+E),F<0&&(F=B*2+F),g&&E>F&&(E=E-B*2),!g&&F>E&&(F=F-B*2)}else E=j[0],F=j[1],C=j[2],D=j[3];var G=F-E;if(z(G)>k){var H=F,I=h,J=i;F=E+k*(g&&F>E?1:-1),h=C+c*w.cos(F),i=D+d*w.sin(F),m=bO(h,i,c,d,e,0,g,I,J,[F,H,C,D])}G=F-E;var K=w.cos(E),L=w.sin(E),M=w.cos(F),N=w.sin(F),O=w.tan(G/4),P=4/3*c*O,Q=4/3*d*O,R=[a,b],S=[a+P*L,b-Q*K],T=[h+P*N,i-Q*M],U=[h,i];S[0]=2*R[0]-S[0],S[1]=2*R[1]-S[1];if(j)return[S,T,U][n](m);m=[S,T,U][n](m).join()[s](",");var V=[];for(var W=0,X=m.length;W<X;W++)V[W]=W%2?p(m[W-1],m[W],l).y:p(m[W],m[W+1],l).x;return V},bP=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:A(j,3)*a+A(j,2)*3*i*c+j*3*i*i*e+A(i,3)*g,y:A(j,3)*b+A(j,2)*3*i*d+j*3*i*i*f+A(i,3)*h}},bQ=bv(function(a,b,c,d,e,f,g,h){var i=e-2*c+a-(g-2*e+c),j=2*(c-a)-2*(e-c),k=a-c,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,o=[b,h],p=[a,g],q;z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bP(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bP(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y)),i=f-2*d+b-(h-2*f+d),j=2*(d-b)-2*(f-d),k=b-d,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bP(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bP(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y));return{min:{x:y[m](0,p),y:y[m](0,o)},max:{x:x[m](0,p),y:x[m](0,o)}}}),bR=a._path2curve=bv(function(a,b){var c=!b&&bz(a);if(!b&&c.curve)return bJ(c.curve);var d=bL(a),e=b&&bL(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][n](bO[m](0,[b.x,b.y][n](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][n](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][n](bN(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][n](bN(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][n](bM(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][n](bM(b.x,b.y,a[1],b.y));break;case"V":a=["C"][n](bM(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][n](bM(b.x,b.y,b.X,b.Y))}return a},i=function(a,b){if(a[b].length>7){a[b].shift();var c=a[b];while(c.length)a.splice(b++,0,["C"][n](c.splice(0,6)));a.splice(b,1),l=x(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],l=x(d.length,e&&e.length||0))};for(var k=0,l=x(d.length,e&&e.length||0);k<l;k++){d[k]=h(d[k],f),i(d,k),e&&(e[k]=h(e[k],g)),e&&i(e,k),j(d,e,f,g,k),j(e,d,g,f,k);var o=d[k],p=e&&e[k],q=o.length,r=e&&p.length;f.x=o[q-2],f.y=o[q-1],f.bx=Q(o[q-4])||f.x,f.by=Q(o[q-3])||f.y,g.bx=e&&(Q(p[r-4])||g.x),g.by=e&&(Q(p[r-3])||g.y),g.x=e&&p[r-2],g.y=e&&p[r-1]}e||(c.curve=bJ(d));return e?[d,e]:d},null,bJ),bS=a._parseDots=bv(function(b){var c=[];for(var d=0,e=b.length;d<e;d++){var f={},g=b[d].match(/^([^:]*):?([\d\.]*)/);f.color=a.getRGB(g[1]);if(f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c.push(f)}for(d=1,e=c.length-1;d<e;d++)if(!c[d].offset){var h=Q(c[d-1].offset||0),i=0;for(var j=d+1;j<e;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=Q(i);var k=(i-h)/(j-d+1);for(;d<j;d++)h+=k,c[d].offset=h+"%"}return c}),bT=a._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)},bU=a._tofront=function(a,b){b.top!==a&&(bT(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},bV=a._toback=function(a,b){b.bottom!==a&&(bT(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},bW=a._insertafter=function(a,b,c){bT(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},bX=a._insertbefore=function(a,b,c){bT(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},bY=a.toMatrix=function(a,b){var c=bI(a),d={_:{transform:p},getBBox:function(){return c}};b$(d,b);return d.matrix},bZ=a.transformPath=function(a,b){return bj(a,bY(a,b))},b$=a._extractTransform=function(b,c){if(c==null)return b._.transform;c=r(c).replace(/\.{3}|\u2026/g,b._.transform||p);var d=a.parseTransformString(c),e=0,f=0,g=0,h=1,i=1,j=b._,k=new cb;j.transform=d||[];if(d)for(var l=0,m=d.length;l<m;l++){var n=d[l],o=n.length,q=r(n[0]).toLowerCase(),s=n[0]!=q,t=s?k.invert():0,u,v,w,x,y;q=="t"&&o==3?s?(u=t.x(0,0),v=t.y(0,0),w=t.x(n[1],n[2]),x=t.y(n[1],n[2]),k.translate(w-u,x-v)):k.translate(n[1],n[2]):q=="r"?o==2?(y=y||b.getBBox(1),k.rotate(n[1],y.x+y.width/2,y.y+y.height/2),e+=n[1]):o==4&&(s?(w=t.x(n[2],n[3]),x=t.y(n[2],n[3]),k.rotate(n[1],w,x)):k.rotate(n[1],n[2],n[3]),e+=n[1]):q=="s"?o==2||o==3?(y=y||b.getBBox(1),k.scale(n[1],n[o-1],y.x+y.width/2,y.y+y.height/2),h*=n[1],i*=n[o-1]):o==5&&(s?(w=t.x(n[3],n[4]),x=t.y(n[3],n[4]),k.scale(n[1],n[2],w,x)):k.scale(n[1],n[2],n[3],n[4]),h*=n[1],i*=n[2]):q=="m"&&o==7&&k.add(n[1],n[2],n[3],n[4],n[5],n[6]),j.dirtyT=1,b.matrix=k}b.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,h==1&&i==1&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1},b_=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return a.length==4?[b,0,a[2],a[3]]:[b,0];case"s":return a.length==5?[b,1,1,a[3],a[4]]:a.length==3?[b,1,1]:[b,1]}},ca=a._equaliseTransform=function(b,c){c=r(c).replace(/\.{3}|\u2026/g,b),b=a.parseTransformString(b)||[],c=a.parseTransformString(c)||[];var d=x(b.length,c.length),e=[],f=[],g=0,h,i,j,k;for(;g<d;g++){j=b[g]||b_(c[g]),k=c[g]||b_(j);if(j[0]!=k[0]||j[0].toLowerCase()=="r"&&(j[2]!=k[2]||j[3]!=k[3])||j[0].toLowerCase()=="s"&&(j[3]!=k[3]||j[4]!=k[4]))return;e[g]=[],f[g]=[];for(h=0,i=x(j.length,k.length);h<i;h++)h in j&&(e[g][h]=j[h]),h in k&&(f[g][h]=k[h])}return{from:e,to:f}};a._getContainer=function(b,c,d,e){var f;f=e==null&&!a.is(b,"object")?h.doc.getElementById(b):b;if(f!=null){if(f.tagName)return c==null?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d};return{container:1,x:b,y:c,width:d,height:e}}},a.pathToRelative=bK,a._engine={},a.path2curve=bR,a.matrix=function(a,b,c,d,e,f){return new cb(a,b,c,d,e,f)},function(b){function d(a){var b=w.sqrt(c(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}function c(a){return a[0]*a[0]+a[1]*a[1]}b.add=function(a,b,c,d,e,f){var g=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],i=[[a,c,e],[b,d,f],[0,0,1]],j,k,l,m;a&&a instanceof cb&&(i=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]);for(j=0;j<3;j++)for(k=0;k<3;k++){m=0;for(l=0;l<3;l++)m+=h[j][l]*i[l][k];g[j][k]=m}this.a=g[0][0],this.b=g[1][0],this.c=g[0][1],this.d=g[1][1],this.e=g[0][2],this.f=g[1][2]},b.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new cb(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},b.clone=function(){return new cb(this.a,this.b,this.c,this.d,this.e,this.f)},b.translate=function(a,b){this.add(1,0,0,1,a,b)},b.scale=function(a,b,c,d){b==null&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},b.rotate=function(b,c,d){b=a.rad(b),c=c||0,d=d||0;var e=+w.cos(b).toFixed(9),f=+w.sin(b).toFixed(9);this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},b.x=function(a,b){return a*this.a+b*this.c+this.e},b.y=function(a,b){return a*this.b+b*this.d+this.f},b.get=function(a){return+this[r.fromCharCode(97+a)].toFixed(4)},b.toString=function(){return a.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},b.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},b.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},b.split=function(){var b={};b.dx=this.e,b.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];b.scalex=w.sqrt(c(e[0])),d(e[0]),b.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*b.shear,e[1][1]-e[0][1]*b.shear],b.scaley=w.sqrt(c(e[1])),d(e[1]),b.shear/=b.scaley;var f=-e[0][1],g=e[1][1];g<0?(b.rotate=a.deg(w.acos(g)),f<0&&(b.rotate=360-b.rotate)):b.rotate=a.deg(w.asin(f)),b.isSimple=!+b.shear.toFixed(9)&&(b.scalex.toFixed(9)==b.scaley.toFixed(9)||!b.rotate),b.isSuperSimple=!+b.shear.toFixed(9)&&b.scalex.toFixed(9)==b.scaley.toFixed(9)&&!b.rotate,b.noRotation=!+b.shear.toFixed(9)&&!b.rotate;return b},b.toTransformString=function(a){var b=a||this[s]();if(b.isSimple){b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4);return(b.dx||b.dy?"t"+[b.dx,b.dy]:p)+(b.scalex!=1||b.scaley!=1?"s"+[b.scalex,b.scaley,0,0]:p)+(b.rotate?"r"+[b.rotate,0,0]:p)}return"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(cb.prototype);var cc=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);navigator.vendor=="Apple Computer, Inc."&&(cc&&cc[1]<4||navigator.platform.slice(0,2)=="iP")||navigator.vendor=="Google Inc."&&cc&&cc[1]<8?k.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:k.safari=be;var cd=function(){this.returnValue=!1},ce=function(){return this.originalEvent.preventDefault()},cf=function(){this.cancelBubble=!0},cg=function(){return this.originalEvent.stopPropagation()},ch=function(){if(h.doc.addEventListener)return function(a,b,c,d){var e=o&&u[b]?u[b]:b,f=function(e){var f=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,i=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,j=e.clientX+i,k=e.clientY+f;if(o&&u[g](b))for(var l=0,m=e.targetTouches&&e.targetTouches.length;l<m;l++)if(e.targetTouches[l].target==a){var n=e;e=e.targetTouches[l],e.originalEvent=n,e.preventDefault=ce,e.stopPropagation=cg;break}return c.call(d,e,j,k)};a.addEventListener(e,f,!1);return function(){a.removeEventListener(e,f,!1);return!0}};if(h.doc.attachEvent)return function(a,b,c,d){var e=function(a){a=a||h.win.event;var b=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,e=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;a.preventDefault=a.preventDefault||cd,a.stopPropagation=a.stopPropagation||cf;return c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){a.detachEvent("on"+b,e);return!0};return f}}(),ci=[],cj=function(a){var b=a.clientX,c=a.clientY,d=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,e=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,f,g=ci.length;while(g--){f=ci[g];if(o){var i=a.touches.length,j;while(i--){j=a.touches[i];if(j.identifier==f.el._drag.id){b=j.clientX,c=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}}else a.preventDefault();var k=f.el.node,l,m=k.nextSibling,n=k.parentNode,p=k.style.display;h.win.opera&&n.removeChild(k),k.style.display="none",l=f.el.paper.getElementByPoint(b,c),k.style.display=p,h.win.opera&&(m?n.insertBefore(k,m):n.appendChild(k)),l&&eve("raphael.drag.over."+f.el.id,f.el,l),b+=e,c+=d,eve("raphael.drag.move."+f.el.id,f.move_scope||f.el,b-f.el._drag.x,c-f.el._drag.y,b,c,a)}},ck=function(b){a.unmousemove(cj).unmouseup(ck);var c=ci.length,d;while(c--)d=ci[c],d.el._drag={},eve("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,b);ci=[]},cl=a.el={};for(var cm=t.length;cm--;)(function(b){a[b]=cl[b]=function(c,d){a.is(c,"function")&&(this.events=this.events||[],this.events.push({name:b,f:c,unbind:ch(this.shape||this.node||h.doc,b,c,d||this)}));return this},a["un"+b]=cl["un"+b]=function(a){var c=this.events||[],d=c.length;while(d--)if(c[d].name==b&&c[d].f==a){c[d].unbind(),c.splice(d,1),!c.length&&delete this.events;return this}return this}})(t[cm]);cl.data=function(b,c){var d=bb[this.id]=bb[this.id]||{};if(arguments.length==1){if(a.is(b,"object")){for(var e in b)b[g](e)&&this.data(e,b[e]);return this}eve("raphael.data.get."+this.id,this,d[b],b);return d[b]}d[b]=c,eve("raphael.data.set."+this.id,this,c,b);return this},cl.removeData=function(a){a==null?bb[this.id]={}:bb[this.id]&&delete bb[this.id][a];return this},cl.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},cl.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var cn=[];cl.drag=function(b,c,d,e,f,g){function i(i){(i.originalEvent||i).preventDefault();var j=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,k=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!ci.length&&a.mousemove(cj).mouseup(ck),ci.push({el:this,move_scope:e,start_scope:f,end_scope:g}),c&&eve.on("raphael.drag.start."+this.id,c),b&&eve.on("raphael.drag.move."+this.id,b),d&&eve.on("raphael.drag.end."+this.id,d),eve("raphael.drag.start."+this.id,f||e||this,i.clientX+k,i.clientY+j,i)}this._drag={},cn.push({el:this,start:i}),this.mousedown(i);return this},cl.onDragOver=function(a){a?eve.on("raphael.drag.over."+this.id,a):eve.unbind("raphael.drag.over."+this.id)},cl.undrag=function(){var b=cn.length;while(b--)cn[b].el==this&&(this.unmousedown(cn[b].start),cn.splice(b,1),eve.unbind("raphael.drag.*."+this.id));!cn.length&&a.unmousemove(cj).unmouseup(ck)},k.circle=function(b,c,d){var e=a._engine.circle(this,b||0,c||0,d||0);this.__set__&&this.__set__.push(e);return e},k.rect=function(b,c,d,e,f){var g=a._engine.rect(this,b||0,c||0,d||0,e||0,f||0);this.__set__&&this.__set__.push(g);return g},k.ellipse=function(b,c,d,e){var f=a._engine.ellipse(this,b||0,c||0,d||0,e||0);this.__set__&&this.__set__.push(f);return f},k.path=function(b){b&&!a.is(b,D)&&!a.is(b[0],E)&&(b+=p);var c=a._engine.path(a.format[m](a,arguments),this);this.__set__&&this.__set__.push(c);return c},k.image=function(b,c,d,e,f){var g=a._engine.image(this,b||"about:blank",c||0,d||0,e||0,f||0);this.__set__&&this.__set__.push(g);return g},k.text=function(b,c,d){var e=a._engine.text(this,b||0,c||0,r(d));this.__set__&&this.__set__.push(e);return e},k.set=function(b){!a.is(b,"array")&&(b=Array.prototype.splice.call(arguments,0,arguments.length));var c=new cG(b);this.__set__&&this.__set__.push(c);return c},k.setStart=function(a){this.__set__=a||this.set()},k.setFinish=function(a){var b=this.__set__;delete this.__set__;return b},k.setSize=function(b,c){return a._engine.setSize.call(this,b,c)},k.setViewBox=function(b,c,d,e,f){return a._engine.setViewBox.call(this,b,c,d,e,f)},k.top=k.bottom=null,k.raphael=a;var co=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,i=b.top+(h.win.pageYOffset||e.scrollTop||d.scrollTop)-f,j=b.left+(h.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:i,x:j}};k.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=h.doc.elementFromPoint(a,b);if(h.win.opera&&e.tagName=="svg"){var f=co(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var i=d.getIntersectionList(g,null);i.length&&(e=i[i.length-1])}if(!e)return null;while(e.parentNode&&e!=d.parentNode&&!e.raphael)e=e.parentNode;e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null;return e},k.getById=function(a){var b=this.bottom;while(b){if(b.id==a)return b;b=b.next}return null},k.forEach=function(a,b){var c=this.bottom;while(c){if(a.call(b,c)===!1)return this;c=c.next}return this},k.getElementsByPoint=function(a,b){var c=this.set();this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)});return c},cl.isPointInside=function(b,c){var d=this.realPath=this.realPath||bi[this.type](this);return a.isPointInsidePath(d,b,c)},cl.getBBox=function(a){if(this.removed)return{};var b=this._;if(a){if(b.dirty||!b.bboxwt)this.realPath=bi[this.type](this),b.bboxwt=bI(this.realPath),b.bboxwt.toString=cq,b.dirty=0;return b.bboxwt}if(b.dirty||b.dirtyT||!b.bbox){if(b.dirty||!this.realPath)b.bboxwt=0,this.realPath=bi[this.type](this);b.bbox=bI(bj(this.realPath,this.matrix)),b.bbox.toString=cq,b.dirty=b.dirtyT=0}return b.bbox},cl.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());this.__set__&&this.__set__.push(a);return a},cl.glow=function(a){if(this.type=="text")return null;a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||bi[this.type](this);f=this.matrix?bj(f,this.matrix):f;for(var g=1;g<c+1;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var cr={},cs=function(b,c,d,e,f,g,h,i,j){return j==null?bB(b,c,d,e,f,g,h,i):a.findDotsAtSegment(b,c,d,e,f,g,h,i,bC(b,c,d,e,f,g,h,i,j))},ct=function(b,c){return function(d,e,f){d=bR(d);var g,h,i,j,k="",l={},m,n=0;for(var o=0,p=d.length;o<p;o++){i=d[o];if(i[0]=="M")g=+i[1],h=+i[2];else{j=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>e){if(c&&!l.start){m=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),k+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k,k=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c){m=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j,g=+i[5],h=+i[6]}k+=i.shift()+i}l.end=k,m=b?n:c?l:a.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},cu=ct(1),cv=ct(),cw=ct(0,1);a.getTotalLength=cu,a.getPointAtLength=cv,a.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return cw(a,b).end;var d=cw(a,c,1);return b?cw(d,b).end:d},cl.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return cu(this.attrs.path)}},cl.getPointAtLength=function(a){if(this.type=="path")return cv(this.attrs.path,a)},cl.getSubpath=function(b,c){if(this.type=="path")return a.getSubpath(this.attrs.path,b,c)};var cx=a.easing_formulas={linear:function(a){return a},"<":function(a){return A(a,1.7)},">":function(a){return A(a,.48)},"<>":function(a){var b=.48-a/1.04,c=w.sqrt(.1734+b*b),d=c-b,e=A(z(d),1/3)*(d<0?-1:1),f=-c-b,g=A(z(f),1/3)*(f<0?-1:1),h=e+g+.5;return(1-h)*3*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==!!a)return a;return A(2,-10*a)*w.sin((a-.075)*2*B/.3)+1},bounce:function(a){var b=7.5625,c=2.75,d;a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375);return d}};cx.easeIn=cx["ease-in"]=cx["<"],cx.easeOut=cx["ease-out"]=cx[">"],cx.easeInOut=cx["ease-in-out"]=cx["<>"],cx["back-in"]=cx.backIn,cx["back-out"]=cx.backOut;var cy=[],cz=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},cA=function(){var b=+(new Date),c=0;for(;c<cy.length;c++){var d=cy[c];if(d.el.removed||d.paused)continue;var e=b-d.start,f=d.ms,h=d.easing,i=d.from,j=d.diff,k=d.to,l=d.t,m=d.el,o={},p,r={},s;d.initstatus?(e=(d.initstatus*d.anim.top-d.prev)/(d.percent-d.prev)*f,d.status=d.initstatus,delete d.initstatus,d.stop&&cy.splice(c--,1)):d.status=(d.prev+(d.percent-d.prev)*(e/f))/d.anim.top;if(e<0)continue;if(e<f){var t=h(e/f);for(var u in i)if(i[g](u)){switch(U[u]){case C:p=+i[u]+t*f*j[u];break;case"colour":p="rgb("+[cB(O(i[u].r+t*f*j[u].r)),cB(O(i[u].g+t*f*j[u].g)),cB(O(i[u].b+t*f*j[u].b))].join(",")+")";break;case"path":p=[];for(var v=0,w=i[u].length;v<w;v++){p[v]=[i[u][v][0]];for(var x=1,y=i[u][v].length;x<y;x++)p[v][x]=+i[u][v][x]+t*f*j[u][v][x];p[v]=p[v].join(q)}p=p.join(q);break;case"transform":if(j[u].real){p=[];for(v=0,w=i[u].length;v<w;v++){p[v]=[i[u][v][0]];for(x=1,y=i[u][v].length;x<y;x++)p[v][x]=i[u][v][x]+t*f*j[u][v][x]}}else{var z=function(a){return+i[u][a]+t*f*j[u][a]};p=[["m",z(0),z(1),z(2),z(3),z(4),z(5)]]}break;case"csv":if(u=="clip-rect"){p=[],v=4;while(v--)p[v]=+i[u][v]+t*f*j[u][v]}break;default:var A=[][n](i[u]);p=[],v=m.paper.customAttributes[u].length;while(v--)p[v]=+A[v]+t*f*j[u][v]}o[u]=p}m.attr(o),function(a,b,c){setTimeout(function(){eve("raphael.anim.frame."+a,b,c)})}(m.id,m,d.anim)}else{(function(b,c,d){setTimeout(function(){eve("raphael.anim.frame."+c.id,c,d),eve("raphael.anim.finish."+c.id,c,d),a.is(b,"function")&&b.call(c)})})(d.callback,m,d.anim),m.attr(k),cy.splice(c--,1);if(d.repeat>1&&!d.next){for(s in k)k[g](s)&&(r[s]=d.totalOrigin[s]);d.el.attr(r),cE(d.anim,d.el,d.anim.percents[0],null,d.totalOrigin,d.repeat-1)}d.next&&!d.stop&&cE(d.anim,d.el,d.next,null,d.totalOrigin,d.repeat)}}a.svg&&m&&m.paper&&m.paper.safari(),cy.length&&cz(cA)},cB=function(a){return a>255?255:a<0?0:a};cl.animateWith=function(b,c,d,e,f,g){var h=this;if(h.removed){g&&g.call(h);return h}var i=d instanceof cD?d:a.animation(d,e,f,g),j,k;cE(i,h,i.percents[0],null,h.attr());for(var l=0,m=cy.length;l<m;l++)if(cy[l].anim==c&&cy[l].el==b){cy[m-1].start=cy[l].start;break}return h},cl.onAnimation=function(a){a?eve.on("raphael.anim.frame."+this.id,a):eve.unbind("raphael.anim.frame."+this.id);return this},cD.prototype.delay=function(a){var b=new cD(this.anim,this.ms);b.times=this.times,b.del=+a||0;return b},cD.prototype.repeat=function(a){var b=new cD(this.anim,this.ms);b.del=this.del,b.times=w.floor(x(a,0))||1;return b},a.animation=function(b,c,d,e){if(b instanceof cD)return b;if(a.is(d,"function")||!d)e=e||d||null,d=null;b=Object(b),c=+c||0;var f={},h,i;for(i in b)b[g](i)&&Q(i)!=i&&Q(i)+"%"!=i&&(h=!0,f[i]=b[i]);if(!h)return new cD(b,c);d&&(f.easing=d),e&&(f.callback=e);return new cD({100:f},c)},cl.animate=function(b,c,d,e){var f=this;if(f.removed){e&&e.call(f);return f}var g=b instanceof cD?b:a.animation(b,c,d,e);cE(g,f,g.percents[0],null,f.attr());return f},cl.setTime=function(a,b){a&&b!=null&&this.status(a,y(b,a.ms)/a.ms);return this},cl.status=function(a,b){var c=[],d=0,e,f;if(b!=null){cE(a,this,-1,y(b,1));return this}e=cy.length;for(;d<e;d++){f=cy[d];if(f.el.id==this.id&&(!a||f.anim==a)){if(a)return f.status;c.push({anim:f.anim,status:f.status})}}if(a)return 0;return c},cl.pause=function(a){for(var b=0;b<cy.length;b++)cy[b].el.id==this.id&&(!a||cy[b].anim==a)&&eve("raphael.anim.pause."+this.id,this,cy[b].anim)!==!1&&(cy[b].paused=!0);return this},cl.resume=function(a){for(var b=0;b<cy.length;b++)if(cy[b].el.id==this.id&&(!a||cy[b].anim==a)){var c=cy[b];eve("raphael.anim.resume."+this.id,this,c.anim)!==!1&&(delete c.paused,this.status(c.anim,c.status))}return this},cl.stop=function(a){for(var b=0;b<cy.length;b++)cy[b].el.id==this.id&&(!a||cy[b].anim==a)&&eve("raphael.anim.stop."+this.id,this,cy[b].anim)!==!1&&cy.splice(b--,1);return this},eve.on("raphael.remove",cF),eve.on("raphael.clear",cF),cl.toString=function(){return"Raphaël’s object"};var cG=function(a){this.items=[],this.length=0,this.type="set";if(a)for(var b=0,c=a.length;b<c;b++)a[b]&&(a[b].constructor==cl.constructor||a[b].constructor==cG)&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},cH=cG.prototype;cH.push=function(){var a,b;for(var c=0,d=arguments.length;c<d;c++)a=arguments[c],a&&(a.constructor==cl.constructor||a.constructor==cG)&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},cH.pop=function(){this.length&&delete this[this.length--];return this.items.pop()},cH.forEach=function(a,b){for(var c=0,d=this.items.length;c<d;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var cI in cl)cl[g](cI)&&(cH[cI]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][m](c,b)})}}(cI));cH.attr=function(b,c){if(b&&a.is(b,E)&&a.is(b[0],"object"))for(var d=0,e=b.length;d<e;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items.length;f<g;f++)this.items[f].attr(b,c);return this},cH.clear=function(){while(this.length)this.pop()},cH.splice=function(a,b,c){a=a<0?x(this.length+a,0):a,b=x(0,y(this.length-a,b));var d=[],e=[],f=[],g;for(g=2;g<arguments.length;g++)f.push(arguments[g]);for(g=0;g<b;g++)e.push(this[a+g]);for(;g<this.length-a;g++)d.push(this[a+g]);var h=f.length;for(g=0;g<h+d.length;g++)this.items[a+g]=this[a+g]=g<h?f[g]:d[g-h];g=this.items.length=this.length-=b-h;while(this[g])delete this[g++];return new cG(e)},cH.exclude=function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]==a){this.splice(b,1);return!0}},cH.animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f=this.items.length,g=f,h,i=this,j;if(!f)return this;e&&(j=function(){!--f&&e.call(i)}),d=a.is(d,D)?d:j;var k=a.animation(b,c,d,j);h=this.items[--g].animate(k);while(g--)this.items[g]&&!this.items[g].removed&&this.items[g].animateWith(h,k,k);return this},cH.insertAfter=function(a){var b=this.items.length;while(b--)this.items[b].insertAfter(a);return this},cH.getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}a=y[m](0,a),b=y[m](0,b),c=x[m](0,c),d=x[m](0,d);return{x:a,y:b,x2:c,y2:d,width:c-a,height:d-b}},cH.clone=function(a){a=new cG;for(var b=0,c=this.items.length;b<c;b++)a.push(this.items[b].clone());return a},cH.toString=function(){return"Raphaël‘s set"},a.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[g](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=R(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[g](e)){var f=a.glyphs[e];b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"};if(f.k)for(var h in f.k)f[g](h)&&(b.glyphs[e].k[h]=f.k[h])}}return a},k.getFont=function(b,c,d,e){e=e||"normal",d=d||"normal",c=+c||{normal:400,bold:700,lighter:300,bolder:800}[c]||400;if(!!a.fonts){var f=a.fonts[b];if(!f){var h=new RegExp("(^|\\s)"+b.replace(/[^\w\d\s+!~.:_-]/g,p)+"(\\s|$)","i");for(var i in a.fonts)if(a.fonts[g](i)&&h.test(i)){f=a.fonts[i];break}}var j;if(f)for(var k=0,l=f.length;k<l;k++){j=f[k];if(j.face["font-weight"]==c&&(j.face["font-style"]==d||!j.face["font-style"])&&j.face["font-stretch"]==e)break}return j}},k.print=function(b,d,e,f,g,h,i){h=h||"middle",i=x(y(i||0,1),-1);var j=r(e)[s](p),k=0,l=0,m=p,n;a.is(f,e)&&(f=this.getFont(f));if(f){n=(g||16)/f.face["units-per-em"];var o=f.face.bbox[s](c),q=+o[0],t=o[3]-o[1],u=0,v=+o[1]+(h=="baseline"?t+ +f.face.descent:t/2);for(var w=0,z=j.length;w<z;w++){if(j[w]=="\n")k=0,B=0,l=0,u+=t;else{var A=l&&f.glyphs[j[w-1]]||{},B=f.glyphs[j[w]];k+=l?(A.w||f.w)+(A.k&&A.k[j[w]]||0)+f.w*i:0,l=1}B&&B.d&&(m+=a.transformPath(B.d,["t",k*n,u*n,"s",n,n,q,v,"t",(b-q)/n,(d-v)/n]))}}return this.path(m).attr({fill:"#000",stroke:"none"})},k.add=function(b){if(a.is(b,"array")){var c=this.set(),e=0,f=b.length,h;for(;e<f;e++)h=b[e]||{},d[g](h.type)&&c.push(this[h.type]().attr(h))}return c},a.format=function(b,c){var d=a.is(c,E)?[0][n](c):arguments;b&&a.is(b,D)&&d.length-1&&(b=b.replace(e,function(a,b){return d[++b]==null?p:d[b]}));return b||p},a.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),typeof e=="function"&&f&&(e=e()))}),e=(e==null||e==d?a:e)+"";return e};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),a.ninja=function(){i.was?h.win.Raphael=i.is:delete Raphael;return a},a.st=cH,function(b,c,d){function e(){/in/.test(b.readyState)?setTimeout(e,9):a.eve("raphael.DOMload")}b.readyState==null&&b.addEventListener&&(b.addEventListener(c,d=function(){b.removeEventListener(c,d,!1),b.readyState="complete"},!1),b.readyState="loading"),e()}(document,"DOMContentLoaded"),i.was?h.win.Raphael=a:Raphael=a,eve.on("raphael.DOMload",function(){b=!0})}(),window.Raphael.svg&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=/[, ]+/,k=a.eve,l="",m=" ",n="http://www.w3.org/1999/xlink",o={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};a.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var q=function(d,e){if(e){typeof d=="string"&&(d=q(d));for(var f in e)e[b](f)&&(f.substring(0,6)=="xlink:"?d.setAttributeNS(n,f.substring(6),c(e[f])):d.setAttribute(f,c(e[f])))}else d=a._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");return d},r=function(b,e){var j="linear",k=b.id+e,m=.5,n=.5,o=b.node,p=b.paper,r=o.style,s=a._g.doc.getElementById(k);if(!s){e=c(e).replace(a._radial_gradient,function(a,b,c){j="radial";if(b&&c){m=d(b),n=d(c);var e=(n>.5)*2-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&n!=.5&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/);if(j=="linear"){var t=e.shift();t=-d(t);if(isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient);if(!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,j=="radial"?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;x<y;x++)s.appendChild(q("stop",{offset:w[x].offset?w[x].offset:x?"100%":"0%","stop-color":w[x].color||"#fff"}))}}q(o,{fill:"url(#"+k+")",opacity:1,"fill-opacity":1}),r.fill=l,r.opacity=1,r.fillOpacity=1;return 1},s=function(a){var b=a.getBBox(1);q(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},t=function(d,e,f){if(d.type=="path"){var g=c(e).toLowerCase().split("-"),h=d.paper,i=f?"end":"start",j=d.node,k=d.attrs,m=k["stroke-width"],n=g.length,r="classic",s,t,u,v,w,x=3,y=3,z=5;while(n--)switch(g[n]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":r=g[n];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}r=="open"?(x+=2,y+=2,z+=2,u=1,v=f?4:1,w={fill:"none",stroke:k.stroke}):(v=u=x/2,w={fill:k.stroke,stroke:"none"}),d._.arrows?f?(d._.arrows.endPath&&p[d._.arrows.endPath]--,d._.arrows.endMarker&&p[d._.arrows.endMarker]--):(d._.arrows.startPath&&p[d._.arrows.startPath]--,d._.arrows.startMarker&&p[d._.arrows.startMarker]--):d._.arrows={};if(r!="none"){var A="raphael-marker-"+r,B="raphael-marker-"+i+r+x+y;a._g.doc.getElementById(A)?p[A]++:(h.defs.appendChild(q(q("path"),{"stroke-linecap":"round",d:o[r],id:A})),p[A]=1);var C=a._g.doc.getElementById(B),D;C?(p[B]++,D=C.getElementsByTagName("use")[0]):(C=q(q("marker"),{id:B,markerHeight:y,markerWidth:x,orient:"auto",refX:v,refY:y/2}),D=q(q("use"),{"xlink:href":"#"+A,transform:(f?"rotate(180 "+x/2+" "+y/2+") ":l)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),C.appendChild(D),h.defs.appendChild(C),p[B]=1),q(D,w);var F=u*(r!="diamond"&&r!="oval");f?(s=d._.arrows.startdx*m||0,t=a.getTotalLength(k.path)-F*m):(s=F*m,t=a.getTotalLength(k.path)-(d._.arrows.enddx*m||0)),w={},w["marker-"+i]="url(#"+B+")";if(t||s)w.d=Raphael.getSubpath(k.path,s,t);q(j,w),d._.arrows[i+"Path"]=A,d._.arrows[i+"Marker"]=B,d._.arrows[i+"dx"]=F,d._.arrows[i+"Type"]=r,d._.arrows[i+"String"]=e}else f?(s=d._.arrows.startdx*m||0,t=a.getTotalLength(k.path)-s):(s=0,t=a.getTotalLength(k.path)-(d._.arrows.enddx*m||0)),d._.arrows[i+"Path"]&&q(j,{d:Raphael.getSubpath(k.path,s,t)}),delete d._.arrows[i+"Path"],delete d._.arrows[i+"Marker"],delete d._.arrows[i+"dx"],delete d._.arrows[i+"Type"],delete d._.arrows[i+"String"];for(w in p)if(p[b](w)&&!p[w]){var G=a._g.doc.getElementById(w);G&&G.parentNode.removeChild(G)}}},u={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},v=function(a,b,d){b=u[c(b).toLowerCase()];if(b){var e=a.attrs["stroke-width"]||"1",f={round:e,square:e,butt:0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],h=b.length;while(h--)g[h]=b[h]*e+(h%2?1:-1)*f;q(a.node,{"stroke-dasharray":g.join(",")})}},w=function(d,f){var i=d.node,k=d.attrs,m=i.style.visibility;i.style.visibility="hidden";for(var o in f)if(f[b](o)){if(!a._availableAttrs[b](o))continue;var p=f[o];k[o]=p;switch(o){case"blur":d.blur(p);break;case"href":case"title":case"target":var u=i.parentNode;if(u.tagName.toLowerCase()!="a"){var w=q("a");u.insertBefore(w,i),w.appendChild(i),u=w}o=="target"?u.setAttributeNS(n,"show",p=="blank"?"new":p):u.setAttributeNS(n,o,p);break;case"cursor":i.style.cursor=p;break;case"transform":d.transform(p);break;case"arrow-start":t(d,p);break;case"arrow-end":t(d,p,1);break;case"clip-rect":var x=c(p).split(j);if(x.length==4){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var z=q("clipPath"),A=q("rect");z.id=a.createUUID(),q(A,{x:x[0],y:x[1],width:x[2],height:x[3]}),z.appendChild(A),d.paper.defs.appendChild(z),q(i,{"clip-path":"url(#"+z.id+")"}),d.clip=A}if(!p){var B=i.getAttribute("clip-path");if(B){var C=a._g.doc.getElementById(B.replace(/(^url\(#|\)$)/g,l));C&&C.parentNode.removeChild(C),q(i,{"clip-path":l}),delete d.clip}}break;case"path":d.type=="path"&&(q(i,{d:p?k.path=a._pathToAbsolute(p):"M0,0"}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1)));break;case"width":i.setAttribute(o,p),d._.dirty=1;if(k.fx)o="x",p=k.x;else break;case"x":k.fx&&(p=-k.x-(k.width||0));case"rx":if(o=="rx"&&d.type=="rect")break;case"cx":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"height":i.setAttribute(o,p),d._.dirty=1;if(k.fy)o="y",p=k.y;else break;case"y":k.fy&&(p=-k.y-(k.height||0));case"ry":if(o=="ry"&&d.type=="rect")break;case"cy":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"r":d.type=="rect"?q(i,{rx:p,ry:p}):i.setAttribute(o,p),d._.dirty=1;break;case"src":d.type=="image"&&i.setAttributeNS(n,"href",p);break;case"stroke-width":if(d._.sx!=1||d._.sy!=1)p/=g(h(d._.sx),h(d._.sy))||1;d.paper._vbSize&&(p*=d.paper._vbSize),i.setAttribute(o,p),k["stroke-dasharray"]&&v(d,k["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"stroke-dasharray":v(d,p,f);break;case"fill":var D=c(p).match(a._ISURL);if(D){z=q("pattern");var F=q("image");z.id=a.createUUID(),q(z,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),q(F,{x:0,y:0,"xlink:href":D[1]}),z.appendChild(F),function(b){a._preload(D[1],function(){var a=this.offsetWidth,c=this.offsetHeight;q(b,{width:a,height:c}),q(F,{width:a,height:c}),d.paper.safari()})}(z),d.paper.defs.appendChild(z),q(i,{fill:"url(#"+z.id+")"}),d.pattern=z,d.pattern&&s(d);break}var G=a.getRGB(p);if(!G.error)delete f.gradient,delete k.gradient,!a.is(k.opacity,"undefined")&&a.is(f.opacity,"undefined")&&q(i,{opacity:k.opacity}),!a.is(k["fill-opacity"],"undefined")&&a.is(f["fill-opacity"],"undefined")&&q(i,{"fill-opacity":k["fill-opacity"]});else if((d.type=="circle"||d.type=="ellipse"||c(p).charAt()!="r")&&r(d,p)){if("opacity"in k||"fill-opacity"in k){var H=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(H){var I=H.getElementsByTagName("stop");q(I[I.length-1],{"stop-opacity":("opacity"in k?k.opacity:1)*("fill-opacity"in k?k["fill-opacity"]:1)})}}k.gradient=p,k.fill="none";break}G[b]("opacity")&&q(i,{"fill-opacity":G.opacity>1?G.opacity/100:G.opacity});case"stroke":G=a.getRGB(p),i.setAttribute(o,G.hex),o=="stroke"&&G[b]("opacity")&&q(i,{"stroke-opacity":G.opacity>1?G.opacity/100:G.opacity}),o=="stroke"&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":(d.type=="circle"||d.type=="ellipse"||c(p).charAt()!="r")&&r(d,p);break;case"opacity":k.gradient&&!k[b]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){H=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),H&&(I=H.getElementsByTagName("stop"),q(I[I.length-1],{"stop-opacity":p}));break};default:o=="font-size"&&(p=e(p,10)+"px");var J=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[J]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if(d.type=="text"&&!!(f[b]("text")||f[b]("font")||f[b]("font-size")||f[b]("x")||f[b]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(a._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[b]("text")){g.text=f.text;while(h.firstChild)h.removeChild(h.firstChild);var j=c(f.text).split("\n"),k=[],m;for(var n=0,o=j.length;n<o;n++)m=q("tspan"),n&&q(m,{dy:i*x,x:g.x}),m.appendChild(a._g.doc.createTextNode(j[n])),h.appendChild(m),k[n]=m}else{k=h.getElementsByTagName("tspan");for(n=0,o=k.length;n<o;n++)n?q(k[n],{dy:i*x,x:g.x}):q(k[0],{dy:0})}q(h,{x:g.x,y:g.y}),d._.dirty=1;var p=d._getBBox(),r=g.y-(p.y+p.height/2);r&&a.is(r,"finite")&&q(k[0],{dy:r})}},z=function(b,c){var d=0,e=0;this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.matrix=a.matrix(),this.realPath=null,this.paper=c,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},A=a.el;z.prototype=A,A.constructor=z,a._engine.path=function(a,b){var c=q("path");b.canvas&&b.canvas.appendChild(c);var d=new z(c,b);d.type="path",w(d,{fill:"none",stroke:"#000",path:a});return d},A.rotate=function(a,b,e){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),e==null&&(b=e);if(b==null||e==null){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}this.transform(this._.transform.concat([["r",a,b,e]]));return this},A.scale=function(a,b,e,f){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),b==null&&(b=a),f==null&&(e=f);if(e==null||f==null)var g=this.getBBox(1);e=e==null?g.x+g.width/2:e,f=f==null?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]]));return this},A.translate=function(a,b){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]]));return this},A.transform=function(c){var d=this._;if(c==null)return d.transform;a._extractTransform(this,c),this.clip&&q(this.clip,{transform:this.matrix.invert()}),this.pattern&&s(this),this.node&&q(this.node,{transform:this.matrix});if(d.sx!=1||d.sy!=1){var e=this.attrs[b]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":e})}return this},A.hide=function(){!this.removed&&this.paper.safari(this.node.style.display="none");return this},A.show=function(){!this.removed&&this.paper.safari(this.node.style.display="");return this},A.remove=function(){if(!this.removed&&!!this.node.parentNode){var b=this.paper;b.__set__&&b.__set__.exclude(this),k.unbind("raphael.*.*."+this.id),this.gradient&&b.defs.removeChild(this.gradient),a._tear(this,b),this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var c in this)this[c]=typeof this[c]=="function"?a._removedFactory(c):null;this.removed=!0}},A._getBBox=function(){if(this.node.style.display=="none"){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}a&&this.hide();return b},A.attr=function(c,d){if(this.removed)return this;if(c==null){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform;return e}if(d==null&&a.is(c,"string")){if(c=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(c=="transform")return this._.transform;var g=c.split(j),h={};for(var i=0,l=g.length;i<l;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return l-1?h:h[g[0]]}if(d==null&&a.is(c,"array")){h={};for(i=0,l=c.length;i<l;i++)h[c[i]]=this.attr(c[i]);return h}if(d!=null){var m={};m[c]=d}else c!=null&&a.is(c,"object")&&(m=c);for(var n in m)k("raphael.attr."+n+"."+this.id,this,m[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[b](n)&&m[b](n)&&a.is(this.paper.customAttributes[n],"function")){var o=this.paper.customAttributes[n].apply(this,[].concat(m[n]));this.attrs[n]=m[n];for(var p in o)o[b](p)&&(m[p]=o[p])}w(this,m);return this},A.toFront=function(){if(this.removed)return this;this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var b=this.paper;b.top!=this&&a._tofront(this,b);return this},A.toBack=function(){if(this.removed)return this;var b=this.node.parentNode;b.tagName.toLowerCase()=="a"?b.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):b.firstChild!=this.node&&b.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper);var c=this.paper;return this},A.insertAfter=function(b){if(this.removed)return this;var c=b.node||b[b.length-1].node;c.nextSibling?c.parentNode.insertBefore(this.node,c.nextSibling):c.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper);return this},A.insertBefore=function(b){if(this.removed)return this;var c=b.node||b[0].node;c.parentNode.insertBefore(this.node,c),a._insertbefore(this,b,this.paper);return this},A.blur=function(b){var c=this;if(+b!==0){var d=q("filter"),e=q("feGaussianBlur");c.attrs.blur=b,d.id=a.createUUID(),q(e,{stdDeviation:+b||1.5}),d.appendChild(e),c.paper.defs.appendChild(d),c._blur=d,q(c.node,{filter:"url(#"+d.id+")"})}else c._blur&&(c._blur.parentNode.removeChild(c._blur),delete c._blur,delete c.attrs.blur),c.node.removeAttribute("filter")},a._engine.circle=function(a,b,c,d){var e=q("circle");a.canvas&&a.canvas.appendChild(e);var f=new z(e,a);f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",q(e,f.attrs);return f},a._engine.rect=function(a,b,c,d,e,f){var g=q("rect");a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);h.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",q(g,h.attrs);return h},a._engine.ellipse=function(a,b,c,d,e){var f=q("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new z(f,a);g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",q(f,g.attrs);return g},a._engine.image=function(a,b,c,d,e,f){var g=q("image");q(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(n,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image";return h},a._engine.text=function(b,c,d,e){var f=q("text");b.canvas&&b.canvas.appendChild(f);var g=new z(f,b);g.attrs={x:c,y:d,"text-anchor":"middle",text:e,font:a._availableAttrs.font,stroke:"none",fill:"#000"},g.type="text",w(g,g.attrs);return g},a._engine.setSize=function(a,b){this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox);return this},a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,g=b.height;if(!c)throw new Error("SVG container not found.");var h=q("svg"),i="overflow:hidden;",j;d=d||0,e=e||0,f=f||512,g=g||342,q(h,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),c==1?(h.style.cssText=i+"position:absolute;left:"+d+"px;top:"+e+"px",a._g.doc.body.appendChild(h),j=1):(h.style.cssText=i+"position:relative",c.firstChild?c.insertBefore(h,c.firstChild):c.appendChild(h)),c=new a._Paper,c.width=f,c.height=g,c.canvas=h,c.clear(),c._left=c._top=0,j&&(c.renderfix=function(){}),c.renderfix();return c},a._engine.setViewBox=function(a,b,c,d,e){k("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f=g(c/this.width,d/this.height),h=this.top,i=e?"meet":"xMinYMin",j,l;a==null?(this._vbSize&&(f=1),delete this._vbSize,j="0 0 "+this.width+m+this.height):(this._vbSize=f,j=a+m+b+m+c+m+d),q(this.canvas,{viewBox:j,preserveAspectRatio:i});while(f&&h)l="stroke-width"in h.attrs?h.attrs["stroke-width"]:1,h.attr({"stroke-width":l}),h._.dirty=1,h._.dirtyT=1,h=h.prev;this._viewBox=[a,b,c,d,!!e];return this},a.prototype.renderfix=function(){var a=this.canvas,b=a.style,c;try{c=a.getScreenCTM()||a.createSVGMatrix()}catch(d){c=a.createSVGMatrix()}var e=-c.e%1,f=-c.f%1;if(e||f)e&&(this._left=(this._left+e)%1,b.left=this._left+"px"),f&&(this._top=(this._top+f)%1,b.top=this._top+"px")},a.prototype.clear=function(){a.eve("raphael.clear",this);var b=this.canvas;while(b.firstChild)b.removeChild(b.firstChild);this.bottom=this.top=null,(this.desc=q("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël "+a.version)),b.appendChild(this.desc),b.appendChild(this.defs=q("defs"))},a.prototype.remove=function(){k("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null};var B=a.st;for(var C in A)A[b](C)&&!B[b](C)&&(B[C]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(C))}(window.Raphael),window.Raphael.vml&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.abs,j="fill",k=/[, ]+/,l=a.eve,m=" progid:DXImageTransform.Microsoft",n=" ",o="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},q=/([clmz]),?([^clmz]*)/gi,r=/ progid:\S+Blur\([^\)]+\)/g,s=/-?[^,\s-]+/g,t="position:absolute;left:0;top:0;width:1px;height:1px",u=21600,v={path:1,rect:1,image:1},w={circle:1,ellipse:1},x=function(b){var d=/[ahqstv]/ig,e=a._pathToAbsolute;c(b).match(d)&&(e=a._path2curve),d=/[clmz]/g;if(e==a._pathToAbsolute&&!c(b).match(d)){var g=c(b).replace(q,function(a,b,c){var d=[],e=b.toLowerCase()=="m",g=p[b];c.replace(s,function(a){e&&d.length==2&&(g+=d+p[b=="m"?"l":"L"],d=[]),d.push(f(a*u))});return g+d});return g}var h=e(b),i,j;g=[];for(var k=0,l=h.length;k<l;k++){i=h[k],j=h[k][0].toLowerCase(),j=="z"&&(j="x");for(var m=1,r=i.length;m<r;m++)j+=f(i[m]*u)+(m!=r-1?",":o);g.push(j)}return g.join(n)},y=function(b,c,d){var e=a.matrix();e.rotate(-b,.5,.5);return{dx:e.x(c,d),dy:e.y(c,d)}},z=function(a,b,c,d,e,f){var g=a._,h=a.matrix,k=g.fillpos,l=a.node,m=l.style,o=1,p="",q,r=u/b,s=u/c;m.visibility="hidden";if(!!b&&!!c){l.coordsize=i(r)+n+i(s),m.rotation=f*(b*c<0?-1:1);if(f){var t=y(f,d,e);d=t.dx,e=t.dy}b<0&&(p+="x"),c<0&&(p+=" y")&&(o=-1),m.flip=p,l.coordorigin=d*-r+n+e*-s;if(k||g.fillsize){var v=l.getElementsByTagName(j);v=v&&v[0],l.removeChild(v),k&&(t=y(f,h.x(k[0],k[1]),h.y(k[0],k[1])),v.position=t.dx*o+n+t.dy*o),g.fillsize&&(v.size=g.fillsize[0]*i(b)+n+g.fillsize[1]*i(c)),l.appendChild(v)}m.visibility="visible"}};a.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var A=function(a,b,d){var e=c(b).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";while(g--)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},B=function(e,i){e.attrs=e.attrs||{};var l=e.node,m=e.attrs,p=l.style,q,r=v[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),s=w[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),t=e;for(var y in i)i[b](y)&&(m[y]=i[y]);r&&(m.path=a._getPath[e.type](e),e._.dirty=1),i.href&&(l.href=i.href),i.title&&(l.title=i.title),i.target&&(l.target=i.target),i.cursor&&(p.cursor=i.cursor),"blur"in i&&e.blur(i.blur);if(i.path&&e.type=="path"||r)l.path=x(~c(m.path).toLowerCase().indexOf("r")?a._pathToAbsolute(m.path):m.path),e.type=="image"&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],z(e,1,1,0,0,0));"transform"in i&&e.transform(i.transform);if(s){var B=+m.cx,D=+m.cy,E=+m.rx||+m.r||0,G=+m.ry||+m.r||0;l.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((B-E)*u),f((D-G)*u),f((B+E)*u),f((D+G)*u),f(B*u))}if("clip-rect"in i){var H=c(i["clip-rect"]).split(k);if(H.length==4){H[2]=+H[2]+ +H[0],H[3]=+H[3]+ +H[1];var I=l.clipRect||a._g.doc.createElement("div"),J=I.style;J.clip=a.format("rect({1}px {2}px {3}px {0}px)",H),l.clipRect||(J.position="absolute",J.top=0,J.left=0,J.width=e.paper.width+"px",J.height=e.paper.height+"px",l.parentNode.insertBefore(I,l),I.appendChild(l),l.clipRect=I)}i["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(e.textpath){var K=e.textpath.style;i.font&&(K.font=i.font),i["font-family"]&&(K.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),i["font-size"]&&(K.fontSize=i["font-size"]),i["font-weight"]&&(K.fontWeight=i["font-weight"]),i["font-style"]&&(K.fontStyle=i["font-style"])}"arrow-start"in i&&A(t,i["arrow-start"]),"arrow-end"in i&&A(t,i["arrow-end"],1);if(i.opacity!=null||i["stroke-width"]!=null||i.fill!=null||i.src!=null||i.stroke!=null||i["stroke-width"]!=null||i["stroke-opacity"]!=null||i["fill-opacity"]!=null||i["stroke-dasharray"]!=null||i["stroke-miterlimit"]!=null||i["stroke-linejoin"]!=null||i["stroke-linecap"]!=null){var L=l.getElementsByTagName(j),M=!1;L=L&&L[0],!L&&(M=L=F(j)),e.type=="image"&&i.src&&(L.src=i.src),i.fill&&(L.on=!0);if(L.on==null||i.fill=="none"||i.fill===null)L.on=!1;if(L.on&&i.fill){var N=c(i.fill).match(a._ISURL);if(N){L.parentNode==l&&l.removeChild(L),L.rotate=!0,L.src=N[1],L.type="tile";var O=e.getBBox(1);L.position=O.x+n+O.y,e._.fillpos=[O.x,O.y],a._preload(N[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else L.color=a.getRGB(i.fill).hex,L.src=o,L.type="solid",a.getRGB(i.fill).error&&(t.type in{circle:1,ellipse:1}||c(i.fill).charAt()!="r")&&C(t,i.fill,L)&&(m.fill="none",m.gradient=i.fill,L.rotate=!1)}if("fill-opacity"in i||"opacity"in i){var P=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+a.getRGB(i.fill).o+1||2)-1);P=h(g(P,0),1),L.opacity=P,L.src&&(L.color="none")}l.appendChild(L);var Q=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],T=!1;!Q&&(T=Q=F("stroke"));if(i.stroke&&i.stroke!="none"||i["stroke-width"]||i["stroke-opacity"]!=null||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])Q.on=!0;(i.stroke=="none"||i.stroke===null||Q.on==null||i.stroke==0||i["stroke-width"]==0)&&(Q.on=!1);var U=a.getRGB(i.stroke);Q.on&&i.stroke&&(Q.color=U.hex),P=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+U.o+1||2)-1);var V=(d(i["stroke-width"])||1)*.75;P=h(g(P,0),1),i["stroke-width"]==null&&(V=m["stroke-width"]),i["stroke-width"]&&(Q.weight=V),V&&V<1&&(P*=V)&&(Q.weight=1),Q.opacity=P,i["stroke-linejoin"]&&(Q.joinstyle=i["stroke-linejoin"]||"miter"),Q.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(Q.endcap=i["stroke-linecap"]=="butt"?"flat":i["stroke-linecap"]=="square"?"square":"round");if(i["stroke-dasharray"]){var W={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};Q.dashstyle=W[b](i["stroke-dasharray"])?W[i["stroke-dasharray"]]:o}T&&l.appendChild(Q)}if(t.type=="text"){t.paper.canvas.style.display=o;var X=t.paper.span,Y=100,Z=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);p=X.style,m.font&&(p.font=m.font),m["font-family"]&&(p.fontFamily=m["font-family"]),m["font-weight"]&&(p.fontWeight=m["font-weight"]),m["font-style"]&&(p.fontStyle=m["font-style"]),Z=d(m["font-size"]||Z&&Z[0])||10,p.fontSize=Z*Y+"px",t.textpath.string&&(X.innerHTML=c(t.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var $=X.getBoundingClientRect();t.W=m.w=($.right-$.left)/Y,t.H=m.h=($.bottom-$.top)/Y,t.X=m.x,t.Y=m.y+t.H/2,("x"in i||"y"in i)&&(t.path.v=a.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));var _=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var ba=0,bb=_.length;ba<bb;ba++)if(_[ba]in i){t._.dirty=1;break}switch(m["text-anchor"]){case"start":t.textpath.style["v-text-align"]="left",t.bbx=t.W/2;break;case"end":t.textpath.style["v-text-align"]="right",t.bbx=-t.W/2;break;default:t.textpath.style["v-text-align"]="center",t.bbx=0}t.textpath.style["v-text-kern"]=!0}},C=function(b,f,g){b.attrs=b.attrs||{};var h=b.attrs,i=Math.pow,j,k,l="linear",m=".5 .5";b.attrs.gradient=f,f=c(f).replace(a._radial_gradient,function(a,b,c){l="radial",b&&c&&(b=d(b),c=d(c),i(b-.5,2)+i(c-.5,2)>.25&&(c=e.sqrt(.25-i(b-.5,2))*((c>.5)*2-1)+.5),m=b+n+c);return o}),f=f.split(/\s*\-\s*/);if(l=="linear"){var p=f.shift();p=-d(p);if(isNaN(p))return null}var q=a._parseDots(f);if(!q)return null;b=b.shape||b.node;if(q.length){b.removeChild(g),g.on=!0,g.method="none",g.color=q[0].color,g.color2=q[q.length-1].color;var r=[];for(var s=0,t=q.length;s<t;s++)q[s].offset&&r.push(q[s].offset+n+q[s].color);g.colors=r.length?r.join():"0% "+g.color,l=="radial"?(g.type="gradientTitle",g.focus="100%",g.focussize="0 0",g.focusposition=m,g.angle=0):(g.type="gradient",g.angle=(270-p)%360),b.appendChild(g)}return 1},D=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=c,this.matrix=a.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},E=a.el;D.prototype=E,E.constructor=D,E.transform=function(b){if(b==null)return this._.transform;var d=this.paper._viewBoxShift,e=d?"s"+[d.scale,d.scale]+"-1-1t"+[d.dx,d.dy]:o,f;d&&(f=b=c(b).replace(/\.{3}|\u2026/g,this._.transform||o)),a._extractTransform(this,e+b);var g=this.matrix.clone(),h=this.skew,i=this.node,j,k=~c(this.attrs.fill).indexOf("-"),l=!c(this.attrs.fill).indexOf("url(");g.translate(-0.5,-0.5);if(l||k||this.type=="image"){h.matrix="1 0 0 1",h.offset="0 0",j=g.split();if(k&&j.noRotation||!j.isSimple){i.style.filter=g.toFilter();var m=this.getBBox(),p=this.getBBox(1),q=m.x-p.x,r=m.y-p.y;i.coordorigin=q*-u+n+r*-u,z(this,1,1,q,r,0)}else i.style.filter=o,z(this,j.scalex,j.scaley,j.dx,j.dy,j.rotate)}else i.style.filter=o,h.matrix=c(g),h.offset=g.offset();f&&(this._.transform=f);return this},E.rotate=function(a,b,e){if(this.removed)return this;if(a!=null){a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),e==null&&(b=e);if(b==null||e==null){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,b,e]]));return this}},E.translate=function(a,b){if(this.removed)return this;a=c(a).split(k),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]]));return this},E.scale=function(a,b,e,f){if(this.removed)return this;a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),b==null&&(b=a),f==null&&(e=f);if(e==null||f==null)var g=this.getBBox(1);e=e==null?g.x+g.width/2:e,f=f==null?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this._.dirtyT=1;return this},E.hide=function(){!this.removed&&(this.node.style.display="none");return this},E.show=function(){!this.removed&&(this.node.style.display=o);return this},E._getBBox=function(){if(this.removed)return{};return{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},E.remove=function(){if(!this.removed&&!!this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),a.eve.unbind("raphael.*.*."+this.id),a._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;this.removed=!0}},E.attr=function(c,d){if(this.removed)return this;if(c==null){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform;return e}if(d==null&&a.is(c,"string")){if(c==j&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;var g=c.split(k),h={};for(var i=0,m=g.length;i<m;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return m-1?h:h[g[0]]}if(this.attrs&&d==null&&a.is(c,"array")){h={};for(i=0,m=c.length;i<m;i++)h[c[i]]=this.attr(c[i]);return h}var n;d!=null&&(n={},n[c]=d),d==null&&a.is(c,"object")&&(n=c);for(var o in n)l("raphael.attr."+o+"."+this.id,this,n[o]);if(n){for(o in this.paper.customAttributes)if(this.paper.customAttributes[b](o)&&n[b](o)&&a.is(this.paper.customAttributes[o],"function")){var p=this.paper.customAttributes[o].apply(this,[].concat(n[o]));this.attrs[o]=n[o];for(var q in p)p[b](q)&&(n[q]=p[q])}n.text&&this.type=="text"&&(this.textpath.string=n.text),B(this,n)}return this},E.toFront=function(){!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&a._tofront(this,this.paper);return this},E.toBack=function(){if(this.removed)return this;this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper));return this},E.insertAfter=function(b){if(this.removed)return this;b.constructor==a.st.constructor&&(b=b[b.length-1]),b.node.nextSibling?b.node.parentNode.insertBefore(this.node,b.node.nextSibling):b.node.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper);return this},E.insertBefore=function(b){if(this.removed)return this;b.constructor==a.st.constructor&&(b=b[0]),b.node.parentNode.insertBefore(this.node,b.node),a._insertbefore(this,b,this.paper);return this},E.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(r,o),+b!==0?(this.attrs.blur=b,c.filter=d+n+m+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",f(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur)},a._engine.path=function(a,b){var c=F("shape");c.style.cssText=t,c.coordsize=u+n+u,c.coordorigin=b.coordorigin;var d=new D(c,b),e={fill:"none",stroke:"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,B(d,e),b.canvas.appendChild(c);var f=F("skew");f.on=!0,c.appendChild(f),d.skew=f,d.transform(o);return d},a._engine.rect=function(b,c,d,e,f,g){var h=a._rectPath(c,d,e,f,g),i=b.path(h),j=i.attrs;i.X=j.x=c,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect";return i},a._engine.ellipse=function(a,b,c,d,e){var f=a.path(),g=f.attrs;f.X=b-d,f.Y=c-e,f.W=d*2,f.H=e*2,f.type="ellipse",B(f,{cx:b,cy:c,rx:d,ry:e});return f},a._engine.circle=function(a,b,c,d){var e=a.path(),f=e.attrs;e.X=b-d,e.Y=c-d,e.W=e.H=d*2,e.type="circle",B(e,{cx:b,cy:c,r:d});return e},a._engine.image=function(b,c,d,e,f,g){var h=a._rectPath(d,e,f,g),i=b.path(h).attr({stroke:"none"}),k=i.attrs,l=i.node,m=l.getElementsByTagName(j)[0];k.src=c,i.X=k.x=d,i.Y=k.y=e,i.W=k.width=f,i.H=k.height=g,k.path=h,i.type="image",m.parentNode==l&&l.removeChild(m),m.rotate=!0,m.src=c,m.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],l.appendChild(m),z(i,1,1,0,0,0);return i},a._engine.text=function(b,d,e,g){var h=F("shape"),i=F("path"),j=F("textpath");d=d||0,e=e||0,g=g||"",i.v=a.format("m{0},{1}l{2},{1}",f(d*u),f(e*u),f(d*u)+1),i.textpathok=!0,j.string=c(g),j.on=!0,h.style.cssText=t,h.coordsize=u+n+u,h.coordorigin="0 0";var k=new D(h,b),l={fill:"#000",stroke:"none",font:a._availableAttrs.font,text:g};k.shape=h,k.path=i,k.textpath=j,k.type="text",k.attrs.text=c(g),k.attrs.x=d,k.attrs.y=e,k.attrs.w=1,k.attrs.h=1,B(k,l),h.appendChild(j),h.appendChild(i),b.canvas.appendChild(h);var m=F("skew");m.on=!0,h.appendChild(m),k.skew=m,k.transform(o);return k},a._engine.setSize=function(b,c){var d=this.canvas.style;this.width=b,this.height=c,b==+b&&(b+="px"),c==+c&&(c+="px"),d.width=b,d.height=c,d.clip="rect(0 "+b+" "+c+" 0)",this._viewBox&&a._engine.setViewBox.apply(this,this._viewBox);return this},a._engine.setViewBox=function(b,c,d,e,f){a.eve("raphael.setViewBox",this,this._viewBox,[b,c,d,e,f]);var h=this.width,i=this.height,j=1/g(d/h,e/i),k,l;f&&(k=i/e,l=h/d,d*k<h&&(b-=(h-d*k)/2/k),e*l<i&&(c-=(i-e*l)/2/l)),this._viewBox=[b,c,d,e,!!f],this._viewBoxShift={dx:-b,dy:-c,scale:j},this.forEach(function(a){a.transform("...")});return this};var F;a._engine.initWin=function(a){var b=a.document;b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),F=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b.container,d=b.height,e,f=b.width,g=b.x,h=b.y;if(!c)throw new Error("VML container not found.");var i=new a._Paper,j=i.canvas=a._g.doc.createElement("div"),k=j.style;g=g||0,h=h||0,f=f||512,d=d||342,i.width=f,i.height=d,f==+f&&(f+="px"),d==+d&&(d+="px"),i.coordsize=u*1e3+n+u*1e3,i.coordorigin="0 0",i.span=a._g.doc.createElement("span"),i.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",j.appendChild(i.span),k.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d),c==1?(a._g.doc.body.appendChild(j),k.left=g+"px",k.top=h+"px",k.position="absolute"):c.firstChild?c.insertBefore(j,c.firstChild):c.appendChild(j),i.renderfix=function(){};return i},a.prototype.clear=function(){a.eve("raphael.clear",this),this.canvas.innerHTML=o,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){a.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;return!0};var G=a.st;for(var H in E)E[b](H)&&!G[b](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}(window.Raphael);(function($,window,undefined){var iView=function(el,options){var iv=this;iv.options=options;iv.sliderContent=el,iv.sliderInner=iv.sliderContent.html();iv.sliderContent.html("<div class='iviewSlider'>"+iv.sliderInner+"</div>");iv.slider=$('.iviewSlider',iv.sliderContent);iv.slider.css('position','relative');iv.slider.css('height',options.height+'px');iv.defs={slide:0,total:0,image:'',images:[],width:iv.sliderContent.width(),height:iv.sliderContent.height(),timer:options.timer.toLowerCase(),lock:!1,paused:(options.autoAdvance)?!1:!0,time:options.pauseTime,easing:options.easing};iv.disableSelection(iv.slider[0]);iv.slides=iv.slider.children();iv.slides.each(function(i){var slide=$(this);iv.defs.images.push(slide.data("leo_image"));if(slide.data("leo_thumbnail"))iv.defs.images.push(slide.data("leo_thumbnail"));slide.css('display','none');if(slide.data("leo_type")=="video"){var element=slide.children().eq(0),video=$('<div class="iview-video-show"><div class="iview-video-container"><a class="iview-video-close" title="'+options.closeLabel+'">&#735;</a></div></div>');slide.append(video);element.appendTo($('div.iview-video-container',video));video.css({width:'100%',height:iv.defs.height,top:'-'+iv.defs.height+'px'}).hide();slide.addClass('iview-video').css({'cursor':'pointer'})}
iv.defs.total++}).css({width:iv.defs.width,height:iv.defs.height});iv.sliderContent.append('<div class="iview-preloader"><div></div></div>');var iviewPreloader=$('.iview-preloader',iv.sliderContent);var preloaderBar=$('div',iviewPreloader);iviewPreloader.css({top:((iv.defs.height/2)-(iviewPreloader.height()/2))+'px',left:((iv.defs.width/2)-(iviewPreloader.width()/2))+'px'});iv.sliderContent.append('<div class="iview-timer"><div></div></div>');iv.iviewTimer=$('.iview-timer',iv.sliderContent);iv.iviewTimer.hide();$('.tp-caption',iv.slider).each(function(i){var caption=$(this);caption.html('<div class="caption-contain">'+caption.html()+'</div>')});options.startSlide=(options.randomStart)?Math.floor(Math.random()*iv.defs.total):options.startSlide;options.startSlide=(options.startSlide>0&&options.startSlide>=iv.defs.total)?iv.defs.total-1:options.startSlide;iv.defs.slide=options.startSlide;iv.defs.image=iv.slides.eq(iv.defs.slide);iv.defs.time=(options.pauseTime&&options.pauseTime!=0)?options.pauseTime:5000;iv.defs.easing=(iv.defs.image.data('leo_easing'))?iv.defs.image.data('leo_easing'):options.easing;iv.pieDegree=0;var padding=options.timerPadding,diameter=options.timerDiameter,stroke=options.timerStroke;if(iv.defs.total>1&&iv.defs.timer!="bar"){stroke=(iv.defs.timer=="360bar")?options.timerStroke:0;var width=(diameter+(padding*2)+(stroke*2)),height=width,r=Raphael(iv.iviewTimer[0],width,height);iv.R=(diameter/2);var param={stroke:options.timerBg,"stroke-width":(stroke+(padding*2))},param2={stroke:options.timerColor,"stroke-width":stroke,"stroke-linecap":"round"},param3={fill:options.timerColor,stroke:'none',"stroke-width":0},bgParam={fill:options.timerBg,stroke:'none',"stroke-width":0};r.customAttributes.arc=function(value,R){var total=360,alpha=360/total*value,a=(90-alpha)*Math.PI/180,cx=((diameter/2)+padding+stroke),cy=((diameter/2)+padding+stroke),x=cx+R*Math.cos(a),y=cy-R*Math.sin(a),path;if(total==value){path=[["M",cx,cy-R],["A",R,R,0,1,1,299.99,cy-R]]}else{path=[["M",cx,cy-R],["A",R,R,0,+(alpha>180),1,x,y]]}
return{path:path}};r.customAttributes.segment=function(angle,R){var a1=-90;R=R-1;angle=(a1+angle);var flag=(angle-a1)>180,x=((diameter/2)+padding),y=((diameter/2)+padding);a1=(a1%360)*Math.PI/180;angle=(angle%360)*Math.PI/180;return{path:[["M",x,y],["l",R*Math.cos(a1),R*Math.sin(a1)],["A",R,R,0,+flag,1,x+R*Math.cos(angle),y+R*Math.sin(angle)],["z"]]}};if(iv.defs.total>1&&iv.defs.timer=="pie"){r.circle(iv.R+padding,iv.R+padding,iv.R+padding-1).attr(bgParam)}
iv.timerBgPath=r.path().attr(param),iv.timerPath=r.path().attr(param2),iv.pieTimer=r.path().attr(param3)}
iv.barTimer=$('div',iv.iviewTimer);if(iv.defs.total>1&&iv.defs.timer=="360bar"){iv.timerBgPath.attr({arc:[359.9,iv.R]})}
if(iv.defs.timer=="bar"){iv.iviewTimer.css({opacity:options.timerOpacity,width:diameter,height:stroke,border:options.timerBarStroke+'px '+options.timerBarStrokeColor+' '+options.timerBarStrokeStyle,padding:padding,background:options.timerBg});iv.barTimer.css({width:0,height:stroke,background:options.timerColor,'float':'left'})}else{iv.iviewTimer.css({opacity:options.timerOpacity,width:width,height:height})}
iv.setTimerPosition();new ImagePreload(iv.defs.images,function(i){var percent=(i*10);preloaderBar.stop().animate({width:percent+'%'})},function(){preloaderBar.stop().animate({width:'100%'},function(){iviewPreloader.remove();iv.startSlider();options.onAfterLoad.call(this)})});iv.sliderContent.bind('swipeleft',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')}).bind('swiperight',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});if(options.keyboardNav){$(document).bind('keyup.iView',function(event){if(event.keyCode=='37'){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')}
if(event.keyCode=='39'){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')}})}
iv.iviewTimer.on('click',function(){if(iv.iviewTimer.hasClass('paused')){iv.playSlider()}else{iv.stopSlider()}});iv.sliderContent.bind('leo_pause',function(){iv.stopSlider()});iv.sliderContent.bind('leo_play',function(){iv.playSlider()});iv.sliderContent.bind('leo_previous',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});iv.sliderContent.bind('leo_next',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')});iv.sliderContent.bind('leo_goSlide',function(event,slide){if(iv.defs.lock||iv.defs.slide==slide)return!1;if($(this).hasClass('active'))return!1;iv.cleanTimer();if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}
iv.defs.slide=slide-1;iv.goTo('control')});iv.sliderContent.bind('resize',function(){t=$(this),tW=t.width(),tH=t.height(),width=iv.slider.width(),height=iv.slider.height();if(iv.defs.width!=tW){iv.options.customWidth
if(width<=iv.options.customWidth){width=iv.options.customWidth;$('.iviewSlider').width(iv.options.customWidth)}
if(tW>iv.options.customWidth+5){$('.iviewSlider').css('width','100%')}
var ratio=(tW/width);if(ratio>0.985){ratio=1}
newHeight=Math.round(iv.defs.height*ratio);if(iv.options.rtl==!0){iv.slider.css({'-webkit-transform-origin':'100% 0','-moz-transform-origin':'100% 0','-o-transform-origin':'100% 0','-ms-transform-origin':'100% 0','transform-origin':'100% 0','-webkit-transform':'scale('+ratio+')','-moz-transform':'scale('+ratio+')','-o-transform':'scale('+ratio+')','-ms-transform':'scale('+ratio+')','transform':'scale('+ratio+')'})}else{iv.slider.css({'-webkit-transform-origin':'0 0','-moz-transform-origin':'0 0','-o-transform-origin':'0 0','-ms-transform-origin':'0 0','transform-origin':'0 0','-webkit-transform':'scale('+ratio+')','-moz-transform':'scale('+ratio+')','-o-transform':'scale('+ratio+')','-ms-transform':'scale('+ratio+')','transform':'scale('+ratio+')'})}
t.css({height:newHeight});iv.defs.width=tW;iv.setTimerPosition()}});$('.iview-video',iv.slider).click(function(e){var t=$(this),video=$('.iview-video-show',t);if(!$(e.target).hasClass('iview-video-close')&&!$(e.target).hasClass('tp-caption')&&!$(e.target).parents().hasClass('tp-caption')){video.show().animate({top:0},1000,'easeOutBounce');iv.sliderContent.trigger('leo_pause')}});$('.iview-video-close',iv.slider).click(function(){var video=$(this).parents('.iview-video-show'),iframe=$('iframe',video),src=iframe.attr('src');iframe.removeAttr('src').attr('src',src);video.animate({top:'-'+iv.defs.height+'px'},1000,'easeOutBounce',function(){video.hide();iv.sliderContent.trigger('leo_play')})})};iView.prototype={timer:null,startSlider:function(){var iv=this;var img=new Image();img.src=iv.slides.eq(0).data('leo_image');imgWidth=img.width;if(imgWidth!=iv.defs.width){iv.defs.width=imgWidth;iv.sliderContent.trigger('resize')}
iv.iviewTimer.show();iv.slides.eq(iv.defs.slide).css('display','block');if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}
iv.setCaption(iv.options);iv.iviewTimer.addClass('paused').attr('title',iv.options.playLabel);if(iv.options.autoAdvance&&iv.defs.total>1){iv.iviewTimer.removeClass('paused').attr('title',iv.options.pauseLabel);iv.setTimer()}
if(iv.options.directionNav){iv.sliderContent.append('<div class="iview-directionNav"><a class="iview-prevNav" title="'+iv.options.previousLabel+'">'+iv.options.previousLabel+'</a><a class="iview-nextNav" title="'+iv.options.nextLabel+'">'+iv.options.nextLabel+'</a></div>');$('.iview-directionNav',iv.sliderContent).css({opacity:iv.options.directionNavHoverOpacity});iv.sliderContent.hover(function(){$('.iview-directionNav',iv.sliderContent).stop().animate({opacity:1},300)},function(){$('.iview-directionNav',iv.sliderContent).stop().animate({opacity:iv.options.directionNavHoverOpacity},300)});$('a.iview-prevNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});$('a.iview-nextNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')})}
if(iv.options.controlNav){if(iv.options.controlNavThumbs){var class_navigation='iview-thumbnail'}else{var class_navigation='iview-bullet'}
var iviewControl='<div class="iview-controlNav '+class_navigation+'">',iviewTooltip='';if(!iv.options.directionNav&&iv.options.controlNavNextPrev)iviewControl+='<a class="iview-controlPrevNav" title="'+iv.options.previousLabel+'">'+iv.options.previousLabel+'</a>';if(iv.options.customHtmlBullet){iviewControl+='<div class="iview-items customHtmlBullet"><ul>'}else{iviewControl+='<div class="iview-items"><ul>'}
for(var i=0;i<iv.defs.total;i++){var slide=iv.slides.eq(i);iviewControl+='<li>';if(iv.options.controlNavThumbs){var thumb=(slide.data('leo_thumbnail'))?slide.data('leo_thumbnail'):slide.data('leo_image');iviewControl+='<a class="iview-control" rel="'+i+'"><img src="'+thumb+'" /></a>'}else{var thumb=(slide.data('leo_thumbnail'))?slide.data('leo_thumbnail'):slide.data('leo_image');var bullet_number='<span>'+(i+1)+'</span>';var bullet_class=iv.getSlideData(slide,'leo_bullet_class');var bullet_description=iv.getSlideData(slide,'leo_bullet_description');iviewControl+='<a class="iview-control '+bullet_class+'" rel="'+i+'">'+bullet_number+' '+bullet_description+'</a>';if(iv.options.controlNavTooltip)iviewTooltip+='<div rel="'+i+'"><img src="'+thumb+'" /></div>'}
iviewControl+='</li>'}
iviewControl+='</ul></div>';if(!iv.options.directionNav&&iv.options.controlNavNextPrev)iviewControl+='<a class="iview-controlNextNav" title="'+iv.options.nextLabel+'">'+iv.options.nextLabel+'</a>';iviewControl+='</div>';if(!iv.options.controlNavThumbs&&iv.options.controlNavTooltip)iviewControl+='<div class="iview-tooltip"><div class="holder"><div class="container">'+iviewTooltip+'</div></div></div>';iv.sliderContent.append(iviewControl);$('.iview-controlNav a.iview-control:eq('+iv.defs.slide+')',iv.sliderContent).addClass('active');$('a.iview-controlPrevNav',iv.sliderContent).one('click',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});$('a.iview-controlNextNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')});$('.iview-controlNav a.iview-control',iv.sliderContent).on('click',function(){if(iv.defs.lock)return!1;if($(this).hasClass('active'))return!1;iv.cleanTimer();if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}
iv.defs.slide=$(this).attr('rel')-1;iv.goTo('control')});$('.iview-controlNav',iv.sliderContent).css({opacity:iv.options.controlNavHoverOpacity});iv.sliderContent.hover(function(){$('.iview-controlNav',iv.sliderContent).stop().animate({opacity:1},300);iv.sliderContent.addClass('iview-hover')},function(){$('.iview-controlNav',iv.sliderContent).stop().animate({opacity:iv.options.controlNavHoverOpacity},300);iv.sliderContent.removeClass('iview-hover')});var tooltipTimer=null;$('.iview-controlNav a.iview-control',iv.sliderContent).hover(function(e){var t=$(this),i=t.attr('rel'),tooltip=$('.iview-tooltip',iv.sliderContent),holder=$('div.holder',tooltip),x=t.offset().left-iv.sliderContent.offset().left-(tooltip.outerWidth()/2)+iv.options.tooltipX,y=t.offset().top-iv.sliderContent.offset().top-tooltip.outerHeight()+iv.options.tooltipY,imD=$('div[rel='+i+']')
scrollLeft=(i*imD.width());tooltip.stop().animate({left:x,top:y,opacity:1},300);if(tooltip.not(':visible'))tooltip.fadeIn(300);holder.stop().animate({scrollLeft:scrollLeft},300);clearTimeout(tooltipTimer)},function(e){var tooltip=$('.iview-tooltip',iv.sliderContent);tooltipTimer=setTimeout(function(){tooltip.animate({opacity:0},300,function(){tooltip.hide()})},200)})}
iv.sliderContent.bind('mouseover.iView mousemove.iView',function(){if(iv.options.pauseOnHover&&!iv.defs.paused)iv.cleanTimer();iv.sliderContent.addClass('iview-hover')}).bind('mouseout.iView',function(){if(iv.options.pauseOnHover&&!iv.defs.paused&&iv.timer==null&&iv.pieDegree<=359&&iv.options.autoAdvance)iv.setTimer();iv.sliderContent.removeClass('iview-hover')})},getSlideData:function(slide,param){var result='';if(slide.data(param)!==undefined){return slide.data(param)}
return result},setCaption:function(){var iv=this,slide=iv.slides.eq(iv.defs.slide),captions=$('.tp-caption',slide),timeEx=0;captions.each(function(i){var caption=$(this),fx=(caption.data('transition'))?$.trim(caption.data('transition').toLowerCase()):"fade",speed=(caption.data('speed'))?caption.data('speed'):iv.options.captionSpeed,easing=(caption.data('easing'))?caption.data('easing'):iv.options.captionEasing,x=(caption.data('x')!="undefined")?caption.data('x'):"center",y=(caption.data('y')!="undefined")?caption.data('y'):"center",w=(caption.data('width'))?caption.data('width'):caption.outerWidth(),h=(caption.data('height'))?caption.data('height'):caption.outerHeight(),oW=caption.outerWidth(),oH=caption.outerHeight();if(x=="center")x=((iv.defs.width/2)-(oW/2));if(y=="center")y=((iv.defs.height/2)-(oH/2));var captionContain=$('.caption-contain',caption);caption.css({opacity:0});captionContain.css({opacity:0,position:'relative',width:w,height:h});switch(fx){case "wipedown":caption.css({top:(y-h),left:x});captionContain.css({top:(h+(h*3)),left:0});break;case "wipeup":caption.css({top:(y+h),left:x});captionContain.css({top:(h-(h*3)),left:0});break;case "wiperight":caption.css({top:y,left:(x-w)});captionContain.css({top:0,left:(w+(w*2))});break;case "wipeleft":caption.css({top:y,left:(x+w)});captionContain.css({top:0,left:(w-(w*2))});break;case "fade":caption.css({top:y,left:x});captionContain.css({top:0,left:0});break;case "expanddown":caption.css({top:y,left:x,height:0});captionContain.css({top:(h+(h*3)),left:0});break;case "expandup":caption.css({top:(y+h),left:x,height:0});captionContain.css({top:(h-(h*3)),left:0});break;case "expandright":caption.css({top:y,left:x,width:0});captionContain.css({top:0,left:(w+(w*2))});break;case "expandleft":caption.css({top:y,left:(x+w),width:0});captionContain.css({top:0,left:(w-(w*2))});break}
setTimeout(function(){caption.animate({opacity:iv.options.captionOpacity,top:y,left:x,width:w,height:h},speed,easing,function(){})},timeEx);setTimeout(function(){captionContain.animate({opacity:iv.options.captionOpacity,top:0,left:0},speed,easing)},(timeEx+100));timeEx+=250})},processTimer:function(){var iv=this;if(iv.defs.timer=="360bar"){var degree=(iv.pieDegree==0)?0:iv.pieDegree+.9;if(iv.timerPath!=undefined){iv.timerPath.attr({arc:[degree,iv.R]})}}else if(iv.defs.timer=="pie"){var degree=(iv.pieDegree==0)?0:iv.pieDegree+.9;if(iv.timerPath!=undefined){iv.pieTimer.attr({segment:[degree,iv.R]})}}else{iv.barTimer.css({width:((iv.pieDegree/360)*100)+'%'})}
iv.pieDegree+=3},transitionEnd:function(iv){iv.options.onAfterChange.call(this);iv.defs.lock=!1;iv.slides.css('display','none');iv.slides.eq(iv.defs.slide).show();if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}
$('.iview-strip, .iview-block','.iviewSlider').remove();iv.defs.time=(iv.options.pauseTime&&iv.options.pauseTime!=0)?iv.options.pauseTime:5000;iv.iviewTimer.animate({opacity:iv.options.timerOpacity});iv.pieDegree=0;iv.processTimer();iv.setCaption(iv.options);if(iv.timer==null&&!iv.defs.paused)iv.timer=setInterval(function(){iv.timerCall(iv)},(iv.defs.time/120))},addStrips:function(vertical,opts){var iv=this;opts=(opts)?opts:iv.options;for(var i=0;i<opts.strips;i++){var stripWidth=Math.round(iv.slider.width()/opts.strips),stripHeight=Math.round(iv.slider.height()/opts.strips),bgPosition='-'+((stripWidth+(i*stripWidth))-stripWidth)+'px 0%',top=((vertical)?(stripHeight*i)+'px':'0px'),left=((vertical)?'0px':(stripWidth*i)+'px');if(vertical)bgPosition='0% -'+((stripHeight+(i*stripHeight))-stripHeight)+'px';if(i==opts.strips-1){var width=((vertical)?'0px':(iv.slider.width()-(stripWidth*i))+'px'),height=((vertical)?(iv.slider.height()-(stripHeight*i))+'px':'0px')}else{var width=((vertical)?'0px':stripWidth+'px'),height=((vertical)?stripHeight+'px':'0px')}
if(iv.defs.image.data('leo_background')=='image'){var strip=$('<div class="iview-strip"></div>').css({width:width,height:height,top:top,left:left,background:'url("'+iv.defs.image.data('leo_image')+'") no-repeat '+bgPosition,"background-size":"100%",opacity:0})}
if(iv.defs.image.data('leo_background')=='color'){var strip=$('<div class="iview-strip"></div>').css({width:width,height:height,top:top,left:left,"background-size":"100%",opacity:0})}
iv.slider.append(strip)}},addBlocks:function(){var iv=this,blockWidth=Math.round(iv.slider.width()/iv.options.blockCols),blockHeight=Math.round(iv.slider.height()/iv.options.blockRows);for(var rows=0;rows<iv.options.blockRows;rows++){for(var columns=0;columns<iv.options.blockCols;columns++){var top=(rows*blockHeight)+'px',left=(columns*blockWidth)+'px',width=blockWidth+'px',height=blockHeight+'px',bgPosition='-'+((blockWidth+(columns*blockWidth))-blockWidth)+'px -'+((blockHeight+(rows*blockHeight))-blockHeight)+'px';if(columns==iv.options.blockCols-1)width=(iv.slider.width()-(blockWidth*columns))+'px';if(iv.defs.image.data('leo_background')=='image'){var block=$('<div class="iview-block"></div>').css({width:blockWidth+'px',height:blockHeight+'px',top:(rows*blockHeight)+'px',left:(columns*blockWidth)+'px',background:'url("'+iv.defs.image.data('leo_image')+'") no-repeat '+bgPosition,"background-size":"100%",opacity:0})}
if(iv.defs.image.data('leo_background')=='color'){var block=$('<div class="iview-block"></div>').css({width:blockWidth+'px',height:blockHeight+'px',top:(rows*blockHeight)+'px',left:(columns*blockWidth)+'px',background:'url("'+iv.defs.image.data('leo_image')+'") no-repeat '+bgPosition,"background-size":"100%",opacity:0})}
iv.slider.append(block)}}},runTransition:function(fx){var iv=this;switch(fx){case 'strip-up-right':case 'strip-up-left':iv.addStrips();var timeDelay=0;i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-up-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);strip.css({top:'',bottom:'0px'});setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case 'strip-down':case 'strip-down-right':case 'strip-down-left':iv.addStrips();var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-down-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);strip.css({bottom:'',top:'0px'});setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case 'strip-left-right':case 'strip-left-right-up':case 'strip-left-right-down':iv.addStrips(!0);var timeDelay=0,i=0,v=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-left-right-down')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);if(i==0){strip.css({right:'',left:'0px'});i++}else{strip.css({left:'',right:'0px'});i=0}
setTimeout(function(){strip.animate({width:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(v==iv.options.strips-1)iv.transitionEnd(iv);v++})},(100+timeDelay));timeDelay+=50});break;case 'strip-up-down':case 'strip-up-down-right':case 'strip-up-down-left':iv.addStrips();var timeDelay=0,i=0,v=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-up-down-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);if(i==0){strip.css({bottom:'',top:'0px'});i++}else{strip.css({top:'',bottom:'0px'});i=0}
setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(v==iv.options.strips-1)iv.transitionEnd(iv);v++})},(100+timeDelay));timeDelay+=50});break;case 'left-curtain':case 'right-curtain':case 'top-curtain':case 'bottom-curtain':if(fx=='left-curtain'||fx=='right-curtain')iv.addStrips();else iv.addStrips(!0);var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='right-curtain'||fx=='bottom-curtain')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);var width=strip.width();var height=strip.height();if(fx=='left-curtain'||fx=='right-curtain')strip.css({top:'0px',height:'100%',width:'0px'});else strip.css({left:'0px',height:'0px',width:'100%'});setTimeout(function(){if(fx=='left-curtain'||fx=='right-curtain')strip.animate({width:width,opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++});else strip.animate({height:height,opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case 'strip-up-right':case 'strip-up-left':iv.addStrips();var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-up-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);strip.css({'bottom':'0px'});setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case 'strip-left-fade':case 'strip-right-fade':case 'strip-top-fade':case 'strip-bottom-fade':if(fx=='strip-left-fade'||fx=='strip-right-fade')iv.addStrips();else iv.addStrips(!0);var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-right-fade'||fx=='strip-bottom-fade')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);var width=strip.width();var height=strip.height();if(fx=='strip-left-fade'||fx=='strip-right-fade')strip.css({top:'0px',height:'100%',width:width});else strip.css({left:'0px',height:height,width:'100%'});setTimeout(function(){strip.animate({opacity:'1.0'},iv.options.animationSpeed*1.7,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=35});break;case 'slide-in-up':case 'slide-in-down':opts={strips:1};iv.addStrips(!1,opts);var strip=$('.iview-strip:first',iv.slider),top=0;if(fx=='slide-in-up')top='-'+iv.defs.height+'px';else top=iv.defs.height+'px';strip.css({top:top,'height':'100%','width':'100%',});strip.animate({'top':'0px',opacity:1},(iv.options.animationSpeed*2),iv.defs.easing,function(){iv.transitionEnd(iv)});break;case 'zigzag-top':case 'zigzag-bottom':case 'zigzag-grow-top':case 'zigzag-grow-bottom':case 'zigzag-drop-top':case 'zigzag-drop-bottom':iv.addBlocks();var totalBlocks=(iv.options.blockCols*iv.options.blockRows),timeDelay=0,blockToArr=new Array(),blocks=$('.iview-block',iv.slider);for(var rows=0;rows<iv.options.blockRows;rows++){var odd=(rows%2),start=(rows*iv.options.blockCols),end=((rows+1)*iv.options.blockCols);if(odd==1){for(var columns=end-1;columns>=start;columns--){blockToArr.push($(blocks[columns]))}}else{for(var columns=start;columns<end;columns++){blockToArr.push($(blocks[columns]))}}}
if(fx=='zigzag-bottom'||fx=='zigzag-grow-bottom'||fx=='zigzag-drop-bottom')blockToArr.reverse();blocks.each(function(i){var block=$(blockToArr[i]),h=block.height(),w=block.width(),top=block.css('top');if(fx=='zigzag-grow-top'||fx=='zigzag-grow-bottom')block.width(0).height(0);else if(fx=='zigzag-drop-top'||fx=='zigzag-drop-bottom')block.css({top:'-=50'});setTimeout(function(){if(fx=='zigzag-grow-top'||fx=='zigzag-grow-bottom')block.animate({opacity:'1',height:h,width:w},iv.options.animationSpeed,iv.defs.easing,function(){if(i==totalBlocks-1)iv.transitionEnd(iv)});else if(fx=='zigzag-drop-top'||fx=='zigzag-drop-bottom')block.animate({top:top,opacity:'1'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==totalBlocks-1)iv.transitionEnd(iv)});else block.animate({opacity:'1'},(iv.options.animationSpeed*2),'easeInOutExpo',function(){if(i==totalBlocks-1)iv.transitionEnd(iv)})},(100+timeDelay));timeDelay+=20});break;case 'block-fade':case 'block-fade-reverse':case 'block-expand':case 'block-expand-reverse':iv.addBlocks();var totalBlocks=(iv.options.blockCols*iv.options.blockRows),i=0,timeDelay=0;var rowIndex=0;var colIndex=0;var blockToArr=new Array();blockToArr[rowIndex]=new Array();var blocks=$('.iview-block',iv.slider);if(fx=='block-fade-reverse'||fx=='block-expand-reverse'){blocks=$('.iview-block',iv.slider).reverse()}
blocks.each(function(){blockToArr[rowIndex][colIndex]=$(this);colIndex++;if(colIndex==iv.options.blockCols){rowIndex++;colIndex=0;blockToArr[rowIndex]=new Array()}});for(var columns=0;columns<(iv.options.blockCols*2);columns++){var Col=columns;for(var rows=0;rows<iv.options.blockRows;rows++){if(Col>=0&&Col<iv.options.blockCols){(function(){var block=$(blockToArr[rows][Col]);var w=block.width();var h=block.height();if(fx=='block-expand'||fx=='block-expand-reverse'){block.width(0).height(0)}
setTimeout(function(){block.animate({opacity:'1',width:w,height:h},iv.options.animationSpeed/1.3,iv.defs.easing,function(){if(i==totalBlocks-1)iv.transitionEnd(iv);i++})},(100+timeDelay))})()}
Col--}
timeDelay+=100}
break;case 'block-random':case 'block-expand-random':case 'block-drop-random':iv.addBlocks();var totalBlocks=(iv.options.blockCols*iv.options.blockRows),timeDelay=0;var blocks=iv.shuffle($('.iview-block',iv.slider));blocks.each(function(i){var block=$(this),h=block.height(),w=block.width(),top=block.css('top');if(fx=='block-expand-random')block.width(0).height(0);if(fx=='block-drop-random')block.css({top:'-=50'});setTimeout(function(){block.animate({top:top,opacity:'1',height:h,width:w},iv.options.animationSpeed,iv.defs.easing,function(){if(i==totalBlocks-1)iv.transitionEnd(iv)})},(100+timeDelay));timeDelay+=20});break;case 'slide-in-right':case 'slide-in-left':case 'fade':default:opts={strips:1};iv.addStrips(!1,opts);var strip=$('.iview-strip:first',iv.slider);strip.css({'height':'100%','width':'100%',});if(fx=='slide-in-right')strip.css({'height':'100%','width':'100%','left':iv.defs.width+'px','right':''});else if(fx=='slide-in-left')strip.css({'left':'-'+iv.defs.width+'px'});strip.animate({left:'0px',opacity:1},(iv.options.animationSpeed*2),iv.defs.easing,function(){iv.transitionEnd(iv)});break}},shuffle:function(oldArray){var newArray=oldArray.slice();var len=newArray.length;var i=len;while(i--){var p=parseInt(Math.random()*len);var t=newArray[i];newArray[i]=newArray[p];newArray[p]=t}
return newArray},timerCall:function(iv){iv.processTimer();if(iv.pieDegree>=360){iv.cleanTimer();iv.goTo(!1)}},setTimer:function(){var iv=this;iv.timer=setInterval(function(){iv.timerCall(iv)},(iv.defs.time/120))},cleanTimer:function(){var iv=this;clearInterval(iv.timer);iv.timer=null},goTo:function(action){var iv=this;if(iv.defs&&(iv.defs.slide==iv.defs.total-1)){iv.options.onLastSlide.call(this)}
iv.cleanTimer();iv.iviewTimer.animate({opacity:0});iv.options.onBeforeChange.call(this);if(!action){if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}}else{if(action=='prev'||action=='next'){if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}}}
iv.defs.slide++;if(iv.defs.slide==iv.defs.total){iv.defs.slide=0;iv.options.onSlideShowEnd.call(this)}
if(iv.defs.slide<0)iv.defs.slide=(iv.defs.total-1);iv.defs.image=iv.slides.eq(iv.defs.slide);if(iv.options.timer_show==1){iv.playSlider();$('.iview-timer').hide()}
if(iv.options.timer_show==2){iv.stopSlider();$('.iview-timer').hide()}
if(iv.options.timer_show==3){$('.iview-timer').show();iv.playSlider()}
if(iv.defs.image.data('leo_type')=="video"){$('.iview-video',iv.slider).trigger('click');$('.iview-video-close').hide();$('.iview-timer').hide()}
if(iv.defs.image.data('autoplay')==!0){var current_video=$('.iviewSlider').children().eq(iv.defs.slide);var video_src=$("iframe",current_video).attr('src');$("iframe",current_video).attr('src',video_src+'&autoplay=1&loop=1&playlist='+iv.defs.image.data('videoid'))}
if(iv.options.controlNav){$('.iview-controlNav a.iview-control',iv.sliderContent).removeClass('active');$('.iview-controlNav a.iview-control:eq('+iv.defs.slide+')',iv.sliderContent).addClass('active')}
var fx=iv.options.fx;if(iv.options.fx.toLowerCase()=='random'){var transitions=new Array('left-curtain','right-curtain','top-curtain','bottom-curtain','strip-down-right','strip-down-left','strip-up-right','strip-up-left','strip-up-down','strip-up-down-left','strip-left-right','strip-left-right-down','slide-in-right','slide-in-left','slide-in-up','slide-in-down','fade','strip-left-fade','strip-right-fade','strip-top-fade','strip-bottom-fade');fx=transitions[Math.floor(Math.random()*(transitions.length+1))];if(fx==undefined)fx='fade';fx=$.trim(fx.toLowerCase())}
if(iv.options.fx.indexOf(',')!=-1){var transitions=iv.options.fx.split(',');fx=transitions[Math.floor(Math.random()*(transitions.length))];if(fx==undefined)fx='fade';fx=$.trim(fx.toLowerCase())}
if(iv.defs.image.data('leo_transition')){var transitions=iv.defs.image.data('leo_transition').split(',');fx=transitions[Math.floor(Math.random()*(transitions.length))];fx=$.trim(fx.toLowerCase())}
iv.defs.easing=(iv.defs.image.data('leo_easing'))?iv.defs.image.data('leo_easing'):iv.options.easing;iv.defs.lock=!0;iv.runTransition(fx)},playSlider:function(){var iv=this;if(iv.timer==null&&iv.defs.paused){iv.iviewTimer.removeClass('paused').attr('title',iv.options.pauseLabel);iv.setTimer();iv.defs.paused=!1;iv.options.onPlay.call(this)}},stopSlider:function(){var iv=this;iv.iviewTimer.addClass('paused').attr('title',iv.options.playLabel);iv.cleanTimer();iv.defs.paused=!0;iv.options.onPause.call(this)},setTimerPosition:function(){var iv=this,position=iv.options.timerPosition.toLowerCase().split('-');for(var i=0;i<position.length;i++){if(position[i]=='top'){iv.iviewTimer.css({top:iv.options.timerY+'px',bottom:''})}else if(position[i]=='middle'){iv.iviewTimer.css({top:(iv.options.timerY+(iv.defs.height/2)-(iv.options.timerDiameter/2))+'px',bottom:''})}else if(position[i]=='bottom'){iv.iviewTimer.css({bottom:iv.options.timerY+'px',top:''})}else if(position[i]=='left'){iv.iviewTimer.css({left:iv.options.timerX+'px',right:''})}else if(position[i]=='center'){iv.iviewTimer.css({left:(iv.options.timerX+(iv.defs.width/2)-(iv.options.timerDiameter/2))+'px',right:''})}else if(position[i]=='right'){iv.iviewTimer.css({right:iv.options.timerX+'px',left:''})}}},disableSelection:function(target){if(typeof target.onselectstart!="undefined")target.onselectstart=function(){return!1};else if(typeof target.style.MozUserSelect!="undefined")target.style.MozUserSelect="none";else if(typeof target.style.webkitUserSelect!="undefined")target.style.webkitUserSelect="none";else if(typeof target.style.userSelect!="undefined")target.style.userSelect="none";else target.onmousedown=function(){return!1};target.unselectable="on"},isTouch:function(){return!!('ontouchstart' in window)}};var ImagePreload=function(p_aImages,p_pfnPercent,p_pfnFinished){this.m_pfnPercent=p_pfnPercent;this.m_pfnFinished=p_pfnFinished;this.m_nLoaded=0;this.m_nProcessed=0;this.m_aImages=new Array;this.m_nICount=p_aImages.length;for(var i=0;i<p_aImages.length;i++)this.Preload(p_aImages[i])};ImagePreload.prototype={Preload:function(p_oImage){var oImage=new Image;this.m_aImages.push(oImage);oImage.onload=ImagePreload.prototype.OnLoad;oImage.onerror=ImagePreload.prototype.OnError;oImage.onabort=ImagePreload.prototype.OnAbort;oImage.oImagePreload=this;oImage.bLoaded=!1;oImage.source=p_oImage;oImage.src=p_oImage},OnComplete:function(){this.m_nProcessed++;if(this.m_nProcessed==this.m_nICount)this.m_pfnFinished();else this.m_pfnPercent(Math.round((this.m_nProcessed/this.m_nICount)*10))},OnLoad:function(){this.bLoaded=!0;this.oImagePreload.m_nLoaded++;this.oImagePreload.OnComplete()},OnError:function(){this.bError=!0;this.oImagePreload.OnComplete()},OnAbort:function(){this.bAbort=!0;this.oImagePreload.OnComplete()}}
$.fn.iView=function(options){options=jQuery.extend({fx:'random',easing:'easeOutQuad',strips:20,blockCols:10,blockRows:5,animationSpeed:500,pauseTime:5000,startSlide:0,directionNav:!0,directionNavHoverOpacity:0.6,controlNav:!1,controlNavNextPrev:!0,controlNavHoverOpacity:0.6,controlNavThumbs:!1,controlNavTooltip:!0,captionSpeed:500,captionEasing:'easeInOutSine',captionOpacity:1,autoAdvance:!0,keyboardNav:!0,touchNav:!0,pauseOnHover:!1,nextLabel:"Next",previousLabel:"Previous",playLabel:"Play",pauseLabel:"Pause",closeLabel:"Close",randomStart:!1,timer:'Pie',timerBg:'#000',timerColor:'#EEE',timerOpacity:0.5,timerDiameter:30,timerPadding:4,timerStroke:3,timerBarStroke:1,timerBarStrokeColor:'#EEE',timerBarStrokeStyle:'solid',timerPosition:'top-right',timerX:10,timerY:10,tooltipX:5,tooltipY:-5,onBeforeChange:function(){},onAfterChange:function(){},onAfterLoad:function(){},onLastSlide:function(){},onSlideShowEnd:function(){},onPause:function(){},onPlay:function(){}},options);$(this).each(function(){var el=$(this);new iView(el,options)})};$.fn.reverse=[].reverse;var elems=$([]),jq_resize=$.resize=$.extend($.resize,{}),timeout_id,str_setTimeout="setTimeout",str_resize="resize",str_data=str_resize+"-special-event",str_delay="delay",str_throttle="throttleWindow";jq_resize[str_delay]=250;jq_resize[str_throttle]=!0;$.event.special[str_resize]={setup:function(){if(!jq_resize[str_throttle]&&this[str_setTimeout]){return!1}
var elem=$(this);elems=elems.add(elem);$.data(this,str_data,{w:elem.width(),h:elem.height()});if(elems.length===1){loopy()}},teardown:function(){if(!jq_resize[str_throttle]&&this[str_setTimeout]){return!1}
var elem=$(this);elems=elems.not(elem);elem.removeData(str_data);if(!elems.length){clearTimeout(timeout_id)}},add:function(handleObj){if(!jq_resize[str_throttle]&&this[str_setTimeout]){return!1}
var old_handler;function new_handler(e,w,h){var elem=$(this),data=$.data(this,str_data);if(data!==undefined){data.w=w!==undefined?w:elem.width();data.h=h!==undefined?h:elem.height()}
old_handler.apply(this,arguments)}
if($.isFunction(handleObj)){old_handler=handleObj;return new_handler}else{old_handler=handleObj.handler;handleObj.handler=new_handler}}};function loopy(){timeout_id=window[str_setTimeout](function(){elems.each(function(){var elem=$(this),width=elem.width(),height=elem.height(),data=$.data(this,str_data);if(width!==data.w||height!==data.h){elem.trigger(str_resize,[data.w=width,data.h=height])}});loopy()},jq_resize[str_delay])}
var supportTouch=!!('ontouchstart' in window),touchStartEvent=supportTouch?"touchstart":"mousedown",touchStopEvent=supportTouch?"touchend":"mouseup",touchMoveEvent=supportTouch?"touchmove":"mousemove";$.event.special.swipe={scrollSupressionThreshold:10,durationThreshold:1000,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var thisObject=this,$this=$(thisObject);$this.bind(touchStartEvent,function(event){var data=event.originalEvent.touches?event.originalEvent.touches[0]:event,start={time:(new Date()).getTime(),coords:[data.pageX,data.pageY],origin:$(event.target)},stop;function moveHandler(event){if(!start){return}
var data=event.originalEvent.touches?event.originalEvent.touches[0]:event;stop={time:(new Date()).getTime(),coords:[data.pageX,data.pageY]};if(Math.abs(start.coords[0]-stop.coords[0])>$.event.special.swipe.scrollSupressionThreshold){event.preventDefault()}}
$this.bind(touchMoveEvent,moveHandler).one(touchStopEvent,function(event){$this.unbind(touchMoveEvent,moveHandler);if(start&&stop){if(stop.time-start.time<$.event.special.swipe.durationThreshold&&Math.abs(start.coords[0]-stop.coords[0])>$.event.special.swipe.horizontalDistanceThreshold&&Math.abs(start.coords[1]-stop.coords[1])<$.event.special.swipe.verticalDistanceThreshold){start.origin.trigger("swipe").trigger(start.coords[0]>stop.coords[0]?"swipeleft":"swiperight")}}
start=stop=undefined})})}};$.each({swipeleft:"swipe",swiperight:"swipe"},function(event,sourceEvent){$.event.special[event]={setup:function(){$(this).bind(sourceEvent,$.noop)}}})})(jQuery,this);$(document).ready(function(){if(typeof(leoslideshow_list_functions)!='undefined'){for(var i=0;i<leoslideshow_list_functions.length;i++){leoslideshow_list_functions[i]()}}});/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
$(document).ready(function(){if(typeof leo_allow_ajax!=="undefined"&&!leo_allow_ajax){return}
var is_safari=!1;if(navigator.userAgent.toLowerCase().indexOf("chrome/")!==-1){is_safari=!1}else if(navigator.userAgent.toLowerCase().indexOf("safari/")!==-1){is_safari=!0}
if(navigator.appVersion.indexOf("Win")!=-1&&is_safari){$('html').addClass('safari-win')}
if(typeof show_popup!='undefined'&&!show_popup){$(".blockcart.cart-preview").addClass('leo-blockcart').removeClass('blockcart')}
createModalAndDropdown(0,0);leoSelectAttr();leoChooseAttr();leoBtCart();prestashop.on('updateProductList',function(){leoSelectAttr();leoChooseAttr();leoBtCart()});prestashop.on('updateCart',function(event){if(typeof show_popup!='undefined'&&!show_popup){if($('.leo-blockcart.cart-preview .cssload-piano').length){$('.leo-blockcart.cart-preview .cssload-piano').show()}
var refresh_url=$('.leo-blockcart').data('refresh-url');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refresh_url,async:!0,cache:!1,success:function(resp){$('.leo-blockcart').replaceWith($(resp.preview).find('.blockcart'));$(".blockcart.cart-preview").addClass('leo-blockcart').removeClass('blockcart');if(event.reason.linkAction=='add-to-cart'&&event.resp.success){prestashop.emit('updateProduct',{reason:''})}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
if(event.reason.linkAction=='add-to-cart'&&event.resp.success){if(typeof enable_flycart_effect!='undefined'&&enable_flycart_effect){if($('.leo-bt-cart.active').length){flyCartEffect($('.leo-bt-cart.active'))}else if(prestashop.page.page_name=='product'||$('.product-add-to-cart .add-to-cart').length){flyCartEffect($('.product-add-to-cart .add-to-cart'))}}
if($('.leo-notification').length&&typeof enable_notification!='undefined'&&enable_notification){var id_product=event.resp.id_product;var product_name=!1;$.each(event.resp.cart.products,function(key,value){if(id_product==value.id_product){product_name=value.name;return!1}})
showLeoNotification('success','add',product_name)}}
if(typeof show_popup!='undefined'&&show_popup){check_active_modal_cart=setInterval(function(){if($('.leo-bt-cart.active').length&&$('#blockcart-modal').length&&$('#blockcart-modal').hasClass('modal fade in')){$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset');clearInterval(check_active_modal_cart)}},200)}
if(typeof show_popup!='undefined'&&!show_popup){if($('.leo-bt-cart.active').length){$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')}}
if($('.leo-fly-cart .leo-fly-cart-cssload-loader').length){$('.leo-fly-cart .leo-fly-cart-cssload-loader').show()}
if($('.leo-dropdown-cart-item.deleting').length){$('.leo-dropdown-cart-item.deleting .leo-dropdown-overlay').hide();$('.leo-dropdown-cart-item.deleting .leo-dropdown-cssload-speeding-wheel').hide();$('.leo-dropdown-cart-item.deleting').fadeOut(function(){$('.leo-dropdown-cart-item.deleting').remove();updateClassCartItem()})
showLeoNotification('success','delete',!1)}
if($('.leo-dropdown-cart-item.updating').length){$('.leo-dropdown-cart-item.updating .leo-dropdown-overlay').hide();$('.leo-dropdown-cart-item.updating .leo-dropdown-cssload-speeding-wheel').hide();$('.leo-dropdown-cart-item.updating').removeClass('updating');showLeoNotification('success','update',!1)}
$('.leo-dropdown-cart.dropdown').removeClass('disable-close');$('.leo-dropdown-cart.dropup').removeClass('disable-close');createModalAndDropdown(1,0)});activeEventFlyCartSlideBar();$('.leo-fly-cart.enable-slidebar .leo-fly-cart-icon-wrapper').click(function(){});$('.leo-fly-cart.enable-slidebar .leo-fly-cart-icon').click(function(){$('#blockcart-modal-ecm').modal('show');return!1});$('.leo-fly-cart.enable-dropdown .leo-fly-cart-icon-wrapper , .leo-fly-cart.enable-dropdown .leo-fly-cart-icon').click(function(){showDropDownCart($(this),'flycart');return!1});$(document).click(function(e){e.stopPropagation();var container=$(".leo-dropdown-cart.dropdown.show");if(container.length&&container.has(e.target).length===0){if(!container.hasClass('disable-close')){container.removeClass('show')}}
var container1=$(".leo-dropdown-cart.dropup.show");if(container1.length&&container1.has(e.target).length===0){if(!container1.hasClass('disable-close')){container1.removeClass('show')}}})
getOffsetFlycartIcon();$(window).resize(function(){$('.leo-dropdown-list-item').each(function(){if($(this).parents('.leo-fly-cart-slidebar').length){checkFlyCartScrollBar($(this))}
if($(this).parents('.leo-fly-cart.type-fixed.enable-dropdown').length){checkFlyCartScrollBarDropDown($(this))}})
getOffsetFlycartIcon()})
$(document).on('click','#blockcart-one_click .ecm_one_click',function(){$('.phone_error, .name_error').text('');if(!$('#one_click_name').val()){$('.name_error').text('Треба заповнити');return}
if(!$('#one_click_phone').inputmask('isComplete')){$('.phone_error').text(formatError);$('#one_click_phone').focus();return}
$('#blockcart-one_click .ecm_one_click').addClass('confirm-loading');var data={process:'processCart',ajax:!0,id_cart:$('#one_click_id_cart').val(),id_customer:$('#one_click_id_customer').val(),id_product:$('#one_click_id_product').val(),id_product_attribute:$('#one_id_product_attribute').val(),qty:$('#quantity_wanted').val(),type:$('#one_click_type').val(),method:$('#one_click_method').val(),phone:$('#one_click_phone').val(),name:$('#one_click_name').val(),};$.ajax({type:'POST',dataType:'json',data:data,url:$('#one_click_url').val(),success:function(result){if(result.hasError){$('#ecm_one_click_msg').text(result.error);$('#blockcart-one_click .ecm_one_click').removeClass('confirm-loading');return}else{$('#blockcart-one_click').modal('hide');$('#ecm_one_click_msg').text('')
$('#success_one_click_id_order').text(result.id_order);$('#success_one_click').modal('show');ecmGa4.orderPurchase(result.order)}},})})});function leoBtCart(){$('.leo-bt-cart').each(function(){if(!$(this).hasClass('leo-enable')){$(this).addClass('leo-enable');$(this).click(function(event){if($(this).hasClass('active')||$(this).hasClass('reset')||$('.leo-bt-cart.active').length||$(this).hasClass('disabled')){return!1}
$(this).find('.leo-bt-cart-content').hide();$(this).find('.leo-loading').css({'display':'block'});$(this).addClass('active');var object_button_container=$(this).parents('.product-miniature');if(object_button_container.find('.leo_cart_quantity').length){object_button_container.find('.qty_product').val(object_button_container.find('.leo_cart_quantity').val())}
var qty_product=object_button_container.find('.qty_product').val();var min_qty=object_button_container.find('.minimal_quantity').val();var quantity_product=object_button_container.find('.quantity_product').val();if(Math.floor(qty_product)==qty_product&&$.isNumeric(qty_product)&&qty_product>0){}else{$(this).addClass('reset');$('.leo-modal-cart .modal-header').addClass('warning-mess');$('.leo-modal-cart .leo-warning').show();$('.leo-modal-cart').modal('show');return!1}
if(parseInt(qty_product)<parseInt(min_qty)){$(this).addClass('reset');$('.leo-modal-cart .modal-header').addClass('info-mess');$('.leo-modal-cart .leo-info .alert-min-qty').text(min_qty);$('.leo-modal-cart .leo-info').show();$('.leo-modal-cart').modal('show');return!1}
var id_product=object_button_container.find('.id_product').val();var id_product_attribute=object_button_container.find('.id_product_attribute').val();var id_customization=object_button_container.find('.id_customization').val();var $element=$(this);$(this).removeData('check-outstock');checkProductOutStock(id_product,id_product_attribute,id_customization,qty_product,$element,!0);check_data_outstock=setInterval(function(){if(typeof $element.data('check-outstock')!='undefined'){clearInterval(check_data_outstock);if(!$element.data('check-outstock')){$element.addClass('reset');$('.leo-modal-cart .modal-header').addClass('block-mess');$('.leo-modal-cart .leo-block').show();$('.leo-modal-cart').modal('show');event.preventDefault();event.stopPropagation()}else{var $form=$element.closest('form');var query=$form.serialize()+'&add=1&action=update';var actionURL=$form.attr('action');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:actionURL,async:!0,cache:!1,data:query,dataType:'json',success:function(result){if(result.success){if($('.leo-notification').length&&typeof enable_notification!='undefined'&&enable_notification){var id_product=result.id_product;var product_name=!1;$.each(result.cart.products,function(key,value){if(id_product==value.id_product){product_name=value.name;return!1}})
showLeoNotification('success','add',product_name)}
if(typeof enable_flycart_effect!='undefined'&&enable_flycart_effect){if($('.leo-bt-cart.active').length){flyCartEffect($('.leo-bt-cart.active'))}}
if($('.leo-fly-cart .leo-fly-cart-cssload-loader').length){$('.leo-fly-cart .leo-fly-cart-cssload-loader').show()}
if($('.leo-blockcart.cart-preview .cssload-piano').length){$('.leo-blockcart.cart-preview .cssload-piano').show()}
if(typeof show_popup!='undefined'&&!show_popup){if($('.leo-bt-cart.active').length){$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')}
var refresh_url=$('.leo-blockcart').data('refresh-url');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refresh_url,async:!0,cache:!1,success:function(resp){$('.leo-blockcart').replaceWith($(resp.preview).find('.blockcart'));$(".blockcart.cart-preview").addClass('leo-blockcart').removeClass('blockcart');createModalAndDropdown(1,0)},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
if(typeof show_popup!='undefined'&&show_popup){var refreshURL=$('.blockcart').data('refresh-url');var requestData={};requestData={id_product_attribute:result.id_product_attribute,id_product:result.id_product,action:'add-to-cart'};$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refreshURL,async:!0,cache:!1,data:requestData,dataType:'json',success:function(resp){if($('.leo-bt-cart.active').length){$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')}
$('.blockcart').replaceWith($(resp.preview).find('.blockcart'));createModalAndDropdown(1,0,resp.modal);if(resp.modal){}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}else{showLeoNotification('error','add',!1)}},error:function(XMLHttpRequest,textStatus,errorThrown){showLeoNotification('error','add',!1)}})}}},10);return!1})}});$('.leo_cart_quantity').each(function(){if($(this).parents('.product-miniature').find('.qty_product').val()){$(this).val($(this).parents('.product-miniature').find('.qty_product').val())}else{$(this).hide()}})}
function leoSelectAttr(){$('.leo-select-attr').click(function(e){e.preventDefault();var id_product=$(this).data('id-product');var attr_txt=$(this).text();var id_attr=$(this).data('id-attr');var qty_attr=$(this).data('qty-attr');var min_qty_attr=$(this).data('min-qty-attr');var parent_e=$(this).parents('.product-miniature');if(!$(this).hasClass('selected')){$(this).siblings().removeClass('selected');$(this).addClass('selected');parent_e.find('.dropdownListAttrButton_'+id_product).text(attr_txt);if($(this).hasClass('disable')){if(!parent_e.find('.leo-bt-cart_'+id_product).hasClass('disabled')){parent_e.find('.leo-bt-cart_'+id_product).addClass('disabled')}}else{if(parent_e.find('.leo-bt-cart_'+id_product).hasClass('disabled')){parent_e.find('.leo-bt-cart_'+id_product).removeClass('disabled')}};var $product_article_e=$(this).parents('.product-miniature[data-id-product='+id_product+']');$product_article_e.find('.leo-bt-cart .leo-bt-cart-content').hide();$product_article_e.find('.leo-bt-cart .leo-loading').css({'display':'block'});$product_article_e.find('.leo-bt-cart').addClass('active');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/leofeature/psajax.php?rand='+new Date().getTime(),async:!0,cache:!1,data:{"action":"get-attribute-data","id_product":id_product,"id_product_attribute":id_attr,"token":leo_token},success:function(result){if(result!=''){var obj=$.parseJSON(result);$product_article_e.find('.product-thumbnail img').attr('src',obj.product_cover.bySize.home_default.url).attr('alt',obj.product_cover.legend);$product_article_e.find('.product-thumbnail').attr('href',obj.product_url);$product_article_e.find('.product-price-and-shipping').empty().append(obj.price_attribute)}else{alert(add_cart_error)}
$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
parent_e.find('.quantity_product_'+id_product).val(qty_attr);parent_e.find('.id_product_attribute_'+id_product).val(id_attr);parent_e.find('.minimal_quantity_'+id_product).val(min_qty_attr);parent_e.find('.qty_product_'+id_product).val(min_qty_attr).data('min',min_qty_attr);parent_e.find('.leo_cart_quantity').val(min_qty_attr);parent_e.find('.dropdownListAttrButton_'+id_product).trigger('click')})}
function activeEventModal(){$('.leo-modal-cart').on('hide.bs.modal',function(e){$('.leo-modal-cart .modal-header').removeClass('block-mess info-mess warning-mess');$('.leo-modal-cart .modal-title').hide();var min_qty=$('.leo-bt-cart.reset').parents('.button-container').find('.minimal_quantity').val();$('.leo-bt-cart.reset').parents('.button-container').find('.qty_product').val(min_qty);$('.leo-bt-cart.reset').parents('.product-miniature').find('.leo_cart_quantity').val(min_qty);$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')})}
function updatePostionLabel($parent){var FLAG_MARGIN=10;var $percent=$parent.find('.discount-percentage');var $onsale=$parent.find('.on-sale');var $new=$parent.find('.new');if($percent.length){$new.css('top',$percent.height()*2+FLAG_MARGIN);$percent.css('top',-$parent.find('.thumbnail-container').height()+$parent.find('.product-description').height()+FLAG_MARGIN)}
if($onsale.length){$percent.css('top',parseFloat($percent.css('top'))+$onsale.height()+FLAG_MARGIN);$new.css('top',($percent.height()*2+$onsale.height())+FLAG_MARGIN*2)}}
function showDropDownCart($element,$type){var object_element='';if($type=='defaultcart'){object_element=$element.siblings('.leo-dropdown-cart')}
if($type=='flycart'){object_element=$element.parents('.leo-fly-cart').find('.leo-dropdown-cart')}
if(!object_element.hasClass('show')){object_element.addClass('show')}else{object_element.removeClass('show')}}
function showSlideBarCart($element){if(!$('.leo-fly-cart-slidebar.disable').length){if(!$element.hasClass('active-slidebarcart')){var type=$element.data('type');var pusheffect=$element.data('pusheffect');$element.addClass('active-slidebarcart');$('.leo-fly-cart-slidebar.'+type).addClass('active');if($('.leo-fly-cart-mask').length){$('.leo-fly-cart-mask').first().addClass('active');$('body').addClass('leoflycart-active-slidebar')}
if($('html').hasClass('safari-win')){$('.leo-fly-cart-slidebar .leo-dropdown-list-item').each(function(){checkFlyCartScrollBar($(this))})};if(pusheffect){$('.leo-fly-cart-slidebar.'+type).addClass('push');$('body').addClass('leoflycart-active-push');var push_value;var push_type;if(type=='slidebar_top'||type=='slidebar_bottom'){push_type="Y";if(type=='slidebar_top'){push_value=$('.leo-fly-cart-slidebar.push.'+type).outerHeight()}
if(type=='slidebar_bottom'){push_value=-$('.leo-fly-cart-slidebar.push.'+type).outerHeight()}}
if(type=='slidebar_right'||type=='slidebar_left'){push_type="X";if(type=='slidebar_left'){push_value=$('.leo-fly-cart-slidebar.push.'+type).outerWidth()}
if(type=='slidebar_right'){push_value=-$('.leo-fly-cart-slidebar.push.'+type).outerWidth()}}
$('body.leoflycart-active-push main').css({"-moz-transform":"translate"+push_type+"("+push_value+"px)","-webkit-transform":"translate"+push_type+"("+push_value+"px)","-o-transform":"translate"+push_type+"("+push_value+"px)","-ms-transform":"translate"+push_type+"("+push_value+"px)","transform":"translate"+push_type+"("+push_value+"px)",})}}else{$('.leo-fly-cart-slidebar .leo-fly-cart-icon').trigger('click')}}}
function activeDropdownEvent(){$('.leo-dropdown-list-item').each(function(){var check_number_cartitem=3;if(typeof number_cartitem_display!='undefined'){check_number_cartitem=number_cartitem_display}
if(!$(this).parents('.leo-fly-cart-slidebar').length){checkFlyCartScrollBarDropDown($(this))}
if($(this).parents('.leo-fly-cart-slidebar').length){checkFlyCartScrollBar($(this))}})
$('.leo-remove-from-cart, .view-leo-dropdown-additional').hover(function(){if($(this).hasClass('leo-remove-from-cart')){$(this).parents('.leo-dropdown-cart-item').addClass('high-light')}},function(){if($(this).hasClass('leo-remove-from-cart')){$(this).parents('.leo-dropdown-cart-item').removeClass('high-light')}})
$('.view-leo-dropdown-additional').click(function(){var parent_obj=$(this).parents('.leo-dropdown-cart-item');var wrapper_parent_obj=$(this).parents('.leo-dropdown-list-item');if(!$(this).hasClass('show')){if(wrapper_parent_obj.find('.leo-dropdown-cart-item.show-additional')){wrapper_parent_obj.find('.leo-dropdown-cart-item.show-additional').removeClass('show-additional');wrapper_parent_obj.find('.view-leo-dropdown-additional.show').removeClass('show');wrapper_parent_obj.find('.fake-element').fadeOut('200',function(){$(this).remove()});wrapper_parent_obj.mCustomScrollbar("update");setTimeout(function(){wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').mCustomScrollbar("update")},500)}
$(this).addClass('show');if(wrapper_parent_obj.hasClass('active-scrollbar')&&parent_obj.hasClass('last')){var height_clone_obj=parent_obj.find('.leo-dropdown-additional').height();wrapper_parent_obj.find('.mCSB_container').append('<p class="fake-element" style="height:'+height_clone_obj+'px"></p>');wrapper_parent_obj.mCustomScrollbar("update");wrapper_parent_obj.mCustomScrollbar("scrollTo","bottom",{callbacks:parent_obj.addClass('show-additional')})}else if(wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').hasClass('active-scrollbar')&&parent_obj.hasClass('last')&&parent_obj.hasClass('first')){wrapper_parent_obj.append('<li class="leo-dropdown-cart-item clearfix has-view-additional fake-element" style="width:'+width_cart_item+'px; height:'+height_cart_item+'px"></p>');wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').mCustomScrollbar("update");wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').mCustomScrollbar("scrollTo","last",{callbacks:parent_obj.addClass('show-additional')})}else{parent_obj.addClass('show-additional')}}else{parent_obj.removeClass('show-additional');if(wrapper_parent_obj.hasClass('active-scrollbar')&&parent_obj.hasClass('last')){wrapper_parent_obj.find('.fake-element').fadeOut('200',function(){$(this).remove()});wrapper_parent_obj.mCustomScrollbar("update")}else if(wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').hasClass('active-scrollbar')&&parent_obj.hasClass('last')&&parent_obj.hasClass('first')){wrapper_parent_obj.find('.fake-element').fadeOut('200',function(){$(this).remove()});parent_obj.removeClass('show-additional');$(this).removeClass('show');setTimeout(function(){wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').mCustomScrollbar("update")},500)}
parent_obj.removeClass('show-additional');$(this).removeClass('show')}
return!1})
$('.leo-remove-from-cart').click(function(){var id_product=$(this).data('id-product');var id_product_attribute=$(this).data('id-product-attribute');var id_customization=$(this).data('id-customization');var parent_obj=$(this).parents('.leo-dropdown-cart-item');parent_obj.addClass('deleting');if(parent_obj.hasClass('show-additional')){parent_obj.find('.view-leo-dropdown-additional').trigger('click')}
parent_obj.find('.leo-dropdown-overlay').show();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').show();if($('.remove-from-cart').length){$('.leo-dropdown-cart.dropdown').addClass('disable-close');$('.leo-dropdown-cart.dropup').addClass('disable-close');$('.remove-from-cart[data-id-product="'+id_product+'"][data-id-product-attribute="'+id_product_attribute+'"][data-id-customization="'+id_customization+'"]').trigger('click')}else{var link_url=$(this).data('link-url');var refresh_url=$('.leo-blockcart.cart-preview').data('refresh-url');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:link_url,async:!0,cache:!1,data:{"ajax":1,"action":"update",},success:function(result){var obj=$.parseJSON(result);parent_obj.find('.leo-dropdown-overlay').hide();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').hide();if(obj.success){parent_obj.fadeOut(function(){parent_obj.remove();$('.leo-remove-from-cart[data-id-product="'+id_product+'"][data-id-product-attribute="'+id_product_attribute+'"][data-id-customization="'+id_customization+'"]').parents('.leo-dropdown-cart-item').remove();updateClassCartItem()});showLeoNotification('success','delete',!1);$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refresh_url,async:!0,cache:!1,success:function(resp){$('.leo-blockcart').replaceWith($(resp.preview).find('.blockcart'));$(".blockcart.cart-preview").addClass('leo-blockcart');if(typeof show_popup!='undefined'&&!show_popup){$(".blockcart.cart-preview").removeClass('blockcart')}
createModalAndDropdown(1,1)},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{showLeoNotification('error','delete',!1)}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
return!1})
$('.leo-input-product-quantity').focusout(function(){updateQuantityProductDropDown($(this))})
$('.leo-input-product-quantity').keyup(function(event){if(event.keyCode==13){updateQuantityProductDropDown($(this))}})
var timer;var flag=!1;$('.leo-bt-product-quantity-down, .leo-bt-product-quantity-up').on('touchstart click',function(){if(flag==!0){flag=!1;clearTimeout(timer)}
flag=!0;var action='up';var input_target=$(this).parents('.leo-dropdown-cart-item').find('.leo-input-product-quantity');var input_quantity=parseInt(input_target.val());var quantity_update;if($(this).hasClass('leo-bt-product-quantity-down')){action='down'}
if(action=='up'){quantity_update=input_quantity+1}
if(action=='down'){quantity_update=input_quantity-1}
input_target.val(quantity_update);timer=setTimeout(function(){flag=!1;updateQuantityProductDropDown(input_target)},800);return!1})}
function updateQuantityProductDropDown($element){var $this=$element;var product_quantity=$this.data('product-quantity');var min_quantity=$this.data('min-quantity');var max_quantity=$this.data('quantity-available');var input_quantity=$this.val();if(Math.floor(input_quantity)==input_quantity&&$.isNumeric(input_quantity)&&input_quantity>0){}else{showLeoNotification('normal','check',!1);$this.val(product_quantity);return}
if(parseInt(input_quantity)<parseInt(min_quantity)){showLeoNotification('warning','min',min_quantity);$this.val(product_quantity);return!1}
var qty=parseInt(input_quantity)-parseInt(product_quantity);if(qty==0){return}
var id_product=$this.data('id-product');var id_product_attribute=$this.data('id-product-attribute');var id_customization=$this.data('id-customization');$this.removeData('check-outstock');var check_product_outstock=!0;var parent_obj=$this.parents('.leo-dropdown-cart-item');parent_obj.addClass('updating');parent_obj.find('.leo-dropdown-overlay').show();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').show();checkProductOutStock(id_product,id_product_attribute,id_customization,input_quantity,$this,!1);check_data_outstock=setInterval(function(){if(typeof $element.data('check-outstock')!='undefined'){clearInterval(check_data_outstock);if(!$this.data('check-outstock')){showLeoNotification('warning','max',!1);$this.val(product_quantity);check_product_outstock=!1;parent_obj.find('.leo-dropdown-overlay').hide();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').hide();parent_obj.removeClass('updating')}
if(!check_product_outstock){return!1}
if($('.js-cart-line-product-quantity').length){var e=$.Event("keyup");e.keyCode=13;$('.remove-from-cart[data-id-product="'+id_product+'"][data-id-product-attribute="'+id_product_attribute+'"][data-id-customization="'+id_customization+'"]').parents('.cart-item').find('.js-cart-line-product-quantity').val(input_quantity).trigger(e)}else{var link_url=$this.data('update-url');var refresh_url=$('.leo-blockcart.cart-preview').data('refresh-url');var op='';if(qty>0){op='up'}else{op='down'}
$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:link_url,async:!0,cache:!1,data:{"ajax":1,"action":"update","qty":Math.abs(qty),"op":op,},success:function(result){var obj=$.parseJSON(result);parent_obj.find('.leo-dropdown-overlay').hide();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').hide();parent_obj.removeClass('updating');if(obj.success){$('.leo-input-product-quantity[data-id-product="'+id_product+'"][data-id-product-attribute="'+id_product_attribute+'"][data-id-customization="'+id_customization+'"]').val(input_quantity).data('product-quantity',input_quantity);showLeoNotification('success','update',!1);$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refresh_url,async:!0,cache:!1,success:function(resp){$('.leo-blockcart').replaceWith($(resp.preview).find('.blockcart'));$(".blockcart.cart-preview").addClass('leo-blockcart');if(typeof show_popup!='undefined'&&!show_popup){$(".blockcart.cart-preview").removeClass('blockcart')}
createModalAndDropdown(1,1)},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{showLeoNotification('error','update',!1)}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}},10)}
function createModalAndDropdown($only_dropdown,$only_total,resp_modal=!1){if(typeof enable_dropdown_defaultcart!='undefined'){if(enable_dropdown_defaultcart){if($('.blockcart.cart-preview').length){$('.blockcart.cart-preview').addClass('leo-blockcart show-leo-loading').append('<div class="cssload-piano"><div class="cssload-rect1"></div><div class="cssload-rect2"></div><div class="cssload-rect3"></div></div>')}else{$('.leo-blockcart.cart-preview').addClass('show-leo-loading').append('<div class="cssload-piano"><div class="cssload-rect1"></div><div class="cssload-rect2"></div><div class="cssload-rect3"></div></div>')}
$('.leo-blockcart.cart-preview .cssload-piano').show();$('.leo-blockcart.cart-preview.show-leo-loading').data('type',type_dropdown_defaultcart);if(typeof type_dropdown_defaultcart!='undefined'){if(type_dropdown_defaultcart=='dropdown'||type_dropdown_defaultcart=='dropup'){$('.leo-blockcart.cart-preview.show-leo-loading').attr('data-toggle','modal').attr('data-target','#blockcart-modal-ecm').attr('onclick','event.preventDefault();')}
if(type_dropdown_defaultcart=='slidebar_left'||type_dropdown_defaultcart=='slidebar_right'||type_dropdown_defaultcart=='slidebar_top'||type_dropdown_defaultcart=='slidebar_bottom'){$('.leo-blockcart.cart-preview.show-leo-loading').click(function(){showSlideBarCart($(this));return!1})}}}else{$('.blockcart.cart-preview').addClass('leo-blockcart')}}
if($('.leo-fly-cart .leo-fly-cart-cssload-loader').length){$('.leo-fly-cart .leo-fly-cart-cssload-loader').show()}
$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/leofeature/psajax.php?rand='+new Date().getTime(),async:!0,cache:!1,data:{"action":"render-modal","only_dropdown":$only_dropdown,"only_total":$only_total,"token":leo_token},success:function(result){if(result!=''){$('.leo-blockcart.cart-preview .cssload-piano').hide();if($('.leo-fly-cart .leo-fly-cart-cssload-loader').length){setTimeout(function(){$('.leo-fly-cart .leo-fly-cart-cssload-loader').hide()},2000)}
if(result.dropdown!=''){if($('.leo-fly-cart-slidebar.disable').length){$('.leo-fly-cart-slidebar').removeClass('disable')}
if(!$('.leo-dropdown-cart').length){if(typeof type_dropdown_defaultcart!='undefined'&&(type_dropdown_defaultcart=='dropdown'||type_dropdown_defaultcart=='dropup')){$('.leo-blockcart.cart-preview.show-leo-loading').after('<div class="leo-dropdown-cart defaultcart '+type_dropdown_defaultcart+'"></div>')}
if($('.leo-fly-cart.enable-dropdown').length){$('.leo-fly-cart.enable-dropdown').append('<div class="leo-dropdown-cart flycart '+$('.leo-fly-cart.enable-dropdown').data('type')+'"></div>')}
if($('.leo-fly-cart-slidebar').length){$('.leo-fly-cart-slidebar').append('<div class="leo-dropdown-cart"></div>')}}else{$('.leo-dropdown-cart').addClass('update')}
if($('.leo-dropdown-cart-content').length){if($only_total==1){$('.leo-dropdown-cart-content .leo-dropdown-total').replaceWith(result.dropdown);var check_number_cartitem=3;if(typeof number_cartitem_display!='undefined'){check_number_cartitem=number_cartitem_display}
$('.leo-dropdown-list-item').each(function(){if(!$(this).parents('.leo-fly-cart-slidebar').length){checkFlyCartScrollBarDropDown($(this))}
if($(this).parents('.leo-fly-cart-slidebar').length&&$(this).parents('.leo-fly-cart-slidebar').find('.active-scrollbar')){checkFlyCartScrollBar($(this))}})}else{$('.leo-dropdown-cart-content').replaceWith(result.dropdown);activeDropdownEvent()}}else{$('.leo-dropdown-cart').append(result.dropdown);activeDropdownEvent()}}else{if($('.leo-dropdown-cart').length){$('.leo-dropdown-cart').remove()}
$('.leo-fly-cart-slidebar').addClass('disable');if($('.leo-fly-cart-slidebar.active').length){$('.leo-fly-cart-slidebar.active').find('.leo-fly-cart-icon').trigger('click')}}
if(result.modal!=''){$('body').append(result.modal);activeEventModal()}
if(result.notification!=''){$('body').append(result.notification)}
if($('.leo-fly-cart-total').length){if($('.leo-dropdown-total').length){$('.leo-fly-cart-total').text($('.leo-dropdown-total').data('cart-total'))}else{$('.leo-fly-cart-total').text("0")}}}else{alert(add_cart_error)}},complete:function(result){if(resp_modal){$('#blockcart-modal-ecm').modal('show')}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
function activeEventNotification(){$(".leo-notification .notification").click(function(){$(this).removeClass('show').addClass("closed").parent().addClass('disable')})}
function showLeoNotification($status,$action,$special_parameter){if(!$('.leo-notification').hasClass('active')){$('.leo-notification').addClass('active')}
var clone_obj='';clone_obj=$('.leo-temp-'+$status+'>div').clone();clone_obj.find('.noti-'+$action).addClass('active');if($special_parameter&&$special_parameter!=''){clone_obj.find('.noti-'+$action).find('.noti-special').text($special_parameter)}
$('.leo-notification').append(clone_obj);setTimeout(function(){clone_obj.find('.notification').addClass('show')},100);activeEventNotification();setTimeout(function(){clone_obj.find('.notification').removeClass('show').addClass("closed").parent().addClass('disable')},5000)}
function checkProductOutStock($id_product,$id_product_attribute,$id_customization,$quantity,$element,$check_product_in_cart){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/leofeature/psajax.php?rand='+new Date().getTime(),async:!0,cache:!1,data:{"action":"check-product-outstock","id_product":$id_product,"id_product_attribute":$id_product_attribute,"id_customization":$id_customization,"quantity":$quantity,"check_product_in_cart":$check_product_in_cart,"token":leo_token},success:function(result){if(result!=''){var obj=$.parseJSON(result);$element.data('check-outstock',obj.success)}else{alert(add_cart_error)}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
function updateClassCartItem(){$('.leo-dropdown-list-item').each(function(){$(this).find('.leo-dropdown-cart-item').first().addClass('first');$(this).find('.leo-dropdown-cart-item').last().addClass('last')})}
function flyCartEffect($element){if($element.hasClass('leo-bt-cart')){var parent_e=$element.parents('.product-miniature');var product_img=parent_e.find('.product-thumbnail').find("img").eq(0)}else{var product_img='';if($('.quickview .product-cover').length){product_img=$('.quickview .product-cover').find("img").eq(0)}else{product_img=$('.product-cover').find("img").eq(0)}}
if(typeof product_img!='undefined'&&product_img.length){var obj_element='';if($('.leo-fly-cart-slidebar.active .leo-fly-cart-icon').length){obj_element=$('.leo-fly-cart-slidebar.active .leo-fly-cart-icon')}else if($('.leo-fly-cart.solo .leo-fly-cart-icon').length){obj_element=$('.leo-fly-cart.solo .leo-fly-cart-icon')}else if($('.leo-blockcart.cart-preview').length){obj_element=$('.leo-blockcart.cart-preview')}else if($('.blockcart.cart-preview').length){obj_element=$('.blockcart.cart-preview')}else{return}
$('body').addClass('enable-leo-fly-cart');var divider=4;var flyerClone=product_img.clone();var clone_offset_top=product_img.offset().top;var clone_offset_left=product_img.offset().left;if($('body').offset().left!=0){clone_offset_left=clone_offset_left-$('body').offset().left}
flyerClone.css({position:'absolute',top:clone_offset_top+"px",left:clone_offset_left+"px",opacity:1,'z-index':1000,width:product_img.width(),height:product_img.height()});$('body').append(flyerClone);var gotoX=obj_element.offset().left+(obj_element.width()/2)-(product_img.width()/divider)/2;if($('body').offset().left!=0){gotoX=gotoX-$('body').offset().left}
if($('html').hasClass('safari-win')&&$('.leo-fly-cart-slidebar.active .leo-fly-cart-icon').length){var gotoY=$(window).scrollTop()+obj_element.offset().top+(obj_element.height()/2)-(product_img.height()/divider)/2}else{var gotoY=obj_element.offset().top+(obj_element.height()/2)-(product_img.height()/divider)/2}
flyerClone.animate({opacity:0.4,left:gotoX,top:gotoY,width:product_img.width()/divider,height:product_img.height()/divider},1000,function(){flyerClone.fadeOut('fast',function(){flyerClone.remove();$('body').removeClass('enable-leo-fly-cart')});if(typeof type_flycart_effect!='undefined'){if(type_flycart_effect=='shake'){obj_element.parents('.leo-fly-cart').find('.leo-fly-cart-total').css({'opacity':0});setTimeout(function(){obj_element.effect("shake",{times:2},200,function(){obj_element.parents('.leo-fly-cart').find('.leo-fly-cart-total').css({'opacity':1})})},500)}
if(type_flycart_effect=='fade'){obj_element.fadeOut('fast',function(){obj_element.fadeIn('fast',function(){})})}}})}}
function activeEventFlyCartSlideBar(){$('.leo-fly-cart-mask, .leo-fly-cart-slidebar .leo-fly-cart-icon, .leo-fly-cart-slidebar .leo-fly-cart-icon-wrapper, .leo-fly-cart-slidebar .leo-fly-cart').click(function(){$('.leo-fly-cart-mask.active').removeClass('active');$('.leo-fly-cart-icon.active-slidebarcart').removeClass('active-slidebarcart');$('.leo-blockcart.cart-preview.active-slidebarcart').removeClass('active-slidebarcart');$('body.leoflycart-active-push main').css({"-moz-transform":"translateX(0px)","-webkit-transform":"translateX(0px)","-o-transform":"translateX(0px)","-ms-transform":"translateX(0px)","transform":"translateX(0px)","-moz-transform":"translateY(0px)","-webkit-transform":"translateY(0px)","-o-transform":"translateY(0px)","-ms-transform":"translateY(0px)","transform":"translateY(0px)",});setTimeout(function(){$('body').removeClass('leoflycart-active-slidebar leoflycart-active-push')},300);$('.leo-fly-cart-slidebar.active').removeClass('active')});$(document).keyup(function(e){if(e.keyCode==27){if($('.leo-fly-cart-mask').hasClass('active')){$('.leo-fly-cart-mask.active').trigger('click')}else if($('.leo-fly-cart-slidebar.active .leo-fly-cart-icon').length){$('.leo-fly-cart-slidebar .leo-fly-cart-icon').trigger('click')}}})}
function checkFlyCartScrollBar($element){var object_parent=$element.parents('.leo-fly-cart-slidebar');if(object_parent.hasClass('slidebar_top')||object_parent.hasClass('slidebar_bottom')){var width_bottom=object_parent.find('.leo-dropdown-bottom').outerWidth();var window_width=$(window).width();var element_width='';if(typeof width_cart_item!='undefined'){element_width=$element.find('.leo-dropdown-cart-item').length*width_cart_item}else{element_width=$element.find('.leo-dropdown-cart-item').length*$element.find('.leo-dropdown-cart-item').outerWidth()}
if(element_width+width_bottom>window_width){object_parent.addClass('active-scroll');object_parent.find('.leo-dropdown-list-item-warpper').addClass('active-scrollbar');object_parent.find('.leo-dropdown-list-item-warpper').css({'width':window_width-width_bottom});object_parent.find('.leo-dropdown-list-item-warpper').mCustomScrollbar({theme:"dark",axis:"x",scrollInertia:200,callbacks:{onInit:function(){}},advanced:{autoExpandHorizontalScroll:!0},keyboard:{enable:!0,}});object_parent.find('.leo-dropdown-list-item-warpper').mCustomScrollbar('update')}else{object_parent.removeClass('active-scroll');object_parent.find('.leo-dropdown-list-item-warpper').removeClass("active-scrollbar").css({'width':'auto'});object_parent.find('.leo-dropdown-list-item-warpper').mCustomScrollbar("destroy")}}
if(object_parent.hasClass('slidebar_left')||object_parent.hasClass('slidebar_right')){var height_bottom=object_parent.find('.leo-dropdown-bottom').outerHeight();var window_height=$(window).height();var element_height='';if(typeof height_cart_item!='undefined'){element_height=$element.find('.leo-dropdown-cart-item').length*height_cart_item}else{element_height=$element.find('.leo-dropdown-cart-item').length*$element.find('.leo-dropdown-cart-item').outerHeight()}
if(element_height+height_bottom>window_height){object_parent.addClass('active-scroll');$element.addClass('active-scrollbar');$element.css({'max-height':window_height-height_bottom});$element.mCustomScrollbar({theme:"dark",scrollInertia:200,callbacks:{onInit:function(){}},keyboard:{enable:!0,}});$element.mCustomScrollbar('update')}else{object_parent.removeClass('active-scroll');$element.removeClass("active-scrollbar").css({'max-height':'none'});$element.mCustomScrollbar("destroy")}}}
function checkFlyCartScrollBarDropDown($element){var object_parent=$element.parents('.leo-fly-cart.type-fixed.enable-dropdown');var type=object_parent.data('type');var height_bottom=object_parent.find('.leo-dropdown-bottom').outerHeight();var height_real=height_cart_item*$element.find('.leo-dropdown-cart-item').length;var height_icon=object_parent.find('.leo-fly-cart-icon-wrapper').outerHeight();var window_height=$(window).height();var check_number_cartitem=3;if(typeof number_cartitem_display!='undefined'){check_number_cartitem=number_cartitem_display}
var height_default=height_cart_item*number_cartitem_display;if(object_parent.length>0&&type=='dropup'&&height_real+height_bottom>object_parent.position().top&&height_default+height_bottom>object_parent.position().top){$element.addClass('active-scrollbar').css({'max-height':object_parent.position().top-height_icon-height_bottom});$element.mCustomScrollbar({theme:"dark",scrollInertia:200,callbacks:{onInit:function(){}},keyboard:{enable:!0,}});$element.mCustomScrollbar('update')}else if(object_parent.length>0&&type=='dropdown'&&height_real+height_bottom>$(window).height()-object_parent.position().top&&height_default+height_bottom>$(window).height()-object_parent.position().top){$element.addClass('active-scrollbar').css({'max-height':$(window).height()-object_parent.position().top-height_icon-height_bottom});$element.mCustomScrollbar({theme:"dark",scrollInertia:200,callbacks:{onInit:function(){}},keyboard:{enable:!0,}});$element.mCustomScrollbar('update')}else if($element.find('.leo-dropdown-cart-item').length>check_number_cartitem){if(typeof height_cart_item!='undefined'){$element.addClass('active-scrollbar').css({'max-height':height_cart_item*number_cartitem_display})}else{$element.addClass('active-scrollbar').css({'max-height':$element.find('.leo-dropdown-cart-item').outerHeight()*check_number_cartitem})}
$element.mCustomScrollbar({theme:"dark",scrollInertia:200,callbacks:{onInit:function(){}},keyboard:{enable:!0,}})}else{$element.removeClass("active-scrollbar").css({'max-height':'none'});$element.mCustomScrollbar("destroy")}}
function getOffsetFlycartIcon(){if($('.leo-fly-cart.solo .leo-fly-cart-icon').length){var offset_top=$('.leo-fly-cart.solo .leo-fly-cart-icon').offset().top;var offset_left=$('.leo-fly-cart.solo .leo-fly-cart-icon').offset().left;var window_width=$(window).width();if(offset_left<=window_width/2){$('.leo-fly-cart.solo').removeClass('offset-right').addClass('offset-left')}else{$('.leo-fly-cart.solo').removeClass('offset-left').addClass('offset-right')}
if(lf_is_gen_rtl&&prestashop.language.is_rtl==1){if($('.leo-fly-cart.solo').hasClass('offset-right')){$('.leo-fly-cart.solo').removeClass('offset-right').addClass('offset-left')}else if($('.leo-fly-cart.solo').hasClass('offset-left')){$('.leo-fly-cart.solo').removeClass('offset-left').addClass('offset-right')}}}}
function showModalPopupCart(modal){if($('#blockcart-modal').length){$('#blockcart-modal').remove()}
$('body').append(modal);$('#blockcart-modal').modal('show')}
function leoChooseAttr(){$(document).on('change','.variants-product [data-product-attribute]',function(e){var id_product=parseInt($(this).parents('.addToCartFormWrapper:eq(0)').attr('data-product-id'));var group_value=$(this).parents('.addToCartFormWrapper:eq(0)').find('.addToCartForm').serialize();var parent_e=$(this).parents('.product-miniature');var $product_article_e=$(this).parents('.product-miniature[data-id-product='+id_product+']');$product_article_e.find('.leo-bt-cart .leo-bt-cart-content').hide();$product_article_e.find('.leo-bt-cart .leo-loading').css({'display':'block'});$product_article_e.find('.leo-bt-cart').addClass('active');$.ajax({type:'GET',headers:{"cache-control":"no-cache"},url:'http://localhost/prestashop_17/ps_1765_dev/module/leofeature/leoproductattribute?ajax=1&action=getproductattribute&'+group_value,url:url_leoproductattribute+'?'+group_value,async:!0,cache:!1,data:{'ajax':'1','action':'getproductattribute',"id_product":id_product,},success:function(result){if(result!=''){var obj=$.parseJSON(result);$product_article_e.find('.product-thumbnail img').attr('src',obj.product_cover.bySize.home_default.url).attr('alt',obj.product_cover.legend);$product_article_e.find('.product-thumbnail').attr('href',obj.product_url);$product_article_e.find('.product-price-and-shipping').empty().append(obj.price_attribute);parent_e.find('.id_product_attribute_'+id_product).val(obj.id_attr);if(!obj.add_to_cart_url){parent_e.find('.leo-bt-cart_'+id_product).addClass('disabled')}else{parent_e.find('.leo-bt-cart_'+id_product).removeClass('disabled')}}else{alert(add_cart_error)}
$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})})}
function ecm_action(command,id_product,id_product_attribute,quantity){data={};data.ajax=!0;data.module='leofeature';data.action=command;data.show_modal=!0;data.id_product=id_product;data.id_product_attribute=id_product_attribute;if(command=='set_quantity')
data.quantity=quantity;old_products_count=prestashop.cart.products_count;$.ajax({url:'/'+prestashop.language.iso_code,type:'POST',dataType:'json',data:data,success:function(e){if(e.hasOwnProperty('ps_cart')){prestashop.cart=e.ps_cart}
if($(e.html).find('#blockcart-modal-ecm .modal-body .cart-items .cart-item').length){$('#blockcart-modal-ecm .modal-content').replaceWith($(e.html).find('#blockcart-modal-ecm .modal-content'))
$('#blockcart-modal-ecm .cart_quantity_input.ecm_product').on('change',function(){ecm_action('set_quantity',$(this).data('id_product'),$(this).data('id_product_attribute'),$(this).val())})
if(e.error){$.growl.error({title:e.error,size:"medium",message:"",})}
$('.cart-products-count, .leo-fly-cart-total').text(e.products_count);$('[data-target="#blockcart-modal-ecm"]').attr('data-toggle','modal')}else{$('html').removeClass('noscroll');$('#blockcart-modal-ecm').modal('hide').detach();$('.cart-bottom-mobile .cart-products-count, .leo-fly-cart-total, .cart-bottom-mobile .cart-products-count-top, #ecm_popup_menu_overlay .cart-products-count-top').text('')
$('[data-target="#blockcart-modal-ecm"]').attr('data-toggle','')}
if(!e.success){$('.qty_error.error_'+id_product+'_'+id_product_attribute).each(function(index,element){$(element).text(quantity_error)})}
fixCartModal()},error:function(e){console.log(e)}})}
function fixCartModal(){var modal=$("#blockcart-modal-ecm .modal-dialog");var body=$('html');var h=modal.height();var bh=body.height();if(h>bh){$('div#blockcart-modal-ecm .modal-body.sp_modal-body >.cart-overview').addClass('need-mh')}};/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
/*!
 * jQuery Mousewheel 3.1.13
 *
 * Copyright 2015 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof module!=="undefined"&&module.exports){module.exports=factory}else{factory(jQuery,window,document)}}(function($){(function(init){var _rjs=typeof define==="function"&&define.amd,_njs=typeof module!=="undefined"&&module.exports,_dlp=("https:"==document.location.protocol)?"https:":"http:",_url="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";if(!_rjs){if(_njs){require("jquery-mousewheel")($)}else{$.event.special.mousewheel||$("head").append(decodeURI("%3Cscript src="+_dlp+"//"+_url+"%3E%3C/script%3E"))}}
init()}(function(){var pluginNS="mCustomScrollbar",pluginPfx="mCS",defaultSelector=".mCustomScrollbar",defaults={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},totalInstances=0,liveTimers={},oldIE=(window.attachEvent&&!window.addEventListener)?1:0,touchActive=!1,touchable,classes=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],methods={init:function(options){var options=$.extend(!0,{},defaults,options),selector=_selector.call(this);if(options.live){var liveSelector=options.liveSelector||this.selector||defaultSelector,$liveSelector=$(liveSelector);if(options.live==="off"){removeLiveTimers(liveSelector);return}
liveTimers[liveSelector]=setTimeout(function(){$liveSelector.mCustomScrollbar(options);if(options.live==="once"&&$liveSelector.length){removeLiveTimers(liveSelector)}},500)}else{removeLiveTimers(liveSelector)}
options.setWidth=(options.set_width)?options.set_width:options.setWidth;options.setHeight=(options.set_height)?options.set_height:options.setHeight;options.axis=(options.horizontalScroll)?"x":_findAxis(options.axis);options.scrollInertia=options.scrollInertia>0&&options.scrollInertia<17?17:options.scrollInertia;if(typeof options.mouseWheel!=="object"&&options.mouseWheel==!0){options.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}}
options.mouseWheel.scrollAmount=!options.mouseWheelPixels?options.mouseWheel.scrollAmount:options.mouseWheelPixels;options.mouseWheel.normalizeDelta=!options.advanced.normalizeMouseWheelDelta?options.mouseWheel.normalizeDelta:options.advanced.normalizeMouseWheelDelta;options.scrollButtons.scrollType=_findScrollButtonsType(options.scrollButtons.scrollType);_theme(options);return $(selector).each(function(){var $this=$(this);if(!$this.data(pluginPfx)){$this.data(pluginPfx,{idx:++totalInstances,opt:options,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:$this.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var d=$this.data(pluginPfx),o=d.opt,htmlDataAxis=$this.data("mcs-axis"),htmlDataSbPos=$this.data("mcs-scrollbar-position"),htmlDataTheme=$this.data("mcs-theme");if(htmlDataAxis){o.axis=htmlDataAxis}
if(htmlDataSbPos){o.scrollbarPosition=htmlDataSbPos}
if(htmlDataTheme){o.theme=htmlDataTheme;_theme(o)}
_pluginMarkup.call(this);if(d&&o.callbacks.onCreate&&typeof o.callbacks.onCreate==="function"){o.callbacks.onCreate.call(this)}
$("#mCSB_"+d.idx+"_container img:not(."+classes[2]+")").addClass(classes[2]);methods.update.call(null,$this)}})},update:function(el,cb){var selector=el||_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){var d=$this.data(pluginPfx),o=d.opt,mCSB_container=$("#mCSB_"+d.idx+"_container"),mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];if(!mCSB_container.length){return}
if(d.tweenRunning){_stop($this)}
if(cb&&d&&o.callbacks.onBeforeUpdate&&typeof o.callbacks.onBeforeUpdate==="function"){o.callbacks.onBeforeUpdate.call(this)}
if($this.hasClass(classes[3])){$this.removeClass(classes[3])}
if($this.hasClass(classes[4])){$this.removeClass(classes[4])}
mCustomScrollBox.css("max-height","none");if(mCustomScrollBox.height()!==$this.height()){mCustomScrollBox.css("max-height",$this.height())}
_expandContentHorizontally.call(this);if(o.axis!=="y"&&!o.advanced.autoExpandHorizontalScroll){mCSB_container.css("width",_contentWidth(mCSB_container))}
d.overflowed=_overflowed.call(this);_scrollbarVisibility.call(this);if(o.autoDraggerLength){_setDraggerLength.call(this)}
_scrollRatio.call(this);_bindEvents.call(this);var to=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)];if(o.axis!=="x"){if(!d.overflowed[0]){_resetContentPosition.call(this);if(o.axis==="y"){_unbindEvents.call(this)}else if(o.axis==="yx"&&d.overflowed[1]){_scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"})}}else if(mCSB_dragger[0].height()>mCSB_dragger[0].parent().height()){_resetContentPosition.call(this)}else{_scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"});d.contentReset.y=null}}
if(o.axis!=="y"){if(!d.overflowed[1]){_resetContentPosition.call(this);if(o.axis==="x"){_unbindEvents.call(this)}else if(o.axis==="yx"&&d.overflowed[0]){_scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"})}}else if(mCSB_dragger[1].width()>mCSB_dragger[1].parent().width()){_resetContentPosition.call(this)}else{_scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"});d.contentReset.x=null}}
if(cb&&d){if(cb===2&&o.callbacks.onImageLoad&&typeof o.callbacks.onImageLoad==="function"){o.callbacks.onImageLoad.call(this)}else if(cb===3&&o.callbacks.onSelectorChange&&typeof o.callbacks.onSelectorChange==="function"){o.callbacks.onSelectorChange.call(this)}else if(o.callbacks.onUpdate&&typeof o.callbacks.onUpdate==="function"){o.callbacks.onUpdate.call(this)}}
_autoUpdate.call(this)}})},scrollTo:function(val,options){if(typeof val=="undefined"||val==null){return}
var selector=_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){var d=$this.data(pluginPfx),o=d.opt,methodDefaults={trigger:"external",scrollInertia:o.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},methodOptions=$.extend(!0,{},methodDefaults,options),to=_arr.call(this,val),dur=methodOptions.scrollInertia>0&&methodOptions.scrollInertia<17?17:methodOptions.scrollInertia;to[0]=_to.call(this,to[0],"y");to[1]=_to.call(this,to[1],"x");if(methodOptions.moveDragger){to[0]*=d.scrollRatio.y;to[1]*=d.scrollRatio.x}
methodOptions.dur=_isTabHidden()?0:dur;setTimeout(function(){if(to[0]!==null&&typeof to[0]!=="undefined"&&o.axis!=="x"&&d.overflowed[0]){methodOptions.dir="y";methodOptions.overwrite="all";_scrollTo($this,to[0].toString(),methodOptions)}
if(to[1]!==null&&typeof to[1]!=="undefined"&&o.axis!=="y"&&d.overflowed[1]){methodOptions.dir="x";methodOptions.overwrite="none";_scrollTo($this,to[1].toString(),methodOptions)}},methodOptions.timeout)}})},stop:function(){var selector=_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){_stop($this)}})},disable:function(r){var selector=_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){var d=$this.data(pluginPfx);_autoUpdate.call(this,"remove");_unbindEvents.call(this);if(r){_resetContentPosition.call(this)}
_scrollbarVisibility.call(this,!0);$this.addClass(classes[3])}})},destroy:function(){var selector=_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){var d=$this.data(pluginPfx),o=d.opt,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),scrollbar=$(".mCSB_"+d.idx+"_scrollbar");if(o.live){removeLiveTimers(o.liveSelector||$(selector).selector)}
_autoUpdate.call(this,"remove");_unbindEvents.call(this);_resetContentPosition.call(this);$this.removeData(pluginPfx);_delete(this,"mcs");scrollbar.remove();mCSB_container.find("img."+classes[2]).removeClass(classes[2]);mCustomScrollBox.replaceWith(mCSB_container.contents());$this.removeClass(pluginNS+" _"+pluginPfx+"_"+d.idx+" "+classes[6]+" "+classes[7]+" "+classes[5]+" "+classes[3]).addClass(classes[4])}})}},_selector=function(){return(typeof $(this)!=="object"||$(this).length<1)?defaultSelector:this},_theme=function(obj){var fixedSizeScrollbarThemes=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],nonExpandedScrollbarThemes=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],disabledScrollButtonsThemes=["minimal","minimal-dark"],enabledAutoHideScrollbarThemes=["minimal","minimal-dark"],scrollbarPositionOutsideThemes=["minimal","minimal-dark"];obj.autoDraggerLength=$.inArray(obj.theme,fixedSizeScrollbarThemes)>-1?!1:obj.autoDraggerLength;obj.autoExpandScrollbar=$.inArray(obj.theme,nonExpandedScrollbarThemes)>-1?!1:obj.autoExpandScrollbar;obj.scrollButtons.enable=$.inArray(obj.theme,disabledScrollButtonsThemes)>-1?!1:obj.scrollButtons.enable;obj.autoHideScrollbar=$.inArray(obj.theme,enabledAutoHideScrollbarThemes)>-1?!0:obj.autoHideScrollbar;obj.scrollbarPosition=$.inArray(obj.theme,scrollbarPositionOutsideThemes)>-1?"outside":obj.scrollbarPosition},removeLiveTimers=function(selector){if(liveTimers[selector]){clearTimeout(liveTimers[selector]);_delete(liveTimers,selector)}},_findAxis=function(val){return(val==="yx"||val==="xy"||val==="auto")?"yx":(val==="x"||val==="horizontal")?"x":"y"},_findScrollButtonsType=function(val){return(val==="stepped"||val==="pixels"||val==="step"||val==="click")?"stepped":"stepless"},_pluginMarkup=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,expandClass=o.autoExpandScrollbar?" "+classes[1]+"_expand":"",scrollbar=["<div id='mCSB_"+d.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+d.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],wrapperClass=o.axis==="yx"?"mCSB_vertical_horizontal":o.axis==="x"?"mCSB_horizontal":"mCSB_vertical",scrollbars=o.axis==="yx"?scrollbar[0]+scrollbar[1]:o.axis==="x"?scrollbar[1]:scrollbar[0],contentWrapper=o.axis==="yx"?"<div id='mCSB_"+d.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",autoHideClass=o.autoHideScrollbar?" "+classes[6]:"",scrollbarDirClass=(o.axis!=="x"&&d.langDir==="rtl")?" "+classes[7]:"";if(o.setWidth){$this.css("width",o.setWidth)}
if(o.setHeight){$this.css("height",o.setHeight)}
o.setLeft=(o.axis!=="y"&&d.langDir==="rtl")?"989999px":o.setLeft;$this.addClass(pluginNS+" _"+pluginPfx+"_"+d.idx+autoHideClass+scrollbarDirClass).wrapInner("<div id='mCSB_"+d.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+wrapperClass+"'><div id='mCSB_"+d.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir='"+d.langDir+"' /></div>");var mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container");if(o.axis!=="y"&&!o.advanced.autoExpandHorizontalScroll){mCSB_container.css("width",_contentWidth(mCSB_container))}
if(o.scrollbarPosition==="outside"){if($this.css("position")==="static"){$this.css("position","relative")}
$this.css("overflow","visible");mCustomScrollBox.addClass("mCSB_outside").after(scrollbars)}else{mCustomScrollBox.addClass("mCSB_inside").append(scrollbars);mCSB_container.wrap(contentWrapper)}
_scrollButtons.call(this);var mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];mCSB_dragger[0].css("min-height",mCSB_dragger[0].height());mCSB_dragger[1].css("min-width",mCSB_dragger[1].width())},_contentWidth=function(el){var val=[el[0].scrollWidth,Math.max.apply(Math,el.children().map(function(){return $(this).outerWidth(!0)}).get())],w=el.parent().width();return val[0]>w?val[0]:val[1]>w?val[1]:"100%"},_expandContentHorizontally=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCSB_container=$("#mCSB_"+d.idx+"_container");if(o.advanced.autoExpandHorizontalScroll&&o.axis!=="y"){mCSB_container.css({"width":"auto","min-width":0,"overflow-x":"scroll"});var w=Math.ceil(mCSB_container[0].scrollWidth);if(o.advanced.autoExpandHorizontalScroll===3||(o.advanced.autoExpandHorizontalScroll!==2&&w>mCSB_container.parent().width())){mCSB_container.css({"width":w,"min-width":"100%","overflow-x":"inherit"})}else{mCSB_container.css({"overflow-x":"inherit","position":"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({"width":(Math.ceil(mCSB_container[0].getBoundingClientRect().right+0.4)-Math.floor(mCSB_container[0].getBoundingClientRect().left)),"min-width":"100%","position":"relative"}).unwrap()}}},_scrollButtons=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCSB_scrollTools=$(".mCSB_"+d.idx+"_scrollbar:first"),tabindex=!_isNumeric(o.scrollButtons.tabindex)?"":"tabindex='"+o.scrollButtons.tabindex+"'",btnHTML=["<a href='#' class='"+classes[13]+"' "+tabindex+" />","<a href='#' class='"+classes[14]+"' "+tabindex+" />","<a href='#' class='"+classes[15]+"' "+tabindex+" />","<a href='#' class='"+classes[16]+"' "+tabindex+" />"],btn=[(o.axis==="x"?btnHTML[2]:btnHTML[0]),(o.axis==="x"?btnHTML[3]:btnHTML[1]),btnHTML[2],btnHTML[3]];if(o.scrollButtons.enable){mCSB_scrollTools.prepend(btn[0]).append(btn[1]).next(".mCSB_scrollTools").prepend(btn[2]).append(btn[3])}},_setDraggerLength=function(){var $this=$(this),d=$this.data(pluginPfx),mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],ratio=[mCustomScrollBox.height()/mCSB_container.outerHeight(!1),mCustomScrollBox.width()/mCSB_container.outerWidth(!1)],l=[parseInt(mCSB_dragger[0].css("min-height")),Math.round(ratio[0]*mCSB_dragger[0].parent().height()),parseInt(mCSB_dragger[1].css("min-width")),Math.round(ratio[1]*mCSB_dragger[1].parent().width())],h=oldIE&&(l[1]<l[0])?l[0]:l[1],w=oldIE&&(l[3]<l[2])?l[2]:l[3];mCSB_dragger[0].css({"height":h,"max-height":(mCSB_dragger[0].parent().height()-10)}).find(".mCSB_dragger_bar").css({"line-height":l[0]+"px"});mCSB_dragger[1].css({"width":w,"max-width":(mCSB_dragger[1].parent().width()-10)})},_scrollRatio=function(){var $this=$(this),d=$this.data(pluginPfx),mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],scrollAmount=[mCSB_container.outerHeight(!1)-mCustomScrollBox.height(),mCSB_container.outerWidth(!1)-mCustomScrollBox.width()],ratio=[scrollAmount[0]/(mCSB_dragger[0].parent().height()-mCSB_dragger[0].height()),scrollAmount[1]/(mCSB_dragger[1].parent().width()-mCSB_dragger[1].width())];d.scrollRatio={y:ratio[0],x:ratio[1]}},_onDragClasses=function(el,action,xpnd){var expandClass=xpnd?classes[0]+"_expanded":"",scrollbar=el.closest(".mCSB_scrollTools");if(action==="active"){el.toggleClass(classes[0]+" "+expandClass);scrollbar.toggleClass(classes[1]);el[0]._draggable=el[0]._draggable?0:1}else{if(!el[0]._draggable){if(action==="hide"){el.removeClass(classes[0]);scrollbar.removeClass(classes[1])}else{el.addClass(classes[0]);scrollbar.addClass(classes[1])}}}},_overflowed=function(){var $this=$(this),d=$this.data(pluginPfx),mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),contentHeight=d.overflowed==null?mCSB_container.height():mCSB_container.outerHeight(!1),contentWidth=d.overflowed==null?mCSB_container.width():mCSB_container.outerWidth(!1),h=mCSB_container[0].scrollHeight,w=mCSB_container[0].scrollWidth;if(h>contentHeight){contentHeight=h}
if(w>contentWidth){contentWidth=w}
return[contentHeight>mCustomScrollBox.height(),contentWidth>mCustomScrollBox.width()]},_resetContentPosition=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];_stop($this);if((o.axis!=="x"&&!d.overflowed[0])||(o.axis==="y"&&d.overflowed[0])){mCSB_dragger[0].add(mCSB_container).css("top",0);_scrollTo($this,"_resetY")}
if((o.axis!=="y"&&!d.overflowed[1])||(o.axis==="x"&&d.overflowed[1])){var cx=dx=0;if(d.langDir==="rtl"){cx=mCustomScrollBox.width()-mCSB_container.outerWidth(!1);dx=Math.abs(cx/d.scrollRatio.x)}
mCSB_container.css("left",cx);mCSB_dragger[1].css("left",dx);_scrollTo($this,"_resetX")}},_bindEvents=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt;if(!d.bindEvents){_draggable.call(this);if(o.contentTouchScroll){_contentDraggable.call(this)}
_selectable.call(this);if(o.mouseWheel.enable){function _mwt(){mousewheelTimeout=setTimeout(function(){if(!$.event.special.mousewheel){_mwt()}else{clearTimeout(mousewheelTimeout);_mousewheel.call($this[0])}},100)}
var mousewheelTimeout;_mwt()}
_draggerRail.call(this);_wrapperScroll.call(this);if(o.advanced.autoScrollOnFocus){_focus.call(this)}
if(o.scrollButtons.enable){_buttons.call(this)}
if(o.keyboard.enable){_keyboard.call(this)}
d.bindEvents=!0}},_unbindEvents=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,sb=".mCSB_"+d.idx+"_scrollbar",sel=$("#mCSB_"+d.idx+",#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,"+sb+" ."+classes[12]+",#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal,"+sb+">a"),mCSB_container=$("#mCSB_"+d.idx+"_container");if(o.advanced.releaseDraggableSelectors){sel.add($(o.advanced.releaseDraggableSelectors))}
if(o.advanced.extraDraggableSelectors){sel.add($(o.advanced.extraDraggableSelectors))}
if(d.bindEvents){$(document).add($(!_canAccessIFrame()||top.document)).unbind("."+namespace);sel.each(function(){$(this).unbind("."+namespace)});clearTimeout($this[0]._focusTimeout);_delete($this[0],"_focusTimeout");clearTimeout(d.sequential.step);_delete(d.sequential,"step");clearTimeout(mCSB_container[0].onCompleteTimeout);_delete(mCSB_container[0],"onCompleteTimeout");d.bindEvents=!1}},_scrollbarVisibility=function(disabled){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,contentWrapper=$("#mCSB_"+d.idx+"_container_wrapper"),content=contentWrapper.length?contentWrapper:$("#mCSB_"+d.idx+"_container"),scrollbar=[$("#mCSB_"+d.idx+"_scrollbar_vertical"),$("#mCSB_"+d.idx+"_scrollbar_horizontal")],mCSB_dragger=[scrollbar[0].find(".mCSB_dragger"),scrollbar[1].find(".mCSB_dragger")];if(o.axis!=="x"){if(d.overflowed[0]&&!disabled){scrollbar[0].add(mCSB_dragger[0]).add(scrollbar[0].children("a")).css("display","block");content.removeClass(classes[8]+" "+classes[10])}else{if(o.alwaysShowScrollbar){if(o.alwaysShowScrollbar!==2){mCSB_dragger[0].css("display","none")}
content.removeClass(classes[10])}else{scrollbar[0].css("display","none");content.addClass(classes[10])}
content.addClass(classes[8])}}
if(o.axis!=="y"){if(d.overflowed[1]&&!disabled){scrollbar[1].add(mCSB_dragger[1]).add(scrollbar[1].children("a")).css("display","block");content.removeClass(classes[9]+" "+classes[11])}else{if(o.alwaysShowScrollbar){if(o.alwaysShowScrollbar!==2){mCSB_dragger[1].css("display","none")}
content.removeClass(classes[11])}else{scrollbar[1].css("display","none");content.addClass(classes[11])}
content.addClass(classes[9])}}
if(!d.overflowed[0]&&!d.overflowed[1]){$this.addClass(classes[5])}else{$this.removeClass(classes[5])}},_coordinates=function(e){var t=e.type,o=e.target.ownerDocument!==document&&frameElement!==null?[$(frameElement).offset().top,$(frameElement).offset().left]:null,io=_canAccessIFrame()&&e.target.ownerDocument!==top.document&&frameElement!==null?[$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left]:[0,0];switch(t){case "pointerdown":case "MSPointerDown":case "pointermove":case "MSPointerMove":case "pointerup":case "MSPointerUp":return o?[e.originalEvent.pageY-o[0]+io[0],e.originalEvent.pageX-o[1]+io[1],!1]:[e.originalEvent.pageY,e.originalEvent.pageX,!1];break;case "touchstart":case "touchmove":case "touchend":var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],touches=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return e.target.ownerDocument!==document?[touch.screenY,touch.screenX,touches>1]:[touch.pageY,touch.pageX,touches>1];break;default:return o?[e.pageY-o[0]+io[0],e.pageX-o[1]+io[1],!1]:[e.pageY,e.pageX,!1]}},_draggable=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,draggerId=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"],mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=$("#"+draggerId[0]+",#"+draggerId[1]),draggable,dragY,dragX,rds=o.advanced.releaseDraggableSelectors?mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)):mCSB_dragger,eds=o.advanced.extraDraggableSelectors?$(!_canAccessIFrame()||top.document).add($(o.advanced.extraDraggableSelectors)):$(!_canAccessIFrame()||top.document);mCSB_dragger.bind("contextmenu."+namespace,function(e){e.preventDefault()}).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){e.stopImmediatePropagation();e.preventDefault();if(!_mouseBtnLeft(e)){return}
touchActive=!0;if(oldIE){document.onselectstart=function(){return!1}}
_iframe.call(mCSB_container,!1);_stop($this);draggable=$(this);var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left,h=draggable.height()+offset.top,w=draggable.width()+offset.left;if(y<h&&y>0&&x<w&&x>0){dragY=y;dragX=x}
_onDragClasses(draggable,"active",o.autoExpandScrollbar)}).bind("touchmove."+namespace,function(e){e.stopImmediatePropagation();e.preventDefault();var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;_drag(dragY,dragX,y,x)});$(document).add(eds).bind("mousemove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,function(e){if(draggable){var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;if(dragY===y&&dragX===x){return}
_drag(dragY,dragX,y,x)}}).add(rds).bind("mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){if(draggable){_onDragClasses(draggable,"active",o.autoExpandScrollbar);draggable=null}
touchActive=!1;if(oldIE){document.onselectstart=null}
_iframe.call(mCSB_container,!0)});function _drag(dragY,dragX,y,x){mCSB_container[0].idleTimer=o.scrollInertia<233?250:0;if(draggable.attr("id")===draggerId[1]){var dir="x",to=((draggable[0].offsetLeft-dragX)+x)*d.scrollRatio.x}else{var dir="y",to=((draggable[0].offsetTop-dragY)+y)*d.scrollRatio.y}
_scrollTo($this,to.toString(),{dir:dir,drag:!0})}},_contentDraggable=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],draggable,dragY,dragX,touchStartY,touchStartX,touchMoveY=[],touchMoveX=[],startTime,runningTime,endTime,distance,speed,amount,durA=0,durB,overwrite=o.axis==="yx"?"none":"all",touchIntent=[],touchDrag,docDrag,iframe=mCSB_container.find("iframe"),events=["touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,"touchmove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,"touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace],touchAction=document.body.style.touchAction!==undefined&&document.body.style.touchAction!=="";mCSB_container.bind(events[0],function(e){_onTouchstart(e)}).bind(events[1],function(e){_onTouchmove(e)});mCustomScrollBox.bind(events[0],function(e){_onTouchstart2(e)}).bind(events[2],function(e){_onTouchend(e)});if(iframe.length){iframe.each(function(){$(this).bind("load",function(){if(_canAccessIFrame(this)){$(this.contentDocument||this.contentWindow.document).bind(events[0],function(e){_onTouchstart(e);_onTouchstart2(e)}).bind(events[1],function(e){_onTouchmove(e)}).bind(events[2],function(e){_onTouchend(e)})}})})}
function _onTouchstart(e){if(!_pointerTouch(e)||touchActive||_coordinates(e)[2]){touchable=0;return}
touchable=1;touchDrag=0;docDrag=0;draggable=1;$this.removeClass("mCS_touch_action");var offset=mCSB_container.offset();dragY=_coordinates(e)[0]-offset.top;dragX=_coordinates(e)[1]-offset.left;touchIntent=[_coordinates(e)[0],_coordinates(e)[1]]}
function _onTouchmove(e){if(!_pointerTouch(e)||touchActive||_coordinates(e)[2]){return}
if(!o.documentTouchScroll){e.preventDefault()}
e.stopImmediatePropagation();if(docDrag&&!touchDrag){return}
if(draggable){runningTime=_getTime();var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left,easing="mcsLinearOut";touchMoveY.push(y);touchMoveX.push(x);touchIntent[2]=Math.abs(_coordinates(e)[0]-touchIntent[0]);touchIntent[3]=Math.abs(_coordinates(e)[1]-touchIntent[1]);if(d.overflowed[0]){var limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(),prevent=((dragY-y)>0&&(y-dragY)>-(limit*d.scrollRatio.y)&&(touchIntent[3]*2<touchIntent[2]||o.axis==="yx"))}
if(d.overflowed[1]){var limitX=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(),preventX=((dragX-x)>0&&(x-dragX)>-(limitX*d.scrollRatio.x)&&(touchIntent[2]*2<touchIntent[3]||o.axis==="yx"))}
if(prevent||preventX){if(!touchAction){e.preventDefault()}
touchDrag=1}else{docDrag=1;$this.addClass("mCS_touch_action")}
if(touchAction){e.preventDefault()}
amount=o.axis==="yx"?[(dragY-y),(dragX-x)]:o.axis==="x"?[null,(dragX-x)]:[(dragY-y),null];mCSB_container[0].idleTimer=250;if(d.overflowed[0]){_drag(amount[0],durA,easing,"y","all",!0)}
if(d.overflowed[1]){_drag(amount[1],durA,easing,"x",overwrite,!0)}}}
function _onTouchstart2(e){if(!_pointerTouch(e)||touchActive||_coordinates(e)[2]){touchable=0;return}
touchable=1;e.stopImmediatePropagation();_stop($this);startTime=_getTime();var offset=mCustomScrollBox.offset();touchStartY=_coordinates(e)[0]-offset.top;touchStartX=_coordinates(e)[1]-offset.left;touchMoveY=[];touchMoveX=[]}
function _onTouchend(e){if(!_pointerTouch(e)||touchActive||_coordinates(e)[2]){return}
draggable=0;e.stopImmediatePropagation();touchDrag=0;docDrag=0;endTime=_getTime();var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;if((endTime-runningTime)>30){return}
speed=1000/(endTime-startTime);var easing="mcsEaseOut",slow=speed<2.5,diff=slow?[touchMoveY[touchMoveY.length-2],touchMoveX[touchMoveX.length-2]]:[0,0];distance=slow?[(y-diff[0]),(x-diff[1])]:[y-touchStartY,x-touchStartX];var absDistance=[Math.abs(distance[0]),Math.abs(distance[1])];speed=slow?[Math.abs(distance[0]/4),Math.abs(distance[1]/4)]:[speed,speed];var a=[Math.abs(mCSB_container[0].offsetTop)-(distance[0]*_m((absDistance[0]/speed[0]),speed[0])),Math.abs(mCSB_container[0].offsetLeft)-(distance[1]*_m((absDistance[1]/speed[1]),speed[1]))];amount=o.axis==="yx"?[a[0],a[1]]:o.axis==="x"?[null,a[1]]:[a[0],null];durB=[(absDistance[0]*4)+o.scrollInertia,(absDistance[1]*4)+o.scrollInertia];var md=parseInt(o.contentTouchScroll)||0;amount[0]=absDistance[0]>md?amount[0]:0;amount[1]=absDistance[1]>md?amount[1]:0;if(d.overflowed[0]){_drag(amount[0],durB[0],easing,"y",overwrite,!1)}
if(d.overflowed[1]){_drag(amount[1],durB[1],easing,"x",overwrite,!1)}}
function _m(ds,s){var r=[s*1.5,s*2,s/1.5,s/2];if(ds>90){return s>4?r[0]:r[3]}else if(ds>60){return s>3?r[3]:r[2]}else if(ds>30){return s>8?r[1]:s>6?r[0]:s>4?s:r[2]}else{return s>8?s:r[3]}}
function _drag(amount,dur,easing,dir,overwrite,drag){if(!amount){return}
_scrollTo($this,amount.toString(),{dur:dur,scrollEasing:easing,dir:dir,overwrite:overwrite,drag:drag})}},_selectable=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,namespace=pluginPfx+"_"+d.idx,mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),action;mCSB_container.bind("mousedown."+namespace,function(e){if(touchable){return}
if(!action){action=1;touchActive=!0}}).add(document).bind("mousemove."+namespace,function(e){if(!touchable&&action&&_sel()){var offset=mCSB_container.offset(),y=_coordinates(e)[0]-offset.top+mCSB_container[0].offsetTop,x=_coordinates(e)[1]-offset.left+mCSB_container[0].offsetLeft;if(y>0&&y<wrapper.height()&&x>0&&x<wrapper.width()){if(seq.step){_seq("off",null,"stepped")}}else{if(o.axis!=="x"&&d.overflowed[0]){if(y<0){_seq("on",38)}else if(y>wrapper.height()){_seq("on",40)}}
if(o.axis!=="y"&&d.overflowed[1]){if(x<0){_seq("on",37)}else if(x>wrapper.width()){_seq("on",39)}}}}}).bind("mouseup."+namespace+" dragend."+namespace,function(e){if(touchable){return}
if(action){action=0;_seq("off",null)}
touchActive=!1});function _sel(){return window.getSelection?window.getSelection().toString():document.selection&&document.selection.type!="Control"?document.selection.createRange().text:0}
function _seq(a,c,s){seq.type=s&&action?"stepped":"stepless";seq.scrollAmount=10;_sequentialScroll($this,a,c,"mcsLinearOut",s?60:null)}},_mousewheel=function(){if(!$(this).data(pluginPfx)){return}
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],iframe=$("#mCSB_"+d.idx+"_container").find("iframe");if(iframe.length){iframe.each(function(){$(this).bind("load",function(){if(_canAccessIFrame(this)){$(this.contentDocument||this.contentWindow.document).bind("mousewheel."+namespace,function(e,delta){_onMousewheel(e,delta)})}})})}
mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){_onMousewheel(e,delta)});function _onMousewheel(e,delta){_stop($this);if(_disableMousewheel($this,e.target)){return}
var deltaFactor=o.mouseWheel.deltaFactor!=="auto"?parseInt(o.mouseWheel.deltaFactor):(oldIE&&e.deltaFactor<100)?100:e.deltaFactor||100,dur=o.scrollInertia;if(o.axis==="x"||o.mouseWheel.axis==="x"){var dir="x",px=[Math.round(deltaFactor*d.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)],amount=o.mouseWheel.scrollAmount!=="auto"?px[1]:px[0]>=mCustomScrollBox.width()?mCustomScrollBox.width()*0.9:px[0],contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetLeft),draggerPos=mCSB_dragger[1][0].offsetLeft,limit=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(),dlt=o.mouseWheel.axis==="y"?(e.deltaY||delta):e.deltaX}else{var dir="y",px=[Math.round(deltaFactor*d.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)],amount=o.mouseWheel.scrollAmount!=="auto"?px[1]:px[0]>=mCustomScrollBox.height()?mCustomScrollBox.height()*0.9:px[0],contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetTop),draggerPos=mCSB_dragger[0][0].offsetTop,limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(),dlt=e.deltaY||delta}
if((dir==="y"&&!d.overflowed[0])||(dir==="x"&&!d.overflowed[1])){return}
if(o.mouseWheel.invert||e.webkitDirectionInvertedFromDevice){dlt=-dlt}
if(o.mouseWheel.normalizeDelta){dlt=dlt<0?-1:1}
if((dlt>0&&draggerPos!==0)||(dlt<0&&draggerPos!==limit)||o.mouseWheel.preventDefault){e.stopImmediatePropagation();e.preventDefault()}
if(e.deltaFactor<5&&!o.mouseWheel.normalizeDelta){amount=e.deltaFactor;dur=17}
_scrollTo($this,(contentPos-(dlt*amount)).toString(),{dir:dir,dur:dur})}},_canAccessIFrameCache=new Object(),_canAccessIFrame=function(iframe){var result=!1,cacheKey=!1,html=null;if(iframe===undefined){cacheKey="#empty"}else if($(iframe).attr("id")!==undefined){cacheKey=$(iframe).attr("id")}
if(cacheKey!==!1&&_canAccessIFrameCache[cacheKey]!==undefined){return _canAccessIFrameCache[cacheKey]}
if(!iframe){try{var doc=top.document;html=doc.body.innerHTML}catch(err){}
result=(html!==null)}else{try{var doc=iframe.contentDocument||iframe.contentWindow.document;html=doc.body.innerHTML}catch(err){}
result=(html!==null)}
if(cacheKey!==!1){_canAccessIFrameCache[cacheKey]=result}
return result},_iframe=function(evt){var el=this.find("iframe");if(!el.length){return}
var val=!evt?"none":"auto";el.css("pointer-events",val)},_disableMousewheel=function(el,target){var tag=target.nodeName.toLowerCase(),tags=el.data(pluginPfx).opt.mouseWheel.disableOver,focusTags=["select","textarea"];return $.inArray(tag,tags)>-1&&!($.inArray(tag,focusTags)>-1&&!$(target).is(":focus"))},_draggerRail=function(){var $this=$(this),d=$this.data(pluginPfx),namespace=pluginPfx+"_"+d.idx,mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),mCSB_draggerContainer=$(".mCSB_"+d.idx+"_scrollbar ."+classes[12]),clickable;mCSB_draggerContainer.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){touchActive=!0;if(!$(e.target).hasClass("mCSB_dragger")){clickable=1}}).bind("touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){touchActive=!1}).bind("click."+namespace,function(e){if(!clickable){return}
clickable=0;if($(e.target).hasClass(classes[12])||$(e.target).hasClass("mCSB_draggerRail")){_stop($this);var el=$(this),mCSB_dragger=el.find(".mCSB_dragger");if(el.parent(".mCSB_scrollTools_horizontal").length>0){if(!d.overflowed[1]){return}
var dir="x",clickDir=e.pageX>mCSB_dragger.offset().left?-1:1,to=Math.abs(mCSB_container[0].offsetLeft)-(clickDir*(wrapper.width()*0.9))}else{if(!d.overflowed[0]){return}
var dir="y",clickDir=e.pageY>mCSB_dragger.offset().top?-1:1,to=Math.abs(mCSB_container[0].offsetTop)-(clickDir*(wrapper.height()*0.9))}
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"})}})},_focus=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent();mCSB_container.bind("focusin."+namespace,function(e){var el=$(document.activeElement),nested=mCSB_container.find(".mCustomScrollBox").length,dur=0;if(!el.is(o.advanced.autoScrollOnFocus)){return}
_stop($this);clearTimeout($this[0]._focusTimeout);$this[0]._focusTimer=nested?(dur+17)*nested:0;$this[0]._focusTimeout=setTimeout(function(){var to=[_childPos(el)[0],_childPos(el)[1]],contentPos=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft],isVisible=[(contentPos[0]+to[0]>=0&&contentPos[0]+to[0]<wrapper.height()-el.outerHeight(!1)),(contentPos[1]+to[1]>=0&&contentPos[0]+to[1]<wrapper.width()-el.outerWidth(!1))],overwrite=(o.axis==="yx"&&!isVisible[0]&&!isVisible[1])?"none":"all";if(o.axis!=="x"&&!isVisible[0]){_scrollTo($this,to[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur})}
if(o.axis!=="y"&&!isVisible[1]){_scrollTo($this,to[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur})}},$this[0]._focusTimer)})},_wrapperScroll=function(){var $this=$(this),d=$this.data(pluginPfx),namespace=pluginPfx+"_"+d.idx,wrapper=$("#mCSB_"+d.idx+"_container").parent();wrapper.bind("scroll."+namespace,function(e){if(wrapper.scrollTop()!==0||wrapper.scrollLeft()!==0){$(".mCSB_"+d.idx+"_scrollbar").css("visibility","hidden")}})},_buttons=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,namespace=pluginPfx+"_"+d.idx,sel=".mCSB_"+d.idx+"_scrollbar",btn=$(sel+">a");btn.bind("contextmenu."+namespace,function(e){e.preventDefault()}).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace+" mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace+" mouseout."+namespace+" pointerout."+namespace+" MSPointerOut."+namespace+" click."+namespace,function(e){e.preventDefault();if(!_mouseBtnLeft(e)){return}
var btnClass=$(this).attr("class");seq.type=o.scrollButtons.scrollType;switch(e.type){case "mousedown":case "touchstart":case "pointerdown":case "MSPointerDown":if(seq.type==="stepped"){return}
touchActive=!0;d.tweenRunning=!1;_seq("on",btnClass);break;case "mouseup":case "touchend":case "pointerup":case "MSPointerUp":case "mouseout":case "pointerout":case "MSPointerOut":if(seq.type==="stepped"){return}
touchActive=!1;if(seq.dir){_seq("off",btnClass)}
break;case "click":if(seq.type!=="stepped"||d.tweenRunning){return}
_seq("on",btnClass);break}
function _seq(a,c){seq.scrollAmount=o.scrollButtons.scrollAmount;_sequentialScroll($this,a,c)}})},_keyboard=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,namespace=pluginPfx+"_"+d.idx,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),editables="input,textarea,select,datalist,keygen,[contenteditable='true']",iframe=mCSB_container.find("iframe"),events=["blur."+namespace+" keydown."+namespace+" keyup."+namespace];if(iframe.length){iframe.each(function(){$(this).bind("load",function(){if(_canAccessIFrame(this)){$(this.contentDocument||this.contentWindow.document).bind(events[0],function(e){_onKeyboard(e)})}})})}
mCustomScrollBox.attr("tabindex","0").bind(events[0],function(e){_onKeyboard(e)});function _onKeyboard(e){switch(e.type){case "blur":if(d.tweenRunning&&seq.dir){_seq("off",null)}
break;case "keydown":case "keyup":var code=e.keyCode?e.keyCode:e.which,action="on";if((o.axis!=="x"&&(code===38||code===40))||(o.axis!=="y"&&(code===37||code===39))){if(((code===38||code===40)&&!d.overflowed[0])||((code===37||code===39)&&!d.overflowed[1])){return}
if(e.type==="keyup"){action="off"}
if(!$(document.activeElement).is(editables)){e.preventDefault();e.stopImmediatePropagation();_seq(action,code)}}else if(code===33||code===34){if(d.overflowed[0]||d.overflowed[1]){e.preventDefault();e.stopImmediatePropagation()}
if(e.type==="keyup"){_stop($this);var keyboardDir=code===34?-1:1;if(o.axis==="x"||(o.axis==="yx"&&d.overflowed[1]&&!d.overflowed[0])){var dir="x",to=Math.abs(mCSB_container[0].offsetLeft)-(keyboardDir*(wrapper.width()*0.9))}else{var dir="y",to=Math.abs(mCSB_container[0].offsetTop)-(keyboardDir*(wrapper.height()*0.9))}
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"})}}else if(code===35||code===36){if(!$(document.activeElement).is(editables)){if(d.overflowed[0]||d.overflowed[1]){e.preventDefault();e.stopImmediatePropagation()}
if(e.type==="keyup"){if(o.axis==="x"||(o.axis==="yx"&&d.overflowed[1]&&!d.overflowed[0])){var dir="x",to=code===35?Math.abs(wrapper.width()-mCSB_container.outerWidth(!1)):0}else{var dir="y",to=code===35?Math.abs(wrapper.height()-mCSB_container.outerHeight(!1)):0}
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"})}}}
break}
function _seq(a,c){seq.type=o.keyboard.scrollType;seq.scrollAmount=o.keyboard.scrollAmount;if(seq.type==="stepped"&&d.tweenRunning){return}
_sequentialScroll($this,a,c)}}},_sequentialScroll=function(el,action,trigger,e,s){var d=el.data(pluginPfx),o=d.opt,seq=d.sequential,mCSB_container=$("#mCSB_"+d.idx+"_container"),once=seq.type==="stepped"?!0:!1,steplessSpeed=o.scrollInertia<26?26:o.scrollInertia,steppedSpeed=o.scrollInertia<1?17:o.scrollInertia;switch(action){case "on":seq.dir=[(trigger===classes[16]||trigger===classes[15]||trigger===39||trigger===37?"x":"y"),(trigger===classes[13]||trigger===classes[15]||trigger===38||trigger===37?-1:1)];_stop(el);if(_isNumeric(trigger)&&seq.type==="stepped"){return}
_on(once);break;case "off":_off();if(once||(d.tweenRunning&&seq.dir)){_on(!0)}
break}
function _on(once){if(o.snapAmount){seq.scrollAmount=!(o.snapAmount instanceof Array)?o.snapAmount:seq.dir[0]==="x"?o.snapAmount[1]:o.snapAmount[0]}
var c=seq.type!=="stepped",t=s?s:!once?1000/60:c?steplessSpeed/1.5:steppedSpeed,m=!once?2.5:c?7.5:40,contentPos=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)],ratio=[d.scrollRatio.y>10?10:d.scrollRatio.y,d.scrollRatio.x>10?10:d.scrollRatio.x],amount=seq.dir[0]==="x"?contentPos[1]+(seq.dir[1]*(ratio[1]*m)):contentPos[0]+(seq.dir[1]*(ratio[0]*m)),px=seq.dir[0]==="x"?contentPos[1]+(seq.dir[1]*parseInt(seq.scrollAmount)):contentPos[0]+(seq.dir[1]*parseInt(seq.scrollAmount)),to=seq.scrollAmount!=="auto"?px:amount,easing=e?e:!once?"mcsLinear":c?"mcsLinearOut":"mcsEaseInOut",onComplete=!once?!1:!0;if(once&&t<17){to=seq.dir[0]==="x"?contentPos[1]:contentPos[0]}
_scrollTo(el,to.toString(),{dir:seq.dir[0],scrollEasing:easing,dur:t,onComplete:onComplete});if(once){seq.dir=!1;return}
clearTimeout(seq.step);seq.step=setTimeout(function(){_on()},t)}
function _off(){clearTimeout(seq.step);_delete(seq,"step");_stop(el)}},_arr=function(val){var o=$(this).data(pluginPfx).opt,vals=[];if(typeof val==="function"){val=val()}
if(!(val instanceof Array)){vals[0]=val.y?val.y:val.x||o.axis==="x"?null:val;vals[1]=val.x?val.x:val.y||o.axis==="y"?null:val}else{vals=val.length>1?[val[0],val[1]]:o.axis==="x"?[null,val[0]]:[val[0],null]}
if(typeof vals[0]==="function"){vals[0]=vals[0]()}
if(typeof vals[1]==="function"){vals[1]=vals[1]()}
return vals},_to=function(val,dir){if(val==null||typeof val=="undefined"){return}
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),t=typeof val;if(!dir){dir=o.axis==="x"?"x":"y"}
var contentLength=dir==="x"?mCSB_container.outerWidth(!1)-wrapper.width():mCSB_container.outerHeight(!1)-wrapper.height(),contentPos=dir==="x"?mCSB_container[0].offsetLeft:mCSB_container[0].offsetTop,cssProp=dir==="x"?"left":"top";switch(t){case "function":return val();break;case "object":var obj=val.jquery?val:$(val);if(!obj.length){return}
return dir==="x"?_childPos(obj)[1]:_childPos(obj)[0];break;case "string":case "number":if(_isNumeric(val)){return Math.abs(val)}else if(val.indexOf("%")!==-1){return Math.abs(contentLength*parseInt(val)/100)}else if(val.indexOf("-=")!==-1){return Math.abs(contentPos-parseInt(val.split("-=")[1]))}else if(val.indexOf("+=")!==-1){var p=(contentPos+parseInt(val.split("+=")[1]));return p>=0?0:Math.abs(p)}else if(val.indexOf("px")!==-1&&_isNumeric(val.split("px")[0])){return Math.abs(val.split("px")[0])}else{if(val==="top"||val==="left"){return 0}else if(val==="bottom"){return Math.abs(wrapper.height()-mCSB_container.outerHeight(!1))}else if(val==="right"){return Math.abs(wrapper.width()-mCSB_container.outerWidth(!1))}else if(val==="first"||val==="last"){var obj=mCSB_container.find(":"+val);return dir==="x"?_childPos(obj)[1]:_childPos(obj)[0]}else{if($(val).length){return dir==="x"?_childPos($(val))[1]:_childPos($(val))[0]}else{mCSB_container.css(cssProp,val);methods.update.call(null,$this[0]);return}}}
break}},_autoUpdate=function(rem){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCSB_container=$("#mCSB_"+d.idx+"_container");if(rem){clearTimeout(mCSB_container[0].autoUpdate);_delete(mCSB_container[0],"autoUpdate");return}
upd();function upd(){clearTimeout(mCSB_container[0].autoUpdate);if($this.parents("html").length===0){$this=null;return}
mCSB_container[0].autoUpdate=setTimeout(function(){if(o.advanced.updateOnSelectorChange){d.poll.change.n=sizesSum();if(d.poll.change.n!==d.poll.change.o){d.poll.change.o=d.poll.change.n;doUpd(3);return}}
if(o.advanced.updateOnContentResize){d.poll.size.n=$this[0].scrollHeight+$this[0].scrollWidth+mCSB_container[0].offsetHeight+$this[0].offsetHeight+$this[0].offsetWidth;if(d.poll.size.n!==d.poll.size.o){d.poll.size.o=d.poll.size.n;doUpd(1);return}}
if(o.advanced.updateOnImageLoad){if(!(o.advanced.updateOnImageLoad==="auto"&&o.axis==="y")){d.poll.img.n=mCSB_container.find("img").length;if(d.poll.img.n!==d.poll.img.o){d.poll.img.o=d.poll.img.n;mCSB_container.find("img").each(function(){imgLoader(this)});return}}}
if(o.advanced.updateOnSelectorChange||o.advanced.updateOnContentResize||o.advanced.updateOnImageLoad){upd()}},o.advanced.autoUpdateTimeout)}
function imgLoader(el){if($(el).hasClass(classes[2])){doUpd();return}
var img=new Image();function createDelegate(contextObject,delegateMethod){return function(){return delegateMethod.apply(contextObject,arguments)}}
function imgOnLoad(){this.onload=null;$(el).addClass(classes[2]);doUpd(2)}
img.onload=createDelegate(img,imgOnLoad);img.src=el.src}
function sizesSum(){if(o.advanced.updateOnSelectorChange===!0){o.advanced.updateOnSelectorChange="*"}
var total=0,sel=mCSB_container.find(o.advanced.updateOnSelectorChange);if(o.advanced.updateOnSelectorChange&&sel.length>0){sel.each(function(){total+=this.offsetHeight+this.offsetWidth})}
return total}
function doUpd(cb){clearTimeout(mCSB_container[0].autoUpdate);methods.update.call(null,$this[0],cb)}},_snapAmount=function(to,amount,offset){return(Math.round(to/amount)*amount-offset)},_stop=function(el){var d=el.data(pluginPfx),sel=$("#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal");sel.each(function(){_stopTween.call(this)})},_scrollTo=function(el,to,options){var d=el.data(pluginPfx),o=d.opt,defaults={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:o.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},options=$.extend(defaults,options),dur=[options.dur,(options.drag?0:options.dur)],mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),totalScrollOffsets=o.callbacks.onTotalScrollOffset?_arr.call(el,o.callbacks.onTotalScrollOffset):[0,0],totalScrollBackOffsets=o.callbacks.onTotalScrollBackOffset?_arr.call(el,o.callbacks.onTotalScrollBackOffset):[0,0];d.trigger=options.trigger;if(wrapper.scrollTop()!==0||wrapper.scrollLeft()!==0){$(".mCSB_"+d.idx+"_scrollbar").css("visibility","visible");wrapper.scrollTop(0).scrollLeft(0)}
if(to==="_resetY"&&!d.contentReset.y){if(_cb("onOverflowYNone")){o.callbacks.onOverflowYNone.call(el[0])}
d.contentReset.y=1}
if(to==="_resetX"&&!d.contentReset.x){if(_cb("onOverflowXNone")){o.callbacks.onOverflowXNone.call(el[0])}
d.contentReset.x=1}
if(to==="_resetY"||to==="_resetX"){return}
if((d.contentReset.y||!el[0].mcs)&&d.overflowed[0]){if(_cb("onOverflowY")){o.callbacks.onOverflowY.call(el[0])}
d.contentReset.x=null}
if((d.contentReset.x||!el[0].mcs)&&d.overflowed[1]){if(_cb("onOverflowX")){o.callbacks.onOverflowX.call(el[0])}
d.contentReset.x=null}
if(o.snapAmount){var snapAmount=!(o.snapAmount instanceof Array)?o.snapAmount:options.dir==="x"?o.snapAmount[1]:o.snapAmount[0];to=_snapAmount(to,snapAmount,o.snapOffset)}
switch(options.dir){case "x":var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_horizontal"),property="left",contentPos=mCSB_container[0].offsetLeft,limit=[mCustomScrollBox.width()-mCSB_container.outerWidth(!1),mCSB_dragger.parent().width()-mCSB_dragger.width()],scrollTo=[to,to===0?0:(to/d.scrollRatio.x)],tso=totalScrollOffsets[1],tsbo=totalScrollBackOffsets[1],totalScrollOffset=tso>0?tso/d.scrollRatio.x:0,totalScrollBackOffset=tsbo>0?tsbo/d.scrollRatio.x:0;break;case "y":var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_vertical"),property="top",contentPos=mCSB_container[0].offsetTop,limit=[mCustomScrollBox.height()-mCSB_container.outerHeight(!1),mCSB_dragger.parent().height()-mCSB_dragger.height()],scrollTo=[to,to===0?0:(to/d.scrollRatio.y)],tso=totalScrollOffsets[0],tsbo=totalScrollBackOffsets[0],totalScrollOffset=tso>0?tso/d.scrollRatio.y:0,totalScrollBackOffset=tsbo>0?tsbo/d.scrollRatio.y:0;break}
if(scrollTo[1]<0||(scrollTo[0]===0&&scrollTo[1]===0)){scrollTo=[0,0]}else if(scrollTo[1]>=limit[1]){scrollTo=[limit[0],limit[1]]}else{scrollTo[0]=-scrollTo[0]}
if(!el[0].mcs){_mcs();if(_cb("onInit")){o.callbacks.onInit.call(el[0])}}
clearTimeout(mCSB_container[0].onCompleteTimeout);_tweenTo(mCSB_dragger[0],property,Math.round(scrollTo[1]),dur[1],options.scrollEasing);if(!d.tweenRunning&&((contentPos===0&&scrollTo[0]>=0)||(contentPos===limit[0]&&scrollTo[0]<=limit[0]))){return}
_tweenTo(mCSB_container[0],property,Math.round(scrollTo[0]),dur[0],options.scrollEasing,options.overwrite,{onStart:function(){if(options.callbacks&&options.onStart&&!d.tweenRunning){if(_cb("onScrollStart")){_mcs();o.callbacks.onScrollStart.call(el[0])}
d.tweenRunning=!0;_onDragClasses(mCSB_dragger);d.cbOffsets=_cbOffsets()}},onUpdate:function(){if(options.callbacks&&options.onUpdate){if(_cb("whileScrolling")){_mcs();o.callbacks.whileScrolling.call(el[0])}}},onComplete:function(){if(options.callbacks&&options.onComplete){if(o.axis==="yx"){clearTimeout(mCSB_container[0].onCompleteTimeout)}
var t=mCSB_container[0].idleTimer||0;mCSB_container[0].onCompleteTimeout=setTimeout(function(){if(_cb("onScroll")){_mcs();o.callbacks.onScroll.call(el[0])}
if(_cb("onTotalScroll")&&scrollTo[1]>=limit[1]-totalScrollOffset&&d.cbOffsets[0]){_mcs();o.callbacks.onTotalScroll.call(el[0])}
if(_cb("onTotalScrollBack")&&scrollTo[1]<=totalScrollBackOffset&&d.cbOffsets[1]){_mcs();o.callbacks.onTotalScrollBack.call(el[0])}
d.tweenRunning=!1;mCSB_container[0].idleTimer=0;_onDragClasses(mCSB_dragger,"hide")},t)}}});function _cb(cb){return d&&o.callbacks[cb]&&typeof o.callbacks[cb]==="function"}
function _cbOffsets(){return[o.callbacks.alwaysTriggerOffsets||contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets||contentPos<=-tsbo]}
function _mcs(){var cp=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft],dp=[mCSB_dragger[0].offsetTop,mCSB_dragger[0].offsetLeft],cl=[mCSB_container.outerHeight(!1),mCSB_container.outerWidth(!1)],pl=[mCustomScrollBox.height(),mCustomScrollBox.width()];el[0].mcs={content:mCSB_container,top:cp[0],left:cp[1],draggerTop:dp[0],draggerLeft:dp[1],topPct:Math.round((100*Math.abs(cp[0]))/(Math.abs(cl[0])-pl[0])),leftPct:Math.round((100*Math.abs(cp[1]))/(Math.abs(cl[1])-pl[1])),direction:options.dir}}},_tweenTo=function(el,prop,to,duration,easing,overwrite,callbacks){if(!el._mTween){el._mTween={top:{},left:{}}}
var callbacks=callbacks||{},onStart=callbacks.onStart||function(){},onUpdate=callbacks.onUpdate||function(){},onComplete=callbacks.onComplete||function(){},startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style,_request,tobj=el._mTween[prop];if(prop==="left"){from=el.offsetLeft}
var diff=to-from;tobj.stop=0;if(overwrite!=="none"){_cancelTween()}
_startTween();function _step(){if(tobj.stop){return}
if(!progress){onStart.call()}
progress=_getTime()-startTime;_tween();if(progress>=tobj.time){tobj.time=(progress>tobj.time)?progress+_delay-(progress-tobj.time):progress+_delay-1;if(tobj.time<progress+1){tobj.time=progress+1}}
if(tobj.time<duration){tobj.id=_request(_step)}else{onComplete.call()}}
function _tween(){if(duration>0){tobj.currVal=_ease(tobj.time,from,diff,duration,easing);elStyle[prop]=Math.round(tobj.currVal)+"px"}else{elStyle[prop]=to+"px"}
onUpdate.call()}
function _startTween(){_delay=1000/60;tobj.time=progress+_delay;_request=(!window.requestAnimationFrame)?function(f){_tween();return setTimeout(f,0.01)}:window.requestAnimationFrame;tobj.id=_request(_step)}
function _cancelTween(){if(tobj.id==null){return}
if(!window.requestAnimationFrame){clearTimeout(tobj.id)}else{window.cancelAnimationFrame(tobj.id)}
tobj.id=null}
function _ease(t,b,c,d,type){switch(type){case "linear":case "mcsLinear":return c*t/d+b;break;case "mcsLinearOut":t/=d;t--;return c*Math.sqrt(1-t*t)+b;break;case "easeInOutSmooth":t/=d/2;if(t<1)return c/2*t*t+b;t--;return-c/2*(t*(t-2)-1)+b;break;case "easeInOutStrong":t/=d/2;if(t<1)return c/2*Math.pow(2,10*(t-1))+b;t--;return c/2*(-Math.pow(2,-10*t)+2)+b;break;case "easeInOut":case "mcsEaseInOut":t/=d/2;if(t<1)return c/2*t*t*t+b;t-=2;return c/2*(t*t*t+2)+b;break;case "easeOutSmooth":t/=d;t--;return-c*(t*t*t*t-1)+b;break;case "easeOutStrong":return c*(-Math.pow(2,-10*t/d)+1)+b;break;case "easeOut":case "mcsEaseOut":default:var ts=(t/=d)*t,tc=ts*t;return b+c*(0.499999999999997*tc*ts+ -2.5*ts*ts+5.5*tc+ -6.5*ts+4*t)}}},_getTime=function(){if(window.performance&&window.performance.now){return window.performance.now()}else{if(window.performance&&window.performance.webkitNow){return window.performance.webkitNow()}else{if(Date.now){return Date.now()}else{return new Date().getTime()}}}},_stopTween=function(){var el=this;if(!el._mTween){el._mTween={top:{},left:{}}}
var props=["top","left"];for(var i=0;i<props.length;i++){var prop=props[i];if(el._mTween[prop].id){if(!window.requestAnimationFrame){clearTimeout(el._mTween[prop].id)}else{window.cancelAnimationFrame(el._mTween[prop].id)}
el._mTween[prop].id=null;el._mTween[prop].stop=1}}},_delete=function(c,m){try{delete c[m]}catch(e){c[m]=null}},_mouseBtnLeft=function(e){return!(e.which&&e.which!==1)},_pointerTouch=function(e){var t=e.originalEvent.pointerType;return!(t&&t!=="touch"&&t!==2)},_isNumeric=function(val){return!isNaN(parseFloat(val))&&isFinite(val)},_childPos=function(el){var p=el.parents(".mCSB_container");return[el.offset().top-p.offset().top,el.offset().left-p.offset().left]},_isTabHidden=function(){var prop=_getHiddenProp();if(!prop)return!1;return document[prop];function _getHiddenProp(){var pfx=["webkit","moz","ms","o"];if("hidden" in document)return"hidden";for(var i=0;i<pfx.length;i++){if((pfx[i]+"Hidden")in document)
return pfx[i]+"Hidden"}
return null}};$.fn[pluginNS]=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof method==="object"||!method){return methods.init.apply(this,arguments)}else{$.error("Method "+method+" does not exist")}};$[pluginNS]=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof method==="object"||!method){return methods.init.apply(this,arguments)}else{$.error("Method "+method+" does not exist")}};$[pluginNS].defaults=defaults;window[pluginNS]=!0;$(window).bind("load",function(){$(defaultSelector)[pluginNS]();$.extend($.expr[":"],{mcsInView:$.expr[":"].mcsInView||function(el){var $el=$(el),content=$el.parents(".mCSB_container"),wrapper,cPos;if(!content.length){return}
wrapper=content.parent();cPos=[content[0].offsetTop,content[0].offsetLeft];return cPos[0]+_childPos($el)[0]>=0&&cPos[0]+_childPos($el)[0]<wrapper.height()-$el.outerHeight(!1)&&cPos[1]+_childPos($el)[1]>=0&&cPos[1]+_childPos($el)[1]<wrapper.width()-$el.outerWidth(!1)},mcsInSight:$.expr[":"].mcsInSight||function(el,i,m){var $el=$(el),elD,content=$el.parents(".mCSB_container"),wrapperView,pos,wrapperViewPct,pctVals=m[3]==="exact"?[[1,0],[1,0]]:[[0.9,0.1],[0.6,0.4]];if(!content.length){return}
elD=[$el.outerHeight(!1),$el.outerWidth(!1)];pos=[content[0].offsetTop+_childPos($el)[0],content[0].offsetLeft+_childPos($el)[1]];wrapperView=[content.parent()[0].offsetHeight,content.parent()[0].offsetWidth];wrapperViewPct=[elD[0]<wrapperView[0]?pctVals[0]:pctVals[1],elD[1]<wrapperView[1]?pctVals[0]:pctVals[1]];return pos[0]-(wrapperView[0]*wrapperViewPct[0][0])<0&&pos[0]+elD[0]-(wrapperView[0]*wrapperViewPct[0][1])>=0&&pos[1]-(wrapperView[1]*wrapperViewPct[1][0])<0&&pos[1]+elD[1]-(wrapperView[1]*wrapperViewPct[1][1])>=0},mcsOverflow:$.expr[":"].mcsOverflow||function(el){var d=$(el).data(pluginPfx);if(!d){return}
return d.overflowed[0]||d.overflowed[1]}})})}))}));/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
$(document).ready(function(){createLeoCompareModalPopup();LeoCompareButtonAction();prestashop.on('updateProductList',function(){LeoCompareButtonAction()});prestashop.on('updatedProduct',function(){LeoCompareButtonAction()});prestashop.on('clickQuickView',function(){check_active_compare=setInterval(function(){if($('.quickview.modal').length){$('.quickview.modal').on('shown.bs.modal',function(e){LeoCompareButtonAction()})
clearInterval(check_active_compare)}},300)});activeEventModalCompare()});function createLeoCompareModalPopup(){var leoCompareModalPopup='';leoCompareModalPopup+='<div class="modal leo-modal leo-modal-compare fade" tabindex="-1" role="dialog" aria-hidden="true">';leoCompareModalPopup+='<div class="modal-dialog" role="document">';leoCompareModalPopup+='<div class="modal-content">';leoCompareModalPopup+='<div class="modal-header">';leoCompareModalPopup+='<button type="button" class="close" data-dismiss="modal" aria-label="Close">';leoCompareModalPopup+='<span aria-hidden="true">&times;</span>';leoCompareModalPopup+='</button>';leoCompareModalPopup+='<h5 class="modal-title text-xs-center">';leoCompareModalPopup+='</h5>';leoCompareModalPopup+='</div>';leoCompareModalPopup+='</div>';leoCompareModalPopup+='</div>';leoCompareModalPopup+='</div>';$('body').append(leoCompareModalPopup)}
function LeoCompareButtonAction(){$('.leo-compare-button').click(function(){if(!$('.leo-compare-button.active').length){var total_product_compare=compared_products.length;var id_product=$(this).data('id-product');var content_product_compare_mess_remove=productcompare_remove+'. <a href="'+productcompare_url+'" target="_blank"><strong>'+productcompare_viewlistcompare+'.</strong></a>';var content_product_compare_mess_add=productcompare_add+'. <a href="'+productcompare_url+'" target="_blank"><strong>'+productcompare_viewlistcompare+'.</strong></a>';var content_product_compare_mess_max=productcompare_max_item+'. <a href="'+productcompare_url+'" target="_blank"><strong>'+productcompare_viewlistcompare+'.</strong></a>';$(this).addClass('active');$(this).find('.leo-compare-bt-loading').css({'display':'block'});$(this).find('.leo-compare-bt-content').hide();var object_e=$(this);if($(this).hasClass('added')||$(this).hasClass('delete')){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:productcompare_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"remove","id_product":id_product,"token":leo_token},success:function(result){if(result==1){if($('.ap-btn-compare .ap-total-compare').length){var old_num_compare=parseInt($('.ap-btn-compare .ap-total-compare').data('compare-total'));var new_num_compare=old_num_compare-1;$('.ap-btn-compare .ap-total-compare').data('compare-total',new_num_compare);$('.ap-btn-compare .ap-total-compare').text(new_num_compare)}
compared_products.splice($.inArray(parseInt(id_product),compared_products),1);if(object_e.hasClass('delete')){if($('.leo-productscompare-item').length==1){window.location.replace(productcompare_url)}else{$('td.product-'+id_product).fadeOut(function(){$(this).remove()})}}else{$('.leo-modal-compare .modal-title').html(content_product_compare_mess_remove);$('.leo-modal-compare').modal('show');$('.leo-compare-button[data-id-product='+id_product+']').removeClass('added');$('.leo-compare-button[data-id-product='+id_product+']').attr('title',buttoncompare_title_add)}}else{$('.leo-modal-compare .modal-title').html(productcompare_remove_error);$('.leo-modal-compare').modal('show')}
object_e.find('.leo-compare-bt-loading').hide();object_e.find('.leo-compare-bt-content').show()},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{if(total_product_compare<comparator_max_item){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:productcompare_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"add","id_product":id_product,"token":leo_token,},success:function(result){if(result==1){$('.leo-modal-compare .modal-title').html(content_product_compare_mess_add);$('.leo-modal-compare').modal('show');if($('.ap-btn-compare .ap-total-compare').length){var old_num_compare=parseInt($('.ap-btn-compare .ap-total-compare').data('compare-total'));var new_num_compare=old_num_compare+1;$('.ap-btn-compare .ap-total-compare').data('compare-total',new_num_compare);$('.ap-btn-compare .ap-total-compare').text(new_num_compare)}
compared_products.push(id_product);$('.leo-compare-button[data-id-product='+id_product+']').addClass('added');$('.leo-compare-button[data-id-product='+id_product+']').attr('title',buttoncompare_title_remove)}else{$('.leo-modal-compare .modal-title').html(productcompare_add_error);$('.leo-modal-compare').modal('show')}
object_e.find('.leo-compare-bt-loading').hide();object_e.find('.leo-compare-bt-content').show()},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$('.leo-modal-compare .modal-title').html(content_product_compare_mess_max);$('.leo-modal-compare').modal('show');object_e.find('.leo-compare-bt-loading').hide();object_e.find('.leo-compare-bt-content').show()}}}
return!1})}
function activeEventModalCompare(){$('.leo-modal-compare').on('hide.bs.modal',function(e){if($('.leo-compare-button.active').length){$('.leo-compare-button.active').removeClass('active')}})
$('.leo-modal-compare').on('hidden.bs.modal',function(e){$('body').css('padding-right','')})
$('.leo-modal-compare').on('shown.bs.modal',function(e){if($('.quickview.modal').length){$('.quickview.modal').modal('hide')}})};/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
$(document).ready(function(){createLeoWishlistModalPopup();LeoWishlistButtonAction();prestashop.on('updateProductList',function(){LeoWishlistButtonAction()});prestashop.on('updatedProduct',function(){LeoWishlistButtonAction()});prestashop.on('clickQuickView',function(){check_active_wishlist=setInterval(function(){if($('.quickview.modal').length){$('.quickview.modal').on('shown.bs.modal',function(e){LeoWishlistButtonAction()})
clearInterval(check_active_wishlist)}},300)});activeEventModalWishlist();LeoListWishlistAction();$('.leo-save-wishlist-bt').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');$('.new-wishlist .has-danger .form-control-feedback').html('');$('.new-wishlist .has-success .form-control-feedback').html('');var name_wishlist=$.trim($('#wishlist_name').val());if(!name_wishlist){$('#wishlist_name').parent().addClass('has-error');$(this).removeClass('active')}else{var object_e=$(this);$('#wishlist_name').parent().removeClass('has-error');$('.leo-save-wishlist-bt-text').hide();$('.leo-save-wishlist-loading').css({'display':'block'});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"add-wishlist","name_wishlist":name_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.new-wishlist .has-success .form-control-feedback').html('');$('.new-wishlist .has-danger .form-control-feedback').html(object_result.errors).fadeIn()}else{$('.new-wishlist .has-danger .form-control-feedback').html('');$('.new-wishlist .has-success .form-control-feedback').html(object_result.result.message).fadeIn();setTimeout(function(){$('.new-wishlist .has-success .form-control-feedback').fadeOut()},3000);$('#wishlist_name').val('');$('.list-wishlist table tbody').append(object_result.result.wishlist);$('html, body').animate({scrollTop:$('.list-wishlist table tr.new').offset().top},500,function(){$('.list-wishlist table tr.new').removeClass('new')});LeoListWishlistAction();$('.list-wishlist tr.show .view-wishlist-product').trigger('click')}
$('.leo-save-wishlist-bt-text').show();$('.leo-save-wishlist-loading').hide();object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}
return!1})});function createLeoWishlistModalPopup(){var leoWishlistModalPopup='';leoWishlistModalPopup+='<div class="modal leo-modal leo-modal-wishlist fade" tabindex="-1" role="dialog" aria-hidden="true">';leoWishlistModalPopup+='<div class="modal-dialog" role="document">';leoWishlistModalPopup+='<div class="modal-content">';leoWishlistModalPopup+='<div class="modal-header">';leoWishlistModalPopup+='<button type="button" class="close" data-dismiss="modal" aria-label="Close">';leoWishlistModalPopup+='<span aria-hidden="true">&times;</span>';leoWishlistModalPopup+='</button>';leoWishlistModalPopup+='<h5 class="modal-title text-xs-center">';leoWishlistModalPopup+='</h5>';leoWishlistModalPopup+='</div>';leoWishlistModalPopup+='<div class="modal-footer">';leoWishlistModalPopup+='<button type="button" class="btn btn-secondary" data-dismiss="modal">'+wishlist_cancel_txt+'</button>';leoWishlistModalPopup+='<button type="button" class="leo-modal-wishlist-bt btn btn-primary">';leoWishlistModalPopup+='<span class="leo-modal-wishlist-loading cssload-speeding-wheel"></span>';leoWishlistModalPopup+='<span class="leo-modal-wishlist-bt-text">';leoWishlistModalPopup+=wishlist_ok_txt;leoWishlistModalPopup+='</span>';leoWishlistModalPopup+='</button>';leoWishlistModalPopup+='</div>';leoWishlistModalPopup+='</div>';leoWishlistModalPopup+='</div>';leoWishlistModalPopup+='</div>';$('body').append(leoWishlistModalPopup)}
function LeoWishlistButtonAction(){if(!$('.leo-wishlist-button').hasClass('show-list')){$('.leo-wishlist-button').click(function(){if(!$('.leo-wishlist-button.active').length){var id_product=$(this).data('id-product');var id_wishlist=$(this).data('id-wishlist');var id_product_attribute=$(this).data('id-product-attribute');var content_wishlist_mess_remove=wishlist_remove+'. <a href="'+wishlist_url+'" target="_blank"><strong>'+wishlist_viewwishlist+'.</strong></a>';var content_wishlist_mess_add=wishlist_add+'. <a href="'+wishlist_url+'" target="_blank"><strong>'+wishlist_viewwishlist+'.</strong></a>';$(this).addClass('active');if(!isLogged){$('.leo-modal-wishlist .modal-title').html(wishlist_loggin_required);$('.leo-modal-wishlist').modal('show');return!1}
var object_e=$(this);object_e.find('.leo-wishlist-bt-loading').css({'display':'block'});object_e.find('.leo-wishlist-bt-content').hide();if($(this).hasClass('added')||$(this).hasClass('delete')){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"remove","id_product":id_product,"id_wishlist":id_wishlist,"id_product_attribute":id_product_attribute,"quantity":1,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').modal('show')}else{if($('.ap-btn-wishlist .ap-total-wishlist').length){var old_num_wishlist=parseInt($('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total'));var new_num_wishlist=old_num_wishlist-1;$('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total',new_num_wishlist);$('.ap-btn-wishlist .ap-total-wishlist').text(new_num_wishlist)}
if(object_e.hasClass('delete')){$('td.product-'+id_product).fadeOut(function(){$(this).remove()})}else{$('.leo-modal-wishlist .modal-title').html(content_wishlist_mess_remove);$('.leo-modal-wishlist').modal('show');$('.leo-wishlist-button[data-id-product='+id_product+']').removeClass('added');$('.leo-wishlist-button[data-id-product='+id_product+']').attr('title',buttonwishlist_title_add);object_e.find('.leo-wishlist-bt-loading').hide();object_e.find('.leo-wishlist-bt-content').show()}}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"add","id_product":id_product,"id_wishlist":id_wishlist,"id_product_attribute":id_product_attribute,"quantity":1,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').modal('show')}else{$('.leo-modal-wishlist .modal-title').html(content_wishlist_mess_add);$('.leo-modal-wishlist').modal('show');if($('.ap-btn-wishlist .ap-total-wishlist').length){var old_num_wishlist=parseInt($('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total'));var new_num_wishlist=old_num_wishlist+1;$('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total',new_num_wishlist);$('.ap-btn-wishlist .ap-total-wishlist').text(new_num_wishlist)}
if(id_wishlist==''){$('.leo-wishlist-button').data('id-wishlist',object_result.result.id_wishlist)}
$('.leo-wishlist-button[data-id-product='+id_product+']').addClass('added');$('.leo-wishlist-button[data-id-product='+id_product+']').attr('title',buttonwishlist_title_remove);object_e.find('.leo-wishlist-bt-loading').hide();object_e.find('.leo-wishlist-bt-content').show()}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}
return!1})}else{$('.wishlist-item').click(function(){if(!$('.wishlist-item.active-add').length){var id_product=$(this).data('id-product');var id_wishlist=$(this).data('id-wishlist');var id_product_attribute=$(this).data('id-product-attribute');var content_wishlist_mess_remove=wishlist_remove+'. <a href="'+wishlist_url+'" target="_blank"><strong>'+wishlist_viewwishlist+'.</strong></a>';var content_wishlist_mess_add=wishlist_add+'. <a href="'+wishlist_url+'" target="_blank"><strong>'+wishlist_viewwishlist+'.</strong></a>';$(this).addClass('active-add');if(!isLogged){$('.leo-modal-wishlist .modal-title').html(wishlist_loggin_required);$('.leo-modal-wishlist').modal('show');return!1}
var object_e=$(this);var parents_e=object_e.parents('.leo-wishlist-button-dropdown');parents_e.find('.leo-wishlist-button').addClass('active');parents_e.find('.leo-wishlist-bt-loading').css({'display':'block'});parents_e.find('.leo-wishlist-bt-content').hide();if($(this).hasClass('added')||$(this).hasClass('delete')){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"remove","id_product":id_product,"id_wishlist":id_wishlist,"id_product_attribute":id_product_attribute,"quantity":1,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').modal('show')}else{if($('.ap-btn-wishlist .ap-total-wishlist').length){var old_num_wishlist=parseInt($('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total'));var new_num_wishlist=old_num_wishlist-1;$('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total',new_num_wishlist);$('.ap-btn-wishlist .ap-total-wishlist').text(new_num_wishlist)}
if(object_e.hasClass('delete')){$('td.product-'+id_product).fadeOut(function(){$(this).remove()})}else{$('.leo-modal-wishlist .modal-title').html(content_wishlist_mess_remove);$('.leo-modal-wishlist').modal('show');$('.wishlist-item[data-id-wishlist='+id_wishlist+'][data-id-product='+id_product+']').removeClass('added');$('.wishlist-item[data-id-wishlist='+id_wishlist+'][data-id-product='+id_product+']').attr('title',buttonwishlist_title_add);if(!$('.wishlist-item[data-id-product='+id_product+']').hasClass('added')){$('.leo-wishlist-button[data-id-product='+id_product+']').removeClass('added')}
parents_e.find('.leo-wishlist-bt-loading').hide();parents_e.find('.leo-wishlist-bt-content').show();parents_e.find('.leo-wishlist-button').removeClass('active')}}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"add","id_product":id_product,"id_wishlist":id_wishlist,"id_product_attribute":id_product_attribute,"quantity":1,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').modal('show')}else{$('.leo-modal-wishlist .modal-title').html(content_wishlist_mess_add);$('.leo-modal-wishlist').modal('show');if($('.ap-btn-wishlist .ap-total-wishlist').length){var old_num_wishlist=parseInt($('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total'));var new_num_wishlist=old_num_wishlist+1;$('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total',new_num_wishlist);$('.ap-btn-wishlist .ap-total-wishlist').text(new_num_wishlist)}
$('.wishlist-item[data-id-wishlist='+id_wishlist+'][data-id-product='+id_product+']').addClass('added');$('.wishlist-item[data-id-wishlist='+id_wishlist+'][data-id-product='+id_product+']').attr('title',buttonwishlist_title_remove);if(!$('.leo-wishlist-button[data-id-product='+id_product+']').hasClass('added')){$('.leo-wishlist-button[data-id-product='+id_product+']').addClass('added')}
parents_e.find('.leo-wishlist-bt-loading').hide();parents_e.find('.leo-wishlist-bt-content').show();parents_e.find('.leo-wishlist-button').removeClass('active')}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}
return!1})}}
function LeoListWishlistAction(){$('.delete-wishlist').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');$(this).parents('tr').addClass('active');if($('.list-wishlist tr.active .default-wishlist').is(":checked")){$('.leo-modal-wishlist .modal-title').html(wishlist_del_default_txt);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.leo-modal-wishlist .modal-title').html(wishlist_confirm_del_txt);$('.leo-modal-wishlist').addClass('enable-action').modal('show')}}
return!1});$('.leo-modal-wishlist-bt').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');var object_e=$(this);var id_wishlist=$('.delete-wishlist.active').data('id-wishlist');$('.leo-modal-wishlist-bt-text').hide();$('.leo-modal-wishlist-loading').css({'display':'block'});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"delete-wishlist","id_wishlist":id_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{var object_delete=$('.list-wishlist tr.active');$('.leo-modal-wishlist').modal('hide');object_delete.fadeOut(function(){if($(this).hasClass('show')){$('.leo-wishlist-product').fadeOut().html('')}else{$('.list-wishlist tr.show .view-wishlist-product').trigger('click')}
$(this).remove()})}
$('.leo-modal-wishlist-loading').hide();$('.leo-modal-wishlist-bt-text').show();object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}})
$('.default-wishlist').click(function(){if($(this).is(":checked")){if(!$('.default-wishlist.active').length){$(this).addClass('active');var object_e=$(this);var id_wishlist=$('.default-wishlist.active').data('id-wishlist');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"default-wishlist","id_wishlist":id_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.default-wishlist:checked').removeAttr('checked');object_e.prop('checked',!0)}
object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}
return!1})
$('.view-wishlist-product').click(function(){if(!$('.view-wishlist-product.active').length){$(this).addClass('active');$(this).next('.leo-view-wishlist-product-loading').show();$('.list-wishlist tr.show').removeClass('show');$(this).parents('tr').addClass('show');var object_e=$(this);var id_wishlist=$(this).data('id-wishlist');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"show-wishlist-product","id_wishlist":id_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.leo-wishlist-product').hide();$('.leo-wishlist-product').html(object_result.result.html).fadeIn();if(object_result.result.show_send_wishlist){$('.send-wishlist').fadeIn();if(!$('.leo-modal-send-wishlist').length){createLeoSendWishlistModalPopup();LeoListWishlistProductModalAction()}else{$('.leo-modal-reset-send-wishlist-bt').trigger('click')}
LeoListWishlistProductAction()}else{$('.send-wishlist').hide()}
refeshWishlist(id_wishlist)}
object_e.removeClass('active');object_e.next('.leo-view-wishlist-product-loading').hide()},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
return!1})}
function LeoListWishlistProductModalAction(){$('.leo-send-wishlist-button').click(function(){var name_wishlist=$('.list-wishlist tr.show .view-wishlist-product').data('name-wishlist');$('.leo-modal-send-wishlist .modal-title').html(wishlist_send_wishlist_txt+' "'+name_wishlist+'"');$('.leo-modal-send-wishlist').modal('show');return!1})
$('.leo-modal-send-wishlist').submit(function(){if($('.leo-fake-send-wishlist-button').hasClass('validate-ok')){return!1}});$('.leo-modal-send-wishlist-bt').click(function(){if(!$(this).hasClass('active')){var check_submit_wishlist=!0;var list_email=[];$(this).addClass('active');var object_e=$(this);$('.leo-modal-reset-send-wishlist-bt').fadeOut();$('.wishlist_email').each(function(key,val){if($(this).val()!==''&&!$(this).parents('.form-group').hasClass('has-success')&&!$(this).parents('.form-group').hasClass('has-warning')){if(!validateEmail($(this).val())){$(this).parents('.form-group').addClass('leo-has-error');check_submit_wishlist=!1}else{$(this).parents('.form-group').removeClass('leo-has-error');list_email.push(key)}}})
if(check_submit_wishlist){if(list_email.length==0){$('.wishlist_email').each(function(key,val){if($(this).val()==''){$(this).parents('.form-group').addClass('leo-has-error');$(this).attr("required","");return!1}})
object_e.removeClass('active');$('.leo-modal-reset-send-wishlist-bt').fadeIn()}else{$('.leo-fake-send-wishlist-button').addClass('validate-ok');var id_wishlist=$('.list-wishlist tr.show .view-wishlist-product').data('id-wishlist');$('.leo-modal-send-wishlist-bt-text').hide();$('.leo-modal-send-wishlist-loading').css({'display':'block'});$.each(list_email,function(key,val){var index_wishlist_email=val+1;var email=$('#wishlist_email_'+index_wishlist_email).val();var object_parent_e=$('#wishlist_email_'+index_wishlist_email).parents('.form-group');object_parent_e.find('.wishlist_email_status_loading').show();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"send-wishlist","id_wishlist":id_wishlist,"email":email,"token":leo_token},success:function(result){object_parent_e.find('.wishlist_email_status_loading').hide();var object_result=$.parseJSON(result);if(object_result.errors.length){object_parent_e.addClass('has-warning').find('.send_wishlist_error').fadeIn()}else{object_parent_e.addClass('has-success').find('.send_wishlist_success').fadeIn()}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})});$(document).ajaxStop(function(){$('.leo-modal-send-wishlist-loading').hide();$('.leo-modal-send-wishlist-bt-text').show();$('.leo-fake-send-wishlist-button').removeClass('validate-ok');object_e.removeClass('active');$('.leo-modal-reset-send-wishlist-bt').fadeIn()})}
if($('.form-send-wishlist .form-group.leo-has-error').length){$('.leo-fake-send-wishlist-button').trigger('click')}}else{object_e.removeClass('active');$('.leo-modal-reset-send-wishlist-bt').fadeIn();$('.leo-fake-send-wishlist-button').trigger('click')}}})
$('.leo-modal-reset-send-wishlist-bt').click(function(){$('.wishlist_email').val('').removeAttr('required');$('.send_wishlist_form_content .form-group').removeClass('leo-has-error has-success has-warning');$('.wishlist_email_status_loading').fadeOut();$('.send_wishlist_msg').fadeOut()})}
function LeoListWishlistProductAction(){$('.leo-wishlist-button-delete').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');var object_e=$(this);var object_parent_e=object_e.parents('.leo-wishlist-product');var id_wishlist_product=$(this).data('id-wishlist-product');var id_wishlist=$(this).data('id-wishlist');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"delete-wishlist-product","id_wishlist":id_wishlist,"id_wishlist_product":id_wishlist_product,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{object_e.parents('.leo-wishlistproduct-item').fadeOut(function(){$(this).remove();if(!object_parent_e.find('.leo-wishlistproduct-item').length){$('.send-wishlist').hide();$('.list-wishlist tr.show .view-wishlist-product').trigger('click')}})
refeshWishlist(id_wishlist)}
object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
return!1})
$('.leo-wishlist-product-save-button').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');var object_e=$(this);var id_wishlist_product=$(this).data('id-wishlist-product');var id_wishlist=$(this).data('id-wishlist');var quantity=$('.wishlist-product-quantity-'+id_wishlist_product).val();var priority=$('.wishlist-product-priority-'+id_wishlist_product).val();if(Math.floor(quantity)==quantity&&$.isNumeric(quantity)&&quantity>0){$('.wishlist-product-quantity-'+id_wishlist_product).parents('.form-group').removeClass('has-error');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"update-wishlist-product","id_wishlist":id_wishlist,"id_wishlist_product":id_wishlist_product,"quantity":quantity,"priority":priority,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.leo-wishlistproduct-item-'+id_wishlist_product).hide();$('.leo-wishlistproduct-item-'+id_wishlist_product).fadeIn();refeshWishlist(id_wishlist)}
object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$('.wishlist-product-quantity-'+id_wishlist_product).parents('.form-group').addClass('has-error');$('.leo-modal-wishlist .modal-title').html(wishlist_quantity_required);$('.leo-modal-wishlist').removeClass('enable-action').modal('show');object_e.removeClass('active')}}
return!1})
$('.move-wishlist-item').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');var object_e=$(this);var object_parent_e=object_e.parents('.leo-wishlist-product');var id_wishlist_product=$(this).data('id-wishlist-product');var id_product=$(this).data('id-product');var id_product_attribute=$(this).data('id-product-attribute');var id_old_wishlist=$('.list-wishlist tr.show .view-wishlist-product').data('id-wishlist');var id_new_wishlist=$(this).data('id-wishlist');var priority=$('.wishlist-product-priority-'+id_wishlist_product).val();var quantity=$('.wishlist-product-quantity-'+id_wishlist_product).val();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"move-wishlist-product","id_new_wishlist":id_new_wishlist,"id_wishlist_product":id_wishlist_product,"id_old_wishlist":id_old_wishlist,"id_product":id_product,"id_product_attribute":id_product_attribute,"quantity":quantity,"priority":priority,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{object_e.parents('.leo-wishlistproduct-item').fadeOut(function(){$(this).remove();if(!object_parent_e.find('.leo-wishlistproduct-item').length){$('.send-wishlist').hide();$('.list-wishlist tr.show .view-wishlist-product').trigger('click')}});refeshWishlist(id_new_wishlist);refeshWishlist(id_old_wishlist)}
object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
return!1})}
function activeEventModalWishlist(){$('.leo-modal-wishlist').on('hide.bs.modal',function(e){resetButtonAction()})
$('.leo-modal-wishlist').on('hidden.bs.modal',function(e){$('body').css('padding-right','')})
$('.leo-modal-wishlist').on('show.bs.modal',function(e){if($('.quickview.modal').length){$('.quickview.modal').modal('hide')}})}
function resetButtonAction(){if($('.leo-wishlist-button.active').length){$('.leo-wishlist-button.active').removeClass('active')}
if($('.wishlist-item.active-add').length){$('.wishlist-item.active-add').removeClass('active-add')}
$('.default-wishlist.active').removeClass('active');$('.delete-wishlist.active').removeClass('active');$('.list-wishlist tr.active').removeClass('active')}
function createLeoSendWishlistModalPopup(){var leoSendWishlistModalPopup='';leoSendWishlistModalPopup+='<div class="modal leo-modal leo-modal-send-wishlist fade" tabindex="-1" role="dialog" aria-hidden="true">';leoSendWishlistModalPopup+='<div class="modal-dialog" role="document">';leoSendWishlistModalPopup+='<div class="modal-content">';leoSendWishlistModalPopup+='<div class="modal-header">';leoSendWishlistModalPopup+='<button type="button" class="close" data-dismiss="modal" aria-label="Close">';leoSendWishlistModalPopup+='<span aria-hidden="true">&times;</span>';leoSendWishlistModalPopup+='</button>';leoSendWishlistModalPopup+='<h5 class="modal-title text-xs-center">';leoSendWishlistModalPopup+='</h5>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='<div class="modal-body">';leoSendWishlistModalPopup+='<div class="send_wishlist_form_content">';leoSendWishlistModalPopup+='<form class="form-send-wishlist" action="#" method="post">'
for(var $i=1;$i<=10;$i++){leoSendWishlistModalPopup+='<div class="form-group row">';leoSendWishlistModalPopup+='<label class="col-form-label col-sm-2 text-sm-left" for="wishlist_email_'+$i+'">'+wishlist_email_txt+' '+$i+'</label>';leoSendWishlistModalPopup+='<div class="wishlist_email_status col-sm-1">';leoSendWishlistModalPopup+='<div class="wishlist_email_status_loading cssload-speeding-wheel">';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='<i class="send_wishlist_msg send_wishlist_success material-icons">&#xE876;</i>';leoSendWishlistModalPopup+='<i class="send_wishlist_msg send_wishlist_error material-icons">&#xE033;</i>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='<div class="col-sm-9">';leoSendWishlistModalPopup+='<input class="form-control wishlist_email" id="wishlist_email_'+$i+'" name="wishlist_email_'+$i+'" type="email">';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>'}
leoSendWishlistModalPopup+='<button class="btn btn-primary form-control-submit leo-fake-send-wishlist-button pull-xs-right" type="submit"></button>';leoSendWishlistModalPopup+='</form>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='<div class="modal-footer">';leoSendWishlistModalPopup+='<button type="button" class="btn btn-primary leo-modal-reset-send-wishlist-bt">'+wishlist_reset_txt+'</button>';leoSendWishlistModalPopup+='<button type="button" class="btn btn-secondary" data-dismiss="modal">'+wishlist_cancel_txt+'</button>';leoSendWishlistModalPopup+='<button type="button" class="leo-modal-send-wishlist-bt btn btn-primary">';leoSendWishlistModalPopup+='<span class="leo-modal-send-wishlist-loading cssload-speeding-wheel"></span>';leoSendWishlistModalPopup+='<span class="leo-modal-send-wishlist-bt-text">';leoSendWishlistModalPopup+=wishlist_send_txt;leoSendWishlistModalPopup+='</span>';leoSendWishlistModalPopup+='</button>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>';$('body').append(leoSendWishlistModalPopup)}
function validateEmail(email){var reg=/^[a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z\p{L}0-9]+$/i;return reg.test(email)}
function refeshWishlist(id_wishlist){$('.leo-view-wishlist-product-loading-'+id_wishlist).show();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"get-wishlist-info","id_wishlist":id_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.wishlist-numberproduct-'+id_wishlist).html(object_result.result.number_product)}
$('.leo-view-wishlist-product-loading-'+id_wishlist).hide()},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})};(function(){$.fn.lofCountDown=function(options){return this.each(function(){new $.lofCountDown(this,options)})}
$.lofCountDown=function(obj,options){this.options=$.extend({autoStart:!0,LeadingZero:!0,DisplayFormat:"<div>%%D%% Days</div><div>%%H%% Hours</div><div>%%M%% Minutes</div><div>%%S%% Seconds</div>",FinishMessage:"Expired",CountActive:!0,TargetDate:null},options||{});if(this.options.TargetDate==null||this.options.TargetDate==''){return}
this.timer=null;this.element=obj;this.CountStepper=-1;this.CountStepper=Math.ceil(this.CountStepper);this.SetTimeOutPeriod=(Math.abs(this.CountStepper)-1)*1000+990;var dthen=new Date(this.options.TargetDate);var dnow=new Date();if(this.CountStepper>0){ddiff=new Date(dnow-dthen)}else{ddiff=new Date(dthen-dnow)}
gsecs=Math.floor(ddiff.valueOf()/1000);this.CountBack(gsecs,this)};$.lofCountDown.fn=$.lofCountDown.prototype;$.lofCountDown.fn.extend=$.lofCountDown.extend=$.extend;$.lofCountDown.fn.extend({calculateDate:function(secs,num1,num2){var s=((Math.floor(secs/num1))%num2).toString();if(this.options.LeadingZero&&s.length<2){s="0"+s}
return"<b>"+s+"</b>"},CountBack:function(secs,self){if(secs<0){return}
clearInterval(self.timer);DisplayStr=self.options.DisplayFormat.replace(/%%D%%/g,self.calculateDate(secs,86400,100000));DisplayStr=DisplayStr.replace(/%%H%%/g,self.calculateDate(secs,3600,24));DisplayStr=DisplayStr.replace(/%%M%%/g,self.calculateDate(secs,60,60));DisplayStr=DisplayStr.replace(/%%S%%/g,self.calculateDate(secs,1,60));self.element.innerHTML=DisplayStr;if(self.options.CountActive){self.timer=null;self.timer=setTimeout(function(){self.CountBack((secs+self.CountStepper),self)},(self.SetTimeOutPeriod))}}})})(jQuery);var ecmGa4={clearDatalayer:function(){if(typeof dataLayer==='undefined'){dataLayer=[]}
dataLayer.push({ecommerce:null})},orderPurchase:function(order){if(typeof dataLayer==='undefined'){dataLayer=[]}
var ecommerce={transactionId:order.transactionId,currency:order.currency,transactionAffiliation:'One Click Order',transactionTotal:order.transactionTotal,revenue:order.revenue,transactionProducts:order.transactionProducts,}
var toPush={event:'purchase',ecommerce:ecommerce,}
dataLayer.push(toPush)},addToCart:function(product_id,attribute_id,qtity,addedFromProductPage,callerElement){if(product_id){ecmGa4.pushProductToDatalayer('cart-add',product_id,attribute_id,qtity)}},removeFromCart:function(product_id,attribute_id,qtity){if(product_id){ecmGa4.pushProductToDatalayer('cart-remove',product_id,attribute_id,qtity)}},productClick:function(product_id,attribute_id){if(product_id){ecmGa4.pushProductToDatalayer('product-click',product_id,attribute_id)}},pushProductToDatalayer:function(action,product_id,attribute_id,qtity){attribute_id=attribute_id||0;qtity=qtity||1;var ecmga4req=new XMLHttpRequest();ecmga4req.onreadystatechange=function(){if(ecmga4req.readyState==4){if(ecmga4req.status==200){var datalayerJs=ecmga4req.responseText;try{let datalayerCartAction=JSON.parse(datalayerJs);ecmGa4.clearDatalayer();dataLayer.push(datalayerCartAction)}catch(e){console.log("[ECMGA4] error while parsing json")}}}};ecmga4req.open("GET",ajaxGetProductUrl+"?action="+action+"&id="+product_id+"&id_attribute="+attribute_id+"&qtity="+qtity,!0);ecmga4req.setRequestHeader('X-Requested-With','XMLHttpRequest');ecmga4req.send()},handleValidateShippingStep:function($submitBtn,event,ecmGa4Triggered,shippingName){if(typeof ecmGa4Triggered==='undefined'||!ecmGa4Triggered){event.preventDefault();try{dataLayer=dataLayer||[];let cloneDatalayer=JSON.parse(JSON.stringify(ecmDatalayer))
cloneDatalayer.event='add_shipping_info';cloneDatalayer.ecommerce.shipping_tier=shippingName;ecmGa4.clearDatalayer();dataLayer.push(cloneDatalayer)}catch(e){console.error(e)}
setTimeout(function(){$submitBtn.trigger('click',[1])},500)}}}
if(typeof(action)=='function'){var actionFunc=action;action=function(command,id,name,to_focus){actionFunc(command,id,name,to_focus);co=command.split(',');if(co[0]=='quantity_delete'){ipa=id.split('_');qtity=$('input[name=quantity_'+id+'_hidden]').val();ecmGa4.removeFromCart(ipa[0],ipa[1],qtity)}else if(co[0]=='quantity_down'){ipa=id.split('_');ecmGa4.removeFromCart(ipa[0],ipa[1],1)}else if(co[0]=='quantity_up'){ipa=id.split('_');ecmGa4.addToCart(ipa[0],ipa[1],1,null,null)}else if(co[0]=='set_quantity'){ipa=id.split('_');qtity=Number(ipa[2])-Number($('input[name=quantity_'+ipa[0]+'_'+ipa[1]+'_hidden]').prop("defaultValue"));if(qtity!=0){if(qtity<0){ecmGa4.removeFromCart(ipa[0],ipa[1],-qtity)}else{ecmGa4.addToCart(ipa[0],ipa[1],qtity,null,null)}}}}}
if(typeof(ecm_action)=='function'){var actionEcm=ecm_action;ecm_action=function(command,id_product,id_product_attribute,quantity){actionEcm(command,id_product,id_product_attribute,quantity);co=command.split(',');if(co[0]=='quantity_delete'){ecmGa4.removeFromCart(id_product,id_product_attribute,quantity)}else if(co[0]=='quantity_down'){ecmGa4.removeFromCart(id_product,id_product_attribute,1)}else if(co[0]=='quantity_up'){ecmGa4.addToCart(id_product,id_product_attribute,1,null,null)}else if(co[0]=='set_quantity'){qtity=Number(ipa[2])-Number($('input[name=quantity_'+ipa[0]+'_'+ipa[1]+'_hidden]').prop("defaultValue"));if(qtity!=0){if(qtity<0){ecmGa4.removeFromCart(id_product,id_product_attribute,-qtity)}else{ecmGa4.addToCart(id_product,id_product_attribute,qtity,null,null)}}}}}
if(typeof(ajaxCart)!='undefined'){var ajaxCartAddFunc=ajaxCart.add;ajaxCart.add=function(idProduct,idCombination,addedFromProductPage,callerElement,quantity,wishlist){ajaxCartAddFunc(idProduct,idCombination,addedFromProductPage,callerElement,quantity,wishlist);ecmGa4.addToCart(idProduct,idCombination,quantity,addedFromProductPage,callerElement)}
var ajaxCartRemoveFunc=ajaxCart.remove;ajaxCart.remove=function(idProduct,idCombination,customizationId,idAddressDelivery){ajaxCartRemoveFunc(idProduct,idCombination,customizationId,idAddressDelivery);ecmGa4.removeFromCart(idProduct,idCombination)}}else if(typeof(prestashop)!='undefined'){$(document).ready(function(){prestashop.on('updateCart',function(event){let requestData={};if(event&&event.reason){requestData={id_product_attribute:event.reason.idProductAttribute,id_product:event.reason.idProduct,action:event.reason.linkAction};let quantity=1;if(event.resp&&event.resp.quantity){quantity=event.resp.quantity}
if(requestData.action=='add-to-cart'){ecmGa4.addToCart(requestData.id_product,requestData.id_product_attribute,quantity,null,null)}else if(requestData.action=='delete-from-cart'){ecmGa4.removeFromCart(requestData.id_product,requestData.id_product_attribute,quantity)}}})})}
var deleteProductFromSummary=(function(id){var original_deleteProductFromSummary=deleteProductFromSummary;return function(id){var productId=0;var productAttributeId=0;var ids=0;ids=id.split('_');productId=parseInt(ids[0]);if(typeof(ids[1])!=='undefined'){productAttributeId=parseInt(ids[1])}
var cart_qtity=parseInt($('input[name=quantity_'+id+']').val());ecmGa4.removeFromCart(productId,productAttributeId,cart_qtity);original_deleteProductFromSummary(id)}})();var downQuantity=(function(id,qty){var original_downQuantity=downQuantity;return function(id,qty){var productId=0;var productAttributeId=0;var ids=0;ids=id.split('_');productId=parseInt(ids[0]);if(typeof(ids[1])!=='undefined'){productAttributeId=parseInt(ids[1])}
var val=$('input[name=quantity_'+id+']').val();var newVal=val;if(typeof(qty)=='undefined'||!qty){new_qty=1;newVal=val-1}else if(qty<0)
new_qty=-qty;if(newVal>0){ecmGa4.removeFromCart(productId,productAttributeId,new_qty)}
original_downQuantity(id,qty)}})();$(document).ready(function(){$('#checkout').on('click','#checkout-delivery-step button[type=submit]',function(e,ecmGa4Triggered){let $submitBtn=$(this);let $selectedShipping=$submitBtn.closest('#checkout-delivery-step').find('.delivery-options input[type=radio]:checked').closest('.delivery-option');let shippingName=$selectedShipping.find('.carrier-name').text();ecmGa4.handleValidateShippingStep($submitBtn,e,ecmGa4Triggered,shippingName)});$('#checkout').on('change','#checkout-payment-step input[type=radio][name=payment-option]',function(e,ecmGa4Triggered){let paymentName=$(this).closest('.payment-option').find('label').text().trim();dataLayer=dataLayer||[];let cloneDatalayer=JSON.parse(JSON.stringify(ecmDatalayer))
cloneDatalayer.event='add_payment_info';cloneDatalayer.ecommerce.payment_type=paymentName;ecmGa4.clearDatalayer();dataLayer.push(cloneDatalayer)});$('#order').on('click','button[name=processCarrier]',function(e,ecmGa4Triggered){let $submitBtn=$(this);let $selectedShipping=$submitBtn.closest('form[name=carrier_area]').find('.delivery_options input[type=radio]:checked').closest('.delivery_option');let shippingName=$selectedShipping.find('td:not(.delivery_option_radio):not(.delivery_option_logo):not(.delivery_option_price)').find('strong').text();ecmGa4.handleValidateShippingStep($submitBtn,e,ecmGa4Triggered,shippingName)});$('#order').on('click','#HOOK_PAYMENT .payment_module a',function(e,ecmGa4Triggered){let $submitBtn=$(this);e.preventDefault();try{dataLayer=dataLayer||[];let cloneDatalayer=JSON.parse(JSON.stringify(ecmDatalayer))
cloneDatalayer.event='add_payment_info';cloneDatalayer.ecommerce.payment_type=$submitBtn.attr('title');ecmGa4.clearDatalayer();dataLayer.push(cloneDatalayer)}catch(e){console.error(e)}
setTimeout(function(){window.location.href=$submitBtn.attr("href")},500)})});$(document).ready(function(){$('article[data-id-product]').find('a').on('click',function(){let $product=$(this).closest('article[data-id-product]');let idProduct=$product.data('id-product');let idProductAttribute=$product.data('id-product-attribute')|0;ecmGa4.productClick(idProduct,idProductAttribute)});$('.ajax_block_product').find('a.product-name,a.product_img_link,a.lnk_view,a.quick-view-mobile').on('click',function(e){let $productInfos=$(this).closest('.ajax_block_product').find('.ecmga4_product');let idProduct=$productInfos.data('id-product');let idProductAttribute=$productInfos.data('id-product-attribute')|0;ecmGa4.productClick(idProduct,idProductAttribute)})});/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
!function(a,b){function e(b,c){var d,e,g,h=b.nodeName.toLowerCase();return"area"===h?(d=b.parentNode,e=d.name,!(!b.href||!e||"map"!==d.nodeName.toLowerCase())&&(g=a("img[usemap=#"+e+"]")[0],!!g&&f(g))):(/input|select|textarea|button|object/.test(h)?!b.disabled:"a"===h?b.href||c:c)&&f(b)}function f(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}var c=0,d=/^ui-id-\d+$/;a.ui=a.ui||{},a.extend(a.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),scrollParent:function(){var b;return b=a.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.css(this,"position"))&&/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length)for(var e,f,d=a(this[0]);d.length&&d[0]!==document;){if(e=d.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(f=parseInt(d.css("zIndex"),10),!isNaN(f)&&0!==f))return f;d=d.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++c)})},removeUniqueId:function(){return this.each(function(){d.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return e(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var c=a.attr(b,"tabindex"),d=isNaN(c);return(d||c>=0)&&e(b,!d)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===d?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return"number"!=typeof b?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.support.selectstart="onselectstart"in document.createElement("div"),a.fn.extend({disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c){var d,e=a.plugins[b];if(e&&a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType)for(d=0;d<e.length;d++)a.options[e[d][0]]&&e[d][1].apply(a.element,c)}},hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0||(b[d]=1,e=b[d]>0,b[d]=0,e)}})}(jQuery),function(a,b){var c=0,d=Array.prototype.slice,e=a.cleanData;a.cleanData=function(b){for(var d,c=0;null!=(d=b[c]);c++)try{a(d).triggerHandler("remove")}catch(a){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var f,b=this._super,c=this._superApply;return this._super=a,this._superApply=e,f=d.apply(this,arguments),this._super=b,this._superApply=c,f}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){for(var h,i,e=d.call(arguments,1),f=0,g=e.length;f<g;f++)for(h in e[f])i=e[f][h],e[f].hasOwnProperty(h)&&i!==b&&(a.isPlainObject(i)?c[h]=a.isPlainObject(c[h])?a.widget.extend({},c[h],i):a.widget.extend({},i):c[h]=i);return c},a.widget.bridge=function(c,e){var f=e.prototype.widgetFullName||c;a.fn[c]=function(g){var h="string"==typeof g,i=d.call(arguments,1),j=this;return g=!h&&i.length?a.widget.extend.apply(null,[g].concat(i)):g,h?this.each(function(){var d,e=a.data(this,f);return e?a.isFunction(e[g])&&"_"!==g.charAt(0)?(d=e[g].apply(e,i),d!==e&&d!==b?(j=d&&d.jquery?j.pushStack(d.get()):d,!1):void 0):a.error("no such method '"+g+"' for "+c+" widget instance"):a.error("cannot call methods on "+c+" prior to initialization; attempted to call method '"+g+"'")}):this.each(function(){var b=a.data(this,f);b?b.option(g||{})._init():a.data(this,f,new e(g,this))}),j}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(b,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(c,d){var f,g,h,e=c;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof c)if(e={},f=c.split("."),c=f.shift(),f.length){for(g=e[c]=a.widget.extend({},this.options[c]),h=0;h<f.length-1;h++)g[f[h]]=g[f[h]]||{},g=g[f[h]];if(c=f.pop(),d===b)return g[c]===b?null:g[c];g[c]=d}else{if(d===b)return this.options[c]===b?null:this.options[c];e[c]=d}return this._setOptions(e),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!b).attr("aria-disabled",b),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){if(b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled"))return("string"==typeof g?f[g]:g).apply(f,arguments)}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^(\w+)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,a.unbind(b).undelegate(b)},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}})}(jQuery),function(a,b){var c=!1;a(document).mouseup(function(){c=!1}),a.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(!c){this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=1===b.which,f=!("string"!=typeof this.options.cancel||!b.target.nodeName)&&a(b.target).closest(this.options.cancel).length;return!(e&&!f&&this._mouseCapture(b))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(b)!==!1,!this._mouseStarted)?(b.preventDefault(),!0):(!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0))}},_mouseMove:function(b){return a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button?this._mouseUp(b):this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target===this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(a,b){a.widget("ui.draggable",a.ui.mouse,{version:"1.10.3",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||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;return!(this.helper||c.disabled||a(b.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(b),!!this.handle&&(a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0))},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_mouseDrag:function(b,c){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}return 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"),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,b)),this.dropped&&(d=this.dropped,this.dropped=!1),!("original"===this.options.helper&&!a.contains(this.element[0].ownerDocument,this.element[0]))&&("invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b)!==!1&&c._clear()}):this._trigger("stop",b)!==!1&&this._clear(),!1)},_mouseUp:function(b){return a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){return!this.options.handle||!!a(b.target).closest(this.element.find(this.options.handle)).length},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):"clone"===c.helper?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo("parent"===c.appendTo?this.element[0].parentNode:c.appendTo),d[0]===this.element[0]||/(fixed|absolute)/.test(d.css("position"))||d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){var b=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_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 b,c,d,e=this.options;return e.containment?"window"===e.containment?void(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===e.containment?void(this.containment=[0,0,a(document).width()-this.helperProportions.width-this.margins.left,(a(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):e.containment.constructor===Array?void(this.containment=e.containment):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),c=a(e.containment),d=c[0],void(d&&(b="hidden"!==c.css("overflow"),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c))):void(this.containment=null)},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"===b?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:e.scrollTop(),left:e.scrollLeft()}),{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*d}},_generatePosition:function(b){var c,d,e,f,g=this.options,h="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=b.pageX,j=b.pageY;return this.offset.scroll||(this.offset.scroll={top:h.scrollTop(),left:h.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(d=this.relative_container.offset(),c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]):c=this.containment,b.pageX-this.offset.click.left<c[0]&&(i=c[0]+this.offset.click.left),b.pageY-this.offset.click.top<c[1]&&(j=c[1]+this.offset.click.top),b.pageX-this.offset.click.left>c[2]&&(i=c[2]+this.offset.click.left),b.pageY-this.offset.click.top>c[3]&&(j=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f)),{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),"drag"===b&&(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("ui-draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"ui-sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,f))})},stop:function(b,c){var d=a(this).data("ui-draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,"original"===d.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("ui-draggable"),e=this;a.each(d.sortables,function(){var f=!1,g=this;this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(f=!0,a.each(d.sortables,function(){return this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this!==g&&this.instance._intersectsWith(this.instance.containerCache)&&a.contains(g.instance.element[0],this.instance.element[0])&&(f=!1),f})),f?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(){var b=a("body"),c=a(this).data("ui-draggable").options;b.css("cursor")&&(c._cursor=b.css("cursor")),b.css("cursor",c.cursor)},stop:function(){var b=a(this).data("ui-draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("ui-draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("ui-draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("ui-draggable");b.scrollParent[0]!==document&&"HTML"!==b.scrollParent[0].tagName&&(b.overflowOffset=b.scrollParent.offset())},drag:function(b){var c=a(this).data("ui-draggable"),d=c.options,e=!1;c.scrollParent[0]!==document&&"HTML"!==c.scrollParent[0].tagName?(d.axis&&"x"===d.axis||(c.overflowOffset.top+c.scrollParent[0].offsetHeight-b.pageY<d.scrollSensitivity?c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop+d.scrollSpeed:b.pageY-c.overflowOffset.top<d.scrollSensitivity&&(c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop-d.scrollSpeed)),d.axis&&"y"===d.axis||(c.overflowOffset.left+c.scrollParent[0].offsetWidth-b.pageX<d.scrollSensitivity?c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft+d.scrollSpeed:b.pageX-c.overflowOffset.left<d.scrollSensitivity&&(c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft-d.scrollSpeed))):(d.axis&&"x"===d.axis||(b.pageY-a(document).scrollTop()<d.scrollSensitivity?e=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<d.scrollSensitivity&&(e=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed))),d.axis&&"y"===d.axis||(b.pageX-a(document).scrollLeft()<d.scrollSensitivity?e=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<d.scrollSensitivity&&(e=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)))),e!==!1&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,b)}}),a.ui.plugin.add("draggable","snap",{start:function(){var b=a(this).data("ui-draggable"),c=b.options;b.snapElements=[],a(c.snap.constructor!==String?c.snap.items||":data(ui-draggable)":c.snap).each(function(){var c=a(this),d=c.offset();this!==b.element[0]&&b.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:d.top,left:d.left})})},drag:function(b,c){var d,e,f,g,h,i,j,k,l,m,n=a(this).data("ui-draggable"),o=n.options,p=o.snapTolerance,q=c.offset.left,r=q+n.helperProportions.width,s=c.offset.top,t=s+n.helperProportions.height;for(l=n.snapElements.length-1;l>=0;l--)h=n.snapElements[l].left,i=h+n.snapElements[l].width,j=n.snapElements[l].top,k=j+n.snapElements[l].height,r<h-p||q>i+p||t<j-p||s>k+p||!a.contains(n.snapElements[l].item.ownerDocument,n.snapElements[l].item)?(n.snapElements[l].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,b,a.extend(n._uiHash(),{snapItem:n.snapElements[l].item})),n.snapElements[l].snapping=!1):("inner"!==o.snapMode&&(d=Math.abs(j-t)<=p,e=Math.abs(k-s)<=p,f=Math.abs(h-r)<=p,g=Math.abs(i-q)<=p,d&&(c.position.top=n._convertPositionTo("relative",{top:j-n.helperProportions.height,left:0}).top-n.margins.top),e&&(c.position.top=n._convertPositionTo("relative",{top:k,left:0}).top-n.margins.top),f&&(c.position.left=n._convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left-n.margins.left),g&&(c.position.left=n._convertPositionTo("relative",{top:0,left:i}).left-n.margins.left)),m=d||e||f||g,"outer"!==o.snapMode&&(d=Math.abs(j-s)<=p,e=Math.abs(k-t)<=p,f=Math.abs(h-q)<=p,g=Math.abs(i-r)<=p,d&&(c.position.top=n._convertPositionTo("relative",{top:j,left:0}).top-n.margins.top),e&&(c.position.top=n._convertPositionTo("relative",{top:k-n.helperProportions.height,left:0}).top-n.margins.top),f&&(c.position.left=n._convertPositionTo("relative",{top:0,left:h}).left-n.margins.left),g&&(c.position.left=n._convertPositionTo("relative",{top:0,left:i-n.helperProportions.width}).left-n.margins.left)),!n.snapElements[l].snapping&&(d||e||f||g||m)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,b,a.extend(n._uiHash(),{snapItem:n.snapElements[l].item})),n.snapElements[l].snapping=d||e||f||g||m)}}),a.ui.plugin.add("draggable","stack",{start:function(){var b,c=this.data("ui-draggable").options,d=a.makeArray(a(c.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});d.length&&(b=parseInt(a(d[0]).css("zIndex"),10)||0,a(d).each(function(c){a(this).css("zIndex",b+c)}),this.css("zIndex",b+d.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("ui-draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("ui-draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})}(jQuery),function(a,b){function c(a,b,c){return a>b&&a<b+c}a.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var b=this.options,c=b.accept;this.isover=!1,this.isout=!0,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var b=0,c=a.ui.ddmanager.droppables[this.options.scope];b<c.length;b++)c[b]===this&&c.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(b,c){"accept"===b&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current,e=!1;return!(!d||(d.currentItem||d.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"ui-droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope===d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return e=!0,!1}),!e&&(!!this.accept.call(this.element[0],d.currentItem||d.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element)))},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.ui.intersect=function(a,b,d){if(!b.offset)return!1;var e,f,g=(a.positionAbs||a.position.absolute).left,h=g+a.helperProportions.width,i=(a.positionAbs||a.position.absolute).top,j=i+a.helperProportions.height,k=b.offset.left,l=k+b.proportions.width,m=b.offset.top,n=m+b.proportions.height;switch(d){case"fit":return k<=g&&h<=l&&m<=i&&j<=n;case"intersect":return k<g+a.helperProportions.width/2&&h-a.helperProportions.width/2<l&&m<i+a.helperProportions.height/2&&j-a.helperProportions.height/2<n;case"pointer":return e=(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,f=(a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,c(f,m,b.proportions.height)&&c(e,k,b.proportions.width);case"touch":return(i>=m&&i<=n||j>=m&&j<=n||i<m&&j>n)&&(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l);default:return!1}},a.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(b,c){var d,e,f=a.ui.ddmanager.droppables[b.options.scope]||[],g=c?c.type:null,h=(b.currentItem||b.element).find(":data(ui-droppable)").addBack();a:for(d=0;d<f.length;d++)if(!(f[d].options.disabled||b&&!f[d].accept.call(f[d].element[0],b.currentItem||b.element))){for(e=0;e<h.length;e++)if(h[e]===f[d].element[0]){f[d].proportions.height=0;continue a}f[d].visible="none"!==f[d].element.css("display"),f[d].visible&&("mousedown"===g&&f[d]._activate.call(f[d],c),f[d].offset=f[d].element.offset(),f[d].proportions={width:f[d].element[0].offsetWidth,height:f[d].element[0].offsetHeight})}},drop:function(b,c){var d=!1;return a.each((a.ui.ddmanager.droppables[b.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,c)))}),d},dragStart:function(b,c){b.element.parentsUntil("body").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var d,e,f,g=a.ui.intersect(b,this,this.options.tolerance),h=!g&&this.isover?"isout":g&&!this.isover?"isover":null;h&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return a.data(this,"ui-droppable").options.scope===e}),f.length&&(d=a.data(f[0],"ui-droppable"),d.greedyChild="isover"===h)),d&&"isover"===h&&(d.isover=!1,d.isout=!0,d._out.call(d,c)),this[h]=!0,this["isout"===h?"isover":"isout"]=!1,this["isover"===h?"_over":"_out"].call(this,c),d&&"isout"===h&&(d.isout=!1,d.isover=!0,d._over.call(d,c)))}})},dragStop:function(b,c){b.element.parentsUntil("body").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}}(jQuery),function(a,b){function c(a){return parseInt(a,10)||0}function d(a){return!isNaN(parseInt(a,10))}a.widget("ui.resizable",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,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},_create:function(){var b,c,d,e,f,g=this,h=this.options;if(this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({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.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=h.handles||(a(".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.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),b=this.handles.split(","),this.handles={},c=0;c<b.length;c++)d=a.trim(b[c]),f="ui-resizable-"+d,e=a("<div class='ui-resizable-handle "+f+"'></div>"),e.css({zIndex:h.zIndex}),"se"===d&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[d]=".ui-resizable-"+d,this.element.append(e);this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles)this.handles[c].constructor===String&&(this.handles[c]=a(this.handles[c],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(d=a(this.handles[c],this.element),f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),e=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(e,f),this._proportionallyResize()),a(this.handles[c]).length},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")}),h.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(a(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(a(this).addClass("ui-resizable-autohide"),g._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),this},_mouseCapture:function(b){var c,d,e=!1;for(c in this.handles)d=a(this.handles[c])[0],(d===b.target||a.contains(d,b.target))&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(b){var d,e,f,g=this.options,h=this.element.position(),i=this.element;return this.resizing=!0,/absolute/.test(i.css("position"))?i.css({position:"absolute",top:i.css("top"),left:i.css("left")}):i.is(".ui-draggable")&&i.css({position:"absolute",top:h.top,left:h.left}),this._renderProxy(),d=c(this.helper.css("left")),e=c(this.helper.css("top")),g.containment&&(d+=a(g.containment).scrollLeft()||0,e+=a(g.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:d,top:e},this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.originalPosition={left:d,top:e},this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof g.aspectRatio?g.aspectRatio:this.originalSize.width/this.originalSize.height||1,f=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===f?this.axis+"-resize":f),i.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,d=this.helper,e={},f=this.originalMousePosition,g=this.axis,h=this.position.top,i=this.position.left,j=this.size.width,k=this.size.height,l=b.pageX-f.left||0,m=b.pageY-f.top||0,n=this._change[g];return!!n&&(c=n.apply(this,[b,l,m]),this._updateVirtualBoundaries(b.shiftKey),(this._aspectRatio||b.shiftKey)&&(c=this._updateRatio(c,b)),c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),this.position.top!==h&&(e.top=this.position.top+"px"),this.position.left!==i&&(e.left=this.position.left+"px"),this.size.width!==j&&(e.width=this.size.width+"px"),this.size.height!==k&&(e.height=this.size.height+"px"),d.css(e),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(e)||this._trigger("resize",b,this.ui()),!1)},_mouseStop:function(b){this.resizing=!1;var c,d,e,f,g,h,i,j=this.options,k=this;return this._helper&&(c=this._proportionallyResizeElements,d=c.length&&/textarea/i.test(c[0].nodeName),e=d&&a.ui.hasScroll(c[0],"left")?0:k.sizeDiff.height,f=d?0:k.sizeDiff.width,g={width:k.helper.width()-f,height:k.helper.height()-e},h=parseInt(k.element.css("left"),10)+(k.position.left-k.originalPosition.left)||null,i=parseInt(k.element.css("top"),10)+(k.position.top-k.originalPosition.top)||null,j.animate||this.element.css(a.extend(g,{top:i,left:h})),k.helper.height(k.size.height),k.helper.width(k.size.width),this._helper&&!j.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(a){var b,c,e,f,g,h=this.options;g={minWidth:d(h.minWidth)?h.minWidth:0,maxWidth:d(h.maxWidth)?h.maxWidth:1/0,minHeight:d(h.minHeight)?h.minHeight:0,maxHeight:d(h.maxHeight)?h.maxHeight:1/0},(this._aspectRatio||a)&&(b=g.minHeight*this.aspectRatio,e=g.minWidth/this.aspectRatio,c=g.maxHeight*this.aspectRatio,f=g.maxWidth/this.aspectRatio,b>g.minWidth&&(g.minWidth=b),e>g.minHeight&&(g.minHeight=e),c<g.maxWidth&&(g.maxWidth=c),f<g.maxHeight&&(g.maxHeight=f)),this._vBoundaries=g},_updateCache:function(a){this.offset=this.helper.offset(),d(a.left)&&(this.position.left=a.left),d(a.top)&&(this.position.top=a.top),d(a.height)&&(this.size.height=a.height),d(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,e=this.axis;return d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===e&&(a.left=b.left+(c.width-a.width),a.top=null),"nw"===e&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,e=d(a.width)&&b.maxWidth&&b.maxWidth<a.width,f=d(a.height)&&b.maxHeight&&b.maxHeight<a.height,g=d(a.width)&&b.minWidth&&b.minWidth>a.width,h=d(a.height)&&b.minHeight&&b.minHeight>a.height,i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,k=/sw|nw|w/.test(c),l=/nw|ne|n/.test(c);return g&&(a.width=b.minWidth),h&&(a.height=b.minHeight),e&&(a.width=b.maxWidth),f&&(a.height=b.maxHeight),g&&k&&(a.left=i-b.minWidth),e&&k&&(a.left=i-b.maxWidth),h&&l&&(a.top=j-b.minHeight),f&&l&&(a.top=j-b.maxHeight),a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null,a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var a,b,c,d,e,f=this.helper||this.element;for(a=0;a<this._proportionallyResizeElements.length;a++){if(e=this._proportionallyResizeElements[a],!this.borderDif)for(this.borderDif=[],c=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],d=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")],b=0;b<c.length;b++)this.borderDif[b]=(parseInt(c[b],10)||0)+(parseInt(d[b],10)||0);e.css({height:f.height()-this.borderDif[0]-this.borderDif[2]||0,width:f.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset(),this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),"resize"!==b&&this._trigger(b,c,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}}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).data("ui-resizable"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,k=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};e&&e.length&&a(e[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var b,d,e,f,g,h,i,j=a(this).data("ui-resizable"),k=j.options,l=j.element,m=k.containment,n=m instanceof a?m.get(0):/parent/.test(m)?l.parent().get(0):m;n&&(j.containerElement=a(n),/document/.test(m)||m===document?(j.containerOffset={left:0,top:0},j.containerPosition={left:0,top:0},j.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(n),d=[],a(["Top","Right","Left","Bottom"]).each(function(a,e){d[a]=c(b.css("padding"+e))}),j.containerOffset=b.offset(),j.containerPosition=b.position(),j.containerSize={height:b.innerHeight()-d[3],width:b.innerWidth()-d[1]},e=j.containerOffset,f=j.containerSize.height,g=j.containerSize.width,h=a.ui.hasScroll(n,"left")?n.scrollWidth:g,i=a.ui.hasScroll(n)?n.scrollHeight:f,j.parentData={element:n,left:e.left,top:e.top,width:h,height:i}))},resize:function(b){var c,d,e,f,g=a(this).data("ui-resizable"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement;m[0]!==document&&/static/.test(m.css("position"))&&(l=i),j.left<(g._helper?i.left:0)&&(g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left),k&&(g.size.height=g.size.width/g.aspectRatio),g.position.left=h.helper?i.left:0),j.top<(g._helper?i.top:0)&&(g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top),k&&(g.size.width=g.size.height*g.aspectRatio),g.position.top=g._helper?i.top:0),g.offset.left=g.parentData.left+g.position.left,g.offset.top=g.parentData.top+g.position.top,c=Math.abs((g._helper?g.offset.left-l.left:g.offset.left-l.left)+g.sizeDiff.width),d=Math.abs((g._helper?g.offset.top-l.top:g.offset.top-i.top)+g.sizeDiff.height),e=g.containerElement.get(0)===g.element.parent().get(0),f=/relative|absolute/.test(g.containerElement.css("position")),e&&f&&(c-=g.parentData.left),c+g.size.width>=g.parentData.width&&(g.size.width=g.parentData.width-c,k&&(g.size.height=g.size.width/g.aspectRatio)),d+g.size.height>=g.parentData.height&&(g.size.height=g.parentData.height-d,k&&(g.size.width=g.size.height*g.aspectRatio))},stop:function(){var b=a(this).data("ui-resizable"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j}),b._helper&&!c.animate&&/static/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).data("ui-resizable"),c=b.options,d=function(b){a(b).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};"object"!=typeof c.alsoResize||c.alsoResize.parentNode?d(c.alsoResize):c.alsoResize.length?(c.alsoResize=c.alsoResize[0],d(c.alsoResize)):a.each(c.alsoResize,function(a){d(a)})},resize:function(b,c){var d=a(this).data("ui-resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("ui-resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&&c>=0&&(f[b]=c||null)}),b.css(f)})};"object"!=typeof e.alsoResize||e.alsoResize.nodeType?i(e.alsoResize):a.each(e.alsoResize,function(a,b){i(a,b)})},stop:function(){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).data("ui-resizable"),c=b.options,d=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof c.ghost?c.ghost:""),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).data("ui-resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).data("ui-resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b=a(this).data("ui-resizable"),c=b.options,d=b.size,e=b.originalSize,f=b.originalPosition,g=b.axis,h="number"==typeof c.grid?[c.grid,c.grid]:c.grid,i=h[0]||1,j=h[1]||1,k=Math.round((d.width-e.width)/i)*i,l=Math.round((d.height-e.height)/j)*j,m=e.width+k,n=e.height+l,o=c.maxWidth&&c.maxWidth<m,p=c.maxHeight&&c.maxHeight<n,q=c.minWidth&&c.minWidth>m,r=c.minHeight&&c.minHeight>n;c.grid=h,q&&(m+=i),r&&(n+=j),o&&(m-=i),p&&(n-=j),/^(se|s|e)$/.test(g)?(b.size.width=m,b.size.height=n):/^(ne)$/.test(g)?(b.size.width=m,b.size.height=n,b.position.top=f.top-l):/^(sw)$/.test(g)?(b.size.width=m,b.size.height=n,b.position.left=f.left-k):(b.size.width=m,b.size.height=n,b.position.top=f.top-l,b.position.left=f.left-k)}})}(jQuery),function(a,b){a.widget("ui.selectable",a.ui.mouse,{version:"1.10.3",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 b,c=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){b=a(c.options.filter,c.element[0]),b.addClass("ui-selectee"),b.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=b.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(b){var c=this,d=this.options;this.opos=[b.pageX,b.pageY],this.options.disabled||(this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.pageX,top:b.pageY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,b.metaKey||b.ctrlKey||(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().addBack().each(function(){var d,e=a.data(this,"selectable-item");if(e)return d=!b.metaKey&&!b.ctrlKey||!e.$element.hasClass("ui-selected"),e.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting"),e.unselecting=!d,e.selecting=d,e.selected=d,d?c._trigger("selecting",b,{selecting:e.element}):c._trigger("unselecting",b,{unselecting:e.element}),!1}))},_mouseDrag:function(b){if(this.dragged=!0,!this.options.disabled){var c,d=this,e=this.options,f=this.opos[0],g=this.opos[1],h=b.pageX,i=b.pageY;return f>h&&(c=h,h=f,f=c),g>i&&(c=i,i=g,g=c),this.helper.css({left:f,top:g,width:h-f,height:i-g}),this.selectees.each(function(){var c=a.data(this,"selectable-item"),j=!1;c&&c.element!==d.element[0]&&("touch"===e.tolerance?j=!(c.left>h||c.right<f||c.top>i||c.bottom<g):"fit"===e.tolerance&&(j=c.left>f&&c.right<h&&c.top>g&&c.bottom<i),j?(c.selected&&(c.$element.removeClass("ui-selected"),c.selected=!1),c.unselecting&&(c.$element.removeClass("ui-unselecting"),c.unselecting=!1),c.selecting||(c.$element.addClass("ui-selecting"),c.selecting=!0,d._trigger("selecting",b,{selecting:c.element}))):(c.selecting&&((b.metaKey||b.ctrlKey)&&c.startselected?(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.$element.addClass("ui-selected"),c.selected=!0):(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.startselected&&(c.$element.addClass("ui-unselecting"),c.unselecting=!0),d._trigger("unselecting",b,{unselecting:c.element}))),c.selected&&(b.metaKey||b.ctrlKey||c.startselected||(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,d._trigger("unselecting",b,{unselecting:c.element})))))}),!1}},_mouseStop:function(b){var c=this;return this.dragged=!1,a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),!1}})}(jQuery),function(a,b){function c(a,b,c){return a>b&&a<b+c}function d(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))}a.widget("ui.sortable",a.ui.mouse,{version:"1.10.3",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},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===a.axis||d(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){"disabled"===b?(this.options[b]=c,this.widget().toggleClass("ui-sortable-disabled",!!c)):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=null,e=!1,f=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(b),a(b.target).parents().each(function(){if(a.data(this,f.widgetName+"-item")===f)return d=a(this),!1}),a.data(b.target,f.widgetName+"-item")===f&&(d=a(b.target)),!!d&&(!(this.options.handle&&!c&&(a(this.options.handle,d).find("*").addBack().each(function(){this===b.target&&(e=!0)}),!e))&&(this.currentItem=d,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(b,c,d){var e,f,g=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),g.containment&&this._setContainment(),g.cursor&&"auto"!==g.cursor&&(f=this.document.find("body"),this.storedCursor=f.css("cursor"),f.css("cursor",g.cursor),this.storedStylesheet=a("<style>*{ cursor: "+g.cursor+" !important; }</style>").appendTo(f)),g.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",g.opacity)),g.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",g.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!d)for(e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("activate",b,this._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){var c,d,e,f,g=this.options,h=!1;for(this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<g.scrollSensitivity?this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop+g.scrollSpeed:b.pageY-this.overflowOffset.top<g.scrollSensitivity&&(this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop-g.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<g.scrollSensitivity?this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft+g.scrollSpeed:b.pageX-this.overflowOffset.left<g.scrollSensitivity&&(this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft-g.scrollSpeed)):(b.pageY-a(document).scrollTop()<g.scrollSensitivity?h=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<g.scrollSensitivity&&(h=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)),b.pageX-a(document).scrollLeft()<g.scrollSensitivity?h=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<g.scrollSensitivity&&(h=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed))),h!==!1&&a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)),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"),c=this.items.length-1;c>=0;c--)if(d=this.items[c],e=d.item[0],f=this._intersectsWithPointer(d),f&&d.instance===this.currentContainer&&!(e===this.currentItem[0]||this.placeholder[1===f?"next":"prev"]()[0]===e||a.contains(this.placeholder[0],e)||"semi-dynamic"===this.options.type&&a.contains(this.element[0],e))){if(this.direction=1===f?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(d))break;this._rearrange(b,d),this._trigger("change",b,this._uiHash());break}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(b){if(a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b),this.options.revert){var d=this,e=this.placeholder.offset(),f=this.options.axis,g={};f&&"x"!==f||(g.left=e.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),f&&"y"!==f||(g.top=e.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,a(this.helper).animate(g,parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--)this.containers[b]._trigger("deactivate",null,this._uiHash(this)),this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",null,this._uiHash(this)),this.containers[b].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(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[\-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l="x"===this.options.axis||d+j>h&&d+j<i,m="y"===this.options.axis||b+k>f&&b+k<g,n=l&&m;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?n:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(a){var b="x"===this.options.axis||c(this.positionAbs.top+this.offset.click.top,a.top,a.height),d="y"===this.options.axis||c(this.positionAbs.left+this.offset.click.left,a.left,a.width),e=b&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return!!e&&(this.floating?g&&"right"===g||"down"===f?2:1:f&&("down"===f?2:1))},_intersectsWithSides:function(a){var b=c(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height),d=c(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?"right"===f&&d||"left"===f&&!d:e&&("down"===e&&b||"up"===e&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!==a&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return 0!==a&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c,d,e,f,g=[],h=[],i=this._connectWith();if(i&&b)for(c=i.length-1;c>=0;c--)for(e=a(i[c]),d=e.length-1;d>=0;d--)f=a.data(e[d],this.widgetFullName),f&&f!==this&&!f.options.disabled&&h.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),f]);for(h.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),c=h.length-1;c>=0;c--)h[c][0].each(function(){g.push(this)});return a(g)},_removeCurrentsFromItems:function(){var b=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=a.grep(this.items,function(a){for(var c=0;c<b.length;c++)if(b[c]===a.item[0])return!1;return!0})},_refreshItems:function(b){this.items=[],this.containers=[this];var c,d,e,f,g,h,i,j,k=this.items,l=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],m=this._connectWith();if(m&&this.ready)for(c=m.length-1;c>=0;c--)for(e=a(m[c]),d=e.length-1;d>=0;d--)f=a.data(e[d],this.widgetFullName),f&&f!==this&&!f.options.disabled&&(l.push([a.isFunction(f.options.items)?f.options.items.call(f.element[0],b,{item:this.currentItem}):a(f.options.items,f.element),f]),this.containers.push(f));for(c=l.length-1;c>=0;c--)for(g=l[c][1],h=l[c][0],d=0,j=h.length;d<j;d++)i=a(h[d]),i.data(this.widgetName+"-item",g),k.push({item:i,instance:g,width:0,height:0,left:0,top:0})},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var c,d,e,f;for(c=this.items.length-1;c>=0;c--)d=this.items[c],d.instance!==this.currentContainer&&this.currentContainer&&d.item[0]!==this.currentItem[0]||(e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item,b||(d.width=e.outerWidth(),d.height=e.outerHeight()),f=e.offset(),d.left=f.left,d.top=f.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=this.containers.length-1;c>=0;c--)f=this.containers[c].element.offset(),this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight();return this},_createPlaceholder:function(b){b=b||this;var c,d=b.options;d.placeholder&&d.placeholder.constructor!==String||(c=d.placeholder,d.placeholder={element:function(){var d=b.currentItem[0].nodeName.toLowerCase(),e=a("<"+d+">",b.document[0]).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===d?b.currentItem.children().each(function(){a("<td>&#160;</td>",b.document[0]).attr("colspan",a(this).attr("colspan")||1).appendTo(e)}):"img"===d&&e.attr("src",b.currentItem.attr("src")),c||e.css("visibility","hidden"),e},update:function(a,e){c&&!d.forcePlaceholderSize||(e.height()||e.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10)))}}),b.placeholder=a(d.placeholder.element.call(b.element,b.currentItem)),b.currentItem.after(b.placeholder),d.placeholder.update(b,b.placeholder)},_contactContainers:function(b){var e,f,g,h,i,j,k,l,m,n,o=null,p=null;for(e=this.containers.length-1;e>=0;e--)if(!a.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(o&&a.contains(this.containers[e].element[0],o.element[0]))continue;o=this.containers[e],p=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0);if(o)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",b,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(g=1e4,h=null,n=o.floating||d(this.currentItem),i=n?"left":"top",j=n?"width":"height",k=this.positionAbs[i]+this.offset.click[i],f=this.items.length-1;f>=0;f--)a.contains(this.containers[p].element[0],this.items[f].item[0])&&this.items[f].item[0]!==this.currentItem[0]&&(n&&!c(this.positionAbs.top+this.offset.click.top,this.items[f].top,this.items[f].height)||(l=this.items[f].item.offset()[i],m=!1,Math.abs(l-k)>Math.abs(l+this.items[f][j]-k)&&(m=!0,l+=this.items[f][j]),Math.abs(l-k)<g&&(g=Math.abs(l-k),h=this.items[f],this.direction=m?"up":"down")));if(!h&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return;h?this._rearrange(b,h,null,!0):this._rearrange(b,null,this.containers[p].element,!0),this._trigger("change",b,this._uiHash()),this.containers[p]._trigger("change",b,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",b,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):"clone"===c.helper?this.currentItem.clone():this.currentItem;return d.parents("body").length||a("parent"!==c.appendTo?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[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")}),d[0].style.width&&!c.forceHelperSize||d.width(this.currentItem.width()),d[0].style.height&&!c.forceHelperSize||d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{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 b,c,d,e=this.options;"parent"===e.containment&&(e.containment=this.helper[0].parentNode),"document"!==e.containment&&"window"!==e.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a("document"===e.containment?document:window).width()-this.helperProportions.width-this.margins.left,(a("document"===e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(e.containment)||(b=a(e.containment)[0],c=a(e.containment).offset(),d="hidden"!==a(b).css("overflow"),this.containment=[c.left+(parseInt(a(b).css("borderLeftWidth"),10)||0)+(parseInt(a(b).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(b).css("borderTopWidth"),10)||0)+(parseInt(a(b).css("paddingTop"),10)||0)-this.margins.top,c.left+(d?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(a(b).css("borderLeftWidth"),10)||0)-(parseInt(a(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(d?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(a(b).css("borderTopWidth"),10)||0)-(parseInt(a(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"===b?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*d}},_generatePosition:function(b){var c,d,e=this.options,f=b.pageX,g=b.pageY,h="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(h[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top)),e.grid&&(c=this.originalPageY+Math.round((g-this.originalPageY)/e.grid[1])*e.grid[1],g=this.containment?c-this.offset.click.top>=this.containment[1]&&c-this.offset.click.top<=this.containment[3]?c:c-this.offset.click.top>=this.containment[1]?c-e.grid[1]:c+e.grid[1]:c,d=this.originalPageX+Math.round((f-this.originalPageX)/e.grid[0])*e.grid[0],f=this.containment?d-this.offset.click.left>=this.containment[0]&&d-this.offset.click.left<=this.containment[2]?d:d-this.offset.click.left>=this.containment[0]?d-e.grid[0]:d+e.grid[0]:d)),{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():i?0:h.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():i?0:h.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this.counter;this._delay(function(){e===this.counter&&this.refreshPositions(!d)})},_clear:function(a,b){this.reverting=!1;var c,d=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(c in this._storedCSS)"auto"!==this._storedCSS[c]&&"static"!==this._storedCSS[c]||(this._storedCSS[c]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!b&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||b||d.push(function(a){this._trigger("update",a,this._uiHash())}),this!==this.currentContainer&&(b||(d.push(function(a){this._trigger("remove",a,this._uiHash())}),d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer)))),c=this.containers.length-1;c>=0;c--)b||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[c])),this.containers[c].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[c])),this.containers[c].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!b){for(this._trigger("beforeStop",a,this._uiHash()),c=0;c<d.length;c++)d[c].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!1}if(b||this._trigger("beforeStop",a,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!b){for(c=0;c<d.length;c++)d[c].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}})}(jQuery),function(a,b){var c="ui-effects-";a.effects={effect:{}},function(a,b){function m(a,b,c){var d=h[b.type]||{};return null==a?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function n(b){var c=f(),d=c._rgba=[];return b=b.toLowerCase(),l(e,function(a,e){var f,h=e.re.exec(b),i=h&&e.parse(h),j=e.space||"rgba";if(i)return f=c[j](i),c[g[j].cache]=f[g[j].cache],d=c._rgba=f._rgba,!1}),d.length?("0,0,0,0"===d.join()&&a.extend(d,k.transparent),c):k[b]}function o(a,b,c){return c=(c+1)%1,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a}var k,c="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",d=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],f=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},g={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"}}}},h={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},i=f.support={},j=a("<p>")[0],l=a.each;j.style.cssText="background-color:rgba(1,1,1,.5)",i.rgba=j.style.backgroundColor.indexOf("rgba")>-1,l(g,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),f.fn=a.extend(f.prototype,{parse:function(c,d,e,h){if(c===b)return this._rgba=[null,null,null,null],this;(c.jquery||c.nodeType)&&(c=a(c).css(d),d=b);var i=this,j=a.type(c),o=this._rgba=[];return d!==b&&(c=[c,d,e,h],j="array"),"string"===j?this.parse(n(c)||k._default):"array"===j?(l(g.rgba.props,function(a,b){o[b.idx]=m(c[b.idx],b)}),this):"object"===j?(c instanceof f?l(g,function(a,b){c[b.cache]&&(i[b.cache]=c[b.cache].slice())}):l(g,function(b,d){var e=d.cache;l(d.props,function(a,b){if(!i[e]&&d.to){if("alpha"===a||null==c[a])return;i[e]=d.to(i._rgba)}i[e][b.idx]=m(c[a],b,!0)}),i[e]&&a.inArray(null,i[e].slice(0,3))<0&&(i[e][3]=1,d.from&&(i._rgba=d.from(i[e])))}),this):void 0},is:function(a){var b=f(a),c=!0,d=this;return l(g,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],l(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]})),c}),c},_space:function(){var a=[],b=this;return l(g,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var c=f(a),d=c._space(),e=g[d],i=0===this.alpha()?f("transparent"):this,j=i[e.cache]||e.to(i._rgba),k=j.slice();return c=c[e.cache],l(e.props,function(a,d){var e=d.idx,f=j[e],g=c[e],i=h[d.type]||{};null!==g&&(null===f?k[e]=g:(i.mod&&(g-f>i.mod/2?f+=i.mod:f-g>i.mod/2&&(f-=i.mod)),k[e]=m((g-f)*b+f,d)))}),this[d](k)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=f(b)._rgba;return f(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&b<3&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),f.fn.parse.prototype=f.fn,g.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var k,l,b=a[0]/255,c=a[1]/255,d=a[2]/255,e=a[3],f=Math.max(b,c,d),g=Math.min(b,c,d),h=f-g,i=f+g,j=.5*i;return k=g===f?0:b===f?60*(c-d)/h+360:c===f?60*(d-b)/h+120:60*(b-c)/h+240,l=0===h?0:j<=.5?h/i:h/(2-i),[Math.round(k)%360,l,j,null==e?1:e]},g.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],e=a[3],f=d<=.5?d*(1+c):d+c-d*c,g=2*d-f;return[Math.round(255*o(g,f,b+1/3)),Math.round(255*o(g,f,b)),Math.round(255*o(g,f,b-1/3)),e]},l(g,function(c,e){var g=e.props,h=e.cache,i=e.to,j=e.from;f.fn[c]=function(c){if(i&&!this[h]&&(this[h]=i(this._rgba)),c===b)return this[h].slice();var d,e=a.type(c),k="array"===e||"object"===e?c:arguments,n=this[h].slice();return l(g,function(a,b){var c=k["object"===e?a:b.idx];null==c&&(c=n[b.idx]),n[b.idx]=m(c,b)}),j?(d=f(j(n)),d[h]=n,d):f(n)},l(g,function(b,e){f.fn[b]||(f.fn[b]=function(f){var k,g=a.type(f),h="alpha"===b?this._hsla?"hsla":"rgba":c,i=this[h](),j=i[e.idx];return"undefined"===g?j:("function"===g&&(f=f.call(this,j),g=a.type(f)),null==f&&e.empty?this:("string"===g&&(k=d.exec(f),k&&(f=j+parseFloat(k[2])*("+"===k[1]?1:-1))),i[e.idx]=f,this[h](i)))})})}),f.hook=function(b){var c=b.split(" ");l(c,function(b,c){a.cssHooks[c]={set:function(b,d){var e,g,h="";if("transparent"!==d&&("string"!==a.type(d)||(e=n(d)))){if(d=f(e||d),!i.rgba&&1!==d._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(a){}d=d.blend(h&&"transparent"!==h?h:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(a){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=f(b.elem,c),b.end=f(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},f.hook(c),a.cssHooks.borderColor={expand:function(a){var b={};return l(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},k=a.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"}}(jQuery),function(){function e(b){var c,d,e=b.ownerDocument.defaultView?b.ownerDocument.defaultView.getComputedStyle(b,null):b.currentStyle,f={};if(e&&e.length&&e[0]&&e[e[0]])for(d=e.length;d--;)c=e[d],"string"==typeof e[c]&&(f[a.camelCase(c)]=e[c]);else for(c in e)"string"==typeof e[c]&&(f[c]=e[c]);return f}function f(b,c){var f,g,e={};for(f in c)g=c[f],b[f]!==g&&(d[f]||!a.fx.step[f]&&isNaN(parseFloat(g))||(e[f]=g));return e}var c=["add","remove","toggle"],d={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,c){a.fx.step[c]=function(a){("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)&&(jQuery.style(a.elem,c,a.end),a.setAttr=!0)}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a.effects.animateClass=function(b,d,g,h){var i=a.speed(d,g,h);return this.queue(function(){var h,d=a(this),g=d.attr("class")||"",j=i.children?d.find("*").addBack():d;j=j.map(function(){var b=a(this);return{el:b,start:e(this)}}),h=function(){a.each(c,function(a,c){b[c]&&d[c+"Class"](b[c])})},h(),j=j.map(function(){return this.end=e(this.el[0]),this.diff=f(this.start,this.end),this}),d.attr("class",g),j=j.map(function(){var b=this,c=a.Deferred(),d=a.extend({},i,{queue:!1,complete:function(){c.resolve(b)}});return this.el.animate(this.diff,d),c.promise()}),a.when.apply(a,j.get()).done(function(){h(),a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})}),i.complete.call(d[0])})})},a.fn.extend({addClass:function(b){return function(c,d,e,f){return d?a.effects.animateClass.call(this,{add:c},d,e,f):b.apply(this,arguments)}}(a.fn.addClass),removeClass:function(b){return function(c,d,e,f){return arguments.length>1?a.effects.animateClass.call(this,{remove:c},d,e,f):b.apply(this,arguments)}}(a.fn.removeClass),toggleClass:function(c){return function(d,e,f,g,h){return"boolean"==typeof e||e===b?f?a.effects.animateClass.call(this,e?{add:d}:{remove:d},f,g,h):c.apply(this,arguments):a.effects.animateClass.call(this,{toggle:d},e,f,g)}}(a.fn.toggleClass),switchClass:function(b,c,d,e,f){return a.effects.animateClass.call(this,{add:c,remove:b},d,e,f)}})}(),function(){function d(b,c,d,e){return a.isPlainObject(b)&&(c=b,b=b.effect),b={effect:b},null==c&&(c={}),a.isFunction(c)&&(e=c,d=null,c={}),("number"==typeof c||a.fx.speeds[c])&&(e=d,d=c,c={}),a.isFunction(d)&&(e=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:"number"==typeof d?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=e||c.complete,b}function e(b){return!(b&&"number"!=typeof b&&!a.fx.speeds[b])||("string"==typeof b&&!a.effects.effect[b]||(!!a.isFunction(b)||"object"==typeof b&&!b.effect))}a.extend(a.effects,{version:"1.10.3",save:function(a,b){for(var d=0;d<b.length;d++)null!==b[d]&&a.data(c+b[d],a[0].style[b[d]])},restore:function(a,d){var e,f;for(f=0;f<d.length;f++)null!==d[f]&&(e=a.data(c+d[f]),e===b&&(e=""),a.css(d[f],e))},setMode:function(a,b){return"toggle"===b&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),float:b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(a){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(){function g(c){function h(){a.isFunction(e)&&e.call(d[0]),a.isFunction(c)&&c()}var d=a(this),e=b.complete,g=b.mode;(d.is(":hidden")?"hide"===g:"show"===g)?(d[g](),h()):f.call(d[0],b,h)}var b=d.apply(this,arguments),c=b.mode,e=b.queue,f=a.effects.effect[b.effect];return a.fx.off||!f?c?this[c](b.duration,b.complete):this.each(function(){b.complete&&b.complete.call(this)}):e===!1?this.each(g):this.queue(e||"fx",g)},show:function(a){return function(b){if(e(b))return a.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="show",this.effect.call(this,c)}}(a.fn.show),hide:function(a){return function(b){if(e(b))return a.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="hide",this.effect.call(this,c)}}(a.fn.hide),toggle:function(a){return function(b){if(e(b)||"boolean"==typeof b)return a.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="toggle",this.effect.call(this,c)}}(a.fn.toggle),cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}})}(),function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,c){b[c]=function(b){return Math.pow(b,a+2)}}),a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),a.each(b,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(2*a)/2:1-c(a*-2+2)/2}})}()}(jQuery),function(a,b){var c=0,d={},e={};d.height=d.paddingTop=d.paddingBottom=d.borderTopWidth=d.borderBottomWidth="hide",e.height=e.paddingTop=e.paddingBottom=e.borderTopWidth=e.borderBottomWidth="show",a.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var b=this.options;this.prevShow=this.prevHide=a(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),b.collapsible||b.active!==!1&&null!=b.active||(b.active=0),this._processPanels(),b.active<0&&(b.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():a(),content:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),a=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){return"active"===a?void this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"!==a||b||this.options.active!==!1||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),void("disabled"===a&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b)))},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:f=this.headers[0];break;case c.END:f=this.headers[d-1]}f&&(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b=this.options;this._processPanels(),b.active===!1&&b.collapsible===!0||!this.headers.length?(b.active=!1,this.active=a()):b.active===!1?this._activate(0):this.active.length&&!a.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(b.active=!1,this.active=a()):this._activate(Math.max(0,b.active-1)):b.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var b,d=this.options,e=d.heightStyle,f=this.element.parent(),g=this.accordionId="ui-accordion-"+(this.element.attr("id")||++c);this.active=this._findActive(d.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(b){var c=a(this),d=c.attr("id"),e=c.next(),f=e.attr("id");d||(d=g+"-header-"+b,c.attr("id",d)),f||(f=g+"-panel-"+b,e.attr("id",f)),c.attr("aria-controls",f),e.attr("aria-labelledby",d)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(d.event),"fill"===e?(b=f.height(),this.element.siblings(":visible").each(function(){var c=a(this),d=c.css("position");"absolute"!==d&&"fixed"!==d&&(b-=c.outerHeight(!0))}),this.headers.each(function(){b-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===e&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).css("height","").height())}).height(b))},_activate:function(b){var c=this._findActive(b)[0];c!==this.active[0]&&(c=c||this.active[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return"number"==typeof b?this.headers.eq(b):a()},_setupEvents:function(b){var c={keydown:"_keydown"};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,c),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e[0]===d[0],g=f&&c.collapsible,h=g?a():e.next(),i=d.next(),j={oldHeader:d,oldPanel:i,newHeader:g?a():e,newPanel:h};b.preventDefault(),f&&!c.collapsible||this._trigger("beforeActivate",b,j)===!1||(c.active=!g&&this.headers.index(e),this.active=f?a():e,this._toggle(j),d.removeClass("ui-accordion-header-active ui-state-active"),c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),f||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),c.icons&&e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=c,this.prevHide=d,this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b)),d.attr({"aria-expanded":"false","aria-hidden":"true"}),d.prev().attr("aria-selected","false"),c.length&&d.length?d.prev().attr("tabIndex",-1):c.length&&this.headers.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),c.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(a,b,c){var f,g,h,i=this,j=0,k=a.length&&(!b.length||a.index()<b.index()),l=this.options.animate||{},m=k&&l.down||l,n=function(){i._toggleComplete(c)};return"number"==typeof m&&(h=m),"string"==typeof m&&(g=m),g=g||m.easing||l.easing,h=h||m.duration||l.duration,b.length?a.length?(f=a.show().outerHeight(),b.animate(d,{duration:h,easing:g,step:function(a,b){b.now=Math.round(a)}}),void a.hide().animate(e,{duration:h,easing:g,complete:n,step:function(a,c){c.now=Math.round(a),"height"!==c.prop?j+=c.now:"content"!==i.options.heightStyle&&(c.now=Math.round(f-b.outerHeight()-j),j=0)}})):b.animate(d,h,g,n):a.animate(e,h,g,n)},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),b.length&&(b.parent()[0].className=b.parent()[0].className),this._trigger("activate",null,a)}})}(jQuery),function(a,b){var c=0;a.widget("ui.autocomplete",{version:"1.10.3",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},pending:0,_create:function(){var b,c,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,g="input"===e;this.isMultiLine=!!f||!g&&this.element.prop("isContentEditable"),this.valueMethod=this.element[f||g?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))return b=!0,d=!0,void(c=!0);b=!1,d=!1,c=!1;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b=!0,this._move("previousPage",e);break;case f.PAGE_DOWN:b=!0,this._move("nextPage",e);break;case f.UP:b=!0,this._keyEvent("previous",e);break;case f.DOWN:b=!0,this._keyEvent("next",e);break;case f.ENTER:case f.NUMPAD_ENTER:this.menu.active&&(b=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(e),e.preventDefault());break;default:c=!0,this._searchTimeout(e)}},keypress:function(d){if(b)return b=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||d.preventDefault());if(!c){var e=a.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){return d?(d=!1,void a.preventDefault()):void this._searchTimeout(a)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),void this._change(a))}}),this._initSource(),this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(b){b.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var c=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(d){d.target===b.element[0]||d.target===c||a.contains(c,d.target)||b.close()})})},menufocus:function(b,c){if(this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)});var d=c.item.data("ui-autocomplete-item");!1!==this._trigger("focus",b,{item:d})?b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(d.value):this.liveRegion.text(d.value)},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d,this.selectedItem=c})),!1!==this._trigger("select",a,{item:c})&&this._value(c.value),this.term=this._value(),this.close(a),this.selectedItem=c}}),this.liveRegion=a("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b),"source"===a&&this._initSource(),"appendTo"===a&&this.menu.element.appendTo(this._appendTo()),"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_initSource:function(){var b,c,d=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(c,d){d(a.ui.autocomplete.filter(b,c.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(b,e){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){e(a)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){return a=null!=a?a:this._value(),this.term=this._value(),a.length<this.options.minLength?this.close(b):this._trigger("search",b)!==!1?this._search(a):void 0},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){a&&(a=this._normalize(a)),this._trigger("response",null,{content:a}),!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0,this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return"string"==typeof b?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty();this._renderMenu(c,b),this.isNewMenu=!0,this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItemData(b,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,c){return a("<li>").append(a("<a>").text(c.label)).appendTo(b)},_move:function(a,b){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)?(this._value(this.term),void this.menu.blur()):void this.menu[a](b):void this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(a,b),b.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(a){var b;this._superApply(arguments),this.options.disabled||this.cancelSearch||(b=a&&a.length?this.options.messages.results(a.length):this.options.messages.noResults,this.liveRegion.text(b))}})}(jQuery),function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this);setTimeout(function(){b.find(":ui-button").button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);return c&&(c=c.replace(/'/g,"\\'"),e=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,j),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i="checkbox"===this.type||"radio"===this.type,l=i?"":"ui-state-active",m="ui-state-focus";null===h.label&&(h.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(g).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){h.disabled||this===c&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){h.disabled||a(this).removeClass(l)}).bind("click"+this.eventNamespace,function(a){h.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){b.buttonElement.addClass(m)}).bind("blur"+this.eventNamespace,function(){b.buttonElement.removeClass(m)}),i&&(this.element.bind("change"+this.eventNamespace,function(){f||b.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(a){h.disabled||(f=!1,d=a.pageX,e=a.pageY)}).bind("mouseup"+this.eventNamespace,function(a){h.disabled||d===a.pageX&&e===a.pageY||(f=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(h.disabled||f)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(h.disabled||f)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!h.disabled&&(a(this).addClass("ui-state-active"),c=this,void b.document.one("mouseup",function(){c=null}))}).bind("mouseup"+this.eventNamespace,function(){return!h.disabled&&void a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){return!h.disabled&&void(b.keyCode!==a.ui.keyCode.SPACE&&b.keyCode!==a.ui.keyCode.ENTER||a(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",h.disabled),this._resetButton()},_determineButtonType:function(){var a,b,c;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){return this._super(a,b),"disabled"===a?void(b?this.element.prop("disabled",!0):this.element.prop("disabled",!1)):void this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b),"radio"===this.type?k(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var b=this.buttonElement.removeClass(i),c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b),this._super(a,b)},refresh:function(){var b="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(a,b){function e(){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:""},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,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},a.extend(this._defaults,this.regional[""]),this.dpDiv=f(a("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function f(b){var c="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return b.delegate(c,"mouseout",function(){a(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).removeClass("ui-datepicker-next-hover")}).delegate(c,"mouseover",function(){a.datepicker._isDisabledDatepicker(d.inline?b.parent()[0]:d.input[0])||(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),a(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).addClass("ui-datepicker-next-hover"))})}function g(b,c){a.extend(b,c);for(var d in c)null==c[d]&&(b[d]=c[d]);return b}a.extend(a.ui,{datepicker:{version:"1.10.3"}});var d,c="datepicker";a.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return g(this._defaults,a||{}),this},_attachDatepicker:function(b,c){var d,e,f;d=b.nodeName.toLowerCase(),e="div"===d||"span"===d,b.id||(this.uuid+=1,b.id="dp"+this.uuid),f=this._newInst(a(b),e),f.settings=a.extend({},c||{}),"input"===d?this._connectDatepicker(b,f):e&&this._inlineDatepicker(b,f)},_newInst:function(b,c){var d=b[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:d,input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:c,dpDiv:c?f(a("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(b,d){var e=a(b);d.append=a([]),d.trigger=a([]),e.hasClass(this.markerClassName)||(this._attachments(e,d),e.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(d),a.data(b,c,d),d.settings.disabled&&this._disableDatepicker(b))},_attachments:function(b,c){var d,e,f,g=this._get(c,"appendText"),h=this._get(c,"isRTL");c.append&&c.append.remove(),g&&(c.append=a("<span class='"+this._appendClass+"'>"+g+"</span>"),b[h?"before":"after"](c.append)),b.unbind("focus",this._showDatepicker),c.trigger&&c.trigger.remove(),d=this._get(c,"showOn"),"focus"!==d&&"both"!==d||b.focus(this._showDatepicker),"button"!==d&&"both"!==d||(e=this._get(c,"buttonText"),f=this._get(c,"buttonImage"),c.trigger=a(this._get(c,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:f,alt:e,title:e}):a("<button type='button'></button>").addClass(this._triggerClass).html(f?a("<img/>").attr({src:f,alt:e,title:e}):e)),b[h?"before":"after"](c.trigger),c.trigger.click(function(){return a.datepicker._datepickerShowing&&a.datepicker._lastInput===b[0]?a.datepicker._hideDatepicker():a.datepicker._datepickerShowing&&a.datepicker._lastInput!==b[0]?(a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(b[0])):a.datepicker._showDatepicker(b[0]),!1}))},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,d,e,f=new Date(2009,11,20),g=this._get(a,"dateFormat");g.match(/[DM]/)&&(b=function(a){for(c=0,d=0,e=0;e<a.length;e++)a[e].length>c&&(c=a[e].length,d=e);return d},f.setMonth(b(this._get(a,g.match(/MM/)?"monthNames":"monthNamesShort"))),f.setDate(b(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())),a.input.attr("size",this._formatDate(a,f).length)}},_inlineDatepicker:function(b,d){var e=a(b);e.hasClass(this.markerClassName)||(e.addClass(this.markerClassName).append(d.dpDiv),a.data(b,c,d),this._setDate(d,this._getDefaultDate(d),!0),this._updateDatepicker(d),this._updateAlternate(d),d.settings.disabled&&this._disableDatepicker(b),d.dpDiv.css("display","block"))},_dialogDatepicker:function(b,d,e,f,h){var i,j,k,l,m,n=this._dialogInst;return n||(this.uuid+=1,i="dp"+this.uuid,this._dialogInput=a("<input type='text' id='"+i+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),n=this._dialogInst=this._newInst(this._dialogInput,!1),n.settings={},a.data(this._dialogInput[0],c,n)),g(n.settings,f||{}),d=d&&d.constructor===Date?this._formatDate(n,d):d,this._dialogInput.val(d),this._pos=h?h.length?h:[h.pageX,h.pageY]:null,this._pos||(j=document.documentElement.clientWidth,k=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,m=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[j/2-100+l,k/2-150+m]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),n.settings.onSelect=e,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],c,n),this},_destroyDatepicker:function(b){var d,e=a(b),f=a.data(b,c);e.hasClass(this.markerClassName)&&(d=b.nodeName.toLowerCase(),a.removeData(b,c),"input"===d?(f.append.remove(),f.trigger.remove(),e.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==d&&"span"!==d||e.removeClass(this.markerClassName).empty())},_enableDatepicker:function(b){var d,e,f=a(b),g=a.data(b,c);f.hasClass(this.markerClassName)&&(d=b.nodeName.toLowerCase(),"input"===d?(b.disabled=!1,g.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==d&&"span"!==d||(e=f.children("."+this._inlineClass),e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}))},_disableDatepicker:function(b){var d,e,f=a(b),g=a.data(b,c);f.hasClass(this.markerClassName)&&(d=b.nodeName.toLowerCase(),"input"===d?(b.disabled=!0,g.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==d&&"span"!==d||(e=f.children("."+this._inlineClass),e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}),this._disabledInputs[this._disabledInputs.length]=b)},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]===a)return!0;return!1},_getInst:function(b){try{return a.data(b,c)}catch(a){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(c,d,e){var f,h,i,j,k=this._getInst(c);return 2===arguments.length&&"string"==typeof d?"defaults"===d?a.extend({},a.datepicker._defaults):k?"all"===d?a.extend({},k.settings):this._get(k,d):null:(f=d||{},"string"==typeof d&&(f={},f[d]=e),void(k&&(this._curInst===k&&this._hideDatepicker(),h=this._getDateDatepicker(c,!0),i=this._getMinMaxDate(k,"min"),j=this._getMinMaxDate(k,"max"),g(k.settings,f),null!==i&&f.dateFormat!==b&&f.minDate===b&&(k.settings.minDate=this._formatDate(k,i)),null!==j&&f.dateFormat!==b&&f.maxDate===b&&(k.settings.maxDate=this._formatDate(k,j)),"disabled"in f&&(f.disabled?this._disableDatepicker(c):this._enableDatepicker(c)),this._attachments(a(c),k),this._autoSize(k),this._setDate(k,h),this._updateAlternate(k),this._updateDatepicker(k))))},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(b){var c,d,e,f=a.datepicker._getInst(b.target),g=!0,h=f.dpDiv.is(".ui-datepicker-rtl");if(f._keyEvent=!0,a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker(),g=!1;break;case 13:return e=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",f.dpDiv),e[0]&&a.datepicker._selectDay(b.target,f.selectedMonth,f.selectedYear,e[0]),c=a.datepicker._get(f,"onSelect"),c?(d=a.datepicker._formatDate(f),c.apply(f.input?f.input[0]:null,[d,f])):a.datepicker._hideDatepicker(),!1;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 35:(b.ctrlKey||b.metaKey)&&a.datepicker._clearDate(b.target),g=b.ctrlKey||b.metaKey;break;case 36:(b.ctrlKey||b.metaKey)&&a.datepicker._gotoToday(b.target),g=b.ctrlKey||b.metaKey;break;case 37:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?1:-1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 38:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,-7,"D"),g=b.ctrlKey||b.metaKey;break;case 39:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?-1:1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 40:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,7,"D"),g=b.ctrlKey||b.metaKey;break;default:g=!1}else 36===b.keyCode&&b.ctrlKey?a.datepicker._showDatepicker(this):g=!1;g&&(b.preventDefault(),b.stopPropagation())},_doKeyPress:function(b){var c,d,e=a.datepicker._getInst(b.target);if(a.datepicker._get(e,"constrainInput"))return c=a.datepicker._possibleChars(a.datepicker._get(e,"dateFormat")),d=String.fromCharCode(null==b.charCode?b.keyCode:b.charCode),b.ctrlKey||b.metaKey||d<" "||!c||c.indexOf(d)>-1},_doKeyUp:function(b){var c,d=a.datepicker._getInst(b.target);if(d.input.val()!==d.lastVal)try{c=a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.datepicker._getFormatConfig(d)),c&&(a.datepicker._setDateFromField(d),a.datepicker._updateAlternate(d),a.datepicker._updateDatepicker(d))}catch(a){}return!0},_showDatepicker:function(b){if(b=b.target||b,"input"!==b.nodeName.toLowerCase()&&(b=a("input",b.parentNode)[0]),!a.datepicker._isDisabledDatepicker(b)&&a.datepicker._lastInput!==b){var c,d,e,f,h,i,j;c=a.datepicker._getInst(b),a.datepicker._curInst&&a.datepicker._curInst!==c&&(a.datepicker._curInst.dpDiv.stop(!0,!0),c&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])),d=a.datepicker._get(c,"beforeShow"),e=d?d.apply(b,[b,c]):{},e!==!1&&(g(c.settings,e),c.lastVal=null,a.datepicker._lastInput=b,a.datepicker._setDateFromField(c),a.datepicker._inDialog&&(b.value=""),a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(b),a.datepicker._pos[1]+=b.offsetHeight),f=!1,a(b).parents().each(function(){return f|="fixed"===a(this).css("position"),!f}),h={left:a.datepicker._pos[0],top:a.datepicker._pos[1]},a.datepicker._pos=null,c.dpDiv.empty(),c.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),a.datepicker._updateDatepicker(c),h=a.datepicker._checkOffset(c,h,f),c.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":f?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),c.inline||(i=a.datepicker._get(c,"showAnim"),j=a.datepicker._get(c,"duration"),c.dpDiv.zIndex(a(b).zIndex()+1),a.datepicker._datepickerShowing=!0,a.effects&&a.effects.effect[i]?c.dpDiv.show(i,a.datepicker._get(c,"showOptions"),j):c.dpDiv[i||"show"](i?j:null),a.datepicker._shouldFocusInput(c)&&c.input.focus(),a.datepicker._curInst=c))}},_updateDatepicker:function(b){this.maxRows=4,d=b,b.dpDiv.empty().append(this._generateHTML(b)),this._attachHandlers(b),b.dpDiv.find("."+this._dayOverClass+" a").mouseover();var c,e=this._getNumberOfMonths(b),f=e[1],g=17;b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&b.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),b.dpDiv[(1!==e[0]||1!==e[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),b===a.datepicker._curInst&&a.datepicker._datepickerShowing&&a.datepicker._shouldFocusInput(b)&&b.input.focus(),b.yearshtml&&(c=b.yearshtml,setTimeout(function(){c===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml),c=b.yearshtml=null},0))},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(b,c,d){var e=b.dpDiv.outerWidth(),f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,h=b.input?b.input.outerHeight():0,i=document.documentElement.clientWidth+(d?0:a(document).scrollLeft()),j=document.documentElement.clientHeight+(d?0:a(document).scrollTop());return c.left-=this._get(b,"isRTL")?e-g:0,c.left-=d&&c.left===b.input.offset().left?a(document).scrollLeft():0,c.top-=d&&c.top===b.input.offset().top+h?a(document).scrollTop():0,c.left-=Math.min(c.left,c.left+e>i&&i>e?Math.abs(c.left+e-i):0),c.top-=Math.min(c.top,c.top+f>j&&j>f?Math.abs(f+h):0),c},_findPos:function(b){for(var c,d=this._getInst(b),e=this._get(d,"isRTL");b&&("hidden"===b.type||1!==b.nodeType||a.expr.filters.hidden(b));)b=b[e?"previousSibling":"nextSibling"];return c=a(b).offset(),[c.left,c.top]},_hideDatepicker:function(b){var d,e,f,g,h=this._curInst;!h||b&&h!==a.data(b,c)||this._datepickerShowing&&(d=this._get(h,"showAnim"),e=this._get(h,"duration"),f=function(){a.datepicker._tidyDialog(h)},a.effects&&(a.effects.effect[d]||a.effects[d])?h.dpDiv.hide(d,a.datepicker._get(h,"showOptions"),e,f):h.dpDiv["slideDown"===d?"slideUp":"fadeIn"===d?"fadeOut":"hide"](d?e:null,f),d||f(),this._datepickerShowing=!1,g=this._get(h,"onClose"),g&&g.apply(h.input?h.input[0]:null,[h.input?h.input.val():"",h]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){var c=a(b.target),d=a.datepicker._getInst(c[0]);(c[0].id===a.datepicker._mainDivId||0!==c.parents("#"+a.datepicker._mainDivId).length||c.hasClass(a.datepicker.markerClassName)||c.closest("."+a.datepicker._triggerClass).length||!a.datepicker._datepickerShowing||a.datepicker._inDialog&&a.blockUI)&&(!c.hasClass(a.datepicker.markerClassName)||a.datepicker._curInst===d)||a.datepicker._hideDatepicker()}},_adjustDate:function(b,c,d){var e=a(b),f=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(f,c+("M"===d?this._get(f,"showCurrentAtPos"):0),d),this._updateDatepicker(f))},_gotoToday:function(b){var c,d=a(b),e=this._getInst(d[0]);this._get(e,"gotoCurrent")&&e.currentDay?(e.selectedDay=e.currentDay,e.drawMonth=e.selectedMonth=e.currentMonth,e.drawYear=e.selectedYear=e.currentYear):(c=new Date,e.selectedDay=c.getDate(),e.drawMonth=e.selectedMonth=c.getMonth(),e.drawYear=e.selectedYear=c.getFullYear()),this._notifyChange(e),this._adjustDate(d)},_selectMonthYear:function(b,c,d){var e=a(b),f=this._getInst(e[0]);f["selected"+("M"===d?"Month":"Year")]=f["draw"+("M"===d?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10),this._notifyChange(f),this._adjustDate(e)},_selectDay:function(b,c,d,e){var f,g=a(b);a(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(g[0])||(f=this._getInst(g[0]),f.selectedDay=f.currentDay=a("a",e).html(),f.selectedMonth=f.currentMonth=c,f.selectedYear=f.currentYear=d,this._selectDate(b,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(b){var c=a(b);this._selectDate(c,"")},_selectDate:function(b,c){var d,e=a(b),f=this._getInst(e[0]);c=null!=c?c:this._formatDate(f),f.input&&f.input.val(c),this._updateAlternate(f),d=this._get(f,"onSelect"),d?d.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change"),f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!=typeof f.input[0]&&f.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var c,d,e,f=this._get(b,"altField");f&&(c=this._get(b,"altFormat")||this._get(b,"dateFormat"),d=this._getDate(b),e=this.formatDate(c,d,this._getFormatConfig(b)),a(f).each(function(){a(this).val(e)}))},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b,c=new Date(a.getTime());return c.setDate(c.getDate()+4-(c.getDay()||7)),b=c.getTime(),c.setMonth(0),c.setDate(1),Math.floor(Math.round((b-c)/864e5)/7)+1},parseDate:function(b,c,d){if(null==b||null==c)throw"Invalid arguments";if(c="object"==typeof c?c.toString():c+"",""===c)return null;var e,f,g,t,h=0,i=(d?d.shortYearCutoff:null)||this._defaults.shortYearCutoff,j="string"!=typeof i?i:(new Date).getFullYear()%100+parseInt(i,10),k=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort,l=(d?d.dayNames:null)||this._defaults.dayNames,m=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort,n=(d?d.monthNames:null)||this._defaults.monthNames,o=-1,p=-1,q=-1,r=-1,s=!1,u=function(a){var c=e+1<b.length&&b.charAt(e+1)===a;return c&&e++,c},v=function(a){var b=u(a),d="@"===a?14:"!"===a?20:"y"===a&&b?4:"o"===a?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=c.substring(h).match(e);if(!f)throw"Missing number at position "+h;return h+=f[0].length,parseInt(f[0],10)},w=function(b,d,e){var f=-1,g=a.map(u(b)?e:d,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});if(a.each(g,function(a,b){var d=b[1];if(c.substr(h,d.length).toLowerCase()===d.toLowerCase())return f=b[0],h+=d.length,!1}),f!==-1)return f+1;throw"Unknown name at position "+h},x=function(){if(c.charAt(h)!==b.charAt(e))throw"Unexpected literal at position "+h;h++};for(e=0;e<b.length;e++)if(s)"'"!==b.charAt(e)||u("'")?x():s=!1;else switch(b.charAt(e)){case"d":q=v("d");break;case"D":w("D",k,l);break;case"o":r=v("o");break;case"m":p=v("m");break;case"M":p=w("M",m,n);break;case"y":o=v("y");break;case"@":t=new Date(v("@")),o=t.getFullYear(),p=t.getMonth()+1,q=t.getDate();break;case"!":t=new Date((v("!")-this._ticksTo1970)/1e4),o=t.getFullYear(),p=t.getMonth()+1,q=t.getDate();break;case"'":u("'")?x():s=!0;break;default:x()}if(h<c.length&&(g=c.substr(h),!/^\s+/.test(g)))throw"Extra/unparsed characters found in date: "+g;if(o===-1?o=(new Date).getFullYear():o<100&&(o+=(new Date).getFullYear()-(new Date).getFullYear()%100+(o<=j?0:-100)),r>-1)for(p=1,q=r;;){if(f=this._getDaysInMonth(o,p-1),q<=f)break;p++,q-=f}if(t=this._daylightSavingAdjust(new Date(o,p-1,q)),t.getFullYear()!==o||t.getMonth()+1!==p||t.getDate()!==q)throw"Invalid date";return t},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(a,b,c){if(!b)return"";var d,e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=function(b){var c=d+1<a.length&&a.charAt(d+1)===b;return c&&d++,c},j=function(a,b,c){var d=""+b;if(i(a))for(;d.length<c;)d="0"+d;return d},k=function(a,b,c,d){return i(a)?d[b]:c[b]},l="",m=!1;if(b)for(d=0;d<a.length;d++)if(m)"'"!==a.charAt(d)||i("'")?l+=a.charAt(d):m=!1;else switch(a.charAt(d)){case"d":l+=j("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=j("o",Math.round((new Date(b.getFullYear(),b.getMonth(),b.getDate()).getTime()-new Date(b.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=j("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),g,h);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=1e4*b.getTime()+this._ticksTo1970;break;case"'":i("'")?l+="'":m=!0;break;default:l+=a.charAt(d)}return l},_possibleChars:function(a){var b,c="",d=!1,e=function(c){var d=b+1<a.length&&a.charAt(b+1)===c;return d&&b++,d};for(b=0;b<a.length;b++)if(d)"'"!==a.charAt(b)||e("'")?c+=a.charAt(b):d=!1;else switch(a.charAt(b)){case"d":case"m":case"y":case"@":c+="0123456789";break;case"D":case"M":return null;case"'":e("'")?c+="'":d=!0;break;default:c+=a.charAt(b)}return c},_get:function(a,c){return a.settings[c]!==b?a.settings[c]:this._defaults[c]},_setDateFromField:function(a,b){if(a.input.val()!==a.lastVal){var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e=this._getDefaultDate(a),f=e,g=this._getFormatConfig(a);try{f=this.parseDate(c,d,g)||e}catch(a){d=b?"":d}a.selectedDay=f.getDate(),a.drawMonth=a.selectedMonth=f.getMonth(),a.drawYear=a.selectedYear=f.getFullYear(),a.currentDay=d?f.getDate():0,a.currentMonth=d?f.getMonth():0,a.currentYear=d?f.getFullYear():0,this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(b,c,d){var e=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},f=function(c){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),c,a.datepicker._getFormatConfig(b))}catch(a){}for(var d=(c.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(c);i;){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=7*parseInt(i[1],10);break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,a.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,a.datepicker._getDaysInMonth(e,f))}i=h.exec(c)}return new Date(e,f,g)},g=null==c||""===c?d:"string"==typeof c?f(c):"number"==typeof c?isNaN(c)?d:e(c):new Date(c.getTime());return g=g&&"Invalid Date"===g.toString()?d:g,g&&(g.setHours(0),g.setMinutes(0),g.setSeconds(0),g.setMilliseconds(0)),this._daylightSavingAdjust(g)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),e===a.selectedMonth&&f===a.selectedYear||c||this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),d="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){var b={prev:function(){a.datepicker._adjustDate(d,-c,"M")},next:function(){a.datepicker._adjustDate(d,+c,"M")},hide:function(){a.datepicker._hideDatepicker()},today:function(){a.datepicker._gotoToday(d)},selectDay:function(){return a.datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return a.datepicker._selectMonthYear(d,this,"M"),!1},selectYear:function(){return a.datepicker._selectMonthYear(d,this,"Y"),!1}};a(this).bind(this.getAttribute("data-event"),b[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O=new Date,P=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),Q=this._get(a,"isRTL"),R=this._get(a,"showButtonPanel"),S=this._get(a,"hideIfNoPrevNext"),T=this._get(a,"navigationAsDateFormat"),U=this._getNumberOfMonths(a),V=this._get(a,"showCurrentAtPos"),W=this._get(a,"stepMonths"),X=1!==U[0]||1!==U[1],Y=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(a,"min"),$=this._getMinMaxDate(a,"max"),_=a.drawMonth-V,aa=a.drawYear;if(_<0&&(_+=12,aa--),$)for(b=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-U[0]*U[1]+1,$.getDate())),b=Z&&b<Z?Z:b;this._daylightSavingAdjust(new Date(aa,_,1))>b;)_--,_<0&&(_=11,aa--);for(a.drawMonth=_,a.drawYear=aa,c=this._get(a,"prevText"),c=T?this.formatDate(c,this._daylightSavingAdjust(new Date(aa,_-W,1)),this._getFormatConfig(a)):c,d=this._canAdjustMonth(a,-1,aa,_)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>":S?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>",e=this._get(a,"nextText"),e=T?this.formatDate(e,this._daylightSavingAdjust(new Date(aa,_+W,1)),this._getFormatConfig(a)):e,f=this._canAdjustMonth(a,1,aa,_)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>":S?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>",g=this._get(a,"currentText"),h=this._get(a,"gotoCurrent")&&a.currentDay?Y:P,g=T?this.formatDate(g,h,this._getFormatConfig(a)):g,i=a.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(a,"closeText")+"</button>",j=R?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Q?i:"")+(this._isInRange(a,h)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+g+"</button>":"")+(Q?"":i)+"</div>":"",k=parseInt(this._get(a,"firstDay"),10),k=isNaN(k)?0:k,l=this._get(a,"showWeek"),m=this._get(a,"dayNames"),n=this._get(a,"dayNamesMin"),o=this._get(a,"monthNames"),p=this._get(a,"monthNamesShort"),q=this._get(a,"beforeShowDay"),r=this._get(a,"showOtherMonths"),s=this._get(a,"selectOtherMonths"),t=this._getDefaultDate(a),u="",w=0;w<U[0];w++){for(x="",this.maxRows=4,y=0;y<U[1];y++){if(z=this._daylightSavingAdjust(new Date(aa,_,a.selectedDay)),A=" ui-corner-all",B="",X){if(B+="<div class='ui-datepicker-group",U[1]>1)switch(y){case 0:B+=" ui-datepicker-group-first",A=" ui-corner-"+(Q?"right":"left");break;case U[1]-1:B+=" ui-datepicker-group-last",A=" ui-corner-"+(Q?"left":"right");break;default:B+=" ui-datepicker-group-middle",A=""}B+="'>"}for(B+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+A+"'>"+(/all|left/.test(A)&&0===w?Q?f:d:"")+(/all|right/.test(A)&&0===w?Q?d:f:"")+this._generateMonthYearHeader(a,_,aa,Z,$,w>0||y>0,o,p)+"</div><table class='ui-datepicker-calendar'><thead><tr>",C=l?"<th class='ui-datepicker-week-col'>"+this._get(a,"weekHeader")+"</th>":"",v=0;v<7;v++)D=(v+k)%7,C+="<th"+((v+k+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+m[D]+"'>"+n[D]+"</span></th>";for(B+=C+"</tr></thead><tbody>",E=this._getDaysInMonth(aa,_),aa===a.selectedYear&&_===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,E)),F=(this._getFirstDayOfMonth(aa,_)-k+7)%7,G=Math.ceil((F+E)/7),H=X&&this.maxRows>G?this.maxRows:G,this.maxRows=H,I=this._daylightSavingAdjust(new Date(aa,_,1-F)),J=0;J<H;J++){for(B+="<tr>",K=l?"<td class='ui-datepicker-week-col'>"+this._get(a,"calculateWeek")(I)+"</td>":"",v=0;v<7;v++)L=q?q.apply(a.input?a.input[0]:null,[I]):[!0,""],M=I.getMonth()!==_,N=M&&!s||!L[0]||Z&&I<Z||$&&I>$,K+="<td class='"+((v+k+6)%7>=5?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(I.getTime()===z.getTime()&&_===a.selectedMonth&&a._keyEvent||t.getTime()===I.getTime()&&t.getTime()===z.getTime()?" "+this._dayOverClass:"")+(N?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!r?"":" "+L[1]+(I.getTime()===Y.getTime()?" "+this._currentClass:"")+(I.getTime()===P.getTime()?" ui-datepicker-today":""))+"'"+(M&&!r||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(N?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(M&&!r?"&#xa0;":N?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===P.getTime()?" ui-state-highlight":"")+(I.getTime()===Y.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);B+=K+"</tr>"}_++,_>11&&(_=0,aa++),B+="</tbody></table>"+(X?"</div>"+(U[0]>0&&y===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=B}u+=x}return u+=j,a._keyEvent=!1,u},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),s=this._get(a,"showMonthAfterYear"),t="<div class='ui-datepicker-title'>",u="";if(f||!q)u+="<span class='ui-datepicker-month'>"+g[b]+"</span>";else{for(i=d&&d.getFullYear()===c,j=e&&e.getFullYear()===c,u+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",k=0;k<12;k++)(!i||k>=d.getMonth())&&(!j||k<=e.getMonth())&&(u+="<option value='"+k+"'"+(k===b?" selected='selected'":"")+">"+h[k]+"</option>");u+="</select>"}if(s||(t+=u+(!f&&q&&r?"":"&#xa0;")),!a.yearshtml)if(a.yearshtml="",f||!r)t+="<span class='ui-datepicker-year'>"+c+"</span>";else{for(l=this._get(a,"yearRange").split(":"),m=(new Date).getFullYear(),n=function(a){var b=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?m+parseInt(a,10):parseInt(a,10);return isNaN(b)?m:b},o=n(l[0]),p=Math.max(o,n(l[1]||"")),o=d?Math.max(o,d.getFullYear()):o,p=e?Math.min(p,e.getFullYear()):p,a.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";o<=p;o++)a.yearshtml+="<option value='"+o+"'"+(o===c?" selected='selected'":"")+">"+o+"</option>";a.yearshtml+="</select>",t+=a.yearshtml,a.yearshtml=null}return t+=this._get(a,"yearSuffix"),s&&(t+=(!f&&q&&r?"":"&#xa0;")+u),t+="</div>"},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),"M"!==c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return d&&e>d?d:e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return null==b?[1,1]:"number"==typeof b?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return new Date(a,b,1).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,h=null,i=this._get(a,"yearRange");return i&&(c=i.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),h=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(h+=d)),(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!h||b.getFullYear()<=h)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick),a.datepicker.initialized=!0),0===a("#"+a.datepicker._mainDivId).length&&a("body").append(a.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"!=typeof b||"isDisabled"!==b&&"getDate"!==b&&"widget"!==b?"option"===b&&2===arguments.length&&"string"==typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)}):a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c))},a.datepicker=new e,a.datepicker.initialized=!1,a.datepicker.uuid=(new Date).getTime(),a.datepicker.version="1.10.3"}(jQuery),function(a,b){var c={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},d={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",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(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_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"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&a.fn.draggable&&this._makeDraggable(),this.options.resizable&&a.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var b=this.options.appendTo;return b&&(b.jquery||b.nodeType)?a(b):this.document.find(b||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),a=b.parent.children().eq(b.index),a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(b){var c=this;this._isOpen&&this._trigger("beforeClose",b)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||a(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",b)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(a,b){var c=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return c&&!b&&this._trigger("focus",a),c},open:function(){var b=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=a(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){b._focusTabbable(),b._trigger("focus")}),void this._trigger("open"))},_focusTabbable:function(){var a=this.element.find("[autofocus]");a.length||(a=this.element.find(":tabbable")),a.length||(a=this.uiDialogButtonPane.find(":tabbable")),a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable")),a.length||(a=this.uiDialog),a.eq(0).focus()},_keepFocus:function(b){function c(){var b=this.document[0].activeElement,c=this.uiDialog[0]===b||a.contains(this.uiDialog[0],b);c||this._focusTabbable()}b.preventDefault(),c.call(this),this._delay(c)},_createWrapper:function(){this.uiDialog=a("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)return b.preventDefault(),void this.close(b);if(b.keyCode===a.ui.keyCode.TAB){var c=this.uiDialog.find(":tabbable"),d=c.filter(":first"),e=c.filter(":last");b.target!==e[0]&&b.target!==this.uiDialog[0]||b.shiftKey?b.target!==d[0]&&b.target!==this.uiDialog[0]||!b.shiftKey||(e.focus(1),b.preventDefault()):(d.focus(1),b.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var b;this.uiDialogTitlebar=a("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(b){a(b.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=a("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault(),this.close(a)}}),b=a("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(b),this.uiDialog.attr({"aria-labelledby":b.attr("id")})},_title:function(a){this.options.title||a.html("&#160;"),a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=a("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var b=this,c=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),a.isEmptyObject(c)||a.isArray(c)&&!c.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(a.each(c,function(c,d){var e,f;d=a.isFunction(d)?{click:d,text:c}:d,d=a.extend({type:"button"},d),e=d.click,d.click=function(){e.apply(b.element[0],arguments)},f={icons:d.icons,text:d.showText},delete d.icons,delete d.showText,a("<button></button>",d).button(f).appendTo(b.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function d(a){return{position:a.position,offset:a.offset}}var b=this,c=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(c,e){a(this).addClass("ui-dialog-dragging"),b._blockFrames(),b._trigger("dragStart",c,d(e))},drag:function(a,c){b._trigger("drag",a,d(c))},stop:function(e,f){c.position=[f.position.left-b.document.scrollLeft(),f.position.top-b.document.scrollTop()],a(this).removeClass("ui-dialog-dragging"),b._unblockFrames(),b._trigger("dragStop",e,d(f))}})},_makeResizable:function(){function g(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var b=this,c=this.options,d=c.resizable,e=this.uiDialog.css("position"),f="string"==typeof d?d:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:c.maxWidth,maxHeight:c.maxHeight,minWidth:c.minWidth,minHeight:this._minHeight(),handles:f,start:function(c,d){a(this).addClass("ui-dialog-resizing"),b._blockFrames(),b._trigger("resizeStart",c,g(d))},resize:function(a,c){b._trigger("resize",a,g(c))},stop:function(d,e){c.height=a(this).height(),c.width=a(this).width(),a(this).removeClass("ui-dialog-resizing"),b._unblockFrames(),b._trigger("resizeStop",d,g(e))}}).css("position",e)},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show(),this.uiDialog.position(this.options.position),a||this.uiDialog.hide()},_setOptions:function(b){var e=this,f=!1,g={};a.each(b,function(a,b){e._setOption(a,b),a in c&&(f=!0),a in d&&(g[a]=b)}),f&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",g)},_setOption:function(a,b){var c,d,e=this.uiDialog;"dialogClass"===a&&e.removeClass(this.options.dialogClass).addClass(b),"disabled"!==a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+b}),"draggable"===a&&(c=e.is(":data(ui-draggable)"),c&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"===a&&(d=e.is(":data(ui-resizable)"),d&&!b&&e.resizable("destroy"),d&&"string"==typeof b&&e.resizable("option","handles",b),d||b===!1||this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,d=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),d.minWidth>d.width&&(d.width=d.minWidth),a=this.uiDialog.css({height:"auto",width:d.width}).outerHeight(),b=Math.max(0,d.minHeight-a),c="number"==typeof d.maxHeight?Math.max(0,d.maxHeight-a):"none","auto"===d.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,d.height-a)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var b=a(this);return a("<div>").css({position:"absolute",width:b.outerWidth(),height:b.outerHeight()}).appendTo(b.parent()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(b){return!!a(b.target).closest(".ui-dialog").length||!!a(b.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var b=this,c=this.widgetFullName;a.ui.dialog.overlayInstances||this._delay(function(){a.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(d){b._allowInteraction(d)||(d.preventDefault(),a(".ui-dialog:visible:last .ui-dialog-content").data(c)._focusTabbable())})}),this.overlay=a("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),a.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(a.ui.dialog.overlayInstances--,a.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),a.ui.dialog.overlayInstances=0,a.uiBackCompat!==!1&&a.widget("ui.dialog",a.ui.dialog,{_position:function(){var e,b=this.options.position,c=[],d=[0,0];b?(("string"==typeof b||"object"==typeof b&&"0"in b)&&(c=b.split?b.split(" "):[b[0],b[1]],1===c.length&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c[0]+(d[0]<0?d[0]:"+"+d[0])+" "+c[1]+(d[1]<0?d[1]:"+"+d[1]),at:c.join(" ")}),b=a.extend({},a.ui.dialog.prototype.options.position,b)):b=a.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(b),e||this.uiDialog.hide()}})}(jQuery),function(a,b){var c=/up|down|vertical/,d=/up|left|vertical|horizontal/;a.effects.effect.blind=function(b,e){var p,q,r,f=a(this),g=["position","top","bottom","left","right","height","width"],h=a.effects.setMode(f,b.mode||"hide"),i=b.direction||"up",j=c.test(i),k=j?"height":"width",l=j?"top":"left",m=d.test(i),n={},o="show"===h;f.parent().is(".ui-effects-wrapper")?a.effects.save(f.parent(),g):a.effects.save(f,g),f.show(),p=a.effects.createWrapper(f).css({overflow:"hidden"}),q=p[k](),r=parseFloat(p.css(l))||0,n[k]=o?q:0,m||(f.css(j?"bottom":"right",0).css(j?"top":"left","auto").css({position:"absolute"}),n[l]=o?r:q+r),o&&(p.css(k,0),m||p.css(l,r+q)),p.animate(n,{duration:b.duration,easing:b.easing,queue:!1,complete:function(){"hide"===h&&f.hide(),a.effects.restore(f,g),a.effects.removeWrapper(f),e()}})}}(jQuery),function(a,b){a.effects.effect.bounce=function(b,c){var q,r,s,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"effect"),g="hide"===f,h="show"===f,i=b.direction||"up",j=b.distance,k=b.times||5,l=2*k+(h||g?1:0),m=b.duration/l,n=b.easing,o="up"===i||"down"===i?"top":"left",p="up"===i||"left"===i,t=d.queue(),u=t.length;for((h||g)&&e.push("opacity"),a.effects.save(d,e),d.show(),a.effects.createWrapper(d),j||(j=d["top"===o?"outerHeight":"outerWidth"]()/3),h&&(s={opacity:1},s[o]=0,d.css("opacity",0).css(o,p?2*-j:2*j).animate(s,m,n)),g&&(j/=Math.pow(2,k-1)),s={},s[o]=0,q=0;q<k;q++)r={},r[o]=(p?"-=":"+=")+j,d.animate(r,m,n).animate(s,m,n),j=g?2*j:j/2;g&&(r={opacity:0},r[o]=(p?"-=":"+=")+j,d.animate(r,m,n)),d.queue(function(){g&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}),u>1&&t.splice.apply(t,[1,0].concat(t.splice(u,l+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.clip=function(b,c){var m,n,o,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g="show"===f,h=b.direction||"vertical",i="vertical"===h,j=i?"height":"width",k=i?"top":"left",l={};a.effects.save(d,e),d.show(),m=a.effects.createWrapper(d).css({overflow:"hidden"}),n="IMG"===d[0].tagName?m:d,o=n[j](),g&&(n.css(j,0),n.css(k,o/2)),l[j]=g?o:0,l[k]=g?0:o/2,n.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){g||d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.drop=function(b,c){var l,d=a(this),e=["position","top","bottom","left","right","opacity","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g="show"===f,h=b.direction||"left",i="up"===h||"down"===h?"top":"left",j="up"===h||"left"===h?"pos":"neg",k={opacity:g?1:0};a.effects.save(d,e),d.show(),a.effects.createWrapper(d),l=b.distance||d["top"===i?"outerHeight":"outerWidth"](!0)/2,g&&d.css("opacity",0).css(i,"pos"===j?-l:l),k[i]=(g?"pos"===j?"+=":"-=":"pos"===j?"-=":"+=")+l,d.animate(k,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===f&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.explode=function(b,c){function s(){l.push(this),l.length===d*e&&t()}function t(){f.css({visibility:"visible"}),a(l).remove(),h||f.hide(),c()}var m,n,o,p,q,r,d=b.pieces?Math.round(Math.sqrt(b.pieces)):3,e=d,f=a(this),g=a.effects.setMode(f,b.mode||"hide"),h="show"===g,i=f.show().css("visibility","hidden").offset(),j=Math.ceil(f.outerWidth()/e),k=Math.ceil(f.outerHeight()/d),l=[];for(m=0;m<d;m++)for(p=i.top+m*k,r=m-(d-1)/2,n=0;n<e;n++)o=i.left+n*j,q=n-(e-1)/2,f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*j,top:-m*k}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:j,height:k,left:o+(h?q*j:0),top:p+(h?r*k:0),opacity:h?0:1}).animate({left:o+(h?0:q*j),top:p+(h?0:r*k),opacity:h?1:0},b.duration||500,b.easing,s)}}(jQuery),function(a,b){a.effects.effect.fade=function(b,c){var d=a(this),e=a.effects.setMode(d,b.mode||"toggle");d.animate({opacity:e},{queue:!1,duration:b.duration,easing:b.easing,complete:c})}}(jQuery),function(a,b){a.effects.effect.fold=function(b,c){var o,p,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g="show"===f,h="hide"===f,i=b.size||15,j=/([0-9]+)%/.exec(i),k=!!b.horizFirst,l=g!==k,m=l?["width","height"]:["height","width"],n=b.duration/2,q={},r={};a.effects.save(d,e),d.show(),o=a.effects.createWrapper(d).css({overflow:"hidden"}),p=l?[o.width(),o.height()]:[o.height(),o.width()],j&&(i=parseInt(j[1],10)/100*p[h?0:1]),g&&o.css(k?{height:0,width:i}:{height:i,width:0}),q[m[0]]=g?p[0]:i,r[m[1]]=g?p[1]:0,o.animate(q,n,b.easing).animate(r,n,b.easing,function(){h&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()})}}(jQuery),function(a,b){a.effects.effect.highlight=function(b,c){var d=a(this),e=["backgroundImage","backgroundColor","opacity"],f=a.effects.setMode(d,b.mode||"show"),g={backgroundColor:d.css("backgroundColor")};"hide"===f&&(g.opacity=0),a.effects.save(d,e),d.show().css({backgroundImage:"none",backgroundColor:b.color||"#ffff99"}).animate(g,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===f&&d.hide(),a.effects.restore(d,e),c()}})}}(jQuery),function(a,b){a.effects.effect.pulsate=function(b,c){var n,d=a(this),e=a.effects.setMode(d,b.mode||"show"),f="show"===e,g="hide"===e,h=f||"hide"===e,i=2*(b.times||5)+(h?1:0),j=b.duration/i,k=0,l=d.queue(),m=l.length;for(!f&&d.is(":visible")||(d.css("opacity",0).show(),k=1),n=1;n<i;n++)d.animate({opacity:k},j,b.easing),k=1-k;d.animate({opacity:k},j,b.easing),d.queue(function(){g&&d.hide(),c()}),m>1&&l.splice.apply(l,[1,0].concat(l.splice(m,i+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.puff=function(b,c){var d=a(this),e=a.effects.setMode(d,b.mode||"hide"),f="hide"===e,g=parseInt(b.percent,10)||150,h=g/100,i={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()};a.extend(b,{effect:"scale",queue:!1,fade:!0,mode:e,complete:c,percent:f?g:100,from:f?i:{height:i.height*h,width:i.width*h,outerHeight:i.outerHeight*h,outerWidth:i.outerWidth*h}}),d.effect(b)},a.effects.effect.scale=function(b,c){var d=a(this),e=a.extend(!0,{},b),f=a.effects.setMode(d,b.mode||"effect"),g=parseInt(b.percent,10)||(0===parseInt(b.percent,10)?0:"hide"===f?0:100),h=b.direction||"both",i=b.origin,j={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()},k={y:"horizontal"!==h?g/100:1,x:"vertical"!==h?g/100:1};e.effect="size",e.queue=!1,e.complete=c,"effect"!==f&&(e.origin=i||["middle","center"],e.restore=!0),e.from=b.from||("show"===f?{height:0,width:0,outerHeight:0,outerWidth:0}:j),e.to={height:j.height*k.y,width:j.width*k.x,outerHeight:j.outerHeight*k.y,outerWidth:j.outerWidth*k.x},e.fade&&("show"===f&&(e.from.opacity=0,e.to.opacity=1),"hide"===f&&(e.from.opacity=1,e.to.opacity=0)),d.effect(e)},a.effects.effect.size=function(b,c){var d,e,f,g=a(this),h=["position","top","bottom","left","right","width","height","overflow","opacity"],i=["position","top","bottom","left","right","overflow","opacity"],j=["width","height","overflow"],k=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],m=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],n=a.effects.setMode(g,b.mode||"effect"),o=b.restore||"effect"!==n,p=b.scale||"both",q=b.origin||["middle","center"],r=g.css("position"),s=o?h:i,t={height:0,width:0,outerHeight:0,outerWidth:0};"show"===n&&g.show(),d={height:g.height(),width:g.width(),outerHeight:g.outerHeight(),outerWidth:g.outerWidth()},"toggle"===b.mode&&"show"===n?(g.from=b.to||t,g.to=b.from||d):(g.from=b.from||("show"===n?t:d),g.to=b.to||("hide"===n?t:d)),f={from:{y:g.from.height/d.height,x:g.from.width/d.width},to:{y:g.to.height/d.height,x:g.to.width/d.width}},"box"!==p&&"both"!==p||(f.from.y!==f.to.y&&(s=s.concat(l),g.from=a.effects.setTransition(g,l,f.from.y,g.from),g.to=a.effects.setTransition(g,l,f.to.y,g.to)),f.from.x!==f.to.x&&(s=s.concat(m),g.from=a.effects.setTransition(g,m,f.from.x,g.from),g.to=a.effects.setTransition(g,m,f.to.x,g.to))),"content"!==p&&"both"!==p||f.from.y!==f.to.y&&(s=s.concat(k).concat(j),g.from=a.effects.setTransition(g,k,f.from.y,g.from),g.to=a.effects.setTransition(g,k,f.to.y,g.to)),a.effects.save(g,s),g.show(),a.effects.createWrapper(g),g.css("overflow","hidden").css(g.from),q&&(e=a.effects.getBaseline(q,d),g.from.top=(d.outerHeight-g.outerHeight())*e.y,g.from.left=(d.outerWidth-g.outerWidth())*e.x,g.to.top=(d.outerHeight-g.to.outerHeight)*e.y,g.to.left=(d.outerWidth-g.to.outerWidth)*e.x),g.css(g.from),"content"!==p&&"both"!==p||(l=l.concat(["marginTop","marginBottom"]).concat(k),m=m.concat(["marginLeft","marginRight"]),j=h.concat(l).concat(m),g.find("*[width]").each(function(){var c=a(this),d={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};o&&a.effects.save(c,j),c.from={height:d.height*f.from.y,width:d.width*f.from.x,outerHeight:d.outerHeight*f.from.y,outerWidth:d.outerWidth*f.from.x},c.to={height:d.height*f.to.y,width:d.width*f.to.x,outerHeight:d.height*f.to.y,outerWidth:d.width*f.to.x},f.from.y!==f.to.y&&(c.from=a.effects.setTransition(c,l,f.from.y,c.from),c.to=a.effects.setTransition(c,l,f.to.y,c.to)),f.from.x!==f.to.x&&(c.from=a.effects.setTransition(c,m,f.from.x,c.from),c.to=a.effects.setTransition(c,m,f.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.easing,function(){o&&a.effects.restore(c,j)})})),g.animate(g.to,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){0===g.to.opacity&&g.css("opacity",g.from.opacity),"hide"===n&&g.hide(),a.effects.restore(g,s),o||("static"===r?g.css({position:"relative",top:g.to.top,left:g.to.left}):a.each(["top","left"],function(a,b){g.css(b,function(b,c){var d=parseInt(c,10),e=a?g.to.left:g.to.top;return"auto"===c?e+"px":d+e+"px"})})),a.effects.removeWrapper(g),c()}})}}(jQuery),function(a,b){a.effects.effect.shake=function(b,c){var q,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"effect"),g=b.direction||"left",h=b.distance||20,i=b.times||3,j=2*i+1,k=Math.round(b.duration/j),l="up"===g||"down"===g?"top":"left",m="up"===g||"left"===g,n={},o={},p={},r=d.queue(),s=r.length;for(a.effects.save(d,e),d.show(),a.effects.createWrapper(d),n[l]=(m?"-=":"+=")+h,o[l]=(m?"+=":"-=")+2*h,p[l]=(m?"-=":"+=")+2*h,d.animate(n,k,b.easing),q=1;q<i;q++)d.animate(o,k,b.easing).animate(p,k,b.easing);d.animate(o,k,b.easing).animate(n,k/2,b.easing).queue(function(){"hide"===f&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}),s>1&&r.splice.apply(r,[1,0].concat(r.splice(s,j+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.slide=function(b,c){var k,d=a(this),e=["position","top","bottom","left","right","width","height"],f=a.effects.setMode(d,b.mode||"show"),g="show"===f,h=b.direction||"left",i="up"===h||"down"===h?"top":"left",j="up"===h||"left"===h,l={};a.effects.save(d,e),d.show(),k=b.distance||d["top"===i?"outerHeight":"outerWidth"](!0),a.effects.createWrapper(d).css({overflow:"hidden"}),g&&d.css(i,j?isNaN(k)?"-"+k:-k:k),l[i]=(g?j?"+=":"-=":j?"-=":"+=")+k,d.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===f&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.transfer=function(b,c){var d=a(this),e=a(b.to),f="fixed"===e.css("position"),g=a("body"),h=f?g.scrollTop():0,i=f?g.scrollLeft():0,j=e.offset(),k={top:j.top-h,left:j.left-i,height:e.innerHeight(),width:e.innerWidth()},l=d.offset(),m=a("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(b.className).css({top:l.top-h,left:l.left-i,height:d.innerHeight(),width:d.innerWidth(),position:f?"fixed":"absolute"}).animate(k,b.duration,b.easing,function(){m.remove(),c()})}}(jQuery),function(a,b){a.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},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.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,a.proxy(function(a){this.options.disabled&&a.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(a){a.preventDefault()},"click .ui-state-disabled > a":function(a){a.preventDefault()},"click .ui-menu-item:has(a)":function(b){var c=a(b.target).closest(".ui-menu-item");!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(b),c.has(".ui-menu").length?this.expand(b):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){var c=a(b.currentTarget);c.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(b,c)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.children(".ui-menu-item").eq(0);b||this.focus(a,c)},blur:function(b){this._delay(function(){a.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(b)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(b){a(b.target).closest(".ui-menu").length||this.collapseAll(b),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var b=a(this);b.data("ui-menu-submenu-carat")&&b.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(b){function i(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var c,d,e,f,g,h=!0;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:h=!1,d=this.previousFilter||"",e=String.fromCharCode(b.keyCode),f=!1,clearTimeout(this.filterTimer),e===d?f=!0:e=d+e,g=new RegExp("^"+i(e),"i"),c=this.activeMenu.children(".ui-menu-item").filter(function(){return g.test(a(this).children("a").text())}),c=f&&c.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):c,c.length||(e=String.fromCharCode(b.keyCode),g=new RegExp("^"+i(e),"i"),c=this.activeMenu.children(".ui-menu-item").filter(function(){return g.test(a(this).children("a").text())})),c.length?(this.focus(b,c),c.length>1?(this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&b.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var b,c=this.options.icons.submenu,d=this.element.find(this.options.menus);d.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var b=a(this),d=b.prev("a"),e=a("<span>").addClass("ui-menu-icon ui-icon "+c).data("ui-menu-submenu-carat",!0);d.attr("aria-haspopup","true").prepend(e),b.attr("aria-labelledby",d.attr("id"))}),b=d.add(this.element),b.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),b.children(":not(.ui-menu-item)").each(function(){var b=a(this);/[^\-\u2014\u2013\s]/.test(b.text())||b.addClass("ui-widget-content ui-menu-divider")}),b.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu),this._super(a,b)},focus:function(a,b){var c,d;this.blur(a,a&&"focus"===a.type),this._scrollIntoView(b),this.active=b.first(),d=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",d.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),c=b.children(".ui-menu"),c.length&&/^mouse/.test(a.type)&&this._startOpening(c),this.activeMenu=b.parent(),this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var c,d,e,f,g,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-c-d,f=this.activeMenu.scrollTop(),g=this.activeMenu.height(),h=b.height(),e<0?this.activeMenu.scrollTop(f+e):e+h>g&&this.activeMenu.scrollTop(f+e-g+h))},blur:function(a,b){b||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer),"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(a)},this.delay))},_open:function(b){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true"),b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(b,c){clearTimeout(this.timer),this.timer=this._delay(function(){var d=c?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element),this._close(d),this.blur(b),this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element),a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0)),d&&d.length&&this.active||(d=this.activeMenu.children(".ui-menu-item")[b]()),this.focus(c,d)},nextPage:function(b){var c,d,e;return this.active?void(this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d-e<0}),this.focus(b,c)):this.focus(b,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(b)},previousPage:function(b){var c,d,e;return this.active?void(this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d+e>0}),this.focus(b,c)):this.focus(b,this.activeMenu.children(".ui-menu-item").first()))):void this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(b,!0),this._trigger("select",b,c)}})}(jQuery),function(a,b){function m(a,b,c){return[parseFloat(a[0])*(k.test(a[0])?b/100:1),parseFloat(a[1])*(k.test(a[1])?c/100:1)]}function n(b,c){return parseInt(a.css(b,c),10)||0}function o(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}a.ui=a.ui||{};var c,d=Math.max,e=Math.abs,f=Math.round,g=/left|center|right/,h=/top|center|bottom/,i=/[\+\-]\d+(\.[\d]+)?%?/,j=/^\w+/,k=/%$/,l=a.fn.position;a.position={scrollbarWidth:function(){if(c!==b)return c;var d,e,f=a("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),g=f.children()[0];return a("body").append(f),d=g.offsetWidth,f.css("overflow","scroll"),e=g.offsetWidth,d===e&&(e=f[0].clientWidth),f.remove(),c=d-e},getScrollInfo:function(b){var c=b.isWindow?"":b.element.css("overflow-x"),d=b.isWindow?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]);return{element:c,isWindow:d,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d?c.width():c.outerWidth(),height:d?c.height():c.outerHeight()}}},a.fn.position=function(b){if(!b||!b.of)return l.apply(this,arguments);b=a.extend({},b);var c,k,p,q,r,s,t=a(b.of),u=a.position.getWithinInfo(b.within),v=a.position.getScrollInfo(u),w=(b.collision||"flip").split(" "),x={};return s=o(t),t[0].preventDefault&&(b.at="left top"),k=s.width,p=s.height,q=s.offset,r=a.extend({},q),a.each(["my","at"],function(){var c,d,a=(b[this]||"").split(" ");1===a.length&&(a=g.test(a[0])?a.concat(["center"]):h.test(a[0])?["center"].concat(a):["center","center"]),a[0]=g.test(a[0])?a[0]:"center",a[1]=h.test(a[1])?a[1]:"center",c=i.exec(a[0]),d=i.exec(a[1]),x[this]=[c?c[0]:0,d?d[0]:0],b[this]=[j.exec(a[0])[0],j.exec(a[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===b.at[0]?r.left+=k:"center"===b.at[0]&&(r.left+=k/2),"bottom"===b.at[1]?r.top+=p:"center"===b.at[1]&&(r.top+=p/2),c=m(x.at,k,p),r.left+=c[0],r.top+=c[1],this.each(function(){var g,h,i=a(this),j=i.outerWidth(),l=i.outerHeight(),o=n(this,"marginLeft"),s=n(this,"marginTop"),y=j+o+n(this,"marginRight")+v.width,z=l+s+n(this,"marginBottom")+v.height,A=a.extend({},r),B=m(x.my,i.outerWidth(),i.outerHeight());"right"===b.my[0]?A.left-=j:"center"===b.my[0]&&(A.left-=j/2),"bottom"===b.my[1]?A.top-=l:"center"===b.my[1]&&(A.top-=l/2),A.left+=B[0],A.top+=B[1],a.support.offsetFractions||(A.left=f(A.left),A.top=f(A.top)),g={marginLeft:o,marginTop:s},a.each(["left","top"],function(d,e){a.ui.position[w[d]]&&a.ui.position[w[d]][e](A,{targetWidth:k,targetHeight:p,elemWidth:j,elemHeight:l,collisionPosition:g,collisionWidth:y,collisionHeight:z,offset:[c[0]+B[0],c[1]+B[1]],my:b.my,at:b.at,within:u,elem:i})}),b.using&&(h=function(a){var c=q.left-A.left,f=c+k-j,g=q.top-A.top,h=g+p-l,m={target:{element:t,left:q.left,top:q.top,width:k,height:p},element:{element:i,left:A.left,top:A.top,width:j,height:l},horizontal:f<0?"left":c>0?"right":"center",vertical:h<0?"top":g>0?"bottom":"middle"};k<j&&e(c+f)<k&&(m.horizontal="center"),p<l&&e(g+h)<p&&(m.vertical="middle"),d(e(c),e(f))>d(e(g),e(h))?m.important="horizontal":m.important="vertical",b.using.call(this,a,m)}),i.offset(a.extend(A,{using:h}))})},a.ui.position={fit:{left:function(a,b){var j,c=b.within,e=c.isWindow?c.scrollLeft:c.offset.left,f=c.width,g=a.left-b.collisionPosition.marginLeft,h=e-g,i=g+b.collisionWidth-f-e;b.collisionWidth>f?h>0&&i<=0?(j=a.left+h+b.collisionWidth-f-e,a.left+=h-j):i>0&&h<=0?a.left=e:h>i?a.left=e+f-b.collisionWidth:a.left=e:h>0?a.left+=h:i>0?a.left-=i:a.left=d(a.left-g,a.left)},top:function(a,b){var j,c=b.within,e=c.isWindow?c.scrollTop:c.offset.top,f=b.within.height,g=a.top-b.collisionPosition.marginTop,h=e-g,i=g+b.collisionHeight-f-e;b.collisionHeight>f?h>0&&i<=0?(j=a.top+h+b.collisionHeight-f-e,a.top+=h-j):i>0&&h<=0?a.top=e:h>i?a.top=e+f-b.collisionHeight:a.top=e:h>0?a.top+=h:i>0?a.top-=i:a.top=d(a.top-g,a.top)}},flip:{left:function(a,b){var n,o,c=b.within,d=c.offset.left+c.scrollLeft,f=c.width,g=c.isWindow?c.scrollLeft:c.offset.left,h=a.left-b.collisionPosition.marginLeft,i=h-g,j=h+b.collisionWidth-f-g,k="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,l="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,m=-2*b.offset[0];i<0?(n=a.left+k+l+m+b.collisionWidth-f-d,(n<0||n<e(i))&&(a.left+=k+l+m)):j>0&&(o=a.left-b.collisionPosition.marginLeft+k+l+m-g,(o>0||e(o)<j)&&(a.left+=k+l+m))},top:function(a,b){var o,p,c=b.within,d=c.offset.top+c.scrollTop,f=c.height,g=c.isWindow?c.scrollTop:c.offset.top,h=a.top-b.collisionPosition.marginTop,i=h-g,j=h+b.collisionHeight-f-g,k="top"===b.my[1],l=k?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,m="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,n=-2*b.offset[1];i<0?(p=a.top+l+m+n+b.collisionHeight-f-d,a.top+l+m+n>i&&(p<0||p<e(i))&&(a.top+=l+m+n)):j>0&&(o=a.top-b.collisionPosition.marginTop+l+m+n-g,a.top+l+m+n>j&&(o>0||e(o)<j)&&(a.top+=l+m+n))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,f,g=document.getElementsByTagName("body")[0],h=document.createElement("div");b=document.createElement(g?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},g&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in d)b.style[f]=d[f];b.appendChild(h),c=g||document.documentElement,c.insertBefore(b,c.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",e=a(h).offset().left,a.support.offsetFractions=e>10&&e<11,b.innerHTML="",c.removeChild(b)}()}(jQuery),function(a,b){a.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(a){return a===b?this.options.value:(this.options.value=this._constrainedValue(a),void this._refreshValue())},_constrainedValue:function(a){return a===b&&(a=this.options.value),this.indeterminate=a===!1,"number"!=typeof a&&(a=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value,this._super(a),this.options.value=this._constrainedValue(b),this._refreshValue()},_setOption:function(a,b){"max"===a&&(b=Math.max(this.min,b)),this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var b=this.options.value,c=this._percentage();this.valueDiv.toggle(this.indeterminate||b>this.min).toggleClass("ui-corner-right",b===this.options.max).width(c.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=a("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":b}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==b&&(this.oldValue=b,this._trigger("change")),b===this.options.max&&this._trigger("complete")}})}(jQuery),function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var b,c,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=[];for(c=d.values&&d.values.length||1,e.length>c&&(e.slice(c).remove(),e=e.slice(0,c)),b=e.length;b<c;b++)g.push(f);this.handles=e.add(a(g.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)})},_createRange:function(){var b=this.options,c="";b.range?(b.range===!0&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=a("<div></div>").appendTo(this.element),c="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(c+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:""))):this.range=a([])},_setupEvents:function(){var a=this.handles.add(this.range).filter("a");this._off(a),this._on(a,this._handleEvents),this._hoverable(a),this._focusable(a)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h!==!1&&(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),"vertical"===this.orientation&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),2===this.options.values.length&&this.options.range===!0&&(0===b&&c>d||1===b&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._lastChangedValue=b,this._trigger("change",a,c)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),void this._change(null,0)):this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)return this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),void this._change(null,b);if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;switch("range"===b&&this.options.range===!0&&("min"===c?(this.options.value=this._values(0),this.options.values=null):"max"===c&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){for(c=this.options.values.slice(),d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c}return[]},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return 2*Math.abs(c)>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b,c,d,e,f,g=this.options.range,h=this.options,i=this,j=!this._animateOff&&h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=(i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())*100,k["horizontal"===i.orientation?"left":"bottom"]=c+"%",a(this).stop(1,1)[j?"animate":"css"](k,h.animate),i.options.range===!0&&("horizontal"===i.orientation?(0===d&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({width:c-b+"%"},{queue:!1,duration:h.animate})):(0===d&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:!1,duration:h.animate}))),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?(d-e)/(f-e)*100:0,k["horizontal"===this.orientation?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),"min"===g&&"horizontal"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},h.animate),"max"===g&&"horizontal"===this.orientation&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:!1,duration:h.animate}),"min"===g&&"vertical"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),"max"===g&&"vertical"===this.orientation&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:!1,duration:h.animate}))},_handleEvents:{keydown:function(b){var d,e,f,g,h=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),d=this._start(b,h),d===!1))return}switch(g=this.options.step,e=f=this.options.values&&this.options.values.length?this.values(h):this.value(),b.keyCode){case a.ui.keyCode.HOME:f=this._valueMin();break;case a.ui.keyCode.END:f=this._valueMax();break;case a.ui.keyCode.PAGE_UP:f=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:f=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(e===this._valueMax())return;f=this._trimAlignValue(e+g);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(e===this._valueMin())return;f=this._trimAlignValue(e-g)}this._slide(b,h,f)},click:function(a){a.preventDefault()},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}})}(jQuery),function(a){function b(a){return function(){var b=this.element.val();a.apply(this,arguments),this._refresh(),b!==this.element.val()&&this._trigger("change")}}a.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{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.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var b={},c=this.element;return a.each(["min","max","step"],function(a,d){var e=c.attr(d);void 0!==e&&e.length&&(b[d]=e)}),b},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",a)))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((b>0?1:-1)*this.options.step,a),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100),a.preventDefault()}},"mousedown .ui-spinner-button":function(b){function d(){var a=this.element[0]===this.document[0].activeElement;a||(this.element.focus(),this.previous=c,this._delay(function(){this.previous=c}))}var c;c=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),b.preventDefault(),d.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,d.call(this)}),this._start(b)!==!1&&this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(b){if(a(b.currentTarget).hasClass("ui-state-active"))return this._start(b)!==!1&&void this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*a.height())&&a.height()>0&&a.height(a.height()),this.options.disabled&&this.disable()},_keydown:function(b){var c=this.options,d=a.ui.keyCode;switch(b.keyCode){case d.UP:return this._repeat(null,1,b),!0;case d.DOWN:return this._repeat(null,-1,b),!0;case d.PAGE_UP:return this._repeat(null,c.page,b),!0;case d.PAGE_DOWN:return this._repeat(null,-c.page,b),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return!(!this.spinning&&this._trigger("start",a)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(a,b,c){a=a||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,b,c)},a),this._spin(b*this.options.step,c)},_spin:function(a,b){var c=this.value()||0;this.counter||(this.counter=1),c=this._adjustValue(c+a*this._increment(this.counter)),this.spinning&&this._trigger("spin",b,{value:c})===!1||(this._value(c),this.counter++)},_increment:function(b){var c=this.options.incremental;return c?a.isFunction(c)?c(b):Math.floor(b*b*b/5e4-b*b/500+17*b/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=a.toString(),c=b.indexOf(".");return c===-1?0:b.length-c-1},_adjustValue:function(a){var b,c,d=this.options;return b=null!==d.min?d.min:0,c=a-b,c=Math.round(c/d.step)*d.step,a=b+c,a=parseFloat(a.toFixed(this._precision())),null!==d.max&&a>d.max?d.max:null!==d.min&&a<d.min?d.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,b){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());return this.options[a]=b,void this.element.val(this._format(c))}"max"!==a&&"min"!==a&&"step"!==a||"string"==typeof b&&(b=this._parse(b)),"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)),this._super(a,b),"disabled"===a&&(b?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:b(function(a){this._super(a),this._value(this.element.val())}),_parse:function(a){return"string"==typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):+a),""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(a,b){var c;""!==a&&(c=this._parse(a),null!==c&&(b||(c=this._adjustValue(c)),a=this._format(c))),this.element.val(a),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:b(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),this._stop())},stepDown:b(function(a){this._stepDown(a)}),_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:b(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:b(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){return arguments.length?void b(this._value).call(this,a):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(a,b){function e(){return++c}function f(a){return a.hash.length>1&&decodeURIComponent(a.href.replace(d,""))===decodeURIComponent(location.href.replace(d,""))}var c=0,d=/#.*$/;a.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var b=this,c=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",c.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),c.active=this._initialActive(),a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(c.active):this.active=a(),this._refresh(),this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);return null===b&&(d&&this.tabs.each(function(c,e){if(a(e).attr("aria-controls")===d)return b=c,!1}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==b&&b!==-1||(b=!!this.tabs.length&&0)),b!==!1&&(b=this.tabs.index(this.tabs.eq(b)),b===-1&&(b=!c&&0)),!c&&b===!1&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1,d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d);case a.ui.keyCode.ENTER:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d!==this.options.active&&d);default:return}b.preventDefault(),clearTimeout(this.activating),d=this._focusNextTab(d,e),b.ctrlKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.focus())},_handlePageNav:function(b){return b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(b,c){function e(){return b>d&&(b=0),b<0&&(b=d),b}for(var d=this.tabs.length-1;a.inArray(e(),this.options.disabled)!==-1;)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),a},_setOption:function(a,b){return"active"===a?void this._activate(b):"disabled"===a?void this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),b||this.options.active!==!1||this._activate(0)),"event"===a&&this._setupEvents(b),void("heightStyle"===a&&this._setupHeightStyle(b)))},_tabId:function(a){return a.attr("aria-controls")||"ui-tabs-"+e()},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)}),this._processTabs(),b.active!==!1&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=a(),this.anchors.each(function(c,d){var e,g,h,i=a(d).uniqueId().attr("id"),j=a(d).closest("li"),k=j.attr("aria-controls");f(d)?(e=d.hash,g=b.element.find(b._sanitizeSelector(e))):(h=b._tabId(j),e="#"+h,g=b.element.find(e),g.length||(g=b._createPanel(h),g.insertAfter(b.panels[c-1]||b.tablist)),g.attr("aria-live","polite")),g.length&&(b.panels=b.panels.add(g)),k&&j.data("ui-tabs-aria-controls",k),j.attr({"aria-controls":e.substring(1),"aria-labelledby":i}),g.attr("aria-labelledby",i)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1);for(var d,c=0;d=this.tabs[c];c++)b===!0||a.inArray(c,b)!==-1?a(d).addClass("ui-state-disabled").attr("aria-disabled","true"):a(d).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=b},_setupEvents:function(b){var c={click:function(a){a.preventDefault()}};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,c),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e.closest("li"),g=f[0]===d[0],h=g&&c.collapsible,i=h?a():this._getPanelForTab(f),j=d.length?this._getPanelForTab(d):a(),k={oldTab:d,oldPanel:j,newTab:h?a():f,newPanel:i};b.preventDefault(),f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!c.collapsible||this._trigger("beforeActivate",b,k)===!1||(c.active=!h&&this.tabs.index(f),this.active=g?a():f,this.xhr&&this.xhr.abort(),j.length||i.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),i.length&&this.load(this.tabs.index(f),b),this._toggle(b,k))},_toggle:function(b,c){function g(){d.running=!1,d._trigger("activate",b,c)}function h(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),e.length&&d.options.show?d._show(e,d.options.show,g):(e.show(),g())}var d=this,e=c.newPanel,f=c.oldPanel;this.running=!0,f.length&&this.options.hide?this._hide(f,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),f.hide(),h()),f.attr({"aria-expanded":"false","aria-hidden":"true"}),c.oldTab.attr("aria-selected","false"),e.length&&f.length?c.oldTab.attr("tabIndex",-1):e.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),e.attr({"aria-expanded":"true","aria-hidden":"false"}),c.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(b){var c,d=this._findActive(b);d[0]!==this.active[0]&&(d.length||(d=this.active),c=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return b===!1?a():this.tabs.eq(b)},_getIndex:function(a){return"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(c){var d=this.options.disabled;d!==!1&&(c===b?d=!1:(c=this._getIndex(c),d=a.isArray(d)?a.map(d,function(a){return a!==c?a:null}):a.map(this.tabs,function(a,b){return b!==c?b:null})),this._setupDisabled(d))},disable:function(c){var d=this.options.disabled;if(d!==!0){if(c===b)d=!0;else{if(c=this._getIndex(c),a.inArray(c,d)!==-1)return;d=a.isArray(d)?a.merge([c],d).sort():[c]}this._setupDisabled(d)}},load:function(b,c){b=this._getIndex(b);var d=this,e=this.tabs.eq(b),g=e.find(".ui-tabs-anchor"),h=this._getPanelForTab(e),i={tab:e,panel:h};f(g[0])||(this.xhr=a.ajax(this._ajaxSettings(g,c,i)),this.xhr&&"canceled"!==this.xhr.statusText&&(e.addClass("ui-tabs-loading"),h.attr("aria-busy","true"),this.xhr.success(function(a){setTimeout(function(){h.html(a),d._trigger("load",c,i)},1)}).complete(function(a,b){setTimeout(function(){"abort"===b&&d.panels.stop(!1,!0),e.removeClass("ui-tabs-loading"),h.removeAttr("aria-busy"),a===d.xhr&&delete d.xhr},1)})))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href"),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){var c=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+c))}})}(jQuery),function(a){function c(b,c){var d=(b.attr("aria-describedby")||"").split(/\s+/);d.push(c),b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(d.join(" ")))}function d(b){var c=b.data("ui-tooltip-id"),d=(b.attr("aria-describedby")||"").split(/\s+/),e=a.inArray(c,d);e!==-1&&d.splice(e,1),b.removeData("ui-tooltip-id"),d=a.trim(d.join(" ")),d?b.attr("aria-describedby",d):b.removeAttr("aria-describedby")}var b=0;a.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var b=a(this).attr("title")||"";return a("<a>").text(b).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(b,c){var d=this;return"disabled"===b?(this[c?"_disable":"_enable"](),void(this.options[b]=c)):(this._super(b,c),void("content"===b&&a.each(this.tooltips,function(a,b){d._updateContent(b)})))},_disable:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d[0],b.close(e,!0)}),this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=this,d=a(b?b.target:this.element).closest(this.options.items);d.length&&!d.data("ui-tooltip-id")&&(d.attr("title")&&d.data("ui-tooltip-title",d.attr("title")),d.data("ui-tooltip-open",!0),b&&"mouseover"===b.type&&d.parents().each(function(){var d,b=a(this);b.data("ui-tooltip-open")&&(d=a.Event("blur"),d.target=d.currentTarget=this,c.close(d,!0)),b.attr("title")&&(b.uniqueId(),c.parents[this.id]={element:this,title:b.attr("title")},b.attr("title",""))}),this._updateContent(d,b))},_updateContent:function(a,b){var c,d=this.options.content,e=this,f=b?b.type:null;return"string"==typeof d?this._open(b,a,d):(c=d.call(a[0],function(c){a.data("ui-tooltip-open")&&e._delay(function(){b&&(b.type=f),this._open(b,a,c)})}),void(c&&this._open(b,a,c)))},_open:function(b,d,e){function j(a){i.of=a,f.is(":hidden")||f.position(i)}var f,g,h,i=a.extend({},this.options.position);if(e){if(f=this._find(d),f.length)return void f.find(".ui-tooltip-content").html(e);d.is("[title]")&&(b&&"mouseover"===b.type?d.attr("title",""):d.removeAttr("title")),f=this._tooltip(d),c(d,f.attr("id")),f.find(".ui-tooltip-content").html(e),this.options.track&&b&&/^mouse/.test(b.type)?(this._on(this.document,{mousemove:j}),j(b)):f.position(a.extend({of:d},this.options.position)),f.hide(),this._show(f,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){f.is(":visible")&&(j(i.of),clearInterval(h))},a.fx.interval)),this._trigger("open",b,{tooltip:f}),g={keyup:function(b){if(b.keyCode===a.ui.keyCode.ESCAPE){var c=a.Event(b);c.currentTarget=d[0],this.close(c,!0)}},remove:function(){this._removeTooltip(f)}},b&&"mouseover"!==b.type||(g.mouseleave="close"),b&&"focusin"!==b.type||(g.focusout="close"),this._on(!0,d,g)}},close:function(b){var c=this,e=a(b?b.currentTarget:this.element),f=this._find(e);this.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title")),d(e),f.stop(!0),this._hide(f,this.options.hide,function(){c._removeTooltip(a(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),b&&"mouseleave"===b.type&&a.each(this.parents,function(b,d){a(d.element).attr("title",d.title),delete c.parents[b]}),this.closing=!0,this._trigger("close",b,{tooltip:f}),this.closing=!1)},_tooltip:function(c){var d="ui-tooltip-"+b++,e=a("<div>").attr({id:d,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return a("<div>").addClass("ui-tooltip-content").appendTo(e),e.appendTo(this.document[0].body),this.tooltips[d]=c,e},_find:function(b){var c=b.data("ui-tooltip-id");return c?a("#"+c):a()},_removeTooltip:function(a){a.remove(),delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d[0],b.close(e,!0),a("#"+c).remove(),d.data("ui-tooltip-title")&&(d.attr("title",d.data("ui-tooltip-title")),d.removeData("ui-tooltip-title"))})}})}(jQuery);/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);(function(){"use strict";var $,Animation,Growl,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}};$=jQuery;Animation=(function(){function Animation(){}
Animation.transitions={"webkitTransition":"webkitTransitionEnd","mozTransition":"mozTransitionEnd","oTransition":"oTransitionEnd","transition":"transitionend"};Animation.transition=function($el){var el,result,type,_ref;el=$el[0];_ref=this.transitions;for(type in _ref){result=_ref[type];if(el.style[type]!=null){return result}}};return Animation})();Growl=(function(){Growl.settings={namespace:'growl',duration:3200,close:"&times;",location:"default",style:"default",size:"medium"};Growl.growl=function(settings){if(settings==null){settings={}}
this.initialize();return new Growl(settings)};Growl.initialize=function(){return $("body:not(:has(#growls))").append('<div id="growls" />')};function Growl(settings){if(settings==null){settings={}}
this.html=__bind(this.html,this);this.$growl=__bind(this.$growl,this);this.$growls=__bind(this.$growls,this);this.animate=__bind(this.animate,this);this.remove=__bind(this.remove,this);this.dismiss=__bind(this.dismiss,this);this.present=__bind(this.present,this);this.close=__bind(this.close,this);this.cycle=__bind(this.cycle,this);this.unbind=__bind(this.unbind,this);this.bind=__bind(this.bind,this);this.render=__bind(this.render,this);this.settings=$.extend({},Growl.settings,settings);this.$growls().attr('class',this.settings.location);this.render()}
Growl.prototype.render=function(){var $growl;$growl=this.$growl();this.$growls().append($growl);this.cycle($growl)};Growl.prototype.bind=function($growl){if($growl==null){$growl=this.$growl()}
return $growl.find("."+this.settings.namespace+"-close").on("click",this.close)};Growl.prototype.unbind=function($growl){if($growl==null){$growl=this.$growl()}
return $growl.find("."+(this.settings.namespace-close)).off("click",this.close)};Growl.prototype.cycle=function($growl){if($growl==null){$growl=this.$growl()}
return $growl.queue(this.present).delay(this.settings.duration).queue(this.dismiss).queue(this.remove)};Growl.prototype.close=function(event){var $growl;event.preventDefault();event.stopPropagation();$growl=this.$growl();return $growl.stop().queue(this.dismiss).queue(this.remove)};Growl.prototype.present=function(callback){var $growl;$growl=this.$growl();this.bind($growl);return this.animate($growl,""+this.settings.namespace+"-incoming",'out',callback)};Growl.prototype.dismiss=function(callback){var $growl;$growl=this.$growl();this.unbind($growl);return this.animate($growl,""+this.settings.namespace+"-outgoing",'in',callback)};Growl.prototype.remove=function(callback){this.$growl().remove();return callback()};Growl.prototype.animate=function($element,name,direction,callback){var transition;if(direction==null){direction='in'}
transition=Animation.transition($element);$element[direction==='in'?'removeClass':'addClass'](name);$element.offset().position;$element[direction==='in'?'addClass':'removeClass'](name);if(callback==null){return}
if(transition!=null){$element.one(transition,callback)}else{callback()}};Growl.prototype.$growls=function(){return this.$_growls!=null?this.$_growls:this.$_growls=$('#growls')};Growl.prototype.$growl=function(){return this.$_growl!=null?this.$_growl:this.$_growl=$(this.html())};Growl.prototype.html=function(){return"<div class='"+this.settings.namespace+" "+this.settings.namespace+"-"+this.settings.style+" "+this.settings.namespace+"-"+this.settings.size+"'>\n  <div class='"+this.settings.namespace+"-close'>"+this.settings.close+"</div>\n  <div class='"+this.settings.namespace+"-title'>"+this.settings.title+"</div>\n  <div class='"+this.settings.namespace+"-message'>"+this.settings.message+"</div>\n</div>"};return Growl})();$.growl=function(options){if(options==null){options={}}
return Growl.growl(options)};$.growl.error=function(options){var settings;if(options==null){options={}}
settings={title:"Error!",style:"error"};return $.growl($.extend(settings,options))};$.growl.notice=function(options){var settings;if(options==null){options={}}
settings={title:"Notice!",style:"notice"};return $.growl($.extend(settings,options))};$.growl.warning=function(options){var settings;if(options==null){options={}}
settings={title:"Warning!",style:"warning"};return $.growl($.extend(settings,options))}}).call(this);(function(k){'use strict';k(['jquery'],function($){var j=$.scrollTo=function(a,b,c){return $(window).scrollTo(a,b,c)};j.defaults={axis:'xy',duration:0,limit:!0};j.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(f,g,h){if(typeof g=='object'){h=g;g=0}if(typeof h=='function')h={onAfter:h};if(f=='max')f=9e9;h=$.extend({},j.defaults,h);g=g||h.duration;h.queue=h.queue&&h.axis.length>1;if(h.queue)g/=2;h.offset=both(h.offset);h.over=both(h.over);return this._scrollable().each(function(){if(f==null)return;var d=this,$elem=$(d),targ=f,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=win?$(targ):$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}var e=$.isFunction(h.offset)&&h.offset(d,targ)||h.offset;$.each(h.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=j.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(h.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=e[pos]||0;if(h.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*h.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(h.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&h.queue){if(old!=attr[key])animate(h.onAfterFirst);delete attr[key]}});animate(h.onAfter);function animate(a){$elem.animate(attr,g,h.easing,a&&function(){a.call(this,targ,h)})}}).end()};j.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}return j})}(typeof define==='function'&&define.amd?define:function(a,b){if(typeof module!=='undefined'&&module.exports){module.exports=b(require('jquery'))}else{b(jQuery)}}));(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);document.addEventListener('DOMContentLoaded',function(){$('#page_preloader').hide();$('div#pspe_modal').find('span.email-response').removeClass('show-message');$('div#mg-fastorder').magnificPopup({delegate:'button',removalDelay:500,callbacks:{beforeOpen:function(){var img_url=$('#order-image').attr('src');$('#order-image').attr('src',img_url);$('#fo_id_product_attribute').val(id_product_attribute)
$('#fo_id_product').val(id_product)
$('div#pspe_modal').find('.pspe-loading').removeClass('show');$('#page_preloader').hide();$('#pspe_modal').find('span.email-response').removeClass('error');$('div#pspe_modal').find('span.email-response').removeClass('show-message');this.st.mainClass=this.st.el.attr('data-effect')},beforeClose:function(){if(enable_hinge)
$('div#pspe_modal').addClass('hinge');else jQuery('.mfp-wrap').css('background','transparent')},close:function(){if(enable_hinge)
$('div#pspe_modal').removeClass('hinge')},open:function(){var url=$('#ecm_fo7-btn').data('url');$.mask.definitions['~']='[1-2,4-9]';var phone_mask='+380~99999999';$('#fo_phone').mask(phone_mask);jQuery('.mfp-wrap').css('background',overlay_color);combination_price=0;var carrier;$('#fo_redirect').val($("input[name=fo_payment_method]:checked").attr('fo_redirect'));$('#fo_href').val($("input[name=fo_payment_method]:checked").attr('fo_href'));quantity=$('#quantity_wanted').val();$("#quantity_to_order").val(quantity).change();if(typeof combinationsFromController!=='undefined'){id_combination=$('#idCombination').val();var data={'process':'getCombination','ajax':1,'idProduct':id_product,'idProductAttribute':id_product_attribute,'idCombination':id_combination};$.post(url,data,null,'json').then(function(resp){$("#attributes_fo").html(resp.html)}).fail(function(resp){prestashop.emit('handleError',{eventType:'clickEcm_fo7Add',resp:resp})});$.each(combinationsFromController,function(key,value){if(key==id_combination)
$combination=value});if($combination.id_image!=-1){newSrc=baseDir+'img/p/'+$combination.id_image.toString().split('').join('/')+'/'+$combination.id_image+'-home_default.jpg'
$('#order-image').attr('src',newSrc)}
if(quantity<$combination.quantity){$("#quantity_to_order").val($combination.quantity).change();$("#quantity_to_order").attr('value',$combination.quantity)}
combination_price=$combination.price}
realPrice=Number(price)+Number(combination_price);summ=Math.round(Number(quantity)*Number(realPrice)*100)/100;realPrice=(currency.blank==0)?(currency.sign+realPrice):realPrice+' '+currency.sign;summ=(currency.blank==0)?(currency.sign+summ):summ+' '+currency.sign;$("#price_display").text(realPrice);$("#summ").text(summ);$("#quantity_to_order").change(function(){summ=Math.round(Number($('#quantity_to_order').val())*(parseFloat(realPrice))*100)/100;summ=(currency.blank==0)?(currency.sign+summ):summ+' '+currency.sign;$("#summ").text(summ);$('#quantity_wanted').val($('#quantity_to_order').val())});$("#quantity_wanted").change(function(){quantity=$('#quantity_wanted').val();$("#quantity_to_order").val(quantity).change();summ=Math.round(Number($('#quantity_to_order').val())*(parseFloat(realPrice))*100)/100;summ=(currency.blank==0)?(currency.sign+summ):summ+' '+currency.sign;$("#summ").text(summ)});$(".fo_payment_method").change(function(){$('#fo_redirect').val($("input[name=fo_payment_method]:checked").attr('fo_redirect'));$('#fo_href').val($("input[name=fo_payment_method]:checked").attr('fo_href'));$('#fo_module').val($("input[name=fo_payment_method]:checked").attr('fo_module'))})}}});function mgpe_close_popup(){price=price_stek;$.magnificPopup.close()}
$("#mg-fastorder-form").on('submit',(function(e){e.preventDefault();if(!validateRadio($("#mg-fastorder-form")[0].fo_carrier)){alert($('.fo_carrier').attr('fo_carrier_error'));return!1}
if(!validateRadio($("#mg-fastorder-form")[0].fo_payment_method)){alert($('.fo_payment_method').attr('fo_payment_error'));return!1}
var send=$('form[name=mg-fastorder-form]').serializeArray();send.push({'name':'process','value':'processCart'},{'name':'ajax','value':1});var response=$('#g-recaptcha-response').val();if(enable_recaptcha&&response.length>0||!enable_recaptcha){$('div#pspe_modal').find('.pspe-loading').addClass('show');$('#page_preloader').show();$.post($('#ecm_fo7-btn').data('url'),send,null,'json').then(function(result){console.log(result);if(!result.hasError){$('div#pspe_modal').find('.pspe-loading').removeClass('show');$('#page_preloader').hide();$('div#pspe_modal').find('span.email-response').addClass('show-message');$('div#pspe_modal').find('span.email-response').html(result.success_message);document.location.href=result.href;return!1}else{$('div#pspe_modal').find('.pspe-loading').removeClass('show');$('#page_preloader').hide();$('div#pspe_modal').find('span.email-response').addClass('show-message').addClass('error');$('div#pspe_modal').find('span.email-response').html(result.error)}}).fail(function(resp){prestashop.emit('handleError',{eventType:'clickEcm_fo7Add',resp:resp})})}}));$(document).on('click','.fo_quantity_up',function(e){e.preventDefault();fieldName=$(this).data('field-qty');var currentVal=parseInt($('input[name='+fieldName+']').val());if(!allowBuyWhenOutOfStock&&quantityAvailable>0)
quantityAvailableT=quantityAvailable;else quantityAvailableT=100000000;if(!isNaN(currentVal)&&currentVal<quantityAvailableT)
$('input[name='+fieldName+']').val(currentVal+1).trigger('keyup');else $('input[name='+fieldName+']').val(quantityAvailableT);$('#'+fieldName).change()});$(document).on('click','.fo_quantity_down',function(e){e.preventDefault();fieldName=$(this).data('field-qty');var currentVal=parseInt($('input[name='+fieldName+']').val());if(!isNaN(currentVal)&&currentVal>1)
$('input[name='+fieldName+']').val(currentVal-1).trigger('keyup');else $('input[name='+fieldName+']').val(1);$('#'+fieldName).change()});$(".js-touchspin").click(function(){var currentVal=parseInt($("#quantity_to_order").val());if($(this).data('action')=='up'){$("#quantity_to_order").val(currentVal+1).trigger('keyup');$("#quantity_to_order").change()}else if($(this).data('action')=='down'){if(currentVal>1){$("#quantity_to_order").val(currentVal-1).trigger('keyup');$("#quantity_to_order").change()}}})});function validateRadio(radios=undefined){if(radios!=undefined){for(i=0;i<radios.length;++i){if(radios[i].checked)
return!0}
return!1}
return!0}
function post(path,params,method){method=method||"post";$('#order-validation').remove();var form=document.createElement("form");form.setAttribute("id","order-validation");form.setAttribute("name","order-validation");form.setAttribute("method",method);form.setAttribute("action",path);for(var key in params){if(params.hasOwnProperty(key)){var hiddenField=document.createElement("input");hiddenField.setAttribute("type","hidden");hiddenField.setAttribute("name",key);hiddenField.setAttribute("value",params[key]);form.appendChild(hiddenField)}}
document.body.appendChild(form);$('#order-validation').submit()}
if(typeof($)=='function'){$(document).ajaxComplete(function(event,xhr,settings){if(prestashop.page.page_name=='product'&&typeof(xhr.responseJSON)!='undefined')
id_product_attribute=xhr.responseJSON.id_product_attribute})};var matched,browser;jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}};matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=!0;browser.version=matched.version}
if(browser.chrome){browser.webkit=!0}else if(browser.webkit){browser.safari=!0}
jQuery.browser=browser;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options)})},result:function(handler){return this.bind("result",handler)},search:function(handler){return this.trigger("search",[handler])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(options){return this.trigger("setOptions",[options])},unautocomplete:function(){return this.trigger("unautocomplete")}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var $loading=$input.parent().find('.leoproductsearch-loading');var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:!1};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=!1;return!1}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev()}else{onChange(0,!0)}
break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next()}else{onChange(0,!0)}
break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp()}else{onChange(0,!0)}
break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown()}else{onChange(0,!0)}
break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=!0;return!1}
break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break}}).focus(function(){hasFocus++}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults()}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,!0)}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break}}}
if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value])}
$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback)})}).bind("flushCache",function(){cache.flush()}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data" in arguments[1])
cache.populate()}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete")});function selectCurrent(){var selected=select.selected();if(!selected)
return!1;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v}
v+=options.multipleSeparator}
$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return!0}
function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return}
var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue)
return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)
currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow)}else{stopLoading();select.hide()}};function trimWords(value){if(!value){return[""]}
var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))
result[i]=$.trim(value)});return result}
function lastWord(value){if(!options.multiple)
return value;var words=trimWords(value);return words[words.length-1]}
function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length)}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200)};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""))}else $input.val("")}})}
if(wasVisible)
$.Autocompleter.Selection(input,input.value.length,input.value.length)};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show()}else{hideResultsNow()}};function request(term,success,failure){$loading.show();if(!options.matchCase)
term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data)}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({cate:$('input[name="cate"]').val(),q:lastWord(term),limit:options.max},extraParams),success:function(data){var str='<div>';if(data.products.length){str+='<div class="search-in-product">';str+='<ul>';for(i=0;i<data.products.length;i++){if(i%2==0){str+='<li class="ac_event"><a href="'+data.products[i].link+'">'}else{str+='<li class="ac_old"><a href="'+data.products[i].link+'">'}
if(lps_show_product_img){if(data.products[i].cover!=null){str+='<div class="lps-result-img"><img class="img-fluid" align = "center" src='+data.products[i].cover.bySize.small_default.url+'></div>'}else{str+='<div class="lps-result-img no-image"></div>'}}
str+='<div class="lps-result-content"><div class="lps-result-title">'+data.products[i].name+'</div>'+'<div class="lps-result-price">'+data.products[i].price+'</div></a></li>'}
str+='</ul>';str+='</div>';str+='</div>';str+='<div class="all-search-product">';str+='<a href="'+data.link+'">'+$("#leosearchtopbox").data('view-all')+' ('+data.total_items+' '+$("#leosearchtopbox").data('label-products')+')</a>'
str+='</div>'}else{str+="<div class='no-products'>"+text_no_product+"</div>";str+='</div>'}
$(".leoproductsearch-result .ac_results").html(str);$(".leoproductsearch-result .ac_results").show();$(".suggest-item").click(function(){$("#leo_search_query_top").val($(this).attr('href'));onChange(0,!0);return!1});$("div.search-in-product ul li").on("mouseenter",function(){$(this).addClass('ac_over')}).on("mouseleave",function(){$(this).removeClass('ac_over')});$loading.hide()}})}else{select.emptyList();failure(term)}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]}}}
return parsed};function stopLoading(){$input.removeClass(options.loadingClass)}};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results lps_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(row){return row[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)
s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return!1;return i==0||options.matchContains};function add(q,cate,value){if(length>options.cacheLength){flush()}
if(!data[q]){length++}
data[q]=value}
function populate(){if(!options.data)return!1;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===!1)
continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])
stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row)}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value)})}
setTimeout(populate,25);function flush(){data={};length=0}
return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)
return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x)}})}}
return csub}else if(data[q]){return data[q]}else if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x}});return csub}}}
return null}}};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=!0,element,list;function init(){if(!needsInit)
return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo('.leoproductsearch-result');list=$("<div/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE)}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return!1}).mousedown(function(){config.mouseDownOnSelect=!0}).mouseup(function(){config.mouseDownOnSelect=!1});if(options.width>0)
element.css("width",options.width);needsInit=!1}
function target(event){var element=event.target;while(element&&element.tagName!="LI")
element=element.parentNode;if(!element)
return[];return element}
function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight())}else if(offset<list.scrollTop()){list.scrollTop(offset)}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1}else if(active>=listItems.size()){active=0}}
function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available}
function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])
continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===!1)
continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i])}
listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0}
if($.fn.bgiframe)
list.bgiframe()}
return{display:function(d,q){init();data=d;term=q;fillList()},next:function(){moveSelect(1)},prev:function(){moveSelect(-1)},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active)}else{moveSelect(-8)}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active)}else{moveSelect(8)}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1},visible:function(){return element&&element.is(":visible")},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0])},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:($(input).width()+parseInt($(input).css('padding-left'))+parseInt($(input).css('padding-right'))+parseInt($(input).css('margin-left'))+parseInt($(input).css('margin-right'))),top:"100%",left:0}).show();if(options.scroll){list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")))}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data")},emptyList:function(){list&&list.empty()},unbind:function(){element&&element.remove()}}};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(!0);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select()}else if(field.setSelectionRange){field.setSelectionRange(start,end)}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end}}
field.focus()}})(jQuery);var instantSearchQueries=[];$(document).click(function(event){var $target=$(event.target);if(!$target.closest('.leoproductsearch-content').length){$(".leoproductsearch-result .ac_results").hide()}});$(document).ready(function(){$('#leo_search_query_top').click(function(){if($(this).val().length>2){$(".leoproductsearch-result .ac_results").show()}});if(typeof ajaxsearch!='undefined'&&ajaxsearch&&typeof blocksearch_type!=='undefined'&&blocksearch_type){var width_ac_results=$("#leo_search_query_"+blocksearch_type).outerWidth();$("#leo_search_query_"+blocksearch_type).autocomplete(leo_search_url,{minChars:3,max:numpro_display,width:(width_ac_results>0?width_ac_results:500),selectFirst:!1,scroll:!1,dataType:"json",formatItem:function(data,i,max,value,term){return value},extraParams:{ajaxSearch:1,id_lang:prestashop.language.id,leoproductsearch_static_token:leoproductsearch_static_token,leoproductsearch_token:leoproductsearch_token}}).result(function(event,data,formatted){$('#leo_search_query_'+blocksearch_type).val(data.name);document.location.href=data.url});$("#leo_search_query_"+blocksearch_type).click(function(){width_ac_results=$(this).outerWidth();$(this).setOptions({width:width_ac_results})})}
$('.cate-item').click(function(){if(!$(this).hasClass('active')){$('.cate-item.active').removeClass('active');var cate_id=$(this).data('cate-id');var cate_name=$(this).data('cate-name');$('#leosearch-cate-id').val(cate_id);$('#leosearchtop-cate-id').val(cate_id);$('#dropdownListCate span').text(cate_name);$('#dropdownListCateTop span').text(cate_name);$(this).addClass('active')}
$('#dropdownListCate').trigger('click');$('#dropdownListCateTop').trigger('click');var e=jQuery.Event("keydown");e.keyCode=40;$(this).parents('form').find('.search_query').focus().trigger(e);return!1});$('.search_query').click(function(){if($(this).val()!=''){}});$('.search_query').change(function(){if($(this).val()!=''){var e=jQuery.Event("keydown");e.keyCode=40;$(this).trigger(e)}})});$(window).resize(function(){updatePositionOfResult()});function updatePositionOfResult(){if($('.ac_results').length){width_ac_results=$("#leo_search_query_"+blocksearch_type).outerWidth();$("#leo_search_query_"+blocksearch_type).setOptions({width:width_ac_results});$('.ac_results').width(width_ac_results)}}
function tryToCloseInstantSearch(){if($('#old_center_column').length>0){$('#center_column').remove();$('#old_center_column').attr('id','center_column');$('#center_column').show();return!1}}
function stopInstantSearchQueries(){for(i=0;i<instantSearchQueries.length;i++)
instantSearchQueries[i].abort();instantSearchQueries=new Array()};$(document).ready(function(){var $searchWidget=$('#search_widget');var $searchBox=$searchWidget.find('input[type=text]');var searchURL=$searchWidget.attr('data-search-controller-url');$.widget('prestashop.psBlockSearchAutocomplete',$.ui.autocomplete,{_renderItem:function(ul,product){return $("<li>").append($("<a>").append($("<span>").html(product.category_name).addClass("category")).append($("<span>").html(' > ').addClass("separator")).append($("<span>").html(product.name).addClass("product"))).appendTo(ul)}});$searchBox.psBlockSearchAutocomplete({source:function(query,response){$.post(searchURL,{s:query.term,resultsPerPage:10},null,'json').then(function(resp){response(resp.products)}).fail(response)},select:function(event,ui){var url=ui.item.url;window.location.href=url},})});/**
 * 2007-2020 PrestaShop and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2020 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */
$(document).ready(function(){prestashop.blockcart=prestashop.blockcart||{};var showModal=prestashop.blockcart.showModal||function(modal){var $body=$('body');$body.append(modal);$body.one('click','#blockcart-modal',function(event){if(event.target.id==='blockcart-modal'){$(event.target).remove()}})};prestashop.on('updateCart',function(event){var refreshURL=$('.blockcart').data('refresh-url');var requestData={};if(event&&event.reason&&typeof event.resp!=='undefined'&&!event.resp.hasError){requestData={id_customization:event.reason.idCustomization,id_product_attribute:event.reason.idProductAttribute,id_product:event.reason.idProduct,action:event.reason.linkAction}}
if(event&&event.resp&&event.resp.hasError){prestashop.emit('showErrorNextToAddtoCartButton',{errorMessage:event.resp.errors.join('<br/>')})}
$.post(refreshURL,requestData).then(function(resp){var html=$('<div />').append($.parseHTML(resp.preview));$('.blockcart').replaceWith($(resp.preview).find('.blockcart'));if(resp.modal){setTimeout(function(){$('#blockcart-modal-ecm').modal('show')},500)}}).fail(function(resp){prestashop.emit('handleError',{eventType:'updateShoppingCart',resp:resp})})})});$(document).ready(function(){$.each(list_menu,function(index,value){if(value.type=="horizontal"){var megamenu_element=$('.cavas_menu[data-megamenu-id='+value.id+']');if($("body").attr("id")=="index")isHomeMenu=1;megamenu_element.find(".megamenu > li > a").each(function(){menuURL=$(this).attr("href").replace("https://","").replace("http://","").replace("www.","").replace(/#\w*/,"");if((currentURL==menuURL)||(currentURL.replace(current_link,"")==menuURL)||isHomeMenu){$(this).parent().addClass("active");return!1}});if($(window).width()<=767){set_target_blank(!1,megamenu_element)}else{set_target_blank(!0,megamenu_element)}
if(value.show_cavas==1){$.fn.OffCavasmenu=function(opts){var config=$.extend({},{opt1:null,text_warning_select:text_warning_select_txt,text_confirm_remove:text_confirm_remove_txt,JSON:null},opts);this.each(function(){var $btn=megamenu_element.find('.navbar-toggler');var $nav=null;if(!$btn.length)
return;var $nav=$("<section class='off-canvas-nav-megamenu' data-megamenu-id="+value.id+"><nav class='offcanvas-mainnav' ><div class='off-canvas-button-megamenu'><span class='off-canvas-nav'></span>"+close_bt_txt+"</div></nav></section>");var $menucontent=$($btn.data('target')).find('.megamenu').clone();$("body").append($nav);$('body main').append("<div class='megamenu-overlay' data-megamenu-id="+value.id+"></div>");$(".megamenu-overlay[data-megamenu-id="+value.id+"]").click(function(){$btn.trigger('click')});$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"] .offcanvas-mainnav").append($menucontent);$("html").addClass("off-canvas");$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").find(".off-canvas-button-megamenu").click(function(){off_canvas_active()});if($btn.is(':visible')){$("body").removeClass("off-canvas-active").addClass("off-canvas-inactive")}
$btn.click(function(){off_canvas_active();$('.off-canvas-nav-megamenu').removeClass('active');if(!$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").hasClass('active')&&$('body').hasClass('off-canvas-active')){$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").addClass('active');auto_height(value.id)}})});return this}
megamenu_element.OffCavasmenu();megamenu_element.find('.navbar-toggler').click(function(){$('body,html').animate({scrollTop:0},0);return!1});$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").find('.offcanvas-mainnav .caret').click(function(){if($(this).parent('li').hasClass('open-sub')){$(this).parent('li').find('.dropdown-menu').first().slideUp('fast',function(){auto_height(value.id)});$(this).parent('li').removeClass('open-sub')}else{$(this).parent('li').siblings('.open-sub').find('.dropdown-menu').first().slideUp('fast');$(this).parent('li').siblings().removeClass('open-sub');$(this).parent('li').find('.dropdown-menu').first().slideDown('fast',function(){auto_height(value.id)});$(this).parent('li').addClass('open-sub')}});$(window).resize(function(){if($(window).width()>991){$("body").removeClass("off-canvas-active").addClass("off-canvas-inactive")}else{auto_height(value.id)}})}else{var $bt=megamenu_element.find('.navbar-toggler');var $menu=megamenu_element.find('.leo-top-menu');$bt.click(function(){if($menu.hasClass('in')){megamenu_element.removeClass('active')}else{if(!megamenu_element.hasClass('active')){megamenu_element.addClass('active')}}});megamenu_element.find('.leo-top-menu .dropdown-toggle').removeAttr("disabled");megamenu_element.find(".dropdown-toggle").click(function(){if($(window).width()<=767){if($(this).parent("li").find("div:first").hasClass("level2"))
return!1;else return!0}});megamenu_element.find(".leo-top-menu li a").each(function(){if((this).hasAttribute('data-toggle')){$(this).removeAttr('data-toggle')}});megamenu_element.find(".leo-top-menu li a.dropdown-toggle").click(function(){if(!$(this).parent().hasClass('open')&&this.href&&this.href!='#'){window.location.href=this.href}})
megamenu_element.find(".leo-top-menu .caret").click(function(){if($(this).parent('li').hasClass('open-sub')){$(this).parent('li').find('.dropdown-menu').first().slideUp('fast',function(){auto_height_off(megamenu_element)});$(this).parent('li').removeClass('open-sub')}else{$(this).parent('li').siblings('.open-sub').find('.dropdown-menu').first().slideUp('fast');$(this).parent('li').siblings().removeClass('open-sub');$(this).parent('li').find('.dropdown-menu').first().slideDown('fast',function(){auto_height_off(megamenu_element)});$(this).parent('li').addClass('open-sub')}});if($(document).width()>543){megamenu_element.find('.leo-top-menu .dropdown-menu').css('display','')}
auto_height_off(megamenu_element);$(window).resize(function(){auto_height_off(megamenu_element);if($(document).width()>543){megamenu_element.find('.leo-top-menu .dropdown').removeClass('open-sub');megamenu_element.find('.leo-top-menu .dropdown-submenu').removeClass('open-sub');megamenu_element.find('.leo-top-menu .dropdown-menu').css('display','')}})}}else{var megamenu_element=$('.leo-verticalmenu[data-megamenu-id='+value.id+']');megamenu_element.find('.verticalmenu .dropdown-toggle').removeAttr("disabled");megamenu_element.find(".verticalmenu .dropdown-toggle").click(function(){if($(window).width()<=767){if(page=='module-leobootstrapmenu-catalog'){$(this).next().trigger('click')}
if($(this).parent("li").find("div:first").hasClass("level2")){return!1}else{return!0}}});megamenu_element.find('.verticalmenu .dropdown-toggle').removeAttr('data-toggle');megamenu_element.find(".verticalmenu .caret").click(function(){if($(this).parents('.verticalmenu').hasClass('active-button')){var $parent=$(this).parent('li');if($parent.hasClass('open-sub')){$parent.find('.dropdown-menu').first().slideUp('fast',function(){$parent.removeClass('open-sub')})}else{if($parent.siblings('.open-sub').length>0){$parent.siblings('.open-sub').find('.dropdown-menu').first().slideUp('fast',function(){$parent.siblings('.open-sub').removeClass('open-sub')});$parent.find('.dropdown-menu').first().slideDown('fast',function(){$parent.addClass('open-sub')})}else{$parent.find('.dropdown-menu').first().slideDown('fast',function(){$parent.addClass('open-sub')})}}
return!1}});if($(window).width()>991){megamenu_element.find('.verticalmenu').addClass('active-hover');megamenu_element.find('.verticalmenu').removeClass('active-button');megamenu_element.find('.verticalmenu .dropdown-menu').css('display','');megamenu_element.find('.leo-verticalmenu').removeClass('active')}else{megamenu_element.find('.verticalmenu').removeClass('active-hover');megamenu_element.find('.verticalmenu').addClass('active-button')}
$(window).resize(function(){if($(window).width()>991){megamenu_element.find('.verticalmenu .dropdown').removeClass('open-sub');megamenu_element.find('.verticalmenu .dropdown-submenu').removeClass('open-sub');megamenu_element.find('.verticalmenu').addClass('active-hover');megamenu_element.find('.verticalmenu').removeClass('active-button');megamenu_element.find('.verticalmenu .dropdown-menu').css('display','');megamenu_element.removeClass('active')}else{megamenu_element.find('.verticalmenu').removeClass('active-hover');megamenu_element.find('.verticalmenu').addClass('active-button')}});scrollSliderBarMenu(megamenu_element)}
if(typeof value.list_tab!=='undefined'&&value.list_tab.length>0){$.each(value.list_tab,function(key,val){megamenu_element.find('#tabhtml'+val+' .nav a').click(function(e){e.preventDefault();$(this).tab('show')})
$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").find('#tabhtml'+val+' .nav a').click(function(e){e.preventDefault();if(!$(this).hasClass('active')){var wrapper_tab=$(this).closest('.panel-group');var tab_href=$(this).attr('href');wrapper_tab.find('.nav-link').removeClass('active');wrapper_tab.find('.nav-item').removeClass('active');wrapper_tab.find('.tab-pane').removeClass('active');$(this).addClass('active');$(this).parents('.nav-item').addClass('active');wrapper_tab.find(tab_href).addClass('active')}})})}
if(typeof value.level!=='undefined'&&typeof value.limit!=='undefined'){megamenu_element.find('.widget-category_image ul.level0').each(function(){$(this).find('ul').removeClass('dropdown-sub dropdown-menu')});megamenu_element.find(".widget-category_image ul.level0").each(function(){var check_level=$(this).parents('.widget-category_image').data('level');var check_limit=$(this).parents('.widget-category_image').data('limit');$(this).find("ul.level"+check_level).parent().find('.caret').remove();$(this).find("ul.level"+check_level+" li").remove();var element=$(this).find("ul.level"+(check_level-1)+" li").length;var count=0;if(check_level>0){$(this).find("ul.level"+(check_level-1)+" >li").each(function(){count=count+1;if(count>check_limit){$(this).remove()}})}});$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"] .offcanvas-mainnav").find(".widget-category_image ul.level0").each(function(){var check_level=$(this).parents('.widget-category_image').data('level');var check_limit=$(this).parents('.widget-category_image').data('limit');$(this).find("ul.level"+check_level).parent().find('.caret').remove();$(this).find("ul.level"+check_level+" li").remove();var element=$(this).find("ul.level"+(check_level-1)+" li").length;var count=0;if(check_level>0){$(this).find("ul.level"+(check_level-1)+" >li").each(function(){count=count+1;if(count>check_limit){$(this).remove()}})}})}
if(value.type=="horizontal"){$(window).resize(function(){if($(window).width()<=767){set_target_blank(!1,megamenu_element)}else{set_target_blank(!0,megamenu_element)}})}
if(value.type=="horizontal"&&value.show_cavas==1){$(document.body).on('click','[data-toggle="dropdown"]',function(){if(!$(this).parent().hasClass('open')&&this.href&&this.href!='#'){window.location.href=this.href}})}})
$('.dropdown-menu.level1').parent().removeClass('aligned-fullwidth');$(".fancybox").fancybox({openEffect:'none',closeEffect:'none'})})
function auto_height_off(menu_object){wrapper_height=$("#page").innerHeight();ul_height=menu_object.find(".leo-top-menu ul").innerHeight();ul_offset_top=menu_object.find(".leo-top-menu ul").offset().top;if(ul_offset_top+ul_height>wrapper_height){if(!$("#page").hasClass('megamenu-autoheight')){$("#page").addClass('megamenu-autoheight')}}else{$("#page").removeClass('megamenu-autoheight')}}
function auto_height(menu_id){windowHeight=$(window).innerHeight();$(".off-canvas-nav-megamenu[data-megamenu-id="+menu_id+"] .offcanvas-mainnav").css('min-height',windowHeight)}
function off_canvas_active(){if($('body').hasClass('off-canvas-active')){$("body").removeClass("off-canvas-active").addClass("off-canvas-inactive")}else if($('body').hasClass('off-canvas-inactive')){$("body").removeClass("off-canvas-inactive").addClass("off-canvas-active")}else{$("body").addClass("off-canvas-active")}}
function set_target_blank(show,megamenu_element){if(show){megamenu_element.find(".leo-top-menu li a").each(function(){if($(this).hasClass('has-category')&&(this).hasAttribute('data-toggle')&&$(this).attr('target')=='_blank'){var value=$(this).attr('data-toggle');$(this).removeAttr('data-toggle');$(this).attr('remove-data-toggle',value)}})}else{megamenu_element.find(".leo-top-menu li a").each(function(){if($(this).hasClass('has-category')&&(this).hasAttribute('remove-data-toggle')&&$(this).attr('target')=='_blank'){var value=$(this).attr('remove-data-toggle');$(this).removeAttr('remove-data-toggle');$(this).attr('data-toggle',value)}})}}
function scrollSliderBarMenu(megamenu_element){var menuElement=megamenu_element;var columnElement=null;var maxWindowSize=991;megamenu_element.find(".verticalmenu-button").click(function(e){e.stopPropagation();e.stopImmediatePropagation();window.location=catalog_link;return!1});if($(columnElement).length&&$(window).width()>=maxWindowSize){showOrHideSliderBarMenu(columnElement,menuElement,1)}
megamenu_element.find(".verticalmenu-button").on('mouseenter',function(){if($(window).width()>maxWindowSize){$(menuElement).addClass('active')
showOrHideSliderBarMenu(columnElement,menuElement,1)}});megamenu_element.find("ul.nav.navbar-nav.megamenu.vertical.right li.end_border").on('mouseenter',function(){if($(window).width()>767){megamenu_element.find("ul.nav.navbar-nav.megamenu.vertical.right").addClass('li_is_hovered')}}).on('mouseleave',function(){if($(window).width()>767){megamenu_element.find("ul.nav.navbar-nav.megamenu.vertical.right").removeClass('li_is_hovered')}});megamenu_element.find('.box-content.block_content').on('click',function(){showOrHideSliderBarMenu(columnElement,menuElement,0)})
megamenu_element.find('.nav-item.parent.dropdown').on('mouseenter',function(){vertical_menu=megamenu_element.find('.verticalmenu');vertical_menu_bottom=vertical_menu.height()+vertical_menu.offset().top;item=$(this).find('.dropdown-sub.dropdown-menu');bottom=item.height()+item.offset().top;delta=bottom-vertical_menu_bottom
if(delta>0){item.css('top',-delta-33)}})
let delayTimer;let delayTimer1;megamenu_element.find('.box-content_opasity').on('click',function(){showOrHideSliderBarMenu(columnElement,menuElement,0)}).on('mouseenter',function(){delayTimer=setTimeout(function(){showOrHideSliderBarMenu(columnElement,menuElement,0)},1000)}).on('mouseleave',function(e){var mouseX=e.pageX;var mouseY=e.pageY;var targetElement=document.elementFromPoint(mouseX,mouseY);if($(targetElement).closest('.vertical-menu').length>0){clearTimeout(delayTimer)}});$('.ApMegamenu .leo-verticalmenu').on('mouseenter',function(){clearTimeout(delayTimer1)}).on('mouseleave',function(e){var mouseX=e.pageX;var mouseY=e.pageY;var targetElement=document.elementFromPoint(mouseX,mouseY);if(!($(targetElement).closest('.leo-verticalmenu .verticalmenu').length>0)){delayTimer1=setTimeout(function(){showOrHideSliderBarMenu(columnElement,menuElement,0)},1000)}});var lastWidth=$(window).width();$(window).resize(function(){if($(window).width()!=lastWidth){if($(window).width()<maxWindowSize){if($(menuElement).hasClass('active'))showOrHideSliderBarMenu(columnElement,menuElement,0)}else{if($(columnElement).length&&!$(menuElement).hasClass('active'))showOrHideSliderBarMenu(columnElement,menuElement,1)}
lastWidth=$(window).width()}})}
function showOrHideSliderBarMenu(columnElement,menuElement,active){if(active){$(menuElement).addClass('active');if($(columnElement).length&&$(window).width()>=991)
columnElement.css('padding-top',($('.block_content',$(menuElement)).height())+'px')}else{$(menuElement).removeClass('active');if($(columnElement).length)columnElement.css('padding-top','')}};document.addEventListener('DOMContentLoaded',function(){$(document).on('click','.live_scroll_element.streets_up .drop_down_ul li',function(){$('#StreetSearch_up').val($('#RecipientStreet_up').val()).change();$('#StreetRef_up').val($(this).data('streetref')).change();$('#RecipientStreet_up').val($(this).data('streetname')).change();$('#StreetType_up').val($(this).data('streettype')).change();$('.StreetType_up').text($(this).data('streettype'));indexstreetsearch();$('.live_scroll_element.streets_up').hide()}).on('focus','#RecipientStreet_up',function(){this.removeAttribute('readonly');$('.live_scroll_element').hide();$('.live_scroll_element.streets_up').width($('#RecipientStreet_up').width())
if($('#delivery_recipient_streets_up').children().length>0){$('.live_scroll_element.streets_up').show()}
if(ecm_shipping_up.is_Mobile){this.setSelectionRange(0,this.value.length)}}).on('input insert','#RecipientStreet_up',function(){var $this=$(this);clearTimeout($this.data('timeout'));var timeout=setTimeout(function(){if($this.val().length>2){live_search_streets_up($this.val(),!0)}},searchDelay);$this.data('timeout',timeout)}).mouseup(function(e){var obj=$(".live");if(!obj.is(e.target)&&obj.has(e.target).length===0){$('.live_scroll_element').hide()}})})
function live_get_streets_up(city_ref){var data={mode:"city",cityRef:$("#id_city_delivery").val(),lang:$("#id_lang").val(),};if(city_ref!=$('#RecipientStreet_id').val())
$("#id_ware_delivery").val(0);$.ajax({dataType:"json",type:'POST',data:data,url:ecm_shipping_up.module_dir+'classes/refresh_up.php?isolang='+ecm_shipping_up.isolang,success:function(result){var objSel=document.getElementById("id_city_delivery");objSel.options.length=0;var key
for(key in result){objSel.options[objSel.options.length]=new Option(result[key],key)}
$("#id_city_delivery").val(city_ref).change()}})}
function live_search_streets_up(string,ontyped=!1){var data={mode:"streetsearch",referal:string,CityRef:$("#RecipientCity_id_up").val(),lang:$("#id_lang").val(),};$.ajax({type:'POST',dataType:'json',data:data,url:ecm_shipping_up.module_dir+'classes/refresh_up.php?isolang='+ecm_shipping_up.isolang,success:function(result){var content='';result_up=result.list;if(result_up&&result_up.length>0){for(index=0;index<result_up.length;++index){name=result_up[index].STREET_NAME;present=result_up[index].SHORTSTREETTYPE_NAME+' '+name+(result_up[index].OLDSTREET_NAME?' (бувш. '+result_up[index].OLDSTREET_NAME+')':'');content+='<li data-streetref="'+result_up[index].STREET_ID+'" data-streettype="'+result_up[index].SHORTSTREETTYPE_NAME+'" data-streetname="'+name+'" id="'+index+'">'+present+'</li>'}
$('.streets_up .drop_down_ul').html(content);if(ontyped){$('.live_scroll_element.streets_up').show()}}else{}
$('#StreetSearch_up').val(string).change()}})};$(document).ajaxComplete(function(event,xhr,settings){if(!$("#another_recipient").prop("checked")){$(".for_collapse_7").hide();$(".another_recipient").hide();$(".another").prop('required',!1)}else{$(".for_collapse_7").show();$(".another_recipient").show();$(".another").prop('required',!0)}
if($("input[name='to']:checked").val()!='address'){$(".np_address_delivery").hide();$("#StreetName").removeAttr('required')}else{$(".np_address_delivery").show();$('#id_ware_delivery').val("1");$("#StreetName").prop('required',!0)}
np_fill_address();showhide()});function showhide(){if(ecm_novaposhta.id==$("#carrier").val()||ecm_novaposhta.id+','==$('input:radio[class=delivery_option_radio]:checked').val()||ecm_novaposhta.id+','==$('.delivery_option_radio:checked').val()||ecm_novaposhta.id+','==$('input[name^=delivery_option]:checked').val()||'1'+ecm_novaposhta.id+'00'==$('input[name^=id_carrier]:checked').val()){$('.for_hide').hide()}else{$('.for_hide').hide()}}
function getUrlParameter(name){name=name.replace(/[\[]/,'\\[').replace(/[\]]/,'\\]');var regex=new RegExp('[\\?&]'+name+'=([^&#]*)');var results=regex.exec(location.search);return results===null?'':decodeURIComponent(results[1].replace(/\+/g,' '))};document.addEventListener('DOMContentLoaded',function(){if($("#md_page").val()=='order'){var destination=$('#delivery_panel').offset().top-150;if(!$('#md_firstname')[0].checkValidity())showErrorMessage("Ім`я - Недопустимі символи !!!")
if(!$('#md_lastname')[0].checkValidity())showErrorMessage("Прізвище - Недопустимі символи !!!")
if(!$('#md_phone')[0].checkValidity())showErrorMessage("Помилка в номері телефону !!!")
if($("#another_recipient").prop("checked")){if(!$('#another_firstname')[0].checkValidity())showErrorMessage("Ім`я - Недопустимі символи !!!")
if(!$('#another_lastname')[0].checkValidity())showErrorMessage("Прізвище - Недопустимі символи !!!")
if(!$('#another_phone')[0].checkValidity())showErrorMessage("Помилка в номері телефону !!!")}}
if(!$("#another_recipient").prop("checked")){$(".another_recipient").hide()}
if($("#id_ware_out").val()==1){$("#sender_address").show()}else{$("#sender_address").hide()}
if($("#id_ware_out_vip").val()==1){$("#sender_address_vip").show()}else{$("#sender_address_vip").hide()}
if($("input[name='to']:checked").val()!='address'){$(".np_address_delivery").hide();$("#StreetName").removeAttr('required')}else{$(".np_address_delivery").show();$("#StreetName").prop('required',!0)}
add_events();showhide();np_fill_address()});function add_events(){$(document).on("change","input.to",function(e){refreshware();if(this.value=='address'){if(ecm_novaposhta.live){$('.live.ware_delivery').hide()}else{$('.nolive.ware_delivery').hide()}
$('#np_address_delivery').prop('checked',!0).change();$('#np_address_delivery').parent().addClass('checked')}else{$('#np_address_delivery').prop('checked',!1).change();$('#np_address_delivery').parent().removeClass('checked');$('label[for="id_ware_delivery"]').text($(this).data('text'));$('label[for="RecipientWare"]').text($(this).data('text'));if(ecm_novaposhta.live){$('.live.ware_delivery').show();$('.wares .drop_down_ul').html('');$('#RecipientWare_id').val(0);$('#RecipientWare').val('');live_search_wares('')}else{$('.nolive.ware_delivery').show()}}}).on('change','#np_address_delivery',function(){if($(this).prop("checked")){$('#id_ware_delivery').val("1").change();$(".np_address_delivery").show();$("#StreetName").prop('required',!0)}else{$('#id_ware_delivery').val("0").change();$(".np_address_delivery").hide();$("#StreetName").removeAttr('required')}}).on("blur",".np_ontyped",function(){if(this.value){if($(this)[0].checkValidity()){$(this).removeClass('sc-error').addClass('sc-ok');this.defaultValue=this.value;saveform(0)}else{$(this).removeClass('sc-ok').addClass('sc-error');return}}}).on("click",".standard-checkout",function(e){if(!np_isvalid()){e.preventDefault();e.stopPropagation()}}).on('click','.payment_module > a',function(e){if(!np_isvalid()){e.preventDefault();e.stopPropagation()}}).on("click",'button[name=confirmDeliveryOption]',function(e){if(parseInt($('input[name^=delivery_option]:checked').val())==ecm_novaposhta.id&&!np_isvalid()){e.preventDefault();e.stopPropagation()}})
if(button=document.querySelector('.opc-flr')){button.parentElement.addEventListener('click',function(e){if($(e.target).hasClass('opc-flr')){if(!np_isvalid()){e.stopPropagation()}}},!0)}
if(button=document.querySelector('.place_order_ff')){button.parentElement.addEventListener('click',function(e){if($(e.target).hasClass('place_order_ff')){if(!np_isvalid()){e.stopPropagation()}}},!0)}
if(button=document.querySelector('button[name=submitCompleteMyOrder]')){button.parentElement.addEventListener('click',function(e){if(e.target.name=='submitCompleteMyOrder'){if(parseInt($('input[name^=delivery_option]:checked').val())==ecm_novaposhta.id&&!np_isvalid()){e.preventDefault();e.stopPropagation()}}},!0)}
$(document).on('change','.delivery-options-list input[type="radio"]',function(e){if($(e.target).hasClass('to')){return}
do_checked=parseInt($('input[name^=delivery_option]:checked').val());$('.carrier-extra-content').hide();$('.carrier-extra-content.extends_'+do_checked).show()})
if(button=document.getElementById('confirm_order')){button.parentElement.addEventListener('click',function(e){if(e.target.id=='confirm_order'){if(!np_isvalid()){e.stopPropagation()}}},!0)}
if(button=document.getElementById('onepagecheckoutps')){button.parentElement.addEventListener('click',function(e){if(e.target.id=='btn_place_order'){if(!np_isvalid()){e.stopPropagation()}}},!0)}
if(button=document.querySelector('.confirm_button')){button.parentElement.addEventListener('click',function(e){if($(e.target).hasClass('confirm_button')){if(!np_isvalid()){e.stopPropagation()}}},!0)}
if(button=document.getElementById('supercheckout_confirm_order')){button.parentElement.addEventListener('click',function(e){if(e.target.id=='supercheckout_confirm_order'){if(!np_isvalid()){e.stopPropagation()}
saveform(0)}},!0)}}
function np_isvalid(){if(ecm_novaposhta.id==parseInt($('input:radio[class=delivery_option_radio]:checked').val())||ecm_novaposhta.id==parseInt($('.delivery_option_radio:checked').val())||ecm_novaposhta.id==parseInt($('input[name^=delivery_option]:checked').val())||'1'+ecm_novaposhta.id+'00'==$('input[name^=id_carrier]:checked').val()){if($("#another_recipient").prop("checked")){if(document.getElementById("another_firstname").validity.patternMismatch||$('#another_firstname').val()==''){np_alert("Треба заповнити українською");$("#another_firstname").focus();return!1}
if(document.getElementById("another_lastname").validity.patternMismatch||$('#another_lastname').val()==''){np_alert("Треба заповнити українською");$("#another_lastname").focus();return!1}
if(document.getElementById("another_middlename"))
if(document.getElementById("another_middlename").validity.patternMismatch||$('#another_middlename').val()==''){np_alert("Треба заповнити українською");$("#another_middlename").focus();return!1}
if(document.getElementById("another_phone").validity.patternMismatch||$('#another_phone').val()==''){np_alert("Помилка в номері телефону !!!");$("#another_phone").focus();return!1}}
if($("#id_city_delivery").val()=='0'){if(ecm_novaposhta.live){np_alert('Місто не вибрано!');$("#RecipientCity").focus();return!1}
np_alert($('#id_city_delivery option:selected').text());$("#id_city_delivery").focus();return!1}
if($("#id_ware_delivery").val()==null){np_alert('Виберить куди відпраляти!');return!1}
if($("#id_ware_delivery").val()=='0'){np_alert($('#id_ware_delivery option:selected').text());$("#id_ware_delivery").focus();return!1}
if($("#id_ware_delivery").val()=='1'){if($('#StreetName').val()==''){np_alert("Треба заповнити українською хоча б вулицю");$("#StreetName").focus();return!1}}
np_fill_address()}
return!0}
function np_alert(msg){if(typeof($.growl)=='function'){$.growl.error({title:msg,size:"medium",message:msg,})}else{alert(msg)}}
function refreshDeliveryOption(){var data={ajax:"1",action:"selectDeliveryOption",};var url=window.location.href;$.ajax({data:data,url:url,allow_refresh:0,method:'POST',success:function(html){}})}
function np_fill_address(){if($("#md_page").val()!='cart'){return}
if(typeof(ecm_novaposhta)!='object'){return}
if($("#id_ware_delivery  option:selected").val()==undefined||$("#id_ware_delivery  option:selected").val()=='0'){return}
if($('input[name^=delivery_option]:checked').val()&&parseInt($('input[name^=delivery_option]:checked').val())!=ecm_novaposhta.id){return}
if($('#carrier_option').val()&&parseInt($('#carrier_option').val())!=ecm_novaposhta.id){return}
if(ecm_novaposhta.ecm_checkout_active){np_fill_address_sc();return}
if($("#fill").val()=="1"){$("#city").val("");$("#delivery_city").val("");$("#shipping_address[city]").val('');$('input[name="shipping_address[city]"]').val('');$('input[name="city"]').val('');if($("#id_city_delivery  option:selected").val()!='0'){$("#city").val($("#id_city_delivery  option:selected").text()).change();$("#delivery_city").val($("#id_city_delivery  option:selected").text());$("#shipping_address[city]").val($("#id_city_delivery  option:selected").text());$('input[name="shipping_address[city]"]').val($("#id_city_delivery  option:selected").text());$('input[name="city"]').val($("#id_city_delivery  option:selected").text())}
$("#address1").val('');$("#delivery_address1").val('');$("#shipping_address[address1]").val('');$('input[name="shipping_address[address1]"]').val('');$('input[name="address1"]').val('');if($("#id_ware_delivery  option:selected").val()!='0'){if($("#id_ware_delivery  option:selected").val()==1&&$("#StreetName").val()!=''){var StreetName=$("#StreetName").val()+', дім '+$("#BuildingNumber").val()+', кв. '+$("#Flat").val()}else{if($("#id_ware_delivery  option:selected").val()==1&&$("#StreetName").val()==''){var StreetName=''}else{var StreetName=$("#id_ware_delivery  option:selected").text()}}
$("#address1").val(StreetName).change();$("#delivery_address1").val(StreetName);$("#shipping_address[address1]").val(StreetName);$('input[name="shipping_address[address1]"]').val(StreetName);$('input[name="address1"]').val(StreetName)}
if($("#id_area_delivery  option:selected").val()!='0'){$('select[name="shipping_address[id_state]"]').val($("#id_area_delivery  option:selected").attr('area_id'));$('select[name="id_state"]').val($("#id_area_delivery  option:selected").attr('area_id'));$("#shipping_address[id_state]").val($("#id_area_delivery  option:selected").attr('area_id'));$("#delivery_id_state").val($("#id_area_delivery  option:selected").attr('area_id'));$("#id_state").val($("#id_area_delivery  option:selected").attr('area_id')).change()}}}
function np_gettrueurl(){return ecm_novaposhta.module_dir}
function refreshdelivery(cart){var url=np_gettrueurl();var cart_qties=$("#cart_qty").val();var size=[];if($("#nal").prop("checked")){var nal=1}else{var nal=0}
if($("#customsize").prop("checked")){var customsize=1;size[0]=[];size[0][0]=$("#width").val();size[0][1]=$("#height").val();size[0][2]=$("#depth").val();size[0][3]=$("#weight").val();size[0][4]=$("#qty").val();size[0][5]=$("#price").val()}else{var customsize=0;for(var i=0;i<cart_qties;i++){size[i]=[];size[i][0]=$("#width"+i).val();size[i][1]=$("#height"+i).val();size[i][2]=$("#depth"+i).val();size[i][3]=$("#weight"+i).val();size[i][4]=$("#qty"+i).val();size[i][5]=$("#price"+i).val()}}
var data={mode:"refreshdelivery",customer:$("#customer").val(),area:$("#id_area_delivery").val(),city:$("#id_city_delivery").val(),ware:$("#id_ware_delivery").val(),nal:nal,customsize:customsize,cart_qties:cart_qties,sizes:JSON.stringify(size),cart:cart,};$.ajax({data:data,url:url,allow_refresh:1,success:function(html){$("#refreshdelivery").html(html);if(ecm_novaposhta.ac!=1){}}})}
function refreshcity(){var url=np_gettrueurl();var data={mode:"city",area:$("#id_area_delivery").val(),lang:$("#id_lang").val(),};$("#id_city_delivery").val("0");$("#id_ware_delivery").val("0");$('#id_city_delivery').prop('disabled',!0);$('#id_ware_delivery').prop('disabled',!0);$.ajax({dataType:"json",type:"POST",data:data,url:url,success:function(a){var objSel=document.getElementById("id_city_delivery");objSel.options.length=0;var key
for(key in a){objSel.options[objSel.options.length]=new Option(a[key],key)}
if(ecm_novaposhta.capital_top=='1'&&$("#id_area_delivery").val()!='0'){$("#id_city_delivery").val($("#id_city_delivery :nth-child(2)").val()).change()}else{$("#id_city_delivery").val(0).change()}
$('#id_city_delivery').prop('disabled',!1);np_fill_address();uni()}})}
function refreshcity_vip(){var url=np_gettrueurl();var data={mode:"city",area:$("#id_area_delivery_vip").val(),lang:$("#id_lang").val(),};$("#id_city_delivery_vip").val(0);$("#id_ware_delivery_vip").val(0);$('#id_city_delivery_vip').prop('disabled',!0);$('#id_ware_delivery_vip').prop('disabled',!0);$.ajax({dataType:"json",type:"POST",data:data,url:url,success:function(a){var objSel=document.getElementById("id_city_delivery_vip");objSel.options.length=0;var key
for(key in a){objSel.options[objSel.options.length]=new Option(a[key],key)}
if(ecm_novaposhta.capital_top=='1'&&$("#id_area_delivery_vip").val()!='0'){$("#id_city_delivery_vip :nth-child(2)").prop('selected',!0).change()}else{$("#id_city_delivery_vip").val(0).change()}
$('#id_city_delivery_vip').prop('disabled',!1);uni()}})}
function cost_by_city(){if($("#id_city_delivery").val()!=0){var selected=$("#id_ware_delivery").val();var url=np_gettrueurl();var data={mode:"cost_by_city",area:$("#id_area_delivery").val(),city:$("#id_city_delivery").val(),lang:$("#id_lang").val(),cart:$("#cart_id").val(),page:$("#md_page").val(),module:$('input[name="method_payment"]:checked').val(),};$("#id_ware_delivery").val(0);$('#id_ware_delivery').prop('disabled',!0);$.ajax({dataType:"json",type:"POST",data:data,url:url,success:function(a){if(!a.machine){$('label.machine').hide();if($('input.to:checked').val()=='machine'){$('input.to[value="office"]').prop('checked',!0).change()
return}}else{$('label.machine, label.office').show()}
$('label.office').show();if(ecm_novaposhta.address){$('label.address').show()}
if(!$('input.to:checked').length){$('input.to[value="office"]').prop('checked',!0).change()}else{if(a.is_change&&a.success){$("#md_cost").text(parseFloat(a.Cost));$("#mdcost").val(a.Cost);$("#md_costredelivery").text(parseFloat(a.CostRedelivery));if(typeof(action)=='function'){action(renderSeq)}
if(typeof(updateCarrierSelectionAndGift)=='function')updateCarrierSelectionAndGift();if(typeof(updateCarrierOnDeliveryChange)=='function')updateCarrierOnDeliveryChange();if(typeof(updcarrieraddress)=='function')updcarrieraddress(1);if(typeof(Carrier)!='undefined')
if(typeof(Carrier.update)=='function')Carrier.update({load_carriers:!0,load_payments:!0,load_review:!1})}}}})}}
function refreshware(){if($('input.to:checked').val()==undefined&&$("#md_page").val()=='cart')return;var url=np_gettrueurl();var data={mode:"ware",city:$("#id_city_delivery").val(),lang:$("#id_lang").val(),page:$("#md_page").val(),cart:$("#cart_id").val(),to:($("#md_page").val()=='order')?'all':$("input[name='to']:checked").val(),};$('#id_ware_delivery').prop('disabled',!0);$.ajax({dataType:"json",type:"POST",data:data,url:url,success:function(result){var objSel=document.getElementById("id_ware_delivery");objSel.options.length=0;var key
for(key in result){objSel.options[objSel.options.length]=new Option(result[key],key)}
$("#id_ware_delivery").val(ecm_novaposhta.address_default).change();$('#id_ware_delivery').prop('disabled',!1);if(ecm_novaposhta.live){live_search_wares('')}
np_fill_address();uni()}})}
function refreshware_vip(){var url=np_gettrueurl();var data={mode:"ware",city:$("#id_city_delivery_vip").val(),lang:$("#id_lang").val(),};$('#id_ware_delivery_vip').prop('disabled',!0);$.ajax({dataType:"json",type:"POST",data:data,url:url,success:function(a){var objSel=document.getElementById("id_ware_delivery_vip");objSel.options.length=0;var key
for(key in a){objSel.options[objSel.options.length]=new Option(a[key],key)}
$("#id_ware_delivery_vip").val(ecm_novaposhta.address_default).change();$('#id_ware_delivery_vip').prop('disabled',!1)}})}
var timeoutId;function delaysave(timeout){uniform_update();clearTimeout(timeoutId);timeoutId=setTimeout('saveform(0)',timeout)}
function uniform_update(){if($("#md_page").val()=='cart'&&$.uniform){$.uniform.update(".form-control");$.uniform.update(".form-control")}
uni()}
function another_update(){if($("#another_recipient").prop("checked")){$(".for_collapse_u").show();$(".for_collapse_m").hide();$(".another_recipient").show();$(".another").prop('required',!0)}else{$(".for_collapse_m").show();$(".for_collapse_u").hide();$(".another_recipient").hide();$(".another").removeProp('required');$(".another").removeAttr('required')}
saveform(0)}
function saveform(updated){np_fill_address();if($("#id_ware_delivery").val()=="1"){$(".for_collapse").show();$(".np_address_delivery").show();$("#StreetName").prop('required',!0);$('#np_address_delivery').prop('checked',!0);$('#np_address_delivery').parent().addClass('checked')}else{$(".for_collapse").hide();$(".np_address_delivery").hide();$("#StreetName").removeAttr('required');$('#np_address_delivery').removeAttr('checked');$('#np_address_delivery').parent().removeClass('checked')}
if($("#id_ware_delivery").val()!="0"||updated){if(typeof timeoutId!=='undefined')clearTimeout(timeoutId);var url=np_gettrueurl();if($("#nal").prop("checked")){var nal=1}else{var nal=0}
if($("#md_lastname").val()==""){$("#md_lastname").val($("#lastname").val())}
if($("#md_firstname").val()==""){$("#md_firstname").val($("#firstname").val())}
if($("#md_middlename").val()==""){$("#md_middlename").val($("#middlename").val())}
if($("#md_phone").val()==""){$("#md_phone").val($("#phone").val())}
var data={mode:"saveform",employee:$("#employee").val(),customer:$("#customer").val(),page:$("#md_page").val(),cart:$("#cart_id").val(),order:$("#id_order").val(),area:$("#id_area_delivery").val(),area_id:$("#id_area_delivery  option:selected").attr('area_id'),city:$("#id_city_delivery").val(),ware:$("#id_ware_delivery").val(),StreetRef:$("#Street").val(),StreetType:$("#StreetType").val(),StreetName:$("#StreetName").val(),BuildingNumber:$("#BuildingNumber").val(),Flat:$("#Flat").val(),total_wt:$("#total_wt").val(),lastname:$("#md_lastname").val(),firstname:$("#md_firstname").val(),middlename:$("#md_middlename").val(),phone:$("#md_phone").val(),another_recipient:Number($("#another_recipient").prop("checked")),another_middlename:$("#another_middlename").val(),another_lastname:$("#another_lastname").val(),another_firstname:$("#another_firstname").val(),another_phone:$("#another_phone").val(),msg:$("#msg").val(),nal:nal,redelivery:Number($("#redelivery").prop("checked")),weight:$("#weight").val(),vweight:$("#width").val()*$("#height").val()*$("#depth").val()/4000,module:$('input[name="method_payment"]:checked').val(),to:$("input[name='to']:checked").val(),api:$("#api").val(),};$.ajax({dataType:"json",type:"POST",data:data,url:url,success:function(a){if($("#customer").val()<0){if($("#id_ware_out").val()==1){$("#sender_address").show();if(a.api.success){showSuccessMessage("Адрес :"+a.api.Description)}else{showErrorMessage('Erorr! See in console')}}else{$("#sender_address").hide()}
return}
if(a.ware_change&&a.success){if(ecm_novaposhta.show){$("#mdcost").val(a.Cost);$("#md_cost").text(Number($("#mdcost").val()).toFixed(2));$("#md_costredelivery").text(Number(a.CostRedelivery).toFixed(2))}
if($("#another_recipient").prop("checked")){$("#another_lastname").prop("defaultValue",$("#another_lastname").val());$("#another_firstname").prop("defaultValue",$("#another_firstname").val());$("#another_middlename").prop("defaultValue",$("#another_middlename").val());$("#another_phone").prop("defaultValue",$("#another_phone").val());$("#StreetName").prop("defaultValue",$("#StreetName").val())}
if(typeof(action)=='function'){action(renderSeq)}
if(typeof(updateCarrierOnDeliveryChange)=='function')updateCarrierOnDeliveryChange();if(typeof(updcarrieraddress)=='function')updcarrieraddress(1);if(typeof(Carrier)!='undefined')
if(typeof(Carrier.update)=='function')Carrier.update({load_carriers:!0,load_review:!1})}}})}}
function saveform_vip(updated){np_fill_address();if($("#id_ware_delivery_vip :checked").val()=='1'){$(".for_collapse_vip").show();$(".np_address_delivery_vip").show();$("#StreetName_vip").prop('required',!0);$('#np_address_delivery_vip').prop('checked',!0);$('#np_address_delivery_vip').parent().addClass('checked')}else{$(".for_collapse_vip").hide();$(".np_address_delivery_vip").hide();$("#StreetName_vip").removeAttr('required');$('#np_address_delivery_vip').removeAttr('checked');$('#np_address_delivery_vip').parent().removeClass('checked')}
if($("#id_ware_delivery_vip").val()!=0||updated){if(typeof timeoutId!=='undefined')clearTimeout(timeoutId);var url=np_gettrueurl();var data={mode:"saveform",employee:$("#employee_vip").val(),customer:$("#customer_vip").val(),page:$("#md_page").val(),area:$("#id_area_delivery_vip").val(),area_id:$("#id_area_delivery_vip  option:selected").attr('area_id'),city:$("#id_city_delivery_vip").val(),ware:$("#id_ware_delivery_vip").val(),StreetRef:$("#Street_vip").val(),StreetType:$("#StreetType_vip").val(),StreetName:$("#StreetName_vip").val(),BuildingNumber:$("#BuildingNumber_vip").val(),Flat:$("#Flat_vip").val(),vip:!0,api:$("#api_vip").val(),};$.ajax({dataType:"json",type:"POST",data:data,url:url,success:function(a){if($("#customer").val()<0){if($("#id_ware_out_vip").val()==1){$("#sender_address_vip").show();if(a.api.success){showSuccessMessage("Адрес :"+a.api.Description)}else{showErrorMessage('Erorr! See in console')}}else{$("#sender_address_vip").hide()}
return}}})}}
function fixaddress(){var url=np_gettrueurl();var data2={mode:"fixaddress",cart:$("#cart_id").val(),};$.ajax({dataType:"json",type:"POST",data:data2,url:url,success:function(result){if(document.getElementById("id_address_delivery")){setTimeout('addresslist()',50)}}})}
function edrpou(){var url=np_gettrueurl();var data={mode:"edrpou",edrpou:$("#edrpou").val(),city:$("#id_city_delivery").val(),employee:$("#employee").val(),};$.ajax({dataType:"json",type:"POST",data:data,url:np_gettrueurl(),type:"POST",success:function(result){if(result!=!1&&result[0].CounterpartyFullName){$('.edrpou').html(result[0].CounterpartyFullName+', '+result[0].CityDescription);$('#counterparty').val(result[0].Ref)}else{$('.edrpou').html('');$('#counterparty').val('')}},})}
function makettn(id_order,update,obj){if($("#msg").val().length>$("#TrimMsg").val()){alert("Длинное описание! - "+$("#msg").val().length+" символов");return}
if(Number($("#free_limit").val())<Number($("#cod_value_od").val())&&!($("#pay_check").prop("checked"))){if(!confirm('Не отмечена "отправка отправителем" !!! \nСумма заказа достаточна для бесплатной доставки.'))return}
if(Number($("#free_limit").val())>Number($("#cod_value_od").val())&&($("#pay_check").prop("checked"))){if(!confirm('Отмечена "отправка отправителем" !!! \nСумма заказа не достаточна для бесплатной доставки !!!'))return}
if(Number($("#cod_value").val())!=(Number($("#cod_value_od").val())-Number($("#total_paid_real").val()))&&($("#nal_check").prop("checked"))){if(!confirm("Сумма доплаты ("+(Number($("#cod_value_od").val())-Number($("#total_paid_real").val()))+") отличается от суммы наложенного платежа ("+Number($("#cod_value").val())+") !"))return}
$(obj).prop('disabled',!0)
if(update==1)mode="updatettn";else mode="makettn";var data_s=$('#np_fieldset').serializeArray();var data_q={};data_q['mode']=mode;data_q['id_order']=id_order;$.each(data_s,function(index,value){data_q[value.name]=value.value});data_q['redelivery']=Number($("#redelivery").prop("checked"));data_q['pay_check']=Number($("#pay_check").prop("checked"));data_q['nal_pay_check']=Number($("#nal_pay_check").prop("checked"));data_q['another_recipient']=Number($("#another_recipient").prop("checked"));data_q['SpecialCargo']=Number($("#SpecialCargo").prop("checked"));$.ajax({dataType:"json",type:"POST",data:data_q,url:np_gettrueurl(),success:function(result){if(result.success){$("#result").html(result.en+'<br>Перезаватжуємо сторинку');setTimeout('location.reload()',200)}else{np_alert('Помилка при створенні ЕН !!!')
$("#result").html(result.errors.join('<br>'));$(obj).prop('disabled',!1)}}})}
function deletettn(id_order){var url=np_gettrueurl();var data={mode:"deletettn",id_order:id_order,employee:$("#employee").val(),};$.ajax({data:data,url:url,success:function(html){setTimeout('location.reload()',500)}})}
function CheckPossibilityCreateReturn(ref){var url=np_gettrueurl();var data={mode:"CheckPossibilityCreateReturn",ref:ref};$.ajax({data:data,url:url,success:function(html){$("#result").html(html)}})}
function cost(){if($("#msg").val().length>$("#TrimMsg").val()){alert("Длинное описание! - "+$("#msg").val().length+" символов");return}
var url=np_gettrueurl();var data={mode:"cost",id_order:$("#id_order").val(),id_cart:$("#id_cart").val(),lastname:$("#md_lastname").val(),firstname:$("#md_firstname").val(),middlename:$("#md_middlename").val(),phone:$("#md_phone").val(),another_recipient:Number($("#another_recipient").prop("checked")),another_lastname:$("#another_lastname").val(),another_firstname:$("#another_firstname").val(),another_middlename:$("#another_middlename").val(),another_phone:$("#another_phone").val(),employee:$("#employee").val(),on_card:$("#on_card").val(),customer:$("#customer").val(),payment_method:$("#payment_method").val(),ware:$("#id_ware_delivery").val(),city:$("#id_city_delivery").val(),area:$("#id_area_delivery").val(),area_id:$("#id_area_delivery  option:selected").attr('area_id'),StreetName:$("#StreetName").val(),BuildingNumber:$("#BuildingNumber").val(),Flat:$("#Flat").val(),redelivery:Number($("#redelivery").prop("checked")),pay_check:Number($("#pay_check").prop("checked")),nal_pay_check:Number($("#nal_pay_check").prop("checked")),SpecialCargo:Number($("#SpecialCargo").prop("checked")),weight:$("#weight").val(),vweight:$("#vweight").val(),width:$("#width").val(),height:$("#height").val(),depth:$("#depth").val(),insurance:$("#insurance").val(),cod:$("#cod").val(),cod_value:$("#cod_value").val(),description:$("#description").val(),pack:$("#pack").val(),msg:$("#msg").val(),seats_amount:$("#seats_amount").val(),RedBoxBarcode:$("#RedBoxBarcode").val(),InfoRegClientBarcodes:$("#InfoRegClientBarcodes").val(),edrpou:$("#edrpou").val(),counterparty:$("#counterparty").val(),};$.ajax({data:data,url:url,dataType:'json',type:'POST',success:function(html){$("#result").html(html)}});setTimeout('location.reload()',1000)}
function copy(item){var item_od=item+"_od";var url=np_gettrueurl();var data={mode:"copy",id_order:$("#id_order").val()};$.ajax({dataType:"json",type:"POST",data:data,url:url,success:function(result){$("#"+item).val(result[item_od]);if(item=='vweight'){$("#"+item).trigger('change')}}})}
function copy2(item){var item_od=item+"_od";var url=np_gettrueurl();var data={mode:"copy2",id_order:$("#id_order").val()};$.ajax({dataType:"json",type:"POST",data:data,url:url,success:function(result){$("#"+item).val(result[item_od])}})}
function checkpackage(deklaracia,order){var url=np_gettrueurl();$("#result").empty();var data={mode:"checkpackage",deklaracia:deklaracia,order:order};$.ajax({data:data,url:url,success:function(html){$("#result").html(html)}})}
function length_check(len_max,field_id,counter_id){var len_current=$("#"+field_id).val().length;var rest=len_max-len_current;document.getElementById(counter_id).firstChild.data=rest}
function np_fill_address_sc(){if(typeof(action)!='function'){return}
if($("#id_area_delivery  option:selected").val()!=0&&$("#id_area_delivery  option:selected").attr('area_id')!=$("#id_state").val()){$("#id_state").val($("#id_area_delivery  option:selected").attr('area_id'));if($("#id_state").val()!=$("#id_state").prop('defaultValue')){$("#id_state").prop('defaultValue',$("#id_state").val());action('save_address',$("#id_state").val(),'id_state',!1)}}
if($("#id_city_delivery  option:selected").val()!=0){$("#city").val($("#id_city_delivery  option:selected").text());if($("#city").val()!=$("#city").prop('defaultValue')){$("#city").prop('defaultValue',$("#city").val());action('save_address',$("#city").val(),'city',!1)}}else{$("#city").val('')}
if($("#id_ware_delivery  option:selected").val()!=0){if($("#id_ware_delivery  option:selected").val()==1)
var StreetName=$("#StreetName").val()+', дім '+$("#BuildingNumber").val()+', кв. '+$("#Flat").val();else var StreetName=$("#id_ware_delivery  option:selected").text();$("#address1").val(StreetName);if($("#address1").val()!=$("#address1").prop('defaultValue')){$("#address1").prop('defaultValue',$("#address1").val());action('save_address',$("#address1").val(),'address1',!1)}}else{$("#address1").val('')}}
function uni(){};/**
 * We offer the best and most useful modules PrestaShop and modifications for your online store.
 *
 * We are experts and professionals in PrestaShop
 *
 * @author    Elcommerce <support@elcommece.com.ua>
 * @copyright 2010-2018 Elcommerce
 * @license   Closed
 * @category  PrestaShop
 * @category  Module
 */
$(document).ajaxComplete(function(event,xhr,settings){});document.addEventListener('DOMContentLoaded',function(){sh_up_add_events();sh_up_fill_address()});function sh_up_add_events(){$(document).off('change','.save_elems_up').on('change','.save_elems_up',function(){sh_up_save_elems(this)}).off("change","input.to_up").on("change","input.to_up",function(e){if(this.value=='Door'){$('.address_delivery_up').show();if(ecm_shipping_up.live){$('.live.ware_delivery_up').hide()}else{$('.nolive.ware_delivery_up').hide()}
$('#show_address_up').prop('checked',!0);$('#show_address_up').parent().addClass('checked');$('#sh_up_BuildingNumber').prop('required',!0);$('#sh_up_StreetName').prop('required',!0)}else{$('.address_delivery_up').hide();$('#show_address_up').prop('checked',!1);$('#show_address_up').parent().removeClass('checked');$('label[for="id_ware_delivery"]').text($(this).data('text'));$('label[for="RecipientWare_up"]').text($(this).data('text'));if(ecm_shipping_up.live){$('.live.ware_delivery_up').show();$('.wares .drop_down_ul').html('');$('#RecipientWare_id_up').val(0);$('#RecipientWare_up').val($('#RecipientWare_up').prop('defaultValue'));live_search_wares_up('')}else{sh_up_refreshware();$('.nolive.ware_delivery_up').show()}
$('#sh_up_BuildingNumber').prop('required',!1);$('#sh_up_StreetName').prop('required',!1)}}).off("blur",".ontyped_up").on("blur",".ontyped_up",function(){$(this).removeClass('sc-error')
if(this.value!=this.defaultValue){this.defaultValue=this.value;sh_up_saveform(0)}})}
function sh_up_saveform(first=0){if($("#sh_up_id_ware_ref").val()=='0'){return}
var data={mode:"saveform",page:"cart",module:module,id_cart:id_cart,area_ref:$("#sh_up_id_area_ref").val(),district_ref:$("#sh_up_id_district_ref").val(),city_ref:$("#sh_up_id_city_ref").val(),ware_ref:$("#sh_up_id_ware_ref").val(),StreetName:$("#sh_up_StreetName").val()?$("#sh_up_StreetName").val():$('#RecipientStreet_up').val(),BuildingNumber:$("#sh_up_BuildingNumber").val(),Flat:$("#sh_up_Flat").val(),show_address:Number($("#show_address").prop("checked")),another_recipient:Number($("#sh_up_another_recipient").prop("checked")),another_lastname:$("#sh_up_another_lastname").val(),another_firstname:$("#sh_up_another_firstname").val(),another_phone:$("#sh_up_another_phone").val(),};$.ajax({type:'POST',datatype:"json",data:data,url:up_url,success:function(result){if(data.show_address){var StreetName=$("#sh_up_StreetName").val()+', дім '+$("#sh_up_BuildingNumber").val()+', кв. '+$("#sh_up_Flat").val()}else{var StreetName=$("#sh_up_id_ware_ref  option:selected").text()}
if($("#md_page").val()=='cart')sh_up_fill_address()}})}
function sh_up_isvalid(){if($("#sh_up").val()==$("#sh_up_carrier").val()||$("#sh_up").val()+','==$('input:radio[class=delivery_option_radio]:checked').val()||$("#sh_up").val()+','==$('.delivery_option_radio:checked').val()){if($("#up_another_recipient").prop("checked")){if(document.getElementById("sh_up_another_firstname").validity.patternMismatch||$('#sh_up_another_firstname').val()==''){sh_up_alert("Треба заповнити українською");$("#sh_up_another_firstname").focus();return!1}
if(document.getElementById("sh_up_another_lastname").validity.patternMismatch||$('#sh_up_another_lastname').val()==''){sh_up_alert("Треба заповнити українською");$("#sh_up_another_lastname").focus();return!1}
if(document.getElementById("sh_up_another_phone").validity.patternMismatch||$('#sh_up_another_phone').val()==''){sh_up_alert("Помилка в номері телефону !!!");$("#sh_up_another_phone").focus();return!1}}
if($("#sh_up_id_ware_ref").val()=="0"){sh_up_alert($('#sh_up_id_ware_ref option:selected').text());$("#sh_up_id_ware_ref").focus();return!1}
if((document.getElementById("sh_up_StreetName")&&document.getElementById("up_StreetName").validity.patternMismatch)||$('#sh_up_StreetName').val()==''){alert("Треба заповнити українською хочаб вулицю");$("#up_StreetName").focus();return!1}
sh_up_fill_address()}
return!0}
function sh_up_alert(msg){if(typeof($.growl)=='function'){$.growl.error({title:msg,size:"medium",message:"",})}else{alert(msg)}};/**
 * We offer the best and most useful modules PrestaShop and modifications for your online store.
 *
 * We are experts and professionals in PrestaShop
 *
 * @author    Elcommerce <support@elcommece.com.ua>
 * @copyright 2010-2018 Elcommerce
 * @license   Closed
 * @category  PrestaShop
 * @category  Module
 */
var searchDelay=500;if(/Mobi|Android/i.test(navigator.userAgent)){searchDelay=800}
function indexstreetsearch(){if(!$("#StreetRef_up").val())return;var data={mode:"indexstreetsearch",StreetRef:$("#StreetRef_up").val(),BuildingNumber:$("#sh_up_BuildingNumber").val(),};$.ajax({dataType:"json",type:"POST",data:data,url:up_url,success:function(result){if($("#md_page").val()=='cart'){if(result.length&&result[0].hasOwnProperty('POSTCODE')){postcode=result[0].POSTCODE;console.log(postcode);live_search_wares_up(postcode)}else{sh_up_alert("Не вдалося знайти індекс, перевірте номер будинку")}}}})}
function sh_up_save_elems(elem){var tagName=$(elem).prop('tagName').toLowerCase();var value;switch(tagName){case 'input':var inputType=$(elem).attr('type');switch(inputType){case 'checkbox':value=$(elem).is(':checked')?1:0;break;case 'radio':if($(elem).is(':checked')){value=$(elem).val()}
break;default:value=$(elem).val()}
break;case 'select':value=$(elem).val();break;default:}
var data={mode:"save_elems",employee:$("#employee").val(),customer:$("#customer").val(),page:ecm_shipping_up.page,cart:ecm_shipping_up.cart_up.id_cart,order:$("#id_order").val(),field:$(elem).data('field')?$(elem).data('field'):$(elem).attr('id'),value:value,};$.ajax({dataType:"json",type:"POST",data:data,url:up_url,success:function(result){if($("#md_page").val()=='cart')sh_up_fill_address();if(result.hasOwnProperty('updated')&&result.updated&&typeof(action)=='function'){action('carrier,checkout')
return}}})}
function sh_up_refreshdistrict(){var data={mode:"district",area_ref:$("#sh_up_id_area_ref").val(),};$("#sh_up_id_district_ref").val(0);$("#sh_up_id_city_ref").val(0);$("#sh_up_id_ware_ref").val(0);$('#sh_up_id_district_ref').prop('disabled',!0);$('#sh_up_id_city_ref').prop('disabled',!0);$('#sh_up_id_ware_ref').prop('disabled',!0);$.ajax({type:'POST',dataType:"json",data:data,url:up_url,success:function(result){var objSel=document.getElementById("sh_up_id_district_ref");objSel.options.length=0;var key
for(key in result){objSel.options[objSel.options.length]=new Option(result[key],key)}
$("#sh_up_id_district_ref").val(0).change();$('#sh_up_id_district_ref').prop('disabled',!1);sh_up_fill_address()}})}
function sh_up_refreshcity(){var data={mode:"city",district_ref:$("#sh_up_id_district_ref").val(),};$("#sh_up_id_city_ref").val(0);$("#sh_up_id_ware_ref").val(0);$('#sh_up_id_city_ref').prop('disabled',!0);$('#sh_up_id_ware_ref').prop('disabled',!0);$.ajax({type:'POST',dataType:"json",data:data,url:up_url,success:function(result){var objSel=document.getElementById("sh_up_id_city_ref");while(objSel.firstChild){objSel.removeChild(objSel.firstChild)}
var key
for(key in result){objSel.options[objSel.options.length]=new Option(result[key],key)}
$("#sh_up_id_city_ref").val(0).change();$('#sh_up_id_city_ref').prop('disabled',!1);sh_up_fill_address()}})}
function sh_up_refreshware(){id_cart=typeof(id_cart)!='undefined'?id_cart:0;var data={mode:"ware",city_ref:$("#sh_up_id_city_ref").val(),id_cart:id_cart,};$("#sh_up_id_ware_ref").val(0);$('#sh_up_id_ware_ref').prop('disabled',!0);$.ajax({type:'POST',dataType:"json",data:data,url:up_url,success:function(result){var a=result.list;var objSel=document.getElementById("sh_up_id_ware_ref");objSel.options.length=0;var key
for(key in a){objSel.options[objSel.options.length]=new Option(a[key],key)}
$("#sh_up_id_ware_ref").val(0).change();$('#sh_up_id_ware_ref').prop('disabled',!1);sh_up_fill_address()}})}
function sh_up_fill_address(){if($("#md_page").val()!='cart'){return}
if($("#sh_up").val()==undefined){return}
if($("#sh_up_id_ware_ref  option:selected").val()==undefined||$("#sh_up_id_ware_ref  option:selected").val()==0){return}
if($('input[name^=delivery_option]:checked').val()&&parseInt($('input[name^=delivery_option]:checked').val())!=parseInt($("#sh_up").val())){return}
if(ecm_novaposhta.ecm_checkout_active){sh_up_fill_address_sc();return}
if(ecm_novaposhta.fill=="1"){$("#city").val("");$("#delivery_city").val("");$("#shipping_address[city]").val('');$('input[name="shipping_address[city]"]').val('');$('input[name="city"]').val('');if($("#sh_up_id_city_ref  option:selected").val()!='0'){var cityname=$("#sh_up_id_city_ref  option:selected").text()+', '+$("#sh_up_id_district_ref  option:selected").text()+' р-н';$("#city").val(cityname);$("#delivery_city").val(cityname);$("#shipping_address[city]").val(cityname);$('input[name="shipping_address[city]"]').val(cityname);$('input[name="city"]').val(cityname)}
$("#address1").val("");$("#postcode").val("");$("#delivery_postcode").val("");$("#delivery_address1").val("");$('input[name="shipping_address[address1]"]').val('');$('input[name="address1"]').val('');if($("#sh_up_id_ware_ref  option:selected").val()!='0'){var StreetName=$("#sh_up_id_ware_ref  option:selected").text();if($("#show_address").prop('checked')){if($("#sh_up_StreetName").val()=='')var StreetName=$("#sh_up_id_ware_ref  option:selected").text();else var StreetName=$("#sh_up_StreetName").val()+', дім '+$("#sh_up_BuildingNumber").val()+', кв. '+$("#sh_up_Flat").val()}else{$('#postcode').val($("#sh_up_id_ware_ref").val());$("#delivery_postcode").val($("#sh_up_id_ware_ref  option:selected").val());$("#shipping_address[postcode]").val($("#sh_up_id_ware_ref  option:selected").val())}
$("#address1").val(StreetName).change();$("#delivery_address1").val(StreetName);$("#shipping_address[address1]").val(StreetName);$('input[name="shipping_address[address1]"]').val(StreetName);$('input[name="address1"]').val(StreetName)}
if($("#sh_up_id_area_ref  option:selected").val()!=0){$("#delivery_id_state").val($("#sh_up_id_area_ref  option:selected").attr('area_id'));$("#id_state").val($("#sh_up_id_area_ref  option:selected").attr('area_id')).change();$('select[name="id_state"]').val($("#sh_up_id_area_ref  option:selected").attr('area_id'));$("#shipping_address[id_state]").val($("#sh_up_id_area_ref  option:selected").attr('area_id'));$('select[name="shipping_address[id_state]"]').val($("#sh_up_id_area_ref  option:selected").attr('area_id'))}}}
function sh_up_fill_address_sc(){if(typeof(action)!='function'){return}
if($("#sh_up_id_area_ref  option:selected").val()!=0&&$("#sh_up_id_area_ref  option:selected").attr('area_id')!=$("#id_state").val()){$("#id_state").val($("#sh_up_id_area_ref  option:selected").attr('area_id'))
if($("#id_state").val()!=$("#id_state").prop('defaultValue')){$("#id_state").prop('defaultValue',$("#id_state").val());action('save_address',$("#id_state").val(),'id_state',!1)}}
if($("#sh_up_id_district_ref  option:selected").val()!=0&&$("#sh_up_id_city_ref  option:selected").val()!=0){var city_name=$("#sh_up_id_district_ref  option:selected").text()+" район, "+$("#sh_up_id_city_ref  option:selected").text();$("#city").val(city_name)
if($("#city").val()!=$("#city").prop('defaultValue')){$("#city").prop('defaultValue',$("#city").val());action('save_address',$("#city").val(),'city',!1)}}else{$("#city").val('').blur()}
if($("#sh_up_id_ware_ref  option:selected").val()!=0){var postcode=$("#sh_up_id_ware_ref  option:selected").val();$('#postcode').val(postcode)
if($("#postcode").val()!=$("#postcode").prop('defaultValue')){$("#postcode").prop('defaultValue',$("#postcode").val());action('save_address',$("#postcode").val(),'postcode',!1)}
if($('#RecipientStreet_up').val()!=''&&$("#RecipientStreet_up").val()!=undefined){var StreetName=$("#StreetType_up").val()+' '+$("#RecipientStreet_up").val()+', дім '+$("#sh_up_BuildingNumber").val()+', кв. '+$("#sh_up_Flat").val()}else if($("#sh_up_StreetName").val()!=''&&$("#sh_up_StreetName").val()!=undefined){var StreetName=$("#sh_up_StreetName").val()+', дім '+$("#sh_up_BuildingNumber").val()+', кв. '+$("#sh_up_Flat").val()}else{var StreetName=$("#sh_up_id_ware_ref  option:selected").text()}
$("#address1").val(StreetName)
if($("#address1").val()!=$("#address1").prop('defaultValue')){$("#address1").prop('defaultValue',$("#address1").val());action('save_address',$("#address1").val(),'address1',!1)}}else{$("#address1").val('').blur()}};document.addEventListener('DOMContentLoaded',function(){$(document).on('click','.live_scroll_element.citys_up .drop_down_ul li',function(){if($(this).data('value')!=$('#RecipientCity_id_up').val()){$('#sh_up_id_area_ref').val($(this).data('area'));$('#RecipientCity_id_up').val($(this).data('value')).change();refreshdistrict_live_up(this)}else{$('#RecipientCity_up').val($(this).data('present')).change()}
if(!ecm_shipping_up.LiveSearchStreet&&$(this).data('courier')){$('.show_address_up').show()}else{$('.show_address_up').hide();$("#show_address_up").prop("checked",!1)}
$('.live_scroll_element.citys_up').hide();$('label.office').show();$('label.address').show()}).on('focus','#RecipientCity_up',function(){$('.live_scroll_element.citys_up').hide();$('.live_scroll_element.citys_up').width($('#RecipientCity_up').width())
this.removeAttribute('readonly');if($('#delivery_recipient_cities_up').children().length>0){$('.live_scroll_element.citys_up').show()}
if(ecm_shipping_up.is_Mobile){this.setSelectionRange(0,this.value.length)}}).on('input insert','#RecipientCity_up',function(){if($(this).val().length>2||!$(this).val()){live_search_citys_up($(this).val(),!0)}}).on('click','.live_scroll_element.wares_up .drop_down_ul li',function(){if($(this).data('value')!=$('#RecipientWare_id_up').val()){var value=$(this).data('value');$('#RecipientWare_id_up').val(value);$('#RecipientWare_up').val($(this).data('present'));$('.live_scroll_element.wares_up li').removeClass('active');$(this).addClass('active');$("#sh_up_id_ware_ref").val(value).change()}else{$('#RecipientWare_up').val($(this).data('present'))}
$('.live_scroll_element.wares_up').hide()}).on('focus','#RecipientWare_up',function(){$('.live_scroll_element.wares_up').hide();$('.live_scroll_element.wares_up').width($('#RecipientWare_up').width())
this.removeAttribute('readonly');if($('#delivery_recipient_wares_up').children().length>0){$('.live_scroll_element.wares_up').show()}
if(ecm_shipping_up.is_Mobile){this.setSelectionRange(0,this.value.length)}}).on('input insert','#RecipientWare_up',function(){live_search_wares_up($(this).val(),!0)}).mouseup(function(e){var obj=$(".live");if(!obj.is(e.target)&&obj.has(e.target).length===0){$('.live_scroll_element').hide()}})})
function refreshdistrict_live_up(elem){var data={mode:"district",area_ref:$("#sh_up_id_area_ref").val(),live:1,};$.ajax({dataType:"json",type:'POST',data:data,url:ecm_shipping_up.module_dir+'classes/refresh_up.php?isolang='+ecm_shipping_up.isolang,success:function(result){var objSel=document.getElementById("sh_up_id_district_ref");while(objSel.firstChild){objSel.removeChild(objSel.firstChild)}
result.list.forEach(function(item,index){var newOption=document.createElement('option');newOption.text=item.district;newOption.value=item.district_ref;objSel.appendChild(newOption)})
$('#sh_up_id_district_ref').val($(elem).data('district'));$('#RecipientDistrict_id_up').val($(elem).data('district'));$('#RecipientDistrict_up').val($(elem).data('district_name'));$('.live_scroll_element.district_up li').removeClass('active');$(elem).addClass('active');$('#RecipientCity_up').val('');$("#sh_up_id_city_ref").val(0);$('.citys .drop_down_ul').html('');refreshcity_live_up(elem)
$('.ware_delivery_up').show()}})}
function refreshcity_live_up(elem){var data={mode:"city",district_ref:$("#sh_up_id_district_ref").val(),live:1,};$.ajax({dataType:"json",type:'POST',data:data,url:ecm_shipping_up.module_dir+'classes/refresh_up.php?isolang='+ecm_shipping_up.isolang,success:function(result){var objSel=document.getElementById("sh_up_id_city_ref");while(objSel.firstChild){objSel.removeChild(objSel.firstChild)}
result.list.forEach(function(elem,index){var newOption=document.createElement('option');newOption.text=elem.city;newOption.value=elem.city_ref;newOption.setAttribute('data-courier',elem.courier);objSel.appendChild(newOption)})
$('#sh_up_id_city_ref').val($(elem).data('value'));$('#RecipientCity_id_up').val($(elem).data('value'));$('#RecipientCity_up').val($(elem).data('present'));$('.CityType').text($(elem).data('citytype'));$('.live_scroll_element.citys_up li').removeClass('active');$(elem).addClass('active');$('#RecipientWare_up').val('');$("#sh_up_id_ware_ref").val(0);$('.wares .drop_down_ul').html('');sh_up_refreshware()
live_search_wares_up('')}})}
function live_get_citys_up(city_ref){var data={mode:"city",area_ref:$("#sh_up_id_area_ref").val(),};if(city_ref!=$('#RecipientCity_id_up').val())
$("#sh_up_id_ware_ref").val(0);$.ajax({dataType:"json",type:'POST',data:data,url:ecm_shipping_up.module_dir+'classes/refresh_up.php?isolang='+ecm_shipping_up.isolang,success:function(result){var objSel=document.getElementById("id_city_delivery");objSel.options.length=0;var key
for(key in result){objSel.options[objSel.options.length]=new Option(result[key],key)}
$("#id_city_delivery").val(city_ref).change()}})}
function live_search_citys_up(string,clear_ware=!1){var data={mode:"citysearch",string:string,};$.ajax({type:'POST',dataType:'json',data:data,url:ecm_shipping_up.module_dir+'classes/refresh_up.php?isolang='+ecm_shipping_up.isolang,success:function(result){if(result.success){if(clear_ware){$('.wares_up .drop_down_ul').html('');$('#RecipientWare_id_up').val(0);$('#RecipientWare_up').val('')}
var content='';data=result.list;$.each(data,function(ref,data){cl='';if(result.match.hit&&result.match.item.city_ref==data.city_ref)cl='class="active"';if(!result.match.hit&&$('#RecipientCity_id_up').val()==data.city_ref)cl='class="active"';content+='<li data-value="'+data.city_ref+'" data-area="'+data.area_ref+'" data-district="'+data.district_ref+'" data-district_name="'+data.district+'" data-courier="'+data.courier+'" data-machine="'+data.machine+'" data-present="'+escapeHtml(data.cityClear)+'" data-CityType="'+escapeHtml(data.CityType)+'" '+cl+'>'+data.present+'</li>'});$('.citys_up .drop_down_ul').html(content);if(result.match.hit){$('.live_scroll_element.citys_up').hide();if(result.match.hit&&result.match.item.city_ref!=$('#RecipientCity_id_up').val()){$('#sh_up_id_area_ref').val(result.match.item.area_ref);live_get_citys_up(result.match.item.city_ref)
$('#RecipientCity_id_up').val(result.match.item.city_ref);$('#RecipientCity_up').val(result.match.item.city)}}else if($('#RecipientCity_up').val()&&clear_ware){$('.live_scroll_element.citys_up').show()}}else{$('.live_scroll_element.citys_up').hide()}}})}
function live_search_wares_up(string,ontyped=!1){var data={mode:"waresearch",city_ref:$('#RecipientCity_id_up').val(),cart:$('#cart_id').val(),string:string,to:$("input[name='to']:checked").val(),};$.ajax({type:'POST',dataType:'json',data:data,url:ecm_shipping_up.module_dir+'classes/refresh_up.php?isolang='+ecm_shipping_up.isolang,success:function(result){if(result.success){var content='';data=result.list;$('.wares_up .drop_down_ul').html('');$.each(data,function(ref,data){cl='';cla='';if(result.match.hit&&result.match.ref==data.ref){cl='class="active"';cla='active'}
if(!result.match.hit&&$('#RecipientWare_id').val()==data.ref){cl='class="active"';cla='active'}
content+='<li data-value="'+data.index+'" data-present="'+escapeHtml(data.address)+'" title="'+escapeHtml(data.address)+'" '+cl+'>'+data.address+'</li>'});$('.wares_up .drop_down_ul').html(content)
if(result.match.hit){$('.live_scroll_element.wares_up').hide();$('#RecipientWare_up').val(result.match.address).prop('defaultValue',result.match.address);if(result.match.index!=$('#RecipientWare_id').val()){$('#RecipientWare_id_up').val(result.match.index);$("#sh_up_id_ware_ref").val(result.match.index).change()}}else{if(ontyped){$('.live_scroll_element.wares_up').show()}}
if(!ecm_shipping_up.LiveSearchStreet&&result.courier){$('.show_address_up').show()}else{$('.show_address_up').hide();$("#show_address_up").prop("checked",!1)}}else{$('.live_scroll_element.wares_up').hide()}}})};document.addEventListener('DOMContentLoaded',function(){$(document).on('click','.live_scroll_element.citys .drop_down_ul li',function(){if($(this).data('value')!=$('#RecipientCity_id').val()){$('#id_area_delivery').val($(this).data('area'));refreshcity_live(this);if($('input.to:checked').val()=='address'){$('.live.ware_delivery').hide();$('#np_address_delivery').prop('checked',!0).change();$('#np_address_delivery').parent().addClass('checked')}else{$('#np_address_delivery').prop('checked',!1).change();$('#np_address_delivery').parent().removeClass('checked');$('label[for="id_ware_delivery"]').text($(this).data('text'));$('label[for="RecipientWare"]').text($(this).data('text'));$('.live.ware_delivery').show();$('.wares .drop_down_ul').html('');$('#RecipientWare_id').val(0);$('#RecipientWare').val('');live_search_wares('')}}
$('.live_scroll_element.citys').hide()}).on('focus','#RecipientCity',function(){$('.live_scroll_element').hide();$('.live_scroll_element.citys').width($('#RecipientCity').width())
this.removeAttribute('readonly');if($('#delivery_recipient_cities').children().length>0){$('.live_scroll_element.citys').show()}
if(ecm_novaposhta.isMobile){this.setSelectionRange(0,this.value.length)}}).on('input','#RecipientCity',function(){if($(this).val().length>2||!$(this).val()){live_search_citys($(this).val(),!0)}}).on('click','.live_scroll_element.wares .drop_down_ul li',function(){if($(this).data('value')!=$('#RecipientWare_id').val()){var value=$(this).data('value');$('#RecipientWare_id').val(value);$('#RecipientWare').val($(this).data('present'));$('.live_scroll_element.wares li').removeClass('active');$(this).addClass('active');$("#id_ware_delivery").val(value).change()}
$('.live_scroll_element.wares').hide()}).on('focus','#RecipientWare',function(){$('.live_scroll_element').hide();$('.live_scroll_element.wares').width($('#RecipientWare').width())
this.removeAttribute('readonly');if($('#delivery_recipient_wares').children().length>0){$('.live_scroll_element.wares').show()}
if(ecm_novaposhta.isMobile){this.setSelectionRange(0,this.value.length)}}).on('input','#RecipientWare',function(){live_search_wares($(this).val(),!0)}).mouseup(function(e){var obj=$(".live");if(!obj.is(e.target)&&obj.has(e.target).length===0){$('.live_scroll_element').hide()}})})
function refreshcity_live(elem){var url=np_gettrueurl();var data={mode:"city",area:$("#id_area_delivery").val(),lang:$("#id_lang").val(),};$.ajax({dataType:"json",data:data,url:url,success:function(a){var objSel=document.getElementById("id_city_delivery");objSel.options.length=0;var key
for(key in a){objSel.options[objSel.options.length]=new Option(a[key],key)}
$('#id_city_delivery').val($(elem).data('value'));$('#RecipientCity_id').val($(elem).data('value'));$('#RecipientCity').val($(elem).data('present'));$('.live_scroll_element.citys li').removeClass('active');$(elem).addClass('active');$('label.office').show();if(!$(elem).data('machine')){$('label.machine').hide();if($('input.to:checked').val()=='machine'){$('input.to[value="office"]').prop('checked',!0).change()}}else{$('label.machine, label.office').show()}
if(ecm_novaposhta.address)$('label.address').show();if(!$('input.to:checked').length){$('input.to[value="office"]').prop('checked',!0).change()}
if($("input[name='to']:checked").val()!=undefined&&$("input[name='to']:checked").val()!='address'){$('#RecipientWare').val('');$("#id_ware_delivery").val(0);$('.wares .drop_down_ul').html('');refreshware()}}})}
function escapeHtml(text){var map={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#039;'};return text.replace(/[&<>"']/g,function(m){return map[m]})}
function live_get_citys(city_ref){var url=np_gettrueurl();var data={mode:"city",area:$("#id_area_delivery").val(),lang:$("#id_lang").val(),};if(city_ref!=$('#RecipientCity_id').val())
$("#id_ware_delivery").val(0);$.ajax({dataType:"json",type:'POST',data:data,url:url,success:function(result){var objSel=document.getElementById("id_city_delivery");objSel.options.length=0;var key
for(key in result){objSel.options[objSel.options.length]=new Option(result[key],key)}
$("#id_city_delivery").val(city_ref).change()}})}
function live_search_citys(string,clear_ware=!1){var url=np_gettrueurl();var data={mode:"citysearch",string:string,};$.ajax({type:'POST',dataType:'json',data:data,url:url,success:function(result){if(result.success){if(clear_ware){$('.wares .drop_down_ul').html('');$('#RecipientWare_id').val(0);$('#RecipientWare').val('')}
var content='';data=result.list;$.each(data,function(ref,data){cl='';if(result.match.hit&&result.match.item.city_ref==data.city_ref)cl='class="active"';if(!result.match.hit&&$('#RecipientCity_id').val()==data.city_ref)cl='class="active"';content+='<li data-value="'+data.city_ref+'" data-area="'+data.area_ref+'"   data-machine="'+data.machine+'"  data-present="'+escapeHtml(data.city)+'" '+cl+'>'+data.city+'</li>'});$('.citys .drop_down_ul').html(content);if(result.match.hit){$('.live_scroll_element.citys').hide();if(result.match.hit&&result.match.item.city_ref!=$('#RecipientCity_id').val()){$('#id_area_delivery').val(result.match.item.area_ref);live_get_citys(result.match.item.city_ref)
$('#RecipientCity_id').val(result.match.item.city_ref);$('#RecipientCity').val(result.match.item.city);if(!result.match.machine){$('label.machine, label.office').hide();$('input.to[value="office"]').prop('checked',!0).change()}else{$('label.machine, label.office').show()}}}else if($('#RecipientCity').val()){$('.live_scroll_element.citys').show()}}else{$('.live_scroll_element.citys').hide()}}})}
function live_search_wares(string,ontyped=!1){if($('input.to:checked').val()==undefined)return;var url=np_gettrueurl();var data={mode:"waresearch",city_ref:$('#RecipientCity_id').val(),cart:$('#cart_id').val(),string:string,to:$("input[name='to']:checked").val(),};$.ajax({type:'POST',dataType:'json',data:data,url:url,success:function(result){if(result.success){var content='';data=result.list;$('.wares .drop_down_ul').html('');$.each(data,function(ref,data){cl='';cla='';if(result.match.hit&&result.match.ref==data.ref){cl='class="active"';cla='active'}
if(!result.match.hit&&$('#RecipientWare_id').val()==data.ref){cl='class="active"';cla='active'}
content+='<li data-value="'+data.ref+'" data-present="'+escapeHtml(data.address)+'" title="'+escapeHtml(data.address)+'" '+cl+'>'+data.address+'</li>'});$('.wares .drop_down_ul').html(content)
if(result.match.hit){$('.live_scroll_element.wares').hide();$('#RecipientWare').val(result.match.address);if(result.match.ref!=$('#RecipientWare_id').val()){$('#RecipientWare_id').val(result.match.ref);$("#id_ware_delivery").val(result.match.ref).change()}}else{if(ontyped){$('.live_scroll_element.wares').show()}}}else{$('.live_scroll_element.wares').hide()}}})};var options_quickview={speed:300,dots:!1,infinite:!0,slidesToShow:4,slidesToScroll:1,vertical:!0,verticalSwiping:!0,};$(window).resize(function(){if(prestashop.page.page_name=='product')
restartElevateZoom();if($('#product-modal .product-images').hasClass('slick-initialized')&&$('#product-modal .product-images').height()==0){}});$(document).click(function(event){if($("body").hasClass("overlay")&&!$("#search-form-mobile").hasClass("hidden-xs-up")){if($(event.target).closest("body").length&&!$(event.target).closest("input#leo_search_query_top").length){$("body").removeClass("overlay");$("#search-form-mobile").addClass("hidden-xs-up")}}
if($(event.target).closest("#leo_search_top_button_mobile").length){$("#search-form-mobile").removeClass("hidden-xs-up");$("body").addClass("overlay");setTimeout(function(){$("#leo_search_query_top").click().focus()},500)}});$(document).ready(function(){floatHeader();backtotop()
if(prestashop.page.page_name=='product'){innitSlickandZoom()}
if(prestashop.page.page_name=='category'){setDefaultListGrid()}
if(typeof(products_list_functions)!='undefined'){for(var i=0;i<products_list_functions.length;i++){products_list_functions[i]()}}
$('.address-item .radio-block').click(function(){if(!$(this).parents('.address-item').hasClass('selected')){$('.address-item.selected').removeClass('selected');$(this).parents('.address-item').addClass('selected')}})
$('.demo-product-detail a').click(function(e){if(!$(this).hasClass('updated')){e.preventDefault();var current_url=window.location.href;if(prestashop.page.page_name=='product'&&current_url.indexOf('.html')>=0){var link_href=$(this).attr('href');var layout_key_index=link_href.indexOf('?layout=');var layout_key_value=link_href.substring(layout_key_index);current_url=current_url.substring(0,current_url.indexOf('.html'));var new_url=current_url+'.html'+layout_key_value;window.location.href=new_url}}})});function innitSlickandZoom(){if($("#main").hasClass('product-image-thumbs')){$('.product-detail .product-thumb-images').imagesLoaded(function(){$('.product-detail .product-thumb-images').fadeIn();postion=$("#content").data("templateview");numberimage=$("#content").data("numberimage");numberimage1200=$("#content").data("numberimage1200");numberimage992=$("#content").data("numberimage992");numberimage768=$("#content").data("numberimage768");numberimage576=$("#content").data("numberimage576");numberimage480=$("#content").data("numberimage480");numberimage360=$("#content").data("numberimage360");if(postion!=='undefined'){initSlickProductThumb(postion,numberimage,numberimage1200,numberimage992,numberimage768,numberimage576,numberimage480,numberimage360)}});if(is_desktop||is_tablet)initSlickProductModal()}}
function restartElevateZoom(){$(".zoomContainer").remove();applyElevateZoom()}
function applyElevateZoom(){if($(window).width()<=991||$("#content").data("templatezoomtype")=='none'){if($('#main').hasClass('product-image-gallery')){if($('img.js-thumb').data('elevateZoom')){var ezApi=$('img.js-thumb').data('elevateZoom');ezApi.changeState('disable');$('img.js-thumb').unbind("touchmove")}}else{if($("#zoom_product").data('elevateZoom')){var ezApi=$("#zoom_product").data('elevateZoom');ezApi.changeState('disable');$("#zoom_product").unbind("touchmove")}}
return!1}
var zt=$("#content").data('templatezoomtype');var zoom_cursor;var zoom_type;var scroll_zoom=!1;var lens_FadeIn=200;var lens_FadeOut=200;var zoomWindow_FadeIn=200;var zoomWindow_FadeOut=200;var zoom_tint=!1;var zoomWindow_Width=400;var zoomWindow_Height=400;var zoomWindow_Position=1;if(zt=='in'){zoom_cursor='crosshair';zoom_type='inner';lens_FadeIn=!1;lens_FadeOut=!1}else{zoom_cursor='default';zoom_type='window';zoom_tint=!0;zoomWindow_Width=$("#content").data('zoomwindowwidth');zoomWindow_Height=$("#content").data('zoomwindowheight');if($("#content").data('zoomposition')=='right'){if(prestashop.language.is_rtl==1){zoomWindow_Position=11}else{zoomWindow_Position=1}}
if($("#content").data('zoomposition')=='left'){if(prestashop.language.is_rtl==1){zoomWindow_Position=1}else{zoomWindow_Position=11}}
if($("#content").data('zoomposition')=='top'){zoomWindow_Position=13}
if($("#content").data('zoomposition')=='bottom'){zoomWindow_Position=7}
if(zt=='in_scrooll'){var ua=window.navigator.userAgent;var old_ie=ua.indexOf('MSIE ');var new_ie=ua.indexOf('Trident/');if(old_ie>0||new_ie>0){scroll_zoom=!1}else{scroll_zoom=!0}}};if($('#main').hasClass('product-image-gallery')){lens_FadeIn=!1;lens_FadeOut=!1;zoomWindow_FadeIn=!1;zoomWindow_FadeOut=!1}
var zoom_config={responsive:!0,cursor:zoom_cursor,scrollZoom:scroll_zoom,scrollZoomIncrement:0.1,zoomLevel:1,zoomType:zoom_type,gallery:'thumb-gallery',lensFadeIn:lens_FadeIn,lensFadeOut:lens_FadeOut,zoomWindowFadeIn:zoomWindow_FadeIn,zoomWindowFadeOut:zoomWindow_FadeOut,zoomWindowWidth:zoomWindow_Width,zoomWindowHeight:zoomWindow_Height,borderColour:'#888',borderSize:2,zoomWindowOffetx:0,zoomWindowOffety:0,zoomWindowPosition:zoomWindow_Position,tint:zoom_tint,};if($('#main').hasClass('product-image-gallery')){$('img.js-thumb').each(function(){var parent_e=$(this).parent();$(this).attr('src',parent_e.data('image'));$(this).data('type-zoom',parent_e.data('zoom-image'))});if($.fn.elevateZoom!==undefined){$('img.js-thumb').elevateZoom(zoom_config);$('img.js-thumb').bind("click",function(e){var ez=$(this).data('elevateZoom');$.fancybox(ez.getGalleryList());return!1})}}else{if($.fn.elevateZoom!==undefined){$("#zoom_product").elevateZoom(zoom_config);$("#zoom_product").bind("click",function(e){var ez=$('#zoom_product').data('elevateZoom');$.fancybox(ez.getGalleryList());return!1})}}}
function initSlickProductModal(){$('#product-modal .product-images').imagesLoaded(function(){if(typeof check_loaded_thumb_modal!='undefined'){clearInterval(check_loaded_thumb_modal)}
check_loaded_thumb_modal=setInterval(function(){if($('#product-modal .product-images').height()>0){$('#product-modal .product-images').fadeIn();clearInterval(check_loaded_thumb_modal);$('#thumb-gallery-modal').slick({asNavFor:'#gallery-modal',focusOnSelect:!0,mobileFirst:!0,speed:300,dots:!1,infinite:!0,vertical:!0,verticalSwiping:!0,slidesToShow:numberimage,slidesToScroll:1,slidesToShow:5,});$('#gallery-modal').slick({speed:300,dots:!1,infinite:!0,asNavFor:'#thumb-gallery-modal',slidesToShow:1,slidesToScroll:1,focusOnSelect:!0,})}},250)})}
function initSlickProductThumb(postion,numberimage,numberimage1200,numberimage992,numberimage768,numberimage576,numberimage480,numberimage360){var vertical=!0;var verticalSwiping=!0;var slick_rtl=!1;if(postion=="bottom"){vertical=!1;verticalSwiping=!1}
if(postion=='none'){vertical=!1;verticalSwiping=!1;numberimage=numberimage1200=numberimage992=numberimage768=numberimage576=numberimage480=numberimage360=1}
if(!vertical&&prestashop.language.is_rtl==1){slick_rtl=!0}
var slider=$('#thumb-gallery');var slider_big=$('#gallery');var asNavForSlider=(is_desktop||is_tablet)?'#thumb-gallery':'';slider_big.slick({speed:300,dots:!1,infinite:!0,asNavFor:asNavForSlider,mobileFirst:!0,focusOnSelect:!0,})
if(slider.length){slider.slick({asNavFor:'#gallery',centerMode:!0,focusOnSelect:!0,mobileFirst:!0,speed:300,dots:!1,infinite:!0,slidesToShow:4,vertical:vertical,verticalSwiping:verticalSwiping,slidesToScroll:1,rtl:slick_rtl,toleft:!0,})}}
function findPosition(slides){var position;for(var i=0;i<slides.length;i++){if($(slides[i]).hasClass('active')){position=$(slides[i]).data('slick-index');return position}}}
function actionQuickViewLoading(){$('.quick-view').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');$(this).find('.leo-quickview-bt-loading').css({'display':'block'});$(this).find('.leo-quickview-bt-content').hide();if(typeof check_active_quickview!='undefined'){clearInterval(check_active_quickview)}
check_active_quickview=setInterval(function(){if($('.quickview.modal').length){$('.quickview.modal').on('hide.bs.modal',function(e){$('.quick-view.active').find('.leo-quickview-bt-loading').hide();$('.quick-view.active').find('.leo-quickview-bt-content').show();$('.quick-view.active').removeClass('active')});clearInterval(check_active_quickview);initSlickProductQuickView()}},300)}})}
$(document).on('click','.leo_grid',function(e){e.preventDefault();$('#js-product-list .product_list').removeClass('list');$('#js-product-list .product_list').addClass('grid');$(this).parent().find('.leo_list').removeClass('selected');$(this).addClass('selected');var configName=LEO_COOKIE_THEME+'_grid_list';$.cookie(configName,'grid',{expires:1,path:'/'})});$(document).on('click','.leo_list',function(e){e.preventDefault();$('#js-product-list .product_list').removeClass('grid');$('#js-product-list .product_list').addClass('list');$(this).parent().find('.leo_grid').removeClass('selected');$(this).addClass('selected');var configName=LEO_COOKIE_THEME+'_grid_list';$.cookie(configName,'list',{expires:1,path:'/'})});function setDefaultListGrid(){if($.cookie(LEO_COOKIE_THEME+'_grid_list')=='grid'){$('.leo_grid').trigger('click')}
if($.cookie(LEO_COOKIE_THEME+'_grid_list')=='list'){$('.leo_list').trigger('click')}}
function processFloatHeader(headerAdd,scroolAction){if($('.ac_results').length){$('.ac_results').hide()}
if(headerAdd){$("#header").addClass("navbar-fixed-top");var hideheight=$("#header").height()+120;$("#page").css("padding-top",$("#header").height());setTimeout(function(){$("#page").css("padding-top",$("#header").height())},200)}else{$("#header").removeClass("navbar-fixed-top");$("#page").css("padding-top",'')}
var pos=$(window).scrollTop();if(scroolAction&&pos>=hideheight){$(".header-nav").addClass('hide-bar');$(".hide-bar").css("margin-top",-$(".header-nav").height());$("#header").addClass("mini-navbar");if(!$('#index .popup-menu .leo-verticalmenu').hasClass('active')){$('#index .popup-menu .leo-verticalmenu').addClass('active')}
if($('body:not(#index) .popup-menu .leo-verticalmenu').hasClass('active')){$('body:not(#index) .popup-menu .leo-verticalmenu').removeClass('active')}}else{$(".header-nav").removeClass('hide-bar');$(".header-nav").css("margin-top",0);$("#header").removeClass("mini-navbar");if($('#index .popup-menu .leo-verticalmenu').hasClass('active')){$('#index .popup-menu .leo-verticalmenu').removeClass('active')}}}
function floatHeader(){if(!$("body").hasClass("keep-header")||$(window).width()<=990){return}
$(window).resize(function(){if($(window).width()<=990){processFloatHeader(0,0)}else if($(window).width()>990){if($("body").hasClass("keep-header"))
processFloatHeader(1,1)}});var headerScrollTimer;$(window).scroll(function(){if(headerScrollTimer){window.clearTimeout(headerScrollTimer)}
headerScrollTimer=window.setTimeout(function(){if(!$("body").hasClass("keep-header"))return;if($(window).width()>990){processFloatHeader(1,1)}},100)})}
function backtotop(){$("#back-top").hide();$(window).scroll(function(){if($(this).scrollTop()>100){$('#back-top').fadeIn()}else{$('#back-top').fadeOut()}});$('#back-top a').click(function(){$('body,html').animate({scrollTop:0},800);return!1})}
function initSlickProductQuickView(){$('.quickview.modal .product-thumb-images').imagesLoaded(function(){if(typeof check_loaded_thumb_quickview!='undefined'){clearInterval(check_loaded_thumb_quickview)}
check_loaded_thumb_quickview=setInterval(function(){if($('.quickview.modal .product-thumb-images').height()>0){$('.quickview.modal .product-thumb-images').fadeIn();clearInterval(check_loaded_thumb_quickview);$('.quickview.modal .product-thumb-images').slick(options_quickview)}},300)})}
$(document).ready(function(){$('.product-flag').removeAttr('style');prestashop.on('updateProductList',function(){$('.product-flag').removeAttr('style')})})
$(function(){if($('.discover-more').length){var last_index=$('.leo-verticalmenu .verticalmenu .vertical .nav-item').last().index();for(var i=10;i<=last_index;i++){$('.leo-verticalmenu .verticalmenu .vertical .nav-item').eq(i).addClass('cat-hide').hide()}
$('.discover-more').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');$('.leo-verticalmenu .verticalmenu .vertical .nav-item.cat-hide').slideDown().removeClass('cat-hide')}else{$(this).removeClass('active');for(var i=10;i<=last_index;i++){$('.leo-verticalmenu .verticalmenu .vertical .nav-item').eq(i).addClass('cat-hide').slideUp()}}})}});jQuery.event.special.touchstart={setup:function(_,ns,handle){this.addEventListener("touchstart",handle,{passive:!ns.includes("noPreventDefault")})}};jQuery.event.special.touchmove={setup:function(_,ns,handle){this.addEventListener("touchmove",handle,{passive:!ns.includes("noPreventDefault")})}};jQuery.event.special.wheel={setup:function(_,ns,handle){this.addEventListener("wheel",handle,{passive:!0})}};jQuery.event.special.mousewheel={setup:function(_,ns,handle){this.addEventListener("mousewheel",handle,{passive:!0})}};if(page=='index'){function ecm_action(action,id_product,id_product_attribute,quantity){data={};data.ajax=!0;data.module='leofeature';data.action=action;data.show_modal=!0;data.id_product=id_product;data.id_product_attribute=id_product_attribute;if(action=='set_quantity')
data.quantity=quantity;old_products_count=prestashop.cart.products_count;$.ajax({url:'/'+prestashop.language.iso_code,type:'POST',dataType:'json',data:data,success:function(e){if(e.hasOwnProperty('ps_cart')){prestashop.cart=e.ps_cart}
if($(e.html).find('#blockcart-modal-ecm .modal-body .cart-items .cart-item').length){$('#blockcart-modal-ecm .modal-content').replaceWith($(e.html).find('#blockcart-modal-ecm .modal-content'))
$('#blockcart-modal-ecm .cart_quantity_input.ecm_product').on('change',function(){ecm_action('set_quantity',$(this).data('id_product'),$(this).data('id_product_attribute'),$(this).val())})
if(e.error){$.growl.error({title:e.error,size:"medium",message:"",})}
$('.cart-products-count, .leo-fly-cart-total').text(e.products_count);$('[data-target="#blockcart-modal-ecm"]').attr('data-toggle','modal')}else{$('html').removeClass('noscroll');$('#blockcart-modal-ecm').modal('hide').detach();$('.cart-bottom-mobile .cart-products-count, .leo-fly-cart-total, .cart-bottom-mobile .cart-products-count-top, #ecm_popup_menu_overlay .cart-products-count-top').text('')
$('[data-target="#blockcart-modal-ecm"]').attr('data-toggle','')}
if(!e.success){$('.qty_error.error_'+id_product+'_'+id_product_attribute).each(function(index,element){$(element).text(quantity_error)})}
fixCartModal()},error:function(e){console.log(e)}})}
function fixCartModal(){var modal=$("#blockcart-modal-ecm .modal-dialog");var body=$('html');var h=modal.height();var bh=body.height();if(h>bh){$('div#blockcart-modal-ecm .modal-body.sp_modal-body >.cart-overview').addClass('need-mh')}}}
$(document).ready(function(){if(page='product'&&(is_desktop||is_tablet)){$('#zoom_product').click(function(){var layerElement=$('.layer.ecm-open-modal');if(layerElement.length>0){layerElement.click()}})}});
/*!
Waypoints - 4.0.1
Copyright © Caleb Troughton
Licensed under the MIT license.
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
*/
(function(){'use strict'
var keyCounter=0
var allWaypoints={}
function Waypoint(options){if(!options){throw new Error('No options passed to Waypoint constructor')}
if(!options.element){throw new Error('No element option passed to Waypoint constructor')}
if(!options.handler){throw new Error('No handler option passed to Waypoint constructor')}
this.key='waypoint-'+keyCounter
this.options=Waypoint.Adapter.extend({},Waypoint.defaults,options)
this.element=this.options.element
this.adapter=new Waypoint.Adapter(this.element)
this.callback=options.handler
this.axis=this.options.horizontal?'horizontal':'vertical'
this.enabled=this.options.enabled
this.triggerPoint=null
this.group=Waypoint.Group.findOrCreate({name:this.options.group,axis:this.axis})
this.context=Waypoint.Context.findOrCreateByElement(this.options.context)
if(Waypoint.offsetAliases[this.options.offset]){this.options.offset=Waypoint.offsetAliases[this.options.offset]}
this.group.add(this)
this.context.add(this)
allWaypoints[this.key]=this
keyCounter+=1}
Waypoint.prototype.queueTrigger=function(direction){this.group.queueTrigger(this,direction)}
Waypoint.prototype.trigger=function(args){if(!this.enabled){return}
if(this.callback){this.callback.apply(this,args)}}
Waypoint.prototype.destroy=function(){this.context.remove(this)
this.group.remove(this)
delete allWaypoints[this.key]}
Waypoint.prototype.disable=function(){this.enabled=!1
return this}
Waypoint.prototype.enable=function(){this.context.refresh()
this.enabled=!0
return this}
Waypoint.prototype.next=function(){return this.group.next(this)}
Waypoint.prototype.previous=function(){return this.group.previous(this)}
Waypoint.invokeAll=function(method){var allWaypointsArray=[]
for(var waypointKey in allWaypoints){allWaypointsArray.push(allWaypoints[waypointKey])}
for(var i=0,end=allWaypointsArray.length;i<end;i++){allWaypointsArray[i][method]()}}
Waypoint.destroyAll=function(){Waypoint.invokeAll('destroy')}
Waypoint.disableAll=function(){Waypoint.invokeAll('disable')}
Waypoint.enableAll=function(){Waypoint.Context.refreshAll()
for(var waypointKey in allWaypoints){allWaypoints[waypointKey].enabled=!0}
return this}
Waypoint.refreshAll=function(){Waypoint.Context.refreshAll()}
Waypoint.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight}
Waypoint.viewportWidth=function(){return document.documentElement.clientWidth}
Waypoint.adapters=[]
Waypoint.defaults={context:window,continuous:!0,enabled:!0,group:'default',horizontal:!1,offset:0}
Waypoint.offsetAliases={'bottom-in-view':function(){return this.context.innerHeight()-this.adapter.outerHeight()},'right-in-view':function(){return this.context.innerWidth()-this.adapter.outerWidth()}}
window.Waypoint=Waypoint}());(function(){'use strict'
function requestAnimationFrameShim(callback){window.setTimeout(callback,1000/60)}
var keyCounter=0
var contexts={}
var Waypoint=window.Waypoint
var oldWindowLoad=window.onload
function Context(element){this.element=element
this.Adapter=Waypoint.Adapter
this.adapter=new this.Adapter(element)
this.key='waypoint-context-'+keyCounter
this.didScroll=!1
this.didResize=!1
this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()}
this.waypoints={vertical:{},horizontal:{}}
element.waypointContextKey=this.key
contexts[element.waypointContextKey]=this
keyCounter+=1
if(!Waypoint.windowContext){Waypoint.windowContext=!0
Waypoint.windowContext=new Context(window)}
this.createThrottledScrollHandler()
this.createThrottledResizeHandler()}
Context.prototype.add=function(waypoint){var axis=waypoint.options.horizontal?'horizontal':'vertical'
this.waypoints[axis][waypoint.key]=waypoint
this.refresh()}
Context.prototype.checkEmpty=function(){var horizontalEmpty=this.Adapter.isEmptyObject(this.waypoints.horizontal)
var verticalEmpty=this.Adapter.isEmptyObject(this.waypoints.vertical)
var isWindow=this.element==this.element.window
if(horizontalEmpty&&verticalEmpty&&!isWindow){this.adapter.off('.waypoints')
delete contexts[this.key]}}
Context.prototype.createThrottledResizeHandler=function(){var self=this
function resizeHandler(){self.handleResize()
self.didResize=!1}
this.adapter.on('resize.waypoints',function(){if(!self.didResize){self.didResize=!0
Waypoint.requestAnimationFrame(resizeHandler)}})}
Context.prototype.createThrottledScrollHandler=function(){var self=this
function scrollHandler(){self.handleScroll()
self.didScroll=!1}
this.adapter.on('scroll.waypoints',function(){if(!self.didScroll||Waypoint.isTouch){self.didScroll=!0
Waypoint.requestAnimationFrame(scrollHandler)}})}
Context.prototype.handleResize=function(){Waypoint.Context.refreshAll()}
Context.prototype.handleScroll=function(){var triggeredGroups={}
var axes={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:'right',backward:'left'},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:'down',backward:'up'}}
for(var axisKey in axes){var axis=axes[axisKey]
var isForward=axis.newScroll>axis.oldScroll
var direction=isForward?axis.forward:axis.backward
for(var waypointKey in this.waypoints[axisKey]){var waypoint=this.waypoints[axisKey][waypointKey]
if(waypoint.triggerPoint===null){continue}
var wasBeforeTriggerPoint=axis.oldScroll<waypoint.triggerPoint
var nowAfterTriggerPoint=axis.newScroll>=waypoint.triggerPoint
var crossedForward=wasBeforeTriggerPoint&&nowAfterTriggerPoint
var crossedBackward=!wasBeforeTriggerPoint&&!nowAfterTriggerPoint
if(crossedForward||crossedBackward){waypoint.queueTrigger(direction)
triggeredGroups[waypoint.group.id]=waypoint.group}}}
for(var groupKey in triggeredGroups){triggeredGroups[groupKey].flushTriggers()}
this.oldScroll={x:axes.horizontal.newScroll,y:axes.vertical.newScroll}}
Context.prototype.innerHeight=function(){if(this.element==this.element.window){return Waypoint.viewportHeight()}
return this.adapter.innerHeight()}
Context.prototype.remove=function(waypoint){delete this.waypoints[waypoint.axis][waypoint.key]
this.checkEmpty()}
Context.prototype.innerWidth=function(){if(this.element==this.element.window){return Waypoint.viewportWidth()}
return this.adapter.innerWidth()}
Context.prototype.destroy=function(){var allWaypoints=[]
for(var axis in this.waypoints){for(var waypointKey in this.waypoints[axis]){allWaypoints.push(this.waypoints[axis][waypointKey])}}
for(var i=0,end=allWaypoints.length;i<end;i++){allWaypoints[i].destroy()}}
Context.prototype.refresh=function(){var isWindow=this.element==this.element.window
var contextOffset=isWindow?undefined:this.adapter.offset()
var triggeredGroups={}
var axes
this.handleScroll()
axes={horizontal:{contextOffset:isWindow?0:contextOffset.left,contextScroll:isWindow?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:'right',backward:'left',offsetProp:'left'},vertical:{contextOffset:isWindow?0:contextOffset.top,contextScroll:isWindow?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:'down',backward:'up',offsetProp:'top'}}
for(var axisKey in axes){var axis=axes[axisKey]
for(var waypointKey in this.waypoints[axisKey]){var waypoint=this.waypoints[axisKey][waypointKey]
var adjustment=waypoint.options.offset
var oldTriggerPoint=waypoint.triggerPoint
var elementOffset=0
var freshWaypoint=oldTriggerPoint==null
var contextModifier,wasBeforeScroll,nowAfterScroll
var triggeredBackward,triggeredForward
if(waypoint.element!==waypoint.element.window){elementOffset=waypoint.adapter.offset()[axis.offsetProp]}
if(typeof adjustment==='function'){adjustment=adjustment.apply(waypoint)}else if(typeof adjustment==='string'){adjustment=parseFloat(adjustment)
if(waypoint.options.offset.indexOf('%')>-1){adjustment=Math.ceil(axis.contextDimension*adjustment/100)}}
contextModifier=axis.contextScroll-axis.contextOffset
waypoint.triggerPoint=Math.floor(elementOffset+contextModifier-adjustment)
wasBeforeScroll=oldTriggerPoint<axis.oldScroll
nowAfterScroll=waypoint.triggerPoint>=axis.oldScroll
triggeredBackward=wasBeforeScroll&&nowAfterScroll
triggeredForward=!wasBeforeScroll&&!nowAfterScroll
if(!freshWaypoint&&triggeredBackward){waypoint.queueTrigger(axis.backward)
triggeredGroups[waypoint.group.id]=waypoint.group}else if(!freshWaypoint&&triggeredForward){waypoint.queueTrigger(axis.forward)
triggeredGroups[waypoint.group.id]=waypoint.group}else if(freshWaypoint&&axis.oldScroll>=waypoint.triggerPoint){waypoint.queueTrigger(axis.forward)
triggeredGroups[waypoint.group.id]=waypoint.group}}}
Waypoint.requestAnimationFrame(function(){for(var groupKey in triggeredGroups){triggeredGroups[groupKey].flushTriggers()}})
return this}
Context.findOrCreateByElement=function(element){return Context.findByElement(element)||new Context(element)}
Context.refreshAll=function(){for(var contextId in contexts){contexts[contextId].refresh()}}
Context.findByElement=function(element){return contexts[element.waypointContextKey]}
window.onload=function(){if(oldWindowLoad){oldWindowLoad()}
Context.refreshAll()}
Waypoint.requestAnimationFrame=function(callback){var requestFn=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||requestAnimationFrameShim
requestFn.call(window,callback)}
Waypoint.Context=Context}());(function(){'use strict'
function byTriggerPoint(a,b){return a.triggerPoint-b.triggerPoint}
function byReverseTriggerPoint(a,b){return b.triggerPoint-a.triggerPoint}
var groups={vertical:{},horizontal:{}}
var Waypoint=window.Waypoint
function Group(options){this.name=options.name
this.axis=options.axis
this.id=this.name+'-'+this.axis
this.waypoints=[]
this.clearTriggerQueues()
groups[this.axis][this.name]=this}
Group.prototype.add=function(waypoint){this.waypoints.push(waypoint)}
Group.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}}
Group.prototype.flushTriggers=function(){for(var direction in this.triggerQueues){var waypoints=this.triggerQueues[direction]
var reverse=direction==='up'||direction==='left'
waypoints.sort(reverse?byReverseTriggerPoint:byTriggerPoint)
for(var i=0,end=waypoints.length;i<end;i+=1){var waypoint=waypoints[i]
if(waypoint.options.continuous||i===waypoints.length-1){waypoint.trigger([direction])}}}
this.clearTriggerQueues()}
Group.prototype.next=function(waypoint){this.waypoints.sort(byTriggerPoint)
var index=Waypoint.Adapter.inArray(waypoint,this.waypoints)
var isLast=index===this.waypoints.length-1
return isLast?null:this.waypoints[index+1]}
Group.prototype.previous=function(waypoint){this.waypoints.sort(byTriggerPoint)
var index=Waypoint.Adapter.inArray(waypoint,this.waypoints)
return index?this.waypoints[index-1]:null}
Group.prototype.queueTrigger=function(waypoint,direction){this.triggerQueues[direction].push(waypoint)}
Group.prototype.remove=function(waypoint){var index=Waypoint.Adapter.inArray(waypoint,this.waypoints)
if(index>-1){this.waypoints.splice(index,1)}}
Group.prototype.first=function(){return this.waypoints[0]}
Group.prototype.last=function(){return this.waypoints[this.waypoints.length-1]}
Group.findOrCreate=function(options){return groups[options.axis][options.name]||new Group(options)}
Waypoint.Group=Group}());(function(){'use strict'
var $=window.jQuery
var Waypoint=window.Waypoint
function JQueryAdapter(element){this.$element=$(element)}
$.each(['innerHeight','innerWidth','off','offset','on','outerHeight','outerWidth','scrollLeft','scrollTop'],function(i,method){JQueryAdapter.prototype[method]=function(){var args=Array.prototype.slice.call(arguments)
return this.$element[method].apply(this.$element,args)}})
$.each(['extend','inArray','isEmptyObject'],function(i,method){JQueryAdapter[method]=$[method]})
Waypoint.adapters.push({name:'jquery',Adapter:JQueryAdapter})
Waypoint.Adapter=JQueryAdapter}());(function(){'use strict'
var Waypoint=window.Waypoint
function createExtension(framework){return function(){var waypoints=[]
var overrides=arguments[0]
if(framework.isFunction(arguments[0])){overrides=framework.extend({},arguments[1])
overrides.handler=arguments[0]}
this.each(function(){var options=framework.extend({},overrides,{element:this})
if(typeof options.context==='string'){options.context=framework(this).closest(options.context)[0]}
waypoints.push(new Waypoint(options))})
return waypoints}}
if(window.jQuery){window.jQuery.fn.waypoint=createExtension(window.jQuery)}
if(window.Zepto){window.Zepto.fn.waypoint=createExtension(window.Zepto)}}());/*!
 * Stellar.js v0.6.2
 * http://markdalgleish.com/projects/stellar.js
 *
 * Copyright 2014, Mark Dalgleish
 * This content is released under the MIT license
 * http://markdalgleish.mit-license.org
 */
;(function($,window,document,undefined){var pluginName='stellar',defaults={scrollProperty:'scroll',positionProperty:'position',horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,responsive:!1,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,hideElement:function($elem){$elem.hide()},showElement:function($elem){$elem.show()}},scrollProperty={scroll:{getLeft:function($elem){return $elem.scrollLeft()},setLeft:function($elem,val){$elem.scrollLeft(val)},getTop:function($elem){return $elem.scrollTop()},setTop:function($elem,val){$elem.scrollTop(val)}},position:{getLeft:function($elem){return parseInt($elem.css('left'),10)*-1},getTop:function($elem){return parseInt($elem.css('top'),10)*-1}},margin:{getLeft:function($elem){return parseInt($elem.css('margin-left'),10)*-1},getTop:function($elem){return parseInt($elem.css('margin-top'),10)*-1}},transform:{getLeft:function($elem){var computedTransform=getComputedStyle($elem[0])[prefixedTransform];return(computedTransform!=='none'?parseInt(computedTransform.match(/(-?[0-9]+)/g)[4],10)*-1:0)},getTop:function($elem){var computedTransform=getComputedStyle($elem[0])[prefixedTransform];return(computedTransform!=='none'?parseInt(computedTransform.match(/(-?[0-9]+)/g)[5],10)*-1:0)}}},positionProperty={position:{setLeft:function($elem,left){$elem.css('left',left)},setTop:function($elem,top){$elem.css('top',top)}},transform:{setPosition:function($elem,left,startingLeft,top,startingTop){$elem[0].style[prefixedTransform]='translate3d('+(left-startingLeft)+'px, '+(top-startingTop)+'px, 0)'}}},vendorPrefix=(function(){var prefixes=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,style=$('script')[0].style,prefix='',prop;for(prop in style){if(prefixes.test(prop)){prefix=prop.match(prefixes)[0];break}}
if('WebkitOpacity' in style){prefix='Webkit'}
if('KhtmlOpacity' in style){prefix='Khtml'}
return function(property){return prefix+(prefix.length>0?property.charAt(0).toUpperCase()+property.slice(1):property)}}()),prefixedTransform=vendorPrefix('transform'),supportsBackgroundPositionXY=$('<div />',{style:'background:#fff'}).css('background-position-x')!==undefined,setBackgroundPosition=(supportsBackgroundPositionXY?function($elem,x,y){$elem.css({'background-position-x':x,'background-position-y':y})}:function($elem,x,y){$elem.css('background-position',x+' '+y)}),getBackgroundPosition=(supportsBackgroundPositionXY?function($elem){return[$elem.css('background-position-x'),$elem.css('background-position-y')]}:function($elem){return $elem.css('background-position').split(' ')}),requestAnimFrame=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){setTimeout(callback,1000/60)});function Plugin(element,options){this.element=element;this.options=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;this.init()}
Plugin.prototype={init:function(){this.options.name=pluginName+'_'+Math.floor(Math.random()*1e9);this._defineElements();this._defineGetters();this._defineSetters();this._handleWindowLoadAndResize();this._detectViewport();this.refresh({firstLoad:!0});if(this.options.scrollProperty==='scroll'){this._handleScrollEvent()}else{this._startAnimationLoop()}},_defineElements:function(){if(this.element===document.body)this.element=window;this.$scrollElement=$(this.element);this.$element=(this.element===window?$('body'):this.$scrollElement);this.$viewportElement=(this.options.viewportElement!==undefined?$(this.options.viewportElement):(this.$scrollElement[0]===window||this.options.scrollProperty==='scroll'?this.$scrollElement:this.$scrollElement.parent()))},_defineGetters:function(){var self=this,scrollPropertyAdapter=scrollProperty[self.options.scrollProperty];this._getScrollLeft=function(){return scrollPropertyAdapter.getLeft(self.$scrollElement)};this._getScrollTop=function(){return scrollPropertyAdapter.getTop(self.$scrollElement)}},_defineSetters:function(){var self=this,scrollPropertyAdapter=scrollProperty[self.options.scrollProperty],positionPropertyAdapter=positionProperty[self.options.positionProperty],setScrollLeft=scrollPropertyAdapter.setLeft,setScrollTop=scrollPropertyAdapter.setTop;this._setScrollLeft=(typeof setScrollLeft==='function'?function(val){setScrollLeft(self.$scrollElement,val)}:$.noop);this._setScrollTop=(typeof setScrollTop==='function'?function(val){setScrollTop(self.$scrollElement,val)}:$.noop);this._setPosition=positionPropertyAdapter.setPosition||function($elem,left,startingLeft,top,startingTop){if(self.options.horizontalScrolling){positionPropertyAdapter.setLeft($elem,left,startingLeft)}
if(self.options.verticalScrolling){positionPropertyAdapter.setTop($elem,top,startingTop)}}},_handleWindowLoadAndResize:function(){var self=this,$window=$(window);if(self.options.responsive){$window.bind('load.'+this.name,function(){self.refresh()})}
$window.bind('resize.'+this.name,function(){self._detectViewport();if(self.options.responsive){self.refresh()}})},refresh:function(options){var self=this,oldLeft=self._getScrollLeft(),oldTop=self._getScrollTop();if(!options||!options.firstLoad){this._reset()}
this._setScrollLeft(0);this._setScrollTop(0);this._setOffsets();this._findParticles();this._findBackgrounds();if(options&&options.firstLoad&&/WebKit/.test(navigator.userAgent)){$(window).load(function(){var oldLeft=self._getScrollLeft(),oldTop=self._getScrollTop();self._setScrollLeft(oldLeft+1);self._setScrollTop(oldTop+1);self._setScrollLeft(oldLeft);self._setScrollTop(oldTop)})}
this._setScrollLeft(oldLeft);this._setScrollTop(oldTop)},_detectViewport:function(){var viewportOffsets=this.$viewportElement.offset(),hasOffsets=viewportOffsets!==null&&viewportOffsets!==undefined;this.viewportWidth=this.$viewportElement.width();this.viewportHeight=this.$viewportElement.height();this.viewportOffsetTop=(hasOffsets?viewportOffsets.top:0);this.viewportOffsetLeft=(hasOffsets?viewportOffsets.left:0)},_findParticles:function(){var self=this,scrollLeft=this._getScrollLeft(),scrollTop=this._getScrollTop();if(this.particles!==undefined){for(var i=this.particles.length-1;i>=0;i--){this.particles[i].$element.data('stellar-elementIsActive',undefined)}}
this.particles=[];if(!this.options.parallaxElements)return;this.$element.find('[data-stellar-ratio]').each(function(i){var $this=$(this),horizontalOffset,verticalOffset,positionLeft,positionTop,marginLeft,marginTop,$offsetParent,offsetLeft,offsetTop,parentOffsetLeft=0,parentOffsetTop=0,tempParentOffsetLeft=0,tempParentOffsetTop=0;if(!$this.data('stellar-elementIsActive')){$this.data('stellar-elementIsActive',this)}else if($this.data('stellar-elementIsActive')!==this){return}
self.options.showElement($this);if(!$this.data('stellar-startingLeft')){$this.data('stellar-startingLeft',$this.css('left'));$this.data('stellar-startingTop',$this.css('top'))}else{$this.css('left',$this.data('stellar-startingLeft'));$this.css('top',$this.data('stellar-startingTop'))}
positionLeft=$this.position().left;positionTop=$this.position().top;marginLeft=($this.css('margin-left')==='auto')?0:parseInt($this.css('margin-left'),10);marginTop=($this.css('margin-top')==='auto')?0:parseInt($this.css('margin-top'),10);offsetLeft=$this.offset().left-marginLeft;offsetTop=$this.offset().top-marginTop;$this.parents().each(function(){var $this=$(this);if($this.data('stellar-offset-parent')===!0){parentOffsetLeft=tempParentOffsetLeft;parentOffsetTop=tempParentOffsetTop;$offsetParent=$this;return!1}else{tempParentOffsetLeft+=$this.position().left;tempParentOffsetTop+=$this.position().top}});horizontalOffset=($this.data('stellar-horizontal-offset')!==undefined?$this.data('stellar-horizontal-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-horizontal-offset')!==undefined?$offsetParent.data('stellar-horizontal-offset'):self.horizontalOffset));verticalOffset=($this.data('stellar-vertical-offset')!==undefined?$this.data('stellar-vertical-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-vertical-offset')!==undefined?$offsetParent.data('stellar-vertical-offset'):self.verticalOffset));self.particles.push({$element:$this,$offsetParent:$offsetParent,isFixed:$this.css('position')==='fixed',horizontalOffset:horizontalOffset,verticalOffset:verticalOffset,startingPositionLeft:positionLeft,startingPositionTop:positionTop,startingOffsetLeft:offsetLeft,startingOffsetTop:offsetTop,parentOffsetLeft:parentOffsetLeft,parentOffsetTop:parentOffsetTop,stellarRatio:($this.data('stellar-ratio')!==undefined?$this.data('stellar-ratio'):1),width:$this.outerWidth(!0),height:$this.outerHeight(!0),isHidden:!1})})},_findBackgrounds:function(){var self=this,scrollLeft=this._getScrollLeft(),scrollTop=this._getScrollTop(),$backgroundElements;this.backgrounds=[];if(!this.options.parallaxBackgrounds)return;$backgroundElements=this.$element.find('[data-stellar-background-ratio]');if(this.$element.data('stellar-background-ratio')){$backgroundElements=$backgroundElements.add(this.$element)}
$backgroundElements.each(function(){var $this=$(this),backgroundPosition=getBackgroundPosition($this),horizontalOffset,verticalOffset,positionLeft,positionTop,marginLeft,marginTop,offsetLeft,offsetTop,$offsetParent,parentOffsetLeft=0,parentOffsetTop=0,tempParentOffsetLeft=0,tempParentOffsetTop=0;if(!$this.data('stellar-backgroundIsActive')){$this.data('stellar-backgroundIsActive',this)}else if($this.data('stellar-backgroundIsActive')!==this){return}
if(!$this.data('stellar-backgroundStartingLeft')){$this.data('stellar-backgroundStartingLeft',backgroundPosition[0]);$this.data('stellar-backgroundStartingTop',backgroundPosition[1])}else{setBackgroundPosition($this,$this.data('stellar-backgroundStartingLeft'),$this.data('stellar-backgroundStartingTop'))}
marginLeft=($this.css('margin-left')==='auto')?0:parseInt($this.css('margin-left'),10);marginTop=($this.css('margin-top')==='auto')?0:parseInt($this.css('margin-top'),10);offsetLeft=$this.offset().left-marginLeft-scrollLeft;offsetTop=$this.offset().top-marginTop-scrollTop;$this.parents().each(function(){var $this=$(this);if($this.data('stellar-offset-parent')===!0){parentOffsetLeft=tempParentOffsetLeft;parentOffsetTop=tempParentOffsetTop;$offsetParent=$this;return!1}else{tempParentOffsetLeft+=$this.position().left;tempParentOffsetTop+=$this.position().top}});horizontalOffset=($this.data('stellar-horizontal-offset')!==undefined?$this.data('stellar-horizontal-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-horizontal-offset')!==undefined?$offsetParent.data('stellar-horizontal-offset'):self.horizontalOffset));verticalOffset=($this.data('stellar-vertical-offset')!==undefined?$this.data('stellar-vertical-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-vertical-offset')!==undefined?$offsetParent.data('stellar-vertical-offset'):self.verticalOffset));self.backgrounds.push({$element:$this,$offsetParent:$offsetParent,isFixed:$this.css('background-attachment')==='fixed',horizontalOffset:horizontalOffset,verticalOffset:verticalOffset,startingValueLeft:backgroundPosition[0],startingValueTop:backgroundPosition[1],startingBackgroundPositionLeft:(isNaN(parseInt(backgroundPosition[0],10))?0:parseInt(backgroundPosition[0],10)),startingBackgroundPositionTop:(isNaN(parseInt(backgroundPosition[1],10))?0:parseInt(backgroundPosition[1],10)),startingPositionLeft:$this.position().left,startingPositionTop:$this.position().top,startingOffsetLeft:offsetLeft,startingOffsetTop:offsetTop,parentOffsetLeft:parentOffsetLeft,parentOffsetTop:parentOffsetTop,stellarRatio:($this.data('stellar-background-ratio')===undefined?1:$this.data('stellar-background-ratio'))})})},_reset:function(){var particle,startingPositionLeft,startingPositionTop,background,i;for(i=this.particles.length-1;i>=0;i--){particle=this.particles[i];startingPositionLeft=particle.$element.data('stellar-startingLeft');startingPositionTop=particle.$element.data('stellar-startingTop');this._setPosition(particle.$element,startingPositionLeft,startingPositionLeft,startingPositionTop,startingPositionTop);this.options.showElement(particle.$element);particle.$element.data('stellar-startingLeft',null).data('stellar-elementIsActive',null).data('stellar-backgroundIsActive',null)}
for(i=this.backgrounds.length-1;i>=0;i--){background=this.backgrounds[i];background.$element.data('stellar-backgroundStartingLeft',null).data('stellar-backgroundStartingTop',null);setBackgroundPosition(background.$element,background.startingValueLeft,background.startingValueTop)}},destroy:function(){this._reset();this.$scrollElement.unbind('resize.'+this.name).unbind('scroll.'+this.name);this._animationLoop=$.noop;$(window).unbind('load.'+this.name).unbind('resize.'+this.name)},_setOffsets:function(){var self=this,$window=$(window);$window.unbind('resize.horizontal-'+this.name).unbind('resize.vertical-'+this.name);if(typeof this.options.horizontalOffset==='function'){this.horizontalOffset=this.options.horizontalOffset();$window.bind('resize.horizontal-'+this.name,function(){self.horizontalOffset=self.options.horizontalOffset()})}else{this.horizontalOffset=this.options.horizontalOffset}
if(typeof this.options.verticalOffset==='function'){this.verticalOffset=this.options.verticalOffset();$window.bind('resize.vertical-'+this.name,function(){self.verticalOffset=self.options.verticalOffset()})}else{this.verticalOffset=this.options.verticalOffset}},_repositionElements:function(){var scrollLeft=this._getScrollLeft(),scrollTop=this._getScrollTop(),horizontalOffset,verticalOffset,particle,fixedRatioOffset,background,bgLeft,bgTop,isVisibleVertical=!0,isVisibleHorizontal=!0,newPositionLeft,newPositionTop,newOffsetLeft,newOffsetTop,i;if(this.currentScrollLeft===scrollLeft&&this.currentScrollTop===scrollTop&&this.currentWidth===this.viewportWidth&&this.currentHeight===this.viewportHeight){return}else{this.currentScrollLeft=scrollLeft;this.currentScrollTop=scrollTop;this.currentWidth=this.viewportWidth;this.currentHeight=this.viewportHeight}
for(i=this.particles.length-1;i>=0;i--){particle=this.particles[i];fixedRatioOffset=(particle.isFixed?1:0);if(this.options.horizontalScrolling){newPositionLeft=(scrollLeft+particle.horizontalOffset+this.viewportOffsetLeft+particle.startingPositionLeft-particle.startingOffsetLeft+particle.parentOffsetLeft)*-(particle.stellarRatio+fixedRatioOffset-1)+particle.startingPositionLeft;newOffsetLeft=newPositionLeft-particle.startingPositionLeft+particle.startingOffsetLeft}else{newPositionLeft=particle.startingPositionLeft;newOffsetLeft=particle.startingOffsetLeft}
if(this.options.verticalScrolling){newPositionTop=(scrollTop+particle.verticalOffset+this.viewportOffsetTop+particle.startingPositionTop-particle.startingOffsetTop+particle.parentOffsetTop)*-(particle.stellarRatio+fixedRatioOffset-1)+particle.startingPositionTop;newOffsetTop=newPositionTop-particle.startingPositionTop+particle.startingOffsetTop}else{newPositionTop=particle.startingPositionTop;newOffsetTop=particle.startingOffsetTop}
if(this.options.hideDistantElements){isVisibleHorizontal=!this.options.horizontalScrolling||newOffsetLeft+particle.width>(particle.isFixed?0:scrollLeft)&&newOffsetLeft<(particle.isFixed?0:scrollLeft)+this.viewportWidth+this.viewportOffsetLeft;isVisibleVertical=!this.options.verticalScrolling||newOffsetTop+particle.height>(particle.isFixed?0:scrollTop)&&newOffsetTop<(particle.isFixed?0:scrollTop)+this.viewportHeight+this.viewportOffsetTop}
if(isVisibleHorizontal&&isVisibleVertical){if(particle.isHidden){this.options.showElement(particle.$element);particle.isHidden=!1}
this._setPosition(particle.$element,newPositionLeft,particle.startingPositionLeft,newPositionTop,particle.startingPositionTop)}else{if(!particle.isHidden){this.options.hideElement(particle.$element);particle.isHidden=!0}}}
for(i=this.backgrounds.length-1;i>=0;i--){background=this.backgrounds[i];fixedRatioOffset=(background.isFixed?0:1);bgLeft=(this.options.horizontalScrolling?(scrollLeft+background.horizontalOffset-this.viewportOffsetLeft-background.startingOffsetLeft+background.parentOffsetLeft-background.startingBackgroundPositionLeft)*(fixedRatioOffset-background.stellarRatio)+'px':background.startingValueLeft);bgTop=(this.options.verticalScrolling?(scrollTop+background.verticalOffset-this.viewportOffsetTop-background.startingOffsetTop+background.parentOffsetTop-background.startingBackgroundPositionTop)*(fixedRatioOffset-background.stellarRatio)+'px':background.startingValueTop);setBackgroundPosition(background.$element,bgLeft,bgTop)}},_handleScrollEvent:function(){var self=this,ticking=!1;var update=function(){self._repositionElements();ticking=!1};var requestTick=function(){if(!ticking){requestAnimFrame(update);ticking=!0}};this.$scrollElement.bind('scroll.'+this.name,requestTick);requestTick()},_startAnimationLoop:function(){var self=this;this._animationLoop=function(){requestAnimFrame(self._animationLoop);self._repositionElements()};this._animationLoop()}};$.fn[pluginName]=function(options){var args=arguments;if(options===undefined||typeof options==='object'){return this.each(function(){if(!$.data(this,'plugin_'+pluginName)){$.data(this,'plugin_'+pluginName,new Plugin(this,options))}})}else if(typeof options==='string'&&options[0]!=='_'&&options!=='init'){return this.each(function(){var instance=$.data(this,'plugin_'+pluginName);if(instance instanceof Plugin&&typeof instance[options]==='function'){instance[options].apply(instance,Array.prototype.slice.call(args,1))}
if(options==='destroy'){$.data(this,'plugin_'+pluginName,null)}})}};$[pluginName]=function(options){var $window=$(window);return $window.stellar.apply($window,Array.prototype.slice.call(arguments,0))};$[pluginName].scrollProperty=scrollProperty;$[pluginName].positionProperty=positionProperty;window.Stellar=Plugin}(jQuery,this,document));if(typeof Object.create!=="function"){Object.create=function(obj){function F(){}
F.prototype=obj;return new F()}}(function($,window,document){var Carousel={init:function(options,el){var base=this;base.$elem=$(el);base.options=$.extend({},$.fn.owlCarousel.options,base.$elem.data(),options);base.userOptions=options;base.loadContent()},loadContent:function(){var base=this,url;function getData(data){var i,content="";if(typeof base.options.jsonSuccess==="function"){base.options.jsonSuccess.apply(this,[data])}else{for(i in data.owl){if(data.owl.hasOwnProperty(i)){content+=data.owl[i].item}}
base.$elem.html(content)}
base.logIn()}
if(typeof base.options.beforeInit==="function"){base.options.beforeInit.apply(this,[base.$elem])}
if(typeof base.options.jsonPath==="string"){url=base.options.jsonPath;$.getJSON(url,getData)}else{base.logIn()}},logIn:function(){var base=this;base.$elem.data({"owl-originalStyles":base.$elem.attr("style"),"owl-originalClasses":base.$elem.attr("class")});base.orignalItems=base.options.items;base.checkBrowser();base.wrapperWidth=0;base.checkVisible=null;base.setVars()},setVars:function(){var base=this;if(base.$elem.children().length===0){return!1}
base.baseClass();base.eventTypes();base.$userItems=base.$elem.children();base.itemsAmount=base.$userItems.length;base.wrapItems();base.$owlItems=base.$elem.find(".owl-item");base.$owlWrapper=base.$elem.find(".owl-wrapper");base.playDirection="next";base.prevItem=0;base.prevArr=[0];base.currentItem=0;base.customEvents();base.onStartup()},onStartup:function(){var base=this;base.updateItems();base.calculateAll();base.buildControls();base.updateControls();base.response();base.moveEvents();base.stopOnHover();base.owlStatus();if(base.options.transitionStyle!==!1){base.transitionTypes(base.options.transitionStyle)}
if(base.options.autoPlay===!0){base.options.autoPlay=5000}
base.play();base.$elem.find(".owl-wrapper").css("display","block");if(!base.$elem.is(":visible")){base.watchVisibility()}else{}
base.onstartup=!1;base.eachMoveUpdate();if(typeof base.options.afterInit==="function"){base.options.afterInit.apply(this,[base.$elem])}},eachMoveUpdate:function(){var base=this;if(base.options.lazyLoad===!0){base.lazyLoad()}
if(base.options.autoHeight===!0){base.autoHeight()}
base.onVisibleItems();if(typeof base.options.afterAction==="function"){base.options.afterAction.apply(this,[base.$elem])}},updateVars:function(){var base=this;if(typeof base.options.beforeUpdate==="function"){base.options.beforeUpdate.apply(this,[base.$elem])}
base.watchVisibility();base.updateItems();base.calculateAll();base.updatePosition();base.updateControls();base.eachMoveUpdate();if(typeof base.options.afterUpdate==="function"){base.options.afterUpdate.apply(this,[base.$elem])}},reload:function(){var base=this;window.setTimeout(function(){base.updateVars()},0)},watchVisibility:function(){var base=this;if(base.$elem.is(":visible")===!1){window.clearInterval(base.autoPlayInterval);window.clearInterval(base.checkVisible)}else{return!1}
base.checkVisible=window.setInterval(function(){if(base.$elem.is(":visible")){base.reload();window.clearInterval(base.checkVisible)}},500)},wrapItems:function(){var base=this;base.$userItems.wrapAll("<div class=\"owl-wrapper\">").wrap("<div class=\"owl-item\"></div>");base.$elem.find(".owl-wrapper").wrap("<div class=\"owl-wrapper-outer\">");base.wrapperOuter=base.$elem.find(".owl-wrapper-outer")},baseClass:function(){var base=this,hasBaseClass=base.$elem.hasClass(base.options.baseClass),hasThemeClass=base.$elem.hasClass(base.options.theme);if(!hasBaseClass){base.$elem.addClass(base.options.baseClass)}
if(!hasThemeClass){base.$elem.addClass(base.options.theme)}},updateItems:function(){var base=this,width,i;if(base.options.responsive===!1){return!1}
if(base.options.singleItem===!0){base.options.items=base.orignalItems=1;base.options.itemsCustom=!1;base.options.itemsDesktop=!1;base.options.itemsDesktopSmall=!1;base.options.itemsTablet=!1;base.options.itemsTabletSmall=!1;base.options.itemsMobile=!1;return!1}
width=$(base.options.responsiveBaseWidth).width();if(width>=(base.options.itemsDesktop[0]||base.orignalItems)){base.options.items=base.orignalItems}
if(base.options.itemsCustom!==!1){base.options.itemsCustom.sort(function(a,b){return a[0]-b[0]});for(i=0;i<base.options.itemsCustom.length;i+=1){if(base.options.itemsCustom[i][0]<=width){base.options.items=base.options.itemsCustom[i][1]}}}else{if(width<base.options.itemsDesktop[0]&&base.options.itemsDesktop!==!1){base.options.items=base.options.itemsDesktop[1]}
if(width<base.options.itemsDesktopSmall[0]&&base.options.itemsDesktopSmall!==!1){base.options.items=base.options.itemsDesktopSmall[1]}
if(width<base.options.itemsTablet[0]&&base.options.itemsTablet!==!1){base.options.items=base.options.itemsTablet[1]}
if(width<base.options.itemsTabletSmall[0]&&base.options.itemsTabletSmall!==!1){base.options.items=base.options.itemsTabletSmall[1]}
if(width<base.options.itemsMobile[0]&&base.options.itemsMobile!==!1){base.options.items=base.options.itemsMobile[1]}}
if(base.options.items>base.itemsAmount&&base.options.itemsScaleUp===!0){base.options.items=base.itemsAmount}},response:function(){var base=this,smallDelay,lastWindowWidth;if(base.options.responsive!==!0){return!1}
lastWindowWidth=$(window).width();base.resizer=function(){if($(window).width()!==lastWindowWidth){if(base.options.autoPlay!==!1){window.clearInterval(base.autoPlayInterval)}
window.clearTimeout(smallDelay);smallDelay=window.setTimeout(function(){lastWindowWidth=$(window).width();base.updateVars()},base.options.responsiveRefreshRate)}};$(window).resize(base.resizer)},updatePosition:function(){var base=this;base.jumpTo(base.currentItem);if(base.options.autoPlay!==!1){base.checkAp()}},appendItemsSizes:function(){var base=this,roundPages=0,lastItem=base.itemsAmount-base.options.items;base.$owlItems.each(function(index){var $this=$(this);$this.css({"width":base.itemWidth}).data("owl-item",Number(index));if(index%base.options.items===0||index===lastItem){if(!(index>lastItem)){roundPages+=1}}
$this.data("owl-roundPages",roundPages)})},appendWrapperSizes:function(){var base=this,width=base.$owlItems.length*base.itemWidth,cssObj;base.options.direction=="rtl"?cssObj={"right":0,direction:"rtl"}:cssObj={"left":0};base.$owlWrapper.css({"width":width*2});base.appendItemsSizes()},calculateAll:function(){var base=this;base.calculateWidth();base.appendWrapperSizes();base.loops();base.max()},calculateWidth:function(){var base=this;base.itemWidth=Math.round((base.$elem.width()/base.options.items)*100)/100},max:function(){var base=this,maximum=((base.itemsAmount*base.itemWidth)-base.options.items*base.itemWidth)*-1;if(base.options.items>base.itemsAmount){base.maximumItem=0;maximum=0;base.maximumPixels=0}else{base.maximumItem=base.itemsAmount-base.options.items;base.maximumPixels=maximum}
return maximum},min:function(){return 0},loops:function(){var base=this,prev=0,elWidth=0,i,item,roundPageNum;base.positionsInArray=[0];base.pagesInArray=[];for(i=0;i<base.itemsAmount;i+=1){elWidth+=base.itemWidth;base.positionsInArray.push(-elWidth);if(base.options.scrollPerPage===!0){item=$(base.$owlItems[i]);roundPageNum=item.data("owl-roundPages");if(roundPageNum!==prev){base.pagesInArray[prev]=base.positionsInArray[i];prev=roundPageNum}}}},buildControls:function(){var base=this;if(base.options.navigation===!0||base.options.pagination===!0){base.owlControls=$("<div class=\"owl-controls\"/>").toggleClass("clickable",!base.browser.isTouch).appendTo(base.$elem)}
if(base.options.pagination===!0){base.buildPagination()}
if(base.options.navigation===!0){base.buildButtons()}},buildButtons:function(){var base=this,buttonsWrapper=$("<div class=\"owl-buttons\"/>");base.owlControls.append(buttonsWrapper);base.buttonPrev=$("<div/>",{"class":"owl-prev","html":base.options.navigationText[0]||""});base.buttonNext=$("<div/>",{"class":"owl-next","html":base.options.navigationText[1]||""});buttonsWrapper.append(base.buttonPrev).append(base.buttonNext);buttonsWrapper.on("touchstart.owlControls mousedown.owlControls","div[class^=\"owl\"]",function(event){event.preventDefault()});buttonsWrapper.on("touchend.owlControls mouseup.owlControls","div[class^=\"owl\"]",function(event){event.preventDefault();if($(this).hasClass("owl-next")){base.next()}else{base.prev()}})},buildPagination:function(){var base=this;base.paginationWrapper=$("<div class=\"owl-pagination\"/>");base.owlControls.append(base.paginationWrapper);base.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(event){event.preventDefault();if(Number($(this).data("owl-page"))!==base.currentItem){base.goTo(Number($(this).data("owl-page")),!0)}})},updatePagination:function(){var base=this,counter,lastPage,lastItem,i,paginationButton,paginationButtonInner;if(base.options.pagination===!1){return!1}
base.paginationWrapper.html("");counter=0;lastPage=base.itemsAmount-base.itemsAmount%base.options.items;for(i=0;i<base.itemsAmount;i+=1){if(i%base.options.items===0){counter+=1;if(lastPage===i){lastItem=base.itemsAmount-base.options.items}
paginationButton=$("<div/>",{"class":"owl-page"});paginationButtonInner=$("<span></span>",{"text":base.options.paginationNumbers===!0?counter:"","class":base.options.paginationNumbers===!0?"owl-numbers":""});paginationButton.append(paginationButtonInner);paginationButton.data("owl-page",lastPage===i?lastItem:i);paginationButton.data("owl-roundPages",counter);base.paginationWrapper.append(paginationButton)}}
base.checkPagination()},checkPagination:function(){var base=this;if(base.options.pagination===!1){return!1}
base.paginationWrapper.find(".owl-page").each(function(){if($(this).data("owl-roundPages")===$(base.$owlItems[base.currentItem]).data("owl-roundPages")){base.paginationWrapper.find(".owl-page").removeClass("active");$(this).addClass("active")}})},checkNavigation:function(){var base=this;if(base.options.navigation===!1){return!1}
if(base.options.rewindNav===!1){if(base.currentItem===0&&base.maximumItem===0){base.buttonPrev.addClass("disabled");base.buttonNext.addClass("disabled")}else if(base.currentItem===0&&base.maximumItem!==0){base.buttonPrev.addClass("disabled");base.buttonNext.removeClass("disabled")}else if(base.currentItem===base.maximumItem){base.buttonPrev.removeClass("disabled");base.buttonNext.addClass("disabled")}else if(base.currentItem!==0&&base.currentItem!==base.maximumItem){base.buttonPrev.removeClass("disabled");base.buttonNext.removeClass("disabled")}}},updateControls:function(){var base=this;base.updatePagination();base.checkNavigation();if(base.owlControls){if(base.options.items>=base.itemsAmount){base.owlControls.hide()}else{base.owlControls.show()}}},destroyControls:function(){var base=this;if(base.owlControls){base.owlControls.remove()}},next:function(speed){var base=this;if(base.isTransition){return!1}
base.currentItem+=base.options.scrollPerPage===!0?base.options.items:1;if(base.currentItem>base.maximumItem+(base.options.scrollPerPage===!0?(base.options.items-1):0)){if(base.options.rewindNav===!0){base.currentItem=0;speed="rewind"}else{base.currentItem=base.maximumItem;return!1}}
base.goTo(base.currentItem,speed)},prev:function(speed){var base=this;if(base.isTransition){return!1}
if(base.options.scrollPerPage===!0&&base.currentItem>0&&base.currentItem<base.options.items){base.currentItem=0}else{base.currentItem-=base.options.scrollPerPage===!0?base.options.items:1}
if(base.currentItem<0){if(base.options.rewindNav===!0){base.currentItem=base.maximumItem;speed="rewind"}else{base.currentItem=0;return!1}}
base.goTo(base.currentItem,speed)},goTo:function(position,speed,drag){var base=this,goToPixel;if(base.isTransition){return!1}
if(typeof base.options.beforeMove==="function"){base.options.beforeMove.apply(this,[base.$elem])}
if(position>=base.maximumItem){position=base.maximumItem}else if(position<=0){position=0}
base.currentItem=base.owl.currentItem=position;if(base.options.transitionStyle!==!1&&drag!=="drag"&&base.options.items===1&&base.browser.support3d===!0){base.swapSpeed(0);if(base.browser.support3d===!0){base.transition3d(base.positionsInArray[position])}else{base.css2slide(base.positionsInArray[position],1)}
base.afterGo();base.singleItemTransition();return!1}
goToPixel=base.positionsInArray[position];if(base.browser.support3d===!0){base.isCss3Finish=!1;if(speed===!0){base.swapSpeed("paginationSpeed");window.setTimeout(function(){base.isCss3Finish=!0},base.options.paginationSpeed)}else if(speed==="rewind"){base.swapSpeed(base.options.rewindSpeed);window.setTimeout(function(){base.isCss3Finish=!0},base.options.rewindSpeed)}else{base.swapSpeed("slideSpeed");window.setTimeout(function(){base.isCss3Finish=!0},base.options.slideSpeed)}
base.transition3d(goToPixel)}else{if(speed===!0){base.css2slide(goToPixel,base.options.paginationSpeed)}else if(speed==="rewind"){base.css2slide(goToPixel,base.options.rewindSpeed)}else{base.css2slide(goToPixel,base.options.slideSpeed)}}
base.afterGo()},jumpTo:function(position){var base=this;if(typeof base.options.beforeMove==="function"){base.options.beforeMove.apply(this,[base.$elem])}
if(position>=base.maximumItem||position===-1){position=base.maximumItem}else if(position<=0){position=0}
base.swapSpeed(0);if(base.browser.support3d===!0){base.transition3d(base.positionsInArray[position])}else{base.css2slide(base.positionsInArray[position],1)}
base.currentItem=base.owl.currentItem=position;base.afterGo()},afterGo:function(){var base=this;base.prevArr.push(base.currentItem);base.prevItem=base.owl.prevItem=base.prevArr[base.prevArr.length-2];base.prevArr.shift(0);if(base.prevItem!==base.currentItem){base.checkPagination();base.checkNavigation();base.eachMoveUpdate();if(base.options.autoPlay!==!1){base.checkAp()}}
if(typeof base.options.afterMove==="function"&&base.prevItem!==base.currentItem){base.options.afterMove.apply(this,[base.$elem])}},stop:function(){var base=this;base.apStatus="stop";window.clearInterval(base.autoPlayInterval)},checkAp:function(){var base=this;if(base.apStatus!=="stop"){base.play()}},play:function(){var base=this;base.apStatus="play";if(base.options.autoPlay===!1){return!1}
window.clearInterval(base.autoPlayInterval);base.autoPlayInterval=window.setInterval(function(){base.next(!0)},base.options.autoPlay)},swapSpeed:function(action){var base=this;if(action==="slideSpeed"){base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed))}else if(action==="paginationSpeed"){base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed))}else if(typeof action!=="string"){base.$owlWrapper.css(base.addCssSpeed(action))}},addCssSpeed:function(speed){return{"-webkit-transition":"all "+speed+"ms ease","-moz-transition":"all "+speed+"ms ease","-o-transition":"all "+speed+"ms ease","transition":"all "+speed+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"","transition":""}},doTranslate:function(pixels){var base=this;base.options.direction=="rtl"?pixels=-pixels:pixels=pixels;return{"-webkit-transform":"translate3d("+pixels+"px, 0px, 0px)","-moz-transform":"translate3d("+pixels+"px, 0px, 0px)","-o-transform":"translate3d("+pixels+"px, 0px, 0px)","-ms-transform":"translate3d("+pixels+"px, 0px, 0px)","transform":"translate3d("+pixels+"px, 0px,0px)"}},transition3d:function(value){var base=this;base.$owlWrapper.css(base.doTranslate(value))},css2move:function(value){var base=this,cssObj;base.options.direction=="rtl"?cssObj={"right":value}:cssObj={"left":value};base.$owlWrapper.css(cssObj)},css2slide:function(value,speed){var base=this,cssObj;base.options.direction=="rtl"?cssObj={"right":value}:cssObj={"left":value};base.isCssFinish=!1;base.$owlWrapper.stop(!0,!0).animate(cssObj,{duration:speed||base.options.slideSpeed,complete:function(){base.isCssFinish=!0}})},checkBrowser:function(){var base=this,translate3D="translate3d(0px, 0px, 0px)",tempElem=document.createElement("div"),regex,asSupport,support3d,isTouch;tempElem.style.cssText="  -moz-transform:"+translate3D+"; -ms-transform:"+translate3D+"; -o-transform:"+translate3D+"; -webkit-transform:"+translate3D+"; transform:"+translate3D;regex=/translate3d\(0px, 0px, 0px\)/g;asSupport=tempElem.style.cssText.match(regex);support3d=(asSupport!==null&&asSupport.length===1);isTouch="ontouchstart" in window||window.navigator.msMaxTouchPoints;base.browser={"support3d":support3d,"isTouch":isTouch}},moveEvents:function(){var base=this;if(base.options.mouseDrag!==!1||base.options.touchDrag!==!1){base.gestures();base.disabledEvents()}},eventTypes:function(){var base=this,types=["s","e","x"];base.ev_types={};if(base.options.mouseDrag===!0&&base.options.touchDrag===!0){types=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]}else if(base.options.mouseDrag===!1&&base.options.touchDrag===!0){types=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]}else if(base.options.mouseDrag===!0&&base.options.touchDrag===!1){types=["mousedown.owl","mousemove.owl","mouseup.owl"]}
base.ev_types.start=types[0];base.ev_types.move=types[1];base.ev_types.end=types[2]},disabledEvents:function(){var base=this;base.$elem.on("dragstart.owl",function(event){event.preventDefault()});base.$elem.on("mousedown.disableTextSelect",function(e){})},gestures:function(){var base=this,locals={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};base.isCssFinish=!0;function getTouches(event){if(event.touches!==undefined){return{x:event.touches[0].pageX,y:event.touches[0].pageY}}
if(event.touches===undefined){if(event.pageX!==undefined){return{x:event.pageX,y:event.pageY}}
if(event.pageX===undefined){return{x:event.clientX,y:event.clientY}}}}
function swapEvents(type){if(type==="on"){$(document).on(base.ev_types.move,dragMove);$(document).on(base.ev_types.end,dragEnd)}else if(type==="off"){$(document).off(base.ev_types.move);$(document).off(base.ev_types.end)}}
function dragStart(event){var ev=event.originalEvent||event||window.event,position;if(ev.which===3){return!1}
if(base.itemsAmount<=base.options.items){return}
if(base.isCssFinish===!1&&!base.options.dragBeforeAnimFinish){return!1}
if(base.isCss3Finish===!1&&!base.options.dragBeforeAnimFinish){return!1}
if(base.options.autoPlay!==!1){window.clearInterval(base.autoPlayInterval)}
if(base.browser.isTouch!==!0&&!base.$owlWrapper.hasClass("grabbing")){base.$owlWrapper.addClass("grabbing")}
base.newPosX=0;base.newRelativeX=0;$(this).css(base.removeTransition());position=$(this).position();if(base.options.direction=="rtl"){positionRight=base.$owlItems.eq(0).width()*base.currentItem;locals.relativePos=positionRight;locals.offsetX=-getTouches(ev).x+positionRight}else{locals.relativePos=position.left;locals.offsetX=getTouches(ev).x-position.left}
locals.offsetY=getTouches(ev).y-position.top;swapEvents("on");locals.sliding=!1;locals.targetElement=ev.target||ev.srcElement}
function dragMove(event){var ev=event.originalEvent||event||window.event,minSwipe;if(base.options.direction=="rtl"){base.newPosX=-getTouches(ev).x-locals.offsetX;base.newPosY=getTouches(ev).y-locals.offsetY;base.newRelativeX=base.newPosX+locals.relativePos}else{base.newPosX=getTouches(ev).x-locals.offsetX;base.newPosY=getTouches(ev).y-locals.offsetY;base.newRelativeX=base.newPosX-locals.relativePos}
if(typeof base.options.startDragging==="function"&&locals.dragging!==!0&&base.newRelativeX!==0){locals.dragging=!0;base.options.startDragging.apply(base,[base.$elem])}
if((base.newRelativeX>8||base.newRelativeX<-8)&&(base.browser.isTouch===!0)){if(ev.preventDefault!==undefined){ev.preventDefault()}else{ev.returnValue=!1}
locals.sliding=!0}
if((base.newPosY>10||base.newPosY<-10)&&locals.sliding===!1){$(document).off("touchmove.owl")}
minSwipe=function(){return base.newRelativeX/5};maxSwipe=function(){return base.maximumPixels+base.newRelativeX/5};base.newPosX=Math.max(Math.min(base.newPosX,minSwipe()),maxSwipe());if(base.browser.support3d===!0){base.transition3d(base.newPosX)}else{base.css2move(base.newPosX)}}
function dragEnd(event){var ev=event.originalEvent||event||window.event,newPosition,handlers,owlStopEvent;ev.target=ev.target||ev.srcElement;locals.dragging=!1;if(base.browser.isTouch!==!0){base.$owlWrapper.removeClass("grabbing")}
if(base.options.direction=="rtl"){if(base.newRelativeX<0){base.dragDirection=base.owl.dragDirection="right"}else{base.dragDirection=base.owl.dragDirection="left"}}else{if(base.newRelativeX<0){base.dragDirection=base.owl.dragDirection="left"}else{base.dragDirection=base.owl.dragDirection="right"}}
if(base.newRelativeX!==0){newPosition=base.getNewPosition();base.goTo(newPosition,!1,"drag");if(locals.targetElement===ev.target&&base.browser.isTouch!==!0){$(ev.target).on("click.disable",function(ev){ev.stopImmediatePropagation();ev.stopPropagation();ev.preventDefault();$(ev.target).off("click.disable")});handlers=$._data(ev.target,"events").click;owlStopEvent=handlers.pop();handlers.splice(0,0,owlStopEvent)}}
swapEvents("off")}
base.$elem.on(base.ev_types.start,".owl-wrapper",dragStart)},getNewPosition:function(){var base=this,newPosition=base.closestItem();if(newPosition>base.maximumItem){base.currentItem=base.maximumItem;newPosition=base.maximumItem}else if(base.newPosX>=0){newPosition=0;base.currentItem=0}
return newPosition},closestItem:function(){var base=this,array=base.options.scrollPerPage===!0?base.pagesInArray:base.positionsInArray,goal=base.newPosX,closest=null;$.each(array,function(i,v){if(goal-(base.itemWidth/20)>array[i+1]&&goal-(base.itemWidth/20)<v&&base.moveDirection()==="left"){closest=v;if(base.options.scrollPerPage===!0){base.currentItem=$.inArray(closest,base.positionsInArray)}else{base.currentItem=i}}else if(goal+(base.itemWidth/20)<v&&goal+(base.itemWidth/20)>(array[i+1]||array[i]-base.itemWidth)&&base.moveDirection()==="right"){if(base.options.scrollPerPage===!0){closest=array[i+1]||array[array.length-1];base.currentItem=$.inArray(closest,base.positionsInArray)}else{closest=array[i+1];base.currentItem=i+1}}});return base.currentItem},moveDirection:function(){var base=this,direction;if(base.newRelativeX<0){direction="right";base.playDirection="next"}else{direction="left";base.playDirection="prev"}
return direction},customEvents:function(){var base=this;base.$elem.on("owl.next",function(){base.next()});base.$elem.on("owl.prev",function(){base.prev()});base.$elem.on("owl.play",function(event,speed){base.options.autoPlay=speed;base.play();base.hoverStatus="play"});base.$elem.on("owl.stop",function(){base.stop();base.hoverStatus="stop"});base.$elem.on("owl.goTo",function(event,item){base.goTo(item)});base.$elem.on("owl.jumpTo",function(event,item){base.jumpTo(item)})},stopOnHover:function(){var base=this;if(base.options.stopOnHover===!0&&base.browser.isTouch!==!0&&base.options.autoPlay!==!1){base.$elem.on("mouseover",function(){base.stop()});base.$elem.on("mouseout",function(){if(base.hoverStatus!=="stop"){base.play()}})}},lazyLoad:function(){var base=this,i,$item,itemNumber,$lazyImg,follow;if(base.options.lazyLoad===!1){return!1}
for(i=0;i<base.itemsAmount;i+=1){$item=$(base.$owlItems[i]);if($item.data("owl-loaded")==="loaded"){continue}
itemNumber=$item.data("owl-item");$lazyImg=$item.find(".lazyOwl");if(typeof $lazyImg.data("src")!=="string"){$item.data("owl-loaded","loaded");continue}
if($item.data("owl-loaded")===undefined){$lazyImg.hide();$item.addClass("loading").data("owl-loaded","checked")}
if(base.options.lazyFollow===!0){follow=itemNumber>=base.currentItem}else{follow=!0}
if(follow&&itemNumber<base.currentItem+base.options.items&&$lazyImg.length){$lazyImg.each(function(){base.lazyPreload($item,$(this))})}}},lazyPreload:function($item,$lazyImg){var base=this,iterations=0,isBackgroundImg;if($lazyImg.prop("tagName")==="DIV"){$lazyImg.css("background-image","url("+$lazyImg.data("src")+")");isBackgroundImg=!0}else{$lazyImg[0].src=$lazyImg.data("src")}
function showImage(){$item.data("owl-loaded","loaded").removeClass("loading");$lazyImg.removeAttr("data-src");if(base.options.lazyEffect==="fade"){$lazyImg.fadeIn(400)}else{$lazyImg.show()}
if(typeof base.options.afterLazyLoad==="function"){base.options.afterLazyLoad.apply(this,[base.$elem])}}
function checkLazyImage(){iterations+=1;if(base.completeImg($lazyImg.get(0))||isBackgroundImg===!0){showImage()}else if(iterations<=100){window.setTimeout(checkLazyImage,100)}else{showImage()}}
checkLazyImage()},autoHeight:function(){var base=this,$currentimg=$(base.$owlItems[base.currentItem]).find("img"),iterations;function addHeight(){var $currentItem=$(base.$owlItems[base.currentItem]).height();base.wrapperOuter.css("height",$currentItem+"px");if(!base.wrapperOuter.hasClass("autoHeight")){window.setTimeout(function(){base.wrapperOuter.addClass("autoHeight")},0)}}
function checkImage(){iterations+=1;if(base.completeImg($currentimg.get(0))){addHeight()}else if(iterations<=100){window.setTimeout(checkImage,100)}else{base.wrapperOuter.css("height","")}}
if($currentimg.get(0)!==undefined){iterations=0;checkImage()}else{addHeight()}},completeImg:function(img){var naturalWidthType;if(!img.complete){return!1}
naturalWidthType=typeof img.naturalWidth;if(naturalWidthType!=="undefined"&&img.naturalWidth===0){return!1}
return!0},onVisibleItems:function(){var base=this,i;if(base.options.addClassActive===!0){base.$owlItems.removeClass("active")}
base.visibleItems=[];for(i=base.currentItem;i<base.currentItem+base.options.items;i+=1){base.visibleItems.push(i);if(base.options.addClassActive===!0){$(base.$owlItems[i]).addClass("active")}}
base.owl.visibleItems=base.visibleItems},transitionTypes:function(className){var base=this;base.outClass="owl-"+className+"-out";base.inClass="owl-"+className+"-in"},singleItemTransition:function(){var base=this,outClass=base.outClass,inClass=base.inClass,$currentItem=base.$owlItems.eq(base.currentItem),$prevItem=base.$owlItems.eq(base.prevItem),prevPos=Math.abs(base.positionsInArray[base.currentItem])+base.positionsInArray[base.prevItem],origin=Math.abs(base.positionsInArray[base.currentItem])+base.itemWidth/2,animEnd='webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend';base.isTransition=!0;base.$owlWrapper.addClass('owl-origin').css({"-webkit-transform-origin":origin+"px","-moz-perspective-origin":origin+"px","perspective-origin":origin+"px"});function transStyles(prevPos){return{"position":"relative","left":prevPos+"px"}}
$prevItem.css(transStyles(prevPos,10)).addClass(outClass).on(animEnd,function(){base.endPrev=!0;$prevItem.off(animEnd);base.clearTransStyle($prevItem,outClass)});$currentItem.addClass(inClass).on(animEnd,function(){base.endCurrent=!0;$currentItem.off(animEnd);base.clearTransStyle($currentItem,inClass)})},clearTransStyle:function(item,classToRemove){var base=this;item.css({"position":"","left":""}).removeClass(classToRemove);if(base.endPrev&&base.endCurrent){base.$owlWrapper.removeClass('owl-origin');base.endPrev=!1;base.endCurrent=!1;base.isTransition=!1}},owlStatus:function(){var base=this;base.owl={"userOptions":base.userOptions,"baseElement":base.$elem,"userItems":base.$userItems,"owlItems":base.$owlItems,"currentItem":base.currentItem,"prevItem":base.prevItem,"visibleItems":base.visibleItems,"isTouch":base.browser.isTouch,"browser":base.browser,"dragDirection":base.dragDirection}},clearEvents:function(){var base=this;base.$elem.off(".owl owl mousedown.disableTextSelect");$(document).off(".owl owl");$(window).off("resize",base.resizer)},unWrap:function(){var base=this;if(base.$elem.children().length!==0){base.$owlWrapper.unwrap();base.$userItems.unwrap().unwrap();if(base.owlControls){base.owlControls.remove()}}
base.clearEvents();base.$elem.attr({style:base.$elem.data("owl-originalStyles")||"",class:base.$elem.data("owl-originalClasses")})},destroy:function(){var base=this;base.stop();window.clearInterval(base.checkVisible);base.unWrap();base.$elem.removeData()},reinit:function(newOptions){var base=this,options=$.extend({},base.userOptions,newOptions);base.unWrap();base.init(options,base.$elem)},addItem:function(htmlString,targetPosition){var base=this,position;if(!htmlString){return!1}
if(base.$elem.children().length===0){base.$elem.append(htmlString);base.setVars();return!1}
base.unWrap();if(targetPosition===undefined||targetPosition===-1){position=-1}else{position=targetPosition}
if(position>=base.$userItems.length||position===-1){base.$userItems.eq(-1).after(htmlString)}else{base.$userItems.eq(position).before(htmlString)}
base.setVars()},removeItem:function(targetPosition){var base=this,position;if(base.$elem.children().length===0){return!1}
if(targetPosition===undefined||targetPosition===-1){position=-1}else{position=targetPosition}
base.unWrap();base.$userItems.eq(position).remove();base.setVars()}};$.fn.owlCarousel=function(options){return this.each(function(){if($(this).data("owl-init")===!0){return!1}
$(this).data("owl-init",!0);var carousel=Object.create(Carousel);carousel.init(options,this);$.data(this,"owlCarousel",carousel)})};$.fn.owlCarousel.options={direction:'ltr',items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1000,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:window,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document));/*!
 * imagesLoaded PACKAGED v4.1.4
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof exports!=='undefined'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(function($){'use strict';var Slick=window.Slick||{};Slick=(function(){var instanceUid=0;function Slick(element,settings){var _=this,dataSettings;_.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:$(element),appendDots:$(element),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:3000,centerMode:!1,centerPadding:'50px',cssEase:'ease',customPaging:function(slider,i){return $('<button type="button" />').text(i+1)},dots:!1,dotsClass:'slick-dots',draggable:!0,easing:'linear',edgeFriction:0.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:1000};_.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1};$.extend(_,_.initials);_.activeBreakpoint=null;_.animType=null;_.animProp=null;_.breakpoints=[];_.breakpointSettings=[];_.cssTransitions=!1;_.focussed=!1;_.interrupted=!1;_.hidden='hidden';_.paused=!0;_.positionProp=null;_.respondTo=null;_.rowCount=1;_.shouldClick=!0;_.$slider=$(element);_.$slidesCache=null;_.transformType=null;_.transitionType=null;_.visibilityChange='visibilitychange';_.windowWidth=0;_.windowTimer=null;dataSettings=$(element).data('slick')||{};_.options=$.extend({},_.defaults,settings,dataSettings);_.currentSlide=_.options.initialSlide;_.originalSettings=_.options;if(typeof document.mozHidden!=='undefined'){_.hidden='mozHidden';_.visibilityChange='mozvisibilitychange'}else if(typeof document.webkitHidden!=='undefined'){_.hidden='webkitHidden';_.visibilityChange='webkitvisibilitychange'}
_.autoPlay=$.proxy(_.autoPlay,_);_.autoPlayClear=$.proxy(_.autoPlayClear,_);_.autoPlayIterator=$.proxy(_.autoPlayIterator,_);_.changeSlide=$.proxy(_.changeSlide,_);_.clickHandler=$.proxy(_.clickHandler,_);_.selectHandler=$.proxy(_.selectHandler,_);_.setPosition=$.proxy(_.setPosition,_);_.swipeHandler=$.proxy(_.swipeHandler,_);_.dragHandler=$.proxy(_.dragHandler,_);_.keyHandler=$.proxy(_.keyHandler,_);_.instanceUid=instanceUid++;_.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/;_.registerBreakpoints();_.init(!0)}
return Slick}());Slick.prototype.activateADA=function(){var _=this;_.$slideTrack.find('.slick-active').attr({'aria-hidden':'false'}).find('a, input, button, select').attr({'tabindex':'0'})};Slick.prototype.addSlide=Slick.prototype.slickAdd=function(markup,index,addBefore){var _=this;if(typeof(index)==='boolean'){addBefore=index;index=null}else if(index<0||(index>=_.slideCount)){return!1}
_.unload();if(typeof(index)==='number'){if(index===0&&_.$slides.length===0){$(markup).appendTo(_.$slideTrack)}else if(addBefore){$(markup).insertBefore(_.$slides.eq(index))}else{$(markup).insertAfter(_.$slides.eq(index))}}else{if(addBefore===!0){$(markup).prependTo(_.$slideTrack)}else{$(markup).appendTo(_.$slideTrack)}}
_.$slides=_.$slideTrack.children(this.options.slide);_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.append(_.$slides);_.$slides.each(function(index,element){$(element).attr('data-slick-index',index)});_.$slidesCache=_.$slides;_.reinit()};Slick.prototype.animateHeight=function(){var _=this;if(_.options.slidesToShow===1&&_.options.adaptiveHeight===!0&&_.options.vertical===!1){var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(!0);_.$list.animate({height:targetHeight},_.options.speed)}};Slick.prototype.animateSlide=function(targetLeft,callback){var animProps={},_=this;_.animateHeight();if(_.options.rtl===!0&&_.options.vertical===!1){targetLeft=-targetLeft}
if(_.transformsEnabled===!1){if(_.options.vertical===!1){_.$slideTrack.animate({left:targetLeft},_.options.speed,_.options.easing,callback)}else{_.$slideTrack.animate({top:targetLeft},_.options.speed,_.options.easing,callback)}}else{if(_.cssTransitions===!1){if(_.options.rtl===!0){_.currentLeft=-(_.currentLeft)}
$({animStart:_.currentLeft}).animate({animStart:targetLeft},{duration:_.options.speed,easing:_.options.easing,step:function(now){now=Math.ceil(now);if(_.options.vertical===!1){animProps[_.animType]='translate('+now+'px, 0px)';_.$slideTrack.css(animProps)}else{animProps[_.animType]='translate(0px,'+now+'px)';_.$slideTrack.css(animProps)}},complete:function(){if(callback){callback.call()}}})}else{_.applyTransition();targetLeft=Math.ceil(targetLeft);if(_.options.vertical===!1){animProps[_.animType]='translate3d('+targetLeft+'px, 0px, 0px)'}else{animProps[_.animType]='translate3d(0px,'+targetLeft+'px, 0px)'}
_.$slideTrack.css(animProps);if(callback){setTimeout(function(){_.disableTransition();callback.call()},_.options.speed)}}}};Slick.prototype.getNavTarget=function(){var _=this,asNavFor=_.options.asNavFor;if(asNavFor&&asNavFor!==null){asNavFor=$(asNavFor).not(_.$slider)}
return asNavFor};Slick.prototype.asNavFor=function(index){var _=this,asNavFor=_.getNavTarget();if(asNavFor!==null&&typeof asNavFor==='object'){asNavFor.each(function(){var target=$(this).slick('getSlick');if(!target.unslicked){target.slideHandler(index,!0)}})}};Slick.prototype.applyTransition=function(slide){var _=this,transition={};if(_.options.fade===!1){transition[_.transitionType]=_.transformType+' '+_.options.speed+'ms '+_.options.cssEase}else{transition[_.transitionType]='opacity '+_.options.speed+'ms '+_.options.cssEase}
if(_.options.fade===!1){_.$slideTrack.css(transition)}else{_.$slides.eq(slide).css(transition)}};Slick.prototype.autoPlay=function(){var _=this;_.autoPlayClear();if(_.slideCount>_.options.slidesToShow){_.autoPlayTimer=setInterval(_.autoPlayIterator,_.options.autoplaySpeed)}};Slick.prototype.autoPlayClear=function(){var _=this;if(_.autoPlayTimer){clearInterval(_.autoPlayTimer)}};Slick.prototype.autoPlayIterator=function(){var _=this,slideTo=_.currentSlide+_.options.slidesToScroll;if(!_.paused&&!_.interrupted&&!_.focussed){if(_.options.infinite===!1){if(_.direction===1&&(_.currentSlide+1)===(_.slideCount-1)){_.direction=0}else if(_.direction===0){slideTo=_.currentSlide-_.options.slidesToScroll;if(_.currentSlide-1===0){_.direction=1}}}
_.slideHandler(slideTo)}};Slick.prototype.buildArrows=function(){var _=this;if(_.options.arrows===!0){_.$prevArrow=$(_.options.prevArrow).addClass('slick-arrow');_.$nextArrow=$(_.options.nextArrow).addClass('slick-arrow');if(!_.$slider.hasClass('has-arrows'))
_.$slider.addClass('has-arrows');if(_.slideCount>_.options.slidesToShow){_.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');_.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');if(_.htmlExpr.test(_.options.nextArrow)&&_.htmlExpr.test(_.options.prevArrow)){_.options.appendArrows.find(".slick-arrows").remove();_.options.appendArrows.append('<div class="slick-arrows "></div>');_.options.appendArrows.find(".slick-arrows").prepend(_.$prevArrow);_.options.appendArrows.find(".slick-arrows").append(_.$nextArrow)}
if(_.options.infinite!==!0){_.$prevArrow.addClass('slick-disabled').attr('aria-disabled','true')}}else{if(_.$slider.hasClass('has-arrows'))
_.$slider.removeClass('has-arrows');_.$prevArrow.add(_.$nextArrow).addClass('slick-hidden').attr({'aria-disabled':'true','tabindex':'-1'})}}};Slick.prototype.buildDots=function(){var _=this,i,dot;if(_.options.dots===!0&&_.slideCount>_.options.slidesToShow){_.$slider.addClass('slick-dotted');dot=$('<ul />').addClass(_.options.dotsClass);for(i=0;i<=_.getDotCount();i+=1){dot.append($('<li />').append(_.options.customPaging.call(this,_,i)))}
_.$dots=dot.appendTo(_.options.appendDots);_.$dots.find('li').first().addClass('slick-active')}};Slick.prototype.buildOut=function(){var _=this;_.$slides=_.$slider.children(_.options.slide+':not(.slick-cloned, .slick-arrows)').addClass('slick-slide');_.slideCount=_.$slides.length;_.$slides.each(function(index,element){$(element).attr('data-slick-index',index).data('originalStyling',$(element).attr('style')||'')});_.$slider.addClass('slick-slider');_.$slideTrack=(_.slideCount===0)?$('<div class="slick-track"/>').appendTo(_.$slider):_.$slides.wrapAll('<div class="slick-track"/>').parent();_.$list=_.$slideTrack.wrap('<div class="slick-list"/>').parent();_.$slideTrack.css('opacity',0);if(_.options.centerMode===!0||_.options.swipeToSlide===!0){_.options.slidesToScroll=1}
$('img[data-lazy]',_.$slider).not('[src]').addClass('slick-loading');_.setupInfinite();_.buildArrows();_.buildDots();_.updateDots();_.setSlideClasses(typeof _.currentSlide==='number'?_.currentSlide:0);if(_.options.draggable===!0){_.$list.addClass('draggable')}};Slick.prototype.buildRows=function(){var _=this,a,b,c,newSlides,numOfSlides,originalSlides,slidesPerSection;newSlides=document.createDocumentFragment();originalSlides=_.$slider.children();if(_.options.rows>1){slidesPerSection=_.options.slidesPerRow*_.options.rows;numOfSlides=Math.ceil(originalSlides.length/slidesPerSection);for(a=0;a<numOfSlides;a++){var slide=document.createElement('div');for(b=0;b<_.options.rows;b++){var row=document.createElement('div');for(c=0;c<_.options.slidesPerRow;c++){var target=(a*slidesPerSection+((b*_.options.slidesPerRow)+c));if(originalSlides.get(target)){row.appendChild(originalSlides.get(target))}}
slide.appendChild(row)}
newSlides.appendChild(slide)}
_.$slider.empty().append(newSlides);_.$slider.children().children().children().css({'width':(100/_.options.slidesPerRow)+'%','display':'inline-block'})}};Slick.prototype.checkResponsive=function(initial,forceUpdate){var _=this,breakpoint,targetBreakpoint,respondToWidth,triggerBreakpoint=!1;var sliderWidth=_.$slider.width();var windowWidth=window.innerWidth||$(window).width();if(_.respondTo==='window'){respondToWidth=windowWidth}else if(_.respondTo==='slider'){respondToWidth=sliderWidth}else if(_.respondTo==='min'){respondToWidth=Math.min(windowWidth,sliderWidth)}
if(_.options.responsive&&_.options.responsive.length&&_.options.responsive!==null){targetBreakpoint=null;for(breakpoint in _.breakpoints){if(_.breakpoints.hasOwnProperty(breakpoint)){if(_.originalSettings.mobileFirst===!1){if(respondToWidth<_.breakpoints[breakpoint]){targetBreakpoint=_.breakpoints[breakpoint]}}else{if(respondToWidth>_.breakpoints[breakpoint]){targetBreakpoint=_.breakpoints[breakpoint]}}}}
if(targetBreakpoint!==null){if(_.activeBreakpoint!==null){if(targetBreakpoint!==_.activeBreakpoint||forceUpdate){_.activeBreakpoint=targetBreakpoint;if(_.breakpointSettings[targetBreakpoint]==='unslick'){_.unslick(targetBreakpoint)}else{_.options=$.extend({},_.originalSettings,_.breakpointSettings[targetBreakpoint]);if(initial===!0){_.currentSlide=_.options.initialSlide}
_.refresh(initial)}
triggerBreakpoint=targetBreakpoint}}else{_.activeBreakpoint=targetBreakpoint;if(_.breakpointSettings[targetBreakpoint]==='unslick'){_.unslick(targetBreakpoint)}else{_.options=$.extend({},_.originalSettings,_.breakpointSettings[targetBreakpoint]);if(initial===!0){_.currentSlide=_.options.initialSlide}
_.refresh(initial)}
triggerBreakpoint=targetBreakpoint}}else{if(_.activeBreakpoint!==null){_.activeBreakpoint=null;_.options=_.originalSettings;if(initial===!0){_.currentSlide=_.options.initialSlide}
_.refresh(initial);triggerBreakpoint=targetBreakpoint}}
if(!initial&&triggerBreakpoint!==!1){_.$slider.trigger('breakpoint',[_,triggerBreakpoint])}}};Slick.prototype.changeSlide=function(event,dontAnimate){var _=this,$target=$(event.currentTarget),indexOffset,slideOffset,unevenOffset;if($target.is('a')){event.preventDefault()}
if(!$target.is('li')){$target=$target.closest('li')}
unevenOffset=(_.slideCount%_.options.slidesToScroll!==0);indexOffset=unevenOffset?0:(_.slideCount-_.currentSlide)%_.options.slidesToScroll;switch(event.data.message){case 'previous':slideOffset=indexOffset===0?_.options.slidesToScroll:_.options.slidesToShow-indexOffset;if(_.slideCount>_.options.slidesToShow){_.slideHandler(_.currentSlide-slideOffset,!1,dontAnimate)}
break;case 'next':slideOffset=indexOffset===0?_.options.slidesToScroll:indexOffset;if(_.slideCount>_.options.slidesToShow){_.slideHandler(_.currentSlide+slideOffset,!1,dontAnimate)}
break;case 'index':var index=event.data.index===0?0:event.data.index||$target.index()*_.options.slidesToScroll;_.slideHandler(_.checkNavigable(index),!1,dontAnimate);$target.children().trigger('focus');break;default:return}};Slick.prototype.checkNavigable=function(index){var _=this,navigables,prevNavigable;navigables=_.getNavigableIndexes();prevNavigable=0;if(index>navigables[navigables.length-1]){index=navigables[navigables.length-1]}else{for(var n in navigables){if(index<navigables[n]){index=prevNavigable;break}
prevNavigable=navigables[n]}}
return index};Slick.prototype.cleanUpEvents=function(){var _=this;if(_.options.dots&&_.$dots!==null){$('li',_.$dots).off('click.slick',_.changeSlide).off('mouseenter.slick',$.proxy(_.interrupt,_,!0)).off('mouseleave.slick',$.proxy(_.interrupt,_,!1));if(_.options.accessibility===!0){_.$dots.off('keydown.slick',_.keyHandler)}}
_.$slider.off('focus.slick blur.slick');if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow){_.$prevArrow&&_.$prevArrow.off('click.slick',_.changeSlide);_.$nextArrow&&_.$nextArrow.off('click.slick',_.changeSlide);if(_.options.accessibility===!0){_.$prevArrow&&_.$prevArrow.off('keydown.slick',_.keyHandler);_.$nextArrow&&_.$nextArrow.off('keydown.slick',_.keyHandler)}}
_.$list.off('touchstart.slick mousedown.slick',_.swipeHandler);_.$list.off('touchmove.slick mousemove.slick',_.swipeHandler);_.$list.off('touchend.slick mouseup.slick',_.swipeHandler);_.$list.off('touchcancel.slick mouseleave.slick',_.swipeHandler);_.$list.off('click.slick',_.clickHandler);$(document).off(_.visibilityChange,_.visibility);_.cleanUpSlideEvents();if(_.options.accessibility===!0){_.$list.off('keydown.slick',_.keyHandler)}
if(_.options.focusOnSelect===!0){$(_.$slideTrack).children().off('click.slick',_.selectHandler)}
$(window).off('orientationchange.slick.slick-'+_.instanceUid,_.orientationChange);$(window).off('resize.slick.slick-'+_.instanceUid,_.resize);$('[draggable!=true]',_.$slideTrack).off('dragstart',_.preventDefault);$(window).off('load.slick.slick-'+_.instanceUid,_.setPosition)};Slick.prototype.cleanUpSlideEvents=function(){var _=this;_.$list.off('mouseenter.slick',$.proxy(_.interrupt,_,!0));_.$list.off('mouseleave.slick',$.proxy(_.interrupt,_,!1))};Slick.prototype.cleanUpRows=function(){var _=this,originalSlides;if(_.options.rows>1){originalSlides=_.$slides.children().children();originalSlides.removeAttr('style');_.$slider.empty().append(originalSlides)}};Slick.prototype.clickHandler=function(event){var _=this;if(_.shouldClick===!1){event.stopImmediatePropagation();event.stopPropagation();event.preventDefault()}};Slick.prototype.destroy=function(refresh){var _=this;_.autoPlayClear();_.touchObject={};_.cleanUpEvents();$('.slick-cloned',_.$slider).detach();if(_.$dots){_.$dots.remove()}
if(_.$prevArrow&&_.$prevArrow.length){_.$prevArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display','');if(_.htmlExpr.test(_.options.prevArrow)){_.$prevArrow.remove()}}
if(_.$nextArrow&&_.$nextArrow.length){_.$nextArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display','');if(_.htmlExpr.test(_.options.nextArrow)){_.$nextArrow.remove()}}
if(_.$slides){_.$slides.removeClass('slick-slide slick-active slick-center slick-visible slick-current').removeAttr('aria-hidden').removeAttr('data-slick-index').each(function(){$(this).attr('style',$(this).data('originalStyling'))});_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.detach();_.$list.detach();_.$slider.append(_.$slides)}
_.cleanUpRows();_.$slider.removeClass('slick-slider');_.$slider.removeClass('slick-initialized');_.$slider.removeClass('slick-dotted');_.unslicked=!0;if(!refresh){_.$slider.trigger('destroy',[_])}};Slick.prototype.disableTransition=function(slide){var _=this,transition={};transition[_.transitionType]='';if(_.options.fade===!1){_.$slideTrack.css(transition)}else{_.$slides.eq(slide).css(transition)}};Slick.prototype.fadeSlide=function(slideIndex,callback){var _=this;if(_.cssTransitions===!1){_.$slides.eq(slideIndex).css({zIndex:_.options.zIndex});_.$slides.eq(slideIndex).animate({opacity:1},_.options.speed,_.options.easing,callback)}else{_.applyTransition(slideIndex);_.$slides.eq(slideIndex).css({opacity:1,zIndex:_.options.zIndex});if(callback){setTimeout(function(){_.disableTransition(slideIndex);callback.call()},_.options.speed)}}};Slick.prototype.fadeSlideOut=function(slideIndex){var _=this;if(_.cssTransitions===!1){_.$slides.eq(slideIndex).animate({opacity:0,zIndex:_.options.zIndex-2},_.options.speed,_.options.easing)}else{_.applyTransition(slideIndex);_.$slides.eq(slideIndex).css({opacity:0,zIndex:_.options.zIndex-2})}};Slick.prototype.filterSlides=Slick.prototype.slickFilter=function(filter){var _=this;if(filter!==null){_.$slidesCache=_.$slides;_.unload();_.$slideTrack.children(this.options.slide).detach();_.$slidesCache.filter(filter).appendTo(_.$slideTrack);_.reinit()}};Slick.prototype.focusHandler=function(){var _=this;_.$slider.off('focus.slick blur.slick').on('focus.slick blur.slick','*',function(event){event.stopImmediatePropagation();var $sf=$(this);setTimeout(function(){if(_.options.pauseOnFocus){_.focussed=$sf.is(':focus');_.autoPlay()}},0)})};Slick.prototype.getCurrent=Slick.prototype.slickCurrentSlide=function(){var _=this;return _.currentSlide};Slick.prototype.getDotCount=function(){var _=this;var breakPoint=0;var counter=0;var pagerQty=0;if(_.options.infinite===!0){if(_.slideCount<=_.options.slidesToShow){++pagerQty}else{while(breakPoint<_.slideCount){++pagerQty;breakPoint=counter+_.options.slidesToScroll;counter+=_.options.slidesToScroll<=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow}}}else if(_.options.centerMode===!0){pagerQty=_.slideCount}else if(!_.options.asNavFor){pagerQty=1+Math.ceil((_.slideCount-_.options.slidesToShow)/_.options.slidesToScroll)}else{while(breakPoint<_.slideCount){++pagerQty;breakPoint=counter+_.options.slidesToScroll;counter+=_.options.slidesToScroll<=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow}}
return pagerQty-1};Slick.prototype.getLeft=function(slideIndex){var _=this,targetLeft,verticalHeight,verticalOffset=0,targetSlide,coef;_.slideOffset=0;verticalHeight=_.$slides.first().outerHeight(!0);if(_.options.infinite===!0){if(_.slideCount>_.options.slidesToShow){_.slideOffset=(_.slideWidth*_.options.slidesToShow)*-1;coef=-1
if(_.options.vertical===!0&&_.options.centerMode===!0){if(_.options.slidesToShow===2){coef=-1.5}else if(_.options.slidesToShow===1){coef=-2}}
verticalOffset=(verticalHeight*_.options.slidesToShow)*coef}
if(_.slideCount%_.options.slidesToScroll!==0){if(slideIndex+_.options.slidesToScroll>_.slideCount&&_.slideCount>_.options.slidesToShow){if(slideIndex>_.slideCount){_.slideOffset=((_.options.slidesToShow-(slideIndex-_.slideCount))*_.slideWidth)*-1;verticalOffset=((_.options.slidesToShow-(slideIndex-_.slideCount))*verticalHeight)*-1}else{_.slideOffset=((_.slideCount%_.options.slidesToScroll)*_.slideWidth)*-1;verticalOffset=((_.slideCount%_.options.slidesToScroll)*verticalHeight)*-1}}}}else{if(slideIndex+_.options.slidesToShow>_.slideCount){_.slideOffset=((slideIndex+_.options.slidesToShow)-_.slideCount)*_.slideWidth;verticalOffset=((slideIndex+_.options.slidesToShow)-_.slideCount)*verticalHeight}}
if(_.slideCount<=_.options.slidesToShow){_.slideOffset=0;verticalOffset=0}
if(_.options.centerMode===!0&&_.slideCount<=_.options.slidesToShow){_.slideOffset=((_.slideWidth*Math.floor(_.options.slidesToShow))/2)-((_.slideWidth*_.slideCount)/2)}else if(_.options.centerMode===!0&&_.options.infinite===!0){_.slideOffset+=_.slideWidth*Math.floor(_.options.slidesToShow/2)-_.slideWidth}else if(_.options.centerMode===!0){_.slideOffset=0;_.slideOffset+=_.slideWidth*Math.floor(_.options.slidesToShow/2)}
if(_.options.vertical===!1){targetLeft=((slideIndex*_.slideWidth)*-1)+_.slideOffset}else{targetLeft=((slideIndex*verticalHeight)*-1)+verticalOffset}
if(_.options.variableWidth===!0){if(_.slideCount<=_.options.slidesToShow||_.options.infinite===!1){targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex)}else{targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex+_.options.slidesToShow)}
if(_.options.rtl===!0){if(targetSlide[0]){targetLeft=(_.$slideTrack.width()-targetSlide[0].offsetLeft-targetSlide.width())*-1}else{targetLeft=0}}else{targetLeft=targetSlide[0]?targetSlide[0].offsetLeft*-1:0}
if(_.options.centerMode===!0){if(_.slideCount<=_.options.slidesToShow||_.options.infinite===!1){targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex)}else{targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex+_.options.slidesToShow+1)}
if(_.options.rtl===!0){if(targetSlide[0]){targetLeft=(_.$slideTrack.width()-targetSlide[0].offsetLeft-targetSlide.width())*-1}else{targetLeft=0}}else{targetLeft=targetSlide[0]?targetSlide[0].offsetLeft*-1:0}
targetLeft+=(_.$list.width()-targetSlide.outerWidth())/2}}
return targetLeft};Slick.prototype.getOption=Slick.prototype.slickGetOption=function(option){var _=this;return _.options[option]};Slick.prototype.getNavigableIndexes=function(){var _=this,breakPoint=0,counter=0,indexes=[],max;if(_.options.infinite===!1){max=_.slideCount}else{breakPoint=_.options.slidesToScroll*-1;counter=_.options.slidesToScroll*-1;max=_.slideCount*2}
while(breakPoint<max){indexes.push(breakPoint);breakPoint=counter+_.options.slidesToScroll;counter+=_.options.slidesToScroll<=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow}
return indexes};Slick.prototype.getSlick=function(){return this};Slick.prototype.getSlideCount=function(){var _=this,slidesTraversed,swipedSlide,swipeTarget,centerOffset;centerOffset=_.options.centerMode===!0?Math.floor(_.$list.width()/2):0;swipeTarget=(_.swipeLeft*-1)+centerOffset;if(_.options.swipeToSlide===!0){_.$slideTrack.find('.slick-slide').each(function(index,slide){var slideOuterWidth,slideOffset,slideRightBoundary;slideOuterWidth=$(slide).outerWidth();slideOffset=slide.offsetLeft;if(_.options.centerMode!==!0){slideOffset+=(slideOuterWidth/2)}
slideRightBoundary=slideOffset+(slideOuterWidth);if(swipeTarget<slideRightBoundary){swipedSlide=slide;return!1}});slidesTraversed=Math.abs($(swipedSlide).attr('data-slick-index')-_.currentSlide)||1;return slidesTraversed}else{return _.options.slidesToScroll}};Slick.prototype.goTo=Slick.prototype.slickGoTo=function(slide,dontAnimate){var _=this;_.changeSlide({data:{message:'index',index:parseInt(slide)}},dontAnimate)};Slick.prototype.init=function(creation){var _=this;if(!$(_.$slider).hasClass('slick-initialized')){$(_.$slider).addClass('slick-initialized');_.buildRows();_.buildOut();_.setProps();_.startLoad();_.loadSlider();_.initializeEvents();_.updateArrows();_.updateDots();_.checkResponsive(!0);_.focusHandler()}
if(creation){_.$slider.trigger('init',[_])}
if(_.options.accessibility===!0){_.initADA()}
if(_.options.autoplay){_.paused=!1;_.autoPlay()}};Slick.prototype.initADA=function(){var _=this,numDotGroups=Math.ceil(_.slideCount/_.options.slidesToScroll),tabControlIndexes=_.getNavigableIndexes().filter(function(val){return(val>=0)&&(val<_.slideCount)});_.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({'aria-hidden':'true','tabindex':'-1'}).find('a, input, button, select').attr({'tabindex':'-1'});if(_.$dots!==null){_.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i){var slideControlIndex=tabControlIndexes.indexOf(i);$(this).attr({'role':'tabpanel','id':'slick-slide'+_.instanceUid+i,'tabindex':-1});if(slideControlIndex!==-1){var ariaButtonControl='slick-slide-control'+_.instanceUid+slideControlIndex
if($('#'+ariaButtonControl).length){$(this).attr({'aria-describedby':ariaButtonControl})}}});_.$dots.attr('role','tablist').find('li').each(function(i){var mappedSlideIndex=tabControlIndexes[i];$(this).attr({'role':'presentation'});$(this).find('button').first().attr({'role':'tab','id':'slick-slide-control'+_.instanceUid+i,'aria-controls':'slick-slide'+_.instanceUid+mappedSlideIndex,'aria-label':(i+1)+' of '+numDotGroups,'aria-selected':null,'tabindex':'-1'})}).eq(_.currentSlide).find('button').attr({'aria-selected':'true','tabindex':'0'}).end()}
for(var i=_.currentSlide,max=i+_.options.slidesToShow;i<max;i++){if(_.options.focusOnChange){_.$slides.eq(i).attr({'tabindex':'0'})}else{_.$slides.eq(i).removeAttr('tabindex')}}
_.activateADA()};Slick.prototype.initArrowEvents=function(){var _=this;if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow){_.$prevArrow.off('click.slick').on('click.slick',{message:'previous'},_.changeSlide);_.$nextArrow.off('click.slick').on('click.slick',{message:'next'},_.changeSlide);if(_.options.accessibility===!0){_.$prevArrow.on('keydown.slick',_.keyHandler);_.$nextArrow.on('keydown.slick',_.keyHandler)}}};Slick.prototype.initDotEvents=function(){var _=this;if(_.options.dots===!0&&_.slideCount>_.options.slidesToShow){$('li',_.$dots).on('click.slick',{message:'index'},_.changeSlide);if(_.options.accessibility===!0){_.$dots.on('keydown.slick',_.keyHandler)}}
if(_.options.dots===!0&&_.options.pauseOnDotsHover===!0&&_.slideCount>_.options.slidesToShow){$('li',_.$dots).on('mouseenter.slick',$.proxy(_.interrupt,_,!0)).on('mouseleave.slick',$.proxy(_.interrupt,_,!1))}};Slick.prototype.initSlideEvents=function(){var _=this;if(_.options.pauseOnHover){_.$list.on('mouseenter.slick',$.proxy(_.interrupt,_,!0));_.$list.on('mouseleave.slick',$.proxy(_.interrupt,_,!1))}};Slick.prototype.initializeEvents=function(){var _=this;_.initArrowEvents();_.initDotEvents();_.initSlideEvents();_.$list.on('touchstart.slick mousedown.slick',{action:'start'},_.swipeHandler);_.$list.on('touchmove.slick mousemove.slick',{action:'move'},_.swipeHandler);_.$list.on('touchend.slick mouseup.slick',{action:'end'},_.swipeHandler);_.$list.on('touchcancel.slick mouseleave.slick',{action:'end'},_.swipeHandler);_.$list.on('click.slick',_.clickHandler);$(document).on(_.visibilityChange,$.proxy(_.visibility,_));if(_.options.accessibility===!0){_.$list.on('keydown.slick',_.keyHandler)}
if(_.options.focusOnSelect===!0){$(_.$slideTrack).children().on('click.slick',_.selectHandler)}
$(window).on('orientationchange.slick.slick-'+_.instanceUid,$.proxy(_.orientationChange,_));$(window).on('resize.slick.slick-'+_.instanceUid,$.proxy(_.resize,_));$('[draggable!=true]',_.$slideTrack).on('dragstart',_.preventDefault);$(window).on('load.slick.slick-'+_.instanceUid,_.setPosition);$(_.setPosition)};Slick.prototype.initUI=function(){var _=this;if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow){_.$prevArrow.show();_.$nextArrow.show()}
if(_.options.dots===!0&&_.slideCount>_.options.slidesToShow){_.$dots.show()}};Slick.prototype.keyHandler=function(event){var _=this;if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')){if(event.keyCode===37&&_.options.accessibility===!0){_.changeSlide({data:{message:_.options.rtl===!0?'next':'previous'}})}else if(event.keyCode===39&&_.options.accessibility===!0){_.changeSlide({data:{message:_.options.rtl===!0?'previous':'next'}})}}};Slick.prototype.lazyLoad=function(){var _=this,loadRange,cloneRange,rangeStart,rangeEnd;function loadImages(imagesScope){$('img[data-lazy]',imagesScope).each(function(){var image=$(this),imageSource=$(this).attr('data-lazy'),imageSrcSet=$(this).attr('data-srcset'),imageSizes=$(this).attr('data-sizes')||_.$slider.attr('data-sizes'),imageToLoad=document.createElement('img');imageToLoad.onload=function(){image.animate({opacity:0},100,function(){if(imageSrcSet){image.attr('srcset',imageSrcSet);if(imageSizes){image.attr('sizes',imageSizes)}}
image.attr('src',imageSource).animate({opacity:1},200,function(){image.removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading')});_.$slider.trigger('lazyLoaded',[_,image,imageSource])})};imageToLoad.onerror=function(){image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error');_.$slider.trigger('lazyLoadError',[_,image,imageSource])};imageToLoad.src=imageSource})}
if(_.options.centerMode===!0){if(_.options.infinite===!0){rangeStart=_.currentSlide+(_.options.slidesToShow/2+1);rangeEnd=rangeStart+_.options.slidesToShow+2}else{rangeStart=Math.max(0,_.currentSlide-(_.options.slidesToShow/2+1));rangeEnd=2+(_.options.slidesToShow/2+1)+_.currentSlide}}else{rangeStart=_.options.infinite?_.options.slidesToShow+_.currentSlide:_.currentSlide;rangeEnd=Math.ceil(rangeStart+_.options.slidesToShow);if(_.options.fade===!0){if(rangeStart>0)rangeStart--;if(rangeEnd<=_.slideCount)rangeEnd++}}
loadRange=_.$slider.find('.slick-slide').slice(rangeStart,rangeEnd);if(_.options.lazyLoad==='anticipated'){var prevSlide=rangeStart-1,nextSlide=rangeEnd,$slides=_.$slider.find('.slick-slide');for(var i=0;i<_.options.slidesToScroll;i++){if(prevSlide<0)prevSlide=_.slideCount-1;loadRange=loadRange.add($slides.eq(prevSlide));loadRange=loadRange.add($slides.eq(nextSlide));prevSlide--;nextSlide++}}
loadImages(loadRange);if(_.slideCount<=_.options.slidesToShow){cloneRange=_.$slider.find('.slick-slide');loadImages(cloneRange)}else if(_.currentSlide>=_.slideCount-_.options.slidesToShow){cloneRange=_.$slider.find('.slick-cloned').slice(0,_.options.slidesToShow);loadImages(cloneRange)}else if(_.currentSlide===0){cloneRange=_.$slider.find('.slick-cloned').slice(_.options.slidesToShow*-1);loadImages(cloneRange)}};Slick.prototype.loadSlider=function(){var _=this;_.setPosition();_.$slideTrack.css({opacity:1});_.$slider.removeClass('slick-loading');_.initUI();if(_.options.lazyLoad==='progressive'){_.progressiveLazyLoad()}};Slick.prototype.next=Slick.prototype.slickNext=function(){var _=this;_.changeSlide({data:{message:'next'}})};Slick.prototype.orientationChange=function(){var _=this;_.checkResponsive();_.setPosition()};Slick.prototype.pause=Slick.prototype.slickPause=function(){var _=this;_.autoPlayClear();_.paused=!0};Slick.prototype.play=Slick.prototype.slickPlay=function(){var _=this;_.autoPlay();_.options.autoplay=!0;_.paused=!1;_.focussed=!1;_.interrupted=!1};Slick.prototype.postSlide=function(index){var _=this;if(!_.unslicked){_.$slider.trigger('afterChange',[_,index]);_.animating=!1;if(_.slideCount>_.options.slidesToShow){_.setPosition()}
_.swipeLeft=null;if(_.options.autoplay){_.autoPlay()}
if(_.options.accessibility===!0){_.initADA();if(_.options.focusOnChange){var $currentSlide=$(_.$slides.get(_.currentSlide));$currentSlide.attr('tabindex',0).focus()}}}};Slick.prototype.prev=Slick.prototype.slickPrev=function(){var _=this;_.changeSlide({data:{message:'previous'}})};Slick.prototype.preventDefault=function(event){event.preventDefault()};Slick.prototype.progressiveLazyLoad=function(tryCount){tryCount=tryCount||1;var _=this,$imgsToLoad=$('img[data-lazy]',_.$slider),image,imageSource,imageSrcSet,imageSizes,imageToLoad;if($imgsToLoad.length){image=$imgsToLoad.first();imageSource=image.attr('data-lazy');imageSrcSet=image.attr('data-srcset');imageSizes=image.attr('data-sizes')||_.$slider.attr('data-sizes');imageToLoad=document.createElement('img');imageToLoad.onload=function(){if(imageSrcSet){image.attr('srcset',imageSrcSet);if(imageSizes){image.attr('sizes',imageSizes)}}
image.attr('src',imageSource).removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading');if(_.options.adaptiveHeight===!0){_.setPosition()}
_.$slider.trigger('lazyLoaded',[_,image,imageSource]);_.progressiveLazyLoad()};imageToLoad.onerror=function(){if(tryCount<3){setTimeout(function(){_.progressiveLazyLoad(tryCount+1)},500)}else{image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error');_.$slider.trigger('lazyLoadError',[_,image,imageSource]);_.progressiveLazyLoad()}};imageToLoad.src=imageSource}else{_.$slider.trigger('allImagesLoaded',[_])}};Slick.prototype.refresh=function(initializing){var _=this,currentSlide,lastVisibleIndex;lastVisibleIndex=_.slideCount-_.options.slidesToShow;if(!_.options.infinite&&(_.currentSlide>lastVisibleIndex)){_.currentSlide=lastVisibleIndex}
if(_.slideCount<=_.options.slidesToShow){_.currentSlide=0}
currentSlide=_.currentSlide;_.destroy(!0);$.extend(_,_.initials,{currentSlide:currentSlide});_.init();if(!initializing){_.changeSlide({data:{message:'index',index:currentSlide}},!1)}};Slick.prototype.registerBreakpoints=function(){var _=this,breakpoint,currentBreakpoint,l,responsiveSettings=_.options.responsive||null;if($.type(responsiveSettings)==='array'&&responsiveSettings.length){_.respondTo=_.options.respondTo||'window';for(breakpoint in responsiveSettings){l=_.breakpoints.length-1;if(responsiveSettings.hasOwnProperty(breakpoint)){currentBreakpoint=responsiveSettings[breakpoint].breakpoint;while(l>=0){if(_.breakpoints[l]&&_.breakpoints[l]===currentBreakpoint){_.breakpoints.splice(l,1)}
l--}
_.breakpoints.push(currentBreakpoint);_.breakpointSettings[currentBreakpoint]=responsiveSettings[breakpoint].settings}}
_.breakpoints.sort(function(a,b){return(_.options.mobileFirst)?a-b:b-a})}};Slick.prototype.reinit=function(){var _=this;_.$slides=_.$slideTrack.children(_.options.slide).addClass('slick-slide');_.slideCount=_.$slides.length;if(_.currentSlide>=_.slideCount&&_.currentSlide!==0){_.currentSlide=_.currentSlide-_.options.slidesToScroll}
if(_.slideCount<=_.options.slidesToShow){_.currentSlide=0}
_.registerBreakpoints();_.setProps();_.setupInfinite();_.buildArrows();_.updateArrows();_.initArrowEvents();_.buildDots();_.updateDots();_.initDotEvents();_.cleanUpSlideEvents();_.initSlideEvents();_.checkResponsive(!1,!0);if(_.options.focusOnSelect===!0){$(_.$slideTrack).children().on('click.slick',_.selectHandler)}
_.setSlideClasses(typeof _.currentSlide==='number'?_.currentSlide:0);_.setPosition();_.focusHandler();_.paused=!_.options.autoplay;_.autoPlay();_.$slider.trigger('reInit',[_])};Slick.prototype.resize=function(){var _=this;if($(window).width()!==_.windowWidth){clearTimeout(_.windowDelay);_.windowDelay=window.setTimeout(function(){_.windowWidth=$(window).width();_.checkResponsive();if(!_.unslicked){_.setPosition()}},50)}};Slick.prototype.removeSlide=Slick.prototype.slickRemove=function(index,removeBefore,removeAll){var _=this;if(typeof(index)==='boolean'){removeBefore=index;index=removeBefore===!0?0:_.slideCount-1}else{index=removeBefore===!0?--index:index}
if(_.slideCount<1||index<0||index>_.slideCount-1){return!1}
_.unload();if(removeAll===!0){_.$slideTrack.children().remove()}else{_.$slideTrack.children(this.options.slide).eq(index).remove()}
_.$slides=_.$slideTrack.children(this.options.slide);_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.append(_.$slides);_.$slidesCache=_.$slides;_.reinit()};Slick.prototype.setCSS=function(position){var _=this,positionProps={},x,y;if(_.options.rtl===!0){position=-position}
x=_.positionProp=='left'?Math.ceil(position)+'px':'0px';y=_.positionProp=='top'?Math.ceil(position)+'px':'0px';positionProps[_.positionProp]=position;if(_.transformsEnabled===!1){_.$slideTrack.css(positionProps)}else{positionProps={};if(_.cssTransitions===!1){positionProps[_.animType]='translate('+x+', '+y+')';_.$slideTrack.css(positionProps)}else{positionProps[_.animType]='translate3d('+x+', '+y+', 0px)';if(_.options.centerMode&&_.options.toleft&&_.slideCount<=_.options.slidesToShow){positionProps[_.animType]='translate3d(0, 0, 0)';console.log('translate3d(0, 0, 0)')}
_.$slideTrack.css(positionProps)}}};Slick.prototype.setDimensions=function(){var _=this;if(_.options.vertical===!1){if(_.options.centerMode===!0){_.$list.css({padding:('0px '+_.options.centerPadding)})}}else{_.$list.height(_.$slides.first().outerHeight(!0)*_.options.slidesToShow);if(_.options.centerMode===!0){_.$list.css({padding:(_.options.centerPadding+' 0px')})}}
_.listWidth=_.$list.width();_.listHeight=_.$list.height();if(_.options.vertical===!1&&_.options.variableWidth===!1){_.slideWidth=Math.ceil(_.listWidth/_.options.slidesToShow);_.$slideTrack.width(Math.ceil((_.slideWidth*_.$slideTrack.children('.slick-slide').length)))}else if(_.options.variableWidth===!0){_.$slideTrack.width(5000*_.slideCount)}else{_.slideWidth=Math.ceil(_.listWidth);_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(!0)*_.$slideTrack.children('.slick-slide').length)))}
var offset=_.$slides.first().outerWidth(!0)-_.$slides.first().width();if(_.options.variableWidth===!1)_.$slideTrack.children('.slick-slide').width(_.slideWidth-offset)};Slick.prototype.setFade=function(){var _=this,targetLeft;_.$slides.each(function(index,element){targetLeft=(_.slideWidth*index)*-1;if(_.options.rtl===!0){$(element).css({position:'relative',right:targetLeft,top:0,zIndex:_.options.zIndex-2,opacity:0})}else{$(element).css({position:'relative',left:targetLeft,top:0,zIndex:_.options.zIndex-2,opacity:0})}});_.$slides.eq(_.currentSlide).css({zIndex:_.options.zIndex-1,opacity:1})};Slick.prototype.setHeight=function(){var _=this;if(_.options.slidesToShow===1&&_.options.adaptiveHeight===!0&&_.options.vertical===!1){var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(!0);_.$list.css('height',targetHeight)}};Slick.prototype.setOption=Slick.prototype.slickSetOption=function(){var _=this,l,item,option,value,refresh=!1,type;if($.type(arguments[0])==='object'){option=arguments[0];refresh=arguments[1];type='multiple'}else if($.type(arguments[0])==='string'){option=arguments[0];value=arguments[1];refresh=arguments[2];if(arguments[0]==='responsive'&&$.type(arguments[1])==='array'){type='responsive'}else if(typeof arguments[1]!=='undefined'){type='single'}}
if(type==='single'){_.options[option]=value}else if(type==='multiple'){$.each(option,function(opt,val){_.options[opt]=val})}else if(type==='responsive'){for(item in value){if($.type(_.options.responsive)!=='array'){_.options.responsive=[value[item]]}else{l=_.options.responsive.length-1;while(l>=0){if(_.options.responsive[l].breakpoint===value[item].breakpoint){_.options.responsive.splice(l,1)}
l--}
_.options.responsive.push(value[item])}}}
if(refresh){_.unload();_.reinit()}};Slick.prototype.setPosition=function(){var _=this;_.setDimensions();_.setHeight();if(_.options.fade===!1){_.setCSS(_.getLeft(_.currentSlide))}else{_.setFade()}
_.$slider.trigger('setPosition',[_])};Slick.prototype.setProps=function(){var _=this,bodyStyle=document.body.style;_.positionProp=_.options.vertical===!0?'top':'left';if(_.positionProp==='top'){_.$slider.addClass('slick-vertical')}else{_.$slider.removeClass('slick-vertical')}
if(bodyStyle.WebkitTransition!==undefined||bodyStyle.MozTransition!==undefined||bodyStyle.msTransition!==undefined){if(_.options.useCSS===!0){_.cssTransitions=!0}}
if(_.options.fade){if(typeof _.options.zIndex==='number'){if(_.options.zIndex<3){_.options.zIndex=3}}else{_.options.zIndex=_.defaults.zIndex}}
if(bodyStyle.OTransform!==undefined){_.animType='OTransform';_.transformType='-o-transform';_.transitionType='OTransition';if(bodyStyle.perspectiveProperty===undefined&&bodyStyle.webkitPerspective===undefined)_.animType=!1}
if(bodyStyle.MozTransform!==undefined){_.animType='MozTransform';_.transformType='-moz-transform';_.transitionType='MozTransition';if(bodyStyle.perspectiveProperty===undefined&&bodyStyle.MozPerspective===undefined)_.animType=!1}
if(bodyStyle.webkitTransform!==undefined){_.animType='webkitTransform';_.transformType='-webkit-transform';_.transitionType='webkitTransition';if(bodyStyle.perspectiveProperty===undefined&&bodyStyle.webkitPerspective===undefined)_.animType=!1}
if(bodyStyle.msTransform!==undefined){_.animType='msTransform';_.transformType='-ms-transform';_.transitionType='msTransition';if(bodyStyle.msTransform===undefined)_.animType=!1}
if(bodyStyle.transform!==undefined&&_.animType!==!1){_.animType='transform';_.transformType='transform';_.transitionType='transition'}
_.transformsEnabled=_.options.useTransform&&(_.animType!==null&&_.animType!==!1)};Slick.prototype.setSlideClasses=function(index){var _=this,centerOffset,allSlides,indexOffset,remainder;allSlides=_.$slider.find('.slick-slide').removeClass('slick-active slick-center slick-current').attr('aria-hidden','true');_.$slides.eq(index).addClass('slick-current');if(_.options.centerMode===!0){var evenCoef=_.options.slidesToShow%2===0?1:0;centerOffset=Math.floor(_.options.slidesToShow/2);if(_.options.infinite===!0){if(index>=centerOffset&&index<=(_.slideCount-1)-centerOffset){_.$slides.slice(index-centerOffset+evenCoef,index+centerOffset+1).addClass('slick-active').attr('aria-hidden','false')}else{indexOffset=_.options.slidesToShow+index;allSlides.slice(indexOffset-centerOffset+1+evenCoef,indexOffset+centerOffset+2).addClass('slick-active').attr('aria-hidden','false')}
if(index===0){allSlides.eq(_.options.slidesToShow+_.slideCount+1).addClass('slick-center')}else if(index===_.slideCount-1){allSlides.eq(_.options.slidesToShow).addClass('slick-center')}}
_.$slides.eq(index).addClass('slick-center')}else{if(index>=0&&index<=(_.slideCount-_.options.slidesToShow)){_.$slides.slice(index,index+_.options.slidesToShow).addClass('slick-active').attr('aria-hidden','false')}else if(allSlides.length<=_.options.slidesToShow){allSlides.addClass('slick-active').attr('aria-hidden','false')}else{remainder=_.slideCount%_.options.slidesToShow;indexOffset=_.options.infinite===!0?_.options.slidesToShow+index:index;if(_.options.slidesToShow==_.options.slidesToScroll&&(_.slideCount-index)<_.options.slidesToShow){allSlides.slice(indexOffset-(_.options.slidesToShow-remainder),indexOffset+remainder).addClass('slick-active').attr('aria-hidden','false')}else{allSlides.slice(indexOffset,indexOffset+_.options.slidesToShow).addClass('slick-active').attr('aria-hidden','false')}}}
if(_.options.lazyLoad==='ondemand'||_.options.lazyLoad==='anticipated'){_.lazyLoad()}};Slick.prototype.setupInfinite=function(){var _=this,i,slideIndex,infiniteCount;if(_.options.fade===!0){_.options.centerMode=!1}
if(_.options.infinite===!0&&_.options.fade===!1){slideIndex=null;if(_.slideCount>_.options.slidesToShow){if(_.options.centerMode===!0){infiniteCount=_.options.slidesToShow+1}else{infiniteCount=_.options.slidesToShow}
for(i=_.slideCount;i>(_.slideCount-infiniteCount);i-=1){slideIndex=i-1;$(_.$slides[slideIndex]).clone(!0).attr('id','').attr('data-slick-index',slideIndex-_.slideCount).prependTo(_.$slideTrack).addClass('slick-cloned')}
for(i=0;i<infiniteCount+_.slideCount;i+=1){slideIndex=i;$(_.$slides[slideIndex]).clone(!0).attr('id','').attr('data-slick-index',slideIndex+_.slideCount).appendTo(_.$slideTrack).addClass('slick-cloned')}
_.$slideTrack.find('.slick-cloned').find('[id]').each(function(){$(this).attr('id','')})}}};Slick.prototype.interrupt=function(toggle){var _=this;if(!toggle){_.autoPlay()}
_.interrupted=toggle};Slick.prototype.selectHandler=function(event){var _=this;var targetElement=$(event.target).is('.slick-slide')?$(event.target):$(event.target).parents('.slick-slide');var index=parseInt(targetElement.attr('data-slick-index'));if(!index)index=0;if(_.slideCount<=_.options.slidesToShow){_.slideHandler(index,!1,!0);return}
_.slideHandler(index)};Slick.prototype.slideHandler=function(index,sync,dontAnimate){var targetSlide,animSlide,oldSlide,slideLeft,targetLeft=null,_=this,navTarget;sync=sync||!1;if(_.animating===!0&&_.options.waitForAnimate===!0){return}
if(_.options.fade===!0&&_.currentSlide===index){return}
if(sync===!1){_.asNavFor(index)}
targetSlide=index;targetLeft=_.getLeft(targetSlide);slideLeft=_.getLeft(_.currentSlide);_.currentLeft=_.swipeLeft===null?slideLeft:_.swipeLeft;if(_.options.infinite===!1&&_.options.centerMode===!1&&(index<0||index>_.getDotCount()*_.options.slidesToScroll)){if(_.options.fade===!1){targetSlide=_.currentSlide;if(dontAnimate!==!0&&_.slideCount>_.options.slidesToShow){_.animateSlide(slideLeft,function(){_.postSlide(targetSlide)})}else{_.postSlide(targetSlide)}}
return}else if(_.options.infinite===!1&&_.options.centerMode===!0&&(index<0||index>(_.slideCount-_.options.slidesToScroll))){if(_.options.fade===!1){targetSlide=_.currentSlide;if(dontAnimate!==!0&&_.slideCount>_.options.slidesToShow){_.animateSlide(slideLeft,function(){_.postSlide(targetSlide)})}else{_.postSlide(targetSlide)}}
return}
if(_.options.autoplay){clearInterval(_.autoPlayTimer)}
if(targetSlide<0){if(_.slideCount%_.options.slidesToScroll!==0){animSlide=_.slideCount-(_.slideCount%_.options.slidesToScroll)}else{animSlide=_.slideCount+targetSlide}}else if(targetSlide>=_.slideCount){if(_.slideCount%_.options.slidesToScroll!==0){animSlide=0}else{animSlide=targetSlide-_.slideCount}}else{animSlide=targetSlide}
_.animating=!0;_.$slider.trigger('beforeChange',[_,_.currentSlide,animSlide]);oldSlide=_.currentSlide;_.currentSlide=animSlide;_.setSlideClasses(_.currentSlide);if(_.options.asNavFor){navTarget=_.getNavTarget();navTarget=navTarget.slick('getSlick');if(navTarget.slideCount<=navTarget.options.slidesToShow){navTarget.setSlideClasses(_.currentSlide)}}
_.updateDots();_.updateArrows();if(_.options.fade===!0){if(dontAnimate!==!0){_.fadeSlideOut(oldSlide);_.fadeSlide(animSlide,function(){_.postSlide(animSlide)})}else{_.postSlide(animSlide)}
_.animateHeight();return}
if(dontAnimate!==!0&&_.slideCount>_.options.slidesToShow){_.animateSlide(targetLeft,function(){_.postSlide(animSlide)})}else{_.postSlide(animSlide)}};Slick.prototype.startLoad=function(){var _=this;if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow){_.$prevArrow.hide();_.$nextArrow.hide()}
if(_.options.dots===!0&&_.slideCount>_.options.slidesToShow){_.$dots.hide()}
_.$slider.addClass('slick-loading')};Slick.prototype.swipeDirection=function(){var xDist,yDist,r,swipeAngle,_=this;xDist=_.touchObject.startX-_.touchObject.curX;yDist=_.touchObject.startY-_.touchObject.curY;r=Math.atan2(yDist,xDist);swipeAngle=Math.round(r*180/Math.PI);if(swipeAngle<0){swipeAngle=360-Math.abs(swipeAngle)}
if((swipeAngle<=45)&&(swipeAngle>=0)){return(_.options.rtl===!1?'left':'right')}
if((swipeAngle<=360)&&(swipeAngle>=315)){return(_.options.rtl===!1?'left':'right')}
if((swipeAngle>=135)&&(swipeAngle<=225)){return(_.options.rtl===!1?'right':'left')}
if(_.options.verticalSwiping===!0){if((swipeAngle>=35)&&(swipeAngle<=135)){return'down'}else{return'up'}}
return'vertical'};Slick.prototype.swipeEnd=function(event){var _=this,slideCount,direction;_.dragging=!1;_.swiping=!1;if(_.scrolling){_.scrolling=!1;return!1}
_.interrupted=!1;_.shouldClick=(_.touchObject.swipeLength>10)?!1:!0;if(_.touchObject.curX===undefined){return!1}
if(_.touchObject.edgeHit===!0){_.$slider.trigger('edge',[_,_.swipeDirection()])}
if(_.touchObject.swipeLength>=_.touchObject.minSwipe){direction=_.swipeDirection();switch(direction){case 'left':case 'down':slideCount=_.options.swipeToSlide?_.checkNavigable(_.currentSlide+_.getSlideCount()):_.currentSlide+_.getSlideCount();_.currentDirection=0;break;case 'right':case 'up':slideCount=_.options.swipeToSlide?_.checkNavigable(_.currentSlide-_.getSlideCount()):_.currentSlide-_.getSlideCount();_.currentDirection=1;break;default:}
if(direction!='vertical'){_.slideHandler(slideCount);_.touchObject={};_.$slider.trigger('swipe',[_,direction])}}else{if(_.touchObject.startX!==_.touchObject.curX){_.slideHandler(_.currentSlide);_.touchObject={}}}};Slick.prototype.swipeHandler=function(event){var _=this;if((_.options.swipe===!1)||('ontouchend' in document&&_.options.swipe===!1)){return}else if(_.options.draggable===!1&&event.type.indexOf('mouse')!==-1){return}
_.touchObject.fingerCount=event.originalEvent&&event.originalEvent.touches!==undefined?event.originalEvent.touches.length:1;_.touchObject.minSwipe=_.listWidth/_.options.touchThreshold;if(_.options.verticalSwiping===!0){_.touchObject.minSwipe=_.listHeight/_.options.touchThreshold}
switch(event.data.action){case 'start':_.swipeStart(event);break;case 'move':_.swipeMove(event);break;case 'end':_.swipeEnd(event);break}};Slick.prototype.swipeMove=function(event){var _=this,edgeWasHit=!1,curLeft,swipeDirection,swipeLength,positionOffset,touches,verticalSwipeLength;touches=event.originalEvent!==undefined?event.originalEvent.touches:null;if(!_.dragging||_.scrolling||touches&&touches.length!==1){return!1}
curLeft=_.getLeft(_.currentSlide);_.touchObject.curX=touches!==undefined?touches[0].pageX:event.clientX;_.touchObject.curY=touches!==undefined?touches[0].pageY:event.clientY;_.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(_.touchObject.curX-_.touchObject.startX,2)));verticalSwipeLength=Math.round(Math.sqrt(Math.pow(_.touchObject.curY-_.touchObject.startY,2)));if(!_.options.verticalSwiping&&!_.swiping&&verticalSwipeLength>4){_.scrolling=!0;return!1}
if(_.options.verticalSwiping===!0){_.touchObject.swipeLength=verticalSwipeLength}
swipeDirection=_.swipeDirection();if(event.originalEvent!==undefined&&_.touchObject.swipeLength>4){_.swiping=!0;event.preventDefault()}
positionOffset=(_.options.rtl===!1?1:-1)*(_.touchObject.curX>_.touchObject.startX?1:-1);if(_.options.verticalSwiping===!0){positionOffset=_.touchObject.curY>_.touchObject.startY?1:-1}
swipeLength=_.touchObject.swipeLength;_.touchObject.edgeHit=!1;if(_.options.infinite===!1){if((_.currentSlide===0&&swipeDirection==='right')||(_.currentSlide>=_.getDotCount()&&swipeDirection==='left')){swipeLength=_.touchObject.swipeLength*_.options.edgeFriction;_.touchObject.edgeHit=!0}}
if(_.options.vertical===!1){_.swipeLeft=curLeft+swipeLength*positionOffset}else{_.swipeLeft=curLeft+(swipeLength*(_.$list.height()/_.listWidth))*positionOffset}
if(_.options.verticalSwiping===!0){_.swipeLeft=curLeft+swipeLength*positionOffset}
if(_.options.fade===!0||_.options.touchMove===!1){return!1}
if(_.animating===!0){_.swipeLeft=null;return!1}
_.setCSS(_.swipeLeft)};Slick.prototype.swipeStart=function(event){var _=this,touches;_.interrupted=!0;if(_.touchObject.fingerCount!==1||_.slideCount<=_.options.slidesToShow){_.touchObject={};return!1}
if(event.originalEvent!==undefined&&event.originalEvent.touches!==undefined){touches=event.originalEvent.touches[0]}
_.touchObject.startX=_.touchObject.curX=touches!==undefined?touches.pageX:event.clientX;_.touchObject.startY=_.touchObject.curY=touches!==undefined?touches.pageY:event.clientY;_.dragging=!0};Slick.prototype.unfilterSlides=Slick.prototype.slickUnfilter=function(){var _=this;if(_.$slidesCache!==null){_.unload();_.$slideTrack.children(this.options.slide).detach();_.$slidesCache.appendTo(_.$slideTrack);_.reinit()}};Slick.prototype.unload=function(){var _=this;$('.slick-cloned',_.$slider).remove();if(_.$dots){_.$dots.remove()}
if(_.$prevArrow&&_.htmlExpr.test(_.options.prevArrow)){_.$prevArrow.remove()}
if(_.$nextArrow&&_.htmlExpr.test(_.options.nextArrow)){_.$nextArrow.remove()}
_.$slides.removeClass('slick-slide slick-active slick-visible slick-current').attr('aria-hidden','true').css('width','')};Slick.prototype.unslick=function(fromBreakpoint){var _=this;_.$slider.trigger('unslick',[_,fromBreakpoint]);_.destroy()};Slick.prototype.updateArrows=function(){var _=this,centerOffset;centerOffset=Math.floor(_.options.slidesToShow/2);if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow&&!_.options.infinite){_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled','false');_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled','false');if(_.currentSlide===0){_.$prevArrow.addClass('slick-disabled').attr('aria-disabled','true');_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled','false')}else if(_.currentSlide>=_.slideCount-_.options.slidesToShow&&_.options.centerMode===!1){_.$nextArrow.addClass('slick-disabled').attr('aria-disabled','true');_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled','false')}else if(_.currentSlide>=_.slideCount-1&&_.options.centerMode===!0){_.$nextArrow.addClass('slick-disabled').attr('aria-disabled','true');_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled','false')}}};Slick.prototype.updateDots=function(){var _=this;if(_.$dots!==null){_.$dots.find('li').removeClass('slick-active').end();_.$dots.find('li').eq(Math.floor(_.currentSlide/_.options.slidesToScroll)).addClass('slick-active')}};Slick.prototype.visibility=function(){var _=this;if(_.options.autoplay){if(document[_.hidden]){_.interrupted=!0}else{_.interrupted=!1}}};$.fn.slick=function(){var _=this,opt=arguments[0],args=Array.prototype.slice.call(arguments,1),l=_.length,i,ret;for(i=0;i<l;i++){if(typeof opt=='object'||typeof opt=='undefined')
_[i].slick=new Slick(_[i],opt);else ret=_[i].slick[opt].apply(_[i].slick,args);if(typeof ret!='undefined')return ret}
return _}}));var check_browser=navigator.userAgent;var leo='mousewheel wheel ';if(check_browser.indexOf('Firefox')>=0){leo=''}
"function"!==typeof Object.create&&(Object.create=function(d){function h(){}h.prototype=d;return new h});(function(d,h,l,m){var k={init:function(b,a){var c=this;c.elem=a;c.$elem=d(a);c.imageSrc=c.$elem.data("zoom-image")?c.$elem.data("zoom-image"):c.$elem.attr("src");c.options=d.extend({},d.fn.elevateZoom.options,b);c.options.tint&&(c.options.lensColour="none",c.options.lensOpacity="1");"inner"==c.options.zoomType&&(c.options.showLens=!1);c.$elem.parent().removeAttr("title").removeAttr("alt");c.zoomImage=c.imageSrc;c.refresh(1);d("#"+c.options.gallery+" a").click(function(a){c.options.galleryActiveClass&&(d("#"+c.options.gallery+" a").removeClass(c.options.galleryActiveClass),d(this).addClass(c.options.galleryActiveClass));a.preventDefault();d(this).data("zoom-image")?c.zoomImagePre=d(this).data("zoom-image"):c.zoomImagePre=d(this).data("image");c.swaptheimage(d(this).data("image"),c.zoomImagePre);return!1})},refresh:function(b){var a=this;setTimeout(function(){a.fetch(a.imageSrc)},b||a.options.refresh)},fetch:function(b){var a=this,c=new Image;c.onload=function(){a.largeWidth=c.width;a.largeHeight=c.height;a.startZoom();a.currentImage=a.imageSrc;a.options.onZoomedImageLoaded(a.$elem)};c.src=b},startZoom:function(){var b=this;b.nzWidth=b.$elem.width();b.nzHeight=b.$elem.height();b.isWindowActive=!1;b.isLensActive=!1;b.isTintActive=!1;b.overWindow=!1;b.options.imageCrossfade&&(b.zoomWrap=b.$elem.wrap('<div style="height:'+b.nzHeight+"px;width:"+b.nzWidth+'px;" class="zoomWrapper" />'),b.$elem.css("position","absolute"));b.zoomLock=1;b.scrollingLock=!1;b.changeBgSize=!1;b.currentZoomLevel=b.options.zoomLevel;b.nzOffset=b.$elem.offset();b.widthRatio=b.largeWidth/b.currentZoomLevel/b.nzWidth;b.heightRatio=b.largeHeight/b.currentZoomLevel/b.nzHeight;"window"==b.options.zoomType&&(b.zoomWindowStyle="overflow: hidden;background-position: 0px 0px;text-align:center;background-color: "+String(b.options.zoomWindowBgColour)+";width: "+String(b.options.zoomWindowWidth)+"px;height: "+String(b.options.zoomWindowHeight)+"px;float: left;background-size: "+b.largeWidth/b.currentZoomLevel+"px "+b.largeHeight/b.currentZoomLevel+"px;display: none;z-index:100;border: "+String(b.options.borderSize)+"px solid "+b.options.borderColour+";background-repeat: no-repeat;position: absolute;");if("inner"==b.options.zoomType){var a=b.$elem.css("border-left-width");b.zoomWindowStyle="overflow: hidden;margin-left: "+String(a)+";margin-top: "+String(a)+";background-position: 0px 0px;width: "+String(b.nzWidth)+"px;height: "+String(b.nzHeight)+"px;float: left;display: none;cursor:"+b.options.cursor+";px solid "+b.options.borderColour+";background-repeat: no-repeat;position: absolute;"}"window"==b.options.zoomType&&(lensHeight=b.nzHeight<b.options.zoomWindowWidth/b.widthRatio?b.nzHeight:String(b.options.zoomWindowHeight/b.heightRatio),lensWidth=b.largeWidth<b.options.zoomWindowWidth?b.nzWidth:b.options.zoomWindowWidth/b.widthRatio,b.lensStyle="background-position: 0px 0px;width: "+String(b.options.zoomWindowWidth/b.widthRatio)+"px;height: "+String(b.options.zoomWindowHeight/b.heightRatio)+"px;float: right;display: none;overflow: hidden;z-index: 999;-webkit-transform: translateZ(0);opacity:"+b.options.lensOpacity+";filter: alpha(opacity = "+100*b.options.lensOpacity+"); zoom:1;width:"+lensWidth+"px;height:"+lensHeight+"px;background-color:"+b.options.lensColour+";cursor:"+b.options.cursor+";border: "+b.options.lensBorderSize+"px solid "+b.options.lensBorderColour+";background-repeat: no-repeat;position: absolute;");b.tintStyle="display: block;position: absolute;background-color: "+b.options.tintColour+";filter:alpha(opacity=0);opacity: 0;width: "+b.nzWidth+"px;height: "+b.nzHeight+"px;";b.lensRound="";"lens"==b.options.zoomType&&(b.lensStyle="background-position: 0px 0px;float: left;display: none;border: "+String(b.options.borderSize)+"px solid "+b.options.borderColour+";width:"+String(b.options.lensSize)+"px;height:"+String(b.options.lensSize)+"px;background-repeat: no-repeat;position: absolute;");"round"==b.options.lensShape&&(b.lensRound="border-top-left-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;border-top-right-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;border-bottom-left-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;border-bottom-right-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;");b.zoomContainer=d('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:'+b.nzOffset.left+"px;top:"+b.nzOffset.top+"px;height:"+b.nzHeight+"px;width:"+b.nzWidth+'px;"></div>');d("body").append(b.zoomContainer);b.options.containLensZoom&&"lens"==b.options.zoomType&&b.zoomContainer.css("overflow","hidden");"inner"!=b.options.zoomType&&(b.zoomLens=d("<div class='zoomLens' style='"+b.lensStyle+b.lensRound+"'>&nbsp;</div>").appendTo(b.zoomContainer).click(function(){b.$elem.trigger("click")}),b.options.tint&&(b.tintContainer=d("<div/>").addClass("tintContainer"),b.zoomTint=d("<div class='zoomTint' style='"+b.tintStyle+"'></div>"),b.zoomLens.wrap(b.tintContainer),b.zoomTintcss=b.zoomLens.after(b.zoomTint),b.zoomTintImage=d('<img style="position: absolute; left: 0px; top: 0px; max-width: none; width: '+b.nzWidth+"px; height: "+b.nzHeight+'px;" src="'+b.imageSrc+'">').appendTo(b.zoomLens).click(function(){b.$elem.trigger("click")})));isNaN(b.options.zoomWindowPosition)?b.zoomWindow=d("<div style='z-index:999;left:"+b.windowOffsetLeft+"px;top:"+b.windowOffsetTop+"px;"+b.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo("body").click(function(){b.$elem.trigger("click")}):b.zoomWindow=d("<div style='z-index:999;left:"+b.windowOffsetLeft+"px;top:"+b.windowOffsetTop+"px;"+b.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo(b.zoomContainer).click(function(){b.$elem.trigger("click")});b.zoomWindowContainer=d("<div/>").addClass("zoomWindowContainer").css("width",b.options.zoomWindowWidth);b.zoomWindow.wrap(b.zoomWindowContainer);"lens"==b.options.zoomType&&b.zoomLens.css({backgroundImage:"url('"+b.imageSrc+"')"});"window"==b.options.zoomType&&b.zoomWindow.css({backgroundImage:"url('"+b.imageSrc+"')"});"inner"==b.options.zoomType&&b.zoomWindow.css({backgroundImage:"url('"+b.imageSrc+"')"});b.$elem.bind("touchmove",function(a){a.preventDefault();b.setPosition(a.originalEvent.touches[0]||a.originalEvent.changedTouches[0])});b.zoomContainer.bind("touchmove",function(a){"inner"==b.options.zoomType&&b.showHideWindow("show");a.preventDefault();b.setPosition(a.originalEvent.touches[0]||a.originalEvent.changedTouches[0])});b.zoomContainer.bind("touchend",function(a){b.showHideWindow("hide");b.options.showLens&&b.showHideLens("hide");b.options.tint&&"inner"!=b.options.zoomType&&b.showHideTint("hide")});b.$elem.bind("touchend",function(a){b.showHideWindow("hide");b.options.showLens&&b.showHideLens("hide");b.options.tint&&"inner"!=b.options.zoomType&&b.showHideTint("hide")});b.options.showLens&&(b.zoomLens.bind("touchmove",function(a){a.preventDefault();b.setPosition(a.originalEvent.touches[0]||a.originalEvent.changedTouches[0])}),b.zoomLens.bind("touchend",function(a){b.showHideWindow("hide");b.options.showLens&&b.showHideLens("hide");b.options.tint&&"inner"!=b.options.zoomType&&b.showHideTint("hide")}));b.$elem.bind("mousemove",function(a){!1==b.overWindow&&b.setElements("show");if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});b.zoomContainer.bind("mousemove",function(a){!1==b.overWindow&&b.setElements("show");if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});"inner"!=b.options.zoomType&&b.zoomLens.bind("mousemove",function(a){if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});b.options.tint&&"inner"!=b.options.zoomType&&b.zoomTint.bind("mousemove",function(a){if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});"inner"==b.options.zoomType&&b.zoomWindow.bind("mousemove",function(a){if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});b.zoomContainer.add(b.$elem).mouseenter(function(){!1==b.overWindow&&b.setElements("show")}).mouseleave(function(){b.scrollLock||b.setElements("hide")});"inner"!=b.options.zoomType&&b.zoomWindow.mouseenter(function(){b.overWindow=!0;b.setElements("hide")}).mouseleave(function(){b.overWindow=!1});b.minZoomLevel=b.options.minZoomLevel?b.options.minZoomLevel:2*b.options.scrollZoomIncrement;b.options.scrollZoom&&b.zoomContainer.add(b.$elem).bind(leo+"DOMMouseScroll MozMousePixelScroll",function(a){b.scrollLock=!0;clearTimeout(d.data(this,"timer"));d.data(this,"timer",setTimeout(function(){b.scrollLock=!1},250));var e=a.originalEvent.wheelDelta||-1*a.originalEvent.detail;a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();0<e/120?b.currentZoomLevel>=b.minZoomLevel&&b.changeZoomLevel(b.currentZoomLevel-b.options.scrollZoomIncrement):b.options.maxZoomLevel?b.currentZoomLevel<=b.options.maxZoomLevel&&b.changeZoomLevel(parseFloat(b.currentZoomLevel)+b.options.scrollZoomIncrement):b.changeZoomLevel(parseFloat(b.currentZoomLevel)+b.options.scrollZoomIncrement);return!1})},setElements:function(b){if(!this.options.zoomEnabled)return!1;"show"==b&&this.isWindowSet&&("inner"==this.options.zoomType&&this.showHideWindow("show"),"window"==this.options.zoomType&&this.showHideWindow("show"),this.options.showLens&&this.showHideLens("show"),this.options.tint&&"inner"!=this.options.zoomType&&this.showHideTint("show"));"hide"==b&&("window"==this.options.zoomType&&this.showHideWindow("hide"),this.options.tint||this.showHideWindow("hide"),this.options.showLens&&this.showHideLens("hide"),this.options.tint&&this.showHideTint("hide"))},setPosition:function(b){if(!this.options.zoomEnabled)return!1;this.nzHeight=this.$elem.height();this.nzWidth=this.$elem.width();this.nzOffset=this.$elem.offset();this.options.tint&&"inner"!=this.options.zoomType&&(this.zoomTint.css({top:0}),this.zoomTint.css({left:0}));this.options.responsive&&!this.options.scrollZoom&&this.options.showLens&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/
this.heightRatio),lensWidth=this.largeWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/this.widthRatio,this.widthRatio=this.largeWidth/this.nzWidth,this.heightRatio=this.largeHeight/this.nzHeight,"lens"!=this.options.zoomType&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/this.heightRatio),lensWidth=this.options.zoomWindowWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/
this.widthRatio,this.zoomLens.css("width",lensWidth),this.zoomLens.css("height",lensHeight),this.options.tint&&(this.zoomTintImage.css("width",this.nzWidth),this.zoomTintImage.css("height",this.nzHeight))),"lens"==this.options.zoomType&&this.zoomLens.css({width:String(this.options.lensSize)+"px",height:String(this.options.lensSize)+"px"}));this.zoomContainer.css({top:this.nzOffset.top});this.zoomContainer.css({left:this.nzOffset.left});this.mouseLeft=parseInt(b.pageX-this.nzOffset.left);this.mouseTop=parseInt(b.pageY-this.nzOffset.top);"window"==this.options.zoomType&&(this.Etoppos=this.mouseTop<this.zoomLens.height()/2,this.Eboppos=this.mouseTop>this.nzHeight-this.zoomLens.height()/2-2*this.options.lensBorderSize,this.Eloppos=this.mouseLeft<0+this.zoomLens.width()/2,this.Eroppos=this.mouseLeft>this.nzWidth-this.zoomLens.width()/2-2*this.options.lensBorderSize);"inner"==this.options.zoomType&&(this.Etoppos=this.mouseTop<this.nzHeight/2/this.heightRatio,this.Eboppos=this.mouseTop>this.nzHeight-this.nzHeight/2/this.heightRatio,this.Eloppos=this.mouseLeft<0+this.nzWidth/2/this.widthRatio,this.Eroppos=this.mouseLeft>this.nzWidth-this.nzWidth/2/this.widthRatio-2*this.options.lensBorderSize);0>=this.mouseLeft||0>this.mouseTop||this.mouseLeft>this.nzWidth||this.mouseTop>this.nzHeight?this.setElements("hide"):(this.options.showLens&&(this.lensLeftPos=String(this.mouseLeft-this.zoomLens.width()/2),this.lensTopPos=String(this.mouseTop-this.zoomLens.height()/2)),this.Etoppos&&(this.lensTopPos=0),this.Eloppos&&(this.tintpos=this.lensLeftPos=this.windowLeftPos=0),"window"==this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-this.zoomLens.height()-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.zoomLens.width()-2*this.options.lensBorderSize)),"inner"==this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.nzWidth-2*this.options.lensBorderSize)),"lens"==this.options.zoomType&&(this.windowLeftPos=String(-1*((b.pageX-this.nzOffset.left)*this.widthRatio-this.zoomLens.width()/2)),this.windowTopPos=String(-1*((b.pageY-this.nzOffset.top)*this.heightRatio-this.zoomLens.height()/2)),this.zoomLens.css({backgroundPosition:this.windowLeftPos+"px "+this.windowTopPos+"px"}),this.changeBgSize&&(this.nzHeight>this.nzWidth?("lens"==this.options.zoomType&&this.zoomLens.css({"background-size":this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+"px"}),this.zoomWindow.css({"background-size":this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+"px"})):("lens"==this.options.zoomType&&this.zoomLens.css({"background-size":this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px"}),this.zoomWindow.css({"background-size":this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px"})),this.changeBgSize=!1),this.setWindowPostition(b)),this.options.tint&&"inner"!=this.options.zoomType&&this.setTintPosition(b),"window"==this.options.zoomType&&this.setWindowPostition(b),"inner"==this.options.zoomType&&this.setWindowPostition(b),this.options.showLens&&(this.fullwidth&&"lens"!=this.options.zoomType&&(this.lensLeftPos=0),this.zoomLens.css({left:this.lensLeftPos+"px",top:this.lensTopPos+"px"})))},showHideWindow:function(b){"show"!=b||this.isWindowActive||(this.options.zoomWindowFadeIn?this.zoomWindow.stop(!0,!0,!1).fadeIn(this.options.zoomWindowFadeIn):this.zoomWindow.show(),this.isWindowActive=!0);"hide"==b&&this.isWindowActive&&(this.options.zoomWindowFadeOut?this.zoomWindow.stop(!0,!0).fadeOut(this.options.zoomWindowFadeOut):this.zoomWindow.hide(),this.isWindowActive=!1)},showHideLens:function(b){"show"!=b||this.isLensActive||(this.options.lensFadeIn?this.zoomLens.stop(!0,!0,!1).fadeIn(this.options.lensFadeIn):this.zoomLens.show(),this.isLensActive=!0);"hide"==b&&this.isLensActive&&(this.options.lensFadeOut?this.zoomLens.stop(!0,!0).fadeOut(this.options.lensFadeOut):this.zoomLens.hide(),this.isLensActive=!1)},showHideTint:function(b){"show"!=b||this.isTintActive||(this.options.zoomTintFadeIn?this.zoomTint.css({opacity:this.options.tintOpacity}).animate().stop(!0,!0).fadeIn("slow"):(this.zoomTint.css({opacity:this.options.tintOpacity}).animate(),this.zoomTint.show()),this.isTintActive=!0);"hide"==b&&this.isTintActive&&(this.options.zoomTintFadeOut?this.zoomTint.stop(!0,!0).fadeOut(this.options.zoomTintFadeOut):this.zoomTint.hide(),this.isTintActive=!1)},setLensPostition:function(b){},setWindowPostition:function(b){var a=this;if(isNaN(a.options.zoomWindowPosition))a.externalContainer=d("#"+a.options.zoomWindowPosition),a.externalContainerWidth=a.externalContainer.width(),a.externalContainerHeight=a.externalContainer.height(),a.externalContainerOffset=a.externalContainer.offset(),a.windowOffsetTop=a.externalContainerOffset.top,a.windowOffsetLeft=a.externalContainerOffset.left;else switch(a.options.zoomWindowPosition){case 1:a.windowOffsetTop=a.options.zoomWindowOffety;a.windowOffsetLeft=+a.nzWidth;break;case 2:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=-1*(a.options.zoomWindowHeight/2-a.nzHeight/2),a.windowOffsetLeft=a.nzWidth);break;case 3:a.windowOffsetTop=a.nzHeight-a.zoomWindow.height()-2*a.options.borderSize;a.windowOffsetLeft=a.nzWidth;break;case 4:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=a.nzWidth;break;case 5:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=a.nzWidth-a.zoomWindow.width()-2*a.options.borderSize;break;case 6:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=a.nzHeight,a.windowOffsetLeft=-1*(a.options.zoomWindowWidth/2-a.nzWidth/2+2*a.options.borderSize));break;case 7:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=0;break;case 8:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 9:a.windowOffsetTop=a.nzHeight-a.zoomWindow.height()-2*a.options.borderSize;a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 10:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=-1*(a.options.zoomWindowHeight/2-a.nzHeight/2),a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize));break;case 11:a.windowOffsetTop=a.options.zoomWindowOffety;a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 12:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 13:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=0;break;case 14:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize),a.windowOffsetLeft=-1*(a.options.zoomWindowWidth/2-a.nzWidth/2+2*a.options.borderSize));break;case 15:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=a.nzWidth-a.zoomWindow.width()-2*a.options.borderSize;break;case 16:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=a.nzWidth;break;default:a.windowOffsetTop=a.options.zoomWindowOffety,a.windowOffsetLeft=a.nzWidth}a.isWindowSet=!0;a.windowOffsetTop+=a.options.zoomWindowOffety;a.windowOffsetLeft+=a.options.zoomWindowOffetx;a.zoomWindow.css({top:a.windowOffsetTop});a.zoomWindow.css({left:a.windowOffsetLeft});"inner"==a.options.zoomType&&(a.zoomWindow.css({top:0}),a.zoomWindow.css({left:0}));a.windowLeftPos=String(-1*((b.pageX-a.nzOffset.left)*a.widthRatio-a.zoomWindow.width()/2));a.windowTopPos=String(-1*((b.pageY-a.nzOffset.top)*a.heightRatio-a.zoomWindow.height()/2));a.Etoppos&&(a.windowTopPos=0);a.Eloppos&&(a.windowLeftPos=0);a.Eboppos&&(a.windowTopPos=-1*(a.largeHeight/a.currentZoomLevel-a.zoomWindow.height()));a.Eroppos&&(a.windowLeftPos=-1*(a.largeWidth/a.currentZoomLevel-a.zoomWindow.width()));a.fullheight&&(a.windowTopPos=0);a.fullwidth&&(a.windowLeftPos=0);if("window"==a.options.zoomType||"inner"==a.options.zoomType)1==a.zoomLock&&(1>=a.widthRatio&&(a.windowLeftPos=0),1>=a.heightRatio&&(a.windowTopPos=0)),a.largeHeight<a.options.zoomWindowHeight&&(a.windowTopPos=0),a.largeWidth<a.options.zoomWindowWidth&&(a.windowLeftPos=0),a.options.easing?(a.xp||(a.xp=0),a.yp||(a.yp=0),a.loop||(a.loop=setInterval(function(){a.xp+=(a.windowLeftPos-a.xp)/a.options.easingAmount;a.yp+=(a.windowTopPos-a.yp)/a.options.easingAmount;a.scrollingLock?(clearInterval(a.loop),a.xp=a.windowLeftPos,a.yp=a.windowTopPos,a.xp=-1*((b.pageX-a.nzOffset.left)*a.widthRatio-a.zoomWindow.width()/2),a.yp=-1*((b.pageY-a.nzOffset.top)*a.heightRatio-a.zoomWindow.height()/2),a.changeBgSize&&(a.nzHeight>a.nzWidth?("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})):("lens"!=a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"})),a.changeBgSize=!1),a.zoomWindow.css({backgroundPosition:a.windowLeftPos+"px "+a.windowTopPos+"px"}),a.scrollingLock=!1,a.loop=!1):(a.changeBgSize&&(a.nzHeight>a.nzWidth?("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})):("lens"!=a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"})),a.changeBgSize=!1),a.zoomWindow.css({backgroundPosition:a.xp+"px "+a.yp+"px"}))},16))):(a.changeBgSize&&(a.nzHeight>a.nzWidth?("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})):("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"}),a.largeHeight/a.newvaluewidth<a.options.zoomWindowHeight?a.zoomWindow.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"}):a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})),a.changeBgSize=!1),a.zoomWindow.css({backgroundPosition:a.windowLeftPos+"px "+a.windowTopPos+"px"}))},setTintPosition:function(b){this.nzOffset=this.$elem.offset();this.tintpos=String(-1*(b.pageX-this.nzOffset.left-this.zoomLens.width()/2));this.tintposy=String(-1*(b.pageY-this.nzOffset.top-this.zoomLens.height()/2));this.Etoppos&&(this.tintposy=0);this.Eloppos&&(this.tintpos=0);this.Eboppos&&(this.tintposy=-1*(this.nzHeight-this.zoomLens.height()-2*this.options.lensBorderSize));this.Eroppos&&(this.tintpos=-1*(this.nzWidth-this.zoomLens.width()-2*this.options.lensBorderSize));this.options.tint&&(this.fullheight&&(this.tintposy=0),this.fullwidth&&(this.tintpos=0),this.zoomTintImage.css({left:this.tintpos+"px"}),this.zoomTintImage.css({top:this.tintposy+"px"}))},swaptheimage:function(b,a){var c=this,e=new Image;c.options.loadingIcon&&(c.spinner=d("<div style=\"background: url('"+c.options.loadingIcon+"') no-repeat center;height:"+c.nzHeight+"px;width:"+c.nzWidth+'px;z-index: 2000;position: absolute; background-position: center center;"></div>'),c.$elem.after(c.spinner));c.options.onImageSwap(c.$elem);e.onload=function(){c.largeWidth=e.width;c.largeHeight=e.height;c.zoomImage=a;c.zoomWindow.css({"background-size":c.largeWidth+"px "+c.largeHeight+"px"});c.zoomWindow.css({"background-size":c.largeWidth+"px "+c.largeHeight+"px"});c.swapAction(b,a)};e.src=a},swapAction:function(b,a){var c=this,e=new Image;e.onload=function(){c.nzHeight=e.height;c.nzWidth=e.width;c.options.onImageSwapComplete(c.$elem);c.doneCallback()};e.src=b;c.currentZoomLevel=c.options.zoomLevel;c.options.maxZoomLevel=!1;"lens"==c.options.zoomType&&c.zoomLens.css({backgroundImage:"url('"+a+"')"});"window"==c.options.zoomType&&c.zoomWindow.css({backgroundImage:"url('"+a+"')"});"inner"==c.options.zoomType&&c.zoomWindow.css({backgroundImage:"url('"+a+"')"});c.currentImage=a;if(c.options.imageCrossfade){var f=c.$elem,g=f.clone();c.$elem.attr("src",b);c.$elem.after(g);g.stop(!0).fadeOut(c.options.imageCrossfade,function(){d(this).remove()});c.$elem.width("auto").removeAttr("width");c.$elem.height("auto").removeAttr("height");f.fadeIn(c.options.imageCrossfade);c.options.tint&&"inner"!=c.options.zoomType&&(f=c.zoomTintImage,g=f.clone(),c.zoomTintImage.attr("src",a),c.zoomTintImage.after(g),g.stop(!0).fadeOut(c.options.imageCrossfade,function(){d(this).remove()}),f.fadeIn(c.options.imageCrossfade),c.zoomTint.css({height:c.$elem.height()}),c.zoomTint.css({width:c.$elem.width()}));c.zoomContainer.css("height",c.$elem.height());c.zoomContainer.css("width",c.$elem.width());"inner"!=c.options.zoomType||c.options.constrainType||(c.zoomWrap.parent().css("height",c.$elem.height()),c.zoomWrap.parent().css("width",c.$elem.width()),c.zoomWindow.css("height",c.$elem.height()),c.zoomWindow.css("width",c.$elem.width()))}else c.$elem.attr("src",b),c.options.tint&&(c.zoomTintImage.attr("src",a),c.zoomTintImage.attr("height",c.$elem.height()),c.zoomTintImage.css({height:c.$elem.height()}),c.zoomTint.css({height:c.$elem.height()})),c.zoomContainer.css("height",c.$elem.height()),c.zoomContainer.css("width",c.$elem.width());c.options.imageCrossfade&&(c.zoomWrap.css("height",c.$elem.height()),c.zoomWrap.css("width",c.$elem.width()));c.options.constrainType&&("height"==c.options.constrainType&&(c.zoomContainer.css("height",c.options.constrainSize),c.zoomContainer.css("width","auto"),c.options.imageCrossfade?(c.zoomWrap.css("height",c.options.constrainSize),c.zoomWrap.css("width","auto"),c.constwidth=c.zoomWrap.width()):(c.$elem.css("height",c.options.constrainSize),c.$elem.css("width","auto"),c.constwidth=c.$elem.width()),"inner"==c.options.zoomType&&(c.zoomWrap.parent().css("height",c.options.constrainSize),c.zoomWrap.parent().css("width",c.constwidth),c.zoomWindow.css("height",c.options.constrainSize),c.zoomWindow.css("width",c.constwidth)),c.options.tint&&(c.tintContainer.css("height",c.options.constrainSize),c.tintContainer.css("width",c.constwidth),c.zoomTint.css("height",c.options.constrainSize),c.zoomTint.css("width",c.constwidth),c.zoomTintImage.css("height",c.options.constrainSize),c.zoomTintImage.css("width",c.constwidth))),"width"==c.options.constrainType&&(c.zoomContainer.css("height","auto"),c.zoomContainer.css("width",c.options.constrainSize),c.options.imageCrossfade?(c.zoomWrap.css("height","auto"),c.zoomWrap.css("width",c.options.constrainSize),c.constheight=c.zoomWrap.height()):(c.$elem.css("height","auto"),c.$elem.css("width",c.options.constrainSize),c.constheight=c.$elem.height()),"inner"==c.options.zoomType&&(c.zoomWrap.parent().css("height",c.constheight),c.zoomWrap.parent().css("width",c.options.constrainSize),c.zoomWindow.css("height",c.constheight),c.zoomWindow.css("width",c.options.constrainSize)),c.options.tint&&(c.tintContainer.css("height",c.constheight),c.tintContainer.css("width",c.options.constrainSize),c.zoomTint.css("height",c.constheight),c.zoomTint.css("width",c.options.constrainSize),c.zoomTintImage.css("height",c.constheight),c.zoomTintImage.css("width",c.options.constrainSize))))},doneCallback:function(){this.options.loadingIcon&&this.spinner.hide();this.nzOffset=this.$elem.offset();this.nzWidth=this.$elem.width();this.nzHeight=this.$elem.height();this.currentZoomLevel=this.options.zoomLevel;this.widthRatio=this.largeWidth/this.nzWidth;this.heightRatio=this.largeHeight/this.nzHeight;"window"==this.options.zoomType&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/this.heightRatio),lensWidth=this.options.zoomWindowWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/this.widthRatio,this.zoomLens&&(this.zoomLens.css("width",lensWidth),this.zoomLens.css("height",lensHeight)))},getCurrentImage:function(){return this.zoomImage},getGalleryList:function(){var b=this;b.gallerylist=[];b.options.gallery?d("#"+b.options.gallery+" a").each(function(){var a="";d(this).data("zoom-image")?a=d(this).data("zoom-image"):d(this).data("image")&&(a=d(this).data("image"));a==b.zoomImage?b.gallerylist.unshift({href:""+a+"",title:d(this).find("img").attr("title")}):b.gallerylist.push({href:""+a+"",title:d(this).find("img").attr("title")})}):b.gallerylist.push({href:""+b.zoomImage+"",title:d(this).find("img").attr("title")});return b.gallerylist},changeZoomLevel:function(b){this.scrollingLock=!0;this.newvalue=parseFloat(b).toFixed(2);newvalue=parseFloat(b).toFixed(2);maxheightnewvalue=this.largeHeight/(this.options.zoomWindowHeight/this.nzHeight*this.nzHeight);maxwidthtnewvalue=this.largeWidth/(this.options.zoomWindowWidth/this.nzWidth*this.nzWidth);"inner"!=this.options.zoomType&&(maxheightnewvalue<=newvalue?(this.heightRatio=this.largeHeight/maxheightnewvalue/this.nzHeight,this.newvalueheight=maxheightnewvalue,this.fullheight=!0):(this.heightRatio=this.largeHeight/newvalue/this.nzHeight,this.newvalueheight=newvalue,this.fullheight=!1),maxwidthtnewvalue<=newvalue?(this.widthRatio=this.largeWidth/maxwidthtnewvalue/this.nzWidth,this.newvaluewidth=maxwidthtnewvalue,this.fullwidth=!0):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1),"lens"==this.options.zoomType&&(maxheightnewvalue<=newvalue?(this.fullwidth=!0,this.newvaluewidth=maxheightnewvalue):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1)));"inner"==this.options.zoomType&&(maxheightnewvalue=parseFloat(this.largeHeight/this.nzHeight).toFixed(2),maxwidthtnewvalue=parseFloat(this.largeWidth/this.nzWidth).toFixed(2),newvalue>maxheightnewvalue&&(newvalue=maxheightnewvalue),newvalue>maxwidthtnewvalue&&(newvalue=maxwidthtnewvalue),maxheightnewvalue<=newvalue?(this.heightRatio=this.largeHeight/
newvalue/this.nzHeight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!0):(this.heightRatio=this.largeHeight/newvalue/this.nzHeight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!1),maxwidthtnewvalue<=newvalue?(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue>maxwidthtnewvalue?maxwidthtnewvalue:newvalue,this.fullwidth=!0):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1));scrcontinue=!1;"inner"==this.options.zoomType&&(this.nzWidth>this.nzHeight&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)),this.nzHeight>this.nzWidth&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)));"inner"!=this.options.zoomType&&(scrcontinue=!0);scrcontinue&&(this.zoomLock=0,this.changeZoom=!0,this.options.zoomWindowHeight/this.heightRatio<=this.nzHeight&&(this.currentZoomLevel=this.newvalueheight,"lens"!=this.options.zoomType&&"inner"!=this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css({height:String(this.options.zoomWindowHeight/this.heightRatio)+"px"})),"lens"==this.options.zoomType||"inner"==this.options.zoomType)&&(this.changeBgSize=!0),this.options.zoomWindowWidth/this.widthRatio<=this.nzWidth&&("inner"!=this.options.zoomType&&this.newvaluewidth>this.newvalueheight&&(this.currentZoomLevel=this.newvaluewidth),"lens"!=this.options.zoomType&&"inner"!=this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css({width:String(this.options.zoomWindowWidth/this.widthRatio)+"px"})),"lens"==this.options.zoomType||"inner"==this.options.zoomType)&&(this.changeBgSize=!0),"inner"==this.options.zoomType&&(this.changeBgSize=!0,this.nzWidth>this.nzHeight&&(this.currentZoomLevel=this.newvaluewidth),this.nzHeight>this.nzWidth&&(this.currentZoomLevel=this.newvaluewidth)));this.setPosition(this.currentLoc)},closeAll:function(){self.zoomWindow&&self.zoomWindow.hide();self.zoomLens&&self.zoomLens.hide();self.zoomTint&&self.zoomTint.hide()},changeState:function(b){"enable"==b&&(this.options.zoomEnabled=!0);"disable"==b&&(this.options.zoomEnabled=!1)}};d.fn.elevateZoom=function(b){return this.each(function(){var a=Object.create(k);a.init(b,this);d.data(this,"elevateZoom",a)})};d.fn.elevateZoom.options={zoomActivation:"hover",zoomEnabled:!0,preloading:1,zoomLevel:1,scrollZoom:!1,scrollZoomIncrement:0.1,minZoomLevel:!1,maxZoomLevel:!1,easing:!1,easingAmount:12,lensSize:200,zoomWindowWidth:400,zoomWindowHeight:400,zoomWindowOffetx:0,zoomWindowOffety:0,zoomWindowPosition:1,zoomWindowBgColour:"#fff",lensFadeIn:!1,lensFadeOut:!1,debug:!1,zoomWindowFadeIn:!1,zoomWindowFadeOut:!1,zoomWindowAlwaysShow:!1,zoomTintFadeIn:!1,zoomTintFadeOut:!1,borderSize:4,showLens:!0,borderColour:"#888",lensBorderSize:1,lensBorderColour:"#000",lensShape:"square",zoomType:"window",containLensZoom:!1,lensColour:"white",lensOpacity:0.4,lenszoom:!1,tint:!1,tintColour:"#333",tintOpacity:0.4,gallery:!1,galleryActiveClass:"zoomGalleryActive",imageCrossfade:!1,constrainType:!1,constrainSize:!1,loadingIcon:!1,cursor:"default",responsive:!0,onComplete:d.noop,onZoomedImageLoaded:function(){},onImageSwap:d.noop,onImageSwapComplete:d.noop}})(jQuery,window,document);(function($){$.LeoCustomAjax=function(){this.leoData='leoajax=1'};$.LeoCustomAjax.prototype={processAjax:function(){if(typeof leo_allow_ajax!=="undefined"&&!leo_allow_ajax){return}
var myElement=this;if(leoOption.category_qty&&$(".leo-qty").length)
myElement.getCategoryList();else if($(".leo-qty").length)
$(".leo-qty").remove();if(leoOption.product_list_image&&$(".leo-more-info").length)
myElement.getProductListImage();else if($(".leo-more-info").length)
$(".leo-more-info").remove();if(leoOption.product_one_img&&$(".product-additional").length)
myElement.getProductOneImage();else if($(".product-additional").length)
$(".product-additional").remove();if(leoOption.product_one_img&&$(".product-attribute-additional").length)
myElement.getProductAttributeOneImage();else if($(".product-attribute-additional").length)
$(".product-attribute-additional").remove();if(leoOption.product_one_img&&$(".product-all-additional").length)
myElement.getProductAllOneImage();else if($(".product-all-additional").length)
$(".product-all-additional").remove();if(leoOption.productCdown&&$(".leo-more-cdown").length)
myElement.getProductCdownInfo();else if($(".leo-more-cdown").length)
$(".leo-more-cdown").remove();if(leoOption.productCdown&&$(".leo-more-color").length)
myElement.getProductColorInfo();else if($(".leo-more-color").length)
$(".leo-more-color").remove();if($(".product-item-size").length)
myElement.getSizeContent();if($(".product-item-attribute").length)
myElement.getAttributeContent();if($(".product-item-manufacture").length)
myElement.getManufactureName();if($(".leo-ajax-tabs").length)
myElement.getTabContent();if($('.ap-total-wishlist').length||$('.ap-total-compare').length){myElement.getCountWishlistCompare()}
if(myElement.leoData!="leoajax=1"){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/appagebuilder/apajax.php'+'?rand='+new Date().getTime(),async:!0,cache:!1,dataType:"json",data:myElement.leoData,success:function(jsonData){if(jsonData){if(jsonData.cat){for(i=0;i<jsonData.cat.length;i++){var str=jsonData.cat[i].total;var label=$(".leo-qty.leo-cat-"+jsonData.cat[i].id_category).data("str");if(typeof label!="undefined"){str+="<span>"+label+"</span>"}
$(".leo-qty.leo-cat-"+jsonData.cat[i].id_category).html(str);$(".leo-qty.leo-cat-"+jsonData.cat[i].id_category).show()}
$('.leo-qty').each(function(){if($(this).html()==''){$(this).html('0');$(this).show()}})}
if(jsonData.product_list_image){var listProduct=new Array();for(i=0;i<jsonData.product_list_image.length;i++){listProduct[jsonData.product_list_image[i].id]=jsonData.product_list_image[i].content}
$(".leo-more-info").each(function(){$(this).html(listProduct[$(this).data("idproduct")])});addEffectProducts()}
if(jsonData.pro_cdown){var listProduct=new Array();for(i=0;i<jsonData.pro_cdown.length;i++){listProduct[jsonData.pro_cdown[i].id]=jsonData.pro_cdown[i].content}
$(".leo-more-cdown").each(function(){$(this).html(listProduct[$(this).data("idproduct")])})}
if(jsonData.pro_color){var listProduct=new Array();for(i=0;i<jsonData.pro_color.length;i++){listProduct[jsonData.pro_color[i].id]=jsonData.pro_color[i].content}
$(".leo-more-color").each(function(){$(this).html(listProduct[$(this).data("idproduct")])})}
if(jsonData.product_one_img){var listProductImg=new Array();var listProductName=new Array();for(i=0;i<jsonData.product_one_img.length;i++){listProductImg[jsonData.product_one_img[i].id]=jsonData.product_one_img[i].content;listProductName[jsonData.product_one_img[i].id]=jsonData.product_one_img[i].name}
iw=360;ih=360;if(typeof leoOption.homeWidth!=='undefined'){iw=leoOption.homeWidth;ih=leoOption.homeheight}else{iw=$('.product_img_link .img-fluid').first().attr('width');ih=$('.product_img_link .img-fluid').first().attr('height')}
$(".product-additional").each(function(){if(listProductImg[$(this).data("idproduct")]){var str_image=listProductImg[$(this).data("idproduct")];if($(this).data("image-type")){src_image=str_image.replace('home_default',$(this).data("image-type"))}else{src_image=str_image.replace('home_default','home_default')}
var name_image=listProductName[$(this).data("idproduct")];$(this).html('<img class="img-fluid" title="'+name_image+'" alt="'+name_image+'" src="'+src_image+'" width="'+iw+'" height="'+ih+'"/>')}})}
if(jsonData.product_attribute_one_img){var listProductImg=new Array();var listProductName=new Array();for(i=0;i<jsonData.product_attribute_one_img.length;i++){listProductImg[jsonData.product_attribute_one_img[i].id]=jsonData.product_attribute_one_img[i].content;listProductName[jsonData.product_attribute_one_img[i].id]=jsonData.product_attribute_one_img[i].name}
iw=360;ih=360;if(typeof leoOption.homeWidth!=='undefined'){iw=leoOption.homeWidth;ih=leoOption.homeheight}else{iw=$('.product_img_link .img-fluid').first().attr('width');ih=$('.product_img_link .img-fluid').first().attr('height')}
$(".product-attribute-additional").each(function(){if(listProductImg[$(this).closest('.js-product-miniature').data("id-product")]){var str_image=listProductImg[$(this).closest('.js-product-miniature').data("id-product")];if($(this).data("image-type")){src_image=str_image.replace('home_default',$(this).data("image-type"))}else{src_image=str_image.replace('home_default','home_default')}
var name_image=listProductName[$(this).closest('.js-product-miniature').data("id-product")];$(this).html('<img class="img-fluid" title="'+name_image+'" alt="'+name_image+'" src="'+src_image+'" width="'+iw+'" height="'+ih+'"/>')}})}
if(jsonData.product_attribute){if(typeof jsonData.product_attribute.attribute!=='undefined'){$.each(jsonData.product_attribute.attribute,function(key,value){$('.product-attribute-'+key).html(value);$('.product-attribute-'+key).removeClass('product-item-attribute')})}
if(typeof jsonData.product_attribute.size!=='undefined'){$.each(jsonData.product_attribute.size,function(key,value){$('.product-size-'+key).html(value);$('.product-size-'+key).removeClass('product-item-size')})}}
if(jsonData.product_manufacture){$.each(jsonData.product_manufacture,function(key,value){$('.product-manufacture-'+key).html(value);$('.product-manufacture-'+key).removeClass('product-item-manufacture')})}
if(jsonData.product_all_one_img){var listProductImg=new Array();var listProductName=new Array();for(i=0;i<jsonData.product_all_one_img.length;i++){listProductImg[jsonData.product_all_one_img[i].id]=jsonData.product_all_one_img[i].content;listProductName[jsonData.product_all_one_img[i].id]=jsonData.product_all_one_img[i].name}
iw=360;ih=360;if(typeof leoOption.homeWidth!=='undefined'){iw=leoOption.homeWidth;ih=leoOption.homeheight}else{iw=$('.product_img_link .img-fluid').first().attr('width');ih=$('.product_img_link .img-fluid').first().attr('height')}
$(".product-all-additional").each(function(){if(listProductImg[$(this).closest('.js-product-miniature').data("id-product")]){var str_image=listProductImg[$(this).closest('.js-product-miniature').data("id-product")];if($(this).data("image-type")){src_image=str_image.replace('home_default',$(this).data("image-type"))}else{src_image=str_image.replace('home_default','home_default')}
var name_image=listProductName[$(this).closest('.js-product-miniature').data("id-product")];$(this).html('<img class="img-fluid" title="'+name_image+'" alt="'+name_image+'" src="'+src_image+'" width="'+iw+'" height="'+ih+'"/>')}})}
if(jsonData.wishlist_products){$('.ap-total-wishlist').data('wishlist-total',jsonData.wishlist_products);$('.ap-total-wishlist').text(jsonData.wishlist_products)}else{$('.ap-total-wishlist').data('wishlist-total',0);$('.ap-total-wishlist').text('0')}
if(jsonData.compared_products){$('.ap-total-compare').data('compare-total',jsonData.compared_products);$('.ap-total-compare').text(jsonData.compared_products)}else{$('.ap-total-compare').data('compare-total',0);$('.ap-total-compare').text(0)}
if(jsonData.ajaxTab){callshowmore=callajaxcontent=0;$(".leo-ajax-tabs").addClass('loaded');$.each(jsonData.ajaxTab,function(key,value){$("#"+key).html(value);if(value.indexOf('ApProductList')>=0){callshowmore=1}
if(value.indexOf('product_list')>=0){callajaxcontent=1}});if(callshowmore){apshowmore()}
if(callajaxcontent){if(typeof $.LeoCustomAjax!=="undefined"&&$.isFunction($.LeoCustomAjax)){var leoCustomAjax=new $.LeoCustomAjax();leoCustomAjax.processAjax()}
callLeoFeature();activeAnimation()}}}},error:function(){}})}},getCountWishlistCompare:function(){this.leoData+='&wishlist_compare=1'},getCategoryList:function(){var leoCatList="";$(".leo-qty").each(function(){if($(this).data("id")){if(leoCatList)
leoCatList+=","+$(this).data("id");else leoCatList=$(this).data("id")}else{if(leoCatList)
leoCatList+=","+$(this).attr("id");else leoCatList=$(this).attr("id")}});if(leoCatList){leoCatList=leoCatList.replace(/leo-cat-/g,"");this.leoData+='&cat_list='+leoCatList}
return!1},getProductListImage:function(){var leoProInfo="";$(".leo-more-info").each(function(){if(!leoProInfo)
leoProInfo+=$(this).data("idproduct");else leoProInfo+=","+$(this).data("idproduct")});if(leoProInfo){this.leoData+='&product_list_image='+leoProInfo}
return!1},getProductCdownInfo:function(){var leoProCdown="";$(".leo-more-cdown").each(function(){if(!leoProCdown)
leoProCdown+=$(this).data("idproduct");else leoProCdown+=","+$(this).data("idproduct")});if(leoProCdown){this.leoData+='&pro_cdown='+leoProCdown}
return!1},getProductColorInfo:function(){var leoProColor="";$(".leo-more-color").each(function(){if(!leoProColor)
leoProColor+=$(this).data("idproduct");else leoProColor+=","+$(this).data("idproduct")});if(leoProColor){this.leoData+='&pro_color='+leoProColor}
return!1},getTabContent:function(){var tabshortcode="";var tabshortcodekey="";$(".leo-ajax-tabs").each(function(){if(!$(this).hasClass('loaded')){if(!tabshortcode)
tabshortcode+=$(this).data("shortcode");else tabshortcode+="@|@"+$(this).data("shortcode");if(!tabshortcodekey)
tabshortcodekey+=$(this).attr("id");else tabshortcodekey+="@|@"+$(this).attr("id");if(!$(this).find('slick-loading').length){$(this).html('<div class="slick-loading" style="display: block;"><div class="slick-list" style="height: 600px;"> </div></div>')}}});if(tabshortcode){this.leoData+='&tabshortcode='+tabshortcode}
if(tabshortcode){this.leoData+='&tabshortcodekey='+tabshortcodekey;if(tabshortcode&&$('input:radio[name=ajaxtabcate]').length&&$('input:radio[name=ajaxtabcate]:checked').val()){this.leoData+='&ajaxtabcate='+$('input:radio[name=ajaxtabcate]:checked').val()}}
return!1},getSizeContent:function(){var leoAdditional="";$(".product-item-size").each(function(){if(!leoAdditional)
leoAdditional+=$(this).data("idproduct");else leoAdditional+=","+$(this).data("idproduct")});if(leoAdditional){this.leoData+='&product_size='+leoAdditional}
return!1},getAttributeContent:function(){var leoAdditional="";$(".product-item-attribute").each(function(){if(!leoAdditional)
leoAdditional+=$(this).data("idproduct");else leoAdditional+=","+$(this).data("idproduct")});if(leoAdditional){this.leoData+='&product_attribute='+leoAdditional}
return!1},getManufactureName:function(){var leoAdditional="";var testArray=[];$(".product-item-manufacture").each(function(){if(!leoAdditional){leoAdditional+=$(this).data("idmanufacturer");testArray.push($(this).data("idmanufacturer"))}else{if(testArray.indexOf($(this).data("idmanufacturer"))<0){leoAdditional+=","+$(this).data("idmanufacturer");testArray.push($(this).data("idmanufacturer"))}}});if(leoAdditional){this.leoData+='&product_manufacture='+leoAdditional}
return!1},getProductOneImage:function(){var leoAdditional="";$(".product-additional").each(function(){if(!leoAdditional)
leoAdditional+=$(this).data("idproduct");else leoAdditional+=","+$(this).data("idproduct")});if(leoAdditional){this.leoData+='&product_one_img='+leoAdditional}
return!1},getProductAttributeOneImage:function(){var leoAdditionalattribute="0-0";$(".product-attribute-additional").each(function(){leoAdditionalattribute+=","+$(this).closest('.js-product-miniature').data("id-product")+'-'+$(this).closest('.js-product-miniature').data("id-product-attribute")});if(leoAdditionalattribute&&leoAdditionalattribute!='0-0'){this.leoData+='&product_attribute_one_img='+leoAdditionalattribute}
return!1},getProductAllOneImage:function(){var leoAdditional="0";var image_product="0";$(".product-all-additional").each(function(){leoAdditional+=","+$(this).closest('.js-product-miniature').data("id-product");image_product+=","+$(this).data("id-image")});if(leoAdditional){this.leoData+='&product_all_one_img='+leoAdditional+'&image_product='+image_product}
return!1},}}(jQuery));function addJSProduct(currentProduct){$('.thumbs_list_'+currentProduct).serialScroll({items:'li:visible',prev:'.view_scroll_left_'+currentProduct,next:'.view_scroll_right_'+currentProduct,axis:'y',offset:0,start:0,stop:!0,duration:700,step:1,lazy:!0,lock:!1,force:!1,cycle:!1,onBefore:function(e,elem,$pane,$items,pos){if(pos==0){$('.view_scroll_left_'+currentProduct).addClass('disable')}else if(pos==$items.length-1){$('.view_scroll_right_'+currentProduct).addClass('disable')}else{$('.view_scroll_left_'+currentProduct).removeClass('disable');$('.view_scroll_right_'+currentProduct).removeClass('disable')}},});$('.thumbs_list_'+currentProduct).trigger('goto',1);$('.thumbs_list_'+currentProduct).trigger('goto',0)}
function addEffectProducts(){if(typeof(leoOption)!='undefined'&&leoOption.product_list_image){$(".leo-more-info").each(function(){addJSProduct($(this).data("idproduct"))});addEffectProduct()}}
function addEffectProduct(){var speed=800;var effect="easeInOutQuad";$(".leo-more-info").each(function(){var leo_preview=this;$(leo_preview).find(".leo-hover-image").each(function(){$(this).mouseover(function(){var big_image=$(this).attr("rel");var imgElement=$(leo_preview).parent().find(".product-thumbnail img").first();if(!imgElement.length){imgElement=$(leo_preview).parent().find(".product_image img").first()}
if(imgElement.length){$(imgElement).stop().animate({opacity:0},{duration:speed,easing:effect});$(imgElement).first().attr("src",big_image);$(imgElement).first().attr("data-rel",big_image);$(imgElement).stop().animate({opacity:1},{duration:speed,easing:effect})}
if(!$(this).hasClass('shown')){$(leo_preview).find('.shown').removeClass('shown');$(this).parent().addClass('shown')}})});$('.thickbox-ajax-'+$(this).data("idproduct")).fancybox({helpers:{overlay:{locked:!1}},'hideOnContentClick':!0,'transitionIn':'elastic','transitionOut':'elastic'})})}
function addEffOneImg(){var speed=800;var effect="easeInOutQuad";$(".product-additional").each(function(){if($(this).find("img").length){var leo_hover_image=$(this).parent().find("img").first();var leo_preview=$(this);$(this).parent().mouseenter(function(){$(this).find("img").first().stop().animate({opacity:0},{duration:speed,easing:effect});$(leo_preview).stop().animate({opacity:1},{duration:speed,easing:effect})});$(this).parent().mouseleave(function(){$(this).find("img").first().stop().animate({opacity:1},{duration:speed,easing:effect});$(leo_preview).stop().animate({opacity:0},{duration:speed,easing:effect})})}})}
function log(message){console.log(message)}
function activeAnimation(){$(".has-animation").each(function(){onScrollInit($(this))})}
function onScrollInit(items){items.each(function(){var osElement=$(this);var animation=$(osElement).data("animation");var osAnimationDelay=$(osElement).data("animation-delay");var osAnimationDuration=$(osElement).data("animation-duration");var osAnimationIterationCount=$(osElement).data("animation-iteration-count");var osAnimationInfinite=$(osElement).data("animation-infinite");if(osAnimationInfinite==1){var loop_animation='infinite'}else{var loop_animation=osAnimationIterationCount}
osElement.css({"-webkit-animation-delay":osAnimationDelay,"-moz-animation-delay":osAnimationDelay,"animation-delay":osAnimationDelay,"-webkit-animation-duration":osAnimationDuration,"-moz-animation-duration":osAnimationDuration,"animation-duration":osAnimationDuration,"-webkit-animation-iteration-count":loop_animation,"-moz-animation-iteration-count":loop_animation,"animation-iteration-count":loop_animation,});osElement.waypoint(function(){if(osElement.hasClass('has-animation')){osElement.addClass('animated '+animation).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',function(){$(this).removeClass('has-animation animated '+animation)})}
this.destroy()},{triggerOnce:!0,offset:'100%'})})}
function synSize(name){var obj=$("#"+name);var div=$(obj).closest(".gmap-cover");var gmap=$(div).find(".gmap");$(obj).height($(gmap).height())}
function apshowmore(){$(".btn-show-more").click(function(){var page=parseInt($(this).data('page'));var use_animation=parseInt($(this).data('use-animation'));var btn=$(this);var config=$(this).closest(".ApProductList").find(".apconfig").val();btn.data('reset-text',btn.html());btn.html(btn.data('loading-text'));$.ajax({headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/appagebuilder/apajax.php',async:!0,cache:!1,dataType:"Json",data:{"config":config,"p":page,"use_animation":use_animation},success:function(response){var boxCover=$(btn).closest(".box-show-more");if(!response.is_more){$(boxCover).removeClass("open").fadeOut()}
if(response.html){$(boxCover).prev().append(response.html)}
$(btn).data("page",(page+1));if(typeof $.LeoCustomAjax!=="undefined"&&$.isFunction($.LeoCustomAjax)){var leoCustomAjax=new $.LeoCustomAjax();leoCustomAjax.processAjax()}
callLeoFeature();activeAnimation()}}).always(function(){btn.html(btn.data('reset-text'))})})}(function($){window.addRule=function(selector,styles,sheet){styles=(function(styles){if(typeof styles==="string")return styles;var clone="";for(var prop in styles){if(styles.hasOwnProperty(prop)){var val=styles[prop];prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();clone+=prop+":"+(prop==="content"?'"'+val+'"':val)+"; "}}
return clone}(styles));try{sheet=sheet||document.styleSheets[document.styleSheets.length-1];if(sheet.insertRule){if(sheet.cssRules!==null&&sheet.cssRules.length!==0)
sheet.insertRule(selector+" {"+styles+"}",sheet.cssRules.length)}else if(sheet.addRule)sheet.addRule(selector,styles)}catch(err){var style=(function(){var style=document.createElement("style");style.appendChild(document.createTextNode(""));document.head.appendChild(style);return style})();style.sheet.insertRule(selector+" {"+styles+"}",0)}
return this};if($)$.fn.addRule=function(styles,sheet){addRule(this.selector,styles,sheet);return this}}(this.jQuery||this.Zepto));function apPopupForm(){if($.cookie('apnewletter'))return;$.fancybox({'content':$(".ap-popup").html(),'wrapCSS':'ap-popup-clone',afterClose:function(event,ui){},beforeShow:function(event,ui){this.inner.append("<div class='turnoff-popup-wrapper text-center'><input id='turnoff-popup-bt' name='turnoff-popup-bt' class='turnoff-popup' type='checkbox'><label for='turnoff-popup-bt'>"+turnoff_popup_text+"</label></div>");$("body").find("#turnoff-popup-bt").trigger('click');$.cookie('apnewletter','1');$('.turnoff-popup').addClass('active');$('.turnoff-popup').click(function(){if(!$(this).hasClass('active')){$.cookie('apnewletter','1');$(this).addClass('active')}else{$.cookie('apnewletter',null);$(this).removeClass('active')}})}})}
$(document).ready(function(){if($(".btn-show-more").length)apshowmore();activeAnimation();if($(".ajaxtabcate").length){$('input:radio[name=ajaxtabcate]').click(function(){$(".leo-ajax-tabs").each(function(){if($(this).find(".product-image").length||$(this).find(".product-title").length){$(this).removeClass('loaded');if(typeof $.LeoCustomAjax!=="undefined"&&$.isFunction($.LeoCustomAjax)){var leoCustomAjax=new $.LeoCustomAjax();leoCustomAjax.processAjax()}}})})}
if($(".tabs-dropdown-menu").length){$(".tabs-dropdown-menu").each(function(){wraper=$(this).parent();tabdrop=$(this);if($(this).hasClass("selecttext")){nav_active=$(wraper).find(".nav-link").first();$(this).find('button').html($(nav_active).find("span").html())}
$(this).find('.dropdown-item').first().addClass('active');$(wraper).find('.nav-link').click(function(){if($(this).hasClass('active')){return}
$(tabdrop).find('.dropdown-item').removeClass('active');cclass=$(this).attr('class');var strArray=cclass.split(" ");formClass="";for(var i=0;i<strArray.length;i++){if(strArray[i].indexOf('form')>=0){formClass=strArray[i];break}}
$(wraper).find('.dropdown-item.'+formClass).addClass('active')});$(tabdrop).find('.dropdown-item').click(function(){$(wraper).find('.nav-link').removeClass('active');cclass=$(this).attr('class');var strArray=cclass.split(" ");formClass="";for(var i=0;i<strArray.length;i++){if(strArray[i].indexOf('form')>=0){formClass=strArray[i];break}}
$(wraper).find('.nav-link.'+formClass).trigger('click')})})}
if($('.ap-popup').length){if($('.ap-popup').hasClass('index-only')&&$('body').attr('id')=='index')
apPopupForm();else apPopupForm()}
$(".has-bg.bg-fullwidth").each(function(){id="#"+$(this).attr("id");bg="";if($(this).data("src")!==undefined)bg="url("+$(this).data("src")+")";bg+=$(this).data("bg_data");$(id+":before").addRule({background:bg})});if(typeof stellar!=='undefined'&&stellar)
$.stellar({horizontalScrolling:!1});currentPosX=[];currentPosY=[];$("div[data-mouse-parallax-strength]").each(function(){currentPos=$(this).css("background-position");if(typeof currentPos=="string"){currentPosArray=currentPos.split(" ")}else{currentPosArray=[$(this).css("background-position-x"),$(this).css("background-position-y")]}
currentPosX[$(this).data("mouse-parallax-rid")]=parseFloat(currentPosArray[0]);currentPosY[$(this).data("mouse-parallax-rid")]=parseFloat(currentPosArray[1]);$(this).mousemove(function(e){newPosX=currentPosX[$(this).data("mouse-parallax-rid")];newPosY=currentPosY[$(this).data("mouse-parallax-rid")];if($(this).data("mouse-parallax-axis")!="axis-y"){mparallaxPageX=e.pageX-$(this).offset().left;if($(this).hasClass("full-bg-screen")){mparallaxPageX=mparallaxPageX-1000}
newPosX=(mparallaxPageX*$(this).data("mouse-parallax-strength")*-1)+newPosX}
if($(this).data("mouse-parallax-axis")!="axis-x"){mparallaxPageY=e.pageY-$(this).offset().top;newPosY=mparallaxPageY*$(this).data("mouse-parallax-strength")*-1}
$(this).css("background-position",newPosX+"px "+newPosY+"px")})});var ytIframeId;var ytVideoId;function onYouTubeIframeAPIReady(){$("div.iframe-youtube-api-tag").each(function(){ytIframeId=$(this).attr("id");ytVideoId=$(this).data("youtube-video-id");new YT.Player(ytIframeId,{videoId:ytVideoId,width:"100%",height:"100%",playerVars:{autoplay:1,controls:0,disablekb:1,fs:0,cc_load_policy:0,iv_load_policy:3,modestbranding:0,rel:0,showinfo:0,start:0},events:{"onReady":function(event){event.target.mute();setInterval(function(){event.target.seekTo(0)},(event.target.getDuration()-1)*1000)}}})})}
onYouTubeIframeAPIReady();if(typeof MediaElementPlayer!=='undefined'){var player1=new MediaElementPlayer('#special-youtube-video1');var player2=new MediaElementPlayer('#special-youtube-video2');if(player1){var auto_find=setInterval(function(){if($('#video-1 .mejs-overlay-play').html()){$('#video-1 .mejs-overlay-play>.mejs-overlay-button').before('<div class="video-name">'+$('#special-youtube-video1').data('name')+'</div>');$('#video-1 .mejs-overlay-play').append('<div class="video-description">Watch video and <span>subscribe us<span></div>');clearInterval(auto_find)}},500)}
if(player2){var auto_find1=setInterval(function(){if($('#video-2 .mejs-overlay-play').html()){$('#video-2 .mejs-overlay-play>.mejs-overlay-button').before('<div class="video-name">'+$('#special-youtube-video2').data('name')+'</div>');$('#video-2 .mejs-overlay-play').append('<div class="video-description">Watch video and <span>subscribe us<span></div>');clearInterval(auto_find1)}},500)}}
current_url=window.location.href;$('.apconfig').each(function(){var enableJS=$(this).data('enablejs');if(enableJS==!1){return}
var leochange='&leopanelchange';var current_url=$(this).data('url');if(!current_url){current_url=window.location.href;current_url=current_url.replace(leochange,"")}
var param=$(this).data('type');var value=$(this).data('id');var re=new RegExp("([?|&])"+param+"=.*?(&|$)","i");if(current_url.match(re))
$(this).attr('href',current_url.replace(re,'$1'+param+"="+value+'$2')+leochange);else{if(current_url.indexOf('?')==-1)
$(this).attr('href',current_url+'?'+param+"="+value+leochange);else $(this).attr('href',current_url+'&'+param+"="+value+leochange)}});$(window).resize(function(){if($('.tab-pane .owl-carousel').length){$('.tab-pane .owl-carousel').each(function(index,element){if(!$(element).parents('.tab-pane').hasClass('active')&&typeof($(element).data('owlCarousel'))!=="undefined"){var w_owl_active_tab=$(element).parents('.tab-pane').siblings('.active').find('.owl-carousel').width();$(element).width(w_owl_active_tab);$(element).data('owlCarousel').updateVars();$(element).width('100%')}})}})
var check_window_w=parseInt($(window).width());if(check_window_w>=992&&check_window_w<1200){addClassLoading('lg')}else if(check_window_w>=768&&check_window_w<992){addClassLoading('md')}else if(check_window_w>=576&&check_window_w<768){addClassLoading('sm')}else if(check_window_w<576){addClassLoading('m')}else{addClassLoading('xl')}
if($('.list-images-mobile').length&&$('.list-images-mobile').children().length>1){$('.list-images-mobile').slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,})}
if($('.product-list-images-mobile').length){if($('body').hasClass('lang-rtl')){$('.product-list-images-mobile').each(function(){if($(this).children().length>1){$(this).slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,rtl:!0})}})}else{$('.product-list-images-mobile').each(function(){if($(this).children().length>1){$(this).slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,})}})}
$(document).ajaxComplete(function(event,xhr,settings){if(settings.url.indexOf('apajax')>0){$('.product-list-images-mobile').each(function(){if($('.product-list-images-mobile').hasClass('slick-slider')){function offSlideCarousel(selector){selector.parents('.owl-item').on("touchstart mousedown",function(e){e.stopPropagation()})}
if(window.addEventListener){window.addEventListener("load",offSlideCarousel($(this)),!1)}else if(window.attachEvent){window.attachEvent("onload",offSlideCarousel($(this)))}else{window.onload=offSlideCarousel($(this))}}})}
if(settings.url.indexOf('from-xhr')>0){if($('body').hasClass('lang-rtl')){$('.product-list-images-mobile').each(function(){if($(this).children().length>1){$(this).slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,rtl:!0})}})}else{$('.product-list-images-mobile').each(function(){if($(this).children().length>1){$(this).slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,})}})}}})}
if($("body").attr("id")=="product"){$(document).ajaxComplete(function(event,xhr,settings){if(settings.url.indexOf('controller=product')>0){if($('.list-images-mobile').length&&$('.list-images-mobile').children().length>1){$('.list-images-mobile').slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,})}}})}});function addClassLoading($type){$('.timeline-wrapper').each(function(){if($(this).data($type)<=$(this).data('item')){var num_remove_item=$(this).data('item')-$(this).data($type);if($(this).data($type)<$(this).data('item')){var num_remove_item=$(this).data('item')-$(this).data($type);$(this).find('.timeline-parent').slice(-num_remove_item).remove()}
if(12%$(this).data($type)==0){if($type=='m'){$(this).find('.timeline-parent').addClass('col-xs-'+12/$(this).data($type))}else{$(this).find('.timeline-parent').addClass('col-'+$type+'-'+12/$(this).data($type))}}else{$(this).find('.timeline-parent').css({'width':100/$(this).data($type)+'%','float':'left'})}
$('.timeline-wrapper').removeClass('prepare')}})}
function callLeoFeature(){if(typeof(leoBtCart)!='undefined'){leoBtCart()}
if(typeof(leoSelectAttr)!='undefined'){leoSelectAttr()}
if(typeof(LeoWishlistButtonAction)!='undefined'){LeoWishlistButtonAction()}
if(typeof(LeoCompareButtonAction)!='undefined'){LeoCompareButtonAction()}
if(typeof(actionQuickViewLoading)!='undefined'){actionQuickViewLoading()}}
function SetOwlCarouselFirstLast(el){el.find(".owl-item").removeClass("first");el.find(".owl-item.active").first().addClass("first");el.find(".owl-item").removeClass("last");el.find(".owl-item.active").last().addClass("last")}
$(document).ready(function(){if(typeof(ap_list_functions)!='undefined'){$.each(ap_list_functions,function(i,val){val();ap_list_functions[i]=null})}
if($("body").attr("id")=="category"&&$('#search_filters').length){$('.facet-label').on('click',function(){$(document).ajaxComplete(function(event,xhr,settings){if(typeof xhr!="undefined"&&typeof xhr.responseJSON!="undefined"&&typeof xhr.responseJSON.products!="undefined"){if(typeof(ap_list_functions)!='undefined'){$.each(ap_list_functions,function(i,val){if(typeof val!="undefined"&&val!=null){val();ap_list_functions[i]=null}})}}})})}});$(window).load(function(){if(typeof(ap_list_functions_loaded)!='undefined'){for(var i=0;i<ap_list_functions_loaded.length;i++){ap_list_functions_loaded[i]()}}})
$(document).ready(function(){if($('#sitemap').length>0){$('#sitemap .sitemap').prepend(leo_site_map)}
if($('.lazy').length){$(function(){$('.lazy').lazy({effect:'fadeIn'})});$(document).ajaxComplete(function(){if($('.lazy').length){$('.lazy').lazy({effect:'fadeIn'})}})}
if(typeof approfile_multilang_url!="undefined"){$.each(approfile_multilang_url,function(index,profile){var url_search=prestashop.urls.base_url+profile.iso_code;var url_change=prestashop.urls.base_url+profile.iso_code+'/'+profile.friendly_url+'.html';if($('#leo_block_top').length){var parent_o=$('#leo_block_top .language-selector')}else{var parent_o=$('.language-selector-wrapper')}
parent_o.find('li a').each(function(){var lang_href=$(this).attr('href');if(lang_href.indexOf(url_search)>-1){$(this).attr('href',url_change)}})})}
if($('#leo_block_top').length){var parent_o_currency=$('#leo_block_top .currency-selector')}else{var parent_o_currency=$('.currency-selector')}
parent_o_currency.find('li a').each(function(){var url_link=$(this).attr('href');var id_currency=getParamFromURL("id_currency",url_link);var SubmitCurrency=getParamFromURL("SubmitCurrency",url_link);var current_url=window.location.href;if(prestashop.page.page_name=='product'){var current_url=prestashop.urls.current_url}
var current_url=removeParamFromURL('SubmitCurrency',current_url);var current_url=removeParamFromURL('id_currency',current_url);if(current_url.indexOf('?')==-1){var new_url=current_url+'?SubmitCurrency='+SubmitCurrency+"&id_currency="+id_currency;$(this).attr('href',new_url)}else{var new_url=current_url+'&SubmitCurrency='+SubmitCurrency+"&id_currency="+id_currency;$(this).attr('href',new_url)}});prestashop.on('updateProductList',function(){if(typeof $.LeoCustomAjax!=="undefined"&&$.isFunction($.LeoCustomAjax)){var leoCustomAjax=new $.LeoCustomAjax();leoCustomAjax.processAjax()}});if($('.demo-product-detail[data-menu-type=url] a').length&&prestashop.page.page_name!='product'){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/appagebuilder/apajax.php'+'?rand='+new Date().getTime(),async:!0,cache:!1,dataType:"json",data:{"action":"get-product-link"},success:function(jsonData){if(jsonData){$('.demo-product-detail[data-menu-type=url] a').each(function(){var original_url=$(this).attr('href');var layout_key=original_url.substring(original_url.indexOf('?layout='));var new_url=jsonData.replace('.html','.html'+layout_key);$(this).attr('href',new_url).addClass('updated')});if($('.lazy').length){if(lazyLoadInstance){lazyLoadInstance.update()}}}},error:function(){}})}});function removeParamFromURL(key,sourceURL){var rtn=sourceURL.split("?")[0],param,params_arr=[],queryString=(sourceURL.indexOf("?")!==-1)?sourceURL.split("?")[1]:"";if(queryString!==""){params_arr=queryString.split("&");for(var i=params_arr.length-1;i>=0;i-=1){param=params_arr[i].split("=")[0];if(param===key){params_arr.splice(i,1)}}
if(params_arr.length>0){rtn=rtn+"?"+params_arr.join("&")}}
return rtn}
function getParamFromURL(key,sourceURL){var rtn=sourceURL.split("?")[0],param,params_arr=[],queryString=(sourceURL.indexOf("?")!==-1)?sourceURL.split("?")[1]:"";if(queryString!==""){params_arr=queryString.split("&");for(var i=params_arr.length-1;i>=0;i-=1){param=params_arr[i].split("=")[0];if(param===key){return params_arr[i].split("=")[1]}}}
return!1}